2022-07-04 05:47 AM
Hi there!
I put this struct in the header file of my code, i´m using Cosmic C compiler and STM8S207 microcontroller:
typedef struct
{
bool a0:1; //flutuação
bool a1:1; //equalização
bool a2:1; //automático
bool a3:1; //fuga terra +
bool a4:1; //fuga terra -
bool a5:1; //sobretemperatura interna
bool a6:1; //sobretemperatura externa
bool a7:1; //disjuntor aberto
bool a8:1; //ca anormal
bool a9:1; //bateria baixa
bool a10:1;//bateria alta
bool a11:1;//consumidor baixo
bool a12:1;//consumidor alto
bool a13:1;//sobrecarga
bool a14:1;//bateria em descarga
bool a15:1;//desconexão bateria
}strAlarme;
strAlarme alarmes0;
But when i compile, i receive this message: #error cpstm8 declaracoes.h:36(1+9) redeclared typedef strAlarme
What am i doing wrong?
Sincerelly
Marcelo
Solved! Go to Solution.
2022-07-04 06:19 AM
The header file is probably included more than once.
hth
KnarfB
2022-07-04 06:19 AM
The header file is probably included more than once.
hth
KnarfB
2022-07-06 06:29 AM
Thanks KnarfB, you are right!!