Drop C-style 'void' argument
This commit is contained in:
@ -51,10 +51,10 @@ static const uint8_t pin2sc1a[] = {
|
||||
|
||||
/*
|
||||
// disable interrupts
|
||||
void cli(void) { noInterrupts(); }
|
||||
void cli() { noInterrupts(); }
|
||||
|
||||
// enable interrupts
|
||||
void sei(void) { interrupts(); }
|
||||
void sei() { interrupts(); }
|
||||
*/
|
||||
|
||||
void HAL_adc_init() {
|
||||
@ -64,9 +64,9 @@ void HAL_adc_init() {
|
||||
NVIC_ENABLE_IRQ(IRQ_FTM1);
|
||||
}
|
||||
|
||||
void HAL_clear_reset_source(void) { }
|
||||
void HAL_clear_reset_source() { }
|
||||
|
||||
uint8_t HAL_get_reset_source(void) {
|
||||
uint8_t HAL_get_reset_source() {
|
||||
switch (RCM_SRS0) {
|
||||
case 128: return RST_POWER_ON; break;
|
||||
case 64: return RST_EXTERNAL; break;
|
||||
@ -109,7 +109,7 @@ void HAL_adc_start_conversion(const uint8_t adc_pin) {
|
||||
}
|
||||
}
|
||||
|
||||
uint16_t HAL_adc_get_result(void) {
|
||||
uint16_t HAL_adc_get_result() {
|
||||
switch (HAL_adc_select) {
|
||||
case 0: return ADC0_RA;
|
||||
case 1: return ADC1_RA;
|
||||
|
@ -93,20 +93,20 @@ typedef int8_t pin_t;
|
||||
#undef pgm_read_word
|
||||
#define pgm_read_word(addr) (*((uint16_t*)(addr)))
|
||||
|
||||
inline void HAL_init(void) { }
|
||||
inline void HAL_init() { }
|
||||
|
||||
// Clear reset reason
|
||||
void HAL_clear_reset_source(void);
|
||||
void HAL_clear_reset_source();
|
||||
|
||||
// Reset reason
|
||||
uint8_t HAL_get_reset_source(void);
|
||||
uint8_t HAL_get_reset_source();
|
||||
|
||||
FORCE_INLINE void _delay_ms(const int delay_ms) { delay(delay_ms); }
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-function"
|
||||
extern "C" {
|
||||
int freeMemory(void);
|
||||
int freeMemory();
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
@ -121,7 +121,7 @@ void HAL_adc_init();
|
||||
#define HAL_ANALOG_SELECT(pin)
|
||||
|
||||
void HAL_adc_start_conversion(const uint8_t adc_pin);
|
||||
uint16_t HAL_adc_get_result(void);
|
||||
uint16_t HAL_adc_get_result();
|
||||
|
||||
#define GET_PIN_MAP_PIN(index) index
|
||||
#define GET_PIN_MAP_INDEX(pin) pin
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
static SPISettings spiConfig;
|
||||
|
||||
void spiBegin(void) {
|
||||
void spiBegin() {
|
||||
#if !PIN_EXISTS(SS)
|
||||
#error SS_PIN not defined!
|
||||
#endif
|
||||
@ -65,7 +65,7 @@ void spiInit(uint8_t spiRate) {
|
||||
SPI.begin();
|
||||
}
|
||||
|
||||
uint8_t spiRec(void) {
|
||||
uint8_t spiRec() {
|
||||
SPI.beginTransaction(spiConfig);
|
||||
uint8_t returnByte = SPI.transfer(0xFF);
|
||||
SPI.endTransaction();
|
||||
|
@ -38,13 +38,13 @@
|
||||
#include "../../module/endstops.h"
|
||||
|
||||
// One ISR for all EXT-Interrupts
|
||||
void endstop_ISR(void) { endstops.update(); }
|
||||
void endstop_ISR() { endstops.update(); }
|
||||
|
||||
/**
|
||||
* Endstop interrupts for Due based targets.
|
||||
* On Due, all pins support external interrupt capability.
|
||||
*/
|
||||
void setup_endstop_interrupts(void) {
|
||||
void setup_endstop_interrupts() {
|
||||
#define _ATTACH(P) attachInterrupt(digitalPinToInterrupt(P), endstop_ISR, CHANGE)
|
||||
#if HAS_X_MAX
|
||||
_ATTACH(X_MAX_PIN);
|
||||
|
@ -35,7 +35,7 @@
|
||||
so that all instructions following the ISB are fetched from cache or
|
||||
memory, after the instruction has been completed.
|
||||
*/
|
||||
FORCE_INLINE static void __ISB(void) {
|
||||
FORCE_INLINE static void __ISB() {
|
||||
__asm__ __volatile__("isb 0xF":::"memory");
|
||||
}
|
||||
|
||||
@ -43,7 +43,7 @@ FORCE_INLINE static void __ISB(void) {
|
||||
This function acts as a special kind of Data Memory Barrier.
|
||||
It completes when all explicit memory accesses before this instruction complete.
|
||||
*/
|
||||
FORCE_INLINE static void __DSB(void) {
|
||||
FORCE_INLINE static void __DSB() {
|
||||
__asm__ __volatile__("dsb 0xF":::"memory");
|
||||
}
|
||||
|
||||
|
@ -67,8 +67,8 @@ typedef uint32_t hal_timer_t;
|
||||
#define ENABLE_TEMPERATURE_INTERRUPT() HAL_timer_enable_interrupt(TEMP_TIMER_NUM)
|
||||
#define DISABLE_TEMPERATURE_INTERRUPT() HAL_timer_disable_interrupt(TEMP_TIMER_NUM)
|
||||
|
||||
#define HAL_STEP_TIMER_ISR() extern "C" void ftm0_isr(void) //void TC3_Handler()
|
||||
#define HAL_TEMP_TIMER_ISR() extern "C" void ftm1_isr(void) //void TC4_Handler()
|
||||
#define HAL_STEP_TIMER_ISR() extern "C" void ftm0_isr() //void TC3_Handler()
|
||||
#define HAL_TEMP_TIMER_ISR() extern "C" void ftm1_isr() //void TC4_Handler()
|
||||
|
||||
void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency);
|
||||
|
||||
|
Reference in New Issue
Block a user