APCI1710_Pwm.h revision c995fe9475e062bab6f5a45ed28cd2d3d955ef43
1/**
2@verbatim
3
4Copyright (C) 2004,2005  ADDI-DATA GmbH for the source code of this module.
5
6        ADDI-DATA GmbH
7        Dieselstrasse 3
8        D-77833 Ottersweier
9        Tel: +19(0)7223/9493-0
10        Fax: +49(0)7223/9493-92
11        http://www.addi-data-com
12        info@addi-data.com
13
14This 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.
15
16This 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.
17
18You 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
19
20You shoud also find the complete GPL in the COPYING file accompanying this source code.
21
22@endverbatim
23*/
24
25#define APCI1710_30MHZ           30
26#define APCI1710_33MHZ           33
27#define APCI1710_40MHZ           40
28
29#define APCI1710_PWM_INIT			0
30#define APCI1710_PWM_GETINITDATA	1
31
32#define APCI1710_PWM_DISABLE        0
33#define APCI1710_PWM_ENABLE			1
34#define APCI1710_PWM_NEWTIMING      2
35
36INT i_APCI1710_InsnConfigPWM(comedi_device * dev, comedi_subdevice * s,
37	comedi_insn * insn, lsampl_t * data);
38
39INT i_APCI1710_InitPWM(comedi_device * dev,
40	BYTE b_ModulNbr,
41	BYTE b_PWM,
42	BYTE b_ClockSelection,
43	BYTE b_TimingUnit,
44	ULONG ul_LowTiming,
45	ULONG ul_HighTiming,
46	PULONG pul_RealLowTiming, PULONG pul_RealHighTiming);
47
48INT i_APCI1710_GetPWMInitialisation(comedi_device * dev,
49	BYTE b_ModulNbr,
50	BYTE b_PWM,
51	PBYTE pb_TimingUnit,
52	PULONG pul_LowTiming,
53	PULONG pul_HighTiming,
54	PBYTE pb_StartLevel,
55	PBYTE pb_StopMode,
56	PBYTE pb_StopLevel,
57	PBYTE pb_ExternGate, PBYTE pb_InterruptEnable, PBYTE pb_Enable);
58
59INT i_APCI1710_InsnWritePWM(comedi_device * dev, comedi_subdevice * s,
60	comedi_insn * insn, lsampl_t * data);
61
62INT i_APCI1710_EnablePWM(comedi_device * dev,
63	BYTE b_ModulNbr,
64	BYTE b_PWM,
65	BYTE b_StartLevel,
66	BYTE b_StopMode,
67	BYTE b_StopLevel, BYTE b_ExternGate, BYTE b_InterruptEnable);
68
69INT i_APCI1710_SetNewPWMTiming(comedi_device * dev,
70	BYTE b_ModulNbr,
71	BYTE b_PWM, BYTE b_TimingUnit, ULONG ul_LowTiming, ULONG ul_HighTiming);
72
73INT i_APCI1710_DisablePWM(comedi_device * dev, BYTE b_ModulNbr, BYTE b_PWM);
74
75INT i_APCI1710_InsnReadGetPWMStatus(comedi_device * dev, comedi_subdevice * s,
76	comedi_insn * insn, lsampl_t * data);
77
78INT i_APCI1710_InsnBitsReadPWMInterrupt(comedi_device * dev,
79	comedi_subdevice * s, comedi_insn * insn, lsampl_t * data);
80