Hi,
I am using the TMS570 with CCS6 and Halcogen 4.1.
I have the following bit structure that I am porting from a different processor, and it looks like the order of the bit structure is reversed. For example, I would expect frameid_out to be bit 0, and pip closed to be bit 13. But when I toggle pip closed, the 13th bit from the right toggles, not the 13th bit from the left. I believe the old processor is little endian, and the TMS570 is big endian.
Is there a way to force the bit order?
typedef union FrameIn_Obj { uint32_t lword; struct { unsigned int frameid_out : 1; unsigned int encoder2_id : 1; unsigned int rlypwr_ok : 1; unsigned int estop_ok : 1; unsigned int upperTravLmt : 1; unsigned int lowerTravLmt : 1; unsigned int drv_enabled : 1; unsigned int pwramp_ok : 1; unsigned int motortmp_ok : 1; unsigned int topgrip_closed : 1; unsigned int botgrip_closed : 1; unsigned int closegrip_req : 1; unsigned int intrlock_ok : 1; unsigned int pip_closed : 1; unsigned int handset_up : 1; unsigned int handset_dn : 1; unsigned int clutch_switch : 1; unsigned int FIBFrameFault : 1; unsigned int shieldDoorOpen : 1; unsigned int shieldDoorClosed: 1; unsigned int safeMode : 1; unsigned int setupMode : 1; unsigned int FIBWdog : 1; unsigned int high_clutch : 1; } bits; } FrameIn_Obj;