canisolator3 2.1.0.0
CAN Isolator 3 Click Driver

API for configuring and manipulating CAN Isolator 3 Click driver. More...

Topics

 CAN Isolator 3 Device Settings
 Settings for registers of CAN Isolator 3 Click driver.
 
 CAN Isolator 3 MikroBUS Map
 MikroBUS pin mapping of CAN Isolator 3 Click driver.
 

Functions

void canisolator3_cfg_setup (canisolator3_cfg_t *cfg)
 CAN Isolator 3 configuration object setup function.
 
err_t canisolator3_init (canisolator3_t *ctx, canisolator3_cfg_t *cfg)
 CAN Isolator 3 initialization function.
 
void canisolator3_default_cfg (canisolator3_t *ctx)
 CAN Isolator 3 default configuration function.
 
err_t canisolator3_generic_write (canisolator3_t *ctx, uint8_t *data_in, uint16_t len)
 CAN Isolator 3 data writing function.
 
err_t canisolator3_generic_read (canisolator3_t *ctx, uint8_t *data_out, uint16_t len)
 CAN Isolator 3 data reading function.
 
void canisolator3_set_pol_pin (canisolator3_t *ctx, uint8_t pin_state)
 CAN Isolator 3 set polarity function.
 

Detailed Description

API for configuring and manipulating CAN Isolator 3 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

◆ canisolator3_cfg_setup()

void canisolator3_cfg_setup ( canisolator3_cfg_t * cfg)

CAN Isolator 3 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ canisolator3_default_cfg()

void canisolator3_default_cfg ( canisolator3_t * ctx)

CAN Isolator 3 default configuration function.

This function executes a default configuration of CAN Isolator 3 click board.

Parameters
[in]ctx: Click context object. See canisolator3_t object definition for detailed explanation.
Returns
Nothing.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ canisolator3_generic_read()

err_t canisolator3_generic_read ( canisolator3_t * ctx,
uint8_t * data_out,
uint16_t len )

CAN Isolator 3 data reading function.

This function reads a desired number of data bytes by using UART serial interface.

Parameters
[in]ctx: Click context object. See canisolator3_t object definition for detailed explanation.
[out]data_out: Output read data.
[in]len: Number of bytes to be read.
Returns
  • >0 - Number of data bytes read,
  • <=0 - Error/Empty Ring buffer. See #err_t definition for detailed explanation.
Note
None.

◆ canisolator3_generic_write()

err_t canisolator3_generic_write ( canisolator3_t * ctx,
uint8_t * data_in,
uint16_t len )

CAN Isolator 3 data writing function.

This function writes a desired number of data bytes by using UART serial interface.

Parameters
[in]ctx: Click context object. See canisolator3_t object definition for detailed explanation.
[in]data_in: Data buffer for sending.
[in]len: Number of bytes for sending.
Returns
  • >=0 - Success,
  • <0 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ canisolator3_init()

err_t canisolator3_init ( canisolator3_t * ctx,
canisolator3_cfg_t * cfg )

CAN Isolator 3 initialization function.

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

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

◆ canisolator3_set_pol_pin()

void canisolator3_set_pol_pin ( canisolator3_t * ctx,
uint8_t pin_state )

CAN Isolator 3 set polarity function.

This function is used to select CAN High and CAN Low output.

Parameters
[in]ctx: Click context object. See canisolator3_t object definition for detailed explanation.
[in]pin_state: Polarity pin state.
Returns
Nothing.
Note
None.