mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-01-16 16:53:32 +08:00
f51bce3fed
We currently only support building with CCS and SCons is not using. bsp/rm48x50/HALCoGen/HALCoGen.{hcg,dil} is the HALCoGen project file. You may need to regenerate the source file as you like, providing that: 1, IRQ is in Dispatch Mode and the table entry is IRQ_Handler. The channel 5 in enabled and connected to IRQ. 2, RTI driver is enabled and compare3 source is selected to counter1 and the compare3 will generate tick in the period of 10ms. This value is coresponding with RT_TICK_PER_SECOND in rtconfig.h. In CCS, you need to create a new CCS project and create link folders pointing at bsp/rm48x50, libcpu/arm/rm48x50 and src/, include/. Remember to add the include path to the Build Properties.
43 lines
1.0 KiB
C
43 lines
1.0 KiB
C
/*
|
|
* File : app.c
|
|
* This file is part of RT-Thread RTOS
|
|
* COPYRIGHT (C) 2013, RT-Thread Development Team
|
|
*
|
|
* The license and distribution terms for this file may be
|
|
* found in the file LICENSE in this distribution or at
|
|
* http://openlab.rt-thread.com/license/LICENSE
|
|
*
|
|
* Change Logs:
|
|
* Date Author Notes
|
|
* 2013-05-24 Grissiom first version
|
|
*/
|
|
|
|
#include <rtthread.h>
|
|
|
|
#include "system.h"
|
|
#include "het.h"
|
|
|
|
static rt_uint8_t user_thread_stack[512];
|
|
static struct rt_thread user_thread;
|
|
static void user_thread_entry(void *p)
|
|
{
|
|
gioSetDirection(hetPORT1, 0xFFFFFFFF);
|
|
for(;;)
|
|
{
|
|
gioSetBit(hetPORT1, 17, gioGetBit(hetPORT1, 17) ^ 1);
|
|
/* Taggle HET[1] with timer tick */
|
|
/*sciSendByte(scilinREG, 'b');*/
|
|
rt_thread_delay(100);
|
|
/*sciSendByte(scilinREG, 'a');*/
|
|
}
|
|
}
|
|
|
|
int rt_application_init()
|
|
{
|
|
rt_thread_init(&user_thread, "user1", user_thread_entry, RT_NULL,
|
|
user_thread_stack, sizeof(user_thread_stack), 8, 20);
|
|
rt_thread_startup(&user_thread);
|
|
return 0;
|
|
}
|
|
|