[bsp][mchp] fix samc21, same54, same70, saml10 build errors

This commit is contained in:
阿基米东 2023-09-22 19:04:28 +08:00 committed by guo
parent 874151b6db
commit b1fae3a604
26 changed files with 60 additions and 36 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2006-2021, RT-Thread Development Team * Copyright (c) 2006-2023, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) * Copyright (c) 2006-2023, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2006-2021, RT-Thread Development Team * Copyright (c) 2006-2023, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) * Copyright (c) 2006-2023, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2006-2021, RT-Thread Development Team * Copyright (c) 2006-2023, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) * Copyright (c) 2006-2023, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2006-2022, RT-Thread Development Team * Copyright (c) 2006-2023, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) * Copyright (c) 2006-2023, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) * Copyright (c) 2006-2023, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) * Copyright (c) 2006-2023, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) * Copyright (c) 2006-2023, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) * Copyright (c) 2006-2023, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) * Copyright (c) 2006-2023, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *
@ -241,8 +241,8 @@ int rt_hw_uart_init(void)
sam_serial.ops = &sam_serial_ops; sam_serial.ops = &sam_serial_ops;
sam_serial.config = config; sam_serial.config = config;
// sam_serial.serial_rx = RT_NULL; sam_serial.serial_rx = RT_NULL;
// sam_serial.serial_tx = RT_NULL; sam_serial.serial_tx = RT_NULL;
rt_hw_serial_register(&sam_serial, "uart0" /* RT_CONSOLE_DEVICE_NAME */, rt_hw_serial_register(&sam_serial, "uart0" /* RT_CONSOLE_DEVICE_NAME */,
RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_INT_RX | RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_INT_RX |
RT_DEVICE_FLAG_INT_TX, (void *)&TARGET_IO); RT_DEVICE_FLAG_INT_TX, (void *)&TARGET_IO);

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) * Copyright (c) 2006-2023, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2006-2021, RT-Thread Development Team * Copyright (c) 2006-2023, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) * Copyright (c) 2006-2023, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -1,11 +1,12 @@
/* /*
* Copyright (c) * Copyright (c) 2006-2023, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *
* Change Logs: * Change Logs:
* Date Author Email Notes * Date Author Email Notes
* 2019-07-16 Kevin.Liu kevin.liu.mchp@gmail.com First Release * 2019-07-16 Kevin.Liu kevin.liu.mchp@gmail.com First Release
* 2023-09-16 luhuadong luhuadong@163.com fix uart config
*/ */
#ifndef __BOARD_H__ #ifndef __BOARD_H__
#define __BOARD_H__ #define __BOARD_H__
@ -59,6 +60,11 @@ extern int __bss_end;
#define HEAP_END SAMC21_SRAM_END #define HEAP_END SAMC21_SRAM_END
#endif #endif
#ifdef RT_USING_SERIAL
#include "hpl_sercom_config.h"
#define DEFAULT_USART_BAUD_RATE CONF_SERCOM_4_USART_BAUD
#endif
void rt_hw_board_init(void); void rt_hw_board_init(void);
#endif #endif

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2006-2021, RT-Thread Development Team * Copyright (c) 2006-2023, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) * Copyright (c) 2006-2023, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -1,11 +1,12 @@
/* /*
* Copyright (c) * Copyright (c) 2006-2023, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *
* Change Logs: * Change Logs:
* Date Author Email Notes * Date Author Email Notes
* 2019-07-16 Kevin.Liu kevin.liu.mchp@gmail.com First Release * 2019-07-16 Kevin.Liu kevin.liu.mchp@gmail.com First Release
* 2023-09-16 luhuadong luhuadong@163.com fix uart config
*/ */
#ifndef __BOARD_H__ #ifndef __BOARD_H__
#define __BOARD_H__ #define __BOARD_H__
@ -73,6 +74,11 @@ extern int __bss_end;
#define HEAP_END SAME5x_SRAM_END #define HEAP_END SAME5x_SRAM_END
#endif #endif
#ifdef RT_USING_SERIAL
#include "hpl_sercom_config.h"
#define DEFAULT_USART_BAUD_RATE CONF_SERCOM_2_USART_BAUD
#endif
void rt_hw_board_init(void); void rt_hw_board_init(void);
#endif #endif

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2006-2021, RT-Thread Development Team * Copyright (c) 2006-2023, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) * Copyright (c) 2006-2023, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -1,11 +1,12 @@
/* /*
* Copyright (c) * Copyright (c) 2006-2023, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *
* Change Logs: * Change Logs:
* Date Author Email Notes * Date Author Email Notes
* 2019-07-16 Kevin.Liu kevin.liu.mchp@gmail.com First Release * 2019-07-16 Kevin.Liu kevin.liu.mchp@gmail.com First Release
* 2023-09-16 luhuadong luhuadong@163.com fix uart config
*/ */
#ifndef __BOARD_H__ #ifndef __BOARD_H__
#define __BOARD_H__ #define __BOARD_H__
@ -105,6 +106,11 @@ extern int __bss_end;
#define HEAP_END SAME70_SRAM_END #define HEAP_END SAME70_SRAM_END
#endif #endif
#ifdef RT_USING_SERIAL
#include "hpl_usart_config.h"
#define DEFAULT_USART_BAUD_RATE CONF_USART_1_BAUD
#endif
void rt_hw_board_init(void); void rt_hw_board_init(void);
#endif #endif

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2006-2021, RT-Thread Development Team * Copyright (c) 2006-2023, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) * Copyright (c) 2006-2023, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *

View File

@ -1,11 +1,12 @@
/* /*
* Copyright (c) * Copyright (c) 2006-2023, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *
* Change Logs: * Change Logs:
* Date Author Email Notes * Date Author Email Notes
* 2022-04-16 Kevin.Liu kevin.liu.mchp@gmail.com First Release * 2019-07-16 Kevin.Liu kevin.liu.mchp@gmail.com First Release
* 2023-09-16 luhuadong luhuadong@163.com fix uart config
*/ */
#ifndef __BOARD_H__ #ifndef __BOARD_H__
#define __BOARD_H__ #define __BOARD_H__
@ -43,6 +44,11 @@ extern int __bss_end;
#define HEAP_END SAML10_SRAM_END #define HEAP_END SAML10_SRAM_END
#endif #endif
#ifdef RT_USING_SERIAL
#include "hpl_sercom_config.h"
#define DEFAULT_USART_BAUD_RATE CONF_SERCOM_2_USART_BAUD
#endif
void rt_hw_board_init(void); void rt_hw_board_init(void);
#endif #endif