dmx 2.0.0.0
Public function

Functions

void dmx_cfg_setup (dmx_cfg_t *cfg)
 Config Object Initialization function.
 
err_t dmx_init (dmx_t *ctx, dmx_cfg_t *cfg)
 Initialization function.
 
void dmx_reset (dmx_t *ctx, uint8_t dev_mode)
 Reset function.
 
void dmx_generic_write (dmx_t *ctx, uint8_t *data_buf, uint16_t len)
 Generic write function.
 
err_t dmx_generic_read (dmx_t *ctx, uint8_t *data_buf, uint16_t max_len)
 Generic read function.
 
void dmx_send_cmd (dmx_t *ctx, uint8_t *cmd)
 Send command function.
 
void dmx_run (dmx_t *ctx, uint8_t run_mode)
 Mode Setting function.
 
uint8_t dmx_check_int (dmx_t *ctx)
 Interrupt Check function.
 
void dmx_set_reset (dmx_t *ctx, uint8_t state)
 Reset Setting function.
 
void dmx_set_auto_baud_rate (dmx_t *ctx, uint8_t state)
 Auto Baud Rate Setting function.
 

Detailed Description

Function Documentation

◆ dmx_cfg_setup()

void dmx_cfg_setup ( dmx_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ dmx_check_int()

uint8_t dmx_check_int ( dmx_t * ctx)

Interrupt Check function.

Parameters
ctxClick object.
Returns
0 - inactive state, 1 - active state

This function checks the interrupt state.

◆ dmx_generic_read()

err_t dmx_generic_read ( dmx_t * ctx,
uint8_t * 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.

◆ dmx_generic_write()

void dmx_generic_write ( dmx_t * ctx,
uint8_t * data_buf,
uint16_t len )

Generic write function.

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

◆ dmx_init()

err_t dmx_init ( dmx_t * ctx,
dmx_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ dmx_reset()

void dmx_reset ( dmx_t * ctx,
uint8_t dev_mode )

Reset function.

Parameters
ctxClick object.

◆ dmx_run()

void dmx_run ( dmx_t * ctx,
uint8_t run_mode )

Mode Setting function.

Parameters
ctxClick object.
run_mode0 - config mode, 1 - run mode

This function allows user to put device in config or run mode.

Note
Config mode must be set when user wants to execute device configuration. When run mode is set, the data transfer is started.

◆ dmx_send_cmd()

void dmx_send_cmd ( dmx_t * ctx,
uint8_t * cmd )

Send command function.

Parameters
ctxClick object.
cmdCommand to be sent.

◆ dmx_set_auto_baud_rate()

void dmx_set_auto_baud_rate ( dmx_t * ctx,
uint8_t state )

Auto Baud Rate Setting function.

Parameters
ctxClick object.
stateABR pin state.

This function sets auto (default) baud rate.

Note
The default baud rate is 115200 bps.

◆ dmx_set_reset()

void dmx_set_reset ( dmx_t * ctx,
uint8_t state )

Reset Setting function.

Parameters
ctxClick object.
stateRST pin state.

This function sets reset pin state.