|
APM:Libraries
|
Go to the source code of this file.
Classes | |
| struct | gpio_dev |
Macros | |
| #define | Bit_RESET 0 |
| #define | Bit_SET 1 |
Typedefs | |
| typedef enum gpio_pin_mode | gpio_pin_mode |
| GPIO Pin modes. More... | |
| typedef struct gpio_dev | gpio_dev |
Enumerations | |
| enum | gpio_pin_mode { GPIO_INPUT_FLOATING, GPIO_OUTPUT_PP, GPIO_AF_OUTPUT_PP, GPIO_INPUT_ANALOG, GPIO_INPUT_PD, GPIO_INPUT_PU, GPIO_OUTPUT_OD, GPIO_OUTPUT_OD_PU, GPIO_AF_OUTPUT_OD, GPIO_AF_OUTPUT_OD_PU, GPIO_PIN_MODE_LAST } |
| GPIO Pin modes. More... | |
| enum | GPIOSpeed_t { GPIO_speed_2MHz = 0x00, GPIO_speed_25MHz = 0x01, GPIO_speed_50MHz = 0x02, GPIO_speed_100MHz = 0x03 } |
Functions | |
| void | gpio_init (const gpio_dev *const dev) |
| void | gpio_init_all (void) |
| void | gpio_set_mode (const gpio_dev *const dev, uint8_t pin, gpio_pin_mode mode) |
| static void | gpio_set_af_mode (const gpio_dev *const dev, uint8_t pin, uint8_t mode) |
| static INLINE void | gpio_write_bit (const gpio_dev *const dev, uint8_t pin, uint8_t val) |
| static INLINE uint8_t | gpio_read_bit (const gpio_dev *const dev, uint8_t pin) |
| static void | gpio_toggle_bit (const gpio_dev *const dev, uint8_t pin) |
| static afio_exti_port | gpio_exti_port (const gpio_dev *const dev) |
| static void | gpio_set_speed (const gpio_dev *const dev, uint8_t pin, GPIOSpeed_t gpio_speed) |
| static void | afio_exti_select (afio_exti_port gpio_port, afio_exti_num pin) |
Variables | |
| const gpio_dev | gpioa |
| const gpio_dev *const | _GPIOA |
| const gpio_dev | gpiob |
| const gpio_dev *const | _GPIOB |
| const gpio_dev | gpioc |
| const gpio_dev *const | _GPIOC |
| const gpio_dev | gpiod |
| const gpio_dev *const | _GPIOD |
| const gpio_dev | gpioe |
| const gpio_dev *const | _GPIOE |
| const gpio_dev | gpiof |
| const gpio_dev *const | _GPIOF |
| const gpio_dev | gpiog |
| const gpio_dev *const | _GPIOG |
| #define Bit_RESET 0 |
Definition at line 39 of file gpio_hal.h.
Referenced by gpio_read_bit().
| #define Bit_SET 1 |
Definition at line 40 of file gpio_hal.h.
Referenced by gpio_read_bit().
| typedef enum gpio_pin_mode gpio_pin_mode |
GPIO Pin modes.
These only allow for 50MHZ max output speeds; if you want slower, use direct register access.
| enum gpio_pin_mode |
GPIO Pin modes.
These only allow for 50MHZ max output speeds; if you want slower, use direct register access.
Definition at line 23 of file gpio_hal.h.
| enum GPIOSpeed_t |
| Enumerator | |
|---|---|
| GPIO_speed_2MHz | Low speed |
| GPIO_speed_25MHz | Medium speed |
| GPIO_speed_50MHz | Fast speed |
| GPIO_speed_100MHz | High speed on 30 pF (80 MHz Output max speed on 15 pF) |
Definition at line 42 of file gpio_hal.h.
|
inlinestatic |
Definition at line 168 of file gpio_hal.h.
Referenced by exti_attach_interrupt(), and exti_attach_interrupt_pri().
|
inlinestatic |
Definition at line 153 of file gpio_hal.h.
Referenced by F4Light::GPIO::_attach_interrupt().
| void gpio_init | ( | const gpio_dev *const | dev | ) |
Initialize a GPIO device.
| void gpio_init_all | ( | void | ) |
Initialize and reset all available GPIO devices.
Definition at line 90 of file gpio_hal.c.
Referenced by F4Light::GPIO::init().
Definition at line 130 of file gpio_hal.h.
Referenced by F4Light::DigitalSource::_read(), F4Light::GPIO::_read(), i2c_bus_reset(), is_usb_connected(), and F4Light::GPIO::usb_connected().
|
inlinestatic |
Set the alternate function mode of a GPIO pin.
| dev | GPIO device. |
| pin | Pin on the device whose mode to set, 0–15. |
| mode | alternate function mode to set the pin to. |
Definition at line 102 of file gpio_hal.h.
Referenced by F4Light::GPIO::_pinMode(), F4Light::UARTDriver::begin(), i2c_lowLevel_init(), pwmInitializeInput(), spi_gpio_master_cfg(), and usb_periphcfg().
| void gpio_set_mode | ( | const gpio_dev *const | dev, |
| uint8_t | pin, | ||
| gpio_pin_mode | mode | ||
| ) |
Set the mode of a GPIO pin.
Definition at line 125 of file gpio_hal.c.
Referenced by F4Light::GPIO::_pinMode(), F4Light::UARTDriver::begin(), boardInit(), i2c_master_release_bus(), F4Light::SPIDevice::init(), Soft_I2C::init_hw(), F4Light::DigitalSource::mode(), pwmInitializeInput(), F4Light::AnalogSource::setup_read(), spi_gpio_master_cfg(), spi_gpio_slave_cfg(), F4Light::AnalogSource::stop_read(), usb_close(), usb_periphcfg(), and usb_setParams().
|
inlinestatic |
Definition at line 161 of file gpio_hal.h.
Referenced by F4Light::GPIO::_pinMode(), F4Light::GPIO::_setSpeed(), F4Light::SPIDevice::init(), Soft_I2C::init_hw(), F4Light::DigitalSource::mode(), and spi_gpio_master_cfg().
|
inlinestatic |
Definition at line 145 of file gpio_hal.h.
Referenced by F4Light::GPIO::_toggle(), and F4Light::DigitalSource::toggle().
Definition at line 115 of file gpio_hal.h.
Referenced by __attribute__(), F4Light::DigitalSource::_write(), F4Light::GPIO::_write(), boardInit(), i2c_bus_reset(), i2c_master_release_bus(), F4Light::SPIDevice::init(), F4Light::AnalogSource::setup_read(), and F4Light::AnalogSource::stop_read().
| const gpio_dev* const _GPIOA |
| const gpio_dev* const _GPIOB |
GPIO port B device.
Definition at line 31 of file gpio_hal.c.
| const gpio_dev* const _GPIOC |
GPIO port C device.
Definition at line 39 of file gpio_hal.c.
| const gpio_dev* const _GPIOD |
GPIO port D device.
Definition at line 47 of file gpio_hal.c.
| const gpio_dev* const _GPIOE |
GPIO port E device.
Definition at line 55 of file gpio_hal.c.
| const gpio_dev* const _GPIOF |
GPIO port F device.
Definition at line 63 of file gpio_hal.c.
| const gpio_dev* const _GPIOG |
GPIO port G device.
Definition at line 71 of file gpio_hal.c.
| const gpio_dev gpioa |
Definition at line 17 of file gpio_hal.c.
| const gpio_dev gpiob |
Definition at line 25 of file gpio_hal.c.
| const gpio_dev gpioc |
Definition at line 33 of file gpio_hal.c.
| const gpio_dev gpiod |
Definition at line 41 of file gpio_hal.c.
| const gpio_dev gpioe |
Definition at line 49 of file gpio_hal.c.
| const gpio_dev gpiof |
Definition at line 57 of file gpio_hal.c.
| const gpio_dev gpiog |
Definition at line 65 of file gpio_hal.c.
1.8.13