neomesh2 2.1.0.0
|
API for configuring and manipulating NeoMesh 2 Click driver. More...
Topics | |
NeoMesh 2 Device Settings | |
Settings for registers of NeoMesh 2 Click driver. | |
NeoMesh 2 MikroBUS Map | |
MikroBUS pin mapping of NeoMesh 2 Click driver. | |
Functions | |
void | neomesh2_cfg_setup (neomesh2_cfg_t *cfg) |
NeoMesh 2 configuration object setup function. | |
err_t | neomesh2_init (neomesh2_t *ctx, neomesh2_cfg_t *cfg) |
NeoMesh 2 initialization function. | |
err_t | neomesh2_send_aapi_frame (neomesh2_t *ctx, neomesh2_aapi_frame_t *frame) |
NeoMesh 2 send aapi frame function. | |
err_t | neomesh2_read_aapi_frame (neomesh2_t *ctx, neomesh2_aapi_frame_t *frame) |
NeoMesh 2 read aapi frame function. | |
err_t | neomesh2_send_sapi_frame (neomesh2_t *ctx, neomesh2_sapi_frame_t *frame) |
NeoMesh 2 send sapi frame function. | |
err_t | neomesh2_read_sapi_frame (neomesh2_t *ctx, neomesh2_sapi_frame_t *frame) |
NeoMesh 2 read sapi frame function. | |
void | neomesh2_set_rst_pin (neomesh2_t *ctx, uint8_t state) |
NeoMesh 2 set rst pin function. | |
void | neomesh2_set_wes_pin (neomesh2_t *ctx, uint8_t state) |
NeoMesh 2 set wes pin function. | |
uint8_t | neomesh2_get_app_pin (neomesh2_t *ctx) |
NeoMesh 2 get app pin function. | |
uint8_t | neomesh2_get_cts_pin (neomesh2_t *ctx) |
NeoMesh 2 get cts pin function. | |
uint8_t | neomesh2_get_wup_pin (neomesh2_t *ctx) |
NeoMesh 2 get wup pin function. | |
API for configuring and manipulating NeoMesh 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 neomesh2_cfg_setup | ( | neomesh2_cfg_t * | cfg | ) |
NeoMesh 2 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See neomesh2_cfg_t object definition for detailed explanation. |
uint8_t neomesh2_get_app_pin | ( | neomesh2_t * | ctx | ) |
NeoMesh 2 get app pin function.
This function returns the APP pin logic state.
[in] | ctx | : Click context object. See neomesh2_t object definition for detailed explanation. |
uint8_t neomesh2_get_cts_pin | ( | neomesh2_t * | ctx | ) |
NeoMesh 2 get cts pin function.
This function returns the CTS pin logic state.
[in] | ctx | : Click context object. See neomesh2_t object definition for detailed explanation. |
uint8_t neomesh2_get_wup_pin | ( | neomesh2_t * | ctx | ) |
NeoMesh 2 get wup pin function.
This function returns the WUP pin logic state.
[in] | ctx | : Click context object. See neomesh2_t object definition for detailed explanation. |
err_t neomesh2_init | ( | neomesh2_t * | ctx, |
neomesh2_cfg_t * | cfg ) |
NeoMesh 2 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See neomesh2_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See neomesh2_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t neomesh2_read_aapi_frame | ( | neomesh2_t * | ctx, |
neomesh2_aapi_frame_t * | frame ) |
NeoMesh 2 read aapi frame function.
This function reads an AAPI frame by using UART serial interface.
[in] | ctx | : Click context object. See neomesh2_t object definition for detailed explanation. |
[out] | frame | : AAPI frame structure read. See neomesh2_aapi_frame_t object definition for detailed explanation. |
0
- Success, -1
- Error, frame is not read correctly, -2
- Timeout error. See #err_t definition for detailed explanation. err_t neomesh2_read_sapi_frame | ( | neomesh2_t * | ctx, |
neomesh2_sapi_frame_t * | frame ) |
NeoMesh 2 read sapi frame function.
This function reads an SAPI frame by using UART serial interface.
[in] | ctx | : Click context object. See neomesh2_t object definition for detailed explanation. |
[out] | frame | : SAPI frame structure read. See neomesh2_sapi_frame_t object definition for detailed explanation. |
0
- Success, -1
- Error, frame is not read correctly, -2
- Timeout error. See #err_t definition for detailed explanation. err_t neomesh2_send_aapi_frame | ( | neomesh2_t * | ctx, |
neomesh2_aapi_frame_t * | frame ) |
NeoMesh 2 send aapi frame function.
This function sends a desired AAPI frame by using UART serial interface.
[in] | ctx | : Click context object. See neomesh2_t object definition for detailed explanation. |
[in] | frame | : AAPI frame structure to be sent. See neomesh2_aapi_frame_t object definition for detailed explanation. |
0
- Success, -2
- Timeout error. See #err_t definition for detailed explanation. err_t neomesh2_send_sapi_frame | ( | neomesh2_t * | ctx, |
neomesh2_sapi_frame_t * | frame ) |
NeoMesh 2 send sapi frame function.
This function sends a desired SAPI frame by using UART serial interface.
[in] | ctx | : Click context object. See neomesh2_t object definition for detailed explanation. |
[in] | frame | : SAPI frame structure to be sent. See neomesh2_sapi_frame_t object definition for detailed explanation. |
0
- Success, -2
- Timeout error. See #err_t definition for detailed explanation. void neomesh2_set_rst_pin | ( | neomesh2_t * | ctx, |
uint8_t | state ) |
NeoMesh 2 set rst pin function.
This function sets the RST pin logic state.
[in] | ctx | : Click context object. See neomesh2_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
void neomesh2_set_wes_pin | ( | neomesh2_t * | ctx, |
uint8_t | state ) |
NeoMesh 2 set wes pin function.
This function sets the WES pin logic state.
[in] | ctx | : Click context object. See neomesh2_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |