projects
/
fw
/
openocd
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
flash/stm32l4x: add support of STM32WL5x dual core
[fw/openocd]
/
tcl
/
bitsbytes.tcl
diff --git
a/tcl/bitsbytes.tcl
b/tcl/bitsbytes.tcl
index 5f9cae114745bf2d89f003160680f9edcebb95d5..756c725df6d95bfd1a20eb4d879ee3840b5d29fe 100644
(file)
--- a/
tcl/bitsbytes.tcl
+++ b/
tcl/bitsbytes.tcl
@@
-2,7
+2,7
@@
# Purpose - Create some $BIT variables
# Create $K and $M variables
# and some bit field extraction variables.
# Purpose - Create some $BIT variables
# Create $K and $M variables
# and some bit field extraction variables.
-# Creat helper variables ...
+# Creat
e
helper variables ...
# BIT0.. BIT31
for { set x 0 } { $x < 32 } { set x [expr {$x + 1}]} {
# BIT0.. BIT31
for { set x 0 } { $x < 32 } { set x [expr {$x + 1}]} {
@@
-36,7
+36,7
@@
proc create_mask { MSB LSB } {
# Result: 0x02340000
proc extract_bitfield { VALUE MSB LSB } {
# Result: 0x02340000
proc extract_bitfield { VALUE MSB LSB } {
- return [expr
[create_mask $MSB $LSB] & $VALUE
]
+ return [expr
{[create_mask $MSB $LSB] & $VALUE}
]
}
}
@@
-47,7
+47,7
@@
proc extract_bitfield { VALUE MSB LSB } {
# Result: 0x00000234
#
proc normalize_bitfield { VALUE MSB LSB } {
# Result: 0x00000234
#
proc normalize_bitfield { VALUE MSB LSB } {
- return [expr
[extract_bitfield $VALUE $MSB $LSB ] >> $LSB
]
+ return [expr
{[extract_bitfield $VALUE $MSB $LSB ] >> $LSB}
]
}
proc show_normalize_bitfield { VALUE MSB LSB } {
}
proc show_normalize_bitfield { VALUE MSB LSB } {