serializer 2.0.0.0
Serializer Click Driver

API for configuring and manipulating Serializer Click driver. More...

Topics

 Serializer Settings
 Settings of Serializer Click driver.
 
 Serializer MikroBUS Map
 MikroBUS pin mapping of Serializer Click driver.
 

Functions

void serializer_cfg_setup (serializer_cfg_t *cfg)
 Serializer configuration object setup function.
 
err_t serializer_init (serializer_t *ctx, serializer_cfg_t *cfg)
 Serializer initialization function.
 
uint8_t serializer_get_flt_pin (serializer_t *ctx)
 Serializer get FLT pin function.
 
err_t serializer_read_input (serializer_t *ctx, uint8_t *data_out)
 Serializer read input function.
 

Detailed Description

API for configuring and manipulating Serializer 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

◆ serializer_cfg_setup()

void serializer_cfg_setup ( serializer_cfg_t * cfg)

Serializer configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ serializer_get_flt_pin()

uint8_t serializer_get_flt_pin ( serializer_t * ctx)

Serializer get FLT pin function.

This function returns the fault pin logic state.

Parameters
[out]ctx: Click context object. See serializer_t object definition for detailed explanation.
Returns
Pin logic state.
Note
None.

◆ serializer_init()

err_t serializer_init ( serializer_t * ctx,
serializer_cfg_t * cfg )

Serializer initialization function.

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

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

◆ serializer_read_input()

err_t serializer_read_input ( serializer_t * ctx,
uint8_t * data_out )

Serializer read input function.

This function reads the input data by using SPI serial interface, and then checks the data integrity by verifying the CRC byte.

Parameters
[in]ctx: Click context object. See serializer_t object definition for detailed explanation.
[out]data_out: Input data byte read.
Returns
  • >=0 - Success with status bits flag,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.