mp3 2.0.0.0
mp3.h File Reference

This file contains API for MP3 Click driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_spi_master.h"

Go to the source code of this file.

Data Structures

struct  mp3_t
 Click ctx object definition. More...
 
struct  mp3_cfg_t
 Click configuration structure definition. More...
 

Macros

#define MP3_MAP_MIKROBUS(cfg, mikrobus)
 
#define MP3_WRITE_CMD   0x02
 
#define MP3_READ_CMD   0x03
 
#define MP3_BASE_ADDR   0x00
 
#define MP3_MODE_ADDR   0x00
 
#define MP3_STATUS_ADDR   0x01
 
#define MP3_BASS_ADDR   0x02
 
#define MP3_CLOCKF_ADDR   0x03
 
#define MP3_DECODE_TIME_ADDR   0x04
 
#define MP3_AUDATA_ADDR   0x05
 
#define MP3_WRAM_ADDR   0x06
 
#define MP3_WRAMADDR_ADDR   0x07
 
#define MP3_HDAT0_ADDR   0x08
 
#define MP3_HDAT1_ADDR   0x09
 
#define MP3_AIADDR_ADDR   0x0A
 
#define MP3_VOL_ADDR   0x0B
 
#define MP3_AICTRL0_ADDR   0x0C
 
#define MP3_AICTRL1_ADDR   0x0D
 
#define MP3_AICTRL2_ADDR   0x0E
 
#define MP3_AICTRL3_ADDR   0x0F
 
#define MP3_OK   0
 
#define MP3_ERROR   -1
 

Functions

void mp3_cfg_setup (mp3_cfg_t *cfg)
 Config Object Initialization function.
 
err_t mp3_init (mp3_t *ctx, mp3_cfg_t *cfg)
 Initialization function.
 
void mp3_reset (mp3_t *ctx)
 Functions for reset MP3 module.
 
uint8_t mp3_is_busy (mp3_t *ctx)
 Function that checks whether busy mp3.
 
void mp3_cmd_write (mp3_t *ctx, uint8_t address, uint16_t input)
 Function writes one byte (command) to MP3.
 
uint16_t mp3_cmd_read (mp3_t *ctx, uint8_t address)
 Function reads command from MP3.
 
err_t mp3_data_write (mp3_t *ctx, uint8_t input)
 Function writes one byte ( data ) to MP3.
 
err_t mp3_data_write_32 (mp3_t *ctx, uint8_t *input32)
 Function Write 32 bytes ( data ) to MP3.
 
void mp3_set_volume (mp3_t *ctx, uint8_t vol_left, uint8_t vol_right)
 Function set volume to MP3 click for left and right channels.
 

Detailed Description

This file contains API for MP3 Click driver.