Note that there are some explanatory texts on larger screens.

plurals
  1. POexpected declaration specifiers or '...' before 'MLD_PACKET'
    primarykey
    data
    text
    <p>Wherever I include a certain <code>commands.h</code> header file, in any place apart from <code>commands.c</code>, this error is thrown up by the compiler. <code>commands.h</code> contains function prototypes which make use of structs defined in <code>instrument.h</code>, specifically:</p> <pre><code>void readConfig(PSTATPLUS_CONFIG* pStatConfig_p, MLD_PACKET* rxPacketUart2_p); void readState(PSTATPLUS_STATE* pStatState_p, MLD_PACKET* rxPacketUart2_p); void writeConfig(PSTATPLUS_CONFIG* pStatConfig_p, MLD_PACKET* rxPacketUart2_p); void writeState(PSTATPLUS_STATE* pStatState_p, MLD_PACKET* rxPacketUart2_p); </code></pre> <p><code>PSTATPLUS_CONFIG</code> and <code>PSTATPLUS_STATE</code> are defined as such, in <code>instrument.h</code>:</p> <pre><code>typedef struct { float signalAmplitude; // Signal Amplitude float signalOffset; // Signal Offset unsigned char waveType; // Waveform Type float startFreq; // Frequency Start float stopFreq; // Frequency Stop unsigned int numIncrements; // Number of Increments unsigned char scale; // Linear(0) or log(1) float stepDelay; // Step Delay }PSTATPLUS_CONFIG; typedef struct { // Current biosensor status unsigned char scan; // Scan status (on/off) unsigned char sample; // Sample status (on/off) unsigned int currentIncrement; // Current scan increment unsigned char gain; // Current gain setting float iValue; // I voltage float qValue; // Q voltage unsigned int sampleDivider; // 1 takes every ADC sample, 2 takes every 2nd ADC sample, 3 takes every 3rd ADC samp... n takes every nth. 0 stops data collection. unsigned int totalSamples; // total number of samples wanted to complete one measurement. }PSTATPLUS_STATE; </code></pre> <p>I require some definitions written in the <code>commands.h</code> header to be accessible to my <code>instrument.c</code> file but as mentioned, every time I include <code>commands.h</code> in there, the compiler produces that error. I've tried including <code>commands.h</code> in some of my other source files, the same thing keeps happening. Any help is appreciated.</p> <p>Dan</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload