You can find all the LEDs of your device under
/sys/class/leds/
In my case, I have the following LEDs
amber button-backlight flashlight green lcd-backlight
If I have a look in green, I see
> cd green > ls blink brightness currents device lut_coefficient max_brightness off_timer power pwm_coefficient subsystem trigger uevent
These files are interfaces to the kernel module, which controls the LEDs. In this case, I consider them to be char devices. You can use the "echo" and "cat" commands to communicate with the kernel module. Here is an example ..
echo 1 > brightness # Turn on led echo 0 > brightness # Turn off led
To realize the pulse "heartbeat", as you mentioned, I would look at the "blinking". If you don't want to do reverse engineering, this might be a good entry point to check what happens in the leds-gpio.c kernel
source share