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

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 189
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 113
VxWorks
BSP Developer’s Guide, 6.0
106
Serial Drivers
The old style of serial drivers, those used before VxWorks 5.3, reside in the
target/src/drv/serial directory.
To manage information about a serial device, sysLib.c uses a device descriptor.
This device descriptor also encapsulates board-specific information. For example,
it typically includes the frequency of the clock and the addresses of the registers,
although the details are dictated by the device in question. In sysLib.c, the serial
device descriptor is declared outside the routine definitions as:
TY_CO_DEV tyCoDv [NUM_TTY]; /* structure for serial ports */
This array is initialized at run-time in sysHwInit( ). The TY_CO_DEV structure is
defined in the device header file (for example, target/h/drv/serial/z8530.h).
Timer
The generic timer drivers reside in the target/src/drv/timer directory. The
templateTimer.c template file is included in this directory. When writing a timer
driver, base the driver on this template file, then modify the BSP sysLib.c file to
include the driver as needed. If the BSP can only access a single timer, the BSP must
support the system clock and not the auxiliary clock. This means that
sysAuxClkConnect( ) must return
ERROR.
The following macros are used for parameter checking in VxWorks timer drivers,
and must be defined in each BSP’s bspname.h file:
SYS_CLK_RATE_MIN
Defines the minimum rate at which the system clock can run. Unless hardware
constraints dictate otherwise,
SYS_CLK_RATE_MIN must be less than or equal
to 60 Hz.
SYS_CLK_RATE_MAX
Defines the maximum rate at which the system clock can run. Unless hardware
constraints dictate otherwise,
SYS_CLK_RATE_MAX must be greater than or
equal to 60 Hz.
NOTE: These serial drivers are provided for backward compatibility with
VxWorks 5.2 and earlier. All current generation BSPs should use SIO drivers
instead.
Vista de pagina 113
1 2 ... 109 110 111 112 113 114 115 116 117 118 119 ... 188 189

Comentarios a estos manuales

Sin comentarios