fix the code sytle

This commit is contained in:
supperthomas 2021-02-12 00:28:44 +08:00
parent 096253936f
commit f818faec58
3 changed files with 35 additions and 25 deletions

View File

@ -12,7 +12,7 @@
开发板datasheet [MAX32660-EVSYS.pdf)](https://datasheets.maximintegrated.com/en/ds/MAX32660-EVSYS.pdf) 开发板datasheet [MAX32660-EVSYS.pdf)](https://datasheets.maximintegrated.com/en/ds/MAX32660-EVSYS.pdf)
支持IDE: keil [eclipse](https://www.maximintegrated.com/en/design/software-description.html/swpart=SFW0001500A) 支持IDE: [keil pack](http://www.mxim.net/microcontroller/pack/Maxim.MAX32660.1.2.0.pack) [eclipse](https://www.maximintegrated.com/en/design/software-description.html/swpart=SFW0001500A)
本文主要内容如下: 本文主要内容如下:
@ -71,9 +71,9 @@ MAX32660-EVSYS开发板常用 **板载资源** 如下:
本 BSP 目前对外设的支持情况如下: 本 BSP 目前对外设的支持情况如下:
| **片上外设** | **支持情况** | **备注** | | **片上外设** | **支持情况** | **备注** |
| :----------- | :----------: | :----------: | | :----------- | :----------: | :-------------------: |
| GPIO | | | | GPIO | | |
| UART | 支持 | UART0, UART1 | | UART | 支持 | UART0, UART1(console) |
| PWM | | | | PWM | | |
| SPI | | | | SPI | | |
| RTC | | | | RTC | | |

View File

@ -1,3 +1,13 @@
/*
* Copyright (c) 2006-2020, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2021-02-11 supperthomas first version
*
*/
#ifndef _BOARD_H_ #ifndef _BOARD_H_
#define _BOARD_H_ #define _BOARD_H_

View File

@ -15,6 +15,10 @@
#include "rtdevice.h" #include "rtdevice.h"
#ifdef RT_USING_SERIAL #ifdef RT_USING_SERIAL
//#define DRV_DEBUG
//#define LOG_TAG "drv.usart"
//#include <drv_log.h>
#define UART0_CONFIG \ #define UART0_CONFIG \
{ \ { \
.name = "uart0", \ .name = "uart0", \
@ -22,7 +26,6 @@
.irq_type = MXC_UART_GET_IRQ(0), \ .irq_type = MXC_UART_GET_IRQ(0), \
} }
#define UART1_CONFIG \ #define UART1_CONFIG \
{ \ { \
.name = "uart1", \ .name = "uart1", \
@ -49,10 +52,6 @@ struct mcu_uart
//#define DRV_DEBUG
//#define LOG_TAG "drv.usart"
//#include <drv_log.h>
#if !defined(BSP_USING_UART0) && !defined(BSP_USING_UART1) #if !defined(BSP_USING_UART0) && !defined(BSP_USING_UART1)
#error "Please define at least one BSP_USING_UARTx" #error "Please define at least one BSP_USING_UARTx"
@ -138,7 +137,8 @@ static rt_err_t mcu_configure(struct rt_serial_device *serial, struct serial_con
mcu_cfg.pol = UART_FLOW_POL_EN; mcu_cfg.pol = UART_FLOW_POL_EN;
error = UART_Init(uart->handle, &mcu_cfg, &sys_uart_cfg); error = UART_Init(uart->handle, &mcu_cfg, &sys_uart_cfg);
if (error != E_NO_ERROR) { if (error != E_NO_ERROR)
{
rt_kprintf("Error initializing UART %d\n", error); rt_kprintf("Error initializing UART %d\n", error);
while (1) {} while (1) {}
} }