diff options
author | Martin Braun <martin.braun@ettus.com> | 2016-11-08 08:41:46 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2016-11-08 08:41:46 -0800 |
commit | 9b852f5f243e5cf68662b7152b5fa331a83e55fb (patch) | |
tree | 159ffe0761f78dd87e2ecc97abea14494abab4ff /host/lib/ic_reg_maps/gen_ad9862_regs.py | |
parent | c66cb1bad0d881394f3519bd94f4693cceab4c64 (diff) | |
parent | 99c2730bc9db270560671f2d7d173768465ed51f (diff) | |
download | uhd-9b852f5f243e5cf68662b7152b5fa331a83e55fb.tar.gz uhd-9b852f5f243e5cf68662b7152b5fa331a83e55fb.tar.bz2 uhd-9b852f5f243e5cf68662b7152b5fa331a83e55fb.zip |
Merge branch 'maint'
Diffstat (limited to 'host/lib/ic_reg_maps/gen_ad9862_regs.py')
-rwxr-xr-x | host/lib/ic_reg_maps/gen_ad9862_regs.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/host/lib/ic_reg_maps/gen_ad9862_regs.py b/host/lib/ic_reg_maps/gen_ad9862_regs.py index 022d97c16..738e9c616 100755 --- a/host/lib/ic_reg_maps/gen_ad9862_regs.py +++ b/host/lib/ic_reg_maps/gen_ad9862_regs.py @@ -202,13 +202,13 @@ chip_id 63[0:7] 0 # Header and Source templates below ######################################################################## BODY_TMPL=""" -boost::uint8_t get_reg(boost::uint8_t addr){ - boost::uint8_t reg = 0; +uint8_t get_reg(uint8_t addr){ + uint8_t reg = 0; switch(addr){ % for addr in range(0, 63+1): case ${addr}: % for reg in filter(lambda r: r.get_addr() == addr, regs): - reg |= (boost::uint16_t(${reg.get_name()}) & ${reg.get_mask()}) << ${reg.get_shift()}; + reg |= (uint16_t(${reg.get_name()}) & ${reg.get_mask()}) << ${reg.get_shift()}; % endfor break; % endfor @@ -216,7 +216,7 @@ boost::uint8_t get_reg(boost::uint8_t addr){ return reg; } -void set_reg(boost::uint8_t addr, boost::uint16_t reg){ +void set_reg(uint8_t addr, uint16_t reg){ switch(addr){ % for addr in sorted(set(map(lambda r: r.get_addr(), regs))): case ${addr}: @@ -228,12 +228,12 @@ void set_reg(boost::uint8_t addr, boost::uint16_t reg){ } } -boost::uint16_t get_write_reg(boost::uint8_t addr){ - return (boost::uint16_t(addr) << 8) | get_reg(addr); +uint16_t get_write_reg(uint8_t addr){ + return (uint16_t(addr) << 8) | get_reg(addr); } -boost::uint16_t get_read_reg(boost::uint8_t addr){ - return (boost::uint16_t(addr) << 8) | (1 << 15); +uint16_t get_read_reg(uint8_t addr){ + return (uint16_t(addr) << 8) | (1 << 15); } """ |