Paparazzi UAS
v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
|
gpio functions implemented for ChibiOS arch More...
Go to the source code of this file.
Typedefs | |
typedef ioportid_t | gpio_port_t |
Abstract gpio port type for hardware independent part. More... | |
Functions | |
void | gpio_setup_output (ioportid_t port, uint16_t gpios) |
Setup one or more pins of the given GPIO port as outputs. More... | |
void | gpio_setup_input (ioportid_t port, uint16_t gpios) |
Setup one or more pins of the given GPIO port as inputs. More... | |
void | gpio_setup_input_pullup (ioportid_t port, uint16_t gpios) |
Setup one or more pins of the given GPIO port as inputs with pull up resistor enabled. More... | |
void | gpio_setup_input_pulldown (ioportid_t port, uint16_t gpios) |
Setup one or more pins of the given GPIO port as inputs with pull down resistors enabled. More... | |
void | gpio_setup_pin_af (ioportid_t port, uint16_t pin, uint8_t af, bool is_output) |
Setup a gpio for input or output with alternate function. More... | |
void | gpio_setup_pin_analog (ioportid_t port, uint16_t pin) |
Setup a gpio for analog use. More... | |
static uint8_t | gpio_get (ioportid_t port, uint16_t pin) |
Get level of a gpio. More... | |
static void | gpio_set (ioportid_t port, uint16_t pin) |
Set a gpio output to high level. More... | |
static void | gpio_clear (ioportid_t port, uint16_t pin) |
Clear a gpio output to low level. More... | |
static void | gpio_toggle (ioportid_t port, uint16_t pin) |
Toggle a gpio output to low level. More... | |
gpio functions implemented for ChibiOS arch
Definition in file gpio_arch.h.
typedef ioportid_t gpio_port_t |
Abstract gpio port type for hardware independent part.
Definition at line 39 of file gpio_arch.h.
|
inlinestatic |
Clear a gpio output to low level.
[in] | port | |
[in] | pin |
Definition at line 108 of file gpio_arch.h.
Referenced by actuators_ardrone_init(), actuators_ardrone_motor_status(), actuators_ardrone_reset_flipflop(), autopilot_init(), autopilot_set_power_switch(), baro_init(), bluegiga_broadcast_msg(), cyrf6936_init(), humid_sht_init(), mag_freeze_check(), main(), main_event(), softi2c_gpio_drive_low(), spi_slave_select(), SpiSlaveSelect(), vms_ecu_demo_periodic(), and w5100_init().
Get level of a gpio.
[in] | port | |
[in] | pin |
Definition at line 88 of file gpio_arch.h.
Referenced by actuators_ardrone_motor_status(), baro_eoc(), handle_uart_tx(), imu_aspirin_eoc(), mag_eoc(), main_event(), mcu_init(), opa_controller_periodic(), softi2c_gpio_read(), softi2c_read_bit(), softi2c_write_bit(), softi2c_write_restart(), softi2c_write_stop(), spektrum_try_bind(), and superbitrf_event().
|
inlinestatic |
Set a gpio output to high level.
[in] | port | |
[in] | pin |
Definition at line 98 of file gpio_arch.h.
Referenced by actuators_ardrone_init(), actuators_ardrone_motor_status(), actuators_ardrone_reset_flipflop(), autopilot_set_power_switch(), bluegiga_init(), bluegiga_receive(), can_hw_init(), cyrf6936_init(), imu_aspirin_i2c_init(), mag_freeze_check(), main_event(), mf_ptu_init(), ms2100_arch_init(), navdata_init(), softi2c_gpio_highz(), spektrum_bind(), spi_slave_unselect(), SpiSlaveUnselect(), vms_ecu_demo_periodic(), and w5100_init().
void gpio_setup_input | ( | ioportid_t | port, |
uint16_t | gpios | ||
) |
Setup one or more pins of the given GPIO port as inputs.
[in] | port | |
[in] | gpios |
Definition at line 40 of file gpio_arch.c.
Referenced by actuators_ardrone_init(), humid_sht_init(), mcu_init(), opa_controller_init(), softi2c_gpio_highz(), spektrum_bind(), and superbitrf_init().
void gpio_setup_input_pulldown | ( | ioportid_t | port, |
uint16_t | gpios | ||
) |
Setup one or more pins of the given GPIO port as inputs with pull down resistors enabled.
[in] | port | |
[in] | gpios |
Definition at line 54 of file gpio_arch.c.
Referenced by baro_init(), and spektrum_try_bind().
void gpio_setup_input_pullup | ( | ioportid_t | port, |
uint16_t | gpios | ||
) |
Setup one or more pins of the given GPIO port as inputs with pull up resistor enabled.
[in] | port | |
[in] | gpios |
Definition at line 47 of file gpio_arch.c.
Referenced by main(), softi2c_gpio_highz(), and spektrum_try_bind().
void gpio_setup_output | ( | ioportid_t | port, |
uint16_t | gpios | ||
) |
Setup one or more pins of the given GPIO port as outputs.
[in] | port | |
[in] | gpios |
Definition at line 33 of file gpio_arch.c.
Referenced by actuators_ardrone_init(), actuators_ardrone_motor_status(), actuators_ardrone_reset_flipflop(), autopilot_init(), bluegiga_init(), cyrf6936_init(), gpio_cam_ctrl_init(), gps_init(), hackhd_init(), humid_sht_init(), imu_aspirin_i2c_init(), imu_init(), init_bat_checker(), init_mf_daq(), main(), mcu_init(), mf_ptu_init(), navdata_init(), opa_controller_init(), radio_control_impl_init(), rotorcraft_cam_init(), sbus_common_init(), softi2c_gpio_drive_low(), spektrum_bind(), spi_init_slaves(), and w5100_init().
Setup a gpio for input or output with alternate function.
This is an STM32 specific helper funtion and should only be used in stm32 code.
Definition at line 61 of file gpio_arch.c.
Referenced by actuators_dshot_arch_init(), actuators_dualpwm_arch_init(), actuators_pwm_arch_init(), light_ws2812_arch_init(), ppm_arch_init(), pwm_input_init(), spi1_arch_init(), and spi2_arch_init().
void gpio_setup_pin_analog | ( | ioportid_t | port, |
uint16_t | pin | ||
) |
Setup a gpio for analog use.
[in] | port | |
[in] | pin |
Definition at line 86 of file gpio_arch.c.
Referenced by adc_init().
|
inlinestatic |
Toggle a gpio output to low level.
[in] | port | |
[in] | pin |
Definition at line 118 of file gpio_arch.h.
Referenced by bat_checker_periodic(), and spektrum_bind().