ms_rwreg.h
来自「MST720-DEMO程序」· C头文件 代码 · 共 55 行
H
55 行
/******************************************************************************
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 + =
减小字号Ctrl + -
显示快捷键?