![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
BaseUsbHost example program
Dependencies: BaseUsbHost FATFileSystem mbed mbed-rtos
decodeMJPEG/decodeMJPEG.h@2:c10029b87439, 2012-12-11 (annotated)
- Committer:
- va009039
- Date:
- Tue Dec 11 15:28:00 2012 +0000
- Revision:
- 2:c10029b87439
add example
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
va009039 | 2:c10029b87439 | 1 | // decodeMJPEG.h 2012/12/9 |
va009039 | 2:c10029b87439 | 2 | #ifndef DECODE_MJPEG_H |
va009039 | 2:c10029b87439 | 3 | #define DECODE_MJPEG_H |
va009039 | 2:c10029b87439 | 4 | |
va009039 | 2:c10029b87439 | 5 | #define JPEG_NONE 0 |
va009039 | 2:c10029b87439 | 6 | #define JPEG_START 1 |
va009039 | 2:c10029b87439 | 7 | #define JPEG_END 2 |
va009039 | 2:c10029b87439 | 8 | #define JPEG_ERROR 3 |
va009039 | 2:c10029b87439 | 9 | |
va009039 | 2:c10029b87439 | 10 | class decodeMJPEG { |
va009039 | 2:c10029b87439 | 11 | public: |
va009039 | 2:c10029b87439 | 12 | decodeMJPEG(); |
va009039 | 2:c10029b87439 | 13 | void inputPacket(const uint8_t* buf, int len); |
va009039 | 2:c10029b87439 | 14 | virtual void outputJPEG(uint8_t c, int status = JPEG_NONE) = 0; |
va009039 | 2:c10029b87439 | 15 | protected: |
va009039 | 2:c10029b87439 | 16 | void input(uint8_t c); |
va009039 | 2:c10029b87439 | 17 | int m_seq; |
va009039 | 2:c10029b87439 | 18 | uint8_t m_mark; |
va009039 | 2:c10029b87439 | 19 | uint16_t m_seg_pos; |
va009039 | 2:c10029b87439 | 20 | uint16_t m_seg_len; |
va009039 | 2:c10029b87439 | 21 | bool m_bDHT; |
va009039 | 2:c10029b87439 | 22 | bool m_output_desable; |
va009039 | 2:c10029b87439 | 23 | }; |
va009039 | 2:c10029b87439 | 24 | |
va009039 | 2:c10029b87439 | 25 | #endif // DECODE_MJPEG_H |