Problem with array data pointer

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi,

   

My example is next:

   

unsigned char value=0x10;

   

unsigned char* US_InQEnd;

   

unsigned char US_InBuffer[3];

   

 

   

Test_Write(1u);

   

InQEnd = US_InBuffer;                 // getting buffer address

   

*(US_InQEnd++) = value++;      // writing at buffer first location

   

*(US_InQEnd++) = value++;      // writing at buffer second location

   

*(US_InQEnd) = value++;           // writing at buffer third location

   

Test_Write(0u);

   

 

   

I can see Test pin getting up but not getting down. Is there any mistake ? 

   

Thank you,

   

Asier.

0 Likes
1 Solution
Anonymous
Not applicable

Hi Bob,
There is not problem in the code I typed.
Problem I had was that I wasn't doing correctly "InQEnd = US_InBuffer;".
Sorry for the lost time.
Best regards !!
Asier.

View solution in original post

0 Likes
2 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Can you please post your complete project, so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Hi Bob,
There is not problem in the code I typed.
Problem I had was that I wasn't doing correctly "InQEnd = US_InBuffer;".
Sorry for the lost time.
Best regards !!
Asier.

0 Likes