mirror of https://github.com/EspoTek/Labrador.git
Reversed bit order of SPIC and fixed Logic Analyzer CH2
This commit is contained in:
parent
c93cf854da
commit
daa1d3dab2
|
@ -38,14 +38,13 @@ void tiny_spi_setup(void){
|
||||||
PR.PRPC &= 0b11110111;
|
PR.PRPC &= 0b11110111;
|
||||||
|
|
||||||
//SPI enable
|
//SPI enable
|
||||||
SPIC.CTRL = SPI_ENABLE_bm; //Slave mode
|
|
||||||
SPIC.INTCTRL = SPI_INTLVL_OFF_gc;
|
SPIC.INTCTRL = SPI_INTLVL_OFF_gc;
|
||||||
//#ifdef VERO
|
//#ifdef VERO
|
||||||
PORTC.PIN5CTRL = PORT_INVEN_bm | PORT_OPC_PULLUP_gc;
|
PORTC.PIN5CTRL = PORT_INVEN_bm | PORT_OPC_PULLUP_gc;
|
||||||
//#else
|
//#else
|
||||||
// PORTC.PIN7CTRL = PORT_INVEN_bm | PORT_OPC_PULLUP_gc; //Pin5 if not swapped
|
// PORTC.PIN7CTRL = PORT_INVEN_bm | PORT_OPC_PULLUP_gc; //Pin5 if not swapped
|
||||||
//#endif
|
//#endif
|
||||||
|
SPIC.CTRL = SPI_DORD_bm | SPI_ENABLE_bm; //Slave mode
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue