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

fan.c

Go to the documentation of this file.
00001 /*@{*//*@}*/
00011 
00012 /******************************************************************************/
00013 /* Includes (#include)                                                        */
00014 #include <avr/io.h>
00015 
00016 /* Own header files */
00017 #include "xtypes.h"
00018 #include "global.h"
00019 
00020 #define EXPORT
00021   #include "fan.h"
00022 #undef EXPORT
00023 
00024 /******************************************************************************/
00025 /* Constants (#define)                *//*@{*/
00026 /* End: Constants (#define)                                             *//*@}*/
00027 /******************************************************************************/
00028 
00029 /******************************************************************************/
00030 /* Macro definitions (#define)           *//*@{*/
00031 /* End: Macro definitions (#define)                                     *//*@}*/
00032 /******************************************************************************/
00033 
00034 /******************************************************************************/
00035 /* Basic types (typedef)                 *//*@{*/
00036 /* End: Basic types (typedef)                                           *//*@}*/
00037 /******************************************************************************/
00038 
00039 /******************************************************************************/
00040 /* Local constants (const)      *//*@{*/
00041 /* End: Local constants (const)                                         *//*@}*/
00042 /******************************************************************************/
00043 
00044 /******************************************************************************/
00045 /* Local variables              *//*@{*/
00046 /* End: Local variables                                                 *//*@}*/
00047 /******************************************************************************/
00048 
00049 /******************************************************************************/
00050 /* Global variables           *//*@{*/
00051 /* End: Global variables                                                *//*@}*/
00052 /******************************************************************************/
00053 
00054 /******************************************************************************/
00055 /* Prototype declarations                                                     */
00056 /* End: Prototype declarations                                                */
00057 /******************************************************************************/
00058 
00059 /******************************************************************************/
00060 /* Local functions             *//*@{*/
00061 /* End: Local functions                                                 *//*@}*/
00062 /******************************************************************************/
00063 
00064 /******************************************************************************/
00065 /* Global functions          *//*@{*/
00066 
00067 
00068 /* ****************************************************************************/
00077 /* ****************************************************************************/
00078 void fan_Init (void)
00079 {
00080   FAN_DDR  |=  (1U << FAN_BIT);
00081   
00082   fan_Set(OFF);
00083 } /* End: fan_Init() */
00084 
00085 
00086 /* ****************************************************************************/
00093 /* ****************************************************************************/
00094 void fan_Set (E_SWITCH eState)
00095 {
00096   if(ON == eState)
00097   {
00098     FAN_PORT |=  (1U << FAN_BIT);
00099   }
00100   else
00101   {
00102     FAN_PORT &= ~(1U << FAN_BIT);
00103   }
00104 } /* End: fan_Set() */
00105 
00106 
00107 /* End: Global functions                                                *//*@}*/
00108 /******************************************************************************/
00109 
00110 /**** Last line of code                                                    ****/
00111 
00112 

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