From Wiring to pure C I'm using the Teensy 2.0 (atmega32u4) and decided to switch from Arduino IDE with Wiring to pure C. I think it's much more useful to master programming microcontrollers on that level. Wiring seems to be quite limited at some point.  

It was really easy to use some basic libraries such as avr/io, or util/delay and write simple programs like "arduino hello world".

My problem comes with more complex tasks such as acting as usb mouse. On http://pjrc.com are references just to use with arduino ide/wiring. I couldn't find anything useful on google. Is there any good reference for pure C programming tennsy/arduino and/or using libraries such as "usb_mouse.h" (from pjrc.com) with pure C?



EDIT 1

Let me add some details (based of @st2000 answer).. Yes, Tennsy (and Arduino) are microcontrollers, not microprocessors. Programming avr chips in pure C doesn't require so much work as programming microprocessors. This is the simplest avr C program I could come with (typical blinky):

#include &lt;avr/io.h&gt;
#include &lt;util/delay.h&gt;

int main(void) {
        (CLKPR = 0x80, CLKPR = 0x00);
        DDRD |= (1&lt;&lt;6);
        PORTD &amp;= ~(1&lt;&lt;6);

        int sviti = 0;

        while (1) {
                if (sviti)
                        PORTD |= (1&lt;&lt;6);
                else
                        PORTD &amp;= ~(1&lt;&lt;6);
                sviti ^= 1;
                _delay_ms(40000);
        }
}


As you can see (@st2000), there are no dozens of setting up registers. It does not require any expensive equipment to upload resultant .HEX file - for teensy the only thing you need is a USB cable.

If you want a concrete example, I want to use this library with pure C, but it's obviously meant for wiring and arduino IDE primary. So how to use this library with pure C? And back to my main question, how to generally use libraries of this kind with pure C avr programming?
And back to my main question, how to generally use libraries of this kind with pure C avr programming?


just as how you would write under arduino ide -> arduino ide is nothing but pure c/c++ plus a set of canned libraries. so what you are trying to do is no different from what you are doing with arduino right now, maybe with your own libraries or libraries from folks other than the arduino folks.

nothing magic about going in "pure c".