MTK Android Driver: GPIO, mtkgpio
1. parameter descriptions for each column:
1.1.Def.Mode: indicates the initialization mode of the gpio module after startup. Each GPIO pin can have a maximum of seven modes, and MODE0 is always the GPIO mode.
The mode of GPIO after system initialization is determined by the Def. Mode column.
1.2.M0 -- M7: Optional mode for each gpio of the M0-M1-M3-M4-M5-M6-M7.
If some items in the M0-M7 are checked, a macro definition like # define GPIO_UART_UTXD4_PIN_M_GPIO GPIO_MODE_00 is generated, which can be used directly in the code.
1.3.InPull En: enable Inpull or disable Inpull. (Only valid when GPIO is input mode)
1.4.InPull SelHigh: Indicates whether to pull up ). (Only valid when GPIO is input mode and "InPull En" is enable)
1.5.Def.Dir: indicates the input and output directions of gpio initialized by the GPIO module after startup.
Note:
1) Whether enable pull depends on the peripheral device connected to the GPIO pin.
2) If it is enable pull, it can be configured as pull-up or pull down.
1.6.In/Out: indicates the input or output direction that should be selected after the gpio module is initialized.
1.7.INV: Can the GPIO value be changed. (The GPIO data can be inverted or un-inverted)
Note: This option is not used for the moment. It is not checked by default.
1.8.OutHigh: It set the default output value is high (1). (Only valid when GPIO is output mode)
Note:
1) Each GPIO pin can be configured as input or output ..
2) Def. Dir and In/Out: three columns are combined to configure the input and output directions of GPIO.
3) if the GPIO pin is output pin, the output value can be configured as high (1) or low (0 ).
4) if the GPIO pin is input pin, the input value can be configured as high (1) or low (0 ).
1.9.VarName1/2/3: Give the gpio port a name, so that you can use the initialization name in the program to call this gpio port.
Note: VarName2/3 is for special class when a GPIO pin is shared between two applications or modules.