Some fixes. Added void csleep(void);
This commit is contained in:
parent
33fb421d2a
commit
2458478835
|
@ -108,7 +108,7 @@ void tsleep_ms(int ms);
|
|||
Get 1/128 seconds ticks since midnight.
|
||||
*/
|
||||
|
||||
void tgetticks(void);
|
||||
int tgetticks(void);
|
||||
|
||||
/* int tiselapsed(int start, int ms);
|
||||
|
||||
|
@ -119,5 +119,14 @@ Returns 1 if ms is elapsed and 0 if it is not.
|
|||
|
||||
int tiselapsed(int start, int ms);
|
||||
|
||||
#endif
|
||||
/******* CPU *******/
|
||||
|
||||
/* void csleep(void);
|
||||
|
||||
Uses asm sleep instruction.
|
||||
Can be used to reduce battery usage of some loops.
|
||||
*/
|
||||
|
||||
void csleep(void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -104,11 +104,16 @@ void tsleep_ms(int ms) {
|
|||
_Sleep(ms);
|
||||
}
|
||||
|
||||
void tgetticks(void) {
|
||||
_RTC_GetTicks();
|
||||
int tgetticks(void) {
|
||||
return _RTC_GetTicks();
|
||||
}
|
||||
|
||||
int tiselapsed(int start, int ms) {
|
||||
return _RTC_Elapsed_ms(start, ms);
|
||||
}
|
||||
|
||||
/******* CPU *******/
|
||||
|
||||
void csleep(void) {
|
||||
__asm__("sleep");
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@ void tsleep_ms(int ms);
|
|||
Get 1/128 seconds ticks since midnight.
|
||||
*/
|
||||
|
||||
void tgetticks(void);
|
||||
int tgetticks(void);
|
||||
|
||||
/* int tiselapsed(int start, int ms);
|
||||
|
||||
|
@ -119,5 +119,14 @@ Returns 1 if ms is elapsed and 0 if it is not.
|
|||
|
||||
int tiselapsed(int start, int ms);
|
||||
|
||||
#endif
|
||||
/******* CPU *******/
|
||||
|
||||
/* void csleep(void);
|
||||
|
||||
Uses asm sleep instruction.
|
||||
Can be used to reduce battery usage of some loops.
|
||||
*/
|
||||
|
||||
void csleep(void);
|
||||
|
||||
#endif
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue