Vehicle Control Unit 0.01
This is the c library for controlling the car.
Loading...
Searching...
No Matches
Classes | Enumerations | Functions
Output.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include "../Utils/Updateable.h"
Include dependency graph for Output.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Output
 

Enumerations

enum  OutputType { o_ANALOG , o_DIGITAL }
 

Functions

void initOutput (Output *output, const char *name, int hz, OutputType type)
 Initializes an output with the given parameters. More...
 

Enumeration Type Documentation

◆ OutputType

enum OutputType
Enumerator
o_ANALOG 
o_DIGITAL 

Definition at line 9 of file Output.h.

9 {
OutputType
Definition: Output.h:9
@ o_ANALOG
Definition: Output.h:10
@ o_DIGITAL
Definition: Output.h:11

Function Documentation

◆ initOutput()

void initOutput ( Output output,
const char *  name,
int  hz,
OutputType  type 
)

Initializes an output with the given parameters.

Parameters
outputPointer to the Output structure to initialize.
namePointer to a string containing the name of the output.
hzThe frequency in Hertz at which the output operates.
typeThe type of the output as defined by the SensorType enum.

Definition at line 4 of file Output.c.

4 {
5 initUpdateable(&output->updateable, name, hz, OUTPUT, output);
6 output->type = type;
7}
void initUpdateable(Updateable *updateable, const char *name, int hz, UpdateableType utype, void *child)
Definition: Updateable.c:6
@ OUTPUT
Definition: Updateable.h:18
OutputType type
Definition: Output.h:16
Updateable updateable
Definition: Output.h:15
Here is the call graph for this function:
Here is the caller graph for this function: