PMC-Sierra PM5358 S/UNI 4x622 Power Screwdriver User Manual


 
PM5358 S/UNI-4x622 Driver Manual
Porting the S/UNI-4x622 Driver
Proprietary and Confidential to PMC-Sierra, Inc. 118
Document ID: PMC-2010419, Issue 1
Procedure 1: Porting Driver OS Extensions
The OS extensions encapsulate all OS specific services and data types used by the driver. The
suni4x622_rtos.h file contains data types and compiler-specific data-type definitions. It also
contains macros for OS specific services used by the OS extensions. These OS extensions
include:
Task management
Message queues
Events
Memory Management
In addition, you may need to modify functions that use OS specific services, such as utility and
interrupt-event handling functions. The
suni4x622_rtos.c file contains the utility and
interrupt-event handler functions that use OS specific services.
To port the driver’s OS extensions:
1. Modify the data types in
suni4x622_rtos.h. The number after the type identifies the
data-type size. For example, UINT4 defines a 4-byte (32-bit) unsigned integer. Substitute the
compiler types that yield the desired types as defined in this file.
2. Modify the OS specific services in
suni4x622_rtos.h. Redefine the following macros to
the corresponding system calls that your target system supports:
Service
Type
Macro Name Description
sysSuni4x622MemAlloc
Allocates the memory block
sysSuni4x622MemFree
Frees the memory block
sysSuni4x622MemSet
Set the memory value
Memory
sysSuni4x622MemCpy
Copies the memory block from src to dest
3. Modify the utilities and interrupt services that use OS specific services in the
suni4x622_rtos.c and the suni4x622_hw.c. These file contains the utility and
interrupt-event handler functions that use OS specific services. Refer to the function headers
in this file for a detailed description of each of the functions listed below:
Service Type Function Name Description
Timer
sysSuni4x622TimerSleep
Sets the task execution delay
in milliseconds