dac2ch Library  v0.50
Send D/A signals that can be converted to voltage outputs through low pass filters. 2 Channels per cog. multiple cogs can be used for more channels.
dac2ch.h
Go to the documentation of this file.
1 
21 #ifndef DAC2CH_H
22 #define DAC2CH_H
23 
24 #if defined(__cplusplus)
25 extern "C" {
26 #endif
27 
28 #include "simpletools.h"
29 
30 #ifndef DOXYGEN_SHOULD_SKIP_THIS
31 typedef struct dac2ch_st {
32  volatile unsigned int dacCtrBits;
33  volatile unsigned int dacBitX;
34  volatile unsigned int ctra;
35  volatile unsigned int ctrb;
36  volatile unsigned int frqa;
37  volatile unsigned int frqb;
38  volatile unsigned int pin;
39  volatile int dac2chCog;
40  int dac2chStack[100];
41 } dac2ch_t;
42 #endif // DOXYGEN_SHOULD_SKIP_THIS
43 
44 
45 typedef dac2ch_t dac2ch;
46 
60 dac2ch * dac2ch_start(int bits);
61 
75 void dac2ch_set(dac2ch *device, int pin, int channel, int dacVal);
76 
83 void dac2ch_stop(dac2ch *device);
84 
85 
92 #if defined(__cplusplus)
93 }
94 #endif
95 /* __cplusplus */
96 #endif
97 /* SIMPLETOOLS_H */
98 
void dac2ch_set(dac2ch *device, int pin, int channel, int dacVal)
Set a DAC signal's level.
Definition: dac2ch.c:45
void dac2ch_stop(dac2ch *device)
Shut down dac2ch process and reclaim cog and I/O pins for other uses.
Definition: dac2ch.c:38
dac2ch * dac2ch_start(int bits)
Start duty modulation process in another cog for D/A conversion through a low pass filter...
Definition: dac2ch.c:26
Definition: dac2ch.h:31