scanner 2.0.0.0
|
This file contains API for Scanner Click driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
Go to the source code of this file.
Data Structures | |
struct | scanner_t |
Click ctx object definition. More... | |
struct | scanner_cfg_t |
Click configuration structure definition. More... | |
Macros | |
#define | SCANNER_MAP_MIKROBUS(cfg, mikrobus) |
#define | SCANNER_RETVAL uint8_t |
#define | SCANNER_OK 0x00 |
#define | SCANNER_INIT_ERROR 0xFF |
#define | SCANNER_REG_OFFSET_LEFT 0x00 |
#define | SCANNER_REG_GAIN_LEFT 0x01 |
#define | SCANNER_REG_OFFSET_CENTER 0x02 |
#define | SCANNER_REG_GAIN_CENTER 0x03 |
#define | SCANNER_REG_OFFSET_RIGHT 0x04 |
#define | SCANNER_REG_GAIN_RIGHT 0x05 |
#define | SCANNER_REG_MODE 0x1F |
#define | SCANNER_CMD_IRESET 0x00 |
#define | SCANNER_CMD_RESET 0x1B |
#define | SCANNER_CMD_STARTINT 0x08 |
#define | SCANNER_CMD_SAMPLEINT 0x10 |
#define | SCANNER_CMD_READPIXEL 0x02 |
#define | SCANNER_CMD_ABORTPIXEL 0x19 |
#define | SCANNER_CMD_READHOLD 0x12 |
#define | SCANNER_CMD_READHOLD_START 0x16 |
#define | SCANNER_CMD_REGWRITE 0x40 |
#define | SCANNER_CMD_REGREAD 0x60 |
#define | SCANNER_DATA_SLEEP_MODE 0x10 |
#define | SCANNER_DATA_NORMAL_MODE 0x00 |
Functions | |
void | scanner_cfg_setup (scanner_cfg_t *cfg) |
Config Object Initialization function. | |
SCANNER_RETVAL | scanner_init (scanner_t *ctx, scanner_cfg_t *cfg) |
Initialization function. | |
void | scanner_set_sdi (scanner_t *ctx, uint8_t sdi_mode) |
Set SDI Pin function. | |
uint8_t | scanner_get_sdo (scanner_t *ctx) |
Get SDO Pin state function. | |
void | scanner_clock (scanner_t *ctx) |
Pulse function. | |
void | scanner_serial_cmd (scanner_t *ctx, uint8_t cmd) |
Write function. | |
uint8_t | scanner_serial_read_reg (scanner_t *ctx, uint8_t reg_adr) |
Read function. | |
void | scanner_serial_write_reg (scanner_t *ctx, uint8_t reg_adr, uint8_t write_data) |
Write function. | |
void | scanner_startup (scanner_t *ctx) |
Start function. | |
void | scanner_read_pixel (scanner_t *ctx, uint8_t *pixel_data) |
Read pixels. | |
This file contains API for Scanner Click driver.