2 * Status LED driver based on GPIO access conventions of Linux
4 * Copyright (C) 2010 Thomas Chou <thomas@wytron.com.tw>
5 * Licensed under the GPL-2 or later.
9 #include <status_led.h>
12 void __led_init(led_id_t mask, int state)
14 gpio_request(mask, "gpio_led");
15 gpio_direction_output(mask, state == STATUS_LED_ON);
18 void __led_set(led_id_t mask, int state)
20 gpio_set_value(mask, state == STATUS_LED_ON);
23 void __led_toggle(led_id_t mask)
25 gpio_set_value(mask, !gpio_get_value(mask));