Trident IoT Z-Wave SDK
Loading...
Searching...
No Matches
zaf_event_distributor_soc.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2022 Silicon Laboratories Inc. <https://www.silabs.com/>
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
13
14#ifndef ZAF_EVENT_DISTRIBUTOR_SOC_H
15#define ZAF_EVENT_DISTRIBUTOR_SOC_H
16
19
26
27typedef void(*zaf_event_distributor_cc_event_handler_handler_v1_t)(const uint8_t, const void*);
28
29typedef struct {
30 const void* data;
31 uint16_t command_class;
32 uint8_t event;
34
43
48
52#define ZAF_EVENT_DISTRIBUTOR_CC_EVENT_HANDLER_SECTION "zw_zaf_event_distributor_cc_event_handler"
53
60#define ZAF_EVENT_DISTRIBUTOR_REGISTER_CC_EVENT_HANDLER(command_class, handler) \
61 static const zaf_event_distributor_cc_event_handler_map_latest_t zaf_event_distributor_cc_event_handler_##command_class##event##handler \
62 __attribute__((aligned(4), __used__, __section__(ZAF_EVENT_DISTRIBUTOR_CC_EVENT_HANDLER_SECTION))) = { handler, command_class, 1 }; \
63 void * zaf_event_distributor_register_cc_event_handler_##table_entry##handler
64
71
78
84extern void zaf_event_distributor_app_event_manager(const uint8_t event);
85
92
99
106
115bool zaf_event_distributor_enqueue_cc_event(const uint16_t command_class,
116 const uint8_t event,
117 const void* data);
118
127bool zaf_event_distributor_enqueue_cc_event_from_isr(const uint16_t command_class,
128 const uint8_t event,
129 const void* data);
130
135
136#endif /* ZAF_EVENT_DISTRIBUTOR_SOC_H */
void zaf_event_distributor_app_zw_rx(SZwaveReceivePackage *RxPackage)
Used by the application to handle protocol received events.
bool zaf_event_distributor_enqueue_app_event(const uint8_t event)
Enqueues an event in the application queue.
bool zaf_event_distributor_enqueue_cc_event(const uint16_t command_class, const uint8_t event, const void *data)
Enqueues an event in the command class event queue.
zaf_event_distributor_cc_event_handler_map_v1_t zaf_event_distributor_cc_event_handler_map_latest_t
Definition zaf_event_distributor_soc.h:47
void zaf_event_distributor_app_event_manager(const uint8_t event)
Used by the application to handle application/system received events.
uint8_t zaf_event_distributor_is_primary_controller(void)
Used by application to verify if it is a primary controller.
void(* zaf_event_distributor_cc_event_handler_handler_v1_t)(const uint8_t, const void *)
Definition zaf_event_distributor_soc.h:27
bool zaf_event_distributor_enqueue_app_event_from_isr(const uint8_t event)
Enqueues an event in the application queue.
bool zaf_event_distributor_enqueue_cc_event_from_isr(const uint16_t command_class, const uint8_t event, const void *data)
Enqueues an event in the command class event queue.
void zaf_event_distributor_app_zw_command_status(SZwaveCommandStatusPackage *Status)
Used by the application to handle protocol command status.
Definition ZW_application_transport_interface.h:2046
Definition ZW_application_transport_interface.h:2079
Definition zaf_event_distributor_soc.h:29
uint8_t event
Definition zaf_event_distributor_soc.h:32
uint16_t command_class
Definition zaf_event_distributor_soc.h:31
const void * data
This must point to a global data.
Definition zaf_event_distributor_soc.h:30
Definition zaf_event_distributor_soc.h:38
zaf_event_distributor_cc_event_handler_handler_v1_t handler
Custom handler.
Definition zaf_event_distributor_soc.h:39
uint16_t command_class
Table entry.
Definition zaf_event_distributor_soc.h:40
uint8_t version
Map version.
Definition zaf_event_distributor_soc.h:41