AT91RM3400-DK Atmel, AT91RM3400-DK Datasheet - Page 56

KIT DEV FOR AT91RM3400

AT91RM3400-DK

Manufacturer Part Number
AT91RM3400-DK
Description
KIT DEV FOR AT91RM3400
Manufacturer
Atmel
Series
AT91SAM Smart ARMr
Type
MCUr
Datasheets

Specifications of AT91RM3400-DK

Contents
Evaluation Board, Software and Documentation
Processor To Be Evaluated
AT91RM3400
Data Bus Width
32 bit
Interface Type
RS-232, USB
For Use With/related Products
AT91RM3400
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
Using a Service
Opening a Service
Overloading a Method
56
AT91RM3400
Method pointers in the service structure are initialized to the default methods defined in the
AT91 service. Other fields in the service structure are initialized to default values or with the
arguments of the function AT91F_Open_<Service>.
In summary, an application must know what the service structure is and where the function
AT91F_Open_<Service> is.
The default function AT91F_Open_<Service> may be redefined by the application or com-
prised in an application-defined function. See Section .
The entry point to a service is established by initializing the service structure. An open function
is associated with each service structure, except for the ROM Entry Service (see Section ).
Thus, only the functions AT91F_Open_<service> are visible from the user side. Access to
the service methods is made via function pointers in the service structure.
The function AT91F_Open_<service> has at least one argument: a pointer to the service
structure that must be allocated elsewhere. It returns a pointer to the base service structure
or a pointer to this service structure.
The function AT91F_Open_<service> initializes all data members and method pointers. All
function pointers in the service structure are set to the service’s functions.
The advantage of this method is to offer a single entry point for a service. The methods of a
service are initialized by the open function and each member can be overloaded.
Default methods are defined for all services provided in ROM. These methods may not be
adapted to a project requirement. It is possible to overload default methods by methods
defined in the project.
A me th o d i s a p o in te r t o a f u nc t io n . T h i s po i nt er i s i ni t i al i z ed b y t h e fu n c ti o n
AT91F_Open_<Service>. To overload one or several methods in a service, the function
pointer must be updated to the new method.
It is possible to overload just one method of a service or all the methods of a service. In this
latter case, the functionality of the service is user-defined, but still works on the same data
structure.
Note:
// Allocation of the service structure
AT91S_Pipe pipe;
// Opening of the service
AT91PS_Pipe pPipe = AT91F_OpenPipe(&pipe, …);
Calling the default function AT91F_Open_<Service> ensures that all methods and data are
initialized.
1790A–ATARM–11/03

Related parts for AT91RM3400-DK