Visible to Intel only — GUID: mwh1416946760162
Ixiasoft
Visible to Intel only — GUID: mwh1416946760162
Ixiasoft
8. Developing Device Drivers for the Hardware Abstraction Layer
This chapter also describes how to develop software packages for use with HAL board support packages (BSPs). The process of integrating a software package with the HAL is nearly identical with the process for integrating a device driver.
Confine direct interaction with the hardware to device driver code. In general, the best practice is to keep most of your program code free of low-level access to the hardware. Wherever possible, use the high-level HAL application program interface (API) functions to access hardware. This makes your code more consistent and more portable to other Nios® II systems that might have different hardware configurations.
When you create a new driver, you can integrate the driver with the HAL framework at one of the following two levels:
- Integration in the HAL API
- Peripheral-specific API
Section Content
Driver Integration in the HAL API
The HAL Peripheral-Specific API
Preparing for HAL Driver Development
Development Flow for Creating Device Drivers
Nios II Hardware Design Concepts
Accessing Hardware
Creating Embedded Drivers for HAL Device Classes
Integrating a Device Driver in the HAL
Creating a Custom Device Driver for the HAL
Reducing Code Footprint in HAL Embedded Drivers
HAL Namespace Allocation
Overriding the HAL Default Device Drivers