[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

using bit-field to define a qom register

From: Hiroko Shimizu
Subject: using bit-field to define a qom register
Date: Fri, 9 Jul 2021 17:54:45 +0900

I would like to access a 4byte-register in 1bit unit.
So, I was supposed to use a bit field to define a register like this.
typedef struct register{
    // define register B
    uint32_t B1 : 1;
    uint32_t B2 : 1;
    uint32_t B3 : 30;

Then, How do you define this in VMStateDescription? 
And can I set a value to register.B2 from the ***_write function? 

Best regards,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]