speakup3 2.1.0.0
speakup3.h File Reference

This file contains API for SpeakUp 3 Click Driver. More...

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

Go to the source code of this file.

Data Structures

struct  speakup3_t
 SpeakUp 3 Click context object. More...
 
struct  speakup3_cfg_t
 SpeakUp 3 Click configuration object. More...
 

Macros

#define SPEAKUP3_START_BYTE   0x5A
 SpeakUp 3 command codes.
 
#define SPEAKUP3_INS_ENTER_WAKE_UP   0x00
 
#define SPEAKUP3_INS_EXIT_WAKE_UP   0x01
 
#define SPEAKUP3_INS_LEARN_MATCH_AC   0x02
 
#define SPEAKUP3_INS_AC_TURN_ON   0x03
 
#define SPEAKUP3_INS_AC_TURN_OFF   0x04
 
#define SPEAKUP3_INS_AC_MODE_AUTO   0x05
 
#define SPEAKUP3_INS_AC_MODE_COLD   0x06
 
#define SPEAKUP3_INS_AC_MODE_HEAT   0x07
 
#define SPEAKUP3_INS_AC_MODE_DRY   0x08
 
#define SPEAKUP3_INS_AC_MODE_FAN   0x09
 
#define SPEAKUP3_INS_AC_MODE_SLEEP   0x0A
 
#define SPEAKUP3_INS_AC_WIND_AUTO   0x0B
 
#define SPEAKUP3_INS_AC_WIND_LOW   0x0C
 
#define SPEAKUP3_INS_AC_WIND_MID   0x0D
 
#define SPEAKUP3_INS_AC_WIND_HIGH   0x0E
 
#define SPEAKUP3_INS_AC_WIND_INC   0x0F
 
#define SPEAKUP3_INS_AC_WIND_DEC   0x10
 
#define SPEAKUP3_INS_AC_TMP_16   0x11
 
#define SPEAKUP3_INS_AC_TMP_17   0x12
 
#define SPEAKUP3_INS_AC_TMP_18   0x13
 
#define SPEAKUP3_INS_AC_TMP_19   0x14
 
#define SPEAKUP3_INS_AC_TMP_20   0x15
 
#define SPEAKUP3_INS_AC_TMP_21   0x16
 
#define SPEAKUP3_INS_AC_TMP_22   0x17
 
#define SPEAKUP3_INS_AC_TMP_23   0x18
 
#define SPEAKUP3_INS_AC_TMP_24   0x19
 
#define SPEAKUP3_INS_AC_TMP_25   0x1A
 
#define SPEAKUP3_INS_AC_TMP_26   0x1B
 
#define SPEAKUP3_INS_AC_TMP_27   0x1C
 
#define SPEAKUP3_INS_AC_TMP_28   0x1D
 
#define SPEAKUP3_INS_AC_TMP_29   0x1E
 
#define SPEAKUP3_INS_AC_TMP_30   0x1F
 
#define SPEAKUP3_INS_AC_TMP_INC   0x20
 
#define SPEAKUP3_INS_AC_TMP_DEC   0x21
 
#define SPEAKUP3_INS_AC_SWEPT_ON   0x22
 
#define SPEAKUP3_INS_AC_SWEPT_OFF   0x23
 
#define SPEAKUP3_INS_AC_SWEPT_VERT   0x24
 
#define SPEAKUP3_INS_AC_SWEPT_CROSS   0x25
 
#define SPEAKUP3_INS_SET_RESTORE   0x26
 
#define SPEAKUP3_RESERVED_BYTE_1   0x00
 
#define SPEAKUP3_RESERVED_BYTE_2   0x00
 
#define TX_DRV_BUFFER_SIZE   100
 SpeakUp 3 driver buffer size.
 
#define RX_DRV_BUFFER_SIZE   200
 
#define SPEAKUP3_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  speakup3_return_value_t { SPEAKUP3_OK = 0 , SPEAKUP3_ERROR = -1 }
 SpeakUp 3 Click return value data. More...
 

Functions

void speakup3_cfg_setup (speakup3_cfg_t *cfg)
 SpeakUp 3 configuration object setup function.
 
err_t speakup3_init (speakup3_t *ctx, speakup3_cfg_t *cfg)
 SpeakUp 3 initialization 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.
 

Detailed Description

This file contains API for SpeakUp 3 Click Driver.

Enumeration Type Documentation

◆ speakup3_return_value_t

SpeakUp 3 Click return value data.

Predefined enum values for driver return values.

Enumerator
SPEAKUP3_OK 
SPEAKUP3_ERROR