canfd5 2.0.0.0
Public function

Functions

void canfd5_cfg_setup (canfd5_cfg_t *cfg)
 Config Object Initialization function.
 
CANFD5_RETVAL canfd5_init (canfd5_t *ctx, canfd5_cfg_t *cfg)
 Initialization function.
 
void canfd5_generic_write (canfd5_t *ctx, char *data_buf, uint16_t len)
 Generic write function.
 
int32_t canfd5_generic_read (canfd5_t *ctx, char *data_buf, uint16_t max_len)
 Generic read function.
 
void canfd5_set_slp_pin_state (canfd5_t *ctx, uint8_t slp_state)
 Set SLP pin state function.
 
void canfd5_set_wak_pin_state (canfd5_t *ctx, uint8_t wak_state)
 Set WAK pin state function.
 
uint8_t canfd5_get_cts_pin_state (canfd5_t *ctx)
 Set WAK pin state function.
 
void canfd5_set_normal_operating_mode (canfd5_t *ctx)
 Set normal operating mode function.
 
void canfd5_set_standby_operating_mode (canfd5_t *ctx)
 Set stand-by operating mode function.
 
void canfd5_set_sleep_operating_mode (canfd5_t *ctx)
 Set sleep operating mode function.
 
void canfd5_set_operating_mode (canfd5_t *ctx, uint8_t op_mode)
 Set operating mode function.
 

Detailed Description

Function Documentation

◆ canfd5_cfg_setup()

void canfd5_cfg_setup ( canfd5_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.

◆ canfd5_generic_read()

int32_t canfd5_generic_read ( canfd5_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.

◆ canfd5_generic_write()

void canfd5_generic_write ( canfd5_t * ctx,
char * data_buf,
uint16_t len )

Generic write function.

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

◆ canfd5_get_cts_pin_state()

uint8_t canfd5_get_cts_pin_state ( canfd5_t * ctx)

Set WAK pin state function.

Parameters
ctxClick object.
Returns
state of the CTS ( INT ) pin.

@description This function get state of the CTS ( INT ) pin of UJA1162A Self-supplied high-speed CAN transceiver on CAN FD 5 click board.

◆ canfd5_init()

CANFD5_RETVAL canfd5_init ( canfd5_t * ctx,
canfd5_cfg_t * cfg )

Initialization function.

Parameters
canfd5Click object.
cfgClick configuration structure.

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

◆ canfd5_set_normal_operating_mode()

void canfd5_set_normal_operating_mode ( canfd5_t * ctx)

Set normal operating mode function.

Parameters
ctxClick object.

@description This function set normal operating mode of UJA1162A Self-supplied high-speed CAN transceiver on CAN FD 5 click board.

◆ canfd5_set_operating_mode()

void canfd5_set_operating_mode ( canfd5_t * ctx,
uint8_t op_mode )

Set operating mode function.

Parameters
ctxClick object.
op_mode
  • 0 ( CANFD5_OPERATING_MODE_NORMAL ) : Normal mode;
  • 1 ( CANFD5_OPERATING_MODE_STAND_BY ) : Stand-by mode;
  • 2 ( CANFD5_OPERATING_MODE_SLEEP ) : Sleep mode;

@description This function set desired operating mode of UJA1162A Self-supplied high-speed CAN transceiver on CAN FD 5 click board.

◆ canfd5_set_sleep_operating_mode()

void canfd5_set_sleep_operating_mode ( canfd5_t * ctx)

Set sleep operating mode function.

Parameters
ctxClick object.

@description This function set sleep operating mode of UJA1162A Self-supplied high-speed CAN transceiver on CAN FD 5 click board.

◆ canfd5_set_slp_pin_state()

void canfd5_set_slp_pin_state ( canfd5_t * ctx,
uint8_t slp_state )

Set SLP pin state function.

Parameters
ctxClick object.
stb_state
  • 0 ( CANFD5_PIN_STATE_DISABLE ) : Disable.
  • 1 ( CANFD5_PIN_STATE_ENABLE ) : Enable.

@description This function set state of the SLP ( CS ) pin of UJA1162A Self-supplied high-speed CAN transceiver on CAN FD 5 click board.

◆ canfd5_set_standby_operating_mode()

void canfd5_set_standby_operating_mode ( canfd5_t * ctx)

Set stand-by operating mode function.

Parameters
ctxClick object.

@description This function set stand-by operating mode of UJA1162A Self-supplied high-speed CAN transceiver on CAN FD 5 click board.

◆ canfd5_set_wak_pin_state()

void canfd5_set_wak_pin_state ( canfd5_t * ctx,
uint8_t wak_state )

Set WAK pin state function.

Parameters
ctxClick object.
stb_state
  • 0 ( CANFD5_PIN_STATE_DISABLE ) : Disable.
  • 1 ( CANFD5_PIN_STATE_ENABLE ) : Enable.

@description This function set state of the WAK ( PWM ) pin of UJA1162A Self-supplied high-speed CAN transceiver on CAN FD 5 click board.