goldilocks and cc3000

An advanced Arduino-compatible board with ATmega1284P and ATmega32u2 MCUs for experienced users. More RAM than a Mega, but in a convenient Uno-style form factor. [Product page]
Post Reply
mrose17
Posts: 5
Joined: Wed Sep 25, 2013 5:26 pm

goldilocks and cc3000

Post by mrose17 » Mon Oct 14, 2013 5:40 am

hi. the adafruit driver for the cc3000 wifi shield has a compile-time decision tree that looks like this:

#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) || defined (__AVR_ATmega328__) || defined(__AVR_ATmega8__)
#elif defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1280__)
#elif defined(__AVR_ATmega32U4__) && defined(CORE_TEENSY)
#elif defined(__AVR_AT90USB1286__) && defined(CORE_TEENSY)
#elif defined(__arm__) && defined(CORE_TEENSY)
#elif defined(__AVR_ATmega32U4__)

none of these symbols are defined in the goldlocks configuration.

can someone tell me what symbol is defined and where i might put it in the "#if-madness" above? (i.e., where would an __AVR_ATmega1284P) go in there?

thanks!

ps: if it helps, the driver is at

https://github.com/adafruit/Adafruit_CC3000_Library

feilipu
Posts: 52
Joined: Fri Jul 19, 2013 6:17 am

Re: goldilocks and cc3000

Post by feilipu » Mon Oct 14, 2013 10:34 am

Yes, the variable would be __AVR_ATmega1284P__
It is usually put together with its "family" of chips, like:

Code: Select all

#elif defined(__AVR_ATmega324P__)  || defined(__AVR_ATmega644P__)|| defined(__AVR_ATmega1284P__) || defined(__AVR_ATmega324PA__) || defined(__AVR_ATmega644PA__)
The only place I see the tree is in this piece of code, and I guess this is the right answer for the pins upon which the interrupts appear:

Code: Select all

static const uint8_t dreqinttable[] = {
#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) || defined (__AVR_ATmega328__) || defined(__AVR_ATmega8__) 
 2, 0,
 3, 1,
#elif defined(__AVR_ATmega324P__)  || defined(__AVR_ATmega644P__)|| defined(__AVR_ATmega1284P__) || defined(__AVR_ATmega324PA__) || defined(__AVR_ATmega644PA__)
 2, 0,
 3, 1,
 8, 2,
#elif defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1280__) 
  2, 0,
  3, 1,
  21, 2, 
  20, 3,
  19, 4,
  18, 5,
I'll be playing with one of the CC3000's shortly, so looking forward to your results.

Phillip

mrose17
Posts: 5
Joined: Wed Sep 25, 2013 5:26 pm

Re: goldilocks and cc3000

Post by mrose17 » Mon Oct 14, 2013 3:37 pm

winner! pull request submitted.

https://github.com/adafruit/Adafruit_CC ... ry/pull/23

many thanks!

Post Reply