Skip to content

Commit 2ea1285

Browse files
author
Demo User
committed
update rc_test_drivers to support new pwm location
1 parent 4fa8abc commit 2ea1285

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

examples/src/rc_test_drivers.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,16 @@ int main()
3838
printf("ERROR: gpio 3 driver not loaded\n");
3939
} else printf("PASSED: gpio 3\n");
4040

41-
// pwm 1,2
42-
if(access("/sys/class/pwm/pwmchip2/export", F_OK ) != 0){
41+
// pwm 0, 1, 2
42+
if(access("/sys/devices/platform/ocp/48300000.epwmss/48300200.pwm/pwm/", F_OK ) != 0){
43+
printf("ERROR: ti-pwm driver not loaded for hrpwm0\n");
44+
} else printf("PASSED: pwm0\n");
45+
46+
if(access("/sys/devices/platform/ocp/48302000.epwmss/48302200.pwm/pwm/", F_OK ) != 0){
4347
printf("ERROR: ti-pwm driver not loaded for hrpwm1\n");
4448
} else printf("PASSED: pwm1\n");
4549

46-
if(access("/sys/class/pwm/pwmchip4/export", F_OK ) != 0){
50+
if(access("/sys/devices/platform/ocp/48304000.epwmss/48304200.pwm/pwm/", F_OK ) != 0){
4751
printf("ERROR: ti-pwm driver not loaded for hrpwm2\n");
4852
} else printf("PASSED: pwm2\n");
4953

0 commit comments

Comments
 (0)