![]() |
Synergy Software Package User's Manual
|
Driver for the Low Power Analog Comparator. More...
Data Structures | |
| struct | acmplp_instance_ctrl_t |
Functions | |
| ssp_err_t | R_ACMPLP_Open (comparator_ctrl_t *const p_api_ctrl, comparator_cfg_t const *const p_cfg) |
| Configures the comparator and starts operation. Callbacks and pin output are not active until outputEnable() is called. comparator_api_t::outputEnable() should be called after the output has stabilized. Implements comparator_api_t::open(). More... | |
| ssp_err_t | R_ACMPLP_InfoGet (comparator_ctrl_t *const p_api_ctrl, comparator_info_t *const p_info) |
| Provides the minimum stabilization wait time in microseconds. Implements comparator_api_t::infoGet(). More... | |
| ssp_err_t | R_ACMPLP_OutputEnable (comparator_ctrl_t *const p_api_ctrl) |
| Enables the comparator output, which can be polled using comparator_api_t::statusGet(). Also enables pin output and interrupts as configured during comparator_api_t::open(). Implements comparator_api_t::outputEnable(). More... | |
| ssp_err_t | R_ACMPLP_StatusGet (comparator_ctrl_t *const p_api_ctrl, comparator_status_t *const p_status) |
| Provides the operating status of the comparator. Implements comparator_api_t::statusGet(). More... | |
| ssp_err_t | R_ACMPLP_Close (comparator_ctrl_t *p_api_ctrl) |
| Stops the comparator. Implements comparator_api_t::close(). More... | |
| ssp_err_t | R_ACMPLP_VersionGet (ssp_version_t *const p_version) |
| Gets the API and code version. Implements comparator_api_t::versionGet(). More... | |
Driver for the Low Power Analog Comparator.
Extends COMPARATOR Interface.
This module implements the COMPARATOR Interface using the low power analog comparator.
| ssp_err_t R_ACMPLP_Close | ( | comparator_ctrl_t * | p_api_ctrl | ) |
Stops the comparator. Implements comparator_api_t::close().
| SSP_SUCCESS | Instance control block closed successfully. |
| SSP_ERR_ASSERTION | An input pointer was NULL. |
| SSP_ERR_NOT_OPEN | Instance control block is not open. |
Perform parameter checking
Mark driver as closed
Disable interrupts.
Stop the comparator and disable output to VCOUT.
Enter the module-stop state.
Release the hardware lock
| ssp_err_t R_ACMPLP_InfoGet | ( | comparator_ctrl_t *const | p_api_ctrl, |
| comparator_info_t *const | p_info | ||
| ) |
Provides the minimum stabilization wait time in microseconds. Implements comparator_api_t::infoGet().
| SSP_SUCCESS | Information stored in p_info. |
| SSP_ERR_ASSERTION | An input pointer was NULL. |
| SSP_ERR_NOT_OPEN | Instance control block is not open. |
Perform parameter checking
| ssp_err_t R_ACMPLP_Open | ( | comparator_ctrl_t *const | p_api_ctrl, |
| comparator_cfg_t const *const | p_cfg | ||
| ) |
Configures the comparator and starts operation. Callbacks and pin output are not active until outputEnable() is called. comparator_api_t::outputEnable() should be called after the output has stabilized. Implements comparator_api_t::open().
Comparator inputs must be configured in the application code prior to calling this function.
| SSP_SUCCESS | Open successful. |
| SSP_ERR_ASSERTION | An input pointer is NULL |
| SSP_ERR_INVALID_ARGUMENT | An argument is invalid. Window mode (COMPARATOR_MODE_WINDOW) and filter of 1 (COMPARATOR_FILTER_1) are not supported in this implementation. |
| SSP_ERR_IN_USE | The control block is already open or the hardware lock is taken. |
Verify the control block has not already been initialized.
Configure interrupt priority. The interrupt is disabled until comparator_api_t::outputEnable() is called.
Enable clocks to the ACMPLP hardware.
Set registers controlled by this channel to their default values.
Set the mode.
Configure the output polarity.
Configure the trigger edge.
Configure the hardware debounce filter.
Enable the comparator.
| ssp_err_t R_ACMPLP_OutputEnable | ( | comparator_ctrl_t *const | p_api_ctrl | ) |
Enables the comparator output, which can be polled using comparator_api_t::statusGet(). Also enables pin output and interrupts as configured during comparator_api_t::open(). Implements comparator_api_t::outputEnable().
| SSP_SUCCESS | Comparator output is enabled. |
| SSP_ERR_ASSERTION | An input pointer was NULL. |
| SSP_ERR_NOT_OPEN | Instance control block is not open. |
Set the VCOUT output setting for this channel (enabled or disabled).
Enable interrupts for this channel.
| ssp_err_t R_ACMPLP_StatusGet | ( | comparator_ctrl_t *const | p_api_ctrl, |
| comparator_status_t *const | p_status | ||
| ) |
Provides the operating status of the comparator. Implements comparator_api_t::statusGet().
| SSP_SUCCESS | Operating status of the comparator is provided in p_status. |
| SSP_ERR_ASSERTION | An input pointer was NULL. |
| SSP_ERR_NOT_OPEN | Instance control block is not open. |
Read the operating status of the comparator.
| ssp_err_t R_ACMPLP_VersionGet | ( | ssp_version_t *const | p_version | ) |
Gets the API and code version. Implements comparator_api_t::versionGet().
| SSP_SUCCESS | Version information available in p_version. |
| SSP_ERR_ASSERTION | The parameter p_version is NULL. |
Return the version number