Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
power_switch.c File Reference
#include "power_switch.h"
#include "mcu_periph/gpio.h"
#include "generated/airframe.h"
+ Include dependency graph for power_switch.c:

Go to the source code of this file.

Functions

void power_switch_init (void)
 Intialize the power switch pins This sets the power switch pins to te initial state. More...
 
void power_switch_set (bool val)
 Set the power switch to enable/disable. More...
 

Variables

bool power_switch_status = false
 

Detailed Description

Author
F. van Tienen Simple GPIO power switch module

Definition in file power_switch.c.

Function Documentation

◆ power_switch_init()

void power_switch_init ( void  )

Intialize the power switch pins This sets the power switch pins to te initial state.

Definition at line 39 of file power_switch.c.

References gpio_clear(), gpio_setup_output(), POWER_SWITCH_GPIO, and power_switch_set().

+ Here is the call graph for this function:

◆ power_switch_set()

void power_switch_set ( bool  val)

Set the power switch to enable/disable.

Parameters
valTrue enables the pin, False disables the pin

Definition at line 53 of file power_switch.c.

References gpio_clear(), gpio_set(), POWER_SWITCH_GPIO, power_switch_status, and val.

Referenced by power_switch_init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ power_switch_status

bool power_switch_status = false

Definition at line 29 of file power_switch.c.

Referenced by power_switch_set().