Skip to content

Commit 40a2aab

Browse files
committed
Don't use volatile variables
1 parent 2b67b77 commit 40a2aab

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

Diff for: fft.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ static const uint8_t sinTable[] PROGMEM = {
88
180, 162, 142, 120, 98, 74, 50, 25
99
};
1010

11-
#define mshf_16( a, b) \
11+
#define mshf_16( a, b) \
1212
({ \
1313
int prod, val1=a, val2=b; \
1414
__asm__ __volatile__ ( \

Diff for: input.c

+9-9
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@
77
#include "eeprom.h"
88
#include "pins.h"
99

10-
static volatile int8_t encCnt = 0;
11-
static volatile CmdID cmdBuf = CMD_END;
10+
static int8_t encCnt = 0;
11+
static CmdID cmdBuf = CMD_END;
1212

1313
// Previous state
14-
static volatile uint8_t encPrev = ENC_NO;
15-
static volatile uint8_t btnPrev = BTN_NO;
14+
static uint8_t encPrev = ENC_NO;
15+
static uint8_t btnPrev = BTN_NO;
1616

17-
static volatile uint16_t displayTime = 0; // Display mode timer
18-
static volatile int16_t initTimer = INIT_TIMER_OFF; // Init timer
19-
static volatile uint8_t clockTimer = 0; // RTC poll timer
17+
static uint16_t displayTime = 0; // Display mode timer
18+
static int16_t initTimer = INIT_TIMER_OFF; // Init timer
19+
static uint8_t clockTimer = 0; // RTC poll timer
2020

21-
static volatile uint16_t secTimer; // 1 second timer
22-
static volatile uint16_t rcTimer;
21+
static uint16_t secTimer; // 1 second timer
22+
static uint16_t rcTimer;
2323

2424
static uint8_t rcType;
2525
static uint8_t rcAddr;

Diff for: remote.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include <avr/interrupt.h>
44
#include "pins.h"
55

6-
static volatile IRData irData; // Last decoded IR command
6+
static IRData irData; // Last decoded IR command
77

88
void rcInit()
99
{

0 commit comments

Comments
 (0)