Vehicle Control Unit
0.01
This is the c library for controlling the car.
Loading...
Searching...
No Matches
Core
Inc
Outputs
DigitalOutput.h
Go to the documentation of this file.
1
#ifndef RENNSSELAERMOTORSPORT_DIGITALOUTPUT_H
2
#define RENNSSELAERMOTORSPORT_DIGITALOUTPUT_H
3
4
#include "
Output.h
"
5
#include "../Utils/Constants.h"
6
7
#include <stdint.h>
8
9
extern
uint8_t
digital_out_buffer
[
NUM_DIGITAL_OUTPUTS
];
10
11
typedef
struct
{
12
Output
output
;
13
int
port
;
14
}
DigitalOutput
;
15
24
void
initDigitalOutput
(
DigitalOutput
* digitaloutput,
const
char
* name,
int
hz,
25
int
port);
26
34
int
writeDigitalOutputData
(
DigitalOutput
* output,
int
data);
35
36
#endif
// RENNSSELAERMOTORSPORT_DIGITALOUTPUT_H
NUM_DIGITAL_OUTPUTS
#define NUM_DIGITAL_OUTPUTS
Definition:
Constants.h:13
writeDigitalOutputData
int writeDigitalOutputData(DigitalOutput *output, int data)
Writes data to the buffer of the digital output.
Definition:
DigitalOutput.c:18
initDigitalOutput
void initDigitalOutput(DigitalOutput *digitaloutput, const char *name, int hz, int port)
Initializes a digital output with the given parameters.
Definition:
DigitalOutput.c:4
digital_out_buffer
uint8_t digital_out_buffer[NUM_DIGITAL_OUTPUTS]
Definition:
main.c:118
Output.h
DigitalOutput
Definition:
DigitalOutput.h:11
DigitalOutput::port
int port
Definition:
DigitalOutput.h:13
DigitalOutput::output
Output output
Definition:
DigitalOutput.h:12
Output
Definition:
Output.h:14
Generated by
1.9.5