2 #include <avr/interrupt.h>
7 static volatile uint16_t last
= 0;
8 if( (ADCSRA
& _BV(ADSC
)) != 0 ) {
20 for(i
= 0; i
< 5; ++i
)
26 ADMUX
= (ADMUX
& ~0x7) | 2;
27 ADCSRA
|= (_BV(ADFR
) | _BV(ADIE
));
28 sei(); // enable interrupts
35 DDRB
= 0xB9; // spi_clk, spi_in, spi_out, NC, TX, RX, clock in, clock
38 DDRC
= 0xFF; // Address
41 DDRD
= 0xFA; // NC, NC, NC, NC, NC, CAN_INT, MIDI TX & RX