Skip to content

Commit

Permalink
ESP32 linux target got RMT support
Browse files Browse the repository at this point in the history
  • Loading branch information
higaski committed Jul 27, 2023
1 parent c45b4d5 commit 0888a29
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
3 changes: 0 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ include(FetchContent)
if(ESP_PLATFORM)
file(GLOB_RECURSE SRC src/*.c)
idf_component_register(SRCS ${SRC} INCLUDE_DIRS include REQUIRES driver)
idf_build_get_property(TGT IDF_TARGET)
string(TOUPPER ${TGT} TGT)
target_compile_definitions(${COMPONENT_LIB} PRIVATE CONFIG_IDF_TARGET_${TGT})
target_link_libraries(${COMPONENT_LIB} PUBLIC DCC)
endif()

Expand Down
16 changes: 9 additions & 7 deletions src/rmt_dcc_encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@
/// \author Vincent Hamp
/// \date 08/01/2023

#if !CONFIG_IDF_TARGET_LINUX
# include "rmt_dcc_encoder.h"
# include <esp_attr.h>
# include <esp_check.h>
# include <limits.h>
#include "rmt_dcc_encoder.h"
#include <esp_attr.h>
#include <esp_check.h>
#include <limits.h>

#if __has_include(<esp_linux_helper.h>)
# include <esp_linux_helper.h>
#endif

static char const* TAG = "rmt";

Expand Down Expand Up @@ -373,5 +376,4 @@ esp_err_t rmt_new_dcc_encoder(dcc_encoder_config_t const* config,
free(dcc_encoder);
}
return ret;
}
#endif
}

0 comments on commit 0888a29

Please sign in to comment.