39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
73#define ATA6571_OPERATING_MODE_SLEEP 0x00
74#define ATA6571_OPERATING_MODE_STANDBY 0x01
75#define ATA6571_OPERATING_MODE_SILENT 0x02
76#define ATA6571_OPERATING_MODE_NORMAL 0x03
82#define ATA6571_PIN_STATE_LOW 0x00
83#define ATA6571_PIN_STATE_HIGH 0x01
90#define DRV_BUFFER_SIZE 200
108#define ATA6571_MAP_MIKROBUS( cfg, mikrobus ) \
109 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
110 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
111 cfg.nstb = MIKROBUS( mikrobus, MIKROBUS_AN ); \
112 cfg.nerr = MIKROBUS( mikrobus, MIKROBUS_RST ); \
113 cfg.en = MIKROBUS( mikrobus, MIKROBUS_CS );
ata6571_return_value_t
ATA6571 Click return value data.
Definition ata6571.h:169
@ ATA6571_OK
Definition ata6571.h:170
@ ATA6571_ERROR
Definition ata6571.h:171
#define DRV_BUFFER_SIZE
ATA6571 driver buffer size.
Definition ata6571.h:90
void ata6571_cfg_setup(ata6571_cfg_t *cfg)
ATA6571 configuration object setup function.
err_t ata6571_init(ata6571_t *ctx, ata6571_cfg_t *cfg)
ATA6571 initialization function.
uint8_t ata6571_get_nerr_pin(ata6571_t *ctx)
ATA6571 get error and power-on indication output function.
err_t ata6571_generic_write(ata6571_t *ctx, char *data_buf, uint16_t len)
ATA6571 data writing function.
void ata6571_set_en_pin(ata6571_t *ctx, uint8_t state)
ATA6571 set power control function.
void ata6571_set_nstb_pin(ata6571_t *ctx, uint8_t state)
ATA6571 set standby mode control function.
err_t ata6571_generic_read(ata6571_t *ctx, char *data_buf, uint16_t max_len)
ATA6571 data reading function.
void ata6571_set_operating_mode(ata6571_t *ctx, uint8_t op_mode)
ATA6571 set operating mode function.
ATA6571 Click configuration object.
Definition ata6571.h:145
uint32_t baud_rate
Definition ata6571.h:156
pin_name_t nstb
Definition ata6571.h:151
bool uart_blocking
Definition ata6571.h:157
pin_name_t nerr
Definition ata6571.h:152
uart_data_bits_t data_bit
Definition ata6571.h:158
pin_name_t tx_pin
Definition ata6571.h:148
pin_name_t rx_pin
Definition ata6571.h:147
uart_stop_bits_t stop_bit
Definition ata6571.h:160
pin_name_t en
Definition ata6571.h:153
uart_parity_t parity_bit
Definition ata6571.h:159
ATA6571 Click context object.
Definition ata6571.h:123
digital_out_t nstb
Definition ata6571.h:125
uart_t uart
Definition ata6571.h:132
digital_out_t en
Definition ata6571.h:126
digital_in_t nerr
Definition ata6571.h:129