示例#1
0
//*****************************************************************************
//
//!  \brief This function returns LED current Status
//!
//!  \param[in] ucGPIONum is the GPIO to which the LED is connected
//!                MCU_GREEN_LED_GPIO\MCU_ORANGE_LED_GPIO\MCU_RED_LED_GPIO
//!
//!
//!  \return 1: LED ON, 0: LED OFF
//
//*****************************************************************************
unsigned char
GPIO_IF_LedStatus(unsigned char ucGPIONum)
{
  unsigned char ucLEDStatus;
  switch(ucGPIONum)
  {
    case MCU_GREEN_LED_GPIO:
    {
      ucLEDStatus = GPIO_IF_Get(ucGPIONum, g_uiLED3Port, g_ucLED3Pin);
      break;
    }
    case MCU_ORANGE_LED_GPIO:
    {
      ucLEDStatus = GPIO_IF_Get(ucGPIONum, g_uiLED2Port, g_ucLED2Pin);
      break;
    }
    case MCU_RED_LED_GPIO:
    {
      ucLEDStatus = GPIO_IF_Get(ucGPIONum, g_uiLED1Port, g_ucLED1Pin);
      break;
    }
    default:
        ucLEDStatus = 0;
  }
  return ucLEDStatus;
}
示例#2
0
//****************************************************************************
//
//!	\brief Read Force AP GPIO and Configure Mode - 1(Access Point Mode)
//!                                                  - 0 (Station Mode)
//!
//! \return	                	None
//
//****************************************************************************
static void ReadDeviceConfiguration()
{
	unsigned int uiGPIOPort;
	unsigned char pucGPIOPin;
	unsigned char ucPinValue;
        
        //Read GPIO
	GPIO_IF_GetPortNPin(SH_GPIO_3,&uiGPIOPort,&pucGPIOPin);
	ucPinValue = GPIO_IF_Get(SH_GPIO_3,uiGPIOPort,pucGPIOPin);
        
        //If Connected to VCC, Mode is AP
	if(ucPinValue == 1)
	{
            //AP Mode
            g_uiDeviceModeConfig = ROLE_AP;
	}
	else
	{
            //STA Mode
            g_uiDeviceModeConfig = ROLE_STA;
	}

}
示例#3
0
uint8_t readODO2(void)
{
	return (uint8_t)GPIO_IF_Get(ODO2x, port_odo2, pin_odo2);
}
示例#4
0
uint8_t readODO1(void)
{
	return (uint8_t)GPIO_IF_Get(ODO1x, port_odo1, pin_odo1);
}
示例#5
0
uint8_t readDIP4(void)
{
	return (uint8_t)GPIO_IF_Get(DIP4x, port_dip4, pin_dip4);
}
示例#6
0
uint8_t readDIP3(void)
{
	return (uint8_t)GPIO_IF_Get(DIP3x, port_dip3, pin_dip3);
}
示例#7
0
uint8_t readDIP2(void)
{
	return (uint8_t)GPIO_IF_Get(DIP2x, port_dip2, pin_dip2);
}
示例#8
0
uint8_t readDIP1(void)
{
	return (uint8_t)GPIO_IF_Get(DIP1x, port_dip1, pin_dip1);
}