test

Dependencies:   Nanopb iSerial mbed BaseJpegDecode FatFileSystem SDFileSystem RingBuffer Camera_LS_Y201

Committer:
cgraham
Date:
Thu Sep 18 15:21:47 2014 +0000
Revision:
0:d69efd0ee139
test

Who changed what in which revision?

UserRevisionLine numberNew contents of line
cgraham 0:d69efd0ee139 1 #ifndef BIT_PATTERN_H
cgraham 0:d69efd0ee139 2 #define BIT_PATTERN_H
cgraham 0:d69efd0ee139 3 #include "mbed.h"
cgraham 0:d69efd0ee139 4
cgraham 0:d69efd0ee139 5 class BitPattern {
cgraham 0:d69efd0ee139 6 public:
cgraham 0:d69efd0ee139 7 BitPattern();
cgraham 0:d69efd0ee139 8 BitPattern(uint32_t value, int size);
cgraham 0:d69efd0ee139 9 BitPattern(const char* s);
cgraham 0:d69efd0ee139 10 void clear();
cgraham 0:d69efd0ee139 11 void operator +=(uint8_t c);
cgraham 0:d69efd0ee139 12 int operator [](int index);
cgraham 0:d69efd0ee139 13 void put(uint32_t value, int size = 8);
cgraham 0:d69efd0ee139 14 uint32_t peek(int size = 8);
cgraham 0:d69efd0ee139 15 uint32_t get(int size = 8);
cgraham 0:d69efd0ee139 16 int size();
cgraham 0:d69efd0ee139 17 bool match(BitPattern& b);
cgraham 0:d69efd0ee139 18 bool match(const char* s);
cgraham 0:d69efd0ee139 19 void operator =(const char* s);
cgraham 0:d69efd0ee139 20 void operator +=(const char* s);
cgraham 0:d69efd0ee139 21 bool operator ==(BitPattern& b);
cgraham 0:d69efd0ee139 22 private:
cgraham 0:d69efd0ee139 23 uint32_t m_pat;
cgraham 0:d69efd0ee139 24 int m_size;
cgraham 0:d69efd0ee139 25 };
cgraham 0:d69efd0ee139 26 #endif // BIT_PATTERN_H