diff options
author | Karel Kočí <cynerd@email.cz> | 2017-03-09 07:04:55 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2017-03-09 07:04:55 +0100 |
commit | dfc471c4f68eba0c054e61dbb3567ee89e3a036f (patch) | |
tree | 69b6ee6b5be7da3087d782397cb0ec04734f23a9 /examples/spiblink/master.c | |
parent | 171e8e92686ac65e8f9a2962a975e6863c791a4f (diff) | |
download | avr-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/master.c')
-rw-r--r-- | examples/spiblink/master.c | 20 |
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); - } -} |