#include "Sensor.h"
#include "../Utils/Constants.h"
#include <stdint.h>
Go to the source code of this file.
◆ getDigitalSensorReading()
Gets the reading from the digital sensor.
- Parameters
-
digitalsensor | Pointer to the Sensor structure to get the reading from. |
- Returns
- int The reading from the digital sensor.
Definition at line 10 of file DigitalSensor.c.
10 {
12}
uint8_t digital_in_buffer[NUM_DIGITAL_INPUTS]
◆ initDigitalSensor()
void initDigitalSensor |
( |
DigitalSensor * |
digitalsensor, |
|
|
const char * |
name, |
|
|
int |
hz, |
|
|
int |
port, |
|
|
void * |
child |
|
) |
| |
Initializes a digital sensor with the given parameters.
- Parameters
-
digitalsensor | Pointer to the Sensor structure to initialize. |
name | Pointer to a string containing the name of the sensor. |
hz | The frequency in Hertz at which the sensor operates. |
port | Location of the digital sensor on board. |
child | Pointer to the child struct. |
Definition at line 3 of file DigitalSensor.c.
4 {
6 digitalSensor->port = port;
7 digitalSensor->child = child;
8}
void initSensor(Sensor *sensor, const char *name, int hz, SensorType type, void *child)
Initializes a sensor with the given parameters.
◆ digital_in_buffer