GCC is throwing errors in your code regarding warning: no return statement in function returning non-void errors.
E.g., where is the return statement in this function that's supposed return a signed short?
|
extern "C" signed short uart_rx_cb(uint16_t uart_no, unsigned short len, |
|
unsigned char * pbuf, int *pend) |
|
{ |
|
int ret = 0; |
|
int _len = 0; |
|
do |
|
{ |
|
ret = tls_uart_read(uart_no, pbuf + *pend, 1); |
|
if (ret > 0) |
|
(*pend) = *pend + ret; |
|
_len += ret; |
|
} while (ret != 0); |
|
} |
Same here
|
int init_uart1_cfg(int uart_no, bool uart1_mul) |
|
{ |
|
unsigned int reg = 0; |
|
|
|
|
|
if (TLS_UART_1 == uart_no |
|
&& true == uart1_mul |
|
&& ~(INIT_UART1_MUL & init_uart1_pin_cfg)) |
|
{ |
|
delay(10); // SHOULD delay 0.010 second. |
|
reg = tls_reg_read32(HR_GPIOB_AFSEL); |
|
reg &= ~(BIT(11) | BIT(12)); |
|
tls_reg_write32(HR_GPIOB_AFSEL, reg); |
|
wm_uart1_rx_config(TLS_UART1_MUL_RX); |
|
wm_uart1_tx_config(TLS_UART1_MUL_TX); |
|
} else if (TLS_UART_1 == uart_no |
|
&& false == uart1_mul |
|
&& ~(INIT_UART1_DEF & init_uart1_pin_cfg)) |
|
{ |
|
delay(10); // SHOULD delay 0.010 second. |
|
reg = tls_reg_read32(HR_GPIOB_AFSEL); |
|
reg &= ~(BIT(17) | BIT(18)); |
|
tls_reg_write32(HR_GPIOB_AFSEL, reg); |
|
wm_uart1_rx_config(WM_IO_PB_11); |
|
wm_uart1_tx_config(WM_IO_PB_12); |
|
init_uart1_pin_cfg = INIT_UART1_DEF; |
|
} |
|
} |
GCC is throwing errors in your code regarding
warning: no return statement in function returning non-voiderrors.E.g., where is the
returnstatement in this function that's supposed return asigned short?arduino/cores/w600/HardwareSerial.cpp
Lines 45 to 57 in b94d129
Same here
arduino/cores/w600/HardwareSerial.cpp
Lines 148 to 175 in b94d129