The Code-Bin
Links
Home
Add your code!
All Listings
About
Latest Entry
Featured Scripts
Author's Website
Latest Entries
FFMPEG Thumbnail Scr...
PHP, 0.8KB
Jul. 29, 10:24pm
John
Z80 Assembler, 190 bytes
Feb. 17, 3:36am
John
Z80 Assembler, 176 bytes
Sep. 13, 2:19am
John
Z80 Assembler, 77 bytes
Sep. 13, 2:18am
John
Z80 Assembler, 209 bytes
Sep. 13, 2:17am
untitled C++ Code
Posted by: rwerwerwe | April 25, 2011 @ 4:35am
C++ Code
[
Download
]
#include "canTask.h" static OS_STK AppTaskCANAcceptStk[APP_CFG_TASK_CAN_ACCEPT_STK_SIZE]; static OS_STK AppTaskCANSendStk[APP_CFG_TASK_CAN_SEND_STK_SIZE]; static void App_TaskCANAccept(void *p_arg) { while (1) { canAccept(); } } static void App_TaskCANSend(void *p_arg) { while (1) { can29bitSend(); } } void createCanTasks(CPU_INT08U *err) { OSTaskCreateExt(App_TaskCANAccept, (void *)0, (OS_STK *)&AppTaskCANAcceptStk[APP_CFG_TASK_CAN_ACCEPT_STK_SIZE - 1], APP_CFG_TASK_CAN_ACCEPT_PRIO, APP_CFG_TASK_CAN_ACCEPT_PRIO, (OS_STK *)&AppTaskCANAcceptStk[0], APP_CFG_TASK_CAN_ACCEPT_STK_SIZE, (void *)0, OS_TASK_OPT_STK_CHK | OS_TASK_OPT_STK_CLR); #if (OS_TASK_NAME_SIZE > 10) OSTaskNameSet(APP_CFG_TASK_CAN_ACCEPT_PRIO, "CAN Accept", err); #endif OSTaskCreateExt(App_TaskCANSend, (void *)0, (OS_STK *)&AppTaskCANSendStk[APP_CFG_TASK_CAN_SEND_STK_SIZE - 1], APP_CFG_TASK_CAN_SEND_PRIO, APP_CFG_TASK_CAN_SEND_PRIO, (OS_STK *)&AppTaskCANSendStk[0], APP_CFG_TASK_CAN_SEND_STK_SIZE, (void *)0, OS_TASK_OPT_STK_CHK | OS_TASK_OPT_STK_CLR); #if (OS_TASK_NAME_SIZE > 10) OSTaskNameSet(APP_CFG_TASK_CAN_SEND_PRIO, "CAN Send", err); #endif }
Syntax Highlighting
[
Open in new window
]
Author Comments
none
Rating
4.32 / 8
76 Votes
http://codebin.yi.org/1238
page generated in 0.00 seconds