M5Unified
m5unified_common.h
Go to the documentation of this file.
1 // Copyright (c) M5Stack. All rights reserved.
2 // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 
4 #pragma once
5 
6 #if !defined ( ESP_PLATFORM )
7 
8 #if __has_include(<SDL2/SDL.h>)
9 #include <SDL2/SDL.h>
10 #define M5UNIFIED_PC_BUILD
11 #elif __has_include(<SDL.h>)
12 #include <SDL.h>
13 #define M5UNIFIED_PC_BUILD
14 #endif
15 
16 #if defined ( M5UNIFIED_PC_BUILD )
17 
18 typedef int esp_err_t;
19 typedef int i2c_port_t;
20 
21 #define ESP_OK 0
22 #define ESP_FAIL -1
23 
24 typedef enum {
25  ESP_LOG_NONE,
26  ESP_LOG_ERROR,
27  ESP_LOG_WARN,
28  ESP_LOG_INFO,
29  ESP_LOG_DEBUG,
30  ESP_LOG_VERBOSE
31 } esp_log_level_t;
32 
33 typedef enum {
34  I2S_NUM_0 = 0,
35  I2S_NUM_MAX,
36 } i2s_port_t;
37 
38 #endif
39 #endif