led.h

来自「基于Cortex-M3的全自动焊接机」· C头文件 代码 · 共 37 行

H
37
字号
#ifndef  _LED_H_
#define  _LED_H_


//  包含必要的头文件
#include  <hw_types.h>
#include  <hw_memmap.h>
#include  <hw_sysctl.h>
#include  <hw_gpio.h>
#include  <sysctl.h>
#include  <gpio.h>

//  定义LED名称
#define  LED1       0x01    //4个 LED
#define  LED2       0x02
#define  LED3       0x03
#define  LED4       0x04

#define  CON_4850     0x05   //USART0 485 CON
#define  CON_4851     0x06   //USART1 485 CON






extern  void  GPIO_Init(void);//初始化GPIO
extern  void  GPIO_H(unsigned char  ucLED);//把指定的GPIO置高
extern  void  GPIO_L(unsigned char  ucLED);//把指定的GPIO置低
bool GPIO_READ(unsigned char  GPIO_PIN_N);//读取指定的GPIO状态




#endif  //  _LED_H_

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?