diff options
author | Marcin Bukat <marcin.bukat@gmail.com> | 2015-11-17 22:40:31 +0100 |
---|---|---|
committer | Marcin Bukat <marcin.bukat@gmail.com> | 2015-11-17 22:40:31 +0100 |
commit | ad5e5c42fb00334ec0e9b0e9e8c69c4b7d05ac7a (patch) | |
tree | 580c291bafb641119cbfd289ff683da467027319 /utils/hwstub | |
parent | f47f04b65fc7603ec5926dd5f941d6690a0daf91 (diff) | |
download | rockbox-ad5e5c42fb00334ec0e9b0e9e8c69c4b7d05ac7a.tar.gz rockbox-ad5e5c42fb00334ec0e9b0e9e8c69c4b7d05ac7a.zip |
hwstub: fix atj213x dsp lua code
Change-Id: I5fbd1799b958bedbe74f91bdcdd8a544e15d2a78
Diffstat (limited to 'utils/hwstub')
-rw-r--r-- | utils/hwstub/tools/lua/atj/dsp.lua | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/utils/hwstub/tools/lua/atj/dsp.lua b/utils/hwstub/tools/lua/atj/dsp.lua index 93c80e36ef..675378b6d4 100644 --- a/utils/hwstub/tools/lua/atj/dsp.lua +++ b/utils/hwstub/tools/lua/atj/dsp.lua | |||
@@ -37,21 +37,21 @@ end | |||
37 | -- specified number of miliseconds before stoping DSP | 37 | -- specified number of miliseconds before stoping DSP |
38 | -- Then you can inspect DSP memories from MIPS side | 38 | -- Then you can inspect DSP memories from MIPS side |
39 | function ATJ.dsp.run(msec) | 39 | function ATJ.dsp.run(msec) |
40 | DSP.stop() | 40 | ATJ.dsp.stop() |
41 | DSP.start() | 41 | ATJ.dsp.start() |
42 | hwstub.mdelay(msec) | 42 | hwstub.mdelay(msec) |
43 | DSP.stop() | 43 | ATJ.dsp.stop() |
44 | end | 44 | end |
45 | 45 | ||
46 | -- Clear DSP program memory | 46 | -- Clear DSP program memory |
47 | function ATJ.dsp.clearPM() | 47 | function ATJ.dsp.clearPM() |
48 | DSP.stop() | 48 | ATJ.dsp.stop() |
49 | for i=0,16*1024-1,4 do DEV.write32(0xb4040000+i, 0) end | 49 | for i=0,16*1024-1,4 do DEV.write32(0xb4040000+i, 0) end |
50 | end | 50 | end |
51 | 51 | ||
52 | -- Clear DSP data memory | 52 | -- Clear DSP data memory |
53 | function ATJ.dsp.clearDM() | 53 | function ATJ.dsp.clearDM() |
54 | DSP.stop() | 54 | ATJ.dsp.stop() |
55 | for i=0,16*1024-1,4 do DEV.write32(0xb4050000+i, 0) end | 55 | for i=0,16*1024-1,4 do DEV.write32(0xb4050000+i, 0) end |
56 | end | 56 | end |
57 | 57 | ||
@@ -83,9 +83,9 @@ function ATJ.dsp.prog(opcodes, base, type) | |||
83 | end | 83 | end |
84 | 84 | ||
85 | local offset=0 | 85 | local offset=0 |
86 | DSP.stop() | 86 | ATJ.dsp.stop() |
87 | for i,opcode in ipairs(opcodes) do | 87 | for i,opcode in ipairs(opcodes) do |
88 | DSP.write(base+4*offset, opcode) | 88 | ATJ.dsp.write(base+4*offset, opcode) |
89 | offset=offset+1 | 89 | offset=offset+1 |
90 | end | 90 | end |
91 | end | 91 | end |
@@ -112,7 +112,7 @@ function ATJ.dsp.progfile(path) | |||
112 | -- Search for header describing target memory | 112 | -- Search for header describing target memory |
113 | if string.find(line, '@PA') ~= nil then | 113 | if string.find(line, '@PA') ~= nil then |
114 | type = 'p' | 114 | type = 'p' |
115 | elseif string.find(line, '@PD' ~= nil) then | 115 | elseif string.find(line, '@PD') ~= nil then |
116 | type = 'd' | 116 | type = 'd' |
117 | end | 117 | end |
118 | 118 | ||
@@ -148,7 +148,7 @@ function ATJ.dsp.progfile(path) | |||
148 | end | 148 | end |
149 | 149 | ||
150 | -- Write to DSP memory | 150 | -- Write to DSP memory |
151 | DSP.prog(opcodes, addr, type) | 151 | ATJ.dsp.prog(opcodes, addr, type) |
152 | opcodes={} | 152 | opcodes={} |
153 | addr = nil | 153 | addr = nil |
154 | type = nil | 154 | type = nil |