Microchip® Advanced Software Framework

tickless.c File Reference

FreeRTOS demo application tick setup function and tickless function.

Copyright (c) 2013-2018 Microchip Technology Inc. and its subsidiaries.

#include <asf.h>
#include <conf_demo.h>

Macros

Timer Constants
#define TIMER_HZ   ( configCPU_CLOCK_HZ )
 Frequency of timer. More...
 
#define TIMER_RELOAD_VALUE_ONE_TICK   ( TIMER_HZ / configTICK_RATE_HZ )
 Value per os tick of timer. More...
 
#define TIMER_MAX_COUNT   ( 0xffffffff )
 Maximum value of timer. More...
 
#define TIMER_MAX_POSSIBLE_SUPPRESSED_TICKS   ( TIMER_MAX_COUNT / TIMER_RELOAD_VALUE_ONE_TICK )
 Maximum possible suppressed ticks with timer. More...
 

Functions

void vPortSuppressTicksAndSleep (TickType_t xExpectedIdleTime)
 

Global instance and prototypes

static struct tc_module tc
 Timer instance. More...
 
bool volatile tickless_enable = false
 Global variable to control tickless operation. More...
 
bool volatile tickless_mode = false
 
void xPortSysTickHandler (void)
 External declaration of freeRTOS SysTick handler. More...
 
void vPortSetupTimerInterrupt (void)
 Function for setting up timer. More...
 
static void empty_callback (struct tc_module *const module_inst)
 Prototype for empty_callback for sleep timer. More...