ex

Fork of mbed-os-example-mbed5-blinky by mbed-os-examples

Committer:
TMBOY
Date:
Tue Jul 18 16:54:45 2017 +0800
Revision:
47:9e361da97763
?

Who changed what in which revision?

UserRevisionLine numberNew contents of line
TMBOY 47:9e361da97763 1 // Copyright 2017 Baidu Inc. All Rights Reserved.
TMBOY 47:9e361da97763 2 // Author: Su Hao (suhao@baidu.com)
TMBOY 47:9e361da97763 3 //
TMBOY 47:9e361da97763 4 // Description: The common type definitions.
TMBOY 47:9e361da97763 5
TMBOY 47:9e361da97763 6 #ifndef BAIDU_IOT_TINYDU_IOT_OS_SRC_IOT_BAIDU_CA_INCLUDE_BAIDU_CA_TYPES_H
TMBOY 47:9e361da97763 7 #define BAIDU_IOT_TINYDU_IOT_OS_SRC_IOT_BAIDU_CA_INCLUDE_BAIDU_CA_TYPES_H
TMBOY 47:9e361da97763 8
TMBOY 47:9e361da97763 9 #include <stdio.h>
TMBOY 47:9e361da97763 10 #include <stdlib.h>
TMBOY 47:9e361da97763 11 #include <string.h>
TMBOY 47:9e361da97763 12
TMBOY 47:9e361da97763 13 #ifndef MBED_CLIENT_C_VERSION
TMBOY 47:9e361da97763 14 #define MBED_CLIENT_C_VERSION (30001) // 3.0.1
TMBOY 47:9e361da97763 15 #endif
TMBOY 47:9e361da97763 16
TMBOY 47:9e361da97763 17 typedef void* bca_context;
TMBOY 47:9e361da97763 18 typedef int bca_status_t;
TMBOY 47:9e361da97763 19 typedef unsigned int bca_size_t;
TMBOY 47:9e361da97763 20 typedef unsigned int bca_u32_t;
TMBOY 47:9e361da97763 21 typedef unsigned short bca_u16_t;
TMBOY 47:9e361da97763 22 typedef unsigned char bca_u8_t;
TMBOY 47:9e361da97763 23 typedef signed int bca_s32_t;
TMBOY 47:9e361da97763 24
TMBOY 47:9e361da97763 25 typedef char bca_bool;
TMBOY 47:9e361da97763 26
TMBOY 47:9e361da97763 27 enum _baidu_ca_bool_e {
TMBOY 47:9e361da97763 28 BCA_FALSE,
TMBOY 47:9e361da97763 29 BCA_TRUE
TMBOY 47:9e361da97763 30 };
TMBOY 47:9e361da97763 31
TMBOY 47:9e361da97763 32 // Declaration for local varaible & function.
TMBOY 47:9e361da97763 33 #define BCA_LOC static
TMBOY 47:9e361da97763 34 // Definition for local varaible & function.
TMBOY 47:9e361da97763 35 #define BCA_LOC_IMPL static
TMBOY 47:9e361da97763 36
TMBOY 47:9e361da97763 37 // Declaration for internal varaible & function.
TMBOY 47:9e361da97763 38 #define BCA_INT extern
TMBOY 47:9e361da97763 39 // Definition for internal varaible & function.
TMBOY 47:9e361da97763 40 #define BCA_INT_IMPL
TMBOY 47:9e361da97763 41
TMBOY 47:9e361da97763 42 // Declaration for external varaible & function.
TMBOY 47:9e361da97763 43 #define BCA_EXT extern
TMBOY 47:9e361da97763 44 // Definition for external varaible & function.
TMBOY 47:9e361da97763 45 #define BCA_EXT_IMPL
TMBOY 47:9e361da97763 46
TMBOY 47:9e361da97763 47 /*
TMBOY 47:9e361da97763 48 * The error codes.
TMBOY 47:9e361da97763 49 */
TMBOY 47:9e361da97763 50 typedef enum {
TMBOY 47:9e361da97763 51 BCA_NO_ERR,
TMBOY 47:9e361da97763 52 BCA_ERR_INTERNAL = -0x0001,
TMBOY 47:9e361da97763 53 BCA_ERR_TRANS_INTERNAL_ERROR = -0x0030,
TMBOY 47:9e361da97763 54 BCA_ERR_TRANS_WOULD_BLOCK = -0x0031,
TMBOY 47:9e361da97763 55 BCA_ERR_TRANS_TIMEOUT = -0x0032,
TMBOY 47:9e361da97763 56 BCA_ERR_REG_FAIL = -0x0033,
TMBOY 47:9e361da97763 57
TMBOY 47:9e361da97763 58 BCA_ERR_REPORT_FAILED = -0x070000,
TMBOY 47:9e361da97763 59 BCA_ERR_REPORT_FAILED_BEGIN = BCA_ERR_REPORT_FAILED + 0x10000
TMBOY 47:9e361da97763 60 } bca_errcode_e;
TMBOY 47:9e361da97763 61
TMBOY 47:9e361da97763 62 #endif // BAIDU_IOT_TINYDU_IOT_OS_SRC_IOT_BAIDU_CA_INCLUDE_BAIDU_CA_TYPES_H