📄 gio_cbck.c
字号:
/*
* Copyright 2003 by Texas Instruments Incorporated.
* All rights reserved. Property of Texas Instruments Incorporated.
* Restricted rights to use, duplicate or disclose this code are
* granted through contract.
*
*/
/* "@(#) DDK 1.10.00.23 07-02-03 (ddk-b12)" */
/*
* ======== gio_cbck.c ========
*
*/
#include <std.h>
#include <gio.h>
#include <iom.h>
#include <que.h>
#include <_gio.h>
/*
* ======== _GIO_iomCallback ========
* This function is called by the mini-driver when I/O completes.
*/
Void _GIO_iomCallback(Ptr cbArg, IOM_Packet *packet)
{
GIO_Handle gioChan = (GIO_Handle)cbArg;
GIO_AppCallback *appCallback = (GIO_AppCallback *)packet->misc;
Int status;
Ptr addr;
Uns size;
if (appCallback == NULL) {
/* this was a synchronous call -- post semaphore (or alternate sync) */
GIO->SEMPOST(gioChan->syncObj);
}
else {
status = packet->status;
addr = packet->addr;
size = packet->size;
/* recycle packet back onto free list */
QUE_put(&gioChan->freeList, packet);
/* callback into application with status and size */
(*appCallback->fxn)(appCallback->arg, status, addr, size);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -