spirilis / msprf24

nRF24L01+ Library for MSP430 microcontroller line
ISC License
102 stars 32 forks source link

Push-Button example #19

Closed sleepingshorty closed 8 years ago

sleepingshorty commented 8 years ago

Hi.

First thank you very much for the library. It looks great but I have an issue when I try to use the pushbutton-example:

image

I found that it works, when I change:

image

to

image

in msprf24.c.

Am I doing something wrong?

I am using Code Composer Studio 6.1.2.00015, my folder looks like this: image

Thanks again. Kind Regards, Sleepingshorty

aimylios commented 8 years ago

Hi Sleepingshorty,

I just encountered the same issue (CCS 6.2.0.00048 with TI compiler v15.12.3.LTS). There is a comment about this on TI E2E, stating that the function body must exist within the same C file it is being called inline: https://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/3557/12729#12729

I guess this behaviour is compiler specific, because the error disappears when I use GCC for MSP430 (v5.3.0.219) instead of the TI compiler.

spirilis commented 8 years ago

Interesting. Yeah I only really tested this with GCC.

spirilis commented 8 years ago

I removed the inline for now. Hopefully that doesn't toast anyone's code... I doubt it (if anything it might shorten the compiled result a bit)

sleepingshorty commented 8 years ago

Thank you very much.