summaryrefslogtreecommitdiff
path: root/components/drivers/spi
diff options
context:
space:
mode:
authorMeco Jianting Man <[email protected]>2021-03-17 02:32:02 +0800
committerGitHub <[email protected]>2021-03-17 02:32:02 +0800
commit295b95cd7529bc9b85b4fb8ee8b37c62811ffbc8 (patch)
treeb834c7a930dd12735759a6358ccef2bb94cfcc6f /components/drivers/spi
parentc3ffe18688a3696a486855ae98002714546bd836 (diff)
parentb12615f344e7e0824ab262994f443c452be04973 (diff)
Merge pull request #28 from RT-Thread/master
pr
Diffstat (limited to 'components/drivers/spi')
-rw-r--r--components/drivers/spi/enc28j60.c4
-rw-r--r--components/drivers/spi/enc28j60.h2
-rw-r--r--components/drivers/spi/qspi_core.c10
-rw-r--r--components/drivers/spi/sfud/inc/sfud_def.h4
-rw-r--r--components/drivers/spi/sfud/src/sfud_sfdp.c2
-rw-r--r--components/drivers/spi/spi_core.c2
-rw-r--r--components/drivers/spi/spi_dev.c10
-rw-r--r--components/drivers/spi/spi_flash.h10
-rw-r--r--components/drivers/spi/spi_flash_sfud.c2
-rw-r--r--components/drivers/spi/spi_flash_sfud.h2
-rw-r--r--components/drivers/spi/spi_msd.c6
-rw-r--r--components/drivers/spi/spi_msd.h14
-rw-r--r--components/drivers/spi/spi_wifi_rw009.c4
-rw-r--r--components/drivers/spi/spi_wifi_rw009.h4
14 files changed, 38 insertions, 38 deletions
diff --git a/components/drivers/spi/enc28j60.c b/components/drivers/spi/enc28j60.c
index a8bfe3a159..f99719245b 100644
--- a/components/drivers/spi/enc28j60.c
+++ b/components/drivers/spi/enc28j60.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -747,7 +747,7 @@ static struct pbuf *enc28j60_rx(rt_device_t dev)
}
#ifdef RT_USING_DEVICE_OPS
-const static struct rt_device_ops enc28j60_ops =
+const static struct rt_device_ops enc28j60_ops =
{
enc28j60_init,
enc28j60_open,
diff --git a/components/drivers/spi/enc28j60.h b/components/drivers/spi/enc28j60.h
index adff774748..471b71ec2d 100644
--- a/components/drivers/spi/enc28j60.h
+++ b/components/drivers/spi/enc28j60.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/spi/qspi_core.c b/components/drivers/spi/qspi_core.c
index c9ff6a9637..ca2cba0aba 100644
--- a/components/drivers/spi/qspi_core.c
+++ b/components/drivers/spi/qspi_core.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -14,7 +14,7 @@ rt_err_t rt_qspi_configure(struct rt_qspi_device *device, struct rt_qspi_configu
{
RT_ASSERT(device != RT_NULL);
RT_ASSERT(cfg != RT_NULL);
-
+
struct rt_qspi_device *qspi_device = (struct rt_qspi_device *)device;
rt_err_t result = RT_EOK;
@@ -35,14 +35,14 @@ rt_err_t rt_qspi_configure(struct rt_qspi_device *device, struct rt_qspi_configu
rt_err_t rt_qspi_bus_register(struct rt_spi_bus *bus, const char *name, const struct rt_spi_ops *ops)
{
rt_err_t result = RT_EOK;
-
+
result = rt_spi_bus_register(bus, name, ops);
if(result == RT_EOK)
{
/* set SPI bus to qspi modes */
bus->mode = RT_SPI_BUS_MODE_QSPI;
}
-
+
return result;
}
@@ -243,7 +243,7 @@ rt_err_t rt_qspi_send(struct rt_qspi_device *device, const void *send_buf, rt_si
message.qspi_data_lines = 0;
}
-
+
/* set send buf and send size */
message.parent.send_buf = ptr + count;
message.parent.recv_buf = RT_NULL;
diff --git a/components/drivers/spi/sfud/inc/sfud_def.h b/components/drivers/spi/sfud/inc/sfud_def.h
index fe7876618b..c06f9b1295 100644
--- a/components/drivers/spi/sfud/inc/sfud_def.h
+++ b/components/drivers/spi/sfud/inc/sfud_def.h
@@ -118,11 +118,11 @@ if (!(EXPR)) \
#define SFUD_CMD_READ_DATA 0x03
#endif
-#ifndef SFUD_CMD_DUAL_OUTPUT_READ_DATA
+#ifndef SFUD_CMD_DUAL_OUTPUT_READ_DATA
#define SFUD_CMD_DUAL_OUTPUT_READ_DATA 0x3B
#endif
-#ifndef SFUD_CMD_DUAL_IO_READ_DATA
+#ifndef SFUD_CMD_DUAL_IO_READ_DATA
#define SFUD_CMD_DUAL_IO_READ_DATA 0xBB
#endif
diff --git a/components/drivers/spi/sfud/src/sfud_sfdp.c b/components/drivers/spi/sfud/src/sfud_sfdp.c
index 0c81e073e6..5d95fa2b79 100644
--- a/components/drivers/spi/sfud/src/sfud_sfdp.c
+++ b/components/drivers/spi/sfud/src/sfud_sfdp.c
@@ -223,7 +223,7 @@ static bool read_basic_table(sfud_flash *flash, sfdp_para_header *basic_header)
return false;
}
/* get write granularity */
- //TODO ĿǰΪ 1.0 ���ṩ�ķ�ʽ������֧�� V1.5 �����ϵķ�ʽ��ȡ page size
+ //TODO 目前为 1.0 所提供的方式,后期支持 V1.5 及以上的方式读取 page size
switch ((table[0] & (0x01 << 2)) >> 2) {
case 0:
sfdp->write_gran = 1;
diff --git a/components/drivers/spi/spi_core.c b/components/drivers/spi/spi_core.c
index 64b0d2e496..7b6b7a0763 100644
--- a/components/drivers/spi/spi_core.c
+++ b/components/drivers/spi/spi_core.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/spi/spi_dev.c b/components/drivers/spi/spi_dev.c
index e334e7aeb5..264f5d1856 100644
--- a/components/drivers/spi/spi_dev.c
+++ b/components/drivers/spi/spi_dev.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -48,7 +48,7 @@ static rt_err_t _spi_bus_device_control(rt_device_t dev,
{
case 0: /* set device */
break;
- case 1:
+ case 1:
break;
}
@@ -56,7 +56,7 @@ static rt_err_t _spi_bus_device_control(rt_device_t dev,
}
#ifdef RT_USING_DEVICE_OPS
-const static struct rt_device_ops spi_bus_ops =
+const static struct rt_device_ops spi_bus_ops =
{
RT_NULL,
RT_NULL,
@@ -129,7 +129,7 @@ static rt_err_t _spidev_device_control(rt_device_t dev,
{
case 0: /* set device */
break;
- case 1:
+ case 1:
break;
}
@@ -137,7 +137,7 @@ static rt_err_t _spidev_device_control(rt_device_t dev,
}
#ifdef RT_USING_DEVICE_OPS
-const static struct rt_device_ops spi_device_ops =
+const static struct rt_device_ops spi_device_ops =
{
RT_NULL,
RT_NULL,
diff --git a/components/drivers/spi/spi_flash.h b/components/drivers/spi/spi_flash.h
index 82b1ab2ecd..9083a40a1c 100644
--- a/components/drivers/spi/spi_flash.h
+++ b/components/drivers/spi/spi_flash.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -28,10 +28,10 @@ typedef struct spi_flash_device *rt_spi_flash_device_t;
#ifdef RT_USING_MTD_NOR
struct spi_flash_mtd
{
- struct rt_mtd_nor_device mtd_device;
- struct rt_spi_device * rt_spi_device;
- struct rt_mutex lock;
- void * user_data;
+ struct rt_mtd_nor_device mtd_device;
+ struct rt_spi_device * rt_spi_device;
+ struct rt_mutex lock;
+ void * user_data;
};
#endif
diff --git a/components/drivers/spi/spi_flash_sfud.c b/components/drivers/spi/spi_flash_sfud.c
index 2333c9ccb3..ba673edf62 100644
--- a/components/drivers/spi/spi_flash_sfud.c
+++ b/components/drivers/spi/spi_flash_sfud.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/spi/spi_flash_sfud.h b/components/drivers/spi/spi_flash_sfud.h
index 932b7f879c..0d5a751d0c 100644
--- a/components/drivers/spi/spi_flash_sfud.h
+++ b/components/drivers/spi/spi_flash_sfud.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/drivers/spi/spi_msd.c b/components/drivers/spi/spi_msd.c
index 191933e421..875ae3c486 100644
--- a/components/drivers/spi/spi_msd.c
+++ b/components/drivers/spi/spi_msd.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -435,7 +435,7 @@ static rt_err_t _write_block(struct rt_spi_device *device, const void *buffer, u
}
#ifdef RT_USING_DEVICE_OPS
-const static struct rt_device_ops msd_ops =
+const static struct rt_device_ops msd_ops =
{
rt_msd_init,
rt_msd_open,
@@ -445,7 +445,7 @@ const static struct rt_device_ops msd_ops =
rt_msd_control
};
-const static struct rt_device_ops msd_sdhc_ops =
+const static struct rt_device_ops msd_sdhc_ops =
{
rt_msd_init,
rt_msd_open,
diff --git a/components/drivers/spi/spi_msd.h b/components/drivers/spi/spi_msd.h
index 6370170923..e9febca781 100644
--- a/components/drivers/spi/spi_msd.h
+++ b/components/drivers/spi/spi_msd.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -93,12 +93,12 @@
*/
typedef enum
{
- MSD_CARD_TYPE_UNKNOWN = 0, /**< unknown */
- MSD_CARD_TYPE_MMC, /**< MultiMedia Card */
- MSD_CARD_TYPE_SD_V1_X, /**< Ver 1.X Standard Capacity SD Memory Card */
- MSD_CARD_TYPE_SD_V2_X, /**< Ver 2.00 or later Standard Capacity SD Memory Card */
- MSD_CARD_TYPE_SD_SDHC, /**< High Capacity SD Memory Card */
- MSD_CARD_TYPE_SD_SDXC, /**< later Extended Capacity SD Memory Card */
+ MSD_CARD_TYPE_UNKNOWN = 0, /**< unknown */
+ MSD_CARD_TYPE_MMC, /**< MultiMedia Card */
+ MSD_CARD_TYPE_SD_V1_X, /**< Ver 1.X Standard Capacity SD Memory Card */
+ MSD_CARD_TYPE_SD_V2_X, /**< Ver 2.00 or later Standard Capacity SD Memory Card */
+ MSD_CARD_TYPE_SD_SDHC, /**< High Capacity SD Memory Card */
+ MSD_CARD_TYPE_SD_SDXC, /**< later Extended Capacity SD Memory Card */
}msd_card_type;
typedef enum
diff --git a/components/drivers/spi/spi_wifi_rw009.c b/components/drivers/spi/spi_wifi_rw009.c
index 4ddd18ca12..84da212077 100644
--- a/components/drivers/spi/spi_wifi_rw009.c
+++ b/components/drivers/spi/spi_wifi_rw009.c
@@ -1,6 +1,6 @@
/*
- * COPYRIGHT (C) 2018, Real-Thread Information Technology Ltd
- *
+ * COPYRIGHT (C) 2011-2021, Real-Thread Information Technology Ltd
+ *
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
diff --git a/components/drivers/spi/spi_wifi_rw009.h b/components/drivers/spi/spi_wifi_rw009.h
index 049b0a8486..a0d8ec437d 100644
--- a/components/drivers/spi/spi_wifi_rw009.h
+++ b/components/drivers/spi/spi_wifi_rw009.h
@@ -1,6 +1,6 @@
/*
- * COPYRIGHT (C) 2018, Real-Thread Information Technology Ltd
- *
+ * COPYRIGHT (C) 2011-2021, Real-Thread Information Technology Ltd
+ *
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs: