From f0ed61ccc59824976a1ea45318b926bf75ebbe2d Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Sun, 16 Feb 2014 18:11:23 +0100 Subject: [PATCH] the switch_msg are actually CC1101-registers --- flash-ota.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/flash-ota.c b/flash-ota.c index 034ae78..4279aa9 100644 --- a/flash-ota.c +++ b/flash-ota.c @@ -193,7 +193,7 @@ static int switch_speed(struct hmcfgusb_dev *dev, struct recv_data *rdata, uint8 int main(int argc, char **argv) { const char twiddlie[] = { '-', '\\', '|', '/' }; - const uint8_t switch_msg[] = { 0x10, 0x5B, 0x11, 0xF8, 0x15, 0x47 }; + const uint8_t cc1101_regs[] = { 0x10, 0x5B, 0x11, 0xF8, 0x15, 0x47 }; struct hmcfgusb_dev *dev; struct recv_data rdata; uint8_t out[0x40]; @@ -345,8 +345,8 @@ int main(int argc, char **argv) SET_SRC(out, my_hmid); SET_DST(out, hmid); - memcpy(&out[PAYLOAD], switch_msg, sizeof(switch_msg)); - SET_LEN_FROM_PAYLOADLEN(out, sizeof(switch_msg)); + memcpy(&out[PAYLOAD], cc1101_regs, sizeof(cc1101_regs)); + SET_LEN_FROM_PAYLOADLEN(out, sizeof(cc1101_regs)); if (!send_hm_message(dev, &rdata, out)) { exit(EXIT_FAILURE); @@ -367,8 +367,8 @@ int main(int argc, char **argv) SET_SRC(out, my_hmid); SET_DST(out, hmid); - memcpy(&out[PAYLOAD], switch_msg, sizeof(switch_msg)); - SET_LEN_FROM_PAYLOADLEN(out, sizeof(switch_msg)); + memcpy(&out[PAYLOAD], cc1101_regs, sizeof(cc1101_regs)); + SET_LEN_FROM_PAYLOADLEN(out, sizeof(cc1101_regs)); cnt = 3; do { -- 2.39.5