Skip to content

Commit ab57a81

Browse files
committed
Merge branch 'feat/add_an_eventfd_for_trel' into 'main'
feat: add an eventfd for trel See merge request espressif/esp-thread-br!172
2 parents f1f445e + f0a3866 commit ab57a81

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

examples/basic_thread_border_router/main/esp_ot_br.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,18 @@ void app_main(void)
7070
// * netif
7171
// * task queue
7272
// * border router
73-
// * spi interface
73+
size_t max_eventfd = 3;
74+
75+
#if CONFIG_OPENTHREAD_RADIO_SPINEL_SPI
76+
// * SpiSpinelInterface (The Spi Spinel Interface needs an eventfd.)
77+
max_eventfd++;
78+
#endif
79+
#if CONFIG_OPENTHREAD_RADIO_TREL
80+
// * TREL reception (The Thread Radio Encapsulation Link needs an eventfd for reception.)
81+
max_eventfd++;
82+
#endif
7483
esp_vfs_eventfd_config_t eventfd_config = {
75-
.max_fds = 4,
84+
.max_fds = max_eventfd,
7685
};
7786

7887
esp_openthread_platform_config_t platform_config = {

examples/m5stack_thread_border_router/main/esp_ot_br.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,18 @@ void app_main(void)
7171
// * netif
7272
// * task queue
7373
// * border router
74-
// * spi interface
74+
size_t max_eventfd = 3;
75+
76+
#if CONFIG_OPENTHREAD_RADIO_SPINEL_SPI
77+
// * SpiSpinelInterface (The Spi Spinel Interface needs an eventfd.)
78+
max_eventfd++;
79+
#endif
80+
#if CONFIG_OPENTHREAD_RADIO_TREL
81+
// * TREL reception (The Thread Radio Encapsulation Link needs an eventfd for reception.)
82+
max_eventfd++;
83+
#endif
7584
esp_vfs_eventfd_config_t eventfd_config = {
76-
.max_fds = 4,
85+
.max_fds = max_eventfd,
7786
};
7887

7988
esp_openthread_platform_config_t platform_config = {

0 commit comments

Comments
 (0)