void LED_Set(unsigned char SET,unsigned char id)
{
		unsigned char LEDPort = LED_ConfigData[id].LEDPort;
		unsigned char LEDMask = LED_ConfigData[id].LEDMask;
		DIO_vidWritePortData(LEDPort,LEDMask,SET);
		Toggle[id] = SET;
}
Exemple #2
0
void LEDS_Flash_FULL(void)
{
		if(ledFlag_FULL)
	{
		DIO_vidWritePortData(PB,LED_Half,0);
		ledFlag_FULL = 0; /*there is a hazard at the first flash only */
		DIO_vidTogglePortData(PB,LED_Full); /*toggle led every 250 ms*/
	}
}
Exemple #3
0
void LEDS_Flash_LEFT(void)
{
		if( (ledFlag_LEFT) )
	{
		DIO_vidWritePortData(PB,LED_Right,0);
		ledFlag_LEFT  = 0; /*there is a hazard at the first flash only */
		DIO_vidTogglePortData(PB,LED_Left); /*toggle led every 250 ms*/
	}
}
Exemple #4
0
void LEDS_Flash_RIGHT(void)
{
		if((ledFlag_RIGHT))
	{
		DIO_vidWritePortData(PB,LED_Left,0); 
		ledFlag_RIGHT =0;
		DIO_vidTogglePortData(PB,LED_Right); /*toggle led every 250 ms*/
	}
}
void LED_Init(void)
{
	unsigned char LoopIndex;
	unsigned char LEDPort;
	unsigned char LEDMask;
	for(LoopIndex = 0 ; LoopIndex < LED_NUM ; LoopIndex ++)
	{
		LEDPort = LED_ConfigData[LoopIndex].LEDPort;
		LEDMask = LED_ConfigData[LoopIndex].LEDMask;
		DIO_vidWritePortDirection(LEDPort,LEDMask,0xFF);
		DIO_vidWritePortData(LEDPort,LEDMask,ON);
	}
}
Exemple #6
0
void LEDS_Stop(unsigned char led) 
{
	DIO_vidWritePortData(PB,led,0);
}