📄 8016a.h
字号:
/****************************************Copyright (c)****************************************************
** Guangzou ZLG-MCU Development Co.,LTD.
** graduate school
** http://www.zlgmcu.com
**
**--------------File Info-------------------------------------------------------------------------------
** File name: 8016A.h
** Last modified Date:
** Last Version: 1.0
** Descriptions: MiniISA-8016A功能函数
**
**------------------------------------------------------------------------------------------------------
** Created by:
** Created date:
** Version:
** Descriptions:
**
**------------------------------------------------------------------------------------------------------
** Modified by:
** Modified date:
** Version:
** Descriptions:
**
**********************************************************************************************************/
#ifndef __8016A__
#define __8016A__
// 板卡基址定义
#define BoardB0 0x00
#define BoardB1 0x10
#define BoardB2 0x20
#define BoardB3 0x30
#define BoardB4 0x40
#define BoardB5 0x50
// 8016内部存寄器
#define OMB0 0 /* 命令寄存器 */
#define OMB1 1
#define OMB2 2
#define OMB3 3
#define INTCTR 4 /* 中断禁能寄存器 */
#define IMB0 0 /* 回显寄存器 */
#define IMB1 1
#define IMB2 2
#define IMB3 3
#define M8016_INT_EN 0x20 /* 全局中断使能 */
#define M8016_INT_DIS 0
/*
***********************************************************************************************************
** Function name: void Write8016A(const uint8 *cmd, uint8 base)
** Descriptions: 8016A写命令数组
** Input: cmd 命令数组(3字节) cmd[0] 命令参数低字节
** cmd[1] 命令参数高字节
** cmd[2] 命令码 命令代码参看《MiniISA-8016A用户手册》
** base 板卡基址
** Output: 无
**********************************************************************************************************/
void Write8016A(const uint8 *cmd, uint8 base);
/**********************************************************************************************************
** Function name: void Wirte8016A(const uint8 *cmd, uint8 base)
** Descriptions: 8016A 读命令状态
** Input: info 状态数组(4字节) info[0] 命令返回值低字节
** info[1] 命令返回值高字节
** info[2] 命令回显
** info[3] IDI状态
** Output: base 板卡基址
**********************************************************************************************************/
void Read8016A(uint8 *info, uint8 base);
/**********************************************************************************************************
** Function name: void Wreg8016A(uint8 data, uint8 base, uint8 reg)
** Descriptions: 写8016A 寄存器
** Input: data 写入数据
** base 基址
** reg 目标寄存器
** Output: 无
**********************************************************************************************************/
void Wreg8016A(uint8 data, uint8 base, uint8 reg);
/**********************************************************************************************************
** Function name: uint8 Rreg8016A(uint8 base, uint8 reg)
** Descriptions: 读8016A 寄存器
** Input: base 基址
** reg 目标寄存器
** Output: 目标寄存器值
**********************************************************************************************************/
uint8 Rreg8016A(uint8 base, uint8 reg);
/**********************************************************************************************************
** Function name: void Wirte8016A(uint8 *cmd, uint8 base)
** Descriptions: 8016A命令操作
** Input: cmd 命令数组(3字节) cmd[0] 命令参数低字节
** cmd[1] 命令参数高字节
** cmd[2] 命令码 命令代码参看《MiniISA-8016A用户手册》
** base 板卡基址
** Output: 命令回显值
**********************************************************************************************************/
void WriteCmd8016A(uint8 *cmd, uint8 base);
/**********************************************************************************************************
** Function name: void Int8016A(void)
** Descriptions: 8016A中断函数
** Input: 无
** Output: 无
**********************************************************************************************************/
void Int8016A(void);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -