mcp2542 2.0.0.0
Public function

Functions

void mcp2542_cfg_setup (mcp2542_cfg_t *cfg)
 Config Object Initialization function.
 
MCP2542_RETVAL mcp2542_init (mcp2542_t *ctx, mcp2542_cfg_t *cfg)
 Initialization function.
 
void mcp2542_default_cfg (mcp2542_t *ctx)
 Click Default Configuration function.
 
void mcp2542_generic_multi_write (mcp2542_t *ctx, uint8_t *data_buf, uint8_t len)
 Generic multi write function.
 
void mcp2542_generic_multi_read (mcp2542_t *ctx, uint8_t *data_buf, uint8_t len)
 Generic multi read function.
 
uint8_t mcp2542_generic_single_read (mcp2542_t *ctx)
 Generic single read function.
 
void mcp2542_generic_single_write (mcp2542_t *ctx, uint8_t tx_data)
 Generic single write function.
 
void mcp2542_set_mode (mcp2542_t *ctx, uint8_t mode)
 Set device mode.
 

Detailed Description

Function Documentation

◆ mcp2542_cfg_setup()

void mcp2542_cfg_setup ( mcp2542_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.

◆ mcp2542_default_cfg()

void mcp2542_default_cfg ( mcp2542_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for USB_UART click.

◆ mcp2542_generic_multi_read()

void mcp2542_generic_multi_read ( mcp2542_t * ctx,
uint8_t * data_buf,
uint8_t len )

Generic multi read function.

Parameters
ctxClick object.
data_bufOutput data buffer.
lenNumber of the bytes in data buffer.

@description This function reads data.

◆ mcp2542_generic_multi_write()

void mcp2542_generic_multi_write ( mcp2542_t * ctx,
uint8_t * data_buf,
uint8_t len )

Generic multi write function.

Parameters
ctxClick object.
data_bufInput data buffer
lenNumber of the bytes in the data buffer

@description This function writes data.

◆ mcp2542_generic_single_read()

uint8_t mcp2542_generic_single_read ( mcp2542_t * ctx)

Generic single read function.

Parameters
ctxClick object.
Returns
one byte data

@description This function read one byte data.

◆ mcp2542_generic_single_write()

void mcp2542_generic_single_write ( mcp2542_t * ctx,
uint8_t tx_data )

Generic single write function.

Parameters
ctxClick object.
tx_dataInput data

@description This function write one byte data.

◆ mcp2542_init()

MCP2542_RETVAL mcp2542_init ( mcp2542_t * ctx,
mcp2542_cfg_t * cfg )

Initialization function.

Parameters
mcp2542Click object.
cfgClick configuration structure.

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

◆ mcp2542_set_mode()

void mcp2542_set_mode ( mcp2542_t * ctx,
uint8_t mode )

Set device mode.

Parameters
ctxClick object.
modeMode select.

@description This function set device mode.