RTEMS | bsps/arm/stm32f4: Add SPI bus driver (!1294)
Kinsey Moore (@opticron)
gitlab at rtems.org
Mon Jun 15 22:29:45 UTC 2026
Kinsey Moore started a new discussion on bsps/arm/stm32f4/spi/spi.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1294#note_152387
> +/*
> + * Internal bus context. The spi_bus base member must be first so that
> + * RTEMS_CONTAINER_OF produces the correct pointer when the framework
> + * calls our callbacks with a spi_bus *.
> + */
> +typedef struct {
> + spi_bus base;
> + volatile stm32f4_spi *regs;
> + rtems_vector_number irq;
> + stm32f4_rcc_index rcc_index;
> + uint32_t pclk_hz;
> + rtems_binary_semaphore sem;
> + /* Current transfer state, updated by the ISR */
> + const uint8_t *tx_buf;
> + uint8_t *rx_buf;
> + size_t todo; /* bytes still to receive */
This could use a better name. Perhaps `rx_bytes_remaining`?
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1294#note_152387
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/20260615/57f92f77/attachment-0001.htm>
More information about the bugs
mailing list