| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
-
- typedef struct {
- const char * const _Protocol;
- int _Slave_ID;
- int PortTypes; //0xFF = 1111 1111 { PWM, .....} = 0x80
- // byte has_Address;
- int Address ;
- // byte has_Local_Port;
- int LocalPort;
- int Exp_state; /*0xFF = 1111 1111
- 0x00 = 0000 0000 = OFF = 0V
- 0x01 = 0000 0001 = ON = PWM max
- {
- bit 1 - OFF = 0V
- bit 2 - ON = PWM max
- bit 3 - not allocated
- bit 4 - not allocated
- bit 2 - not allocated
- bit 5 - not allocated
- bit 6 - not allocated
- bit 7 - not allocated
- bit 8 - not allocated
- }*/
- int Exp_state_ttl; // 0x00 = odswiezyc
- } _Slave_Port;
- _Slave_Port _Slave_Ports[] = {
- {"CAN", 0x102, 0x01, 0x00, 0x00, 0x00, 0x00 },
- {"CAN", 0x102, 0x01, 0x00, 0x01, 0xFF, 0x6d } //testowy ttl
- };
- /*
- struct _Slave_Port
- {
- char _Protocol ;
- int _Slave_ID;
- char Port_Type;
- int Address;
- int LocalPort ;
- void (*fn)();
- };
- struct _Slave_Port {
-
- }
- #define _Slave_Port = { "CAN" , 0x102 , "PWM", 0x00, 0 }
- */
- /* #define __CAN_Ports { _Slave1_ID } ;
- #define __CAN_Ports_PWM { _Slave1_ID
- {0x00 , 0 } ,
- {0x00 , 1 }
- } ;
- */
- /*
- typedef struct
- {
- int Slave1_ID;
- String PortType;
- int Address;
- int LocalPort ;
- }
- */
- /*
- struct buttons
- {
- int color[3];
- int positions[4];
- char init[20];
- void (*fn)();
- };
- //void func1();
- //void func2();
-
- buttons test[] =
- {
- { {0,0,0}, {0,0,100,100}, "getSomething", func1 },
- { {40,40,40}, {50,50,10,10}, "somethingElse", func2 },
- };
- */
- /*
- typedef struct {
- const char * const l_name;
- byte x_m;
- byte y_m;
- boolean period[4];
- } myStruct;
- myStruct structs[] = {
- {"My Name", 0, 0, {true, true, false, false}},
- {"My Second Name", 0, 0, {true, false, true, false}}
- };
- */
- //#define _CAN_P_0x102_PWM0x00_0 { _Slave1_ID , "PWM", 0x00, 0 }
- //#define _CAN_P_0x102_PWM0x00_1 { _Slave1_ID , "PWM", 0x00, 1 }
- // char _Slave_Ports ;
- // _Slave_Ports[0] = "_CAN_P_0x102_PWM0x00_0" ;
- // _Slave_Ports[1] = "_CAN_P_0x102_PWM0x00_1" ;
- // char *_Slave_Ports[] = { "_CAN_P_0x102_PWM0x00_0", "_CAN_P_0x102_PWM0x00_1" } ;
|