You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/09/02 16:37:42 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #6992: WS2812 LED driver using ESP32's RMT peripheral

xiaoxiang781216 commented on code in PR #6992:
URL: https://github.com/apache/incubator-nuttx/pull/6992#discussion_r961850389


##########
include/nuttx/board.h:
##########
@@ -837,6 +837,27 @@ void board_init_rngseed(void);
 int board_reset_cause(FAR struct boardioc_reset_cause_s *cause);
 #endif
 
+/****************************************************************************
+ * Name:  board_ws2812_initialize
+ *
+ * Description:
+ *   This function may called from application-specific logic during its
+ *   to perform board-specific initialization of the ws2812 device
+ *
+ *
+ ****************************************************************************/
+
+#  ifdef CONFIG_WS2812
+#    ifndef CONFIG_WS2812_NON_SPI_DRIVER
+int board_ws2812_initialize(int devno, int spino, uint16_t nleds);
+#    else
+int board_ws2812_initialize(
+    int devno, 
+    uint16_t nleds, 
+    struct rmt_dev_s *rmt_dev);

Review Comment:
   since rmt is specific for esp32, it's wrong to reference in the common header file.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org