neomesh2 2.1.0.0
NeoMesh 2 Click Driver

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.
 

Detailed Description

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.

Function Documentation

◆ neomesh2_cfg_setup()

void neomesh2_cfg_setup ( neomesh2_cfg_t * cfg)

NeoMesh 2 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ neomesh2_get_app_pin()

uint8_t neomesh2_get_app_pin ( neomesh2_t * ctx)

NeoMesh 2 get app pin function.

This function returns the APP pin logic state.

Parameters
[in]ctx: Click context object. See neomesh2_t object definition for detailed explanation.
Returns
Pin logic state.
Note
None.

◆ neomesh2_get_cts_pin()

uint8_t neomesh2_get_cts_pin ( neomesh2_t * ctx)

NeoMesh 2 get cts pin function.

This function returns the CTS pin logic state.

Parameters
[in]ctx: Click context object. See neomesh2_t object definition for detailed explanation.
Returns
Pin logic state.
Note
None.

◆ neomesh2_get_wup_pin()

uint8_t neomesh2_get_wup_pin ( neomesh2_t * ctx)

NeoMesh 2 get wup pin function.

This function returns the WUP pin logic state.

Parameters
[in]ctx: Click context object. See neomesh2_t object definition for detailed explanation.
Returns
Pin logic state.
Note
None.

◆ neomesh2_init()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ neomesh2_read_aapi_frame()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error, frame is not read correctly,
  • -2 - Timeout error. See #err_t definition for detailed explanation.
Note
None.

◆ neomesh2_read_sapi_frame()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error, frame is not read correctly,
  • -2 - Timeout error. See #err_t definition for detailed explanation.
Note
None.

◆ neomesh2_send_aapi_frame()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -2 - Timeout error. See #err_t definition for detailed explanation.
Note
None.

◆ neomesh2_send_sapi_frame()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -2 - Timeout error. See #err_t definition for detailed explanation.
Note
None.

◆ neomesh2_set_rst_pin()

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.

Parameters
[in]ctx: Click context object. See neomesh2_t object definition for detailed explanation.
[in]state: Pin logic state.
Returns
None.
Note
None.

◆ neomesh2_set_wes_pin()

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.

Parameters
[in]ctx: Click context object. See neomesh2_t object definition for detailed explanation.
[in]state: Pin logic state.
Returns
None.
Note
None.