(29-03-2013, 11:13 AM)regis Wrote: Hi,
Hi Regis,
Thanks for helping.
I'm really a bad programmer. In fact, I barelly understand C or C++. Yes, I have to study a lot yet!
I will respond point 1 later.
Quote:2- in void setup(), you call resetModule() which is defined after your call. You should prototype your functions before. This is actually what Wtv020sd16p.h is done for so just add void resetModule(); in your header file.
Done this, and thanks for tip about prototyping functions.
Quote:3- With SDCC, you can't write :
Code:
for (unsigned int mask = 0x8000; mask > 0; mask >>= 1)
{
}
You should write this instead :
Code:
unsigned int mask;
for (mask = 0x8000; mask > 0; mask >>= 1)
{
}
I take your advice and paste these contents in header file:
Code:
#ifndef Wtv020sd16p_h
#define Wtv020sd16p_h
Wtv020sd16p(int resetPin,int clockPin,int dataPin,int busyPin);
void reset();
void playVoice(int voiceNumber);
void asyncPlayVoice(int voiceNumber);
void stopVoice();
void pauseVoice();
void mute();
void unmute();
void sendCommand(unsigned int command);
int _resetPin;
int _clockPin;
int _dataPin;
int _busyPin;
int _busyPinState;
#endif
After that, I modified the pde file with your tip on mask function. Again, when I try to compile, the result is that some error still persist.
If I comment the include at begin of pde file (
#include <Wtv020sd16p.h>) and the mask function (between lines 70 and 95), I can compile but, if one of these are uncommented, then no hex is compiled.
Quote:4- I can't see all functions defined in Wtv020sd16p.h in your code ...
My fail.
At the time I posted my question I was very tired.
Attached is my new code (Wtv020sd16p - pinguino.zip) and the original code for arduino (Wtv020sd16p - arduino.zip) just for comparision.
Quote:Good luck.
Sorry for so many questions, and thanks a lot for your tips.
Regards.