Page | 93
DeviceIoControl (hFile, IOCTL_GPIO_SETBIT, &id, sizeof (DWORD), NULL, 0,
NULL, NULL);
Output low level:
DeviceIoControl (hFile, IOCTL_GPIO_CLRBIT, &id, sizeof (DWORD), NULL, 0,
NULL, NULL);
Read the pin state
DeviceIoControl (hFile, IOCTL_GPIO_GETBIT, &id, sizeof (DWORD), &pinState,
sizeof (DWORD), NULL, NULL);
"id" is the GPIO pin number, "pinSate" returns to pin state
Other optional operations
Read the corresponding IRQ number of a GPIO pin
DWORD id = 0, irq = 0;
DeviceIoControl (hFile, IOCTL_GPIO_GETIRQ, &id, sizeof (DWORD), &irq, sizeof
(DWORD), NULL, NULL);
"id" is the GPIO pin number; "irq" returns the IRQ number
Close the GPIO device
CloseHandle (hFile);
Note:
Definition of GPIO pin: 0~127 MPU Bank0~3 GPIO pin.
GPIO pin 0~127 has to be configured as a
GPIO
under
SBC8600/SRC/inc/bsp_padcfg.h when referred to as a GPIO pin.
Содержание SBC8600B
Страница 1: ...SBC8600B Single Board Computer Quick Start Guide Version 1 1 23rd Jan 2014...
Страница 9: ...Page 2 1 3 Board Interfaces Figure 1 SBC8600B Interfaces...
Страница 10: ...Page 3 1 4 System Block Diagram Figure 2 SBC8600B System Block Diagram...
Страница 11: ...Page 4 1 5 Physical Dimensions Figure 3 MINI8600B Physical Dimensions...
Страница 12: ...Page 5 Figure 4 SBC8600B Physical Dimensions...
Страница 113: ...Page 106 3 When the following appears select Continue 4 Please wait until the installation is completed...
Страница 114: ...Page 107...