|
AM243x Motor Control SDK
09.00.00
|
|
Go to the documentation of this file.
70 #include "../dcl_common.h"
88 #define DCL_getLogSize(buf) ((buf)->size)
95 #define DCL_getLogIndex(buf) ((uint32_t)((buf)->dptr - (buf)->fptr))
102 #define DCL_getLogRemain(buf) ((buf)->size - DCL_getLogIndex(buf))
114 buf->dptr = buf->fptr + idx;
145 while (length--) *mem++ = data;
151 #define DCL_clearLog(buf) DCL_fillLog(buf,0)
184 *(buf->dptr++) = data;
226 while (length--) *(dst_ptr++) = *(src_ptr++);
236 #endif // _DCL_FDLOG_H_
_DCL_CODE_ACCESS float32_t DCL_writeLog(DCL_FDLOG *buf, float32_t data)
Writes a data point into the buffer and advances the indexing pointer, wrapping if necessary....
Definition: dcl_fdlog.h:178
_DCL_CODE_ACCESS void DCL_resetLog(DCL_FDLOG *buf)
Resets the data index pointer to start of buffer.
Definition: dcl_fdlog.h:131
_DCL_CODE_ACCESS void DCL_initLog(DCL_FDLOG *buf, float32_t *addr, uint32_t size)
Assigns the buffer pointers to a memory block or array and sets the data index pointer to the first a...
Definition: dcl_fdlog.h:161
float32_t * dptr
Current data index pointer.
Definition: dcl_fdlog.h:77
#define _DCL_CODE_ACCESS
Defines the scope of dcl functions (static inline/extern inline/none)
Definition: dcl_common.h:55
#define DCL_getLogSize(buf)
Obtain the total size of buffer.
Definition: dcl_fdlog.h:88
_DCL_CODE_ACCESS float32_t DCL_readLog(DCL_FDLOG *buf)
Reads a data point from the buffer and then advances the indexing pointer, wrapping if necessary.
Definition: dcl_fdlog.h:199
_DCL_CODE_ACCESS void DCL_fillLog(DCL_FDLOG *buf, float32_t data)
Fills the buffer with a given data value and resets the data index pointer to the start of the buffer...
Definition: dcl_fdlog.h:140
Defines the data logger strcture for 32-bit float.
Definition: dcl_fdlog.h:75
#define DCL_getLogIndex(buf)
Index of the current pointer (zero-indexed)
Definition: dcl_fdlog.h:95
_DCL_CODE_ACCESS void DCL_setLogIndex(DCL_FDLOG *buf, uint32_t idx)
Sets index of the current pointer (zero-indexed)
Definition: dcl_fdlog.h:110
_DCL_VOLATILE struct dcl_fdlog DCL_FDLOG
#define _DCL_VOLATILE
Defines volatile for DCL strctures Flags can be defined in dcl.h or user files before including DCL l...
Definition: dcl_common.h:68
float32_t * fptr
Pointer to first buffer element.
Definition: dcl_fdlog.h:76
_DCL_CODE_ACCESS void DCL_deleteLog(DCL_FDLOG *buf)
Resets all structure pointers to null value.
Definition: dcl_fdlog.h:125
uint32_t size
The size of buffer.
Definition: dcl_fdlog.h:78
_DCL_CODE_ACCESS void DCL_copyLog(DCL_FDLOG *src, DCL_FDLOG *dst)
Copies the contents of one log (src) into another (dst). Both logs must have the same length.
Definition: dcl_fdlog.h:216
float float32_t
Defines single,double precision data type. Note: Assumes ABI to be TI_EABI, does not support legacy T...
Definition: dcl_common.h:51
#define NULL
Definition: dcl_aux.h:50