New Library for Arduino

arcachofo:
Hi kevincox.

Could you post some example to see how it works?

My new library requires passing in all of the registers you wish to use

Do you have any plans to do it easier to use? , i mean all the device specific stuff.

Regards.

Sorry, I meant to mention that I have generator functions. They are located in factory.h and remove much of the tediousness. For example:

// note: not tested.

#include <ooarduino/pin.h>
#include <ooarduino/usart.h>
#include <ooarduino/factory.h>
using namespace OOArduino;

int main ( void )
{
    Pin p13(CREATE_PIN(B, 5, Pin::out));
    Usart usart(CREATE_USART(0));

    // use usart...

    for (;;)
    {
        p13.toggle();
    }

    return 0;
}

There are also Arduino specific functions. (currently only set up for the Deulimilinove becuase thats the board I have.)

// note: not tested.

#include <ooarduino/arduino/pins.h>
using namespace OOArduino;

int main ( void )
{
    Pin p13(Arduino::getPin(13, Pin::out));

    for (;;)
    {
        p13.toggle();
    }

    return 0;
}