Sync work

This commit is contained in:
Jochen Friedrich 2025-01-13 08:50:18 +01:00
parent efa5673e71
commit f3e8069a62
7 changed files with 23 additions and 145 deletions

View file

@ -1,5 +1,5 @@
sdcc -mmcs51 -o lc.ihx lc.c -D FOSC_160000 -I../include
sdcc -mmcs51 --model-large -c MySensors.c -D FOSC_160000 -D MY_NODE_ID=201 -I../include
sdcc -mmcs51 --model-large -o chan8.ihx chan8.c MySensors.rel -D FOSC_160000 -I../include
sdcc -mmcs51 --model-large -c MySensors.c -D FOSC_160000 -D MY_NODE_ID=202 -I../include
sdcc -mmcs51 --model-large -o rs485relay.ihx rs485relay.c MySensors.rel -D FOSC_160000 -I../include
sdcc-sdcc -mmcs51 -o lc.ihx lc.c -D FOSC_160000 -I../include
sdcc-sdcc -mmcs51 --model-large -c MySensors.c -D FOSC_160000 -D MY_NODE_ID=201 -I../include
sdcc-sdcc -mmcs51 --model-large -o chan8.ihx chan8.c MySensors.rel -D FOSC_160000 -I../include
sdcc-sdcc -mmcs51 --model-large -c MySensors.c -D FOSC_160000 -D MY_NODE_ID=202 -I../include
sdcc-sdcc -mmcs51 --model-large -o rs485relay.ihx rs485relay.c MySensors.rel -D FOSC_160000 -I../include

View file

@ -113,6 +113,9 @@ void process(unsigned char cmd, unsigned int len, unsigned char *buffer) {
len = strlen(buffer);
sendpkt(1, len, buffer);
break;
case 2: /* Config */
sendpkt(2, 0, NULL); /* No GPIO Pins */
break;
case 3: /* WIFI State */
sendpkt(3, 0, NULL);
break;
@ -120,6 +123,15 @@ void process(unsigned char cmd, unsigned int len, unsigned char *buffer) {
tuya_receive(len, buffer);
break;
case 8: /* Query Command */
buffer[0] = 0;
buffer[1] = 1;
buffer[2] = 1;
buffer[3] = 0;
buffer[4] = 1;
buffer[5] = 1;
buffer[6] = 1;
buffer[7] = 0;
sendpkt(7, 8, buffer);
break;
}
}