test

Dependencies:   Nanopb iSerial mbed BaseJpegDecode FatFileSystem SDFileSystem RingBuffer Camera_LS_Y201

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers BitPattern.h Source File

BitPattern.h

00001 #ifndef BIT_PATTERN_H
00002 #define BIT_PATTERN_H
00003 #include "mbed.h"
00004 
00005 class BitPattern {
00006 public:
00007     BitPattern();
00008     BitPattern(uint32_t value, int size);
00009     BitPattern(const char* s);
00010     void clear();
00011     void operator +=(uint8_t c);
00012     int operator [](int index);
00013     void put(uint32_t value, int size = 8);
00014     uint32_t peek(int size = 8);
00015     uint32_t get(int size = 8);
00016     int size();
00017     bool match(BitPattern& b);
00018     bool match(const char* s);
00019     void operator =(const char* s);
00020     void operator +=(const char* s);
00021     bool operator ==(BitPattern& b);
00022 private:
00023     uint32_t m_pat;
00024     int m_size;
00025 };
00026 #endif // BIT_PATTERN_H