irda4 2.1.0.0
IrDA 4 Click Driver

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

Topics

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

Functions

void irda4_cfg_setup (irda4_cfg_t *cfg)
 IrDA 4 configuration object setup function.
 
err_t irda4_init (irda4_t *ctx, irda4_cfg_t *cfg)
 IrDA 4 initialization function.
 
err_t irda4_generic_write (irda4_t *ctx, uint8_t *data_in, uint16_t len)
 IrDA 4 data writing function.
 
err_t irda4_generic_read (irda4_t *ctx, uint8_t *data_out, uint16_t len)
 IrDA 4 data reading function.
 
void irda4_set_tx_shutdown (irda4_t *ctx, uint8_t sd_state)
 IrDA 4 TX shutdown function.
 
void irda4_set_reset_state (irda4_t *ctx, uint8_t rst_state)
 IrDA 4 set reset pin state function.
 
void irda_hw_reset (irda4_t *ctx)
 IrDA 4 hardware reset function.
 

Detailed Description

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

◆ irda4_cfg_setup()

void irda4_cfg_setup ( irda4_cfg_t * cfg)

IrDA 4 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ irda4_generic_read()

err_t irda4_generic_read ( irda4_t * ctx,
uint8_t * data_out,
uint16_t len )

IrDA 4 data reading function.

This function reads a desired number of data bytes by using UART serial interface.

Parameters
[in]ctx: Click context object. See irda4_t object definition for detailed explanation.
[out]data_out: Output read data.
[in]len: Number of bytes to be read.
Returns
  • >0 - Number of data bytes read,
  • <=0 - Error/Empty Ring buffer. See #err_t definition for detailed explanation.
Note
None.

◆ irda4_generic_write()

err_t irda4_generic_write ( irda4_t * ctx,
uint8_t * data_in,
uint16_t len )

IrDA 4 data writing function.

This function writes a desired number of data bytes by using UART serial interface.

Parameters
[in]ctx: Click context object. See irda4_t object definition for detailed explanation.
[in]data_in: Data buffer for sending.
[in]len: Number of bytes for sending.
Returns
  • >=0 - Success,
  • <0 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ irda4_init()

err_t irda4_init ( irda4_t * ctx,
irda4_cfg_t * cfg )

IrDA 4 initialization function.

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

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

◆ irda4_set_reset_state()

void irda4_set_reset_state ( irda4_t * ctx,
uint8_t rst_state )

IrDA 4 set reset pin state function.

This function set reset pin state.

Parameters
[in]ctx: Click context object. See irda4_t object definition for detailed explanation.
[in]rst_state: RST pin state.
Returns
Nothing.
Note
None.

◆ irda4_set_tx_shutdown()

void irda4_set_tx_shutdown ( irda4_t * ctx,
uint8_t sd_state )

IrDA 4 TX shutdown function.

This function disables the transmitter mode.

Parameters
[in]ctx: Click context object. See irda4_t object definition for detailed explanation.
[in]sd_state: Shutdown state.
Returns
Nothing.
Note
None.

◆ irda_hw_reset()

void irda_hw_reset ( irda4_t * ctx)

IrDA 4 hardware reset function.

This function is used to perform a hardware reset.

Parameters
[in]ctx: Click context object. See irda4_t object definition for detailed explanation.
Returns
Nothing.
Note
None.