File: deep_frame.c

package info (click to toggle)
simulavr 0.1.2.2-6.1
  • links: PTS
  • area: main
  • in suites: lenny, squeeze
  • size: 2,756 kB
  • ctags: 3,179
  • sloc: ansic: 19,987; sh: 3,623; python: 3,528; makefile: 406; asm: 308; yacc: 145; lex: 48
file content (37 lines) | stat: -rw-r--r-- 361 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* test deeply nested functions with gdb patch */

#include <avr/io.h>
#include "common.h"

void func4 (void)
{
    static uint8_t val;
    PORTC = val++;
}

void func3 (void)
{
    func4();
}

void func2 (void)
{
    func3();
}

void func1 (void)
{
    func2();
}

int main(void)
{
    DDRC = 0xff;

    while (1)
    {
        func1();
    }

    return 0;
}