##// END OF EJS Templates
Added Oplayer BSP, Fixed bug on GPIO library(gpiosetval change all the port...
Added Oplayer BSP, Fixed bug on GPIO library(gpiosetval change all the port instead of the desired bit).

File last commit:

r60:17402611bd25 dev_alexis
r60:17402611bd25 dev_alexis
Show More
VS10XX.h
82 lines | 2.2 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 VS10XX_H
#define VS10XX_H
#include <uhandle.h>
#include <spi.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
typedef struct vs10XXDev
{
spi_t SPIdev;
void (*setxCS)(char);
void (*setxRST)(char);
void (*setxDCS)(char);
int (*getDREQ)();
int a;
}vs10XXDev;
void vs10XXopen(vs10XXDev* codec,spi_t dev, void (*setxCS)(char),void (*setxRST)(char),void (*setxDCS)(char),int (*getDREQ)());
void vs10XXsoftreset(vs10XXDev* dev);
int vs10XXcmdread(vs10XXDev* dev,char address);
void vs10XXcmdwrite(vs10XXDev* dev,char address,int value);
extern void vs10XXclearXCS();
extern void vs10XXsetXCS();
extern int vs10XXDREQ();
#endif //VS10XX_H