raiden00pl commented on PR #11428: URL: https://github.com/apache/nuttx/pull/11428#issuecomment-2536107608
In that case you should use some kind of lower-half architecture API for `rmt` driver that later can be reused to implement other upper-half drivers. Then based on the lower-half RMT implementation you can build other drivers like `rc/lirc_dev.c` or `WS2812` and then we have a nice modular architecture. For example, like its done for timer peripheral in stm32: you have one low-level interface for timers (https://github.com/apache/nuttx/blob/master/arch/arm/src/stm32/stm32_tim.h), and that interface is used to implement other features like periodic timer, oneshot or tickless. Equivalent functions from `struct rmt_ops_s` should be exposed at the arch level and then reused in the arch-specific WS2812 implementation. This structure should not be used by arch code, it should be implemented by arch code. Now, there is a strange coupling between the upper-half RMT driver and the architecture specific implementation for WS2182. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
