![Logo](ti_logo.svg) |
AM263x Motor Control SDK
09.02.00
|
|
Go to the documentation of this file.
70 #include "../dcl_common.h"
85 #define FDLOG_DEFAULTS {0x0,0x0,0x0,0}
92 #define DCL_getLogSize(buf) ((buf)->size)
99 #define DCL_getLogIndex(buf) ((uint32_t)((buf)->dptr - (buf)->fptr))
106 #define DCL_getLogRemain(buf) ((int32_t)((buf)->lptr - (buf)->dptr))
120 buf->dptr = buf->fptr + idx;
149 while (size--) *mem++ = data;
155 #define DCL_clearLog(buf) DCL_fillLog(buf,0.0f)
169 buf->lptr = addr + size - 1;
189 *(buf->dptr++) = data;
231 while (size--) *(dst_ptr++) = *(src_ptr++);
241 #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:183
_DCL_CODE_ACCESS void DCL_resetLog(DCL_FDLOG *buf)
Resets the data index pointer to start of buffer.
Definition: dcl_fdlog.h:135
_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:165
float32_t * lptr
Pointer to last buffer element.
Definition: dcl_fdlog.h:77
_DCL_VOLATILE struct dcl_fdlog FDLOG
float32_t * dptr
Current data index pointer.
Definition: dcl_fdlog.h:78
#define _DCL_CODE_ACCESS
Defines the scope of dcl functions.
Definition: dcl_common.h:63
#define DCL_getLogSize(buf)
Obtain the total size of buffer.
Definition: dcl_fdlog.h:92
_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:204
_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:144
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:99
_DCL_CODE_ACCESS void DCL_setLogIndex(DCL_FDLOG *buf, uint32_t idx)
Sets index of the current pointer (zero-indexed)
Definition: dcl_fdlog.h:116
_DCL_VOLATILE struct dcl_fdlog DCL_FDLOG
#define _DCL_VOLATILE
Defines volatile for DCL strctures.
Definition: dcl_common.h:79
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:129
uint32_t size
The size of buffer.
Definition: dcl_fdlog.h:79
_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 size.
Definition: dcl_fdlog.h:221
float float32_t
Definition: dcl_common.h:58
#define NULL
Definition: dcl_macro.h:50