GLOBAL_CCU4
|
GLOBAL_CCU4.c
Go to the documentation of this file.
00001 00048 /*********************************************************************************************************************** 00049 * HEADER FILES 00050 **********************************************************************************************************************/ 00051 00052 #include "global_ccu4.h" 00053 00054 /*********************************************************************************************************************** 00055 * MACROS 00056 **********************************************************************************************************************/ 00057 00058 /*********************************************************************************************************************** 00059 * LOCAL DATA 00060 **********************************************************************************************************************/ 00061 00062 /*********************************************************************************************************************** 00063 * LOCAL ROUTINES 00064 **********************************************************************************************************************/ 00065 00066 /********************************************************************************************************************** 00067 * API IMPLEMENTATION 00068 **********************************************************************************************************************/ 00069 /* Returns the version of the GLOBAL_CCU4 APP. */ 00070 DAVE_APP_VERSION_t GLOBAL_CCU4_GetAppVersion(void) 00071 { 00072 DAVE_APP_VERSION_t version; 00073 00074 version.major = GLOBAL_CCU4_MAJOR_VERSION; 00075 version.minor = GLOBAL_CCU4_MINOR_VERSION; 00076 version.patch = GLOBAL_CCU4_PATCH_VERSION; 00077 00078 return version; 00079 } 00080 00081 /* Initializes the slice with the generated configuration */ 00082 GLOBAL_CCU4_STATUS_t GLOBAL_CCU4_Init(GLOBAL_CCU4_t* handle) 00083 { 00084 XMC_ASSERT("GLOBAL_CCU4_Init:NULL handler", (NULL != handle)); 00085 00086 if (false == handle->is_initialized) 00087 { 00088 /* Enable CCU4 module */ 00089 XMC_CCU4_Init(handle->module_ptr,handle->mcs_action); 00090 /* Start the prescaler */ 00091 XMC_CCU4_StartPrescaler(handle->module_ptr); 00092 /* Restricts multiple initializations */ 00093 handle->is_initialized = true; 00094 } 00095 00096 return (GLOBAL_CCU4_STATUS_SUCCESS); 00097 }