RTEMS | bsps/arm/stm32f4: Add SPI bus driver (!1294)
Christian Mauderer (@c-mauderer)
gitlab at rtems.org
Mon Jun 8 05:47:29 UTC 2026
Merge request https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1294 was reviewed by Christian Mauderer
--
Christian Mauderer started a new discussion on bsps/arm/stm32f4/spi/spi.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1294#note_152099
> + uint8_t byte = 0;
> + if (bus->tx_buf != NULL) {
> + byte = *bus->tx_buf++;
That line is completely correct. But usually I would suggest splitting it into two for better readability:
```
byte = *bus->tx_buf;
++bus->tx_buf;
```
Same is true for the rx_buf a bit further below.
--
Christian Mauderer started a new discussion on bsps/arm/stm32f4/spi/spi.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1294#note_152100
> + * for RXNE so we do not send another byte before the current one
> + * has been received (full-duplex, one byte in flight).
> + */
At the moment, you have two interrupts per byte. My guess would be that it is possible to only use the RX interrupt. You make sure that only one byte is in flight. So as soon as you received one byte, you can just put the next byte into the transmit buffer. Or did I miss anything?
--
Christian Mauderer started a new discussion on spec/build/bsps/arm/stm32f4/obj.yml: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1294#note_152101
> copyrights:
> -- Copyright (C) 2020 embedded brains GmbH & Co. KG
> + - Copyright (C) 2020 embedded brains GmbH & Co. KG
That looks like a formatting change. Could you split that into a separate commit so that it is clear what you have added in that file?
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1294
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260608/dfa56794/attachment-0001.htm>
More information about the bugs
mailing list