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 SPEAKUP3_START_BYTE 0x5A
74#define SPEAKUP3_INS_ENTER_WAKE_UP 0x00
75#define SPEAKUP3_INS_EXIT_WAKE_UP 0x01
76#define SPEAKUP3_INS_LEARN_MATCH_AC 0x02
77#define SPEAKUP3_INS_AC_TURN_ON 0x03
78#define SPEAKUP3_INS_AC_TURN_OFF 0x04
79#define SPEAKUP3_INS_AC_MODE_AUTO 0x05
80#define SPEAKUP3_INS_AC_MODE_COLD 0x06
81#define SPEAKUP3_INS_AC_MODE_HEAT 0x07
82#define SPEAKUP3_INS_AC_MODE_DRY 0x08
83#define SPEAKUP3_INS_AC_MODE_FAN 0x09
84#define SPEAKUP3_INS_AC_MODE_SLEEP 0x0A
85#define SPEAKUP3_INS_AC_WIND_AUTO 0x0B
86#define SPEAKUP3_INS_AC_WIND_LOW 0x0C
87#define SPEAKUP3_INS_AC_WIND_MID 0x0D
88#define SPEAKUP3_INS_AC_WIND_HIGH 0x0E
89#define SPEAKUP3_INS_AC_WIND_INC 0x0F
90#define SPEAKUP3_INS_AC_WIND_DEC 0x10
91#define SPEAKUP3_INS_AC_TMP_16 0x11
92#define SPEAKUP3_INS_AC_TMP_17 0x12
93#define SPEAKUP3_INS_AC_TMP_18 0x13
94#define SPEAKUP3_INS_AC_TMP_19 0x14
95#define SPEAKUP3_INS_AC_TMP_20 0x15
96#define SPEAKUP3_INS_AC_TMP_21 0x16
97#define SPEAKUP3_INS_AC_TMP_22 0x17
98#define SPEAKUP3_INS_AC_TMP_23 0x18
99#define SPEAKUP3_INS_AC_TMP_24 0x19
100#define SPEAKUP3_INS_AC_TMP_25 0x1A
101#define SPEAKUP3_INS_AC_TMP_26 0x1B
102#define SPEAKUP3_INS_AC_TMP_27 0x1C
103#define SPEAKUP3_INS_AC_TMP_28 0x1D
104#define SPEAKUP3_INS_AC_TMP_29 0x1E
105#define SPEAKUP3_INS_AC_TMP_30 0x1F
106#define SPEAKUP3_INS_AC_TMP_INC 0x20
107#define SPEAKUP3_INS_AC_TMP_DEC 0x21
108#define SPEAKUP3_INS_AC_SWEPT_ON 0x22
109#define SPEAKUP3_INS_AC_SWEPT_OFF 0x23
110#define SPEAKUP3_INS_AC_SWEPT_VERT 0x24
111#define SPEAKUP3_INS_AC_SWEPT_CROSS 0x25
112#define SPEAKUP3_INS_SET_RESTORE 0x26
113#define SPEAKUP3_RESERVED_BYTE_1 0x00
114#define SPEAKUP3_RESERVED_BYTE_2 0x00
121#define TX_DRV_BUFFER_SIZE 100
122#define RX_DRV_BUFFER_SIZE 200
140#define SPEAKUP3_MAP_MIKROBUS( cfg, mikrobus ) \
141 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
142 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX );
#define RX_DRV_BUFFER_SIZE
Definition speakup3.h:122
#define TX_DRV_BUFFER_SIZE
SpeakUp 3 driver buffer size.
Definition speakup3.h:121
void speakup3_cfg_setup(speakup3_cfg_t *cfg)
SpeakUp 3 configuration object setup function.
err_t speakup3_generic_write(speakup3_t *ctx, char *data_in, uint16_t len)
SpeakUp 3 data writing function.
err_t speakup3_generic_read(speakup3_t *ctx, char *data_out, uint16_t len)
SpeakUp 3 data reading function.
err_t speakup3_wait_for_reply(speakup3_t *ctx, uint8_t *reply_ins, uint32_t wait_ms)
SpeakUp 3 wait for reply function.
err_t speakup3_init(speakup3_t *ctx, speakup3_cfg_t *cfg)
SpeakUp 3 initialization function.
speakup3_return_value_t
SpeakUp 3 Click return value data.
Definition speakup3.h:186
@ SPEAKUP3_ERROR
Definition speakup3.h:188
@ SPEAKUP3_OK
Definition speakup3.h:187
SpeakUp 3 Click configuration object.
Definition speakup3.h:167
uint32_t baud_rate
Definition speakup3.h:173
bool uart_blocking
Definition speakup3.h:174
uart_data_bits_t data_bit
Definition speakup3.h:175
pin_name_t tx_pin
Definition speakup3.h:170
pin_name_t rx_pin
Definition speakup3.h:169
uart_stop_bits_t stop_bit
Definition speakup3.h:177
uart_parity_t parity_bit
Definition speakup3.h:176
SpeakUp 3 Click context object.
Definition speakup3.h:152
uart_t uart
Definition speakup3.h:154