dtmfgenerator 2.0.0.0
DTMF Generator Click Driver

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

Topics

 DTMF Generator Registers Settings
 Settings for registers of DTMF Generator Click driver.
 
 DTMF Generator MikroBUS Map
 MikroBUS pin mapping of DTMF Generator Click driver.
 

Functions

void dtmfgenerator_cfg_setup (dtmfgenerator_cfg_t *cfg)
 DTMF Generator configuration object setup function.
 
err_t dtmfgenerator_init (dtmfgenerator_t *ctx, dtmfgenerator_cfg_t *cfg)
 DTMF Generator initialization function.
 
void dtmfgenerator_set_dat (dtmfgenerator_t *ctx, uint8_t pin_state)
 Set DATA ( RST ) pin state function.
 
void dtmfgenerator_set_ce (dtmfgenerator_t *ctx, uint8_t pin_state)
 Set CE ( CS ) pin state function.
 
void dtmfgenerator_set_clk (dtmfgenerator_t *ctx, uint8_t pin_state)
 Set CLK ( PWM ) pin state function.
 
void dtmfgenerator_power_on (dtmfgenerator_t *ctx)
 Power ON function.
 
void dtmfgenerator_transmit_out_tone (dtmfgenerator_t *ctx, uint8_t out_tone, uint16_t delay_m_s)
 Transmit output tone function.
 

Detailed Description

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

◆ dtmfgenerator_cfg_setup()

void dtmfgenerator_cfg_setup ( dtmfgenerator_cfg_t * cfg)

DTMF Generator configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ dtmfgenerator_init()

err_t dtmfgenerator_init ( dtmfgenerator_t * ctx,
dtmfgenerator_cfg_t * cfg )

DTMF Generator initialization function.

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

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

◆ dtmfgenerator_power_on()

void dtmfgenerator_power_on ( dtmfgenerator_t * ctx)

Power ON function.

The function run the power-on sequence.

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

◆ dtmfgenerator_set_ce()

void dtmfgenerator_set_ce ( dtmfgenerator_t * ctx,
uint8_t pin_state )

Set CE ( CS ) pin state function.

The function set CE ( CS ) pin state.

Parameters
[out]ctx: Click context object. See dtmfgenerator_t object definition for detailed explanation.
[in]pin_state: The RST the pin state ( low or high ).
Returns
Nothing.

◆ dtmfgenerator_set_clk()

void dtmfgenerator_set_clk ( dtmfgenerator_t * ctx,
uint8_t pin_state )

Set CLK ( PWM ) pin state function.

The function set CLK ( PWM ) pin state.

Parameters
[out]ctx: Click context object. See dtmfgenerator_t object definition for detailed explanation.
[in]pin_state: The PWM the pin state ( low or high ).
Returns
Nothing.

◆ dtmfgenerator_set_dat()

void dtmfgenerator_set_dat ( dtmfgenerator_t * ctx,
uint8_t pin_state )

Set DATA ( RST ) pin state function.

The function set DATA ( RST ) pin state.

Parameters
[out]ctx: Click context object. See dtmfgenerator_t object definition for detailed explanation.
[in]pin_state: The RST the pin state ( low or high ).
Returns
Nothing.

◆ dtmfgenerator_transmit_out_tone()

void dtmfgenerator_transmit_out_tone ( dtmfgenerator_t * ctx,
uint8_t out_tone,
uint16_t delay_m_s )

Transmit output tone function.

The function transmit duration time of the desired tone.

Parameters
[in]ctx: Click context object. See dtmfgenerator_t object definition for detailed explanation.
[in]out_tone: The tone for digit that is being sent to the DTMF Generator.
[in]delay_m_s: 16-bit tone duration time in milliseconds.
Returns
Nothing.