Skip to content

Commit 0cd178d

Browse files
committed
zephyr: fix build with zephyr
zephyr macro min() was hanged to MIN() Kconfig key CDC_ACM_PORT_NAME was changed to CDC_ACM_PORT_NAME_0 zephyr sha of the fixing time is 406dc2cb0e2868392f444677ace416440695829f. Signed-off-by: Andrzej Puzdrowski <[email protected]>
1 parent 4b4ac90 commit 0cd178d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

boot/boot_serial/src/boot_serial.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,11 @@ boot_serial_in_dec(char *in, int inlen, char *out, int *out_off, int maxout)
588588
if (len != *out_off - sizeof(uint16_t)) {
589589
return 0;
590590
}
591-
len = min(len, *out_off - sizeof(uint16_t));
591+
592+
if (len > *out_off - sizeof(uint16_t)) {
593+
len = *out_off - sizeof(uint16_t);
594+
}
595+
592596
out += sizeof(uint16_t);
593597
#ifdef __ZEPHYR__
594598
crc = crc16(out, len, CRC_CITT_POLYMINAL, CRC16_INITIAL_CRC, true);

boot/zephyr/serial_adapter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ boot_uart_fifo_init(void)
193193
#ifdef CONFIG_BOOT_SERIAL_UART
194194
uart_dev = device_get_binding(CONFIG_UART_CONSOLE_ON_DEV_NAME);
195195
#elif CONFIG_BOOT_SERIAL_CDC_ACM
196-
uart_dev = device_get_binding(CONFIG_CDC_ACM_PORT_NAME);
196+
uart_dev = device_get_binding(CONFIG_CDC_ACM_PORT_NAME_0);
197197
#endif
198198
u8_t c;
199199

0 commit comments

Comments
 (0)