![ST STM32CubeH7 Скачать руководство пользователя страница 16](http://html1.mh-extra.com/html/st/stm32cubeh7/stm32cubeh7_user-manual_1356075016.webp)
Kernel description
UM2222
16/76
UM2222 Rev 2
Each module provides the following functionalities and properties:
•
Icon and graphical component structure
•
Method to startup the module
•
Method to close down safely the module (such as Hot unplug for MS flash disk)
•
Method to manage low-power modes (optional)
•
Application task
•
Module background process (optional)
•
Remote control method (optional)
•
Specific configuration
•
Error management
The modules can be added to the demonstration and use the common kernel resources.
The code below shows how to add a module to the demonstration.
A module is a set of function and data structures, which are defined in a global data
structure, and provide all the information and pointers to specific methods and functions to
the kernel. This later checks the integrity and the validity of the module and inserts its
structure into a module table. A unique identifier (UID) identifies each module. When two
modules have the same UID, the kernel rejects the second one.
The module structure is defined as follows:
•
id: unique module identifier
•
name: pointer to module name
•
open_icon: pointer to module icon frames (array of bitmap format moving on the right)
•
close_icon: pointer to module icon (array of bitmap format moving on the left)
•
startup: the function creating the module frame and control buttons
•
DirectOpen: reserved for feature use.