Hi Apurv,
KV31 hardware doesn't support bit access. You can simulate this function by software. For example,
struct GPIO_BITS {
uint32_t IO0:1;
uint32_t IO1:1;
uint32_t IO2:1;
uint32_t IO3:1;
uint32_t IO4:1;
uint32_t IO5:1;
uint32_t IO6:1;
uint32_t IO7:1;
uint32_t RSVD:8; // 31:8 Reserved
};
union GPIO_MASK_REG {
uint32_t all;
struct GPIO_BITS bit;
};
typedef struct
{
__IO union GPIO_MASK_REG MASK;
....
}GPIO_TypeDef;
#define GPIOA ((GPIO_TypeDef *) GPIOA_BASE )
Thus you can access a bit by
GPIOA->MASK.bit.IO7 = 1;
Regards,
Jing