Skip to content

Commit 1b09cf2

Browse files
nimble/phy/cmac: Fix return value for RX late start
This does not affect current code, but we should return proper code if RX was late anyway.
1 parent 4fae6e1 commit 1b09cf2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

nimble/drivers/dialog_cmac/src/ble_phy.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -1369,6 +1369,7 @@ ble_phy_rx_set_start_time(uint32_t cputime, uint8_t rem_usecs)
13691369
{
13701370
uint32_t ll_val32;
13711371
int32_t time_till_start;
1372+
int rc = 0;
13721373

13731374
MCU_DIAG_SER('r');
13741375

@@ -1404,11 +1405,12 @@ ble_phy_rx_set_start_time(uint32_t cputime, uint8_t rem_usecs)
14041405
/* We missed start. Start now */
14051406
CMAC->CM_EV_LINKUP_REG =
14061407
CMAC_CM_EV_LINKUP_REG_LU_FRAME_START_2_ASAP_Msk;
1408+
rc = BLE_PHY_ERR_RX_LATE;
14071409
}
14081410
}
14091411
__enable_irq();
14101412

1411-
return 0;
1413+
return rc;
14121414
}
14131415

14141416
int

0 commit comments

Comments
 (0)