mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-10-10 16:27:22 +00:00
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.
This commit is contained in:
@@ -1369,6 +1369,7 @@ ble_phy_rx_set_start_time(uint32_t cputime, uint8_t rem_usecs)
|
|||||||
{
|
{
|
||||||
uint32_t ll_val32;
|
uint32_t ll_val32;
|
||||||
int32_t time_till_start;
|
int32_t time_till_start;
|
||||||
|
int rc = 0;
|
||||||
|
|
||||||
MCU_DIAG_SER('r');
|
MCU_DIAG_SER('r');
|
||||||
|
|
||||||
@@ -1404,11 +1405,12 @@ ble_phy_rx_set_start_time(uint32_t cputime, uint8_t rem_usecs)
|
|||||||
/* We missed start. Start now */
|
/* We missed start. Start now */
|
||||||
CMAC->CM_EV_LINKUP_REG =
|
CMAC->CM_EV_LINKUP_REG =
|
||||||
CMAC_CM_EV_LINKUP_REG_LU_FRAME_START_2_ASAP_Msk;
|
CMAC_CM_EV_LINKUP_REG_LU_FRAME_START_2_ASAP_Msk;
|
||||||
|
rc = BLE_PHY_ERR_RX_LATE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
__enable_irq();
|
__enable_irq();
|
||||||
|
|
||||||
return 0;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|||||||
Reference in New Issue
Block a user