diff options
| author | supperthomas <[email protected]> | 2021-02-16 08:53:51 +0800 |
|---|---|---|
| committer | supperthomas <[email protected]> | 2021-02-16 16:27:54 +0800 |
| commit | 933f5dd392e94bfdf7996c19e77d74917a4150e2 (patch) | |
| tree | c26f9065bb9d1066b64b14469b063c07d4bd5831 /bsp/maxim | |
| parent | 8ac935aeaf7e7c2ddb0c2acabf7925e8aaba3e97 (diff) | |
add README and fix the code
Diffstat (limited to 'bsp/maxim')
| -rw-r--r-- | bsp/maxim/MAX32660_EVSYS/.config | 5 | ||||
| -rw-r--r-- | bsp/maxim/MAX32660_EVSYS/README.md | 4 | ||||
| -rw-r--r-- | bsp/maxim/MAX32660_EVSYS/applications/application.c | 7 | ||||
| -rw-r--r-- | bsp/maxim/MAX32660_EVSYS/rtconfig.h | 2 |
4 files changed, 14 insertions, 4 deletions
diff --git a/bsp/maxim/MAX32660_EVSYS/.config b/bsp/maxim/MAX32660_EVSYS/.config index 76a58dd3d9..82e0a0d279 100644 --- a/bsp/maxim/MAX32660_EVSYS/.config +++ b/bsp/maxim/MAX32660_EVSYS/.config @@ -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 diff --git a/bsp/maxim/MAX32660_EVSYS/README.md b/bsp/maxim/MAX32660_EVSYS/README.md index 7123c5d400..90fea40042 100644 --- a/bsp/maxim/MAX32660_EVSYS/README.md +++ b/bsp/maxim/MAX32660_EVSYS/README.md @@ -72,10 +72,10 @@ MAX32660-EVSYS开发板常用 **板载资源** 如下: | **片上外设** | **支持情况** | **备注** | | :----------- | :----------: | :-------------------: | -| GPIO | | | +| GPIO | 支持 | | | UART | 支持 | UART0, UART1(console) | | PWM | | | -| SPI | | | +| SPI | 支持 | SPI0, SPI1 | | RTC | | | | I2S | | | | I2C | | | diff --git a/bsp/maxim/MAX32660_EVSYS/applications/application.c b/bsp/maxim/MAX32660_EVSYS/applications/application.c index 2e917824d9..d25f9a065e 100644 --- a/bsp/maxim/MAX32660_EVSYS/applications/application.c +++ b/bsp/maxim/MAX32660_EVSYS/applications/application.c @@ -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; diff --git a/bsp/maxim/MAX32660_EVSYS/rtconfig.h b/bsp/maxim/MAX32660_EVSYS/rtconfig.h index bd1b90652d..a15112c1b2 100644 --- a/bsp/maxim/MAX32660_EVSYS/rtconfig.h +++ b/bsp/maxim/MAX32660_EVSYS/rtconfig.h @@ -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 |
