Including a library within a custom library in Arduino using c -


i'm creating library arduino in c , i'm having problems importing adafruit cc3000 library it. know i'll comment using c++, want c better me. think problem way i'm referencing everything, great if clear how should import , call external libraries within custom library.

my files such:

agent.h agent_init.c cc3000.h cc3000.c test_agent.ino

the idea cc3000 optional piece of connectivity hardware can used setting required , in future can have different hardware files can compiled arduino code necessary.

in agent.h , agent_init.c don't have references cc3000 files @ moment. did separate out, possibly change want use cc3000 functionality through agent code. (e.g. set variable agent_use_cc3000).

in cc3000.h have got @ moment basic file:

#ifndef __af_cc3000_h #define __af_cc3000_h  #if arduino >= 100  #include "arduino.h" #else  #include "wprogram.h" #endif  #ifdef __cplusplus extern "c" { #endif  adafruit_cc3000 cc3000;  #ifdef __cplusplus } #endif  #endif /* __af_cc3000_h */ 

in cc3000.c have:

#include <stdio.h> #include <stdlib.h> #include <stdarg.h> #include <string.h> #include <math.h>  #include "agent.h" #include "cc3000.h"  #ifdef agent_use_cc3000  #include <adafruit_cc3000.h> #include <ccspi.h> #include <adafruit_cc3000_server.h> ... #endif 

the problem i'm getting in cc3000.h i've put adafruit_cc3000 cc3000.

error: no matching function call 'adafruit_cc3000::adafruit_cc3000()

in ini file include "agent.h" , "cc3000.h" init stuff agent code compiles fine itself. i'm 90% confident i'm not understanding how things being called , should declared , how use external libary functions correctly within library. first time doing , feel @_@ @ moment...

i wonder if i'm going wrong way anyway. need cc3000.h file? if call relevant functions in agent calls code needs, i.e. in case cc3000.c header file necessary? created looking @ libraries (like cc3000 lib), there header files .cpp files.

if give me guidance corrections can make grateful.


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -