summaryrefslogtreecommitdiff
path: root/firmware/drivers/mas.c
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2002-06-26 12:39:49 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2002-06-26 12:39:49 +0000
commitd1d63960b9b79fcac318ddd0571f12594ee697b1 (patch)
tree7dc7865619ce2ab6f3bd33619f2508b3ca321638 /firmware/drivers/mas.c
parent1a5032e7edfd7e8feaa3c3696f2de561f5d08c91 (diff)
downloadrockbox-d1d63960b9b79fcac318ddd0571f12594ee697b1.tar.gz
rockbox-d1d63960b9b79fcac318ddd0571f12594ee697b1.zip
Added mas_reset()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1196 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/mas.c')
-rw-r--r--firmware/drivers/mas.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/firmware/drivers/mas.c b/firmware/drivers/mas.c
index c4daed9abf..f13f8aec01 100644
--- a/firmware/drivers/mas.c
+++ b/firmware/drivers/mas.c
@@ -16,9 +16,14 @@
16 * KIND, either express or implied. 16 * KIND, either express or implied.
17 * 17 *
18 ****************************************************************************/ 18 ****************************************************************************/
19#include "stdbool.h"
20#include "sh7034.h"
19#include "i2c.h" 21#include "i2c.h"
20#include "debug.h" 22#include "debug.h"
21#include "mas.h" 23#include "mas.h"
24#include "kernel.h"
25
26extern bool old_recorder;
22 27
23static int mas_devread(unsigned long *dest, int len); 28static int mas_devread(unsigned long *dest, int len);
24 29
@@ -260,6 +265,28 @@ static int mas_devread(unsigned long *dest, int len)
260} 265}
261 266
262#ifdef ARCHOS_RECORDER 267#ifdef ARCHOS_RECORDER
268
269void mas_reset(void)
270{
271 PAIOR |= 0x100;
272
273 if(old_recorder)
274 {
275 /* Older recorder models don't invert the POR signal */
276 PADR |= 0x100;
277 sleep(HZ/100);
278 PADR &= ~0x100;
279 sleep(HZ/5);
280 }
281 else
282 {
283 PADR &= ~0x100;
284 sleep(HZ/100);
285 PADR |= 0x100;
286 sleep(HZ/5);
287 }
288}
289
263int mas_direct_config_read(unsigned char reg) 290int mas_direct_config_read(unsigned char reg)
264{ 291{
265 int ret = 0; 292 int ret = 0;