libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
|
SWM050 SYSCON API. 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... | |
SWM050 SYSCON API.
LGPL License Terms libopencm3 License
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.
[in] | gpios | Pin identifiers GPIO Pin Identifiers If multiple pins are to be changed, use bitwise OR '|' to separate them. |
[in] | en | True to enable input function. |
Definition at line 95 of file syscon.c.
References SYSCON_PORTA_INEN.
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.
[in] | gpios | Pin identifiers GPIO Pin Identifiers If multiple pins are to be changed, use bitwise OR '|' to separate them. |
[in] | en | True to enable pull-up, false to disable. |
Definition at line 75 of file syscon.c.
References SYSCON_PORTA_PULLUP.
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.
[in] | gpios | Pin identifiers GPIO Pin Identifiers If multiple pins are to be changed, use bitwise OR '|' to separate them. |
[in] | af_en | Whether alternative function is selected |
Definition at line 43 of file syscon.c.
References GPIO0, GPIO1, GPIO2, GPIO7, and SYSCON_PORTA_SEL.
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.
[in] | en | True to enable SWD. |
Definition at line 112 of file syscon.c.
References SYSCON_SWD_SEL.