rtt-f030/bsp/ls1cdev/drivers/led.c

41 lines
540 B
C
Raw Normal View History

// led<65>ӿ<EFBFBD>
// ʹ<>õ͵<C3B5>ƽ<EFBFBD><C6BD><EFBFBD><EFBFBD>led<65><64><EFBFBD>ߵ<EFBFBD>ƽϨ<C6BD><CFA8>led
#include "ls1c_gpio.h"
// <20><>ʼ<EFBFBD><CABC>led
// @led_gpio led<65><64><EFBFBD><EFBFBD>gpio<69><6F><EFBFBD><EFBFBD>
void led_init(unsigned int led_gpio)
{
gpio_init(led_gpio, gpio_mode_output);
gpio_set(led_gpio, gpio_level_high); // ָʾ<D6B8><CABE>Ĭ<EFBFBD><C4AC>Ϩ<EFBFBD><CFA8>
return ;
}
// <20><><EFBFBD><EFBFBD>led
// @led_gpio led<65><64><EFBFBD><EFBFBD>gpio<69><6F><EFBFBD><EFBFBD>
void led_on(unsigned int led_gpio)
{
gpio_set(led_gpio, gpio_level_low);
return ;
}
// Ϩ<><CFA8>led
// @led_gpio
void led_off(unsigned int led_gpio)
{
gpio_set(led_gpio, gpio_level_high);
return ;
}