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

Go to the source code of this file.

Functions

void initButton (Button *button, const char *name, int hz, int port)
 
int getButtonReading (Button *button)
 

Function Documentation

◆ getButtonReading()

int getButtonReading ( Button button)

Definition at line 8 of file Button.c.

8 {
9 return getDigitalSensorReading(&button->base);
10}
int getDigitalSensorReading(DigitalSensor *digitalsensor)
Gets the reading from the digital sensor.
Definition: DigitalSensor.c:10
DigitalSensor base
Definition: Button.h:7
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initButton()

void initButton ( Button button,
const char *  name,
int  hz,
int  port 
)

Definition at line 4 of file Button.c.

4 {
5 initDigitalSensor(&button->base, name, hz, port, button);
6}
void initDigitalSensor(DigitalSensor *digitalsensor, const char *name, int hz, int port, void *child)
Initializes a digital sensor with the given parameters.
Definition: DigitalSensor.c:3
Here is the call graph for this function:
Here is the caller graph for this function: