ESP-IDF
s_storage
is only used within ESP-IDF.
Symbol previews are coming soon...
Symbols
loading...
Files
loading (1/5)...
Summary
Syntax
Examples
References
Call Tree
Data Use
Class Tree
Override Tree
Implementations
Instances
Lifecycle
SourceVu
ESP-IDF Framework and Examples
ESP-IDF
s_storage
s_storage variable
Syntax
Show:
Summary
Declaration
from
esp_netif_sntp.c:31
static
sntp_storage_t
*
s_storage
=
NULL
;
Examples
References
from
examples
Code
Location
Referrer
static
sntp_storage_t
*
s_storage
=
NULL
;
esp_netif_sntp.c:31
if
(
s_storage
&&
s_storage
->
sync_sem
)
{
esp_netif_sntp.c:35
sync_time_cb()
xSemaphoreGive
(
s_storage
->
sync_sem
)
;
esp_netif_sntp.c:36
sync_time_cb()
if
(
s_storage
&&
s_storage
->
sync_cb
)
{
esp_netif_sntp.c:38
sync_time_cb()
s_storage
->
sync_cb
(
tv
)
;
esp_netif_sntp.c:39
sync_time_cb()
if
(
s_storage
&&
s_storage
->
num_of_servers
)
{
esp_netif_sntp.c:78
renew_servers_api()
for
(
int
i
=
0
;
i
<
s_storage
->
num_of_servers
;
++
i
)
{
esp_netif_sntp.c:79
renew_servers_api()
sntp_setservername
(
i
+
s_storage
->
index_of_first_server
,
s_storage
->
servers
[
i
]
)
;
esp_netif_sntp.c:80
renew_servers_api()
ESP_RETURN_ON_FALSE
(
s_storage
==
NULL
,
ESP_ERR_INVALID_STATE
,
TAG
,
"esp_netif_sntp already initialized"
)
;
esp_netif_sntp.c:94
esp_netif_sntp_init()
s_storage
=
calloc
(
1
,
sizeof
(
sntp_storage_t
)
+
// allocate space for servers only if we are supposed to refresh the settings
esp_netif_sntp.c:95
esp_netif_sntp_init()
ESP_GOTO_ON_FALSE
(
s_storage
!=
NULL
,
ESP_ERR_NO_MEM
,
err
,
TAG
,
"Failed to allocate SNTP storage"
)
;
esp_netif_sntp.c:97
esp_netif_sntp_init()
s_storage
->
sync_sem
=
xSemaphoreCreateBinary
(
)
;
esp_netif_sntp.c:99
esp_netif_sntp_init()
ESP_GOTO_ON_FALSE
(
s_storage
->
sync_sem
!=
NULL
,
ESP_ERR_NO_MEM
,
err
,
TAG
,
"Failed to SNTP sync semaphore"
)
;
esp_netif_sntp.c:100
esp_netif_sntp_init()
s_storage
->
num_of_servers
=
config
->
num_of_servers
;
esp_netif_sntp.c:103
esp_netif_sntp_init()
s_storage
->
index_of_first_server
=
config
->
index_of_first_server
;
esp_netif_sntp.c:104
esp_netif_sntp_init()
s_storage
->
servers
[
i
]
=
strdup
(
config
->
servers
[
i
]
)
;
esp_netif_sntp.c:107
esp_netif_sntp_init()
s_storage
->
ip_event_to_renew
=
config
->
ip_event_to_renew
;
esp_netif_sntp.c:112
esp_netif_sntp_init()
s_storage
->
sync_cb
=
config
->
sync_cb
;
esp_netif_sntp.c:116
esp_netif_sntp_init()
if
(
s_storage
)
{
esp_netif_sntp.c:136
esp_netif_sntp_deinit()
sntp_storage_t
*
storage
=
s_storage
;
esp_netif_sntp.c:137
esp_netif_sntp_deinit()
s_storage
=
NULL
;
esp_netif_sntp.c:138
esp_netif_sntp_deinit()
if
(
s_storage
==
NULL
||
s_storage
->
sync_sem
==
NULL
)
{
esp_netif_sntp.c:157
esp_netif_sntp_sync_wait()
if
(
xQueueSemaphoreTake
(
s_storage
->
sync_sem
,
tout
)
!=
pdTRUE
)
{
esp_netif_sntp.c:160
esp_netif_sntp_sync_wait()
if
(
s_storage
==
NULL
||
sntp_enabled
(
)
==
0
)
{
esp_netif_sntp.c:187
esp_netif_sntp_reachability()
Call Tree
from
examples
All items filtered out
All items filtered out
Data Use
from
examples
s_storage
is written by 2 functions and is read by 6 functions:
esp_netif_sntp_init()
esp_netif_sntp_deinit()
All items filtered out
s_storage
sync_time_cb()
renew_servers_api()
esp_netif_sntp_init()
esp_netif_sntp_deinit()
esp_netif_sntp_sync_wait()
esp_netif_sntp_reachability()
All items filtered out
Class Tree
from
examples
All items filtered out
All items filtered out
Override Tree
from
examples
All items filtered out
All items filtered out
Implementations
from
examples
All items filtered out
All items filtered out
Instances
from
examples
Lifecycle
from
examples
All items filtered out
All items filtered out