diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2013-07-13 17:38:34 +0200 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2013-07-13 17:47:01 +0200 |
commit | f617da0552c95202807c5e41c70bc78a3189378e (patch) | |
tree | bcb5c16a82515465661430d90eede48000918700 /utils/hwstub/tools/init.lua | |
parent | 140783ef66eef379feedcfef5403c5729d38936a (diff) | |
download | rockbox-f617da0552c95202807c5e41c70bc78a3189378e.tar.gz rockbox-f617da0552c95202807c5e41c70bc78a3189378e.zip |
hwstub: enhance protocol with more functions
Change-Id: I7944249c2f7ea3e180e7b79ee8ae402d1d0742d3
Diffstat (limited to 'utils/hwstub/tools/init.lua')
-rw-r--r-- | utils/hwstub/tools/init.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/utils/hwstub/tools/init.lua b/utils/hwstub/tools/init.lua index 142c77e20a..97d393dab1 100644 --- a/utils/hwstub/tools/init.lua +++ b/utils/hwstub/tools/init.lua | |||
@@ -40,6 +40,7 @@ do | |||
40 | h:add("It contains some information about the device and the following methods."); | 40 | h:add("It contains some information about the device and the following methods."); |
41 | h:add("* read8/16/32(a) reads a 8/16/32-bit integer at address a"); | 41 | h:add("* read8/16/32(a) reads a 8/16/32-bit integer at address a"); |
42 | h:add("* write8/16/32(a, v) writes the 8/16/32-bit integer v at address a"); | 42 | h:add("* write8/16/32(a, v) writes the 8/16/32-bit integer v at address a"); |
43 | h:add("* print_log() prints the device log"); | ||
43 | 44 | ||
44 | h = HELP:create_topic("HW"); | 45 | h = HELP:create_topic("HW"); |
45 | h:add("This variable redirects to the current soc under hwstub.soc and should be changed by calling hwstub:soc:select only."); | 46 | h:add("This variable redirects to the current soc under hwstub.soc and should be changed by calling hwstub:soc:select only."); |
@@ -70,6 +71,13 @@ if not hwstub.options.quiet then | |||
70 | print(" device") | 71 | print(" device") |
71 | print(" version: " .. string.format("%d.%d.%d", hwstub.dev.version.major, | 72 | print(" version: " .. string.format("%d.%d.%d", hwstub.dev.version.major, |
72 | hwstub.dev.version.minor, hwstub.dev.version.revision)) | 73 | hwstub.dev.version.minor, hwstub.dev.version.revision)) |
74 | print(" target") | ||
75 | local id_str = string.char(bit32.extract(hwstub.dev.target.id, 0, 8), | ||
76 | bit32.extract(hwstub.dev.target.id, 8, 8), | ||
77 | bit32.extract(hwstub.dev.target.id, 16, 8), | ||
78 | bit32.extract(hwstub.dev.target.id, 24, 8)) | ||
79 | print(" id: " .. string.format("%#x (%s)", hwstub.dev.target.id, id_str)) | ||
80 | print(" name: " .. hwstub.dev.target.name) | ||
73 | print(" layout") | 81 | print(" layout") |
74 | print(" on-chip ram") | 82 | print(" on-chip ram") |
75 | print(" code: " .. string.format("%#x bytes @ %#x", | 83 | print(" code: " .. string.format("%#x bytes @ %#x", |
@@ -83,7 +91,6 @@ if not hwstub.options.quiet then | |||
83 | print(" mem: " .. tostring(hwstub.dev.features.mem)) | 91 | print(" mem: " .. tostring(hwstub.dev.features.mem)) |
84 | print(" call: " .. tostring(hwstub.dev.features.call)) | 92 | print(" call: " .. tostring(hwstub.dev.features.call)) |
85 | print(" jump: " .. tostring(hwstub.dev.features.jump)) | 93 | print(" jump: " .. tostring(hwstub.dev.features.jump)) |
86 | print(" aes_otp: " .. tostring(hwstub.dev.features.aes_otp)) | ||
87 | end | 94 | end |
88 | 95 | ||
89 | -- | 96 | -- |