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

📄 ms_rwreg.h

📁 MST720-DEMO程序
💻 H
字号:
/******************************************************************************
 Copyright (c) 2005 MStar Semiconductor, Inc.
 All rights reserved.

 [Module Name]: Ms_RWreg.h
 [Date]:	12-Jan-2005
 [Comment]:
   Mstar IC access functions definition.
 [Reversion History]:
*******************************************************************************/

#ifndef _MS_RWREG_H_
#define _MS_RWREG_H_

#ifdef _MS_RWREG_C_
#define _MS_RWREGDEC_
#else
#define _MS_RWREGDEC_ extern
#endif

#if ( BUS_TYPE_SEL == SERIAL_BUS )
//Access mode definition
#define SPI_WRITE	0
#define SPI_READ	1

 // I/O last bit definintion
#define MS_IS_LAST_BIT		TRUE
#define MS_NON_LAST_BIT	FALSE

//Interface level definition
#define SET_SPI_CS(level)	(bCS_PIN = level)
#define SET_SPI_SCL(level)	(bSCL_PIN = level)
#define SET_SPI_SDA(level)	(bSDA_PIN = level)
#endif//( BUS_TYPE_SEL == SERIAL_BUS )

/**********************
* FUNCTION PROTOTYPES *
***********************/
#if ( BUS_TYPE_SEL == SERIAL_BUS )
_MS_RWREGDEC_ void mstBusInitial(void);
_MS_RWREGDEC_ void mstSPIStart(BIT bSelWrRd);
_MS_RWREGDEC_ BYTE mstSPIReceiveByte(BOOL bLast);
_MS_RWREGDEC_ void mstSPISendByte(BYTE ucVal, BOOL bLast);
#endif//( BUS_TYPE_SEL == SERIAL_BUS )
_MS_RWREGDEC_ void mstWriteByte(BYTE addr, BYTE value);
_MS_RWREGDEC_ void mstWriteWord(BYTE addr, WORD value);
_MS_RWREGDEC_ BYTE mstReadByte(BYTE addr);
_MS_RWREGDEC_ WORD mstReadWord(BYTE addr);
_MS_RWREGDEC_ void mstWriteData(BYTE addr, BYTE code *tbl, WORD count, bit inc);
_MS_RWREGDEC_ void mstWriteDataTable(BYTE code *s);

#endif	//_MS_RWREG_H_


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -