1 /* 2 * Copyright (C) 2015-2019 Alibaba Group Holding Limited 3 */ 4 5 #ifndef BE_BOARD_INFO_H 6 #define BE_BOARD_INFO_H 7 8 #ifdef __cplusplus 9 extern "C" { 10 #endif 11 12 #include <stdint.h> 13 14 #define DEVICE_KEY_TAG "DEVICE_KEY" 15 #define DEVICE_NAME_TAG "DEVICE_NAME" 16 #define DEVICE_SECRET_TAG "DEVICE_SECRET" 17 18 /** 19 * set config info of the board 20 * 21 * @param[in] deviceKey the key of a product 22 * @param[in] deviceName the name of a product 23 *@param[in] deviceSecret the secret of a product 24 * @return 0 is ok, others fail 25 */ 26 27 int8_t board_setDeviceInfo(char *deviceKey, char *deviceName, 28 char *deviceSecret); 29 30 /** 31 * get config info of the board 32 * 33 * @param[out] deviceKey the key of a product 34 * @param[out] deviceName the name of a product 35 *@param[out] deviceSecret the secret of a product 36 * @return 0 is ok, others fail 37 */ 38 39 int8_t board_getDeviceInfo(char **productKey, char **deviceName, 40 char **deviceSecret); 41 42 #ifdef __cplusplus 43 } 44 #endif 45 46 #endif /* BE_BOARD_INFO_H */ 47