From 8c836a17ffbb2af2a0d10db3a3b031c4ee4b2f3d Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 26 Jul 2010 15:01:58 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2090 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/STM32/spi_lld.c | 50 +++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 26 deletions(-) (limited to 'os/hal/platforms/STM32/spi_lld.c') diff --git a/os/hal/platforms/STM32/spi_lld.c b/os/hal/platforms/STM32/spi_lld.c index 0dc47a81e..9c00b561a 100644 --- a/os/hal/platforms/STM32/spi_lld.c +++ b/os/hal/platforms/STM32/spi_lld.c @@ -18,8 +18,9 @@ */ /** - * @file STM32/spi_lld.c - * @brief STM32 SPI subsystem low level driver source. + * @file STM32/spi_lld.c + * @brief STM32 SPI subsystem low level driver source. + * * @addtogroup STM32_SPI * @{ */ @@ -113,7 +114,7 @@ static void spi_start_wait(SPIDriver *spip, size_t n, #if USE_STM32_SPI1 || defined(__DOXYGEN__) /** - * @brief SPI1 RX DMA interrupt handler (channel 2). + * @brief SPI1 RX DMA interrupt handler (channel 2). */ CH_IRQ_HANDLER(Vector70) { @@ -130,7 +131,7 @@ CH_IRQ_HANDLER(Vector70) { } /** - * @brief SPI1 TX DMA interrupt handler (channel 3). + * @brief SPI1 TX DMA interrupt handler (channel 3). */ CH_IRQ_HANDLER(Vector74) { @@ -146,7 +147,7 @@ CH_IRQ_HANDLER(Vector74) { #if USE_STM32_SPI2 || defined(__DOXYGEN__) /** - * @brief SPI2 RX DMA interrupt handler (channel 4). + * @brief SPI2 RX DMA interrupt handler (channel 4). */ CH_IRQ_HANDLER(Vector78) { @@ -163,7 +164,7 @@ CH_IRQ_HANDLER(Vector78) { } /** - * @brief SPI2 TX DMA interrupt handler (channel 5). + * @brief SPI2 TX DMA interrupt handler (channel 5). */ CH_IRQ_HANDLER(Vector7C) { @@ -179,7 +180,7 @@ CH_IRQ_HANDLER(Vector7C) { #if USE_STM32_SPI3 || defined(__DOXYGEN__) /** - * @brief SPI3 RX DMA interrupt handler (DMA2, channel 1). + * @brief SPI3 RX DMA interrupt handler (DMA2, channel 1). */ CH_IRQ_HANDLER(Vector120) { @@ -196,7 +197,7 @@ CH_IRQ_HANDLER(Vector120) { } /** - * @brief SPI3 TX DMA2 interrupt handler (DMA2, channel 2). + * @brief SPI3 TX DMA2 interrupt handler (DMA2, channel 2). */ CH_IRQ_HANDLER(Vector124) { @@ -215,7 +216,7 @@ CH_IRQ_HANDLER(Vector124) { /*===========================================================================*/ /** - * @brief Low level SPI driver initialization. + * @brief Low level SPI driver initialization. */ void spi_lld_init(void) { @@ -256,7 +257,7 @@ 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 */ @@ -306,7 +307,7 @@ 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 */ @@ -342,7 +343,7 @@ 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 */ @@ -352,7 +353,7 @@ 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 @@ -363,7 +364,7 @@ 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. @@ -379,16 +380,15 @@ 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 for data sizes below or + * equal to 8 bits else it is organized as uint16_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. */ void spi_lld_exchange(SPIDriver *spip, size_t n, const void *txbuf, void *rxbuf) { @@ -399,14 +399,13 @@ 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 for data sizes below or + * equal to 8 bits else it is organized as uint16_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. */ void spi_lld_send(SPIDriver *spip, size_t n, const void *txbuf) { @@ -416,14 +415,13 @@ 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 for data sizes below or + * equal to 8 bits else it is organized as uint16_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. */ void spi_lld_receive(SPIDriver *spip, size_t n, void *rxbuf) { -- cgit v1.2.3