Skip to content

Commit

Permalink
arch:risc-v:hpm6750:add pwm driver apache#16
Browse files Browse the repository at this point in the history
- add  pwm driver
Signed-off-by: Runcheng Lu <runcheng.lu@hpmicro.com>
  • Loading branch information
RCSN committed Apr 14, 2023
1 parent 4478d9b commit 8ff1575
Show file tree
Hide file tree
Showing 9 changed files with 703 additions and 76 deletions.
36 changes: 35 additions & 1 deletion arch/risc-v/src/hpmicro/hpm6750/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1257,7 +1257,7 @@ config HPM_ADC3
int
default 9
depends on ADC3_RES_8BIT

config HPM_ADC3_RES
int
default 11
Expand Down Expand Up @@ -1293,5 +1293,39 @@ config HPM_ADC3
endchoice
# Endi Of Resolution Setting
endmenu # ADC3 device driver options

config HPM_PWM_DRV
bool
default n

config HPM6750_PWM0
bool "PWM0"
default n
select HPM_PWM_DRV

config HPM6750_PWM1
bool "PWM1"
default n
select HPM_PWM_DRV

config HPM6750_PWM2
bool "PWM2"
default n
select HPM_PWM_DRV

config HPM6750_PWM3
bool "PWM3"
default n
select HPM_PWM_DRV

config HPM_PWM_MULTICHAN
bool "PWM Multiple Output Channels"
default n
depends on HPM_PWM_DRV
select ARCH_HAVE_PWM_MULTICHAN
---help---
Specifies that the PWM driver supports multiple output
channels per timer.

endmenu

2 changes: 1 addition & 1 deletion arch/risc-v/src/hpmicro/hpm6750/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ CHIP_CSRCS += hpmicro$(DELIM)hpm6750$(DELIM)hpm_spi.c hpmicro$(DELIM)hpm6750$(DE
CHIP_CSRCS += hpmicro$(DELIM)hpm6750$(DELIM)hpm_i2c_slave.c hpmicro$(DELIM)hpm6750$(DELIM)hpm_i2c.c
CHIP_CSRCS += hpmicro$(DELIM)hpm6750$(DELIM)hpm_rtc_lowerhalf.c
CHIP_CSRCS += hpmicro$(DELIM)hpm6750$(DELIM)hpm_tim_lowerhalf.c
CHIP_CSRCS += hpmicro$(DELIM)hpm6750$(DELIM)hpm_pwm_lowerhalf.c
ifeq ($(CONFIG_HPM_CAN_CHARDRIVER),y)
CHIP_CSRCS += hpmicro$(DELIM)hpm6750$(DELIM)hpm_can.c
endif
Expand All @@ -44,4 +45,3 @@ endif
ifeq ($(CONFIG_HPM_ADC16_DRV),y)
CHIP_CSRCS += hpmicro$(DELIM)hpm6750$(DELIM)hpm_adc16.c
endif

0 comments on commit 8ff1575

Please sign in to comment.