wirelesssun 2.1.0.0
wirelesssun.h File Reference

This file contains API for Wireless SUN 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  wirelesssun_t
 Wireless SUN Click context object. More...
 
struct  wirelesssun_cfg_t
 Wireless SUN Click configuration object. More...
 

Macros

#define WIRELESSSUN_CMD_HELP   "help"
 Wireless SUN control commands.
 
#define WIRELESSSUN_CMD_VERS   "vers"
 
#define WIRELESSSUN_CMD_VERNUM   "vernum"
 
#define WIRELESSSUN_CMD_RESET   "reset"
 
#define WIRELESSSUN_CMD_SLEEP   "sleep"
 
#define WIRELESSSUN_CMD_ECHO   "echo"
 
#define WIRELESSSUN_CMD_JSON   "json"
 
#define WIRELESSSUN_CMD_MODE   "mode"
 
#define WIRELESSSUN_CMD_CHRATE   "chrate"
 
#define WIRELESSSUN_CMD_CHAN   "chan"
 
#define WIRELESSSUN_CMD_RCCAL   "rccal"
 
#define WIRELESSSUN_CMD_MAC   "mac"
 
#define WIRELESSSUN_CMD_MACF   "macf"
 
#define WIRELESSSUN_CMD_MTXCTL   "mtxctl"
 
#define WIRELESSSUN_CMD_PAN   "pan"
 
#define WIRELESSSUN_CMD_NETNAME   "netname"
 
#define WIRELESSSUN_CMD_IP   "ip"
 
#define WIRELESSSUN_CMD_INIT   "init"
 
#define WIRELESSSUN_CMD_ATSTART   "atstart"
 
#define WIRELESSSUN_CMD_TCPCON   "tcpcon"
 
#define WIRELESSSUN_CMD_TCPDIS   "tcpdis"
 
#define WIRELESSSUN_CMD_LEASEIP   "leaseip"
 
#define WIRELESSSUN_CMD_LEASERNG   "leaserng"
 
#define WIRELESSSUN_CMD_STAT   "stat"
 
#define WIRELESSSUN_CMD_RSTAT   "rstat"
 
#define WIRELESSSUN_CMD_MSTAT   "mstat"
 
#define WIRELESSSUN_CMD_FSTAT   "fstat"
 
#define WIRELESSSUN_CMD_CHCONFIG   "chconfig"
 
#define WIRELESSSUN_CMD_CHCUR   "chcur"
 
#define WIRELESSSUN_CMD_MTXAVL   "mtxavl"
 
#define WIRELESSSUN_CMD_FMSECKEY   "fmseckey"
 
#define WIRELESSSUN_CMD_NEBR   "nebr"
 
#define WIRELESSSUN_CMD_PARENT   "parent"
 
#define WIRELESSSUN_CMD_RPLINF   "rplinf"
 
#define WIRELESSSUN_CMD_TCPSTAT   "tcpstat"
 
#define WIRELESSSUN_CMD_RPLSR   "rplsr"
 
#define WIRELESSSUN_CMD_LEASED   "leased"
 
#define WIRELESSSUN_CMD_TCPS   "tcps"
 
#define WIRELESSSUN_CMD_UDPS   "udps"
 
#define WIRELESSSUN_CMD_UDPST   "udpst"
 
#define WIRELESSSUN_CMD_PING   "ping"
 
#define WIRELESSSUN_CMD_TCPOPTS   "tcpopts"
 
#define WIRELESSSUN_CMD_UDPOPTS   "udpopts"
 
#define WIRELESSSUN_CMD_RMTCMD   "rmtcmd"
 
#define WIRELESSSUN_CMD_RMTOPTS   "rmtopts"
 
#define WIRELESSSUN_CMD_RFEC   "rfec"
 
#define WIRELESSSUN_CMD_RANTSW   "rantsw"
 
#define WIRELESSSUN_CMD_FNODE   "fnode"
 
#define WIRELESSSUN_CMD_AUTH   "auth"
 
#define WIRELESSSUN_CMD_NODEF   "nodef"
 
#define WIRELESSSUN_CMD_PARAM   "param"
 
#define WIRELESSSUN_CMD_SAVE   "save"
 
#define WIRELESSSUN_CMD_CLEAR   "clear"
 
#define WIRELESSSUN_CMD_SVRST   "svrst"
 
#define WIRELESSSUN_CMD_CLRST   "clrst"
 
#define WIRELESSSUN_CMD_PROMPT_SIGN   "\r\n>"
 
#define WIRELESSSUN_CMD_DELIMITER   " "
 
#define WIRELESSSUN_RSP_UDPR   "udpr"
 Wireless SUN UDP/TCP responses.
 
#define WIRELESSSUN_RSP_UDPR   "udpr"
 Wireless SUN UDP/TCP responses.
 
#define WIRELESSSUN_RSP_TCPR   "tcpr"
 
#define WIRELESSSUN_DEVICE_ROLE_STOP   "0"
 Wireless SUN device role settings.
 
#define WIRELESSSUN_DEVICE_ROLE_BORDER   "1"
 
#define WIRELESSSUN_DEVICE_ROLE_ROUTER   "2"
 
#define WIRELESSSUN_DEVICE_ROLE_LEAF   "3"
 
#define WIRELESSSUN_DEFAULT_PORT   "3610"
 Wireless SUN TCP/UDP port settings.
 
#define TX_DRV_BUFFER_SIZE   100
 Wireless SUN driver buffer size.
 
#define RX_DRV_BUFFER_SIZE   600
 
#define WIRELESSSUN_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  wirelesssun_return_value_t { WIRELESSSUN_OK = 0 , WIRELESSSUN_ERROR = -1 , WIRELESSSUN_ERROR_TIMEOUT = -2 }
 Wireless SUN Click return value data. More...
 

Functions

void wirelesssun_cfg_setup (wirelesssun_cfg_t *cfg)
 Wireless SUN configuration object setup function.
 
err_t wirelesssun_init (wirelesssun_t *ctx, wirelesssun_cfg_t *cfg)
 Wireless SUN initialization function.
 
err_t wirelesssun_generic_write (wirelesssun_t *ctx, char *data_in, uint16_t len)
 Wireless SUN data writing function.
 
err_t wirelesssun_generic_read (wirelesssun_t *ctx, char *data_out, uint16_t len)
 Wireless SUN data reading function.
 
void wirelesssun_send_cmd (wirelesssun_t *ctx, char *cmd)
 Wireless SUN send cmd function.
 
void wirelesssun_send_cmd_with_parameter (wirelesssun_t *ctx, char *cmd, char *param_buf)
 Wireless SUN send cmd function.
 
void wirelesssun_reset_device (wirelesssun_t *ctx)
 Wireless SUN reset device function.
 
void wirelesssun_set_rst_pin (wirelesssun_t *ctx, uint8_t state)
 Wireless SUN set rst pin function.
 
void wirelesssun_set_cts_pin (wirelesssun_t *ctx, uint8_t state)
 Wireless SUN set cts pin function.
 
uint8_t wirelesssun_get_rts_pin (wirelesssun_t *ctx)
 Wireless SUN get rts pin function.
 

Detailed Description

This file contains API for Wireless SUN Click Driver.

Enumeration Type Documentation

◆ wirelesssun_return_value_t

Wireless SUN Click return value data.

Predefined enum values for driver return values.

Enumerator
WIRELESSSUN_OK 
WIRELESSSUN_ERROR 
WIRELESSSUN_ERROR_TIMEOUT