DJI_Codec.h
Go to the documentation of this file.
00001 
00012 #ifndef DJI_CODEC_H
00013 #define DJI_CODEC_H
00014 
00015 #include <stdlib.h>
00016 #include <stdio.h>
00017 #include <string.h>
00018 #include <memory>
00019 #include "DJI_Type.h"
00020 
00021 #define _SDK_MAX_RECV_SIZE (BUFFER_SIZE)
00022 #define _SDK_SOF ((unsigned char)(0xAA))
00023 #define _SDK_CRC_HEAD_SIZE (2) // CRC16
00024 #define _SDK_CRC_DATA_SIZE (4) // CRC32
00025 #define _SDK_HEAD_DATA_LEN (sizeof(DJI::onboardSDK::Header) - 2)
00026 #define _SDK_FULL_DATA_SIZE_MIN (sizeof(DJI::onboardSDK::Header) + _SDK_CRC_DATA_SIZE)
00027 
00028 #define _SDK_U32_SET(_addr, _val) (*((unsigned int *)(_addr)) = (_val))
00029 #define _SDK_U16_SET(_addr, _val) (*((unsigned short *)(_addr)) = (_val))
00030 
00031 #define _SDK_CALC_CRC_HEAD(_msg, _len)                             \
00032   sdk_stream_crc16_calc((const unsigned char *)(_msg), _len)
00033 #define _SDK_CALC_CRC_TAIL(_msg, _len)                             \
00034   sdk_stream_crc32_calc((const unsigned char *)(_msg), _len)
00035 
00036 
00037 void transformTwoByte(const char *pstr, unsigned char *pdata);
00038 
00039 #endif // DJI_CODEC_H


dji_sdk_lib
Author(s):
autogenerated on Thu Jun 6 2019 17:55:25