Go Down

Topic: VirtualWire (Read 3 times) previous topic - next topic

AWOL

Yes, you can write it like that, but you need to declare the array before the call.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Vincent19

So the  purpose of adding (uint8_t*)msg is just to tell that the message is an array of 8 bits.

Am I correct ?

AWOL

The function expects to be given an array of type uint8_t.
If you give it an array of that type, you don't need the cast.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Vincent19

Okay. Got it.

Means if I give the function unsigned integer with 8 bits(An array), then I do not need to write the keyword uint8_t ?

Correct ?
Heheh

PaulS

Quote
Means if I give the function unsigned integer with 8 bits(An array), then I do not need to write the keyword uint8_t ?

Correct ?

No. An unsigned integer is not an array and it isn't 8 bits.

Go Up