diff --git a/system/uorb/Kconfig b/system/uorb/Kconfig index 8457c1362..3d1d9cb5e 100644 --- a/system/uorb/Kconfig +++ b/system/uorb/Kconfig @@ -28,7 +28,7 @@ config UORB_TESTS config UORB_LOOP_MAX_EVENTS int "uorb loop max events" - default 16 + default 0 if UORB_TESTS diff --git a/system/uorb/Makefile b/system/uorb/Makefile index 3b3662208..800cd5cfb 100644 --- a/system/uorb/Makefile +++ b/system/uorb/Makefile @@ -22,9 +22,13 @@ include $(APPDIR)/Make.defs -CSRCS += $(wildcard uORB/*.c) +CSRCS += uORB/uORB.c CSRCS += $(wildcard sensor/*.c) +ifneq ($(CONFIG_UORB_LOOP_MAX_EVENTS),0) +CSRCS += uORB/loop.c uORB/epoll.c +endif + ifneq ($(CONFIG_UORB_LISTENER),) MAINSRC += listener.c PROGNAME += uorb_listener diff --git a/system/uorb/uORB/uORB.h b/system/uorb/uORB/uORB.h index 69cffd08a..b1aa15ef2 100644 --- a/system/uorb/uORB/uORB.h +++ b/system/uorb/uORB/uORB.h @@ -88,6 +88,7 @@ typedef CODE int (*orb_eventpri_cb_t)(FAR struct orb_handle_s *handle, typedef CODE int (*orb_eventerr_cb_t)(FAR struct orb_handle_s *handle, FAR void *arg); +#if CONFIG_UORB_LOOP_MAX_EVENTS enum orb_loop_type_e { ORB_EPOLL_TYPE = 0, @@ -111,6 +112,7 @@ struct orb_handle_s orb_eventpri_cb_t eventpri_cb; /* User EPOLLPRI callback funtion. */ orb_eventerr_cb_t eventerr_cb; /* User EPOLLERR callback funtion. */ }; +#endif /**************************************************************************** * Pre-processor Definitions @@ -896,6 +898,7 @@ int orb_fprintf(FAR FILE *stream, FAR const char *format, FAR const void *data); #endif +#if CONFIG_UORB_LOOP_MAX_EVENTS /**************************************************************************** * Name: orb_loop_init * @@ -1003,6 +1006,7 @@ int orb_handle_start(FAR struct orb_loop_s *loop, int orb_handle_stop(FAR struct orb_loop_s *loop, FAR struct orb_handle_s *handle); +#endif #ifdef __cplusplus }