diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2002-05-03 13:12:21 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2002-05-03 13:12:21 +0000 |
commit | 0bd77a6a80460491f0b0b0db237c78573369223a (patch) | |
tree | fbf8c06e19fcaa435e65c123d9b89baeeac4be1f /firmware | |
parent | f7f576f6c7a747bc3fa9f4f170e4f9363d02c3b2 (diff) |
Added a few functions
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@408 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/drivers/mas.c | 11 | ||||
-rw-r--r-- | firmware/drivers/mas.h | 3 |
2 files changed, 10 insertions, 4 deletions
diff --git a/firmware/drivers/mas.c b/firmware/drivers/mas.c index 6b8bc22b39..97017e8db5 100644 --- a/firmware/drivers/mas.c +++ b/firmware/drivers/mas.c @@ -20,15 +20,20 @@ #include "debug.h" #include "mas.h" -int mas_run(int prognum) +int mas_default_read(unsigned long *buf) +{ + return mas_devread(buf, 1); +} + +int mas_run(unsigned short address) { int i; unsigned char buf[16]; i=0; buf[i++] = MAS_DATA_WRITE; - buf[i++] = 0x00; - buf[i++] = prognum; + buf[i++] = address << 8; + buf[i++] = address & 0xff; /* send run command */ if (i2c_write(MAS_DEV_WRITE,buf,i)) diff --git a/firmware/drivers/mas.h b/firmware/drivers/mas.h index ed6d31e73f..aca71bd35f 100644 --- a/firmware/drivers/mas.h +++ b/firmware/drivers/mas.h @@ -45,7 +45,8 @@ #define MAS_REG_KBASS 0x6b #define MAS_REG_KTREBLE 0x6f -int mas_run(int prognum); +int mas_default_read(unsigned long *buf); +int mas_run(unsigned short address); int mas_readmem(int bank, int addr, unsigned long* dest, int len); int mas_writemem(int bank, int addr, unsigned long* src, int len); int mas_devread(unsigned long *buf, int len); |