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 2019/03/18 14:39:11 UTC
[GitHub] [mynewt-core] andrzej-kaczmarek commented on a change in pull
request #1692: hw/bus: Allow to use nonblock SPI operations
andrzej-kaczmarek commented on a change in pull request #1692: hw/bus: Allow to use nonblock SPI operations
URL: https://github.com/apache/mynewt-core/pull/1692#discussion_r266471668
##########
File path: hw/bus/drivers/spi_common/include/bus/drivers/spi_common.h
##########
@@ -41,7 +41,9 @@ struct bus_spi_dev_cfg {
struct bus_spi_dev {
struct bus_dev bdev;
struct bus_spi_dev_cfg cfg;
-
+#if MYNEWT_VAL(BUS_SPI_NOBLOCK)
+ struct os_sem sem;
+#endif
Review comment:
this should be put in `spi_hal` since it's specific to that driver
I think the best way to do this which is consistent with the way nodes are implemented would be to add `struct bus_spi_hal_dev` which "extends" this struct and adds new field. one thing that would need to be modified is nrf52 mcu package so it uses proper struct when creating dev object, but it's ok since we did not have release yet and can change things easily.
----------------------------------------------------------------
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