HP85 GPIB Disk Emulator
1.0
HP85GPIBDiskEmulator
|
Go to the documentation of this file.
29 #define MAX_TIMER_CNT 8
37 void (*user_timer_handler)(void);
42 #ifndef SYSTEM_TASK_HZ
43 #error #define SYSTEM_TASK_HZ 1000L
47 #define SYSTEM_TASK_TIC_NS ( 1000000000L / SYSTEM_TASK_HZ )
48 #define SYSTEM_TASK_TIC_US ( 1000000L / SYSTEM_TASK_HZ )
52 #define CLOCK_HZ SYSTEM_TASK_HZ
53 #define CLOCK_TIC_NS SYSTEM_TASK_TIC_NS
55 #define CLOCK_TIC_US SYSTEM_TASK_TIC_US
uint16_t clockid_t
type of clockid_t.
MEMSPACE void enable_timers(void)
Enable timer tasks.
MEMSPACE int clock_settime(clockid_t clk_id, const struct timespec *ts)
MEMSPACE void disable_timers(void)
Disable all timer tasks.
MEMSPACE char * ts_to_str(ts_t *val)
MEMSPACE int kill_timer(int timer)
Delete "Kill" one user timer task.
MEMSPACE void subtract_timespec(ts_t *a, ts_t *b)
subtract a-= b timespec * structures.
uint16_t clockid_t
type of clockid_t.
MEMSPACE int clock_gettime(clockid_t clk_id, struct timespec *ts)
MEMSPACE void disable_system_task(void)
MEMSPACE void clock_init(void)
void execute_timers(void)
Execute all user timers at SYSTEM_HZ rate. Called by system task.
MEMSPACE void display_ts(ts_t *val)
timespec structure in seconds.nanoseconds.
MEMSPACE int clock_getres(clockid_t clk_id, struct timespec *res)
MEMSPACE void init_timers(void)
Setup all timers tasksi and enable interrupts.
MEMSPACE void clock_clear(void)
clear time and timezone to 0.
MEMSPACE void install_timers_isr(void)
MEMSPACE void clock_elapsed_end(char *msg)
Subtract and display time difference from clock_elapesed_begin().
void clock_task(void)
1000HZ timer task
MEMSPACE int set_timers(void(*handler)(void), int timer)
MEMSPACE void enable_system_task(void)
MEMSPACE void delete_all_timers(void)
Clear ALL user timer tasks.
MEMSPACE void clock_elapsed_begin(void)
Store current struct timespec in __clock_elapsed.