diff --git a/Multiprotocol/Multiprotocol.ino b/Multiprotocol/Multiprotocol.ino index 0eedd44..fc3c097 100644 --- a/Multiprotocol/Multiprotocol.ino +++ b/Multiprotocol/Multiprotocol.ino @@ -181,12 +181,6 @@ void setup() PORTD.PIN2CTRL = 0x18 ; PORTE.DIRSET = 0x01 ; PORTE.DIRCLR = 0x02 ; - PORTE.OUTSET = 0x01 ; - - for ( uint8_t count = 0 ; count < 20 ; count += 1 ) - asm("nop") ; - PORTE.OUTCLR = 0x01 ; - // Timer1 config // TCC1 16-bit timer, clocked at 0.5uS EVSYS.CH3MUX = 0x80 + 0x04 ; // Prescaler of 16 diff --git a/Multiprotocol/Pins.h b/Multiprotocol/Pins.h index d18151c..fce2556 100644 --- a/Multiprotocol/Pins.h +++ b/Multiprotocol/Pins.h @@ -127,6 +127,12 @@ #define CYRF_CSN_ddr DDRD #define CYRF_CSN_on CYRF_CSN_port.OUTSET = _BV(CYRF_CSN_pin) #define CYRF_CSN_off CYRF_CSN_port.OUTCLR = _BV(CYRF_CSN_pin) + + #define CYRF_RST_pin 0 //PE0 + #define CYRF_RST_port PORTE + #define CYRF_RST_ddr DDRE + #define CYRF_RST_HI CYRF_RST_port.OUTSET |= _BV(CYRF_RST_pin) + #define CYRF_RST_LO CYRF_RST_port.OUTCLR &= ~_BV(CYRF_RST_pin) #else #define CYRF_CSN_pin 1 //D9 = PB1 #define CYRF_CSN_port PORTB