28#include "generated/airframe.h"
31#if !defined(POWER_SWITCH_GPIO)
32#error "The power switch module needs POWER_SWITCH_GPIO to be defined"
41#ifdef POWER_SWITCH_ENABLE
#define POWER_SWITCH_GPIO
void gpio_setup_output(ioportid_t port, uint16_t gpios)
Setup one or more pins of the given GPIO port as outputs.
static void gpio_set(ioportid_t port, uint16_t pin)
Set a gpio output to high level.
static void gpio_clear(ioportid_t port, uint16_t pin)
Clear a gpio output to low level.
Some architecture independent helper functions for GPIOs.
void power_switch_set(bool val)
Set the power switch to enable/disable.
void power_switch_init(void)
Intialize the power switch pins This sets the power switch pins to te initial state.