This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Question regarding changes on Z-Stack Home 1.2.2

Components\hal\common\hal_assert.c

v1.2.1

void halAssertHandler(void)
{
/* execute code that handles asserts */
#ifdef ASSERT_RESET
HAL_SYSTEM_RESET();
#elif !defined ASSERT_WHILE
halAssertHazardLights();
#else
while(1);
#endif
}

#if !defined ASSERT_WHILE
/**************************************************************************************************
* @fn halAssertHazardLights
*
* @brief Blink LEDs to indicate an error.
*
* @param none
*
* @return none
**************************************************************************************************
*/
void halAssertHazardLights(void)
{
enum
{..................

v1.2.2

void halAssertHandler( void )
{

#if defined( HAL_ASSERT_RESET )
HAL_SYSTEM_RESET();
#elif defined ( HAL_ASSERT_LIGHTS )
halAssertHazardLights();


#elif defined( HAL_ASSERT_SPIN )
volatile uint8 i = 1;
HAL_DISABLE_INTERRUPTS();
while(i);
#endif

return;
}

#if !defined ASSERT_WHILE
/**************************************************************************************************
* @fn halAssertHazardLights
*
* @brief Blink LEDs to indicate an error.
*
* @param none
*
* @return none
**************************************************************************************************
*/
void halAssertHazardLights(void)
{
enum
{

When comparing that code, I see that ASSERT_WHILE is replace with HAL_ASSERT_LIGHTS

In v1.2.1, ASSERT_WHILE was used. Then in v1.2.2, ASSERT_WHILE is define but not used?

Where does HAL_ASSERT_LIGHTS goes to? Thanks.

  • Please just use HAL_ASSERT_LIGHTS and ignore ASSERT_WHILE compil flag.
    If you want to go in a while(1) loop, just define HAL_ASSERT_SPIN.

    I agree that the compil flag code is a little bit misleading when read for the first time, however innocuous. I will report this internally.
    Thanks,
    TheDarkSide