RA Flexible Software Package Documentation
Release v5.2.0
|
|
Functions | |
fsp_err_t | R_LVD_Open (lvd_ctrl_t *const p_api_ctrl, lvd_cfg_t const *const p_cfg) |
fsp_err_t | R_LVD_StatusGet (lvd_ctrl_t *const p_api_ctrl, lvd_status_t *p_lvd_status) |
fsp_err_t | R_LVD_StatusClear (lvd_ctrl_t *const p_api_ctrl) |
fsp_err_t | R_LVD_CallbackSet (lvd_ctrl_t *const p_api_ctrl, void(*p_callback)(lvd_callback_args_t *), void const *const p_context, lvd_callback_args_t *const p_callback_memory) |
fsp_err_t | R_LVD_Close (lvd_ctrl_t *const p_api_ctrl) |
Data Structures | |
struct | lvd_instance_ctrl_t |
struct lvd_instance_ctrl_t |
LVD instance control structure
fsp_err_t R_LVD_Open | ( | lvd_ctrl_t *const | p_api_ctrl, |
lvd_cfg_t const *const | p_cfg | ||
) |
Initializes a voltage monitor and detector according to the passed-in configuration structure.
[in] | p_api_ctrl | Pointer to the control structure for the driver instance |
[in] | p_cfg | Pointer to the configuration structure for the driver instance |
Example:
FSP_SUCCESS | Successful |
FSP_ERR_ASSERTION | Requested configuration was invalid |
FSP_ERR_ALREADY_OPEN | The instance was already opened |
FSP_ERR_IN_USE | Another instance is already using the desired monitor |
FSP_ERR_UNSUPPORTED | Digital filter was enabled on a device that does not support it |
fsp_err_t R_LVD_StatusGet | ( | lvd_ctrl_t *const | p_api_ctrl, |
lvd_status_t * | p_lvd_status | ||
) |
Get the current state of the monitor (threshold crossing detected, voltage currently above or below threshold).
[in] | p_api_ctrl | Pointer to the control structure for the driver instance |
[out] | p_lvd_status | Pointer to status structure |
Example:
FSP_SUCCESS | Successful |
FSP_ERR_ASSERTION | An argument was NULL |
FSP_ERR_NOT_OPEN | Driver is not open |
fsp_err_t R_LVD_StatusClear | ( | lvd_ctrl_t *const | p_api_ctrl | ) |
Clears the latched status of the monitor.
[in] | p_api_ctrl | Pointer to the control structure for the driver instance |
FSP_SUCCESS | Successful |
FSP_ERR_ASSERTION | An argument was NULL |
FSP_ERR_NOT_OPEN | Driver is not open |
fsp_err_t R_LVD_CallbackSet | ( | lvd_ctrl_t *const | p_api_ctrl, |
void(*)(lvd_callback_args_t *) | p_callback, | ||
void const *const | p_context, | ||
lvd_callback_args_t *const | p_callback_memory | ||
) |
Updates the user callback and has option of providing memory for callback structure. Implements lvd_api_t::callbackSet
FSP_SUCCESS | Callback updated successfully. |
FSP_ERR_ASSERTION | A required pointer is NULL. |
FSP_ERR_NOT_OPEN | The control block has not been opened. |
FSP_ERR_NO_CALLBACK_MEMORY | p_callback is non-secure and p_callback_memory is either secure or NULL. |
fsp_err_t R_LVD_Close | ( | lvd_ctrl_t *const | p_api_ctrl | ) |
Disables the LVD peripheral. Closes the driver instance.
[in] | p_api_ctrl | Pointer to the control block structure for the driver instance |
FSP_SUCCESS | Successful |
FSP_ERR_ASSERTION | An argument was NULL |
FSP_ERR_NOT_OPEN | Driver is not open |