You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Boards such as the Zero+ and PC2 have LEDs attached to GPIO pins. We should create an LED class and a GPIO LED driver.
LED class
The LED class simply needs a int led_set_state(struct device *dev, uint8_t mode); method, that forwards to an int (*set_state)(struct device *dev, uint8_t mode); driver operation. The available modes are
enum {
LED_OFF = 0,
LED_ON = 1,
};
GPIO LED driver
This will need to take a single GPIO pin. It should support both active-high and active-low LEDs. The active level can be set in a member of the struct wrapping struct device, and can be set via a Kconfig option (e.g. { ..., .active_low = CONFIG_GPIO_LED_ACTIVE_LOW }).
The text was updated successfully, but these errors were encountered:
Type of issue
Feature
Description
Boards such as the Zero+ and PC2 have LEDs attached to GPIO pins. We should create an LED class and a GPIO LED driver.
LED class
The LED class simply needs a
int led_set_state(struct device *dev, uint8_t mode);
method, that forwards to anint (*set_state)(struct device *dev, uint8_t mode);
driver operation. The available modes areGPIO LED driver
This will need to take a single GPIO pin. It should support both active-high and active-low LEDs. The active level can be set in a member of the struct wrapping
struct device
, and can be set via a Kconfig option (e.g.{ ..., .active_low = CONFIG_GPIO_LED_ACTIVE_LOW }
).The text was updated successfully, but these errors were encountered: