##// END OF EJS Templates
Merge
Merge

File last commit:

r26:4728e0368be0 default
r46:7d306b65e7c9 merge dev_alexis
Show More
vs1053.h
78 lines | 2.0 KiB | text/x-c | CLexer
/*------------------------------------------------------------------------------
#-- This file is a part of the libuc, microcontroler library
#-- Copyright (C) 2011, Alexis Jeandet
#--
#-- This program is free software; you can redistribute it and/or modify
#-- it under the terms of the GNU General Public License as published by
#-- the Free Software Foundation; either version 3 of the License, or
#-- (at your option) any later version.
#--
#-- This program is distributed in the hope that it will be useful,
#-- but WITHOUT ANY WARRANTY; without even the implied warranty of
#-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#-- GNU General Public License for more details.
#--
#-- You should have received a copy of the GNU General Public License
#-- along with this program; if not, write to the Free Software
#-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#-------------------------------------------------------------------------------
#-- Author : Alexis Jeandet
#-- Mail : alexis.jeandet@gmail.com
#-------------------------------------------------------------------------------*/
#ifndef VS1053_H
#define VS1053_H
#include <uhandle.h>
#define VSMODE 0
#define VSSTATUS 1
#define VSBASS 2
#define VSCLOCKF 3
#define VSDECODE_TIME 4
#define VSAUDATA 5
#define VSWRAM 6
#define VSWRAMADDR 7
#define VSHDAT0 8
#define VSHDAT1 9
#define VSAIADDR 0xA
#define VSVOL 0xB
#define VSAICTRL0 0xC
#define VSAICTRL1 0xD
#define VSAICTRL2 0xE
#define VSAICTRL3 0xF
struct vs1053Regs
{
sspDev SSP_device;
int a;
};
typedef struct vs1053Regs vs1053Dev;
void vs1053open(vs1053Dev* codec,sspDev dev);
void vs1053softreset(vs1053Dev* dev);
int vs1053cmdread(vs1053Dev* dev,char address);
void vs1053cmdwrite(vs1053Dev* dev,char address,int value);
extern void vs10XXclearXCS();
extern void vs10XXsetXCS();
extern int vs10XXDREQ();
#endif