summaryrefslogtreecommitdiff
path: root/include/spi.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/spi.h')
-rw-r--r--include/spi.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/spi.h b/include/spi.h
index 4af03bc365..a03e04f134 100644
--- a/include/spi.h
+++ b/include/spi.h
@@ -19,4 +19,20 @@ int spi_enable(int enable);
int spi_transaction(const uint8_t *txdata, int txlen,
uint8_t *rxdata, int rxlen);
+#ifdef CONFIG_SPI
+/**
+ * Called when the NSS level changes, signalling the start or end of a SPI
+ * transaction.
+ *
+ * @param signal GPIO signal that changed
+ */
+void spi_event(enum gpio_signal signal);
+
+#else
+static inline void spi_event(enum gpio_signal signal)
+{
+}
+
+#endif
+
#endif /* __CROS_EC_SPI_H */