Core Driver

The core driver is used to perform basic embedded functions.

Data Structures

ATMO_Value_t

Basic Atmosphere Datatype. Dynamically allocated upon initialization.

Member Name Type Description
type ATMO_DATATYPE Underlying raw data type
size unsigned int Size in bytes of the underlying data
data void * Pointer to the underlying data

ATMO_Ability_Execute_Entry_t

Structure to be filled and pushed onto Ability Handler list. Generally, every loop, the main thread will check this list, empty it, and execute any abilities.

Member Name Type Description
abilityHandle unsigned int The integer handle of the ability.
value ATMO_Value_t Any value that is to be passed along to the ability.

ATMO_Callback_Execute_Entry_t

Structure to be filled and pushed onto Callback Handler list. Generally, every loop, the main thread will check this list, empty it, and execute any abilities.

Member Name Type Description
callback ATMO_Callback_t The callback function to be executed
value ATMO_Value_t Any value that is to be passed along to the callback

ATMO_DriverInstanceData_t

Member Name Type
name const char *
initialized bool
instanceNumber ATMO_DriverInstanceHandle_t
argument void *

Type Definitions

Name Definition Description
ATMO_DriverInstanceHandle_t typedef uint32_t ATMO_DriverInstanceHandle_t  
ATMO_Callback_t typedef void(* ATMO_Callback_t) (void *value) Generic Atmosphere callback function.

Enumerations

enum ATMO_DATATYPE

Name Value
ATMO_DATATYPE_VOID 0x01u
ATMO_DATATYPE_CHAR 0x02u
ATMO_DATATYPE_BOOL 0x03u
ATMO_DATATYPE_INT 0x04u
ATMO_DATATYPE_UNSIGNED_INT 0x05u
ATMO_DATATYPE_FLOAT 0x06u
ATMO_DATATYPE_DOUBLE 0x07u
ATMO_DATATYPE_STRING 0x08u
ATMO_DATATYPE_BINARY 0x09u
ATMO_DATATYPE_MAX 0x0Au

enum ATMO_Status_t

|Name|Value| |:——|:——| |ATMO_Status_Success|0x00u| |ATMO_Status_Fail|0x01u| |ATMO_Status_NoInput|0x02u| |ATMO_Status_InvalidInput|0x03u| |ATMO_Status_OutOfMemory|0x04u| |ATMO_Status_MissingSupport|0x05u|

Functions

ATMO_Status_t ATMO_Init()

Initialize atmosphere core. Should not be called by users.

Return Type
ATMO_Status_t

ATMO_Status_t ATMO_Tick()

Process single tick in atmosphere core. Should not be called by users.

Return Type
ATMO_Status_t

ATMO_Status_t ATMO_AddCallbackExecute(ATMO_Callback_t callback, ATMO_Value_t *value)

Add a callback to the execution list.

Parameter Direction Type
value in ATMO_Value_t *
callback in ATMO_Callback_t
Return Type
ATMO_Status_t

ATMO_Status_t ATMO_AddAbilityExecute(unsigned int abilityHandle, ATMO_Value_t *value)

Add ability to the execution list.

Parameter Direction Type
value in ATMO_Value_t *
abilityHandle in unsigned int
Return Type
ATMO_Status_t

ATMO_Status_t ATMO_AddTickCallback(ATMO_Callback_t callback)

Add a callback to be executed every tick.

Parameter Direction Type
callback in ATMO_Callback_t
Return Type
ATMO_Status_t

size_t ATMO_GetMaxValueSize(unsigned int numberOfTypes, size_t bufferSize, ATMO_DATATYPE *types)

This routine gets the max size in bytes of an ATMO_DATATYPE list.

Parameter Direction Type
types in ATMO_DATATYPE *
bufferSize in size_t
numberOfTypes in unsigned int
Return Type Description
size_t Maximum size of data in buffer

ATMO_Status_t ATMO_InitValue(ATMO_Value_t *value)

Initialize an ATMO_Value_t to void.

Parameter Direction Type
value N/A ATMO_Value_t *
Return Type
ATMO_Status_t

ATMO_Status_t ATMO_CreateValueVoid(ATMO_Value_t *value)

Initialize an ATMO_Value_t to void.

Parameter Direction Type
value N/A ATMO_Value_t *
Return Type
ATMO_Status_t

ATMO_Status_t ATMO_CreateValueChar(ATMO_Value_t *value, char data)

Initialize an ATMO_Value_t to char.

Parameter Direction Type
data N/A char
value N/A ATMO_Value_t *
Return Type
ATMO_Status_t

ATMO_Status_t ATMO_CreateValueBool(ATMO_Value_t *value, bool data)

Initialize an ATMO_Value_t to Boolean.

Parameter Direction Type
data N/A bool
value N/A ATMO_Value_t *
Return Type
ATMO_Status_t

ATMO_Status_t ATMO_CreateValueInt(ATMO_Value_t *value, int data)

Initialize an ATMO_Value_t to integer.

Parameter Direction Type
data N/A int
value N/A ATMO_Value_t *
Return Type
ATMO_Status_t

ATMO_Status_t ATMO_CreateValueUnsignedInt(ATMO_Value_t *value, unsigned int data)

Initialize an ATMO_Value_t to unsigned integer.

Parameter Direction Type
data N/A unsigned int
value N/A ATMO_Value_t *
Return Type
ATMO_Status_t

ATMO_Status_t ATMO_CreateValueFloat(ATMO_Value_t *value, float data)

Initialize an ATMO_Value_t to float.

Parameter Direction Type
data N/A float
value N/A ATMO_Value_t *
Return Type
ATMO_Status_t

ATMO_Status_t ATMO_CreateValueDouble(ATMO_Value_t *value, double data)

Initialize an ATMO_Value_t to double

Parameter Direction Type
data N/A double
value N/A ATMO_Value_t *
Return Type
ATMO_Status_t

ATMO_Status_t ATMO_CreateValueString(ATMO_Value_t *value, const char *str)

Initialize an ATMO_Value_t to string.

Parameter Direction Type
str N/A const char *
value N/A ATMO_Value_t *
Return Type
ATMO_Status_t

ATMO_Status_t ATMO_CreateValueBinary(ATMO_Value_t *value, const void *data, unsigned int size)

Initialize an ATMO_Value_t to binary array.

Parameter Direction Type
size N/A unsigned int
data N/A const void *
value N/A ATMO_Value_t *
Return Type
ATMO_Status_t

ATMO_Status_t ATMO_CreateValueConverted(ATMO_Value_t *newValue, ATMO_DATATYPE type, ATMO_Value_t *convertValue)

Convert ATMO_Value_t from one datatype to another.

Parameter Direction Type
convertValue N/A ATMO_Value_t *
type N/A ATMO_DATATYPE
newValue N/A ATMO_Value_t *
Return Type
ATMO_Status_t

ATMO_Status_t ATMO_CreateValueCopy(ATMO_Value_t *newValue, ATMO_Value_t *oldValue)

Create a copy of ATMO_Value_t.

Parameter Direction Type
oldValue N/A ATMO_Value_t *
newValue N/A ATMO_Value_t *
Return Type
ATMO_Status_t

ATMO_Status_t ATMO_FreeValue(ATMO_Value_t *value)

Free memory associated with ATMO_Value_t This routine free’s the data object from a value and then sets it to an ATMO_VOID object.

Parameter Direction Type
value N/A ATMO_Value_t *
Return Type
ATMO_Status_t

ATMO_Status_t ATMO_GetChar(ATMO_Value_t *value, char *output)

This routine retrieves a raw Character from an ATMO_Value_t and does any necessary data conversions.

Parameter Direction Type
output out char *
value in ATMO_Value_t *
Return Type
ATMO_Status_t

ATMO_Status_t ATMO_GetBool(ATMO_Value_t *value, bool *output)

This routine retrieves a raw Bool from an ATMO_Value_t and does any necessary data conversions.

Parameter Direction Type
output out bool *
value in ATMO_Value_t *
Return Type
ATMO_Status_t

ATMO_Status_t ATMO_GetInt(ATMO_Value_t *value, int *output)

This routine retrieves a raw Integer from an ATMO_Value_t and does any necessary data conversions.

Parameter Direction Type
output out int *
value in ATMO_Value_t *

|Return Type| |:——| |ATMO_Status_t|

ATMO_Status_t ATMO_GetUnsignedInt(ATMO_Value_t *value, unsigned int *output)

This routine retrieves a raw unsigned integer from an ATMO_Value_t and does any necessary data conversions.

Parameter Direction Type
output out unsigned int *
value in ATMO_Value_t *
Return Type
ATMO_Status_t

ATMO_Status_t ATMO_GetFloat(ATMO_Value_t *value, float *output)

This routine retrieves a raw float from an ATMO_Value_t and does any necessary data conversions.

Parameter Direction Type
output out float *
value in ATMO_Value_t *
Return Type
ATMO_Status_t

ATMO_Status_t ATMO_GetDouble(ATMO_Value_t *value, double *output)

This routine retrieves a raw double from an ATMO_Value_t and does any necessary data conversions.

Parameter Direction Type
output out double *
value in ATMO_Value_t *
Return Type
ATMO_Status_t

ATMO_Status_t ATMO_GetString(ATMO_Value_t *value, char *buffer, unsigned int size)

This routine retrieves a raw string from an ATMO_Value_t and does any necessary data conversions.

Parameter Direction Type
size in unsigned int
buffer out char *
value in ATMO_Value_t *

|Return Type| |:——| |ATMO_Status_t|

ATMO_Status_t ATMO_GetBinary(ATMO_Value_t *value, void *buffer, unsigned int size)

This routine retrieves a raw binary array from an ATMO_Value_t and does any necessary data conversions.

Parameter Direction Type
size in unsigned int
buffer out void *
value in ATMO_Value_t *
Return Type
ATMO_Status_t