ism 2.0.0.0
ism.h File Reference

This file contains API for ISM Click Driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_spi_master.h"

Go to the source code of this file.

Data Structures

struct  ism_t
 ISM Click context object. More...
 
struct  ism_cfg_t
 ISM Click configuration object. More...
 

Macros

#define ISM_REG_BANK_0_CONFIG   0x00
 ISM description register.
 
#define ISM_REG_BANK_0_EN_AA   0x01
 
#define ISM_REG_BANK_0_EN_RXADDR   0x02
 
#define ISM_REG_BANK_0_SETUP_AW   0x03
 
#define ISM_REG_BANK_0_SETUP_RETR   0x04
 
#define ISM_REG_BANK_0_RF_CH   0x05
 
#define ISM_REG_BANK_0_RF_SETUP   0x06
 
#define ISM_REG_BANK_0_STATUS   0x07
 
#define ISM_REG_BANK_0_OBSERVE_TX   0x08
 
#define ISM_REG_BANK_0_CD   0x09
 
#define ISM_REG_BANK_0_RX_ADDR_P0   0x0A
 
#define ISM_REG_BANK_0_RX_ADDR_P1   0x0B
 
#define ISM_REG_BANK_0_RX_ADDR_P2   0x0C
 
#define ISM_REG_BANK_0_RX_ADDR_P3   0x0D
 
#define ISM_REG_BANK_0_RX_ADDR_P4   0x0E
 
#define ISM_REG_BANK_0_RX_ADDR_P5   0x0F
 
#define ISM_REG_BANK_0_TX_ADDR   0x10
 
#define ISM_REG_BANK_0_RX_PW_P0   0x11
 
#define ISM_REG_BANK_0_RX_PW_P1   0x12
 
#define ISM_REG_BANK_0_RX_PW_P2   0x13
 
#define ISM_REG_BANK_0_RX_PW_P3   0x14
 
#define ISM_REG_BANK_0_RX_PW_P4   0x15
 
#define ISM_REG_BANK_0_RX_PW_P5   0x16
 
#define ISM_REG_BANK_0_FIFO_STATUS   0x17
 
#define ISM_REG_BANK_0_PAYLOAD_WIDTH   0x1F
 
#define ISM_REG_BANK_1_REG_0   0x00
 
#define ISM_REG_BANK_1_REG_1   0x01
 
#define ISM_REG_BANK_1_REG_2   0x02
 
#define ISM_REG_BANK_1_REG_3   0x03
 
#define ISM_REG_BANK_1_REG_4   0x04
 
#define ISM_REG_BANK_1_REG_5   0x05
 
#define ISM_REG_BANK_1_REG_6   0x06
 
#define ISM_REG_BANK_1_REG_7   0x07
 
#define ISM_REG_BANK_1_REG_8   0x08
 
#define ISM_REG_BANK_1_REG_9   0x09
 
#define ISM_REG_BANK_1_REG_A   0x0A
 
#define ISM_REG_BANK_1_REG_B   0x0B
 
#define ISM_REG_BANK_1_REG_C   0x0C
 
#define ISM_REG_BANK_1_REG_D   0x0D
 
#define ISM_REG_BANK_1_REG_E   0x0E
 
#define ISM_CMD_FLUSH_TX   0xE1
 ISM description commands.
 
#define ISM_CMD_FLUSH_RX   0xE2
 
#define ISM_CMD_REUSE_TX_PL   0xE3
 
#define ISM_CMD_W_TX_PAYLOAD_NOACK   0xB0
 
#define ISM_CMD_W_ACK_PAYLOAD   0xA8
 
#define ISM_CMD_ACTIVATE   0x50
 
#define ISM_CMD_R_RX_PL_WID   0x60
 
#define ISM_CMD_NOP_NOP   0xFF
 
#define ISM_STATUS_RX_DR   0x40
 ISM description setting.
 
#define ISM_STATUS_TX_DS   0x20
 
#define ISM_STATUS_MAX_RT   0x10
 
#define STATUS_TX_FULL   0x01
 
#define ISM_FIFO_STATUS_TX_REUSE   0x40
 
#define ISM_FIFO_STATUS_TX_FULL   0x20
 
#define ISM_FIFO_STATUS_TX_EMPTY   0x10
 
#define ISM_FIFO_STATUS_RX_FULL   0x02
 
#define ISM_FIFO_STATUS_RX_EMPTY   0x01
 
#define ISM_SEL_BANK_0   0
 ISM description bank selection.
 
#define ISM_SEL_BANK_1   1
 
#define ISM_MAX_PACKET_LEN   32
 ISM maximum packet length.
 
#define ISM_RT_PIN_STATE_LOW   0
 ISM description pin state.
 
#define ISM_RT_PIN_STATE_HIGH   1
 
#define ISM_RD_RX_PLOAD   0x61
 ISM description RX and TX payload.
 
#define ISM_WR_TX_PLOAD   0xA0
 
#define ISM_READ_BIT_MASK   0x00
 ISM description SPI read and write bit mask.
 
#define ISM_WRITE_BIT_MASK   0x20
 
#define ISM_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  ism_return_value_t { ISM_OK = 0 , ISM_ERROR = -1 }
 ISM Click return value data. More...
 

Functions

void ism_cfg_setup (ism_cfg_t *cfg)
 ISM configuration object setup function.
 
err_t ism_init (ism_t *ctx, ism_cfg_t *cfg)
 ISM initialization function.
 
void ism_default_cfg (ism_t *ctx)
 ISM default configuration function.
 
err_t ism_generic_write (ism_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
 ISM data writing function.
 
err_t ism_generic_read (ism_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
 ISM data reading function.
 
err_t ism_set_cmd (ism_t *ctx, uint8_t cmd, uint8_t cmd_data)
 ISM set command function.
 
void ism_chip_enable (ism_t *ctx)
 ISM set chip enable function.
 
void ism_chip_disable (ism_t *ctx)
 ISM set chip disable function.
 
void ism_set_rl_pin_state (ism_t *ctx, uint8_t rt_pin_state)
 ISM RL pin setting function.
 
void ism_set_tl_pin_state (ism_t *ctx, uint8_t tl_pin_state)
 ISM TL pin setting function.
 
uint8_t ism_check_interrupt_request (ism_t *ctx)
 ISM check interrupt request function.
 
err_t ism_switch_bank (ism_t *ctx, uint8_t bank_sel)
 ISM switch bank function.
 
err_t ism_switch_rx_mode (ism_t *ctx)
 ISM switch RX mode function.
 
err_t ism_switch_tx_mode (ism_t *ctx)
 ISM switch TX mode function.
 
err_t ism_device_config (ism_t *ctx)
 ISM device configuration function.
 
err_t ism_receive_packet (ism_t *ctx, uint8_t *rx_data)
 ISM receive packet function.
 
err_t ism_transmit_packet (ism_t *ctx, uint8_t type, uint8_t *tx_data, uint8_t len)
 ISM transmit package function.
 

Detailed Description

This file contains API for ISM Click Driver.

Enumeration Type Documentation

◆ ism_return_value_t

ISM Click return value data.

Predefined enum values for driver return values.

Enumerator
ISM_OK 
ISM_ERROR