Interested in learning OS-level programming
#2
The flashlight, along with many other things, is controlled by reading and writing 'files' under the /sys pseudo-filesystem. You can do that using normal shell tools like echo, tee, pipes etc. or by using a programming language's file read/write methods. In this case you're looking to write either 0 or 1 to /sys/devices/platform/led-controller/leds/white:flash/brightness - note the permissions on that file which may mean you'll need to use sudo or similar to access it.

What level do you want to access the modem at? Low level access is easiest via the serial port using AT commands. Most of the OS versions abstract that out via either ModemManager or oFono, in which case you'd access the modem through those using a dbus interface.

The other bit is how to get things into and out of your program via the cli, but that's usually address in or soon after 'Hello World.'
  Reply


Messages In This Thread
RE: Interested in learning OS-level programming - by wibble - 08-15-2020, 11:43 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Bug Wrong Battery Charge Level Displayed - How to Fix acid andy 7 5,442 06-12-2023, 01:04 PM
Last Post: jakfish

Forum Jump:


Users browsing this thread: 1 Guest(s)