Lines Matching defs:pin
81 * Configure a given pin to the GPIO-OUT function and sets its level.
82 * The port is given as a capital letter, the pin is the number within
84 * So to set pin PC7 to high, use: sunxi_set_gpio_out('C', 7, true);
86 void sunxi_set_gpio_out(char port, int pin, bool level_high)
97 /* Set the new level first before configuring the pin. */
99 mmio_setbits_32(port_base + 0x10, BIT(pin));
101 mmio_clrbits_32(port_base + 0x10, BIT(pin));
103 /* configure pin as GPIO out (4(3) bits per pin, 1: GPIO out */
104 mmio_clrsetbits_32(port_base + (pin / 8) * 4,
105 0x7 << ((pin % 8) * 4),
106 0x1 << ((pin % 8) * 4));