Driver For The Gpio_Leds - Embest SBC8600B Quick Start Manual

Hide thumbs Also See for SBC8600B:
Table of Contents

Advertisement

input_event(input, type, button->code, !!state);
input_sync(input);
}

6.5.2 Driver for the gpio_leds

1. Device Definition
Linux-3.2.0-psp04.06.00.08.sdk/arch/arm/mach-omap2/board-am335xev
m.c
Configure GPIO 1.30 as "sys_led" (system indicator)and GPIO 1.31 as
"user_led", both activated by a high level signal.
static struct gpio_led gpio_leds[] = {
{
.name
.default_trigger
.gpio
},
{
.name
.gpio
},
};
static struct gpio_led_platform_data gpio_led_info = {
.leds
.num_leds
};
static struct platform_device leds_gpio = {
.name
= "leds-gpio",
.id
= -1,
.dev
= {
.platform_data = &gpio_led_info,
},
};
2. GPIO pinmux Configuration
Linux-3.2.0-psp04.06.00.08.sdk/arch/arm/mach-omap2/board-am335xev
m.c
= "sys_led",
= "heartbeat",
= GPIO_TO_PIN(1, 30),
= "user_led",
= GPIO_TO_PIN(1, 31),
= gpio_leds,
= ARRAY_SIZE(gpio_leds),
Page | 47

Advertisement

Table of Contents
loading

Table of Contents