RZV Flexible Software Package Documentation
Release v3.0.0
|
|
Interface for the Port Output Enable for GPT.
Defines the API and data structures for the Port Output Enable for GPT (POEG) interface.
The POEG disables GPT output pins based on configurable events.
Data Structures | |
struct | poeg_status_t |
struct | poeg_callback_args_t |
struct | poeg_cfg_t |
struct | poeg_api_t |
struct | poeg_instance_t |
Typedefs | |
typedef void | poeg_ctrl_t |
Enumerations | |
enum | poeg_state_t |
enum | poeg_trigger_t |
enum | poeg_gtetrg_polarity_t |
enum | poeg_gtetrg_noise_filter_t |
struct poeg_status_t |
POEG status
Data Fields | ||
---|---|---|
poeg_state_t | state | Current state of POEG. |
struct poeg_callback_args_t |
Callback function parameter data.
Data Fields | ||
---|---|---|
void const * | p_context | Placeholder for user data, set in poeg_cfg_t. |
struct poeg_cfg_t |
User configuration structure, used in the open function.
Data Fields | |
poeg_trigger_t | trigger |
Select one or more triggers for the POEG. | |
poeg_gtetrg_polarity_t | polarity |
Select the polarity for the GTETRG pin. | |
poeg_gtetrg_noise_filter_t | noise_filter |
Configure the GTETRG noise filter. | |
void(* | p_callback )(poeg_callback_args_t *p_args) |
void const * | p_context |
uint32_t | unit |
POEG unit to be used. | |
uint32_t | channel |
Channel 0 corresponds to GTETRGA, 1 to GTETRGB, etc. | |
IRQn_Type | irq |
Interrupt number assigned to this instance. | |
uint8_t | ipl |
POEG interrupt priority. | |
void(* poeg_cfg_t::p_callback) (poeg_callback_args_t *p_args) |
Callback called when a POEG interrupt occurs.
void const* poeg_cfg_t::p_context |
Placeholder for user data. Passed to the user callback in poeg_callback_args_t.
struct poeg_api_t |
Port Output Enable for GPT (POEG) API structure. POEG functions implemented at the HAL layer will follow this API.
Data Fields | |
fsp_err_t(* | open )(poeg_ctrl_t *const p_ctrl, poeg_cfg_t const *const p_cfg) |
fsp_err_t(* | statusGet )(poeg_ctrl_t *const p_ctrl, poeg_status_t *p_status) |
fsp_err_t(* | callbackSet )(poeg_ctrl_t *const p_ctrl, void(*p_callback)(poeg_callback_args_t *), void const *const p_context, poeg_callback_args_t *const p_callback_memory) |
fsp_err_t(* | outputDisable )(poeg_ctrl_t *const p_ctrl) |
fsp_err_t(* | reset )(poeg_ctrl_t *const p_ctrl) |
fsp_err_t(* | close )(poeg_ctrl_t *const p_ctrl) |
fsp_err_t(* poeg_api_t::open) (poeg_ctrl_t *const p_ctrl, poeg_cfg_t const *const p_cfg) |
Initial configuration.
[in] | p_ctrl | Pointer to control block. Must be declared by user. Elements set here. |
[in] | p_cfg | Pointer to configuration structure. All elements of this structure must be set by user. |
fsp_err_t(* poeg_api_t::statusGet) (poeg_ctrl_t *const p_ctrl, poeg_status_t *p_status) |
Gets the current driver state.
[in] | p_ctrl | Control block set in poeg_api_t::open call. |
[out] | p_status | Provides the current state of the POEG. |
fsp_err_t(* poeg_api_t::callbackSet) (poeg_ctrl_t *const p_ctrl, void(*p_callback)(poeg_callback_args_t *), void const *const p_context, poeg_callback_args_t *const p_callback_memory) |
Specify callback function and optional context pointer and working memory pointer.
[in] | p_ctrl | Control block set in poeg_api_t::open call for this timer. |
[in] | p_callback | Callback function to register |
[in] | p_context | Pointer to send to callback function |
[in] | p_working_memory | Pointer to volatile memory where callback structure can be allocated. Callback arguments allocated here are only valid during the callback. |
fsp_err_t(* poeg_api_t::outputDisable) (poeg_ctrl_t *const p_ctrl) |
Disables GPT output pins by software request.
[in] | p_ctrl | Control block set in poeg_api_t::open call. |
fsp_err_t(* poeg_api_t::reset) (poeg_ctrl_t *const p_ctrl) |
Attempts to clear status flags to reenable GPT output pins. Confirm all status flags are cleared after calling this function by calling poeg_api_t::statusGet().
[in] | p_ctrl | Control block set in poeg_api_t::open call. |
fsp_err_t(* poeg_api_t::close) (poeg_ctrl_t *const p_ctrl) |
Disables POEG interrupt.
[in] | p_ctrl | Control block set in poeg_api_t::open call. |
struct poeg_instance_t |
This structure encompasses everything that is needed to use an instance of this interface.
Data Fields | ||
---|---|---|
poeg_ctrl_t * | p_ctrl | Pointer to the control structure for this instance. |
poeg_cfg_t const * | p_cfg | Pointer to the configuration structure for this instance. |
poeg_api_t const * | p_api | Pointer to the API structure for this instance. |
typedef void poeg_ctrl_t |
POEG control block. Allocate an instance specific control block to pass into the POEG API calls.
enum poeg_state_t |
POEG states.
Enumerator | |
---|---|
POEG_STATE_NO_DISABLE_REQUEST | GPT output is not disabled by POEG. |
POEG_STATE_PIN_DISABLE_REQUEST | GPT output disabled due to GTETRG pin level. |
POEG_STATE_GPT_OR_COMPARATOR_DISABLE_REQUEST | GPT output disabled due to high speed analog comparator or GPT. |
POEG_STATE_OSCILLATION_STOP_DISABLE_REQUEST | GPT output disabled due to main oscillator stop. |
POEG_STATE_SOFTWARE_STOP_DISABLE_REQUEST | GPT output disabled due to poeg_api_t::outputDisable() |
POEG_STATE_PIN_DISABLE_REQUEST_ACTIVE | GPT output disable request active from the GTETRG pin. If a filter is used, this flag represents the state of the filtered input. |
enum poeg_trigger_t |
Triggers that will disable GPT output pins.
GTETRG noise filter. For the input signal to pass through the noise filter, the active level set in poeg_gtetrg_polarity_t must be read 3 consecutive times at the sampling clock selected.