diff --git a/components/audio_hal/driver/es8388/headphone_detect.c b/components/audio_hal/driver/es8388/headphone_detect.c index 0d09c53..72597a5 100644 --- a/components/audio_hal/driver/es8388/headphone_detect.c +++ b/components/audio_hal/driver/es8388/headphone_detect.c @@ -42,7 +42,7 @@ #define HP_DELAY_TIME_MS 1000 static const char *TAG = "HEADPHONE"; -static xTimerHandle timer_headphone; +static TimerHandle_t timer_headphone; static void hp_timer_cb(TimerHandle_t xTimer) { int num = (int)pvTimerGetTimerID(xTimer); diff --git a/components/dsp_processor/include/dsp_processor.h b/components/dsp_processor/include/dsp_processor.h index df80e47..6a2d09e 100644 --- a/components/dsp_processor/include/dsp_processor.h +++ b/components/dsp_processor/include/dsp_processor.h @@ -1,6 +1,10 @@ #ifndef _DSP_PROCESSOR_H_ #define _DSP_PROCESSOR_H_ +#ifdef __cplusplus +extern "C" { +#endif + #include "esp_err.h" typedef enum dspFlows { @@ -64,4 +68,8 @@ int dsp_processor_worker(char *audio, size_t chunk_size, uint32_t samplerate); esp_err_t dsp_processor_update_filter_params(filterParams_t *params); void dsp_processor_set_volome(double volume); +#ifdef __cplusplus +} +#endif + #endif /* _DSP_PROCESSOR_H_ */ diff --git a/components/lightsnapcast/include/player.h b/components/lightsnapcast/include/player.h index 0e5d0b9..b3b2cf4 100644 --- a/components/lightsnapcast/include/player.h +++ b/components/lightsnapcast/include/player.h @@ -1,12 +1,16 @@ #ifndef __PLAYER_H__ #define __PLAYER_H__ -#include "driver/i2s.h" +#include "driver/i2s_std.h" #include "esp_types.h" #include "freertos/FreeRTOS.h" #include "sdkconfig.h" #include "snapcast.h" +#ifdef __cplusplus +extern "C" { +#endif + #define I2S_PORT I2S_NUM_0 // TODO: maybe calculate this dynamically based on chunk duration and buffer @@ -77,5 +81,7 @@ int32_t get_diff_to_server(int64_t *tDiff); int32_t server_now(int64_t *sNow, int64_t *diff2Server); int32_t pcm_chunk_queue_msg_waiting(void); - +#ifdef __cplusplus +} +#endif #endif // __PLAYER_H__ diff --git a/components/lightsnapcast/include/snapcast.h b/components/lightsnapcast/include/snapcast.h index 02b8682..ecf7fad 100644 --- a/components/lightsnapcast/include/snapcast.h +++ b/components/lightsnapcast/include/snapcast.h @@ -1,6 +1,10 @@ #ifndef __SNAPCAST_H__ #define __SNAPCAST_H__ +#ifdef __cplusplus +extern "C" { +#endif + #include #include #include @@ -114,5 +118,7 @@ typedef struct time_message int time_message_serialize (time_message_t *msg, char *data, uint32_t size); int time_message_deserialize (time_message_t *msg, const char *data, uint32_t size); - +#ifdef __cplusplus +} +#endif #endif // __SNAPCAST_H__ diff --git a/components/net_functions/include/net_functions.h b/components/net_functions/include/net_functions.h index 6bb676b..017d7fa 100644 --- a/components/net_functions/include/net_functions.h +++ b/components/net_functions/include/net_functions.h @@ -1,6 +1,10 @@ #ifndef _NET_FUNCTIONS_H_ #define _NET_FUNCTIONS_H_ +#ifdef __cplusplus +extern "C" { +#endif + #include "mdns.h" #define SNTP_TIMEZONE CONFIG_SNTP_TIMEZONE @@ -13,4 +17,8 @@ uint32_t find_mdns_service(const char* service_name, const char* proto); void set_time_from_sntp(void); +#ifdef __cplusplus +} +#endif + #endif /* _NET_FUNCTIONS_H_ */ diff --git a/components/ui_http_server/include/ui_http_server.h b/components/ui_http_server/include/ui_http_server.h index 0a33b52..b25f927 100644 --- a/components/ui_http_server/include/ui_http_server.h +++ b/components/ui_http_server/include/ui_http_server.h @@ -1,6 +1,10 @@ #ifndef __UI_HTTP_SERVER_H__ #define __UI_HTTP_SERVER_H__ +#ifdef __cplusplus +extern "C" { +#endif + void init_http_server_task(char *key); typedef struct { @@ -11,4 +15,8 @@ typedef struct { float gain_3; } URL_t; +#ifdef __cplusplus +} +#endif + #endif // __UI_HTTP_SERVER_H__