Specifications

int alt_fs_reg (alt_dev* dev)
This function takes a single input argument, which is the device structure to register. A negative return
value indicates that the file system cannot be registered.
After a file subsystem is registered with the HAL file system, you can access it through the HAL API and
the ANSI C standard library. The mount point for the file subsystem is the name specified in the alt_dev
structure.
For more information, refer to the "Developing Programs Using the Hardware Abstraction Layer" chapter
of the Nios II Software Developer’s Handbook.
Related Information
Developing Device Drivers for the Hardware Abstraction Layer
Timer Device Drivers
System Clock Driver
A system clock device model requires a driver to generate the periodic clock tick. There can be only one
system clock driver in a system. You implement a system clock driver as an interrupt service routine (ISR)
for a timer peripheral that generates a periodic interrupt. The driver must provide periodic calls to the
following function:
void alt_tick (void)
The expectation is that alt_tick() is called in exception context.
To register the presence of a system clock driver, call the following function:
int alt_sysclk_init (alt_u32 nticks)
The input argument nticks is the number of system clock ticks per second, which is determined by your
system clock driver. The return value of this function is zero on success, and nonzero otherwise.
For more information about writing interrupt service routines, refer to the "Exception Handling" chapter
of the Nios II Software Developer’s Handbook.
Related Information
Exception Handling on page 8-1
Timestamp Driver
A timestamp driver provides implementations for the three timestamp functions:
alt_timestamp_start(), alt_timestamp(), and alt_timestamp_freq(). The system can only have
one timestamp driver.
For more information about using these functions, refer to the "Developing Programs Using the
Hardware Abstraction Layer" chapter of the Nios II Software Developer’s Handbook.
For more information about using these functions, refer to the "HAL API Reference" chapter of the Nios II
Software Developer’s Handbook.
Related Information
HAL API Reference on page 14-1
Developing Device Drivers for the Hardware Abstraction Layer
7-8
Timer Device Drivers
NII5V2
2015.05.14
Altera Corporation
Developing Device Drivers for the Hardware Abstraction Layer
Send Feedback