- 博客(4)
- 资源 (2)
- 收藏
- 关注
原创 ucosii入门验证
ucosii入门验证验证代码#include "sys.h"#include "delay.h"#include "usart.h"#include "led.h"#include "includes.h"#define START_TASK_PRIO 10#define START_STK_SIZE 128OS_STK START_TASK_STK[START_STK_SIZE];void start_task(void *pdata);#define LED0_
2021-01-21 21:52:38
363
原创 变量补漏(一)
变量补漏(一)验证代码/*test_func.c*/#include <stdio.h>extern int a;extern int b;void func(){ int test = 10; printf("in func a = %d\n", a); printf("in func b = %d\n", b);}/*static_test*/#include <stdio.h>int a = 10;static int b = 0;
2021-01-20 22:44:04
103
原创 指针、变量补漏(一)
线程指针需要初始化后再赋值,类似于C# New一下,不然指针未指向变量,无实际指向的内存,导致segment faultpthread_t *th;//pthread_create(th, NULL, func, NULL);//th未初始化赋值,发生segment fault=========》》pthread_t th;//pthread_create(&th, NULL, func, NULL);验证代码#include <stdio.h>#include
2021-01-19 23:07:43
89
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人