aboutsummaryrefslogtreecommitdiffstats
path: root/os/io/platforms/STM32/spi_lld.h
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-10-26 16:02:29 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-10-26 16:02:29 +0000
commita1db002da5d4bd3fdc0c7fcc0f2aa466de803d4f (patch)
treee9ff84603a24140f7afc46b6735ed120b75fb2e1 /os/io/platforms/STM32/spi_lld.h
parent34f29ab36c7d465d397304811945a226234b9db6 (diff)
downloadChibiOS-a1db002da5d4bd3fdc0c7fcc0f2aa466de803d4f.tar.gz
ChibiOS-a1db002da5d4bd3fdc0c7fcc0f2aa466de803d4f.tar.bz2
ChibiOS-a1db002da5d4bd3fdc0c7fcc0f2aa466de803d4f.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1256 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/io/platforms/STM32/spi_lld.h')
-rw-r--r--os/io/platforms/STM32/spi_lld.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/os/io/platforms/STM32/spi_lld.h b/os/io/platforms/STM32/spi_lld.h
index 5e5c26106..5775b67db 100644
--- a/os/io/platforms/STM32/spi_lld.h
+++ b/os/io/platforms/STM32/spi_lld.h
@@ -58,7 +58,7 @@
#endif
/**
- * @brief SPI1 DMA priority (0..3).
+ * @brief SPI1 DMA priority (0..3|lowest..highest).
* @note The priority level is used for both the TX and RX DMA channels but
* because of the channels ordering the RX channel has always priority
* over the TX channel.
@@ -68,7 +68,7 @@
#endif
/**
- * @brief SPI2 DMA priority (0..3).
+ * @brief SPI2 DMA priority (0..3|lowest..highest).
* @note The priority level is used for both the TX and RX DMA channels but
* because of the channels ordering the RX channel has always priority
* over the TX channel.
@@ -97,7 +97,7 @@ typedef struct {
/**
* @brief Clock pulses to be generated after initialization.
*/
- cnt_t spc_clkpulses;
+ cnt_t spc_initcnt;
/* End of the mandatory fields.*/
/**
* @brief The chip select line port.
@@ -137,6 +137,10 @@ typedef struct {
const SPIConfig *spd_config;
/* End of the mandatory fields.*/
/**
+ * @brief Thread waiting for I/O completion.
+ */
+ Thread *spd_thread;
+ /**
* @brief Pointer to the SPIx registers block.
*/
SPI_TypeDef *spd_spi;
@@ -174,7 +178,9 @@ extern "C" {
void spi_lld_setup(SPIDriver *spip);
void spi_lld_select(SPIDriver *spip);
void spi_lld_unselect(SPIDriver *spip);
- void spi_lld_exchange(SPIDriver *spip, size_t n, void *rxbuf, void *txbuf);
+ msg_t spi_lld_exchange(SPIDriver *spip, size_t n, void *rxbuf, void *txbuf);
+ msg_t spi_lld_send(SPIDriver *spip, size_t n, void *txbuf);
+ msg_t spi_lld_receive(SPIDriver *spip, size_t n, void *rxbuf);
#ifdef __cplusplus
}
#endif