From f4b0c6a8182e009c4a91b8feb05f0e77dfcd6ae5 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Thu, 28 Dec 2017 08:40:21 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11202 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/ports/LPC/LPC214x/hal_spi_lld.h | 34 +++++++++++++++++++++++------- os/hal/ports/STM32/LLD/DMAv3/notes.txt | 12 +++-------- os/hal/ports/STM32/LLD/DMAv3/stm32_dma.c | 2 +- os/hal/ports/STM32/LLD/DMAv3/stm32_dma.h | 9 +------- os/hal/ports/STM32/LLD/SPIv1/hal_spi_lld.h | 4 ++-- os/hal/ports/STM32/LLD/SPIv2/hal_spi_lld.h | 4 ++-- os/hal/ports/STM32/LLD/SPIv3/hal_spi_lld.h | 4 ++-- os/hal/templates/hal_spi_lld.h | 4 ++-- 8 files changed, 39 insertions(+), 34 deletions(-) (limited to 'os/hal') diff --git a/os/hal/ports/LPC/LPC214x/hal_spi_lld.h b/os/hal/ports/LPC/LPC214x/hal_spi_lld.h index 070567dde..49e29bdf6 100644 --- a/os/hal/ports/LPC/LPC214x/hal_spi_lld.h +++ b/os/hal/ports/LPC/LPC214x/hal_spi_lld.h @@ -96,24 +96,42 @@ typedef struct { /** * @brief Operation complete callback or @p NULL. */ - spicallback_t end_cb; - /* End of the mandatory fields.*/ + spicallback_t end_cb; +#if (SPI_SELECT_MODE == SPI_SELECT_MODE_LINE) || defined(__DOXYGEN__) + /** + * @brief The chip select line. + */ + ioline_t ssline; +#endif +#if (SPI_SELECT_MODE == SPI_SELECT_MODE_PORT) || defined(__DOXYGEN__) /** - * @brief The chip select line port. + * @brief The chip select port. */ - ioportid_t ssport; + ioportid_t ssport; /** - * @brief The chip select line pad number. + * @brief The chip select port mask. */ - uint16_t sspad; + ioportmask_t ssmask; +#endif +#if (SPI_SELECT_MODE == SPI_SELECT_MODE_PAD) || defined(__DOXYGEN__) + /** + * @brief The chip select port. + */ + ioportid_t ssport; + /** + * @brief The chip select pad number. + */ + uint_fast8_t sspad; +#endif + /* End of the mandatory fields.*/ /** * @brief SSP CR0 initialization data. */ - uint16_t cr0; + uint16_t cr0; /** * @brief SSP CPSR initialization data. */ - uint32_t cpsr; + uint32_t cpsr; } SPIConfig; /** diff --git a/os/hal/ports/STM32/LLD/DMAv3/notes.txt b/os/hal/ports/STM32/LLD/DMAv3/notes.txt index a4e14d38d..556a2cc72 100644 --- a/os/hal/ports/STM32/LLD/DMAv3/notes.txt +++ b/os/hal/ports/STM32/LLD/DMAv3/notes.txt @@ -1,20 +1,14 @@ -STM32 DMAv2 driver. +STM32 DMAv3 driver. Driver capability: -- The driver supports the STM32 enhanced DMA controller found on F2, F4 and - F7 sub-families. -- Support for automatic the channel selection. +- The driver supports the STM32 enhanced DMA controller found on H7 sub-family. - Support for cache flushing and invalidation. The file registry must export: -STM32_ADVANCED_DMA - TRUE not used by the DMA drivers but other - drivers use it to enable checks on DMA - channels. Probably will be removed in the - future. STM32_HAS_DMAx - Support for DMA unit "x" (1..2). STM32_DMAx_CHn_HANDLER - Vector name for channel "n" (0..7). -STM32_DMAn_CHx_NUMBER - Vector number for channel "n" (0..7). +STM32_DMAx_CHn_NUMBER - Vector number for channel "n" (0..7). STM32_DMA_CACHE_HANDLING - TRUE if the device requires explicit cache handling on DMA buffers. \ No newline at end of file diff --git a/os/hal/ports/STM32/LLD/DMAv3/stm32_dma.c b/os/hal/ports/STM32/LLD/DMAv3/stm32_dma.c index ac1d71964..698fd21b8 100644 --- a/os/hal/ports/STM32/LLD/DMAv3/stm32_dma.c +++ b/os/hal/ports/STM32/LLD/DMAv3/stm32_dma.c @@ -15,7 +15,7 @@ */ /** - * @file DMAv2/stm32_dma.c + * @file DMAv3/stm32_dma.c * @brief Enhanced DMA helper driver code. * * @addtogroup STM32_DMA diff --git a/os/hal/ports/STM32/LLD/DMAv3/stm32_dma.h b/os/hal/ports/STM32/LLD/DMAv3/stm32_dma.h index 9c4302cc4..09c586b31 100644 --- a/os/hal/ports/STM32/LLD/DMAv3/stm32_dma.h +++ b/os/hal/ports/STM32/LLD/DMAv3/stm32_dma.h @@ -15,7 +15,7 @@ */ /** - * @file DMAv2/stm32_dma.h + * @file DMAv3/stm32_dma.h * @brief Enhanced-DMA helper driver header. * * @addtogroup STM32_DMA @@ -29,13 +29,6 @@ /* Driver constants. */ /*===========================================================================*/ -/** - * @brief DMA capability. - * @details if @p TRUE then the DMA is able of burst transfers, FIFOs, - * scatter gather and other advanced features. - */ -#define STM32_DMA_ADVANCED TRUE - /** * @brief Total number of DMA streams. * @details This is the total number of streams among all the DMA units. diff --git a/os/hal/ports/STM32/LLD/SPIv1/hal_spi_lld.h b/os/hal/ports/STM32/LLD/SPIv1/hal_spi_lld.h index b2755f31b..c237bca4b 100644 --- a/os/hal/ports/STM32/LLD/SPIv1/hal_spi_lld.h +++ b/os/hal/ports/STM32/LLD/SPIv1/hal_spi_lld.h @@ -429,7 +429,7 @@ typedef struct { /** * @brief The chip select line. */ - ioportid_t ssline; + ioline_t ssline; #endif #if (SPI_SELECT_MODE == SPI_SELECT_MODE_PORT) || defined(__DOXYGEN__) /** @@ -439,7 +439,7 @@ typedef struct { /** * @brief The chip select port mask. */ - uint8fast_t ssmask; + ioportmask_t ssmask; #endif #if (SPI_SELECT_MODE == SPI_SELECT_MODE_PAD) || defined(__DOXYGEN__) /** diff --git a/os/hal/ports/STM32/LLD/SPIv2/hal_spi_lld.h b/os/hal/ports/STM32/LLD/SPIv2/hal_spi_lld.h index 99587c8fe..1c7a5f4b4 100644 --- a/os/hal/ports/STM32/LLD/SPIv2/hal_spi_lld.h +++ b/os/hal/ports/STM32/LLD/SPIv2/hal_spi_lld.h @@ -429,7 +429,7 @@ typedef struct { /** * @brief The chip select line. */ - ioportid_t ssline; + ioline_t ssline; #endif #if (SPI_SELECT_MODE == SPI_SELECT_MODE_PORT) || defined(__DOXYGEN__) /** @@ -439,7 +439,7 @@ typedef struct { /** * @brief The chip select port mask. */ - uint8fast_t ssmask; + ioportmask_t ssmask; #endif #if (SPI_SELECT_MODE == SPI_SELECT_MODE_PAD) || defined(__DOXYGEN__) /** diff --git a/os/hal/ports/STM32/LLD/SPIv3/hal_spi_lld.h b/os/hal/ports/STM32/LLD/SPIv3/hal_spi_lld.h index a13e27ff3..fa1c7ce84 100644 --- a/os/hal/ports/STM32/LLD/SPIv3/hal_spi_lld.h +++ b/os/hal/ports/STM32/LLD/SPIv3/hal_spi_lld.h @@ -333,7 +333,7 @@ typedef struct { /** * @brief The chip select line. */ - ioportid_t ssline; + ioline_t ssline; #endif #if (SPI_SELECT_MODE == SPI_SELECT_MODE_PORT) || defined(__DOXYGEN__) /** @@ -343,7 +343,7 @@ typedef struct { /** * @brief The chip select port mask. */ - uint8fast_t ssmask; + ioportmask_t ssmask; #endif #if (SPI_SELECT_MODE == SPI_SELECT_MODE_PAD) || defined(__DOXYGEN__) /** diff --git a/os/hal/templates/hal_spi_lld.h b/os/hal/templates/hal_spi_lld.h index c209a3dd4..6f4b63bfa 100644 --- a/os/hal/templates/hal_spi_lld.h +++ b/os/hal/templates/hal_spi_lld.h @@ -84,7 +84,7 @@ typedef struct { /** * @brief The chip select line. */ - ioportid_t ssline; + ioline_t ssline; #endif #if (SPI_SELECT_MODE == SPI_SELECT_MODE_PORT) || defined(__DOXYGEN__) /** @@ -94,7 +94,7 @@ typedef struct { /** * @brief The chip select port mask. */ - uint8fast_t ssmask; + ioportmask_t ssmask; #endif #if (SPI_SELECT_MODE == SPI_SELECT_MODE_PAD) || defined(__DOXYGEN__) /** -- cgit v1.2.3