You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/08/08 12:21:14 UTC
[GitHub] andrzej-kaczmarek opened a new pull request #1320: Fix handling of
PWM instances in nRF52 MCU/BSP
andrzej-kaczmarek opened a new pull request #1320: Fix handling of PWM instances in nRF52 MCU/BSP
URL: https://github.com/apache/mynewt-core/pull/1320
Original code allocated separate `int` for each instance id. After nRF52 refactoring this was changed to single `int` created on stack but since initialization is not done immediately when device is created, this pointer is invalid when actual initialization takes place.
To avoid creating redundant global variables for each PWM instance we allow to pass instance id as simple in casted to pointer. Some helper macros were added to make this easier - such macros are already used in projects as Zephyr or BlueZ and are very convenient way to pass simple integers via user-data pointers.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services