its_digio.h
来自「program show the communication of CC100-」· C头文件 代码 · 共 64 行
H
64 行
/***********************************************************************************
Filename: ITS_digio.h
Copyright 2007 Texas Instruments, Inc.
***********************************************************************************/
#ifndef HAL_DIGIO_H
#define HAL_DIGIO_H
#ifdef __cplusplus
extern "C" {
#endif
#include "ITS_types.h"
enum {
HAL_DIGIO_INPUT,
HAL_DIGIO_OUTPUT
};
enum {
HAL_DIGIO_INT_FALLING_EDGE,
HAL_DIGIO_INT_RISING_EDGE
};
typedef struct {
uint8 port; // port number
uint8 pin; // pin number
uint8 pin_bm; // pin bitmask
uint8 dir; // direction (input or output)
uint8 initval; // initial value
} digioConfig;
#define HAL_DIGIO_OK 0
#define HAL_DIGIO_ERROR (~0)
//----------------------------------------------------------------------------------
// Function declarations
//----------------------------------------------------------------------------------
uint8 ITSDigioConfig(const digioConfig* p);
uint8 ITSDigioClear(const digioConfig* p);
uint8 ITSDigioToggle(const digioConfig* p);
uint8 ITSDigioSet(const digioConfig* p);
uint8 ITSDigioGet(const digioConfig* p);
uint8 ITSDigioIntConnect(const digioConfig *p, ISR_FUNC_PTR func);
uint8 ITSDigioIntEnable(const digioConfig *p);
uint8 ITSDigioIntDisable(const digioConfig *p);
uint8 ITSDigioIntClear(const digioConfig *p);
uint8 ITSDigioIntSetEdge(const digioConfig *p, uint8 edge);
#ifdef __cplusplus
}
#endif
/**********************************************************************************/
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?