michi-jung commented on code in PR #6465:
URL: https://github.com/apache/incubator-nuttx/pull/6465#discussion_r902592712


##########
drivers/lcd/ug-9664hswag01.c:
##########
@@ -440,15 +443,12 @@ static void ug_deselect(FAR struct spi_dev_s *spi)
  *
  ****************************************************************************/
 
-static int ug_putrun(fb_coord_t row, fb_coord_t col,
+static int ug_putrun(FAR struct lcd_dev_s *dev,
+                     fb_coord_t row, fb_coord_t col,
                      FAR const uint8_t *buffer,
                      size_t npixels)
 {
-  /* Because of this line of code, we will only be able to support a single
-   * UG device
-   */
-
-  FAR struct ug_dev_s *priv = &g_ugdev;

Review Comment:
   I believe its more efficient to have the data objects statically allocated.  
See for example the changed 
[ssd1306_base.c](https://github.com/secore-ly/incubator-nuttx/blob/f9c804faa67264e4d1988b64884e0038d54968f6/drivers/lcd/ssd1306_base.c#L220)
 for how this could be implemented.  However, this also requires a change to 
the respective drivers xxx_initialize() function signature and a change to all 
callers.  My goal with this pull request is to get the barrier to multiple LCD 
support out of the way, not necessarily to make every LCD driver capable of 
supporting multiple LCDs per board.



-- 
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]

Reply via email to