version 1.1, 2007/11/19 10:51:40 |
version 1.4, 2007/11/24 19:04:42 |
|
|
int gpioled_attach(struct device *, uint32_t, uint8_t); |
int gpioled_attach(struct device *, uint32_t, uint8_t); |
|
|
struct driver gpioled_dr = { |
struct driver gpioled_dr = { |
0, |
1, |
gpioled_attach, |
gpioled_attach, |
NULL, |
NULL, |
NULL |
NULL |
|
|
pin.gp_pinno = loc; /* PA17 or PA18 please */ |
pin.gp_pinno = loc; /* PA17 or PA18 please */ |
pin.gp_pio = 1; /* PIO mode */ |
pin.gp_pio = 1; /* PIO mode */ |
pin.gp_flags = GPIO_PIN_OUTPUT; |
pin.gp_flags = GPIO_PIN_OUTPUT; |
pin.gp_value = 1; /* LED on */ |
pin.gp_value = 0; /* LED on */ |
|
|
printf("P64 onboard LED (PA17)\n"); |
printf("p64 onboard LED (pin %d)\n", pin.gp_pinno); |
|
|
/* talk to gpio controller */ |
/* talk to gpio controller */ |
gcp->gc_pinset(gcp->gc_selfdd, pin); |
gcp->gc_pinset(gcp->gc_selfdd, pin); |