scanner 2.0.0.0
|
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. | |
void scanner_cfg_setup | ( | scanner_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void scanner_clock | ( | scanner_t * | ctx | ) |
Pulse function.
ctx | Click object. |
@description Function is used to make SCK pulse.
uint8_t scanner_get_sdo | ( | scanner_t * | ctx | ) |
Get SDO Pin state function.
ctx | Click object. |
@description Function is used to get pin state.
SCANNER_RETVAL scanner_init | ( | scanner_t * | ctx, |
scanner_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void scanner_read_pixel | ( | scanner_t * | ctx, |
uint8_t * | pixel_data ) |
Read pixels.
ctx | Click object. |
pixel_data | Pixel buffer data. |
@description Function is used to read pixel status.
void scanner_serial_cmd | ( | scanner_t * | ctx, |
uint8_t | cmd ) |
Write function.
ctx | Click object. |
cmd | Write cmd. |
@description Function is used to write command to the device.
uint8_t scanner_serial_read_reg | ( | scanner_t * | ctx, |
uint8_t | reg_adr ) |
Read function.
ctx | Click object. |
reg_adr | Register address. |
@description Function is used to read from the device.
void scanner_serial_write_reg | ( | scanner_t * | ctx, |
uint8_t | reg_adr, | ||
uint8_t | write_data ) |
Write function.
ctx | Click object. |
reg_adr | Register address. |
write_data | Data to be written. |
@description Function is used to write to the device.
void scanner_set_sdi | ( | scanner_t * | ctx, |
uint8_t | sdi_mode ) |
Set SDI Pin function.
ctx | Click object. |
sdi_mode | Defines state of the pin.
|
@description Function is used to maipulate the state of the SDI pin.
void scanner_startup | ( | scanner_t * | ctx | ) |
Start function.
ctx | Click object. |
@description Function is used to start up the linear array sensor.