neomesh868mhz 2.1.0.0
neomesh868mhz.h File Reference

This file contains API for NeoMesh 868MHz 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  neomesh868mhz_t
 NeoMesh 868MHz Click context object. More...
 
struct  neomesh868mhz_cfg_t
 NeoMesh 868MHz Click configuration object. More...
 
struct  neomesh868mhz_aapi_frame_t
 NeoMesh 868MHz Click data frame object. More...
 
struct  neomesh868mhz_sapi_frame_t
 NeoMesh 868MHz Click data frame object. More...
 

Macros

#define NEOMESH868MHZ_CMD_NACK_SEND   0x02
 NeoMesh 868MHz AAPI control commands.
 
#define NEOMESH868MHZ_CMD_ACK_SEND   0x03
 
#define NEOMESH868MHZ_CMD_NODE_STATUS   0x07
 
#define NEOMESH868MHZ_CMD_NODE_INFO   0x08
 
#define NEOMESH868MHZ_CMD_NEIGHBOUR_LIST   0x09
 
#define NEOMESH868MHZ_CMD_NETWORK_COMMAND   0x0A
 
#define NEOMESH868MHZ_CMD_SAPI_TO_AAPI   0x0B
 
#define NEOMESH868MHZ_CMD_ROUTE_INFO   0x0C
 
#define NEOMESH868MHZ_CMD_WES_COMMAND   0x10
 
#define NEOMESH868MHZ_CMD_WES_SETUP_RSP   0x11
 
#define NEOMESH868MHZ_CMD_GET_SW_VERSION   0x14
 
#define NEOMESH868MHZ_CMD_ALT_MODE   0x20
 
#define NEOMESH868MHZ_RSP_ACK   0x50
 NeoMesh 868MHz application data response.
 
#define NEOMESH868MHZ_RSP_NACK   0x51
 
#define NEOMESH868MHZ_RSP_ACK_HOST   0x52
 
#define NEOMESH868MHZ_RSP_ACK_HOST_HAPA   0x53
 
#define NEOMESH868MHZ_RSP_NACK_HOST   0x54
 
#define NEOMESH868MHZ_RSP_NACK_HOST_HAPA   0x55
 
#define NEOMESH868MHZ_RSP_NACK_SEND   0x56
 
#define NEOMESH868MHZ_RSP_NACK_DROP   0x57
 
#define NEOMESH868MHZ_RSP_NODE_INFO   0x58
 
#define NEOMESH868MHZ_RSP_NEIGHBOUR_LIST   0x59
 
#define NEOMESH868MHZ_RSP_NETWORK_COMMAND   0x5A
 
#define NEOMESH868MHZ_RSP_ROUTE_INFO   0x5C
 
#define NEOMESH868MHZ_RSP_WES_STATUS   0x60
 
#define NEOMESH868MHZ_RSP_WES_SETUP   0x61
 
#define NEOMESH868MHZ_RSP_GET_SW_VERSION   0x64
 
#define NEOMESH868MHZ_RSP_ALT_MODE   0x70
 
#define NEOMESH868MHZ_SAPI_CMD_LOGIN   0x0103u
 NeoMesh 868MHz SAPI control commands.
 
#define NEOMESH868MHZ_SAPI_CMD_RESET_LIST_ITERATOR   0x0104u
 
#define NEOMESH868MHZ_SAPI_CMD_GET_LIST   0x0105u
 
#define NEOMESH868MHZ_SAPI_CMD_GET_SETTING_FLASH   0x0106u
 
#define NEOMESH868MHZ_SAPI_CMD_GET_SETTING_RAM   0x0107u
 
#define NEOMESH868MHZ_SAPI_CMD_COMMIT_SETTINGS   0x0108u
 
#define NEOMESH868MHZ_SAPI_CMD_DISCARD_SETTINGS   0x0109u
 
#define NEOMESH868MHZ_SAPI_CMD_SET_SETTING   0x010Au
 
#define NEOMESH868MHZ_SAPI_CMD_START_PROTOCOL_STACK   0x0112u
 
#define NEOMESH868MHZ_SAPI_CMD_START_BOOTLOADER   0x0113u
 
#define NEOMESH868MHZ_SAPI_HEADER   0x3E
 
#define NEOMESH868MHZ_SAPI_TRAIL   0x21
 
#define NEOMESH868MHZ_SAPI_RSP_OK   0x0380u
 NeoMesh 868MHz system data response.
 
#define NEOMESH868MHZ_SAPI_RSP_ERROR   0x0381u
 
#define NEOMESH868MHZ_SAPI_RSP_BOOTLOADER_START   0x0382u
 
#define NEOMESH868MHZ_SAPI_RSP_PROTOCOL_STACK_START   0x0383u
 
#define NEOMESH868MHZ_SAPI_RSP_PROTOCOL_STACK_ERROR   0x0384u
 
#define NEOMESH868MHZ_SAPI_RSP_RESET   0x0385u
 
#define NEOMESH868MHZ_SAPI_RSP_SETTINGS_LIST_OUTPUT   0x0185u
 
#define NEOMESH868MHZ_SAPI_RSP_SETTINGS_VALUE   0x0186u
 
#define NEOMESH868MHZ_SAPI_LOGIN_PASSWORD_0   0x4C
 NeoMesh 868MHz login password settings.
 
#define NEOMESH868MHZ_SAPI_LOGIN_PASSWORD_1   0x76
 
#define NEOMESH868MHZ_SAPI_LOGIN_PASSWORD_2   0x6C
 
#define NEOMESH868MHZ_SAPI_LOGIN_PASSWORD_3   0x31
 
#define NEOMESH868MHZ_SAPI_LOGIN_PASSWORD_4   0x30
 
#define NEOMESH868MHZ_SAPI_SETTINGS_ID_NODE_ID   0x0A
 NeoMesh 868MHz SAPI settings ID.
 
#define NEOMESH868MHZ_TIMEOUT_MS   20000ul
 NeoMesh 868MHz CTS/WUP timeout wait.
 
#define NEOMESH868MHZ_MAX_PAYLOAD_LEN   255
 NeoMesh 868MHz payload length.
 
#define NEOMESH868MHZ_TX_DRV_BUFFER_SIZE   300u
 NeoMesh 868MHz driver buffer size.
 
#define NEOMESH868MHZ_RX_DRV_BUFFER_SIZE   300u
 
#define NEOMESH868MHZ_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  neomesh868mhz_return_value_t { NEOMESH868MHZ_OK = 0 , NEOMESH868MHZ_ERROR = -1 , NEOMESH868MHZ_TIMEOUT = -2 }
 NeoMesh 868MHz Click return value data. More...
 

Functions

void neomesh868mhz_cfg_setup (neomesh868mhz_cfg_t *cfg)
 NeoMesh 868MHz configuration object setup function.
 
err_t neomesh868mhz_init (neomesh868mhz_t *ctx, neomesh868mhz_cfg_t *cfg)
 NeoMesh 868MHz initialization function.
 
err_t neomesh868mhz_send_aapi_frame (neomesh868mhz_t *ctx, neomesh868mhz_aapi_frame_t *frame)
 NeoMesh 868MHz send aapi frame function.
 
err_t neomesh868mhz_read_aapi_frame (neomesh868mhz_t *ctx, neomesh868mhz_aapi_frame_t *frame)
 NeoMesh 868MHz read aapi frame function.
 
err_t neomesh868mhz_send_sapi_frame (neomesh868mhz_t *ctx, neomesh868mhz_sapi_frame_t *frame)
 NeoMesh 868MHz send sapi frame function.
 
err_t neomesh868mhz_read_sapi_frame (neomesh868mhz_t *ctx, neomesh868mhz_sapi_frame_t *frame)
 NeoMesh 868MHz read sapi frame function.
 
void neomesh868mhz_set_rst_pin (neomesh868mhz_t *ctx, uint8_t state)
 NeoMesh 868MHz set rst pin function.
 
void neomesh868mhz_set_wes_pin (neomesh868mhz_t *ctx, uint8_t state)
 NeoMesh 868MHz set wes pin function.
 
uint8_t neomesh868mhz_get_app_pin (neomesh868mhz_t *ctx)
 NeoMesh 868MHz get app pin function.
 
uint8_t neomesh868mhz_get_cts_pin (neomesh868mhz_t *ctx)
 NeoMesh 868MHz get cts pin function.
 
uint8_t neomesh868mhz_get_wup_pin (neomesh868mhz_t *ctx)
 NeoMesh 868MHz get wup pin function.
 

Detailed Description

This file contains API for NeoMesh 868MHz Click Driver.

Enumeration Type Documentation

◆ neomesh868mhz_return_value_t

NeoMesh 868MHz Click return value data.

Predefined enum values for driver return values.

Enumerator
NEOMESH868MHZ_OK 
NEOMESH868MHZ_ERROR 
NEOMESH868MHZ_TIMEOUT