PHiLIP
gpio.c File Reference

GPIO management. More...

#include <errno.h>
#include "stm32f1xx_hal.h"
#include "PHiLIP_typedef.h"
#include "app_common.h"
#include "port.h"
#include "trace.h"
#include "uart.h"
#include "spi.h"
#include "gpio.h"

Data Structures

struct  gpio_dev
 Parameters for gpio control. More...
 

Enumerations

enum  GPIO_IO_TYPE { GPIO_IN, GPIO_OUT_PP, GPIO_OUT_OD, GPIO_INTERRUPT }
 enum for the type of gpio setting. More...
 

Functions

void init_gpio (map_t *reg)
 Initializes gpio directions, states and interrupt settings. More...
 
error_t commit_debug ()
 Commits the gpio registers and executes operations. More...
 
error_t init_basic_gpio (basic_gpio_t gpio, GPIO_TypeDef *port, uint32_t pin)
 Initializes a basic gpio. More...
 
void update_debug_inputs ()
 Updates the DEBUG input levels.
 
void GPIO_DEBUG0_INT ()
 Interrupt for the DEBUG0 triggering when interrupt mode set.
 
void GPIO_DEBUG1_INT ()
 Interrupt for the DEBUG1 triggering when interrupt mode set.
 
void GPIO_DEBUG2_INT ()
 Interrupt for the DEBUG2 triggering when interrupt mode set.
 

Detailed Description

GPIO management.

Author
Kevin Weiss
Date
18.02.2019

Controls all basic GPIO functions such as interrupts and initialization. The interrupt mode of the GPIO can log ticks at a rate of 100kHz, any faster and logs will be missed.