mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-02-16 12:59:47 +08:00
Confirmed with milkv, only the sd card version is sold by default for duo in the market. The spi pins are provided through stamp holes, so that users can solder the corresponding components on their baseboard during secondary development. In order to simplify maintenance work, the mainline will only support the sd-card version and no longer support spinor/spinand. Updated config files the same in this patch. Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
50 lines
993 B
C
Executable File
50 lines
993 B
C
Executable File
/*
|
|
* Copyright (c) 2006-2023, RT-Thread Development Team
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*
|
|
* Change Logs:
|
|
* Date Author Notes
|
|
* 2023/06/25 flyingcys first version
|
|
*/
|
|
|
|
#include <rtthread.h>
|
|
#include <stdio.h>
|
|
#include <drivers/dev_pin.h>
|
|
|
|
#if defined(BOARD_TYPE_MILKV_DUO256M)
|
|
#define LED_PIN "E02" /* Onboard LED pins */
|
|
#elif defined(BOARD_TYPE_MILKV_DUO)
|
|
#define LED_PIN "C24" /* Onboard LED pins */
|
|
#elif defined(BOARD_TYPE_MILKV_DUOS)
|
|
#define LED_PIN "A29" /* Onboard LED pins */
|
|
#endif
|
|
|
|
int main(void)
|
|
{
|
|
#ifdef RT_USING_SMART
|
|
rt_kprintf("Hello RT-Smart!\n");
|
|
#else
|
|
rt_kprintf("Hello RISC-V!\n");
|
|
#endif
|
|
|
|
/* LED pin: C24 */
|
|
rt_uint16_t led = rt_pin_get(LED_PIN);
|
|
|
|
/* set LED pin mode to output */
|
|
rt_pin_mode(led, PIN_MODE_OUTPUT);
|
|
|
|
while (1)
|
|
{
|
|
rt_pin_write(led, PIN_HIGH);
|
|
|
|
rt_thread_mdelay(500);
|
|
|
|
rt_pin_write(led, PIN_LOW);
|
|
|
|
rt_thread_mdelay(500);
|
|
}
|
|
|
|
return 0;
|
|
}
|