Visible to Intel only — GUID: hxj1642993206447
Ixiasoft
Visible to Intel only — GUID: hxj1642993206447
Ixiasoft
9.3.2. MicroC/OS-II Device Drivers
In addition to the HAL directory, a component can optionally provide a UCOSII directory that contains code specific to the MicroC/OS-II environment. Similar to the HAL directory, the UCOSII directory contains inc and src subdirectories. When you create a MicroC/OS-II project, the BSP Editor copies the include and source directories for a given peripheral to your BSP subdirectory. These include and source directories are added to the search path for the project.
You can use the UCOSII directory to provide code that is used only in a multi-threaded environment. Other than these additional search directories, the mechanism for providing MicroC/OS-II device drivers is identical to the process for any other device driver.
The HAL system initialization process calls the MicroC/OS-II function OSInit() before alt_sys_init(), which instantiates and initializes each device in the system. Therefore, the complete MicroC/OS-II API is available to device drivers, although the system is still running in single-threaded mode until the program calls OSStart() from within main().