2020-12-10 11:02:26 +08:00
|
|
|
/*
|
2021-01-21 16:08:06 +08:00
|
|
|
* Copyright (c) 2020-2021, Bluetrum Development Team
|
2020-12-10 11:02:26 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*
|
|
|
|
* Change Logs:
|
|
|
|
* Date Author Notes
|
2020-12-10 17:13:11 +08:00
|
|
|
* 2020/12/10 greedyhao The first version
|
2020-12-10 11:02:26 +08:00
|
|
|
*/
|
|
|
|
|
2021-04-09 17:35:26 +08:00
|
|
|
/**
|
|
|
|
* Notice!
|
|
|
|
* All functions or data that are called during an interrupt need to be in RAM.
|
|
|
|
* You can do it the way exception_isr() does.
|
|
|
|
*/
|
|
|
|
|
2020-12-10 11:02:26 +08:00
|
|
|
#include <rtthread.h>
|
|
|
|
#include "board.h"
|
|
|
|
|
|
|
|
int main(void)
|
|
|
|
{
|
|
|
|
uint8_t pin = rt_pin_get("PE.1");
|
|
|
|
|
|
|
|
rt_pin_mode(pin, PIN_MODE_OUTPUT);
|
|
|
|
rt_kprintf("Hello, world\n");
|
|
|
|
|
|
|
|
while (1)
|
|
|
|
{
|
2021-04-12 11:51:59 +08:00
|
|
|
rt_pin_write(pin, PIN_LOW);
|
|
|
|
rt_thread_mdelay(500);
|
|
|
|
rt_pin_write(pin, PIN_HIGH);
|
|
|
|
rt_thread_mdelay(500);
|
2020-12-10 11:02:26 +08:00
|
|
|
}
|
|
|
|
}
|