• struct with members' sizes
    I'm using C51 v3.20, and when I compiled the following structure, the compiler allocates 6 bytes for it. typedef struct t_channel_info { int target_temp:9; unsigned char control_mode:2; unsigned...
  • Volatile struct members
    Hi, I would like to prevent structure members optimization. I used volatile keyword: typedef volatile struct { volatile ... volatile uint32_t discard; volatile ... } regs_t; I declared...
  • Declare variable in the same location as that of a struct member
    Hi All, Am trying to re-write a code in PLM51 to embedded C. There is a statement in PLM51 as below. DECLARE TASK(17) STRUCTURE(PNTR BYTE,STATUS BYTE,DELAY WORD); DECLARE DELAY_HEAD BYTE AT (...
  • Locating members of a struct variable to absolute memory locations
    I would like to know if I can use "_at_" to locate struct members to absolute memory locations. For instance, I have a struct variable defined as following, xdata struct { unsigned char member1;...
  • Access to Bit Struct Member in "Extendet Inline Assembler"
    How can i access to a bit which is a member of a C Struct in the "Extendet inline Asembler" I tried various versions like below, but the compiler only generates Error messages struct { unsigned...