|
|
@ -124,6 +124,8 @@ |
|
|
|
#define ISRS_ENABLED() (!__get_PRIMASK()) |
|
|
|
#define ENABLE_ISRS() __enable_irq() |
|
|
|
#define DISABLE_ISRS() __disable_irq() |
|
|
|
#define cli() __disable_irq() |
|
|
|
#define sei() __enable_irq() |
|
|
|
|
|
|
|
// On AVR this is in math.h?
|
|
|
|
#define square(x) ((x)*(x)) |
|
|
@ -163,12 +165,6 @@ extern uint16_t HAL_adc_result; |
|
|
|
// Public functions
|
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
|
|
|
|
// Disable interrupts
|
|
|
|
#define cli() do { DISABLE_TEMPERATURE_INTERRUPT(); DISABLE_STEPPER_DRIVER_INTERRUPT(); } while(0) |
|
|
|
|
|
|
|
// Enable interrupts
|
|
|
|
#define sei() do { ENABLE_TEMPERATURE_INTERRUPT(); ENABLE_STEPPER_DRIVER_INTERRUPT(); } while(0) |
|
|
|
|
|
|
|
// Memory related
|
|
|
|
#define __bss_end __bss_end__ |
|
|
|
|
|
|
@ -209,7 +205,6 @@ void spiSend(uint32_t chan, const uint8_t* buf, size_t n); |
|
|
|
/** Read single byte from specified SPI channel */ |
|
|
|
uint8_t spiRec(uint32_t chan); |
|
|
|
|
|
|
|
|
|
|
|
// EEPROM
|
|
|
|
|
|
|
|
/**
|
|
|
|