aboutsummaryrefslogtreecommitdiff
path: root/AT91SAM7S256/Source/d_ioctrl.c
blob: 25061725b6efc014d98660fa43089ced909e0a2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//
// Date init       14.12.2004
//
// Revision date   $Date:: 5-12-07 15:23                                     $
//
// Filename        $Workfile:: d_ioctrl.c                                    $
//
// Version         $Revision:: 2                                             $
//
// Archive         $Archive:: /LMS2006/Sys01/Main_V02/Firmware/Source/d_ioct $
//
// Platform        C
//


#include  <string.h>
#include  "stdconst.h"
#include  "m_sched.h"
#include  "d_ioctrl.h"
#include  "d_ioctrl.r"


void      dIOCtrlInit(void)
{
  IOCTRLInit;
}

void      dIOCtrlSetPower(UBYTE Power)
{
  INSERTPower(Power);
}

void      dIOCtrlSetPwm(UBYTE Pwm)
{
  INSERTPwm(Pwm);
}

void      dIOCtrlTransfer(void)
{
  I2CTransfer;
}

void      dIOCtrlExit(void)
{
  IOCTRLExit;
}
mber locally to the driver. (starting with 0) parm.num = ASCII-String, containing the current Service-Indicators. ISDN_CMD_SETL2: With this command, the HL-driver is told to select the given Layer-2- protocol. This command is issued by the LL prior to ISDN_CMD_DIAL or ISDN_CMD_ACCEPTD. Parameter: driver = driver-Id. command = ISDN_CMD_SETL2 arg = channel-number locally to the driver. (starting with 0) logical or'ed with (protocol-Id << 8) protocol-Id is one of the constants ISDN_PROTO_L2... parm = unused. ISDN_CMD_GETL2: (currently unused) With this command, the HL-driver is told to return the current setting of the Layer-2-protocol. Parameter: driver = driver-Id. command = ISDN_CMD_GETL2 arg = channel-number locally to the driver. (starting with 0) parm = unused. Returnvalue: current protocol-Id (one of the constants ISDN_L2_PROTO) ISDN_CMD_SETL3: With this command, the HL-driver is told to select the given Layer-3- protocol. This command is issued by the LL prior to ISDN_CMD_DIAL or ISDN_CMD_ACCEPTD. Parameter: driver = driver-Id. command = ISDN_CMD_SETL3 arg = channel-number locally to the driver. (starting with 0) logical or'ed with (protocol-Id << 8) protocol-Id is one of the constants ISDN_PROTO_L3... parm.fax = Pointer to T30_s fax struct. (fax usage only) ISDN_CMD_GETL2: (currently unused) With this command, the HL-driver is told to return the current setting of the Layer-3-protocol. Parameter: driver = driver-Id. command = ISDN_CMD_GETL3 arg = channel-number locally to the driver. (starting with 0) parm = unused. Returnvalue: current protocol-Id (one of the constants ISDN_L3_PROTO) ISDN_CMD_PROCEED: With this command, the HL-driver is told to proceed with a incoming call. Parameter: driver = driver-Id. command = ISDN_CMD_PROCEED arg = channel-number locally to the driver. (starting with 0) setup.eazmsn= empty string or string send as uus1 in DSS1 with PROCEED message ISDN_CMD_ALERT: With this command, the HL-driver is told to alert a proceeding call. Parameter: driver = driver-Id. command = ISDN_CMD_ALERT arg = channel-number locally to the driver. (starting with 0) setup.eazmsn= empty string or string send as uus1 in DSS1 with ALERT message ISDN_CMD_REDIR: With this command, the HL-driver is told to redirect a call in proceeding or alerting state. Parameter: driver = driver-Id. command = ISDN_CMD_REDIR arg = channel-number locally to the driver. (starting with 0) setup.eazmsn= empty string or string send as uus1 in DSS1 protocol setup.screen= screening indicator setup.phone = redirected to party number ISDN_CMD_PROT_IO: With this call, the LL-driver invokes protocol specific features through the LL. The call is not implicitely bound to a connection. Parameter: driver = driver-Id command = ISDN_CMD_PROT_IO arg = The lower 8 Bits define the addressed protocol as defined in ISDN_PTYPE..., the upper bits are used to differentiate the protocol specific CMD. para = protocol and function specific. See isdnif.h for detail. ISDN_CMD_FAXCMD: With this command the HL-driver receives a fax sub-command. For details refer to INTERFACE.fax Parameter: driver = driver-Id. command = ISDN_CMD_FAXCMD arg = channel-number locally to the driver. (starting with 0) parm = unused. 3. Description of the events to be signaled by the HL-driver to the LL. All status-changes are signaled via calling the previously described function statcallb(). The field command of the struct isdn_cmd has to be set by the HL-driver with the appropriate Status-Id (event-number). The field arg has to be set to the channel-number (locally to the driver, starting with 0) to which this event applies. (Exception: STAVAIL-event) Until now, the following Status-Ids are defined: ISDN_STAT_AVAIL: With this call, the HL-driver signals the availability of new data for readstat(). Used only for debugging-purposes, see description of readstat(). Parameter: driver = driver-Id command = ISDN_STAT_STAVAIL arg = length of available data. parm = unused. ISDN_STAT_ICALL: ISDN_STAT_ICALLW: With this call, the HL-driver signals an incoming call to the LL. If ICALLW is signalled the incoming call is a waiting call without a available B-chan. Parameter: driver = driver-Id command = ISDN_STAT_ICALL arg = channel-number, locally to the driver. (starting with 0) para.setup.phone = Callernumber. para.setup.eazmsn = CalledNumber. para.setup.si1 = Service Indicator. para.setup.si2 = Additional Service Indicator. para.setup.plan = octet 3 from Calling party number Information Element. para.setup.screen = octet 3a from Calling party number Information Element. Return: 0 = No device matching this call. 1 = At least one device matching this call (RING on ttyI). HL-driver may send ALERTING on the D-channel in this case. 2 = Call will be rejected. 3 = Incoming called party number is currently incomplete. Additional digits are required. Used for signalling with PtP connections. 4 = Call will be held in a proceeding state (HL driver sends PROCEEDING) Used when a user space prog needs time to interpret a call para.setup.eazmsn may be filled with an uus1 message of 30 octets maximum. Empty string if no uus. 5 = Call will be actively deflected to another party Only available in DSS1/EURO protocol para.setup.phone must be set to destination party number para.setup.eazmsn may be filled with an uus1 messa