fix:修复调光时间BUG
解决调光时间一样的情况下,调光亮与调光灭的实际调光时间不一致问题
This commit is contained in:
41
GPIO.h
Normal file
41
GPIO.h
Normal file
@@ -0,0 +1,41 @@
|
||||
|
||||
#ifndef __GPIO_H
|
||||
#define __GPIO_H
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#define GPIO_PullUp 0 //<2F><><EFBFBD><EFBFBD>˫<D7BC><CBAB><EFBFBD><EFBFBD>
|
||||
#define GPIO_HighZ 1 //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
#define GPIO_OUT_OD 2 //<2F><>©<EFBFBD><C2A9><EFBFBD><EFBFBD>
|
||||
#define GPIO_OUT_PP 3 //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
#define GPIO_Pin_0 0x01 //IO<49><4F><EFBFBD><EFBFBD> Px.0
|
||||
#define GPIO_Pin_1 0x02 //IO<49><4F><EFBFBD><EFBFBD> Px.1
|
||||
#define GPIO_Pin_2 0x04 //IO<49><4F><EFBFBD><EFBFBD> Px.2
|
||||
#define GPIO_Pin_3 0x08 //IO<49><4F><EFBFBD><EFBFBD> Px.3
|
||||
#define GPIO_Pin_4 0x10 //IO<49><4F><EFBFBD><EFBFBD> Px.4
|
||||
#define GPIO_Pin_5 0x20 //IO<49><4F><EFBFBD><EFBFBD> Px.5
|
||||
#define GPIO_Pin_6 0x40 //IO<49><4F><EFBFBD><EFBFBD> Px.6
|
||||
#define GPIO_Pin_7 0x80 //IO<49><4F><EFBFBD><EFBFBD> Px.7
|
||||
#define GPIO_Pin_All 0xFF //IO<49><4F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
#define GPIO_Pin_Left 0x0F //IO<49><4F>1,2,3,4<><34>
|
||||
|
||||
#define GPIO_P0 0
|
||||
#define GPIO_P1 1
|
||||
#define GPIO_P2 2
|
||||
#define GPIO_P3 3
|
||||
#define GPIO_P4 4
|
||||
#define GPIO_P5 5
|
||||
#define GPIO_P6 6
|
||||
#define GPIO_P7 7
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u8 Mode; //IOģʽ, GPIO_PullUp,GPIO_HighZ,GPIO_OUT_OD,GPIO_OUT_PP
|
||||
u8 Pin; //Ҫ<><D2AA><EFBFBD>õĶ˿<C4B6>
|
||||
} GPIO_InitTypeDef;
|
||||
|
||||
u8 GPIO_Inilize(u8 GPIO, GPIO_InitTypeDef *GPIOx);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user