libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
SYSCON Registers
Collaboration diagram for SYSCON Registers:

Macros

#define SYSCON_SWD_SEL   MMIO32(SYSTEM_CON_BASE + 0x30)
 SWD Enable register. More...
 
#define SYSCON_PORTA_SEL   MMIO32(SYSTEM_CON_BASE + 0x80)
 Pin Alternate function selection register. More...
 
#define SYSCON_PORTA_PULLUP   MMIO32(SYSTEM_CON_BASE + 0x90)
 Pin Pull up register. More...
 
#define SYSCON_PORTA_INEN   MMIO32(SYSTEM_CON_BASE + 0xe0)
 Pin Input enable register. More...
 

Functions

void syscon_sel_af (uint16_t gpios, bool af_en)
 Select the alternative function of a Group of Pins. More...
 
void syscon_pullup (uint16_t gpios, bool en)
 Enable the internal pull-up of a Group of Pins. More...
 
void syscon_input_enable (uint16_t gpios, bool en)
 Enable the input function of a Group of Pins. More...
 
void syscon_sel_swd (bool en)
 Select the SWD function of GPIO 1/2. More...
 

Detailed Description

Macro Definition Documentation

◆ SYSCON_PORTA_INEN

#define SYSCON_PORTA_INEN   MMIO32(SYSTEM_CON_BASE + 0xe0)

Pin Input enable register.

Definition at line 44 of file syscon.h.

◆ SYSCON_PORTA_PULLUP

#define SYSCON_PORTA_PULLUP   MMIO32(SYSTEM_CON_BASE + 0x90)

Pin Pull up register.

Definition at line 42 of file syscon.h.

◆ SYSCON_PORTA_SEL

#define SYSCON_PORTA_SEL   MMIO32(SYSTEM_CON_BASE + 0x80)

Pin Alternate function selection register.

Definition at line 40 of file syscon.h.

◆ SYSCON_SWD_SEL

#define SYSCON_SWD_SEL   MMIO32(SYSTEM_CON_BASE + 0x30)

SWD Enable register.

Definition at line 38 of file syscon.h.

Function Documentation

◆ syscon_input_enable()

void syscon_input_enable ( uint16_t  gpios,
bool  en 
)

Enable the input function of a Group of Pins.

Enable or disable the input function of one or more pins of GPIO. Disabling the input function of pins decreases the power usage of the MCU.

Parameters
[in]gpiosPin identifiers GPIO Pin Identifiers If multiple pins are to be changed, use bitwise OR '|' to separate them.
[in]enTrue to enable input function.

Definition at line 95 of file syscon.c.

References SYSCON_PORTA_INEN.

◆ syscon_pullup()

void syscon_pullup ( uint16_t  gpios,
bool  en 
)

Enable the internal pull-up of a Group of Pins.

Enable or disable the internal pull-up of one or more pins of GPIO.

Parameters
[in]gpiosPin identifiers GPIO Pin Identifiers If multiple pins are to be changed, use bitwise OR '|' to separate them.
[in]enTrue to enable pull-up, false to disable.

Definition at line 75 of file syscon.c.

References SYSCON_PORTA_PULLUP.

◆ syscon_sel_af()

void syscon_sel_af ( uint16_t  gpios,
bool  af_en 
)

Select the alternative function of a Group of Pins.

Select the alternative function of one or more pins of GPIO.

Parameters
[in]gpiosPin identifiers GPIO Pin Identifiers If multiple pins are to be changed, use bitwise OR '|' to separate them.
[in]af_enWhether alternative function is selected

Definition at line 43 of file syscon.c.

References GPIO0, GPIO1, GPIO2, GPIO7, and SYSCON_PORTA_SEL.

◆ syscon_sel_swd()

void syscon_sel_swd ( bool  en)

Select the SWD function of GPIO 1/2.

Enable or disable the SWD debugging port at GPIO 1/2. When SWD debugging port is enabled, GPIO and AF of the SWD pins will be both unavailable.

Parameters
[in]enTrue to enable SWD.

Definition at line 112 of file syscon.c.

References SYSCON_SWD_SEL.