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:
[email protected]


With regards,
Apache Git Services

Reply via email to