arduino.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Freie Universit├Ąt Berlin
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
21 #ifndef ARDUINO_H
22 #define ARDUINO_H
23 
24 extern "C" {
25 #include "periph/gpio.h"
26 #include "arduino_board.h"
27 }
28 
29 #include "serialport.hpp"
30 
34 enum {
38 };
39 
43 enum {
44  LOW = 0,
45  HIGH = 1
46 };
47 
51 static SerialPort Serial(UART_DEV(0));
52 
59 void pinMode(int pin, int mode);
60 
67 void digitalWrite(int pin, int state);
68 
76 int digitalRead(int pin);
77 
83 void delay(unsigned long msec);
84 
85 #endif /* ARDUINO_H */
86 
static SerialPort Serial(UART_DEV(0))
Primary serial port (mapped to UART_DEV(0))
Low-level GPIO peripheral driver interface definitions.
Definition of the Arduino 'Serial' interface.
pin is cleared
Definition: arduino.hpp:44
#define UART_DEV(x)
Default UART device access macro.
Definition: uart.h:84
configure pin as input with pull-up resistor
Definition: arduino.hpp:37
void delay(unsigned long msec)
Sleep for a given amount of time [milliseconds].
void pinMode(int pin, int mode)
Configure a pin as either input or output.
pin is set
Definition: arduino.hpp:45
configure pin as input
Definition: arduino.hpp:35
void digitalWrite(int pin, int state)
Set the value for the given pin.
int digitalRead(int pin)
Read the current state of the given pin.
Arduino Serial Interface.
Definition: serialport.hpp:45
configure pin as output
Definition: arduino.hpp:36