Jump to content

Help with error code please

Recommended Posts

I am trying to port some code over that was originally written in Code Composer Studio to Energia and I have this function:

void Send_Command_Screen(unsigned char UARTA1_TX_ARRAY[])
  unsigned int i;
  unsigned int len;

  len = strlen (UARTA1_TX_ARRAY);

  //Send command
  for(i=0 ; i<len ; i++)

    while(!(UCA1IFG & UCTXIFG));               //Loop until the uart is ready

  //Send three times 0xff to end the command
  for(i=0 ; i<3 ; i++)
    while(!(UCA1IFG & UCTXIFG));             //Loop until the uart is ready
    UCA1TXBUF = 0xff;



and it is throwing up this error:

sketch/Screen_Nextion.h: In function 'void Send_Command_Screen(const unsigned char*)':
Screen_Nextion.h:87: error: invalid conversion from 'const unsigned char*' to 'const char*' [-fpermissive]

Line 87 is right after the   len = strlen (UARTA1_TX_ARRAY); line


Can anyone please assist with why I am getting this error please? Thanks.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now