#include "Output.h"
#include "../Utils/Constants.h"
#include "../Utils/Telemetry.h"
#include <stdint.h>
Go to the source code of this file.
◆ initDigitalOutput()
| void initDigitalOutput |
( |
DigitalOutput * |
digitaloutput, |
|
|
const char * |
name, |
|
|
int |
hz, |
|
|
int |
port |
|
) |
| |
Initializes a digital output with the given parameters.
- Parameters
-
| digitaloutput | Pointer to the Output structure to initialize. |
| name | Pointer to a string containing the name of the output. |
| hz | The frequency in Hertz at which the output operates. |
| port | Location of the digital output on board. |
Definition at line 6 of file DigitalOutput.c.
7 {
10 return;
11 }
13 digitalOutput->port = port;
15}
#define NUM_DIGITAL_OUTPUTS
void initOutput(Output *output, const char *name, int hz, OutputType type)
Initializes an output with the given parameters.
TelemetrySignal * registerTelemetrySignal(const char *name, TelemetryType type, UnitId unit_id, uint32_t expected_rate_ms, float custom_min, float custom_max)
◆ writeDigitalOutputData()
Writes data to the buffer of the digital output.
- Parameters
-
| output | Pointer to the DigitalOutput structure. |
| data | Data to write to the output. |
- Returns
- int _SUCCESS or _FAILURE.
Definition at line 17 of file DigitalOutput.c.
17 {
21}
uint8_t digital_out_buffer[NUM_DIGITAL_OUTPUTS]
void sendTelemetryValue(TelemetrySignal *signal, float value)
TelemetrySignal * telem_state
◆ digital_out_buffer