4.8.0.0R6
Software Development Kit
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules
Configurable Pin Manager

Data Structures

struct  ltrx_cpm_role
 Represents a Configurable Pin role for registration. More...
 

Enumerations

enum  ltrx_cpm_required_assert { LTRX_CPM_REQUIRED_ASSERT__NONE = 0, LTRX_CPM_REQUIRED_ASSERT__HIGH = 1, LTRX_CPM_REQUIRED_ASSERT__LOW = 2 }
 
enum  ltrx_cpm_required_mode { LTRX_CPM_REQUIRED_MODE__NONE = 0, LTRX_CPM_REQUIRED_MODE__PUSH_PULL = 1, LTRX_CPM_REQUIRED_MODE__WEAK_PULLUP = 2 }
 
enum  ltrx_cpm_role_usage { LTRX_CPM_ROLE_USAGE__RESERVED = 0, LTRX_CPM_ROLE_USAGE__INPUT = 1, LTRX_CPM_ROLE_USAGE__OUTPUT = 2 }
 

Functions

bool ltrx_cp_read (uint16_t roleIndex, bool *isAsserted)
 Read a Configurable Pin value. More...
 
void ltrx_cp_register_role (const struct ltrx_cpm_role *role)
 Register a CPM role. More...
 
uint16_t ltrx_cp_role_index_get (const char *roleName)
 Lookup role index. More...
 
bool ltrx_cp_write (uint16_t roleIndex, bool setting)
 Write to a Configurable Pin. More...
 

Detailed Description

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.

Enumeration Type Documentation

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.

Function Documentation

bool ltrx_cp_read ( uint16_t  roleIndex,
bool *  isAsserted 
)

Read a Configurable Pin value.

Return values
trueSuccess.
falseNot available.
Parameters
[in]roleIndexIndex from ltrx_cp_role_index_get().
[out]isAssertedSet true if the pin is asserted.
void ltrx_cp_register_role ( const struct ltrx_cpm_role role)

Register a CPM role.

Registers procedure and options to define a Configurable Pin role.

Registration must be done in early module initialization.

Parameters
[in]roleDesignates 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
CPM_ROLE_MAXNot found.
Parameters
[in]roleNameName of the role to look for.
bool ltrx_cp_write ( uint16_t  roleIndex,
bool  setting 
)

Write to a Configurable Pin.

Return values
trueSuccess.
falseFailed.
Parameters
[in]roleIndexIndex from ltrx_cp_role_index_get().
[in]settingtrue to assert.