diff options
author | Karl Kurbjun <kkurbjun@gmail.com> | 2009-06-24 04:17:15 +0000 |
---|---|---|
committer | Karl Kurbjun <kkurbjun@gmail.com> | 2009-06-24 04:17:15 +0000 |
commit | 19cb4446919dff3b0c6e5a48c9b0192c01740ecc (patch) | |
tree | f9ebc1fc443e962a428ec0f3e3ff82c427864675 /firmware/drivers/rtc | |
parent | 1910d026b1593efd37da276397d0fa157d96d877 (diff) | |
download | rockbox-19cb4446919dff3b0c6e5a48c9b0192c01740ecc.tar.gz rockbox-19cb4446919dff3b0c6e5a48c9b0192c01740ecc.zip |
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/rtc')
-rw-r--r-- | firmware/drivers/rtc/rtc_rx5x348ab.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/firmware/drivers/rtc/rtc_rx5x348ab.c b/firmware/drivers/rtc/rtc_rx5x348ab.c index 2b4e17c81d..218582c8fa 100644 --- a/firmware/drivers/rtc/rtc_rx5x348ab.c +++ b/firmware/drivers/rtc/rtc_rx5x348ab.c | |||
@@ -36,8 +36,7 @@ void rtc_init(void) | |||
36 | int rtc_read_datetime(unsigned char* buf) | 36 | int rtc_read_datetime(unsigned char* buf) |
37 | { | 37 | { |
38 | char command = ADDR_READ|ADDR_BURST; /* burst read from the start of the time/date reg */ | 38 | char command = ADDR_READ|ADDR_BURST; /* burst read from the start of the time/date reg */ |
39 | spi_block_transfer(SPI_target_RX5X348AB, true, | 39 | spi_block_transfer(SPI_target_RX5X348AB, &command, 1, buf, 7); |
40 | &command, 1, buf, 7); | ||
41 | return 1; | 40 | return 1; |
42 | } | 41 | } |
43 | int rtc_write_datetime(unsigned char* buf) | 42 | int rtc_write_datetime(unsigned char* buf) |
@@ -48,7 +47,6 @@ int rtc_write_datetime(unsigned char* buf) | |||
48 | data[0] = command; | 47 | data[0] = command; |
49 | for (i=1;i<8;i++) | 48 | for (i=1;i<8;i++) |
50 | data[i] = buf[i-1]; | 49 | data[i] = buf[i-1]; |
51 | spi_block_transfer(SPI_target_RX5X348AB, true, | 50 | spi_block_transfer(SPI_target_RX5X348AB, data, 8, NULL, 0); |
52 | data, 8, NULL, 0); | ||
53 | return 1; | 51 | return 1; |
54 | } | 52 | } |