m920x.h 1005 字节
Newer Older
1 2
#ifndef _DVB_USB_M920X_H_
#define _DVB_USB_M920X_H_
3

4
#define DVB_USB_LOG_PREFIX "m920x"
5 6
#include "dvb-usb.h"

7
#define deb_rc(args...)   dprintk(dvb_usb_m920x_debug,0x01,args)
8

9
#define M9206_CORE	0x22
10 11 12 13 14
#define M9206_RC_STATE	0xff51
#define M9206_RC_KEY	0xff52
#define M9206_RC_INIT1	0xff54
#define M9206_RC_INIT2	0xff55
#define M9206_FW_GO	0xff69
15 16 17 18 19 20

#define M9206_I2C	0x23
#define M9206_FILTER	0x25
#define M9206_FW	0x30

#define M9206_MAX_FILTERS 8
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
/*
sequences found in logs:
[index value]
0x80 write addr
(0x00 out byte)*
0x40 out byte

0x80 write addr
(0x00 out byte)*
0x80 read addr
(0x21 in byte)*
0x60 in byte

this sequence works:
0x80 read addr
(0x21 in byte)*
0x60 in byte

_my guess_:
0x80: begin i2c transfer using address. value=address<<1|(reading?1:0)
0x00: write byte
0x21: read byte, more to follow
0x40: write last byte of message sequence
0x60: read last byte of message sequence
 */
47

48 49 50 51 52
struct m9206_state {
	u16 filters[M9206_MAX_FILTERS];
	int filtering_enabled;
	int rep_count;
};
53
#endif