Access functions for the Programmable Peripheral Interconnect
More...
|
void | ppi_configure_channel (uint8_t chan_num, uint32_t eep, uint32_t tep) |
| Configure PPI Channel. More...
|
|
void | ppi_enable_channels (uint32_t channels) |
| Enable PPI channels, given the channels mask. More...
|
|
void | ppi_disable_channels (uint32_t channels) |
| Disable PPI channels, given the channels mask. More...
|
|
void | ppi_set_group (uint8_t group, uint32_t channels) |
| Set channels group, given channels mask. More...
|
|
void | ppi_enable_group (uint8_t group) |
| Enable previously configured group of channels. More...
|
|
void | ppi_disable_group (uint8_t group) |
| Disable previously configured group of channels. More...
|
|
uint8_t | ppi_add_channel (uint32_t *chan_map, uint32_t eep, uint32_t tep, bool enable) |
| Configure new channel. More...
|
|
void | ppi_remove_channel (uint32_t *chan_map, uint8_t chan_num) |
| Disable channel and remove it from the map of used channels. More...
|
|
Access functions for the Programmable Peripheral Interconnect
LGPL License Terms libopencm3 License
- Author
- © 2016 Maxim Sloyko maxim.nosp@m.s@go.nosp@m.ogle..nosp@m.com
◆ ppi_add_channel()
uint8_t ppi_add_channel |
( |
uint32_t * |
chan_map, |
|
|
uint32_t |
eep, |
|
|
uint32_t |
tep, |
|
|
bool |
enable |
|
) |
| |
Configure new channel.
This is the alternative API, which requires the caller to store the mask of used channels.
- Parameters
-
| chan_map | uint32_t* The mask of channels that are already in use. For the first call initialize with zero and pass in. |
[in] | eep | uint32_t Event endpoint. |
[in] | tep | uint32_t Task endpoint. |
| enable | bool If true, enable the channel immediately. |
- Returns
- The number of the new channel. If there are no channels available, returns 0xff.
Definition at line 106 of file ppi.c.
References ppi_configure_channel(), ppi_enable_channels(), and PPI_MAX_PROG_CHANNEL.
◆ ppi_configure_channel()
void ppi_configure_channel |
( |
uint8_t |
chan_num, |
|
|
uint32_t |
eep, |
|
|
uint32_t |
tep |
|
) |
| |
Configure PPI Channel.
- Parameters
-
[in] | chan_num | uint8_t Channel number (0-15). |
[in] | eep | uint32_t Event endpoint. Memory address of the event endpoint. |
[in] | tep | uint32_t Task endpoint. Memory address of the task endpoint. |
Definition at line 43 of file ppi.c.
References PPI_CH_EEP, and PPI_CH_TEP.
Referenced by ppi_add_channel().
◆ ppi_disable_channels()
void ppi_disable_channels |
( |
uint32_t |
channels | ) |
|
Disable PPI channels, given the channels mask.
- Parameters
-
[in] | channels | uint32_t mask of the channels to disable. |
Definition at line 62 of file ppi.c.
References PPI_CHENCLR.
Referenced by ppi_remove_channel().
◆ ppi_disable_group()
void ppi_disable_group |
( |
uint8_t |
group | ) |
|
Disable previously configured group of channels.
- Parameters
-
[in] | group | uint8_t group number (0-3) |
Definition at line 90 of file ppi.c.
References PPI_TASK_CHG_DIS.
◆ ppi_enable_channels()
void ppi_enable_channels |
( |
uint32_t |
channels | ) |
|
Enable PPI channels, given the channels mask.
- Parameters
-
[in] | channels | uint32_t mask of the channels to enable. |
Definition at line 53 of file ppi.c.
References PPI_CHENSET.
Referenced by ppi_add_channel().
◆ ppi_enable_group()
void ppi_enable_group |
( |
uint8_t |
group | ) |
|
Enable previously configured group of channels.
- Parameters
-
[in] | group | uint8_t group number (0-3) |
Definition at line 81 of file ppi.c.
References PPI_TASK_CHG_EN.
◆ ppi_remove_channel()
void ppi_remove_channel |
( |
uint32_t * |
chan_map, |
|
|
uint8_t |
chan_num |
|
) |
| |
Disable channel and remove it from the map of used channels.
This is the alternative API, which requires the caller to store the mask of used channels.
- Parameters
-
| chan_map | uint32_t* The mask of channels that are already in use. For the first call initialize with zero and pass in. |
[in] | chan_num | uint8_t the number of the channel to remove from the map. |
Definition at line 139 of file ppi.c.
References PPI_CH, and ppi_disable_channels().
◆ ppi_set_group()
void ppi_set_group |
( |
uint8_t |
group, |
|
|
uint32_t |
channels |
|
) |
| |
Set channels group, given channels mask.
- Parameters
-
[in] | group | uint8_t group number (0-3) |
[in] | channels | uint32_t mask of the channels to group together. |
Definition at line 72 of file ppi.c.
References PPI_CHG.