shoot/User/device/nuc.h

45 lines
700 B
C
Raw Normal View History

2025-03-12 23:04:18 +08:00
#ifndef _NUC_H_
#define _NUC_H_
#include "struct_typedef.h"
#include "device.h"
#include "uart_it.h"
//帧头针尾
#define HEAD (0xFF)
#define TAIL (0xFE)
#define ODOM (0x04)
#define PICK (0x06)
#define VISION (0x01)
//写结构体存入视觉信息
typedef struct{
uint8_t status_fromnuc;
uint8_t ctrl_status; //取其中每一个二进制位用作通信
uint8_t id;
uint8_t mode;
struct
{
float x;
float y;
float z;
}vision;
}NUC_t;
int8_t NUC_Init(NUC_t *nuc);
int8_t NUC_StartReceiving(void);
int8_t NUC_Restart(void);
bool_t NUC_WaitDmaCplt(void);
int8_t NUC_RawParse(NUC_t *n);
int8_t NUC_HandleOffline(NUC_t *cmd);
#endif