1 --- t2n-0.2.src/src/usbmisc.cc 2008-03-04 18:06:16.000000000 +0100
2 +++ t2n-0.2.src/src/usbmisc.cc 2009-04-18 00:22:33.000000000 +0200
4 // - si s=2n+1 : sur un tableau brut d'octets
5 // qu'on écrit tel-quel
6 // -----------------------------------------
7 -int UsbBulkBuff::put(int s, unsigned int v){
8 +int UsbBulkBuff::put(int s, unsigned long v){
11 //DIRECT, little-endian
16 - int s0, unsigned int v0,
17 - int s1, unsigned int v1,
18 - int s2, unsigned int v2,
19 - int s3, unsigned int v3,
20 - int s4, unsigned int v4
21 + int s0, unsigned long v0,
22 + int s1, unsigned long v1,
23 + int s2, unsigned long v2,
24 + int s3, unsigned long v3,
25 + int s4, unsigned long v4
29 --- t2n-0.2.src/src/usbmisc.h 2008-03-04 18:06:16.000000000 +0100
30 +++ t2n-0.2.src/src/usbmisc.h 2009-04-17 20:41:12.000000000 +0200
32 #define InC(x) -1, (unsigned int)x
33 #define InS(x) -2, (unsigned int)x
34 #define InL(x) -4, (unsigned int)x
35 -#define InNTS(s,x) (s<<1), (unsigned int)x
36 -#define InRAW(s,x) ((s<<1)|1), (unsigned int)x
37 +#define InNTS(s,x) (s<<1), (unsigned long)x
38 +#define InRAW(s,x) ((s<<1)|1), (unsigned long)x
40 //--------------------------------------------------------------
41 //Codage des params (s,p) pour la lecture ds buffer
43 // ex : send(InC('a'), InS(42), InZ(10, "hello"));
45 const char* vprolog, //verbose prologue
46 - int s0 = 0, unsigned int v0 = 0,
47 - int s1 = 0, unsigned int v1 = 0,
48 - int s2 = 0, unsigned int v2 = 0,
49 - int s3 = 0, unsigned int v3 = 0,
50 - int s4 = 0, unsigned int v4 = 0
51 + int s0 = 0, unsigned long v0 = 0,
52 + int s1 = 0, unsigned long v1 = 0,
53 + int s2 = 0, unsigned long v2 = 0,
54 + int s3 = 0, unsigned long v3 = 0,
55 + int s4 = 0, unsigned long v4 = 0
57 // receive monobloc => utiliser les macros OutXX
58 // ex : send(OuC(&c), InS(&n), InZ(10, ptr));
62 //put basique (s,v) => voir macros send monobloc
63 - int put(int s, unsigned int v);
64 + int put(int s, unsigned long v);
66 //écrit le buffer in, lit dans le buffer out
67 int write_read( const char* vprolog);