28#ifndef DTMFGENERATOR_H
29#define DTMFGENERATOR_H
39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
71#define DTMFGENERATOR_OUT_TONE_0 0x00
72#define DTMFGENERATOR_OUT_TONE_1 0x01
73#define DTMFGENERATOR_OUT_TONE_2 0x02
74#define DTMFGENERATOR_OUT_TONE_3 0x03
75#define DTMFGENERATOR_OUT_TONE_4 0x04
76#define DTMFGENERATOR_OUT_TONE_5 0x05
77#define DTMFGENERATOR_OUT_TONE_6 0x06
78#define DTMFGENERATOR_OUT_TONE_7 0x07
79#define DTMFGENERATOR_OUT_TONE_8 0x08
80#define DTMFGENERATOR_OUT_TONE_9 0x09
81#define DTMFGENERATOR_OUT_TONE_A 0x0A
82#define DTMFGENERATOR_OUT_TONE_B 0x0B
83#define DTMFGENERATOR_OUT_TONE_C 0x0C
84#define DTMFGENERATOR_OUT_TONE_D 0x0D
85#define DTMFGENERATOR_OUT_TONE_ASTERISK 0x0E
86#define DTMFGENERATOR_OUT_TONE_HASH 0x0F
87#define DTMFGENERATOR_OUT_TONE_STOP 0x10
89#define DTMFGENERATOR_GPIO_PIN_STATE_LOW 0x00
90#define DTMFGENERATOR_GPIO_PIN_STATE_HIGH 0x01
107#define DTMFGENERATOR_MAP_MIKROBUS( cfg, mikrobus ) \
108 cfg.dat = MIKROBUS( mikrobus, MIKROBUS_RST ); \
109 cfg.ce = MIKROBUS( mikrobus, MIKROBUS_CS ); \
110 cfg.clk = MIKROBUS( mikrobus, MIKROBUS_PWM )
dtmfgenerator_return_value_t
DTMF Generator Click return value data.
Definition dtmfgenerator.h:144
@ DTMFGENERATOR_ERROR
Definition dtmfgenerator.h:146
@ DTMFGENERATOR_OK
Definition dtmfgenerator.h:145
void dtmfgenerator_set_ce(dtmfgenerator_t *ctx, uint8_t pin_state)
Set CE ( CS ) pin state function.
void dtmfgenerator_transmit_out_tone(dtmfgenerator_t *ctx, uint8_t out_tone, uint16_t delay_m_s)
Transmit output tone function.
void dtmfgenerator_set_dat(dtmfgenerator_t *ctx, uint8_t pin_state)
Set DATA ( RST ) pin state function.
void dtmfgenerator_set_clk(dtmfgenerator_t *ctx, uint8_t pin_state)
Set CLK ( PWM ) pin state function.
void dtmfgenerator_cfg_setup(dtmfgenerator_cfg_t *cfg)
DTMF Generator configuration object setup function.
void dtmfgenerator_power_on(dtmfgenerator_t *ctx)
Power ON function.
err_t dtmfgenerator_init(dtmfgenerator_t *ctx, dtmfgenerator_cfg_t *cfg)
DTMF Generator initialization function.
DTMF Generator Click configuration object.
Definition dtmfgenerator.h:132
pin_name_t clk
Definition dtmfgenerator.h:135
pin_name_t ce
Definition dtmfgenerator.h:134
pin_name_t dat
Definition dtmfgenerator.h:133
DTMF Generator Click context object.
Definition dtmfgenerator.h:120
digital_out_t dat
Definition dtmfgenerator.h:121
digital_out_t clk
Definition dtmfgenerator.h:123
digital_out_t ce
Definition dtmfgenerator.h:122