mlaz commented on issue #955: pwm enabled?
URL: https://github.com/apache/mynewt-core/issues/955#issuecomment-387910285
 
 
   Note that on nordic devboards (namely nrf52840pdk) there are also multiple 
ports containing multiple pins, we are still dealing with this by using some 
addressing scheme like the one you mentioned(actualy this is the standard way 
tha manufacturer handles this on its SDK), also GPIO pins are usually either 
input or output configurable.
   
   >A while back we had a discussion on the mailing list about introducing a 
pin type. And adding more uint8_t interfaces increases the inertia to move into 
that direction.
   
   I remember that, it looks a lot like a problem mostly(if not only) happening 
with stm chips. I think if you really want to move on to new type for the GPIO 
pins you probably should first implement it and push it (which will probably 
make you refactor a bunch of code in the process). It doesn't make much sense 
for me now to implement a new pin type out of the blue for a use case I am not 
even fully aware of. 
   I don't think changing the pin type for uint32_t on the PWM API while having 
GPIO HAL API pins as uint8_t is very consistent. If you want to move in that 
direction that is a whole different task there, it won't even help you having a 
bunch of drivers with(ugly dirty) casts which later on you'll have to refactor 
again. 
   Anyway I am not opposing to anything here, I just don't see a real advantage 
on having this type changed only on the PWM API, mostly because you'll probably 
change the GPIO pin type in the future(since that's your objective) which will 
bring us to an inevitable refactor no matter what. I don't see how it increases 
inertia, I just feel that since software is always being rewritten we should 
fight for it to be consistently well written, not like an unfinished WIP.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to