BMCL.c
914 字节
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
#include "BMCL.h"
#include "stddef.h"
BMCL_GENSEAMP_s bmcl_ahrs_CurAngArr = {0};
BMCL_GENSEAMP_s bmcl_ahrs_TarAngArr = {0};
BMCL_GENSEAMP_s bmcl_Calibration = {0};
BMCL_GENSEAMP_s bmcl_Music = {0};
BMCL_COMM_SEQ_s bmcl_comm_seq_1 = {
.commStatus = BMCL_COMM_SEQ_STATUS_0
};
BMCL_PROTOCOL_REMOTESEN bmcl_protocol_reData = {0};
void BMCL_Init(){
}
void BMCL_Genseamp_give( BMCL_GENSEAMP_s * s , uint32_t data ){
s->sign = BMCL_GENSEAMP_STA_GIVEN;
s->data = data;
}
int32_t BMCL_GenSemap_take( BMCL_GENSEAMP_s * s , uint32_t* data ){
if( s->sign == BMCL_GENSEAMP_STA_GIVEN ){
if( data == NULL){
s->sign = BMCL_GENSEAMP_STA_TAKEN;
return BMCL_GENSEAMP_RESULT_GET_GIVEN;
}
*data = s->data;
s->sign = BMCL_GENSEAMP_STA_TAKEN;
return BMCL_GENSEAMP_RESULT_GET_GIVEN;
}else{
return BMCL_GENSEAMP_RESULT_NOT_GIVEN;
}
}