From daa1d3dab23421a86f392c39e0c7ffca78b609e9 Mon Sep 17 00:00:00 2001 From: EspoTek Date: Fri, 1 Dec 2017 15:34:03 +1100 Subject: [PATCH] Reversed bit order of SPIC and fixed Logic Analyzer CH2 --- AVR Code/USB_BULK_TEST/src/tiny_uart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/AVR Code/USB_BULK_TEST/src/tiny_uart.c b/AVR Code/USB_BULK_TEST/src/tiny_uart.c index 1b0fe981..3db2be5d 100644 --- a/AVR Code/USB_BULK_TEST/src/tiny_uart.c +++ b/AVR Code/USB_BULK_TEST/src/tiny_uart.c @@ -38,14 +38,13 @@ void tiny_spi_setup(void){ PR.PRPC &= 0b11110111; //SPI enable - SPIC.CTRL = SPI_ENABLE_bm; //Slave mode SPIC.INTCTRL = SPI_INTLVL_OFF_gc; //#ifdef VERO PORTC.PIN5CTRL = PORT_INVEN_bm | PORT_OPC_PULLUP_gc; //#else // PORTC.PIN7CTRL = PORT_INVEN_bm | PORT_OPC_PULLUP_gc; //Pin5 if not swapped //#endif - + SPIC.CTRL = SPI_DORD_bm | SPI_ENABLE_bm; //Slave mode return; }