22 lines
470 B
C
22 lines
470 B
C
#include "led.h"
|
|
#include "asm/pwm.h"
|
|
|
|
//static void *warm_pwm_handle;
|
|
//static void *cool_pwm_handle;
|
|
|
|
int led_status = 1;
|
|
|
|
void pwm_init(void)
|
|
{
|
|
// gpio_direction_output(IO_PORTC_01, 1);
|
|
// gpio_direction_output(IO_PORTC_02, 1);
|
|
dev_open("lamp_warm_pwm", NULL);
|
|
// dev_open("lamp_cool_pwm", NULL);
|
|
}
|
|
void led_init(void)
|
|
{
|
|
gpio_direction_output(LED_PIN, led_status);
|
|
led_status =!led_status;
|
|
//gpio_direction_output(IO_PORTC_02, led_status);
|
|
}
|