![Lattice Semiconductor LatticeMico32 Скачать руководство пользователя страница 117](http://html1.mh-extra.com/html/lattice-semiconductor/latticemico32/latticemico32_hardware-developer-user-manual_3843852117.webp)
C
REATING
C
USTOM
C
OMPONENTS
IN
L
ATTICE
M
ICO
S
YSTEM
:
Custom Component Example
LatticeMico32 Hardware Developer User Guide
111
In addition, the members of this structure must be initialized to the
appropriate values, which are provided when you generate the platform.
10. Specify the component’s data structure and initialization function for
software support, as shown in Figure 64.
11. Repeat the steps shown in Figure 64 to do the following:
Add b_addr as an “unsigned int” member that should contain the
component’s base address parameter, BASE_ADDRESS, as shown
in Figure 65.
Add name as a "const char *" member that should contain the
component's name parameter, InstanceName. This member helps
while registering the custom component with system software.
12. Add the C source file that should be compiled as part of the platform
library, as shown in Figure 66.
13. Add the device driver’s header file (.h), which is a standard header file that
can be included in a user application, as shown in Figure 67.
14. Click
DRC
to check for any errors.
15. Click
Save
to save the custom component.
Figure 64: Specifying Data Structure and Initialization Function