basicapp.c 465 字节
Newer Older
qiuyiuestc's avatar
qiuyiuestc 已提交
1 2
#include <rtthread.h>

3 4 5
static int a = 0;
static int b = 1000000;
int c = 100;
qiuyiuestc's avatar
qiuyiuestc 已提交
6 7 8 9 10 11

static void function(int count1, int count2, int count3)
{
	rt_kprintf("Hello RT-Thread %d %d\n", count1, count2, count3);
}

12
int main(void)
qiuyiuestc's avatar
qiuyiuestc 已提交
13 14
{
	int i;
15

qiuyiuestc's avatar
qiuyiuestc 已提交
16
	rt_kprintf("application entry\n");
17 18 19
	rt_kprintf("[addr]a-0x%x,b-0x%x,c-0x%x\n", &a, &b, &c);
	rt_kprintf("[value]a-%d,b-%d,c-%d\n", a, b, c);
	
qiuyiuestc's avatar
qiuyiuestc 已提交
20 21 22 23 24 25 26 27 28 29 30
	for(i=0; i<100; i++)  
	{	
		a++;
		b--;
		c++;
		function(a, c, b );
	}
 
	return 0;
}