Search Results

Search found 3 results on 1 pages for 'winavr'.

Page 1/1 | 1 

  • 8 bit enum, in C

    - by oxinabox.ucc.asn.au
    I have to store instuctions, commands that I will be receiving via serial. The commands will be 8 bits long. I'd like to use Enumerations to deal with them in my code. Only a enumeration corresponds to a ... on this platform I think a 16 bit integer. I need to preserve transparancy between command name, and its value. So as to avoid having to translate an 8-bit number received in serial into any type. BTW the platform is AVR ATmega169V microcontroller, on the Butterfly demo board. It may be being underclocked to preserve power (I'm opposed to this, I believe the ATmega169V uses no power, not next to a router. But that's getting offtopic.) So I need to keep things fast, and I don't have any luxuries like file I/O. Or operating systems. So any suggestions as to what type I should be using to store 8-bit commands? There has got to be something better than a massive header of #defines.

    Read the article

  • pointers in C with a #define

    - by milan
    The function: #define ASSOC(port) (*(volatile bit_field *) (&port)) The function call: #define SCLK ASSOC(PORTC).bit0 bit_field defined as a struct like this: typedef struct { unsigned char bit0 :1, bit1 :1, bit2 :1, bit3 :1, bit4 :1, bit5 :1, bit6 :1, bit7 :1; } bit_field; I don't know where &port is defined. Can someone please explain how the function is read and how it works please? I am not very good with pointers and this example in particular is very confusing with "*" in the front and at the end and the "&" with the port. Thank you

    Read the article

  • Eclipse, the AVR Plugin, and Arduino

    - by bitrex
    I'm attempting to compile Arduino code in the Eclipse IDE using WinAVR and the AVR IDE plugin, and I'm running into one major stumbling block - when I try to compile the code I get the following error: /usr/bin/sh: g++: command not found make: *** [main.o] Error 127 Yeah, I bet not...I'm using Windows Vista. I have the paths to WinAVR's avr-g++ all set correctly in the preferences tab, does anyone know why it might be doing this?

    Read the article

1