GPIO ==== 概述 ---- Air720UG/UH模块引脚共支持29个GPIO,部分引脚上电前后状态不同,如使用这些管脚,需根据实际情况使用。 使用说明: ~~~~~~~~~~ :: VLCD、VMMC、VSIM1相关引脚电压域会根据外部硬件,其内部自动调整其输出电压,为1.8V/3V/3.3V At reset, after reset 都默认指的就是function 0功能的状态(即GPIO 配置还没生效前的状态) GPIO0~5 电源域默认关闭,所以at reset, after reset状态都是L +----+---+---------+----+---+-----+-----+-----+---+---+---+---+---+---+----+---+ | | | | P | | | | | | | F | | F | | Fu | | | | | | in | | | | | | | u | | u | | nc | | | | | | S | | | | | | | n | | n | | ti | | | | | | ta | | | | | | | c | | c | | on | | | | | | te | | | | | | | t | | t | | 2 | | | | | | | | | | | | | i | | i | | | | | | | | | | | | | | | o | | o | | | | | | | | | | | | | | | n | | n | | | | | | | | | | | | | | | 0 | | 1 | | | | +====+===+=========+====+===+=====+=====+=====+===+===+===+===+===+===+====+===+ | Ai | G | Name | At | | Af | | Po | P | P | F | T | F | T | Fu | T | | r7 | P | | Re | | ter | | wer | u | u | u | y | u | y | nc | y | | 20 | I | | se | | Re | | Dom | l | l | n | p | n | p | ti | p | | UG | O | | t( | | set | | ain | l | l | c | e | c | e | on | e | | P | n | | H/ | | (H/ | | | - | - | t | | t | | 2 | | | IN | u | | L/ | | L/H | | | u | D | i | | i | | | | | N | m | | Hi | | iz) | | | p | o | o | | o | | | | | O. | b | | z) | | | | | | w | n | | n | | | | | | e | | | | | | | | n | 0 | | 1 | | | | | | r | | | | | | | | | | | | | | | +----+---+---------+----+---+-----+-----+-----+---+---+---+---+---+---+----+---+ | 63 | G | L | I | L | IN | L | VLC | 2 | 5 | G | I | L | O | | | | | P | CD_DATA | NP | | PUT | | D(1 | 0 | 0 | P | / | C | | | | | | I | /GPIO_0 | UT | | | | .8V | K | K | I | O | D | | | | | | O | | | | | | /3V | / | | O | | _ | | | | | | _ | | | | | | /3. | 4 | | _ | | D | | | | | | 0 | | | | | | 3V) | . | | 0 | | A | | | | | | | | | | | | | 7 | | | | T | | | | | | | | | | | | | K | | | | A | | | | | | | | | | | | | / | | | | | | | | | | | | | | | | | 1 | | | | | | | | | | | | | | | | | . | | | | | | | | | | | | | | | | | 8 | | | | | | | | | | | | | | | | | K | | | | | | | | +----+---+---------+----+---+-----+-----+-----+---+---+---+---+---+---+----+---+ | 6 | G | NET | I | L | IN | L | VLC | 2 | 5 | G | I | L | O | NE | O | | | P | _STATUS | NP | | PUT | | D(1 | 0 | 0 | P | / | C | | T_ | | | | I | /GPIO_1 | UT | | | | .8V | K | K | I | O | D | | ST | | | | O | | | | | | /3V | / | | O | | _ | | AT | | | | _ | | | | | | /3. | 4 | | _ | | D | | US | | | | 1 | | | | | | 3V) | . | | 1 | | C | | | | | | | | | | | | | 7 | | | | | | | | | | | | | | | | | K | | | | | | | | | | | | | | | | | / | | | | | | | | | | | | | | | | | 1 | | | | | | | | | | | | | | | | | . | | | | | | | | | | | | | | | | | 8 | | | | | | | | | | | | | | | | | K | | | | | | | | +----+---+---------+----+---+-----+-----+-----+---+---+---+---+---+---+----+---+ | 1 | G | LCD | I | L | IN | L | VLC | 2 | 5 | G | I | L | O | AP | I | | | P | _CLK/AP | NP | | PUT | | D(1 | 0 | 0 | P | / | C | | _W | | | | I | _WAKEUP | UT | | | | .8V | K | K | I | O | D | | AK | | | | O | _MODULE | | | | | /3V | / | | O | | _ | | EU | | | | _ | /GPIO_2 | | | | | /3. | 4 | | _ | | C | | P_ | | | | 2 | | | | | | 3V) | . | | 2 | | L | | MO | | | | | | | | | | | 7 | | | | K | | DU | | | | | | | | | | | K | | | | | | LE | | | | | | | | | | | / | | | | | | | | | | | | | | | | | 1 | | | | | | | | | | | | | | | | | . | | | | | | | | | | | | | | | | | 8 | | | | | | | | | | | | | | | | | K | | | | | | | | +----+---+---------+----+---+-----+-----+-----+---+---+---+---+---+---+----+---+ | 2 | G | LCD | I | L | IN | L | VLC | 2 | 5 | G | I | L | O | WA | O | | | P | _CS/WAK | NP | | PUT | | D(1 | 0 | 0 | P | / | C | | KE | | | | I | EUP_OUT | UT | | | | .8V | K | K | I | O | D | | UP | | | | O | /GPIO_3 | | | | | /3V | / | | O | | _ | | _O | | | | _ | | | | | | /3. | 4 | | _ | | C | | UT | | | | 3 | | | | | | 3V) | . | | 3 | | S | | | | | | | | | | | | | 7 | | | | | | | | | | | | | | | | | K | | | | | | | | | | | | | | | | | / | | | | | | | | | | | | | | | | | 1 | | | | | | | | | | | | | | | | | . | | | | | | | | | | | | | | | | | 8 | | | | | | | | | | | | | | | | | K | | | | | | | | +----+---+---------+----+---+-----+-----+-----+---+---+---+---+---+---+----+---+ | 5 | G | LC | I | L | IN | L | VLC | 2 | 5 | G | I | L | O | NE | O | | | P | D_SEL/N | NP | | PUT | | D(1 | 0 | 0 | P | / | C | | T_ | | | | I | ET_MODE | UT | | | | .8V | K | K | I | O | D | | MO | | | | O | /GPIO_4 | | | | | /3V | / | | O | | _ | | DE | | | | _ | | | | | | /3. | 4 | | _ | | S | | | | | | 4 | | | | | | 3V) | . | | 4 | | E | | | | | | | | | | | | | 7 | | | | L | | | | | | | | | | | | | K | | | | | | | | | | | | | | | | | / | | | | | | | | | | | | | | | | | 1 | | | | | | | | | | | | | | | | | . | | | | | | | | | | | | | | | | | 8 | | | | | | | | | | | | | | | | | K | | | | | | | | +----+---+---------+----+---+-----+-----+-----+---+---+---+---+---+---+----+---+ | 61 | G | MODULE | I | L | IN | L4 | VD | 2 | 4 | G | I | M | O | | | | | P | _STATUS | NP | | PUT | 00m | DIO | 0 | 0 | P | / | O | | | | | | I | /GPIO_5 | UT | | | s后 | (1. | K | K | I | O | D | | | | | | O | | | | | , | 8V) | / | | O | | U | | | | | | _ | | | | | 由 | | 4 | | _ | | L | | | | | | 5 | | | | | 底 | | . | | 5 | | E | | | | | | | | | | | 层 | | 7 | | | | _ | | | | | | | | | | | 软 | | K | | | | S | | | | | | | | | | | 件 | | | | | | T | | | | | | | | | | | 控 | | | | | | A | | | | | | | | | | | 制 | | | | | | T | | | | | | | | | | | 为 | | | | | | U | | | | | | | | | | | OUT | | | | | | S | | | | | | | | | | | PUT | | | | | | | | | | | | | | | | | 变H | | | | | | | | | | +----+---+---------+----+---+-----+-----+-----+---+---+---+---+---+---+----+---+ | 18 | G | GPIO_7 | I | L | IN | L | VD | 2 | 4 | G | I | | | | | | | P | | NP | | PUT | | DIO | 0 | 0 | P | / | | | | | | | I | | UT | | | | (1. | K | K | I | O | | | | | | | O | | | | | | 8V) | / | | O | | | | | | | | _ | | | | | | | 4 | | _ | | | | | | | | 7 | | | | | | | . | | 7 | | | | | | | | | | | | | | | 7 | | | | | | | | | | | | | | | | | K | | | | | | | | +----+---+---------+----+---+-----+-----+-----+---+---+---+---+---+---+----+---+ | 39 | G | S | I | L | IN | L | VD | 2 | 4 | G | I | S | I | | | | | P | PI1_CLK | NP | | PUT | | DIO | 0 | 0 | P | / | P | / | | | | | I | /GPIO_9 | UT | | | | (1. | K | K | I | O | I | O | | | | | O | | | | | | 8V) | / | | O | | 1 | | | | | | _ | | | | | | | 4 | | _ | | _ | | | | | | 9 | | | | | | | . | | 9 | | C | | | | | | | | | | | | | 7 | | | | L | | | | | | | | | | | | | K | | | | K | | | | +----+---+---------+----+---+-----+-----+-----+---+---+---+---+---+---+----+---+ | 40 | G | S | I | L | IN | L | VD | 2 | 4 | G | I | S | I | | | | | P | PI1_CS/ | NP | | PUT | | DIO | 0 | 0 | P | / | P | / | | | | | I | GPIO_10 | UT | | | | (1. | K | K | I | O | I | O | | | | | O | | | | | | 8V) | / | | O | | 1 | | | | | | _ | | | | | | | 4 | | _ | | _ | | | | | | 1 | | | | | | | . | | 1 | | C | | | | | | 0 | | | | | | | 7 | | 0 | | S | | | | | | | | | | | | | K | | | | | | | | +----+---+---------+----+---+-----+-----+-----+---+---+---+---+---+---+----+---+ | 37 | G | SPI | I | L | IN | L | VD | 2 | 4 | G | I | S | I | | | | | P | 1_DOUT/ | NP | | PUT | | DIO | 0 | 0 | P | / | P | / | | | | | I | GPIO_11 | UT | | | | (1. | K | K | I | O | I | O | | | | | O | | | | | | 8V) | / | | O | | 1 | | | | | | _ | | | | | | | 4 | | _ | | _ | | | | | | 1 | | | | | | | . | | 1 | | D | | | | | | 1 | | | | | | | 7 | | 1 | | O | | | | | | | | | | | | | K | | | | U | | | | | | | | | | | | | | | | | T | | | | +----+---+---------+----+---+-----+-----+-----+---+---+---+---+---+---+----+---+ | 38 | G | SP | I | L | IN | L | VD | 2 | 4 | G | I | S | I | | | | | P | I1_DIN/ | NP | | PUT | | DIO | 0 | 0 | P | / | P | / | | | | | I | GPIO_12 | UT | | | | (1. | K | K | I | O | I | O | | | | | O | | | | | | 8V) | / | | O | | 1 | | | | | | _ | | | | | | | 4 | | _ | | _ | | | | | | 1 | | | | | | | . | | 1 | | D | | | | | | 2 | | | | | | | 7 | | 2 | | I | | | | | | | | | | | | | K | | | | N | | | | +----+---+---------+----+---+-----+-----+-----+---+---+---+---+---+---+----+---+ | 62 | G | C | I | L | IN | L | VD | 2 | 4 | G | I | | | | | | | P | LIB_EN/ | NP | | PUT | | DIO | 0 | 0 | P | / | | | | | | | I | GPIO_13 | UT | | | | (1. | K | K | I | O | | | | | | | O | | | | | | 8V) | / | | O | | | | | | | | _ | | | | | | | 4 | | _ | | | | | | | | 1 | | | | | | | . | | 1 | | | | | | | | 3 | | | | | | | 7 | | 3 | | | | | | | | | | | | | | | K | | | | | | | | +----+---+---------+----+---+-----+-----+-----+---+---+---+---+---+---+----+---+ | 41 | G | I2 | I | L | IN | L | VD | 2 | 4 | G | I | I | O | | | | | P | C2_SCL/ | NP | | PUT | | DIO | 0 | 0 | P | / | 2 | | | | | | I | GPIO_14 | UT | | | | (1. | K | K | I | O | C | | | | | | O | | | | | | 8V) | / | | O | | 2 | | | | | | _ | | | | | | | 1 | | _ | | _ | | | | | | 1 | | | | | | | . | | 1 | | S | | | | | | 4 | | | | | | | 8 | | 4 | | C | | | | | | | | | | | | | K | | | | L | | | | +----+---+---------+----+---+-----+-----+-----+---+---+---+---+---+---+----+---+ | 42 | G | I2 | I | L | IN | L | VD | 2 | 4 | G | I | I | I | | | | | P | C2_SDA/ | NP | | PUT | | DIO | 0 | 0 | P | / | 2 | / | | | | | I | GPIO_15 | UT | | | | (1. | K | K | I | O | C | O | | | | | O | | | | | | 8V) | / | | O | | 2 | | | | | | _ | | | | | | | 1 | | _ | | _ | | | | | | 1 | | | | | | | . | | 1 | | S | | | | | | 5 | | | | | | | 8 | | 5 | | D | | | | | | | | | | | | | K | | | | A | | | | +----+---+---------+----+---+-----+-----+-----+---+---+---+---+---+---+----+---+ | 64 | G | UAR | I | L | IN | L | VD | 2 | 4 | G | I | U | I | | | | | P | T1_CTS/ | NP | | PUT | | DIO | 0 | 0 | P | / | A | | | | | | I | GPIO_18 | UT | | | | (1. | K | K | I | O | R | | | | | | O | | | | | | 8V) | / | | O | | T | | | | | | _ | | | | | | | 4 | | _ | | 1 | | | | | | 1 | | | | | | | . | | 1 | | _ | | | | | | 8 | | | | | | | 7 | | 8 | | C | | | | | | | | | | | | | K | | | | T | | | | | | | | | | | | | | | | | S | | | | +----+---+---------+----+---+-----+-----+-----+---+---+---+---+---+---+----+---+ | 65 | G | UAR | I | L | IN | L | VD | 2 | 4 | G | I | U | O | | | | | P | T1_RTS/ | NP | | PUT | | DIO | 0 | 0 | P | / | A | | | | | | I | GPIO_19 | UT | | | | (1. | K | K | I | O | R | | | | | | O | | | | | | 8V) | / | | O | | T | | | | | | _ | | | | | | | 4 | | _ | | 1 | | | | | | 1 | | | | | | | . | | 1 | | _ | | | | | | 9 | | | | | | | 7 | | 9 | | R | | | | | | | | | | | | | K | | | | T | | | | | | | | | | | | | | | | | S | | | | +----+---+---------+----+---+-----+-----+-----+---+---+---+---+---+---+----+---+ | 1 | G | UAR | I | L | OUT | L | VD | 2 | 4 | G | I | U | I | | | | 16 | P | T2_RXD/ | NP | | PUT | 5m | DIO | 0 | 0 | P | / | A | | | | | | I | GPIO_20 | UT | | | s后 | (1. | K | K | I | O | R | | | | | | O | | | | | 变 | 8V) | / | | O | | T | | | | | | _ | | | | | 为H | | 4 | | _ | | 2 | | | | | | 2 | | | | | | | . | | 2 | | _ | | | | | | 0 | | | | | | | 7 | | 0 | | R | | | | | | | | | | | | | K | | | | X | | | | | | | | | | | | | | | | | D | | | | +----+---+---------+----+---+-----+-----+-----+---+---+---+---+---+---+----+---+ | 23 | G | UAR | I | L | OUT | 输 | VD | 2 | 4 | G | I | U | O | | | | | P | T2_TXD/ | NP | | PUT | 出l | DIO | 0 | 0 | P | / | A | | | | | | I | GPIO_21 | UT | | | og, | (1. | K | K | I | O | R | | | | | | O | | | | | 不 | 8V) | / | | O | | T | | | | | | _ | | | | | 建 | | 4 | | _ | | 2 | | | | | | 2 | | | | | 议 | | . | | 2 | | _ | | | | | | 1 | | | | | 使 | | 7 | | 1 | | T | | | | | | | | | | | 用 | | K | | | | X | | | | | | | | | | | | | | | | | D | | | | +----+---+---------+----+---+-----+-----+-----+---+---+---+---+---+---+----+---+ | 66 | G | ZSP_UA | I | L | OUT | L | VD | 2 | 4 | G | I | Z | O | | | | | P | RT_TXD/ | NP | | PUT | 5m | DIO | 0 | 0 | P | / | S | | | | | | I | GPIO_22 | UT | | | s后 | (1. | K | K | I | O | P | | | | | | O | | | | | 变 | 8V) | / | | O | | _ | | | | | | _ | | | | | 为H | | 4 | | _ | | U | | | | | | 2 | | | | | | | . | | 2 | | A | | | | | | 2 | | | | | | | 7 | | 2 | | R | | | | | | | | | | | | | K | | | | T | | | | | | | | | | | | | | | | | _ | | | | | | | | | | | | | | | | | T | | | | | | | | | | | | | | | | | X | | | | | | | | | | | | | | | | | D | | | | +----+---+---------+----+---+-----+-----+-----+---+---+---+---+---+---+----+---+ | 13 | G | U | I | L | OUT | 输 | VD | 2 | 4 | G | I | U | I | | | | | P | SIM_CD/ | NP | | PUT | 出l | DIO | 0 | 0 | P | / | S | | | | | | I | GPIO_23 | UT | | | og, | (1. | K | K | I | O | I | | | | | | O | | | | | 不 | 8V) | / | | O | | M | | | | | | _ | | | | | 建 | | 4 | | _ | | _ | | | | | | 2 | | | | | 议 | | . | | 2 | | C | | | | | | 3 | | | | | 使 | | 7 | | 3 | | D | | | | | | | | | | | 用 | | K | | | | | | | | +----+---+---------+----+---+-----+-----+-----+---+---+---+---+---+---+----+---+ | 30 | G | MM | I | H | IN | H | VMM | 2 | 5 | G | I | M | I | | | | | P | C1_CMD/ | NP | | PUT | | C(1 | 0 | 0 | P | / | M | / | | | | | I | GPIO_24 | UT | | | | .8V | K | K | I | O | C | O | | | | | O | | | | | | /3V | / | | O | | 1 | | | | | | _ | | | | | | /3. | 4 | | _ | | _ | | | | | | 2 | | | | | | 3V) | . | | 2 | | C | | | | | | 4 | | | | | | | 7 | | 4 | | M | | | | | | | | | | | | | K | | | | D | | | | | | | | | | | | | / | | | | | | | | | | | | | | | | | 1 | | | | | | | | | | | | | | | | | . | | | | | | | | | | | | | | | | | 8 | | | | | | | | | | | | | | | | | K | | | | | | | | +----+---+---------+----+---+-----+-----+-----+---+---+---+---+---+---+----+---+ | 32 | G | MMC | I | H | IN | H | VMM | 2 | 5 | G | I | M | I | | | | | P | 1_DAT0/ | NP | | PUT | | C(1 | 0 | 0 | P | / | M | / | | | | | I | GPIO_25 | UT | | | | .8V | K | K | I | O | C | O | | | | | O | | | | | | /3V | / | | O | | 1 | | | | | | _ | | | | | | /3. | 4 | | _ | | _ | | | | | | 2 | | | | | | 3V) | . | | 2 | | D | | | | | | 5 | | | | | | | 7 | | 5 | | A | | | | | | | | | | | | | K | | | | T | | | | | | | | | | | | | / | | | | 0 | | | | | | | | | | | | | 1 | | | | | | | | | | | | | | | | | . | | | | | | | | | | | | | | | | | 8 | | | | | | | | | | | | | | | | | K | | | | | | | | +----+---+---------+----+---+-----+-----+-----+---+---+---+---+---+---+----+---+ | 33 | G | MMC | I | H | IN | H | VMM | 2 | 5 | G | I | M | I | | | | | P | 1_DAT1/ | NP | | PUT | | C(1 | 0 | 0 | P | / | M | / | | | | | I | GPIO_26 | UT | | | | .8V | K | K | I | O | C | O | | | | | O | | | | | | /3V | / | | O | | 1 | | | | | | _ | | | | | | /3. | 4 | | _ | | _ | | | | | | 2 | | | | | | 3V) | . | | 2 | | D | | | | | | 6 | | | | | | | 7 | | 6 | | A | | | | | | | | | | | | | K | | | | T | | | | | | | | | | | | | / | | | | 1 | | | | | | | | | | | | | 1 | | | | | | | | | | | | | | | | | . | | | | | | | | | | | | | | | | | 8 | | | | | | | | | | | | | | | | | K | | | | | | | | +----+---+---------+----+---+-----+-----+-----+---+---+---+---+---+---+----+---+ | 28 | G | MMC | I | H | IN | H | VMM | 2 | 5 | G | I | M | I | | | | | P | 1_DAT2/ | NP | | PUT | | C(1 | 0 | 0 | P | / | M | / | | | | | I | GPIO_27 | UT | | | | .8V | K | K | I | O | C | O | | | | | O | | | | | | /3V | / | | O | | 1 | | | | | | _ | | | | | | /3. | 4 | | _ | | _ | | | | | | 2 | | | | | | 3V) | . | | 2 | | D | | | | | | 7 | | | | | | | 7 | | 7 | | A | | | | | | | | | | | | | K | | | | T | | | | | | | | | | | | | / | | | | 2 | | | | | | | | | | | | | 1 | | | | | | | | | | | | | | | | | . | | | | | | | | | | | | | | | | | 8 | | | | | | | | | | | | | | | | | K | | | | | | | | +----+---+---------+----+---+-----+-----+-----+---+---+---+---+---+---+----+---+ | 29 | G | MMC | I | H | IN | H | VMM | 2 | 5 | G | I | M | I | | | | | P | 1_DAT3/ | NP | | PUT | | C(1 | 0 | 0 | P | / | M | / | | | | | I | GPIO_28 | UT | | | | .8V | K | K | I | O | C | O | | | | | O | | | | | | /3V | / | | O | | 1 | | | | | | _ | | | | | | /3. | 4 | | _ | | _ | | | | | | 2 | | | | | | 3V) | . | | 2 | | D | | | | | | 8 | | | | | | | 7 | | 8 | | A | | | | | | | | | | | | | K | | | | T | | | | | | | | | | | | | / | | | | 3 | | | | | | | | | | | | | 1 | | | | | | | | | | | | | | | | | . | | | | | | | | | | | | | | | | | 8 | | | | | | | | | | | | | | | | | K | | | | | | | | +----+---+---------+----+---+-----+-----+-----+---+---+---+---+---+---+----+---+ 相关AT指令 ---------- AT指令不支持gpio接口操作 LUAT开发相关接口 ---------------- 相关示例,请参考:raw-latex:`\script`\_LuaTask_VX.X.X:raw-latex:`\demo`:raw-latex:`\gpio` pio --- 管脚操作 pio.pin.setdir() ~~~~~~~~~~~~~~~~ 设置管脚的描述 - 语法 ``pio.pin.setdir( direction,pin1,pin2,...,pinn)`` - 参数 ========== =============================================== 参数 释义 ========== =============================================== direction 管脚描述,可选pio.INPUT , pio.OUTPUT, pio.INT pin1 第一个管脚 pin2(可选) 第二个管脚 pinn(可选) 第n个管脚 ========== =============================================== - 返回值 无 pio.pin.setval() ~~~~~~~~~~~~~~~~ 设置管脚的值 - 语法 ``pio.pin.setval(value,pin1,pin2,...,pinn)`` - 参数 ========== ================ 参数 释义 ========== ================ value 管脚值,可选0或1 pin1 第一个管脚 pin2(可选) 第二个管脚 pinn(可选) 第n个管脚 ========== ================ - 返回值 无 pio.pin.getval() ~~~~~~~~~~~~~~~~ 读取管脚的值 - 语法 ``val1, val2, ..., valn = pio.pin.getval( pin1, pin2, ..., pinn )`` - 参数 ========== ========== 参数 释义 ========== ========== pin1 第一个管脚 pin2(可选) 第二个管脚 pinn(可选) 第n个管脚 ========== ========== - 返回值 number类型,0表示低电平,1表示高电平 pio.pin.sethigh() ~~~~~~~~~~~~~~~~~ 设置管脚为高电平(1) - 语法 ``pio.pin.sethigh(pin1,pin2,...,pinn)`` - 参数 ========== ========== 参数 释义 ========== ========== pin1 第一个管脚 pin2(可选) 第二个管脚 pinn(可选) 第n个管脚 ========== ========== - 返回值 无 pio.pin.setlow() ~~~~~~~~~~~~~~~~ 设置管脚为低电平(0) - 语法 ``pio.pin.setlow(pin1,pin2,...,pinn)`` - 参数 ========== ========== 参数 释义 ========== ========== pin1 第一个管脚 pin2(可选) 第二个管脚 pinn(可选) 第n个管脚 ========== ========== - 返回值 无 pio.pin.setpull() ~~~~~~~~~~~~~~~~~ 配置IO口默认状态 - 语法 ``pio.pin.setpull(method,pin)`` - 参数 ====== ================================================================= 参数 释义 ====== ================================================================= method pio.PULLUP:上拉模式 。pio.PULLDOWN:下拉模式。pio.NOPULL:高阻态 pin 配置管脚 ====== ================================================================= - 返回值 无 - 例子 .. code:: c pio.pin.setpull(pio.PULLUP,pio.P0_5) --配置为上拉 --pio.pin.setpull(pio.PULLDOWN,pio.P0_5) --配置为下拉 --pio.pin.setpull(pio.NOPULL,pio.P0_5) --不配置上下拉 .. rubric:: pio.pin.setdebounce() :name: pio.pin.setdebounce 配置IO口消抖时间 - 语法 ``pio.pin.setdebounce(ms)`` - 参数 ==== =============================================== 参数 释义 ==== =============================================== ms 延时消抖时间,0为关闭消抖功能,开机后默认为20ms ==== =============================================== - 返回值 无 - 例子 :: pio.pin.setdebounce(20) --延时消抖设置为20ms pio.pin.setdebounce(5) --延时消抖设置为5ms pio.pin.setdebounce(0) --关闭延时消抖功能 相关资料以及购买链接 -------------------- 相关开发板购买链接 `Air720开发板 `__ `相关软件资料下载 `__ 常见问题 -------- https://luatdoc.papapoi.com/628/