irda3 2.0.0.0
IrDA 3 Click Driver

API for configuring and manipulating IrDA 3 Click driver. More...

Topics

 IrDA 3 Device Settings
 Settings for registers of IrDA 3 Click driver.
 
 IrDA 3 MikroBUS Map
 MikroBUS pin mapping of IrDA 3 Click driver.
 

Functions

void irda3_cfg_setup (irda3_cfg_t *cfg)
 IrDA 3 configuration object setup function.
 
err_t irda3_init (irda3_t *ctx, irda3_cfg_t *cfg)
 IrDA 3 initialization function.
 
void irda3_default_cfg (irda3_t *ctx)
 IrDA 3 default configuration function.
 
void irda3_mode_setup (irda3_t *ctx, irda3_mode_t state)
 Mode Setup function.
 
void irda3_pwr_setup (irda3_t *ctx, irda3_pwr_t state)
 Power Setup function.
 
void irda3_reset (irda3_t *ctx)
 Reset function.
 
void irda3_generic_multiple_send (irda3_t *ctx, char *tx_data)
 Generic Multiple Send function.
 
void irda3_generic_multiple_receive (irda3_t *ctx, char *rx_data, char termination_char)
 Generic Multiple Receive function.
 
void irda3_generic_single_send (irda3_t *ctx, char tx_data)
 Generic Single Send function.
 
char irda3_generic_single_receive (irda3_t *ctx)
 Generic Single Receive function.
 

Detailed Description

API for configuring and manipulating IrDA 3 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

◆ irda3_cfg_setup()

void irda3_cfg_setup ( irda3_cfg_t * cfg)

IrDA 3 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ irda3_default_cfg()

void irda3_default_cfg ( irda3_t * ctx)

IrDA 3 default configuration function.

This function executes a default configuration of IrDA 3 click board.

Parameters
[in]ctx: Click context object. See irda3_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ irda3_generic_multiple_receive()

void irda3_generic_multiple_receive ( irda3_t * ctx,
char * rx_data,
char termination_char )

Generic Multiple Receive function.

This function allows data receiving operation of multiple data bytes to be performed.

Parameters
ctxClick object.
rx_dataMemory where read data be stored.
termination_charTermination character.
Returns
Nothing
Note
The function will receive data bytes from the device until termination character was received. At the end of the received data buffer, this function will add '\0' character.

◆ irda3_generic_multiple_send()

void irda3_generic_multiple_send ( irda3_t * ctx,
char * tx_data )

Generic Multiple Send function.

This function allows data sending operation of multiple data bytes to be performed.

Parameters
ctxClick object.
tx_dataData to be sent.
Returns
Nothing
Note
None.

◆ irda3_generic_single_receive()

char irda3_generic_single_receive ( irda3_t * ctx)

Generic Single Receive function.

This function allows data receiving operation of single data byte to be performed.

Parameters
ctxClick object.
Returns
Received data byte.
Note
None.

◆ irda3_generic_single_send()

void irda3_generic_single_send ( irda3_t * ctx,
char tx_data )

Generic Single Send function.

This function allows data sending operation of single data byte to be performed.

Parameters
ctxClick object.
tx_dataData to be sent.
Returns
Nothing
Note
None.

◆ irda3_init()

err_t irda3_init ( irda3_t * ctx,
irda3_cfg_t * cfg )

IrDA 3 initialization function.

This function initializes all necessary pins and peripherals used for this click board.

Parameters
[out]ctx: Click context object. See irda3_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See irda3_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ irda3_mode_setup()

void irda3_mode_setup ( irda3_t * ctx,
irda3_mode_t state )

Mode Setup function.

This function allows IrDA 3 click mode to be set.

Parameters
ctxClick object.
state0 - Command mode, 1 - Data mode.
Returns
Nothing
Note
None.

◆ irda3_pwr_setup()

void irda3_pwr_setup ( irda3_t * ctx,
irda3_pwr_t state )

Power Setup function.

This function allows IrDA 3 click power mode to be set.

Parameters
ctxClick object.
state0 - Power off, 1 - Power on.
Returns
Nothing
Note
None.

◆ irda3_reset()

void irda3_reset ( irda3_t * ctx)

Reset function.

This function executes a device reset operation.

Parameters
ctxClick object.
Returns
Nothing
Note
After the reset operation was done, the device will be returned back to normal mode.