Enable/disable PWM channel

I use the examples for navio2 in c++ from here: https://github.com/emlid/Navio2/tree/master/C%2B%2B/Examples/Servo. There exists an enable function in the pwm class here: https://github.com/emlid/Navio2/blob/master/C%2B%2B/Navio/PWM.h

how can I again disable them? I would like to write an arm/disarm routine for single channels.
I cannot remove the enable file in /sys/class/pwm/pwmchip0/. even as root I get permission denied.
thanks for some advice

In order to disable channels you should echo 0 > pwm<N>/enable and then echo <N> > unexport to remove from the system.

Thanks for the fast answer, i forgot to write the channel to unexport, that solved my problem. I guess to enable after calling unexport I just hae to export again the channel.

You’ll need to export and enable! Glad you figured it out!