/**************************************************************************** * @(#) Ndless - Utils * * Copyright (C) 2010 by ANNEHEIM Geoffrey and ARMAND Olivier * Contact: geoffrey.anneheim@gmail.com / olivier.calc@gmail.com * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. * * RCSID $Id$ ****************************************************************************/ #ifndef _UTILS_H_ #define _UTILS_H_ #define WAIT(n, name) \ asm ( \ "ldmfd sp!, {r0}\n" \ "ldr r0, ="n"\n" \ "_loop_"name":\n" \ "cmp r0, #0\n" \ "sub r0, r0, #1\n" \ "bne _loop_"name"\n" \ "stmfd sp!, {r0}\n" \ ); typedef unsigned char uchar; typedef unsigned int uint; typedef unsigned long ulong; typedef unsigned short ushort; typedef enum {false, true} bool; extern inline void clearScreen(); extern void showSimpleDialogBox(const char* title, const char* msg); extern void errormsg(const char *message); #endif