Vehicle Control Unit 0.01
This is the c library for controlling the car.
Loading...
Searching...
No Matches
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
11typedef struct {
16
17extern uint32_t dac1_buffer[DAC1_BUFFER_SIZE];
18extern uint32_t dac2_buffer[DAC2_BUFFER_SIZE];
19
31void initAnalogOutput(AnalogOutput* analogoutput, const char* name, int hz,
32 int channel);
33
41int writeAnalogOutputData(AnalogOutput* output, float data);
42
43#endif // RENNSSELAERMOTORSPORT_ANALOGOUTPUT_H
int writeAnalogOutputData(AnalogOutput *output, float data)
Writes data to the analog output.
Definition: AnalogOutput.c:17
uint32_t dac2_buffer[DAC2_BUFFER_SIZE]
Definition: main.c:117
void initAnalogOutput(AnalogOutput *analogoutput, const char *name, int hz, int channel)
Initializes an analog output.
Definition: AnalogOutput.c:11
uint32_t dac1_buffer[DAC1_BUFFER_SIZE]
Definition: main.c:116
#define DAC1_BUFFER_SIZE
Definition: Constants.h:9
#define DAC2_BUFFER_SIZE
Definition: Constants.h:10
Output output
Definition: AnalogOutput.h:12
Definition: Output.h:14