nuttx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-nuttx] patacongo commented on pull request #1006: Move stm32 common board logic to stm32/common/
Date Fri, 08 May 2020 15:51:12 GMT

patacongo commented on pull request #1006:
URL: https://github.com/apache/incubator-nuttx/pull/1006#issuecomment-625881481


   This looks like an appropriate use of a common directory (it could be a drivers directory
like cxd56xx).  Common driver initialization, in general, is a good decision.
   
   Gut we do have to be careful about what we think is common.  Just because two files are
the same or similar, does not make them "common" in the architectural sense:
   
   - They must not violate the same partitioning used for other architecutes and boards
   - They must not eliminate beneficial architectural hooks that may be need in the future.
   
   Other people have started this in the past and got it complete wrong.  There are attempts
to move the stm32_autoleds.c file into common code just become some of there were the same.
 Bad Idea!  LEDs are inherently board specific.
   
   There was even an attempt at one point to move the board-specific header file from the
board/src directory into a common directory.  A VERY bad ida!
   
   So I think that what you are doing is good and beneficial, we also need to be careful about
what we thing of as common logic.  Let's not break the architectural model!  Driver initialization
is a good start.  USB host host support is rather complex and very similar to all boards as
well.  Things like that would be greate candidates.
     


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

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



Mime
View raw message