module ti.sysbios.hal.SecondsCallback

A Seconds module that calls user-supplied callbacks

ISeconds implementation that uses user callback functions This module provides a implementation of the ISystemSupport interface that simply calls back the user defined functions to enable the System module's functionality. [ more ... ]
C synopsis target-domain sourced in ti/sysbios/hal/SecondsCallback.xdc
DETAILS
ISeconds implementation that uses user callback functions This module provides a implementation of the ISystemSupport interface that simply calls back the user defined functions to enable the System module's functionality.
Configuration is as shown below.
  var SecondsCallback = xdc.useModule('xdc.runtime.SecondsCallback');
  SecondsCallback.getFxn = "&userSetSeconds";
  SecondsCallback.setFxn = "&userGetSeconds";

 
typedef SecondsCallback_GetFxn

'get' function signature

C synopsis target-domain
typedef UInt32 (*SecondsCallback_GetFxn)();
 
 
typedef SecondsCallback_SetFxn

'set' function signature

C synopsis target-domain
typedef Void (*SecondsCallback_SetFxn)(UInt32);
 
 
struct SecondsCallback_Time

Structure to hold a time value in seconds plus nanoseconds

C synopsis target-domain
typedef struct SecondsCallback_Time {
    UInt32 secs;
    // Seconds
    UInt32 nsecs;
    // Nanoseconds
} SecondsCallback_Time;
 
 
config SecondsCallback_getFxn  // module-wide

User supplied 'get' function

C synopsis target-domain
extern const SecondsCallback_GetFxn SecondsCallback_getFxn;
 
DETAILS
This function is called when the application calls Seconds.get() function.
By default, this function is configured with a default abort function. This default abort function spins forever and never returns.
 
config SecondsCallback_setFxn  // module-wide

User supplied 'set' function

C synopsis target-domain
extern const SecondsCallback_SetFxn SecondsCallback_setFxn;
 
DETAILS
This function is called when the application calls Seconds.set() function.
By default, this function is configured with a default abort function. This default abort function spins forever and never returns.
 
SecondsCallback_get()  // module-wide

Returns number of seconds since 1970 (the Unix epoch)

C synopsis target-domain
UInt32 SecondsCallback_get();
 
DETAILS
The user must call Seconds_set() before making any calls to Seconds_get(), otherwise the value returned by Seconds_get() will be meaningless.
 
SecondsCallback_getTime()  // module-wide

Fills in a Seconds_Time structure with seconds and nanoseconds elapsed since 1970 (the Unix epoch)

C synopsis target-domain
UInt32 SecondsCallback_getTime(ISeconds_Time *ts);
 
DETAILS
Seconds_set() must have been called before making any calls to Seconds_getTime(), otherwise the value returned by Seconds_getTime() will be meaningless.
 
SecondsCallback_set()  // module-wide

Update the real time clock with number of seconds since 1970

C synopsis target-domain
Void SecondsCallback_set(UInt32 seconds);
 
DETAILS
Note: This function is non-reentrant.
Module-Wide Built-Ins

C synopsis target-domain
Types_ModuleId SecondsCallback_Module_id();
// Get this module's unique id
 
Bool SecondsCallback_Module_startupDone();
// Test if this module has completed startup
 
IHeap_Handle SecondsCallback_Module_heap();
// The heap from which this module allocates memory
 
Bool SecondsCallback_Module_hasMask();
// Test whether this module has a diagnostics mask
 
Bits16 SecondsCallback_Module_getMask();
// Returns the diagnostics mask for this module
 
Void SecondsCallback_Module_setMask(Bits16 mask);
// Set the diagnostics mask for this module
 
Configuration settings sourced in ti/sysbios/hal/SecondsCallback.xdc
var SecondsCallback = xdc.useModule('ti.sysbios.hal.SecondsCallback');
module-wide constants & types
        obj.secs// Seconds = UInt32  ...
        obj.nsecs// Nanoseconds = UInt32  ...
module-wide config parameters
    SecondsCallback.getFxn// User supplied 'get' function = UInt32(*)() "&ti_sysbios_hal_SecondsCallback_defaultGet";
    SecondsCallback.setFxn// User supplied 'set' function = Void(*)(UInt32) "&ti_sysbios_hal_SecondsCallback_defaultSet";
 
 
 
struct SecondsCallback.Time

Structure to hold a time value in seconds plus nanoseconds

Configuration settings
var obj = new SecondsCallback.Time;
 
    obj.secs = UInt32  ...
    // Seconds
    obj.nsecs = UInt32  ...
    // Nanoseconds
 
C SYNOPSIS
 
config SecondsCallback.getFxn  // module-wide

User supplied 'get' function

Configuration settings
SecondsCallback.getFxn = UInt32(*)() "&ti_sysbios_hal_SecondsCallback_defaultGet";
 
DETAILS
This function is called when the application calls Seconds.get() function.
By default, this function is configured with a default abort function. This default abort function spins forever and never returns.
C SYNOPSIS
 
config SecondsCallback.setFxn  // module-wide

User supplied 'set' function

Configuration settings
SecondsCallback.setFxn = Void(*)(UInt32) "&ti_sysbios_hal_SecondsCallback_defaultSet";
 
DETAILS
This function is called when the application calls Seconds.set() function.
By default, this function is configured with a default abort function. This default abort function spins forever and never returns.
C SYNOPSIS
 
metaonly config SecondsCallback.common$  // module-wide

Common module configuration parameters

Configuration settings
SecondsCallback.common$ = Types.Common$ undefined;
 
DETAILS
All modules have this configuration parameter. Its name contains the '$' character to ensure it does not conflict with configuration parameters declared by the module. This allows new configuration parameters to be added in the future without any chance of breaking existing modules.
generated on Fri, 10 Jun 2016 23:28:50 GMT