dtmfdecoder 2.0.0.0
DTMF Decoder Click Driver

API for configuring and manipulating DTMF Decoder Click driver. More...

Topics

 DTMF Decoder Command List
 List of command bytes of DTMF Decoder Click driver.
 
 DTMF Decoder Registers Settings
 Settings for registers of DTMF Decoder Click driver.
 
 DTMF Decoder MikroBUS Map
 MikroBUS pin mapping of DTMF Decoder Click driver.
 

Functions

void dtmfdecoder_cfg_setup (dtmfdecoder_cfg_t *cfg)
 DTMF Decoder configuration object setup function.
 
err_t dtmfdecoder_init (dtmfdecoder_t *ctx, dtmfdecoder_cfg_t *cfg)
 DTMF Decoder initialization function.
 
void dtmfdecoder_default_cfg (dtmfdecoder_t *ctx)
 DTMF Decoder default configuration function.
 
err_t dtmfdecoder_generic_write (dtmfdecoder_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len)
 DTMF Decoder I2C writing function.
 
err_t dtmfdecoder_generic_read (dtmfdecoder_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len)
 DTMF Decoder I2C reading function.
 
void dtmfdecoder_inhibit_on (dtmfdecoder_t *ctx)
 DTMF Decoder inhibit on function.
 
void dtmfdecoder_inhibit_off (dtmfdecoder_t *ctx)
 DTMF Decoder inhibit off function.
 
void dtmfdecoder_powerdown_on (dtmfdecoder_t *ctx)
 DTMF Decoder power down on function.
 
void dtmfdecoder_powerdown_off (dtmfdecoder_t *ctx)
 DTMF Decoder power down off function.
 
uint8_t dtmfdecoder_delayed_steering_check (dtmfdecoder_t *ctx)
 DTMF Decoder check delayed steering function.
 
uint8_t dtmfdecoder_tone_read (dtmfdecoder_t *ctx)
 DTMF Decoder read tone function.
 

Detailed Description

API for configuring and manipulating DTMF Decoder 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

◆ dtmfdecoder_cfg_setup()

void dtmfdecoder_cfg_setup ( dtmfdecoder_cfg_t * cfg)

DTMF Decoder configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ dtmfdecoder_default_cfg()

void dtmfdecoder_default_cfg ( dtmfdecoder_t * ctx)

DTMF Decoder default configuration function.

This function executes a default configuration of DTMF Decoder click board.

Parameters
[in]ctx: Click context object. See dtmfdecoder_t object definition for detailed explanation.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ dtmfdecoder_delayed_steering_check()

uint8_t dtmfdecoder_delayed_steering_check ( dtmfdecoder_t * ctx)

DTMF Decoder check delayed steering function.

This function checks the state of the StD pin.

Parameters
[in]ctx: Click context object. See dtmfdecoder_t object definition for detailed explanation.
Returns
  • 1 - Tone-pair has been registered,
  • 0 - Voltage on St/GT is below VTSt.
Note
None.

◆ dtmfdecoder_generic_read()

err_t dtmfdecoder_generic_read ( dtmfdecoder_t * ctx,
uint8_t reg,
uint8_t * rx_buf,
uint8_t rx_len )

DTMF Decoder I2C reading function.

This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See dtmfdecoder_t object definition for detailed explanation.
[in]reg: Start register address.
[out]rx_buf: Output read data.
[in]rx_len: Number of bytes to be read.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ dtmfdecoder_generic_write()

err_t dtmfdecoder_generic_write ( dtmfdecoder_t * ctx,
uint8_t reg,
uint8_t * tx_buf,
uint8_t tx_len )

DTMF Decoder I2C writing function.

This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See dtmfdecoder_t object definition for detailed explanation.
[in]reg: Start register address.
[in]tx_buf: Data to be written.
[in]tx_len: Number of bytes to be written.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ dtmfdecoder_inhibit_off()

void dtmfdecoder_inhibit_off ( dtmfdecoder_t * ctx)

DTMF Decoder inhibit off function.

This function allows the detection of tones representing characters A, B, C and D.

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

◆ dtmfdecoder_inhibit_on()

void dtmfdecoder_inhibit_on ( dtmfdecoder_t * ctx)

DTMF Decoder inhibit on function.

This function inhibits the detection of tones representing characters A, B, C and D.

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

◆ dtmfdecoder_init()

err_t dtmfdecoder_init ( dtmfdecoder_t * ctx,
dtmfdecoder_cfg_t * cfg )

DTMF Decoder initialization function.

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

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

◆ dtmfdecoder_powerdown_off()

void dtmfdecoder_powerdown_off ( dtmfdecoder_t * ctx)

DTMF Decoder power down off function.

This function powers up the device and along with the oscillator.

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

◆ dtmfdecoder_powerdown_on()

void dtmfdecoder_powerdown_on ( dtmfdecoder_t * ctx)

DTMF Decoder power down on function.

This function powers down the device and inhibits the oscillator.

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

◆ dtmfdecoder_tone_read()

uint8_t dtmfdecoder_tone_read ( dtmfdecoder_t * ctx)

DTMF Decoder read tone function.

This function reads a last registered tone and returns decoded data in character format.

Parameters
[in]ctx: Click context object. See dtmfdecoder_t object definition for detailed explanation.
Returns
Ascii decoded tone.
Note
None.