Drop C-style 'void' argument

This commit is contained in:
Scott Lahteine
2019-09-16 20:31:08 -05:00
parent 7d8c38693f
commit f01f0d1956
174 changed files with 864 additions and 864 deletions

View File

@ -44,10 +44,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() {
@ -56,9 +56,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;
@ -87,6 +87,6 @@ extern "C" {
void HAL_adc_start_conversion(const uint8_t adc_pin) { ADC0_SC1A = pin2sc1a[adc_pin]; }
uint16_t HAL_adc_get_result(void) { return ADC0_RA; }
uint16_t HAL_adc_get_result() { return ADC0_RA; }
#endif // __MK20DX256__

View File

@ -87,20 +87,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 the reset reason
void HAL_clear_reset_source(void);
void HAL_clear_reset_source();
// Get the reason for the reset
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
@ -115,7 +115,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

View File

@ -34,7 +34,7 @@ static SPISettings spiConfig;
*/
// Initialize SPI bus
void spiBegin(void) {
void spiBegin() {
#if !PIN_EXISTS(SS)
#error "SS_PIN not defined!"
#endif
@ -71,7 +71,7 @@ void spiInit(uint8_t spiRate) {
}
// SPI receive a byte
uint8_t spiRec(void) {
uint8_t spiRec() {
SPI.beginTransaction(spiConfig);
const uint8_t returnByte = SPI.transfer(0xFF);
SPI.endTransaction();

View File

@ -38,14 +38,14 @@
#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);

View File

@ -34,7 +34,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");
}
@ -42,7 +42,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");
}

View File

@ -68,8 +68,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);