39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
74#define IR_STATE_HIGH 0x01
75#define IR_STATE_LOW 0x00
82#define DRV_BUFFER_SIZE 200
88#define IR_DEF_FREQ 38000
106#define IR_MAP_MIKROBUS( cfg, mikrobus ) \
107 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
108 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
109 cfg.an = MIKROBUS( mikrobus, MIKROBUS_AN ); \
110 cfg.pwm = MIKROBUS( mikrobus, MIKROBUS_PWM )
#define DRV_BUFFER_SIZE
IR driver buffer size.
Definition ir.h:82
err_t ir_generic_read(ir_t *ctx, char *data_buf, uint16_t max_len)
IR data reading function.
err_t ir_init(ir_t *ctx, ir_cfg_t *cfg)
IR initialization function.
uint8_t ir_get_an_state(ir_t *ctx)
IR get AN pin state function.
err_t ir_nec_read_command(ir_t *ctx, uint8_t *address, uint8_t *command)
IR NEC data reading function.
void ir_nec_send_command(ir_t *ctx, uint8_t address, uint8_t command)
IR NEC send data function.
void ir_drv_interface_selection(ir_cfg_t *cfg, ir_drv_t drv_sel)
IR driver interface setup function.
err_t ir_generic_write(ir_t *ctx, char *data_buf, uint16_t len)
IR data writing function.
void ir_cfg_setup(ir_cfg_t *cfg)
IR configuration object setup function.
ir_drv_t
IR Click driver selector.
Definition ir.h:120
@ IR_DRV_SEL_GPIO
Definition ir.h:121
@ IR_DRV_SEL_UART
Definition ir.h:122
ir_return_value_t
IR Click return value data.
Definition ir.h:183
@ IR_OK
Definition ir.h:184
@ IR_ERROR
Definition ir.h:185
IR Click configuration object.
Definition ir.h:156
uint32_t baud_rate
Definition ir.h:166
bool uart_blocking
Definition ir.h:167
uart_data_bits_t data_bit
Definition ir.h:168
pin_name_t tx_pin
Definition ir.h:159
uint32_t dev_pwm_freq
Definition ir.h:172
pin_name_t rx_pin
Definition ir.h:158
ir_drv_t drv_sel
Definition ir.h:174
uart_stop_bits_t stop_bit
Definition ir.h:170
pin_name_t pwm
Definition ir.h:163
uart_parity_t parity_bit
Definition ir.h:169
pin_name_t an
Definition ir.h:162
IR Click context object.
Definition ir.h:131
uint32_t pwm_freq
Definition ir.h:141
uart_t uart
Definition ir.h:137
digital_in_t an
Definition ir.h:134
ir_drv_t drv_sel
Definition ir.h:147
pwm_t pwm
Definition ir.h:138