02.03.2014 Views

BSP Developer's Guide

BSP Developer's Guide

BSP Developer's Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

VxWorks 5.5<br />

<strong>BSP</strong> Developer’s <strong>Guide</strong><br />

pMblk<br />

Passes a pointer to an mBlk structure containing the data you want to send.<br />

For more information on how to setup an mBlk, see H.3.1 Setting Up and Using<br />

a Memory Pool for Receive and Transmit Buffers, p.276.<br />

Starting a Stopped but Loaded Driver: endStart( )<br />

Your endStart( ) entry point should do whatever is necessary to make the driver<br />

active. For example, it should register your device driver’s interrupt service<br />

routine.Your endStart( ) must take the following form:<br />

Status endStart<br />

(<br />

void* pCookie /* pointer to device-identifying END_OBJ structure */<br />

)<br />

This function should return OK or ERROR. If an error occurs, it should set errno.<br />

The parameters are:<br />

pCookie<br />

Passes a pointer to the END_OBJ structure returned by endLoad( ).<br />

However, your endStart( ) should probably include this pointer as a<br />

parameter to the sysIntConnect( ) call that it uses to register your ISR. Your<br />

ISR might not have any direct use for this END_OBJ pointer, but it should pass<br />

it in to the driver entry point that handles task-level processing for packet<br />

reception.<br />

When it comes time to pass the packet up to the MUX, your driver must call<br />

the MUX-supplied function referenced in pCookie.receiveRtn. See Providing<br />

Network Device Abstraction: END_OBJ, p.283.<br />

Stopping the Driver Without Unloading It: endStop( )<br />

Your endStop( ) entry point can assume that the driver is already loaded and that<br />

somebody has already called endLoad( ). Within your endStop( ), you should do<br />

whatever is necessary to make the driver inactive without actually unloading the<br />

driver. Your endStop( ) must take the following form:<br />

STATUS endStop<br />

(<br />

void* pCookie /* pointer to a device-identifying END_OBJ structure */<br />

)<br />

294

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!