uart on kwikstik

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

uart on kwikstik

605 Views
kysel
Contributor I

Hello 

 

I would like to ask how to use the UART on the development kit kwikstik I tried to copy the code from the help, but the compiler says: "illegal implicit conversion from 'unsigned char' to 'void *'

how to do it?

 

Thank you for your answer

 

code for example:

  • struct {  byte Header;  byte Command;  word Data;  byte Checksum;} message;

     

      void AS1_OnFullRxBuf(void)  {    word Received;    byte err;    err = AS1_RecvBlock((byte*)&message, sizeof(message), &Received);     }
    byte err;word Sent;void main(void){   message.Header = 0x55;  message.Command = 0x01;  message.Data = 0x0A0B;  message.Checksum = message.Header + message.Command + (message.Data & 0x00ff) + (message.Data >> 8);  err = AS1_SendBlock((byte*)&message, sizeof(message), &Sent); }

 

0 Kudos
1 Reply

375 Views
kfranz
Contributor III

I have not used the example you are referring to. So, I cannot speak from experience. I noticed that you are using "byte" and "word". Neither of these are standard "C" types. Somewhere they must get defined.

 

Kevin

0 Kudos