ata6571 2.0.0.0
|
API for configuring and manipulating ATA6571 Click driver. More...
Modules | |
ATA6571 Device Settings | |
Settings for ATA6571 Click driver. | |
ATA6571 MikroBUS Map | |
MikroBUS pin mapping of ATA6571 Click driver. | |
Functions | |
void | ata6571_cfg_setup (ata6571_cfg_t *cfg) |
ATA6571 configuration object setup function. More... | |
err_t | ata6571_init (ata6571_t *ctx, ata6571_cfg_t *cfg) |
ATA6571 initialization function. More... | |
err_t | ata6571_generic_write (ata6571_t *ctx, char *data_buf, uint16_t len) |
ATA6571 data writing function. More... | |
err_t | ata6571_generic_read (ata6571_t *ctx, char *data_buf, uint16_t max_len) |
ATA6571 data reading function. More... | |
void | ata6571_set_nstb_pin (ata6571_t *ctx, uint8_t state) |
ATA6571 set standby mode control function. More... | |
void | ata6571_set_en_pin (ata6571_t *ctx, uint8_t state) |
ATA6571 set power control function. More... | |
uint8_t | ata6571_get_nerr_pin (ata6571_t *ctx) |
ATA6571 get error and power-on indication output function. More... | |
void | ata6571_set_operating_mode (ata6571_t *ctx, uint8_t op_mode) |
ATA6571 set operating mode function. More... | |
API for configuring and manipulating ATA6571 Click driver.
void ata6571_cfg_setup | ( | ata6571_cfg_t * | cfg | ) |
ATA6571 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See ata6571_cfg_t object definition for detailed explanation. |
err_t ata6571_generic_read | ( | ata6571_t * | ctx, |
char * | data_buf, | ||
uint16_t | max_len | ||
) |
ATA6571 data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See ata6571_t object definition for detailed explanation. |
[out] | data_buf | : Output read data. |
[in] | max_len | : Number of bytes to be read. |
>0
- Number of data bytes read, <=0
- Error/Empty Ring buffer.err_t ata6571_generic_write | ( | ata6571_t * | ctx, |
char * | data_buf, | ||
uint16_t | len | ||
) |
ATA6571 data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See ata6571_t object definition for detailed explanation. |
[in] | data_buf | : Data buffer for sending. |
[in] | len | : Number of bytes for sending. |
>=0
- Success, <0
- Error.uint8_t ata6571_get_nerr_pin | ( | ata6571_t * | ctx | ) |
ATA6571 get error and power-on indication output function.
This function returns the NERR pin state which is an error and power-on indicator.
[in] | ctx | : Click context object. See ata6571_t object definition for detailed explanation. |
err_t ata6571_init | ( | ata6571_t * | ctx, |
ata6571_cfg_t * | cfg | ||
) |
ATA6571 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See ata6571_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See ata6571_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.void ata6571_set_en_pin | ( | ata6571_t * | ctx, |
uint8_t | state | ||
) |
ATA6571 set power control function.
This function sets power control by setting the EN pin.
[in] | ctx | : Click context object. See ata6571_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
void ata6571_set_nstb_pin | ( | ata6571_t * | ctx, |
uint8_t | state | ||
) |
ATA6571 set standby mode control function.
This function sets standby mode by setting the NSTB pin.
[in] | ctx | : Click context object. See ata6571_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
void ata6571_set_operating_mode | ( | ata6571_t * | ctx, |
uint8_t | op_mode | ||
) |
ATA6571 set operating mode function.
This function sets the device operating mode by controlling the EN and NSTB pins.
[in] | ctx | : Click context object. See ata6571_t object definition for detailed explanation. |
[in] | op_mode | - 0x00 ( ATA6571_OPERATING_MODE_SLEEP ) : Sleep mode.
|