add missing files
This commit is contained in:
parent
3f57fd5432
commit
5c71affd56
|
@ -0,0 +1,43 @@
|
||||||
|
#include <linux/timer.h>
|
||||||
|
|
||||||
|
struct FsmInst;
|
||||||
|
|
||||||
|
typedef void (* FSMFNPTR)(struct FsmInst *, int, void *);
|
||||||
|
|
||||||
|
struct Fsm {
|
||||||
|
FSMFNPTR *jumpmatrix;
|
||||||
|
int state_count, event_count;
|
||||||
|
char **strEvent, **strState;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct FsmInst {
|
||||||
|
struct Fsm *fsm;
|
||||||
|
int state;
|
||||||
|
int debug;
|
||||||
|
void *userdata;
|
||||||
|
int userint;
|
||||||
|
void (*printdebug) (struct FsmInst *, char *, ...);
|
||||||
|
};
|
||||||
|
|
||||||
|
struct FsmNode {
|
||||||
|
int state, event;
|
||||||
|
void (*routine) (struct FsmInst *, int, void *);
|
||||||
|
};
|
||||||
|
|
||||||
|
struct FsmTimer {
|
||||||
|
struct FsmInst *fi;
|
||||||
|
struct timer_list tl;
|
||||||
|
int event;
|
||||||
|
void *arg;
|
||||||
|
};
|
||||||
|
|
||||||
|
int FsmNew(struct Fsm *fsm, struct FsmNode *fnlist, int fncount);
|
||||||
|
void FsmFree(struct Fsm *fsm);
|
||||||
|
int FsmEvent(struct FsmInst *fi, int event, void *arg);
|
||||||
|
void FsmChangeState(struct FsmInst *fi, int newstate);
|
||||||
|
void FsmInitTimer(struct FsmInst *fi, struct FsmTimer *ft);
|
||||||
|
int FsmAddTimer(struct FsmTimer *ft, int millisec, int event,
|
||||||
|
void *arg, int where);
|
||||||
|
void FsmRestartTimer(struct FsmTimer *ft, int millisec, int event,
|
||||||
|
void *arg, int where);
|
||||||
|
void FsmDelTimer(struct FsmTimer *ft, int where);
|
|
@ -0,0 +1,48 @@
|
||||||
|
#ifndef __HISAX_IF_H__
|
||||||
|
#define __HISAX_IF_H__
|
||||||
|
|
||||||
|
#define REQUEST 0
|
||||||
|
#define CONFIRM 1
|
||||||
|
#define INDICATION 2
|
||||||
|
#define RESPONSE 3
|
||||||
|
|
||||||
|
#define PH_ACTIVATE 0x0100
|
||||||
|
#define PH_DEACTIVATE 0x0110
|
||||||
|
#define PH_DATA 0x0120
|
||||||
|
#define PH_PULL 0x0130
|
||||||
|
|
||||||
|
#define L1_MODE_NULL 0
|
||||||
|
#define L1_MODE_TRANS 1
|
||||||
|
#define L1_MODE_HDLC 2
|
||||||
|
#define L1_MODE_EXTRN 3
|
||||||
|
#define L1_MODE_HDLC_56K 4
|
||||||
|
#define L1_MODE_MODEM 7
|
||||||
|
#define L1_MODE_V32 8
|
||||||
|
#define L1_MODE_FAX 9
|
||||||
|
|
||||||
|
struct hisax_if {
|
||||||
|
void *priv; // private to driver
|
||||||
|
void (*l1l2)(struct hisax_if *, int pr, void *arg);
|
||||||
|
void (*l2l1)(struct hisax_if *, int pr, void *arg);
|
||||||
|
};
|
||||||
|
|
||||||
|
struct hisax_b_if {
|
||||||
|
struct hisax_if ifc;
|
||||||
|
|
||||||
|
// private to hisax
|
||||||
|
struct BCState *bcs;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct hisax_d_if {
|
||||||
|
struct hisax_if ifc;
|
||||||
|
|
||||||
|
// private to hisax
|
||||||
|
struct IsdnCardState *cs;
|
||||||
|
struct hisax_b_if *b_if[2];
|
||||||
|
};
|
||||||
|
|
||||||
|
int hisax_register(struct hisax_d_if *hisax_if, struct hisax_b_if *b_if[],
|
||||||
|
char *name, int protocol);
|
||||||
|
void hisax_unregister(struct hisax_d_if *hisax_if);
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue