今天终于搞定OV7670 raw输出啦,兴奋!!
参考链接:
https://pikacode.com/liplianin/s2-liplianin/commit/dab97f5d6e3b
http://www.amobbs.com/forum.php?mod=viewthread&tid=4736337
http://www.52rd.com/bbs/Detail_RD.BBS_263309_86_1_1.html
COM13 @0x3d 由 0xc2-->0x08
- #define RGB565_MASK_RED 0xF800
- #define RGB565_MASK_GREEN 0x07E0
- #define RGB565_MASK_BLUE 0x001F
- void rgb565_2_rgb24(BYTE *rgb24, WORD rgb565)
- {
- //extract RGB
- rgb24[2] = (rgb565 & RGB565_MASK_RED) >> 11;
- rgb24[1] = (rgb565 & RGB565_MASK_GREEN) >> 5;
- rgb24[0] = (rgb565 & RGB565_MASK_BLUE);
- //amplify the image
- rgb24[2] <<= 3;
- rgb24[1] <<= 2;
- rgb24[0] <<= 3;
- }