dotmatrixr 2.0.0.0
dotmatrixr.h File Reference

This file contains API for Dot-Matrix R Click driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_spi_master.h"

Go to the source code of this file.

Data Structures

struct  dotmatrixr_t
 Click ctx object definition. More...
 
struct  dotmatrixr_cfg_t
 Click configuration structure definition. More...
 

Macros

#define DOTMATRIXR_MAP_MIKROBUS(cfg, mikrobus)
 
#define DOTMATRIXR_RETVAL   uint8_t
 
#define DOTMATRIXR_OK   0x00
 
#define DOTMATRIXR_INIT_ERROR   0xFF
 
#define DOTMATRIXR_CTRL_BYTE_0_BRIGHTNESS_0   0x00
 
#define DOTMATRIXR_CTRL_BYTE_0_BRIGHTNESS_1p7   0x01
 
#define DOTMATRIXR_CTRL_BYTE_0_BRIGHTNESS_3p3   0x02
 
#define DOTMATRIXR_CTRL_BYTE_0_BRIGHTNESS_5   0x03
 
#define DOTMATRIXR_CTRL_BYTE_0_BRIGHTNESS_6p7   0x04
 
#define DOTMATRIXR_CTRL_BYTE_0_BRIGHTNESS_8p3   0x05
 
#define DOTMATRIXR_CTRL_BYTE_0_BRIGHTNESS_11p7   0x06
 
#define DOTMATRIXR_CTRL_BYTE_0_BRIGHTNESS_15   0x07
 
#define DOTMATRIXR_CTRL_BYTE_0_BRIGHTNESS_18   0x08
 
#define DOTMATRIXR_CTRL_BYTE_0_BRIGHTNESS_23   0x09
 
#define DOTMATRIXR_CTRL_BYTE_0_BRIGHTNESS_30   0x0A
 
#define DOTMATRIXR_CTRL_BYTE_0_BRIGHTNESS_37   0x0B
 
#define DOTMATRIXR_CTRL_BYTE_0_BRIGHTNESS_47   0x0C
 
#define DOTMATRIXR_CTRL_BYTE_0_BRIGHTNESS_60   0x0D
 
#define DOTMATRIXR_CTRL_BYTE_0_BRIGHTNESS_80   0x0E
 
#define DOTMATRIXR_CTRL_BYTE_0_BRIGHTNESS_100   0x0F
 
#define DOTMATRIXR_CTRL_BYTE_0_PIXEL_PEAK_CURRENT_4mA   0x20
 
#define DOTMATRIXR_CTRL_BYTE_0_PIXEL_PEAK_CURRENT_6p4mA   0x10
 
#define DOTMATRIXR_CTRL_BYTE_0_PIXEL_PEAK_CURRENT_9p3mA   0x00
 
#define DOTMATRIXR_CTRL_BYTE_0_PIXEL_PEAK_CURRENT_12p8mA   0x30
 
#define DOTMATRIXR_CTRL_BYTE_0_MODE_SLEEP   0x00
 
#define DOTMATRIXR_CTRL_BYTE_0_MODE_NORMAL   0x40
 
#define DOTMATRIXR_CTRL_BYTE_1_OSC_PRESCALER_1   0x80
 
#define DOTMATRIXR_CTRL_BYTE_1_OSC_PRESCALER_8   0x82
 
#define DOTMATRIXR_CTRL_BYTE_1_DOUT_D7   0x80
 
#define DOTMATRIXR_CTRL_BYTE_1_DOUT_DIN   0x81
 

Functions

void dotmatrixr_cfg_setup (dotmatrixr_cfg_t *cfg)
 Config Object Initialization function.
 
DOTMATRIXR_RETVAL dotmatrixr_init (dotmatrixr_t *ctx, dotmatrixr_cfg_t *cfg)
 Initialization function.
 
void dotmatrixr_generic_transfer (dotmatrixr_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len)
 Generic transfer function.
 
void dotmatrixr_set_bl_pin_state (dotmatrixr_t *ctx, uint8_t state)
 Sets BL pin to high or low state.
 
void dotmatrixr_set_rs_pin_state (dotmatrixr_t *ctx, uint8_t state)
 Sets RS pin to high or low state.
 
void dotmatrixr_set_rst_pin_state (dotmatrixr_t *ctx, uint8_t state)
 Sets RST pin to high or low state.
 
void dotmatrixr_restart (dotmatrixr_t *ctx)
 Restart device.
 
void dotmatrixr_ctrl_0 (dotmatrixr_t *ctx, uint8_t ctrl_byte)
 Function for writing control word 0.
 
void dotmatrixr_ctrl_1 (dotmatrixr_t *ctx, uint8_t ctrl_byte)
 Function for writing control word 1.
 
void dotmatrixr_write_ascii (dotmatrixr_t *ctx, char *ascii_data)
 Sets display to written value.
 

Detailed Description

This file contains API for Dot-Matrix R Click driver.