00001 /* 00002 * File: system.h 00003 * Purpose: System initialization functions 00004 * Author: Peter Ivanov, Olimex Ltd. 00005 * Modified by: 00006 * Created: 2007-05-19 11:29:32 00007 * Last modify: 2007-06-10 13:13:49 ivanovp {Time-stamp} 00008 * Copyright: (C) Peter Ivanov, Olimex Ltd., 2005, 2007 00009 * Licence: GPL 00010 */ 00016 /**********************************************************************************/ 00017 /* */ 00018 /* Copyright (C) 2005 OLIMEX LTD. */ 00019 /* */ 00020 /* Module Name : system module */ 00021 /* File Name : system.h */ 00022 /* Revision : 01.00 */ 00023 /* Date : 2005/07/04 initial version */ 00024 /* */ 00025 /**********************************************************************************/ 00026 00027 #ifndef system_def 00028 #define system_def 00029 00030 /* definitions */ 00031 00032 // POWER MODE 00033 #define MODE_ACTIVE 0 00034 #define MODE_LPM0 1 00035 #define MODE_LPM1 2 00036 #define MODE_LPM2 3 00037 #define MODE_LPM3 4 00038 #define MODE_LPM4 5 00039 00040 /****************************************************************************/ 00041 /* Init system frequency */ 00042 /* Function : InitFreq_XT2 */ 00043 /* Parameters */ 00044 /* Input : Nothing */ 00045 /* Output : Nothing */ 00046 /****************************************************************************/ 00047 void InitFreq_XT2(void); 00048 00049 /****************************************************************************/ 00050 /* Init system frequency */ 00051 /* Function : InitFreq_XT1 */ 00052 /* Parameters */ 00053 /* Input : Nothing */ 00054 /* Output : Nothing */ 00055 /****************************************************************************/ 00056 void InitFreq_XT1(void); 00057 00058 /****************************************************************************/ 00059 /* Init system frequency */ 00060 /* Function : InitFreq */ 00061 /* Parameters */ 00062 /* Input : Nothing */ 00063 /* Output : Nothing */ 00064 /****************************************************************************/ 00065 void InitFreq(void); 00066 00067 /****************************************************************************/ 00068 /* Preparing board to enter sleep mode - low power consumption */ 00069 /* Function : GoToSleep */ 00070 /* Parameters */ 00071 /* Input : Nothing */ 00072 /* Output : Nothing */ 00073 /****************************************************************************/ 00074 void GoToSleep(void); 00075 00076 #endif // system_def 00077
1.5.1