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 ANYNET3GAA_CMD_AT "AT"
74#define ANYNET3GAA_CMD_QCCID "AT+QCCID"
75#define ANYNET3GAA_CMD_GSN "AT+GSN"
76#define ANYNET3GAA_CMD_AWSVER "AT+AWSVER"
77#define ANYNET3GAA_CMD_AWSRESET "AT+AWSRESET"
78#define ANYNET3GAA_CMD_AWSSTATE "AT+AWSSTATE"
79#define ANYNET3GAA_CMD_AWSBUTTON "AT+AWSBUTTON"
80#define ANYNET3GAA_CMD_AWSPUBOPEN "AT+AWSPUBOPEN"
81#define ANYNET3GAA_CMD_AWSPUBLISH "AT+AWSPUBLISH"
82#define ANYNET3GAA_CMD_AWSSUBOPEN "AT+AWSSUBOPEN"
83#define ANYNET3GAA_CMD_AWSPUBCLOSE "AT+AWSPUBCLOSE"
89#define ANYNET3GAA_RSP_OK "OK"
90#define ANYNET3GAA_RSP_ERROR "ERROR"
91#define ANYNET3GAA_RSP_READY_FOR_SEND ">"
92#define ANYNET3GAA_RSP_SEND_OK "SEND OK"
93#define ANYNET3GAA_RSP_SEND_FAIL "SEND FAIL"
100#define ANYNET3GAA_RX_DRV_BUFFER_SIZE 256
101#define ANYNET3GAA_TX_DRV_BUFFER_SIZE 256
119#define ANYNET3GAA_MAP_MIKROBUS( cfg, mikrobus ) \
120 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
121 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
122 cfg.slp = MIKROBUS( mikrobus, MIKROBUS_RST ); \
123 cfg.dsr = MIKROBUS( mikrobus, MIKROBUS_CS ); \
124 cfg.dtr = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
125 cfg.iot = MIKROBUS( mikrobus, MIKROBUS_INT )
anynet3gaa_return_value_t
AnyNet 3G-AA Click return value data.
Definition anynet3gaa.h:183
@ ANYNET3GAA_ERROR_CMD
Definition anynet3gaa.h:187
@ ANYNET3GAA_ERROR
Definition anynet3gaa.h:185
@ ANYNET3GAA_OK
Definition anynet3gaa.h:184
@ ANYNET3GAA_ERROR_SEND
Definition anynet3gaa.h:188
@ ANYNET3GAA_ERROR_UNKNOWN
Definition anynet3gaa.h:189
@ ANYNET3GAA_ERROR_TIMEOUT
Definition anynet3gaa.h:186
#define ANYNET3GAA_RX_DRV_BUFFER_SIZE
AnyNet 3G-AA driver buffer size.
Definition anynet3gaa.h:100
#define ANYNET3GAA_TX_DRV_BUFFER_SIZE
Definition anynet3gaa.h:101
void anynet3gaa_send_cmd_with_par(anynet3gaa_t *ctx, uint8_t *at_cmd_buf, uint8_t *param_buf)
Send command function with parameter.
void anynet3gaa_send_cmd_par_check(anynet3gaa_t *ctx, uint8_t *at_cmd_buf)
Check the command parameters.
void anynet3gaa_set_dtr_pin(anynet3gaa_t *ctx, uint8_t state)
AnyNet 3G-AA set dtr pin function.
err_t anynet3gaa_generic_write(anynet3gaa_t *ctx, uint8_t *data_in, uint16_t len)
AnyNet 3G-AA data writing function.
void anynet3gaa_send_cmd(anynet3gaa_t *ctx, uint8_t *cmd)
Send command function.
void anynet3gaa_send_cmd_check(anynet3gaa_t *ctx, uint8_t *at_cmd_buf)
Check the sent command.
err_t anynet3gaa_generic_read(anynet3gaa_t *ctx, uint8_t *data_out, uint16_t len)
AnyNet 3G-AA data reading function.
void anynet3gaa_set_slp_pin(anynet3gaa_t *ctx, uint8_t state)
AnyNet 3G-AA set slp pin function.
void anynet3gaa_set_iot_pin(anynet3gaa_t *ctx, uint8_t state)
AnyNet 3G-AA set iot pin function.
uint8_t anynet3gaa_get_dsr_pin(anynet3gaa_t *ctx)
AnyNet 3G-AA get dsr pin function.
err_t anynet3gaa_init(anynet3gaa_t *ctx, anynet3gaa_cfg_t *cfg)
AnyNet 3G-AA initialization function.
void anynet3gaa_cfg_setup(anynet3gaa_cfg_t *cfg)
AnyNet 3G-AA configuration object setup function.
AnyNet 3G-AA Click configuration object.
Definition anynet3gaa.h:158
pin_name_t dtr
Definition anynet3gaa.h:165
uint32_t baud_rate
Definition anynet3gaa.h:170
pin_name_t iot
Definition anynet3gaa.h:166
pin_name_t slp
Definition anynet3gaa.h:164
bool uart_blocking
Definition anynet3gaa.h:171
uart_data_bits_t data_bit
Definition anynet3gaa.h:172
pin_name_t tx_pin
Definition anynet3gaa.h:161
pin_name_t rx_pin
Definition anynet3gaa.h:160
uart_stop_bits_t stop_bit
Definition anynet3gaa.h:174
pin_name_t dsr
Definition anynet3gaa.h:167
uart_parity_t parity_bit
Definition anynet3gaa.h:173
AnyNet 3G-AA Click context object.
Definition anynet3gaa.h:135
digital_out_t slp
Definition anynet3gaa.h:137
uart_t uart
Definition anynet3gaa.h:145
digital_out_t iot
Definition anynet3gaa.h:139
digital_out_t dtr
Definition anynet3gaa.h:138
digital_in_t dsr
Definition anynet3gaa.h:142