ad7793 library error

Hi all

i am trying to write a simple code to read from AD7793 and i have found the library for it but looks like it has some error as i try to upload the code I get.

"Compiling libraries…
Compiling library “ad7793_generic”
“C:\Users\New\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-gcc” -c -g -Os -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10802 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR “-IC:\Users\New\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino” “-IC:\Users\New\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\variants\eightanaloginputs” “-IC:\Users\New\Documents\Arduino\libraries\ad7793_generic” “-IC:\Users\New\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\libraries\SPI\src” “-IC:\Users\New\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\libraries\Wire\src” “-IC:\Users\New\Documents\Arduino\libraries\Adafruit-GFX-Library-master” “-IC:\Users\New\Documents\Arduino\libraries\Adafruit_SSD1306-master” “C:\Users\New\Documents\Arduino\libraries\ad7793_generic\AD7793.c” -o “C:\Users\New\AppData\Local\Temp\arduino_build_398969\libraries\ad7793_generic\AD7793.c.o”
C:\Users\New\Documents\Arduino\libraries\ad7793_generic\AD7793.c: In function ‘AD7793_WaitRdyGoLow’:

C:\Users\New\Documents\Arduino\libraries\ad7793_generic\AD7793.c:143:29: error: expected expression before ‘)’ token

while( AD7793_RDY_STATE )

^
"

can some one help me check it ?

Thanks in advance.

AD7793.c (12.3 KB)

AD7793.h (9.22 KB)

Communication.c (5.43 KB)

Communication.h (3.77 KB)

From AD7793.h:

#define AD7793_RDY_STATE       GPIO1_STATE

From Communication.h:

#define ADI_PAR_CS_PIN        		// Add code here
#define ADI_PART_CS_PIN_OUT   		// Add code here
#define ADI_PART_CS_LOW        		// Add code here
#define ADI_PART_CS_HIGH       		// Add code here
#define GPIO1_PIN              		// Add code here
#define GPIO1_STATE            		// Add code here

GPIO1_STATE is defined but empty, thus the error. So I think you're supposed to edit that file to configure all those macros according to your system. In a sane world you would find some documentation about this with the library.

yes I can see that now

unfortunately i got this library from analog devices and came with no instructions and my programming skills are non existent .

i would be grateful if you could give me some pointer or example to study and learn.

and thanks for quick response.

This library is going to be very difficult for you to use with no programming skills. It turns out that all of Communication.c is just empty functions that you need to fill in yourself. The idea seems to be that this is basically a template of a library that can be adapted to any hardware so they left out any hardware specific code.

I recommend you to spend some time searching for a AD7793 library written for Arduino. I just did a quick search and didn't see anything immediately show up so that's a bit worrisome.

If you can't find one, it's definitely possible for you to get this library working eventually but you'll probably want to start with learning the basics of programming and electronics and slowly work your way up to the point where you are able to use the information in the datasheets to fill in the missing code in the library. The best thing would be to publish a library so that this will be accessible to the entire Arduino community.