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/04/07 12:45:11 UTC
[GitHub] [incubator-nuttx] jturnsek commented on a change in pull request #3462: MIMXRT1064-EVK support
jturnsek commented on a change in pull request #3462:
URL: https://github.com/apache/incubator-nuttx/pull/3462#discussion_r608618424
##########
File path: boards/arm/imxrt/imxrt1064-evk/src/imxrt_spi.c
##########
@@ -0,0 +1,213 @@
+/****************************************************************************
+ * boards/arm/imxrt/imxrt1064-evk/src/imxrt_spi.c
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership. The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include <stdint.h>
+#include <stdbool.h>
+#include <errno.h>
+#include <debug.h>
+
+#include <nuttx/spi/spi.h>
+#include <arch/board/board.h>
+
+#include "arm_arch.h"
+
+#include "imxrt_config.h"
+#include "imxrt_lpspi.h"
+#include "imxrt_gpio.h"
+#include "imxrt1064-evk.h"
+
+#if defined(CONFIG_IMXRT_LPSPI1) || defined(CONFIG_IMXRT_LPSPI2) || \
+ defined(CONFIG_IMXRT_LPSPI3) || defined(CONFIG_IMXRT_LPSPI4)
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: imxrt_spidev_initialize
+ *
+ * Description:
+ * Called to configure SPI chip select GPIO pins for the imxrt1060-evk
+ * board.
+ *
+ ****************************************************************************/
+
+void weak_function imxrt_spidev_initialize(void)
+{
+#ifdef CONFIG_IMXRT_LPSPI1
+ imxrt_config_gpio(GPIO_LPSPI1_CS); /* LPSPI1 chip select */
+ imxrt_config_gpio(GPIO_MMCSD_EN);
Review comment:
I believe a copy/paste artifact because I have took a MIMXRT1060-EVK as basis.
--
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