Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
board.c File Reference
#include "hal.h"
#include "stm32_gpio.h"
+ Include dependency graph for board.c:

Go to the source code of this file.

Data Structures

struct  gpio_setup_t
 Type of STM32 GPIO port setup. More...
 
struct  gpio_config_t
 Type of STM32 GPIO initialization data. More...
 

Functions

static void gpio_init (stm32_gpio_t *gpiop, const gpio_setup_t *config)
 
static void stm32_gpio_init (void)
 
void __early_init (void)
 Early initialization code. More...
 
void boardInit (void)
 Board-specific initialization code. More...
 
void mcu_periph_energy_save (void)
 Energy saving procedure for SD log closing. More...
 

Variables

static const gpio_config_t gpio_default_config
 STM32 GPIO static initialization data. More...
 

Data Structure Documentation

◆ gpio_setup_t

struct gpio_setup_t

Type of STM32 GPIO port setup.

Definition at line 40 of file board.c.

Data Fields
uint32_t afrh
uint32_t afrl
uint32_t moder
uint32_t odr
uint32_t ospeedr
uint32_t otyper
uint32_t pupdr

◆ gpio_config_t

struct gpio_config_t

Type of STM32 GPIO initialization data.

Definition at line 53 of file board.c.

Function Documentation

◆ __early_init()

void __early_init ( void  )

Early initialization code.

GPIO ports and system clocks are initialized before everything else.

Definition at line 210 of file board.c.

References stm32_gpio_init().

+ Here is the call graph for this function:

◆ boardInit()

void boardInit ( void  )

Board-specific initialization code.

Todo:
Add your board-specific code, if any.

Definition at line 261 of file board.c.

◆ gpio_init()

static void gpio_init ( stm32_gpio_t *  gpiop,
const gpio_setup_t config 
)
static

Definition at line 143 of file board.c.

References config.

Referenced by stm32_gpio_init().

+ Here is the caller graph for this function:

◆ mcu_periph_energy_save()

void mcu_periph_energy_save ( void  )

Energy saving procedure for SD log closing.

Call board specific energy saving Can be necessary for closing on power off.

Definition at line 266 of file board.c.

References LINE_AUX1, LINE_AUX2, LINE_AUX3, LINE_AUX4, LINE_LED1, LINE_LED2, LINE_LED3, LINE_LED4, and LINE_SPI1_CS.

◆ stm32_gpio_init()

static void stm32_gpio_init ( void  )
static

Definition at line 154 of file board.c.

References gpio_default_config, gpio_init(), GPIOA, GPIOB, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, and GPIOH.

Referenced by __early_init().

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

Variable Documentation

◆ gpio_default_config

const gpio_config_t gpio_default_config
static

STM32 GPIO static initialization data.

Definition at line 92 of file board.c.

Referenced by stm32_gpio_init().