mirror of
git://projects.qi-hardware.com/antorcha.git
synced 2025-04-21 12:27:27 +03:00
fw/spi.c: clean up code and add option for running at fosc/2 instead of fosc/4
Not enabled yet. There's a RF comm regression elsewhere that needs fixing first.
This commit is contained in:
parent
eaa11b110c
commit
7a0bc4cb9c
7
fw/spi.c
7
fw/spi.c
@ -26,8 +26,11 @@
|
||||
|
||||
void spi_init(void)
|
||||
{
|
||||
/* Enable, SPI mode 0, master, MSB first, fosc/4 */
|
||||
SPCR = (1 << SPE) | (1 << MSTR);
|
||||
/* SPI mode 0, MSB first, fosc/4 */
|
||||
SPCR =
|
||||
1 << SPE | /* enable SPI */
|
||||
1 << MSTR; /* master */
|
||||
// SPSR = 1 << SPI2X; /* enable for fosc/2 */
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user