You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/11/24 10:01:56 UTC

[GitHub] [incubator-nuttx] eenurkka commented on a change in pull request #4877: Add spi cs control for mpfs

eenurkka commented on a change in pull request #4877:
URL: https://github.com/apache/incubator-nuttx/pull/4877#discussion_r755878512



##########
File path: arch/risc-v/src/mpfs/mpfs_spi.h
##########
@@ -75,6 +75,32 @@ struct spi_dev_s *mpfs_spibus_initialize(int port);
 
 int mpfs_spibus_uninitialize(struct spi_dev_s *dev);
 
+/****************************************************************************
+ * Name:  mpfs_spi0/1/..._select
+ *
+ * Description:
+ *   The external function, mpfs_spi0/1/..._select,
+ *   must be provided by board-specific logic.  This is implementation of the
+ *   select of the SPI interface defined by
+ *   struct spi_ops_s (see include/nuttx/spi/spi.h).
+ *   All other methods (including mpfs_spibus_initialize())
+ *   are provided by common MPFS logic.
+ ****************************************************************************/
+
+#ifndef CONFIG_SPI_CS_CONTROL
+
+#ifdef CONFIG_MPFS_SPI0
+void mpfs_spi0_select(FAR struct spi_dev_s *dev,
+                        uint32_t devid, bool selected);
+#endif
+
+#ifdef CONFIG_MPFS_SPI1
+void mpfs_spi1_select(FAR struct spi_dev_s *dev,
+                        uint32_t devid, bool selected);
+#endif
+

Review comment:
       Should mpfs_spi0_select() and mpfs_spi1_select() have weak_function counterparts? So it would compile if the configuration is used? Or does it matter?




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org