aboutsummaryrefslogtreecommitdiff
path: root/apps/drivers/device/spi.h
diff options
context:
space:
mode:
authorpx4dev <px4@purgatory.org>2012-08-25 13:14:01 -0700
committerpx4dev <px4@purgatory.org>2012-08-25 13:15:23 -0700
commite5e2d7216c215acd8d59d76abfd55de5ea625019 (patch)
treec6c008b96bb398c8fd90b83c23f607790f00cf81 /apps/drivers/device/spi.h
parent380d1364830fb495021d9d07e6280c18386b8668 (diff)
downloadpx4-firmware-e5e2d7216c215acd8d59d76abfd55de5ea625019.tar.gz
px4-firmware-e5e2d7216c215acd8d59d76abfd55de5ea625019.tar.bz2
px4-firmware-e5e2d7216c215acd8d59d76abfd55de5ea625019.zip
Make it non-fatal to perform SPI transfers from interrupt context.
Diffstat (limited to 'apps/drivers/device/spi.h')
-rw-r--r--apps/drivers/device/spi.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/drivers/device/spi.h b/apps/drivers/device/spi.h
index ef382b03c..b2a111562 100644
--- a/apps/drivers/device/spi.h
+++ b/apps/drivers/device/spi.h
@@ -81,6 +81,12 @@ protected:
/**
* Perform a SPI transfer.
*
+ * If called from interrupt context, this interface does not lock
+ * the bus and may interfere with non-interrupt-context callers.
+ *
+ * Clients in a mixed interrupt/non-interrupt configuration must
+ * ensure appropriate interlocking.
+ *
* At least one of send or recv must be non-null.
*
* @param send Bytes to send to the device, or nullptr if