aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/ic_reg_maps/gen_ads62p44_regs.py
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/ic_reg_maps/gen_ads62p44_regs.py')
-rwxr-xr-xhost/lib/ic_reg_maps/gen_ads62p44_regs.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/host/lib/ic_reg_maps/gen_ads62p44_regs.py b/host/lib/ic_reg_maps/gen_ads62p44_regs.py
index f0a84d940..df5c0c66c 100755
--- a/host/lib/ic_reg_maps/gen_ads62p44_regs.py
+++ b/host/lib/ic_reg_maps/gen_ads62p44_regs.py
@@ -95,13 +95,13 @@ BODY_TMPL="""\
boost::uint8_t get_reg(boost::uint8_t addr){
boost::uint8_t reg = 0;
switch(addr){
- #for $addr in sorted(set(map(lambda r: r.get_addr(), $regs)))
- case $addr:
- #for $reg in filter(lambda r: r.get_addr() == addr, $regs)
- reg |= (boost::uint8_t($reg.get_name()) & $reg.get_mask()) << $reg.get_shift();
- #end for
+ % for addr in sorted(set(map(lambda r: r.get_addr(), regs))):
+ case ${addr}:
+ % for reg in filter(lambda r: r.get_addr() == addr, regs):
+ reg |= (boost::uint8_t(${reg.get_name()}) & ${reg.get_mask()}) << ${reg.get_shift()};
+ % endfor
break;
- #end for
+ % endfor
}
return reg;
}