summaryrefslogtreecommitdiffstats
path: root/pressure_control/firmware
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2008-10-22 21:34:55 +0200
committerMichael Buesch <mb@bu3sch.de>2008-10-22 21:34:55 +0200
commit89b80bc2ae9a06f029beea7f62bae11b274de3e9 (patch)
treebaad5b134626454a47c96fb458fa0c67c5c765cc /pressure_control/firmware
parent82e34364219cc2114247eb2c42ba86cad70276d1 (diff)
downloadcnc-89b80bc2ae9a06f029beea7f62bae11b274de3e9.tar.xz
cnc-89b80bc2ae9a06f029beea7f62bae11b274de3e9.zip
pressure_control: Reduce message size.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Diffstat (limited to 'pressure_control/firmware')
-rw-r--r--pressure_control/firmware/remote.c2
-rw-r--r--pressure_control/firmware/remote.h5
2 files changed, 3 insertions, 4 deletions
diff --git a/pressure_control/firmware/remote.c b/pressure_control/firmware/remote.c
index b012b4a..78f0255 100644
--- a/pressure_control/firmware/remote.c
+++ b/pressure_control/firmware/remote.c
@@ -288,7 +288,7 @@ static void usart_init(void)
void remote_init(void)
{
/* The remote tool depends on the exact size (and layout). */
- BUILD_BUG_ON(sizeof(struct remote_message) != 38);
+ BUILD_BUG_ON(sizeof(struct remote_message) != 12);
usart_init();
}
diff --git a/pressure_control/firmware/remote.h b/pressure_control/firmware/remote.h
index 46d35ff..5270407 100644
--- a/pressure_control/firmware/remote.h
+++ b/pressure_control/firmware/remote.h
@@ -43,14 +43,13 @@ enum remote_message_config_flags {
struct remote_message {
uint8_t id;
uint8_t flags;
- uint8_t __padding0[2];
union {
struct {
uint8_t code;
} __attribute__((packed)) error;
struct {
- char str[32];
+ char str[8];
} __attribute__((packed)) logmessage;
struct {
uint16_t mbar;
@@ -63,7 +62,7 @@ struct remote_message {
uint8_t state;
} __attribute__((packed)) valve;
- uint8_t __padding1[32];
+ uint8_t __padding[8];
} __attribute__((packed));
uint16_t crc;
bues.ch cgit interface