Any changes are to allow conversion to BMP
Dependents: Color_Targeting_Catapult
Fork of BaseJpegDecode by
BitPattern.h@7:5010d93af0b6, 2014-04-30 (annotated)
- Committer:
- kylepost3
- Date:
- Wed Apr 30 14:17:05 2014 +0000
- Revision:
- 7:5010d93af0b6
- Parent:
- 0:417b7ae90eff
Any changes are to allow conversion to BMP
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
va009039 | 0:417b7ae90eff | 1 | #ifndef BIT_PATTERN_H |
va009039 | 0:417b7ae90eff | 2 | #define BIT_PATTERN_H |
va009039 | 0:417b7ae90eff | 3 | #include "mbed.h" |
va009039 | 0:417b7ae90eff | 4 | |
va009039 | 0:417b7ae90eff | 5 | class BitPattern { |
va009039 | 0:417b7ae90eff | 6 | public: |
va009039 | 0:417b7ae90eff | 7 | BitPattern(); |
va009039 | 0:417b7ae90eff | 8 | BitPattern(uint32_t value, int size); |
va009039 | 0:417b7ae90eff | 9 | BitPattern(const char* s); |
va009039 | 0:417b7ae90eff | 10 | void clear(); |
va009039 | 0:417b7ae90eff | 11 | void operator +=(uint8_t c); |
va009039 | 0:417b7ae90eff | 12 | int operator [](int index); |
va009039 | 0:417b7ae90eff | 13 | void put(uint32_t value, int size = 8); |
va009039 | 0:417b7ae90eff | 14 | uint32_t peek(int size = 8); |
va009039 | 0:417b7ae90eff | 15 | uint32_t get(int size = 8); |
va009039 | 0:417b7ae90eff | 16 | int size(); |
va009039 | 0:417b7ae90eff | 17 | bool match(BitPattern& b); |
va009039 | 0:417b7ae90eff | 18 | bool match(const char* s); |
va009039 | 0:417b7ae90eff | 19 | void operator =(const char* s); |
va009039 | 0:417b7ae90eff | 20 | void operator +=(const char* s); |
va009039 | 0:417b7ae90eff | 21 | bool operator ==(BitPattern& b); |
va009039 | 0:417b7ae90eff | 22 | private: |
va009039 | 0:417b7ae90eff | 23 | uint32_t m_pat; |
va009039 | 0:417b7ae90eff | 24 | int m_size; |
va009039 | 0:417b7ae90eff | 25 | }; |
va009039 | 0:417b7ae90eff | 26 | #endif // BIT_PATTERN_H |