PebbleOS v4.47.0-757-g12b6c531f
Loading...
Searching...
No Matches
GPIO

LED driver for an LED on a GPIO. More...

Data Structures

struct  pbl_led_gpio
 LED on a GPIO. More...
 

Macros

#define PBL_LED_GPIO_DEFINE(sym, _name, _gpio)
 Define an LED on a GPIO.
 

Detailed Description

LED driver for an LED on a GPIO.

The LED is on at any brightness but 0, whatever the color, and off when it comes up.


Data Structure Documentation

◆ pbl_led_gpio

struct pbl_led_gpio

LED on a GPIO.

Data Fields
struct pbl_gpio gpio GPIO, active when the LED is on.
struct pbl_led led LED.

Macro Definition Documentation

◆ PBL_LED_GPIO_DEFINE

#define PBL_LED_GPIO_DEFINE (   sym,
  _name,
  _gpio 
)
Value:
PBL_DEVICE_INSTANCE(sym, struct pbl_led_gpio, struct pbl_led, led) { \
.led = PBL_LED_INIT(sym, _name, pbl_led_gpio_init, nullptr, &pbl_led_gpio_ops), .gpio = _gpio, \
}
#define PBL_DEVICE_STATE_DEFINE(sym)
Define the runtime state of device instance sym.
Definition device.h:132
LED on a GPIO.
Definition gpio.h:19
LED.
Definition led.h:34
#define PBL_LED_INIT(sym, _name, _init, _parent, _ops)
Initialize a struct pbl_led.
Definition led.h:57

Define an LED on a GPIO.

Parameters
symSymbol of the LED.
_nameName.
_gpioGPIO, from PBL_GPIO().