BMCL.h
1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#ifndef __BARE_METAL_CONTROL_LAYER_
#define __BARE_METAL_CONTROL_LAYER_
#include "stdint.h"
#include "stdbool.h"
#define BMCL_SEMAP_STA_VAILD true
#define BMCL_SEMAP_STA_INVALID false
typedef struct
{
uint8_t sign;
uint32_t data;
}BMCL_GENSEAMP_s;
typedef struct
{
uint8_t commStatus;
}BMCL_COMM_SEQ_s;
typedef enum
{
BMCL_COMM_SEQ_STATUS_0 , // not need to response
BMCL_COMM_SEQ_STATUS_1 , // need to response
BMCL_COMM_SEQ_STATUS_2
}BMCL_COMM_SEQ_STATUS;
typedef enum
{
BMCL_GENSEAMP_STA_TAKEN = 0,
BMCL_GENSEAMP_STA_GIVEN ,
}BMCL_GENSEAMP_STA;
typedef enum
{
BMCL_GENSEAMP_RESULT_ERR = -1,
BMCL_GENSEAMP_RESULT_OK,
BMCL_GENSEAMP_RESULT_NOT_GIVEN,
BMCL_GENSEAMP_RESULT_GET_GIVEN,
}BMCL_GENSEAMP_RESULT;
//Data remote sensing structure
//which stores motor board remote sensing data and is used for the data queue of internal protocols.
typedef struct
{
float data[10];
}BMCL_PROTOCOL_REMOTESEN;
extern BMCL_GENSEAMP_s bmcl_ahrs_CurAngArr;
extern BMCL_GENSEAMP_s bmcl_ahrs_TarAngArr;
extern BMCL_GENSEAMP_s bmcl_Calibration;
extern BMCL_GENSEAMP_s bmcl_Music;
extern BMCL_COMM_SEQ_s bmcl_comm_seq_1;
extern BMCL_PROTOCOL_REMOTESEN bmcl_protocol_reData ;
void BMCL_Init();
void BMCL_Genseamp_give( BMCL_GENSEAMP_s * s , uint32_t data );
int32_t BMCL_GenSemap_take( BMCL_GENSEAMP_s * s , uint32_t* data );
#endif