Drop C-style 'void' argument
This commit is contained in:
@ -31,10 +31,10 @@ HalSerial usb_serial;
|
||||
extern "C" void u8g_xMicroDelay(uint16_t val) {
|
||||
DELAY_US(val);
|
||||
}
|
||||
extern "C" void u8g_MicroDelay(void) {
|
||||
extern "C" void u8g_MicroDelay() {
|
||||
u8g_xMicroDelay(1);
|
||||
}
|
||||
extern "C" void u8g_10MicroDelay(void) {
|
||||
extern "C" void u8g_10MicroDelay() {
|
||||
u8g_xMicroDelay(10);
|
||||
}
|
||||
extern "C" void u8g_Delay(uint16_t val) {
|
||||
@ -51,7 +51,7 @@ int freeMemory() {
|
||||
// ADC
|
||||
// ------------------------
|
||||
|
||||
void HAL_adc_init(void) {
|
||||
void HAL_adc_init() {
|
||||
|
||||
}
|
||||
|
||||
@ -64,18 +64,18 @@ void HAL_adc_start_conversion(const uint8_t ch) {
|
||||
active_ch = ch;
|
||||
}
|
||||
|
||||
bool HAL_adc_finished(void) {
|
||||
bool HAL_adc_finished() {
|
||||
return true;
|
||||
}
|
||||
|
||||
uint16_t HAL_adc_get_result(void) {
|
||||
uint16_t HAL_adc_get_result() {
|
||||
pin_t pin = analogInputToDigitalPin(active_ch);
|
||||
if (!VALID_PIN(pin)) return 0;
|
||||
uint16_t data = ((Gpio::get(pin) >> 2) & 0x3FF);
|
||||
return data; // return 10bit value as Marlin expects
|
||||
}
|
||||
|
||||
void HAL_pwm_init(void) {
|
||||
void HAL_pwm_init() {
|
||||
|
||||
}
|
||||
|
||||
|
@ -78,12 +78,12 @@ extern HalSerial usb_serial;
|
||||
#define ENABLE_ISRS()
|
||||
#define DISABLE_ISRS()
|
||||
|
||||
inline void HAL_init(void) { }
|
||||
inline void HAL_init() { }
|
||||
|
||||
// Utility functions
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-function"
|
||||
int freeMemory(void);
|
||||
int freeMemory();
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
// ADC
|
||||
@ -92,10 +92,10 @@ int freeMemory(void);
|
||||
#define HAL_READ_ADC() HAL_adc_get_result()
|
||||
#define HAL_ADC_READY() true
|
||||
|
||||
void HAL_adc_init(void);
|
||||
void HAL_adc_init();
|
||||
void HAL_adc_enable_channel(int pin);
|
||||
void HAL_adc_start_conversion(const uint8_t adc_pin);
|
||||
uint16_t HAL_adc_get_result(void);
|
||||
uint16_t HAL_adc_get_result();
|
||||
|
||||
/* ---------------- Delay in cycles */
|
||||
FORCE_INLINE static void DELAY_CYCLES(uint64_t x) {
|
||||
|
@ -28,8 +28,8 @@
|
||||
#include "../shared/Delay.h"
|
||||
|
||||
// Interrupts
|
||||
void cli(void) { } // Disable
|
||||
void sei(void) { } // Enable
|
||||
void cli() { } // Disable
|
||||
void sei() { } // Enable
|
||||
|
||||
// Time functions
|
||||
void _delay_ms(const int delay_ms) {
|
||||
|
@ -63,9 +63,9 @@ typedef uint8_t byte;
|
||||
#define constrain(value, arg_min, arg_max) ((value) < (arg_min) ? (arg_min) :((value) > (arg_max) ? (arg_max) : (value)))
|
||||
|
||||
//Interrupts
|
||||
void cli(void); // Disable
|
||||
void sei(void); // Enable
|
||||
void attachInterrupt(uint32_t pin, void (*callback)(void), uint32_t mode);
|
||||
void cli(); // Disable
|
||||
void sei(); // Enable
|
||||
void attachInterrupt(uint32_t pin, void (*callback)(), uint32_t mode);
|
||||
void detachInterrupt(uint32_t pin);
|
||||
extern "C" void GpioEnableInt(uint32_t port, uint32_t pin, uint32_t mode);
|
||||
extern "C" void GpioDisableInt(uint32_t port, uint32_t pin);
|
||||
|
@ -108,11 +108,11 @@ public:
|
||||
|
||||
void flush() { receive_buffer.clear(); }
|
||||
|
||||
uint8_t availableForWrite(void) {
|
||||
uint8_t availableForWrite() {
|
||||
return transmit_buffer.free() > 255 ? 255 : (uint8_t)transmit_buffer.free();
|
||||
}
|
||||
|
||||
void flushTX(void) {
|
||||
void flushTX() {
|
||||
if (host_connected)
|
||||
while (transmit_buffer.available()) { /* nada */ }
|
||||
}
|
||||
@ -200,7 +200,7 @@ public:
|
||||
void println(unsigned long value, int nbase = 0) { print(value, nbase); println(); }
|
||||
void println(float value, int round = 6) { printf("%f\n" , value); }
|
||||
void println(double value, int round = 6) { printf("%f\n" , value); }
|
||||
void println(void) { print('\n'); }
|
||||
void println() { print('\n'); }
|
||||
|
||||
volatile RingBuffer<uint8_t, 128> receive_buffer;
|
||||
volatile RingBuffer<uint8_t, 128> transmit_buffer;
|
||||
|
@ -104,7 +104,7 @@ void simulation_loop() {
|
||||
}
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
int main() {
|
||||
std::thread write_serial (write_serial_thread);
|
||||
std::thread read_serial (read_serial_thread);
|
||||
|
||||
|
@ -37,7 +37,7 @@ HAL_TEMP_TIMER_ISR();
|
||||
|
||||
Timer timers[2];
|
||||
|
||||
void HAL_timer_init(void) {
|
||||
void HAL_timer_init() {
|
||||
timers[0].init(0, STEPPER_TIMER_RATE, TIMER0_IRQHandler);
|
||||
timers[1].init(1, TEMP_TIMER_RATE, TIMER1_IRQHandler);
|
||||
}
|
||||
|
@ -59,16 +59,16 @@ 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 TIMER0_IRQHandler(void)
|
||||
#define HAL_TEMP_TIMER_ISR() extern "C" void TIMER1_IRQHandler(void)
|
||||
#define HAL_STEP_TIMER_ISR() extern "C" void TIMER0_IRQHandler()
|
||||
#define HAL_TEMP_TIMER_ISR() extern "C" void TIMER1_IRQHandler()
|
||||
|
||||
// PWM timer
|
||||
#define HAL_PWM_TIMER
|
||||
#define HAL_PWM_TIMER_ISR() extern "C" void TIMER3_IRQHandler(void)
|
||||
#define HAL_PWM_TIMER_ISR() extern "C" void TIMER3_IRQHandler()
|
||||
#define HAL_PWM_TIMER_IRQn
|
||||
|
||||
|
||||
void HAL_timer_init(void);
|
||||
void HAL_timer_init();
|
||||
void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency);
|
||||
|
||||
void HAL_timer_set_compare(const uint8_t timer_num, const hal_timer_t compare);
|
||||
|
@ -28,19 +28,19 @@
|
||||
|
||||
#include "watchdog.h"
|
||||
|
||||
void watchdog_init(void) {}
|
||||
void watchdog_init() {}
|
||||
|
||||
void HAL_clear_reset_source(void) {}
|
||||
void HAL_clear_reset_source() {}
|
||||
|
||||
uint8_t HAL_get_reset_source(void) {
|
||||
uint8_t HAL_get_reset_source() {
|
||||
return RST_POWER_ON;
|
||||
}
|
||||
|
||||
void watchdog_reset() {}
|
||||
|
||||
#else
|
||||
void HAL_clear_reset_source(void) {}
|
||||
uint8_t HAL_get_reset_source(void) { return RST_POWER_ON; }
|
||||
void HAL_clear_reset_source() {}
|
||||
uint8_t HAL_get_reset_source() { return RST_POWER_ON; }
|
||||
#endif // USE_WATCHDOG
|
||||
|
||||
#endif // __PLAT_LINUX__
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
#define WDT_TIMEOUT 4000000 // 4 second timeout
|
||||
|
||||
void watchdog_init(void);
|
||||
void watchdog_reset(void);
|
||||
void HAL_clear_reset_source(void);
|
||||
uint8_t HAL_get_reset_source(void);
|
||||
void watchdog_init();
|
||||
void watchdog_reset();
|
||||
void HAL_clear_reset_source();
|
||||
uint8_t HAL_get_reset_source();
|
||||
|
Reference in New Issue
Block a user