DCL Multi-Channel Data Logger (mlog) Functions
Module: Digital Control Library (DCL)
Types
Name |
|
|---|---|
enum |
DCL_mlog_states { MLOG_INVALID = 0, MLOG_IDLE = 1, MLOG_ARMED = 2, MLOG_CAPTURE = 3, MLOG_COMPLETE = 4} |
typedef _DCL_VOLATILE struct |
DCL_MLOG |
Functions
Name |
|
|---|---|
_DCL_CODE_ACCESS void |
DCL_initMLOG(DCL_MLOG * q, float32_t * addr, uint32_t size, float32_t tmax, float32_t tmin, uint32_t div) |
_DCL_CODE_ACCESS void |
DCL_resetMLOG(DCL_MLOG * q) |
_DCL_CODE_ACCESS uint16_t |
DCL_armMLOG(DCL_MLOG * q) |
_DCL_CODE_ACCESS uint16_t |
DCL_runMLOG(DCL_MLOG * q) |
Defines
Name |
|
|---|---|
MLOG_CHANS |
|
MLOG_DEFAULTS |
Detailed Description
Defines the interface to Multi-channel data logger (mlog)
Types Documentation
enum DCL_mlog_states
Enumerator |
Value |
Description |
|---|---|---|
MLOG_INVALID |
0 |
Buffer pointers not initialised. |
MLOG_IDLE |
1 |
Memory initialised but module not armed. |
MLOG_ARMED |
2 |
Armed: capturing monitor frame data and waiting for trigger. |
MLOG_CAPTURE |
3 |
Triggered: logging data into capture frame. |
MLOG_COMPLETE |
4 |
Full data frame captured and available for read-out. |
Enumerated MLOG operating modes.
typedef DCL_MLOG
typedef _DCL_VOLATILE struct DCL_MLOG;
Defines the MLOG structure.
Functions Documentation
function DCL_initMLOG
_DCL_CODE_ACCESS void DCL_initMLOG(
DCL_MLOG * q,
float32_t * addr,
uint32_t size,
float32_t tmax,
float32_t tmin,
uint32_t div
)
Initializes the MLOG module.
Parameters:
q The MLOG structure
addr The start address of the memory block (must be a continous memory block size of MLOG_CHANS * size * 32bit)
size The size of each memory block in 32-bit words
tmin The upper trigger threshold
tmax The lower trigger threshold
div The divider count, for example, 2 means capture frames everything second occurance of running DCL_runMLOG.
function DCL_resetMLOG
_DCL_CODE_ACCESS void DCL_resetMLOG(
DCL_MLOG * q
)
Resets the MLOG module: clears all frame buffers and sets idle mode.
Parameters:
q The MLOG structure
function DCL_armMLOG
_DCL_CODE_ACCESS uint16_t DCL_armMLOG(
DCL_MLOG * q
)
Changes the MLOG mode to “MLOG_ARMED”. Only valid if current operating mode is “MLOG_IDLE”.
Parameters:
q The MLOG structure
Return: The operating mode
function DCL_runMLOG
_DCL_CODE_ACCESS uint16_t DCL_runMLOG(
DCL_MLOG * q
)
Runs the MLOG module.
Parameters:
q The MLOG structure
Return: The operating mode
Macros Documentation
define MLOG_CHANS
#define MLOG_CHANS 4
Defines the number of MLOG channels.
define MLOG_DEFAULTS
#define MLOG_DEFAULTS {{FDLOG_DEFAULTS, FDLOG_DEFAULTS, FDLOG_DEFAULTS, FDLOG_DEFAULTS}, \
{0x0, 0x0, 0x0, 0x0}, \
0.1, \
-0.1, \
1, \
1, \
MLOG_invalid}
Defines default values to initialise the MLOG structure Note: modify to match number of channels.