ARMEBS4  revision-26.06.2015
Data Structures | Macros | Enumerations | Functions
stm32_gpio.h File Reference

board specific defines More...

#include <stdint.h>
#include <string.h>
#include "heivs/error.h"
#include "stm32/stm32f4xx_gpio.h"
Include dependency graph for stm32_gpio.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  gpio_t
 GPIO control structure. More...
 

Macros

#define GPIO_NC
 Unconnected pin.
 
#define DEF_GPIOA(__PIN, __MODE)
 Helper for defining a pin. More...
 
#define DEF_GPIOB(__PIN, __MODE)
 same as DEF_GPIOA for port B
 
#define DEF_GPIOC(__PIN, __MODE)
 same as DEF_GPIOA for port C
 
#define DEF_GPIOD(__PIN, __MODE)
 same as DEF_GPIOA for port D
 
#define DEF_GPIOE(__PIN, __MODE)
 same as DEF_GPIOA for port E
 
#define DEF_GPIOF(__PIN, __MODE)
 same as DEF_GPIOA for port F
 
#define DEF_GPIOG(__PIN, __MODE)
 same as DEF_GPIOA for port G
 
#define DEF_GPIOH(__PIN, __MODE)
 same as DEF_GPIOA for port H
 
#define DEF_GPIOI(__PIN, __MODE)
 same as DEF_GPIOA for port I
 

Enumerations

enum  gpio_mode_e {
  GPIO_INPUT,
  GPIO_OUTPUT,
  GPIO_OUTPUT_0,
  GPIO_OUTPUT_1,
  GPIO_AF,
  GPIO_AN,
  GPIO_PP,
  GPIO_OD,
  GPIO_SPEED_2,
  GPIO_SPEED_25,
  GPIO_SPEED_50,
  GPIO_SPEED_100,
  GPIO_NOPULL,
  GPIO_PULLUP,
  GPIO_PULLDOWN
}
 GPIO modes, can be ORed. More...
 

Functions

status_e gpio_setup (const struct gpio_t *gpio)
 Setup a gpio. More...
 
status_e gpio_setup_list (const struct gpio_t gpio[], size_t len)
 Setup an array of gpio. More...
 
static GPIO_TypeDef_internal_gpio_get_ctrl (const struct gpio_t *gpio)
 Get the gpio controller given the gpio struct.
 
static void gpio_toggle (const struct gpio_t *gpio)
 Toggle a gpio line. More...
 
static uint32_t gpio_get (const struct gpio_t *gpio)
 Get gpio level. More...
 
static uint32_t gpio_get_internal (const struct gpio_t *gpio)
 Get gpio internal level. More...
 
static void gpio_set (const struct gpio_t *gpio, uint32_t value)
 Set a gpio. More...
 
static void gpio_set_direction (const struct gpio_t *gpio, enum gpio_mode_e dir)
 Set a gpio direction. More...
 

Detailed Description

board specific defines

Author
marc dot pignat at hevs dot ch

Definition in file stm32_gpio.h.