Skip to content

Commit

Permalink
esp32: determine from defined rmt/mcpwm queues, if driver type suppor…
Browse files Browse the repository at this point in the history
…t should be enabled
  • Loading branch information
gin66 committed Jan 19, 2024
1 parent 114e87c commit 51d0a66
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/fas_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ struct queue_end_s {
#include <soc/pcnt_reg.h>
#include <soc/pcnt_struct.h>

#define SUPPORT_SELECT_DRIVER_TYPE
#define SUPPORT_ESP32_MCPWM_PCNT
#define SUPPORT_ESP32_RMT
#include <driver/rmt.h>
Expand Down Expand Up @@ -442,4 +441,12 @@ enum channels { channelA, channelB, channelC };
#include <soc/periph_defs.h>
#endif /* __ESP32_IDF_V44__ */

//==========================================================================
// determine, if driver type selection should be supported
#if defined(QUEUES_MCPWM_PCNT) && defined(QUEUES_RMT)
#if (QUEUES_MCPWM_PCNT > 0) && (QUEUES_RMT > 0)
#define SUPPORT_SELECT_DRIVER_TYPE
#endif
#endif

#endif /* COMMON_H */

0 comments on commit 51d0a66

Please sign in to comment.