Vehicle Control Unit 0.01
This is the c library for controlling the car.
Loading...
Searching...
No Matches
Functions
DigitalSensor.c File Reference
#include "../../Inc/Sensors/DigitalSensor.h"
Include dependency graph for DigitalSensor.c:

Go to the source code of this file.

Functions

void initDigitalSensor (DigitalSensor *digitalSensor, const char *name, int hz, int port)
 Initializes a digital sensor with the given parameters. More...
 

Function Documentation

◆ initDigitalSensor()

void initDigitalSensor ( DigitalSensor digitalsensor,
const char *  name,
int  hz,
int  port 
)

Initializes a digital sensor with the given parameters.

Parameters
digitalsensorPointer to the Sensor structure to initialize.
namePointer to a string containing the name of the sensor.
hzThe frequency in Hertz at which the sensor operates.
portLocation of the digital sensor on board.

Definition at line 3 of file DigitalSensor.c.

4 {
5 initSensor(&digitalSensor->sensor, name, hz, DIGITAL);
6 digitalSensor->port = port;
7}
@ DIGITAL
Definition: Sensor.h:11
void initSensor(Sensor *sensor, const char *name, int hz, SensorType type)
Initializes a sensor with the given parameters.
Definition: Sensor.c:4
Here is the call graph for this function:
Here is the caller graph for this function: