Leon Wehmeier / Mbed OS fiasco_max32630

Dependencies:   SoftSerial MAX14690 Buffer

Fork of rtos_threading_with_callback by mbed_example

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers linkLayer.h Source File

linkLayer.h

00001 #pragma once
00002 #include<stdint.h>
00003 
00004 typedef struct {
00005         uint8_t frameType;
00006         uint8_t priority;
00007         uint8_t *payload;
00008         unsigned payloadSz;
00009     } linkPacket;
00010 
00011 class LinkLayerEncoder
00012 {
00013 public:
00014     LinkLayerEncoder(){oneCntr=0; hasPacket=false;}
00015     void setPacket(linkPacket*);
00016     bool getNext();
00017 protected:
00018     unsigned oneCntr;
00019     int preambleBits;
00020     int frameTypeBits;
00021     unsigned encoderIndex;
00022     bool hasPacket;
00023     linkPacket *lp;
00024 };