+# SPDX-License-Identifier: GPL-2.0-or-later
+
# http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4394
#
# use combined on interfaces or targets that can't set TRST/SRST separately
}
proc peek32 {address} {
- mem2array t 32 $address 1
- return $t(0)
+ return [read_memory $address 32 1]
}
# Wait for an expression to be true with a timeout
proc wait_state {expression} {
- for {set i 0} {$i < 1000} {set i [expr $i + 1]} {
+ for {set i 0} {$i < 1000} {set i [expr {$i + 1}]} {
if {[uplevel 1 $expression] == 0} {
return
}