PropWare  3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Macros | Typedefs | Functions
Arduino.h File Reference

Provides Arduino types and functions on the Propeller. More...

#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <propeller.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 ARDUINO   100
 
#define HIGH   0x1
 
#define LOW   0x0
 
#define INPUT   0x0
 
#define OUTPUT   0x1
 
#define INPUT_PULLUP   0x2
 
#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 SERIAL   0x0
 
#define DISPLAY   0x1
 
#define LSBFIRST   0
 
#define MSBFIRST   1
 
#define MSBPRE   2
 
#define LSBPRE   3
 
#define MSBPOST   4
 
#define LSBPOST   5
 
#define MSBPRE   2
 
#define CHANGE   1
 
#define FALLING   2
 
#define RISING   3
 
#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 clockCyclesPerMicrosecond()   ( CLKFREQ / 1000000L )
 
#define clockCyclesToMicroseconds(a)   ( (a) / clockCyclesPerMicrosecond() )
 
#define microsecondsToClockCycles(a)   ( (a) * clockCyclesPerMicrosecond() )
 
#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))
 
#define pgm_read_byte(ptr)   *(ptr)
 
#define A0   0
 

Typedefs

typedef uint16_t word
 
typedef uint8_t boolean
 
typedef uint8_t byte
 

Functions

void pinMode (uint8_t, uint8_t)
 
void digitalWrite (uint8_t, uint8_t)
 
int digitalRead (uint8_t)
 
int analogRead (uint8_t)
 
void analogReference (uint8_t mode)
 
void analogWrite (uint8_t, int)
 
unsigned long millis (void)
 
unsigned long micros (void)
 
void delay (unsigned long)
 
void delayMicroseconds (uint16_t us)
 
unsigned long pulseIn (uint8_t pin, uint8_t state, unsigned long timeout)
 
void pulseOut (uint8_t pin, unsigned long duration)
 
void shiftOut (uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder, uint8_t val)
 
uint8_t shiftIn (uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder)
 
void setup (void)
 
void loop (void)
 

Detailed Description

Provides Arduino types and functions on the Propeller.

Copyright (c) 2013 by Martin Heermance MIT Licensed

Definition in file Arduino.h.