diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2016-02-23 09:31:25 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2016-02-23 09:31:25 +0000 |
commit | 430facf5652c09fee1d77ebad2fb1cca641de544 (patch) | |
tree | 1491d02fb14ef5bbd21ea1d464658a0332802d32 /os/common/abstractions/nasa-osal/include/osapi-os-timer.h | |
parent | 2240934707a4e434c76329ad3051a6ba5c09e299 (diff) | |
download | ChibiOS-430facf5652c09fee1d77ebad2fb1cca641de544.tar.gz ChibiOS-430facf5652c09fee1d77ebad2fb1cca641de544.tar.bz2 ChibiOS-430facf5652c09fee1d77ebad2fb1cca641de544.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8931 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/common/abstractions/nasa-osal/include/osapi-os-timer.h')
-rw-r--r-- | os/common/abstractions/nasa-osal/include/osapi-os-timer.h | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/os/common/abstractions/nasa-osal/include/osapi-os-timer.h b/os/common/abstractions/nasa-osal/include/osapi-os-timer.h new file mode 100644 index 000000000..8082c6227 --- /dev/null +++ b/os/common/abstractions/nasa-osal/include/osapi-os-timer.h @@ -0,0 +1,68 @@ +/* +** File: osapi-os-timer.h +** +** Copyright (c) 2004-2006, United States government as represented by the +** administrator of the National Aeronautics Space Administration. +** All rights reserved. This software was created at NASAs Goddard +** Space Flight Center pursuant to government contracts. +** +** This is governed by the NASA Open Source Agreement and may be used, +** distributed and modified only pursuant to the terms of that agreement. +** +** Author: Alan Cudmore - Code 582 +** +** Purpose: Contains functions prototype definitions and variable declarations +** for the OS Abstraction Layer, Timer API +** +** $Revision: 1.5 $ +** +** $Date: 2013/07/25 10:02:20GMT-05:00 $ +** +** $Log: osapi-os-timer.h $ +** Revision 1.5 2013/07/25 10:02:20GMT-05:00 acudmore +** removed circular include "osapi.h" +** Revision 1.4 2010/11/12 12:00:19GMT-05:00 acudmore +** replaced copyright character with (c) and added open source notice where needed. +** Revision 1.3 2010/02/01 12:38:34EST acudmore +** Added return code to OS_TimerAPIInit +** Revision 1.2 2008/08/26 13:52:52EDT apcudmore +** removed linux specific define +** Revision 1.1 2008/08/20 16:12:07EDT apcudmore +** Initial revision +** Member added to project c:/MKSDATA/MKS-REPOSITORY/MKS-OSAL-REPOSITORY/src/os/inc/project.pj +** +** +*/ + +#ifndef _osapi_timer_ +#define _osapi_timer_ + +/* +** Typedefs +*/ +typedef void (*OS_TimerCallback_t)(uint32 timer_id); + +typedef struct +{ + char name[OS_MAX_API_NAME]; + uint32 creator; + uint32 start_time; + uint32 interval_time; + uint32 accuracy; + +} OS_timer_prop_t; + + +/* +** Timer API +*/ +int32 OS_TimerAPIInit (void); + +int32 OS_TimerCreate (uint32 *timer_id, const char *timer_name, uint32 *clock_accuracy, OS_TimerCallback_t callback_ptr); +int32 OS_TimerSet (uint32 timer_id, uint32 start_msec, uint32 interval_msec); +int32 OS_TimerDelete (uint32 timer_id); + +int32 OS_TimerGetIdByName (uint32 *timer_id, const char *timer_name); +int32 OS_TimerGetInfo (uint32 timer_id, OS_timer_prop_t *timer_prop); + +#endif |