OpenMPTL - STM32F10X
C++ Microprocessor Template Library
Classes | Public Types | Static Public Attributes | List of all members
mptl::GPIO< port > Struct Template Reference

General-purpose and alternate-function I/Os (GPIOs and AFIOs)

#include <gpio.hpp>

Classes

struct  CRx
 GPIO port configuration register: returns CRL or CRH type dependent on pin_no. More...
 

Public Types

using CRL = reg< uint32_t, base_addr+0x00, rw, 0x44444444 >
 Port configuration register low. More...
 
using CRH = reg< uint32_t, base_addr+0x04, rw, 0x44444444 >
 Port configuration register high. More...
 
using IDR = reg< uint32_t, base_addr+0x08, ro, 0x00000000 >
 Port input data register. More...
 
using ODR = reg< uint32_t, base_addr+0x0c, rw, 0x00000000 >
 Port output data register. More...
 
using BSRR = reg< uint32_t, base_addr+0x10, wo, 0x00000000 >
 Port bit set/reset register. More...
 
using BRR = reg< uint32_t, base_addr+0x14, wo, 0x00000000 >
 Port bit reset register. More...
 
using LCKR = reg< uint32_t, base_addr+0x18, rw, 0x00000000 >
 Port configuration lock register. More...
 

Static Public Attributes

static constexpr unsigned gpio_no = port - 'A'
 
static constexpr reg_addr_t base_addr = 0x40010800 + gpio_no * 0x0400
 

Member Typedef Documentation

◆ BRR

template<char port>
using mptl::GPIO< port >::BRR = reg< uint32_t, base_addr + 0x14, wo, 0x00000000 >

◆ BSRR

template<char port>
using mptl::GPIO< port >::BSRR = reg< uint32_t, base_addr + 0x10, wo, 0x00000000 >

◆ CRH

template<char port>
using mptl::GPIO< port >::CRH = reg< uint32_t, base_addr + 0x04, rw, 0x44444444 >

◆ CRL

template<char port>
using mptl::GPIO< port >::CRL = reg< uint32_t, base_addr + 0x00, rw, 0x44444444 >

◆ IDR

template<char port>
using mptl::GPIO< port >::IDR = reg< uint32_t, base_addr + 0x08, ro, 0x00000000 >

◆ LCKR

template<char port>
using mptl::GPIO< port >::LCKR = reg< uint32_t, base_addr + 0x18, rw, 0x00000000 >

◆ ODR

template<char port>
using mptl::GPIO< port >::ODR = reg< uint32_t, base_addr + 0x0c, rw, 0x00000000 >

Member Data Documentation

◆ base_addr

template<char port>
constexpr reg_addr_t mptl::GPIO< port >::base_addr = 0x40010800 + gpio_no * 0x0400
static

◆ gpio_no

template<char port>
constexpr unsigned mptl::GPIO< port >::gpio_no = port - 'A'
static

The documentation for this struct was generated from the following file: