display.h 868 B

123456789101112131415161718192021222324252627282930313233
  1. #pragma once
  2. #include "sdkconfig.h"
  3. /**
  4. * OLED display module - Shows track metadata, playback position &
  5. * progress bar. Registers as an RTSP event observer to receive metadata
  6. * updates automatically.
  7. *
  8. * When CONFIG_DISPLAY_ENABLED is not set, display_init() is an inline no-op
  9. * and no display code is compiled or linked.
  10. */
  11. #ifdef CONFIG_DISPLAY_ENABLED
  12. /**
  13. * Initialize the OLED display and register for RTSP events.
  14. *
  15. * @param bus Pre-initialised bus handle to share with the board:
  16. * - I2C mode: pass an i2c_master_bus_handle_t
  17. * - SPI mode: pass (void*)(intptr_t)spi_host_device_t
  18. * Pass NULL to let the display component initialise its own bus
  19. * (uses the GPIO pins from Kconfig).
  20. */
  21. void display_init(void *bus);
  22. #else
  23. static inline void display_init(void *bus) {
  24. (void)bus;
  25. }
  26. #endif