⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 its_digio.h

📁 program show the communication of CC100-MSP430
💻 H
字号:
/***********************************************************************************
    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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -