1 /*
2  * Copyright (c) 2024 Nordic Semiconductor ASA
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef NRFS_CALLBACKS_H
8 #define NRFS_CALLBACKS_H
9 
10 #include <nrfs_common.h>
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 /** @brief Service callback type. */
17 typedef void (*nrfs_service_cb_t)(void *p_notification, size_t size);
18 
19 /**
20  * @brief Function for notifying the Temperature service about incoming message.
21  *
22  * This function is called internally by the dispatcher when the corresponding message arrives.
23  *
24  * @param[in] p_notification Pointer to the notification payload.
25  * @param[in] size           Notification payload size.
26  */
27 void nrfs_temp_service_notify(void *p_notification, size_t size);
28 
29 /**
30  * @brief Function for notifying the Reset service about incoming message.
31  *
32  * This function is called internally by the dispatcher when the corresponding message arrives.
33  *
34  * @param[in] p_notification Pointer to the notification payload.
35  * @param[in] size           Notification payload size.
36  */
37 void nrfs_reset_service_notify(void *p_notification, size_t size);
38 
39 /**
40  * @brief Function for notifying the MRAM latency service about incoming message.
41  *
42  * This function is called internally by the dispatcher when the corresponding message arrives.
43  *
44  * @param[in] p_notification Pointer to the notification payload.
45  * @param[in] size           Notification payload size.
46  */
47 void nrfs_mram_service_notify(void *p_notification, size_t size);
48 
49 /**
50  * @brief Function for notifying the USB VBUS detector service about incoming message.
51  *
52  * This function is called internally by the dispatcher when the corresponding message arrives.
53  *
54  * @param[in] p_notification Pointer to the notification payload.
55  * @param[in] size           Notification payload size.
56  */
57 void nrfs_usb_service_notify(void *p_notification, size_t size);
58 
59 /**
60  * @brief Function for notifying the PMIC service about incoming message.
61  *
62  * This function is called internally by the dispatcher when the corresponding message arrives.
63  *
64  * @param[in] p_notification Pointer to the notification payload.
65  * @param[in] size           Notification payload size.
66  */
67 void nrfs_pmic_service_notify(void *p_notification, size_t size);
68 
69 /**
70  * @brief Function for notifying the System Diagnostics service about incoming message.
71  *
72  * This function is called internally by the dispatcher when the corresponding message arrives.
73  *
74  * @param[in] p_notification Pointer to the notification payload.
75  * @param[in] size           Notification payload size.
76  */
77 void nrfs_diag_service_notify(void *p_notification, size_t size);
78 
79 /**
80  * @brief Function for notifying the DVFS service about incoming message.
81  *
82  * This function is called internally by the dispatcher when the corresponding message arrives.
83  *
84  * @param[in] p_notification Pointer to the notification payload.
85  * @param[in] size           Notification payload size.
86  */
87 void nrfs_dvfs_service_notify(void *p_notification, size_t size);
88 
89 /**
90  * @brief Function for notifying the clock service about incoming message.
91  *
92  * This function is called internally by the dispatcher when the corresponding message arrives.
93  *
94  * @param[in] p_notification Pointer to the notification payload.
95  * @param[in] size           Notification payload size.
96  */
97 void nrfs_clock_service_notify(void *p_notification, size_t size);
98 
99 /**
100  * @brief Function for notifying the global domain power request service about incoming message.
101  *
102  * This function is called internally by the dispatcher when the corresponding message arrives.
103  *
104  * @param[in] p_notification Pointer to the notification payload.
105  * @param[in] size           Notification payload size.
106  */
107 void nrfs_gdpwr_service_notify(void *p_notification, size_t size);
108 
109 /**
110  * @brief Function for notifying the GDFS service about incoming message.
111  *
112  * This function is called internally by the dispatcher when the corresponding message arrives.
113  *
114  * @param[in] p_notification Pointer to the notification payload.
115  * @param[in] size           Notification payload size.
116  */
117 void nrfs_gdfs_service_notify(void *p_notification, size_t size);
118 
119 /**
120  * @brief Function for notifying the SWEXT (SWitch EXTernal) control service about incoming message.
121  *
122  * This function is called internally by the dispatcher when the corresponding message arrives.
123  *
124  * @param[in] p_notification Pointer to the notification payload.
125  * @param[in] size           Notification payload size.
126  */
127 void nrfs_swext_service_notify(void *p_notification, size_t size);
128 
129 #ifdef __cplusplus
130 }
131 #endif
132 
133 #endif /* NRFS_CALLBACKS_H */
134