123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- #ifndef __BLE_SN2MODEL_H
- #define __BLE_SN2MODEL_H
- #include <stdint.h>
- #ifdef __cplusplus
- extern "C" {
- #endif
- #ifdef __BLE_SN2MODEL_H_GLOBAL
- #define __BLE_SN2MODEL_H_EXTERN
- #else
- #define __BLE_SN2MODEL_H_EXTERN extern
- #endif
- /************************************************************************************************
- * Version *
- ************************************************************************************************/
- /************************************************************************************************
- * How to use *
- ************************************************************************************************/
- /************************************************************************************************
- * Enable config *
- ************************************************************************************************/
- /************************************************************************************************
- * Includes *
- ************************************************************************************************/
- /************************************************************************************************
- * Defines *
- ************************************************************************************************/
- #define ALIENTEK_SN2MODEL_MAP_TBL \
- {"000000", "ALIENTEK"},
- #define UPPER_SN2MODEL_MAP_TBL \
- {"111001", "UPPER"},
- #define SN2MODEL_MAP_TBL { \
- ALIENTEK_SN2MODEL_MAP_TBL \
- UPPER_SN2MODEL_MAP_TBL}
- /************************************************************************************************
- * Typedefs *
- ************************************************************************************************/
- #pragma pack(1)
- typedef struct
- {
- uint8_t *prefix;
- uint8_t *model;
- } DEV_MODEL;
- #pragma pack()
- /************************************************************************************************
- * Interfaces *
- ************************************************************************************************/
- int32_t sn_2_model(uint8_t *sn, int32_t sn_type, uint8_t *model);
- #ifdef __cplusplus
- };
- #endif
- #endif // __BLE_SN2MODEL_H
|