Skip to content

Commit 749680f

Browse files
committed
sdh: rename variable
Rename an internal variable. Signed-off-by: Emanuele Di Santo <[email protected]>
1 parent c7efc8b commit 749680f

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

subsys/softdevice_handler/nrf_sdh.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ LOG_MODULE_REGISTER(nrf_sdh, CONFIG_NRF_SDH_LOG_LEVEL);
1919
#warning Please select NRF_CLOCK_LF_ACCURACY_500_PPM when using NRF_CLOCK_LF_SRC_RC
2020
#endif
2121

22-
static atomic_t sdh_suspended; /* Whether this module is pulling SoftDevice events or not. */
22+
/* Whether this module is pulling SoftDevice events or not. */
23+
static atomic_t sdh_is_suspended;
2324

2425
static char *state_tostr(enum nrf_sdh_state_evt s)
2526
{
@@ -109,7 +110,7 @@ int nrf_sdh_enable_request(void)
109110
return -EINVAL;
110111
}
111112

112-
atomic_set(&sdh_suspended, false);
113+
atomic_set(&sdh_is_suspended, false);
113114

114115
/* Enable event interrupt, the priority has already been set by the stack. */
115116
NVIC_EnableIRQ((IRQn_Type)SD_EVT_IRQn);
@@ -160,14 +161,14 @@ void nrf_sdh_suspend(void)
160161
LOG_WRN("Tried to suspend, but SoftDevice is disabled");
161162
return;
162163
}
163-
if (sdh_suspended) {
164+
if (sdh_is_suspended) {
164165
LOG_WRN("Tried to suspend, but already is suspended");
165166
return;
166167
}
167168

168169
NVIC_DisableIRQ((IRQn_Type)SD_EVT_IRQn);
169170

170-
atomic_set(&sdh_suspended, true);
171+
atomic_set(&sdh_is_suspended, true);
171172
}
172173

173174
void nrf_sdh_resume(void)
@@ -180,7 +181,7 @@ void nrf_sdh_resume(void)
180181
LOG_WRN("Tried to resume, but SoftDevice is disabled");
181182
return;
182183
}
183-
if (!sdh_suspended) {
184+
if (!sdh_is_suspended) {
184185
LOG_WRN("Tried to resume, but not suspended");
185186
return;
186187
}
@@ -189,12 +190,12 @@ void nrf_sdh_resume(void)
189190
NVIC_SetPendingIRQ((IRQn_Type)SD_EVT_IRQn);
190191
NVIC_EnableIRQ((IRQn_Type)SD_EVT_IRQn);
191192

192-
atomic_set(&sdh_suspended, false);
193+
atomic_set(&sdh_is_suspended, false);
193194
}
194195

195196
bool nrf_sdh_is_suspended(void)
196197
{
197-
return sdh_suspended;
198+
return sdh_is_suspended;
198199
}
199200

200201
void nrf_sdh_evts_poll(void)

0 commit comments

Comments
 (0)