ismtx 2.0.0.0
ISM TX Click Driver

API for configuring and manipulating ISM TX Click driver. More...

Topics

 ISM TX Registers List
 List of registers of ISM TX Click driver.
 
 ISM TX Registers Settings
 Settings for registers of ISM TX Click driver.
 
 ISM TX MikroBUS Map
 MikroBUS pin mapping of ISM TX Click driver.
 

Functions

void ismtx_cfg_setup (ismtx_cfg_t *cfg)
 ISM TX configuration object setup function.
 
err_t ismtx_init (ismtx_t *ctx, ismtx_cfg_t *cfg)
 ISM TX initialization function.
 
err_t ismtx_default_cfg (ismtx_t *ctx)
 ISM TX default configuration function.
 
err_t ismtx_generic_write (ismtx_t *ctx, uint8_t reg, uint8_t data_in)
 ISM TX data writing function.
 
err_t ismtx_generic_read (ismtx_t *ctx, uint8_t reg, uint8_t *data_out)
 ISM TX data reading function.
 
void ismtx_soft_reset (ismtx_t *ctx)
 ISM TX software reset.
 
err_t ismtx_set_cfg (ismtx_t *ctx, uint8_t cfg_macro, uint8_t cfg_value)
 ISM TX writing configuration.
 
err_t ismtx_get_cfg (ismtx_t *ctx, uint8_t cfg_macro, uint8_t *cfg_value)
 ISM TX reading configuration.
 
err_t ismtx_set_frequency (ismtx_t *ctx, uint32_t freq)
 Setting specific frequency for transmission.
 
uint32_t ismtx_get_frequency (ismtx_t *ctx)
 Getting current frequency for transmission .
 
err_t ismtx_adjust_freq_deviation (ismtx_t *ctx, uint32_t deviation_freq)
 Adjust frequency for transmission.
 
err_t ismtx_adjust_man_bitrate (ismtx_t *ctx, uint32_t baud)
 Adjust manchester baudrate.
 
err_t ismtx_transmit_raw_data (ismtx_t *ctx, uint8_t *tx_data, uint8_t tx_len)
 Function for trinsmiting data.
 
err_t ismtx_transmit_data (ismtx_t *ctx, uint8_t preamble_byte, uint8_t *tx_data, uint8_t tx_data_len)
 Function for transmitting data with preamble byte and lenght.
 

Detailed Description

API for configuring and manipulating ISM TX Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ ismtx_adjust_freq_deviation()

err_t ismtx_adjust_freq_deviation ( ismtx_t * ctx,
uint32_t deviation_freq )

Adjust frequency for transmission.

This function sets a frequency deviation to desired value, and tweaks frequency value.

Parameters
[in]ctx: Click context object. See ismtx_t object definition for detailed explanation.
[in]deviation_freq: Frequency deviation value.
Returns
  • 0 - Success,
  • -2 - deviation_freq greater then maximum value. See #err_t definition for detailed explanation.
Note
Frequency must be between 250000000 and 950000000.

◆ ismtx_adjust_man_bitrate()

err_t ismtx_adjust_man_bitrate ( ismtx_t * ctx,
uint32_t baud )

Adjust manchester baudrate.

This function sets a baudrate.

Parameters
[in]ctx: Click context object. See ismtx_t object definition for detailed explanation.
[in]baud: Baudrate value.
Returns
  • 0 - Success,
  • -1 - Baudrate value error,
  • -2 - Baudrate configuration value error. See #err_t definition for detailed explanation.
Note
Baud must be between 195 and 200000.

◆ ismtx_cfg_setup()

void ismtx_cfg_setup ( ismtx_cfg_t * cfg)

ISM TX configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See ismtx_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ ismtx_default_cfg()

err_t ismtx_default_cfg ( ismtx_t * ctx)

ISM TX default configuration function.

This function executes a default configuration of ISM TX click board.

Parameters
[in]ctx: Click context object. See ismtx_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ ismtx_generic_read()

err_t ismtx_generic_read ( ismtx_t * ctx,
uint8_t reg,
uint8_t * data_out )

ISM TX data reading function.

This function reads a byte from the selected register by using SPI serial interface.

Parameters
[in]ctx: Click context object. See ismtx_t object definition for detailed explanation.
[in]reg: Start register address.
[out]data_out: Output read byte.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ ismtx_generic_write()

err_t ismtx_generic_write ( ismtx_t * ctx,
uint8_t reg,
uint8_t data_in )

ISM TX data writing function.

This function writes a bytes to the selected register by using SPI serial interface.

Parameters
[in]ctx: Click context object. See ismtx_t object definition for detailed explanation.
[in]reg: Start register address.
[in]data_in: Byte to be written.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ ismtx_get_cfg()

err_t ismtx_get_cfg ( ismtx_t * ctx,
uint8_t cfg_macro,
uint8_t * cfg_value )

ISM TX reading configuration.

This function reads a desired a desired value to selected configuration

Parameters
[in]ctx: Click context object. See ismtx_t object definition for detailed explanation.
[in]cfg_macro: Configuration macro.
[out]cfg_value: Configuration value.
Returns
  • 0 - Success,
  • -1 - Unknown cfg_macro. See #err_t definition for detailed explanation.

◆ ismtx_get_frequency()

uint32_t ismtx_get_frequency ( ismtx_t * ctx)

Getting current frequency for transmission .

This function gets a currently set frequency for transmiting data.

Parameters
[in]ctx: Click context object. See ismtx_t object definition for detailed explanation.
Returns
Frequency value[Hz].

◆ ismtx_init()

err_t ismtx_init ( ismtx_t * ctx,
ismtx_cfg_t * cfg )

ISM TX initialization function.

This function initializes all necessary pins and peripherals used for this click board.

Parameters
[out]ctx: Click context object. See ismtx_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See ismtx_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ ismtx_set_cfg()

err_t ismtx_set_cfg ( ismtx_t * ctx,
uint8_t cfg_macro,
uint8_t cfg_value )

ISM TX writing configuration.

This function writes a desired value to selected configuration.

Parameters
[in]ctx: Click context object. See ismtx_t object definition for detailed explanation.
[in]cfg_macro: Configuration macro.
[in]cfg_value: Configuration value.
Returns
  • 0 - Success,
  • -1 - Unknown cfg_macro,
  • -2 - cfg_value greater then maximum value for specific macro. See #err_t definition for detailed explanation.

◆ ismtx_set_frequency()

err_t ismtx_set_frequency ( ismtx_t * ctx,
uint32_t freq )

Setting specific frequency for transmission.

This function sets a desired frequency for transmiting data.

Parameters
[in]ctx: Click context object. See ismtx_t object definition for detailed explanation.
[in]freq: Frequency[Hz].
Returns
  • 0 - Success,
  • -1 - Frequency value error. See #err_t definition for detailed explanation.
Note
Frequency must be between 250000000 and 950000000.

◆ ismtx_soft_reset()

void ismtx_soft_reset ( ismtx_t * ctx)

ISM TX software reset.

This function sends reset command and then clears it.

Parameters
[in]ctx: Click context object. See ismtx_t object definition for detailed explanation.
Returns
Nothing.
Note
After reset there is 1 second delay.

◆ ismtx_transmit_data()

err_t ismtx_transmit_data ( ismtx_t * ctx,
uint8_t preamble_byte,
uint8_t * tx_data,
uint8_t tx_data_len )

Function for transmitting data with preamble byte and lenght.

Function transmits preamble byte, data length and then data.

Parameters
[in]ctx: Click context object. See ismtx_t object definition for detailed explanation.
[in]preamble_byte: Preamble byte(first byte to transmit for communication sync).
[in]tx_data: Data to transmit.
[in]tx_data_len: tx_data length.
Returns
  • 0 - Success,
  • -1 - tx_data_len greater then maximum value. See #err_t definition for detailed explanation.
Note
Thins fucntion limits you to 62 bytes to transmit due to ismtx_transmit_raw_data limition.

◆ ismtx_transmit_raw_data()

err_t ismtx_transmit_raw_data ( ismtx_t * ctx,
uint8_t * tx_data,
uint8_t tx_len )

Function for trinsmiting data.

Function sets converts data to mancheter data, sets device in transmition mode, transmits data and then returns device in normal mode.

Parameters
[in]ctx: Click context object. See ismtx_t object definition for detailed explanation.
[in]tx_data: Data to transmit.
[in]tx_len: Data transmition lenght.
Returns
  • 0 - Success,
  • -1 - tx_len greater then maximum value. See #err_t definition for detailed explanation.
Note
Thins fucntion limits you to 64 bytes to transmit due to array limition, device doesn't have that limit. If you need to send more then maximum value and your architecture allows it you can increse maximum value in source files.