X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=arducontrol%2Foutput.h;h=2fde2627f3f05d2818b6a581eb0883309dbd2b97;hb=285513c401954c5ad012ae4ae5411f72b7f73ffc;hp=b4498ad391e9c954204f3962eb201cbcbb51ae19;hpb=b47b38e9dd282c5f8fb1ded25ade805e64d0cf1a;p=model-railway-devices.git diff --git a/arducontrol/output.h b/arducontrol/output.h index b4498ad..2fde262 100644 --- a/arducontrol/output.h +++ b/arducontrol/output.h @@ -5,10 +5,7 @@ typedef struct { - uint8_t bit_duration:5; - uint8_t ready:1; - uint8_t sending:1; - volatile uint8_t done:1; + uint8_t bit_duration; uint8_t length; uint8_t data[32]; uint8_t repeat_count; @@ -16,11 +13,12 @@ typedef struct uint8_t final_delay; } OutputPacket; -extern OutputPacket packet; - -void output_init(); -void clear_packet(); +void output_init(void); +OutputPacket *output_create_packet(void); +OutputPacket *output_create_chained_packet(void); +void output_send_packet(void); void output_set_power(uint8_t); -uint8_t output_command(); +uint8_t output_is_power_on(); +uint8_t output_command(const uint8_t *, uint8_t); #endif