Ejemplo n.º 1
0
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);
	}
}
Ejemplo n.º 2
0
void BTN_Init(void)
{
	
	unsigned char LoopIndex;
	unsigned char BtnPort;
	unsigned char BtnMask;
	for(LoopIndex = 0 ; LoopIndex < NUM_OF_BTNS ; LoopIndex ++)
	{
		BtnPort = BtnConfigData[LoopIndex].BtnPort;
		BtnMask = BtnConfigData[LoopIndex].BtnMask;
		DIO_vidWritePortDirection(BtnPort,BtnMask,0x00);
		State[LoopIndex] = STATE_OPEN;
	}
}
Ejemplo n.º 3
0
void LEDS_Init(void)
{
	 DIO_vidWritePortDirection(PB,0xFF,0xFF);
	
}