mirror of
git://projects.qi-hardware.com/antorcha.git
synced 2025-04-21 12:27:27 +03:00
fw/spi.c (spi_init): revert the SPI speed increase (caused instability)
Some more testing showed that transfers would get stuck after ~40 packets. Need to find out what happened before trying this again.
This commit is contained in:
4
fw/spi.c
4
fw/spi.c
@@ -26,11 +26,11 @@
|
|||||||
|
|
||||||
void spi_init(void)
|
void spi_init(void)
|
||||||
{
|
{
|
||||||
/* SPI mode 0, MSB first, fosc/2 */
|
/* SPI mode 0, MSB first, fosc/4 */
|
||||||
SPCR =
|
SPCR =
|
||||||
1 << SPE | /* enable SPI */
|
1 << SPE | /* enable SPI */
|
||||||
1 << MSTR; /* master */
|
1 << MSTR; /* master */
|
||||||
SPSR = 1 << SPI2X; /* enable for fosc/2 */
|
// SPSR = 1 << SPI2X; /* enable for fosc/2 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user