ismtx 2.0.0.0
|
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. | |
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.
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.
[in] | ctx | : Click context object. See ismtx_t object definition for detailed explanation. |
[in] | deviation_freq | : Frequency deviation value. |
0
- Success, -2
- deviation_freq greater then maximum value. See #err_t definition for detailed explanation. err_t ismtx_adjust_man_bitrate | ( | ismtx_t * | ctx, |
uint32_t | baud ) |
Adjust manchester baudrate.
This function sets a baudrate.
[in] | ctx | : Click context object. See ismtx_t object definition for detailed explanation. |
[in] | baud | : Baudrate value. |
0
- Success, -1
- Baudrate value error, -2
- Baudrate configuration value error. See #err_t definition for detailed explanation. void ismtx_cfg_setup | ( | ismtx_cfg_t * | cfg | ) |
ISM TX configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See ismtx_cfg_t object definition for detailed explanation. |
err_t ismtx_default_cfg | ( | ismtx_t * | ctx | ) |
ISM TX default configuration function.
This function executes a default configuration of ISM TX click board.
[in] | ctx | : Click context object. See ismtx_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. 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.
[in] | ctx | : Click context object. See ismtx_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read byte. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. 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.
[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. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. 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
[in] | ctx | : Click context object. See ismtx_t object definition for detailed explanation. |
[in] | cfg_macro | : Configuration macro. |
[out] | cfg_value | : Configuration value. |
0
- Success, -1
- Unknown cfg_macro. See #err_t definition for detailed explanation. uint32_t ismtx_get_frequency | ( | ismtx_t * | ctx | ) |
Getting current frequency for transmission .
This function gets a currently set frequency for transmiting data.
[in] | ctx | : Click context object. See ismtx_t object definition for detailed explanation. |
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.
[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. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. 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.
[in] | ctx | : Click context object. See ismtx_t object definition for detailed explanation. |
[in] | cfg_macro | : Configuration macro. |
[in] | cfg_value | : Configuration value. |
0
- Success, -1
- Unknown cfg_macro, -2
- cfg_value greater then maximum value for specific macro. See #err_t definition for detailed explanation. 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.
[in] | ctx | : Click context object. See ismtx_t object definition for detailed explanation. |
[in] | freq | : Frequency[Hz]. |
0
- Success, -1
- Frequency value error. See #err_t definition for detailed explanation. void ismtx_soft_reset | ( | ismtx_t * | ctx | ) |
ISM TX software reset.
This function sends reset command and then clears it.
[in] | ctx | : Click context object. See ismtx_t object definition for detailed explanation. |
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.
[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. |
0
- Success, -1
- tx_data_len greater then maximum value. See #err_t definition for detailed explanation. 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.
[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. |
0
- Success, -1
- tx_len greater then maximum value. See #err_t definition for detailed explanation.