SAM3S8/SD8 Software Package: examples/wdg_irq/main.c File Reference

SAM3S8/SD8 Software Package 1.2
Defines | Functions | Variables

# main.c File Reference

`#include "board.h"`
`#include <stdbool.h>`
`#include <stdio.h>`

Go to the source code of this file.

## Defines

#define | LED_ID 1
#define | BLINK_PERIOD 300
#define | WDT_PERIOD 3000
#define | WDT_RESTART_PERIOD 2000

## Functions

void | SysTick_Handler (void)
| Handler for Sytem Tick interrupt.
void | WDT_IrqHandler (void)
| Handler for watchdog interrupt.
int | main (void)
| Application entry point for wdg_irq example.

## Variables

const Pin | pinPB1 = PIN_PUSHBUTTON_1
volatile bool | button1Evt = false
bool | systickEvt = false
volatile uint32_t | gSystick = 0

## Detailed Description

This file contains all the specific code for the wdg_irq example.

Definition in file main.c.

## Define Documentation

#define BLINK_PERIOD 300

LED blink time, in ms

Definition at line 111 of file main.c.

#define LED_ID 1

LED used in this program

Definition at line 108 of file main.c.

#define WDT_PERIOD 3000

Watchdog period, in ms

Definition at line 114 of file main.c.

#define WDT_RESTART_PERIOD 2000

Watchdog restart period, in ms

Definition at line 116 of file main.c.

## Function Documentation

int main | ( | void | ) |

Application entry point for wdg_irq example.

Returns:
  Unused (ANSI-C compatibility).

Definition at line 221 of file main.c.

Here is the call graph for this function:

void SysTick_Handler | ( | void | ) |

Handler for Sytem Tick interrupt.

Default SysTick interrupt handler.

Set systick event flag & increased gSystick by 1.

Definition at line 143 of file main.c.

void WDT_IrqHandler | ( | void | ) |

Handler for watchdog interrupt.

Default interrupt handler for Watchdog Timer.

Definition at line 165 of file main.c.

Here is the call graph for this function:

## Variable Documentation

volatile bool button1Evt = false

Pushbutton #1 pin event flag.

Definition at line 126 of file main.c.

volatile uint32_t gSystick = 0

System tick increased by 1 every millisecond

Definition at line 132 of file main.c.

const Pin pinPB1 = PIN_PUSHBUTTON_1

Pushbutton #1 pin instance.

Definition at line 123 of file main.c.

bool systickEvt = false

System Tick event flag.

Definition at line 129 of file main.c.

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines