gio_cbck.c
来自「DSP/BIOS Driver Developer Kit 1.11 The 」· C语言 代码 · 共 51 行
C
51 行
/*
* 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.11.00.00 11-04-03 (ddk-b13)" */
/*
* ======== 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 + =
减小字号Ctrl + -
显示快捷键?