杨熙 83bd8614ab
Bsp lpc55sxx (#6897)
* [bsp_lpc55sxx] i2c,rtc bsp update

1. add i2c DMA mode
2. enable rtc driver

* [bsp_lpc55sxx] formmat code

using formmating.py for format code

* [lpc55sxx] remove .gitignore

* [bsp][lpc55sxx] update bsp driver

1. update sdif driver, enable DFS, FAT32
2. update rtc driver
2023-02-02 16:41:14 +08:00

59 lines
1.5 KiB
C

/*
* Copyright (c) 2006-2023, RT-Thread Development Team
* Copyright (c) 2019-2020, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2019-10-24 Magicoe first version
* 2020-01-10 Kevin/Karl Add PS demo
* 2020-09-21 supperthomas fix the main.c
*
*/
#include <rtdevice.h>
#include "dfs_fs.h"
#include "drv_pin.h"
/* defined the LED pin: GPIO1_IO4 */
/* GPIO1_4 is Blue LED */
#define LEDB_PIN GET_PINS(1, 4)
int main(void)
{
#if defined(__CC_ARM)
rt_kprintf("using armcc, version: %d\n", __ARMCC_VERSION);
#elif defined(__clang__)
rt_kprintf("using armclang, version: %d\n", __ARMCC_VERSION);
#elif defined(__ICCARM__)
rt_kprintf("using iccarm, version: %d\n", __VER__);
#elif defined(__GNUC__)
rt_kprintf("using gcc, version: %d.%d\n", __GNUC__, __GNUC_MINOR__);
#endif
rt_pin_mode(LEDB_PIN, PIN_MODE_OUTPUT); /* Set GPIO as Output */
#ifdef RT_USING_SDIO
rt_thread_mdelay(2000);
if (dfs_mount("sd", "/", "elm", 0, NULL) == 0)
{
rt_kprintf("sd mounted to /\n");
}
else
{
rt_kprintf("sd mount to / failed\n");
}
#endif
while (1)
{
rt_pin_write(LEDB_PIN, PIN_HIGH); /* Set GPIO output 1 */
rt_thread_mdelay(500); /* Delay 500mS */
rt_pin_write(LEDB_PIN, PIN_LOW); /* Set GPIO output 0 */
rt_thread_mdelay(500); /* Delay 500mS */
}
}
// end file