Skip to content

Commit

Permalink
update tickless to use PalBbIsEnabled
Browse files Browse the repository at this point in the history
  • Loading branch information
EricB-ADI committed Nov 5, 2024
1 parent be54351 commit 5f6bedf
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 13 deletions.
5 changes: 2 additions & 3 deletions Examples/MAX32655/Bluetooth/BLE_FreeRTOS/freertos_tickless.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,8 @@ int freertos_permit_tickless(void)
return E_BUSY;
}

uint32_t dummy;
bool_t ret = PalBbGetTimestamp(&dummy);
if (!ret) {
if(PalBbIsEnabled())
{
return E_BUSY;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,8 @@ int freertos_permit_tickless(void)
return E_BUSY;
}

uint32_t dummy;
bool_t ret = PalBbGetTimestamp(&dummy);
if (!ret) {
if(PalBbIsEnabled())
{
return E_BUSY;
}

Expand Down
8 changes: 4 additions & 4 deletions Examples/MAX32665/Bluetooth/BLE_FreeRTOS/freertos_tickless.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ int freertos_permit_tickless(void)
if (MXC_UART_GetActive(MXC_UART_GET_UART(CONSOLE_UART)) != E_NO_ERROR) {
return E_BUSY;
}

uint32_t dummy;
bool_t ret = PalBbGetTimestamp(&dummy);
if (!ret) {

if(PalBbIsEnabled())
{
return E_BUSY;
}


return E_NO_ERROR;
}

Expand Down
5 changes: 2 additions & 3 deletions Examples/MAX32690/Bluetooth/BLE_FreeRTOS/freertos_tickless.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,8 @@ int freertos_permit_tickless(void)
return E_BUSY;
}

uint32_t dummy;
bool_t ret = PalBbGetTimestamp(&dummy);
if (!ret) {
if(PalBbIsEnabled())
{
return E_BUSY;
}

Expand Down
8 changes: 8 additions & 0 deletions Libraries/Cordio/platform/include/pal_bb.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,8 @@ void PalBbEnable(void);
/*************************************************************************************************/
bool PalBbIsEnabled(void);



/*************************************************************************************************/
/*!
* \brief Disable the BB hardware.
Expand Down Expand Up @@ -342,6 +344,12 @@ bool PalBbFgenIsEnabled(void);
/*************************************************************************************************/
bool_t PalBbGetRssi(int8_t *rssi, uint8_t rfChannel);

bool __attribute__((weak)) PalBbIsEnabled(void)
{
uint32_t dummy;
return PalBbGetTimestamp(&dummy);
}

static inline bool PalBbIsValidPrbsType(uint8_t maybeType)
{
switch (maybeType)
Expand Down

0 comments on commit 5f6bedf

Please sign in to comment.