Commit 0cd178d0 authored by Andrzej Puzdrowski's avatar Andrzej Puzdrowski
Browse files

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: default avatarAndrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
parent 4b4ac906
Loading
Loading
Loading
Loading
+5 −1
Changes for boot/boot_serial/src/boot_serial.c: 5 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -588,7 +588,11 @@ boot_serial_in_dec(char *in, int inlen, char *out, int *out_off, int maxout)
        if (len != *out_off - sizeof(uint16_t)) {
            return 0;
        }
        len = min(len, *out_off - sizeof(uint16_t));

        if (len > *out_off - sizeof(uint16_t)) {
            len = *out_off - sizeof(uint16_t);
        }

        out += sizeof(uint16_t);
#ifdef __ZEPHYR__
        crc = crc16(out, len, CRC_CITT_POLYMINAL, CRC16_INITIAL_CRC, true);
+1 −1
Changes for boot/zephyr/serial_adapter.c: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -193,7 +193,7 @@ boot_uart_fifo_init(void)
#ifdef CONFIG_BOOT_SERIAL_UART
	uart_dev = device_get_binding(CONFIG_UART_CONSOLE_ON_DEV_NAME);
#elif CONFIG_BOOT_SERIAL_CDC_ACM
	uart_dev = device_get_binding(CONFIG_CDC_ACM_PORT_NAME);
	uart_dev = device_get_binding(CONFIG_CDC_ACM_PORT_NAME_0);
#endif
	u8_t c;