/******************************************************************************/
/* Williams Advanced Engineering Limited                     Copyright(C) 2021*/
/* Grove                                                  All rights reserved */
/*                                                                            */
/******************************************************************************/


#include "Ios_BoardLedMngt.h"


void fnIosAnimateBoardLeds(void)
{
    static uint8 bIndex = 0;

    fnIosSetDigitalChannel(BoardLed1, bIndex & 0x01);
    fnIosSetDigitalChannel(BoardLed2, ((bIndex>>1) & 0x01));
    fnIosSetDigitalChannel(BoardLed3, ((bIndex>>2) & 0x01));

    bIndex++;
    bIndex %= 8;

}


// Function to shutdown board LED before jumping to App
void fnIosShutdownBoardLeds(void)
{
    fnIosSetDigitalChannel(BoardLed1, 0);
    fnIosSetDigitalChannel(BoardLed2, 0);
    fnIosSetDigitalChannel(BoardLed3, 0);
}

// Function to Turn all board LED ON before jumping to App
void fnIosTurnAllBoardLedsON(void)
{
    fnIosSetDigitalChannel(BoardLed1, 1);
    fnIosSetDigitalChannel(BoardLed2, 1);
    fnIosSetDigitalChannel(BoardLed3, 1);
}

