Visible to Intel only — GUID: mwh1416946866702
Ixiasoft
Visible to Intel only — GUID: mwh1416946866702
Ixiasoft
8.10.2.2. Using Macros
- ALT_DRIVER_READ(instance, buffer, len, flags)
- ALT_DRIVER_WRITE(instance, buffer, len, flags)
- ALT_DRIVER_IOCTL(instance, req, arg)
These macros are defined in < Nios® II EDS install path>/components/altera_hal/HAL/inc/sys/alt_driver.h.
These macros, together with the system-specific macros that the Nios® II SBT creates in system.h, generate calls to your driver functions. For example, with lightweight drivers turned on, printf() calls the HAL write() function, which directly calls your driver’s <component class> _write() function, bypassing file descriptors.
You can enable ALT_USE_DIRECT_DRIVERS in a BSP with the hal.enable_lightweight_device_driver_api BSP setting.
For more information, refer to the " Nios® II Software Build Tools Reference" chapter.