From a977d9300d136320b5b757d97a6f83a859496eed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Heredero?= Date: Fri, 3 Mar 2023 15:03:23 +0100 Subject: [PATCH] fix error of handlers --- solar_panel.X/main.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/solar_panel.X/main.c b/solar_panel.X/main.c index 432a126..a03868e 100644 --- a/solar_panel.X/main.c +++ b/solar_panel.X/main.c @@ -49,8 +49,8 @@ /* Main application */ -void resetTMR0(); -void endFrame(); +void resetTMR0(void); +void endFrame(void); void main(void) { @@ -79,8 +79,8 @@ void main(void) // Disable the Peripheral Interrupts //INTERRUPT_PeripheralInterruptDisable(); uint16_t foo = 512; - EUSART1_SetRxInterruptHandler(resetTMR0()); - TMR0_SetInterruptHandler(endFrame()); + EUSART1_SetRxInterruptHandler(resetTMR0); + TMR0_SetInterruptHandler(endFrame); while (1) { foo = ++foo%1023; @@ -101,13 +101,13 @@ void main(void) } -void resetTMR0(){ +void resetTMR0(void){ + INTCONbits.TMR0IF = 0; TMR0_Reload(); TMR0_StartTimer(); - INTCONbits.TMR0IF = 0; } -void endFrame(){ +void endFrame(void){ // TODO } /**