BlueTooth.c 907 Bytes
Newer Older
1
#include "BlueTooth.h"
2
#include "UDS_ISO14229_Services.h"
3
BlueTooth_t  BlueTooth;
4
uint8_t UUIDData[32] = {"000000000000000000000"};
5
extern Ser2EDFlashData Ser2EDataForDFlash;
李俭双's avatar
李俭双 committed
6
void BlueTooth_KL30_KL15_Wakeup_Init(void)
7 8 9 10 11 12 13 14
{
    BlueTooth.BLE_St = BLUE_STATE_Starting;
    BlueTooth.Navigation_St = EM_ESP32_NAVI_ST_STANDBY;
    BlueTooth.Navigation_Code = 0;
    BlueTooth.Navigation_Mileage = 0;
}
void Send_UUID_To_Esp32(void)
{
15
   //Protocol_Send(MCU_ESP32_0x03, UUIDData, 32);
16
   Protocol_Send(MCU_ESP32_0x03, Ser2EDataForDFlash.DID_F184, 32);
17
   
18
}
19 20 21 22 23 24 25 26

void Clear_Navigation_St(void)
{
    if(BlueTooth.BLE_St == 0)
    {
        BlueTooth.Navigation_St = 0;
    }
}
27 28 29 30 31 32 33 34 35 36 37 38
uint8_t Get_Navigation_St_Dis(void)
{
    return BlueTooth.Navigation_St;
}
uint8_t Get_Navigation_Code_Dis(void)
{
    return BlueTooth.Navigation_Code;
}
uint32_t Get_Navigation_Mileage_Dis(void)
{
    return BlueTooth.Navigation_Mileage;
}