|
19 | 19 | #define SALOF_USING_LINUX 4 |
20 | 20 | #define SALOF_USING_WINDOWS 5 |
21 | 21 |
|
22 | | -/* |
23 | | - * 编译时自动平台检测 (Automatic platform detection at compile time) |
24 | | - * |
25 | | - * 本文件会在编译时自动检测操作系统平台,无需手动配置 SALOF_OS |
26 | | - * This file automatically detects the OS platform at compile time without manual SALOF_OS configuration |
27 | | - * |
28 | | - * 支持的平台 (Supported platforms): |
29 | | - * - Windows (通过 _WIN32, _WIN64, __CYGWIN__, _MSC_VER 检测) |
30 | | - * - Linux/Unix (通过 __linux__, __unix__, __APPLE__ 检测) |
31 | | - * - FreeRTOS (通过 __FREERTOS__, FREERTOS, INC_FREERTOS_H 检测) |
32 | | - * - RT-Thread (通过 __RTTHREAD__, RT_USING_RTTHREAD, RT_THREAD_H__ 检测) |
33 | | - * - TencentOS (通过 __TENCENTOS__, TOS_CFG_TASK_PRIO_MAX 检测) |
34 | | - * |
35 | | - * 如需手动指定平台,可在包含本文件前定义 SALOF_OS |
36 | | - * To manually specify platform, define SALOF_OS before including this file |
37 | | - */ |
38 | | -#ifndef SALOF_OS |
39 | | - /* Auto-detect Windows platform (自动检测 Windows 平台) */ |
40 | | - #if defined(_WIN32) || defined(_WIN64) || defined(__CYGWIN__) || defined(_MSC_VER) |
41 | | - #define SALOF_OS SALOF_USING_WINDOWS |
42 | | - /* Auto-detect Linux/Unix platform (自动检测 Linux/Unix 平台) */ |
43 | | - #elif defined(__linux__) || defined(__unix__) || defined(__APPLE__) |
44 | | - #define SALOF_OS SALOF_USING_LINUX |
45 | | - /* Auto-detect FreeRTOS (自动检测 FreeRTOS) */ |
46 | | - #elif defined(__FREERTOS__) || defined(FREERTOS) || defined(INC_FREERTOS_H) |
47 | | - #define SALOF_OS SALOF_USING_FREERTOS |
48 | | - /* Auto-detect RT-Thread (自动检测 RT-Thread) */ |
49 | | - #elif defined(__RTTHREAD__) || defined(RT_USING_RTTHREAD) || defined(RT_THREAD_H__) |
50 | | - #define SALOF_OS SALOF_USING_RTT |
51 | | - /* Auto-detect TencentOS (自动检测 TencentOS) */ |
52 | | - #elif defined(__TENCENTOS__) || defined(TOS_CFG_TASK_PRIO_MAX) |
53 | | - #define SALOF_OS SALOF_USING_TENCENTOS |
54 | | - #endif |
55 | | -#endif |
56 | 22 |
|
57 | 23 | /* Include mqtt_config.h for MQTT-specific settings (can override SALOF_OS if needed) */ |
58 | 24 | #include "mqtt_config.h" |
|
0 commit comments