Modules | |
Related Project(s) | |
In this section you can find all the projects related to the Asfdoc_sam0_events_group. | |
Enumerations | |
enum | events_interrupt_source { EVENTS_INTERRUPT_OVERRUN, EVENTS_INTERRUPT_DETECT } |
Interrupt source enumerator. More... | |
Functions | |
enum status_code | events_ack_interrupt (struct events_resource *resource, enum events_interrupt_source source) |
Acknowledge an interrupt source. More... | |
enum status_code | events_add_hook (struct events_resource *resource, struct events_hook *hook) |
Insert hook into the event drivers interrupt hook queue. More... | |
enum status_code | events_create_hook (struct events_hook *hook, events_interrupt_hook hook_func) |
Initializes an interrupt hook for insertion in the event interrupt hook queue. More... | |
enum status_code | events_del_hook (struct events_resource *resource, struct events_hook *hook) |
Remove hook from the event drivers interrupt hook queue. More... | |
enum status_code | events_disable_interrupt_source (struct events_resource *resource, enum events_interrupt_source source) |
Disable interrupt source. More... | |
enum status_code | events_enable_interrupt_source (struct events_resource *resource, enum events_interrupt_source source) |
Enable interrupt source. More... | |
bool | events_is_interrupt_set (struct events_resource *resource, enum events_interrupt_source source) |
Check if interrupt source is set. More... | |
enum status_code events_ack_interrupt | ( | struct events_resource * | resource, |
enum events_interrupt_source | source | ||
) |
Acknowledge an interrupt source.
Acknowledge an interrupt source so the interrupt state is cleared in hardware.
[in] | resource | Pointer to an events_resource struct instance |
[in] | source | One of the members in the events_interrupt_source enumerator |
STATUS_OK | Interrupt source was acknowledged successfully |
References _events_inst, Assert, EVENTS_INTERRUPT_DETECT, EVENTS_INTERRUPT_OVERRUN, _events_module::interrupt_flag_ack_buffer, STATUS_ERR_INVALID_ARG, and STATUS_OK.
Referenced by event_counter().
enum status_code events_add_hook | ( | struct events_resource * | resource, |
struct events_hook * | hook | ||
) |
Insert hook into the event drivers interrupt hook queue.
Inserts a hook into the event drivers interrupt hook queue.
[in] | resource | Pointer to an events_resource struct instance |
[in] | hook | Pointer to an events_hook struct instance |
STATUS_OK | Insertion of hook went successful |
References _events_inst, _events_module::hook_list, NULL, resource, STATUS_OK, system_interrupt_enable(), system_interrupt_is_enabled(), and SYSTEM_INTERRUPT_MODULE_EVSYS.
Referenced by configure_event_interrupt().
enum status_code events_create_hook | ( | struct events_hook * | hook, |
events_interrupt_hook | hook_func | ||
) |
Initializes an interrupt hook for insertion in the event interrupt hook queue.
Initializes a hook structure so it is ready for insertion in the interrupt hook queue.
[out] | hook | Pointer to an events_hook struct instance |
[in] | hook_func | Pointer to a function containing the interrupt hook code |
STATUS_OK | Creation and initialization of interrupt hook went successful |
References NULL, and STATUS_OK.
Referenced by configure_event_interrupt().
enum status_code events_del_hook | ( | struct events_resource * | resource, |
struct events_hook * | hook | ||
) |
Remove hook from the event drivers interrupt hook queue.
Removes a hook from the event drivers interrupt hook queue.
[in] | resource | Pointer to an events_resource struct instance |
[in] | hook | Pointer to an events_hook struct instance |
STATUS_OK | Removal of hook went successful |
STATUS_ERR_NO_MEMORY | There are no hooks instances in the event driver interrupt hook list |
STATUS_ERR_NOT_FOUND | Interrupt hook not found in the event drivers interrupt hook list |
References _events_inst, _events_module::hook_list, NULL, STATUS_ERR_NO_MEMORY, STATUS_ERR_NOT_FOUND, and STATUS_OK.
enum status_code events_disable_interrupt_source | ( | struct events_resource * | resource, |
enum events_interrupt_source | source | ||
) |
Disable interrupt source.
Disable an interrupt source so can trigger execution of an interrupt hook.
[in] | resource | Pointer to an events_resource struct instance |
[in] | source | One of the members in the events_interrupt_source enumerator |
STATUS_OK | Enabling of the interrupt source went successful |
STATUS_ERR_INVALID_ARG | Interrupt source does not exist |
References Assert, EVENTS_INTERRUPT_DETECT, EVENTS_INTERRUPT_OVERRUN, STATUS_ERR_INVALID_ARG, and STATUS_OK.
enum status_code events_enable_interrupt_source | ( | struct events_resource * | resource, |
enum events_interrupt_source | source | ||
) |
Enable interrupt source.
Enable an interrupt source so can trigger execution of an interrupt hook.
[in] | resource | Pointer to an events_resource struct instance |
[in] | source | One of the members in the events_interrupt_source enumerator |
STATUS_OK | Enabling of the interrupt source was successful |
STATUS_ERR_INVALID_ARG | Interrupt source does not exist |
References Assert, EVENTS_INTERRUPT_DETECT, EVENTS_INTERRUPT_OVERRUN, STATUS_ERR_INVALID_ARG, and STATUS_OK.
Referenced by configure_event_interrupt().
bool events_is_interrupt_set | ( | struct events_resource * | resource, |
enum events_interrupt_source | source | ||
) |
Check if interrupt source is set.
Check if an interrupt source is set and should be processed.
[in] | resource | Pointer to an events_resource struct instance |
[in] | source | One of the members in the events_interrupt_source enumerator |
true | Interrupt source is set |
false | Interrupt source is not set |
References _events_inst, Assert, EVENTS_INTERRUPT_DETECT, EVENTS_INTERRUPT_OVERRUN, and _events_module::interrupt_flag_buffer.
Referenced by event_counter().