OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [uclinux/] [uClinux-2.0.x/] [drivers/] [isdn/] [sc/] [event.c] - Blame information for rev 1782

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 199 simons
/*
2
 *  $Id: event.c,v 1.1.1.1 2001-09-10 07:44:19 simons Exp $
3
 *  Copyright (C) 1996  SpellCaster Telecommunications Inc.
4
 *
5
 *  This program is free software; you can redistribute it and/or modify
6
 *  it under the terms of the GNU General Public License as published by
7
 *  the Free Software Foundation; either version 2 of the License, or
8
 *  (at your option) any later version.
9
 *
10
 *  This program is distributed in the hope that it will be useful,
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 *  GNU General Public License for more details.
14
 *
15
 *  You should have received a copy of the GNU General Public License
16
 *  along with this program; if not, write to the Free Software
17
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
 *
19
 *  For more information, please contact gpl-info@spellcast.com or write:
20
 *
21
 *     SpellCaster Telecommunications Inc.
22
 *     5621 Finch Avenue East, Unit #3
23
 *     Scarborough, Ontario  Canada
24
 *     M1B 2T9
25
 *     +1 (416) 297-8565
26
 *     +1 (416) 297-6433 Facsimile
27
 */
28
 
29
#define __NO_VERSION__
30
#include "includes.h"
31
#include "hardware.h"
32
#include "message.h"
33
#include "card.h"
34
 
35
extern int cinst;
36
extern board *adapter[];
37
 
38
#ifdef DEBUG
39
static char *events[] = { "ISDN_STAT_STAVAIL",
40
                          "ISDN_STAT_ICALL",
41
                          "ISDN_STAT_RUN",
42
                          "ISDN_STAT_STOP",
43
                          "ISDN_STAT_DCONN",
44
                          "ISDN_STAT_BCONN",
45
                          "ISDN_STAT_DHUP",
46
                          "ISDN_STAT_BHUP",
47
                          "ISDN_STAT_CINF",
48
                          "ISDN_STAT_LOAD",
49
                          "ISDN_STAT_UNLOAD",
50
                          "ISDN_STAT_BSENT",
51
                          "ISDN_STAT_NODCH",
52
                          "ISDN_STAT_ADDCH",
53
                          "ISDN_STAT_CAUSE" };
54
#endif
55
 
56
int indicate_status(int card, int event,ulong Channel,char *Data)
57
{
58
        isdn_ctrl cmd;
59
 
60
        pr_debug("%s: Indicating event %s on Channel %d\n",
61
                adapter[card]->devicename, events[event-256], Channel);
62
        if (Data != NULL){
63
                pr_debug("%s: Event data: %s\n", adapter[card]->devicename,
64
                        Data);
65
                if (event == ISDN_STAT_ICALL)
66
                        memcpy(&cmd.parm.setup, Data, sizeof(cmd.parm.setup));
67
                else
68
                        strcpy(cmd.parm.num, Data);
69
        }
70
 
71
        cmd.command = event;
72
        cmd.driver = adapter[card]->driverId;
73
        cmd.arg = Channel;
74
        return adapter[card]->card->statcallb(&cmd);
75
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.