main.c
Default mainpagegetting-started-projectmain.c
Description Overview
Methods Brief description
 ConfigureButtons Configures the pushbuttons to generate interrupts when pressed.
 ConfigureLeds Configures LEDs #1 and #2 (cleared by default).
 ConfigurePit Configure the periodic interval timer to generate an interrupt every millisecond.
 ConfigureTc Configure Timer Counter 0 to generate an interrupt every 250ms.
 ISR_Bp1 Interrupt handler for pushbutton#1. Starts or stops LED#1.
 ISR_Bp2 Interrupt handler for pushbutton#2. Starts or stops LED#2 and TC0.
 ISR_Pit Handler for PIT interrupt. Increments the timestamp counter.
 ISR_Tc0 Interrupt handler for TC0 interrupt. Toggles the state of LED#2.
 main Application entry point.
 Wait Waits for the given number of milliseconds (using the timestamp generated by the PIT).
Defines  
 DEBOUNCE_TIME Delay for pushbutton debouncing (in milliseconds).
 PIT_PERIOD PIT period value in µseconds.
Attributes  
 pinPB1 Pushbutton #1 pin instance.
 pinPB2 Pushbutton #1 pin instance.
 pLedStates Indicates the current state (on or off) for each LED.
 timestamp Global timestamp in milliseconds since start of application.