canbus 2.0.0.0
canbus.h File Reference

This file contains API for CAN Bus 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  canbus_t
 CAN Bus Click context object. More...
 
struct  canbus_cfg_t
 CAN Bus Click configuration object. More...
 

Macros

#define DRV_BUFFER_SIZE   200
 CAN Bus driver buffer size.
 
#define CANBUS_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  canbus_return_value_t { CANBUS_OK = 0 , CANBUS_ERROR = -1 }
 CAN Bus Click return value data. More...
 

Functions

void canbus_cfg_setup (canbus_cfg_t *cfg)
 CAN Bus configuration object setup function.
 
err_t canbus_init (canbus_t *ctx, canbus_cfg_t *cfg)
 CAN Bus initialization function.
 
err_t canbus_default_cfg (canbus_t *ctx)
 CAN Bus default configuration function.
 
err_t canbus_generic_write (canbus_t *ctx, char *data_buf, uint16_t len)
 CAN Bus data writing function.
 
err_t canbus_generic_read (canbus_t *ctx, char *data_buf, uint16_t max_len)
 CAN Bus data reading function.
 
err_t canbus_set_low_current_standby_mode (canbus_t *ctx)
 CAN Bus low current standby mode function.
 
err_t canbus_set_high_speed_mode (canbus_t *ctx)
 CAN Bus high speed mode function.
 
err_t canbus_send_data (canbus_t *ctx, char *tx_data)
 CAN Bus send data function.
 

Detailed Description

This file contains API for CAN Bus Click Driver.

Enumeration Type Documentation

◆ canbus_return_value_t

CAN Bus Click return value data.

Predefined enum values for driver return values.

Enumerator
CANBUS_OK 
CANBUS_ERROR