@nsmith said in Control PWM hardware from C:
I notice that for GPIO 20 and 21 it has the same command above, is that correct?
Yes, the muxing of GPIOs 20 and 21 is controlled by a single command.
These pins can be regular GPIOs, serial UART2, or PWM channels. They're controlled together since UARTs are always 2 pins.
Because of this, you'll only need to run omega2-ctrl gpiomux set uart2 pwm23 once and both GPIO 20 and 21 will be set to PWM.