mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-11-09 20:45:41 +08:00
Merge pull request #2486 from wangyq2018/es32f0334
[bsp/es32f0334] add hwtimer driver
This commit is contained in:
7 files changed
+306
-1
No files matched your search
@@ -344,6 +344,14 @@ CONFIG_BSP_USING_UART1=y
|
||||
# CONFIG_BSP_USING_PWM2 is not set
|
||||
# CONFIG_BSP_USING_PWM3 is not set
|
||||
|
||||
#
|
||||
# HWtimer Drivers
|
||||
#
|
||||
# CONFIG_BSP_USING_HWTIMER0 is not set
|
||||
# CONFIG_BSP_USING_HWTIMER1 is not set
|
||||
# CONFIG_BSP_USING_HWTIMER2 is not set
|
||||
# CONFIG_BSP_USING_HWTIMER3 is not set
|
||||
|
||||
#
|
||||
# Onboard Peripheral Drivers
|
||||
#
|
||||
|
||||
@@ -42,6 +42,7 @@ ES-PDS-ES32F0334-V1.1
|
||||
| SPI | 支持 | SPI0/1 |
|
||||
| I2C | 支持 | I2C0/1 |
|
||||
| PWM | 支持 | PWM0/1/2/3 |
|
||||
| TIMER | 支持 | TIMER0/1/2/3 |
|
||||
|
||||
更多详细信息请咨询[上海东软载波微电子技术支持](http://www.essemi.com/)
|
||||
|
||||
|
||||
@@ -63,8 +63,31 @@ menu "Hardware Drivers Config"
|
||||
config BSP_USING_PWM3
|
||||
bool "Using PWM3 PC06/PC07"
|
||||
select RT_USING_PWM
|
||||
default n
|
||||
default n
|
||||
endmenu
|
||||
|
||||
menu "HWtimer Drivers"
|
||||
config BSP_USING_HWTIMER0
|
||||
bool "Using timer0"
|
||||
select RT_USING_HWTIMER
|
||||
default n
|
||||
|
||||
config BSP_USING_HWTIMER1
|
||||
bool "Using timer1"
|
||||
select RT_USING_HWTIMER
|
||||
default n
|
||||
|
||||
config BSP_USING_HWTIMER2
|
||||
bool "Using timer2"
|
||||
select RT_USING_HWTIMER
|
||||
default n
|
||||
|
||||
config BSP_USING_HWTIMER3
|
||||
bool "Using timer3"
|
||||
select RT_USING_HWTIMER
|
||||
default n
|
||||
endmenu
|
||||
|
||||
endmenu
|
||||
|
||||
menu "Onboard Peripheral Drivers"
|
||||
|
||||
@@ -31,6 +31,10 @@ if GetDepend('BSP_USING_SPI_FLASH'):
|
||||
if GetDepend('BSP_USING_PWM0') or GetDepend('BSP_USING_PWM1') or GetDepend('BSP_USING_PWM2') or GetDepend('BSP_USING_PWM3'):
|
||||
src += ['drv_pwm.c']
|
||||
|
||||
# add hwtimer driver code
|
||||
if GetDepend('BSP_USING_HWTIMER0') or GetDepend('BSP_USING_HWTIMER1') or GetDepend('BSP_USING_HWTIMER2') or GetDepend('BSP_USING_HWTIMER3'):
|
||||
src += ['drv_hwtimer.c']
|
||||
|
||||
CPPPATH = [cwd]
|
||||
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
|
||||
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2018 Shanghai Eastsoft Microelectronics Co., Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2019-3-19 wangyq the first version
|
||||
*/
|
||||
|
||||
#ifndef DRV_HWTIMER_H__
|
||||
#define DRV_HWTIMER_H__
|
||||
|
||||
int rt_hw_hwtimer_init(void);
|
||||
|
||||
#endif
|
||||
@@ -172,6 +172,9 @@
|
||||
/* PWM Drivers */
|
||||
|
||||
|
||||
/* HWtimer Drivers */
|
||||
|
||||
|
||||
/* Onboard Peripheral Drivers */
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user