#include "Output.h"
#include "../Utils/Constants.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 4 of file DigitalOutput.c.
5 {
7
8 #ifdef DEBUGn
9 printf("Invalid port number for digital output %s\n", name);
10 #endif
11
12 return;
13 }
15 digitalOutput->port = port;
16}
#define NUM_DIGITAL_OUTPUTS
void initOutput(Output *output, const char *name, int hz, OutputType type)
Initializes an output with the given parameters.
◆ 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 18 of file DigitalOutput.c.
18 {
19
20 #ifdef DEBUGn
22 #endif
25}
uint8_t digital_out_buffer[NUM_DIGITAL_OUTPUTS]
char name[MAX_NAME_LENGTH]
◆ digital_out_buffer