I try to set the PWM output with the legacy functions like pwm_request(), pwm_enable().
On my target, there is no include file /usr/include/linux/pwm.h. Did I have to set the include in the Kernel .config file, or why is there no pwm.h header file in the folder? The file exists only on the host (Ubuntu 16.04).
may i have more details about your use-case?
for example, which module pwn functions you would like to control.
also, which JetPack release you’re working on?
thanks
unfortunaly there is no pwm.h in /usr/include/linux/
The file is only in /usr/src/linux-headers-4.4.38-tegra/include/linux/ but I don’t know why this is.
Files in “/usr/include” are usually from a “dev” version of software. For example, you might have support for running OpenGL applications…but there wouldn’t be any development headers unless you added the dev version of the OpenGL package.
The kernel itself will support certain system calls which an external library might depend on without any external user of that call unless you have installed something using it. For example, just because the kernel supports everything an OpenGL app needs it doesn’t mean you have installed any OpenGL libraries or apps.
You need to know what library your software is wanting to link against in order to know which dev/source package provides the headers on top of the actual libraries. The kernel version is for bare metal. More specifically, you need a “/usr/include/linux/pwm.h” dev package which provides the dev header matching your user space library, not a dev package for kernel space (the kernel source is the dev package for kernel space).
I don’t know what package wants pwm.h, but basically you need to research this to know where to get it…since it wants the “/usr/include” version, this says there is likely some library involved (if this were a kernel space driver you’d find it wants a kernel header version and not “/usr/include”).