Fix unused pin PB0 being used in init
This pin is unused and shouldn't be set by the library.
This commit is contained in:
parent
e35c9ae2e5
commit
8fecfbff00
4
spi.c
4
spi.c
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
void spi_init(void) {
|
void spi_init(void) {
|
||||||
// Set MOSI and SCK, SS/CS output, all others input
|
// Set MOSI and SCK, SS/CS output, all others input
|
||||||
DDRB = (1<<PB3) | (1<<PB5) | (1<<PB2) | (1<<PB0);
|
DDRB = (1<<PB3) | (1<<PB5) | (1<<PB2);
|
||||||
// Enable SPI, Master, set clock rate fck/4, mode 0
|
// Enable SPI, Master, set clock rate fck/4, mode 0
|
||||||
SPCR = (1<<SPE) | (1<<MSTR);
|
SPCR = (1<<SPE) | (1<<MSTR);
|
||||||
|
|
||||||
// Set SS/CS
|
// Set SS/CS
|
||||||
PORTB |= (1 << PB2) | (1 << PB0);
|
PORTB |= (1 << PB2);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue