|
enum | gpio_pin_mode_t {
GPIO_PMODE_INPUT,
GPIO_PMODE_OUTPUT,
GPIO_PMODE_ANALOG,
GPIO_PMODE_ALT_FUNC
} |
|
enum | gpio_output_mode_t { GPIO_OMODE_OPEN_DRAIN,
GPIO_OMODE_PUSH_PULL
} |
|
enum | gpio_pupd_t { GPIO_PUPD_NONE,
GPIO_PUPD_UP,
GPIO_PUPD_DOWN
} |
|
enum | gpio_output_speed_t {
GPIO_OSPEED_LOW,
GPIO_OSPEED_MED,
GPIO_OSPEED_HIGH,
GPIO_OSPEED_VHIGH
} |
|
enum | gpio_irq_mode_t {
GPIO_IRQ_MODE_NONE,
GPIO_IRQ_MODE_FALLING,
GPIO_IRQ_MODE_RISING,
GPIO_IRQ_MODE_BOTH
} |
|
|
void | gpio_cfg_pin (gpio_port_t port, uint8_t pin, gpio_pin_mode_t mode, gpio_output_mode_t omode, gpio_pupd_t pull, gpio_output_speed_t speed, uint8_t alt) |
| Configures the behavior of a particular pin. More...
|
|
void | gpio_set_pin (gpio_port_t port, uint8_t pin, uint8_t state) |
| Sets the state of a particular pin configured in output mode. More...
|
|
void | gpio_toggle_pin (gpio_port_t port, uint8_t pin) |
| Toggles the state of a particular pin configured in output mode. More...
|
|
uint8_t | gpio_get_pin (gpio_port_t port, uint8_t pin) |
| Gets the state of a particular pin. More...
|
|
void | gpio_config_irq (gpio_port_t port, uint8_t pin, gpio_irq_mode_t mode) |
| Configures the IRQ mode of a pin. More...
|
|
GPIO driver.
Copyright (c) 2018, Archos S.A. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of Archos nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND AND EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARCHOS S.A. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.