canfd 2.0.0.0
Public function

Functions

void canfd_cfg_setup (canfd_cfg_t *cfg)
 Config Object Initialization function.
 
CANFD_RETVAL canfd_init (canfd_t *ctx, canfd_cfg_t *cfg)
 Initialization function.
 
void canfd_set_wke_pin (canfd_t *ctx, uint8_t state)
 Set WKE ( wake-up ) pin state.
 
void canfd_set_stb_pin (canfd_t *ctx, uint8_t state)
 Set RST ( reset ) pin state.
 
uint8_t canfd_get_err_pin (canfd_t *ctx)
 Set ERR ( INT ) pin state.
 
void canfd_set_stand_by_stb_pin (canfd_t *ctx, uint8_t stb_state)
 Set STB ( RST ) pin state.
 
void canfd_set_mode_en_pin (canfd_t *ctx, uint8_t en_state)
 Set EN ( CS ) pin state.
 
void canfd_generic_write (canfd_t *ctx, char *data_buf, uint16_t len)
 Generic write function.
 
int32_t canfd_generic_read (canfd_t *ctx, char *data_buf, uint16_t max_len)
 Generic read function.
 
void canfd_set_operating_mode (canfd_t *ctx, uint8_t op_mode)
 Operation mode.
 

Detailed Description

Function Documentation

◆ canfd_cfg_setup()

void canfd_cfg_setup ( canfd_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ canfd_generic_read()

int32_t canfd_generic_read ( canfd_t * ctx,
char * data_buf,
uint16_t max_len )

Generic read function.

Parameters
ctxClick object.
data_bufData buffer for read data.
max_lenThe maximum length of data that can be read.
Returns
Number of reads data.

◆ canfd_generic_write()

void canfd_generic_write ( canfd_t * ctx,
char * data_buf,
uint16_t len )

Generic write function.

Parameters
ctxClick object.
data_bufData buffer for sends.
lenNumber of bytes for sends.

◆ canfd_get_err_pin()

uint8_t canfd_get_err_pin ( canfd_t * ctx)

Set ERR ( INT ) pin state.

Parameters
ctxClick object.
statePin state ( 1 or 0 ).

◆ canfd_init()

CANFD_RETVAL canfd_init ( canfd_t * ctx,
canfd_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ canfd_set_mode_en_pin()

void canfd_set_mode_en_pin ( canfd_t * ctx,
uint8_t en_state )

Set EN ( CS ) pin state.

Parameters
ctxClick object.
stb_statePin state ( 1 or 0 ).

◆ canfd_set_operating_mode()

void canfd_set_operating_mode ( canfd_t * ctx,
uint8_t op_mode )

Operation mode.

Parameters
ctxClick object.
op_modeMode.

◆ canfd_set_stand_by_stb_pin()

void canfd_set_stand_by_stb_pin ( canfd_t * ctx,
uint8_t stb_state )

Set STB ( RST ) pin state.

Parameters
ctxClick object.
stb_statePin state ( 1 or 0 ).

◆ canfd_set_stb_pin()

void canfd_set_stb_pin ( canfd_t * ctx,
uint8_t state )

Set RST ( reset ) pin state.

Parameters
ctxClick object.
statePin state ( 1 or 0 ).

◆ canfd_set_wke_pin()

void canfd_set_wke_pin ( canfd_t * ctx,
uint8_t state )

Set WKE ( wake-up ) pin state.

Parameters
ctxClick object.
statePin state ( 1 or 0 ).