• Main Page
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

init.c

Go to the documentation of this file.
00001 /*@{*//*@}*/
00014 
00015 /******************************************************************************/
00016 /* Includes (#include)                                                        */
00017 #include <avr/io.h>
00018 
00019 /* Own header files */
00020 #include "xtypes.h"
00021 #include "global.h"
00022 
00023 #include "adc.h"
00024 #include "fan.h"
00025 #include "uart.h"
00026 #include "temp.h"
00027 #include "print.h"
00028 #include "timer.h"
00029 #include "pedal.h"
00030 #include "relay.h"
00031 #include "speed.h"
00032 #include "safety.h"
00033 #include "switch.h"
00034 #include "memory.h"
00035 #include "speaker.h"
00036 #include "voltage.h"
00037 #include "current.h"
00038 
00039 #define EXPORT
00040   #include "init.h"
00041 #undef EXPORT
00042 
00043 /******************************************************************************/
00044 /* Constants (#define)                *//*@{*/
00045 /* End: Constants (#define)                                             *//*@}*/
00046 /******************************************************************************/
00047 
00048 /******************************************************************************/
00049 /* Macro definitions (#define)           *//*@{*/
00050 /* End: Macro definitions (#define)                                     *//*@}*/
00051 /******************************************************************************/
00052 
00053 /******************************************************************************/
00054 /* Basic types (typedef)                 *//*@{*/
00055 /* End: Basic types (typedef)                                           *//*@}*/
00056 /******************************************************************************/
00057 
00058 /******************************************************************************/
00059 /* Local constants (const)     *//*@{*/
00060 /* End: Local constants (const)                                         *//*@}*/
00061 /******************************************************************************/
00062 
00063 /******************************************************************************/
00064 /* Local variables              *//*@{*/
00065 /* End: Local variables                                                 *//*@}*/
00066 /******************************************************************************/
00067 
00068 /******************************************************************************/
00069 /* Global variables           *//*@{*/
00070 /* End: Global variables                                                *//*@}*/
00071 /******************************************************************************/
00072 
00073 /******************************************************************************/
00074 /* Prototype declarations                                                     */
00075 /* End: Prototype declarations                                                */
00076 /******************************************************************************/
00077 
00078 /******************************************************************************/
00079 /* Local functions             *//*@{*/
00080 /* End: Local functions                                                 *//*@}*/
00081 /******************************************************************************/
00082 
00083 /******************************************************************************/
00084 /* Global functions          *//*@{*/
00085 
00086 /* ****************************************************************************/
00094 /* ****************************************************************************/
00095 void init_InitModules (void)
00096 {
00097   speaker_Init();
00098   relay_Init();
00099   fan_Init();
00100   memory_Init();
00101   adc_Init();
00102   timer_Init();
00103   temp_Init();
00104   pedal_Init();
00105   speed_Init();
00106   switch_Init();
00107   voltage_Init();
00108   current_Init();
00109   uart_Init();
00110   print_Init();
00111   safety_Init();
00112 }
00113 
00114 /* ****************************************************************************/
00124 /* ****************************************************************************/
00125 void init_InitIO (void)
00126 {
00127   /* IO initialisation */
00128   DDRB = 0x00U;
00129   DDRC = 0x00U;
00130   DDRD = 0x00U;
00131   TXD_DDR       |=  (1U << TXD_BIT);
00132   LED1_DDR      |=  (1U << LED1_BIT);
00133   LED2_DDR      |=  (1U << LED2_BIT);
00134   LED3_DDR      |=  (1U << LED3_BIT);
00135   LED4_DDR      |=  (1U << LED4_BIT);
00136   LED5_DDR      |=  (1U << LED5_BIT);
00137   MUX_VOLT_DDR  |=  (1U << MUX_VOLT_BIT);
00138   MUX_CURR_DDR  |=  (1U << MUX_CURR_BIT);
00139   SPEAKER_DDR   |=  (1U << SPEAKER_BIT);
00140   RELAY_DDR     |=  (1U << RELAY_BIT);
00141   FAN_DDR       |=  (1U << FAN_BIT);
00142 
00143   PORTB = 0x00U;
00144   PORTC = 0x00U;
00145   PORTD = 0x00U;
00146 }
00147 
00148 /* End: Global functions                                                *//*@}*/
00149 /******************************************************************************/
00150 
00151 /**** Last line of code                                                    ****/
00152 
00153 

Generated on Sun Jan 23 2011 14:05:40 for ULA replacement firmware by  doxygen 1.7.2