MotorWare f2806x Module API Documentation
dlog4ch.h
Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
2  * Copyright (c) 2012, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  * --/COPYRIGHT--*/
32 #ifndef _DLOG4CH_H_
33 #define _DLOG4CH_H_
34 
40 
41 
42 // **************************************************************************
43 // the includes
44 
46 
47 
48 
53 
54 // Include the algorithm overview defined in modules/<module>/docs/doxygen/doxygen.h
56 
57 
58 #ifdef __cplusplus
59 extern "C" {
60 #endif
61 
62 
63 // **************************************************************************
64 // the defines
65 
66 
69 
70 #define DLOG_4CH_DEFAULTS { 0UL, \
71  NULL, \
72  NULL, \
73  NULL, \
74  NULL, \
75  0, \
76  1, \
77  0, \
78  0, \
79  0UL, \
80  0x0C0, \
81  (int16_t (*)(int))DLOG_4CH_init, \
82  (int16_t (*)(int))DLOG_4CH_update }
83 
84 
85 
86 // **************************************************************************
87 // the typedefs
88 
91 typedef struct _DLOG_4CH_
92 {
93  int32_t task;
94  int16_t *iptr1;
95  int16_t *iptr2;
96  int16_t *iptr3;
97  int16_t *iptr4;
98  int16_t trig_value;
99  int16_t prescalar;
100  int16_t skip_cntr;
101  int16_t cntr;
102  int32_t write_ptr;
103  int16_t size;
104  int16_t (*init)();
105  int16_t (*update)();
106 } DLOG_4CH;
107 
108 
111 typedef struct _DLOG_4CH_Obj_ *DLOG_4CH_handle;
112 
113 
114 // **************************************************************************
115 // the globals
116 
117 
120 extern DLOG_4CH dlog;
121 
122 
125 extern int16_t DlogCh1;
126 
129 extern int16_t DlogCh2;
130 
133 extern int16_t DlogCh3;
134 
137 extern int16_t DlogCh4;
138 
139 
140 // **************************************************************************
141 // the globals
142 
143 
144 // **************************************************************************
145 // the function prototypes
146 
147 
150 extern void DLOG_4CH_init(void *ptr);
151 
152 
155 extern void DLOG_4CH_update(void *ptr);
156 
157 
158 #ifdef __cplusplus
159 }
160 #endif // extern "C"
161 
163 #endif // end of _DLOG4CH_H_ definition
164 
Contains the public interface to the types definitions.
void DLOG_4CH_update(void *ptr)
Updates the data logger.
int16_t cntr
Variable: Data log counter.
Definition: dlog4ch.h:101
int16_t DlogCh3
Defines DLOG channel 3.
Definition: dlog4ch.c:58
int16_t size
Parameter: Maximum data buffer.
Definition: dlog4ch.h:103
int16_t * iptr1
Input: First input pointer.
Definition: dlog4ch.h:94
struct _DLOG_4CH_Obj_ * DLOG_4CH_handle
Defines the DLOG handle.
Definition: dlog4ch.h:111
Defines the data logging (DLOG) object.
Definition: dlog4ch.h:91
struct _DLOG_4CH_ DLOG_4CH
Defines the data logging (DLOG) object.
int16_t(* update)()
Pointer to update function.
Definition: dlog4ch.h:105
int16_t prescalar
Parameter: Data log prescale.
Definition: dlog4ch.h:99
int16_t skip_cntr
Variable: Data log skip counter.
Definition: dlog4ch.h:100
int16_t DlogCh2
Defines DLOG channel 2.
Definition: dlog4ch.c:57
int16_t * iptr2
Input: Second input pointer.
Definition: dlog4ch.h:95
int16_t * iptr3
Input: Third input pointer.
Definition: dlog4ch.h:96
int16_t(* init)()
Pointer to init function.
Definition: dlog4ch.h:104
int32_t task
Variable: Task address pointer.
Definition: dlog4ch.h:93
int16_t * iptr4
Input: Fourth input pointer.
Definition: dlog4ch.h:97
int32_t write_ptr
Variable: Graph address pointer.
Definition: dlog4ch.h:102
void DLOG_4CH_init(void *ptr)
Initializes the data logger.
DLOG_4CH dlog
Defines the DLOG object.
Definition: dlog4ch.c:53
int16_t DlogCh4
Defines DLOG channel 4.
Definition: dlog4ch.c:59
int16_t DlogCh1
Defines DLOG channel 1.
Definition: dlog4ch.c:56
int16_t trig_value
Input: Trigger point.
Definition: dlog4ch.h:98