用于EagleEye3.0 规则集漏报和误报测试的示例项目,项目收集于github和gitee
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

38 lines
666 B

#include "LPC17xx.h"
#include "led.h"
void rt_hw_led_init(void)
{
LPC_GPIO2->FIODIR0 |= 1<<0; /* led0:P2.0 */
LPC_GPIO2->FIODIR0 |= 1<<1; /* led1:P2.1 */
}
void rt_hw_led_on(rt_uint32_t led)
{
switch(led)
{
case 0: /* P2.0 = 1 */
LPC_GPIO2->FIOSET0 = 1<<0;
break;
case 1: /* P2.1 = 1 */
LPC_GPIO2->FIOSET0 = 1<<1;
break;
default:
break;
}
}
void rt_hw_led_off(rt_uint32_t led)
{
switch(led)
{
case 0: /* P2.0 = 0 */
LPC_GPIO2->FIOCLR0 = 1<<0;
break;
case 1: /* P2.1 = 0 */
LPC_GPIO2->FIOCLR0 = 1<<1;
break;
default:
break;
}
}