Skip to content

Commit

Permalink
tests: drivers: pwm: pwm_api: Enable pwm test for intel blinky
Browse files Browse the repository at this point in the history
Enable pwm api test for intel blinky on rpl_crb board.

Signed-off-by: Anisetti Avinash Krishna <[email protected]>
  • Loading branch information
akanisetti authored and jhedberg committed Jul 12, 2023
1 parent 1fa3416 commit c9cd273
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions boards/x86/rpl_crb/rpl_crb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ supported:
- smbus
- watchdog
- rtc
- pwm
testing:
ignore_tags:
- net
Expand Down
8 changes: 8 additions & 0 deletions tests/drivers/pwm/pwm_api/src/test_pwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
#elif DT_HAS_COMPAT_STATUS_OKAY(nxp_kinetis_ftm_pwm)
#define PWM_DEV_NODE DT_INST(0, nxp_kinetis_ftm_pwm)

#elif DT_HAS_COMPAT_STATUS_OKAY(intel_blinky_pwm)
#define PWM_DEV_NODE DT_INST(0, intel_blinky_pwm)

#else
#error "Define a PWM device"
#endif
Expand All @@ -58,6 +61,11 @@
#define DEFAULT_PULSE_CYCLE 512
#define DEFAULT_PERIOD_NSEC 2000000
#define DEFAULT_PULSE_NSEC 500000
#elif DT_HAS_COMPAT_STATUS_OKAY(intel_blinky_pwm)
#define DEFAULT_PERIOD_CYCLE 32768
#define DEFAULT_PULSE_CYCLE 16384
#define DEFAULT_PERIOD_NSEC 2000000
#define DEFAULT_PULSE_NSEC 500000
#else
#define DEFAULT_PERIOD_CYCLE 64000
#define DEFAULT_PULSE_CYCLE 32000
Expand Down
1 change: 1 addition & 0 deletions tests/drivers/pwm/pwm_api/testcase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ tests:
- userspace
filter: dt_alias_exists("pwm-0") or dt_alias_exists("pwm-1") or dt_alias_exists("pwm-2")
or dt_alias_exists("pwm-3") or dt_compat_enabled("st,stm32-pwm")
or dt_compat_enabled("intel,blinky-pwm")
depends_on: pwm

0 comments on commit c9cd273

Please sign in to comment.