dRonin  adbada4
dRonin firmware
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pios_delay.h
Go to the documentation of this file.
1 
16 /*
17  * This program is free software; you can redistribute it and/or modify
18  * it under the terms of the GNU General Public License as published by
19  * the Free Software Foundation; either version 3 of the License, or
20  * (at your option) any later version.
21  *
22  * This program is distributed in the hope that it will be useful, but
23  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
24  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
25  * for more details.
26  *
27  * You should have received a copy of the GNU General Public License along
28  * with this program; if not, see <http://www.gnu.org/licenses/>
29  */
30 
31 #ifndef PIOS_DELAY_H
32 #define PIOS_DELAY_H
33 
34 /* Public Functions */
35 extern int32_t PIOS_DELAY_Init(void);
36 extern int32_t PIOS_DELAY_WaituS(uint32_t uS);
37 extern int32_t PIOS_DELAY_WaitmS(uint32_t mS);
38 extern uint32_t PIOS_DELAY_GetuS();
39 extern uint32_t PIOS_DELAY_GetuSSince(uint32_t t);
40 extern uint32_t PIOS_DELAY_GetuSExpired(uint32_t t);
41 extern uint32_t PIOS_DELAY_GetRaw();
42 extern uint32_t PIOS_DELAY_DiffuS(uint32_t raw);
43 extern uint32_t PIOS_DELAY_DiffuS2(uint32_t raw, uint32_t baseline);
44 
45 #endif /* PIOS_DELAY_H */
46 
uint32_t PIOS_DELAY_DiffuS(uint32_t raw)
Subtract raw time from now and convert to us.
Definition: pios_delay.c:159
uint32_t PIOS_DELAY_GetuS()
Query the Delay timer for the current uS.
Definition: pios_delay.c:173
uint32_t PIOS_DELAY_DiffuS2(uint32_t raw, uint32_t baseline)
Subrtact two raw times and convert to us.
Definition: pios_delay.c:164
uint32_t PIOS_DELAY_GetuSExpired(uint32_t t)
Calculates whether a given time has passed.
Definition: pios_delay.c:193
uint32_t PIOS_DELAY_GetuSSince(uint32_t t)
Calculate time in microseconds since a previous time.
Definition: pios_delay.c:183
int32_t PIOS_DELAY_Init(void)
Definition: pios_delay.c:98
int32_t PIOS_DELAY_WaitmS(uint32_t mS)
Definition: pios_delay.c:140
int32_t PIOS_DELAY_WaituS(uint32_t uS)
Definition: pios_delay.c:116
uint32_t PIOS_DELAY_GetRaw()
Get the raw delay timer, useful for timing.
Definition: pios_delay.c:153