aboutsummaryrefslogtreecommitdiff
path: root/examples/spiblink/slave.c
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2017-03-09 07:04:55 +0100
committerKarel Kočí <cynerd@email.cz>2017-03-09 07:04:55 +0100
commitdfc471c4f68eba0c054e61dbb3567ee89e3a036f (patch)
tree69b6ee6b5be7da3087d782397cb0ec04734f23a9 /examples/spiblink/slave.c
parent171e8e92686ac65e8f9a2962a975e6863c791a4f (diff)
downloadavr-ioe-dfc471c4f68eba0c054e61dbb3567ee89e3a036f.tar.gz
avr-ioe-dfc471c4f68eba0c054e61dbb3567ee89e3a036f.tar.bz2
avr-ioe-dfc471c4f68eba0c054e61dbb3567ee89e3a036f.zip
Update spiblink example to use examples.mk
Diffstat (limited to 'examples/spiblink/slave.c')
-rw-r--r--examples/spiblink/slave.c21
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);
-}