42#ifdef PREINIT_SUPPORTED
46#ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52#include "drv_digital_out.h"
53#include "drv_digital_in.h"
67#define TOUCHKEY2_MAP_MIKROBUS( cfg, mikrobus ) \
68 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
69 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
70 cfg.pc5_target_reset = MIKROBUS( mikrobus, MIKROBUS_RST );
77#define TOUCHKEY2_RETVAL uint8_t
79#define TOUCHKEY2_OK 0x00
80#define TOUCHKEY2_INIT_ERROR 0xFF
87#define DRV_RX_BUFFER_SIZE 500
#define DRV_RX_BUFFER_SIZE
Definition touchkey2.h:87
#define TOUCHKEY2_RETVAL
Definition touchkey2.h:77
void touchkey2_set_reset_pin(touchkey2_t *ctx)
Set reset pin function.
TOUCHKEY2_RETVAL touchkey2_init(touchkey2_t *ctx, touchkey2_cfg_t *cfg)
Initialization function.
void touchkey2_target_reset(touchkey2_t *ctx)
Reset function.
void touchkey2_cfg_setup(touchkey2_cfg_t *cfg)
Config Object Initialization function.
void touchkey2_generic_multi_write(touchkey2_t *ctx, char *data_buf, uint8_t len)
Generic multi write function.
char touchkey2_generic_single_read(touchkey2_t *ctx)
Generic single read function.
void touchkey2_clear_reset_pin(touchkey2_t *ctx)
Clear reset pin function.
void touchkey2_generic_single_write(touchkey2_t *ctx, char tx_data)
Generic single write function.
void touchkey2_generic_multi_read(touchkey2_t *ctx, char *data_buf, uint8_t len)
Generic multi read function.
Click configuration structure definition.
Definition touchkey2.h:120
uint32_t baud_rate
Definition touchkey2.h:129
bool uart_blocking
Definition touchkey2.h:130
uart_data_bits_t data_bit
Definition touchkey2.h:131
pin_name_t tx_pin
Definition touchkey2.h:124
pin_name_t rx_pin
Definition touchkey2.h:123
uart_stop_bits_t stop_bit
Definition touchkey2.h:133
uart_parity_t parity_bit
Definition touchkey2.h:132
pin_name_t pc5_target_reset
Definition touchkey2.h:125
Click ctx object definition.
Definition touchkey2.h:102
digital_out_t pc5_target_reset
Definition touchkey2.h:105
uart_t uart
Definition touchkey2.h:109