DIGITAL_IO
|
DIGITAL_IO.c
Go to the documentation of this file.
00001 00051 /*********************************************************************************************************************** 00052 * HEADER FILES 00053 **********************************************************************************************************************/ 00054 #include "digital_io.h" 00055 00056 /*********************************************************************************************************************** 00057 * MACROS 00058 **********************************************************************************************************************/ 00059 00060 /*********************************************************************************************************************** 00061 * LOCAL DATA 00062 **********************************************************************************************************************/ 00063 00064 /*********************************************************************************************************************** 00065 * LOCAL ROUTINES 00066 **********************************************************************************************************************/ 00067 00068 /********************************************************************************************************************** 00069 * API IMPLEMENTATION 00070 **********************************************************************************************************************/ 00071 00077 DAVE_APP_VERSION_t DIGITAL_IO_GetAppVersion(void) 00078 { 00079 DAVE_APP_VERSION_t version; 00080 00081 version.major = (uint8_t)DIGITAL_IO_MAJOR_VERSION; 00082 version.minor = (uint8_t)DIGITAL_IO_MINOR_VERSION; 00083 version.patch = (uint8_t)DIGITAL_IO_PATCH_VERSION; 00084 00085 return (version); 00086 } 00087 00088 00095 DIGITAL_IO_STATUS_t DIGITAL_IO_Init(const DIGITAL_IO_t *const handler) 00096 { 00097 XMC_ASSERT("DIGITAL_IO_Init: handler null pointer", handler != NULL); 00098 00099 /* Initializes input / output characteristics */ 00100 XMC_GPIO_Init(handler->gpio_port, handler->gpio_pin, &handler->gpio_config); 00101 00102 /*Configure hardware port control*/ 00103 XMC_GPIO_SetHardwareControl(handler->gpio_port, handler->gpio_pin, handler->hwctrl); 00104 00105 return (DIGITAL_IO_STATUS_OK); 00106 }