31#include "generated/airframe.h"
32#include "generated/modules.h"
37#if (!defined BAT_CHECKER_GPIO && !defined BAT_CHECKER_LED)
38#error You must define BAT_CHECKER_GPIO or BAT_CHECKER_LED in your airframe file.
42#ifndef BAT_CHECKER_GPIO_ON
43#define BAT_CHECKER_GPIO_ON gpio_set
45#ifndef BAT_CHECKER_GPIO_OFF
46#define BAT_CHECKER_GPIO_OFF gpio_clear
55#ifdef BAT_CHECKER_GPIO
67#ifdef BAT_CHECKER_GPIO
74#ifdef BAT_CHECKER_GPIO
81#ifdef BAT_CHECKER_GPIO
void init_bat_checker(void)
void bat_checker_periodic(void)
#define BAT_CHECKER_GPIO_ON
#define BAT_CHECKER_GPIO_OFF
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_toggle(ioportid_t port, uint16_t pin)
Toggle a gpio output to low level.
struct Electrical electrical
Interface for electrical status: supply voltage, current, battery status, etc.
bool bat_low
battery low status
bool bat_critical
battery critical status
Some architecture independent helper functions for GPIOs.
arch independent LED (Light Emitting Diodes) API