Driver for the PICOUART (Picopower UART).
Provides functions for configuring and operating the PICOUART.
Modules | |
Related Project(s) | |
In this section you can find all the projects related to the PICOUART - Picopower UART. | |
Quick Start Guide(s) | |
In this section you can find a list of all Quick Start guides related to the PICOUART - Picopower UART. | |
Data Structures | |
struct | picouart_config |
struct | picouart_dev_inst |
Enumerations | |
enum | picouart_actions_on_rx { PICOUART_ACTION_NONE = PICOUART_CFG_SOURCE(0), PICOUART_ACTION_WAKEUP_ON_STARTBIT = PICOUART_CFG_SOURCE(1), PICOUART_ACTION_WAKEUP_ON_FULLFRAME = PICOUART_CFG_SOURCE(2), PICOUART_ACTION_WAKEUP_ON_MATCH = PICOUART_CFG_SOURCE(3), PICOUART_ACTION_EVENT_ON_STARTBIT, PICOUART_ACTION_EVENT_ON_FULLFRAME, PICOUART_ACTION_EVENT_ON_MATCH } |
Functions | |
void | picouart_disable (struct picouart_dev_inst *const dev_inst) |
Disable the PICOUART. More... | |
void | picouart_enable (struct picouart_dev_inst *const dev_inst) |
Enable the PICOUART. More... | |
void | picouart_get_config_defaults (struct picouart_config *config) |
Load a pre-defined configuration into the configuration structure. More... | |
status_code_t | picouart_init (struct picouart_dev_inst *const dev_inst, Picouart *hw_dev, struct picouart_config *config) |
Initializes the PICOUART module, based on a config struct. More... | |
bool | picouart_is_data_ready (struct picouart_dev_inst *const dev_inst) |
Check the data ready status of PICOUART. More... | |
bool | picouart_is_enabled (struct picouart_dev_inst *const dev_inst) |
Check the enable status of PICOUART. More... | |
status_code_t | picouart_read (struct picouart_dev_inst *const dev_inst, uint8_t *result) |
Get the current RHR value. More... | |
status_code_t | picouart_set_config (struct picouart_dev_inst *const dev_inst, struct picouart_config *config) |
Configures the PICOUART module, based on a config struct. More... | |
void picouart_disable | ( | struct picouart_dev_inst *const | dev_inst | ) |
Disable the PICOUART.
dev_inst | pointer to the device struct |
References picouart_dev_inst::dev_ptr, SLEEPMGR_BACKUP, sleepmgr_unlock_mode(), and sysclk_disable_peripheral_clock().
void picouart_enable | ( | struct picouart_dev_inst *const | dev_inst | ) |
Enable the PICOUART.
dev_inst | pointer to the device struct |
References picouart_dev_inst::dev_ptr, SLEEPMGR_BACKUP, sleepmgr_lock_mode(), and sysclk_enable_peripheral_clock().
Referenced by main(), and run_picouart_test().
void picouart_get_config_defaults | ( | struct picouart_config * | config | ) |
Load a pre-defined configuration into the configuration structure.
The config struct is loaded with predefined values to allow quick startup.
config | pointer to the config struct |
References picouart_config::action, picouart_config::match, and PICOUART_ACTION_WAKEUP_ON_FULLFRAME.
Referenced by main(), and run_picouart_test().
status_code_t picouart_init | ( | struct picouart_dev_inst *const | dev_inst, |
Picouart * | hw_dev, | ||
struct picouart_config * | config | ||
) |
Initializes the PICOUART module, based on a config struct.
dev_inst | pointer to the device struct |
hw_dev | pointer to the register base address of the device |
config | pointer to the config struct |
References picouart_dev_inst::dev_ptr, and picouart_set_config().
Referenced by main(), and run_picouart_test().
bool picouart_is_data_ready | ( | struct picouart_dev_inst *const | dev_inst | ) |
Check the data ready status of PICOUART.
dev_inst | pointer to the device struct |
References picouart_dev_inst::dev_ptr.
Referenced by run_picouart_test().
bool picouart_is_enabled | ( | struct picouart_dev_inst *const | dev_inst | ) |
Check the enable status of PICOUART.
dev_inst | pointer to the device struct |
References picouart_dev_inst::dev_ptr.
status_code_t picouart_read | ( | struct picouart_dev_inst *const | dev_inst, |
uint8_t * | result | ||
) |
Get the current RHR value.
dev_inst | pointer to the device struct |
result | pointer to store result |
References picouart_dev_inst::dev_ptr, and STATUS_OK.
Referenced by run_picouart_test().
status_code_t picouart_set_config | ( | struct picouart_dev_inst *const | dev_inst, |
struct picouart_config * | config | ||
) |
Configures the PICOUART module, based on a config struct.
dev_inst | pointer to the device struct |
config | pointer to the config struct |
References picouart_config::action, picouart_dev_inst::dev_ptr, picouart_config::match, STATUS_OK, sysclk_disable_peripheral_clock(), sysclk_enable_peripheral_clock(), and SYSCLK_PICOUART.
Referenced by main(), picouart_init(), and run_picouart_test().