Vehicle Control Unit
0.01
This is the c library for controlling the car.
Loading...
Searching...
No Matches
Core
Inc
Outputs
AnalogOutput.h
Go to the documentation of this file.
1
#ifndef RENNSSELAERMOTORSPORT_ANALOGOUTPUT_H
2
#define RENNSSELAERMOTORSPORT_ANALOGOUTPUT_H
3
4
#include "
Output.h
"
5
#include "../Utils/Constants.h"
6
7
#include <stdio.h>
8
#include <string.h>
9
#include <stdint.h>
10
11
typedef
struct
{
12
Output
output
;
13
int
channel
;
14
int
buffer_index
;
15
}
AnalogOutput
;
16
17
extern
uint32_t
dac1_buffer
[
DAC1_BUFFER_SIZE
];
18
extern
uint32_t
dac2_buffer
[
DAC2_BUFFER_SIZE
];
19
31
void
initAnalogOutput
(
AnalogOutput
* analogoutput,
const
char
* name,
int
hz,
32
int
channel);
33
41
int
writeAnalogOutputData
(
AnalogOutput
* output,
float
data);
42
43
#endif
// RENNSSELAERMOTORSPORT_ANALOGOUTPUT_H
writeAnalogOutputData
int writeAnalogOutputData(AnalogOutput *output, float data)
Writes data to the analog output.
Definition:
AnalogOutput.c:17
dac2_buffer
uint32_t dac2_buffer[DAC2_BUFFER_SIZE]
Definition:
main.c:117
initAnalogOutput
void initAnalogOutput(AnalogOutput *analogoutput, const char *name, int hz, int channel)
Initializes an analog output.
Definition:
AnalogOutput.c:11
dac1_buffer
uint32_t dac1_buffer[DAC1_BUFFER_SIZE]
Definition:
main.c:116
DAC1_BUFFER_SIZE
#define DAC1_BUFFER_SIZE
Definition:
Constants.h:9
DAC2_BUFFER_SIZE
#define DAC2_BUFFER_SIZE
Definition:
Constants.h:10
Output.h
AnalogOutput
Definition:
AnalogOutput.h:11
AnalogOutput::buffer_index
int buffer_index
Definition:
AnalogOutput.h:14
AnalogOutput::output
Output output
Definition:
AnalogOutput.h:12
AnalogOutput::channel
int channel
Definition:
AnalogOutput.h:13
Output
Definition:
Output.h:14
Generated by
1.9.5