-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathAOloopControl_dmwrite.c
83 lines (52 loc) · 1.79 KB
/
AOloopControl_dmwrite.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/**
* @file AOloopControl_dmwrite.c
* @brief AO loop Control functions PRIMARY AND FILTERED DM WRITE
*
* REAL TIME COMPUTING ROUTINES
*
*
* @bug No known bugs.
*
*/
#define _GNU_SOURCE
#include "CommandLineInterface/CLIcore.h"
#include "AOloopControl/AOloopControl.h"
#include "AOloopControl_perfTest/AOloopControl_perfTest.h"
#define NB_AOloopcontrol 10 // max number of loops
static int AOlooploadconf_init = 0;
// defined in AOloopControl.c
extern AOLOOPCONTROL_CONF *AOconf; // configuration - this can be an array
// defined in AOloopControl.c
extern AOloopControl_var aoloopcontrol_var;
int_fast8_t AOloopControl_DMprimaryWrite_on()
{
if(aoloopcontrol_var.AOloopcontrol_meminit==0)
AOloopControl_InitializeMemory(1);
AOconf[aoloopcontrol_var.LOOPNUMBER].aorun.DMprimaryWriteON = 1;
AOloopControl_perfTest_showparams(aoloopcontrol_var.LOOPNUMBER);
return 0;
}
int_fast8_t AOloopControl_DMprimaryWrite_off()
{
if(aoloopcontrol_var.AOloopcontrol_meminit==0)
AOloopControl_InitializeMemory(1);
AOconf[aoloopcontrol_var.LOOPNUMBER].aorun.DMprimaryWriteON = 0;
AOloopControl_perfTest_showparams(aoloopcontrol_var.LOOPNUMBER);
return 0;
}
int_fast8_t AOloopControl_DMfilteredWrite_on()
{
if(aoloopcontrol_var.AOloopcontrol_meminit==0)
AOloopControl_InitializeMemory(1);
AOconf[aoloopcontrol_var.LOOPNUMBER].aorun.DMfilteredWriteON = 1;
AOloopControl_perfTest_showparams(aoloopcontrol_var.LOOPNUMBER);
return 0;
}
int_fast8_t AOloopControl_DMfilteredWrite_off()
{
if(aoloopcontrol_var.AOloopcontrol_meminit==0)
AOloopControl_InitializeMemory(1);
AOconf[aoloopcontrol_var.LOOPNUMBER].aorun.DMfilteredWriteON = 0;
AOloopControl_perfTest_showparams(aoloopcontrol_var.LOOPNUMBER);
return 0;
}