未验证 提交 846bec58 编写于 作者: G guo 提交者: GitHub

Merge pull request #5724 from mysterywolf/arduino

处理多处细节问题(合并时采用merge方式)
......@@ -3,4 +3,5 @@
# If you need to exclude a file, add the path to the file in file_path.
dir_path:
- Libraries/VangoV85xx_standard_peripheral
- CMSIS
- VangoV85xx_standard_peripheral
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
* Copyright (c) 2006-2022, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
......
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
* Copyright (c) 2006-2022, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
......
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
* Copyright (c) 2006-2022, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
......
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
* Copyright (c) 2006-2022, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
......
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
* Copyright (c) 2006-2022, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
......
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
* Copyright (c) 2006-2022, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
......
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
* Copyright (c) 2006-2022, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
......@@ -7,7 +7,7 @@
* Date Author Notes
* 2012-01-01 aozima first implementation.
* 2021-09-21 zhuxw add vango v85xx spi drivers
*
*
*/
#ifndef __DRV_SPI_H__
......
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
* Copyright (c) 2006-2022, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
......@@ -7,7 +7,7 @@
* Date Author Notes
* 2021-01-04 iysheng first version
* 2021-09-07 FuC Suit for Vango V85XX
* 2021·09-12 ZhuXW fix UART5
* 2021-09-12 ZhuXW fix UART5
*/
#include <target.h>
......@@ -121,7 +121,7 @@ void UART5_IRQHandler(void)
}
#endif /* BSP_USING_UART4 */
static const struct V85xx_uart uarts[] =
static const struct V85xx_uart uarts[] =
{
#ifdef BSP_USING_UART0
{
......@@ -291,7 +291,7 @@ static void uart_isr(struct rt_serial_device *serial)
RT_ASSERT(uart != RT_NULL);
if ((UART_GetINTStatus((UART_TypeDef *)uart->uart_periph, UART_INTSTS_RX) != RESET) &&
(UART_GetFlag((UART_TypeDef *)uart->uart_periph, UART_FLAG_RXFULL) != RESET))
(UART_GetFlag((UART_TypeDef *)uart->uart_periph, UART_FLAG_RXFULL) != RESET))
{
rt_hw_serial_isr(serial, RT_SERIAL_EVENT_RX_IND);
/* Clear RXNE interrupt flag */
......@@ -299,7 +299,7 @@ static void uart_isr(struct rt_serial_device *serial)
}
}
static const struct rt_uart_ops V85xx_uart_ops =
static const struct rt_uart_ops V85xx_uart_ops =
{
V85xx_configure,
V85xx_control,
......@@ -313,7 +313,7 @@ int V85xx_hw_usart_init(void)
int i;
for (i = 0; i < sizeof(uarts) / sizeof(uarts[0]); i++)
for (i = 0; i < sizeof(uarts) / sizeof(uarts[0]); i++)
{
uarts[i].serial->ops = &V85xx_uart_ops;
uarts[i].serial->config = config;
......
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
* Copyright (c) 2006-2022, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
......
......@@ -3,4 +3,5 @@
# If you need to exclude a file, add the path to the file in file_path.
dir_path:
- Libraries/VangoV85xxP_standard_peripheral
- CMSIS
- VangoV85xxP_standard_peripheral
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
* Copyright (c) 2006-2022, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
......@@ -32,14 +32,14 @@ void SystemClock_Config(void)
|CLK_TYPE_HCLK \
|CLK_TYPE_PCLK;
CLK_Struct.AHBSource = CLK_AHBSEL_LSPLL;
CLK_Struct.PLLL.Frequency = CLK_PLLL_26_2144MHz;
CLK_Struct.PLLL.Source = CLK_PLLLSRC_XTALL;
CLK_Struct.PLLL.State = CLK_PLLL_ON;
CLK_Struct.HCLK.Divider = 1;
CLK_Struct.PCLK.Divider = 2;
CLK_ClockConfig(&CLK_Struct);
SystemCoreClock = 26214400UL;
}
......
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
* Copyright (c) 2006-2022, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
......
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
* Copyright (c) 2006-2022, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
......
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
* Copyright (c) 2006-2022, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
......
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
* Copyright (c) 2006-2022, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
......
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
* Copyright (c) 2006-2022, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
......@@ -121,7 +121,7 @@ void UART5_IRQHandler(void)
}
#endif /* BSP_USING_UART4 */
static const struct V85xxP_uart uarts[] =
static const struct V85xxP_uart uarts[] =
{
#ifdef BSP_USING_UART0
{
......@@ -285,7 +285,7 @@ static void uart_isr(struct rt_serial_device *serial)
RT_ASSERT(uart != RT_NULL);
if ((UART_GetINTStatus((UART_Type *)uart->uart_periph, UART_INTSTS_RX) != RESET) &&
(UART_GetFlag((UART_Type *)uart->uart_periph, UART_FLAG_RXFULL) != RESET))
(UART_GetFlag((UART_Type *)uart->uart_periph, UART_FLAG_RXFULL) != RESET))
{
rt_hw_serial_isr(serial, RT_SERIAL_EVENT_RX_IND);
/* Clear RXNE interrupt flag */
......@@ -293,7 +293,7 @@ static void uart_isr(struct rt_serial_device *serial)
}
}
static const struct rt_uart_ops V85xxP_uart_ops =
static const struct rt_uart_ops V85xxP_uart_ops =
{
V85xxP_configure,
V85xxP_control,
......@@ -307,7 +307,7 @@ int V85xxP_hw_usart_init(void)
int i;
for (i = 0; i < sizeof(uarts) / sizeof(uarts[0]); i++)
for (i = 0; i < sizeof(uarts) / sizeof(uarts[0]); i++)
{
uarts[i].serial->ops = &V85xxP_uart_ops;
uarts[i].serial->config = config;
......
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
* Copyright (c) 2006-2022, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
......
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
* Copyright (c) 2006-2022, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
......@@ -25,7 +25,7 @@
#define LV_FONT_MONTSERRAT_16 1
#define LV_USE_PERF_MONITOR 1
#if LV_VERSION_EQUAL(8, 1, 0)
#if LV_VERSION_EQUAL(8, 1, 0)
#define LV_USE_DEMO_RTT_MUSIC 1
#define LV_DEMO_RTT_MUSIC_AUTO_PLAY 1
#else
......
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
* Copyright (c) 2006-2022, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
......@@ -273,7 +273,7 @@ void lv_port_disp_init(void)
/*Set a display buffer*/
disp_drv.draw_buf = &disp_buf;
#if LV_VERSION_EQUAL(8, 1, 0)
#if LV_VERSION_EQUAL(8, 1, 0)
/*Fill a memory with a color (GPU only)*/
disp_drv.gpu_fill_cb = nu_fill_cb;
#endif
......
......@@ -39,6 +39,7 @@ menu "Onboard Peripheral Drivers"
select BSP_USING_ADC
select BSP_USING_ADC1
select BSP_USING_I2C
select BSP_USING_I2C3
select BSP_USING_I2C4
default n
......
......@@ -52,6 +52,10 @@
#define RT_DEBUG_IPC 0
#endif
#ifndef RT_DEBUG_DEVICE
#define RT_DEBUG_DEVICE 0
#endif
#ifndef RT_DEBUG_INIT
#define RT_DEBUG_INIT 0
#endif
......
......@@ -178,8 +178,8 @@ rt_err_t rt_device_init(rt_device_t dev)
result = device_init(dev);
if (result != RT_EOK)
{
rt_kprintf("To initialize device:%s failed. The error code is %d\n",
dev->parent.name, result);
RT_DEBUG_LOG(RT_DEBUG_DEVICE, ("To initialize device:%s failed. The error code is %d\n",
dev->parent.name, result));
}
else
{
......@@ -216,8 +216,8 @@ rt_err_t rt_device_open(rt_device_t dev, rt_uint16_t oflag)
result = device_init(dev);
if (result != RT_EOK)
{
rt_kprintf("To initialize device:%s failed. The error code is %d\n",
dev->parent.name, result);
RT_DEBUG_LOG(RT_DEBUG_DEVICE, ("To initialize device:%s failed. The error code is %d\n",
dev->parent.name, result));
return result;
}
......@@ -307,9 +307,9 @@ RTM_EXPORT(rt_device_close);
*
* @param size is the size of buffer.
*
* @return the actually read size on successful, otherwise zero returned.
* @return the actually read size on successful, otherwise 0 will be returned.
*
* @note since 0.4.0, the unit of size/pos is a block for block device.
* @note the unit of size/pos is a block for block device.
*/
rt_size_t rt_device_read(rt_device_t dev,
rt_off_t pos,
......@@ -350,9 +350,9 @@ RTM_EXPORT(rt_device_read);
*
* @param size is the size of buffer.
*
* @return the actually written size on successful, otherwise zero returned.
* @return the actually written size on successful, otherwise 0 will be returned.
*
* @note since 0.4.0, the unit of size/pos is a block for block device.
* @note the unit of size/pos is a block for block device.
*/
rt_size_t rt_device_write(rt_device_t dev,
rt_off_t pos,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册