File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -146,6 +146,10 @@ New APIs and options
146146
147147 * :kconfig:option: `CONFIG_CPU_FREQ `
148148
149+ * Cellular
150+
151+ * :c:enumerator: `CELLULAR_EVENT_MODEM_COMMS_CHECK_RESULT `
152+
149153* Crypto
150154
151155 * :kconfig:option: `CONFIG_MBEDTLS_PSA_CRYPTO_BUILTIN_KEYS `
Original file line number Diff line number Diff line change @@ -1391,11 +1391,15 @@ static void modem_cellular_carrier_on_event_handler(struct modem_cellular_data *
13911391{
13921392 const struct modem_cellular_config * config =
13931393 (const struct modem_cellular_config * )data -> dev -> config ;
1394+ struct cellular_evt_modem_comms_check_result result ;
13941395
13951396 switch (evt ) {
13961397 case MODEM_CELLULAR_EVENT_SCRIPT_SUCCESS :
13971398 case MODEM_CELLULAR_EVENT_SCRIPT_FAILED :
1399+ result .success = evt == MODEM_CELLULAR_EVENT_SCRIPT_SUCCESS ;
1400+
13981401 modem_cellular_start_timer (data , MODEM_CELLULAR_PERIODIC_SCRIPT_TIMEOUT );
1402+ modem_cellular_emit_event (data , CELLULAR_EVENT_MODEM_COMMS_CHECK_RESULT , & result );
13991403 break ;
14001404
14011405 case MODEM_CELLULAR_EVENT_TIMEOUT :
Original file line number Diff line number Diff line change @@ -139,6 +139,8 @@ enum cellular_event {
139139 CELLULAR_EVENT_MODEM_INFO_CHANGED = BIT (0 ),
140140 /** Cellular network registration status changed */
141141 CELLULAR_EVENT_REGISTRATION_STATUS_CHANGED = BIT (1 ),
142+ /** Result of a communications link check to the modem */
143+ CELLULAR_EVENT_MODEM_COMMS_CHECK_RESULT = BIT (2 ),
142144};
143145
144146/* Opaque bit-mask large enough for all current & future events */
@@ -154,6 +156,11 @@ struct cellular_evt_registration_status {
154156 enum cellular_registration_status status ; /**< New registration status */
155157};
156158
159+ /** Payload for @ref CELLULAR_EVENT_MODEM_COMMS_CHECK_RESULT */
160+ struct cellular_evt_modem_comms_check_result {
161+ bool success ; /**< Communications to modem checked successfully */
162+ };
163+
157164/**
158165 * @brief Prototype for cellular event callbacks.
159166 *
You can’t perform that action at this time.
0 commit comments