diff options
Diffstat (limited to 'os/io/templates/spi_lld.c')
-rw-r--r-- | os/io/templates/spi_lld.c | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/os/io/templates/spi_lld.c b/os/io/templates/spi_lld.c index 172edbc07..4ef99e1ed 100644 --- a/os/io/templates/spi_lld.c +++ b/os/io/templates/spi_lld.c @@ -27,5 +27,60 @@ #include <ch.h>
#include <spi.h>
+/**
+ * @brief Low level SPI driver initialization. + */
+void spi_lld_init(void) {
+
+}
+
+/**
+ * @brief Low level SPI bus setup.
+ * + * @param[in] spip pointer to the @p SPIDriver object
+ */
+void spi_lld_setup(SPIDriver *spip) {
+
+}
+
+/**
+ * @brief Asserts the chip select signal and prepares for transfers.
+ *
+ * @param[in] spip pointer to the @p SPIDriver object
+ */
+void spi_lld_select(SPIDriver *spip) {
+
+}
+
+/**
+ * @brief De-asserts the chip select signal.
+ * @details The previously selected peripheral is unselected.
+ *
+ * @param[in] spip pointer to the @p SPIDriver object
+ */
+void spi_lld_unselect(SPIDriver *spip) {
+
+}
+
+/**
+ * @brief Exchanges data on the SPI bus.
+ * @details This function performs a simultaneous transmit/receive operation.
+ *
+ * @param[in] spip pointer to the @p SPIDriver object
+ * @param n number of words to be exchanged
+ * @param rxbuf the pointer to the receive buffer, if @p NULL is specified then
+ * the input data is discarded.
+ * Note that the buffer is organized as an uint8_t array for
+ * data sizes below or equal to 8 bits else it is organized as
+ * an uint16_t array.
+ * @param txbuf the pointer to the transmit buffer, if @p NULL is specified all
+ * ones are transmitted.
+ * Note that the buffer is organized as an uint8_t array for
+ * data sizes below or equal to 8 bits else it is organized as
+ * an uint16_t array.
+ */
+void spi_lld_exchange(SPIDriver *spip, size_t n, void *rxbuf, void *txbuf) {
+
+}
/** @} */
|