Add some missing volatile annotations

This commit is contained in:
Allen Hill
2026-05-15 21:46:49 +00:00
parent aefc698fca
commit 1fa9d63ac5
3 changed files with 6 additions and 5 deletions
+3 -3
View File
@@ -128,11 +128,11 @@ uint8_t *cd_Time_Sec;
cd_modes CD_Mode;
#ifdef SOFTWARE_DEBUG
uint8_t pulse_count = 0;
uint16_t period = 0;
volatile uint8_t pulse_count = 0;
volatile uint16_t period = 0;
#endif
uint16_t pulsewidth;
volatile uint16_t pulsewidth;
// answers
uint8_t lancheck_resp[] = {0x00, dev_COMM_CTRL, dev_LAN, 0xFF, 0xFF};
+1 -1
View File
@@ -37,7 +37,7 @@
#define USART_BAUD_RATE(BAUD_RATE) \
(uint16_t)((float)(F_CPU * 64 / (RXMODE_S * (float)BAUD_RATE)) + 0.5)
uint8_t RS232_RxCharBuffer[25], RS232_RxCharBegin, RS232_RxCharEnd;
volatile uint8_t RS232_RxCharBuffer[25], RS232_RxCharBegin, RS232_RxCharEnd;
void RS232_Init(void) {
RS232_RxCharBegin = RS232_RxCharEnd = 0;
+2 -1
View File
@@ -25,7 +25,8 @@
#include <stdint.h>
extern uint8_t RS232_RxCharBuffer[25], RS232_RxCharBegin, RS232_RxCharEnd;
extern volatile uint8_t RS232_RxCharBuffer[25], RS232_RxCharBegin,
RS232_RxCharEnd;
void RS232_Init(void);
void RS232_Print_P(const char *str_addr);