Karthik Agarwal

Karthik Agarwal

  • NA
  • 748
  • 266.6k

How to write code based on the typedef? thread.

Nov 3 2011 10:16 AM
In reference to the How to write code based on the typedef? thread

I am pointing to the array element as follows:
 
 
  void** text_ptr_p = l_language_Text_data_VPA[text_id];
      void** text_format = text_ptr_p[0];
 
  and sending the address to another fucntion as follows:
 
  hmi_gfx_mgr_decode_bit_format(&text_ptr_p[index]);
 
  and receiving as
 
  static void hmi_gfx_mgr_decode_bit_format(UINT32 * bit_format_ref)
{
  //insdie the array I am assigning as follows
  Size = HmStrLngTable1[*bit_format_ref];
  //now what I want to do is if the Size is equal to 31 or 0x1F then it should concatenate all the other elements in the array
  if(Size == 0x1F)
  {
  // write ur code here
}
}
 
HmStrLngTable1 looks like follows:
 
HmStrLngTable1[]
 {
 /*0x000C  */, 0x05, 0x4D, 0x79, 0x4B, 0x65, 0x79
 /*0x0012  */, 0x1F, 0x00, 0x0C
 /*0x0015  */, 0x1F, 0x00, 0x0C

}
 
If you see the lines marked in red which starts with 0x1F if that is the case then I need to point to the location which is given by the next two bits which are 0x00 and 0x0C after combining them which becomes 0x000C and which is in green color in the very starting line of the array. Got it.
 
Probably * bit_format_ref
can be used to point HmStrLngTable1
 
If you have any doubts get back to me?

Answers (20)