I got Warning at code "CT_PD->bank = PDbank", Warning happens as long as "CT_PD->...", I have no idea to solve it. Can anyone know what to do?
warning message:: warning 88: cast of LITERAL value to 'generic' pointer from type 'const-int literal' to type 'struct __00000000 generic* fixed'
typedef struct {
uint8_t bank;
.....
uint8_t xxx;
} CT_PD_Type;
#define PDbank 0x24
#define REGISTER_BASE 0x2000 //register address base
#define CT_PD ((CT_PD_Type *) REGISTER_BASE)
void blockWait(uint32_t dura_ms){
uint32_t expire, duration;
duration = PE_timer_freq/1000*dura_ms;
CT_PD->bank = PDbank;
expire = (CT_PD->timercounter) + duration;
while(1){
if (CT_PD->timercounter > expire)
break;
}
}