This was meant to be declared for 'boards' to use
Signed-off-by: Michel Pollet <buserror@gmail.com>
2 files changed:
* a minimum count of requested sleep microseconds are reached
* (low amounts cannot be handled accurately).
*/
-static inline uint32_t avr_pending_sleep_usec(avr_t * avr, avr_cycle_count_t howLong)
+uint32_t
+avr_pending_sleep_usec(
+ avr_t * avr,
+ avr_cycle_count_t howLong)
{
avr->sleep_usec += avr_cycles_to_usec(avr, howLong);
uint32_t usec = avr->sleep_usec;
void avr_callback_sleep_raw(avr_t * avr, avr_cycle_count_t howLong);
void avr_callback_run_raw(avr_t * avr);
+/**
+ * Accumulates sleep requests (and returns a sleep time of 0) until
+ * a minimum count of requested sleep microseconds are reached
+ * (low amounts cannot be handled accurately).
+ * This function is an utility function for the sleep callbacks
+ */
+uint32_t
+avr_pending_sleep_usec(
+ avr_t * avr,
+ avr_cycle_count_t howLong);
+
#ifdef __cplusplus
};
#endif