apache / nuttx

Apache NuttX is a mature, real-time embedded operating system (RTOS)
https://nuttx.apache.org/
Apache License 2.0
2.62k stars 1.11k forks source link

Error codes related to software flow control in file stm32_hciuart.c #10239

Open xn365 opened 1 year ago

xn365 commented 1 year ago

These should be #ifdef instead of #ifndef:

https://github.com/apache/nuttx/blob/5adb9de00bc88ef34251fe02c783ec42e33d5bbb/arch/arm/src/stm32/stm32_hciuart.c#L243 https://github.com/apache/nuttx/blob/5adb9de00bc88ef34251fe02c783ec42e33d5bbb/arch/arm/src/stm32/stm32_hciuart.c#L269 https://github.com/apache/nuttx/blob/5adb9de00bc88ef34251fe02c783ec42e33d5bbb/arch/arm/src/stm32/stm32_hciuart.c#L1485

This: https://github.com/apache/nuttx/blob/5adb9de00bc88ef34251fe02c783ec42e33d5bbb/arch/arm/src/stm32/stm32_hciuart.c#L988 https://github.com/apache/nuttx/blob/5adb9de00bc88ef34251fe02c783ec42e33d5bbb/arch/arm/src/stm32/stm32_hciuart.c#L990 should be : uint16_t inused = hciuart_rxinuse(config);

if (inused >= config->rxupper)

This: https://github.com/apache/nuttx/blob/5adb9de00bc88ef34251fe02c783ec42e33d5bbb/arch/arm/src/stm32/stm32_hciuart.c#L1025 should be : if (inused >= config->rxlower)

This: https://github.com/apache/nuttx/blob/5adb9de00bc88ef34251fe02c783ec42e33d5bbb/arch/arm/src/stm32/stm32_hciuart.c#L1616 should be : pinset = (config->rts_gpio & ~regval) | GPIO_OUTPUT | GPIO_OUTPUT_SET;

acassis commented 1 year ago

@xn365 good finding! Could you please open a Pull Request?

https://nuttx.apache.org/docs/latest/contributing/index.html