PropWare  3.0.0.229
C++ objects and CMake build system for Parallax Propeller
timeTicks.c
1 /*
2  * @file timeTicks.c
3  *
4  * @author Andy Lindsay
5  *
6  * @version 0.85
7  *
8  * @copyright Copyright (C) Parallax, Inc. 2012. See end of file for
9  * terms of use (MIT License).
10  *
11  * @brief mark function source, see simpletools.h for documentation.
12  *
13  * @detail Please submit bug reports, suggestions, and improvements to
14  * this code to editor@parallax.com.
15  */
16 
17 
18 #include "simpletools.h"
19 
20 int ms;
21 int us;
24 int st_iodt;
27 
28 __attribute__((constructor)) // Flag for running at startup
29 void timeTicksSetup()
30 {
31  st_msTicks = CLKFREQ/1000;
32  st_usTicks = CLKFREQ/1000000;
33 
34  ms = st_msTicks;
35  us = st_usTicks;
36 
39  st_timeout = 250*st_msTicks;
40 }
41 
42 
st_msTicks
int st_msTicks
Propeller system clock ticks in 1 millisecond. Changing this value is not recommended because it can ...
Definition: timeTicks.c:22
us
int us
Propeller system clock ticks in 1 millisecond (us).
Definition: abcalibrate.c:36
st_timeout
int st_timeout
Clock ticks in a time increment used by pulse_in, pulse_out, and rc_time. Default value is the number...
Definition: timeTicks.c:25
simpletools.h
This library provides convenient functions for a variety of microcontroller I/O, timing,...
st_pauseTicks
int st_pauseTicks
Clock ticks in a time increment used by pause function. Default value is the number of system clock t...
Definition: timeTicks.c:26
CLKFREQ
#define CLKFREQ
Returns the current clock frequency.
Definition: propeller.h:46
st_usTicks
int st_usTicks
Propeller system clock ticks in 1 microsecond. Changing this value is not recommended because it can ...
Definition: timeTicks.c:23
st_iodt
int st_iodt
Clock ticks in a time increment used by pulse_in, pulse_out, and rc_time. Default value is the number...
Definition: timeTicks.c:24
ms
int ms
Propeller system clock ticks in 1 millisecond (ms).
Definition: timeTicks.c:20