Kaynağa Gözat

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

阿基米东 1 yıl önce
ebeveyn
işleme
b1fae3a604

+ 1 - 1
bsp/microchip/common/applications/adc_demo.c

@@ -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
  *

+ 1 - 1
bsp/microchip/common/applications/adc_demo.h

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

+ 1 - 1
bsp/microchip/common/applications/can_demo.c

@@ -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
  *

+ 1 - 1
bsp/microchip/common/applications/can_demo.h

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

+ 1 - 1
bsp/microchip/common/applications/i2c_demo.c

@@ -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
  *

+ 1 - 1
bsp/microchip/common/applications/i2c_demo.h

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

+ 1 - 1
bsp/microchip/common/applications/lwip_demo.c

@@ -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
  *

+ 1 - 1
bsp/microchip/common/applications/lwip_demo.h

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

+ 1 - 1
bsp/microchip/common/board/sam_gmac.c

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

+ 1 - 1
bsp/microchip/common/board/sam_gmac.h

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

+ 1 - 1
bsp/microchip/common/board/sam_i2c.c

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

+ 1 - 1
bsp/microchip/common/board/sam_i2c.h

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

+ 3 - 3
bsp/microchip/common/board/serial.c

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

+ 1 - 1
bsp/microchip/common/board/serial.h

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

+ 1 - 1
bsp/microchip/samc21/applications/main.c

@@ -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
  *

+ 1 - 1
bsp/microchip/samc21/board/board.c

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

+ 9 - 3
bsp/microchip/samc21/board/board.h

@@ -1,11 +1,12 @@
 /*
- * Copyright (c)
+ * Copyright (c) 2006-2023, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
- * Date        Author    Email                    Notes
- * 2019-07-16  Kevin.Liu kevin.liu.mchp@gmail.com First Release
+ * Date        Author     Email                     Notes
+ * 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__
 #define __BOARD_H__
@@ -59,6 +60,11 @@ extern int __bss_end;
 #define HEAP_END      SAMC21_SRAM_END
 #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);
 
 #endif

+ 1 - 1
bsp/microchip/same54/applications/main.c

@@ -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
  *

+ 1 - 1
bsp/microchip/same54/board/board.c

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

+ 9 - 3
bsp/microchip/same54/board/board.h

@@ -1,11 +1,12 @@
 /*
- * Copyright (c)
+ * Copyright (c) 2006-2023, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
- * Date        Author    Email                    Notes
- * 2019-07-16  Kevin.Liu kevin.liu.mchp@gmail.com First Release
+ * Date        Author     Email                     Notes
+ * 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__
 #define __BOARD_H__
@@ -73,6 +74,11 @@ extern int __bss_end;
 #define HEAP_END      SAME5x_SRAM_END
 #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);
 
 #endif

+ 1 - 1
bsp/microchip/same70/applications/main.c

@@ -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
  *

+ 1 - 1
bsp/microchip/same70/board/board.c

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

+ 9 - 3
bsp/microchip/same70/board/board.h

@@ -1,11 +1,12 @@
 /*
- * Copyright (c)
+ * Copyright (c) 2006-2023, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
- * Date        Author    Email                    Notes
- * 2019-07-16  Kevin.Liu kevin.liu.mchp@gmail.com First Release
+ * Date        Author     Email                     Notes
+ * 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__
 #define __BOARD_H__
@@ -105,6 +106,11 @@ extern int __bss_end;
 #define HEAP_END      SAME70_SRAM_END
 #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);
 
 #endif

+ 1 - 1
bsp/microchip/saml10/applications/main.c

@@ -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
  *

+ 1 - 1
bsp/microchip/saml10/board/board.c

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

+ 9 - 3
bsp/microchip/saml10/board/board.h

@@ -1,11 +1,12 @@
 /*
- * Copyright (c)
+ * Copyright (c) 2006-2023, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
- * Date        Author    Email                    Notes
- * 2022-04-16  Kevin.Liu kevin.liu.mchp@gmail.com First Release
+ * Date        Author     Email                     Notes
+ * 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__
 #define __BOARD_H__
@@ -43,6 +44,11 @@ extern int __bss_end;
 #define HEAP_END      SAML10_SRAM_END
 #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);
 
 #endif