Fix build on mega2560

This commit is contained in:
Josh Stewart 2023-11-21 17:05:47 +11:00
parent 36d22b4832
commit 0dd42a2303
2 changed files with 7 additions and 4 deletions

View File

@ -1,5 +1,6 @@
#include "globals.h" #include "globals.h"
#if defined(CORE_AVR) #if defined(CORE_AVR)
#include "board_avr2560.h"
#include "auxiliaries.h" #include "auxiliaries.h"
#include "comms_secondary.h" #include "comms_secondary.h"
@ -23,7 +24,9 @@ void initBoard(void)
* General * General
*/ */
configPage9.intcan_available = 0; // AVR devices do NOT have internal canbus configPage9.intcan_available = 0; // AVR devices do NOT have internal canbus
pSecondarySerial = &Serial3; #ifdef secondarySerial_AVAILABLE
pSecondarySerial = &Serial3;
#endif
/* /*
*********************************************************************************************************** ***********************************************************************************************************

View File

@ -158,10 +158,10 @@ static inline void IGN8_TIMER_DISABLE(void) { TIMSK3 &= ~(1 << OCIE3B); } //Repl
*********************************************************************************************************** ***********************************************************************************************************
* CAN / Second serial * CAN / Second serial
*/ */
#if ( defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) )
#define secondarySerial_AVAILABLE #define secondarySerial_AVAILABLE
#define SECONDARY_SERIAL_T HardwareSerial #endif
#define SECONDARY_SERIAL_T HardwareSerial
#endif //CORE_AVR #endif //CORE_AVR
#endif //AVR2560_H #endif //AVR2560_H