Skip to content

Commit c49fffb

Browse files
committed
nrf_modem: update library
SHA: 4deb56c10abeb60ef127293b2ed0059c1a50e2a2 Automatically created by libmodem Github workflow. Signed-off-by: Nordic Builder <[email protected]>
1 parent 5697f65 commit c49fffb

File tree

18 files changed

+126
-2
lines changed

18 files changed

+126
-2
lines changed

nrf_modem/include/nrf_modem_dect_phy.h

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,13 @@ enum nrf_modem_dect_phy_err {
142142
* @brief Operation is not allowed in the current radio mode.
143143
*/
144144
NRF_MODEM_DECT_PHY_ERR_RADIO_MODE_CONFLICT = 0x100B,
145+
/**
146+
* @brief Handle is already in use.
147+
*
148+
* Each operation given to the modem must have a unique handle among all uncompleted
149+
* operations. Handles may be reused after an operation completes.
150+
*/
151+
NRF_MODEM_DECT_PHY_ERR_HANDLE_IN_USE = 0x100C,
145152
/**
146153
* @brief Unsupported carrier.
147154
*/
@@ -1437,6 +1444,36 @@ struct nrf_modem_dect_phy_band_get_event {
14371444
struct nrf_modem_dect_phy_band *band;
14381445
};
14391446

1447+
/**
1448+
* @brief Test RF TX CW operation codes.
1449+
*/
1450+
enum nrf_modem_dect_phy_test_rf_tx_cw_oper {
1451+
NRF_MODEM_DECT_PHY_TEST_RF_TX_CW_OPER_ON,
1452+
NRF_MODEM_DECT_PHY_TEST_RF_TX_CW_OPER_OFF,
1453+
};
1454+
1455+
/**
1456+
* @brief Test RF TX CW operation status codes.
1457+
*/
1458+
enum nrf_modem_dect_phy_test_rf_tx_cw_err {
1459+
NRF_MODEM_DECT_PHY_TEST_RF_TX_CW_ERR_NO_ERROR = 0,
1460+
NRF_MODEM_DECT_PHY_TEST_RF_TX_CW_ERR_ERROR = -1,
1461+
NRF_MODEM_DECT_PHY_TEST_RF_TX_CW_ERR_TX_ALREADY_ON = -100,
1462+
NRF_MODEM_DECT_PHY_TEST_RF_TX_CW_ERR_TX_ALREADY_OFF = -101,
1463+
NRF_MODEM_DECT_PHY_TEST_RF_TX_CW_ERR_BUFFER_RESERVE_FAILED = -102,
1464+
NRF_MODEM_DECT_PHY_TEST_RF_TX_CW_ERR_INVALID_OPERATION = -103,
1465+
NRF_MODEM_DECT_PHY_TEST_RF_TX_CW_ERR_DSP_CONFIG_FAILURE = -104,
1466+
NRF_MODEM_DECT_PHY_TEST_RF_TX_CW_ERR_MSG_SEND_FAILED = -105,
1467+
};
1468+
1469+
/**
1470+
* @brief Test RF TX CW control event.
1471+
*/
1472+
struct nrf_modem_dect_phy_test_rf_tx_cw_control_event {
1473+
/** @brief Operation result. */
1474+
enum nrf_modem_dect_phy_test_rf_tx_cw_err err;
1475+
};
1476+
14401477
/**
14411478
* @brief STF cover sequence control event.
14421479
*/
@@ -1601,6 +1638,10 @@ enum nrf_modem_dect_phy_event_id {
16011638
* @brief Event to indicate the completion of STF configuration.
16021639
*/
16031640
NRF_MODEM_DECT_PHY_EVT_STF_CONFIG,
1641+
/**
1642+
* @brief Event to indicate the completion of the test RF TX CW configuration.
1643+
*/
1644+
NRF_MODEM_DECT_PHY_EVT_TEST_RF_TX_CW_CONTROL_CONFIG,
16041645
};
16051646

16061647
/**
@@ -1636,6 +1677,7 @@ struct nrf_modem_dect_phy_event {
16361677
struct nrf_modem_dect_phy_capability_get_event capability_get;
16371678
struct nrf_modem_dect_phy_band_get_event band_get;
16381679
struct nrf_modem_dect_phy_latency_info_event latency_get;
1680+
struct nrf_modem_dect_phy_test_rf_tx_cw_control_event test_rf_tx_cw_control;
16391681
struct nrf_modem_dect_phy_stf_control_event stf_cover_seq_control;
16401682
struct nrf_modem_dect_phy_link_config_event link_config;
16411683
};
@@ -1989,6 +2031,35 @@ int nrf_modem_dect_phy_latency_get(void);
19892031
*/
19902032
int nrf_modem_dect_phy_time_get(void);
19912033

2034+
/**
2035+
* @brief Control continuous wave transmission.
2036+
*
2037+
* The default, applied at each initialization, is OFF.
2038+
*
2039+
* Continuous wave transmission can only be turned on when the DECT PHY interface is not
2040+
* initialized. DECT PHY interface initialization is not allowed when continuous wave transmission
2041+
* is on.
2042+
*
2043+
* @note
2044+
* This API is intended for certification purposes only.
2045+
* It should not be used for normal operation.
2046+
*
2047+
* This operation is performed asynchronously.
2048+
* Completion of this operation is indicated by the
2049+
* @ref NRF_MODEM_DECT_PHY_EVT_TEST_RF_TX_CW_CONTROL_CONFIG event.
2050+
*
2051+
* @param operation Control operation code.
2052+
* @param carrier Carrier on which the wave is transmitted.
2053+
* @param power Power of the transmission in dBm.
2054+
*
2055+
* @retval 0 Request was sent to modem.
2056+
* @retval -NRF_EPERM The Modem library is not initialized.
2057+
* @retval -NRF_EFAULT No event handler is set.
2058+
* @retval -NRF_ENOMEM Not enough shared memory for this request.
2059+
*/
2060+
int nrf_modem_dect_phy_test_rf_tx_cw_control(enum nrf_modem_dect_phy_test_rf_tx_cw_oper operation,
2061+
uint16_t carrier, int8_t power);
2062+
19922063
/**
19932064
* @brief STF cover sequence control.
19942065
*

nrf_modem/include/nrf_socket.h

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,9 @@ extern "C" {
305305
#define NRF_SO_TCP_SRV_SESSTIMEO 55
306306
/** Set a callback for poll events (write-only).
307307
* See @ref nrf_modem_pollcb_t for the callback function type.
308+
*
309+
* @note The callback is executed in an interrupt context.
310+
* Take care to offload any processing as appropriate.
308311
*/
309312
#define NRF_SO_POLLCB 60
310313
/** Release Assistance Indication (RAI) (write-only).
@@ -323,6 +326,49 @@ extern "C" {
323326
* modem firmware version 2.0.2 and newer.
324327
*/
325328
#define NRF_SO_IPV6_DELAYED_ADDR_REFRESH 62
329+
/**
330+
* Set a callback to be called when a send request is acknowledged by the network and
331+
* the data has been acknowledged by the peer, if required by the network protocol, or until the
332+
* timeout, given by the @ref NRF_SO_SNDTIMEO socket option, is reached. Valid timeout values are
333+
* 1 to 600 seconds.
334+
* See @ref nrf_modem_sendcb_t for the callback function type.
335+
*
336+
* @note The callback is executed in an interrupt context.
337+
* Take care to offload any processing as appropriate.
338+
*
339+
* @note This is only supported by the following modem firmware:
340+
* - mfw_nrf9151-ntn
341+
*
342+
* This socket option cannot be used along with the @ref NRF_MSG_WAITACK send flag.
343+
*/
344+
#define NRF_SO_SENDCB 63
345+
/** @} */
346+
347+
/**
348+
* @defgroup nrf_socket_options_sendcb_params Socket send callback option parameters.
349+
* @ingroup nrf_socket
350+
* @{
351+
*/
352+
/**
353+
* @brief This structure is used to describe the parameters to a send callback function.
354+
*/
355+
struct nrf_modem_sendcb_params {
356+
/** Socket handle */
357+
int fd;
358+
/** Status. Can be 0 on successful send or NRF_EAGAIN on timeout. */
359+
int status;
360+
/** Number of bytes that was sent. */
361+
size_t bytes_sent;
362+
};
363+
364+
/** Callback for send events */
365+
typedef void (*nrf_modem_sendcb_t)(const struct nrf_modem_sendcb_params *params);
366+
367+
/** @c nrf_send() and @c nrf_sendto() callback */
368+
struct nrf_modem_sendcb {
369+
/** Callback function */
370+
nrf_modem_sendcb_t callback;
371+
};
326372
/** @} */
327373

328374
/**
@@ -346,8 +392,11 @@ extern "C" {
346392
/** Request a blocking read operation until the request is satisfied. */
347393
#define NRF_MSG_WAITALL 0x100
348394
/** Request a blocking send operation until the request is acknowledged.
349-
* When used in @c nrf_send() or @c nrf_sendto(), the operation will block until the data has been
350-
* sent on-air and acknowledged by the peer, if required by the network protocol.
395+
* When used in @c nrf_send() or @c nrf_sendto(), the operation is blocked until the data has been
396+
* sent on-air and acknowledged by the peer, if required by the network protocol, or until the
397+
* timeout, given by the @ref NRF_SO_SNDTIMEO socket option, is reached. Valid timeout values are
398+
* 1 to 600 seconds.
399+
* This send flag cannot be used along with the @ref NRF_SO_SENDCB socket option.
351400
*/
352401
#define NRF_MSG_WAITACK 0x200
353402
/** @} */
@@ -866,6 +915,8 @@ int nrf_connect(int socket, const struct nrf_sockaddr *address, nrf_socklen_t ad
866915
* - [NRF_ECANCELED] Operation canceled because of APN rate control.
867916
* - [NRF_ENOMEM] TCP stream interrupted because of no heap memory.
868917
* - [NRF_EPROTO] Request failed because DTLS context was serialized.
918+
* - [NRF_EBUSY] Earlier send request with the @ref NRF_SO_SENDCB socket option set is still
919+
* ongoing.
869920
*/
870921
ssize_t nrf_send(int socket, const void *buffer, size_t length, int flags);
871922

@@ -881,6 +932,8 @@ ssize_t nrf_send(int socket, const void *buffer, size_t length, int flags);
881932
* - [NRF_ECANCELED] Operation canceled because of APN rate control.
882933
* - [NRF_ENOMEM] TCP stream interrupted because of no heap memory.
883934
* - [NRF_EPROTO] Request failed because DTLS context was serialized.
935+
* - [NRF_EBUSY] Earlier send request with the @ref NRF_SO_SENDCB socket option set is still
936+
* ongoing.
884937
*/
885938
ssize_t nrf_sendto(int socket, const void *message, size_t length, int flags,
886939
const struct nrf_sockaddr *dest_addr, nrf_socklen_t dest_len);
846 Bytes
Binary file not shown.
1.07 KB
Binary file not shown.
846 Bytes
Binary file not shown.
1.07 KB
Binary file not shown.
846 Bytes
Binary file not shown.
1.07 KB
Binary file not shown.
846 Bytes
Binary file not shown.
1.07 KB
Binary file not shown.

0 commit comments

Comments
 (0)