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;
}
}
Chapter 3.3.4 of the fine manual says:
So you might want to try to add
--disable-warning 88to your compiler command line.Chapter 3.16 of the fine manual says:
So you can add
#pragma disable-warning 88to your source, as an alternative.