tests: drivers: test fake-pwm on native_sim for pwm_api test
create native_sim overlay to use fake pwm for test of pwm_api Signed-off-by: Nathan Olff <nathan@kickmaker.net>
This commit is contained in:
parent
c152453a72
commit
85e8303861
3 changed files with 28 additions and 0 deletions
18
tests/drivers/pwm/pwm_api/boards/native_sim.overlay
Normal file
18
tests/drivers/pwm/pwm_api/boards/native_sim.overlay
Normal file
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
* Copyright (c) 2024 Kickmaker
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/{
|
||||
pwm0: pwm0 {
|
||||
compatible = "zephyr,fake-pwm";
|
||||
status = "okay";
|
||||
#pwm-cells = <2>;
|
||||
frequency = <10000000>;
|
||||
};
|
||||
|
||||
aliases {
|
||||
pwm-0 = &pwm0;
|
||||
};
|
||||
};
|
|
@ -79,6 +79,11 @@
|
|||
#define DEFAULT_PULSE_NSEC 1000000
|
||||
#endif
|
||||
|
||||
#if DT_HAS_COMPAT_STATUS_OKAY(zephyr_fake_pwm)
|
||||
#include <zephyr/fff.h>
|
||||
DEFINE_FFF_GLOBALS;
|
||||
#endif
|
||||
|
||||
#if defined CONFIG_BOARD_SAM_E70_XPLAINED
|
||||
#define DEFAULT_PWM_PORT 2 /* PWM on EXT2 connector, pin 8 */
|
||||
#elif defined CONFIG_PWM_NRFX
|
||||
|
|
|
@ -30,3 +30,8 @@ tests:
|
|||
platform_allow:
|
||||
- frdm_mcxn947/mcxn947/cpu0
|
||||
- frdm_mcxn947/mcxn947/cpu0/qspi
|
||||
drivers.pwm.native_sim:
|
||||
platform_allow:
|
||||
- native_sim
|
||||
integration_platforms:
|
||||
- native_sim
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue