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/12/17 17:41:07 UTC

[GitHub] andrzej-kaczmarek opened a new pull request #1568: [WIP] hw/bus: Simplify bus driver creation and usage

andrzej-kaczmarek opened a new pull request #1568: [WIP] hw/bus: Simplify bus driver creation and usage
URL: https://github.com/apache/mynewt-core/pull/1568
 
 
   This reorganizes `hw/bus` packages structure and includes few fixes to make bus driver creation and usage easier.
   
   To use bus driver it's now enough to only include `hw/bus/drivers/(i2c|spi)_common` package dependency and include `bus/drivers/(i2c|spi)_common.h` header file and all other dependencies should be automatically pulled in.
   
   Also, creating bus node now calls generic `init` function first which then calls `init` function assigned by bus device driver. This allows to easily swap drivers for each bus device without need to modify any code which uses bus nodes, i.e. there may be two I2C bus drivers (HAL and something optimized) and the same call to create node will works properly no matter which bus device this node is attached to.

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