aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/templates/spi_lld.h
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/templates/spi_lld.h')
-rw-r--r--os/hal/templates/spi_lld.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/os/hal/templates/spi_lld.h b/os/hal/templates/spi_lld.h
index 582b56678..a9aeca56f 100644
--- a/os/hal/templates/spi_lld.h
+++ b/os/hal/templates/spi_lld.h
@@ -67,6 +67,9 @@ typedef void (*spicallback_t)(SPIDriver *spip);
typedef struct {
/**
* @brief Operation complete callback.
+ * @note In order to use synchronous functions this field must be set to
+ * @p NULL, callbacks and synchronous operations are mutually
+ * exclusive.
*/
spicallback_t spc_endcb;
/* End of the mandatory fields.*/
@@ -82,6 +85,10 @@ struct SPIDriver {
* @brief Driver state.
*/
spistate_t spd_state;
+ /**
+ * @brief Current configuration data.
+ */
+ const SPIConfig *spd_config;
#if SPI_USE_WAIT || defined(__DOXYGEN__)
/**
* @brief Waiting thread.
@@ -98,10 +105,6 @@ struct SPIDriver {
Semaphore spd_semaphore;
#endif
#endif /* SPI_USE_MUTUAL_EXCLUSION */
- /**
- * @brief Current configuration data.
- */
- const SPIConfig *spd_config;
#if defined(SPI_DRIVER_EXT_FIELDS)
SPI_DRIVER_EXT_FIELDS
#endif