35 lines
399 B
C
35 lines
399 B
C
#ifndef __LED_H
|
|
#define __LED_H
|
|
|
|
#include "sys.h"
|
|
#include "general_type.h"
|
|
#include "stm32l1xx.h"
|
|
#include "stm32l1xx_gpio.h"
|
|
#include "stm32l1xx_rcc.h"
|
|
|
|
void LED_Init(void);//³õʼ»¯
|
|
|
|
#define LED1_PORT 1
|
|
#define LED1_RUN(sts) (sts?( GPIOA->ODR |= (unsigned int)(1<<LED1_PORT) ):( GPIOA->ODR &= ~((unsigned int)(1<<LED1_PORT) )))
|
|
|
|
void led_on(u8 num);
|
|
void Run_Led(int i);
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|