GLOBAL_SCU_XMC1: Methods

GLOBAL_SCU_XMC1

GLOBAL_SCU_XMC1
Methods
DAVE_APP_VERSION_t GLOBAL_SCU_XMC1_GetAppVersion (void)
 Get GLOBAL_SCU_XMC1 APP version.
GLOBAL_SCU_XMC1_STATUS_t GLOBAL_SCU_XMC1_Init (GLOBAL_SCU_XMC1_t *const handle)
 Initialize the GLOBAL_SCU_XMC1 APP.
GLOBAL_SCU_XMC1_STATUS_t GLOBAL_SCU_XMC1_RegisterCallback (const GLOBAL_SCU_XMC1_EVENT_t event, const GLOBAL_SCU_XMC1_EVENT_HANDLER_t callback)
 Register an event callback routine This function registers an event callback routine for a specific event. Note: User needs to enable the event generation separately. See GLOBAL_SCU_XMC1_EnableEvent and GLOBAL_SCU_XMC1_DisableEvent.
__STATIC_INLINE void GLOBAL_SCU_XMC1_EnableIRQ (uint8_t irq_num)
 Enable the handling of events.
__STATIC_INLINE void GLOBAL_SCU_XMC1_DisableIRQ (uint8_t irq_num)
 Disable the handling of events.
__STATIC_INLINE void GLOBAL_SCU_XMC1_EnableEvent (const GLOBAL_SCU_XMC1_EVENT_t event)
 Enable a specific event.
__STATIC_INLINE void GLOBAL_SCU_XMC1_DisableEvent (const GLOBAL_SCU_XMC1_EVENT_t event)
 Disable a specific event.

Methods


Function Documentation

__STATIC_INLINE void GLOBAL_SCU_XMC1_DisableEvent ( const GLOBAL_SCU_XMC1_EVENT_t  event)

Disable a specific event.

Parameters:
eventEvents to be disabled. See GLOBAL_SCU_XMC1_EVENT_t.

Definition at line 317 of file GLOBAL_SCU_XMC1.h.

__STATIC_INLINE void GLOBAL_SCU_XMC1_DisableIRQ ( uint8_t  irq_num)

Disable the handling of events.

Parameters:
void

Definition at line 297 of file GLOBAL_SCU_XMC1.h.

__STATIC_INLINE void GLOBAL_SCU_XMC1_EnableEvent ( const GLOBAL_SCU_XMC1_EVENT_t  event)

Enable a specific event.

Parameters:
eventEvents to be enabled. See GLOBAL_SCU_XMC1_EVENT_t.

Definition at line 307 of file GLOBAL_SCU_XMC1.h.

__STATIC_INLINE void GLOBAL_SCU_XMC1_EnableIRQ ( uint8_t  irq_num)

Enable the handling of events.

Parameters:
void

Definition at line 287 of file GLOBAL_SCU_XMC1.h.

DAVE_APP_VERSION_t GLOBAL_SCU_XMC1_GetAppVersion ( void  )

Get GLOBAL_SCU_XMC1 APP version.

Returns:
DAVE_APP_VERSION_t APP version details (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)
 {
   DAVE_APP_VERSION_t version;

   // Initialize GLOBAL_SCU_XMC1 APP.
   DAVE_Init();

   version = GLOBAL_SCU_XMC1_GetAppVersion();
   if (version.major != 4U)
   {
     // Probably, not the right version.
   }

   // More code here
   while(1)
   {
   }
   return (0);
 }


Definition at line 91 of file GLOBAL_SCU_XMC1.c.

Initialize the GLOBAL_SCU_XMC1 APP.

This function initializes the required CPU_XMC1 APP if not yet done, sets the priority of the SCU_0/SCU_1/SCU_2 IRQ, and enables the IRQ if the user has selected so. This function is called from DAVE_Init() or top level APP requiring the GLOBAL_SCU_XMC1 APP.

Parameters:
handleRuntime handler
Returns:
GLOBAL_SCU_XMC1_STATUS_t Indicates initialization status

Definition at line 105 of file GLOBAL_SCU_XMC1.c.

References GLOBAL_SCU_XMC1::config, GLOBAL_SCU_XMC1_CONFIG::enable_at_init, GLOBAL_SCU_XMC1_STATUS_FAILURE, GLOBAL_SCU_XMC1_STATUS_SUCCESS, GLOBAL_SCU_XMC1::initialized, and GLOBAL_SCU_XMC1_CONFIG::priority.

Register an event callback routine This function registers an event callback routine for a specific event. Note: User needs to enable the event generation separately. See GLOBAL_SCU_XMC1_EnableEvent and GLOBAL_SCU_XMC1_DisableEvent.

Parameters:
eventEvent for which the callback is register
callbackRoutine to handle occurrence of event
Returns:
GLOBAL_SCU_XMC1_STATUS_t Indicates registration status
 #include <DAVE.h>

 void CbListener(void)
 {
   // Callback function implementation
 };

 int main(void)
 {
   DAVE_Init();

   GLOBAL_SCU_XMC1_RegisterCallback(GLOBAL_SCU_XMC1_EVENT_RTC_ALARM, CbListener);
   GLOBAL_SCU_XMC1_EnableEvent(GLOBAL_SCU_XMC1_EVENT_RTC_ALARM);
   while(1);
 }


Definition at line 214 of file GLOBAL_SCU_XMC1.c.