常驻嘉宾
 
- 积分
- 3947
 
- 威望
- 2180
- 贡献
- 589
- 兑换币
- 1361
- 注册时间
- 2014-1-21
- 在线时间
- 589 小时
|
void vcan_sendimg(uint8 *imgaddr, uint32 imgsize)
{
#define CMD_IMG 1
uint8 cmdf[2] = {CMD_IMG, ~CMD_IMG}; //山外上位机 使用的命令
uint8 cmdr[2] = {~CMD_IMG, CMD_IMG}; //山外上位机 使用的命令
uart_putbuff(VCAN_PORT, cmdf, sizeof(cmdf)); //先发送命令
uart_putbuff(VCAN_PORT, imgaddr, imgsize); //再发送图像
uart_putbuff(VCAN_PORT, cmdr, sizeof(cmdr)); //先发送命令
}
void vcan_sendware(uint8 *wareaddr, uint32 waresize)
{
#define CMD_WARE 3
uint8 cmdf[2] = {CMD_WARE, ~CMD_WARE}; //yy_摄像头串口调试 使用的命令
uint8 cmdr[2] = {~CMD_WARE, CMD_WARE}; //yy_摄像头串口调试 使用的命令
uart_putbuff(VCAN_PORT, cmdf, sizeof(cmdf)); //先发送命令
uart_putbuff(VCAN_PORT, wareaddr, waresize); //再发送图像
uart_putbuff(VCAN_PORT, cmdr, sizeof(cmdr)); //先发送命令
}
看上位机什么要求
|
|