Vehicle Control Unit 0.01
This is the c library for controlling the car.
|
#include "../../Inc/Outputs/AnalogOutput.h"
#include "../../Inc/Utils/Common.h"
#include <stdio.h>
#include <string.h>
#include "stm32f7xx_hal.h"
Go to the source code of this file.
Functions | |
void | initAnalogOutput (AnalogOutput *analogOutput, const char *name, int hz, int channel) |
Initializes an analog output. More... | |
int | writeAnalogOutputData (AnalogOutput *output, float data) |
Writes data to the analog output. More... | |
void initAnalogOutput | ( | AnalogOutput * | analogoutput, |
const char * | name, | ||
int | hz, | ||
int | channel | ||
) |
Initializes an analog output.
output | Pointer to the AnalogOutput structure to initialize |
name | Name of the output (string) |
hz | Sampling frequency in Hertz |
channel | ADC channel number for the output (0-16) |
This function initializes the base output properties, sets the ADC channel, and configures the corresponding GPIO pin based on the channel number.
Definition at line 11 of file AnalogOutput.c.
int writeAnalogOutputData | ( | AnalogOutput * | output, |
float | data | ||
) |
Writes data to the analog output.
output | Pointer to the AnalogOutput structure. |
data | Data to write to the output. |
Definition at line 17 of file AnalogOutput.c.