IOFWBufferFillIsochPort.cpp [plain text]
#import "IOFWBufferFillIsochPort.h"
#undef super
#define super IOFWIsochPort
OSDefineMetaClassAndAbstractStructors( IOFWBufferFillIsochPort, IOFWIsochPort )
bool
IOFWBufferFillIsochPort :: init(
IOFireWireBus & bus,
IOByteCount expectedBytesPerSecond,
UInt32 interruptMicroseconds,
PacketProc packetProc,
OSObject * target )
{
if ( ! super::init() )
{
return false ;
}
fBytesPerSecond = expectedBytesPerSecond ;
fIntUSec = interruptMicroseconds ;
fPacketProc = packetProc ;
fTarget = target ;
IOByteCount bytesNeeded = expectedBytesPerSecond * interruptMicroseconds * 2 / 1000000 ;
fBackingStore = new UInt8[ bytesNeeded ] ;
if ( !fBackingStore )
{
return false ;
}
unsigned bytesPerDescriptor = expectedBytesPerSecond * interruptMicroseconds / 2000000 ;
unsigned descriptorsNeeded = bytesNeeded / bytesPerDescriptor ;
return true ;
}
void
IOFWBufferFillIsochPort :: free()
{
delete[] fBackingStore ;
super::free() ;
}
IOReturn
IOFWBufferFillIsochPort :: getSupported (
IOFWSpeed & maxSpeed,
UInt64 & chanSupported)
{
maxSpeed = kFWSpeedMaximum;
chanSupported = ~(UInt64)0;
return kIOReturnSuccess;
}
unsigned int
IOFWBufferFillIsochPort :: gotIsoch( IOVirtualRange packets[], unsigned int maxPacketCount )
{
packets = NULL ;
return 0 ;
}
unsigned int
IOFWBufferFillIsochPort :: gotIsochAll( IOVirtualRange packets[], unsigned int maxPacketCount )
{
packets = NULL ;
return 0 ;
}
void
IOFWBufferFillIsochPort :: pushIsoch()
{
}
AbsoluteTime
IOFWBufferFillIsochPort :: getInterruptTime()
{
return AbsoluteTime() ;
}