回调函数
文章平均质量分 79
l3142600073
这个作者很懒,什么都没留下…
展开
-
回调函数
这里只做简单演示 typedef void (* funcp)(void) funcp_t; void callback ( void (* ptos)() ) // 函数指针作为参数 { ptos(); //调用ptos指向的函数 } void func () { printf ("This is a callback function!\n") } int main ()...原创 2019-05-07 15:34:40 · 266 阅读 · 0 评论 -
state machine
以摄像头采集图像为例,编写代码步奏如下: (1 NO state matchine) //定义图像采集状态 typedef enum //枚举具摄像头采集图像功能 { IMG_NOINIT = 0, //not start IMG_START, //start to gather image IMG_GATHER, //gathering image IMG_...转载 2019-05-07 17:08:33 · 336 阅读 · 0 评论