#include <stdio.h>
#include "ssm2602.h"
#include <sys/exception.h>
#include "tll_sport.h"
#include <bf52xI2cMaster.h>
#include <isrDisp.h>
#include <tll6527_core_timer.h>
Include dependency graph for ssm2602.c:
Defines | |
#define | DELAY_TIME 0x20000 |
.c This file contains the implementation of the analog loopback, digital loop back and digital playback features using SSM2602 Audio codec. | |
Functions | |
void | ssm2602_rxInit (void) |
void | ssm2602_txInit (void) |
int | ssm2602_txDma (unsigned char *address, int count) |
Set the tx DMA. | |
static int | ssm2602_registerWrite (unsigned char addr, unsigned int value) |
Function to set SSM2602 control registers Internal function only. | |
int | ssm2602_setVolume (eSsm2602Channel channel, unsigned char left, unsigned char right) |
SSM2602 set volume. | |
int | ssm2602_setSamplingFeq (eSsm2602Channel channel, eSsm2602SampleFreq freq) |
SSM2602 set sampling fequency. | |
int | ssm2602_init (isrDisp_t *pIsrDisp, int volumeOut, int frequency, int flags) |
Initialize the i2c interface and SSM2602 reset. |
Target: TLL6527v1-0 Compiler: VDSP++ Output format: VDSP++ "*.dxe"
#define DELAY_TIME 0x20000 |
.c This file contains the implementation of the analog loopback, digital loop back and digital playback features using SSM2602 Audio codec.
SSM2602 Audio codec is connected to the BF527 over I2C (control) and SPORT0 (data) interfaces. This modules try to configure & use SPORT0 for data transfer.
int ssm2602_init | ( | isrDisp_t * | pIsrDisp, | |
int | volumeOut, | |||
int | frequency, | |||
int | flags | |||
) |
Initialize the i2c interface and SSM2602 reset.
This function:- 1. Initalizes the i2c interface as the master. 2. Soft resets the SSM2602 audio codec.
Pre-conditions:
Post condtions:
Parameters:
None. |
register own ISR with isr dispatcher
static int ssm2602_registerWrite | ( | unsigned char | addr, | |
unsigned int | value | |||
) | [static] |
Function to set SSM2602 control registers Internal function only.
Pre-conditions:
Post condtions:
Parameters:
addr | register address within the SSM2602 to write | |
value | new register value |
void ssm2602_rxInit | ( | void | ) |
int ssm2602_setSamplingFeq | ( | eSsm2602Channel | channel, | |
eSsm2602SampleFreq | freq | |||
) |
SSM2602 set sampling fequency.
Pre-conditions:
Post condtions:
Parameters:
srFreq | sampling frequency |
int ssm2602_setVolume | ( | eSsm2602Channel | channel, | |
unsigned char | left, | |||
unsigned char | right | |||
) |
SSM2602 set volume.
Pre-conditions:
Post condtions:
Parameters:
channel | input or output channel | |
left | left volume (0 softest 127 loudest +6dB) | |
right | right volume (0 softest 127 loudest +6dB) |
int ssm2602_txDma | ( | unsigned char * | address, | |
int | count | |||
) |
Set the tx DMA.
This function provides a user interface to set the TX dma
Pre-conditions:
Post condtions:
Parameters:
Memory | location, count |
void ssm2602_txInit | ( | void | ) |