test.h File Reference

#include <avr/io.h>
#include <avr/delay.h>
#include <avr/interrupt.h>
#include "Controller.h"

Include dependency graph for test.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define F_CPU   11059200UL
#define TEST_MODE   1

Functions

void debugTestProgramm ()
void msDelay (int n)
void powerOnLED (unsigned char _ledID, bool _status)


Define Documentation

#define F_CPU   11059200UL

Definition at line 1 of file test.h.

#define TEST_MODE   1

Definition at line 8 of file test.h.


Function Documentation

void debugTestProgramm (  ) 

Definition at line 30 of file test.h.

References Controller::init(), Controller::msDelay(), and Controller::powerOnLED().

00030                           { 
00031 
00032         Controller c;
00033      c.init();
00034 
00035      //c.blinkLED((1<<LED_WALK)|(1<<LED_LEARN)|(1<<LED_EXPLORATION), 100, 500);
00036 
00037      // Datenflussregister auf PortA
00038      DDRA = 0x0F;
00039      PORTA |= (1<<PA4) | (1<<PA5) | (1<<PA6) | (1<<PA7);
00040 
00041 
00042      while (1) {
00043 /*
00044           powerOnLED(0x00, 0);
00045           powerOnLED(0x01, 1);
00046           powerOnLED(0x02, 1);
00047           powerOnLED(0x03, 0);
00048           msDelay(500);
00049           powerOnLED(0x00, 1);
00050           powerOnLED(0x01, 0);
00051           powerOnLED(0x02, 0);
00052           powerOnLED(0x03, 1);
00053           msDelay(500);
00054 */
00055 
00056           c.powerOnLED(0x00, 0);
00057           c.powerOnLED(0x01, 1);
00058           c.powerOnLED(0x02, 1);
00059           c.powerOnLED(0x03, 0);
00060           c.msDelay(500);
00061           c.powerOnLED(0x00, 1);
00062           c.powerOnLED(0x01, 0);
00063           c.powerOnLED(0x02, 0);
00064           c.powerOnLED(0x03, 1);
00065           c.msDelay(500);
00066 
00067 
00068      }
00069 }

Here is the call graph for this function:

void msDelay ( int  n  ) 

Definition at line 11 of file test.h.

References F_CPU.

00011                      {
00012 
00013      double maxDelay = (262.14 / (F_CPU / 1000000));
00014 
00015      for (int i=0; i< (n/maxDelay); i++) {
00016           _delay_ms (maxDelay);
00017      }
00018 }

void powerOnLED ( unsigned char  _ledID,
bool  _status 
)

Definition at line 21 of file test.h.

00021                                                     {
00022 
00023      if (_status == true) {
00024           PORTA &= ~(1<<_ledID);
00025      } else {
00026           PORTA |= (1<<_ledID);
00027      }
00028 }


Generated on Wed Mar 25 12:58:42 2009 for Crawling Robot Microcontroller Software by  doxygen 1.5.5