I’m porting a DOS application to QNX 6.2.0.
The following struct refuses to be 33 bytes long,
the problem seeming to be around the bit fields.
Although allocated 8 bit, they consume 16.
I’ve tried putting the bit fields in a struct
with its own packed attribute, but still
no success.
Any ideas-I’m fresh out of any!
union {
char buffer[200];
struct {
unsigned char Frame_Synch_Word1;
unsigned char Frame_Synch_Word2;
unsigned char Packet_Size;
unsigned char Message_ID;
unsigned short adclog_ss;
signed short adclog_bse;
unsigned channel : 3;
unsigned def_channel : 3;
unsigned spare8 : 2;
unsigned short sl_start_count;
unsigned short sl_crc_errors;
unsigned short sl_hours;
unsigned short sl_bit_index;
unsigned short adclog_fwd_pwr;
unsigned short adclog_refl_pwr;
unsigned short bfl_1;
unsigned short bfl_2;
unsigned short bfl_3;
unsigned short bfl_4;
unsigned short bfl_5;
unsigned short Uplink_CRC_Word;
} field attribute((packed));
} rfh_temp_rx;