aboutsummaryrefslogtreecommitdiff
path: root/examples/spiblink/master.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/spiblink/master.c')
-rw-r--r--examples/spiblink/master.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/examples/spiblink/master.c b/examples/spiblink/master.c
deleted file mode 100644
index 1cc4289..0000000
--- a/examples/spiblink/master.c
+++ /dev/null
@@ -1,20 +0,0 @@
-#include <avr/io.h>
-#include <util/delay.h>
-#include <spi.h>
-
-int main() {
- DDRB |= _BV(DDB1) | _BV(DDB2);
- PORTC |= _BV(PORTC1);
- spi_init(SPI_MODE_MASTER);
- SREG |= _BV(7);
- while (1) {
- if (PINC & _BV(PINC1)) {
- PORTB &= ~_BV(PORTB1);
- } else {
- PORTB |= _BV(PORTB1);
- }
- PORTB &= ~_BV(PORTB2);
- spi_send(!(PINC & _BV(PINC1)));
- PORTB |= _BV(PORTB2);
- }
-}