add README and fix the code

This commit is contained in:
supperthomas 2021-02-16 08:53:51 +08:00
parent 8ac935aeaf
commit 933f5dd392
4 changed files with 14 additions and 4 deletions

View File

@ -122,7 +122,7 @@ CONFIG_RT_SERIAL_RB_BUFSZ=64
# CONFIG_RT_USING_CPUTIME is not set
# CONFIG_RT_USING_I2C is not set
# CONFIG_RT_USING_PHY is not set
# CONFIG_RT_USING_PIN is not set
CONFIG_RT_USING_PIN=y
# CONFIG_RT_USING_ADC is not set
# CONFIG_RT_USING_DAC is not set
# CONFIG_RT_USING_PWM is not set
@ -478,9 +478,10 @@ CONFIG_SOC_MAXIM=y
#
# On-chip Peripheral Drivers
#
# CONFIG_BSP_USING_GPIO is not set
CONFIG_BSP_USING_GPIO=y
CONFIG_BSP_USING_UART=y
# CONFIG_BSP_USING_UART0 is not set
CONFIG_BSP_USING_UART1=y
# CONFIG_BSP_UART1_RX_USING_DMA is not set
# CONFIG_BSP_USING_SPI is not set
# CONFIG_BSP_USING_ON_CHIP_FLASH is not set

View File

@ -72,10 +72,10 @@ MAX32660-EVSYS开发板常用 **板载资源** 如下:
| **片上外设** | **支持情况** | **备注** |
| :----------- | :----------: | :-------------------: |
| GPIO | | |
| GPIO | 支持 | |
| UART | 支持 | UART0, UART1(console) |
| PWM | | |
| SPI | | |
| SPI | 支持 | SPI0, SPI1 |
| RTC | | |
| I2S | | |
| I2C | | |

View File

@ -12,11 +12,18 @@
#include <rtthread.h>
#include <rtdevice.h>
#define GPIO_LED_PIN 13
int main(void)
{
int count = 1;
rt_pin_mode(GPIO_LED_PIN, PIN_MODE_OUTPUT);
while (count++)
{
rt_pin_write(GPIO_LED_PIN, PIN_HIGH);
rt_thread_mdelay(500);
rt_pin_write(GPIO_LED_PIN, PIN_LOW);
rt_thread_mdelay(500);
}
return RT_EOK;

View File

@ -79,6 +79,7 @@
#define RT_USING_SERIAL
#define RT_SERIAL_USING_DMA
#define RT_SERIAL_RB_BUFSZ 64
#define RT_USING_PIN
/* Using USB */
@ -159,6 +160,7 @@
/* On-chip Peripheral Drivers */
#define BSP_USING_GPIO
#define BSP_USING_UART
#define BSP_USING_UART1