PropWare
C++ objects and CMake build system for Parallax Propeller
Home
Download
Getting Started
Documentation
Reference
About
Related Links
Namespace List
Class List
File List
Examples
Build System
File List
File Members
simple
dacctr.h
1
60
#ifndef DACCTR_H
61
#define DACCTR_H
62
63
#if defined(__cplusplus)
64
extern
"C"
{
65
#endif
66
67
#include "simpletools.h"
68
69
#ifndef DUTY_SE
70
#define DUTY_SE (6 << 26)
71
#endif
72
73
#ifndef NEW_COG
74
#define NEW_COG 2
75
#endif
76
77
//extern int dacCtrBits;
78
79
typedef
struct
DacControl
80
{
81
volatile
int
daCog;
82
volatile
int
daPin;
83
volatile
int
daBitX;
84
volatile
int
daCh;
85
volatile
int
daCtr;
86
volatile
int
daVal;
87
}
dac
;
88
89
90
typedef
struct
DacAddr
91
{
92
volatile
unsigned
int
daDt;
93
dac
* da0;
94
dac
* da1;
95
}
daca
;
96
97
98
typedef
struct
DacCogMemory
99
{
100
unsigned
int
stack[44 + 20];
101
}
dacmem
;
102
126
dac
dac_setup(
int
pin,
int
channel,
int
bits);
127
139
void
dac_set(
dac
* da,
int
value);
140
148
void
dac_close(
dac
* da);
149
170
int
dac_start(
dacmem
mem,
int
sampleRate,
dac
* da0,
dac
* da1);
171
177
int
dac_stop(
int
cogid);
178
179
#if defined(__cplusplus)
180
}
181
#endif
182
/* __cplusplus */
183
#endif
184
/* DACCTR_H */
185
DacControl
Definition:
dacctr.h:79
DacCogMemory
Definition:
dacctr.h:98
DacAddr
Definition:
dacctr.h:90
Generated on Sat Aug 27 2016 00:58:09 for PropWare by
1.8.12