diff options
Diffstat (limited to 'examples/spiblink/slave.c')
-rw-r--r-- | examples/spiblink/slave.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/examples/spiblink/slave.c b/examples/spiblink/slave.c deleted file mode 100644 index 91a8237..0000000 --- a/examples/spiblink/slave.c +++ /dev/null @@ -1,21 +0,0 @@ -#include <avr/io.h> -#include <util/delay.h> -#include <spi.h> - -void receive(uint8_t data); - -int main() { - DDRB |= _BV(DDB1); - spi_receive = receive; - spi_init(SPI_MODE_SLAVE); - SREG |= _BV(7); - while (1) { - } -} - -void receive(uint8_t data) { - if (data) - PORTB |= _BV(PORTB1); - else - PORTB &= ~_BV(PORTB1); -} |