From 65b74b2d8028cc211e34863d8c3d6519430418d8 Mon Sep 17 00:00:00 2001 From: midelic Date: Wed, 31 Aug 2016 16:49:53 +0100 Subject: [PATCH] fixes for avr code --- Multiprotocol/Multiprotocol.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Multiprotocol/Multiprotocol.h b/Multiprotocol/Multiprotocol.h index e0c6f49..7688108 100644 --- a/Multiprotocol/Multiprotocol.h +++ b/Multiprotocol/Multiprotocol.h @@ -271,6 +271,15 @@ struct PPM_Parameters #define IS_LED_on ( (PORTB & _BV(5)) != 0x00 ) #endif +#ifdef XMEGA + #define IS_BIND_BUTTON_on ( (PORTD.IN & _BV(2)) == 0x00 ) +#else + #define BIND_SET_INPUT DDRB &= ~_BV(5) + #define BIND_SET_PULLUP PORTB |= _BV(5) + #define IS_BIND_BUTTON_on ( (PINB & _BV(5)) == 0x00 ) + #define BIND_SET_OUTPUT DDRB |= _BV(5) +#endif + #ifdef DEBUG_TX #define TX_ON PORTD |= _BV(1) #define TX_OFF PORTD &= ~_BV(1)