Let's say I have following definitions in C++
struct ControlReg
{
uint32_t reset_bit : 1;
};
struct ConfigReg
{
uint32_t even_channel_value : 16;
uint32_t odd_channel_value : 16;
};
struct PeripheralRegs
{
volatile ControlReg control_reg;
volatile uint32_t status_reg_01[2];
volatile uint32_t status_reg_02[2];
volatile ConfigReg config_reg_01[8];
volatile ConfigReg config_reg_02[8];
volatile uint32_t status_reg_03[2];
};
Can anybody tell me what consequences will have usage of below given definitions of the bit fields instead?
struct ControlReg
{
volatile uint32_t reset_bit : 1;
};
struct ConfigReg
{
volatile uint32_t even_channel_value : 16;
volatile uint32_t odd_channel_value : 16;
};
As far as my compiler I have been using the ARM v7 g++.