aboutsummaryrefslogtreecommitdiff
path: root/core/wiring/WProgram.h
blob: 7837da5f1f5f42917ca6fc1adaa77ad7a88deb9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
extern "C" {
  #include <inttypes.h>
  #include <math.h>
  #include <avr/io.h>

  #include "WConstants.h"
  
  // main program prototypes
  void setup(void);
  void loop(void);
  
  // timing prototypes
  void delay(long);
  void delayMicroseconds(unsigned int);
  long millis(void);
  
  // pin prototypes
  void pinMode(uint8_t, uint8_t);
  uint8_t digitalRead(uint8_t);
  void digitalWrite(int, uint8_t);
  void portMode(int, int);
  int portRead(int);
  void portWrite(int, int);
  int analogRead(int);
  void analogWrite(int, int);
  
  // pulse prototypes
  unsigned long pulseIn(int, int);
  
  // interrupt management prototypes
  void attachInterrupt(uint8_t, void (*)(void) );
  void detachInterrupt(uint8_t);
}

// random prototypes
float random(float);
float random(float, float);
void randomSeed(unsigned int);