-
Enable
- Enables the bean - the internal clocks are counted.
ANSIC prototype: byte Enable(void)
- Return value:byte - Error code, possible codes:
ERR_OK - OK
ERR_SPEED - This device does not work in the active speed mode
-
Disable
- Disables the bean - the internal clocks are not counted.
ANSIC prototype: byte Disable(void)
- Return value:byte - Error code, possible codes:
ERR_OK - OK
ERR_SPEED - This device does not work in the active speed mode
-
Reset
- Clears the counter.
ANSIC prototype: byte Reset(void)
- Return value:byte - Error code, possible codes:
ERR_OK - OK
ERR_SPEED - This device does not work in the active speed mode
-
GetTicks16
- Returns the number (as a 16-bit unsigned integer) of main oscillator (Xtal) ticks since the last reset.
ANSIC prototype: byte GetTicks16(word *Ticks)
- Ticks: Pointer to word - A pointer to the returned 16-bit value in Xtal ticks
- Return value:byte - Error code, possible codes:
ERR_OK - OK
ERR_SPEED - This device does not work in the active speed mode
ERR_OVERFLOW - Software counter overflow
ERR_MATH - Overflow during evaluation
-
GetTicks32
- Returns the number (as a 32-bit unsigned integer) of main oscillator (Xtal) ticks since the last reset.
ANSIC prototype: byte GetTicks32(dword *Ticks)
- Ticks: Pointer to dword - A pointer to the returned 32-bit value in Xtal ticks
- Return value:byte - Error code, possible codes:
ERR_OK - OK
ERR_SPEED - This device does not work in the active speed mode
ERR_OVERFLOW - Software counter overflow
ERR_MATH - Overflow during evaluation
-
GetTicks64
- Returns the number (as a 64-bit unsigned integer) of main oscillator (Xtal) ticks since the last reset.
ANSIC prototype: byte GetTicks64(dlong *Ticks)
- Ticks: Pointer to dlong - A pointer to the returned 64-bit value in Xtal ticks
- Return value:byte - Error code, possible codes:
ERR_OK - OK
ERR_SPEED - This device does not work in the active speed mode
ERR_OVERFLOW - Software counter overflow
ERR_MATH - Overflow during evaluation
-
GetTimeUS
- Returns the time (as a 16-bit unsigned integer) in microseconds since the last resetting after the last reset.
ANSIC prototype: byte GetTimeUS(word *Time)
- Time: Pointer to word - A pointer to the returned 16-bit value in microseconds
- Return value:byte - Error code, possible codes:
ERR_OK - OK
ERR_SPEED - This device does not work in the active speed mode
ERR_OVERFLOW - Software counter overflow
ERR_MATH - Overflow during evaluation
-
GetTimeMS
- Returns the time (as a 16-bit unsigned integer) in milliseconds since the last resetting after the last reset.
ANSIC prototype: byte GetTimeMS(word *Time)
- Time: Pointer to word - A pointer to the returned 16-bit value in milliseconds
- Return value:byte - Error code, possible codes:
ERR_OK - OK
ERR_SPEED - This device does not work in the active speed mode
ERR_OVERFLOW - Software counter overflow
ERR_MATH - Overflow during evaluation
-
GetTimeSec
- Returns the time (as a 16-bit unsigned integer) in seconds since the last resetting after the last reset.
ANSIC prototype: byte GetTimeSec(word *Time)
- Time: Pointer to word - A pointer to the returned 16-bit value in seconds
- Return value:byte - Error code, possible codes:
ERR_OK - OK
ERR_SPEED - This device does not work in the active speed mode
ERR_OVERFLOW - Software counter overflow
ERR_MATH - Overflow during evaluation
-
GetTimeReal
- Returns the time in seconds since the last resetting as a real (floating point) number. To use this method the compiler have to support floating point operations.
ANSIC prototype: byte GetTimeReal(float *Time)
- Time: Pointer to float - A pointer to the returned floating point value in seconds
- Return value:byte - Error code, possible codes:
ERR_OK - OK
ERR_SPEED - This device does not work in the active speed mode
ERR_OVERFLOW - Software counter overflow
ERR_MATH - Overflow during evaluation
Note: Some methods can be implemented as macros.