AVR Z-LINKŪ


main.c

Go to the documentation of this file.
00001 /* This file has been prepared for Doxygen automatic documentation generation.*/
00023 /* === Includes ============================================================ */
00024 #include <stdbool.h>
00025 #include <stdint.h>
00026 
00027 #include "compiler.h"
00028 #include "serialPortHAL.h"
00029 #include "atParser.h"
00030 
00031 #include "ieee_const.h"
00032 #include "ieee_types.h"
00033 #include "wpan_mac.h"
00034 /* ==== Macros ============================================================= */
00035 /* === Typedefs ============================================================ */
00036 /* === Variables =========================================================== */
00037 /* === Prototypes ========================================================== */
00038 static void applicationInit( void );
00039 /* === Call-backs ========================================================== */
00040 
00041 
00056 int main( void ){
00057 
00058         applicationInit( );
00059 
00060         while( true ){
00061         
00062                 while( wpan_task( ) ){
00063             
00064             ;
00065         }
00066                 
00067                 if( dataAvailable( ) ){
00068                         
00069                         handleNewCommand( );
00070                         rxReset( );
00071                 }
00072         }
00073 }
00074 
00079 static void applicationInit( void ){
00080 
00081         //Initialize MAC library and enable interrupts.
00082         wpan_init( );
00083         sei( );
00084         
00085         //Initialize serial interface. Either USART0 or FTDI USB chip.
00086         serialInterfaceInitialization( );
00087 }
@DOC_TITLE@
Generated on Sat Dec 2 16:05:51 2006 for AVR414 User's Guide - ATAVRRZ502 - Accessory Kit by doxygen 1.4.7