|
HP85 GPIB Disk Emulator
1.0
HP85GPIBDiskEmulator
|
timer functions More...
Go to the source code of this file.
Data Structures | |
| struct | TIMERS |
| user timer struct More... | |
Macros | |
| #define | MAX_TIMER_CNT 8 |
| Number of user timer tasks. More... | |
| #define | SYSTEM_TASK_TIC_NS ( 1000000000L / SYSTEM_TASK_HZ ) |
| System task in HZ. More... | |
| #define | SYSTEM_TASK_TIC_US ( 1000000L / SYSTEM_TASK_HZ ) |
| System task in Microseconds. More... | |
| #define | CLOCK_HZ SYSTEM_TASK_HZ |
| Clock task in HZ defined as System task. More... | |
| #define | CLOCK_TIC_NS SYSTEM_TASK_TIC_NS |
| Clock task in Nanoseconds defined as System Task. More... | |
| #define | CLOCK_TIC_US SYSTEM_TASK_TIC_US |
| CLock task in Microseconds defined as System Task. More... | |
Typedefs | |
| typedef uint16_t | clockid_t |
| type of clockid_t. More... | |
Functions | |
| MEMSPACE int | set_timers (void(*handler)(void), int timer) |
| MEMSPACE int | kill_timer (int timer) |
| Delete "Kill" one user timer task. More... | |
| MEMSPACE void | delete_all_timers (void) |
| Clear ALL user timer tasks. More... | |
| MEMSPACE void | subtract_timespec (ts_t *a, ts_t *b) |
| subtract a-= b timespec * structures. More... | |
| MEMSPACE char * | ts_to_str (ts_t *val) |
| MEMSPACE void | display_ts (ts_t *val) |
| timespec structure in seconds.nanoseconds. More... | |
| MEMSPACE void | clock_elapsed_begin (void) |
| Store current struct timespec in __clock_elapsed. More... | |
| MEMSPACE void | clock_elapsed_end (char *msg) |
| Subtract and display time difference from clock_elapesed_begin(). More... | |
| MEMSPACE void | clock_clear (void) |
| clear time and timezone to 0. More... | |
| MEMSPACE void | disable_timers (void) |
| Disable all timer tasks. More... | |
| MEMSPACE void | enable_timers (void) |
| Enable timer tasks. More... | |
| void | execute_timers (void) |
| Execute all user timers at SYSTEM_HZ rate. Called by system task. More... | |
| MEMSPACE void | clock_init (void) |
| void | clock_task (void) |
| 1000HZ timer task More... | |
| MEMSPACE void | init_timers (void) |
| Setup all timers tasksi and enable interrupts. More... | |
| MEMSPACE int | clock_getres (clockid_t clk_id, struct timespec *res) |
| MEMSPACE int | clock_settime (clockid_t clk_id, const struct timespec *ts) |
| MEMSPACE int | clock_gettime (clockid_t clk_id, struct timespec *ts) |
| MEMSPACE void | disable_system_task (void) |
| MEMSPACE void | enable_system_task (void) |
| MEMSPACE void | install_timers_isr (void) |
timer functions
This is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file timer.h.
| #define CLOCK_HZ SYSTEM_TASK_HZ |
| #define CLOCK_TIC_NS SYSTEM_TASK_TIC_NS |
| #define CLOCK_TIC_US SYSTEM_TASK_TIC_US |
| #define SYSTEM_TASK_TIC_NS ( 1000000000L / SYSTEM_TASK_HZ ) |
| #define SYSTEM_TASK_TIC_US ( 1000000L / SYSTEM_TASK_HZ ) |
| MEMSPACE void clock_clear | ( | ) |
clear time and timezone to 0.
Definition at line 222 of file timer.c.
Referenced by init_timers(), and main().
| MEMSPACE void clock_elapsed_begin | ( | ) |
Store current struct timespec in __clock_elapsed.
Definition at line 184 of file timer.c.
Referenced by gpib_timer_elapsed_begin().
| MEMSPACE void clock_elapsed_end | ( | char * | msg | ) |
Subtract and display time difference from clock_elapesed_begin().
| [in] | msg | User message to proceed Time display. |
Definition at line 200 of file timer.c.
Referenced by gpib_timer_elapsed_end().
| MEMSPACE void clock_init | ( | void | ) |
| void clock_task | ( | void | ) |
| MEMSPACE void delete_all_timers | ( | ) |
Clear ALL user timer tasks.
Definition at line 116 of file timer.c.
Referenced by init_timers().
| MEMSPACE void disable_system_task | ( | void | ) |
Referenced by disable_timers().
| MEMSPACE void disable_timers | ( | ) |
| MEMSPACE void enable_system_task | ( | void | ) |
Referenced by enable_timers().
| MEMSPACE void enable_timers | ( | ) |
Enable timer tasks.
Definition at line 251 of file timer.c.
Referenced by init_timers().
| void execute_timers | ( | ) |
| MEMSPACE void init_timers | ( | ) |
Setup all timers tasksi and enable interrupts.
See time.c
Definition at line 299 of file timer.c.
Referenced by main().
| MEMSPACE void install_timers_isr | ( | void | ) |
Referenced by init_timers().
| MEMSPACE int kill_timer | ( | int | timer | ) |
| MEMSPACE int set_timers | ( | void(*)(void) | handler, |
| int | timer | ||
| ) |
subtract a-= b timespec * structures.
| [in] | a | timespec struct. |
| [in] | b | timespec struct. |
Definition at line 134 of file timer.c.
Referenced by clock_elapsed_end().
Definition at line 154 of file timer.c.
Referenced by clock_elapsed_end(), and display_ts().
1.8.17