Merge pull request #3343 from chengxiaohu/master
Add DMA for ADC driver, and other little update.
This commit is contained in:
commit
8d309ed533
@ -157,12 +157,12 @@ extern "C" {
|
||||
#define SPI1_RX_DMA_INSTANCE DMA2_Stream0
|
||||
#define SPI1_RX_DMA_CHANNEL DMA_CHANNEL_3
|
||||
#define SPI1_RX_DMA_IRQ DMA2_Stream0_IRQn
|
||||
#elif defined(BSP_SPI4_TX_USING_DMA) && !defined(SPI4_TX_DMA_INSTANCE)
|
||||
#define SPI4_DMA_TX_IRQHandler DMA2_Stream0_IRQHandler
|
||||
#define SPI4_TX_DMA_RCC RCC_AHB1ENR_DMA2EN
|
||||
#define SPI4_TX_DMA_INSTANCE DMA2_Stream0
|
||||
#define SPI4_TX_DMA_CHANNEL DMA_CHANNEL_4
|
||||
#define SPI4_TX_DMA_IRQ DMA2_Stream0_IRQn
|
||||
#elif defined(BSP_SPI4_RX_USING_DMA) && !defined(SPI4_RX_DMA_INSTANCE)
|
||||
#define SPI4_DMA_RX_IRQHandler DMA2_Stream0_IRQHandler
|
||||
#define SPI4_RX_DMA_RCC RCC_AHB1ENR_DMA2EN
|
||||
#define SPI4_RX_DMA_INSTANCE DMA2_Stream0
|
||||
#define SPI4_RX_DMA_CHANNEL DMA_CHANNEL_4
|
||||
#define SPI4_RX_DMA_IRQ DMA2_Stream0_IRQn
|
||||
#endif
|
||||
|
||||
/* DMA2 stream1 */
|
||||
@ -208,12 +208,12 @@ extern "C" {
|
||||
#define SPI1_TX_DMA_INSTANCE DMA2_Stream3
|
||||
#define SPI1_TX_DMA_CHANNEL DMA_CHANNEL_3
|
||||
#define SPI1_TX_DMA_IRQ DMA2_Stream3_IRQn
|
||||
#elif defined(BSP_SPI4_TX_USING_DMA) && !defined(SPI4_TX_DMA_INSTANCE)
|
||||
#define SPI4_DMA_TX_IRQHandler DMA2_Stream3_IRQHandler
|
||||
#define SPI4_TX_DMA_RCC RCC_AHB1ENR_DMA2EN
|
||||
#define SPI4_TX_DMA_INSTANCE DMA2_Stream3
|
||||
#define SPI4_TX_DMA_CHANNEL DMA_CHANNEL_5
|
||||
#define SPI4_TX_DMA_IRQ DMA2_Stream3_IRQn
|
||||
#elif defined(BSP_SPI4_RX_USING_DMA) && !defined(SPI4_RX_DMA_INSTANCE)
|
||||
#define SPI4_DMA_RX_IRQHandler DMA2_Stream3_IRQHandler
|
||||
#define SPI4_RX_DMA_RCC RCC_AHB1ENR_DMA2EN
|
||||
#define SPI4_RX_DMA_INSTANCE DMA2_Stream3
|
||||
#define SPI4_RX_DMA_CHANNEL DMA_CHANNEL_5
|
||||
#define SPI4_RX_DMA_IRQ DMA2_Stream3_IRQn
|
||||
#endif
|
||||
|
||||
/* DMA2 stream4 */
|
||||
|
@ -61,6 +61,17 @@ extern "C" {
|
||||
#endif /* PWM5_CONFIG */
|
||||
#endif /* BSP_USING_PWM5 */
|
||||
|
||||
#ifdef BSP_USING_PWM9
|
||||
#ifndef PWM9_CONFIG
|
||||
#define PWM9_CONFIG \
|
||||
{ \
|
||||
.tim_handle.Instance = TIM9, \
|
||||
.name = "pwm9", \
|
||||
.channel = 0 \
|
||||
}
|
||||
#endif /* PWM9_CONFIG */
|
||||
#endif /* BSP_USING_PWM9 */
|
||||
|
||||
#ifdef BSP_USING_PWM12
|
||||
#ifndef PWM12_CONFIG
|
||||
#define PWM12_CONFIG \
|
||||
|
@ -27,6 +27,17 @@ extern "C" {
|
||||
}
|
||||
#endif /* TIM_DEV_INFO_CONFIG */
|
||||
|
||||
#ifdef BSP_USING_TIM3
|
||||
#ifndef TIM3_CONFIG
|
||||
#define TIM3_CONFIG \
|
||||
{ \
|
||||
.tim_handle.Instance = TIM3, \
|
||||
.tim_irqn = TIM3_IRQn, \
|
||||
.name = "timer3", \
|
||||
}
|
||||
#endif /* TIM3_CONFIG */
|
||||
#endif /* BSP_USING_TIM3 */
|
||||
|
||||
#ifdef BSP_USING_TIM11
|
||||
#ifndef TIM11_CONFIG
|
||||
#define TIM11_CONFIG \
|
||||
|
@ -254,6 +254,11 @@ void turn_on_lcd_backlight(void)
|
||||
|
||||
rt_pin_write(LCD_DISP_GPIO_NUM, PIN_HIGH);
|
||||
rt_pin_write(LCD_BL_GPIO_NUM, PIN_HIGH);
|
||||
}
|
||||
#else
|
||||
void turn_on_lcd_backlight(void)
|
||||
{
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -712,6 +712,9 @@ menu "Using USB"
|
||||
config RT_VCOM_TASK_STK_SIZE
|
||||
int "virtual com thread stack size"
|
||||
default 512
|
||||
config RT_CDC_RX_BUFSIZE
|
||||
int "virtual com rx buffer size"
|
||||
default 128
|
||||
config RT_VCOM_TX_USE_DMA
|
||||
bool "Enable to use dma for vcom tx"
|
||||
default n
|
||||
|
@ -28,7 +28,11 @@
|
||||
#define VCOM_TX_TIMEOUT 1000
|
||||
#endif /*RT_VCOM_TX_TIMEOUT*/
|
||||
|
||||
#ifdef RT_CDC_RX_BUFSIZE
|
||||
#define CDC_RX_BUFSIZE RT_CDC_RX_BUFSIZE
|
||||
#else
|
||||
#define CDC_RX_BUFSIZE 128
|
||||
#endif
|
||||
#define CDC_MAX_PACKET_SIZE 64
|
||||
#define VCOM_DEVICE "vcom"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user