diff options
-rw-r--r-- | firmware/test/i2c/main.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/firmware/test/i2c/main.c b/firmware/test/i2c/main.c index 9010af2d59..7df80d5ecd 100644 --- a/firmware/test/i2c/main.c +++ b/firmware/test/i2c/main.c | |||
@@ -68,15 +68,16 @@ bool dma_on; | |||
68 | 68 | ||
69 | void setup_sci0(void) | 69 | void setup_sci0(void) |
70 | { | 70 | { |
71 | PBCR1 = (PBCR1 & 0xccff) | 0x1200; | 71 | /* PB15 is I/O, PB14 is IRQ6, PB12 is SCK0 */ |
72 | PBCR1 = (PBCR1 & 0x0cff) | 0x1200; | ||
72 | 73 | ||
73 | /* set PB12 to output */ | 74 | /* Set PB12 to output */ |
74 | PBIOR |= 0x1000; | 75 | PBIOR |= 0x1000; |
75 | 76 | ||
76 | /* Disable serial port */ | 77 | /* Disable serial port */ |
77 | SCR0 = 0x00; | 78 | SCR0 = 0x00; |
78 | 79 | ||
79 | /* Syncronous, 8N1, no prescale */ | 80 | /* Synchronous, no prescale */ |
80 | SMR0 = 0x80; | 81 | SMR0 = 0x80; |
81 | 82 | ||
82 | /* Set baudrate 1Mbit/s */ | 83 | /* Set baudrate 1Mbit/s */ |
@@ -225,7 +226,7 @@ int main(void) | |||
225 | 226 | ||
226 | dma_on = TRUE; | 227 | dma_on = TRUE; |
227 | 228 | ||
228 | /* Enable Tx (only!) */ | 229 | /* Enable Tx & TXIE */ |
229 | SCR0 |= 0xa0; | 230 | SCR0 |= 0xa0; |
230 | 231 | ||
231 | CHCR3 |= 1; | 232 | CHCR3 |= 1; |