aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/LPC214x/spi_lld.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/platforms/LPC214x/spi_lld.c')
-rw-r--r--os/hal/platforms/LPC214x/spi_lld.c52
1 files changed, 32 insertions, 20 deletions
diff --git a/os/hal/platforms/LPC214x/spi_lld.c b/os/hal/platforms/LPC214x/spi_lld.c
index 44c668db8..d829c3d62 100644
--- a/os/hal/platforms/LPC214x/spi_lld.c
+++ b/os/hal/platforms/LPC214x/spi_lld.c
@@ -18,8 +18,9 @@
*/
/**
- * @file LPC214x/spi_lld.c
- * @brief LPC214x low level SPI driver code.
+ * @file LPC214x/spi_lld.c
+ * @brief LPC214x low level SPI driver code.
+ *
* @addtogroup LPC214x_SPI
* @{
*/
@@ -47,14 +48,13 @@ SPIDriver SPID1;
/*===========================================================================*/
/**
- * @brief Synchronous SSP transfer.
+ * @brief Synchronous SSP transfer.
*
* @param[in] n number of bytes to be exchanged
- *
* @param[in] txbuf the pointer to the transmit buffer or @p NULL
* @param[out] rxbuf the pointer to the receive buffer or @p NULL
*/
-void rw8(size_t n, const uint8_t *txbuf, uint8_t *rxbuf) {
+static void rw8(size_t n, const uint8_t *txbuf, uint8_t *rxbuf) {
size_t ntx = n;
while (n > 0) {
@@ -85,7 +85,9 @@ void rw8(size_t n, const uint8_t *txbuf, uint8_t *rxbuf) {
/*===========================================================================*/
/**
- * @brief Low level SPI driver initialization.
+ * @brief Low level SPI driver initialization.
+ *
+ * @notapi
*/
void spi_lld_init(void) {
@@ -95,9 +97,11 @@ void spi_lld_init(void) {
}
/**
- * @brief Configures and activates the SPI peripheral.
+ * @brief Configures and activates the SPI peripheral.
*
* @param[in] spip pointer to the @p SPIDriver object
+ *
+ * @notapi
*/
void spi_lld_start(SPIDriver *spip) {
@@ -116,9 +120,11 @@ void spi_lld_start(SPIDriver *spip) {
}
/**
- * @brief Deactivates the SPI peripheral.
+ * @brief Deactivates the SPI peripheral.
*
* @param[in] spip pointer to the @p SPIDriver object
+ *
+ * @notapi
*/
void spi_lld_stop(SPIDriver *spip) {
@@ -131,9 +137,11 @@ void spi_lld_stop(SPIDriver *spip) {
}
/**
- * @brief Asserts the slave select signal and prepares for transfers.
+ * @brief Asserts the slave select signal and prepares for transfers.
*
* @param[in] spip pointer to the @p SPIDriver object
+ *
+ * @notapi
*/
void spi_lld_select(SPIDriver *spip) {
@@ -141,10 +149,12 @@ void spi_lld_select(SPIDriver *spip) {
}
/**
- * @brief Deasserts the slave select signal.
+ * @brief Deasserts the slave select signal.
* @details The previously selected peripheral is unselected.
*
* @param[in] spip pointer to the @p SPIDriver object
+ *
+ * @notapi
*/
void spi_lld_unselect(SPIDriver *spip) {
@@ -152,13 +162,15 @@ void spi_lld_unselect(SPIDriver *spip) {
}
/**
- * @brief Ignores data on the SPI bus.
+ * @brief Ignores data on the SPI bus.
* @details This function transmits a series of idle words on the SPI bus and
* ignores the received data. This function can be invoked even
* when a slave select signal has not been yet asserted.
*
* @param[in] spip pointer to the @p SPIDriver object
* @param[in] n number of words to be ignored
+ *
+ * @notapi
*/
void spi_lld_ignore(SPIDriver *spip, size_t n) {
@@ -167,16 +179,16 @@ void spi_lld_ignore(SPIDriver *spip, size_t n) {
}
/**
- * @brief Exchanges data on the SPI bus.
+ * @brief Exchanges data on the SPI bus.
* @details This function performs a simultaneous transmit/receive operation.
+ * @note The buffers are organized as uint8_t arrays.
*
* @param[in] spip pointer to the @p SPIDriver object
* @param[in] n number of words to be exchanged
* @param[in] txbuf the pointer to the transmit buffer
* @param[out] rxbuf the pointer to the receive buffer
*
- * @note The buffers are organized as uint8_t arrays for data sizes below or
- * equal to 8 bits else it is organized as uint16_t arrays.
+ * @notapi
*/
void spi_lld_exchange(SPIDriver *spip, size_t n,
const void *txbuf, void *rxbuf) {
@@ -186,14 +198,14 @@ void spi_lld_exchange(SPIDriver *spip, size_t n,
}
/**
- * @brief Sends data ever the SPI bus.
+ * @brief Sends data ever the SPI bus.
+ * @note The buffers are organized as uint8_t arrays.
*
* @param[in] spip pointer to the @p SPIDriver object
* @param[in] n number of words to send
* @param[in] txbuf the pointer to the transmit buffer
*
- * @note The buffers are organized as uint8_t arrays for data sizes below or
- * equal to 8 bits else it is organized as uint16_t arrays.
+ * @notapi
*/
void spi_lld_send(SPIDriver *spip, size_t n, const void *txbuf) {
@@ -202,14 +214,14 @@ void spi_lld_send(SPIDriver *spip, size_t n, const void *txbuf) {
}
/**
- * @brief Receives data from the SPI bus.
+ * @brief Receives data from the SPI bus.
+ * @note The buffers are organized as uint8_t arrays.
*
* @param[in] spip pointer to the @p SPIDriver object
* @param[in] n number of words to receive
* @param[out] rxbuf the pointer to the receive buffer
*
- * @note The buffers are organized as uint8_t arrays for data sizes below or
- * equal to 8 bits else it is organized as uint16_t arrays.
+ * @notapi
*/
void spi_lld_receive(SPIDriver *spip, size_t n, void *rxbuf) {