📄 pio.h
字号:
/*-----------------------------------------------------------------------------
@@
@@ (Summary) : LH7953x series PIO Device Driver Header File
@@
@@ (Comment) : PIO Header File
@@
@@ (Author) :
@@
@@ (History) :
@@
@@ (RCS ID) :
@@
-----------------------------------------------------------------------------*/
#ifndef PIO_H
#define PIO_H
/*+include files*************************************************************/
/* */
/* */
/**************************************************************************-*/
#include "type_def.h"
#include "dev_def.h"
#include "pio_def.h"
/*+Public Macro definitions**************************************************/
/* */
/* */
/****************************************************************************/
/*+Public Type definitions***************************************************/
/* */
/* */
/****************************************************************************/
/*-----------------------------------------------------------------------------
@@ {Name} : APD_PIO_PORT
@@
@@ {Summary}: Indicate which PIO port
@@
@@ {Desc} : Use to indicate which PIO port is being modified
@@
@@ {End} :
-----------------------------------------------------------------------------*/
typedef enum {
APD_PIOD = 3, /* portD */
APD_PIOC = 2, /* portC */
APD_PIOB = 1, /* portB */
APD_PIOA = 0 /* portA */
} APD_PIO_PORT;
#ifdef APD_PIO_C
/*-------------------------- Local context - START -------------------------*/
/*+include files*************************************************************/
/* */
/* */
/**************************************************************************-*/
#define VISIBLE /* Mark as LOCAL context */
/*+Local Type definitions****************************************************/
/* */
/* */
/**************************************************************************-*/
/*+Local Macro definitions***************************************************/
/* */
/* */
/**************************************************************************-*/
/*+Local function prototypes*************************************************/
/* */
/* Name Type Abstract */
/* ---- ------ ------------ */
/* */
/**************************************************************************-*/
/*+Local data declarations***************************************************/
/* */
/* Name Description */
/* -------- ---------------- */
/**************************************************************************-*/
/*-------------------------- Local context - END ---------------------------*/
#else
#define VISIBLE extern /* Mark as GLOBAL context */
#endif
/*------------------------- Global context - START -------------------------*/
/*+Public data declarations**************************************************/
/* */
/* Name Description */
/* -------- ---------------- */
/****************************************************************************/
/*+Public function prototypes************************************************/
/* */
/* Name Type Abstract */
/* ---- ------ ------------ */
/* */
/**************************************************************************-*/
VISIBLE unsigned long apd_PIOReadPort(APD_PIO_PORT port);
VISIBLE unsigned char apd_PIOReadBit(APD_PIO_PORT port, unsigned char bitnum);
VISIBLE void apd_PIOSetMuxFunc(APD_PIO_PORT port, unsigned long muxdata1, unsigned long muxdata2);
VISIBLE void apd_PIOReadMuxFunc(APD_PIO_PORT port, unsigned long *muxdata1, unsigned long *muxdata2);
VISIBLE void apd_PIOSetAsInput(APD_PIO_PORT port, unsigned long port_value);
VISIBLE void apd_PIOSetAsOutput(APD_PIO_PORT port, unsigned long port_value);
VISIBLE void apd_PIOSetPortData(APD_PIO_PORT port, unsigned long port_value);
VISIBLE void apd_PIOSetBit(APD_PIO_PORT port, unsigned char bit_num);
VISIBLE void apd_PIOClrBit(APD_PIO_PORT port, unsigned char bit_num);
/*-------------------------- Global context - END --------------------------*/
#undef VISIBLE
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -