|
|
|
|
120
|
|
120
|
|
121
|
// Code seen bit was set. If not found, value_ptr is unchanged.
|
121
|
// Code seen bit was set. If not found, value_ptr is unchanged.
|
122
|
// This allows "if (seen('A')||seen('B'))" to use the last-found value.
|
122
|
// This allows "if (seen('A')||seen('B'))" to use the last-found value.
|
123
|
- static bool seen(const char c) {
|
|
|
|
|
123
|
+ static volatile bool seen(const char c) {
|
124
|
const uint8_t ind = c - 'A';
|
124
|
const uint8_t ind = c - 'A';
|
125
|
if (ind >= COUNT(param)) return false; // Only A-Z
|
125
|
if (ind >= COUNT(param)) return false; // Only A-Z
|
126
|
const bool b = TEST(codebits[ind >> 3], ind & 0x7);
|
126
|
const bool b = TEST(codebits[ind >> 3], ind & 0x7);
|
|
|
|
|
132
|
|
132
|
|
133
|
// Code is found in the string. If not found, value_ptr is unchanged.
|
133
|
// Code is found in the string. If not found, value_ptr is unchanged.
|
134
|
// This allows "if (seen('A')||seen('B'))" to use the last-found value.
|
134
|
// This allows "if (seen('A')||seen('B'))" to use the last-found value.
|
135
|
- static bool seen(const char c) {
|
|
|
|
|
135
|
+ static volatile bool seen(const char c) {
|
136
|
const char *p = strchr(command_args, c);
|
136
|
const char *p = strchr(command_args, c);
|
137
|
const bool b = !!p;
|
137
|
const bool b = !!p;
|
138
|
if (b) value_ptr = DECIMAL_SIGNED(p[1]) ? &p[1] : (char*)NULL;
|
138
|
if (b) value_ptr = DECIMAL_SIGNED(p[1]) ? &p[1] : (char*)NULL;
|