]> git.tdb.fi Git - model-railway-devices.git/blob - arducontrol/output.h
Hide details of output packet lifecycle
[model-railway-devices.git] / arducontrol / output.h
1 #ifndef PACKET_H_
2 #define PACKET_H_
3
4 #include <stdint.h>
5
6 typedef struct
7 {
8         uint8_t bit_duration;
9         uint8_t length;
10         uint8_t data[32];
11         uint8_t repeat_count;
12         uint8_t repeat_delay;
13         uint8_t final_delay;
14 } OutputPacket;
15
16 void output_init(void);
17 OutputPacket *output_create_packet(void);
18 void output_send_packet(void);
19 void output_set_power(uint8_t);
20 uint8_t output_is_power_on();
21 uint8_t output_command(const uint8_t *, uint8_t);
22
23 #endif