From: Michael Gernoth Date: Sat, 18 Nov 2017 11:40:57 +0000 (+0100) Subject: consistency in state names X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/hmcfgusb/commitdiff_plain/2c9eb7ad327fa2e987a979d1e174d89dc0e51b7a?ds=sidebyside consistency in state names --- diff --git a/hmuartlgw.c b/hmuartlgw.c index 417c6c2..9335c44 100644 --- a/hmuartlgw.c +++ b/hmuartlgw.c @@ -48,7 +48,7 @@ enum hmuartlgw_state { HMUARTLGW_ENTER_BOOTLOADER, HMUARTLGW_ENTER_BOOTLOADER_ACK, HMUARTLGW_BOOTLOADER, - HMUARTLGW_IP_BOOTLOADER, + HMUARTLGW_HMIP_BOOTLOADER, HMUARTLGW_ENTER_APPLICATION, HMUARTLGW_ENTER_APPLICATION_ACK, HMUARTLGW_APPLICATION, @@ -112,7 +112,7 @@ static int hmuartlgw_init_parse(enum hmuartlgw_dst dst, uint8_t *buf, int buf_le rdata->state = HMUARTLGW_HMIP_APPLICATION; return 1; } else if (!strncmp(((char*)buf)+2, "HMIP_TRX_Bl", 11)) { - rdata->state = HMUARTLGW_IP_BOOTLOADER; + rdata->state = HMUARTLGW_HMIP_BOOTLOADER; return 1; } } @@ -324,7 +324,7 @@ void hmuartlgw_enter_bootloader(struct hmuartlgw_dev *dev) } while (rdata.state == HMUARTLGW_QUERY_APPSTATE); if ((rdata.state != HMUARTLGW_BOOTLOADER) && - (rdata.state != HMUARTLGW_IP_BOOTLOADER)) { + (rdata.state != HMUARTLGW_HMIP_BOOTLOADER)) { rdata.dev = dev; rdata.state = HMUARTLGW_ENTER_BOOTLOADER; buf[0] = HMUARTLGW_OS_CHANGE_APP; @@ -337,7 +337,7 @@ void hmuartlgw_enter_bootloader(struct hmuartlgw_dev *dev) exit(1); } } while ((rdata.state != HMUARTLGW_BOOTLOADER) && - (rdata.state != HMUARTLGW_IP_BOOTLOADER)); + (rdata.state != HMUARTLGW_HMIP_BOOTLOADER)); printf("Waiting for bootloader to settle...\n"); sleep(HMUARTLGW_SETTLE_TIME);