[riot-notifications] [RIOT-OS/RIOT] cpu/native: Allow Access to Hardware SPI Bus on Linux (#11352)

Kaspar Schleiser notifications at github.com
Tue Apr 9 13:37:25 CEST 2019


kaspar030 requested changes on this pull request.

Found some minor style issues.

> @@ -3,3 +3,7 @@ FEATURES_PROVIDED += periph_cpuid
 FEATURES_PROVIDED += periph_hwrng
 FEATURES_PROVIDED += periph_pm
 FEATURES_PROVIDED += periph_pwm
+# Hardware SPI access is only available on Linux hosts
+ifeq ($(shell uname -s),Linux)

please re-use "OS" here

> @@ -3,3 +3,7 @@ FEATURES_PROVIDED += periph_cpuid
 FEATURES_PROVIDED += periph_hwrng
 FEATURES_PROVIDED += periph_pm
 FEATURES_PROVIDED += periph_pwm
+# Hardware SPI access is only available on Linux hosts
+ifeq ($(shell uname -s),Linux)
+  FEATURES_PROVIDED += periph_spi
+endif

newline missing

> +/**
+ * @brief     register `/dev/spidev*` device to be used for SPI
+ *
+ * @param[in] bus     SPI bus id of the device
+ * @param[in] cs      CS line to configure
+ * @param[in] name    path name for `/dev/spidev*` device
+ * @return    SPI_SETUP_OK       On success
+ * @return    SPI_SETUP_INVALID  On invalid parameters
+ */
+int spidev_linux_setup(spi_t bus, spi_cs_t cs, const char *name);
+
+/**
+ * @brief     Close open SPI file descriptors
+ */
+void spidev_linux_teardown(void);
+

extra newline

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11352#pullrequestreview-224346212
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190409/32c5c688/attachment.html>


More information about the notifications mailing list