mbusrf2
2.1.0.0
|
API for configuring and manipulating M-BUS RF 2 Click driver. More...
Modules | |
M-BUS RF 2 Device Settings | |
Settings for registers of M-BUS RF 2 Click driver. | |
M-BUS RF 2 MikroBUS Map | |
MikroBUS pin mapping of M-BUS RF 2 Click driver. | |
Functions | |
void | mbusrf2_cfg_setup (mbusrf2_cfg_t *cfg) |
M-BUS RF 2 configuration object setup function. More... | |
err_t | mbusrf2_init (mbusrf2_t *ctx, mbusrf2_cfg_t *cfg) |
M-BUS RF 2 initialization function. More... | |
err_t | mbusrf2_generic_write (mbusrf2_t *ctx, uint8_t *data_in, uint16_t len) |
M-BUS RF 2 data writing function. More... | |
err_t | mbusrf2_generic_read (mbusrf2_t *ctx, uint8_t *data_out, uint16_t len) |
M-BUS RF 2 data reading function. More... | |
void | mbusrf2_set_rst_pin (mbusrf2_t *ctx, uint8_t pin_state) |
M-BUS RF 2 set reset pin function. More... | |
err_t | mbusrf2_send_command (mbusrf2_t *ctx, uint8_t cmd, uint8_t *data_in, uint8_t len) |
M-BUS RF 2 send command function. More... | |
err_t | mbusrf2_send_data (mbusrf2_t *ctx, uint8_t *data_in, uint8_t len) |
M-BUS RF 2 send data function. More... | |
API for configuring and manipulating M-BUS RF 2 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void mbusrf2_cfg_setup | ( | mbusrf2_cfg_t * | cfg | ) |
M-BUS RF 2 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See mbusrf2_cfg_t object definition for detailed explanation. |
err_t mbusrf2_generic_read | ( | mbusrf2_t * | ctx, |
uint8_t * | data_out, | ||
uint16_t | len | ||
) |
M-BUS RF 2 data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See mbusrf2_t object definition for detailed explanation. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
>0
- Number of data bytes read, <=0
- Error/Empty Ring buffer. See #err_t definition for detailed explanation. err_t mbusrf2_generic_write | ( | mbusrf2_t * | ctx, |
uint8_t * | data_in, | ||
uint16_t | len | ||
) |
M-BUS RF 2 data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See mbusrf2_t object definition for detailed explanation. |
[in] | data_in | : Data buffer for sending. |
[in] | len | : Number of bytes for sending. |
>=0
- Success, <0
- Error. See #err_t definition for detailed explanation. err_t mbusrf2_init | ( | mbusrf2_t * | ctx, |
mbusrf2_cfg_t * | cfg | ||
) |
M-BUS RF 2 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See mbusrf2_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See mbusrf2_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t mbusrf2_send_command | ( | mbusrf2_t * | ctx, |
uint8_t | cmd, | ||
uint8_t * | data_in, | ||
uint8_t | len | ||
) |
M-BUS RF 2 send command function.
This function is used to send a desired command.
[in] | ctx | : Click context object. See mbusrf2_t object definition for detailed explanation. |
[in] | cmd | : Command value. |
[in] | data_in | : Command string value. |
[in] | len | : Command string length. |
>0
- Number of data bytes read, <=0
- Error/Empty Ring buffer. See #err_t definition for detailed explanation. err_t mbusrf2_send_data | ( | mbusrf2_t * | ctx, |
uint8_t * | data_in, | ||
uint8_t | len | ||
) |
M-BUS RF 2 send data function.
This function is used to data in transmitter mode.
[in] | ctx | : Click context object. See mbusrf2_t object definition for detailed explanation. |
[in] | data_in | : Data to be sent. |
[in] | len | : Data length. |
>0
- Number of data bytes read, <=0
- Error/Empty Ring buffer. See #err_t definition for detailed explanation. void mbusrf2_set_rst_pin | ( | mbusrf2_t * | ctx, |
uint8_t | pin_state | ||
) |
M-BUS RF 2 set reset pin function.
This function is used to set reset pin state.
[in] | ctx | : Click context object. See mbusrf2_t object definition for detailed explanation. |
[in] | pin_state | : Desired pin state. |