RAM 6.0 BUX II Series Guía de usuario Pagina 41

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 189
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 40
2 Overview of a BSP
2.3 Components of a BSP
33
2
development effort. The following pages describe the initial code for each required
routine, and the file in which it is usually included.
sysBspRev( )
The routine sysBspRev( ) is identical in all BSPs. This routine can be taken directly
from the reference or template BSP and does not require modification.
Timer Driver Routines
Timer driver routines include the following:
There are several timer drivers provided by Wind River. Files for these drivers are
located in the target/src/drv/timer directory. If one of the existing timer drivers
works for your target board, your sysLib.c file can simply include the appropriate
file from the timer directory. For example, the MIPS R4000 processor includes an
on-chip timer. This timer driver is provided in
target/src/drv/timer/mipsR4kTimer.c. If your board uses this processor, your
sysLib.c file can include the driver as follows:
#include "timer/mipsR4kTimer.c" /* system timer */
In some cases, you may need to include both a header file from target/h/drv/timer
and a source file from target/src/drv/timer. Check the target/h/drv/timer directory
to see whether a header file for your driver is available.
If a standard timer driver is not provided for your target hardware, you may be
able to copy an existing timer driver file to the BSP directory and make minor
modifications. If you do this, it is wise to change the file name and routine names
to avoid confusion. For example, some BSPs for ARM processors started with the
ambaTimer.c file and renamed it as the ixm1200Timer.c file. Be sure to document
the name of the original driver in the source file.
In rare situations, you may need to create a custom sysTimer.c file. If this is the case
for your BSP, you can copy routine prototypes for the sysClk*() routines from any
of the existing timer drivers in target/src/drv/timer.
sysClkConnect( )
sysClkDisable( )
sysClkEnable( )
sysClkInt( )
sysClkRateGet( )
sysClkRateSet( )
Vista de pagina 40
1 2 ... 36 37 38 39 40 41 42 43 44 45 46 ... 188 189

Comentarios a estos manuales

Sin comentarios