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 2020/02/22 17:07:23 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on issue #353: multiple definition of `up_mdelay'

xiaoxiang781216 commented on issue #353: multiple definition of `up_mdelay'
URL: https://github.com/apache/incubator-nuttx/issues/353#issuecomment-589976655
 
 
   @klmchp and @patacongo , we don't need add any config here: if some chipset decide to use arch_timer.c, the chipset just need remove up_delay.c from it's Make.defs.
   I added arch_timer.c/arch_rtc.c/arch_alarm.c just because NuttX define two similar timer/rtc inteface:
   1.One set come from include/nuttx/arch.h which all start with up_
   2.One set come from include/nuttx/timers/[oneshot.h|timer.h|rtc.h]
   It doesn't make sense to let developer learn and implement two interface for one hardware.
   Since the driver interface is bigger(multiple instance, alarm, /dev/xxx ...) than arch interface, it make sense to implement up_ timer/rtc API on top of driver interface, then the developer just need write timer/rtc/oneshot driver and let arch_timer.c/arch_rtc.c/arch_alarm.c do the conversion(remove up_delay.c from Make.defs since the implementation provide by arch_timer.c now).
   Of course, the devloper can still implement up_xxx directly if they like.

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


With regards,
Apache Git Services