Files
Loongson_2k0300_SmartCar/lib/serial.h
T

61 lines
1.2 KiB
C++

#ifndef _SERIAL_H
#define _SERIAL_H
#include <iostream>
#include <fstream>
#include <string>
// class Serial{
// public:
// Serial();
// ~Serial();
// private:
// }
extern char vofa_buffer[64];
extern bool vofa_justfloat(int CH_count);
enum ImgFormat
{
Format_Invalid,
Format_Mono,
Format_MonoLSB,
Format_Indexed8,
Format_RGB32,
Format_ARGB32,
Format_ARGB32_Premultiplied,
Format_RGB16,
Format_ARGB8565_Premultiplied,
Format_RGB666,
Format_ARGB6666_Premultiplied,
Format_RGB555,
Format_ARGB8555_Premultiplied,
Format_RGB888,
Format_RGB444,
Format_ARGB4444_Premultiplied,
Format_RGBX8888,
Format_RGBA8888,
Format_RGBA8888_Premultiplied,
Format_BGR30,
Format_A2BGR30_Premultiplied,
Format_RGB30,
Format_A2RGB30_Premultiplied,
Format_Alpha8,
Format_Grayscale8,
// 以下格式发送时,IMG_WIDTH和IMG_HEIGHT不需要强制指定,设置为-1即可
Format_BMP,
Format_GIF,
Format_JPG,
Format_PNG,
Format_PBM,
Format_PGM,
Format_PPM,
Format_XBM,
Format_XPM,
Format_SVG,
};
extern bool vofa_image(int IMG_ID, int IMG_SIZE, int IMG_WIDTH, int IMG_HEIGHT, ImgFormat IMG_FORMAT, char *image);
#endif