Page | 52
.platform_data = &gpio_key_info,
},
};
Set GPIO 26 as the
menu
key, returning the key value
KEY_F1
, triggered
by a low voltage level.
2.
GPIO pinmux Configuration;
The
file
sbc8140.h
is
saved
under
/u-boot-03.00.02.07/board/timll/sbc8140/
;
/*
* IEN - Input Enable
* IDIS - Input Disable
* PTD - Pull type Down
* PTU - Pull type Up
* DIS - Pull type selection is inactive
* EN - Pull type selection is active
* M0 - Mode 0
* The commented string gives the final mux configuration for
that pin
*/
MUX_VAL(CP(ETK_D12_ES2), (IEN | PTU | DIS | M4))
/*GPIO_26*/\
MUX_VAL(CP(ETK_D15_ES2), (IEN | PTU | DIS | M4))
/*GPIO_29*/\
Set GPIOs 26 and 29 as M4 (GPIO mode) and IEN (allow input).
3.
Driver Design;
The
source
file:
gpio_keys.c
is
saved
under
/linux-2.6.32-sbc8140/drivers/input/keyboard/;
Call platform_driver_register to register gpio_keys driver;
static struct platform_driver gpio_keys_device_driver = {
.probe = gpio_keys_probe,
.remove = __devexit_p(gpio_keys_remove),
.driver = {
.name = "gpio-keys",
Summary of Contents for SBC8140
Page 1: ...SBC8140 Single Board Computer User Manual Version 1 1 22nd Jan 2014...
Page 12: ...Page 6 1 4 Interfaces on the SBC8140 Figure 4 SBC8140 Interfaces...
Page 13: ...Page 7 1 5 System Block Diagram Figure 5 SBC8140 system block diagram...
Page 15: ...Page 9 1 6 2 Expansion Board Figure 8 Expansion board dimensions...
Page 128: ...Page 122...
Page 131: ...Page 125...
Page 139: ...Page 133 Appendix 5 FAQ Please visit http www elinux org SBC8600_FAQ...