This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Pass Strings for debug Command

Howdee

I'm trying to create a UART Debug Function in which i can pass it some parameters 1 of them a string or array of data I've tried then following but none of them work

FUNC void UARTinput(unsigned char CMD, unsigned char DATA[]) {
...
}

FUNC void UARTinput(unsigned char CMD, unsigned char DATA[255]) {
...
}

The idea is to run the Debug Function as follows:
UARTinput( 0x34, 'HELLO WORLD')

Parents
  • In what way, exactly, do they "not work"?

    You have made two silly mistakes in your post:

    1. You didn't follow the instructions on how to post source code;

    2. The 'C' language does not use single quotes for strings

    So the chances are high that the problem is due to a "silly mistake" somewhere in your code - but only you have the code, so only you can find it!

Reply
  • In what way, exactly, do they "not work"?

    You have made two silly mistakes in your post:

    1. You didn't follow the instructions on how to post source code;

    2. The 'C' language does not use single quotes for strings

    So the chances are high that the problem is due to a "silly mistake" somewhere in your code - but only you have the code, so only you can find it!

Children