Updated all platforms.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1480 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
gdisirio 2009-12-29 13:15:29 +00:00
parent 26790f9fb0
commit dc403a00e8
17 changed files with 175 additions and 88 deletions

View File

@ -62,8 +62,8 @@
/* Derived constants and error checks. */ /* Derived constants and error checks. */
/*===========================================================================*/ /*===========================================================================*/
#if !CH_USE_SEMAPHORES #if !CH_USE_SEMAPHORES || !CH_USE_EVENTS
#error "CAN driver requires CH_USE_SEMAPHORES" #error "the ADC driver requires CH_USE_SEMAPHORES and CH_USE_EVENTS"
#endif #endif
/*===========================================================================*/ /*===========================================================================*/

View File

@ -30,7 +30,7 @@
#if CH_HAL_USE_ADC || defined(__DOXYGEN__) #if CH_HAL_USE_ADC || defined(__DOXYGEN__)
/*===========================================================================*/ /*===========================================================================*/
/* Low Level Driver exported variables. */ /* Driver exported variables. */
/*===========================================================================*/ /*===========================================================================*/
/** @brief ADC1 driver identifier.*/ /** @brief ADC1 driver identifier.*/
@ -39,15 +39,15 @@ ADCDriver ADCD1;
#endif #endif
/*===========================================================================*/ /*===========================================================================*/
/* Low Level Driver local variables. */ /* Driver local variables. */
/*===========================================================================*/ /*===========================================================================*/
/*===========================================================================*/ /*===========================================================================*/
/* Low Level Driver local functions. */ /* Driver local functions. */
/*===========================================================================*/ /*===========================================================================*/
/*===========================================================================*/ /*===========================================================================*/
/* Low Level Driver interrupt handlers. */ /* Driver interrupt handlers. */
/*===========================================================================*/ /*===========================================================================*/
#if USE_STM32_ADC1 || defined(__DOXYGEN__) #if USE_STM32_ADC1 || defined(__DOXYGEN__)
@ -103,7 +103,7 @@ CH_IRQ_HANDLER(Vector6C) {
#endif #endif
/*===========================================================================*/ /*===========================================================================*/
/* Low Level Driver exported functions. */ /* Driver exported functions. */
/*===========================================================================*/ /*===========================================================================*/
/** /**

View File

@ -55,27 +55,6 @@
#define ADC_CHANNEL_SENSOR 16 /**< @brief Internal temperature sensor.*/ #define ADC_CHANNEL_SENSOR 16 /**< @brief Internal temperature sensor.*/
#define ADC_CHANNEL_VREFINT 17 /**< @brief Internal reference. */ #define ADC_CHANNEL_VREFINT 17 /**< @brief Internal reference. */
#define ADC_SQR1_NUM_CH(n) (((n) - 1) << 20)
#define ADC_SQR3_SQ0_N(n) ((n) << 0)
#define ADC_SQR3_SQ1_N(n) ((n) << 5)
#define ADC_SQR3_SQ2_N(n) ((n) << 10)
#define ADC_SQR3_SQ3_N(n) ((n) << 15)
#define ADC_SQR3_SQ4_N(n) ((n) << 20)
#define ADC_SQR3_SQ5_N(n) ((n) << 25)
#define ADC_SQR2_SQ6_N(n) ((n) << 0)
#define ADC_SQR2_SQ7_N(n) ((n) << 5)
#define ADC_SQR2_SQ8_N(n) ((n) << 10)
#define ADC_SQR2_SQ9_N(n) ((n) << 15)
#define ADC_SQR2_SQ10_N(n) ((n) << 20)
#define ADC_SQR2_SQ11_N(n) ((n) << 25)
#define ADC_SQR1_SQ13_N(n) ((n) << 0)
#define ADC_SQR1_SQ14_N(n) ((n) << 5)
#define ADC_SQR1_SQ15_N(n) ((n) << 10)
#define ADC_SQR1_SQ16_N(n) ((n) << 15)
/*===========================================================================*/ /*===========================================================================*/
/* Driver pre-compile time settings. */ /* Driver pre-compile time settings. */
/*===========================================================================*/ /*===========================================================================*/
@ -117,10 +96,6 @@
/* Derived constants and error checks. */ /* Derived constants and error checks. */
/*===========================================================================*/ /*===========================================================================*/
#if !CH_USE_SEMAPHORES
#error "the ADC driver requires CH_USE_SEMAPHORES"
#endif
/*===========================================================================*/ /*===========================================================================*/
/* Driver data structures and types. */ /* Driver data structures and types. */
/*===========================================================================*/ /*===========================================================================*/
@ -253,6 +228,31 @@ typedef struct {
uint32_t ad_dmaprio; uint32_t ad_dmaprio;
} ADCDriver; } ADCDriver;
/*===========================================================================*/
/* Driver macros. */
/*===========================================================================*/
#define ADC_SQR1_NUM_CH(n) (((n) - 1) << 20)
#define ADC_SQR3_SQ0_N(n) ((n) << 0)
#define ADC_SQR3_SQ1_N(n) ((n) << 5)
#define ADC_SQR3_SQ2_N(n) ((n) << 10)
#define ADC_SQR3_SQ3_N(n) ((n) << 15)
#define ADC_SQR3_SQ4_N(n) ((n) << 20)
#define ADC_SQR3_SQ5_N(n) ((n) << 25)
#define ADC_SQR2_SQ6_N(n) ((n) << 0)
#define ADC_SQR2_SQ7_N(n) ((n) << 5)
#define ADC_SQR2_SQ8_N(n) ((n) << 10)
#define ADC_SQR2_SQ9_N(n) ((n) << 15)
#define ADC_SQR2_SQ10_N(n) ((n) << 20)
#define ADC_SQR2_SQ11_N(n) ((n) << 25)
#define ADC_SQR1_SQ13_N(n) ((n) << 0)
#define ADC_SQR1_SQ14_N(n) ((n) << 5)
#define ADC_SQR1_SQ15_N(n) ((n) << 10)
#define ADC_SQR1_SQ16_N(n) ((n) << 15)
/*===========================================================================*/ /*===========================================================================*/
/* External declarations. */ /* External declarations. */
/*===========================================================================*/ /*===========================================================================*/

View File

@ -30,7 +30,7 @@
#if CH_HAL_USE_CAN || defined(__DOXYGEN__) #if CH_HAL_USE_CAN || defined(__DOXYGEN__)
/*===========================================================================*/ /*===========================================================================*/
/* Low Level Driver exported variables. */ /* Driver exported variables. */
/*===========================================================================*/ /*===========================================================================*/
/** @brief ADC1 driver identifier.*/ /** @brief ADC1 driver identifier.*/
@ -39,15 +39,15 @@ CANDriver CAND1;
#endif #endif
/*===========================================================================*/ /*===========================================================================*/
/* Low Level Driver local variables. */ /* Driver local variables. */
/*===========================================================================*/ /*===========================================================================*/
/*===========================================================================*/ /*===========================================================================*/
/* Low Level Driver local functions. */ /* Driver local functions. */
/*===========================================================================*/ /*===========================================================================*/
/*===========================================================================*/ /*===========================================================================*/
/* Low Level Driver interrupt handlers. */ /* Driver interrupt handlers. */
/*===========================================================================*/ /*===========================================================================*/
/* /*
@ -145,7 +145,7 @@ CH_IRQ_HANDLER(Vector98) {
} }
/*===========================================================================*/ /*===========================================================================*/
/* Low Level Driver exported functions. */ /* Driver exported functions. */
/*===========================================================================*/ /*===========================================================================*/
/** /**

View File

@ -29,6 +29,10 @@
#if CH_HAL_USE_CAN || defined(__DOXYGEN__) #if CH_HAL_USE_CAN || defined(__DOXYGEN__)
/*===========================================================================*/
/* Driver constants. */
/*===========================================================================*/
/* /*
* The following macros from the ST header file are replaced with better * The following macros from the ST header file are replaced with better
* equivalents. * equivalents.
@ -38,10 +42,6 @@
#undef CAN_BTR_TS2 #undef CAN_BTR_TS2
#undef CAN_BTR_SJW #undef CAN_BTR_SJW
/*===========================================================================*/
/* Driver constants. */
/*===========================================================================*/
/** /**
* @brief This switch defines whether the driver implementation supports * @brief This switch defines whether the driver implementation supports
* a low power switch mode with automatic an wakeup feature. * a low power switch mode with automatic an wakeup feature.
@ -49,7 +49,7 @@
#define CAN_SUPPORTS_SLEEP TRUE #define CAN_SUPPORTS_SLEEP TRUE
/** /**
* @brief Manimum number of CAN filters. * @brief Minimum number of CAN filters.
*/ */
#if defined(STM32F10X_CL) || defined(__DOXYGEN__) #if defined(STM32F10X_CL) || defined(__DOXYGEN__)
#define CAN_MAX_FILTERS 28 #define CAN_MAX_FILTERS 28
@ -106,10 +106,6 @@
/* Derived constants and error checks. */ /* Derived constants and error checks. */
/*===========================================================================*/ /*===========================================================================*/
#if !CH_USE_SEMAPHORES || !CH_USE_EVENTS
#error "the ADC driver requires CH_USE_SEMAPHORES and CH_USE_EVENTS"
#endif
/*===========================================================================*/ /*===========================================================================*/
/* Driver data structures and types. */ /* Driver data structures and types. */
/*===========================================================================*/ /*===========================================================================*/
@ -297,6 +293,10 @@ typedef struct {
CAN_TypeDef *cd_can; CAN_TypeDef *cd_can;
} CANDriver; } CANDriver;
/*===========================================================================*/
/* Driver macros. */
/*===========================================================================*/
/*===========================================================================*/ /*===========================================================================*/
/* External declarations. */ /* External declarations. */
/*===========================================================================*/ /*===========================================================================*/

View File

@ -30,11 +30,11 @@
#define AIRCR_VECTKEY 0x05FA0000 #define AIRCR_VECTKEY 0x05FA0000
/*===========================================================================*/ /*===========================================================================*/
/* Low Level Driver exported variables. */ /* Driver exported variables. */
/*===========================================================================*/ /*===========================================================================*/
/*===========================================================================*/ /*===========================================================================*/
/* Low Level Driver local variables. */ /* Driver local variables. */
/*===========================================================================*/ /*===========================================================================*/
/** /**
@ -57,15 +57,15 @@ const STM32GPIOConfig pal_default_config =
}; };
/*===========================================================================*/ /*===========================================================================*/
/* Low Level Driver local functions. */ /* Driver local functions. */
/*===========================================================================*/ /*===========================================================================*/
/*===========================================================================*/ /*===========================================================================*/
/* Low Level Driver interrupt handlers. */ /* Driver interrupt handlers. */
/*===========================================================================*/ /*===========================================================================*/
/*===========================================================================*/ /*===========================================================================*/
/* Low Level Driver exported functions. */ /* Driver exported functions. */
/*===========================================================================*/ /*===========================================================================*/
/** /**

View File

@ -96,6 +96,10 @@
/* Driver data structures and types. */ /* Driver data structures and types. */
/*===========================================================================*/ /*===========================================================================*/
/*===========================================================================*/
/* Driver macros. */
/*===========================================================================*/
/*===========================================================================*/ /*===========================================================================*/
/* External declarations. */ /* External declarations. */
/*===========================================================================*/ /*===========================================================================*/

View File

@ -55,6 +55,26 @@
RCC_APB2ENR_IOPEEN | RCC_APB2ENR_AFIOEN) RCC_APB2ENR_IOPEEN | RCC_APB2ENR_AFIOEN)
#endif #endif
/*===========================================================================*/
/* Driver exported variables. */
/*===========================================================================*/
/*===========================================================================*/
/* Driver local variables. */
/*===========================================================================*/
/*===========================================================================*/
/* Driver local functions. */
/*===========================================================================*/
/*===========================================================================*/
/* Driver interrupt handlers. */
/*===========================================================================*/
/*===========================================================================*/
/* Driver exported functions. */
/*===========================================================================*/
/** /**
* @brief STM32 I/O ports configuration. * @brief STM32 I/O ports configuration.
* @details Ports A-D(E, F, G) clocks enabled, AFIO clock enabled. * @details Ports A-D(E, F, G) clocks enabled, AFIO clock enabled.

View File

@ -30,7 +30,7 @@
#if CH_HAL_USE_PWM || defined(__DOXYGEN__) #if CH_HAL_USE_PWM || defined(__DOXYGEN__)
/*===========================================================================*/ /*===========================================================================*/
/* Low Level Driver exported variables. */ /* Driver exported variables. */
/*===========================================================================*/ /*===========================================================================*/
/** /**
@ -66,11 +66,11 @@ PWMDriver PWMD4;
#endif #endif
/*===========================================================================*/ /*===========================================================================*/
/* Low Level Driver local variables. */ /* Driver local variables. */
/*===========================================================================*/ /*===========================================================================*/
/*===========================================================================*/ /*===========================================================================*/
/* Low Level Driver local functions. */ /* Driver local functions. */
/*===========================================================================*/ /*===========================================================================*/
/** /**
@ -78,7 +78,7 @@ PWMDriver PWMD4;
* *
* @param[in] pwmp pointer to a @p PWMDriver object * @param[in] pwmp pointer to a @p PWMDriver object
*/ */
void stop_channels(PWMDriver *pwmp) { static void stop_channels(PWMDriver *pwmp) {
pwmp->pd_enabled_channels = 0; /* All channels disabled. */ pwmp->pd_enabled_channels = 0; /* All channels disabled. */
pwmp->pd_tim->CCER = 0; /* Outputs disabled. */ pwmp->pd_tim->CCER = 0; /* Outputs disabled. */
@ -115,7 +115,7 @@ static void serve_interrupt(PWMDriver *pwmp) {
} }
/*===========================================================================*/ /*===========================================================================*/
/* Low Level Driver interrupt handlers. */ /* Driver interrupt handlers. */
/*===========================================================================*/ /*===========================================================================*/
#if USE_STM32_PWM1 #if USE_STM32_PWM1
@ -204,7 +204,7 @@ CH_IRQ_HANDLER(VectorB8) {
#endif /* USE_STM32_PWM4 */ #endif /* USE_STM32_PWM4 */
/*===========================================================================*/ /*===========================================================================*/
/* Low Level Driver exported functions. */ /* Driver exported functions. */
/*===========================================================================*/ /*===========================================================================*/
/** /**

View File

@ -204,6 +204,10 @@ typedef struct {
TIM_TypeDef *pd_tim; TIM_TypeDef *pd_tim;
} PWMDriver; } PWMDriver;
/*===========================================================================*/
/* Driver macros. */
/*===========================================================================*/
/*===========================================================================*/ /*===========================================================================*/
/* External declarations. */ /* External declarations. */
/*===========================================================================*/ /*===========================================================================*/

View File

@ -30,26 +30,26 @@
#if CH_HAL_USE_SERIAL || defined(__DOXYGEN__) #if CH_HAL_USE_SERIAL || defined(__DOXYGEN__)
/*===========================================================================*/ /*===========================================================================*/
/* Low Level Driver exported variables. */ /* Driver exported variables. */
/*===========================================================================*/ /*===========================================================================*/
#if USE_STM32_USART1 || defined(__DOXYGEN__)
/** @brief USART1 serial driver identifier.*/ /** @brief USART1 serial driver identifier.*/
#if USE_STM32_USART1 || defined(__DOXYGEN__)
SerialDriver SD1; SerialDriver SD1;
#endif #endif
#if USE_STM32_USART2 || defined(__DOXYGEN__)
/** @brief USART2 serial driver identifier.*/ /** @brief USART2 serial driver identifier.*/
#if USE_STM32_USART2 || defined(__DOXYGEN__)
SerialDriver SD2; SerialDriver SD2;
#endif #endif
#if USE_STM32_USART3 || defined(__DOXYGEN__)
/** @brief USART3 serial driver identifier.*/ /** @brief USART3 serial driver identifier.*/
#if USE_STM32_USART3 || defined(__DOXYGEN__)
SerialDriver SD3; SerialDriver SD3;
#endif #endif
/*===========================================================================*/ /*===========================================================================*/
/* Low Level Driver local variables. */ /* Driver local variables. */
/*===========================================================================*/ /*===========================================================================*/
/** @brief Driver default configuration.*/ /** @brief Driver default configuration.*/
@ -62,7 +62,7 @@ static const SerialDriverConfig default_config =
}; };
/*===========================================================================*/ /*===========================================================================*/
/* Low Level Driver local functions. */ /* Driver local functions. */
/*===========================================================================*/ /*===========================================================================*/
/** /**
@ -173,7 +173,7 @@ static void notify3(void) {
#endif #endif
/*===========================================================================*/ /*===========================================================================*/
/* Low Level Driver interrupt handlers. */ /* Driver interrupt handlers. */
/*===========================================================================*/ /*===========================================================================*/
#if USE_STM32_USART1 || defined(__DOXYGEN__) #if USE_STM32_USART1 || defined(__DOXYGEN__)
@ -210,7 +210,7 @@ CH_IRQ_HANDLER(VectorDC) {
#endif #endif
/*===========================================================================*/ /*===========================================================================*/
/* Low Level Driver exported functions. */ /* Driver exported functions. */
/*===========================================================================*/ /*===========================================================================*/
/** /**

View File

@ -29,6 +29,10 @@
#if CH_HAL_USE_SERIAL || defined(__DOXYGEN__) #if CH_HAL_USE_SERIAL || defined(__DOXYGEN__)
/*===========================================================================*/
/* Driver constants. */
/*===========================================================================*/
/*===========================================================================*/ /*===========================================================================*/
/* Driver pre-compile time settings. */ /* Driver pre-compile time settings. */
/*===========================================================================*/ /*===========================================================================*/
@ -40,7 +44,7 @@
* @note The default is 128 bytes for both the transmission and receive buffers. * @note The default is 128 bytes for both the transmission and receive buffers.
*/ */
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
#define SERIAL_BUFFERS_SIZE 128 #define SERIAL_BUFFERS_SIZE 128
#endif #endif
/** /**
@ -49,7 +53,7 @@
* @note The default is @p FALSE. * @note The default is @p FALSE.
*/ */
#if !defined(USE_STM32_USART1) || defined(__DOXYGEN__) #if !defined(USE_STM32_USART1) || defined(__DOXYGEN__)
#define USE_STM32_USART1 FALSE #define USE_STM32_USART1 FALSE
#endif #endif
/** /**
@ -58,7 +62,7 @@
* @note The default is @p TRUE. * @note The default is @p TRUE.
*/ */
#if !defined(USE_STM32_USART2) || defined(__DOXYGEN__) #if !defined(USE_STM32_USART2) || defined(__DOXYGEN__)
#define USE_STM32_USART2 TRUE #define USE_STM32_USART2 TRUE
#endif #endif
/** /**
@ -67,7 +71,7 @@
* @note The default is @p FALSE. * @note The default is @p FALSE.
*/ */
#if !defined(USE_STM32_USART3) || defined(__DOXYGEN__) #if !defined(USE_STM32_USART3) || defined(__DOXYGEN__)
#define USE_STM32_USART3 FALSE #define USE_STM32_USART3 FALSE
#endif #endif
/** /**
@ -75,7 +79,7 @@
* @note @p BASEPRI_KERNEL >= @p STM32_USART1_PRIORITY > @p PRIORITY_PENDSV. * @note @p BASEPRI_KERNEL >= @p STM32_USART1_PRIORITY > @p PRIORITY_PENDSV.
*/ */
#if !defined(STM32_USART1_PRIORITY) || defined(__DOXYGEN__) #if !defined(STM32_USART1_PRIORITY) || defined(__DOXYGEN__)
#define STM32_USART1_PRIORITY 0xC0 #define STM32_USART1_PRIORITY 0xC0
#endif #endif
/** /**
@ -83,7 +87,7 @@
* @note @p BASEPRI_KERNEL >= @p STM32_USART2_PRIORITY > @p PRIORITY_PENDSV. * @note @p BASEPRI_KERNEL >= @p STM32_USART2_PRIORITY > @p PRIORITY_PENDSV.
*/ */
#if !defined(STM32_USART2_PRIORITY) || defined(__DOXYGEN__) #if !defined(STM32_USART2_PRIORITY) || defined(__DOXYGEN__)
#define STM32_USART2_PRIORITY 0xC0 #define STM32_USART2_PRIORITY 0xC0
#endif #endif
/** /**
@ -91,21 +95,13 @@
* @note @p BASEPRI_KERNEL >= @p STM32_USART3_PRIORITY > @p PRIORITY_PENDSV. * @note @p BASEPRI_KERNEL >= @p STM32_USART3_PRIORITY > @p PRIORITY_PENDSV.
*/ */
#if !defined(STM32_USART3_PRIORITY) || defined(__DOXYGEN__) #if !defined(STM32_USART3_PRIORITY) || defined(__DOXYGEN__)
#define STM32_USART3_PRIORITY 0xC0 #define STM32_USART3_PRIORITY 0xC0
#endif #endif
/*===========================================================================*/ /*===========================================================================*/
/* Driver macros. */ /* Derived constants and error checks. */
/*===========================================================================*/ /*===========================================================================*/
/*
* Extra USARTs definitions here (missing from the ST header file).
*/
#define USART_CR2_STOP1_BITS (0 << 12) /**< @brief CR2 1 stop bit value.*/
#define USART_CR2_STOP0P5_BITS (1 << 12) /**< @brief CR2 0.5 stop bit value.*/
#define USART_CR2_STOP2_BITS (2 << 12) /**< @brief CR2 2 stop bit value.*/
#define USART_CR2_STOP1P5_BITS (3 << 12) /**< @brief CR2 1.5 stop bit value.*/
/*===========================================================================*/ /*===========================================================================*/
/* Driver data structures and types. */ /* Driver data structures and types. */
/*===========================================================================*/ /*===========================================================================*/
@ -165,6 +161,18 @@ typedef struct {
uint16_t cr3; uint16_t cr3;
} SerialDriverConfig; } SerialDriverConfig;
/*===========================================================================*/
/* Driver macros. */
/*===========================================================================*/
/*
* Extra USARTs definitions here (missing from the ST header file).
*/
#define USART_CR2_STOP1_BITS (0 << 12) /**< @brief CR2 1 stop bit value.*/
#define USART_CR2_STOP0P5_BITS (1 << 12) /**< @brief CR2 0.5 stop bit value.*/
#define USART_CR2_STOP2_BITS (2 << 12) /**< @brief CR2 2 stop bit value.*/
#define USART_CR2_STOP1P5_BITS (3 << 12) /**< @brief CR2 1.5 stop bit value.*/
/*===========================================================================*/ /*===========================================================================*/
/* External declarations. */ /* External declarations. */
/*===========================================================================*/ /*===========================================================================*/

View File

@ -30,28 +30,28 @@
#if CH_HAL_USE_SPI || defined(__DOXYGEN__) #if CH_HAL_USE_SPI || defined(__DOXYGEN__)
/*===========================================================================*/ /*===========================================================================*/
/* Low Level Driver exported variables. */ /* Driver exported variables. */
/*===========================================================================*/ /*===========================================================================*/
#if USE_STM32_SPI1 || defined(__DOXYGEN__)
/** @brief SPI1 driver identifier.*/ /** @brief SPI1 driver identifier.*/
#if USE_STM32_SPI1 || defined(__DOXYGEN__)
SPIDriver SPID1; SPIDriver SPID1;
#endif #endif
#if USE_STM32_SPI2 || defined(__DOXYGEN__)
/** @brief SPI2 driver identifier.*/ /** @brief SPI2 driver identifier.*/
#if USE_STM32_SPI2 || defined(__DOXYGEN__)
SPIDriver SPID2; SPIDriver SPID2;
#endif #endif
/*===========================================================================*/ /*===========================================================================*/
/* Low Level Driver local variables. */ /* Driver local variables. */
/*===========================================================================*/ /*===========================================================================*/
static uint16_t dummyrx; static uint16_t dummyrx;
static uint16_t dummytx; static uint16_t dummytx;
/*===========================================================================*/ /*===========================================================================*/
/* Low Level Driver local functions. */ /* Driver local functions. */
/*===========================================================================*/ /*===========================================================================*/
static void spi_stop(SPIDriver *spip) { static void spi_stop(SPIDriver *spip) {
@ -103,7 +103,7 @@ static void spi_start_wait(SPIDriver *spip, size_t n,
} }
/*===========================================================================*/ /*===========================================================================*/
/* Low Level Driver interrupt handlers. */ /* Driver interrupt handlers. */
/*===========================================================================*/ /*===========================================================================*/
#if USE_STM32_SPI1 || defined(__DOXYGEN__) #if USE_STM32_SPI1 || defined(__DOXYGEN__)
@ -173,7 +173,7 @@ CH_IRQ_HANDLER(Vector7C) {
#endif #endif
/*===========================================================================*/ /*===========================================================================*/
/* Low Level Driver exported functions. */ /* Driver exported functions. */
/*===========================================================================*/ /*===========================================================================*/
/** /**

View File

@ -180,6 +180,10 @@ typedef struct {
uint32_t spd_dmaprio; uint32_t spd_dmaprio;
} SPIDriver; } SPIDriver;
/*===========================================================================*/
/* Driver macros. */
/*===========================================================================*/
/*===========================================================================*/ /*===========================================================================*/
/* External declarations. */ /* External declarations. */
/*===========================================================================*/ /*===========================================================================*/

View File

@ -27,11 +27,31 @@
#include "ch.h" #include "ch.h"
#include "hal.h" #include "hal.h"
/*===========================================================================*/
/* Driver exported variables. */
/*===========================================================================*/
/*===========================================================================*/
/* Driver local variables. */
/*===========================================================================*/
static cnt_t dmacnt1; static cnt_t dmacnt1;
#if defined(STM32F10X_HD) || defined (STM32F10X_CL) #if defined(STM32F10X_HD) || defined (STM32F10X_CL)
static cnt_t dmacnt2; static cnt_t dmacnt2;
#endif #endif
/*===========================================================================*/
/* Driver local functions. */
/*===========================================================================*/
/*===========================================================================*/
/* Driver interrupt handlers. */
/*===========================================================================*/
/*===========================================================================*/
/* Driver exported functions. */
/*===========================================================================*/
/** /**
* @brief STM32 DMA helper initialization. * @brief STM32 DMA helper initialization.
*/ */

View File

@ -27,6 +27,10 @@
#ifndef _STM32_DMA_H_ #ifndef _STM32_DMA_H_
#define _STM32_DMA_H_ #define _STM32_DMA_H_
/*===========================================================================*/
/* Driver constants. */
/*===========================================================================*/
/** @brief DMA1 identifier.*/ /** @brief DMA1 identifier.*/
#define DMA1_ID 0 #define DMA1_ID 0
@ -35,6 +39,26 @@
#define DMA2_ID 1 #define DMA2_ID 1
#endif #endif
/*===========================================================================*/
/* Driver pre-compile time settings. */
/*===========================================================================*/
/*===========================================================================*/
/* Derived constants and error checks. */
/*===========================================================================*/
/*===========================================================================*/
/* Driver data structures and types. */
/*===========================================================================*/
/*===========================================================================*/
/* Driver macros. */
/*===========================================================================*/
/*===========================================================================*/
/* External declarations. */
/*===========================================================================*/
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif

View File

@ -3,8 +3,11 @@
***************************************************************************** *****************************************************************************
*** 1.3.7 *** *** 1.3.7 ***
- FIX: Fixed duplicated definition of SPI_USE_MUTUAL_EXCLUSION (bug 2922495).
- FIX: Fixed coverage tool hanging during execution (bug 2921120). - FIX: Fixed coverage tool hanging during execution (bug 2921120).
- FIX: Fixed Linux simulator startup message (bug 2921012). - FIX: Fixed Linux simulator startup message (bug 2921012).
- FIX: Fixed section separators comments into the HAL-related files. Now all
the files should use the same style.
*** 1.3.6 *** *** 1.3.6 ***
- FIX: Fixed missing STM32 PWM low level driver error in platform.mk by - FIX: Fixed missing STM32 PWM low level driver error in platform.mk by