aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/AT91SAM7/spi_lld.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-10-04 17:16:18 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-10-04 17:16:18 +0000
commit2891f7d645c4be187ac96ee4011207531d25c34a (patch)
treeddfb8134c4c918893cb0cb50075bd5be3f4248a9 /os/hal/platforms/AT91SAM7/spi_lld.c
parent7f61cb948ccdbd728643e0f174ee87542d9a862d (diff)
downloadChibiOS-2891f7d645c4be187ac96ee4011207531d25c34a.tar.gz
ChibiOS-2891f7d645c4be187ac96ee4011207531d25c34a.tar.bz2
ChibiOS-2891f7d645c4be187ac96ee4011207531d25c34a.zip
Documentation improvements, fixed a small error in the STM32 serial driver.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2234 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/AT91SAM7/spi_lld.c')
-rw-r--r--os/hal/platforms/AT91SAM7/spi_lld.c49
1 files changed, 31 insertions, 18 deletions
diff --git a/os/hal/platforms/AT91SAM7/spi_lld.c b/os/hal/platforms/AT91SAM7/spi_lld.c
index 2353b76cb..d614aabb5 100644
--- a/os/hal/platforms/AT91SAM7/spi_lld.c
+++ b/os/hal/platforms/AT91SAM7/spi_lld.c
@@ -18,8 +18,9 @@
*/
/**
- * @file AT91SAM7/spi_lld.c
- * @brief AT91SAM7 low level SPI driver code.
+ * @file AT91SAM7/spi_lld.c
+ * @brief AT91SAM7 low level SPI driver code.
+ *
* @addtogroup AT91SAM7_SPI
* @{
*/
@@ -47,7 +48,7 @@ SPIDriver SPID;
/*===========================================================================*/
/**
- * @brief Synchronous SPI transfer.
+ * @brief Synchronous SPI transfer.
*
* @param[in] n number of bytes to be exchanged
*
@@ -85,7 +86,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 +98,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) {
@@ -120,9 +125,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) {
@@ -135,9 +142,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) {
@@ -145,10 +154,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) {
@@ -156,13 +167,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) {
@@ -171,16 +184,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) {
@@ -190,14 +203,14 @@ void spi_lld_exchange(SPIDriver *spip, size_t n,
}
/**
- * @brief Sends data over the SPI bus.
+ * @brief Sends data over 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) {
@@ -206,14 +219,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) {