Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SetRS232Motor33f(int hUSB,short speed1,short speed2,unsigned char SpeedFlag) {
- unsigned int n;
- unsigned char sbuf[20];
- int ress=0;
- unsigned char tt=0;
- sbuf[0] = 255;
- sbuf[1] = 0x07;
- sbuf[2] = (unsigned char)speed1;
- sbuf[3] = (unsigned char)(speed1 >> 8);
- sbuf[4] = (unsigned char)speed2;
- sbuf[5] = (unsigned char)(speed2 >> 8);
- sbuf[6] = SpeedFlag;
- short mycrcsend = crc16(sbuf+1,6);
- sbuf[7] = (unsigned char)mycrcsend;
- sbuf[8] = (unsigned char)(mycrcsend >> 8);
- ress = writers232(hUSB, sbuf, 9,&n);
- return ress;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement