summaryrefslogtreecommitdiff
path: root/firmware/drivers
diff options
context:
space:
mode:
authorKarl Kurbjun <kkurbjun@gmail.com>2009-06-24 04:17:15 +0000
committerKarl Kurbjun <kkurbjun@gmail.com>2009-06-24 04:17:15 +0000
commit19cb4446919dff3b0c6e5a48c9b0192c01740ecc (patch)
treef9ebc1fc443e962a428ec0f3e3ff82c427864675 /firmware/drivers
parent1910d026b1593efd37da276397d0fa157d96d877 (diff)
downloadrockbox-19cb4446919dff3b0c6e5a48c9b0192c01740ecc.zip
rockbox-19cb4446919dff3b0c6e5a48c9b0192c01740ecc.tar.gz
rockbox-19cb4446919dff3b0c6e5a48c9b0192c01740ecc.tar.bz2
rockbox-19cb4446919dff3b0c6e5a48c9b0192c01740ecc.tar.xz
M:Robe 500: RTC is now working, Added some SPI flexibility per end device and modified the interrupt handler for the tsc2100 which should make it more reliable.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21483 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers')
-rw-r--r--firmware/drivers/rtc/rtc_rx5x348ab.c6
-rw-r--r--firmware/drivers/tsc2100.c8
2 files changed, 5 insertions, 9 deletions
diff --git a/firmware/drivers/rtc/rtc_rx5x348ab.c b/firmware/drivers/rtc/rtc_rx5x348ab.c
index 2b4e17c..218582c 100644
--- a/firmware/drivers/rtc/rtc_rx5x348ab.c
+++ b/firmware/drivers/rtc/rtc_rx5x348ab.c
@@ -36,8 +36,7 @@ void rtc_init(void)
int rtc_read_datetime(unsigned char* buf)
{
char command = ADDR_READ|ADDR_BURST; /* burst read from the start of the time/date reg */
- spi_block_transfer(SPI_target_RX5X348AB, true,
- &command, 1, buf, 7);
+ spi_block_transfer(SPI_target_RX5X348AB, &command, 1, buf, 7);
return 1;
}
int rtc_write_datetime(unsigned char* buf)
@@ -48,7 +47,6 @@ int rtc_write_datetime(unsigned char* buf)
data[0] = command;
for (i=1;i<8;i++)
data[i] = buf[i-1];
- spi_block_transfer(SPI_target_RX5X348AB, true,
- data, 8, NULL, 0);
+ spi_block_transfer(SPI_target_RX5X348AB, data, 8, NULL, 0);
return 1;
}
diff --git a/firmware/drivers/tsc2100.c b/firmware/drivers/tsc2100.c
index 271a557..32a3516 100644
--- a/firmware/drivers/tsc2100.c
+++ b/firmware/drivers/tsc2100.c
@@ -44,7 +44,7 @@ void tsc2100_read_data(void)
adc_last_read=current_tick;
- spi_block_transfer(SPI_target_TSC2100, false,
+ spi_block_transfer(SPI_target_TSC2100,
out, sizeof(out), (char *)adc_data, sizeof(adc_data));
for(i=0; i<sizeof(adc_data); i+=2)
@@ -128,8 +128,7 @@ short tsc2100_readreg(int page, int address)
unsigned short command = 0x8000|(page << 11)|(address << 5);
unsigned char out[] = {command >> 8, command & 0xff};
unsigned char in[2];
- spi_block_transfer(SPI_target_TSC2100, false,
- out, sizeof(out), in, sizeof(in));
+ spi_block_transfer(SPI_target_TSC2100, out, sizeof(out), in, sizeof(in));
return (in[0]<<8)|in[1];
}
@@ -139,8 +138,7 @@ void tsc2100_writereg(int page, int address, short value)
unsigned short command = (page << 11)|(address << 5);
unsigned char out[4] = {command >> 8, command & 0xff,
value >> 8, value & 0xff};
- spi_block_transfer(SPI_target_TSC2100, false,
- out, sizeof(out), NULL, 0);
+ spi_block_transfer(SPI_target_TSC2100, out, sizeof(out), NULL, 0);
}
void tsc2100_keyclick(void)