diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2007-10-22 13:53:19 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2007-10-22 13:53:19 +0000 |
commit | 8f1745e96c5eccd8c5f3913c13d719c1af86c63d (patch) | |
tree | e42dd379e04195cb8a3a1e2cef3ffb63aa969d70 | |
parent | 543c49a4835a6bc0d3388034ad93ec46ff9fbee5 (diff) | |
download | rockbox-8f1745e96c5eccd8c5f3913c13d719c1af86c63d.tar.gz rockbox-8f1745e96c5eccd8c5f3913c13d719c1af86c63d.zip |
nope, reread the datasheet... this one is correct
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15267 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/drivers/tsc2100.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/drivers/tsc2100.c b/firmware/drivers/tsc2100.c index 18dfcb9da1..22cdcca13d 100644 --- a/firmware/drivers/tsc2100.c +++ b/firmware/drivers/tsc2100.c | |||
@@ -52,7 +52,7 @@ short tsc2100_readreg(int page, int address) | |||
52 | 52 | ||
53 | void tsc2100_writereg(int page, int address, short value) | 53 | void tsc2100_writereg(int page, int address, short value) |
54 | { | 54 | { |
55 | unsigned short command = 0x0800|(page << 11)|(address << 5); | 55 | unsigned short command = (page << 11)|(address << 5); |
56 | unsigned char out[4] = {command >> 8, command & 0xff, | 56 | unsigned char out[4] = {command >> 8, command & 0xff, |
57 | value >> 8, value & 0xff}; | 57 | value >> 8, value & 0xff}; |
58 | spi_block_transfer(SPI_target_TSC2100, | 58 | spi_block_transfer(SPI_target_TSC2100, |
@@ -63,5 +63,5 @@ void tsc2100_keyclick(void) | |||
63 | { | 63 | { |
64 | // 1100 0100 0001 0000 | 64 | // 1100 0100 0001 0000 |
65 | short val = 0xC410; | 65 | short val = 0xC410; |
66 | tsc2100_writereg(TSAC2_PAGE, TSAC2_ADDRESS, val); | 66 | tsc2100_writereg(TSAC2_PAGE, TSAC2_ADDRESS, tsc2100_readreg(TSAC2_PAGE, TSAC2_ADDRESS)&0x8000); |
67 | } | 67 | } |