This is an automated email from the ASF dual-hosted git repository. linguini1 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
commit 2fce07fe1ccc295ffeec3d63dee2de8dcc9d4b89 Author: raiden00pl <[email protected]> AuthorDate: Mon May 11 11:15:41 2026 +0200 testing/drivertest_pwm: remove references to CONFIG_PWM_MULTICHAN remove references to CONFIG_PWM_MULTICHAN Signed-off-by: raiden00pl <[email protected]> --- testing/drivers/drivertest/drivertest_pwm.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/testing/drivers/drivertest/drivertest_pwm.c b/testing/drivers/drivertest/drivertest_pwm.c index 3dd3bae64..7b08f9a24 100644 --- a/testing/drivers/drivertest/drivertest_pwm.c +++ b/testing/drivers/drivertest/drivertest_pwm.c @@ -164,11 +164,11 @@ static void parse_commandline(FAR struct pwm_state_s *pwm_state, int argc, OPTARG_TO_VALUE(converted, uint32_t, 10); if (converted < 0) { - printf("Count must be non-negative: %ld\n", converted); + printf("Count must be non-negative: %d\n", converted); pwm_help(argv[0], pwm_state, EXIT_FAILURE); } - pwm_state->count = (uint32_t)value; + pwm_state->count = (uint32_t)converted; break; #endif case 'f': @@ -223,9 +223,7 @@ static void drivertest_pwm(FAR void **state) { int fd; int ret; -#ifdef CONFIG_PWM_MULTICHAN int i; -#endif struct pwm_info_s info; FAR struct pwm_state_s *pwm_state; pwm_state = (FAR struct pwm_state_s *)*state; @@ -241,18 +239,14 @@ static void drivertest_pwm(FAR void **state) info.frequency = pwm_state->freq; -#ifdef CONFIG_PWM_MULTICHAN for (i = 0; i < CONFIG_PWM_NCHANNELS; i++) { info.channels[i].channel = i + 1; info.channels[i].duty = b16divi(uitoub16(pwm_state->duty), 100); } -#else - info.duty = b16divi(uitoub16(pwm_state->duty), 100); -#endif #ifdef CONFIG_PWM_PULSECOUNT - info.count = pwm_state.count; + info.channels[0].count = pwm_state->count; #endif ret = ioctl(fd, PWMIOC_SETCHARACTERISTICS, @@ -271,7 +265,7 @@ static void drivertest_pwm(FAR void **state) */ #ifdef CONFIG_PWM_PULSECOUNT - if (info.count == 0) + if (info.channels[0].count == 0) #endif { /* Wait for the specified duration */
