View Source grisp_rtems (grisp v2.8.0)
GRiSP RTEMS functions.
NIF mappings to RTEMS functions.
Summary
Functions
Gets the number of clock ticks per second configured for the application.
Gets the number of clock ticks since some time point during the system initialization or the last overflow of the clock tick counter.
Gets the time of day associated with the current CLOCK_REALTIME
.
Sets the CLOCK_REALTIME
to the time of day.
Perform a raw pwrite
syscall to a device.
Unmounts the file system instance at the specified mount path.
Types
-type time_of_day() :: {calendar:datetime(), Ticks :: non_neg_integer()}.
Functions
-spec clock_get_ticks_per_second() -> integer().
Gets the number of clock ticks per second configured for the application.
Reference: rtems_clock_get_ticks_per_second
-spec clock_get_ticks_since_boot() -> integer().
Gets the number of clock ticks since some time point during the system initialization or the last overflow of the clock tick counter.
Reference: rtems_clock_get_ticks_since_boot
-spec clock_get_tod() -> time_of_day().
Gets the time of day associated with the current CLOCK_REALTIME
.
Reference: rtems_clock_get_tod
-spec clock_set(time_of_day()) -> integer().
Sets the CLOCK_REALTIME
to the time of day.
Reference: rtems_clock_set
-spec pwrite(binary() | iolist(), binary() | iolist(), integer()) -> {ok, integer()} | {error, atom(), list()}.
Perform a raw pwrite
syscall to a device.
The function is approximately equivalent to the C code:
fd = open(device_path, O_RDWR);
pwrite(fd, buffer.data, buffer.size, offset);
Reference: pwrite
Unmounts the file system instance at the specified mount path.
Reference: rtems_unmount