ata6570 2.0.0.0
ata6570.h File Reference

This file contains API for ATA6570 Click driver. More...

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

Go to the source code of this file.

Data Structures

struct  ata6570_t
 Click ctx object definition. More...
 
struct  ata6570_cfg_t
 Click configuration structure definition. More...
 

Macros

#define ATA6570_MAP_MIKROBUS(cfg, mikrobus)
 
#define ATA6570_RETVAL   uint8_t
 
#define ATA6570_OK   0x00
 
#define ATA6570_INIT_ERROR   0xFF
 
#define DRV_RX_BUFFER_SIZE   500
 
#define ATA6570_DMCR   0x01
 
#define ATA6570_DMSR   0x03
 
#define ATA6570_SECR   0x04
 
#define ATA6570_GPM0   0x06
 
#define ATA6570_GPM1   0x07
 
#define ATA6570_GPM2   0x08
 
#define ATA6570_GPM3   0x09
 
#define ATA6570_RWPR   0x0A
 
#define ATA6570_TRXCR   0x20
 
#define ATA6570_TRXSR   0x22
 
#define ATA6570_TRXECR   0x23
 
#define ATA6570_DRCR   0x26
 
#define ATA6570_CIDR0   0x27
 
#define ATA6570_CIDR1   0x28
 
#define ATA6570_CIDR2   0x29
 
#define ATA6570_CIDR3   0x2A
 
#define ATA6570_CIDMR0   0x2B
 
#define ATA6570_CIDMR1   0x2C
 
#define ATA6570_CIDMR2   0x2D
 
#define ATA6570_CIDMR3   0x2E
 
#define ATA6570_CFCR   0x2F
 
#define ATA6570_BFECR   0x32
 
#define ATA6570_BFIR   0x33
 
#define ATA6570_TRXECR2   0x34
 
#define ATA6570_TRXESR2   0x35
 
#define ATA6570_WDCR1   0x36
 
#define ATA6570_WDCR2   0x37
 
#define ATA6570_WDSR   0x38
 
#define ATA6570_WDTRIG   0x39
 
#define ATA6570_EFCR   0x3A
 
#define ATA6570_FECR   0x3B
 
#define ATA6570_GLFT   0x67
 
#define ATA6570_CDMR0   0x68
 
#define ATA6570_CDMR1   0x69
 
#define ATA6570_CDMR2   0x6A
 
#define ATA6570_CDMR3   0x6B
 
#define ATA6570_CDMR4   0x6C
 
#define ATA6570_CDMR5   0x6D
 
#define ATA6570_CDMR6   0x6E
 
#define ATA6570_CDMR7   0x6F
 
#define ATA6570_PWKS   0x4B
 
#define ATA6570_WKECR   0x4C
 
#define ATA6570_GESR   0x60
 
#define ATA6570_SESR   0x61
 
#define ATA6570_WKESR   0x64
 
#define ATA6570_DIDR   0x7E
 
#define ATA6570_FUDI   0x70
 
#define ATA6570_FUDO   0x71
 
#define ATA6570_FUSEL   0x72
 
#define ATA6570_BGCAL   0x73
 
#define ATA6570_FRCCAL   0x74
 
#define ATA6570_HRCCALL   0x75
 
#define ATA6570_HRCCALH   0x76
 
#define ATA6570_OPMODE_SLEEP   0x01
 
#define ATA6570_OPMODE_STBY   0x04
 
#define ATA6570_OPMODE_NORMAL   0x07
 

Functions

void ata6570_cfg_setup (ata6570_cfg_t *cfg)
 Config Object Initialization function.
 
ATA6570_RETVAL ata6570_init (ata6570_t *ctx, ata6570_cfg_t *cfg)
 Initialization function.
 
void ata6570_generic_transfer (ata6570_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len)
 Generic transfer function.
 
void ata6570_generic_write (ata6570_t *ctx, char *data_buf, uint16_t len)
 Generic write function.
 
int32_t ata6570_generic_read (ata6570_t *ctx, char *data_buf, uint16_t max_len)
 Generic read function.
 
void ata6570_write_reg (ata6570_t *ctx, const uint8_t address, uint8_t input)
 Write Register.
 
uint8_t ata6570_read_reg (ata6570_t *ctx, const uint8_t address)
 Read Register.
 

Detailed Description

This file contains API for ATA6570 Click driver.