[C] 纯文本查看 复制代码 uint8_t bsp_IsLedOn(uint8_t _no)
{
if (_no == 1)
{
if ((GPIO_PORT_LED1->ODR & GPIO_PIN_LED1) == GPIO_PIN_LED1)
{
return 1;
}
return 0;
}
else if (_no == 2)
{
if ((GPIO_PORT_LED2->ODR & GPIO_PIN_LED2) == GPIO_PIN_LED2)
{
return 1;
}
return 0;
}
else if (_no == 3)
{
if ((GPIO_PORT_LED3->ODR & GPIO_PIN_LED3) == GPIO_PIN_LED3)
{
return 1;
}
return 0;
}
else if (_no == 4)
{
if ((GPIO_PORT_LED4->ODR & GPIO_PIN_LED4) == GPIO_PIN_LED4)
{
return 1;
}
return 0;
}
return 0;
}[mw_shl_code=c,true]uint8_t bsp_IsLedOn(uint8_t _no)
{
if (_no == 1)
{
if ((GPIO_PORT_LED1->ODR & GPIO_PIN_LED1) == GPIO_PIN_LED1)
{
return 1;
}
return 0;
}
else if (_no == 2)
{
if ((GPIO_PORT_LED2->ODR & GPIO_PIN_LED2) == GPIO_PIN_LED2)
{
return 1;
}
return 0;
}
else if (_no == 3)
{
if ((GPIO_PORT_LED3->ODR & GPIO_PIN_LED3) == GPIO_PIN_LED3)
{
return 1;
}
return 0;
}
else if (_no == 4)
{
if ((GPIO_PORT_LED4->ODR & GPIO_PIN_LED4) == GPIO_PIN_LED4)
{
return 1;
}
return 0;
}
return 0;
} [/mw_shl_code] |