mirror of
git://projects.qi-hardware.com/antorcha.git
synced 2024-11-25 22:43:44 +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:
parent
eaa11b110c
commit
7a0bc4cb9c
7
fw/spi.c
7
fw/spi.c
@ -26,8 +26,11 @@
|
|||||||
|
|
||||||
void spi_init(void)
|
void spi_init(void)
|
||||||
{
|
{
|
||||||
/* Enable, SPI mode 0, master, MSB first, fosc/4 */
|
/* SPI mode 0, MSB first, fosc/4 */
|
||||||
SPCR = (1 << SPE) | (1 << MSTR);
|
SPCR =
|
||||||
|
1 << SPE | /* enable SPI */
|
||||||
|
1 << MSTR; /* master */
|
||||||
|
// SPSR = 1 << SPI2X; /* enable for fosc/2 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user