]> rtime.felk.cvut.cz Git - lincan.git/blobdiff - lincan/include/pcan_dongle.h
The LinCAN driver license unified according to DCE FEE CTU head and superiors request.
[lincan.git] / lincan / include / pcan_dongle.h
index 307071a21ea36208b82073daca40af77d0f0cf71..91a2d6479a7604f16c508eea39567f1bb4f2370b 100644 (file)
@@ -1,33 +1,45 @@
+/**************************************************************************/
+/* File: pcan_dongle.h - PEAK's printer port dongle addapter              */
+/*                                                                        */
+/* LinCAN - (Not only) Linux CAN bus driver                               */
+/* Copyright (C) 2002-2009 DCE FEE CTU Prague <http://dce.felk.cvut.cz>   */
+/* Copyright (C) 2002-2009 Pavel Pisa <pisa@cmp.felk.cvut.cz>             */
+/* Copyright (C) 2005 Klaus Hitschler <klaus.hitschler@gmx.de>            */
+/* Copyright (C) 2005-2006 Jose Pascual Ramírez <josepascual@almudi.com>  */
+/* Copyright (C) 2001,2002,2003,2004  PEAK System-Technik GmbH            */
+/* Funded by OCERA and FRESCOR IST projects                               */
+/* Based on CAN driver code by Arnaud Westenberg <arnaud@wanadoo.nl>      */
+/* Contributions: Marcel Offermans <marcel.offermans@luminis.nl>          */
+/*                Philipp Baer <philipp.baer@informatik.uni-ulm.de>       */
+/*                                                                        */
+/* LinCAN is free software; you can redistribute it and/or modify it      */
+/* under terms of the GNU General Public License as published by the      */
+/* Free Software Foundation; either version 2, or (at your option) any    */
+/* later version.  LinCAN 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 LinCAN; see file     */
+/* COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,  */
+/* Cambridge, MA 02139, USA.                                              */
+/*                                                                        */
+/* To allow use of LinCAN in the compact embedded systems firmware        */
+/* and RT-executives (RTEMS for example), main authors agree with next    */
+/* special exception:                                                     */
+/*                                                                        */
+/* Including LinCAN header files in a file, instantiating LinCAN generics */
+/* or templates, or linking other files with LinCAN objects to produce    */
+/* an application image/executable, does not by itself cause the          */
+/* resulting application image/executable to be covered by                */
+/* the GNU General Public License.                                        */
+/* This exception does not however invalidate any other reasons           */
+/* why the executable file might be covered by the GNU Public License.    */
+/* Publication of enhanced or derived LinCAN files is required although.  */
+/**************************************************************************/
+
 #ifndef __PCAN_DONGLE_H__
 #define __PCAN_DONGLE_H__
 
-/****************************************************************************/
-// Ingenieria Almudi (www.almudi.com)
-// Ported to LinCAN by Jose Pascual Ramírez (josepascual@almudi.com)
-//
-//
-// Copyright (C) 2001,2002,2003,2004  PEAK System-Technik GmbH
-//
-// linux@peak-system.com
-// www.peak-system.com
-//
-// 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 2 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., 675 Mass Ave, Cambridge, MA 02139, USA.
-//
-// Maintainer(s): Klaus Hitschler (klaus.hitschler@gmx.de)
-/****************************************************************************/
-
 /****************************************************************************/
 //
 // all parts to handle device interface specific parts of pcan-dongle
@@ -83,7 +95,7 @@ struct DONGLE_PORT
   int  nMinor;                                             // the associated minor
   char *type;                                              // the literal type of the device, info only
 
-  struct chip_t *chip;
+  struct canchip_t *chip;
 };
 
 
@@ -95,9 +107,9 @@ int pcan_dongle_release_io(struct candevice_t *candev);
 int pcan_dongle_reset(struct candevice_t *candev); 
 int pcan_dongle_init_hw_data(struct candevice_t *candev);
 int pcan_dongle_init_chip_data(struct candevice_t *candev, int chipnr);
-int pcan_dongle_init_obj_data(struct chip_t *chip, int objnr);
-void pcan_dongle_write_register(unsigned data, unsigned long address);
-unsigned pcan_dongle_read_register(unsigned long address);
+int pcan_dongle_init_obj_data(struct canchip_t *chip, int objnr);
+void pcan_dongle_write_register(unsigned data, can_ioptr_t address);
+unsigned pcan_dongle_read_register(can_ioptr_t address);
 int pcan_dongle_program_irq(struct candevice_t *candev);
 
 #endif // __PCAN_DONGLE_H__