00001 /********************************************************************************* 00002 00003 Copyright 2006-2008 MakingThings 00004 00005 Licensed under the Apache License, 00006 Version 2.0 (the "License"); you may not use this file except in compliance 00007 with the License. You may obtain a copy of the License at 00008 00009 http://www.apache.org/licenses/LICENSE-2.0 00010 00011 Unless required by applicable law or agreed to in writing, software distributed 00012 under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 00013 CONDITIONS OF ANY KIND, either express or implied. See the License for 00014 the specific language governing permissions and limitations under the License. 00015 00016 *********************************************************************************/ 00017 00018 /* 00019 timer.h 00020 00021 MakingThings 00022 */ 00023 00024 #ifndef FASTTIMER_H 00025 #define FASTTIMER_H 00026 00027 int FastTimer_SetActive( bool active ); 00028 int FastTimer_GetActive( void ); 00029 00030 typedef struct FastTimerEntryS 00031 { 00032 void (*callback)( int id ); 00033 short id; 00034 int timeCurrent; 00035 int timeInitial; 00036 bool repeat; 00037 struct FastTimerEntryS* next; 00038 } FastTimerEntry; 00039 00040 void FastTimer_InitializeEntry( FastTimerEntry* fastTimerEntry, void (*timer_callback)( int id ), int id, int timeUs, bool repeat ); 00041 void FastTimer_SetTime( FastTimerEntry* timerEntry, int timeUs ); 00042 00043 int FastTimer_Set( FastTimerEntry* fastTimerEntry ); 00044 int FastTimer_Cancel( FastTimerEntry* fastTimerEntry ); 00045 00046 void DisableFIQFromThumb( void ); 00047 void EnableFIQFromThumb( void ); 00048 00049 #endif
The Make Controller Kit is an open source project maintained by MakingThings.
MakingThings code is released under the Apache 2.0 license.
Bug tracker, development wiki and status can be found at http://dev.makingthings.com.
This document was last updated on 18 May 2009.