• Typecasting pointer to a bit field
    Hi, Is it possible to typecast a pointer to a variable in xdata to a bit field with 13-bits? I've tried this, char xdata i _at_ 0x300; struct { unsigned short addr : 13; unsigned char flag1...
  • Declare 16-bit pointer compiletime
    To support a legacy structure I need a 16-bit pointer. This to create a linked-list sort of structure. I need this to be declared compile-time, not runtime. Previously, we did this in assembly using...
  • void pointer to struct pointer cast
    I declared a void pointer void *ptr; and a typedef struct named testStructure, with a member 'unsigned int a'. Now I will cast this pointer to a struct pointer: ptr=(testStructure*)malloc...
  • Pointers
    Need a clarification. I want to define two poiners. One pointing to an area in XRAM and the other within CODE memory. I further want both of these pointers to be stored in XRAM. unsigned char...
  • Initialize constant pointer to pointer
    const int an_object = 0; const int * const MC_buf = &an_object; const int * buffer = MC_buf; This code was original using structs, but it is simplified in this example. It doesn't matter where...