busc270.c

来自「dm270 source code」· C语言 代码 · 共 40 行

C
40
字号
/*
    DM270 ARM Evaluation Software

    (c)Texas Instruments 2003
*/

/**
	\file busc270.c
	\brief Bus Controller related APIs
*/
#include <busc270.h>


/**
    \brief	Swap 16-bit word

    \param	word				input 16-bit word
	\param  byteSwappedWord		output byte swapped word
	\param  bitSwappedWord		output bit  swapped word

    \return if success, \c E_PASS, else error code
*/
STATUS BUSC_swapWord( Uint16 word, Uint16 *byteSwappedWord, Uint16 *bitSwappedWord) {

	BUSC_RSET(ECR, word);
	*byteSwappedWord = BUSC_RGET(EBYTER);
	*bitSwappedWord  = BUSC_RGET(EBITR);
	return E_PASS;
}

/**
    \brief	Return device revision number

    \return Revision number. Example, device version 1.0 is 0x10
*/
Uint8  BUSC_getDeviceRevision() {
	return (Uint8)BUSC_RGET(REVR);
}

⌨️ 快捷键说明

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