Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion drivers/dectnrp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

zephyr_library_named(dectnrp_driver)

zephyr_library_sources_ifdef(CONFIG_DECTNRP_DRIVER_NRF91
zephyr_library_sources_ifdef(CONFIG_DECTNRP_DRIVER_NRF91X1

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a bug which slipped through .. seems I did not run the sample after changing the naming.

dectnrp_nrf91x1.c
)
11 changes: 7 additions & 4 deletions drivers/dectnrp/dectnrp_nrf91x1.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/* Nordic nRF91x1 NR+ PHY driver
*
* Copyright (c) 2026 Deveritec GmbH
Expand Down Expand Up @@ -620,7 +620,7 @@
stack_event.message_error.snr = dectnrp_nrf91x1_encode_snr(event->snr);
}

ctx->upper_layer_event_handler(nrf91x1_dev, &stack_event);
ctx->upper_layer_event_handler(ctx->iface, &stack_event);
}
}

Expand Down Expand Up @@ -657,6 +657,9 @@
.msg_received.op = op,
.msg_received.phy_type = ctx->rx.pcc_event.phy_type,
.msg_received.pcc = &ctx->rx.pcc_event.hdr.type_1[0],
.msg_received.pcc_len = ctx->rx.pcc_event.phy_type == 0
? DECTNRP_PHY_HEADER_TYPE1_SIZE
: DECTNRP_PHY_HEADER_TYPE2_SIZE,
.msg_received.pdc = event->data,
.msg_received.pdc_len = event->len,
.msg_received.start_time = ctx->rx.pcc_event.stf_start_time,
Expand All @@ -676,7 +679,7 @@
dectnrp_nrf91x1_encode_snr(event->snr);
}

ctx->upper_layer_event_handler(nrf91x1_dev, &stack_event);
ctx->upper_layer_event_handler(ctx->iface, &stack_event);
}
}
}
Expand Down Expand Up @@ -736,7 +739,7 @@
dectnrp_nrf91x1_encode_snr(event->snr);
}

ctx->upper_layer_event_handler(nrf91x1_dev, &stack_event);
ctx->upper_layer_event_handler(ctx->iface, &stack_event);
}
}
}
Expand Down Expand Up @@ -773,7 +776,7 @@
struct dectnrp_driver_event stack_event = {.code = DECTNRP_EVENT_OP_FINISHED,
.op_finished.op = op};
op->status = -event->err; // FIXME use generic error codes
ctx->upper_layer_event_handler(nrf91x1_dev, &stack_event);
ctx->upper_layer_event_handler(ctx->iface, &stack_event);
}
}

Expand Down
20 changes: 15 additions & 5 deletions include/zephyr/net/dectnrp_driver.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/* DECT NR+ driver API
*
* Copyright (c) 2026 Deveritec GmbH
Expand Down Expand Up @@ -251,7 +251,9 @@

/** Related start time. */
net_time_t start_time;
/** Points to PCC if pcc_valid == true. */
/** Reference to PCC buffer if pcc_valid == true.
* @attention The assigned buffer is only valid until the event callback returns - after that the driver may reuse it!
*/
const uint8_t *pcc;
/** RSSI2 value of this message.
* Encoded according to @ref ETSI TS 103 636-2 chapter 8.3.
Expand Down Expand Up @@ -285,9 +287,15 @@

/** Related start time. */
net_time_t start_time;
/** Points to PCC. */
/** Reference to PCC buffer.
* @attention The assigned buffer is only valid until the event callback returns - after that the driver may reuse it!
*/
const uint8_t *pcc;
/** Points to PDC. */
/** Number of bytes of PCC. */
uint8_t pcc_len;

@RainerSchubert RainerSchubert Sep 23, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added also a field for length of the pcc.

This is disputable as it is a redundant information - with the field phy_type the length can be retrieved.

/** Reference to PDC buffer.
* @attention The assigned buffer is only valid until the event callback returns - after that the driver may reuse it!
*/
const uint8_t *pdc;
/** Number of bytes of PDC. */
uint32_t pdc_len;
Expand Down Expand Up @@ -327,8 +335,10 @@

#endif /* CONFIG_DECTNRP_DRIVER_SCHEDULED_API */

/** Event callback function the dectnrp_driver is notifying events up to the stack. */
typedef void (*dectnrp_driver_event_cb_t)(const struct device *dev,
/** Event callback function the dectnrp_driver is notifying events up to the stack.
* @attention The @p event is only valid until the event callback returns - after that the driver may reuse it!
*/
typedef void (*dectnrp_driver_event_cb_t)(struct net_if *iface,
const struct dectnrp_driver_event *event);

/**
Expand Down
Loading