dsp  2.0.0.0
Modules | Functions
DSP Click Driver

API for configuring and manipulating DSP Click driver. More...

Modules

 DSP MikroBUS Map
 MikroBUS pin mapping of DSP Click driver.
 
 Effects
 
 Pin_state
 
 Dsp_retval_t
 

Functions

void dsp_cfg_setup (dsp_cfg_t *cfg)
 DSP configuration object setup function. More...
 
err_t dsp_init (dsp_t *ctx, dsp_cfg_t *cfg)
 DSP initialization function. More...
 
void dsp_default_cfg (dsp_t *ctx)
 DSP default configuration function. More...
 
void dsp_pin_set_p0 (dsp_t *ctx, uint8_t pin_state)
 DSP P0 pin setting function. More...
 
void dsp_pin_set_p1 (dsp_t *ctx, uint8_t pin_state)
 DSP P1 pin setting function. More...
 
void dsp_pin_set_p2 (dsp_t *ctx, uint8_t pin_state)
 DSP P2 pin setting function. More...
 
void dsp_pin_set_p3 (dsp_t *ctx, uint8_t pin_state)
 DSP P3 pin setting function. More...
 
void dsp_power_on (dsp_t *ctx)
 DSP power on the device function. More...
 
void dsp_reset (dsp_t *ctx)
 DSP reset the device function. More...
 
dsp_retval_t dsp_set_effect (dsp_t *ctx, uint8_t effects)
 DSP reverb and multi-effects setting function. More...
 

Detailed Description

API for configuring and manipulating DSP Click driver.

Function Documentation

◆ dsp_cfg_setup()

void dsp_cfg_setup ( dsp_cfg_t cfg)

DSP configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ dsp_default_cfg()

void dsp_default_cfg ( dsp_t ctx)

DSP default configuration function.

This function executes a default configuration of DSP click board.

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

◆ dsp_init()

err_t dsp_init ( dsp_t ctx,
dsp_cfg_t cfg 
)

DSP initialization function.

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

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

◆ dsp_pin_set_p0()

void dsp_pin_set_p0 ( dsp_t ctx,
uint8_t  pin_state 
)

DSP P0 pin setting function.

This function sets the P0 pin state to the desired level DSP click board.

Parameters
[in]ctx: Click context object. See dsp_t object definition for detailed explanation.
[in]pin_state:
  • 0x00 ( DSP_SET_PIN_STATE_LOW ) - Set P0 pin on the low level,
  • 0x01 ( DSP_SET_PIN_STATE_HIGH ) - Set P0 pin on the high level.
Returns
Nothing.
Note
None.

◆ dsp_pin_set_p1()

void dsp_pin_set_p1 ( dsp_t ctx,
uint8_t  pin_state 
)

DSP P1 pin setting function.

This function sets the P1 pin state to the desired level DSP click board.

Parameters
[in]ctx: Click context object. See dsp_t object definition for detailed explanation.
[in]pin_state:
  • 0x00 ( DSP_SET_PIN_STATE_LOW ) - Set P1 pin on the low level,
  • 0x01 ( DSP_SET_PIN_STATE_HIGH ) - Set P1 pin on the high level.
Returns
Nothing.
Note
None.

◆ dsp_pin_set_p2()

void dsp_pin_set_p2 ( dsp_t ctx,
uint8_t  pin_state 
)

DSP P2 pin setting function.

This function sets the P2 pin state to the desired level DSP click board.

Parameters
[in]ctx: Click context object. See dsp_t object definition for detailed explanation.
[in]pin_state:
  • 0x00 ( DSP_SET_PIN_STATE_LOW ) - Set P2 pin on the low level,
  • 0x01 ( DSP_SET_PIN_STATE_HIGH ) - Set P2 pin on the high level.
Returns
Nothing.
Note
None.

◆ dsp_pin_set_p3()

void dsp_pin_set_p3 ( dsp_t ctx,
uint8_t  pin_state 
)

DSP P3 pin setting function.

This function sets the P3 pin state to the desired level DSP click board.

Parameters
[in]ctx: Click context object. See dsp_t object definition for detailed explanation.
[in]pin_state:
  • 0x00 ( DSP_SET_PIN_STATE_LOW ) - Set P3 pin on the low level,
  • 0x01 ( DSP_SET_PIN_STATE_HIGH ) - Set P3 pin on the high level.
Returns
Nothing.
Note
None.

◆ dsp_power_on()

void dsp_power_on ( dsp_t ctx)

DSP power on the device function.

This function executes power-up of the device of DSP click board.

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

◆ dsp_reset()

void dsp_reset ( dsp_t ctx)

DSP reset the device function.

This function executes a hardware reset of DSP click board.

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

◆ dsp_set_effect()

dsp_retval_t dsp_set_effect ( dsp_t ctx,
uint8_t  effects 
)

DSP reverb and multi-effects setting function.

This function sets the reverb and multi-effects of DSP click board.

Parameters
[in]ctx: Click context object. See dsp_t object definition for detailed explanation.
[in]effects: The number of the desired effect ( from 0 to 15 )
  • 0x00 ( DSP_SET_EFFECT_MEDIUM ) - Reverb, Small hall (1.5 sec.),
  • 0x01 ( DSP_SET_EFFECT_CHAMBR7B ) - Reverb, Big hall (2.8 sec.),
  • 0x02 ( DSP_SET_EFFECT_ROOM3B ) - Reverb, Room (1.8 sec.),
  • 0x03 ( DSP_SET_EFFECT_CHAMBER2 ) - Reverb, Church (7 sec.),
  • 0x04 ( DSP_SET_EFFECT_REVERS3B ) - Reverb Reverse (1.2 sec.),
  • 0x05 ( DSP_SET_EFFECT_GATED4B ) - Reverb Gated (0.8 sec.),
  • 0x06 ( DSP_SET_EFFECT_ROOM2A ) - Reverb Chapel (3 sec.),
  • 0x07 ( DSP_SET_EFFECT_SPRING3B ) - Reverb Spring (2 sec.),
  • 0x08 ( DSP_SET_EFFECT_PHASER1 ) - Phaser,
  • 0x09 ( DSP_SET_EFFECT_FLANGER2 ) - Flanger,
  • 0x0A ( DSP_SET_EFFECT_DELAY7 ) - Echo,
  • 0x0B ( DSP_SET_EFFECT_CHORUS4 ) - Chorus,
  • 0x0C ( DSP_SET_EFFECT_EARLREF4 ) - Early Reflection,
  • 0x0D ( DSP_SET_EFFECT_AMB4 ) - Big Ambience,
  • 0x0E ( DSP_SET_EFFECT_DELAY3 ) - Stereo Delay,
  • 0x0F ( DSP_SET_EFFECT_DELAY1 ) - Slap-back Delay.
Returns
  • 0x00 ( DSP_OK ) - Ok,
  • 0xFF ( DSP_ERROR ) - Error.
Note
None.