File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 8
8
#define NRFS_TEMP_H
9
9
10
10
#include <internal/services/nrfs_temp.h>
11
+ #include <nrfs_config.h>
11
12
12
13
#ifdef __cplusplus
13
14
extern "C" {
@@ -16,7 +17,9 @@ extern "C" {
16
17
/** @brief Temperature service event types. */
17
18
typedef enum __NRFS_PACKED {
18
19
NRFS_TEMP_EVT_MEASURE_DONE , /** Temperature measurement done. */
20
+ #ifdef NRFS_TEMP_SERVICE_SUBSCRIPTION_ENABLED
19
21
NRFS_TEMP_EVT_CHANGE , /** Temperature threshold crossed. */
22
+ #endif
20
23
NRFS_TEMP_EVT_REJECT , /** Request rejected. */
21
24
} nrfs_temp_evt_type_t ;
22
25
@@ -58,6 +61,7 @@ void nrfs_temp_uninit(void);
58
61
*/
59
62
nrfs_err_t nrfs_temp_measure_request (void * p_context );
60
63
64
+ #ifdef NRFS_TEMP_SERVICE_SUBSCRIPTION_ENABLED
61
65
/**
62
66
* @brief Function for subscribing to the temperature monitoring in Temperature service.
63
67
*
@@ -86,6 +90,7 @@ nrfs_err_t nrfs_temp_subscribe(uint16_t measure_rate_ms,
86
90
* @retval NRFS_ERR_IPC Backend returned error during request sending.
87
91
*/
88
92
nrfs_err_t nrfs_temp_unsubscribe (void );
93
+ #endif /* NRFS_TEMP_SERVICE_SUBSCRIPTION_ENABLED */
89
94
90
95
/**
91
96
* @brief Function for converting the temperature value from raw data to Celsius scale.
Original file line number Diff line number Diff line change @@ -35,12 +35,12 @@ void nrfs_temp_service_notify(void *p_notification, size_t size)
35
35
evt .type = NRFS_TEMP_EVT_MEASURE_DONE ;
36
36
m_cb .handler (& evt , (void * )p_rsp -> ctx .ctx );
37
37
break ;
38
-
38
+ #ifdef NRFS_TEMP_SERVICE_SUBSCRIPTION_ENABLED
39
39
case NRFS_TEMP_REQ_SUBSCRIBE :
40
40
evt .type = NRFS_TEMP_EVT_CHANGE ;
41
41
m_cb .handler (& evt , (void * )p_rsp -> ctx .ctx );
42
42
break ;
43
-
43
+ #endif
44
44
default :
45
45
break ;
46
46
}
@@ -75,7 +75,7 @@ nrfs_err_t nrfs_temp_measure_request(void *p_context)
75
75
76
76
return nrfs_backend_send (& req , sizeof (req ));
77
77
}
78
-
78
+ #ifdef NRFS_TEMP_SERVICE_SUBSCRIPTION_ENABLED
79
79
nrfs_err_t nrfs_temp_subscribe (uint16_t measure_rate_ms ,
80
80
int32_t lower_threshold ,
81
81
int32_t upper_threshold ,
@@ -108,3 +108,4 @@ nrfs_err_t nrfs_temp_unsubscribe(void)
108
108
109
109
return nrfs_backend_send (& req , sizeof (req ));
110
110
}
111
+ #endif /* NRFS_TEMP_SERVICE_SUBSCRIPTION_ENABLED */
You can’t perform that action at this time.
0 commit comments