PIX::Project

A new way to look at microcontrollers.

Blaze apps
Each app can consume up to 3072 bytes of RAM.
Apps are event-based and register themselfs with a single macro call.
Apps can use all the widgets the system uses as well.
However, the developer will have to keep the max RAM amount in mind.
For example, the RAM usage per widget instance:
Widget RAM
Button (with icon) 50*
Button (without icon) 35*
Progressbar 25*
Numeric keyboard 25*
Generic keyboard 75*
Slider 20*
Textbox (< 30char) 50*
Textfield (< 512bytes) 540*
Small list (< 5 items) 80*
Normal list (< 15 items) 180*
Large list (< 25 items) 280*
* = estimated
Example app
An example hello world app is below.
#include "Blaze.h"
class AppState
{
public:
	int OnEvent(Event* e)
	{
		switch (e->Type)
		{
			case Event::OpenApp:
				Graphics.DrawString("hello",110,100,0x0000, 1);
				Graphics.draw_buf();
				Blaze_API.sleep(1000);
				return -1;
				break;
				
			case Event::None:
				break;
			
			case Event::TouchDown:
				break;
			
			case Event::TouchMove:
				break;
			
			case Event::TouchUp:
				break;
			
			case Event::MicroSDInserted:
				break;
			
			case Event::MicroSDRemoved:
				break;
			default:
				break;
		}
		return 0;
	}
	};
INSTALL_APP(hello,AppState,0x0000);
What this basically does is simply add a string to the screen buffer,
draw it, sleep a second in low power and then terminate the app.

The app is event based, which makes it easier to develop your apps.
An app is installed by the INSTALL_APP macro.