hello everyone,
I have downloaded "PicUSB" for Linux, which is a program that communicates with PIC18F2550 through USB (sends to the pic two numbers, waits for the result and shows it in a box). I've compiled it and it works fine, but now i'm trying to use the picusb.c and picusb.h files in another program, and it gives me the error:
PicUSB.cpp: In function ‘int SumaDosNumerosPIC(char, char)’:
PicUSB.cpp:143: error: conversión inválida de ‘unsigned char*’ a ‘char*’
Here's the code:
It's the same file used in the original program, i haven't changed it..Code:int SumaDosNumerosPIC (char num1, char num2) { char *bytes; char *suma; unsigned char Estos_Bytes[3]; bytes =&Estos_Bytes[0]; suma = bytes; Estos_Bytes[0]=0x00; Estos_Bytes[1]=num1; Estos_Bytes[2]=num2; return ( (int) *suma); }
Thanks in advance(and sorry for my mistakes, i'm a spanish- speaker)
Picusb for linux: http://webs.ono.com/ma4826/



LinkBack URL
About LinkBacks
(and sorry for my mistakes, i'm a spanish- speaker)



