projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos: Crank up the gaussian noise in the FEC test
[fw/altos]
/
src
/
avr
/
ao_spi_slave.c
diff --git
a/src/avr/ao_spi_slave.c
b/src/avr/ao_spi_slave.c
index 76f574c6480f6ac1012f9a43295d1c75fa4a765b..b742d29aa6de10b73bb6d1ce8e60f756c0d7fc3f 100644
(file)
--- a/
src/avr/ao_spi_slave.c
+++ b/
src/avr/ao_spi_slave.c
@@
-18,7
+18,7
@@
#include "ao.h"
uint8_t
#include "ao.h"
uint8_t
-ao_spi_
read
(uint8_t *buf, uint8_t len)
+ao_spi_
slave_recv
(uint8_t *buf, uint8_t len)
{
while (len--) {
while (!(SPSR & (1 << SPIF)))
{
while (len--) {
while (!(SPSR & (1 << SPIF)))
@@
-30,7
+30,7
@@
ao_spi_read(uint8_t *buf, uint8_t len)
}
void
}
void
-ao_spi_
write
(uint8_t *buf, uint8_t len)
+ao_spi_
slave_send
(uint8_t *buf, uint8_t len)
{
while (len--) {
SPDR = *buf++;
{
while (len--) {
SPDR = *buf++;
@@
-87,7
+87,7
@@
ao_spi_slave_init(void)
(1 << 3) | /* MISO, output */
(0 << 2) | /* MOSI, no pull-up */
(0 << 1) | /* SCK, no pull-up */
(1 << 3) | /* MISO, output */
(0 << 2) | /* MOSI, no pull-up */
(0 << 1) | /* SCK, no pull-up */
- (
0 << 0)); /* SS, no
pull-up */
+ (
1 << 0)); /* SS,
pull-up */
#endif
#if SPI_SLAVE_PIN_2_5
PCMSK0 |= (1 << PCINT2); /* Enable PCINT2 pin change */
#endif
#if SPI_SLAVE_PIN_2_5
PCMSK0 |= (1 << PCINT2); /* Enable PCINT2 pin change */
@@
-103,7
+103,7
@@
ao_spi_slave_init(void)
(0 << 5) | /* SCK, no pull-up */
(1 << 4) | /* MISO, output */
(0 << 3) | /* MOSI, no pull-up */
(0 << 5) | /* SCK, no pull-up */
(1 << 4) | /* MISO, output */
(0 << 3) | /* MOSI, no pull-up */
- (
0 << 2)); /* SS, no
pull-up */
+ (
1 << 2)); /* SS,
pull-up */
#endif
SPCR = (0 << SPIE) | /* Disable SPI interrupts */
#endif
SPCR = (0 << SPIE) | /* Disable SPI interrupts */