More compatibility for the modular arch setup
This commit is contained in:
parent
ed58314bf4
commit
9b53feb9da
|
@ -71,6 +71,7 @@ void fanControl();
|
||||||
#define N2O_STAGE2_PIN_HIGH() *n2o_stage2_pin_port |= (n2o_stage2_pin_mask)
|
#define N2O_STAGE2_PIN_HIGH() *n2o_stage2_pin_port |= (n2o_stage2_pin_mask)
|
||||||
#define READ_N2O_ARM_PIN() ((*n2o_arming_pin_port & n2o_arming_pin_mask) ? true : false)
|
#define READ_N2O_ARM_PIN() ((*n2o_arming_pin_port & n2o_arming_pin_mask) ? true : false)
|
||||||
|
|
||||||
|
#if not defined(CORE_SAMD21)
|
||||||
volatile byte *boost_pin_port;
|
volatile byte *boost_pin_port;
|
||||||
volatile byte boost_pin_mask;
|
volatile byte boost_pin_mask;
|
||||||
volatile byte *vvt_pin_port;
|
volatile byte *vvt_pin_port;
|
||||||
|
@ -83,6 +84,7 @@ volatile byte *n2o_stage2_pin_port;
|
||||||
volatile byte n2o_stage2_pin_mask;
|
volatile byte n2o_stage2_pin_mask;
|
||||||
volatile byte *n2o_arming_pin_port;
|
volatile byte *n2o_arming_pin_port;
|
||||||
volatile byte n2o_arming_pin_mask;
|
volatile byte n2o_arming_pin_mask;
|
||||||
|
#endif
|
||||||
|
|
||||||
volatile bool boost_pwm_state;
|
volatile bool boost_pwm_state;
|
||||||
unsigned int boost_pwm_max_count; //Used for variable PWM frequency
|
unsigned int boost_pwm_max_count; //Used for variable PWM frequency
|
||||||
|
|
|
@ -292,7 +292,7 @@ void boostDisable()
|
||||||
//The interrupt to control the Boost PWM
|
//The interrupt to control the Boost PWM
|
||||||
#if defined(CORE_AVR)
|
#if defined(CORE_AVR)
|
||||||
ISR(TIMER1_COMPA_vect)
|
ISR(TIMER1_COMPA_vect)
|
||||||
#elif defined (CORE_TEENSY) || defined(CORE_STM32)
|
#else
|
||||||
static inline void boostInterrupt() //Most ARM chips can simply call a function
|
static inline void boostInterrupt() //Most ARM chips can simply call a function
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
@ -314,7 +314,7 @@ void boostDisable()
|
||||||
//The interrupt to control the VVT PWM
|
//The interrupt to control the VVT PWM
|
||||||
#if defined(CORE_AVR)
|
#if defined(CORE_AVR)
|
||||||
ISR(TIMER1_COMPB_vect)
|
ISR(TIMER1_COMPB_vect)
|
||||||
#elif defined (CORE_TEENSY) || defined(CORE_STM32)
|
#else
|
||||||
static inline void vvtInterrupt() //Most ARM chips can simply call a function
|
static inline void vvtInterrupt() //Most ARM chips can simply call a function
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,15 +12,18 @@
|
||||||
#define BOARD_NR_GPIO_PINS 62
|
#define BOARD_NR_GPIO_PINS 62
|
||||||
#define LED_BUILTIN 13
|
#define LED_BUILTIN 13
|
||||||
#define CORE_AVR
|
#define CORE_AVR
|
||||||
|
#define BOARD_H "src/boards/avr2560.h"
|
||||||
|
|
||||||
//#define TIMER5_MICROS
|
//#define TIMER5_MICROS
|
||||||
|
|
||||||
#elif defined(CORE_TEENSY)
|
#elif defined(CORE_TEENSY)
|
||||||
#define BOARD_DIGITAL_GPIO_PINS 34
|
#define BOARD_DIGITAL_GPIO_PINS 34
|
||||||
#define BOARD_NR_GPIO_PINS 34
|
#define BOARD_NR_GPIO_PINS 34
|
||||||
|
#define BOARD_H "src/boards/teensy35.h"
|
||||||
|
|
||||||
#elif defined(STM32_MCU_SERIES) || defined(ARDUINO_ARCH_STM32) || defined(__STM32F1__) || defined(STM32F4) || defined(STM32)
|
#elif defined(STM32_MCU_SERIES) || defined(ARDUINO_ARCH_STM32) || defined(__STM32F1__) || defined(STM32F4) || defined(STM32)
|
||||||
#define CORE_STM32
|
#define CORE_STM32
|
||||||
|
#define BOARD_H "src/boards/stm32.h"
|
||||||
#ifndef word
|
#ifndef word
|
||||||
#define word(h, l) ((h << 8) | l) //word() function not defined for this platform in the main library
|
#define word(h, l) ((h << 8) | l) //word() function not defined for this platform in the main library
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue