thyonei  2.1.0.0
Data Structures | Macros | Enumerations | Functions
thyonei.h File Reference

This file contains API for Thyone-I 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  thyonei_t
 Thyone-I Click context object. More...
 
struct  thyonei_cfg_t
 Thyone-I Click configuration object. More...
 

Macros

#define THYONEI_CMD_BROADCAST_DATA_REQ   0x06
 Thyone-I control commands. More...
 
#define THYONEI_CMD_MULTICAST_DATA_REQ   0x05
 
#define THYONEI_CMD_UNICAST_DATA_REQ   0x04
 
#define THYONEI_CMD_MULTICAST_DATA_EX_REQ   0x08
 
#define THYONEI_CMD_UNICAST_DATA_EX_REQ   0x07
 
#define THYONEI_CMD_DATA_CNF   0x44
 
#define THYONEI_CMD_TXCOMPLETE_RSP   0xC4
 
#define THYONEI_CMD_DATA_IND   0x84
 
#define THYONEI_CMD_SNIFFER_IND   0x99
 
#define THYONEI_CMD_SET_REQ   0x11
 
#define THYONEI_CMD_GET_REQ   0x10
 
#define THYONEI_CMD_START_IND   0x73
 
#define THYONEI_CMD_GETSTATE_REQ   0x01
 
#define THYONEI_CMD_RESET_REQ   0x00
 
#define THYONEI_CMD_SLEEP_REQ   0x02
 
#define THYONEI_CMD_FACTORY_RESET_REQ   0x1C
 
#define THYONEI_CMD_BOOTLOADER_REQ   0x1F
 
#define THYONEI_CMD_TRANSPARENT_MODE_REQ   0x1B
 
#define THYONEI_CMD_SETCHANNEL_REQ   0x19
 
#define THYONEI_CMD_GPIO_LOCAL_SET_CONFIG_REQ   0x25
 
#define THYONEI_CMD_GPIO_LOCAL_GET_CONFIG_REQ   0x26
 
#define THYONEI_CMD_GPIO_REMOTE_SET_CONFIG_REQ   0x29
 
#define THYONEI_CMD_GPIO_REMOTE_GET_CONFIG_REQ   0x2A
 
#define THYONEI_CMD_GPIO_LOCAL_WRITE_REQ   0x27
 
#define THYONEI_CMD_GPIO_LOCAL_READ_REQ   0x28
 
#define THYONEI_CMD_GPIO_REMOTE_WRITE_REQ   0x2B
 
#define THYONEI_CMD_GPIO_REMOTE_READ_REQ   0x2C
 
#define THYONEI_CMD_GPIO_REMOTE_SET_CONFIG_IND   0xA9
 
#define THYONEI_CMD_GPIO_REMOTE_WRITE_IND   0xAB
 
#define THYONEI_CMD_ERROR_IND   0xA2
 
#define THYONEI_CMD_DTM_START_REQ   0x1D
 
#define THYONEI_CMD_DTM_REQ   0x1E
 
#define THYONEI_INDEX_SERIAL_NUMBER   0x01
 Thyone-I settings indexes. More...
 
#define THYONEI_INDEX_FW_VERSION   0x02
 
#define THYONEI_INDEX_UART_CONFIG   0x04
 
#define THYONEI_INDEX_UART_MODE   0x05
 
#define THYONEI_INDEX_UART_TRANSPARENT_TIMEOUT   0x06
 
#define THYONEI_INDEX_RF_CHANNEL   0x07
 
#define THYONEI_INDEX_ENCRYPTION_MODE   0x08
 
#define THYONEI_INDEX_RF_PROFILE   0x09
 
#define THYONEI_INDEX_RF_NUM_RETRIES   0x0A
 
#define THYONEI_INDEX_RF_TX_POWER   0x0B
 
#define THYONEI_INDEX_RF_RP_NUM_SLOTS   0x0C
 
#define THYONEI_INDEX_MAC_SOURCE_ADDRESS   0x10
 
#define THYONEI_INDEX_MAC_DEST_ADDRESS   0x11
 
#define THYONEI_INDEX_MAC_GROUP_ID   0x12
 
#define THYONEI_INDEX_MAC_TRANSPARENT_ADDR_MODE   0x13
 
#define THYONEI_INDEX_MAC_ENCRYPTION_KEY   0x14
 
#define THYONEI_INDEX_MAC_TTL   0x15
 
#define THYONEI_INDEX_CCA_MODE   0x16
 
#define THYONEI_INDEX_CCA_THRESHOLD   0x17
 
#define THYONEI_INDEX_GPIO_BLOCK_REMOTE   0x18
 
#define THYONEI_INDEX_UART_TRANSP_ETX_CONFIG   0x19
 
#define THYONEI_INDEX_UART_TRANSP_ETX   0x1A
 
#define THYONEI_INDEX_UART_TRANSP_ETC_ENABLE   0x1B
 
#define THYONEI_INDEX_UART_TRANSP_ETC   0x1C
 
#define THYONEI_INDEX_RF_REPRATER_THRESHOLD   0x1D
 
#define THYONEI_INDEX_MODULE_MODE   0x20
 
#define THYONEI_RESPONSE_CODE   0x40
 Thyone-I Command structure settings. More...
 
#define THYONEI_START_SIGNAL   0x02
 
#define THYONE_PIN_MODE_HIGH   0x01
 Thyone-I pin mode settings. More...
 
#define THYONE_PIN_MODE_LOW   0x00
 
#define THYONEI_TX_DRV_BUFFER_SIZE   300
 Thyone-I driver buffer size. More...
 
#define THYONEI_RX_DRV_BUFFER_SIZE   300
 
#define THYONEI_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping. More...
 

Enumerations

enum  thyonei_return_value_t { THYONEI_OK = 0, THYONEI_ERROR = -1 }
 Thyone-I Click return value data. More...
 

Functions

void thyonei_cfg_setup (thyonei_cfg_t *cfg)
 Thyone-I configuration object setup function. More...
 
err_t thyonei_init (thyonei_t *ctx, thyonei_cfg_t *cfg)
 Thyone-I initialization function. More...
 
void thyonei_default_cfg (thyonei_t *ctx)
 Thyone-I default configuration function. More...
 
err_t thyonei_generic_write (thyonei_t *ctx, uint8_t *data_in, uint16_t len)
 Thyone-I data writing function. More...
 
err_t thyonei_generic_read (thyonei_t *ctx, uint8_t *data_out, uint16_t len)
 Thyone-I data reading function. More...
 
uint8_t thyonei_get_cts_state (thyonei_t *ctx)
 Thyone-I get CTS pin function. More...
 
void thyonei_set_bt (thyonei_t *ctx, uint8_t pin_state)
 Thyone-I set BT pin function. More...
 
void thyonei_set_rst (thyonei_t *ctx, uint8_t pin_state)
 Thyone-I set RST pin function. More...
 
void thyonei_set_rts (thyonei_t *ctx, uint8_t pin_state)
 Thyone-I set RTS pin function. More...
 
void thyonei_set_wup (thyonei_t *ctx, uint8_t pin_state)
 Thyone-I set WUP pin function. More...
 
void thyonei_hw_reset (thyonei_t *ctx)
 Thyone-I hardware reser function. More...
 
err_t thyonei_send_command (thyonei_t *ctx, uint8_t command, uint16_t payload_length, uint8_t *payload)
 Thyone-I send command function. More...
 
err_t thyonei_set_req (thyonei_t *ctx, uint8_t settings_index, uint8_t parameters_length, uint8_t *parameters)
 Thyone-I set individual parameters function. More...
 
err_t thyonei_get_req (thyonei_t *ctx, uint8_t settings_index, uint8_t *param_len, uint8_t *parameter)
 Thyone-I get individual parameters function. More...
 
err_t thyonei_broadcast_data_req (thyonei_t *ctx, uint8_t message_len, uint8_t *message)
 Thyone-I brodcast data function. More...
 
err_t thyonei_multicast_data_req (thyonei_t *ctx, uint8_t message_len, uint8_t *message)
 Thyone-I multicast data function. More...
 
err_t thyonei_unicast_data_req (thyonei_t *ctx, uint8_t message_len, uint8_t *message)
 Thyone-I unicast data function. More...
 

Detailed Description

This file contains API for Thyone-I Click Driver.

Enumeration Type Documentation

◆ thyonei_return_value_t

Thyone-I Click return value data.

Predefined enum values for driver return values.

Enumerator
THYONEI_OK 
THYONEI_ERROR