##// END OF EJS Templates
Added LFR DM board files and miniAMBA design tesed under Libero9.1 sp1
Added LFR DM board files and miniAMBA design tesed under Libero9.1 sp1

File last commit:

r68:1fb80e67e008 default
r78:642d5b01450f alexis
Show More
lpp_apb_functions.h
62 lines | 2.5 KiB | text/x-c | CLexer
Alexis
Improved .hgignore filter, Added Makefiles for C drivers automated static lib genration.
r22 /*------------------------------------------------------------------------------
-- This file is a part of the LPP VHDL IP LIBRARY
-- Copyright (C) 2009 - 2010, Laboratory of Plasmas Physic - CNRS
--
-- 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
martin
DAC driver added to LPP_drivers
r27 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Alexis
Improved .hgignore filter, Added Makefiles for C drivers automated static lib genration.
r22 -------------------------------------------------------------------------------*/
Alexis
Minor changes
r38 /*-- Author : Alexis Jeandet
-- Mail : alexis.jeandet@lpp.polytechnique.fr
----------------------------------------------------------------------------*/
Alexis
Improved .hgignore filter, Added Makefiles for C drivers automated static lib genration.
r22 #ifndef LPP_APB_FUNCTIONS_H
#define LPP_APB_FUNCTIONS_H
#define APB_TBL_HEAD 0x800FF000
#define APB_BASE_ADDRS 0x80000000
#define APB_MAX_DEVICES 256
Alexis
Added an automated Devices ID and Vendor ID handler
r36 #include "apb_devices_list.h"
Alexis
Improved .hgignore filter, Added Makefiles for C drivers automated static lib genration.
r22
/** @todo implemente a descriptor structure for any APB device */
/** Structure representing a device descriptor register on Grlib's AHB2APB brige with plug and play feature */
struct apbPnPreg
{
int idReg; /**< id register composed of Vendor ID [31:24], Device ID [23:12], CT [11:10], Version [9:5], IRQ [4:0] */
int bar; /**< Bank Address Register composed of Device's ADDRESS [31:20], MASK [14:4], TYPE [3:0] */
};
struct apbdevinfo
{
int vendorID;
int productID;
int version;
int irq;
int address;
int mask;
};
/** This Function scans APB devices table and returns counth device according to VID and PID */
int* apbgetdevice(int PID,int VID,int count);
/** This Function scans APB devices table and returns counth device informations according VID and PID */
void apbgetdeviceinfofromid(int PID,int VID,int count,struct apbdevinfo* devinfo);
void apbgetdeviceinfofromdevptr(const struct apbPnPreg* dev,struct apbdevinfo* devinfo);
void apbprintdeviceinfo(struct apbdevinfo devinfo);
void apbprintdeviceslist();
#endif // LPP_APB_FUNCTIONS_H