![]() |
Electronic Components Datasheet Search |
|
AT91RM9200-CJ-002 Datasheet(PDF) 96 Page - ATMEL Corporation |
|
|
AT91RM9200-CJ-002 Datasheet(HTML) 96 Page - ATMEL Corporation |
96 / 701 page ![]() 96 1768I–ATARM–09-Jul-09 AT91RM9200 14.2.1.3 Service Entry Point Each AT91 service, except for the ROM Entry Service (see 14.3.2 “ROM Entry Service” on page 99), defines a function named AT91F_Open_<Service>. It is the only entry point defined for a service. Even if the functions AT91F_Open_<Service> may be compared with object constructors, they do not act as constructors in that they initiate the service structure but they do not allocate it. Thus the customer application must allocate it. Example // Allocation of the service structure AT91S_Pipe pipe; // Opening of the service AT91PS_Pipe pPipe = AT91F_OpenPipe(&pipe, …); 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. 14.2.2 Using a Service 14.2.2.1 Opening a Service 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 14.3.2 “ROM Entry Service” on page 99). 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 ser- vice are initialized by the open function and each member can be overloaded. 14.2.2.2 Overloading a Method 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 m e thod is a po inter to a fun c tion. This pointer is in itialized by the functio 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. |
Similar Part No. - AT91RM9200-CJ-002 |
|
Similar Description - AT91RM9200-CJ-002 |
|
|
Link URL |
Privacy Policy |
ALLDATASHEET.NET |
Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
Family Site : ic2ic.com |
icmetro.com |