The Configurable Pin Manager (CPM) manages the role of each configurable pin on the device. It warns about role conflicts and provides an efficient abstraction layer. Application code can be designed around a role, but the end user can generally assign that role to any pin or leave the role without any pin.
Defines possible requirement for assert high or low.
Enumerator |
---|
LTRX_CPM_REQUIRED_ASSERT__NONE |
Not applicable.
|
LTRX_CPM_REQUIRED_ASSERT__HIGH |
High.
|
LTRX_CPM_REQUIRED_ASSERT__LOW |
Low.
|
Defines possible requirement for mode.
Enumerator |
---|
LTRX_CPM_REQUIRED_MODE__NONE |
Not applicable.
|
LTRX_CPM_REQUIRED_MODE__PUSH_PULL |
Push-Pull.
|
LTRX_CPM_REQUIRED_MODE__WEAK_PULLUP |
Weak Pullup.
|
Defines possible usage for a Configurable Pin role.
Enumerator |
---|
LTRX_CPM_ROLE_USAGE__RESERVED |
Reserved.
|
LTRX_CPM_ROLE_USAGE__INPUT |
Input.
|
LTRX_CPM_ROLE_USAGE__OUTPUT |
Output.
|
bool ltrx_cp_read |
( |
uint16_t |
roleIndex, |
|
|
bool * |
isAsserted |
|
) |
| |
Read a Configurable Pin value.
- Return values
-
true | Success. |
false | Not available. |
- Parameters
-
Register a CPM role.
Registers procedure and options to define a Configurable Pin role.
Registration must be done in early module initialization.
- Parameters
-
[in] | role | Designates the procedure and options to define a role. |
uint16_t ltrx_cp_role_index_get |
( |
const char * |
roleName | ) |
|
Lookup role index.
- Returns
- Index of the named role, if found.
- Return values
-
- Parameters
-
[in] | roleName | Name of the role to look for. |
bool ltrx_cp_write |
( |
uint16_t |
roleIndex, |
|
|
bool |
setting |
|
) |
| |
Write to a Configurable Pin.
- Return values
-
true | Success. |
false | Failed. |
- Parameters
-