Qualia  0.2
Macros | Typedefs | Functions
Arduino.h File Reference
#include <qualia/core/common.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "binary.h"
Include dependency graph for Arduino.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define true   0x1
 
#define false   0x0
 
#define PI   3.1415926535897932384626433832795
 
#define HALF_PI   1.5707963267948966192313216916398
 
#define TWO_PI   6.283185307179586476925286766559
 
#define DEG_TO_RAD   0.017453292519943295769236907684886
 
#define RAD_TO_DEG   57.295779513082320876798154814105
 
#define min(a, b)   ((a)<(b)?(a):(b))
 
#define max(a, b)   ((a)>(b)?(a):(b))
 
#define abs(x)   ((x)>=0?(x):-(x))
 
#define constrain(amt, low, high)   ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
 
#define round(x)   ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
 
#define radians(deg)   ((deg)*DEG_TO_RAD)
 
#define degrees(rad)   ((rad)*RAD_TO_DEG)
 
#define sq(x)   ((x)*(x))
 
#define lowByte(w)   ((uint8_t) ((w) & 0xff))
 
#define highByte(w)   ((uint8_t) ((w) >> 8))
 
#define bitRead(value, bit)   (((value) >> (bit)) & 0x01)
 
#define bitSet(value, bit)   ((value) |= (1UL << (bit)))
 
#define bitClear(value, bit)   ((value) &= ~(1UL << (bit)))
 
#define bitWrite(value, bit, bitvalue)   (bitvalue ? bitSet(value, bit) : bitClear(value, bit))
 
#define bit(b)   (1UL << (b))
 

Typedefs

typedef unsigned int word
 
typedef uint8_t boolean
 
typedef uint8_t byte
 

Functions

unsigned long millis (void)
 
unsigned long micros (void)
 
void delay (unsigned long)
 
void delayMicroseconds (unsigned int us)
 

Macro Definition Documentation

#define abs (   x)    ((x)>=0?(x):-(x))
#define bit (   b)    (1UL << (b))
#define bitClear (   value,
  bit 
)    ((value) &= ~(1UL << (bit)))
#define bitRead (   value,
  bit 
)    (((value) >> (bit)) & 0x01)
#define bitSet (   value,
  bit 
)    ((value) |= (1UL << (bit)))
#define bitWrite (   value,
  bit,
  bitvalue 
)    (bitvalue ? bitSet(value, bit) : bitClear(value, bit))
#define constrain (   amt,
  low,
  high 
)    ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
#define DEG_TO_RAD   0.017453292519943295769236907684886
#define degrees (   rad)    ((rad)*RAD_TO_DEG)
#define false   0x0
#define HALF_PI   1.5707963267948966192313216916398
#define highByte (   w)    ((uint8_t) ((w) >> 8))
#define lowByte (   w)    ((uint8_t) ((w) & 0xff))
#define max (   a,
 
)    ((a)>(b)?(a):(b))
#define min (   a,
 
)    ((a)<(b)?(a):(b))
#define PI   3.1415926535897932384626433832795
#define RAD_TO_DEG   57.295779513082320876798154814105
#define radians (   deg)    ((deg)*DEG_TO_RAD)
#define round (   x)    ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
#define sq (   x)    ((x)*(x))
#define true   0x1

This is a port of the Arduino.h file from the Arduino distribution. It ports some of the basic functionalities of the Arduino, making them available on non-Arduino AVR as well as computer platforms.

#define TWO_PI   6.283185307179586476925286766559

Typedef Documentation

typedef uint8_t boolean
typedef uint8_t byte
typedef unsigned int word

Function Documentation

void delay ( unsigned  long)
void delayMicroseconds ( unsigned int  us)
unsigned long micros ( void  )
unsigned long millis ( void  )