scope_rt.h
1 #ifndef HALSC_RT_H 2 #define HALSC_RT_H 3 /** This file, 'halsc_rt.h', contains declarations used by 4 'halscope_rt.c' to implement the real-time portion of 5 the HAL oscilloscope. Declarations that are common to the 6 realtime and user parts are in 'halsc_shm.h', and those used 7 only by the user part are in 'halsc_usr.h'. 8 */ 9 10 /** Copyright (C) 2003 John Kasunich 11 <jmkasunich AT users DOT sourceforge DOT net> 12 */ 13 14 /** This program is free software; you can redistribute it and/or 15 modify it under the terms of version 2 of the GNU General 16 Public License as published by the Free Software Foundation. 17 This library is distributed in the hope that it will be useful, 18 but WITHOUT ANY WARRANTY; without even the implied warranty of 19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 GNU General Public License for more details. 21 22 You should have received a copy of the GNU General Public 23 License along with this library; if not, write to the Free Software 24 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 25 26 THE AUTHORS OF THIS LIBRARY ACCEPT ABSOLUTELY NO LIABILITY FOR 27 ANY HARM OR LOSS RESULTING FROM ITS USE. IT IS _EXTREMELY_ UNWISE 28 TO RELY ON SOFTWARE ALONE FOR SAFETY. Any machinery capable of 29 harming persons must have provisions for completely removing power 30 from all motors, etc, before persons enter any danger area. All 31 machinery must be designed to comply with local and national safety 32 codes, and the authors of this software can not, and do not, take 33 any responsibility for such compliance. 34 35 This code was written as part of the EMC HAL project. For more 36 information, go to www.linuxcnc.org. 37 */ 38 39 /* import the shared declarations */ 40 #include "scope_shm.h" 41 42 /*********************************************************************** 43 * TYPEDEFS AND DEFINES * 44 ************************************************************************/ 45 46 /* this is the master kernel space control structure */ 47 48 typedef struct { 49 scope_data_t *buffer; /* ptr to buffer (kernel mapping) */ 50 int mult_cntr; /* used to divide by 'mult' */ 51 int auto_timer; /* delay timer for auto triggering */ 52 char data_len[16]; /* data size for each channel */ 53 void *data_addr[16]; /* pointers to data for each channel */ 54 hal_type_t data_type[16]; /* data type for each channel */ 55 } scope_rt_control_t; 56 57 /*********************************************************************** 58 * GLOBALS * 59 ************************************************************************/ 60 61 extern scope_rt_control_t *ctrl_rt; /* main RT control structure */ 62 extern scope_shm_control_t *ctrl_shm; /* shared mem control struct */ 63 64 #endif /* HALSC_RT_H */