forked from xuos/xiuos
Ubiquitous/RT-Thread/:add atti-arm32-board bsp
1.Modify the peripheral interface of the development board 2.Complete configuration files and build files 3.GCC is supported
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import rtconfig
|
||||
from building import *
|
||||
|
||||
cwd = GetCurrentDir()
|
||||
CPPPATH = [cwd]
|
||||
src = Split("""
|
||||
main.c
|
||||
""")
|
||||
|
||||
group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH)
|
||||
|
||||
Return('group')
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* @Author: chunyexixiaoyu
|
||||
* @Date: 2021-09-24 16:33:15
|
||||
* @LastEditTime: 2021-09-24 15:48:30
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: \xiuos\Ubiquitous\RT_Thread\bsp\stm32f407-atk-coreboard\applications\main.c
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006-2018, RT-Thread Development Team
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
*/
|
||||
|
||||
#include <rtthread.h>
|
||||
#include <board.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifdef RT_USING_POSIX
|
||||
#include <pthread.h>
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <dfs_poll.h>
|
||||
#include <dfs_posix.h>
|
||||
#include <dfs.h>
|
||||
#ifdef RT_USING_POSIX_TERMIOS
|
||||
#include <posix_termios.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define LED0_PIN GET_PIN(F, 9)
|
||||
extern int FrameworkInit();
|
||||
int main(void)
|
||||
{
|
||||
int count = 1;
|
||||
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
|
||||
rt_thread_mdelay(100);
|
||||
FrameworkInit();
|
||||
printf("XIUOS stm32f4 build %s %s\n",__DATE__,__TIME__);
|
||||
while (count++)
|
||||
{
|
||||
rt_pin_write(LED0_PIN, PIN_HIGH);
|
||||
rt_thread_mdelay(500);
|
||||
rt_pin_write(LED0_PIN, PIN_LOW);
|
||||
rt_thread_mdelay(500);
|
||||
}
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* @Author: yongliang
|
||||
* @Date: 2022-03-31 16:00:00
|
||||
* @Description: uart_test code
|
||||
* @FilePath: \xiuos\Ubiquitous\RT_Thread\aiit_board\stm32f407_mini_board\applications\uart_test.c
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006-2018, RT-Thread Development Team
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
*/
|
||||
|
||||
#include <rtthread.h>
|
||||
#include <board.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
int main (void)
|
||||
{
|
||||
/*1.设置系统中断优先组*/
|
||||
|
||||
/*2.串口初始化*/
|
||||
while(1)
|
||||
{
|
||||
if(USART_RX_STA&0X8000)
|
||||
{
|
||||
len =USART_RX_STA&0X3fff;
|
||||
printf("发送的消息为:\r\n");
|
||||
for(t=0;t<len;t++)
|
||||
{
|
||||
USART_SendData(USART1,USART_RX_BUF[T]);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user