API  2.3.0
TSmarT Software Library
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages

Functions

int8_t TSMART_MSAL_Init (tsmart_msal_t *TSMART_MSAL, tsmart_msal_config_t *TSMART_MSAL_config)
 Initialize Multi Sensor Adapter board. More...
 
int8_t TSMART_MSAL_Activate (tsmart_msal_t *TSMART_MSAL, tsmart_msal_flag_t TSMART_MSAL_state)
 Initialize Multi Sensor Adapter board. More...
 
int8_t TSMART_MSAL_Connect (tsmart_msal_t *TSMART_MSAL, tsmart_msal_select_t TSMART_MSAL_select)
 Link sensor in the MSAL. More...
 
uint16_t TSMART_MSAL_GetAnalogValue (tsmart_msal_t *TSMART_MSAL, tsmart_msal_select_t TSMART_MSAL_select)
 Read the value form a sensor connected to the MSAL board. More...
 
int8_t TSMART_MSAL_GetDigitalValue (tsmart_msal_t *TSMART_MSAL, tsmart_msal_select_t TSMART_MSAL_select)
 Read the value form a sensor connected to the MSAL board. More...
 
int8_t TSMART_MSAL_SetDigitalValue (tsmart_msal_t *TSMART_MSAL, tsmart_msal_select_t TSMART_MSAL_select)
 Set the value form a sensor connected to the MSAL board. More...
 
int8_t TSMART_MSAL_ResetDigitalValue (tsmart_msal_t *TSMART_MSAL, tsmart_msal_select_t TSMART_MSAL_select)
 Reset the value form a sensor connected to the MSAL board. More...
 
int8_t TSMART_MSAL_Wfi (tsmart_msal_t *TSMART_MSAL, tsmart_msal_select_t TSMART_MSAL_select, uint32_t TSMART_MSAL_timeout)
 Wait for falling interrupt on a digital input. More...
 

Detailed Description

Function Documentation

int8_t TSMART_MSAL_Activate ( tsmart_msal_t TSMART_MSAL,
tsmart_msal_flag_t  TSMART_MSAL_state 
)

Initialize Multi Sensor Adapter board.

Examples:
msal_current.c, msal_digital.c, and msal_voltage.c.
int8_t TSMART_MSAL_Connect ( tsmart_msal_t TSMART_MSAL,
tsmart_msal_select_t  TSMART_MSAL_select 
)

Link sensor in the MSAL.

This function establishes the connection between the a selected MSAL I/Os with a TSmarT dedicated pin.

Parameters
TSMART_MSALMulti Sensor Adapter board structure handler.
TSMART_MSAL_selectInput selected.
Returns
  • TSMART_PASS - OK.
Examples:
msal_current.c, and msal_voltage.c.
uint16_t TSMART_MSAL_GetAnalogValue ( tsmart_msal_t TSMART_MSAL,
tsmart_msal_select_t  TSMART_MSAL_select 
)

Read the value form a sensor connected to the MSAL board.

Parameters
TSMART_MSALMulti Sensor Adapter board structure handler.
TSMART_MSAL_selectInput selected.
Returns
  • MSAL value (from 0 to 10v or 4 to 20 mA ).
  • TSMART_FAIL if Input Selected error
Examples:
msal_current.c, and msal_voltage.c.
int8_t TSMART_MSAL_GetDigitalValue ( tsmart_msal_t TSMART_MSAL,
tsmart_msal_select_t  TSMART_MSAL_select 
)

Read the value form a sensor connected to the MSAL board.

Parameters
TSMART_MSALMulti Sensor Adapter board structure handler.
TSMART_MSAL_selectInput selected.
Returns
  • MSAL Digital value
  • TSMART_FAIL if Input Selected error
Examples:
msal_digital.c.
int8_t TSMART_MSAL_Init ( tsmart_msal_t TSMART_MSAL,
tsmart_msal_config_t TSMART_MSAL_config 
)

Initialize Multi Sensor Adapter board.

This functions initializes the hardware configuration of the Multi Sensor Adapter board and the associated OS mechanisms.

Parameters
TSMART_MSALMSAL Multi Sensor Adapter board structure handler.
TSMART_MSAL_configMSAL Multi Sensor Adapter board structure handler.
Returns
  • TSMART_PASS - OK.
Examples:
msal_current.c, msal_digital.c, and msal_voltage.c.
int8_t TSMART_MSAL_ResetDigitalValue ( tsmart_msal_t TSMART_MSAL,
tsmart_msal_select_t  TSMART_MSAL_select 
)

Reset the value form a sensor connected to the MSAL board.

Parameters
TSMART_MSALMulti Sensor Adapter board structure handler.
TSMART_MSAL_selectInput selected.
Returns
  • TSMART_FAIL if Input Selected error
int8_t TSMART_MSAL_SetDigitalValue ( tsmart_msal_t TSMART_MSAL,
tsmart_msal_select_t  TSMART_MSAL_select 
)

Set the value form a sensor connected to the MSAL board.

Parameters
TSMART_MSALMulti Sensor Adapter board structure handler.
TSMART_MSAL_selectInput selected.
Returns
  • TSMART_FAIL if Input Selected error
Examples:
msal_digital.c.
int8_t TSMART_MSAL_Wfi ( tsmart_msal_t TSMART_MSAL,
tsmart_msal_select_t  TSMART_MSAL_select,
uint32_t  TSMART_MSAL_timeout 
)

Wait for falling interrupt on a digital input.

Parameters
TSMART_MSALMulti Sensor Adapter board structure handler.
TSMART_MSAL_selectDigital Input selected.
TSMART_MSAL_timeoutMax. time to wait for the interrupt (in miliseconds).
Returns
  • TSMART_PASS - If there was an interrupt
  • TSMART_FAIL - If timeout expired
Examples:
msal_digital.c.