![]() |
Imt.Base C++ API V4.1.1.0
|
#include <Imt.Base.Core.Diagnostics/Diagnostics.h>
#include <Imt.Base.Core.Platform/Platform.h>
#include <Imt.Base.Core.Util/ReadOnlyPolicy.h>
#include <Imt.Base.Core.Util/ReadWritePolicy.h>
#include <Imt.Base.Core.Util/Register.h>
#include <Imt.Base.Core.Util/WriteOnlyPolicy.h>
#include "SystemMemoryMap.h"
Go to the source code of this file.
Classes | |
struct | gpio_base_addr< GPIOA > |
struct | gpio_base_addr< GPIOB > |
struct | gpio_base_addr< GPIOC > |
struct | gpio_base_addr< GPIOD > |
struct | gpio_base_addr< GPIOE > |
struct | gpio< base > |
struct | gpio< base >::BSRR |
struct | gpio< base >::CRL |
struct | gpio< base >::CRH |
struct | gpio< base >::ODR |
struct | GPIO_InitStruct |
GPIO Init structure definition. More... | |
Macros | |
#define | GPIO_Pin_0 ((uint16_t)0x0001) |
Definition of GPIO pins. | |
#define | GPIO_Pin_1 ((uint16_t)0x0002) |
#define | GPIO_Pin_2 ((uint16_t)0x0004) |
#define | GPIO_Pin_3 ((uint16_t)0x0008) |
#define | GPIO_Pin_4 ((uint16_t)0x0010) |
#define | GPIO_Pin_5 ((uint16_t)0x0020) |
#define | GPIO_Pin_6 ((uint16_t)0x0040) |
#define | GPIO_Pin_7 ((uint16_t)0x0080) |
#define | GPIO_Pin_8 ((uint16_t)0x0100) |
#define | GPIO_Pin_9 ((uint16_t)0x0200) |
#define | GPIO_Pin_10 ((uint16_t)0x0400) |
#define | GPIO_Pin_11 ((uint16_t)0x0800) |
#define | GPIO_Pin_12 ((uint16_t)0x1000) |
#define | GPIO_Pin_13 ((uint16_t)0x2000) |
#define | GPIO_Pin_14 ((uint16_t)0x4000) |
#define | GPIO_Pin_15 ((uint16_t)0x8000) |
#define | GPIO_Pin_All ((uint16_t)0xFFFF) |
Enumerations | |
enum | GpioName { GPIOA = 0 , GPIOB = 1 , GPIOC = 2 , GPIOD = 3 , GPIOE = 4 } |
Enumeration of the available GPIO modules addresses. More... | |
enum | GPIO_ModuleAddress { GPIO_ModuleAddress_GPIOA = GPIOA_BASE , GPIO_ModuleAddress_GPIOB = GPIOB_BASE , GPIO_ModuleAddress_GPIOC = GPIOC_BASE , GPIO_ModuleAddress_GPIOD = GPIOD_BASE , GPIO_ModuleAddress_GPIOE = GPIOE_BASE } |
General-purpose and alternate-function I/Os (GPIO) peripheral module. More... | |
enum | GPIO_Speed { GPIO_Speed_10MHz = 1 , GPIO_Speed_2MHz , GPIO_Speed_50MHz } |
Output Maximum frequency selection. More... | |
enum | GPIO_Mode { GPIO_Mode_AIN = 0x0 , GPIO_Mode_IN_FLOATING = 0x04 , GPIO_Mode_IPD = 0x28 , GPIO_Mode_IPU = 0x48 , GPIO_Mode_Out_OD = 0x14 , GPIO_Mode_Out_PP = 0x10 , GPIO_Mode_AF_OD = 0x1C , GPIO_Mode_AF_PP = 0x18 } |
Configuration Mode enumeration. More... | |
enum | GPIO_PortSource { GPIO_PortSourceA = ((uint8_t)0x00) , GPIO_PortSourceB = ((uint8_t)0x01) , GPIO_PortSourceC = ((uint8_t)0x02) , GPIO_PortSourceD = ((uint8_t)0x03) , GPIO_PortSourceE = ((uint8_t)0x04) , GPIO_PortSourceF = ((uint8_t)0x05) , GPIO_PortSourceG = ((uint8_t)0x06) } |
Definition of GPIO ports. More... | |
enum | GPIO_PinSource { GPIO_PinSource0 = ((uint8_t)0x00) , GPIO_PinSource1 = ((uint8_t)0x01) , GPIO_PinSource2 = ((uint8_t)0x02) , GPIO_PinSource3 = ((uint8_t)0x03) , GPIO_PinSource4 = ((uint8_t)0x04) , GPIO_PinSource5 = ((uint8_t)0x05) , GPIO_PinSource6 = ((uint8_t)0x06) , GPIO_PinSource7 = ((uint8_t)0x07) , GPIO_PinSource8 = ((uint8_t)0x08) , GPIO_PinSource9 = ((uint8_t)0x09) , GPIO_PinSource10 = ((uint8_t)0x0A) , GPIO_PinSource11 = ((uint8_t)0x0B) , GPIO_PinSource12 = ((uint8_t)0x0C) , GPIO_PinSource13 = ((uint8_t)0x0D) , GPIO_PinSource14 = ((uint8_t)0x0E) , GPIO_PinSource15 = ((uint8_t)0x0F) } |
Definition of pin source. More... | |
enum | GPIO_Remap { GPIO_Remap_I2C1 = ((uint32_t)0x00000001) , GPIO_Remap2_CAN1 = ((uint32_t)0x001D6000) , GPIO_Remap_SWJ_NoJTRST = ((uint32_t)0x00300100) } |
Definition of alternative function mappings. More... | |
Functions | |
void | GPIO_EXTILineConfig (GPIO_PortSource const portSource, GPIO_PinSource const pinSource) |
Selects the GPIO pin used as EXTI Line. | |
void | GPIO_PinRemapConfig (GPIO_Remap const remap, bool const doEnable) |
Changes the mapping of the specified pin. | |
void | GPIO_Init (GPIO_ModuleAddress const module, GPIO_InitStruct const *const pInitStruct) |
Initializes the GPIOx peripheral according to the specified parameters in the GPIO_InitStruct. | |
uint16_t | GPIO_GetBits (GPIO_ModuleAddress const module, uint16_t const mask) |
gets the selected data port bits. | |
void | GPIO_SetBits (GPIO_ModuleAddress const module, uint16_t const GPIO_Pin) |
Sets the selected data port bits. | |
void | GPIO_ResetBits (GPIO_ModuleAddress const module, uint16_t const GPIO_Pin) |
Clears the selected data port bits. | |
#define GPIO_Pin_0 ((uint16_t)0x0001) |
Definition of GPIO pins.
Definition at line 149 of file SystemPeripheralsGpio.h.
#define GPIO_Pin_1 ((uint16_t)0x0002) |
Definition at line 150 of file SystemPeripheralsGpio.h.
#define GPIO_Pin_10 ((uint16_t)0x0400) |
Definition at line 159 of file SystemPeripheralsGpio.h.
#define GPIO_Pin_11 ((uint16_t)0x0800) |
Definition at line 160 of file SystemPeripheralsGpio.h.
#define GPIO_Pin_12 ((uint16_t)0x1000) |
Definition at line 161 of file SystemPeripheralsGpio.h.
#define GPIO_Pin_13 ((uint16_t)0x2000) |
Definition at line 162 of file SystemPeripheralsGpio.h.
#define GPIO_Pin_14 ((uint16_t)0x4000) |
Definition at line 163 of file SystemPeripheralsGpio.h.
#define GPIO_Pin_15 ((uint16_t)0x8000) |
Definition at line 164 of file SystemPeripheralsGpio.h.
#define GPIO_Pin_2 ((uint16_t)0x0004) |
Definition at line 151 of file SystemPeripheralsGpio.h.
#define GPIO_Pin_3 ((uint16_t)0x0008) |
Definition at line 152 of file SystemPeripheralsGpio.h.
#define GPIO_Pin_4 ((uint16_t)0x0010) |
Definition at line 153 of file SystemPeripheralsGpio.h.
#define GPIO_Pin_5 ((uint16_t)0x0020) |
Definition at line 154 of file SystemPeripheralsGpio.h.
#define GPIO_Pin_6 ((uint16_t)0x0040) |
Definition at line 155 of file SystemPeripheralsGpio.h.
#define GPIO_Pin_7 ((uint16_t)0x0080) |
Definition at line 156 of file SystemPeripheralsGpio.h.
#define GPIO_Pin_8 ((uint16_t)0x0100) |
Definition at line 157 of file SystemPeripheralsGpio.h.
#define GPIO_Pin_9 ((uint16_t)0x0200) |
Definition at line 158 of file SystemPeripheralsGpio.h.
#define GPIO_Pin_All ((uint16_t)0xFFFF) |
Definition at line 166 of file SystemPeripheralsGpio.h.
enum GPIO_Mode |
Configuration Mode enumeration.
Enumerator | |
---|---|
GPIO_Mode_AIN | |
GPIO_Mode_IN_FLOATING | |
GPIO_Mode_IPD | |
GPIO_Mode_IPU | |
GPIO_Mode_Out_OD | |
GPIO_Mode_Out_PP | |
GPIO_Mode_AF_OD | |
GPIO_Mode_AF_PP |
Definition at line 118 of file SystemPeripheralsGpio.h.
enum GPIO_ModuleAddress |
General-purpose and alternate-function I/Os (GPIO) peripheral module.
Reference: ST_CortexM3_STM32F103_TRM_Rev15.pdf Chapter 9 Enumeration of the available GPIO modules
Enumerator | |
---|---|
GPIO_ModuleAddress_GPIOA | |
GPIO_ModuleAddress_GPIOB | |
GPIO_ModuleAddress_GPIOC | |
GPIO_ModuleAddress_GPIOD | |
GPIO_ModuleAddress_GPIOE |
Definition at line 98 of file SystemPeripheralsGpio.h.
enum GPIO_PinSource |
Definition of pin source.
Definition at line 184 of file SystemPeripheralsGpio.h.
enum GPIO_PortSource |
Definition of GPIO ports.
Enumerator | |
---|---|
GPIO_PortSourceA | |
GPIO_PortSourceB | |
GPIO_PortSourceC | |
GPIO_PortSourceD | |
GPIO_PortSourceE | |
GPIO_PortSourceF | |
GPIO_PortSourceG |
Definition at line 171 of file SystemPeripheralsGpio.h.
enum GPIO_Remap |
Definition of alternative function mappings.
Enumerator | |
---|---|
GPIO_Remap_I2C1 | |
GPIO_Remap2_CAN1 | |
GPIO_Remap_SWJ_NoJTRST |
Definition at line 206 of file SystemPeripheralsGpio.h.
enum GPIO_Speed |
Output Maximum frequency selection.
Enumerator | |
---|---|
GPIO_Speed_10MHz | |
GPIO_Speed_2MHz | |
GPIO_Speed_50MHz |
Definition at line 109 of file SystemPeripheralsGpio.h.
enum GpioName |
Enumeration of the available GPIO modules addresses.
Enumerator | |
---|---|
GPIOA | |
GPIOB | |
GPIOC | |
GPIOD | |
GPIOE |
Definition at line 18 of file SystemPeripheralsGpio.h.
void GPIO_EXTILineConfig | ( | GPIO_PortSource const | portSource, |
GPIO_PinSource const | pinSource | ||
) |
Selects the GPIO pin used as EXTI Line.
portSource | selects the GPIO port to be used as source for EXTI lines. |
pinSource | specifies the EXTI line to be configured. |
uint16_t GPIO_GetBits | ( | GPIO_ModuleAddress const | module, |
uint16_t const | mask | ||
) |
gets the selected data port bits.
module | where x can be (A..G) to select the GPIO peripheral. |
mask | specifies the port bits to be read. This parameter can be any combination of GPIO_Pin_x where x can be (0..15). |
void GPIO_Init | ( | GPIO_ModuleAddress const | module, |
GPIO_InitStruct const *const | pInitStruct | ||
) |
Initializes the GPIOx peripheral according to the specified parameters in the GPIO_InitStruct.
module | where x can be (A..G) to select the GPIO peripheral. |
pInitStruct | pointer to a GPIO_InitStruct structure that contains the configuration information for the specified GPIO peripheral. |
void GPIO_PinRemapConfig | ( | GPIO_Remap const | remap, |
bool const | doEnable | ||
) |
Changes the mapping of the specified pin.
remap | selects the pin to remap. |
doEnable | flag if enabled. |
void GPIO_ResetBits | ( | GPIO_ModuleAddress const | module, |
uint16_t const | GPIO_Pin | ||
) |
Clears the selected data port bits.
module | where x can be (A..G) to select the GPIO peripheral. |
GPIO_Pin | specifies the port bits to be written. This parameter can be any combination of GPIO_Pin_x where x can be (0..15). |
void GPIO_SetBits | ( | GPIO_ModuleAddress const | module, |
uint16_t const | GPIO_Pin | ||
) |
Sets the selected data port bits.
module | where x can be (A..G) to select the GPIO peripheral. |
GPIO_Pin | specifies the port bits to be written. This parameter can be any combination of GPIO_Pin_x where x can be (0..15). |