main.c

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

Generated on Fri Sep 11 14:25:28 2009 for ATMEL by  doxygen 1.5.3