MTK Android Driver:gpio

Source: Internet
Author: User


1. Each column parameter description:
1.1.def.mode: Indicates the mode after the Gpio module is initialized, with a maximum of 7 modes per Gpio pin, and MODE0 always gpio mode.

The mode of GPIO after system initialization is determined by the Def.mode column.


1.2.M0--M7:M0-M1-M3-M4-M5-M6-M7 selectable modes for each gpio.

If some of the items in M0-M7 are checked, a similar #define GPIO_UART_UTXD4_PIN_M_GPIO gpio_mode_00 is generated, such a macro definition, in code can be directly used .


1.3.InPull En: Indicates the Enable Inpull or disable Inpull. (only valid if GPIO is input mode)

1.4.InPull Selhigh: Indicates whether the pull height (pull-up) is required. (only valid if GPIO is input mode and "Inpull En" is enable)

1.5.def.dir: Indicates the input and output direction configuration of Gpio after the Gpio module is initialized.

Note:

1) Whether the enable pull depends on the peripheral device connected to this GPIO pin pin

2) If you are enable pull, you can configure the pull-up or pull down.


1.6.in/out: Indicates that we need to choose the input or output direction after the Gpio module is initialized.

Whether the value of the 1.7.inv:gpio can be changed. (the GPIO data can be inverted or un-inverted)

Note: This item is not used, the default is not checked, do not take care of.

1.8.outhigh:it Set the default output value is high (1). (only valid if GPIO is output mode)

Note:

1) Each GPIO PIN can be configured as input or output:

2) Def.dir and In/out: The three columns are combined together to configure the input and output direction of the Gpio.

3) If the Gpio pin is an output pin, the output value can be configured to high (1) or low (0).

4) If the Gpio pin is an input pin, then input value can be configured to high (1) or low (0).


1.9.VARNAME1/2/3: Give the Gpio port a name so you can invoke the Gpio port using the initialized name in the program.

Note: VARNAME2/3 is for special class when a GPIO pin is shared between both applications or modules.


MTK Android Driver:gpio

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.