summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pressure_control/firmware/remote.c4
-rw-r--r--pressure_control/firmware/remote.h2
-rw-r--r--pressure_control/firmware/util.c4
-rw-r--r--pressure_control/firmware/util.h6
4 files changed, 8 insertions, 8 deletions
diff --git a/pressure_control/firmware/remote.c b/pressure_control/firmware/remote.c
index ffa6e24..db68969 100644
--- a/pressure_control/firmware/remote.c
+++ b/pressure_control/firmware/remote.c
@@ -430,7 +430,7 @@ void print_sram(const char *str)
} while (c != '\0');
}
-void print_pgm(const prog_char *str)
+void print_pgm(const char __flash *str)
{
struct remote_message msg;
uint8_t c, i;
@@ -440,7 +440,7 @@ void print_pgm(const prog_char *str)
msg.id = MSG_LOGMESSAGE;
for (i = 0; i < sizeof(msg.logmessage.str); i++) {
- c = pgm_read_byte(str);
+ c = *str;
if (c == '\0')
break;
str++;
diff --git a/pressure_control/firmware/remote.h b/pressure_control/firmware/remote.h
index c942a2b..1e170a7 100644
--- a/pressure_control/firmware/remote.h
+++ b/pressure_control/firmware/remote.h
@@ -92,7 +92,7 @@ struct remote_message {
void print_sram(const char *msg);
-void print_pgm(const prog_char *msg);
+void print_pgm(const char __flash *msg);
#define print(string_literal) print_pgm(PSTR(string_literal))
void print_dec(uint16_t number);
void print_dec_signed(int16_t number);
diff --git a/pressure_control/firmware/util.c b/pressure_control/firmware/util.c
index 3ed33f3..e5b2778 100644
--- a/pressure_control/firmware/util.c
+++ b/pressure_control/firmware/util.c
@@ -26,7 +26,7 @@
#include <avr/sleep.h>
-const prog_uint8_t bit2mask_lt[] = {
+const uint8_t __flash bit2mask_lt[] = {
0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80,
};
@@ -73,7 +73,7 @@ void udelay(uint16_t usecs)
);
}
-void panic(const prog_char *msg)
+void panic(const char __flash *msg)
{
print("Panic!");
infinite_sleep();
diff --git a/pressure_control/firmware/util.h b/pressure_control/firmware/util.h
index 0e79e58..2110e90 100644
--- a/pressure_control/firmware/util.h
+++ b/pressure_control/firmware/util.h
@@ -37,7 +37,7 @@
#define stringify(x) __stringify(x)
/* Assertions */
-void panic(const prog_char *msg) __attribute__((noreturn));
+void panic(const char __flash *msg) __attribute__((noreturn));
#define BUILD_BUG_ON(x) ((void)sizeof(char[1 - 2 * !!(x)]))
#define BUG_ON(x) \
do { \
@@ -105,11 +105,11 @@ uint8_t crc8_block_update(uint8_t crc, const void *data, uint8_t size);
/* Convert a bit-number to a bit-mask.
* Only valid for bitnr<=7.
*/
-extern const prog_uint8_t bit2mask_lt[];
+extern const uint8_t __flash bit2mask_lt[];
#undef BITMASK8
#define BITMASK8(bitnr) \
(__builtin_constant_p(bitnr) ? (1<<(bitnr)) : \
- pgm_read_byte(&bit2mask_lt[(bitnr)]))
+ bit2mask_lt[(bitnr)])
#endif /* UTIL_H_ */
bues.ch cgit interface