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 />

To set appropriate values for these constants, consider the following:<br />

END_LOAD_FUNC<br />

Specify the name of your driver’s endLoad( ) entry point. For example, if your<br />

driver’s endLoad( ) entry point is ln7990EndLoad( ), you would edit config.h<br />

to include the line:<br />

#define END_LOAD_FUNC ln7990EndLoad<br />

END_LOAD_STRING<br />

Specify the initialization string passed into muxDevLoad( ) as the initString<br />

parameter.<br />

You must also edit the definition of endTbl (a table in configNet.h that specifies<br />

the ENDs included in the image) to include the following:<br />

END_TBL_ENTRY endTbl<br />

{<br />

{ 0, LOAD_FUNC_0, LOAD_STRING_0, <strong>BSP</strong>_0, FALSE},<br />

{ 1, LOAD_FUNC_1, LOAD_STRING_1, <strong>BSP</strong>_1, FALSE},<br />

{ 0, END_TBL_END, 0, NULL},<br />

};<br />

The first number in each table entry specifies the unit number for the device. The<br />

first entry in the example above specifies a unit number of 0. Thus, the device it<br />

loads is deviceName0. The FALSE at the end of each entry indicates that the entry<br />

has not been processed. After the system successfully loads a driver, it changes this<br />

value to TRUE in the run-time version of this table. To prevent the system from<br />

automatically loading your driver, set this value to TRUE.<br />

Finally, you must edit your <strong>BSP</strong>’s config.h file to define INCLUDE_END. This tells<br />

the build process to include the END/MUX interface. A this point, you are ready<br />

to rebuild VxWorks to include your new drivers. When you boot this rebuilt image,<br />

it calls muxDevLoad( ) for each device specified in the table in the order listed. 1<br />

1. For a description of the parameters to muxDevLoad( ), see the appropriate reference entry.<br />

222

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

Saved successfully!

Ooh no, something went wrong!