terminal2 2.0.0.0
Terminal 2 Click Driver

API for configuring and manipulating Terminal 2 Click driver. More...

Topics

 Terminal 2 MikroBUS Map
 MikroBUS pin mapping of Terminal 2 Click driver.
 

Functions

void terminal2_cfg_setup (terminal2_cfg_t *cfg)
 Terminal 2 configuration object setup function.
 
err_t terminal2_init (terminal2_t *ctx, terminal2_cfg_t *cfg)
 Terminal 2 initialization function.
 
void terminal2_set_pin_high (digital_out_t *pin)
 Terminal 2 set pin high function.
 
void terminal2_set_pin_low (digital_out_t *pin)
 Terminal 2 set pin low function.
 
void terminal2_toggle_pin (digital_out_t *pin)
 Terminal 2 toggle pin function.
 
void terminal2_set_all_pins_high (terminal2_t *ctx)
 Terminal 2 set all pins high function.
 
void terminal2_set_all_pins_low (terminal2_t *ctx)
 Terminal 2 set all pins low function.
 
void terminal2_toggle_all_pins (terminal2_t *ctx)
 Terminal 2 toggle all pins function.
 

Detailed Description

API for configuring and manipulating Terminal 2 Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ terminal2_cfg_setup()

void terminal2_cfg_setup ( terminal2_cfg_t * cfg)

Terminal 2 configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See terminal2_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ terminal2_init()

err_t terminal2_init ( terminal2_t * ctx,
terminal2_cfg_t * cfg )

Terminal 2 initialization function.

This function initializes all necessary pins and peripherals used for this click board.

Parameters
[out]ctx: Click context object. See terminal2_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See terminal2_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ terminal2_set_all_pins_high()

void terminal2_set_all_pins_high ( terminal2_t * ctx)

Terminal 2 set all pins high function.

This function sets all terminal pins to high logic level.

Parameters
[in]ctx: Click context object. See terminal2_t object definition for detailed explanation.
Note
None.

◆ terminal2_set_all_pins_low()

void terminal2_set_all_pins_low ( terminal2_t * ctx)

Terminal 2 set all pins low function.

This function sets all terminal pins to low logic level.

Parameters
[in]ctx: Click context object. See terminal2_t object definition for detailed explanation.
Note
None.

◆ terminal2_set_pin_high()

void terminal2_set_pin_high ( digital_out_t * pin)

Terminal 2 set pin high function.

This function sets the specified pin to high logic level.

Parameters
[in]pinPointer to digital out pin structure from click context object. See #digital_out_t object definition for detailed explanation.
Note
The pin address should be acquired in the following way: { &click.pin }

◆ terminal2_set_pin_low()

void terminal2_set_pin_low ( digital_out_t * pin)

Terminal 2 set pin low function.

This function sets the specified pin to low logic level.

Parameters
[in]pinPointer to digital out pin structure from click context object. See #digital_out_t object definition for detailed explanation.
Note
The pin address should be acquired in the following way: { &click.pin }

◆ terminal2_toggle_all_pins()

void terminal2_toggle_all_pins ( terminal2_t * ctx)

Terminal 2 toggle all pins function.

This function toggles all terminal pins logic level.

Parameters
[in]ctx: Click context object. See terminal2_t object definition for detailed explanation.
Note
None.

◆ terminal2_toggle_pin()

void terminal2_toggle_pin ( digital_out_t * pin)

Terminal 2 toggle pin function.

This function toggles the specified pin logic level.

Parameters
[in]pinPointer to digital out pin structure from click context object. See #digital_out_t object definition for detailed explanation.
Note
The pin address should be acquired in the following way: { &click.pin }