VADC_GLOBAL_CONFIG
|
Methods
DAVE_APP_VERSION_t | VADC_GLOBAL_CONFIG_GetAppVersion (void) |
Get the VADC_GLOBAL_CONFIG APP version. More... | |
VADC_GLOBAL_CONFIG_STATUS_t | VADC_GLOBAL_CONFIG_Init (const VADC_GLOBAL_CONFIG_t *const handle) |
Initializes the ADC global as per user configured values. More... | |
Detailed Description
Methods
Function Documentation
DAVE_APP_VERSION_t VADC_GLOBAL_CONFIG_GetAppVersion | ( | void | ) |
Get the VADC_GLOBAL_CONFIG APP version.
- Returns
- DAVE_APP_VERSION_t APP version information (major, minor and patch number)
- Description:
- The function can be used to check application software compatibility with a specific version of the APP.
Example Usage:
#include <DAVE.h>
int main(void)
{
VADC_GLOBAL_CONFIG_STATUS_t init_status;
DAVE_APP_VERSION_t vadc_global_config_version;
uint8_t valid_str[] = "VADC_GLOBAL_CONFIG APP supported!";
init_status = (VADC_GLOBAL_CONFIG_STATUS_t)VADC_GLOBAL_CONFIG_init(&VADC_GLOBAL_CONFIG_0);
if(init_status == VADC_GLOBAL_CONFIG_STATUS_SUCCESS)
{
vadc_global_config_version = VADC_GLOBAL_CONFIG_GetAppVersion();
if((vadc_global_config_version.major == 4))
{
}
else
{
XMC_DEBUG("main: Wrong APP version");
}
}
else
{
XMC_DEBUG("main: Application initialization failed");
}
while(1U)
{
}
return 1U;
}
- Returns
- DAVE_APP_VERSION_t APP version information (major, minor and patch number)
Definition at line 78 of file VADC_GLOBAL_CONFIG.c.
VADC_GLOBAL_CONFIG_STATUS_t VADC_GLOBAL_CONFIG_Init | ( | const VADC_GLOBAL_CONFIG_t *const | handle | ) |
Initializes the ADC global as per user configured values.
- Parameters
-
handle Pointer to static content of APP configuration.
- Returns
- VADC_GLOBAL_CONFIG_STATUS_t: Status of the VADC driver initialization.
VADC_GLOBAL_CONFIG_STATUS_SUCCESS - on successful initialization.
VADC_GLOBAL_CONFIG_STATUS_FAILURE - if initialization fails.
- Description:
- This function configures VADC registers based on the settings provided in the UI.
Example Usage:
#include <DAVE.h>
int main(void)
{
VADC_GLOBAL_CONFIG_STATUS_t init_status;
DAVE_APP_VERSION_t vadc_global_config_version;
uint8_t valid_str[] = "VADC_GLOBAL_CONFIG APP supported!";
init_status = (VADC_GLOBAL_CONFIG_STATUS_t)VADC_GLOBAL_CONFIG_init(&VADC_GLOBAL_CONFIG_0);
if(init_status != VADC_GLOBAL_CONFIG_STATUS_SUCCESS)
{
XMC_DEBUG("main: Application initialization failed");
}
while(1U)
{
}
return 1U;
}
- Parameters
-
handle Pointer to static content of APP configuration.
- Returns
- VADC_GLOBAL_CONFIG_STATUS_t: Status of the VADC driver initialization.
VADC_GLOBAL_CONFIG_STATUS_SUCCESS - on successful initialization.
VADC_GLOBAL_CONFIG_STATUS_FAILURE - if initialization fails.
Definition at line 95 of file VADC_GLOBAL_CONFIG.c.
References VADC_GLOBAL_CONFIG::init_function, and VADC_GLOBAL_CONFIG_STATUS_SUCCESS.