canfd5 2.0.0.0
canfd5.h File Reference

This file contains API for CAN FD 5 Click driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_uart.h"

Go to the source code of this file.

Data Structures

struct  canfd5_t
 Click ctx object definition. More...
 
struct  canfd5_cfg_t
 Click configuration structure definition. More...
 

Macros

#define CANFD5_MAP_MIKROBUS(cfg, mikrobus)
 
#define CANFD5_RETVAL   uint8_t
 
#define CANFD5_OK   0x00
 
#define CANFD5_INIT_ERROR   0xFF
 
#define DRV_RX_BUFFER_SIZE   500
 
#define CANFD5_PIN_STATE_DISABLE   0x00
 
#define CANFD5_PIN_STATE_ENABLE   0x01
 
#define CANFD5_OPERATING_MODE_NORMAL   0x00
 
#define CANFD5_OPERATING_MODE_STAND_BY   0x01
 
#define CANFD5_OPERATING_MODE_SLEEP   0x02
 

Typedefs

typedef uint8_t canfd5_error_t
 Error type.
 

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

This file contains API for CAN FD 5 Click driver.