I wrote years ago a short c program for a Raspberry Pi (RPi3) using the pigpio library to send an infrared signal to a heating system. Still in use. The carrier frequency is 450 kHz, i.e., pretty fast for a RPi. Thus, I use hardware PWM and only need to switch PWM off and on (i.e., duty cycle 0% and 50%, respectively).
Since the latest RPiOS (“Raspbian”) update, this no longer works; likely because the pigpio library uses the obsolete sysfs interface. I can confirm on the commandline that sysfs is no longer supported (while the same command works on another, not yet upgraded RPi):
~# uname --kernel-name --kernel-release --kernel-version
Linux 6.6.31+rpt-rpi-v7 #1 SMP Raspbian 1:6.6.31-1+rpt1 (2024-05-29)
~# echo 23 > /sys/class/gpio/export
-bash: echo: write error: Invalid argument
To my question: is there a library that supports hardware PWM and uses the character device interface? pigpio and RPi.GPIO (for Python) seem to use sysfs. libgpiod and wiringPi use the character device interface but I found no support for hardware PWM. Library bcm2835 only supports RPi1 and RPi2.