1
0
mirror of git://projects.qi-hardware.com/antorcha.git synced 2024-11-01 07:24:58 +02: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:
Werner Almesberger 2012-06-21 12:03:32 -03:00
parent eaa11b110c
commit 7a0bc4cb9c

View File

@ -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 */
}