📄 dds.h
字号:
void DdsMsgFree (P_DDS_MSG pMsg);
/****************************************************************************
Description:
Message send function.
Remarks:
Send an allocated message to WinEasy.
Arguments:
pMsg - Pointer to message to be sent
***************************************************************************/
void DdsMsgSend (P_DDS_MSG pMsg);
/****************************************************************************
Description:
Slot change function.
Remarks:
Changes the slot to which a message is sent. If this function
is called before DdsMsgSend(), the message will be sent to the
DDS of the other slot.
Arguments:
pMsg - Pointer to message to be sent
***************************************************************************/
void DdsMsgChangeSlot (P_DDS_MSG pMsg);
/****************************************************************************
Description:
Message allocation controlling fucntion.
Remarks:
Get the number of messages which can be allocated.
Return:
Returns the number of messages.
***************************************************************************/
WORD16 DdsMsgGetNum (void);
/****************************************************************************
Description:
Initialize a processor interrupt.
Arguments:
intNo - Trap number of interrupt to be initialized.
Return:
TRUE - Initialization was successful.
FALSE - Initialization was not successful.
***************************************************************************/
BOOL IrqEstablish (int intNo);
/****************************************************************************
Description:
Release a processor interrupt.
Arguments:
intNo - Trap number of interrupt to be released.
Return:
TRUE - Release was successful.
FALSE - Release was not successful.
***************************************************************************/
BOOL IrqRelease (int intNo);
/****************************************************************************
Description:
Allocates an interrupt routine to the processor interrupt.
Arguments:
intNo - Trap number of interrupt.
fEntry - Function pointer to interrupt routine.
***************************************************************************/
IRQ_FUNCTION IrqSetEntry (int intNo, IRQ_FUNCTION fEntry);
/****************************************************************************
Description:
Enable/Disable a processor interrupt.
Arguments:
intNo - Trap number of interrupt.
enable - Enable (TRUE) or disable (FALSE) the interrupt.
Remarks:
TRUE - Enable/Disable was successful.
FALSE - Enable/Disable was not successful.
***************************************************************************/
BOOL IrqControl (int intNo, BOOL enable);
/****************************************************************************
Description:
Global interrupt disable.
Remarks:
Returns the former interrupt disable state (for a later restore).
***************************************************************************/
INT_STATE IrqDisable (void);
/****************************************************************************
Description:
Restore global interrupt disable state.
Arguments:
oldState - Former interrupt disable state (return value of
function IrqDisable).
***************************************************************************/
void IrqRestore (INT_STATE oldState);
/****************************************************************************
Description:
Binary file information.
Remarks:
Get information about the binary file which was downloaded from WinEasy
to the flash device.
Arguments:
pBin - pointer to structure which contents all information about the
binary file.
***************************************************************************/
BOOL DdsGetBinInfo (BIN_INFO* pBin);
/****************************************************************************
Description:
Binary file copy function.
Remarks:
Copy a defined number of bytes from source to destination address
considering data page borders. This function should be used to copy
all binary data from flash to a target device (e.g DSP).
Arguments:
dest - pointer to destination address
src - pointer to source address
len - number of bytes to be copied
***************************************************************************/
void* DdsMemCpy (void* dest, void* src, WORD32 len);
/****************************************************************************
Description:
Write one byte into the EEPROM address offset.
Arguments:
offset - EEPROM address offset (range 1-1791)
val - Value to be written
***************************************************************************/
BOOL EprWrite (WORD16 offset, WORD8 val);
/****************************************************************************
Description:
Read one byte from the EEPROM address offset.
Arguments:
offset - EEPROM address offset (range 1-1791)
pVal - Pointer to read value.
***************************************************************************/
BOOL EprRead (WORD16 offset, WORD8* pVal);
/****************************************************************************
Description:
Customer function (1).
Remarks:
Execute first customer function. Customer functions can be
written, compiled, downloaded and executed via WinEasy
***************************************************************************/
void UserFunc0 (void);
/****************************************************************************
Description:
Custoner function (2).
Remarks:
Execute second customer function. Customer functions can be
written, compiled, downloaded and executed via WinEasy
***************************************************************************/
void UserFunc1 (void);
/****************************************************************************
Description:
Customer function (3).
Remarks:
Execute third customer function. Customer functions can be
written, compiled, downloaded and executed via WinEasy
***************************************************************************/
void UserFunc2 (void);
/****************************************************************************
Description:
Customer function (4).
Remarks:
Execute fourth customer function. Customer functions can be
written, compiled, downloaded and executed via WinEasy
***************************************************************************/
void UserFunc3 (void);
/* ============================= */
/* Global macros to get */
/* parameters from a C/I message */
/* data field. */
/* ============================= */
/****************************************************************************
Description:
Read a WORD32 value from message 'pMsg' starting at parameter
number 'offset'.
***************************************************************************/
#define MsgReadWord32(pMsg, offset) \
( \
(((WORD32) (pMsg)->pData [ (offset)]) ) \
| (((WORD32) (pMsg)->pData [1+(offset)]) << 8) \
| (((WORD32) (pMsg)->pData [2+(offset)]) << 16) \
| (((WORD32) (pMsg)->pData [3+(offset)]) << 24) \
)
/****************************************************************************
Description:
Read a WORD16 value from message 'pMsg' starting at parameter
number 'offset'.
***************************************************************************/
#define MsgReadWord16(pMsg, offset) \
( \
(((WORD16) (pMsg)->pData [ (offset)]) ) \
| (((WORD16) (pMsg)->pData [1+(offset)]) << 8) \
)
/****************************************************************************
Description:
Read a WORD8 value from message 'pMsg' starting at parameter
number 'offset'.
***************************************************************************/
#define MsgReadWord8(pMsg, offset) \
( \
(((WORD8) (pMsg)->pData [(offset)])) \
)
/* ============================= */
/* Global macros to write */
/* parameters to a C/I message */
/* data field. */
/* ============================= */
/****************************************************************************
Description:
Write a WORD32 value 'val' to message 'pMsg' starting at parameter
number 'offset'.
***************************************************************************/
#define MsgWriteWord32(pMsg, offset, val) \
{ \
(pMsg)->pData [ (offset)] = (val); \
(pMsg)->pData [1+(offset)] = (val) >> 8; \
(pMsg)->pData [2+(offset)] = (val) >> 16; \
(pMsg)->pData [3+(offset)] = (val) >> 24; \
}
/****************************************************************************
Description:
Write a WORD16 value 'val' to message 'pMsg' starting at parameter
number 'offset'.
***************************************************************************/
#define MsgWriteWord16(pMsg, offset, val) \
{ \
(pMsg)->pData [ (offset)] = (val); \
(pMsg)->pData [1+(offset)] = (val) >> 8; \
}
/****************************************************************************
Description:
Write a WORD8 value 'val' to message 'pMsg' starting at parameter
number 'offset'.
***************************************************************************/
#define MsgWriteWord8(pMsg, offset, val) \
{ \
(pMsg)->pData [(offset)] = (val); \
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -