source: trunk/com-on-air_cs-linux/sc14421_sniffer.h @ 31

Last change on this file since 31 was 31, checked in by mazzoo, 11 years ago

shared interrupts. may the brave test.
there's no HW in the dedected.org team that cowardly assigns shared irqs...

File size: 1.9 KB
Line 
1/*
2 * com_on_air_cs - basic driver for the Dosch and Amand "com on air" cards
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * authors:
9 * (C) 2008  Andreas Schuler <krater at badterrorist dot com>
10 * (C) 2008  Matthias Wenzel <dect at mazzoo dot de>
11 *
12 */
13
14#ifndef SC14421_SNIFF_H
15#define SC14421_SNIFF_H
16
17#include "com_on_air_user.h"
18
19#define SNIFF_SCANFP    COA_SUBMODE_SNIFF_SCANFP
20#define SNIFF_SCANPP    COA_SUBMODE_SNIFF_SCANPP
21#define SNIFF_SYNC      COA_SUBMODE_SNIFF_SYNC
22
23#define SNIFF_STATUS_FOUNDSTATION       0x80
24#define SNIFF_STATUS_INSYNC             0x40
25
26#define SNIFF_SLOTPATCH_FP      0
27#define SNIFF_SLOTPATCH_PP      1
28
29#include "dect.h"
30#include "com_on_air.h"
31
32struct sniffer_cfg
33{
34        int                     snifftype;
35        int                     channel;
36        unsigned char           RFPI[5];
37        unsigned char           status;
38        struct dect_slot_info   slottable[24];
39        int                     framenumber;
40        int                     updatefpslots;
41        int                     updateppslots;
42};
43
44struct sniffed_rfpi
45{
46        unsigned char rssi;
47        unsigned char channel;
48        unsigned char RFPI[5];
49};
50
51#define SLOT_OUT_OF_SYNC  0x20
52#define SLOT_IN_SYNC      0x21
53
54struct sniffed_packet
55{
56        unsigned char     rssi;
57        unsigned char     channel;
58        unsigned char     slot;
59        struct timespec   timestamp;
60        unsigned char     data[53];
61};
62
63
64void    sniffer_init(struct coa_info *dev);
65void    sniffer_init_sniff_all(struct coa_info *dev);
66void    sniffer_init_sniff_scan(struct coa_info *dev);
67void    sniffer_init_sniff_sync(struct coa_info *dev);
68uint8_t sniffer_irq_handler(struct coa_info *dev);
69void    sniffer_sniff_all_irq(struct coa_info *dev,int irq);
70void    sniffer_sniff_scan_irq(struct coa_info *dev,int irq);
71void    sniffer_sniff_sync_irq(struct coa_info *dev,int irq);
72void    sniffer_sync_patchloop(struct coa_info *dev,struct dect_slot_info *slottable,int type);
73void    sniffer_clear_slottable(struct dect_slot_info *slottable);
74#endif
75
Note: See TracBrowser for help on using the repository browser.