Hello,
I have a prototype board assembled with the programmable S2C module installed. The sample applications in CodeWarrior work fine, the one in particular I’m referring to is transmit_basic_frames.
When I try to get similar functionality into a new project, meaning not using the sample project, I get a undefined type error:
…/Sources\main.c:125:error:C1815 wpan_envelope_t not declared (or typename)
I create a new application targeting the S2C solder-down module, add Xbee and Zigbee to the config.xml add the includes I see in the sample and then try to create an envelope. Compiling results in the error. I guess there’s a library I’m not linking or an include path not referenced but I can’t seem to find it.
Any ideas?
Full main.c:
#include
#include
#include
#include
#include
#include
#ifdef ENABLE_XBEE_HANDLE_MODEM_STATUS_FRAMES
int xbee_modem_status_handler(xbee_dev_t *xbee, const void FAR *payload,
uint16_t length, void FAR context)
{
/ Add your code here… */
return 0;
}
#endif
#ifdef ENABLE_XBEE_HANDLE_TX_STATUS_FRAMES
int xbee_transmit_status_handler(xbee_dev_t *xbee, const void FAR *payload,
uint16_t length, void FAR context)
{
/ Add your code here… */
return 0;
}
#endif
#ifdef ENABLE_XBEE_HANDLE_RX
int xbee_transparent_rx(const wpan_envelope_t FAR *envelope, void FAR context)
{
/ Add your code here… */
return 0;
}
#endif
void main(void)
{
sys_hw_init();
sys_xbee_init();
sys_app_banner();
wpan_envelope_t env; // <<<<< Error here, undefined type
char txbuf[30];
uint16_t msgcnt = 1;
wpan_envelope_create(&env, &xdev.wpan_dev, WPAN_IEEE_ADDR_COORDINATOR, WPAN_NET_ADDR_UNDEFINED);
for (;;) {
/* Write your code here... */
sys_watchdog_reset();
sys_xbee_tick();
}
}