mbusrf3
2.1.0.0
|
API for configuring and manipulating M-BUS RF 3 Click driver. More...
Modules | |
M-BUS RF 3 Device Settings | |
Settings for registers of M-BUS RF 3 Click driver. | |
M-BUS RF 3 MikroBUS Map | |
MikroBUS pin mapping of M-BUS RF 3 Click driver. | |
Functions | |
void | mbusrf3_cfg_setup (mbusrf3_cfg_t *cfg) |
M-BUS RF 3 configuration object setup function. More... | |
err_t | mbusrf3_init (mbusrf3_t *ctx, mbusrf3_cfg_t *cfg) |
M-BUS RF 3 initialization function. More... | |
err_t | mbusrf3_generic_write (mbusrf3_t *ctx, uint8_t *data_in, uint16_t len) |
M-BUS RF 3 data writing function. More... | |
err_t | mbusrf3_generic_read (mbusrf3_t *ctx, uint8_t *data_out, uint16_t len) |
M-BUS RF 3 data reading function. More... | |
void | mbusrf3_set_rst_pin (mbusrf3_t *ctx, uint8_t pin_state) |
M-BUS RF 3 set reset pin function. More... | |
err_t | mbusrf3_send_command (mbusrf3_t *ctx, uint8_t cmd, uint8_t *data_in, uint8_t len) |
M-BUS RF 3 send command function. More... | |
err_t | mbusrf3_send_data (mbusrf3_t *ctx, uint8_t *data_in, uint8_t len) |
M-BUS RF 3 send data function. More... | |
API for configuring and manipulating M-BUS RF 3 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void mbusrf3_cfg_setup | ( | mbusrf3_cfg_t * | cfg | ) |
M-BUS RF 3 configuration object setup function.
This function initializes Click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See mbusrf3_cfg_t object definition for detailed explanation. |
err_t mbusrf3_generic_read | ( | mbusrf3_t * | ctx, |
uint8_t * | data_out, | ||
uint16_t | len | ||
) |
M-BUS RF 3 data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See mbusrf3_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 mbusrf3_generic_write | ( | mbusrf3_t * | ctx, |
uint8_t * | data_in, | ||
uint16_t | len | ||
) |
M-BUS RF 3 data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See mbusrf3_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 mbusrf3_init | ( | mbusrf3_t * | ctx, |
mbusrf3_cfg_t * | cfg | ||
) |
M-BUS RF 3 initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
[out] | ctx | : Click context object. See mbusrf3_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See mbusrf3_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t mbusrf3_send_command | ( | mbusrf3_t * | ctx, |
uint8_t | cmd, | ||
uint8_t * | data_in, | ||
uint8_t | len | ||
) |
M-BUS RF 3 send command function.
This function is used to send a desired command.
[in] | ctx | : Click context object. See mbusrf3_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 mbusrf3_send_data | ( | mbusrf3_t * | ctx, |
uint8_t * | data_in, | ||
uint8_t | len | ||
) |
M-BUS RF 3 send data function.
This function is used to data in transmitter mode.
[in] | ctx | : Click context object. See mbusrf3_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 mbusrf3_set_rst_pin | ( | mbusrf3_t * | ctx, |
uint8_t | pin_state | ||
) |
M-BUS RF 3 set reset pin function.
This function is used to set reset pin state.
[in] | ctx | : Click context object. See mbusrf3_t object definition for detailed explanation. |
[in] | pin_state | : Desired pin state. |