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 "relay.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 relay_Init (void) 00079 { 00080 RELAY_DDR |= (1U << RELAY_BIT); 00081 00082 relay_Enable(FALSE); 00083 } /* End: relay_Init() */ 00084 00085 00086 /* ****************************************************************************/ 00093 /* ****************************************************************************/ 00094 void relay_Enable (E_BOOL bEnabled) 00095 { 00096 if(TRUE == bEnabled) 00097 { 00098 RELAY_PORT |= (1U << RELAY_BIT); 00099 } 00100 else 00101 { 00102 RELAY_PORT &= ~(1U << RELAY_BIT); 00103 } 00104 } /* End: relay_Enable() */ 00105 00106 00107 /* End: Global functions *//*@}*/ 00108 /******************************************************************************/ 00109 00110 /**** Last line of code ****/ 00111 00112