summaryrefslogtreecommitdiffstats
path: root/pressure_control/firmware/remote.c
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2009-11-22 14:34:06 +0100
committerMichael Buesch <mb@bu3sch.de>2009-11-22 14:34:06 +0100
commitf6e560e764e4315c8d50ce26b4894da680efb43a (patch)
tree17b2f225f25a1791b6fbf47e4a17e7f2d459d57d /pressure_control/firmware/remote.c
parent9c025d4fbc0630c2caf12caf67770ad62b0843b7 (diff)
downloadcnc-f6e560e764e4315c8d50ce26b4894da680efb43a.tar.xz
cnc-f6e560e764e4315c8d50ce26b4894da680efb43a.zip
pressure_control: Reduce message size
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Diffstat (limited to 'pressure_control/firmware/remote.c')
-rw-r--r--pressure_control/firmware/remote.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pressure_control/firmware/remote.c b/pressure_control/firmware/remote.c
index 1945ef4..7863b55 100644
--- a/pressure_control/firmware/remote.c
+++ b/pressure_control/firmware/remote.c
@@ -111,7 +111,7 @@ static void handle_received_message(void)
memset(&reply, 0, sizeof(reply));
- switch (rx_msg.id) {
+ switch (rx_msg.id & MSG_ID_MASK) {
case MSG_PING:
reply.id = MSG_PONG;
send_message(&reply);
@@ -256,7 +256,7 @@ static void handle_received_message(void)
}
out:
- if (rx_msg.flags & (1 << MSG_FLAG_REQ_ERRCODE)) {
+ if (rx_msg.id & MSG_FLAG_REQ_ERRCODE) {
memset(&reply, 0, sizeof(reply));
reply.id = MSG_ERROR;
reply.error.code = err;
@@ -460,7 +460,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) != 12);
+ BUILD_BUG_ON(sizeof(struct remote_message) != 7);
usart_init();
}
bues.ch cgit interface