First class data visualization and communication library with embedded devices. Code is maintained at github.com/Overdrivr/Telemetry

Dependents:   telemetry_car_demo telemetry_demo_FRDM-TFC telemetry_example_01 telemetry_indexed_data_demo ... more

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers framing.h Source File

framing.h

00001 #ifndef FRAMING_H_
00002 #define FRAMING_H_
00003 
00004 #include "stddef.h"
00005 #include "stdint.h"
00006 
00007 void initialize_framing();
00008 // Outgoing data
00009 // Set storage for the outgoing frame
00010 void outgoing_storage(uint8_t * buf, uint32_t bufSize);
00011 
00012 void begin();
00013 void append(uint8_t byte);
00014 void append2(uint16_t twobytes);
00015 void append4(uint32_t fourbytes);
00016 uint32_t end();
00017 
00018 // Incoming data
00019 // Set storage for the incoming data
00020 void incoming_storage(uint8_t * buf, uint32_t bufSize);
00021 
00022 void set_on_incoming_frame(void (*callback)(uint8_t * storage, uint32_t occupiedSize));
00023 void set_on_incoming_error(void (*callback)(int32_t errCode));
00024 void feed(uint8_t byte);
00025 #endif