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

SAM3S8/SD8 Software Package 1.2
Defines | Functions

# main.c File Reference

`#include "board.h"`
`#include <stdint.h>`
`#include <stdio.h>`
`#include <stdarg.h>`

Go to the source code of this file.

## Defines

#define | STATE_MENU 0
#define | STATE_SET_TIME 1
#define | STATE_SET_DATE 2
#define | STATE_SET_TIME_ALARM 3
#define | STATE_SET_DATE_ALARM 4
#define | STATE_WAVEFORM 5
#define | MAX_EDIT_SIZE 10
#define | IsDigitChar(c) ((c) >= '0' && (c) <='9')
#define | CharToDigit(c) ((c) - '0')
#define | SCR_SLEEPDEEP (0x1 << 2)

## Functions

void | RTC_IrqHandler (void)
| Interrupt handler for the RTC. Refreshes the display.
int | main (void)
| Application entry point for RTC example.

## Detailed Description

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

Definition in file main.c.

## Define Documentation

#define CharToDigit | ( |  | c ) | ((c) - '0')

Macro for converting char to digit

Definition at line 163 of file main.c.

#define IsDigitChar | ( |  | c ) | ((c) >= '0' && (c) <='9')

Macro for check digit character

Definition at line 161 of file main.c.

#define MAX_EDIT_SIZE 10

Maximum size of edited string

Definition at line 158 of file main.c.

#define SCR_SLEEPDEEP (0x1 << 2)

(SCR) Sleep deep bit

Definition at line 165 of file main.c.

#define STATE_MENU 0

Main menu is being displayed.

Definition at line 145 of file main.c.

#define STATE_SET_DATE 2

Date is being edited.

Definition at line 149 of file main.c.

#define STATE_SET_DATE_ALARM 4

Date alarm is being edited.

Definition at line 153 of file main.c.

#define STATE_SET_TIME 1

Time is being edited.

Definition at line 147 of file main.c.

#define STATE_SET_TIME_ALARM 3

Time alarm is being edited.

Definition at line 151 of file main.c.

#define STATE_WAVEFORM 5

Wave generating is being edited.

Definition at line 155 of file main.c.

## Function Documentation

int main | ( | void | ) |

Application entry point for RTC example.

Returns:
  Unused (ANSI-C compatibility).

Definition at line 540 of file main.c.

Here is the call graph for this function:

void RTC_IrqHandler | ( | void | ) |

Interrupt handler for the RTC. Refreshes the display.

Default interrupt handler for Real Time Clock.

Definition at line 488 of file main.c.

Here is the call graph for this function:
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines