Energia 18 on TIVA-C Launchpad

13 views
Skip to first unread message

jsam...@pobox.com

unread,
Dec 6, 2016, 5:45:21 PM12/6/16
to hbrob...@googlegroups.com
If anybody is going to experiment with quadrature decode on the TI
ek-tm4c123gxl launchpad board using Energia I found the following.

My Energia 17 died and I couldn't resurrect it. I loaded Energia 18. The
following code won't compile (GPIO_PD6_PHA0 not defined):

==============

#include <stdint.h>
#include <stdbool.h>

#include "driverlib/pin_map.h"

#include "driverlib/gpio.h"

void setup()
{
GPIOPinConfigure(GPIO_PD6_PHA0);
}

void loop()
{
}

==============

I'm guessing any reference to pin definitions isn't going to work.

The following fix works:

==============

#include <stdint.h>
#include <stdbool.h>

#define PART_TM4C123GH6PM
// Somebody included pin_map.h with the wrong part (or no part) defined,
fix it.
#ifdef __DRIVERLIB_PIN_MAP_H__
#undef __DRIVERLIB_PIN_MAP_H__
#endif
#include "driverlib/pin_map.h"

#include "driverlib/gpio.h"

void setup()
{
GPIOPinConfigure(GPIO_PD6_PHA0);
}

void loop()
{
}

==============

Apparently the processor type is not getting specified. This is a work
around. Maybe this will save someone else a lot of time. This may be a
problem in earlier versions but I can't test it on Energia 17.

- Jeff Sampson

Reply all
Reply to author
Forward
0 new messages