2019-03-22 15:06:59 +00:00
|
|
|
#include <avr/io.h>
|
2019-03-25 12:00:22 +00:00
|
|
|
#include <avr/interrupt.h>
|
|
|
|
#include <util/delay.h>
|
|
|
|
#include "mcp23s17.h"
|
|
|
|
|
|
|
|
|
|
|
|
SPI spi;
|
|
|
|
MCP23S17 beba0(spi, SPIADR::BEBA0);
|
2019-03-22 14:51:52 +00:00
|
|
|
|
|
|
|
int main() {
|
2019-03-25 12:00:22 +00:00
|
|
|
spi.init();
|
|
|
|
|
|
|
|
while(1) {
|
|
|
|
|
|
|
|
SPDR = 8;
|
|
|
|
while(!(SPSR & _BV(SPIF)));
|
|
|
|
//spi.pushByte(8);
|
|
|
|
}
|
|
|
|
|
2019-03-22 14:51:52 +00:00
|
|
|
return 0;
|
|
|
|
}
|