main.c

Go to the documentation of this file.
00001 /*This file has been prepared for Doxygen automatic documentation generation.*/
00045 
00046 /* Copyright (c) 2007, Atmel Corporation All rights reserved.
00047  *
00048  * Redistribution and use in source and binary forms, with or without
00049  * modification, are permitted provided that the following conditions are met:
00050  *
00051  * 1. Redistributions of source code must retain the above copyright notice,
00052  * this list of conditions and the following disclaimer.
00053  *
00054  * 2. Redistributions in binary form must reproduce the above copyright notice,
00055  * this list of conditions and the following disclaimer in the documentation
00056  * and/or other materials provided with the distribution.
00057  *
00058  * 3. The name of ATMEL may not be used to endorse or promote products derived
00059  * from this software without specific prior written permission.
00060  *
00061  * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED
00062  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
00063  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND
00064  * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,
00065  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00066  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00067  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
00068  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00069  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
00070  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00071  */
00072  
00073 //_____  I N C L U D E S ___________________________________________________
00074  
00075 #include "mc_control.h"
00076 #include "config.h"
00077 
00078 //_____ M A C R O S ________________________________________________________
00079 
00080 //_____ D E F I N I T I O N S ______________________________________________
00081 
00082 int main(void)
00083 { 
00084 
00085   // Init hardware
00086   mc_init_HW();
00087     
00088   // Run Ramp Up sequence
00089   mc_start_motor();
00090 
00091   // Enable interrupts. The rest will now be handled by the ADC interrupts.
00092   Enable_interrupt();
00093    
00094   for (;;) {
00095    mc_regulation_loop();
00096   }
00097 
00098   return 0;
00099 }
00100 

Generated on Mon Dec 1 11:12:20 2008 for AVR498 : Atmel BLDC control on ATAVRMC301 with ATtiny861 by  doxygen 1.5.4