Jump to content
43oh

Launchpad to SparkFun Serial LCD


Recommended Posts

  • 1 month later...

I trying to use the button count code with a Sparkfun backpack and 4x20 lcd. I use the gcc compiler and got a good compile (changed out the __delay_cycles() ) except for an "invalid use of void" ;)

Here is the code snip

// Update the button press count, and toggle LEDs, when the button is pressed

#ifdef __MSP430__

interrupt (PORT1_VECTOR) PORT_1 (void) {

#else

#pragma vector=PORT1_VECTOR

__interrupt void PORT1_ISR(void) {

#endif

buttonPresses++;

P1OUT ^= BIT0;

P1OUT ^= BIT6;

P1IFG = 0; // clear interrupt

__bic_SR_register_on_exit(LPM4_EXIT);

}

 

I don't see the problem?

BTW, using the #ifdef in the code is really nice for portability.

 

SOLVED - It seems msp430gcc doesn't like LPM4_EXIT some googling showed it should be LPM4_bits - interesting.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...