Drop C-style 'void' argument
This commit is contained in:
@ -29,7 +29,7 @@ class FlushableHardwareSerial : public HardwareSerial {
|
||||
public:
|
||||
FlushableHardwareSerial(int uart_nr);
|
||||
|
||||
inline void flushTX(void) { /* No need to flush the hardware serial, but defined here for compatibility. */ }
|
||||
inline void flushTX() { /* No need to flush the hardware serial, but defined here for compatibility. */ }
|
||||
};
|
||||
|
||||
extern FlushableHardwareSerial flushableSerial;
|
||||
|
@ -78,11 +78,11 @@ volatile int numPWMUsed = 0,
|
||||
// Public functions
|
||||
// ------------------------
|
||||
|
||||
void HAL_init(void) {
|
||||
void HAL_init() {
|
||||
i2s_init();
|
||||
}
|
||||
|
||||
void HAL_init_board(void) {
|
||||
void HAL_init_board() {
|
||||
#if EITHER(EEPROM_SETTINGS, WEBSUPPORT)
|
||||
spiffs_init();
|
||||
#endif
|
||||
@ -99,15 +99,15 @@ void HAL_init_board(void) {
|
||||
#endif
|
||||
}
|
||||
|
||||
void HAL_idletask(void) {
|
||||
void HAL_idletask() {
|
||||
#if ENABLED(OTASUPPORT)
|
||||
OTA_handle();
|
||||
#endif
|
||||
}
|
||||
|
||||
void HAL_clear_reset_source(void) { }
|
||||
void HAL_clear_reset_source() { }
|
||||
|
||||
uint8_t HAL_get_reset_source(void) { return rtc_get_reset_reason(1); }
|
||||
uint8_t HAL_get_reset_source() { return rtc_get_reset_reason(1); }
|
||||
|
||||
void _delay_ms(int delay_ms) { delay(delay_ms); }
|
||||
|
||||
|
@ -85,16 +85,16 @@ extern uint16_t HAL_adc_result;
|
||||
// ------------------------
|
||||
|
||||
// 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();
|
||||
|
||||
void _delay_ms(int delay);
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-function"
|
||||
int freeMemory(void);
|
||||
int freeMemory();
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
void analogWrite(pin_t pin, int value);
|
||||
@ -108,7 +108,7 @@ void eeprom_update_block (const void *__src, void *__dst, size_t __n);
|
||||
// ADC
|
||||
#define HAL_ANALOG_SELECT(pin)
|
||||
|
||||
void HAL_adc_init(void);
|
||||
void HAL_adc_init();
|
||||
|
||||
#define HAL_START_ADC(pin) HAL_adc_start_conversion(pin)
|
||||
#define HAL_READ_ADC() HAL_adc_result
|
||||
@ -123,6 +123,6 @@ void HAL_adc_start_conversion(uint8_t adc_pin);
|
||||
// Enable hooks into idle and setup for HAL
|
||||
#define HAL_IDLETASK 1
|
||||
#define BOARD_INIT() HAL_init_board();
|
||||
void HAL_idletask(void);
|
||||
void HAL_init(void);
|
||||
void HAL_init_board(void);
|
||||
void HAL_idletask();
|
||||
void HAL_init();
|
||||
void HAL_init_board();
|
||||
|
@ -80,7 +80,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();
|
||||
|
@ -66,15 +66,15 @@ ring_buffer_pos_t RingBuffer::write(const uint8_t *buffer, ring_buffer_pos_t siz
|
||||
return written;
|
||||
}
|
||||
|
||||
int RingBuffer::available(void) {
|
||||
int RingBuffer::available() {
|
||||
return (size - read_index + write_index) & (size - 1);
|
||||
}
|
||||
|
||||
int RingBuffer::peek(void) {
|
||||
int RingBuffer::peek() {
|
||||
return available() ? data[read_index] : -1;
|
||||
}
|
||||
|
||||
int RingBuffer::read(void) {
|
||||
int RingBuffer::read() {
|
||||
if (available()) {
|
||||
const int ret = data[read_index];
|
||||
read_index = NEXT_INDEX(read_index, size);
|
||||
@ -94,7 +94,7 @@ ring_buffer_pos_t RingBuffer::read(uint8_t *buffer) {
|
||||
return len;
|
||||
}
|
||||
|
||||
void RingBuffer::flush(void) { read_index = write_index; }
|
||||
void RingBuffer::flush() { read_index = write_index; }
|
||||
|
||||
// WebSocketSerial impl
|
||||
WebSocketSerial::WebSocketSerial()
|
||||
@ -120,10 +120,10 @@ void WebSocketSerial::begin(const long baud_setting) {
|
||||
}
|
||||
|
||||
void WebSocketSerial::end() { }
|
||||
int WebSocketSerial::peek(void) { return rx_buffer.peek(); }
|
||||
int WebSocketSerial::read(void) { return rx_buffer.read(); }
|
||||
int WebSocketSerial::available(void) { return rx_buffer.available(); }
|
||||
void WebSocketSerial::flush(void) { rx_buffer.flush(); }
|
||||
int WebSocketSerial::peek() { return rx_buffer.peek(); }
|
||||
int WebSocketSerial::read() { return rx_buffer.read(); }
|
||||
int WebSocketSerial::available() { return rx_buffer.available(); }
|
||||
void WebSocketSerial::flush() { rx_buffer.flush(); }
|
||||
|
||||
size_t WebSocketSerial::write(const uint8_t c) {
|
||||
size_t ret = tx_buffer.write(c);
|
||||
@ -145,7 +145,7 @@ size_t WebSocketSerial::write(const uint8_t* buffer, size_t size) {
|
||||
return written;
|
||||
}
|
||||
|
||||
void WebSocketSerial::flushTX(void) {
|
||||
void WebSocketSerial::flushTX() {
|
||||
// No need to do anything as there's no benefit to sending partial lines over the websocket connection.
|
||||
}
|
||||
|
||||
|
@ -45,11 +45,11 @@ public:
|
||||
RingBuffer(ring_buffer_pos_t size);
|
||||
~RingBuffer();
|
||||
|
||||
int available(void);
|
||||
int peek(void);
|
||||
int read(void);
|
||||
int available();
|
||||
int peek();
|
||||
int read();
|
||||
ring_buffer_pos_t read(uint8_t *buffer);
|
||||
void flush(void);
|
||||
void flush();
|
||||
ring_buffer_pos_t write(const uint8_t c);
|
||||
ring_buffer_pos_t write(const uint8_t* buffer, ring_buffer_pos_t size);
|
||||
};
|
||||
@ -62,11 +62,11 @@ public:
|
||||
WebSocketSerial();
|
||||
void begin(const long);
|
||||
void end();
|
||||
int available(void);
|
||||
int peek(void);
|
||||
int read(void);
|
||||
void flush(void);
|
||||
void flushTX(void);
|
||||
int available();
|
||||
int peek();
|
||||
int read();
|
||||
void flush();
|
||||
void flushTX();
|
||||
size_t write(const uint8_t c);
|
||||
size_t write(const uint8_t* buffer, size_t size);
|
||||
|
||||
|
@ -38,9 +38,9 @@
|
||||
#include "../../module/endstops.h"
|
||||
|
||||
// One ISR for all EXT-Interrupts
|
||||
void ICACHE_RAM_ATTR endstop_ISR(void) { endstops.update(); }
|
||||
void ICACHE_RAM_ATTR endstop_ISR() { endstops.update(); }
|
||||
|
||||
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);
|
||||
|
@ -79,13 +79,13 @@ typedef uint64_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_TEMP_TIMER_ISR() extern "C" void tempTC_Handler(void)
|
||||
#define HAL_STEP_TIMER_ISR() extern "C" void stepTC_Handler(void)
|
||||
#define HAL_PWM_TIMER_ISR() extern "C" void pwmTC_Handler(void)
|
||||
#define HAL_TEMP_TIMER_ISR() extern "C" void tempTC_Handler()
|
||||
#define HAL_STEP_TIMER_ISR() extern "C" void stepTC_Handler()
|
||||
#define HAL_PWM_TIMER_ISR() extern "C" void pwmTC_Handler()
|
||||
|
||||
extern "C" void tempTC_Handler(void);
|
||||
extern "C" void stepTC_Handler(void);
|
||||
extern "C" void pwmTC_Handler(void);
|
||||
extern "C" void tempTC_Handler();
|
||||
extern "C" void stepTC_Handler();
|
||||
extern "C" void pwmTC_Handler();
|
||||
|
||||
// ------------------------
|
||||
// Types
|
||||
@ -95,7 +95,7 @@ typedef struct {
|
||||
timer_group_t group;
|
||||
timer_idx_t idx;
|
||||
uint32_t divider;
|
||||
void (*fn)(void);
|
||||
void (*fn)();
|
||||
} tTimerConfig;
|
||||
|
||||
// ------------------------
|
||||
|
@ -28,11 +28,11 @@
|
||||
|
||||
#include "watchdog.h"
|
||||
|
||||
void watchdogSetup(void) {
|
||||
void watchdogSetup() {
|
||||
// do whatever. don't remove this function.
|
||||
}
|
||||
|
||||
void watchdog_init(void) {
|
||||
void watchdog_init() {
|
||||
// TODO
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user