• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kstars

libfli-sys.h

Go to the documentation of this file.
00001 /*
00002 
00003   Copyright (c) 2002 Finger Lakes Instrumentation (FLI), L.L.C.
00004   All rights reserved.
00005 
00006   Redistribution and use in source and binary forms, with or without
00007   modification, are permitted provided that the following conditions
00008   are met:
00009 
00010         Redistributions of source code must retain the above copyright
00011         notice, this list of conditions and the following disclaimer.
00012 
00013         Redistributions in binary form must reproduce the above
00014         copyright notice, this list of conditions and the following
00015         disclaimer in the documentation and/or other materials
00016         provided with the distribution.
00017 
00018         Neither the name of Finger Lakes Instrumentation (FLI), LLC
00019         nor the names of its contributors may be used to endorse or
00020         promote products derived from this software without specific
00021         prior written permission.
00022 
00023   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00024   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00025   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
00026   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
00027   REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
00028   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
00029   BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00030   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00031   CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00032   LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
00033   ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00034   POSSIBILITY OF SUCH DAMAGE.
00035 
00036   ======================================================================
00037 
00038   Finger Lakes Instrumentation, L.L.C. (FLI)
00039   web: http://www.fli-cam.com
00040   email: support@fli-cam.com
00041 
00042 */
00043 
00044 #ifndef _LIBFLI_SYS_H
00045 #define _LIBFLI_SYS_H
00046 
00047 #include <limits.h>
00048 
00049 #define LIBFLIAPI long
00050 
00051 #if defined(__linux__)
00052 
00053 #define __SYSNAME__ "Linux"
00054 #define __LIBFLI_MINOR__ 11
00055 #define USB_READ_SIZ_MAX 4096   /* Can only read a page at a time */
00056 #define _USE_FLOCK_
00057 #define PARPORT_GLOB "/dev/ccd*"
00058 #define USB_GLOB "/proc/bus/usb/*/*"
00059 #define SERIAL_GLOB "/dev/ttyS[0-9]*"
00060 
00061 #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
00062 // FIXME - this does not actually work on OSX
00063 
00064 #define __SYSNAME__ "FreeBSD"
00065 #define __LIBFLI_MINOR__ 1
00066 #define USB_READ_SIZ_MAX (1024 *1024) /* 1 MB (This is arbitrary, but
00067                        * must be able to malloc this amount.)
00068                        */
00069 #define USB_GLOB "/dev/ugen*." __STRINGIFY(FLI_CMD_ENDPOINT)
00070 #define SERIAL_GLOB "/dev/cuaa*"
00071 
00072 #elif defined (__NetBSD__)
00073 
00074 #define __SYSNAME__ "NetBSD"
00075 #define __LIBFLI_MINOR__ 1
00076 #define USB_READ_SIZ_MAX (1024 *1024) /* 1 MB (This is arbitrary, but
00077                        * must be able to malloc this amount.)
00078                        */
00079 #define USB_GLOB "/dev/ugen*.0" __STRINGIFY(FLI_CMD_ENDPOINT)
00080 #define SERIAL_GLOB "/dev/dty0*"
00081 
00082 #else
00083 
00084 #define __SYSNAME__ "Unknown"
00085 #define __LIBFLI_MINOR__ 1
00086 #define USB_READ_SIZ_MAX 0
00087 #define USB_GLOB ""
00088 #define SERIAL_GLOB ""
00089 
00090 #warning "Unknown system"
00091 
00092 #endif
00093 
00094 typedef struct {
00095   int fd;
00096 } fli_unixio_t;
00097 
00098 long unix_fli_connect(flidev_t dev, char *name, long domain);
00099 long unix_fli_disconnect(flidev_t dev);
00100 long unix_fli_lock(flidev_t dev);
00101 long unix_fli_unlock(flidev_t dev);
00102 long unix_fli_list(flidomain_t domain, char ***names);
00103 
00104 #define fli_connect unix_fli_connect
00105 #define fli_disconnect unix_fli_disconnect
00106 #define fli_list unix_fli_list
00107 
00108 #endif /* _LIBFLI_SYS_H */

kstars

Skip menu "kstars"
  • Main Page
  • Modules
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • keduca
  • kstars
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal