dac.h 345 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef DAC_H
#define DAC_H

extern THD_WORKING_AREA(waDAC, 512);
THD_FUNCTION(DACt, arg);

/*
 * DAC buffer.
 */
#define DAC_RATE        1000000U
#define DAC_BUFFER_SIZE 360

static dacsample_t dac_buffer[DAC_BUFFER_SIZE] = {0};

typedef enum {
    SINE = 0,
    TRIANGULAR,
    SAWTOOTH,
} waveform_t;

#define PI 3.14159

#endif  /* DAC_H */