dmx 2.0.0.0
dmx.h File Reference

This file contains API for DMX 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  dmx_t
 Click ctx object definition. More...
 
struct  dmx_cfg_t
 Click configuration structure definition. More...
 

Macros

#define DMX_MAP_MIKROBUS(cfg, mikrobus)
 
#define DMX_OK   0
 
#define DMX_ERROR   -1
 
#define DMX_ERROR_TIMEOUT   -2
 
#define DMX_RSP_OK   "OK"
 
#define DMX_RSP_ERROR   "ERR"
 
#define DMX_CMD_SADR   "@SADR,001\0"
 
#define DMX_CMD_BLEN   "@BLEN,006\0"
 
#define DMX_CMD_ITMR   "@ITMR,001\0"
 
#define DMX_CMD_FTMR   "@FTMR,001\0"
 
#define DMX_CMD_FLEN_MASTER   "@FLEN,010\0"
 
#define DMX_CMD_FLEN_SLAVE   "@FLEN,006\0"
 
#define DMX_CMD_SCOD   "@SCOD,000\0"
 
#define DMX_CMD_PURGEBFR   "!PURGEBFR\0"
 
#define DMX_CMD_STORECFG   "!STORECFG\0"
 
#define DMX_CMD_CLEARCFG   "!CLEARCFG\0"
 
#define DMX_CMD_DISPLCFG   "!DISPLCFG\0"
 
#define DMX_SLAVE   0
 
#define DMX_MASTER   1
 
#define DMX_CONFIG_MODE   0
 
#define DMX_RUN_MODE   1
 
#define DMX_INT_INACTIVE   0
 
#define DMX_INT_ACTIVE   1
 
#define DMX_DRV_RX_BUFFER_SIZE   300
 
#define DMX_DRV_TX_BUFFER_SIZE   100
 

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

This file contains API for DMX Click driver.