Reference Driver

73M1866B/73M1966B Reference Driver User Guide UG_1x66B_015
64 Rev. 2.7
6.7 GPIO Services
6.7.1 M1966_GPIO_CONFIG
Description
The ioctl is used to configure the GPIO pin.
#define M1966_GPIO_CONFIG _IOWR(0xA4, 0xC0, unsigned int)
Prototype
int ioctl (
int chan_fd,
int M1966_GPIO_CONFIG,
unsigned long param );
Parameters
Data Type Name Description
int
chan_fd
Channel descriptor.
int
M1966_GPIO_CONFIG
I/O control identifier for this operation.
unsigned long
param
Pointer to M1966_GPIO_CONFIG_t structure.
Return Values
Data Type Description
unsigned int
0 – Successful.
-1 Failed to configure GPIO.
6.7.2 M1966_GPIO_CONTROL
Description
The ioctl is used to control the operation of the GPIO pin.
#define M1966_GPIO_CONTROL _IOWR(0xA4, 0xC1, unsigned int)
Prototype
int ioctl (
int chan_fd,
int M1966_GPIO_CONTROL,
unsigned long param );
Parameters
Data Type Name Description
int
chan_fd
Channel descriptor.
int
M1966_GPIO_CONTROL
I/O control identifier for this operation.
unsigned long
param
Pointer to M1966_GPIO_CONTROL_t structure.
Return Values
Data Type Description
unsigned int
0 – Successful.
-1 Failed to control GPIO.