- Reworked the connection object and the IO system
- Reworked the support for TRICS - Added a second generation motor
This commit is contained in:
11
devser.c
11
devser.c
@ -217,7 +217,13 @@ void DevKill(DevSer *devser) {
|
||||
}
|
||||
}
|
||||
|
||||
void DevQueue(DevSer *devser, void *actionData, DevPrio prio,
|
||||
void DevDisconnect(DevSer *devser){
|
||||
if(devser->asyncConn){
|
||||
AsconDisconnect(devser->asyncConn);
|
||||
}
|
||||
}
|
||||
|
||||
int DevQueue(DevSer *devser, void *actionData, DevPrio prio,
|
||||
DevActionHandler hdl, DevActionMatch *matchFunc,
|
||||
DevKillActionData *killFunc) {
|
||||
DevAction *action, **ptr2Last;
|
||||
@ -228,13 +234,14 @@ void DevQueue(DevSer *devser, void *actionData, DevPrio prio,
|
||||
ptr2Last = &devser->actions;
|
||||
for (action = devser->actions; action != NULL && action->prio >= prio; action = action->next) {
|
||||
if (action->hdl == hdl && matchFunc(actionData, action->data)) {
|
||||
return; /* there is already an identical action */
|
||||
return 0; /* there is already an identical action */
|
||||
}
|
||||
ptr2Last = &action->next;
|
||||
}
|
||||
new = DevNewAction(actionData, hdl, killFunc, prio);
|
||||
new->next = action;
|
||||
*ptr2Last = new;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int DevUnschedule(DevSer *devser, void *actionData,
|
||||
|
Reference in New Issue
Block a user