main.c

Go to the documentation of this file.
00001 /*This file is prepared for Doxygen automatic documentation generation.*/
00043 
00044 /* Copyright (c) 2009 Atmel Corporation. All rights reserved.
00045  *
00046  * Redistribution and use in source and binary forms, with or without
00047  * modification, are permitted provided that the following conditions are met:
00048  *
00049  * 1. Redistributions of source code must retain the above copyright notice,
00050  * this list of conditions and the following disclaimer.
00051  *
00052  * 2. Redistributions in binary form must reproduce the above copyright notice,
00053  * this list of conditions and the following disclaimer in the documentation
00054  * and/or other materials provided with the distribution.
00055  *
00056  * 3. The name of Atmel may not be used to endorse or promote products derived
00057  * from this software without specific prior written permission.
00058  *
00059  * 4. This software may only be redistributed and used in connection with an Atmel
00060  * AVR product.
00061  *
00062  * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
00063  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
00064  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE EXPRESSLY AND
00065  * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,
00066  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00067  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00068  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
00069  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00070  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
00071  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00072  */
00073  
00074 //_____  I N C L U D E S ___________________________________________________
00075 
00076 #include "config.h"
00077 #include "modules/scheduler/scheduler.h"
00078 #include "lib_mcu/wdt/wdt_drv.h"
00079 #include "lib_mcu/power/power_drv.h"
00080 #include "lib_mcu/usb/usb_drv.h"
00081 
00082 //_____ M A C R O S ________________________________________________________
00083 
00084 //_____ D E F I N I T I O N S ______________________________________________
00085 
00086 int main(void)
00087 {
00088    Usb_enable_regulator();
00089    wdtdrv_disable();
00090    Clear_prescaler();
00091 
00092    scheduler();
00093    return 0;
00094 }
00095 
00099 #ifdef  __GNUC__
00100 // Locate low level init function before RAM init (init3 section)
00101 // and remove std prologue/epilogue
00102 char __low_level_init(void) __attribute__ ((section (".init3"),naked));
00103 #endif
00104 
00105 #ifdef __cplusplus
00106 extern "C" {
00107 #endif
00108 char __low_level_init()
00109 {
00110   Clear_prescaler();
00111   return 1;
00112 }
00113 #ifdef __cplusplus
00114 }
00115 #endif

Generated on Fri Sep 11 14:41:51 2009 for ATMEL by  doxygen 1.5.3