Skip to content

Instantly share code, notes, and snippets.

@4ntoine
Created January 19, 2016 08:40
Show Gist options
  • Save 4ntoine/df8ce91cf24271edfe6b to your computer and use it in GitHub Desktop.
Save 4ntoine/df8ce91cf24271edfe6b to your computer and use it in GitHub Desktop.
# 1 "<built-in>"
# 1 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Stream.cpp"
/*
Stream.cpp - adds parsing methods to Stream class
Copyright (c) 2008 David A. Mellis. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Created July 2011
parsing functions based on TextFinder library by Michael Margolis
findMulti/findUntil routines written by Jim Leonard/Xuth
*/
#if 0 /* expanded by -frewrite-includes */
#include "Arduino.h"
#endif /* expanded by -frewrite-includes */
# 25 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Stream.cpp"
# 1 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h" 1
/*
Arduino.h - Main include file for the Arduino SDK
Copyright (c) 2005-2013 Arduino Team. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef Arduino_h
#define Arduino_h
#if 0 /* expanded by -frewrite-includes */
#include <stdlib.h>
#endif /* expanded by -frewrite-includes */
# 23 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
# 1 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdlib.h" 1
/* Copyright (c) 2002, Marek Michalkiewicz
Copyright (c) 2004,2007 Joerg Wunsch
Portions of documentation Copyright (c) 1990, 1991, 1993, 1994
The Regents of the University of California.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of the copyright holders nor the names of
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
$Id$
*/
#ifndef _STDLIB_H_
#define _STDLIB_H_ 1
#ifndef __ASSEMBLER__
#define __need_NULL
#define __need_size_t
#define __need_wchar_t
#if 0 /* expanded by -frewrite-includes */
#include <stddef.h>
#endif /* expanded by -frewrite-includes */
# 47 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdlib.h"
# 1 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 1 3 4
/*===---- stddef.h - Basic type definitions --------------------------------===
*
* Copyright (c) 2008 Eli Friedman
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*===-----------------------------------------------------------------------===
*/
#if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \
defined(__need_size_t) || defined(__need_wchar_t) || \
defined(__need_NULL) || defined(__need_wint_t)
#if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \
!defined(__need_wchar_t) && !defined(__need_NULL) && \
!defined(__need_wint_t)
/* Always define miscellaneous pieces when modules are available. */
#if !__has_feature(modules)
#define __STDDEF_H
#endif
# 37 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#define __need_ptrdiff_t
#define __need_size_t
#define __need_wchar_t
#define __need_NULL
#define __need_STDDEF_H_misc
/* __need_wint_t is intentionally not defined here. */
#endif
# 44 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#if defined(__need_ptrdiff_t)
#if !defined(_PTRDIFF_T) || __has_feature(modules)
/* Always define ptrdiff_t when modules are available. */
#if !__has_feature(modules)
#define _PTRDIFF_T
#endif
# 51 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
typedef __PTRDIFF_TYPE__ ptrdiff_t;
#endif
# 53 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#undef __need_ptrdiff_t
#endif /* defined(__need_ptrdiff_t) */
# 55 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#if defined(__need_size_t)
#if !defined(_SIZE_T) || __has_feature(modules)
/* Always define size_t when modules are available. */
#if !__has_feature(modules)
#define _SIZE_T
#endif
# 62 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
typedef __SIZE_TYPE__ size_t;
#endif
# 64 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#undef __need_size_t
#endif /*defined(__need_size_t) */
# 66 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#if defined(__need_STDDEF_H_misc)
/* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is
* enabled. */
#if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \
!defined(_RSIZE_T)) || __has_feature(modules)
/* Always define rsize_t when modules are available. */
#if !__has_feature(modules)
#define _RSIZE_T
#endif
# 76 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
typedef __SIZE_TYPE__ rsize_t;
#endif
# 78 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#endif /* defined(__need_STDDEF_H_misc) */
# 79 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#if defined(__need_wchar_t)
#ifndef __cplusplus
/* Always define wchar_t when modules are available. */
#if !defined(_WCHAR_T) || __has_feature(modules)
#if !__has_feature(modules)
#define _WCHAR_T
#if defined(_MSC_EXTENSIONS)
#define _WCHAR_T_DEFINED
#endif
# 89 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#endif
# 90 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
typedef __WCHAR_TYPE__ wchar_t;
#endif
# 92 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#endif
# 93 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#undef __need_wchar_t
#endif /* defined(__need_wchar_t) */
# 95 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#if defined(__need_NULL)
#undef NULL
#ifdef __cplusplus
# if !defined(__MINGW32__) && !defined(_MSC_VER)
# define NULL __null
# else
# 102 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
# define NULL 0
# endif
# 104 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#else
# 105 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
# define NULL ((void*)0)
#endif
# 107 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#ifdef __cplusplus
#if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED)
namespace std { typedef decltype(nullptr) nullptr_t; }
using ::std::nullptr_t;
#endif
# 112 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#endif
# 113 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#undef __need_NULL
#endif /* defined(__need_NULL) */
# 115 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#if defined(__need_STDDEF_H_misc)
#if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L
#if 0 /* expanded by -frewrite-includes */
#include "__stddef_max_align_t.h"
#endif /* expanded by -frewrite-includes */
# 118 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
# 119 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#endif
# 120 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#define offsetof(t, d) __builtin_offsetof(t, d)
#undef __need_STDDEF_H_misc
#endif /* defined(__need_STDDEF_H_misc) */
# 123 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
/* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use
__WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */
#if defined(__need_wint_t)
/* Always define wint_t when modules are available. */
#if !defined(_WINT_T) || __has_feature(modules)
#if !__has_feature(modules)
#define _WINT_T
#endif
# 132 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
typedef __WINT_TYPE__ wint_t;
#endif
# 134 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#undef __need_wint_t
#endif /* __need_wint_t */
# 136 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#endif
# 138 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
# 48 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdlib.h" 2
#ifndef __ptr_t
#define __ptr_t void *
#endif
# 52 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdlib.h"
#ifdef __cplusplus
extern "C" {
#endif
# 56 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdlib.h"
/** \file */
/** \defgroup avr_stdlib <stdlib.h>: General utilities
\code #include <stdlib.h> \endcode
This file declares some basic C macros and functions as
defined by the ISO standard, plus some AVR-specific extensions.
*/
/*@{*/
/** Result type for function div(). */
typedef struct {
int quot; /**< The Quotient. */
int rem; /**< The Remainder. */
} div_t;
/** Result type for function ldiv(). */
typedef struct {
long quot; /**< The Quotient. */
long rem; /**< The Remainder. */
} ldiv_t;
/** Comparision function type for qsort(), just for convenience. */
typedef int (*__compar_fn_t)(const void *, const void *);
#ifndef __DOXYGEN__
#ifndef __ATTR_CONST__
# define __ATTR_CONST__ __attribute__((__const__))
#endif
# 87 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdlib.h"
#ifndef __ATTR_MALLOC__
# define __ATTR_MALLOC__ __attribute__((__malloc__))
#endif
# 91 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdlib.h"
#ifndef __ATTR_NORETURN__
# define __ATTR_NORETURN__ __attribute__((__noreturn__))
#endif
# 95 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdlib.h"
#ifndef __ATTR_PURE__
# define __ATTR_PURE__ __attribute__((__pure__))
#endif
# 99 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdlib.h"
#ifndef __ATTR_GNU_INLINE__
# ifdef __GNUC_STDC_INLINE__
# define __ATTR_GNU_INLINE__ __attribute__((__gnu_inline__))
# else
# 104 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdlib.h"
# define __ATTR_GNU_INLINE__
# endif
# 106 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdlib.h"
#endif
# 107 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdlib.h"
#endif
# 109 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdlib.h"
/** The abort() function causes abnormal program termination to occur.
This realization disables interrupts and jumps to _exit() function
with argument equal to 1. In the limited AVR environment, execution is
effectively halted by entering an infinite loop. */
extern void abort(void) __ATTR_NORETURN__;
/** The abs() function computes the absolute value of the integer \c i.
\note The abs() and labs() functions are builtins of gcc.
*/
extern int abs(int __i) __ATTR_CONST__;
#ifndef __DOXYGEN__
#define abs(__i) __builtin_abs(__i)
#endif
# 123 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdlib.h"
/** The labs() function computes the absolute value of the long integer
\c i.
\note The abs() and labs() functions are builtins of gcc.
*/
extern long labs(long __i) __ATTR_CONST__;
#ifndef __DOXYGEN__
#define labs(__i) __builtin_labs(__i)
#endif
# 132 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdlib.h"
/**
The bsearch() function searches an array of \c nmemb objects, the
initial member of which is pointed to by \c base, for a member
that matches the object pointed to by \c key. The size of each
member of the array is specified by \c size.
The contents of the array should be in ascending sorted order
according to the comparison function referenced by \c compar.
The \c compar routine is expected to have two arguments which
point to the key object and to an array member, in that order,
and should return an integer less than, equal to, or greater than
zero if the key object is found, respectively, to be less than,
to match, or be greater than the array member.
The bsearch() function returns a pointer to a matching member of
the array, or a null pointer if no match is found. If two
members compare as equal, which member is matched is unspecified.
*/
extern void *bsearch(const void *__key, const void *__base, size_t __nmemb,
size_t __size, int (*__compar)(const void *, const void *));
/* __divmodhi4 and __divmodsi4 from libgcc.a */
/**
The div() function computes the value \c num/denom and returns
the quotient and remainder in a structure named \c div_t that
contains two int members named \c quot and \c rem.
*/
extern div_t div(int __num, int __denom) __asm__("__divmodhi4") __ATTR_CONST__;
/**
The ldiv() function computes the value \c num/denom and returns
the quotient and remainder in a structure named \c ldiv_t that
contains two long integer members named \c quot and \c rem.
*/
extern ldiv_t ldiv(long __num, long __denom) __asm__("__divmodsi4") __ATTR_CONST__;
/**
The qsort() function is a modified partition-exchange sort, or
quicksort.
The qsort() function sorts an array of \c nmemb objects, the
initial member of which is pointed to by \c base. The size of
each object is specified by \c size. The contents of the array
base are sorted in ascending order according to a comparison
function pointed to by \c compar, which requires two arguments
pointing to the objects being compared.
The comparison function must return an integer less than, equal
to, or greater than zero if the first argument is considered to
be respectively less than, equal to, or greater than the second.
*/
extern void qsort(void *__base, size_t __nmemb, size_t __size,
__compar_fn_t __compar);
/**
The strtol() function converts the string in \c nptr to a long
value. The conversion is done according to the given base, which
must be between 2 and 36 inclusive, or be the special value 0.
The string may begin with an arbitrary amount of white space (as
determined by isspace()) followed by a single optional \c '+' or \c '-'
sign. If \c base is zero or 16, the string may then include a
\c "0x" prefix, and the number will be read in base 16; otherwise,
a zero base is taken as 10 (decimal) unless the next character is
\c '0', in which case it is taken as 8 (octal).
The remainder of the string is converted to a long value in the
obvious manner, stopping at the first character which is not a
valid digit in the given base. (In bases above 10, the letter \c 'A'
in either upper or lower case represents 10, \c 'B' represents 11,
and so forth, with \c 'Z' representing 35.)
If \c endptr is not NULL, strtol() stores the address of the first
invalid character in \c *endptr. If there were no digits at all,
however, strtol() stores the original value of \c nptr in \c
*endptr. (Thus, if \c *nptr is not \c '\\0' but \c **endptr is \c '\\0'
on return, the entire string was valid.)
The strtol() function returns the result of the conversion, unless
the value would underflow or overflow. If no conversion could be
performed, 0 is returned. If an overflow or underflow occurs, \c
errno is set to \ref avr_errno "ERANGE" and the function return value
is clamped to \c LONG_MIN or \c LONG_MAX, respectively.
*/
extern long strtol(const char *__nptr, char **__endptr, int __base);
/**
The strtoul() function converts the string in \c nptr to an
unsigned long value. The conversion is done according to the
given base, which must be between 2 and 36 inclusive, or be the
special value 0.
The string may begin with an arbitrary amount of white space (as
determined by isspace()) followed by a single optional \c '+' or \c '-'
sign. If \c base is zero or 16, the string may then include a
\c "0x" prefix, and the number will be read in base 16; otherwise,
a zero base is taken as 10 (decimal) unless the next character is
\c '0', in which case it is taken as 8 (octal).
The remainder of the string is converted to an unsigned long value
in the obvious manner, stopping at the first character which is
not a valid digit in the given base. (In bases above 10, the
letter \c 'A' in either upper or lower case represents 10, \c 'B'
represents 11, and so forth, with \c 'Z' representing 35.)
If \c endptr is not NULL, strtoul() stores the address of the first
invalid character in \c *endptr. If there were no digits at all,
however, strtoul() stores the original value of \c nptr in \c
*endptr. (Thus, if \c *nptr is not \c '\\0' but \c **endptr is \c '\\0'
on return, the entire string was valid.)
The strtoul() function return either the result of the conversion
or, if there was a leading minus sign, the negation of the result
of the conversion, unless the original (non-negated) value would
overflow; in the latter case, strtoul() returns ULONG_MAX, and \c
errno is set to \ref avr_errno "ERANGE". If no conversion could
be performed, 0 is returned.
*/
extern unsigned long strtoul(const char *__nptr, char **__endptr, int __base);
/**
The atol() function converts the initial portion of the string
pointed to by \p s to long integer representation. In contrast to
\code strtol(s, (char **)NULL, 10); \endcode
this function does not detect overflow (\c errno is not changed and
the result value is not predictable), uses smaller memory (flash and
stack) and works more quickly.
*/
extern long atol(const char *__s) __ATTR_PURE__;
/**
The atoi() function converts the initial portion of the string
pointed to by \p s to integer representation. In contrast to
\code (int)strtol(s, (char **)NULL, 10); \endcode
this function does not detect overflow (\c errno is not changed and
the result value is not predictable), uses smaller memory (flash and
stack) and works more quickly.
*/
extern int atoi(const char *__s) __ATTR_PURE__;
/**
The exit() function terminates the application. Since there is no
environment to return to, \c status is ignored, and code execution
will eventually reach an infinite loop, thereby effectively halting
all code processing. Before entering the infinite loop, interrupts
are globally disabled.
In a C++ context, global destructors will be called before halting
execution.
*/
extern void exit(int __status) __ATTR_NORETURN__;
/**
The malloc() function allocates \c size bytes of memory.
If malloc() fails, a NULL pointer is returned.
Note that malloc() does \e not initialize the returned memory to
zero bytes.
See the chapter about \ref malloc "malloc() usage" for implementation
details.
*/
extern void *malloc(size_t __size) __ATTR_MALLOC__;
/**
The free() function causes the allocated memory referenced by \c
ptr to be made available for future allocations. If \c ptr is
NULL, no action occurs.
*/
extern void free(void *__ptr);
/**
\c malloc() \ref malloc_tunables "tunable".
*/
extern size_t __malloc_margin;
/**
\c malloc() \ref malloc_tunables "tunable".
*/
extern char *__malloc_heap_start;
/**
\c malloc() \ref malloc_tunables "tunable".
*/
extern char *__malloc_heap_end;
/**
Allocate \c nele elements of \c size each. Identical to calling
\c malloc() using <tt>nele * size</tt> as argument, except the
allocated memory will be cleared to zero.
*/
extern void *calloc(size_t __nele, size_t __size) __ATTR_MALLOC__;
/**
The realloc() function tries to change the size of the region
allocated at \c ptr to the new \c size value. It returns a
pointer to the new region. The returned pointer might be the
same as the old pointer, or a pointer to a completely different
region.
The contents of the returned region up to either the old or the new
size value (whatever is less) will be identical to the contents of
the old region, even in case a new region had to be allocated.
It is acceptable to pass \c ptr as NULL, in which case realloc()
will behave identical to malloc().
If the new memory cannot be allocated, realloc() returns NULL, and
the region at \c ptr will not be changed.
*/
extern void *realloc(void *__ptr, size_t __size) __ATTR_MALLOC__;
extern double strtod(const char *__nptr, char **__endptr);
extern double atof(const char *__nptr);
/** Highest number that can be generated by rand(). */
#define RAND_MAX 0x7FFF
/**
The rand() function computes a sequence of pseudo-random integers in the
range of 0 to \c RAND_MAX (as defined by the header file <stdlib.h>).
The srand() function sets its argument \c seed as the seed for a new
sequence of pseudo-random numbers to be returned by rand(). These
sequences are repeatable by calling srand() with the same seed value.
If no seed value is provided, the functions are automatically seeded with
a value of 1.
In compliance with the C standard, these functions operate on
\c int arguments. Since the underlying algorithm already uses
32-bit calculations, this causes a loss of precision. See
\c random() for an alternate set of functions that retains full
32-bit precision.
*/
extern int rand(void);
/**
Pseudo-random number generator seeding; see rand().
*/
extern void srand(unsigned int __seed);
/**
Variant of rand() that stores the context in the user-supplied
variable located at \c ctx instead of a static library variable
so the function becomes re-entrant.
*/
extern int rand_r(unsigned long *__ctx);
/*@}*/
/*@{*/
/** \name Non-standard (i.e. non-ISO C) functions.
\ingroup avr_stdlib
*/
/**
\brief Convert an integer to a string.
The function itoa() converts the integer value from \c val into an
ASCII representation that will be stored under \c s. The caller
is responsible for providing sufficient storage in \c s.
\note The minimal size of the buffer \c s depends on the choice of
radix. For example, if the radix is 2 (binary), you need to supply a buffer
with a minimal length of 8 * sizeof (int) + 1 characters, i.e. one
character for each bit plus one for the string terminator. Using a larger
radix will require a smaller minimal buffer size.
\warning If the buffer is too small, you risk a buffer overflow.
Conversion is done using the \c radix as base, which may be a
number between 2 (binary conversion) and up to 36. If \c radix
is greater than 10, the next digit after \c '9' will be the letter
\c 'a'.
If radix is 10 and val is negative, a minus sign will be prepended.
The itoa() function returns the pointer passed as \c s.
*/
#ifdef __DOXYGEN__
extern char *itoa(int val, char *s, int radix);
#else
# 417 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdlib.h"
extern __inline__ __ATTR_GNU_INLINE__
char *itoa (int __val, char *__s, int __radix)
{
if (!__builtin_constant_p (__radix)) {
extern char *__itoa (int, char *, int);
return __itoa (__val, __s, __radix);
} else if (__radix < 2 || __radix > 36) {
*__s = 0;
return __s;
} else {
extern char *__itoa_ncheck (int, char *, unsigned char);
return __itoa_ncheck (__val, __s, __radix);
}
}
#endif
# 432 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdlib.h"
/**
\ingroup avr_stdlib
\brief Convert a long integer to a string.
The function ltoa() converts the long integer value from \c val into an
ASCII representation that will be stored under \c s. The caller
is responsible for providing sufficient storage in \c s.
\note The minimal size of the buffer \c s depends on the choice of
radix. For example, if the radix is 2 (binary), you need to supply a buffer
with a minimal length of 8 * sizeof (long int) + 1 characters, i.e. one
character for each bit plus one for the string terminator. Using a larger
radix will require a smaller minimal buffer size.
\warning If the buffer is too small, you risk a buffer overflow.
Conversion is done using the \c radix as base, which may be a
number between 2 (binary conversion) and up to 36. If \c radix
is greater than 10, the next digit after \c '9' will be the letter
\c 'a'.
If radix is 10 and val is negative, a minus sign will be prepended.
The ltoa() function returns the pointer passed as \c s.
*/
#ifdef __DOXYGEN__
extern char *ltoa(long val, char *s, int radix);
#else
# 462 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdlib.h"
extern __inline__ __ATTR_GNU_INLINE__
char *ltoa (long __val, char *__s, int __radix)
{
if (!__builtin_constant_p (__radix)) {
extern char *__ltoa (long, char *, int);
return __ltoa (__val, __s, __radix);
} else if (__radix < 2 || __radix > 36) {
*__s = 0;
return __s;
} else {
extern char *__ltoa_ncheck (long, char *, unsigned char);
return __ltoa_ncheck (__val, __s, __radix);
}
}
#endif
# 477 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdlib.h"
/**
\ingroup avr_stdlib
\brief Convert an unsigned integer to a string.
The function utoa() converts the unsigned integer value from \c val into an
ASCII representation that will be stored under \c s. The caller
is responsible for providing sufficient storage in \c s.
\note The minimal size of the buffer \c s depends on the choice of
radix. For example, if the radix is 2 (binary), you need to supply a buffer
with a minimal length of 8 * sizeof (unsigned int) + 1 characters, i.e. one
character for each bit plus one for the string terminator. Using a larger
radix will require a smaller minimal buffer size.
\warning If the buffer is too small, you risk a buffer overflow.
Conversion is done using the \c radix as base, which may be a
number between 2 (binary conversion) and up to 36. If \c radix
is greater than 10, the next digit after \c '9' will be the letter
\c 'a'.
The utoa() function returns the pointer passed as \c s.
*/
#ifdef __DOXYGEN__
extern char *utoa(unsigned int val, char *s, int radix);
#else
# 505 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdlib.h"
extern __inline__ __ATTR_GNU_INLINE__
char *utoa (unsigned int __val, char *__s, int __radix)
{
if (!__builtin_constant_p (__radix)) {
extern char *__utoa (unsigned int, char *, int);
return __utoa (__val, __s, __radix);
} else if (__radix < 2 || __radix > 36) {
*__s = 0;
return __s;
} else {
extern char *__utoa_ncheck (unsigned int, char *, unsigned char);
return __utoa_ncheck (__val, __s, __radix);
}
}
#endif
# 520 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdlib.h"
/**
\ingroup avr_stdlib
\brief Convert an unsigned long integer to a string.
The function ultoa() converts the unsigned long integer value from
\c val into an ASCII representation that will be stored under \c s.
The caller is responsible for providing sufficient storage in \c s.
\note The minimal size of the buffer \c s depends on the choice of
radix. For example, if the radix is 2 (binary), you need to supply a buffer
with a minimal length of 8 * sizeof (unsigned long int) + 1 characters,
i.e. one character for each bit plus one for the string terminator. Using a
larger radix will require a smaller minimal buffer size.
\warning If the buffer is too small, you risk a buffer overflow.
Conversion is done using the \c radix as base, which may be a
number between 2 (binary conversion) and up to 36. If \c radix
is greater than 10, the next digit after \c '9' will be the letter
\c 'a'.
The ultoa() function returns the pointer passed as \c s.
*/
#ifdef __DOXYGEN__
extern char *ultoa(unsigned long val, char *s, int radix);
#else
# 547 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdlib.h"
extern __inline__ __ATTR_GNU_INLINE__
char *ultoa (unsigned long __val, char *__s, int __radix)
{
if (!__builtin_constant_p (__radix)) {
extern char *__ultoa (unsigned long, char *, int);
return __ultoa (__val, __s, __radix);
} else if (__radix < 2 || __radix > 36) {
*__s = 0;
return __s;
} else {
extern char *__ultoa_ncheck (unsigned long, char *, unsigned char);
return __ultoa_ncheck (__val, __s, __radix);
}
}
#endif
# 562 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdlib.h"
/** \ingroup avr_stdlib
Highest number that can be generated by random(). */
#define RANDOM_MAX 0x7FFFFFFF
/**
\ingroup avr_stdlib
The random() function computes a sequence of pseudo-random integers in the
range of 0 to \c RANDOM_MAX (as defined by the header file <stdlib.h>).
The srandom() function sets its argument \c seed as the seed for a new
sequence of pseudo-random numbers to be returned by rand(). These
sequences are repeatable by calling srandom() with the same seed value.
If no seed value is provided, the functions are automatically seeded with
a value of 1.
*/
extern long random(void);
/**
\ingroup avr_stdlib
Pseudo-random number generator seeding; see random().
*/
extern void srandom(unsigned long __seed);
/**
\ingroup avr_stdlib
Variant of random() that stores the context in the user-supplied
variable located at \c ctx instead of a static library variable
so the function becomes re-entrant.
*/
extern long random_r(unsigned long *__ctx);
#endif /* __ASSEMBLER */
# 594 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdlib.h"
/*@}*/
/*@{*/
/** \name Conversion functions for double arguments.
\ingroup avr_stdlib
Note that these functions are not located in the default library,
<tt>libc.a</tt>, but in the mathematical library, <tt>libm.a</tt>.
So when linking the application, the \c -lm option needs to be
specified.
*/
/** \ingroup avr_stdlib
Bit value that can be passed in \c flags to dtostre(). */
#define DTOSTR_ALWAYS_SIGN 0x01 /* put '+' or ' ' for positives */
/** \ingroup avr_stdlib
Bit value that can be passed in \c flags to dtostre(). */
#define DTOSTR_PLUS_SIGN 0x02 /* put '+' rather than ' ' */
/** \ingroup avr_stdlib
Bit value that can be passed in \c flags to dtostre(). */
#define DTOSTR_UPPERCASE 0x04 /* put 'E' rather 'e' */
#ifndef __ASSEMBLER__
/**
\ingroup avr_stdlib
The dtostre() function converts the double value passed in \c val into
an ASCII representation that will be stored under \c s. The caller
is responsible for providing sufficient storage in \c s.
Conversion is done in the format \c "[-]d.ddde±dd" where there is
one digit before the decimal-point character and the number of
digits after it is equal to the precision \c prec; if the precision
is zero, no decimal-point character appears. If \c flags has the
DTOSTRE_UPPERCASE bit set, the letter \c 'E' (rather than \c 'e' ) will be
used to introduce the exponent. The exponent always contains two
digits; if the value is zero, the exponent is \c "00".
If \c flags has the DTOSTRE_ALWAYS_SIGN bit set, a space character
will be placed into the leading position for positive numbers.
If \c flags has the DTOSTRE_PLUS_SIGN bit set, a plus sign will be
used instead of a space character in this case.
The dtostre() function returns the pointer to the converted string \c s.
*/
extern char *dtostre(double __val, char *__s, unsigned char __prec,
unsigned char __flags);
/**
\ingroup avr_stdlib
The dtostrf() function converts the double value passed in \c val into
an ASCII representationthat will be stored under \c s. The caller
is responsible for providing sufficient storage in \c s.
Conversion is done in the format \c "[-]d.ddd". The minimum field
width of the output string (including the \c '.' and the possible
sign for negative values) is given in \c width, and \c prec determines
the number of digits after the decimal sign. \c width is signed value,
negative for left adjustment.
The dtostrf() function returns the pointer to the converted string \c s.
*/
extern char *dtostrf(double __val, signed char __width,
unsigned char __prec, char *__s);
/**
\ingroup avr_stdlib
Successful termination for exit(); evaluates to 0.
*/
#define EXIT_SUCCESS 0
/**
\ingroup avr_stdlib
Unsuccessful termination for exit(); evaluates to a non-zero value.
*/
#define EXIT_FAILURE 1
/*@}*/
#if 0 /* not yet implemented */
extern int atexit(void (*)(void));
#endif
# 675 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdlib.h"
#ifdef __cplusplus
}
#endif
# 679 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdlib.h"
#endif /* __ASSEMBLER */
# 681 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdlib.h"
#endif /* _STDLIB_H_ */
# 683 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdlib.h"
# 24 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h" 2
#if 0 /* expanded by -frewrite-includes */
#include <stdbool.h>
#endif /* expanded by -frewrite-includes */
# 24 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
# 1 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stdbool.h" 1 3 4
/*===---- stdbool.h - Standard header for booleans -------------------------===
*
* Copyright (c) 2008 Eli Friedman
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*===-----------------------------------------------------------------------===
*/
#ifndef __STDBOOL_H
#define __STDBOOL_H
/* Don't define bool, true, and false in C++, except as a GNU extension. */
#ifndef __cplusplus
#define bool _Bool
#define true 1
#define false 0
#elif defined(__GNUC__) && !defined(__STRICT_ANSI__)
# 35 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stdbool.h" 3 4
/* Define _Bool, bool, false, true as a GNU extension. */
#define _Bool bool
#define bool bool
#define false false
#define true true
#endif
# 41 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stdbool.h" 3 4
#define __bool_true_false_are_defined 1
#endif /* __STDBOOL_H */
# 45 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stdbool.h" 3 4
# 25 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h" 2
#if 0 /* expanded by -frewrite-includes */
#include <string.h>
#endif /* expanded by -frewrite-includes */
# 25 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
# 1 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/string.h" 1
/* Copyright (c) 2002,2007 Marek Michalkiewicz
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of the copyright holders nor the names of
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. */
/* $Id$ */
/*
string.h
Contributors:
Created by Marek Michalkiewicz <[email protected]>
*/
#ifndef _STRING_H_
#define _STRING_H_ 1
#define __need_NULL
#define __need_size_t
#if 0 /* expanded by -frewrite-includes */
#include <stddef.h>
#endif /* expanded by -frewrite-includes */
# 45 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/string.h"
# 1 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 1 3 4
/*===---- stddef.h - Basic type definitions --------------------------------===
*
* Copyright (c) 2008 Eli Friedman
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*===-----------------------------------------------------------------------===
*/
#if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \
defined(__need_size_t) || defined(__need_wchar_t) || \
defined(__need_NULL) || defined(__need_wint_t)
#if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \
!defined(__need_wchar_t) && !defined(__need_NULL) && \
!defined(__need_wint_t)
/* Always define miscellaneous pieces when modules are available. */
#if !__has_feature(modules)
#define __STDDEF_H
#endif
# 37 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#define __need_ptrdiff_t
#define __need_size_t
#define __need_wchar_t
#define __need_NULL
#define __need_STDDEF_H_misc
/* __need_wint_t is intentionally not defined here. */
#endif
# 44 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#if defined(__need_ptrdiff_t)
#if !defined(_PTRDIFF_T) || __has_feature(modules)
/* Always define ptrdiff_t when modules are available. */
#if !__has_feature(modules)
#define _PTRDIFF_T
#endif
# 51 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
typedef __PTRDIFF_TYPE__ ptrdiff_t;
#endif
# 53 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#undef __need_ptrdiff_t
#endif /* defined(__need_ptrdiff_t) */
# 55 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#if defined(__need_size_t)
#if !defined(_SIZE_T) || __has_feature(modules)
/* Always define size_t when modules are available. */
#if !__has_feature(modules)
#define _SIZE_T
#endif
# 62 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
typedef __SIZE_TYPE__ size_t;
#endif
# 64 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#undef __need_size_t
#endif /*defined(__need_size_t) */
# 66 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#if defined(__need_STDDEF_H_misc)
/* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is
* enabled. */
#if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \
!defined(_RSIZE_T)) || __has_feature(modules)
/* Always define rsize_t when modules are available. */
#if !__has_feature(modules)
#define _RSIZE_T
#endif
# 76 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
typedef __SIZE_TYPE__ rsize_t;
#endif
# 78 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#endif /* defined(__need_STDDEF_H_misc) */
# 79 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#if defined(__need_wchar_t)
#ifndef __cplusplus
/* Always define wchar_t when modules are available. */
#if !defined(_WCHAR_T) || __has_feature(modules)
#if !__has_feature(modules)
#define _WCHAR_T
#if defined(_MSC_EXTENSIONS)
#define _WCHAR_T_DEFINED
#endif
# 89 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#endif
# 90 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
typedef __WCHAR_TYPE__ wchar_t;
#endif
# 92 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#endif
# 93 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#undef __need_wchar_t
#endif /* defined(__need_wchar_t) */
# 95 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#if defined(__need_NULL)
#undef NULL
#ifdef __cplusplus
# if !defined(__MINGW32__) && !defined(_MSC_VER)
# define NULL __null
# else
# 102 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
# define NULL 0
# endif
# 104 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#else
# 105 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
# define NULL ((void*)0)
#endif
# 107 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#ifdef __cplusplus
#if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED)
namespace std { typedef decltype(nullptr) nullptr_t; }
using ::std::nullptr_t;
#endif
# 112 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#endif
# 113 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#undef __need_NULL
#endif /* defined(__need_NULL) */
# 115 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#if defined(__need_STDDEF_H_misc)
#if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L
#if 0 /* expanded by -frewrite-includes */
#include "__stddef_max_align_t.h"
#endif /* expanded by -frewrite-includes */
# 118 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
# 119 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#endif
# 120 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#define offsetof(t, d) __builtin_offsetof(t, d)
#undef __need_STDDEF_H_misc
#endif /* defined(__need_STDDEF_H_misc) */
# 123 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
/* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use
__WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */
#if defined(__need_wint_t)
/* Always define wint_t when modules are available. */
#if !defined(_WINT_T) || __has_feature(modules)
#if !__has_feature(modules)
#define _WINT_T
#endif
# 132 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
typedef __WINT_TYPE__ wint_t;
#endif
# 134 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#undef __need_wint_t
#endif /* __need_wint_t */
# 136 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#endif
# 138 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
# 46 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/string.h" 2
#ifndef __ATTR_PURE__
#define __ATTR_PURE__ __attribute__((__pure__))
#endif
# 50 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/string.h"
#ifndef __ATTR_CONST__
# define __ATTR_CONST__ __attribute__((__const__))
#endif
# 54 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/string.h"
#ifdef __cplusplus
extern "C" {
#endif
# 58 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/string.h"
/** \file */
/** \defgroup avr_string <string.h>: Strings
\code #include <string.h> \endcode
The string functions perform string operations on NULL terminated
strings.
\note If the strings you are working on resident in program space (flash),
you will need to use the string functions described in \ref avr_pgmspace. */
/** \ingroup avr_string
This macro finds the first (least significant) bit set in the
input value.
This macro is very similar to the function ffs() except that
it evaluates its argument at compile-time, so it should only
be applied to compile-time constant expressions where it will
reduce to a constant itself.
Application of this macro to expressions that are not constant
at compile-time is not recommended, and might result in a huge
amount of code generated.
\returns The _FFS() macro returns the position of the first
(least significant) bit set in the word val, or 0 if no bits are set.
The least significant bit is position 1. Only 16 bits of argument
are evaluted.
*/
#if defined(__DOXYGEN__)
#define _FFS(x)
#else /* !DOXYGEN */
# 91 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/string.h"
#define _FFS(x) \
(1 \
+ (((x) & 1) == 0) \
+ (((x) & 3) == 0) \
+ (((x) & 7) == 0) \
+ (((x) & 017) == 0) \
+ (((x) & 037) == 0) \
+ (((x) & 077) == 0) \
+ (((x) & 0177) == 0) \
+ (((x) & 0377) == 0) \
+ (((x) & 0777) == 0) \
+ (((x) & 01777) == 0) \
+ (((x) & 03777) == 0) \
+ (((x) & 07777) == 0) \
+ (((x) & 017777) == 0) \
+ (((x) & 037777) == 0) \
+ (((x) & 077777) == 0) \
- (((x) & 0177777) == 0) * 16)
#endif /* DOXYGEN */
# 110 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/string.h"
extern int ffs (int __val) __ATTR_CONST__;
extern int ffsl (long __val) __ATTR_CONST__;
extern int ffsll (long long __val) __ATTR_CONST__;
extern void *memccpy(void *, const void *, int, size_t);
extern void *memchr(const void *, int, size_t) __ATTR_PURE__;
extern int memcmp(const void *, const void *, size_t) __ATTR_PURE__;
extern void *memcpy(void *, const void *, size_t);
extern void *memmem(const void *, size_t, const void *, size_t) __ATTR_PURE__;
extern void *memmove(void *, const void *, size_t);
extern void *memrchr(const void *, int, size_t) __ATTR_PURE__;
extern void *memset(void *, int, size_t);
extern char *strcat(char *, const char *);
extern char *strchr(const char *, int) __ATTR_PURE__;
extern char *strchrnul(const char *, int) __ATTR_PURE__;
extern int strcmp(const char *, const char *) __ATTR_PURE__;
extern char *strcpy(char *, const char *);
extern int strcasecmp(const char *, const char *) __ATTR_PURE__;
extern char *strcasestr(const char *, const char *) __ATTR_PURE__;
extern size_t strcspn(const char *__s, const char *__reject) __ATTR_PURE__;
extern char *strdup(const char *s1);
extern size_t strlcat(char *, const char *, size_t);
extern size_t strlcpy(char *, const char *, size_t);
extern size_t strlen(const char *) __ATTR_PURE__;
extern char *strlwr(char *);
extern char *strncat(char *, const char *, size_t);
extern int strncmp(const char *, const char *, size_t) __ATTR_PURE__;
extern char *strncpy(char *, const char *, size_t);
extern int strncasecmp(const char *, const char *, size_t) __ATTR_PURE__;
extern size_t strnlen(const char *, size_t) __ATTR_PURE__;
extern char *strpbrk(const char *__s, const char *__accept) __ATTR_PURE__;
extern char *strrchr(const char *, int) __ATTR_PURE__;
extern char *strrev(char *);
extern char *strsep(char **, const char *);
extern size_t strspn(const char *__s, const char *__accept) __ATTR_PURE__;
extern char *strstr(const char *, const char *) __ATTR_PURE__;
extern char *strtok(char *, const char *);
extern char *strtok_r(char *, const char *, char **);
extern char *strupr(char *);
#ifdef __cplusplus
}
#endif
# 153 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/string.h"
#endif /* _STRING_H_ */
# 155 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/string.h"
# 26 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h" 2
#if 0 /* expanded by -frewrite-includes */
#include <math.h>
#endif /* expanded by -frewrite-includes */
# 26 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
# 1 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/math.h" 1
/* Copyright (c) 2002,2007-2009 Michael Stumpf
Portions of documentation Copyright (c) 1990 - 1994
The Regents of the University of California.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of the copyright holders nor the names of
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. */
/* $Id$ */
/*
math.h - mathematical functions
Author : Michael Stumpf
[email protected]
__ATTR_CONST__ added by [email protected] for functions
that "do not examine any values except their arguments, and have
no effects except the return value", for better optimization by gcc.
*/
#ifndef __MATH_H
#define __MATH_H
/** \file */
/** \defgroup avr_math <math.h>: Mathematics
\code #include <math.h> \endcode
This header file declares basic mathematics constants and
functions.
\par Notes:
- In order to access the functions declared herein, it is usually
also required to additionally link against the library \c libm.a.
See also the related \ref faq_libm "FAQ entry".
- Math functions do not raise exceptions and do not change the
\c errno variable. Therefore the majority of them are declared
with const attribute, for better optimization by GCC. */
/** \ingroup avr_math */
/*@{*/
/** The constant \a e. */
#define M_E 2.7182818284590452354
/** The logarithm of the \a e to base 2. */
#define M_LOG2E 1.4426950408889634074 /* log_2 e */
/** The logarithm of the \a e to base 10. */
#define M_LOG10E 0.43429448190325182765 /* log_10 e */
/** The natural logarithm of the 2. */
#define M_LN2 0.69314718055994530942 /* log_e 2 */
/** The natural logarithm of the 10. */
#define M_LN10 2.30258509299404568402 /* log_e 10 */
/** The constant \a pi. */
#define M_PI 3.14159265358979323846 /* pi */
/** The constant \a pi/2. */
#define M_PI_2 1.57079632679489661923 /* pi/2 */
/** The constant \a pi/4. */
#define M_PI_4 0.78539816339744830962 /* pi/4 */
/** The constant \a 1/pi. */
#define M_1_PI 0.31830988618379067154 /* 1/pi */
/** The constant \a 2/pi. */
#define M_2_PI 0.63661977236758134308 /* 2/pi */
/** The constant \a 2/sqrt(pi). */
#define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */
/** The square root of 2. */
#define M_SQRT2 1.41421356237309504880 /* sqrt(2) */
/** The constant \a 1/sqrt(2). */
#define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
/** NAN constant. */
#define NAN __builtin_nan("")
/** INFINITY constant. */
#define INFINITY __builtin_inf()
#ifndef __ATTR_CONST__
# define __ATTR_CONST__ __attribute__((__const__))
#endif
# 119 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/math.h"
#ifdef __cplusplus
extern "C" {
#endif
# 123 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/math.h"
/**
The cos() function returns the cosine of \a __x, measured in radians.
*/
extern double cos(double __x) __ATTR_CONST__;
#define cosf cos /**< The alias for cos(). */
/**
The sin() function returns the sine of \a __x, measured in radians.
*/
extern double sin(double __x) __ATTR_CONST__;
#define sinf sin /**< The alias for sin(). */
/**
The tan() function returns the tangent of \a __x, measured in radians.
*/
extern double tan(double __x) __ATTR_CONST__;
#define tanf tan /**< The alias for tan(). */
/**
The fabs() function computes the absolute value of a floating-point
number \a __x.
*/
extern double fabs(double __x) __ATTR_CONST__;
#define fabsf fabs /**< The alias for fabs(). */
/**
The function fmod() returns the floating-point remainder of <em>__x /
__y</em>.
*/
extern double fmod(double __x, double __y) __ATTR_CONST__;
#define fmodf fmod /**< The alias for fmod(). */
/**
The modf() function breaks the argument \a __x into integral and
fractional parts, each of which has the same sign as the argument.
It stores the integral part as a double in the object pointed to by
\a __iptr.
The modf() function returns the signed fractional part of \a __x.
\note This implementation skips writing by zero pointer. However,
the GCC 4.3 can replace this function with inline code that does not
permit to use NULL address for the avoiding of storing.
*/
extern double modf(double __x, double *__iptr);
/** The alias for modf().
*/
extern float modff (float __x, float *__iptr);
/**
The sqrt() function returns the non-negative square root of \a __x.
*/
extern double sqrt(double __x) __ATTR_CONST__;
#define sqrtf sqrt /**< The alias for sqrt(). */
/**
The cbrt() function returns the cube root of \a __x.
*/
extern double cbrt(double __x) __ATTR_CONST__;
#define cbrtf cbrt /**< The alias for cbrt(). */
/**
The hypot() function returns <em>sqrt(__x*__x + __y*__y)</em>. This
is the length of the hypotenuse of a right triangle with sides of
length \a __x and \a __y, or the distance of the point (\a __x, \a
__y) from the origin. Using this function instead of the direct
formula is wise, since the error is much smaller. No underflow with
small \a __x and \a __y. No overflow if result is in range.
*/
extern double hypot (double __x, double __y) __ATTR_CONST__;
#define hypotf hypot /**< The alias for hypot(). */
/**
The function square() returns <em>__x * __x</em>.
\note This function does not belong to the C standard definition.
*/
extern double square(double __x) __ATTR_CONST__;
#define squaref square /**< The alias for square(). */
/**
The floor() function returns the largest integral value less than or
equal to \a __x, expressed as a floating-point number.
*/
extern double floor(double __x) __ATTR_CONST__;
#define floorf floor /**< The alias for floor(). */
/**
The ceil() function returns the smallest integral value greater than
or equal to \a __x, expressed as a floating-point number.
*/
extern double ceil(double __x) __ATTR_CONST__;
#define ceilf ceil /**< The alias for ceil(). */
/**
The frexp() function breaks a floating-point number into a normalized
fraction and an integral power of 2. It stores the integer in the \c
int object pointed to by \a __pexp.
If \a __x is a normal float point number, the frexp() function
returns the value \c v, such that \c v has a magnitude in the
interval [1/2, 1) or zero, and \a __x equals \c v times 2 raised to
the power \a __pexp. If \a __x is zero, both parts of the result are
zero. If \a __x is not a finite number, the frexp() returns \a __x as
is and stores 0 by \a __pexp.
\note This implementation permits a zero pointer as a directive to
skip a storing the exponent.
*/
extern double frexp(double __x, int *__pexp);
#define frexpf frexp /**< The alias for frexp(). */
/**
The ldexp() function multiplies a floating-point number by an integral
power of 2. It returns the value of \a __x times 2 raised to the power
\a __exp.
*/
extern double ldexp(double __x, int __exp) __ATTR_CONST__;
#define ldexpf ldexp /**< The alias for ldexp(). */
/**
The exp() function returns the exponential value of \a __x.
*/
extern double exp(double __x) __ATTR_CONST__;
#define expf exp /**< The alias for exp(). */
/**
The cosh() function returns the hyperbolic cosine of \a __x.
*/
extern double cosh(double __x) __ATTR_CONST__;
#define coshf cosh /**< The alias for cosh(). */
/**
The sinh() function returns the hyperbolic sine of \a __x.
*/
extern double sinh(double __x) __ATTR_CONST__;
#define sinhf sinh /**< The alias for sinh(). */
/**
The tanh() function returns the hyperbolic tangent of \a __x.
*/
extern double tanh(double __x) __ATTR_CONST__;
#define tanhf tanh /**< The alias for tanh(). */
/**
The acos() function computes the principal value of the arc cosine of
\a __x. The returned value is in the range [0, pi] radians. A domain
error occurs for arguments not in the range [-1, +1].
*/
extern double acos(double __x) __ATTR_CONST__;
#define acosf acos /**< The alias for acos(). */
/**
The asin() function computes the principal value of the arc sine of
\a __x. The returned value is in the range [-pi/2, pi/2] radians. A
domain error occurs for arguments not in the range [-1, +1].
*/
extern double asin(double __x) __ATTR_CONST__;
#define asinf asin /**< The alias for asin(). */
/**
The atan() function computes the principal value of the arc tangent
of \a __x. The returned value is in the range [-pi/2, pi/2] radians.
*/
extern double atan(double __x) __ATTR_CONST__;
#define atanf atan /**< The alias for atan(). */
/**
The atan2() function computes the principal value of the arc tangent
of <em>__y / __x</em>, using the signs of both arguments to determine
the quadrant of the return value. The returned value is in the range
[-pi, +pi] radians.
*/
extern double atan2(double __y, double __x) __ATTR_CONST__;
#define atan2f atan2 /**< The alias for atan2(). */
/**
The log() function returns the natural logarithm of argument \a __x.
*/
extern double log(double __x) __ATTR_CONST__;
#define logf log /**< The alias for log(). */
/**
The log10() function returns the logarithm of argument \a __x to base 10.
*/
extern double log10(double __x) __ATTR_CONST__;
#define log10f log10 /**< The alias for log10(). */
/**
The function pow() returns the value of \a __x to the exponent \a __y.
*/
extern double pow(double __x, double __y) __ATTR_CONST__;
#define powf pow /**< The alias for pow(). */
/**
The function isnan() returns 1 if the argument \a __x represents a
"not-a-number" (NaN) object, otherwise 0.
*/
extern int isnan(double __x) __ATTR_CONST__;
#define isnanf isnan /**< The alias for isnan(). */
/**
The function isinf() returns 1 if the argument \a __x is positive
infinity, -1 if \a __x is negative infinity, and 0 otherwise.
\note The GCC 4.3 can replace this function with inline code that
returns the 1 value for both infinities (gcc bug #35509).
*/
extern int isinf(double __x) __ATTR_CONST__;
#define isinff isinf /**< The alias for isinf(). */
/**
The isfinite() function returns a nonzero value if \a __x is finite:
not plus or minus infinity, and not NaN.
*/
__ATTR_CONST__ static inline int isfinite (double __x)
{
unsigned char __exp;
__asm__ (
"mov %0, %C1 \n\t"
"lsl %0 \n\t"
"mov %0, %D1 \n\t"
"rol %0 "
: "=r" (__exp)
: "r" (__x) );
return __exp != 0xff;
}
#define isfinitef isfinite /**< The alias for isfinite(). */
/**
The copysign() function returns \a __x but with the sign of \a __y.
They work even if \a __x or \a __y are NaN or zero.
*/
__ATTR_CONST__ static inline double copysign (double __x, double __y)
{
__asm__ (
"bst %D2, 7 \n\t"
"bld %D0, 7 "
: "=r" (__x)
: "0" (__x), "r" (__y) );
return __x;
}
#define copysignf copysign /**< The alias for copysign(). */
/**
The signbit() function returns a nonzero value if the value of \a __x
has its sign bit set. This is not the same as `\a __x < 0.0',
because IEEE 754 floating point allows zero to be signed. The
comparison `-0.0 < 0.0' is false, but `signbit (-0.0)' will return a
nonzero value.
*/
extern int signbit (double __x) __ATTR_CONST__;
#define signbitf signbit /**< The alias for signbit(). */
/**
The fdim() function returns <em>max(__x - __y, 0)</em>. If \a __x or
\a __y or both are NaN, NaN is returned.
*/
extern double fdim (double __x, double __y) __ATTR_CONST__;
#define fdimf fdim /**< The alias for fdim(). */
/**
The fma() function performs floating-point multiply-add. This is the
operation <em>(__x * __y) + __z</em>, but the intermediate result is
not rounded to the destination type. This can sometimes improve the
precision of a calculation.
*/
extern double fma (double __x, double __y, double __z) __ATTR_CONST__;
#define fmaf fma /**< The alias for fma(). */
/**
The fmax() function returns the greater of the two values \a __x and
\a __y. If an argument is NaN, the other argument is returned. If
both arguments are NaN, NaN is returned.
*/
extern double fmax (double __x, double __y) __ATTR_CONST__;
#define fmaxf fmax /**< The alias for fmax(). */
/**
The fmin() function returns the lesser of the two values \a __x and
\a __y. If an argument is NaN, the other argument is returned. If
both arguments are NaN, NaN is returned.
*/
extern double fmin (double __x, double __y) __ATTR_CONST__;
#define fminf fmin /**< The alias for fmin(). */
/**
The trunc() function rounds \a __x to the nearest integer not larger
in absolute value.
*/
extern double trunc (double __x) __ATTR_CONST__;
#define truncf trunc /**< The alias for trunc(). */
/**
The round() function rounds \a __x to the nearest integer, but rounds
halfway cases away from zero (instead of to the nearest even integer).
Overflow is impossible.
\return The rounded value. If \a __x is an integral or infinite, \a
__x itself is returned. If \a __x is \c NaN, then \c NaN is returned.
*/
extern double round (double __x) __ATTR_CONST__;
#define roundf round /**< The alias for round(). */
/**
The lround() function rounds \a __x to the nearest integer, but rounds
halfway cases away from zero (instead of to the nearest even integer).
This function is similar to round() function, but it differs in type of
return value and in that an overflow is possible.
\return The rounded long integer value. If \a __x is not a finite number
or an overflow was, this realization returns the \c LONG_MIN value
(0x80000000).
*/
extern long lround (double __x) __ATTR_CONST__;
#define lroundf lround /**< The alias for lround(). */
/**
The lrint() function rounds \a __x to the nearest integer, rounding the
halfway cases to the even integer direction. (That is both 1.5 and 2.5
values are rounded to 2). This function is similar to rint() function,
but it differs in type of return value and in that an overflow is
possible.
\return The rounded long integer value. If \a __x is not a finite
number or an overflow was, this realization returns the \c LONG_MIN
value (0x80000000).
*/
extern long lrint (double __x) __ATTR_CONST__;
#define lrintf lrint /**< The alias for lrint(). */
#ifdef __cplusplus
}
#endif
# 459 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/math.h"
/*@}*/
#endif /* !__MATH_H */
# 462 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/math.h"
# 27 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h" 2
#if 0 /* expanded by -frewrite-includes */
#include <avr/pgmspace.h>
#endif /* expanded by -frewrite-includes */
# 28 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
# 1 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/pgmspace.h" 1
/* Copyright (c) 2002-2007 Marek Michalkiewicz
Copyright (c) 2006, Carlos Lamas
Copyright (c) 2009-2010, Jan Waclawek
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of the copyright holders nor the names of
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. */
/* $Id$ */
/*
pgmspace.h
Contributors:
Created by Marek Michalkiewicz <[email protected]>
Eric B. Weddington <[email protected]>
Wolfgang Haidinger <[email protected]> (pgm_read_dword())
Ivanov Anton <[email protected]> (pgm_read_float())
*/
/** \file */
/** \defgroup avr_pgmspace <avr/pgmspace.h>: Program Space Utilities
\code
#include <avr/io.h>
#include <avr/pgmspace.h>
\endcode
The functions in this module provide interfaces for a program to access
data stored in program space (flash memory) of the device. In order to
use these functions, the target device must support either the \c LPM or
\c ELPM instructions.
\note These functions are an attempt to provide some compatibility with
header files that come with IAR C, to make porting applications between
different compilers easier. This is not 100% compatibility though (GCC
does not have full support for multiple address spaces yet).
\note If you are working with strings which are completely based in ram,
use the standard string functions described in \ref avr_string.
\note If possible, put your constant tables in the lower 64 KB and use
pgm_read_byte_near() or pgm_read_word_near() instead of
pgm_read_byte_far() or pgm_read_word_far() since it is more efficient that
way, and you can still use the upper 64K for executable code.
All functions that are suffixed with a \c _P \e require their
arguments to be in the lower 64 KB of the flash ROM, as they do
not use ELPM instructions. This is normally not a big concern as
the linker setup arranges any program space constants declared
using the macros from this header file so they are placed right after
the interrupt vectors, and in front of any executable code. However,
it can become a problem if there are too many of these constants, or
for bootloaders on devices with more than 64 KB of ROM.
<em>All these functions will not work in that situation.</em>
\note For <b>Xmega</b> devices, make sure the NVM controller
command register (\c NVM.CMD or \c NVM_CMD) is set to 0x00 (NOP)
before using any of these functions.
*/
#ifndef __PGMSPACE_H_
#define __PGMSPACE_H_ 1
#define __need_size_t
#if 0 /* expanded by -frewrite-includes */
#include <inttypes.h>
#endif /* expanded by -frewrite-includes */
# 86 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/pgmspace.h"
# 1 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/inttypes.h" 1
/* Copyright (c) 2004,2005,2007 Joerg Wunsch
Copyright (c) 2005, Carlos Lamas
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of the copyright holders nor the names of
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. */
/* $Id$ */
#ifndef __INTTYPES_H_
#define __INTTYPES_H_
#if 0 /* expanded by -frewrite-includes */
#include <stdint.h>
#endif /* expanded by -frewrite-includes */
# 37 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/inttypes.h"
# 1 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdint.h" 1
/* Copyright (c) 2002,2004,2005 Marek Michalkiewicz
Copyright (c) 2005, Carlos Lamas
Copyright (c) 2005,2007 Joerg Wunsch
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of the copyright holders nor the names of
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. */
/* $Id$ */
/*
* ISO/IEC 9899:1999 7.18 Integer types <stdint.h>
*/
#ifndef __STDINT_H_
#define __STDINT_H_
/** \file */
/** \defgroup avr_stdint <stdint.h>: Standard Integer Types
\code #include <stdint.h> \endcode
Use [u]intN_t if you need exactly N bits.
Since these typedefs are mandated by the C99 standard, they are preferred
over rolling your own typedefs. */
/*
* __USING_MINT8 is defined to 1 if the -mint8 option is in effect.
*/
#if __INT_MAX__ == 127
# define __USING_MINT8 1
#else
# 57 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdint.h"
# define __USING_MINT8 0
#endif
# 59 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdint.h"
/* Integer types */
#if defined(__DOXYGEN__)
/* doxygen gets confused by the __attribute__ stuff */
/** \name Exact-width integer types
Integer types having exactly the specified width */
/*@{*/
/** \ingroup avr_stdint
8-bit signed type. */
typedef signed char int8_t;
/** \ingroup avr_stdint
8-bit unsigned type. */
typedef unsigned char uint8_t;
/** \ingroup avr_stdint
16-bit signed type. */
typedef signed int int16_t;
/** \ingroup avr_stdint
16-bit unsigned type. */
typedef unsigned int uint16_t;
/** \ingroup avr_stdint
32-bit signed type. */
typedef signed long int int32_t;
/** \ingroup avr_stdint
32-bit unsigned type. */
typedef unsigned long int uint32_t;
/** \ingroup avr_stdint
64-bit signed type.
\note This type is not available when the compiler
option -mint8 is in effect. */
typedef signed long long int int64_t;
/** \ingroup avr_stdint
64-bit unsigned type.
\note This type is not available when the compiler
option -mint8 is in effect. */
typedef unsigned long long int uint64_t;
/*@}*/
#else /* !defined(__DOXYGEN__) */
# 118 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdint.h"
/* actual implementation goes here */
typedef signed int int8_t __attribute__((__mode__(__QI__)));
typedef unsigned int uint8_t __attribute__((__mode__(__QI__)));
typedef signed int int16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int uint16_t __attribute__ ((__mode__ (__HI__)));
typedef signed int int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int uint32_t __attribute__ ((__mode__ (__SI__)));
#if !__USING_MINT8
typedef signed int int64_t __attribute__((__mode__(__DI__)));
typedef unsigned int uint64_t __attribute__((__mode__(__DI__)));
#endif
# 131 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdint.h"
#endif /* defined(__DOXYGEN__) */
# 133 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdint.h"
/** \name Integer types capable of holding object pointers
These allow you to declare variables of the same size as a pointer. */
/*@{*/
/** \ingroup avr_stdint
Signed pointer compatible type. */
typedef int16_t intptr_t;
/** \ingroup avr_stdint
Unsigned pointer compatible type. */
typedef uint16_t uintptr_t;
/*@}*/
/** \name Minimum-width integer types
Integer types having at least the specified width */
/*@{*/
/** \ingroup avr_stdint
signed int with at least 8 bits. */
typedef int8_t int_least8_t;
/** \ingroup avr_stdint
unsigned int with at least 8 bits. */
typedef uint8_t uint_least8_t;
/** \ingroup avr_stdint
signed int with at least 16 bits. */
typedef int16_t int_least16_t;
/** \ingroup avr_stdint
unsigned int with at least 16 bits. */
typedef uint16_t uint_least16_t;
/** \ingroup avr_stdint
signed int with at least 32 bits. */
typedef int32_t int_least32_t;
/** \ingroup avr_stdint
unsigned int with at least 32 bits. */
typedef uint32_t uint_least32_t;
#if !__USING_MINT8 || defined(__DOXYGEN__)
/** \ingroup avr_stdint
signed int with at least 64 bits.
\note This type is not available when the compiler
option -mint8 is in effect. */
typedef int64_t int_least64_t;
/** \ingroup avr_stdint
unsigned int with at least 64 bits.
\note This type is not available when the compiler
option -mint8 is in effect. */
typedef uint64_t uint_least64_t;
#endif
# 201 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdint.h"
/*@}*/
/** \name Fastest minimum-width integer types
Integer types being usually fastest having at least the specified width */
/*@{*/
/** \ingroup avr_stdint
fastest signed int with at least 8 bits. */
typedef int8_t int_fast8_t;
/** \ingroup avr_stdint
fastest unsigned int with at least 8 bits. */
typedef uint8_t uint_fast8_t;
/** \ingroup avr_stdint
fastest signed int with at least 16 bits. */
typedef int16_t int_fast16_t;
/** \ingroup avr_stdint
fastest unsigned int with at least 16 bits. */
typedef uint16_t uint_fast16_t;
/** \ingroup avr_stdint
fastest signed int with at least 32 bits. */
typedef int32_t int_fast32_t;
/** \ingroup avr_stdint
fastest unsigned int with at least 32 bits. */
typedef uint32_t uint_fast32_t;
#if !__USING_MINT8 || defined(__DOXYGEN__)
/** \ingroup avr_stdint
fastest signed int with at least 64 bits.
\note This type is not available when the compiler
option -mint8 is in effect. */
typedef int64_t int_fast64_t;
/** \ingroup avr_stdint
fastest unsigned int with at least 64 bits.
\note This type is not available when the compiler
option -mint8 is in effect. */
typedef uint64_t uint_fast64_t;
#endif
# 255 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdint.h"
/*@}*/
/** \name Greatest-width integer types
Types designating integer data capable of representing any value of
any integer type in the corresponding signed or unsigned category */
/*@{*/
#if __USING_MINT8
typedef int32_t intmax_t;
typedef uint32_t uintmax_t;
#else /* !__USING_MINT8 */
# 270 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdint.h"
/** \ingroup avr_stdint
largest signed int available. */
typedef int64_t intmax_t;
/** \ingroup avr_stdint
largest unsigned int available. */
typedef uint64_t uintmax_t;
#endif /* __USING_MINT8 */
# 280 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdint.h"
/*@}*/
/* Helping macro */
#ifndef __CONCAT
#define __CONCATenate(left, right) left ## right
#define __CONCAT(left, right) __CONCATenate(left, right)
#endif
# 288 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdint.h"
#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
/** \name Limits of specified-width integer types
C++ implementations should define these macros only when
__STDC_LIMIT_MACROS is defined before <stdint.h> is included */
/*@{*/
/** \ingroup avr_stdint
largest positive value an int8_t can hold. */
#define INT8_MAX 0x7f
/** \ingroup avr_stdint
smallest negative value an int8_t can hold. */
#define INT8_MIN (-INT8_MAX - 1)
/** \ingroup avr_stdint
largest value an uint8_t can hold. */
#define UINT8_MAX (__CONCAT(INT8_MAX, U) * 2U + 1U)
#if __USING_MINT8
#define INT16_MAX 0x7fffL
#define INT16_MIN (-INT16_MAX - 1L)
#define UINT16_MAX (__CONCAT(INT16_MAX, U) * 2UL + 1UL)
#define INT32_MAX 0x7fffffffLL
#define INT32_MIN (-INT32_MAX - 1LL)
#define UINT32_MAX (__CONCAT(INT32_MAX, U) * 2ULL + 1ULL)
#else /* !__USING_MINT8 */
# 323 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdint.h"
/** \ingroup avr_stdint
largest positive value an int16_t can hold. */
#define INT16_MAX 0x7fff
/** \ingroup avr_stdint
smallest negative value an int16_t can hold. */
#define INT16_MIN (-INT16_MAX - 1)
/** \ingroup avr_stdint
largest value an uint16_t can hold. */
#define UINT16_MAX (__CONCAT(INT16_MAX, U) * 2U + 1U)
/** \ingroup avr_stdint
largest positive value an int32_t can hold. */
#define INT32_MAX 0x7fffffffL
/** \ingroup avr_stdint
smallest negative value an int32_t can hold. */
#define INT32_MIN (-INT32_MAX - 1L)
/** \ingroup avr_stdint
largest value an uint32_t can hold. */
#define UINT32_MAX (__CONCAT(INT32_MAX, U) * 2UL + 1UL)
#endif /* __USING_MINT8 */
# 355 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdint.h"
/** \ingroup avr_stdint
largest positive value an int64_t can hold. */
#define INT64_MAX 0x7fffffffffffffffLL
/** \ingroup avr_stdint
smallest negative value an int64_t can hold. */
#define INT64_MIN (-INT64_MAX - 1LL)
/** \ingroup avr_stdint
largest value an uint64_t can hold. */
#define UINT64_MAX (__CONCAT(INT64_MAX, U) * 2ULL + 1ULL)
/*@}*/
/** \name Limits of minimum-width integer types */
/*@{*/
/** \ingroup avr_stdint
largest positive value an int_least8_t can hold. */
#define INT_LEAST8_MAX INT8_MAX
/** \ingroup avr_stdint
smallest negative value an int_least8_t can hold. */
#define INT_LEAST8_MIN INT8_MIN
/** \ingroup avr_stdint
largest value an uint_least8_t can hold. */
#define UINT_LEAST8_MAX UINT8_MAX
/** \ingroup avr_stdint
largest positive value an int_least16_t can hold. */
#define INT_LEAST16_MAX INT16_MAX
/** \ingroup avr_stdint
smallest negative value an int_least16_t can hold. */
#define INT_LEAST16_MIN INT16_MIN
/** \ingroup avr_stdint
largest value an uint_least16_t can hold. */
#define UINT_LEAST16_MAX UINT16_MAX
/** \ingroup avr_stdint
largest positive value an int_least32_t can hold. */
#define INT_LEAST32_MAX INT32_MAX
/** \ingroup avr_stdint
smallest negative value an int_least32_t can hold. */
#define INT_LEAST32_MIN INT32_MIN
/** \ingroup avr_stdint
largest value an uint_least32_t can hold. */
#define UINT_LEAST32_MAX UINT32_MAX
/** \ingroup avr_stdint
largest positive value an int_least64_t can hold. */
#define INT_LEAST64_MAX INT64_MAX
/** \ingroup avr_stdint
smallest negative value an int_least64_t can hold. */
#define INT_LEAST64_MIN INT64_MIN
/** \ingroup avr_stdint
largest value an uint_least64_t can hold. */
#define UINT_LEAST64_MAX UINT64_MAX
/*@}*/
/** \name Limits of fastest minimum-width integer types */
/*@{*/
/** \ingroup avr_stdint
largest positive value an int_fast8_t can hold. */
#define INT_FAST8_MAX INT8_MAX
/** \ingroup avr_stdint
smallest negative value an int_fast8_t can hold. */
#define INT_FAST8_MIN INT8_MIN
/** \ingroup avr_stdint
largest value an uint_fast8_t can hold. */
#define UINT_FAST8_MAX UINT8_MAX
/** \ingroup avr_stdint
largest positive value an int_fast16_t can hold. */
#define INT_FAST16_MAX INT16_MAX
/** \ingroup avr_stdint
smallest negative value an int_fast16_t can hold. */
#define INT_FAST16_MIN INT16_MIN
/** \ingroup avr_stdint
largest value an uint_fast16_t can hold. */
#define UINT_FAST16_MAX UINT16_MAX
/** \ingroup avr_stdint
largest positive value an int_fast32_t can hold. */
#define INT_FAST32_MAX INT32_MAX
/** \ingroup avr_stdint
smallest negative value an int_fast32_t can hold. */
#define INT_FAST32_MIN INT32_MIN
/** \ingroup avr_stdint
largest value an uint_fast32_t can hold. */
#define UINT_FAST32_MAX UINT32_MAX
/** \ingroup avr_stdint
largest positive value an int_fast64_t can hold. */
#define INT_FAST64_MAX INT64_MAX
/** \ingroup avr_stdint
smallest negative value an int_fast64_t can hold. */
#define INT_FAST64_MIN INT64_MIN
/** \ingroup avr_stdint
largest value an uint_fast64_t can hold. */
#define UINT_FAST64_MAX UINT64_MAX
/*@}*/
/** \name Limits of integer types capable of holding object pointers */
/*@{*/
/** \ingroup avr_stdint
largest positive value an intptr_t can hold. */
#define INTPTR_MAX INT16_MAX
/** \ingroup avr_stdint
smallest negative value an intptr_t can hold. */
#define INTPTR_MIN INT16_MIN
/** \ingroup avr_stdint
largest value an uintptr_t can hold. */
#define UINTPTR_MAX UINT16_MAX
/*@}*/
/** \name Limits of greatest-width integer types */
/*@{*/
/** \ingroup avr_stdint
largest positive value an intmax_t can hold. */
#define INTMAX_MAX INT64_MAX
/** \ingroup avr_stdint
smallest negative value an intmax_t can hold. */
#define INTMAX_MIN INT64_MIN
/** \ingroup avr_stdint
largest value an uintmax_t can hold. */
#define UINTMAX_MAX UINT64_MAX
/*@}*/
/** \name Limits of other integer types
C++ implementations should define these macros only when
__STDC_LIMIT_MACROS is defined before <stdint.h> is included */
/*@{*/
/** \ingroup avr_stdint
largest positive value a ptrdiff_t can hold. */
#define PTRDIFF_MAX INT16_MAX
/** \ingroup avr_stdint
smallest negative value a ptrdiff_t can hold. */
#define PTRDIFF_MIN INT16_MIN
/* Limits of sig_atomic_t */
/* signal.h is currently not implemented (not avr/signal.h) */
/** \ingroup avr_stdint
largest positive value a sig_atomic_t can hold. */
#define SIG_ATOMIC_MAX INT8_MAX
/** \ingroup avr_stdint
smallest negative value a sig_atomic_t can hold. */
#define SIG_ATOMIC_MIN INT8_MIN
/** \ingroup avr_stdint
largest value a size_t can hold. */
#define SIZE_MAX (__CONCAT(INT16_MAX, U))
/* Limits of wchar_t */
/* wchar.h is currently not implemented */
/* #define WCHAR_MAX */
/* #define WCHAR_MIN */
/* Limits of wint_t */
/* wchar.h is currently not implemented */
/* #define WINT_MAX */
/* #define WINT_MIN */
#endif /* !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) */
# 596 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdint.h"
#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS)
/** \name Macros for integer constants
C++ implementations should define these macros only when
__STDC_CONSTANT_MACROS is defined before <stdint.h> is included.
These definitions are valid for integer constants without suffix and
for macros defined as integer constant without suffix */
/** \ingroup avr_stdint
define a constant of type int8_t */
#define INT8_C(value) ((int8_t) value)
/** \ingroup avr_stdint
define a constant of type uint8_t */
#define UINT8_C(value) ((uint8_t) __CONCAT(value, U))
#if __USING_MINT8
#define INT16_C(value) __CONCAT(value, L)
#define UINT16_C(value) __CONCAT(value, UL)
#define INT32_C(value) ((int32_t) __CONCAT(value, LL))
#define UINT32_C(value) ((uint32_t) __CONCAT(value, ULL))
#else /* !__USING_MINT8 */
# 625 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdint.h"
/** \ingroup avr_stdint
define a constant of type int16_t */
#define INT16_C(value) value
/** \ingroup avr_stdint
define a constant of type uint16_t */
#define UINT16_C(value) __CONCAT(value, U)
/** \ingroup avr_stdint
define a constant of type int32_t */
#define INT32_C(value) __CONCAT(value, L)
/** \ingroup avr_stdint
define a constant of type uint32_t */
#define UINT32_C(value) __CONCAT(value, UL)
#endif /* __USING_MINT8 */
# 647 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdint.h"
/** \ingroup avr_stdint
define a constant of type int64_t */
#define INT64_C(value) __CONCAT(value, LL)
/** \ingroup avr_stdint
define a constant of type uint64_t */
#define UINT64_C(value) __CONCAT(value, ULL)
/** \ingroup avr_stdint
define a constant of type intmax_t */
#define INTMAX_C(value) __CONCAT(value, LL)
/** \ingroup avr_stdint
define a constant of type uintmax_t */
#define UINTMAX_C(value) __CONCAT(value, ULL)
/*@}*/
#endif /* !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) */
# 671 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdint.h"
#endif /* _STDINT_H_ */
# 674 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdint.h"
# 38 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/inttypes.h" 2
/** \file */
/** \defgroup avr_inttypes <inttypes.h>: Integer Type conversions
\code #include <inttypes.h> \endcode
This header file includes the exact-width integer definitions from
<tt><stdint.h></tt>, and extends them with additional facilities
provided by the implementation.
Currently, the extensions include two additional integer types
that could hold a "far" pointer (i.e. a code pointer that can
address more than 64 KB), as well as standard names for all printf
and scanf formatting options that are supported by the \ref avr_stdio.
As the library does not support the full range of conversion
specifiers from ISO 9899:1999, only those conversions that are
actually implemented will be listed here.
The idea behind these conversion macros is that, for each of the
types defined by <stdint.h>, a macro will be supplied that portably
allows formatting an object of that type in printf() or scanf()
operations. Example:
\code
#include <inttypes.h>
uint8_t smallval;
int32_t longval;
...
printf("The hexadecimal value of smallval is %" PRIx8
", the decimal value of longval is %" PRId32 ".\n",
smallval, longval);
\endcode
*/
/** \name Far pointers for memory access >64K */
/*@{*/
/** \ingroup avr_inttypes
signed integer type that can hold a pointer > 64 KB */
typedef int32_t int_farptr_t;
/** \ingroup avr_inttypes
unsigned integer type that can hold a pointer > 64 KB */
typedef uint32_t uint_farptr_t;
/*@}*/
#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
/** \name macros for printf and scanf format specifiers
For C++, these are only included if __STDC_LIMIT_MACROS
is defined before including <inttypes.h>.
*/
/*@{*/
/** \ingroup avr_inttypes
decimal printf format for int8_t */
#define PRId8 "d"
/** \ingroup avr_inttypes
decimal printf format for int_least8_t */
#define PRIdLEAST8 "d"
/** \ingroup avr_inttypes
decimal printf format for int_fast8_t */
#define PRIdFAST8 "d"
/** \ingroup avr_inttypes
integer printf format for int8_t */
#define PRIi8 "i"
/** \ingroup avr_inttypes
integer printf format for int_least8_t */
#define PRIiLEAST8 "i"
/** \ingroup avr_inttypes
integer printf format for int_fast8_t */
#define PRIiFAST8 "i"
/** \ingroup avr_inttypes
decimal printf format for int16_t */
#define PRId16 "d"
/** \ingroup avr_inttypes
decimal printf format for int_least16_t */
#define PRIdLEAST16 "d"
/** \ingroup avr_inttypes
decimal printf format for int_fast16_t */
#define PRIdFAST16 "d"
/** \ingroup avr_inttypes
integer printf format for int16_t */
#define PRIi16 "i"
/** \ingroup avr_inttypes
integer printf format for int_least16_t */
#define PRIiLEAST16 "i"
/** \ingroup avr_inttypes
integer printf format for int_fast16_t */
#define PRIiFAST16 "i"
/** \ingroup avr_inttypes
decimal printf format for int32_t */
#define PRId32 "ld"
/** \ingroup avr_inttypes
decimal printf format for int_least32_t */
#define PRIdLEAST32 "ld"
/** \ingroup avr_inttypes
decimal printf format for int_fast32_t */
#define PRIdFAST32 "ld"
/** \ingroup avr_inttypes
integer printf format for int32_t */
#define PRIi32 "li"
/** \ingroup avr_inttypes
integer printf format for int_least32_t */
#define PRIiLEAST32 "li"
/** \ingroup avr_inttypes
integer printf format for int_fast32_t */
#define PRIiFAST32 "li"
#ifdef __avr_libc_does_not_implement_long_long_in_printf_or_scanf
#define PRId64 "lld"
#define PRIdLEAST64 "lld"
#define PRIdFAST64 "lld"
#define PRIi64 "lli"
#define PRIiLEAST64 "lli"
#define PRIiFAST64 "lli"
#define PRIdMAX "lld"
#define PRIiMAX "lli"
#endif
# 172 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/inttypes.h"
/** \ingroup avr_inttypes
decimal printf format for intptr_t */
#define PRIdPTR PRId16
/** \ingroup avr_inttypes
integer printf format for intptr_t */
#define PRIiPTR PRIi16
/** \ingroup avr_inttypes
octal printf format for uint8_t */
#define PRIo8 "o"
/** \ingroup avr_inttypes
octal printf format for uint_least8_t */
#define PRIoLEAST8 "o"
/** \ingroup avr_inttypes
octal printf format for uint_fast8_t */
#define PRIoFAST8 "o"
/** \ingroup avr_inttypes
decimal printf format for uint8_t */
#define PRIu8 "u"
/** \ingroup avr_inttypes
decimal printf format for uint_least8_t */
#define PRIuLEAST8 "u"
/** \ingroup avr_inttypes
decimal printf format for uint_fast8_t */
#define PRIuFAST8 "u"
/** \ingroup avr_inttypes
hexadecimal printf format for uint8_t */
#define PRIx8 "x"
/** \ingroup avr_inttypes
hexadecimal printf format for uint_least8_t */
#define PRIxLEAST8 "x"
/** \ingroup avr_inttypes
hexadecimal printf format for uint_fast8_t */
#define PRIxFAST8 "x"
/** \ingroup avr_inttypes
uppercase hexadecimal printf format for uint8_t */
#define PRIX8 "X"
/** \ingroup avr_inttypes
uppercase hexadecimal printf format for uint_least8_t */
#define PRIXLEAST8 "X"
/** \ingroup avr_inttypes
uppercase hexadecimal printf format for uint_fast8_t */
#define PRIXFAST8 "X"
/** \ingroup avr_inttypes
octal printf format for uint16_t */
#define PRIo16 "o"
/** \ingroup avr_inttypes
octal printf format for uint_least16_t */
#define PRIoLEAST16 "o"
/** \ingroup avr_inttypes
octal printf format for uint_fast16_t */
#define PRIoFAST16 "o"
/** \ingroup avr_inttypes
decimal printf format for uint16_t */
#define PRIu16 "u"
/** \ingroup avr_inttypes
decimal printf format for uint_least16_t */
#define PRIuLEAST16 "u"
/** \ingroup avr_inttypes
decimal printf format for uint_fast16_t */
#define PRIuFAST16 "u"
/** \ingroup avr_inttypes
hexadecimal printf format for uint16_t */
#define PRIx16 "x"
/** \ingroup avr_inttypes
hexadecimal printf format for uint_least16_t */
#define PRIxLEAST16 "x"
/** \ingroup avr_inttypes
hexadecimal printf format for uint_fast16_t */
#define PRIxFAST16 "x"
/** \ingroup avr_inttypes
uppercase hexadecimal printf format for uint16_t */
#define PRIX16 "X"
/** \ingroup avr_inttypes
uppercase hexadecimal printf format for uint_least16_t */
#define PRIXLEAST16 "X"
/** \ingroup avr_inttypes
uppercase hexadecimal printf format for uint_fast16_t */
#define PRIXFAST16 "X"
/** \ingroup avr_inttypes
octal printf format for uint32_t */
#define PRIo32 "lo"
/** \ingroup avr_inttypes
octal printf format for uint_least32_t */
#define PRIoLEAST32 "lo"
/** \ingroup avr_inttypes
octal printf format for uint_fast32_t */
#define PRIoFAST32 "lo"
/** \ingroup avr_inttypes
decimal printf format for uint32_t */
#define PRIu32 "lu"
/** \ingroup avr_inttypes
decimal printf format for uint_least32_t */
#define PRIuLEAST32 "lu"
/** \ingroup avr_inttypes
decimal printf format for uint_fast32_t */
#define PRIuFAST32 "lu"
/** \ingroup avr_inttypes
hexadecimal printf format for uint32_t */
#define PRIx32 "lx"
/** \ingroup avr_inttypes
hexadecimal printf format for uint_least32_t */
#define PRIxLEAST32 "lx"
/** \ingroup avr_inttypes
hexadecimal printf format for uint_fast32_t */
#define PRIxFAST32 "lx"
/** \ingroup avr_inttypes
uppercase hexadecimal printf format for uint32_t */
#define PRIX32 "lX"
/** \ingroup avr_inttypes
uppercase hexadecimal printf format for uint_least32_t */
#define PRIXLEAST32 "lX"
/** \ingroup avr_inttypes
uppercase hexadecimal printf format for uint_fast32_t */
#define PRIXFAST32 "lX"
#ifdef __avr_libc_does_not_implement_long_long_in_printf_or_scanf
#define PRIo64 "llo"
#define PRIoLEAST64 "llo"
#define PRIoFAST64 "llo"
#define PRIu64 "llu"
#define PRIuLEAST64 "llu"
#define PRIuFAST64 "llu"
#define PRIx64 "llx"
#define PRIxLEAST64 "llx"
#define PRIxFAST64 "llx"
#define PRIX64 "llX"
#define PRIXLEAST64 "llX"
#define PRIXFAST64 "llX"
#define PRIoMAX "llo"
#define PRIuMAX "llu"
#define PRIxMAX "llx"
#define PRIXMAX "llX"
#endif
# 327 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/inttypes.h"
/** \ingroup avr_inttypes
octal printf format for uintptr_t */
#define PRIoPTR PRIo16
/** \ingroup avr_inttypes
decimal printf format for uintptr_t */
#define PRIuPTR PRIu16
/** \ingroup avr_inttypes
hexadecimal printf format for uintptr_t */
#define PRIxPTR PRIx16
/** \ingroup avr_inttypes
uppercase hexadecimal printf format for uintptr_t */
#define PRIXPTR PRIX16
#ifdef __avr_libc_does_not_implement_hh_in_scanf
#define SCNd8 "hhd"
#define SCNdLEAST8 "hhd"
#define SCNdFAST8 "hhd"
#define SCNi8 "hhi"
#define SCNiLEAST8 "hhi"
#define SCNiFAST8 "hhi"
#endif
# 353 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/inttypes.h"
/** \ingroup avr_inttypes
decimal scanf format for int16_t */
#define SCNd16 "d"
/** \ingroup avr_inttypes
decimal scanf format for int_least16_t */
#define SCNdLEAST16 "d"
/** \ingroup avr_inttypes
decimal scanf format for int_fast16_t */
#define SCNdFAST16 "d"
/** \ingroup avr_inttypes
generic-integer scanf format for int16_t */
#define SCNi16 "i"
/** \ingroup avr_inttypes
generic-integer scanf format for int_least16_t */
#define SCNiLEAST16 "i"
/** \ingroup avr_inttypes
generic-integer scanf format for int_fast16_t */
#define SCNiFAST16 "i"
/** \ingroup avr_inttypes
decimal scanf format for int32_t */
#define SCNd32 "ld"
/** \ingroup avr_inttypes
decimal scanf format for int_least32_t */
#define SCNdLEAST32 "ld"
/** \ingroup avr_inttypes
decimal scanf format for int_fast32_t */
#define SCNdFAST32 "ld"
/** \ingroup avr_inttypes
generic-integer scanf format for int32_t */
#define SCNi32 "li"
/** \ingroup avr_inttypes
generic-integer scanf format for int_least32_t */
#define SCNiLEAST32 "li"
/** \ingroup avr_inttypes
generic-integer scanf format for int_fast32_t */
#define SCNiFAST32 "li"
#ifdef __avr_libc_does_not_implement_long_long_in_printf_or_scanf
#define SCNd64 "lld"
#define SCNdLEAST64 "lld"
#define SCNdFAST64 "lld"
#define SCNi64 "lli"
#define SCNiLEAST64 "lli"
#define SCNiFAST64 "lli"
#define SCNdMAX "lld"
#define SCNiMAX "lli"
#endif
# 411 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/inttypes.h"
/** \ingroup avr_inttypes
decimal scanf format for intptr_t */
#define SCNdPTR SCNd16
/** \ingroup avr_inttypes
generic-integer scanf format for intptr_t */
#define SCNiPTR SCNi16
#ifdef __avr_libc_does_not_implement_hh_in_scanf
#define SCNo8 "hho"
#define SCNoLEAST8 "hho"
#define SCNoFAST8 "hho"
#define SCNu8 "hhu"
#define SCNuLEAST8 "hhu"
#define SCNuFAST8 "hhu"
#define SCNx8 "hhx"
#define SCNxLEAST8 "hhx"
#define SCNxFAST8 "hhx"
#endif
# 434 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/inttypes.h"
/** \ingroup avr_inttypes
octal scanf format for uint16_t */
#define SCNo16 "o"
/** \ingroup avr_inttypes
octal scanf format for uint_least16_t */
#define SCNoLEAST16 "o"
/** \ingroup avr_inttypes
octal scanf format for uint_fast16_t */
#define SCNoFAST16 "o"
/** \ingroup avr_inttypes
decimal scanf format for uint16_t */
#define SCNu16 "u"
/** \ingroup avr_inttypes
decimal scanf format for uint_least16_t */
#define SCNuLEAST16 "u"
/** \ingroup avr_inttypes
decimal scanf format for uint_fast16_t */
#define SCNuFAST16 "u"
/** \ingroup avr_inttypes
hexadecimal scanf format for uint16_t */
#define SCNx16 "x"
/** \ingroup avr_inttypes
hexadecimal scanf format for uint_least16_t */
#define SCNxLEAST16 "x"
/** \ingroup avr_inttypes
hexadecimal scanf format for uint_fast16_t */
#define SCNxFAST16 "x"
/** \ingroup avr_inttypes
octal scanf format for uint32_t */
#define SCNo32 "lo"
/** \ingroup avr_inttypes
octal scanf format for uint_least32_t */
#define SCNoLEAST32 "lo"
/** \ingroup avr_inttypes
octal scanf format for uint_fast32_t */
#define SCNoFAST32 "lo"
/** \ingroup avr_inttypes
decimal scanf format for uint32_t */
#define SCNu32 "lu"
/** \ingroup avr_inttypes
decimal scanf format for uint_least32_t */
#define SCNuLEAST32 "lu"
/** \ingroup avr_inttypes
decimal scanf format for uint_fast32_t */
#define SCNuFAST32 "lu"
/** \ingroup avr_inttypes
hexadecimal scanf format for uint32_t */
#define SCNx32 "lx"
/** \ingroup avr_inttypes
hexadecimal scanf format for uint_least32_t */
#define SCNxLEAST32 "lx"
/** \ingroup avr_inttypes
hexadecimal scanf format for uint_fast32_t */
#define SCNxFAST32 "lx"
#ifdef __avr_libc_does_not_implement_long_long_in_printf_or_scanf
#define SCNo64 "llo"
#define SCNoLEAST64 "llo"
#define SCNoFAST64 "llo"
#define SCNu64 "llu"
#define SCNuLEAST64 "llu"
#define SCNuFAST64 "llu"
#define SCNx64 "llx"
#define SCNxLEAST64 "llx"
#define SCNxFAST64 "llx"
#define SCNoMAX "llo"
#define SCNuMAX "llu"
#define SCNxMAX "llx"
#endif
# 516 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/inttypes.h"
/** \ingroup avr_inttypes
octal scanf format for uintptr_t */
#define SCNoPTR SCNo16
/** \ingroup avr_inttypes
decimal scanf format for uintptr_t */
#define SCNuPTR SCNu16
/** \ingroup avr_inttypes
hexadecimal scanf format for uintptr_t */
#define SCNxPTR SCNx16
/*@}*/
#endif /* !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) */
# 531 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/inttypes.h"
#endif /* __INTTYPES_H_ */
# 534 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/inttypes.h"
# 87 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/pgmspace.h" 2
#if 0 /* expanded by -frewrite-includes */
#include <stddef.h>
#endif /* expanded by -frewrite-includes */
# 87 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/pgmspace.h"
# 1 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 1 3 4
/*===---- stddef.h - Basic type definitions --------------------------------===
*
* Copyright (c) 2008 Eli Friedman
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*===-----------------------------------------------------------------------===
*/
#if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \
defined(__need_size_t) || defined(__need_wchar_t) || \
defined(__need_NULL) || defined(__need_wint_t)
#if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \
!defined(__need_wchar_t) && !defined(__need_NULL) && \
!defined(__need_wint_t)
/* Always define miscellaneous pieces when modules are available. */
#if !__has_feature(modules)
#define __STDDEF_H
#endif
# 37 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#define __need_ptrdiff_t
#define __need_size_t
#define __need_wchar_t
#define __need_NULL
#define __need_STDDEF_H_misc
/* __need_wint_t is intentionally not defined here. */
#endif
# 44 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#if defined(__need_ptrdiff_t)
#if !defined(_PTRDIFF_T) || __has_feature(modules)
/* Always define ptrdiff_t when modules are available. */
#if !__has_feature(modules)
#define _PTRDIFF_T
#endif
# 51 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
typedef __PTRDIFF_TYPE__ ptrdiff_t;
#endif
# 53 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#undef __need_ptrdiff_t
#endif /* defined(__need_ptrdiff_t) */
# 55 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#if defined(__need_size_t)
#if !defined(_SIZE_T) || __has_feature(modules)
/* Always define size_t when modules are available. */
#if !__has_feature(modules)
#define _SIZE_T
#endif
# 62 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
typedef __SIZE_TYPE__ size_t;
#endif
# 64 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#undef __need_size_t
#endif /*defined(__need_size_t) */
# 66 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#if defined(__need_STDDEF_H_misc)
/* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is
* enabled. */
#if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \
!defined(_RSIZE_T)) || __has_feature(modules)
/* Always define rsize_t when modules are available. */
#if !__has_feature(modules)
#define _RSIZE_T
#endif
# 76 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
typedef __SIZE_TYPE__ rsize_t;
#endif
# 78 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#endif /* defined(__need_STDDEF_H_misc) */
# 79 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#if defined(__need_wchar_t)
#ifndef __cplusplus
/* Always define wchar_t when modules are available. */
#if !defined(_WCHAR_T) || __has_feature(modules)
#if !__has_feature(modules)
#define _WCHAR_T
#if defined(_MSC_EXTENSIONS)
#define _WCHAR_T_DEFINED
#endif
# 89 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#endif
# 90 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
typedef __WCHAR_TYPE__ wchar_t;
#endif
# 92 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#endif
# 93 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#undef __need_wchar_t
#endif /* defined(__need_wchar_t) */
# 95 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#if defined(__need_NULL)
#undef NULL
#ifdef __cplusplus
# if !defined(__MINGW32__) && !defined(_MSC_VER)
# define NULL __null
# else
# 102 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
# define NULL 0
# endif
# 104 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#else
# 105 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
# define NULL ((void*)0)
#endif
# 107 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#ifdef __cplusplus
#if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED)
namespace std { typedef decltype(nullptr) nullptr_t; }
using ::std::nullptr_t;
#endif
# 112 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#endif
# 113 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#undef __need_NULL
#endif /* defined(__need_NULL) */
# 115 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#if defined(__need_STDDEF_H_misc)
#if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L
#if 0 /* expanded by -frewrite-includes */
#include "__stddef_max_align_t.h"
#endif /* expanded by -frewrite-includes */
# 118 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
# 119 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#endif
# 120 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#define offsetof(t, d) __builtin_offsetof(t, d)
#undef __need_STDDEF_H_misc
#endif /* defined(__need_STDDEF_H_misc) */
# 123 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
/* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use
__WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */
#if defined(__need_wint_t)
/* Always define wint_t when modules are available. */
#if !defined(_WINT_T) || __has_feature(modules)
#if !__has_feature(modules)
#define _WINT_T
#endif
# 132 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
typedef __WINT_TYPE__ wint_t;
#endif
# 134 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#undef __need_wint_t
#endif /* __need_wint_t */
# 136 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#endif
# 138 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
# 88 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/pgmspace.h" 2
#if 0 /* expanded by -frewrite-includes */
#include <avr/io.h>
#endif /* expanded by -frewrite-includes */
# 88 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/pgmspace.h"
# 1 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h" 1
/* Copyright (c) 2002,2003,2005,2006,2007 Marek Michalkiewicz, Joerg Wunsch
Copyright (c) 2007 Eric B. Weddington
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of the copyright holders nor the names of
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. */
/* $Id$ */
/** \file */
/** \defgroup avr_io <avr/io.h>: AVR device-specific IO definitions
\code #include <avr/io.h> \endcode
This header file includes the apropriate IO definitions for the
device that has been specified by the <tt>-mmcu=</tt> compiler
command-line switch. This is done by diverting to the appropriate
file <tt>&lt;avr/io</tt><em>XXXX</em><tt>.h&gt;</tt> which should
never be included directly. Some register names common to all
AVR devices are defined directly within <tt>&lt;avr/common.h&gt;</tt>,
which is included in <tt>&lt;avr/io.h&gt;</tt>,
but most of the details come from the respective include file.
Note that this file always includes the following files:
\code
#include <avr/sfr_defs.h>
#include <avr/portpins.h>
#include <avr/common.h>
#include <avr/version.h>
\endcode
See \ref avr_sfr for more details about that header file.
Included are definitions of the IO register set and their
respective bit values as specified in the Atmel documentation.
Note that inconsistencies in naming conventions,
so even identical functions sometimes get different names on
different devices.
Also included are the specific names useable for interrupt
function definitions as documented
\ref avr_signames "here".
Finally, the following macros are defined:
- \b RAMEND
<br>
The last on-chip RAM address.
<br>
- \b XRAMEND
<br>
The last possible RAM location that is addressable. This is equal to
RAMEND for devices that do not allow for external RAM. For devices
that allow external RAM, this will be larger than RAMEND.
<br>
- \b E2END
<br>
The last EEPROM address.
<br>
- \b FLASHEND
<br>
The last byte address in the Flash program space.
<br>
- \b SPM_PAGESIZE
<br>
For devices with bootloader support, the flash pagesize
(in bytes) to be used for the \c SPM instruction.
- \b E2PAGESIZE
<br>
The size of the EEPROM page.
*/
#ifndef _AVR_IO_H_
#define _AVR_IO_H_
#if 0 /* expanded by -frewrite-includes */
#include <avr/sfr_defs.h>
#endif /* expanded by -frewrite-includes */
# 99 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 1 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/sfr_defs.h" 1
/* Copyright (c) 2002, Marek Michalkiewicz <[email protected]>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of the copyright holders nor the names of
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. */
/* avr/sfr_defs.h - macros for accessing AVR special function registers */
/* $Id$ */
#ifndef _AVR_SFR_DEFS_H_
#define _AVR_SFR_DEFS_H_ 1
/** \defgroup avr_sfr_notes Additional notes from <avr/sfr_defs.h>
\ingroup avr_sfr
The \c <avr/sfr_defs.h> file is included by all of the \c <avr/ioXXXX.h>
files, which use macros defined here to make the special function register
definitions look like C variables or simple constants, depending on the
<tt>_SFR_ASM_COMPAT</tt> define. Some examples from \c <avr/iocanxx.h> to
show how to define such macros:
\code
#define PORTA _SFR_IO8(0x02)
#define EEAR _SFR_IO16(0x21)
#define UDR0 _SFR_MEM8(0xC6)
#define TCNT3 _SFR_MEM16(0x94)
#define CANIDT _SFR_MEM32(0xF0)
\endcode
If \c _SFR_ASM_COMPAT is not defined, C programs can use names like
<tt>PORTA</tt> directly in C expressions (also on the left side of
assignment operators) and GCC will do the right thing (use short I/O
instructions if possible). The \c __SFR_OFFSET definition is not used in
any way in this case.
Define \c _SFR_ASM_COMPAT as 1 to make these names work as simple constants
(addresses of the I/O registers). This is necessary when included in
preprocessed assembler (*.S) source files, so it is done automatically if
\c __ASSEMBLER__ is defined. By default, all addresses are defined as if
they were memory addresses (used in \c lds/sts instructions). To use these
addresses in \c in/out instructions, you must subtract 0x20 from them.
For more backwards compatibility, insert the following at the start of your
old assembler source file:
\code
#define __SFR_OFFSET 0
\endcode
This automatically subtracts 0x20 from I/O space addresses, but it's a
hack, so it is recommended to change your source: wrap such addresses in
macros defined here, as shown below. After this is done, the
<tt>__SFR_OFFSET</tt> definition is no longer necessary and can be removed.
Real example - this code could be used in a boot loader that is portable
between devices with \c SPMCR at different addresses.
\verbatim
<avr/iom163.h>: #define SPMCR _SFR_IO8(0x37)
<avr/iom128.h>: #define SPMCR _SFR_MEM8(0x68)
\endverbatim
\code
#if _SFR_IO_REG_P(SPMCR)
out _SFR_IO_ADDR(SPMCR), r24
#else
sts _SFR_MEM_ADDR(SPMCR), r24
#endif
\endcode
You can use the \c in/out/cbi/sbi/sbic/sbis instructions, without the
<tt>_SFR_IO_REG_P</tt> test, if you know that the register is in the I/O
space (as with \c SREG, for example). If it isn't, the assembler will
complain (I/O address out of range 0...0x3f), so this should be fairly
safe.
If you do not define \c __SFR_OFFSET (so it will be 0x20 by default), all
special register addresses are defined as memory addresses (so \c SREG is
0x5f), and (if code size and speed are not important, and you don't like
the ugly \#if above) you can always use lds/sts to access them. But, this
will not work if <tt>__SFR_OFFSET</tt> != 0x20, so use a different macro
(defined only if <tt>__SFR_OFFSET</tt> == 0x20) for safety:
\code
sts _SFR_ADDR(SPMCR), r24
\endcode
In C programs, all 3 combinations of \c _SFR_ASM_COMPAT and
<tt>__SFR_OFFSET</tt> are supported - the \c _SFR_ADDR(SPMCR) macro can be
used to get the address of the \c SPMCR register (0x57 or 0x68 depending on
device). */
#ifdef __ASSEMBLER__
#define _SFR_ASM_COMPAT 1
#elif !defined(_SFR_ASM_COMPAT)
# 121 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/sfr_defs.h"
#define _SFR_ASM_COMPAT 0
#endif
# 123 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/sfr_defs.h"
#ifndef __ASSEMBLER__
/* These only work in C programs. */
#if 0 /* expanded by -frewrite-includes */
#include <inttypes.h>
#endif /* expanded by -frewrite-includes */
# 126 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/sfr_defs.h"
# 127 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/sfr_defs.h"
#define _MMIO_BYTE(mem_addr) (*(volatile uint8_t *)(mem_addr))
#define _MMIO_WORD(mem_addr) (*(volatile uint16_t *)(mem_addr))
#define _MMIO_DWORD(mem_addr) (*(volatile uint32_t *)(mem_addr))
#endif
# 132 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/sfr_defs.h"
#if _SFR_ASM_COMPAT
#ifndef __SFR_OFFSET
/* Define as 0 before including this file for compatibility with old asm
sources that don't subtract __SFR_OFFSET from symbolic I/O addresses. */
# if __AVR_ARCH__ >= 100
# define __SFR_OFFSET 0x00
# else
# 141 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/sfr_defs.h"
# define __SFR_OFFSET 0x20
# endif
# 143 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/sfr_defs.h"
#endif
# 144 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/sfr_defs.h"
#if (__SFR_OFFSET != 0) && (__SFR_OFFSET != 0x20)
#error "__SFR_OFFSET must be 0 or 0x20"
#endif
# 148 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/sfr_defs.h"
#define _SFR_MEM8(mem_addr) (mem_addr)
#define _SFR_MEM16(mem_addr) (mem_addr)
#define _SFR_MEM32(mem_addr) (mem_addr)
#define _SFR_IO8(io_addr) ((io_addr) + __SFR_OFFSET)
#define _SFR_IO16(io_addr) ((io_addr) + __SFR_OFFSET)
#define _SFR_IO_ADDR(sfr) ((sfr) - __SFR_OFFSET)
#define _SFR_MEM_ADDR(sfr) (sfr)
#define _SFR_IO_REG_P(sfr) ((sfr) < 0x40 + __SFR_OFFSET)
#if (__SFR_OFFSET == 0x20)
/* No need to use ?: operator, so works in assembler too. */
#define _SFR_ADDR(sfr) _SFR_MEM_ADDR(sfr)
#elif !defined(__ASSEMBLER__)
# 163 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/sfr_defs.h"
#define _SFR_ADDR(sfr) (_SFR_IO_REG_P(sfr) ? (_SFR_IO_ADDR(sfr) + 0x20) : _SFR_MEM_ADDR(sfr))
#endif
# 165 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/sfr_defs.h"
#else /* !_SFR_ASM_COMPAT */
# 167 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/sfr_defs.h"
#ifndef __SFR_OFFSET
# if __AVR_ARCH__ >= 100
# define __SFR_OFFSET 0x00
# else
# 172 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/sfr_defs.h"
# define __SFR_OFFSET 0x20
# endif
# 174 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/sfr_defs.h"
#endif
# 175 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/sfr_defs.h"
#define _SFR_MEM8(mem_addr) _MMIO_BYTE(mem_addr)
#define _SFR_MEM16(mem_addr) _MMIO_WORD(mem_addr)
#define _SFR_MEM32(mem_addr) _MMIO_DWORD(mem_addr)
#define _SFR_IO8(io_addr) _MMIO_BYTE((io_addr) + __SFR_OFFSET)
#define _SFR_IO16(io_addr) _MMIO_WORD((io_addr) + __SFR_OFFSET)
#define _SFR_MEM_ADDR(sfr) ((uint16_t) &(sfr))
#define _SFR_IO_ADDR(sfr) (_SFR_MEM_ADDR(sfr) - __SFR_OFFSET)
#define _SFR_IO_REG_P(sfr) (_SFR_MEM_ADDR(sfr) < 0x40 + __SFR_OFFSET)
#define _SFR_ADDR(sfr) _SFR_MEM_ADDR(sfr)
#endif /* !_SFR_ASM_COMPAT */
# 189 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/sfr_defs.h"
#define _SFR_BYTE(sfr) _MMIO_BYTE(_SFR_ADDR(sfr))
#define _SFR_WORD(sfr) _MMIO_WORD(_SFR_ADDR(sfr))
#define _SFR_DWORD(sfr) _MMIO_DWORD(_SFR_ADDR(sfr))
/** \name Bit manipulation */
/*@{*/
/** \def _BV
\ingroup avr_sfr
\code #include <avr/io.h>\endcode
Converts a bit number into a byte value.
\note The bit shift is performed by the compiler which then inserts the
result into the code. Thus, there is no run-time overhead when using
_BV(). */
#define _BV(bit) (1 << (bit))
/*@}*/
#ifndef _VECTOR
#define _VECTOR(N) __vector_ ## N
#endif
# 215 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/sfr_defs.h"
#ifndef __ASSEMBLER__
/** \name IO register bit manipulation */
/*@{*/
/** \def bit_is_set
\ingroup avr_sfr
\code #include <avr/io.h>\endcode
Test whether bit \c bit in IO register \c sfr is set.
This will return a 0 if the bit is clear, and non-zero
if the bit is set. */
#define bit_is_set(sfr, bit) (_SFR_BYTE(sfr) & _BV(bit))
/** \def bit_is_clear
\ingroup avr_sfr
\code #include <avr/io.h>\endcode
Test whether bit \c bit in IO register \c sfr is clear.
This will return non-zero if the bit is clear, and a 0
if the bit is set. */
#define bit_is_clear(sfr, bit) (!(_SFR_BYTE(sfr) & _BV(bit)))
/** \def loop_until_bit_is_set
\ingroup avr_sfr
\code #include <avr/io.h>\endcode
Wait until bit \c bit in IO register \c sfr is set. */
#define loop_until_bit_is_set(sfr, bit) do { } while (bit_is_clear(sfr, bit))
/** \def loop_until_bit_is_clear
\ingroup avr_sfr
\code #include <avr/io.h>\endcode
Wait until bit \c bit in IO register \c sfr is clear. */
#define loop_until_bit_is_clear(sfr, bit) do { } while (bit_is_set(sfr, bit))
/*@}*/
#endif /* !__ASSEMBLER__ */
# 268 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/sfr_defs.h"
#endif /* _SFR_DEFS_H_ */
# 270 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/sfr_defs.h"
# 100 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h" 2
#if defined (__AVR_AT94K__)
#if 0 /* expanded by -frewrite-includes */
# include <avr/ioat94k.h>
#endif /* expanded by -frewrite-includes */
# 102 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 103 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_AT43USB320__)
# 104 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/io43u32x.h>
#endif /* expanded by -frewrite-includes */
# 104 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 105 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_AT43USB355__)
# 106 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/io43u35x.h>
#endif /* expanded by -frewrite-includes */
# 106 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 107 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_AT76C711__)
# 108 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/io76c711.h>
#endif /* expanded by -frewrite-includes */
# 108 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 109 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_AT86RF401__)
# 110 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/io86r401.h>
#endif /* expanded by -frewrite-includes */
# 110 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 111 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_AT90PWM1__)
# 112 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/io90pwm1.h>
#endif /* expanded by -frewrite-includes */
# 112 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 113 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_AT90PWM2__)
# 114 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/io90pwmx.h>
#endif /* expanded by -frewrite-includes */
# 114 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 115 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_AT90PWM2B__)
# 116 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/io90pwm2b.h>
#endif /* expanded by -frewrite-includes */
# 116 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 117 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_AT90PWM3__)
# 118 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/io90pwmx.h>
#endif /* expanded by -frewrite-includes */
# 118 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 119 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_AT90PWM3B__)
# 120 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/io90pwm3b.h>
#endif /* expanded by -frewrite-includes */
# 120 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 121 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_AT90PWM216__)
# 122 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/io90pwm216.h>
#endif /* expanded by -frewrite-includes */
# 122 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 123 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_AT90PWM316__)
# 124 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/io90pwm316.h>
#endif /* expanded by -frewrite-includes */
# 124 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 125 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_AT90PWM161__)
# 126 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/io90pwm161.h>
#endif /* expanded by -frewrite-includes */
# 126 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 127 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_AT90PWM81__)
# 128 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/io90pwm81.h>
#endif /* expanded by -frewrite-includes */
# 128 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 129 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega8U2__)
# 130 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom8u2.h>
#endif /* expanded by -frewrite-includes */
# 130 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 131 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega16M1__)
# 132 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom16m1.h>
#endif /* expanded by -frewrite-includes */
# 132 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 133 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega16U2__)
# 134 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom16u2.h>
#endif /* expanded by -frewrite-includes */
# 134 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 135 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega16U4__)
# 136 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom16u4.h>
#endif /* expanded by -frewrite-includes */
# 136 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 137 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega32C1__)
# 138 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom32c1.h>
#endif /* expanded by -frewrite-includes */
# 138 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 139 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega32M1__)
# 140 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom32m1.h>
#endif /* expanded by -frewrite-includes */
# 140 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 141 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega32U2__)
# 142 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom32u2.h>
#endif /* expanded by -frewrite-includes */
# 142 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 143 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega32U4__)
# 144 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom32u4.h>
#endif /* expanded by -frewrite-includes */
# 144 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 145 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega32U6__)
# 146 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom32u6.h>
#endif /* expanded by -frewrite-includes */
# 146 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 147 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega64C1__)
# 148 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom64c1.h>
#endif /* expanded by -frewrite-includes */
# 148 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 149 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega64M1__)
# 150 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom64m1.h>
#endif /* expanded by -frewrite-includes */
# 150 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 151 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega128__)
# 152 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom128.h>
#endif /* expanded by -frewrite-includes */
# 152 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 153 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega128A__)
# 154 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom128a.h>
#endif /* expanded by -frewrite-includes */
# 154 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 155 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega1280__)
# 156 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom1280.h>
#endif /* expanded by -frewrite-includes */
# 156 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 157 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega1281__)
# 158 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom1281.h>
#endif /* expanded by -frewrite-includes */
# 158 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 159 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega1284__)
# 160 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom1284.h>
#endif /* expanded by -frewrite-includes */
# 160 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 161 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega1284P__)
# 162 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom1284p.h>
#endif /* expanded by -frewrite-includes */
# 162 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 163 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega128RFA1__)
# 164 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom128rfa1.h>
#endif /* expanded by -frewrite-includes */
# 164 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 165 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega128RFR2__)
# 166 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom128rfr2.h>
#endif /* expanded by -frewrite-includes */
# 166 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 167 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega1284RFR2__)
# 168 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom1284rfr2.h>
#endif /* expanded by -frewrite-includes */
# 168 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 169 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega256RFR2__)
# 170 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom256rfr2.h>
#endif /* expanded by -frewrite-includes */
# 170 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 171 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega2564RFR2__)
# 172 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom2564rfr2.h>
#endif /* expanded by -frewrite-includes */
# 172 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 173 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega2560__)
# 174 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom2560.h>
#endif /* expanded by -frewrite-includes */
# 174 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 175 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega2561__)
# 176 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom2561.h>
#endif /* expanded by -frewrite-includes */
# 176 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 177 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_AT90CAN32__)
# 178 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iocan32.h>
#endif /* expanded by -frewrite-includes */
# 178 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 179 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_AT90CAN64__)
# 180 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iocan64.h>
#endif /* expanded by -frewrite-includes */
# 180 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 181 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_AT90CAN128__)
# 182 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iocan128.h>
#endif /* expanded by -frewrite-includes */
# 182 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 183 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_AT90USB82__)
# 184 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iousb82.h>
#endif /* expanded by -frewrite-includes */
# 184 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 185 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_AT90USB162__)
# 186 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iousb162.h>
#endif /* expanded by -frewrite-includes */
# 186 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 187 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_AT90USB646__)
# 188 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iousb646.h>
#endif /* expanded by -frewrite-includes */
# 188 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 189 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_AT90USB647__)
# 190 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iousb647.h>
#endif /* expanded by -frewrite-includes */
# 190 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 191 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_AT90USB1286__)
# 192 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iousb1286.h>
#endif /* expanded by -frewrite-includes */
# 192 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 193 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_AT90USB1287__)
# 194 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iousb1287.h>
#endif /* expanded by -frewrite-includes */
# 194 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 195 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega64RFR2__)
# 196 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom64rfr2.h>
#endif /* expanded by -frewrite-includes */
# 196 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 197 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega644RFR2__)
# 198 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom644rfr2.h>
#endif /* expanded by -frewrite-includes */
# 198 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 199 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega64__)
# 200 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom64.h>
#endif /* expanded by -frewrite-includes */
# 200 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 201 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega64A__)
# 202 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom64a.h>
#endif /* expanded by -frewrite-includes */
# 202 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 203 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega640__)
# 204 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom640.h>
#endif /* expanded by -frewrite-includes */
# 204 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 205 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega644__)
# 206 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom644.h>
#endif /* expanded by -frewrite-includes */
# 206 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 207 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif (defined __AVR_ATmega644A__)
# 208 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
#include <avr/iom644a.h>
#endif /* expanded by -frewrite-includes */
# 208 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 209 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega644P__)
# 210 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom644p.h>
#endif /* expanded by -frewrite-includes */
# 210 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 211 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega644PA__)
# 212 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom644pa.h>
#endif /* expanded by -frewrite-includes */
# 212 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 213 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega645__)
# 214 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom645.h>
#endif /* expanded by -frewrite-includes */
# 214 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 215 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif (defined __AVR_ATmega645A__)
# 216 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
#include <avr/iom645a.h>
#endif /* expanded by -frewrite-includes */
# 216 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 217 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif (defined __AVR_ATmega645P__)
# 218 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
#include <avr/iom645p.h>
#endif /* expanded by -frewrite-includes */
# 218 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 219 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega6450__)
# 220 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom6450.h>
#endif /* expanded by -frewrite-includes */
# 220 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 221 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif (defined __AVR_ATmega6450A__)
# 222 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
#include <avr/iom6450a.h>
#endif /* expanded by -frewrite-includes */
# 222 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 223 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif (defined __AVR_ATmega6450P__)
# 224 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
#include <avr/iom6450p.h>
#endif /* expanded by -frewrite-includes */
# 224 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 225 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega649__)
# 226 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom649.h>
#endif /* expanded by -frewrite-includes */
# 226 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 227 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif (defined __AVR_ATmega649A__)
# 228 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
#include <avr/iom649a.h>
#endif /* expanded by -frewrite-includes */
# 228 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 229 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega6490__)
# 230 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom6490.h>
#endif /* expanded by -frewrite-includes */
# 230 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 231 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif (defined __AVR_ATmega6490A__)
# 232 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
#include <avr/iom6490a.h>
#endif /* expanded by -frewrite-includes */
# 232 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 233 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif (defined __AVR_ATmega6490P__)
# 234 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
#include <avr/iom6490p.h>
#endif /* expanded by -frewrite-includes */
# 234 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 235 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega649P__)
# 236 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom649p.h>
#endif /* expanded by -frewrite-includes */
# 236 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 237 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega64HVE__)
# 238 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom64hve.h>
#endif /* expanded by -frewrite-includes */
# 238 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 239 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega64HVE2__)
# 240 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom64hve2.h>
#endif /* expanded by -frewrite-includes */
# 240 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 241 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega103__)
# 242 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom103.h>
#endif /* expanded by -frewrite-includes */
# 242 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 243 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega32__)
# 244 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom32.h>
#endif /* expanded by -frewrite-includes */
# 244 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 245 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega32A__)
# 246 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom32a.h>
#endif /* expanded by -frewrite-includes */
# 246 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 247 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega323__)
# 248 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom323.h>
#endif /* expanded by -frewrite-includes */
# 248 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 249 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega324P__)
# 250 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom324p.h>
#endif /* expanded by -frewrite-includes */
# 250 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 251 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif (defined __AVR_ATmega324A__)
# 252 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
#include <avr/iom324a.h>
#endif /* expanded by -frewrite-includes */
# 252 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 253 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega324PA__)
# 254 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom324pa.h>
#endif /* expanded by -frewrite-includes */
# 254 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 255 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega325__)
# 256 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom325.h>
#endif /* expanded by -frewrite-includes */
# 256 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 257 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif (defined __AVR_ATmega325A__)
# 258 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
#include <avr/iom325a.h>
#endif /* expanded by -frewrite-includes */
# 258 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 259 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega325P__)
# 260 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom325p.h>
#endif /* expanded by -frewrite-includes */
# 260 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 261 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega325PA__)
# 262 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom325pa.h>
#endif /* expanded by -frewrite-includes */
# 262 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 263 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega3250__)
# 264 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom3250.h>
#endif /* expanded by -frewrite-includes */
# 264 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 265 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif (defined __AVR_ATmega3250A__)
# 266 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
#include <avr/iom3250a.h>
#endif /* expanded by -frewrite-includes */
# 266 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 267 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega3250P__)
# 268 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom3250p.h>
#endif /* expanded by -frewrite-includes */
# 268 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 269 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega3250PA__)
# 270 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom3250pa.h>
#endif /* expanded by -frewrite-includes */
# 270 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 271 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega328P__)
# 272 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom328p.h>
#endif /* expanded by -frewrite-includes */
# 272 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 1 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/iom328p.h" 1
/* Copyright (c) 2007 Atmel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of the copyright holders nor the names of
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
/* $Id: iom328p.h 2444 2014-08-11 22:10:47Z joerg_wunsch $ */
/* avr/iom328p.h - definitions for ATmega328P. */
/* This file should only be included from <avr/io.h>, never directly. */
#ifndef _AVR_IO_H_
# error "Include <avr/io.h> instead of this file."
#endif
# 41 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/iom328p.h"
#ifndef _AVR_IOXXX_H_
# define _AVR_IOXXX_H_ "iom328p.h"
#else
# 45 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/iom328p.h"
# error "Attempt to include more than one <avr/ioXXX.h> file."
#endif
# 47 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/iom328p.h"
#ifndef _AVR_IOM328P_H_
#define _AVR_IOM328P_H_ 1
/* Registers and associated bit numbers */
#define PINB _SFR_IO8(0x03)
#define PINB0 0
#define PINB1 1
#define PINB2 2
#define PINB3 3
#define PINB4 4
#define PINB5 5
#define PINB6 6
#define PINB7 7
#define DDRB _SFR_IO8(0x04)
#define DDB0 0
#define DDB1 1
#define DDB2 2
#define DDB3 3
#define DDB4 4
#define DDB5 5
#define DDB6 6
#define DDB7 7
#define PORTB _SFR_IO8(0x05)
#define PORTB0 0
#define PORTB1 1
#define PORTB2 2
#define PORTB3 3
#define PORTB4 4
#define PORTB5 5
#define PORTB6 6
#define PORTB7 7
#define PINC _SFR_IO8(0x06)
#define PINC0 0
#define PINC1 1
#define PINC2 2
#define PINC3 3
#define PINC4 4
#define PINC5 5
#define PINC6 6
#define DDRC _SFR_IO8(0x07)
#define DDC0 0
#define DDC1 1
#define DDC2 2
#define DDC3 3
#define DDC4 4
#define DDC5 5
#define DDC6 6
#define PORTC _SFR_IO8(0x08)
#define PORTC0 0
#define PORTC1 1
#define PORTC2 2
#define PORTC3 3
#define PORTC4 4
#define PORTC5 5
#define PORTC6 6
#define PIND _SFR_IO8(0x09)
#define PIND0 0
#define PIND1 1
#define PIND2 2
#define PIND3 3
#define PIND4 4
#define PIND5 5
#define PIND6 6
#define PIND7 7
#define DDRD _SFR_IO8(0x0A)
#define DDD0 0
#define DDD1 1
#define DDD2 2
#define DDD3 3
#define DDD4 4
#define DDD5 5
#define DDD6 6
#define DDD7 7
#define PORTD _SFR_IO8(0x0B)
#define PORTD0 0
#define PORTD1 1
#define PORTD2 2
#define PORTD3 3
#define PORTD4 4
#define PORTD5 5
#define PORTD6 6
#define PORTD7 7
#define TIFR0 _SFR_IO8(0x15)
#define TOV0 0
#define OCF0A 1
#define OCF0B 2
#define TIFR1 _SFR_IO8(0x16)
#define TOV1 0
#define OCF1A 1
#define OCF1B 2
#define ICF1 5
#define TIFR2 _SFR_IO8(0x17)
#define TOV2 0
#define OCF2A 1
#define OCF2B 2
#define PCIFR _SFR_IO8(0x1B)
#define PCIF0 0
#define PCIF1 1
#define PCIF2 2
#define EIFR _SFR_IO8(0x1C)
#define INTF0 0
#define INTF1 1
#define EIMSK _SFR_IO8(0x1D)
#define INT0 0
#define INT1 1
#define GPIOR0 _SFR_IO8(0x1E)
#define GPIOR00 0
#define GPIOR01 1
#define GPIOR02 2
#define GPIOR03 3
#define GPIOR04 4
#define GPIOR05 5
#define GPIOR06 6
#define GPIOR07 7
#define EECR _SFR_IO8(0x1F)
#define EERE 0
#define EEPE 1
#define EEMPE 2
#define EERIE 3
#define EEPM0 4
#define EEPM1 5
#define EEDR _SFR_IO8(0x20)
#define EEDR0 0
#define EEDR1 1
#define EEDR2 2
#define EEDR3 3
#define EEDR4 4
#define EEDR5 5
#define EEDR6 6
#define EEDR7 7
#define EEAR _SFR_IO16(0x21)
#define EEARL _SFR_IO8(0x21)
#define EEAR0 0
#define EEAR1 1
#define EEAR2 2
#define EEAR3 3
#define EEAR4 4
#define EEAR5 5
#define EEAR6 6
#define EEAR7 7
#define EEARH _SFR_IO8(0x22)
#define EEAR8 0
#define EEAR9 1
#define _EEPROM_REG_LOCATIONS_ 1F2021
#define GTCCR _SFR_IO8(0x23)
#define PSRSYNC 0
#define PSRASY 1
#define TSM 7
#define TCCR0A _SFR_IO8(0x24)
#define WGM00 0
#define WGM01 1
#define COM0B0 4
#define COM0B1 5
#define COM0A0 6
#define COM0A1 7
#define TCCR0B _SFR_IO8(0x25)
#define CS00 0
#define CS01 1
#define CS02 2
#define WGM02 3
#define FOC0B 6
#define FOC0A 7
#define TCNT0 _SFR_IO8(0x26)
#define TCNT0_0 0
#define TCNT0_1 1
#define TCNT0_2 2
#define TCNT0_3 3
#define TCNT0_4 4
#define TCNT0_5 5
#define TCNT0_6 6
#define TCNT0_7 7
#define OCR0A _SFR_IO8(0x27)
#define OCR0A_0 0
#define OCR0A_1 1
#define OCR0A_2 2
#define OCR0A_3 3
#define OCR0A_4 4
#define OCR0A_5 5
#define OCR0A_6 6
#define OCR0A_7 7
#define OCR0B _SFR_IO8(0x28)
#define OCR0B_0 0
#define OCR0B_1 1
#define OCR0B_2 2
#define OCR0B_3 3
#define OCR0B_4 4
#define OCR0B_5 5
#define OCR0B_6 6
#define OCR0B_7 7
#define GPIOR1 _SFR_IO8(0x2A)
#define GPIOR10 0
#define GPIOR11 1
#define GPIOR12 2
#define GPIOR13 3
#define GPIOR14 4
#define GPIOR15 5
#define GPIOR16 6
#define GPIOR17 7
#define GPIOR2 _SFR_IO8(0x2B)
#define GPIOR20 0
#define GPIOR21 1
#define GPIOR22 2
#define GPIOR23 3
#define GPIOR24 4
#define GPIOR25 5
#define GPIOR26 6
#define GPIOR27 7
#define SPCR _SFR_IO8(0x2C)
#define SPR0 0
#define SPR1 1
#define CPHA 2
#define CPOL 3
#define MSTR 4
#define DORD 5
#define SPE 6
#define SPIE 7
#define SPSR _SFR_IO8(0x2D)
#define SPI2X 0
#define WCOL 6
#define SPIF 7
#define SPDR _SFR_IO8(0x2E)
#define SPDR0 0
#define SPDR1 1
#define SPDR2 2
#define SPDR3 3
#define SPDR4 4
#define SPDR5 5
#define SPDR6 6
#define SPDR7 7
#define ACSR _SFR_IO8(0x30)
#define ACIS0 0
#define ACIS1 1
#define ACIC 2
#define ACIE 3
#define ACI 4
#define ACO 5
#define ACBG 6
#define ACD 7
#define SMCR _SFR_IO8(0x33)
#define SE 0
#define SM0 1
#define SM1 2
#define SM2 3
#define MCUSR _SFR_IO8(0x34)
#define PORF 0
#define EXTRF 1
#define BORF 2
#define WDRF 3
#define MCUCR _SFR_IO8(0x35)
#define IVCE 0
#define IVSEL 1
#define PUD 4
#define BODSE 5
#define BODS 6
#define SPMCSR _SFR_IO8(0x37)
#define SELFPRGEN 0 /* only for backwards compatibility with previous
* avr-libc versions; not an official name */
#define SPMEN 0
#define PGERS 1
#define PGWRT 2
#define BLBSET 3
#define RWWSRE 4
#define SIGRD 5
#define RWWSB 6
#define SPMIE 7
#define WDTCSR _SFR_MEM8(0x60)
#define WDP0 0
#define WDP1 1
#define WDP2 2
#define WDE 3
#define WDCE 4
#define WDP3 5
#define WDIE 6
#define WDIF 7
#define CLKPR _SFR_MEM8(0x61)
#define CLKPS0 0
#define CLKPS1 1
#define CLKPS2 2
#define CLKPS3 3
#define CLKPCE 7
#define PRR _SFR_MEM8(0x64)
#define PRADC 0
#define PRUSART0 1
#define PRSPI 2
#define PRTIM1 3
#define PRTIM0 5
#define PRTIM2 6
#define PRTWI 7
#define OSCCAL _SFR_MEM8(0x66)
#define CAL0 0
#define CAL1 1
#define CAL2 2
#define CAL3 3
#define CAL4 4
#define CAL5 5
#define CAL6 6
#define CAL7 7
#define PCICR _SFR_MEM8(0x68)
#define PCIE0 0
#define PCIE1 1
#define PCIE2 2
#define EICRA _SFR_MEM8(0x69)
#define ISC00 0
#define ISC01 1
#define ISC10 2
#define ISC11 3
#define PCMSK0 _SFR_MEM8(0x6B)
#define PCINT0 0
#define PCINT1 1
#define PCINT2 2
#define PCINT3 3
#define PCINT4 4
#define PCINT5 5
#define PCINT6 6
#define PCINT7 7
#define PCMSK1 _SFR_MEM8(0x6C)
#define PCINT8 0
#define PCINT9 1
#define PCINT10 2
#define PCINT11 3
#define PCINT12 4
#define PCINT13 5
#define PCINT14 6
#define PCMSK2 _SFR_MEM8(0x6D)
#define PCINT16 0
#define PCINT17 1
#define PCINT18 2
#define PCINT19 3
#define PCINT20 4
#define PCINT21 5
#define PCINT22 6
#define PCINT23 7
#define TIMSK0 _SFR_MEM8(0x6E)
#define TOIE0 0
#define OCIE0A 1
#define OCIE0B 2
#define TIMSK1 _SFR_MEM8(0x6F)
#define TOIE1 0
#define OCIE1A 1
#define OCIE1B 2
#define ICIE1 5
#define TIMSK2 _SFR_MEM8(0x70)
#define TOIE2 0
#define OCIE2A 1
#define OCIE2B 2
#ifndef __ASSEMBLER__
#define ADC _SFR_MEM16(0x78)
#endif
# 448 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/iom328p.h"
#define ADCW _SFR_MEM16(0x78)
#define ADCL _SFR_MEM8(0x78)
#define ADCL0 0
#define ADCL1 1
#define ADCL2 2
#define ADCL3 3
#define ADCL4 4
#define ADCL5 5
#define ADCL6 6
#define ADCL7 7
#define ADCH _SFR_MEM8(0x79)
#define ADCH0 0
#define ADCH1 1
#define ADCH2 2
#define ADCH3 3
#define ADCH4 4
#define ADCH5 5
#define ADCH6 6
#define ADCH7 7
#define ADCSRA _SFR_MEM8(0x7A)
#define ADPS0 0
#define ADPS1 1
#define ADPS2 2
#define ADIE 3
#define ADIF 4
#define ADATE 5
#define ADSC 6
#define ADEN 7
#define ADCSRB _SFR_MEM8(0x7B)
#define ADTS0 0
#define ADTS1 1
#define ADTS2 2
#define ACME 6
#define ADMUX _SFR_MEM8(0x7C)
#define MUX0 0
#define MUX1 1
#define MUX2 2
#define MUX3 3
#define ADLAR 5
#define REFS0 6
#define REFS1 7
#define DIDR0 _SFR_MEM8(0x7E)
#define ADC0D 0
#define ADC1D 1
#define ADC2D 2
#define ADC3D 3
#define ADC4D 4
#define ADC5D 5
#define DIDR1 _SFR_MEM8(0x7F)
#define AIN0D 0
#define AIN1D 1
#define TCCR1A _SFR_MEM8(0x80)
#define WGM10 0
#define WGM11 1
#define COM1B0 4
#define COM1B1 5
#define COM1A0 6
#define COM1A1 7
#define TCCR1B _SFR_MEM8(0x81)
#define CS10 0
#define CS11 1
#define CS12 2
#define WGM12 3
#define WGM13 4
#define ICES1 6
#define ICNC1 7
#define TCCR1C _SFR_MEM8(0x82)
#define FOC1B 6
#define FOC1A 7
#define TCNT1 _SFR_MEM16(0x84)
#define TCNT1L _SFR_MEM8(0x84)
#define TCNT1L0 0
#define TCNT1L1 1
#define TCNT1L2 2
#define TCNT1L3 3
#define TCNT1L4 4
#define TCNT1L5 5
#define TCNT1L6 6
#define TCNT1L7 7
#define TCNT1H _SFR_MEM8(0x85)
#define TCNT1H0 0
#define TCNT1H1 1
#define TCNT1H2 2
#define TCNT1H3 3
#define TCNT1H4 4
#define TCNT1H5 5
#define TCNT1H6 6
#define TCNT1H7 7
#define ICR1 _SFR_MEM16(0x86)
#define ICR1L _SFR_MEM8(0x86)
#define ICR1L0 0
#define ICR1L1 1
#define ICR1L2 2
#define ICR1L3 3
#define ICR1L4 4
#define ICR1L5 5
#define ICR1L6 6
#define ICR1L7 7
#define ICR1H _SFR_MEM8(0x87)
#define ICR1H0 0
#define ICR1H1 1
#define ICR1H2 2
#define ICR1H3 3
#define ICR1H4 4
#define ICR1H5 5
#define ICR1H6 6
#define ICR1H7 7
#define OCR1A _SFR_MEM16(0x88)
#define OCR1AL _SFR_MEM8(0x88)
#define OCR1AL0 0
#define OCR1AL1 1
#define OCR1AL2 2
#define OCR1AL3 3
#define OCR1AL4 4
#define OCR1AL5 5
#define OCR1AL6 6
#define OCR1AL7 7
#define OCR1AH _SFR_MEM8(0x89)
#define OCR1AH0 0
#define OCR1AH1 1
#define OCR1AH2 2
#define OCR1AH3 3
#define OCR1AH4 4
#define OCR1AH5 5
#define OCR1AH6 6
#define OCR1AH7 7
#define OCR1B _SFR_MEM16(0x8A)
#define OCR1BL _SFR_MEM8(0x8A)
#define OCR1BL0 0
#define OCR1BL1 1
#define OCR1BL2 2
#define OCR1BL3 3
#define OCR1BL4 4
#define OCR1BL5 5
#define OCR1BL6 6
#define OCR1BL7 7
#define OCR1BH _SFR_MEM8(0x8B)
#define OCR1BH0 0
#define OCR1BH1 1
#define OCR1BH2 2
#define OCR1BH3 3
#define OCR1BH4 4
#define OCR1BH5 5
#define OCR1BH6 6
#define OCR1BH7 7
#define TCCR2A _SFR_MEM8(0xB0)
#define WGM20 0
#define WGM21 1
#define COM2B0 4
#define COM2B1 5
#define COM2A0 6
#define COM2A1 7
#define TCCR2B _SFR_MEM8(0xB1)
#define CS20 0
#define CS21 1
#define CS22 2
#define WGM22 3
#define FOC2B 6
#define FOC2A 7
#define TCNT2 _SFR_MEM8(0xB2)
#define TCNT2_0 0
#define TCNT2_1 1
#define TCNT2_2 2
#define TCNT2_3 3
#define TCNT2_4 4
#define TCNT2_5 5
#define TCNT2_6 6
#define TCNT2_7 7
#define OCR2A _SFR_MEM8(0xB3)
#define OCR2_0 0
#define OCR2_1 1
#define OCR2_2 2
#define OCR2_3 3
#define OCR2_4 4
#define OCR2_5 5
#define OCR2_6 6
#define OCR2_7 7
#define OCR2B _SFR_MEM8(0xB4)
#define OCR2_0 0
#define OCR2_1 1
#define OCR2_2 2
#define OCR2_3 3
#define OCR2_4 4
#define OCR2_5 5
#define OCR2_6 6
#define OCR2_7 7
#define ASSR _SFR_MEM8(0xB6)
#define TCR2BUB 0
#define TCR2AUB 1
#define OCR2BUB 2
#define OCR2AUB 3
#define TCN2UB 4
#define AS2 5
#define EXCLK 6
#define TWBR _SFR_MEM8(0xB8)
#define TWBR0 0
#define TWBR1 1
#define TWBR2 2
#define TWBR3 3
#define TWBR4 4
#define TWBR5 5
#define TWBR6 6
#define TWBR7 7
#define TWSR _SFR_MEM8(0xB9)
#define TWPS0 0
#define TWPS1 1
#define TWS3 3
#define TWS4 4
#define TWS5 5
#define TWS6 6
#define TWS7 7
#define TWAR _SFR_MEM8(0xBA)
#define TWGCE 0
#define TWA0 1
#define TWA1 2
#define TWA2 3
#define TWA3 4
#define TWA4 5
#define TWA5 6
#define TWA6 7
#define TWDR _SFR_MEM8(0xBB)
#define TWD0 0
#define TWD1 1
#define TWD2 2
#define TWD3 3
#define TWD4 4
#define TWD5 5
#define TWD6 6
#define TWD7 7
#define TWCR _SFR_MEM8(0xBC)
#define TWIE 0
#define TWEN 2
#define TWWC 3
#define TWSTO 4
#define TWSTA 5
#define TWEA 6
#define TWINT 7
#define TWAMR _SFR_MEM8(0xBD)
#define TWAM0 0
#define TWAM1 1
#define TWAM2 2
#define TWAM3 3
#define TWAM4 4
#define TWAM5 5
#define TWAM6 6
#define UCSR0A _SFR_MEM8(0xC0)
#define MPCM0 0
#define U2X0 1
#define UPE0 2
#define DOR0 3
#define FE0 4
#define UDRE0 5
#define TXC0 6
#define RXC0 7
#define UCSR0B _SFR_MEM8(0xC1)
#define TXB80 0
#define RXB80 1
#define UCSZ02 2
#define TXEN0 3
#define RXEN0 4
#define UDRIE0 5
#define TXCIE0 6
#define RXCIE0 7
#define UCSR0C _SFR_MEM8(0xC2)
#define UCPOL0 0
#define UCSZ00 1
#define UCPHA0 1
#define UCSZ01 2
#define UDORD0 2
#define USBS0 3
#define UPM00 4
#define UPM01 5
#define UMSEL00 6
#define UMSEL01 7
#define UBRR0 _SFR_MEM16(0xC4)
#define UBRR0L _SFR_MEM8(0xC4)
#define UBRR0_0 0
#define UBRR0_1 1
#define UBRR0_2 2
#define UBRR0_3 3
#define UBRR0_4 4
#define UBRR0_5 5
#define UBRR0_6 6
#define UBRR0_7 7
#define UBRR0H _SFR_MEM8(0xC5)
#define UBRR0_8 0
#define UBRR0_9 1
#define UBRR0_10 2
#define UBRR0_11 3
#define UDR0 _SFR_MEM8(0xC6)
#define UDR0_0 0
#define UDR0_1 1
#define UDR0_2 2
#define UDR0_3 3
#define UDR0_4 4
#define UDR0_5 5
#define UDR0_6 6
#define UDR0_7 7
/* Interrupt Vectors */
/* Interrupt Vector 0 is the reset vector. */
#define INT0_vect_num 1
#define INT0_vect _VECTOR(1) /* External Interrupt Request 0 */
#define INT1_vect_num 2
#define INT1_vect _VECTOR(2) /* External Interrupt Request 1 */
#define PCINT0_vect_num 3
#define PCINT0_vect _VECTOR(3) /* Pin Change Interrupt Request 0 */
#define PCINT1_vect_num 4
#define PCINT1_vect _VECTOR(4) /* Pin Change Interrupt Request 0 */
#define PCINT2_vect_num 5
#define PCINT2_vect _VECTOR(5) /* Pin Change Interrupt Request 1 */
#define WDT_vect_num 6
#define WDT_vect _VECTOR(6) /* Watchdog Time-out Interrupt */
#define TIMER2_COMPA_vect_num 7
#define TIMER2_COMPA_vect _VECTOR(7) /* Timer/Counter2 Compare Match A */
#define TIMER2_COMPB_vect_num 8
#define TIMER2_COMPB_vect _VECTOR(8) /* Timer/Counter2 Compare Match A */
#define TIMER2_OVF_vect_num 9
#define TIMER2_OVF_vect _VECTOR(9) /* Timer/Counter2 Overflow */
#define TIMER1_CAPT_vect_num 10
#define TIMER1_CAPT_vect _VECTOR(10) /* Timer/Counter1 Capture Event */
#define TIMER1_COMPA_vect_num 11
#define TIMER1_COMPA_vect _VECTOR(11) /* Timer/Counter1 Compare Match A */
#define TIMER1_COMPB_vect_num 12
#define TIMER1_COMPB_vect _VECTOR(12) /* Timer/Counter1 Compare Match B */
#define TIMER1_OVF_vect_num 13
#define TIMER1_OVF_vect _VECTOR(13) /* Timer/Counter1 Overflow */
#define TIMER0_COMPA_vect_num 14
#define TIMER0_COMPA_vect _VECTOR(14) /* TimerCounter0 Compare Match A */
#define TIMER0_COMPB_vect_num 15
#define TIMER0_COMPB_vect _VECTOR(15) /* TimerCounter0 Compare Match B */
#define TIMER0_OVF_vect_num 16
#define TIMER0_OVF_vect _VECTOR(16) /* Timer/Couner0 Overflow */
#define SPI_STC_vect_num 17
#define SPI_STC_vect _VECTOR(17) /* SPI Serial Transfer Complete */
#define USART_RX_vect_num 18
#define USART_RX_vect _VECTOR(18) /* USART Rx Complete */
#define USART_UDRE_vect_num 19
#define USART_UDRE_vect _VECTOR(19) /* USART, Data Register Empty */
#define USART_TX_vect_num 20
#define USART_TX_vect _VECTOR(20) /* USART Tx Complete */
#define ADC_vect_num 21
#define ADC_vect _VECTOR(21) /* ADC Conversion Complete */
#define EE_READY_vect_num 22
#define EE_READY_vect _VECTOR(22) /* EEPROM Ready */
#define ANALOG_COMP_vect_num 23
#define ANALOG_COMP_vect _VECTOR(23) /* Analog Comparator */
#define TWI_vect_num 24
#define TWI_vect _VECTOR(24) /* Two-wire Serial Interface */
#define SPM_READY_vect_num 25
#define SPM_READY_vect _VECTOR(25) /* Store Program Memory Read */
#define _VECTORS_SIZE (26 * 4)
/* Constants */
#define SPM_PAGESIZE 128
#define RAMSTART (0x100)
#define RAMEND 0x8FF /* Last On-Chip SRAM Location */
#define XRAMSIZE 0
#define XRAMEND RAMEND
#define E2END 0x3FF
#define E2PAGESIZE 4
#define FLASHEND 0x7FFF
/* Fuses */
#define FUSE_MEMORY_SIZE 3
/* Low Fuse Byte */
#define FUSE_CKSEL0 (unsigned char)~_BV(0) /* Select Clock Source */
#define FUSE_CKSEL1 (unsigned char)~_BV(1) /* Select Clock Source */
#define FUSE_CKSEL2 (unsigned char)~_BV(2) /* Select Clock Source */
#define FUSE_CKSEL3 (unsigned char)~_BV(3) /* Select Clock Source */
#define FUSE_SUT0 (unsigned char)~_BV(4) /* Select start-up time */
#define FUSE_SUT1 (unsigned char)~_BV(5) /* Select start-up time */
#define FUSE_CKOUT (unsigned char)~_BV(6) /* Clock output */
#define FUSE_CKDIV8 (unsigned char)~_BV(7) /* Divide clock by 8 */
#define LFUSE_DEFAULT (FUSE_CKSEL0 & FUSE_CKSEL2 & FUSE_CKSEL3 & FUSE_SUT0 & FUSE_CKDIV8)
/* High Fuse Byte */
#define FUSE_BOOTRST (unsigned char)~_BV(0)
#define FUSE_BOOTSZ0 (unsigned char)~_BV(1)
#define FUSE_BOOTSZ1 (unsigned char)~_BV(2)
#define FUSE_EESAVE (unsigned char)~_BV(3) /* EEPROM memory is preserved through chip erase */
#define FUSE_WDTON (unsigned char)~_BV(4) /* Watchdog Timer Always On */
#define FUSE_SPIEN (unsigned char)~_BV(5) /* Enable Serial programming and Data Downloading */
#define FUSE_DWEN (unsigned char)~_BV(6) /* debugWIRE Enable */
#define FUSE_RSTDISBL (unsigned char)~_BV(7) /* External reset disable */
#define HFUSE_DEFAULT (FUSE_BOOTSZ0 & FUSE_BOOTSZ1 & FUSE_SPIEN)
/* Extended Fuse Byte */
#define FUSE_BODLEVEL0 (unsigned char)~_BV(0) /* Brown-out Detector trigger level */
#define FUSE_BODLEVEL1 (unsigned char)~_BV(1) /* Brown-out Detector trigger level */
#define FUSE_BODLEVEL2 (unsigned char)~_BV(2) /* Brown-out Detector trigger level */
#define EFUSE_DEFAULT (0xFF)
/* Lock Bits */
#define __LOCK_BITS_EXIST
#define __BOOT_LOCK_BITS_0_EXIST
#define __BOOT_LOCK_BITS_1_EXIST
/* Signature */
#define SIGNATURE_0 0x1E
#define SIGNATURE_1 0x95
#if defined(__AVR_ATmega328__)
# define SIGNATURE_2 0x14
#else /* ATmega328P */
# 929 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/iom328p.h"
# define SIGNATURE_2 0x0F
#endif
# 931 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/iom328p.h"
#endif /* _AVR_IOM328P_H_ */
# 934 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/iom328p.h"
# 273 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h" 2
#elif (defined __AVR_ATmega328__)
# 274 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
#include <avr/iom328.h>
#endif /* expanded by -frewrite-includes */
# 274 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 275 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega329__)
# 276 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom329.h>
#endif /* expanded by -frewrite-includes */
# 276 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 277 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif (defined __AVR_ATmega329A__)
# 278 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
#include <avr/iom329a.h>
#endif /* expanded by -frewrite-includes */
# 278 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 279 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega329P__)
# 280 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom329p.h>
#endif /* expanded by -frewrite-includes */
# 280 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 281 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif (defined __AVR_ATmega329PA__)
# 282 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
#include <avr/iom329pa.h>
#endif /* expanded by -frewrite-includes */
# 282 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 283 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif (defined __AVR_ATmega3290PA__)
# 284 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
#include <avr/iom3290pa.h>
#endif /* expanded by -frewrite-includes */
# 284 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 285 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega3290__)
# 286 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom3290.h>
#endif /* expanded by -frewrite-includes */
# 286 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 287 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif (defined __AVR_ATmega3290A__)
# 288 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
#include <avr/iom3290a.h>
#endif /* expanded by -frewrite-includes */
# 288 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 289 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega3290P__)
# 290 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom3290.h>
#endif /* expanded by -frewrite-includes */
# 290 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 291 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega32HVB__)
# 292 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom32hvb.h>
#endif /* expanded by -frewrite-includes */
# 292 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 293 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega32HVBREVB__)
# 294 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom32hvbrevb.h>
#endif /* expanded by -frewrite-includes */
# 294 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 295 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega406__)
# 296 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom406.h>
#endif /* expanded by -frewrite-includes */
# 296 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 297 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega16__)
# 298 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom16.h>
#endif /* expanded by -frewrite-includes */
# 298 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 299 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega16A__)
# 300 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom16a.h>
#endif /* expanded by -frewrite-includes */
# 300 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 301 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega161__)
# 302 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom161.h>
#endif /* expanded by -frewrite-includes */
# 302 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 303 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega162__)
# 304 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom162.h>
#endif /* expanded by -frewrite-includes */
# 304 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 305 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega163__)
# 306 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom163.h>
#endif /* expanded by -frewrite-includes */
# 306 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 307 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega164P__)
# 308 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom164p.h>
#endif /* expanded by -frewrite-includes */
# 308 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 309 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif (defined __AVR_ATmega164A__)
# 310 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
#include <avr/iom164a.h>
#endif /* expanded by -frewrite-includes */
# 310 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 311 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega164PA__)
# 312 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom164pa.h>
#endif /* expanded by -frewrite-includes */
# 312 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 313 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega165__)
# 314 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom165.h>
#endif /* expanded by -frewrite-includes */
# 314 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 315 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif (defined __AVR_ATmega165A__)
# 316 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
#include <avr/iom165a.h>
#endif /* expanded by -frewrite-includes */
# 316 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 317 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega165P__)
# 318 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom165p.h>
#endif /* expanded by -frewrite-includes */
# 318 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 319 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega165PA__)
# 320 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom165pa.h>
#endif /* expanded by -frewrite-includes */
# 320 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 321 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega168__)
# 322 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom168.h>
#endif /* expanded by -frewrite-includes */
# 322 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 323 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif (defined __AVR_ATmega168A__)
# 324 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
#include <avr/iom168a.h>
#endif /* expanded by -frewrite-includes */
# 324 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 325 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega168P__)
# 326 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom168p.h>
#endif /* expanded by -frewrite-includes */
# 326 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 327 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega168PA__)
# 328 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom168pa.h>
#endif /* expanded by -frewrite-includes */
# 328 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 329 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega168PB__)
# 330 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom168pb.h>
#endif /* expanded by -frewrite-includes */
# 330 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 331 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega169__)
# 332 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom169.h>
#endif /* expanded by -frewrite-includes */
# 332 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 333 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif (defined __AVR_ATmega169A__)
# 334 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
#include <avr/iom169a.h>
#endif /* expanded by -frewrite-includes */
# 334 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 335 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega169P__)
# 336 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom169p.h>
#endif /* expanded by -frewrite-includes */
# 336 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 337 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega169PA__)
# 338 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom169pa.h>
#endif /* expanded by -frewrite-includes */
# 338 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 339 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega8HVA__)
# 340 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom8hva.h>
#endif /* expanded by -frewrite-includes */
# 340 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 341 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega16HVA__)
# 342 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom16hva.h>
#endif /* expanded by -frewrite-includes */
# 342 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 343 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega16HVA2__)
# 344 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom16hva2.h>
#endif /* expanded by -frewrite-includes */
# 344 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 345 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega16HVB__)
# 346 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom16hvb.h>
#endif /* expanded by -frewrite-includes */
# 346 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 347 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega16HVBREVB__)
# 348 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom16hvbrevb.h>
#endif /* expanded by -frewrite-includes */
# 348 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 349 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega8__)
# 350 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom8.h>
#endif /* expanded by -frewrite-includes */
# 350 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 351 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega8A__)
# 352 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom8a.h>
#endif /* expanded by -frewrite-includes */
# 352 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 353 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif (defined __AVR_ATmega48A__)
# 354 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom48a.h>
#endif /* expanded by -frewrite-includes */
# 354 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 355 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega48__)
# 356 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom48.h>
#endif /* expanded by -frewrite-includes */
# 356 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 357 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega48PA__)
# 358 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom48pa.h>
#endif /* expanded by -frewrite-includes */
# 358 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 359 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega48PB__)
# 360 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom48pb.h>
#endif /* expanded by -frewrite-includes */
# 360 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 361 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega48P__)
# 362 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom48p.h>
#endif /* expanded by -frewrite-includes */
# 362 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 363 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega88__)
# 364 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom88.h>
#endif /* expanded by -frewrite-includes */
# 364 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 365 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif (defined __AVR_ATmega88A__)
# 366 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom88a.h>
#endif /* expanded by -frewrite-includes */
# 366 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 367 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega88P__)
# 368 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom88p.h>
#endif /* expanded by -frewrite-includes */
# 368 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 369 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega88PA__)
# 370 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom88pa.h>
#endif /* expanded by -frewrite-includes */
# 370 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 371 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega88PB__)
# 372 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom88pb.h>
#endif /* expanded by -frewrite-includes */
# 372 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 373 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega8515__)
# 374 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom8515.h>
#endif /* expanded by -frewrite-includes */
# 374 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 375 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATmega8535__)
# 376 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom8535.h>
#endif /* expanded by -frewrite-includes */
# 376 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 377 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_AT90S8535__)
# 378 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/io8535.h>
#endif /* expanded by -frewrite-includes */
# 378 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 379 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_AT90C8534__)
# 380 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/io8534.h>
#endif /* expanded by -frewrite-includes */
# 380 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 381 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_AT90S8515__)
# 382 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/io8515.h>
#endif /* expanded by -frewrite-includes */
# 382 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 383 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_AT90S4434__)
# 384 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/io4434.h>
#endif /* expanded by -frewrite-includes */
# 384 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 385 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_AT90S4433__)
# 386 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/io4433.h>
#endif /* expanded by -frewrite-includes */
# 386 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 387 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_AT90S4414__)
# 388 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/io4414.h>
#endif /* expanded by -frewrite-includes */
# 388 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 389 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny22__)
# 390 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn22.h>
#endif /* expanded by -frewrite-includes */
# 390 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 391 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny26__)
# 392 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn26.h>
#endif /* expanded by -frewrite-includes */
# 392 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 393 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_AT90S2343__)
# 394 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/io2343.h>
#endif /* expanded by -frewrite-includes */
# 394 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 395 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_AT90S2333__)
# 396 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/io2333.h>
#endif /* expanded by -frewrite-includes */
# 396 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 397 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_AT90S2323__)
# 398 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/io2323.h>
#endif /* expanded by -frewrite-includes */
# 398 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 399 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_AT90S2313__)
# 400 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/io2313.h>
#endif /* expanded by -frewrite-includes */
# 400 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 401 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny4__)
# 402 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn4.h>
#endif /* expanded by -frewrite-includes */
# 402 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 403 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny5__)
# 404 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn5.h>
#endif /* expanded by -frewrite-includes */
# 404 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 405 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny9__)
# 406 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn9.h>
#endif /* expanded by -frewrite-includes */
# 406 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 407 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny10__)
# 408 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn10.h>
#endif /* expanded by -frewrite-includes */
# 408 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 409 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny20__)
# 410 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn20.h>
#endif /* expanded by -frewrite-includes */
# 410 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 411 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny40__)
# 412 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn40.h>
#endif /* expanded by -frewrite-includes */
# 412 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 413 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny2313__)
# 414 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn2313.h>
#endif /* expanded by -frewrite-includes */
# 414 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 415 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny2313A__)
# 416 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn2313a.h>
#endif /* expanded by -frewrite-includes */
# 416 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 417 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny13__)
# 418 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn13.h>
#endif /* expanded by -frewrite-includes */
# 418 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 419 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny13A__)
# 420 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn13a.h>
#endif /* expanded by -frewrite-includes */
# 420 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 421 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny25__)
# 422 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn25.h>
#endif /* expanded by -frewrite-includes */
# 422 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 423 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny4313__)
# 424 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn4313.h>
#endif /* expanded by -frewrite-includes */
# 424 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 425 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny45__)
# 426 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn45.h>
#endif /* expanded by -frewrite-includes */
# 426 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 427 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny85__)
# 428 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn85.h>
#endif /* expanded by -frewrite-includes */
# 428 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 429 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny24__)
# 430 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn24.h>
#endif /* expanded by -frewrite-includes */
# 430 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 431 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny24A__)
# 432 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn24a.h>
#endif /* expanded by -frewrite-includes */
# 432 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 433 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny44__)
# 434 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn44.h>
#endif /* expanded by -frewrite-includes */
# 434 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 435 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny44A__)
# 436 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn44a.h>
#endif /* expanded by -frewrite-includes */
# 436 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 437 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny441__)
# 438 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn441.h>
#endif /* expanded by -frewrite-includes */
# 438 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 439 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny84__)
# 440 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn84.h>
#endif /* expanded by -frewrite-includes */
# 440 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 441 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny84A__)
# 442 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn84a.h>
#endif /* expanded by -frewrite-includes */
# 442 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 443 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny841__)
# 444 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn841.h>
#endif /* expanded by -frewrite-includes */
# 444 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 445 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny261__)
# 446 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn261.h>
#endif /* expanded by -frewrite-includes */
# 446 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 447 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny261A__)
# 448 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn261a.h>
#endif /* expanded by -frewrite-includes */
# 448 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 449 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny461__)
# 450 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn461.h>
#endif /* expanded by -frewrite-includes */
# 450 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 451 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny461A__)
# 452 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn461a.h>
#endif /* expanded by -frewrite-includes */
# 452 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 453 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny861__)
# 454 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn861.h>
#endif /* expanded by -frewrite-includes */
# 454 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 455 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny861A__)
# 456 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn861a.h>
#endif /* expanded by -frewrite-includes */
# 456 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 457 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny43U__)
# 458 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn43u.h>
#endif /* expanded by -frewrite-includes */
# 458 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 459 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny48__)
# 460 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn48.h>
#endif /* expanded by -frewrite-includes */
# 460 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 461 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny88__)
# 462 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn88.h>
#endif /* expanded by -frewrite-includes */
# 462 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 463 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny828__)
# 464 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn828.h>
#endif /* expanded by -frewrite-includes */
# 464 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 465 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny87__)
# 466 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn87.h>
#endif /* expanded by -frewrite-includes */
# 466 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 467 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny167__)
# 468 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn167.h>
#endif /* expanded by -frewrite-includes */
# 468 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 469 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny1634__)
# 470 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn1634.h>
#endif /* expanded by -frewrite-includes */
# 470 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 471 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_AT90SCR100__)
# 472 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/io90scr100.h>
#endif /* expanded by -frewrite-includes */
# 472 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 473 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega16A4__)
# 474 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox16a4.h>
#endif /* expanded by -frewrite-includes */
# 474 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 475 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega16A4U__)
# 476 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox16a4u.h>
#endif /* expanded by -frewrite-includes */
# 476 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 477 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega16C4__)
# 478 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox16c4.h>
#endif /* expanded by -frewrite-includes */
# 478 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 479 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega16D4__)
# 480 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox16d4.h>
#endif /* expanded by -frewrite-includes */
# 480 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 481 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega32A4__)
# 482 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox32a4.h>
#endif /* expanded by -frewrite-includes */
# 482 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 483 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega32A4U__)
# 484 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox32a4u.h>
#endif /* expanded by -frewrite-includes */
# 484 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 485 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega32C3__)
# 486 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox32c3.h>
#endif /* expanded by -frewrite-includes */
# 486 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 487 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega32C4__)
# 488 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox32c4.h>
#endif /* expanded by -frewrite-includes */
# 488 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 489 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega32D3__)
# 490 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox32d3.h>
#endif /* expanded by -frewrite-includes */
# 490 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 491 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega32D4__)
# 492 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox32d4.h>
#endif /* expanded by -frewrite-includes */
# 492 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 493 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega8E5__)
# 494 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox8e5.h>
#endif /* expanded by -frewrite-includes */
# 494 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 495 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega16E5__)
# 496 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox16e5.h>
#endif /* expanded by -frewrite-includes */
# 496 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 497 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega32E5__)
# 498 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox32e5.h>
#endif /* expanded by -frewrite-includes */
# 498 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 499 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega64A1__)
# 500 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox64a1.h>
#endif /* expanded by -frewrite-includes */
# 500 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 501 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega64A1U__)
# 502 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox64a1u.h>
#endif /* expanded by -frewrite-includes */
# 502 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 503 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega64A3__)
# 504 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox64a3.h>
#endif /* expanded by -frewrite-includes */
# 504 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 505 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega64A3U__)
# 506 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox64a3u.h>
#endif /* expanded by -frewrite-includes */
# 506 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 507 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega64A4U__)
# 508 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox64a4u.h>
#endif /* expanded by -frewrite-includes */
# 508 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 509 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega64B1__)
# 510 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox64b1.h>
#endif /* expanded by -frewrite-includes */
# 510 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 511 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega64B3__)
# 512 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox64b3.h>
#endif /* expanded by -frewrite-includes */
# 512 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 513 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega64C3__)
# 514 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox64c3.h>
#endif /* expanded by -frewrite-includes */
# 514 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 515 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega64D3__)
# 516 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox64d3.h>
#endif /* expanded by -frewrite-includes */
# 516 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 517 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega64D4__)
# 518 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox64d4.h>
#endif /* expanded by -frewrite-includes */
# 518 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 519 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega128A1__)
# 520 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox128a1.h>
#endif /* expanded by -frewrite-includes */
# 520 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 521 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega128A1U__)
# 522 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox128a1u.h>
#endif /* expanded by -frewrite-includes */
# 522 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 523 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega128A4U__)
# 524 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox128a4u.h>
#endif /* expanded by -frewrite-includes */
# 524 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 525 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega128A3__)
# 526 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox128a3.h>
#endif /* expanded by -frewrite-includes */
# 526 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 527 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega128A3U__)
# 528 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox128a3u.h>
#endif /* expanded by -frewrite-includes */
# 528 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 529 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega128B1__)
# 530 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox128b1.h>
#endif /* expanded by -frewrite-includes */
# 530 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 531 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega128B3__)
# 532 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox128b3.h>
#endif /* expanded by -frewrite-includes */
# 532 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 533 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega128C3__)
# 534 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox128c3.h>
#endif /* expanded by -frewrite-includes */
# 534 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 535 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega128D3__)
# 536 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox128d3.h>
#endif /* expanded by -frewrite-includes */
# 536 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 537 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega128D4__)
# 538 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox128d4.h>
#endif /* expanded by -frewrite-includes */
# 538 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 539 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega192A3__)
# 540 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox192a3.h>
#endif /* expanded by -frewrite-includes */
# 540 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 541 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega192A3U__)
# 542 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox192a3u.h>
#endif /* expanded by -frewrite-includes */
# 542 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 543 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega192C3__)
# 544 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox192c3.h>
#endif /* expanded by -frewrite-includes */
# 544 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 545 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega192D3__)
# 546 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox192d3.h>
#endif /* expanded by -frewrite-includes */
# 546 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 547 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega256A3__)
# 548 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox256a3.h>
#endif /* expanded by -frewrite-includes */
# 548 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 549 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega256A3U__)
# 550 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox256a3u.h>
#endif /* expanded by -frewrite-includes */
# 550 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 551 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega256A3B__)
# 552 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox256a3b.h>
#endif /* expanded by -frewrite-includes */
# 552 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 553 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega256A3BU__)
# 554 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox256a3bu.h>
#endif /* expanded by -frewrite-includes */
# 554 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 555 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega256C3__)
# 556 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox256c3.h>
#endif /* expanded by -frewrite-includes */
# 556 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 557 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega256D3__)
# 558 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox256d3.h>
#endif /* expanded by -frewrite-includes */
# 558 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 559 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega384C3__)
# 560 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox384c3.h>
#endif /* expanded by -frewrite-includes */
# 560 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 561 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATxmega384D3__)
# 562 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iox384d3.h>
#endif /* expanded by -frewrite-includes */
# 562 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 563 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATA5790__)
# 564 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/ioa5790.h>
#endif /* expanded by -frewrite-includes */
# 564 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 565 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATA5790N__)
# 566 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/ioa5790n.h>
#endif /* expanded by -frewrite-includes */
# 566 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 567 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATA5272__)
# 568 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/ioa5272.h>
#endif /* expanded by -frewrite-includes */
# 568 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 569 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATA5505__)
# 570 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/ioa5505.h>
#endif /* expanded by -frewrite-includes */
# 570 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 571 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATA5795__)
# 572 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/ioa5795.h>
#endif /* expanded by -frewrite-includes */
# 572 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 573 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATA5702M322__)
# 574 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/ioa5702m322.h>
#endif /* expanded by -frewrite-includes */
# 574 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 575 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATA5782__)
# 576 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/ioa5782.h>
#endif /* expanded by -frewrite-includes */
# 576 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 577 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATA5831__)
# 578 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/ioa5831.h>
#endif /* expanded by -frewrite-includes */
# 578 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 579 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATA6285__)
# 580 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/ioa6285.h>
#endif /* expanded by -frewrite-includes */
# 580 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 581 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATA6286__)
# 582 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/ioa6286.h>
#endif /* expanded by -frewrite-includes */
# 582 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 583 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATA6289__)
# 584 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/ioa6289.h>
#endif /* expanded by -frewrite-includes */
# 584 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 585 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATA6612C__)
# 586 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/ioa6612c.h>
#endif /* expanded by -frewrite-includes */
# 586 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 587 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATA6613C__)
# 588 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/ioa6613c.h>
#endif /* expanded by -frewrite-includes */
# 588 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 589 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATA6614Q__)
# 590 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/ioa6614q.h>
#endif /* expanded by -frewrite-includes */
# 590 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 591 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATA6616C__)
# 592 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/ioa6616c.h>
#endif /* expanded by -frewrite-includes */
# 592 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 593 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATA6617C__)
# 594 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/ioa6617c.h>
#endif /* expanded by -frewrite-includes */
# 594 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 595 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATA664251__)
# 596 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/ioa664251.h>
#endif /* expanded by -frewrite-includes */
# 596 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 597 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
/* avr1: the following only supported for assembler programs */
#elif defined (__AVR_ATtiny28__)
# 599 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn28.h>
#endif /* expanded by -frewrite-includes */
# 599 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 600 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_AT90S1200__)
# 601 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/io1200.h>
#endif /* expanded by -frewrite-includes */
# 601 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 602 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny15__)
# 603 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn15.h>
#endif /* expanded by -frewrite-includes */
# 603 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 604 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny12__)
# 605 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn12.h>
#endif /* expanded by -frewrite-includes */
# 605 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 606 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_ATtiny11__)
# 607 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iotn11.h>
#endif /* expanded by -frewrite-includes */
# 607 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 608 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#elif defined (__AVR_M3000__)
# 609 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
# include <avr/iom3000.h>
#endif /* expanded by -frewrite-includes */
# 609 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 610 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#else
# 611 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# if !defined(__COMPILING_AVR_LIBC__)
# warning "device type not defined"
# endif
# 614 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#endif
# 615 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#if 0 /* expanded by -frewrite-includes */
#include <avr/portpins.h>
#endif /* expanded by -frewrite-includes */
# 616 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 1 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h" 1
/* Copyright (c) 2003 Theodore A. Roth
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of the copyright holders nor the names of
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. */
/* $Id$ */
#ifndef _AVR_PORTPINS_H_
#define _AVR_PORTPINS_H_ 1
/* This file should only be included from <avr/io.h>, never directly. */
#ifndef _AVR_IO_H_
# error "Include <avr/io.h> instead of this file."
#endif
# 41 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
/* Define Generic PORTn, DDn, and PINn values. */
/* Port Data Register (generic) */
#define PORT7 7
#define PORT6 6
#define PORT5 5
#define PORT4 4
#define PORT3 3
#define PORT2 2
#define PORT1 1
#define PORT0 0
/* Port Data Direction Register (generic) */
#define DD7 7
#define DD6 6
#define DD5 5
#define DD4 4
#define DD3 3
#define DD2 2
#define DD1 1
#define DD0 0
/* Port Input Pins (generic) */
#define PIN7 7
#define PIN6 6
#define PIN5 5
#define PIN4 4
#define PIN3 3
#define PIN2 2
#define PIN1 1
#define PIN0 0
/* Define PORTxn an Pxn values for all possible port pins if not defined already by io.h. */
/* PORT A */
#if defined(PA0) && !defined(PORTA0)
# define PORTA0 PA0
#elif defined(PORTA0) && !defined(PA0)
# 81 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PA0 PORTA0
#endif
# 83 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PA1) && !defined(PORTA1)
# define PORTA1 PA1
#elif defined(PORTA1) && !defined(PA1)
# 86 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PA1 PORTA1
#endif
# 88 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PA2) && !defined(PORTA2)
# define PORTA2 PA2
#elif defined(PORTA2) && !defined(PA2)
# 91 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PA2 PORTA2
#endif
# 93 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PA3) && !defined(PORTA3)
# define PORTA3 PA3
#elif defined(PORTA3) && !defined(PA3)
# 96 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PA3 PORTA3
#endif
# 98 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PA4) && !defined(PORTA4)
# define PORTA4 PA4
#elif defined(PORTA4) && !defined(PA4)
# 101 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PA4 PORTA4
#endif
# 103 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PA5) && !defined(PORTA5)
# define PORTA5 PA5
#elif defined(PORTA5) && !defined(PA5)
# 106 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PA5 PORTA5
#endif
# 108 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PA6) && !defined(PORTA6)
# define PORTA6 PA6
#elif defined(PORTA6) && !defined(PA6)
# 111 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PA6 PORTA6
#endif
# 113 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PA7) && !defined(PORTA7)
# define PORTA7 PA7
#elif defined(PORTA7) && !defined(PA7)
# 116 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PA7 PORTA7
#endif
# 118 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
/* PORT B */
#if defined(PB0) && !defined(PORTB0)
# define PORTB0 PB0
#elif defined(PORTB0) && !defined(PB0)
# 124 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PB0 PORTB0
#endif
# 126 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PB1) && !defined(PORTB1)
# define PORTB1 PB1
#elif defined(PORTB1) && !defined(PB1)
# 129 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PB1 PORTB1
#endif
# 131 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PB2) && !defined(PORTB2)
# define PORTB2 PB2
#elif defined(PORTB2) && !defined(PB2)
# 134 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PB2 PORTB2
#endif
# 136 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PB3) && !defined(PORTB3)
# define PORTB3 PB3
#elif defined(PORTB3) && !defined(PB3)
# 139 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PB3 PORTB3
#endif
# 141 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PB4) && !defined(PORTB4)
# define PORTB4 PB4
#elif defined(PORTB4) && !defined(PB4)
# 144 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PB4 PORTB4
#endif
# 146 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PB5) && !defined(PORTB5)
# define PORTB5 PB5
#elif defined(PORTB5) && !defined(PB5)
# 149 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PB5 PORTB5
#endif
# 151 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PB6) && !defined(PORTB6)
# define PORTB6 PB6
#elif defined(PORTB6) && !defined(PB6)
# 154 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PB6 PORTB6
#endif
# 156 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PB7) && !defined(PORTB7)
# define PORTB7 PB7
#elif defined(PORTB7) && !defined(PB7)
# 159 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PB7 PORTB7
#endif
# 161 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
/* PORT C */
#if defined(PC0) && !defined(PORTC0)
# define PORTC0 PC0
#elif defined(PORTC0) && !defined(PC0)
# 167 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PC0 PORTC0
#endif
# 169 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PC1) && !defined(PORTC1)
# define PORTC1 PC1
#elif defined(PORTC1) && !defined(PC1)
# 172 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PC1 PORTC1
#endif
# 174 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PC2) && !defined(PORTC2)
# define PORTC2 PC2
#elif defined(PORTC2) && !defined(PC2)
# 177 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PC2 PORTC2
#endif
# 179 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PC3) && !defined(PORTC3)
# define PORTC3 PC3
#elif defined(PORTC3) && !defined(PC3)
# 182 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PC3 PORTC3
#endif
# 184 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PC4) && !defined(PORTC4)
# define PORTC4 PC4
#elif defined(PORTC4) && !defined(PC4)
# 187 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PC4 PORTC4
#endif
# 189 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PC5) && !defined(PORTC5)
# define PORTC5 PC5
#elif defined(PORTC5) && !defined(PC5)
# 192 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PC5 PORTC5
#endif
# 194 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PC6) && !defined(PORTC6)
# define PORTC6 PC6
#elif defined(PORTC6) && !defined(PC6)
# 197 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PC6 PORTC6
#endif
# 199 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PC7) && !defined(PORTC7)
# define PORTC7 PC7
#elif defined(PORTC7) && !defined(PC7)
# 202 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PC7 PORTC7
#endif
# 204 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
/* PORT D */
#if defined(PD0) && !defined(PORTD0)
# define PORTD0 PD0
#elif defined(PORTD0) && !defined(PD0)
# 210 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PD0 PORTD0
#endif
# 212 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PD1) && !defined(PORTD1)
# define PORTD1 PD1
#elif defined(PORTD1) && !defined(PD1)
# 215 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PD1 PORTD1
#endif
# 217 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PD2) && !defined(PORTD2)
# define PORTD2 PD2
#elif defined(PORTD2) && !defined(PD2)
# 220 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PD2 PORTD2
#endif
# 222 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PD3) && !defined(PORTD3)
# define PORTD3 PD3
#elif defined(PORTD3) && !defined(PD3)
# 225 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PD3 PORTD3
#endif
# 227 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PD4) && !defined(PORTD4)
# define PORTD4 PD4
#elif defined(PORTD4) && !defined(PD4)
# 230 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PD4 PORTD4
#endif
# 232 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PD5) && !defined(PORTD5)
# define PORTD5 PD5
#elif defined(PORTD5) && !defined(PD5)
# 235 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PD5 PORTD5
#endif
# 237 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PD6) && !defined(PORTD6)
# define PORTD6 PD6
#elif defined(PORTD6) && !defined(PD6)
# 240 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PD6 PORTD6
#endif
# 242 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PD7) && !defined(PORTD7)
# define PORTD7 PD7
#elif defined(PORTD7) && !defined(PD7)
# 245 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PD7 PORTD7
#endif
# 247 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
/* PORT E */
#if defined(PE0) && !defined(PORTE0)
# define PORTE0 PE0
#elif defined(PORTE0) && !defined(PE0)
# 253 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PE0 PORTE0
#endif
# 255 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PE1) && !defined(PORTE1)
# define PORTE1 PE1
#elif defined(PORTE1) && !defined(PE1)
# 258 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PE1 PORTE1
#endif
# 260 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PE2) && !defined(PORTE2)
# define PORTE2 PE2
#elif defined(PORTE2) && !defined(PE2)
# 263 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PE2 PORTE2
#endif
# 265 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PE3) && !defined(PORTE3)
# define PORTE3 PE3
#elif defined(PORTE3) && !defined(PE3)
# 268 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PE3 PORTE3
#endif
# 270 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PE4) && !defined(PORTE4)
# define PORTE4 PE4
#elif defined(PORTE4) && !defined(PE4)
# 273 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PE4 PORTE4
#endif
# 275 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PE5) && !defined(PORTE5)
# define PORTE5 PE5
#elif defined(PORTE5) && !defined(PE5)
# 278 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PE5 PORTE5
#endif
# 280 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PE6) && !defined(PORTE6)
# define PORTE6 PE6
#elif defined(PORTE6) && !defined(PE6)
# 283 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PE6 PORTE6
#endif
# 285 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PE7) && !defined(PORTE7)
# define PORTE7 PE7
#elif defined(PORTE7) && !defined(PE7)
# 288 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PE7 PORTE7
#endif
# 290 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
/* PORT F */
#if defined(PF0) && !defined(PORTF0)
# define PORTF0 PF0
#elif defined(PORTF0) && !defined(PF0)
# 296 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PF0 PORTF0
#endif
# 298 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PF1) && !defined(PORTF1)
# define PORTF1 PF1
#elif defined(PORTF1) && !defined(PF1)
# 301 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PF1 PORTF1
#endif
# 303 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PF2) && !defined(PORTF2)
# define PORTF2 PF2
#elif defined(PORTF2) && !defined(PF2)
# 306 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PF2 PORTF2
#endif
# 308 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PF3) && !defined(PORTF3)
# define PORTF3 PF3
#elif defined(PORTF3) && !defined(PF3)
# 311 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PF3 PORTF3
#endif
# 313 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PF4) && !defined(PORTF4)
# define PORTF4 PF4
#elif defined(PORTF4) && !defined(PF4)
# 316 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PF4 PORTF4
#endif
# 318 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PF5) && !defined(PORTF5)
# define PORTF5 PF5
#elif defined(PORTF5) && !defined(PF5)
# 321 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PF5 PORTF5
#endif
# 323 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PF6) && !defined(PORTF6)
# define PORTF6 PF6
#elif defined(PORTF6) && !defined(PF6)
# 326 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PF6 PORTF6
#endif
# 328 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PF7) && !defined(PORTF7)
# define PORTF7 PF7
#elif defined(PORTF7) && !defined(PF7)
# 331 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PF7 PORTF7
#endif
# 333 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
/* PORT G */
#if defined(PG0) && !defined(PORTG0)
# define PORTG0 PG0
#elif defined(PORTG0) && !defined(PG0)
# 339 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PG0 PORTG0
#endif
# 341 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PG1) && !defined(PORTG1)
# define PORTG1 PG1
#elif defined(PORTG1) && !defined(PG1)
# 344 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PG1 PORTG1
#endif
# 346 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PG2) && !defined(PORTG2)
# define PORTG2 PG2
#elif defined(PORTG2) && !defined(PG2)
# 349 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PG2 PORTG2
#endif
# 351 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PG3) && !defined(PORTG3)
# define PORTG3 PG3
#elif defined(PORTG3) && !defined(PG3)
# 354 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PG3 PORTG3
#endif
# 356 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PG4) && !defined(PORTG4)
# define PORTG4 PG4
#elif defined(PORTG4) && !defined(PG4)
# 359 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PG4 PORTG4
#endif
# 361 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PG5) && !defined(PORTG5)
# define PORTG5 PG5
#elif defined(PORTG5) && !defined(PG5)
# 364 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PG5 PORTG5
#endif
# 366 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PG6) && !defined(PORTG6)
# define PORTG6 PG6
#elif defined(PORTG6) && !defined(PG6)
# 369 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PG6 PORTG6
#endif
# 371 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PG7) && !defined(PORTG7)
# define PORTG7 PG7
#elif defined(PORTG7) && !defined(PG7)
# 374 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PG7 PORTG7
#endif
# 376 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
/* PORT H */
#if defined(PH0) && !defined(PORTH0)
# define PORTH0 PH0
#elif defined(PORTH0) && !defined(PH0)
# 382 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PH0 PORTH0
#endif
# 384 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PH1) && !defined(PORTH1)
# define PORTH1 PH1
#elif defined(PORTH1) && !defined(PH1)
# 387 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PH1 PORTH1
#endif
# 389 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PH2) && !defined(PORTH2)
# define PORTH2 PH2
#elif defined(PORTH2) && !defined(PH2)
# 392 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PH2 PORTH2
#endif
# 394 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PH3) && !defined(PORTH3)
# define PORTH3 PH3
#elif defined(PORTH3) && !defined(PH3)
# 397 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PH3 PORTH3
#endif
# 399 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PH4) && !defined(PORTH4)
# define PORTH4 PH4
#elif defined(PORTH4) && !defined(PH4)
# 402 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PH4 PORTH4
#endif
# 404 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PH5) && !defined(PORTH5)
# define PORTH5 PH5
#elif defined(PORTH5) && !defined(PH5)
# 407 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PH5 PORTH5
#endif
# 409 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PH6) && !defined(PORTH6)
# define PORTH6 PH6
#elif defined(PORTH6) && !defined(PH6)
# 412 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PH6 PORTH6
#endif
# 414 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PH7) && !defined(PORTH7)
# define PORTH7 PH7
#elif defined(PORTH7) && !defined(PH7)
# 417 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PH7 PORTH7
#endif
# 419 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
/* PORT J */
#if defined(PJ0) && !defined(PORTJ0)
# define PORTJ0 PJ0
#elif defined(PORTJ0) && !defined(PJ0)
# 425 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PJ0 PORTJ0
#endif
# 427 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PJ1) && !defined(PORTJ1)
# define PORTJ1 PJ1
#elif defined(PORTJ1) && !defined(PJ1)
# 430 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PJ1 PORTJ1
#endif
# 432 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PJ2) && !defined(PORTJ2)
# define PORTJ2 PJ2
#elif defined(PORTJ2) && !defined(PJ2)
# 435 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PJ2 PORTJ2
#endif
# 437 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PJ3) && !defined(PORTJ3)
# define PORTJ3 PJ3
#elif defined(PORTJ3) && !defined(PJ3)
# 440 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PJ3 PORTJ3
#endif
# 442 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PJ4) && !defined(PORTJ4)
# define PORTJ4 PJ4
#elif defined(PORTJ4) && !defined(PJ4)
# 445 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PJ4 PORTJ4
#endif
# 447 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PJ5) && !defined(PORTJ5)
# define PORTJ5 PJ5
#elif defined(PORTJ5) && !defined(PJ5)
# 450 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PJ5 PORTJ5
#endif
# 452 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PJ6) && !defined(PORTJ6)
# define PORTJ6 PJ6
#elif defined(PORTJ6) && !defined(PJ6)
# 455 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PJ6 PORTJ6
#endif
# 457 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PJ7) && !defined(PORTJ7)
# define PORTJ7 PJ7
#elif defined(PORTJ7) && !defined(PJ7)
# 460 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PJ7 PORTJ7
#endif
# 462 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
/* PORT K */
#if defined(PK0) && !defined(PORTK0)
# define PORTK0 PK0
#elif defined(PORTK0) && !defined(PK0)
# 468 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PK0 PORTK0
#endif
# 470 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PK1) && !defined(PORTK1)
# define PORTK1 PK1
#elif defined(PORTK1) && !defined(PK1)
# 473 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PK1 PORTK1
#endif
# 475 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PK2) && !defined(PORTK2)
# define PORTK2 PK2
#elif defined(PORTK2) && !defined(PK2)
# 478 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PK2 PORTK2
#endif
# 480 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PK3) && !defined(PORTK3)
# define PORTK3 PK3
#elif defined(PORTK3) && !defined(PK3)
# 483 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PK3 PORTK3
#endif
# 485 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PK4) && !defined(PORTK4)
# define PORTK4 PK4
#elif defined(PORTK4) && !defined(PK4)
# 488 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PK4 PORTK4
#endif
# 490 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PK5) && !defined(PORTK5)
# define PORTK5 PK5
#elif defined(PORTK5) && !defined(PK5)
# 493 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PK5 PORTK5
#endif
# 495 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PK6) && !defined(PORTK6)
# define PORTK6 PK6
#elif defined(PORTK6) && !defined(PK6)
# 498 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PK6 PORTK6
#endif
# 500 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PK7) && !defined(PORTK7)
# define PORTK7 PK7
#elif defined(PORTK7) && !defined(PK7)
# 503 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PK7 PORTK7
#endif
# 505 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
/* PORT L */
#if defined(PL0) && !defined(PORTL0)
# define PORTL0 PL0
#elif defined(PORTL0) && !defined(PL0)
# 511 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PL0 PORTL0
#endif
# 513 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PL1) && !defined(PORTL1)
# define PORTL1 PL1
#elif defined(PORTL1) && !defined(PL1)
# 516 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PL1 PORTL1
#endif
# 518 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PL2) && !defined(PORTL2)
# define PORTL2 PL2
#elif defined(PORTL2) && !defined(PL2)
# 521 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PL2 PORTL2
#endif
# 523 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PL3) && !defined(PORTL3)
# define PORTL3 PL3
#elif defined(PORTL3) && !defined(PL3)
# 526 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PL3 PORTL3
#endif
# 528 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PL4) && !defined(PORTL4)
# define PORTL4 PL4
#elif defined(PORTL4) && !defined(PL4)
# 531 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PL4 PORTL4
#endif
# 533 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PL5) && !defined(PORTL5)
# define PORTL5 PL5
#elif defined(PORTL5) && !defined(PL5)
# 536 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PL5 PORTL5
#endif
# 538 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PL6) && !defined(PORTL6)
# define PORTL6 PL6
#elif defined(PORTL6) && !defined(PL6)
# 541 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PL6 PORTL6
#endif
# 543 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#if defined(PL7) && !defined(PORTL7)
# define PORTL7 PL7
#elif defined(PORTL7) && !defined(PL7)
# 546 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# define PL7 PORTL7
#endif
# 548 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
#endif /* _AVR_PORTPINS_H_ */
# 550 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/portpins.h"
# 617 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h" 2
#if 0 /* expanded by -frewrite-includes */
#include <avr/common.h>
#endif /* expanded by -frewrite-includes */
# 618 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 1 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h" 1
/* Copyright (c) 2007 Eric B. Weddington
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of the copyright holders nor the names of
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. */
/* $Id$ */
#ifndef _AVR_COMMON_H
#define _AVR_COMMON_H
#if 0 /* expanded by -frewrite-includes */
#include <avr/sfr_defs.h>
#endif /* expanded by -frewrite-includes */
# 37 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
# 38 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
/*
This purpose of this header is to define registers that have not been
previously defined in the individual device IO header files, and to define
other symbols that are common across AVR device families.
This file is designed to be included in <avr/io.h> after the individual
device IO header files, and after <avr/sfr_defs.h>
*/
/*------------ Registers Not Previously Defined ------------*/
/*
These are registers that are not previously defined in the individual
IO header files, OR they are defined here because they are used in parts of
avr-libc even if a device is not selected but a general architecture has
been selected.
*/
/*
Stack pointer register.
AVR architecture 1 has no RAM, thus no stack pointer.
All other architectures do have a stack pointer. Some devices have only
less than 256 bytes of possible RAM locations (128 Bytes of SRAM
and no option for external RAM), thus SPH is officially "reserved"
for them.
*/
#if __AVR_ARCH__ >= 100
# ifndef SPL
# define SPL _SFR_MEM8(0x3D)
# endif
# 73 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
# ifndef SPH
# define SPH _SFR_MEM8(0x3E)
# endif
# 76 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
# ifndef SP
# define SP _SFR_MEM16(0x3D)
# endif
# 79 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
#elif __AVR_ARCH__ != 1
# 80 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
# ifndef SPL
# define SPL _SFR_IO8(0x3D)
# endif
# 83 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
# if XRAMEND < 0x100 && !defined(__COMPILING_AVR_LIBC__)
# ifndef SP
# define SP _SFR_IO8(0x3D)
# endif
# 87 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
# else
# 88 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
# ifndef SP
# define SP _SFR_IO16(0x3D)
# endif
# 91 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
# ifndef SPH
# define SPH _SFR_IO8(0x3E)
# endif
# 94 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
# endif /* XRAMEND < 0x100 && !defined(__COMPILING_AVR_LIBC__) */
# 95 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
#endif /* __AVR_ARCH__ != 1 */
# 96 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
/* Status Register */
#ifndef SREG
# if __AVR_ARCH__ >= 100
# define SREG _SFR_MEM8(0x3F)
# else
# 103 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
# define SREG _SFR_IO8(0x3F)
# endif
# 105 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
#endif
# 106 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
/* SREG bit definitions */
#ifndef SREG_C
# define SREG_C (0)
#endif
# 112 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
#ifndef SREG_Z
# define SREG_Z (1)
#endif
# 115 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
#ifndef SREG_N
# define SREG_N (2)
#endif
# 118 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
#ifndef SREG_V
# define SREG_V (3)
#endif
# 121 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
#ifndef SREG_S
# define SREG_S (4)
#endif
# 124 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
#ifndef SREG_H
# define SREG_H (5)
#endif
# 127 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
#ifndef SREG_T
# define SREG_T (6)
#endif
# 130 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
#ifndef SREG_I
# define SREG_I (7)
#endif
# 133 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
#if defined(__COMPILING_AVR_LIBC__)
/* AVR 6 Architecture */
# if __AVR_ARCH__ == 6
# ifndef EIND
# define EIND _SFR_IO8(0X3C)
# endif
# 142 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
/* XMEGA Architectures */
# elif __AVR_ARCH__ >= 100
# 144 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
# ifndef EIND
# define EIND _SFR_MEM8(0x3C)
# endif
# 147 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
# endif
# 148 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
/*
Only few devices come without EEPROM. In order to assemble the
EEPROM library components without defining a specific device, we
keep the EEPROM-related definitions here.
*/
/* EEPROM Control Register */
# ifndef EECR
# define EECR _SFR_IO8(0x1C)
# endif
# 159 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
/* EEPROM Data Register */
# ifndef EEDR
# define EEDR _SFR_IO8(0x1D)
# endif
# 164 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
/* EEPROM Address Register */
# ifndef EEAR
# define EEAR _SFR_IO16(0x1E)
# endif
# 169 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
# ifndef EEARL
# define EEARL _SFR_IO8(0x1E)
# endif
# 172 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
# ifndef EEARH
# define EEARH _SFR_IO8(0x1F)
# endif
# 175 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
/* EEPROM Control Register bits */
# ifndef EERE
# define EERE (0)
# endif
# 180 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
# ifndef EEWE
# define EEWE (1)
# endif
# 183 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
# ifndef EEMWE
# define EEMWE (2)
# endif
# 186 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
# ifndef EERIE
# define EERIE (3)
# endif
# 189 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
/* RAM Page Z Select Register */
#ifndef RAMPZ
# if defined(__AVR_HAVE_RAMPZ__) && __AVR_HAVE_RAMPZ__
# if __AVR_ARCH__ >= 100
# define RAMPZ _SFR_MEM8(0x3B)
# else
# 197 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
# define RAMPZ _SFR_IO8(0x3B)
# endif
# 199 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
# endif
# 200 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
#endif
# 201 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
#endif /* __COMPILING_AVR_LIBC__ */
# 203 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
/*------------ Common Symbols ------------*/
/*
Generic definitions for registers that are common across multiple AVR devices
and families.
*/
/* Pointer registers definitions */
#if __AVR_ARCH__ != 1 /* avr1 does not have X and Y pointers */
# define XL r26
# define XH r27
# define YL r28
# define YH r29
#endif /* #if __AVR_ARCH__ != 1 */
# 220 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
#define ZL r30
#define ZH r31
/* Status Register */
#if defined(SREG)
# define AVR_STATUS_REG SREG
# if __AVR_ARCH__ >= 100
# define AVR_STATUS_ADDR _SFR_MEM_ADDR(SREG)
# else
# 230 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
# define AVR_STATUS_ADDR _SFR_IO_ADDR(SREG)
# endif
# 232 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
#endif
# 233 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
/* Stack Pointer (combined) Register */
#if defined(SP)
# define AVR_STACK_POINTER_REG SP
# if __AVR_ARCH__ >= 100
# define AVR_STACK_POINTER_ADDR _SFR_MEM_ADDR(SP)
# else
# 240 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
# define AVR_STACK_POINTER_ADDR _SFR_IO_ADDR(SP)
# endif
# 242 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
#endif
# 243 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
/* Stack Pointer High Register */
#if defined(SPH)
# define _HAVE_AVR_STACK_POINTER_HI 1
# define AVR_STACK_POINTER_HI_REG SPH
# if __AVR_ARCH__ >= 100
# define AVR_STACK_POINTER_HI_ADDR _SFR_MEM_ADDR(SPH)
# else
# 251 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
# define AVR_STACK_POINTER_HI_ADDR _SFR_IO_ADDR(SPH)
# endif
# 253 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
#endif
# 254 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
/* Stack Pointer Low Register */
#if defined(SPL)
# define AVR_STACK_POINTER_LO_REG SPL
# if __AVR_ARCH__ >= 100
# define AVR_STACK_POINTER_LO_ADDR _SFR_MEM_ADDR(SPL)
# else
# 261 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
# define AVR_STACK_POINTER_LO_ADDR _SFR_IO_ADDR(SPL)
# endif
# 263 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
#endif
# 264 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
/* RAMPD Register */
#if defined(RAMPD)
# define AVR_RAMPD_REG RAMPD
# if __AVR_ARCH__ >= 100
# define AVR_RAMPD_ADDR _SFR_MEM_ADDR(RAMPD)
# else
# 271 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
# define AVR_RAMPD_ADDR _SFR_IO_ADDR(RAMPD)
# endif
# 273 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
#endif
# 274 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
/* RAMPX Register */
#if defined(RAMPX)
# define AVR_RAMPX_REG RAMPX
# if __AVR_ARCH__ >= 100
# define AVR_RAMPX_ADDR _SFR_MEM_ADDR(RAMPX)
# else
# 281 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
# define AVR_RAMPX_ADDR _SFR_IO_ADDR(RAMPX)
# endif
# 283 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
#endif
# 284 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
/* RAMPY Register */
#if defined(RAMPY)
# define AVR_RAMPY_REG RAMPY
# if __AVR_ARCH__ >= 100
# define AVR_RAMPY_ADDR _SFR_MEM_ADDR(RAMPY)
# else
# 291 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
# define AVR_RAMPY_ADDR _SFR_IO_ADDR(RAMPY)
# endif
# 293 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
#endif
# 294 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
/* RAMPZ Register */
#if defined(RAMPZ)
# define AVR_RAMPZ_REG RAMPZ
# if __AVR_ARCH__ >= 100
# define AVR_RAMPZ_ADDR _SFR_MEM_ADDR(RAMPZ)
# else
# 301 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
# define AVR_RAMPZ_ADDR _SFR_IO_ADDR(RAMPZ)
# endif
# 303 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
#endif
# 304 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
/* Extended Indirect Register */
#if defined(EIND)
# define AVR_EXTENDED_INDIRECT_REG EIND
# if __AVR_ARCH__ >= 100
# define AVR_EXTENDED_INDIRECT_ADDR _SFR_MEM_ADDR(EIND)
# else
# 311 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
# define AVR_EXTENDED_INDIRECT_ADDR _SFR_IO_ADDR(EIND)
# endif
# 313 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
#endif
# 314 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
/*------------ Workaround to old compilers (4.1.2 and earlier) ------------*/
#ifndef __AVR_HAVE_MOVW__
# if defined(__AVR_ENHANCED__) && __AVR_ENHANCED__
# define __AVR_HAVE_MOVW__ 1
# endif
# 321 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
#endif
# 322 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
#ifndef __AVR_HAVE_LPMX__
# if defined(__AVR_ENHANCED__) && __AVR_ENHANCED__
# define __AVR_HAVE_LPMX__ 1
# endif
# 327 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
#endif
# 328 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
#ifndef __AVR_HAVE_MUL__
# if defined(__AVR_ENHANCED__) && __AVR_ENHANCED__
# define __AVR_HAVE_MUL__ 1
# endif
# 333 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
#endif
# 334 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
#endif /* _AVR_COMMON_H */
# 336 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/common.h"
# 619 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h" 2
#if 0 /* expanded by -frewrite-includes */
#include <avr/version.h>
#endif /* expanded by -frewrite-includes */
# 620 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 1 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/version.h" 1
/* Copyright (c) 2005, Joerg Wunsch -*- c -*-
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of the copyright holders nor the names of
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. */
/* $Id$ */
/** \defgroup avr_version <avr/version.h>: avr-libc version macros
\code #include <avr/version.h> \endcode
This header file defines macros that contain version numbers and
strings describing the current version of avr-libc.
The version number itself basically consists of three pieces that
are separated by a dot: the major number, the minor number, and
the revision number. For development versions (which use an odd
minor number), the string representation additionally gets the
date code (YYYYMMDD) appended.
This file will also be included by \c <avr/io.h>. That way,
portable tests can be implemented using \c <avr/io.h> that can be
used in code that wants to remain backwards-compatible to library
versions prior to the date when the library version API had been
added, as referenced but undefined C preprocessor macros
automatically evaluate to 0.
*/
#ifndef _AVR_VERSION_H_
#define _AVR_VERSION_H_
/** \ingroup avr_version
String literal representation of the current library version. */
#define __AVR_LIBC_VERSION_STRING__ "1.8.0svn"
/** \ingroup avr_version
Numerical representation of the current library version.
In the numerical representation, the major number is multiplied by
10000, the minor number by 100, and all three parts are then
added. It is intented to provide a monotonically increasing
numerical value that can easily be used in numerical checks.
*/
#define __AVR_LIBC_VERSION__ 10800UL
/** \ingroup avr_version
String literal representation of the release date. */
#define __AVR_LIBC_DATE_STRING__ "20111229"
/** \ingroup avr_version
Numerical representation of the release date. */
#define __AVR_LIBC_DATE_ 20111229UL
/** \ingroup avr_version
Library major version number. */
#define __AVR_LIBC_MAJOR__ 1
/** \ingroup avr_version
Library minor version number. */
#define __AVR_LIBC_MINOR__ 8
/** \ingroup avr_version
Library revision number. */
#define __AVR_LIBC_REVISION__ 0
#endif /* _AVR_VERSION_H_ */
# 91 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/version.h"
# 621 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h" 2
#if __AVR_ARCH__ >= 100
#if 0 /* expanded by -frewrite-includes */
# include <avr/xmega.h>
#endif /* expanded by -frewrite-includes */
# 623 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 624 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
#endif
# 625 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
/* Include fuse.h after individual IO header files. */
#if 0 /* expanded by -frewrite-includes */
#include <avr/fuse.h>
#endif /* expanded by -frewrite-includes */
# 627 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 1 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/fuse.h" 1
/* Copyright (c) 2007, Atmel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of the copyright holders nor the names of
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. */
/* $Id$ */
/* avr/fuse.h - Fuse API */
#ifndef _AVR_FUSE_H_
#define _AVR_FUSE_H_ 1
/* This file must be explicitly included by <avr/io.h>. */
#if !defined(_AVR_IO_H_)
#error "You must #include <avr/io.h> and not <avr/fuse.h> by itself."
#endif
# 42 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/fuse.h"
/** \file */
/** \defgroup avr_fuse <avr/fuse.h>: Fuse Support
\par Introduction
The Fuse API allows a user to specify the fuse settings for the specific
AVR device they are compiling for. These fuse settings will be placed
in a special section in the ELF output file, after linking.
Programming tools can take advantage of the fuse information embedded in
the ELF file, by extracting this information and determining if the fuses
need to be programmed before programming the Flash and EEPROM memories.
This also allows a single ELF file to contain all the
information needed to program an AVR.
To use the Fuse API, include the <avr/io.h> header file, which in turn
automatically includes the individual I/O header file and the <avr/fuse.h>
file. These other two files provides everything necessary to set the AVR
fuses.
\par Fuse API
Each I/O header file must define the FUSE_MEMORY_SIZE macro which is
defined to the number of fuse bytes that exist in the AVR device.
A new type, __fuse_t, is defined as a structure. The number of fields in
this structure are determined by the number of fuse bytes in the
FUSE_MEMORY_SIZE macro.
If FUSE_MEMORY_SIZE == 1, there is only a single field: byte, of type
unsigned char.
If FUSE_MEMORY_SIZE == 2, there are two fields: low, and high, of type
unsigned char.
If FUSE_MEMORY_SIZE == 3, there are three fields: low, high, and extended,
of type unsigned char.
If FUSE_MEMORY_SIZE > 3, there is a single field: byte, which is an array
of unsigned char with the size of the array being FUSE_MEMORY_SIZE.
A convenience macro, FUSEMEM, is defined as a GCC attribute for a
custom-named section of ".fuse".
A convenience macro, FUSES, is defined that declares a variable, __fuse, of
type __fuse_t with the attribute defined by FUSEMEM. This variable
allows the end user to easily set the fuse data.
\note If a device-specific I/O header file has previously defined FUSEMEM,
then FUSEMEM is not redefined. If a device-specific I/O header file has
previously defined FUSES, then FUSES is not redefined.
Each AVR device I/O header file has a set of defined macros which specify the
actual fuse bits available on that device. The AVR fuses have inverted
values, logical 1 for an unprogrammed (disabled) bit and logical 0 for a
programmed (enabled) bit. The defined macros for each individual fuse
bit represent this in their definition by a bit-wise inversion of a mask.
For example, the FUSE_EESAVE fuse in the ATmega128 is defined as:
\code
#define FUSE_EESAVE ~_BV(3)
\endcode
\note The _BV macro creates a bit mask from a bit number. It is then
inverted to represent logical values for a fuse memory byte.
To combine the fuse bits macros together to represent a whole fuse byte,
use the bitwise AND operator, like so:
\code
(FUSE_BOOTSZ0 & FUSE_BOOTSZ1 & FUSE_EESAVE & FUSE_SPIEN & FUSE_JTAGEN)
\endcode
Each device I/O header file also defines macros that provide default values
for each fuse byte that is available. LFUSE_DEFAULT is defined for a Low
Fuse byte. HFUSE_DEFAULT is defined for a High Fuse byte. EFUSE_DEFAULT
is defined for an Extended Fuse byte.
If FUSE_MEMORY_SIZE > 3, then the I/O header file defines macros that
provide default values for each fuse byte like so:
FUSE0_DEFAULT
FUSE1_DEFAULT
FUSE2_DEFAULT
FUSE3_DEFAULT
FUSE4_DEFAULT
....
\par API Usage Example
Putting all of this together is easy. Using C99's designated initializers:
\code
#include <avr/io.h>
FUSES =
{
.low = LFUSE_DEFAULT,
.high = (FUSE_BOOTSZ0 & FUSE_BOOTSZ1 & FUSE_EESAVE & FUSE_SPIEN & FUSE_JTAGEN),
.extended = EFUSE_DEFAULT,
};
int main(void)
{
return 0;
}
\endcode
Or, using the variable directly instead of the FUSES macro,
\code
#include <avr/io.h>
__fuse_t __fuse __attribute__((section (".fuse"))) =
{
.low = LFUSE_DEFAULT,
.high = (FUSE_BOOTSZ0 & FUSE_BOOTSZ1 & FUSE_EESAVE & FUSE_SPIEN & FUSE_JTAGEN),
.extended = EFUSE_DEFAULT,
};
int main(void)
{
return 0;
}
\endcode
If you are compiling in C++, you cannot use the designated intializers so
you must do:
\code
#include <avr/io.h>
FUSES =
{
LFUSE_DEFAULT, // .low
(FUSE_BOOTSZ0 & FUSE_BOOTSZ1 & FUSE_EESAVE & FUSE_SPIEN & FUSE_JTAGEN), // .high
EFUSE_DEFAULT, // .extended
};
int main(void)
{
return 0;
}
\endcode
However there are a number of caveats that you need to be aware of to
use this API properly.
Be sure to include <avr/io.h> to get all of the definitions for the API.
The FUSES macro defines a global variable to store the fuse data. This
variable is assigned to its own linker section. Assign the desired fuse
values immediately in the variable initialization.
The .fuse section in the ELF file will get its values from the initial
variable assignment ONLY. This means that you can NOT assign values to
this variable in functions and the new values will not be put into the
ELF .fuse section.
The global variable is declared in the FUSES macro has two leading
underscores, which means that it is reserved for the "implementation",
meaning the library, so it will not conflict with a user-named variable.
You must initialize ALL fields in the __fuse_t structure. This is because
the fuse bits in all bytes default to a logical 1, meaning unprogrammed.
Normal uninitialized data defaults to all locgial zeros. So it is vital that
all fuse bytes are initialized, even with default data. If they are not,
then the fuse bits may not programmed to the desired settings.
Be sure to have the -mmcu=<em>device</em> flag in your compile command line and
your linker command line to have the correct device selected and to have
the correct I/O header file included when you include <avr/io.h>.
You can print out the contents of the .fuse section in the ELF file by
using this command line:
\code
avr-objdump -s -j .fuse <ELF file>
\endcode
The section contents shows the address on the left, then the data going from
lower address to a higher address, left to right.
*/
#ifndef __ASSEMBLER__
#ifndef FUSEMEM
#define FUSEMEM __attribute__((__used__, __section__ (".fuse")))
#endif
# 228 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/fuse.h"
#if FUSE_MEMORY_SIZE > 3
typedef struct
{
unsigned char byte[FUSE_MEMORY_SIZE];
} __fuse_t;
#elif FUSE_MEMORY_SIZE == 3
# 238 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/fuse.h"
typedef struct
{
unsigned char low;
unsigned char high;
unsigned char extended;
} __fuse_t;
#elif FUSE_MEMORY_SIZE == 2
# 247 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/fuse.h"
typedef struct
{
unsigned char low;
unsigned char high;
} __fuse_t;
#elif FUSE_MEMORY_SIZE == 1
# 255 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/fuse.h"
typedef struct
{
unsigned char byte;
} __fuse_t;
#endif
# 262 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/fuse.h"
#if !defined(FUSES)
#if defined(__AVR_XMEGA__)
#define FUSES NVM_FUSES_t __fuse FUSEMEM
#else
# 267 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/fuse.h"
#define FUSES __fuse_t __fuse FUSEMEM
#endif
# 269 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/fuse.h"
#endif
# 270 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/fuse.h"
#endif /* !__ASSEMBLER__ */
# 273 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/fuse.h"
#endif /* _AVR_FUSE_H_ */
# 275 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/fuse.h"
# 628 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h" 2
/* Include lock.h after individual IO header files. */
#if 0 /* expanded by -frewrite-includes */
#include <avr/lock.h>
#endif /* expanded by -frewrite-includes */
# 630 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 1 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/lock.h" 1
/* Copyright (c) 2007, Atmel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of the copyright holders nor the names of
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. */
/* $Id$ */
/* avr/lock.h - Lock Bits API */
#ifndef _AVR_LOCK_H_
#define _AVR_LOCK_H_ 1
/** \file */
/** \defgroup avr_lock <avr/lock.h>: Lockbit Support
\par Introduction
The Lockbit API allows a user to specify the lockbit settings for the
specific AVR device they are compiling for. These lockbit settings will be
placed in a special section in the ELF output file, after linking.
Programming tools can take advantage of the lockbit information embedded in
the ELF file, by extracting this information and determining if the lockbits
need to be programmed after programming the Flash and EEPROM memories.
This also allows a single ELF file to contain all the
information needed to program an AVR.
To use the Lockbit API, include the <avr/io.h> header file, which in turn
automatically includes the individual I/O header file and the <avr/lock.h>
file. These other two files provides everything necessary to set the AVR
lockbits.
\par Lockbit API
Each I/O header file may define up to 3 macros that controls what kinds
of lockbits are available to the user.
If __LOCK_BITS_EXIST is defined, then two lock bits are available to the
user and 3 mode settings are defined for these two bits.
If __BOOT_LOCK_BITS_0_EXIST is defined, then the two BLB0 lock bits are
available to the user and 4 mode settings are defined for these two bits.
If __BOOT_LOCK_BITS_1_EXIST is defined, then the two BLB1 lock bits are
available to the user and 4 mode settings are defined for these two bits.
If __BOOT_LOCK_APPLICATION_TABLE_BITS_EXIST is defined then two lock bits
are available to set the locking mode for the Application Table Section
(which is used in the XMEGA family).
If __BOOT_LOCK_APPLICATION_BITS_EXIST is defined then two lock bits are
available to set the locking mode for the Application Section (which is used
in the XMEGA family).
If __BOOT_LOCK_BOOT_BITS_EXIST is defined then two lock bits are available
to set the locking mode for the Boot Loader Section (which is used in the
XMEGA family).
The AVR lockbit modes have inverted values, logical 1 for an unprogrammed
(disabled) bit and logical 0 for a programmed (enabled) bit. The defined
macros for each individual lock bit represent this in their definition by a
bit-wise inversion of a mask. For example, the LB_MODE_3 macro is defined
as:
\code
#define LB_MODE_3 (0xFC)
` \endcode
To combine the lockbit mode macros together to represent a whole byte,
use the bitwise AND operator, like so:
\code
(LB_MODE_3 & BLB0_MODE_2)
\endcode
<avr/lock.h> also defines a macro that provides a default lockbit value:
LOCKBITS_DEFAULT which is defined to be 0xFF.
See the AVR device specific datasheet for more details about these
lock bits and the available mode settings.
A convenience macro, LOCKMEM, is defined as a GCC attribute for a
custom-named section of ".lock".
A convenience macro, LOCKBITS, is defined that declares a variable, __lock,
of type unsigned char with the attribute defined by LOCKMEM. This variable
allows the end user to easily set the lockbit data.
\note If a device-specific I/O header file has previously defined LOCKMEM,
then LOCKMEM is not redefined. If a device-specific I/O header file has
previously defined LOCKBITS, then LOCKBITS is not redefined. LOCKBITS is
currently known to be defined in the I/O header files for the XMEGA devices.
\par API Usage Example
Putting all of this together is easy:
\code
#include <avr/io.h>
LOCKBITS = (LB_MODE_1 & BLB0_MODE_3 & BLB1_MODE_4);
int main(void)
{
return 0;
}
\endcode
Or:
\code
#include <avr/io.h>
unsigned char __lock __attribute__((section (".lock"))) =
(LB_MODE_1 & BLB0_MODE_3 & BLB1_MODE_4);
int main(void)
{
return 0;
}
\endcode
However there are a number of caveats that you need to be aware of to
use this API properly.
Be sure to include <avr/io.h> to get all of the definitions for the API.
The LOCKBITS macro defines a global variable to store the lockbit data. This
variable is assigned to its own linker section. Assign the desired lockbit
values immediately in the variable initialization.
The .lock section in the ELF file will get its values from the initial
variable assignment ONLY. This means that you can NOT assign values to
this variable in functions and the new values will not be put into the
ELF .lock section.
The global variable is declared in the LOCKBITS macro has two leading
underscores, which means that it is reserved for the "implementation",
meaning the library, so it will not conflict with a user-named variable.
You must initialize the lockbit variable to some meaningful value, even
if it is the default value. This is because the lockbits default to a
logical 1, meaning unprogrammed. Normal uninitialized data defaults to all
locgial zeros. So it is vital that all lockbits are initialized, even with
default data. If they are not, then the lockbits may not programmed to the
desired settings and can possibly put your device into an unrecoverable
state.
Be sure to have the -mmcu=<em>device</em> flag in your compile command line and
your linker command line to have the correct device selected and to have
the correct I/O header file included when you include <avr/io.h>.
You can print out the contents of the .lock section in the ELF file by
using this command line:
\code
avr-objdump -s -j .lock <ELF file>
\endcode
*/
#ifndef __ASSEMBLER__
#ifndef LOCKMEM
#define LOCKMEM __attribute__((__used__, __section__ (".lock")))
#endif
# 192 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/lock.h"
#ifndef LOCKBITS
#define LOCKBITS unsigned char __lock LOCKMEM
#endif
# 196 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/lock.h"
#endif /* !__ASSEMBLER */
# 198 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/lock.h"
/* Lock Bit Modes */
#if defined(__LOCK_BITS_EXIST)
#define LB_MODE_1 (0xFF)
#define LB_MODE_2 (0xFE)
#define LB_MODE_3 (0xFC)
#endif
# 206 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/lock.h"
#if defined(__BOOT_LOCK_BITS_0_EXIST)
#define BLB0_MODE_1 (0xFF)
#define BLB0_MODE_2 (0xFB)
#define BLB0_MODE_3 (0xF3)
#define BLB0_MODE_4 (0xF7)
#endif
# 213 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/lock.h"
#if defined(__BOOT_LOCK_BITS_1_EXIST)
#define BLB1_MODE_1 (0xFF)
#define BLB1_MODE_2 (0xEF)
#define BLB1_MODE_3 (0xCF)
#define BLB1_MODE_4 (0xDF)
#endif
# 220 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/lock.h"
#if defined(__BOOT_LOCK_APPLICATION_TABLE_BITS_EXIST)
#define BLBAT0 ~_BV(2)
#define BLBAT1 ~_BV(3)
#endif
# 225 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/lock.h"
#if defined(__BOOT_LOCK_APPLICATION_BITS_EXIST)
#define BLBA0 ~_BV(4)
#define BLBA1 ~_BV(5)
#endif
# 230 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/lock.h"
#if defined(__BOOT_LOCK_BOOT_BITS_EXIST)
#define BLBB0 ~_BV(6)
#define BLBB1 ~_BV(7)
#endif
# 235 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/lock.h"
#define LOCKBITS_DEFAULT (0xFF)
#endif /* _AVR_LOCK_H_ */
# 240 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/lock.h"
# 631 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h" 2
#endif /* _AVR_IO_H_ */
# 633 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h"
# 89 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/pgmspace.h" 2
#ifndef __ATTR_CONST__
#define __ATTR_CONST__ __attribute__((__const__))
#endif
# 93 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/pgmspace.h"
#ifndef __ATTR_PROGMEM__
#define __ATTR_PROGMEM__ __attribute__((__progmem__))
#endif
# 97 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/pgmspace.h"
#ifndef __ATTR_PURE__
#define __ATTR_PURE__ __attribute__((__pure__))
#endif
# 101 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/pgmspace.h"
/**
\ingroup avr_pgmspace
\def PROGMEM
Attribute to use in order to declare an object being located in
flash ROM.
*/
#define PROGMEM __ATTR_PROGMEM__
#ifdef __cplusplus
extern "C" {
#endif
# 114 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/pgmspace.h"
#if defined(__DOXYGEN__)
/*
* Doxygen doesn't grok the appended attribute syntax of
* GCC, and confuses the typedefs with function decls, so
* supply a doxygen-friendly view.
*/
/**
\ingroup avr_pgmspace
\typedef prog_void
\note DEPRECATED
This typedef is now deprecated because the usage of the __progmem__
attribute on a type is not supported in GCC. However, the use of the
__progmem__ attribute on a variable declaration is supported, and this is
now the recommended usage.
The typedef is only visible if the macro __PROG_TYPES_COMPAT__
has been defined before including <avr/pgmspace.h> (either by a
#define directive, or by a -D compiler option.)
Type of a "void" object located in flash ROM. Does not make much
sense by itself, but can be used to declare a "void *" object in
flash ROM.
*/
typedef void PROGMEM prog_void;
/**
\ingroup avr_pgmspace
\typedef prog_char
\note DEPRECATED
This typedef is now deprecated because the usage of the __progmem__
attribute on a type is not supported in GCC. However, the use of the
__progmem__ attribute on a variable declaration is supported, and this is
now the recommended usage.
The typedef is only visible if the macro __PROG_TYPES_COMPAT__
has been defined before including <avr/pgmspace.h> (either by a
#define directive, or by a -D compiler option.)
Type of a "char" object located in flash ROM.
*/
typedef char PROGMEM prog_char;
/**
\ingroup avr_pgmspace
\typedef prog_uchar
\note DEPRECATED
This typedef is now deprecated because the usage of the __progmem__
attribute on a type is not supported in GCC. However, the use of the
__progmem__ attribute on a variable declaration is supported, and this is
now the recommended usage.
The typedef is only visible if the macro __PROG_TYPES_COMPAT__
has been defined before including <avr/pgmspace.h> (either by a
#define directive, or by a -D compiler option.)
Type of an "unsigned char" object located in flash ROM.
*/
typedef unsigned char PROGMEM prog_uchar;
/**
\ingroup avr_pgmspace
\typedef prog_int8_t
\note DEPRECATED
This typedef is now deprecated because the usage of the __progmem__
attribute on a type is not supported in GCC. However, the use of the
__progmem__ attribute on a variable declaration is supported, and this is
now the recommended usage.
The typedef is only visible if the macro __PROG_TYPES_COMPAT__
has been defined before including <avr/pgmspace.h> (either by a
#define directive, or by a -D compiler option.)
Type of an "int8_t" object located in flash ROM.
*/
typedef int8_t PROGMEM prog_int8_t;
/**
\ingroup avr_pgmspace
\typedef prog_uint8_t
\note DEPRECATED
This typedef is now deprecated because the usage of the __progmem__
attribute on a type is not supported in GCC. However, the use of the
__progmem__ attribute on a variable declaration is supported, and this is
now the recommended usage.
The typedef is only visible if the macro __PROG_TYPES_COMPAT__
has been defined before including <avr/pgmspace.h> (either by a
#define directive, or by a -D compiler option.)
Type of an "uint8_t" object located in flash ROM.
*/
typedef uint8_t PROGMEM prog_uint8_t;
/**
\ingroup avr_pgmspace
\typedef prog_int16_t
\note DEPRECATED
This typedef is now deprecated because the usage of the __progmem__
attribute on a type is not supported in GCC. However, the use of the
__progmem__ attribute on a variable declaration is supported, and this is
now the recommended usage.
The typedef is only visible if the macro __PROG_TYPES_COMPAT__
has been defined before including <avr/pgmspace.h> (either by a
#define directive, or by a -D compiler option.)
Type of an "int16_t" object located in flash ROM.
*/
typedef int16_t PROGMEM prog_int16_t;
/**
\ingroup avr_pgmspace
\typedef prog_uint16_t
\note DEPRECATED
This typedef is now deprecated because the usage of the __progmem__
attribute on a type is not supported in GCC. However, the use of the
__progmem__ attribute on a variable declaration is supported, and this is
now the recommended usage.
The typedef is only visible if the macro __PROG_TYPES_COMPAT__
has been defined before including <avr/pgmspace.h> (either by a
#define directive, or by a -D compiler option.)
Type of an "uint16_t" object located in flash ROM.
*/
typedef uint16_t PROGMEM prog_uint16_t;
/**
\ingroup avr_pgmspace
\typedef prog_int32_t
\note DEPRECATED
This typedef is now deprecated because the usage of the __progmem__
attribute on a type is not supported in GCC. However, the use of the
__progmem__ attribute on a variable declaration is supported, and this is
now the recommended usage.
The typedef is only visible if the macro __PROG_TYPES_COMPAT__
has been defined before including <avr/pgmspace.h> (either by a
#define directive, or by a -D compiler option.)
Type of an "int32_t" object located in flash ROM.
*/
typedef int32_t PROGMEM prog_int32_t;
/**
\ingroup avr_pgmspace
\typedef prog_uint32_t
\note DEPRECATED
This typedef is now deprecated because the usage of the __progmem__
attribute on a type is not supported in GCC. However, the use of the
__progmem__ attribute on a variable declaration is supported, and this is
now the recommended usage.
The typedef is only visible if the macro __PROG_TYPES_COMPAT__
has been defined before including <avr/pgmspace.h> (either by a
#define directive, or by a -D compiler option.)
Type of an "uint32_t" object located in flash ROM.
*/
typedef uint32_t PROGMEM prog_uint32_t;
/**
\ingroup avr_pgmspace
\typedef prog_int64_t
\note DEPRECATED
This typedef is now deprecated because the usage of the __progmem__
attribute on a type is not supported in GCC. However, the use of the
__progmem__ attribute on a variable declaration is supported, and this is
now the recommended usage.
The typedef is only visible if the macro __PROG_TYPES_COMPAT__
has been defined before including <avr/pgmspace.h> (either by a
#define directive, or by a -D compiler option.)
Type of an "int64_t" object located in flash ROM.
\note This type is not available when the compiler
option -mint8 is in effect.
*/
typedef int64_t PROGMEM prog_int64_t;
/**
\ingroup avr_pgmspace
\typedef prog_uint64_t
\note DEPRECATED
This typedef is now deprecated because the usage of the __progmem__
attribute on a type is not supported in GCC. However, the use of the
__progmem__ attribute on a variable declaration is supported, and this is
now the recommended usage.
The typedef is only visible if the macro __PROG_TYPES_COMPAT__
has been defined before including <avr/pgmspace.h> (either by a
#define directive, or by a -D compiler option.)
Type of an "uint64_t" object located in flash ROM.
\note This type is not available when the compiler
option -mint8 is in effect.
*/
typedef uint64_t PROGMEM prog_uint64_t;
/** \ingroup avr_pgmspace
\def PGM_P
Used to declare a variable that is a pointer to a string in program
space. */
#ifndef PGM_P
#define PGM_P const char *
#endif
# 337 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/pgmspace.h"
/** \ingroup avr_pgmspace
\def PGM_VOID_P
Used to declare a generic pointer to an object in program space. */
#ifndef PGM_VOID_P
#define PGM_VOID_P const void *
#endif
# 346 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/pgmspace.h"
#elif defined(__PROG_TYPES_COMPAT__) /* !DOXYGEN */
# 348 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/pgmspace.h"
typedef void prog_void __attribute__((__progmem__,deprecated("prog_void type is deprecated.")));
typedef char prog_char __attribute__((__progmem__,deprecated("prog_char type is deprecated.")));
typedef unsigned char prog_uchar __attribute__((__progmem__,deprecated("prog_uchar type is deprecated.")));
typedef int8_t prog_int8_t __attribute__((__progmem__,deprecated("prog_int8_t type is deprecated.")));
typedef uint8_t prog_uint8_t __attribute__((__progmem__,deprecated("prog_uint8_t type is deprecated.")));
typedef int16_t prog_int16_t __attribute__((__progmem__,deprecated("prog_int16_t type is deprecated.")));
typedef uint16_t prog_uint16_t __attribute__((__progmem__,deprecated("prog_uint16_t type is deprecated.")));
typedef int32_t prog_int32_t __attribute__((__progmem__,deprecated("prog_int32_t type is deprecated.")));
typedef uint32_t prog_uint32_t __attribute__((__progmem__,deprecated("prog_uint32_t type is deprecated.")));
#if !__USING_MINT8
typedef int64_t prog_int64_t __attribute__((__progmem__,deprecated("prog_int64_t type is deprecated.")));
typedef uint64_t prog_uint64_t __attribute__((__progmem__,deprecated("prog_uint64_t type is deprecated.")));
#endif
# 362 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/pgmspace.h"
#ifndef PGM_P
#define PGM_P const prog_char *
#endif
# 366 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/pgmspace.h"
#ifndef PGM_VOID_P
#define PGM_VOID_P const prog_void *
#endif
# 370 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/pgmspace.h"
#else /* !defined(__DOXYGEN__), !defined(__PROG_TYPES_COMPAT__) */
# 372 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/pgmspace.h"
#ifndef PGM_P
#define PGM_P const char *
#endif
# 376 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/pgmspace.h"
#ifndef PGM_VOID_P
#define PGM_VOID_P const void *
#endif
# 380 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/pgmspace.h"
#endif /* defined(__DOXYGEN__), defined(__PROG_TYPES_COMPAT__) */
# 381 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/pgmspace.h"
/* Although in C, we can get away with just using __c, it does not work in
C++. We need to use &__c[0] to avoid the compiler puking. Dave Hylands
explaned it thusly,
Let's suppose that we use PSTR("Test"). In this case, the type returned
by __c is a prog_char[5] and not a prog_char *. While these are
compatible, they aren't the same thing (especially in C++). The type
returned by &__c[0] is a prog_char *, which explains why it works
fine. */
#if defined(__DOXYGEN__)
/*
* The #define below is just a dummy that serves documentation
* purposes only.
*/
/** \ingroup avr_pgmspace
\def PSTR(s)
Used to declare a static pointer to a string in program space. */
# define PSTR(s) ((const PROGMEM char *)(s))
#else /* !DOXYGEN */
# 403 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/pgmspace.h"
/* The real thing. */
# define PSTR(s) (__extension__({static const char __c[] PROGMEM = (s); &__c[0];}))
#endif /* DOXYGEN */
# 406 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/pgmspace.h"
#define __LPM_classic__(addr) \
(__extension__({ \
uint16_t __addr16 = (uint16_t)(addr); \
uint8_t __result; \
__asm__ __volatile__ \
( \
"lpm" "\n\t" \
"mov %0, r0" "\n\t" \
: "=r" (__result) \
: "z" (__addr16) \
: "r0" \
); \
__result; \
}))
#define __LPM_tiny__(addr) \
(__extension__({ \
uint16_t __addr16 = (uint16_t)(addr) + __AVR_TINY_PM_BASE_ADDRESS__; \
uint8_t __result; \
__asm__ \
( \
"ld %0, z" "\n\t" \
: "=r" (__result) \
: "z" (__addr16) \
); \
__result; \
}))
#define __LPM_enhanced__(addr) \
(__extension__({ \
uint16_t __addr16 = (uint16_t)(addr); \
uint8_t __result; \
__asm__ __volatile__ \
( \
"lpm %0, Z" "\n\t" \
: "=r" (__result) \
: "z" (__addr16) \
); \
__result; \
}))
#define __LPM_word_classic__(addr) \
(__extension__({ \
uint16_t __addr16 = (uint16_t)(addr); \
uint16_t __result; \
__asm__ __volatile__ \
( \
"lpm" "\n\t" \
"mov %A0, r0" "\n\t" \
"adiw r30, 1" "\n\t" \
"lpm" "\n\t" \
"mov %B0, r0" "\n\t" \
: "=r" (__result), "=z" (__addr16) \
: "1" (__addr16) \
: "r0" \
); \
__result; \
}))
#define __LPM_word_tiny__(addr) \
(__extension__({ \
uint16_t __addr16 = (uint16_t)(addr) + __AVR_TINY_PM_BASE_ADDRESS__; \
uint16_t __result; \
__asm__ \
( \
"ld %A0, z+" "\n\t" \
"ld %B0, z" "\n\t" \
: "=r" (__result), "=z" (__addr16) \
: "1" (__addr16) \
); \
__result; \
}))
#define __LPM_word_enhanced__(addr) \
(__extension__({ \
uint16_t __addr16 = (uint16_t)(addr); \
uint16_t __result; \
__asm__ __volatile__ \
( \
"lpm %A0, Z+" "\n\t" \
"lpm %B0, Z" "\n\t" \
: "=r" (__result), "=z" (__addr16) \
: "1" (__addr16) \
); \
__result; \
}))
#define __LPM_dword_classic__(addr) \
(__extension__({ \
uint16_t __addr16 = (uint16_t)(addr); \
uint32_t __result; \
__asm__ __volatile__ \
( \
"lpm" "\n\t" \
"mov %A0, r0" "\n\t" \
"adiw r30, 1" "\n\t" \
"lpm" "\n\t" \
"mov %B0, r0" "\n\t" \
"adiw r30, 1" "\n\t" \
"lpm" "\n\t" \
"mov %C0, r0" "\n\t" \
"adiw r30, 1" "\n\t" \
"lpm" "\n\t" \
"mov %D0, r0" "\n\t" \
: "=r" (__result), "=z" (__addr16) \
: "1" (__addr16) \
: "r0" \
); \
__result; \
}))
#define __LPM_dword_tiny__(addr) \
(__extension__({ \
uint16_t __addr16 = (uint16_t)(addr) + __AVR_TINY_PM_BASE_ADDRESS__; \
uint32_t __result; \
__asm__ \
( \
"ld %A0, z+" "\n\t" \
"ld %B0, z+" "\n\t" \
"ld %C0, z+" "\n\t" \
"ld %D0, z" "\n\t" \
: "=r" (__result), "=z" (__addr16) \
: "1" (__addr16) \
); \
__result; \
}))
#define __LPM_dword_enhanced__(addr) \
(__extension__({ \
uint16_t __addr16 = (uint16_t)(addr); \
uint32_t __result; \
__asm__ __volatile__ \
( \
"lpm %A0, Z+" "\n\t" \
"lpm %B0, Z+" "\n\t" \
"lpm %C0, Z+" "\n\t" \
"lpm %D0, Z" "\n\t" \
: "=r" (__result), "=z" (__addr16) \
: "1" (__addr16) \
); \
__result; \
}))
#define __LPM_float_classic__(addr) \
(__extension__({ \
uint16_t __addr16 = (uint16_t)(addr); \
float __result; \
__asm__ __volatile__ \
( \
"lpm" "\n\t" \
"mov %A0, r0" "\n\t" \
"adiw r30, 1" "\n\t" \
"lpm" "\n\t" \
"mov %B0, r0" "\n\t" \
"adiw r30, 1" "\n\t" \
"lpm" "\n\t" \
"mov %C0, r0" "\n\t" \
"adiw r30, 1" "\n\t" \
"lpm" "\n\t" \
"mov %D0, r0" "\n\t" \
: "=r" (__result), "=z" (__addr16) \
: "1" (__addr16) \
: "r0" \
); \
__result; \
}))
#define __LPM_float_tiny__(addr) \
(__extension__({ \
uint16_t __addr16 = (uint16_t)(addr) + __AVR_TINY_PM_BASE_ADDRESS__; \
float __result; \
__asm__ \
( \
"ld %A0, z+" "\n\t" \
"ld %B0, z+" "\n\t" \
"ld %C0, z+" "\n\t" \
"ld %D0, z" "\n\t" \
: "=r" (__result), "=z" (__addr16) \
: "1" (__addr16) \
); \
__result; \
}))
#define __LPM_float_enhanced__(addr) \
(__extension__({ \
uint16_t __addr16 = (uint16_t)(addr); \
float __result; \
__asm__ __volatile__ \
( \
"lpm %A0, Z+" "\n\t" \
"lpm %B0, Z+" "\n\t" \
"lpm %C0, Z+" "\n\t" \
"lpm %D0, Z" "\n\t" \
: "=r" (__result), "=z" (__addr16) \
: "1" (__addr16) \
); \
__result; \
}))
#if defined (__AVR_HAVE_LPMX__)
#define __LPM(addr) __LPM_enhanced__(addr)
#define __LPM_word(addr) __LPM_word_enhanced__(addr)
#define __LPM_dword(addr) __LPM_dword_enhanced__(addr)
#define __LPM_float(addr) __LPM_float_enhanced__(addr)
/*
Macro to read data from program memory for avr tiny parts(tiny 4/5/9/10/20/40).
why:
- LPM instruction is not available in AVR_TINY instruction set.
- Programs are executed starting from address 0x0000 in program memory.
But it must be addressed starting from 0x4000 when accessed via data memory.
Reference: TINY device (ATTiny 4,5,9,10,20 and 40) datasheets
Bug: avrtc-536
*/
#elif defined (__AVR_TINY__)
# 621 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/pgmspace.h"
#define __LPM(addr) __LPM_tiny__(addr)
#define __LPM_word(addr) __LPM_word_tiny__(addr)
#define __LPM_dword(addr) __LPM_dword_tiny__(addr)
#define __LPM_float(addr) __LPM_float_tiny__(addr)
#else
# 626 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/pgmspace.h"
#define __LPM(addr) __LPM_classic__(addr)
#define __LPM_word(addr) __LPM_word_classic__(addr)
#define __LPM_dword(addr) __LPM_dword_classic__(addr)
#define __LPM_float(addr) __LPM_float_classic__(addr)
#endif
# 631 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/pgmspace.h"
/** \ingroup avr_pgmspace
\def pgm_read_byte_near(address_short)
Read a byte from the program space with a 16-bit (near) address.
\note The address is a byte address.
The address is in the program space. */
#define pgm_read_byte_near(address_short) __LPM((uint16_t)(address_short))
/** \ingroup avr_pgmspace
\def pgm_read_word_near(address_short)
Read a word from the program space with a 16-bit (near) address.
\note The address is a byte address.
The address is in the program space. */
#define pgm_read_word_near(address_short) __LPM_word((uint16_t)(address_short))
/** \ingroup avr_pgmspace
\def pgm_read_dword_near(address_short)
Read a double word from the program space with a 16-bit (near) address.
\note The address is a byte address.
The address is in the program space. */
#define pgm_read_dword_near(address_short) \
__LPM_dword((uint16_t)(address_short))
/** \ingroup avr_pgmspace
\def pgm_read_float_near(address_short)
Read a float from the program space with a 16-bit (near) address.
\note The address is a byte address.
The address is in the program space. */
#define pgm_read_float_near(address_short) \
__LPM_float((uint16_t)(address_short))
/** \ingroup avr_pgmspace
\def pgm_read_ptr_near(address_short)
Read a pointer from the program space with a 16-bit (near) address.
\note The address is a byte address.
The address is in the program space. */
#define pgm_read_ptr_near(address_short) \
(void*)__LPM_word((uint16_t)(address_short))
#if defined(RAMPZ) || defined(__DOXYGEN__)
/* Only for devices with more than 64K of program memory.
RAMPZ must be defined (see iom103.h, iom128.h).
*/
/* The classic functions are needed for ATmega103. */
#define __ELPM_classic__(addr) \
(__extension__({ \
uint32_t __addr32 = (uint32_t)(addr); \
uint8_t __result; \
__asm__ __volatile__ \
( \
"out %2, %C1" "\n\t" \
"mov r31, %B1" "\n\t" \
"mov r30, %A1" "\n\t" \
"elpm" "\n\t" \
"mov %0, r0" "\n\t" \
: "=r" (__result) \
: "r" (__addr32), \
"I" (_SFR_IO_ADDR(RAMPZ)) \
: "r0", "r30", "r31" \
); \
__result; \
}))
#define __ELPM_enhanced__(addr) \
(__extension__({ \
uint32_t __addr32 = (uint32_t)(addr); \
uint8_t __result; \
__asm__ __volatile__ \
( \
"out %2, %C1" "\n\t" \
"movw r30, %1" "\n\t" \
"elpm %0, Z+" "\n\t" \
: "=r" (__result) \
: "r" (__addr32), \
"I" (_SFR_IO_ADDR(RAMPZ)) \
: "r30", "r31" \
); \
__result; \
}))
#define __ELPM_xmega__(addr) \
(__extension__({ \
uint32_t __addr32 = (uint32_t)(addr); \
uint8_t __result; \
__asm__ __volatile__ \
( \
"in __tmp_reg__, %2" "\n\t" \
"out %2, %C1" "\n\t" \
"movw r30, %1" "\n\t" \
"elpm %0, Z+" "\n\t" \
"out %2, __tmp_reg__" \
: "=r" (__result) \
: "r" (__addr32), \
"I" (_SFR_IO_ADDR(RAMPZ)) \
: "r30", "r31" \
); \
__result; \
}))
#define __ELPM_word_classic__(addr) \
(__extension__({ \
uint32_t __addr32 = (uint32_t)(addr); \
uint16_t __result; \
__asm__ __volatile__ \
( \
"out %2, %C1" "\n\t" \
"mov r31, %B1" "\n\t" \
"mov r30, %A1" "\n\t" \
"elpm" "\n\t" \
"mov %A0, r0" "\n\t" \
"in r0, %2" "\n\t" \
"adiw r30, 1" "\n\t" \
"adc r0, __zero_reg__" "\n\t" \
"out %2, r0" "\n\t" \
"elpm" "\n\t" \
"mov %B0, r0" "\n\t" \
: "=r" (__result) \
: "r" (__addr32), \
"I" (_SFR_IO_ADDR(RAMPZ)) \
: "r0", "r30", "r31" \
); \
__result; \
}))
#define __ELPM_word_enhanced__(addr) \
(__extension__({ \
uint32_t __addr32 = (uint32_t)(addr); \
uint16_t __result; \
__asm__ __volatile__ \
( \
"out %2, %C1" "\n\t" \
"movw r30, %1" "\n\t" \
"elpm %A0, Z+" "\n\t" \
"elpm %B0, Z" "\n\t" \
: "=r" (__result) \
: "r" (__addr32), \
"I" (_SFR_IO_ADDR(RAMPZ)) \
: "r30", "r31" \
); \
__result; \
}))
#define __ELPM_word_xmega__(addr) \
(__extension__({ \
uint32_t __addr32 = (uint32_t)(addr); \
uint16_t __result; \
__asm__ __volatile__ \
( \
"in __tmp_reg__, %2" "\n\t" \
"out %2, %C1" "\n\t" \
"movw r30, %1" "\n\t" \
"elpm %A0, Z+" "\n\t" \
"elpm %B0, Z" "\n\t" \
"out %2, __tmp_reg__" \
: "=r" (__result) \
: "r" (__addr32), \
"I" (_SFR_IO_ADDR(RAMPZ)) \
: "r30", "r31" \
); \
__result; \
}))
#define __ELPM_dword_classic__(addr) \
(__extension__({ \
uint32_t __addr32 = (uint32_t)(addr); \
uint32_t __result; \
__asm__ __volatile__ \
( \
"out %2, %C1" "\n\t" \
"mov r31, %B1" "\n\t" \
"mov r30, %A1" "\n\t" \
"elpm" "\n\t" \
"mov %A0, r0" "\n\t" \
"in r0, %2" "\n\t" \
"adiw r30, 1" "\n\t" \
"adc r0, __zero_reg__" "\n\t" \
"out %2, r0" "\n\t" \
"elpm" "\n\t" \
"mov %B0, r0" "\n\t" \
"in r0, %2" "\n\t" \
"adiw r30, 1" "\n\t" \
"adc r0, __zero_reg__" "\n\t" \
"out %2, r0" "\n\t" \
"elpm" "\n\t" \
"mov %C0, r0" "\n\t" \
"in r0, %2" "\n\t" \
"adiw r30, 1" "\n\t" \
"adc r0, __zero_reg__" "\n\t" \
"out %2, r0" "\n\t" \
"elpm" "\n\t" \
"mov %D0, r0" "\n\t" \
: "=r" (__result) \
: "r" (__addr32), \
"I" (_SFR_IO_ADDR(RAMPZ)) \
: "r0", "r30", "r31" \
); \
__result; \
}))
#define __ELPM_dword_enhanced__(addr) \
(__extension__({ \
uint32_t __addr32 = (uint32_t)(addr); \
uint32_t __result; \
__asm__ __volatile__ \
( \
"out %2, %C1" "\n\t" \
"movw r30, %1" "\n\t" \
"elpm %A0, Z+" "\n\t" \
"elpm %B0, Z+" "\n\t" \
"elpm %C0, Z+" "\n\t" \
"elpm %D0, Z" "\n\t" \
: "=r" (__result) \
: "r" (__addr32), \
"I" (_SFR_IO_ADDR(RAMPZ)) \
: "r30", "r31" \
); \
__result; \
}))
#define __ELPM_dword_xmega__(addr) \
(__extension__({ \
uint32_t __addr32 = (uint32_t)(addr); \
uint32_t __result; \
__asm__ __volatile__ \
( \
"in __tmp_reg__, %2" "\n\t" \
"out %2, %C1" "\n\t" \
"movw r30, %1" "\n\t" \
"elpm %A0, Z+" "\n\t" \
"elpm %B0, Z+" "\n\t" \
"elpm %C0, Z+" "\n\t" \
"elpm %D0, Z" "\n\t" \
"out %2, __tmp_reg__" \
: "=r" (__result) \
: "r" (__addr32), \
"I" (_SFR_IO_ADDR(RAMPZ)) \
: "r30", "r31" \
); \
__result; \
}))
#define __ELPM_float_classic__(addr) \
(__extension__({ \
uint32_t __addr32 = (uint32_t)(addr); \
float __result; \
__asm__ __volatile__ \
( \
"out %2, %C1" "\n\t" \
"mov r31, %B1" "\n\t" \
"mov r30, %A1" "\n\t" \
"elpm" "\n\t" \
"mov %A0, r0" "\n\t" \
"in r0, %2" "\n\t" \
"adiw r30, 1" "\n\t" \
"adc r0, __zero_reg__" "\n\t" \
"out %2, r0" "\n\t" \
"elpm" "\n\t" \
"mov %B0, r0" "\n\t" \
"in r0, %2" "\n\t" \
"adiw r30, 1" "\n\t" \
"adc r0, __zero_reg__" "\n\t" \
"out %2, r0" "\n\t" \
"elpm" "\n\t" \
"mov %C0, r0" "\n\t" \
"in r0, %2" "\n\t" \
"adiw r30, 1" "\n\t" \
"adc r0, __zero_reg__" "\n\t" \
"out %2, r0" "\n\t" \
"elpm" "\n\t" \
"mov %D0, r0" "\n\t" \
: "=r" (__result) \
: "r" (__addr32), \
"I" (_SFR_IO_ADDR(RAMPZ)) \
: "r0", "r30", "r31" \
); \
__result; \
}))
#define __ELPM_float_enhanced__(addr) \
(__extension__({ \
uint32_t __addr32 = (uint32_t)(addr); \
float __result; \
__asm__ __volatile__ \
( \
"out %2, %C1" "\n\t" \
"movw r30, %1" "\n\t" \
"elpm %A0, Z+" "\n\t" \
"elpm %B0, Z+" "\n\t" \
"elpm %C0, Z+" "\n\t" \
"elpm %D0, Z" "\n\t" \
: "=r" (__result) \
: "r" (__addr32), \
"I" (_SFR_IO_ADDR(RAMPZ)) \
: "r30", "r31" \
); \
__result; \
}))
#define __ELPM_float_xmega__(addr) \
(__extension__({ \
uint32_t __addr32 = (uint32_t)(addr); \
float __result; \
__asm__ __volatile__ \
( \
"in __tmp_reg__, %2" "\n\t" \
"out %2, %C1" "\n\t" \
"movw r30, %1" "\n\t" \
"elpm %A0, Z+" "\n\t" \
"elpm %B0, Z+" "\n\t" \
"elpm %C0, Z+" "\n\t" \
"elpm %D0, Z" "\n\t" \
"out %2, __tmp_reg__" \
: "=r" (__result) \
: "r" (__addr32), \
"I" (_SFR_IO_ADDR(RAMPZ)) \
: "r30", "r31" \
); \
__result; \
}))
/*
Check for architectures that implement RAMPD (avrxmega3, avrxmega5,
avrxmega7) as they need to save/restore RAMPZ for ELPM macros so it does
not interfere with data accesses.
*/
#if defined (__AVR_HAVE_RAMPD__)
#define __ELPM(addr) __ELPM_xmega__(addr)
#define __ELPM_word(addr) __ELPM_word_xmega__(addr)
#define __ELPM_dword(addr) __ELPM_dword_xmega__(addr)
#define __ELPM_float(addr) __ELPM_float_xmega__(addr)
#else
# 972 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/pgmspace.h"
#if defined (__AVR_HAVE_LPMX__)
#define __ELPM(addr) __ELPM_enhanced__(addr)
#define __ELPM_word(addr) __ELPM_word_enhanced__(addr)
#define __ELPM_dword(addr) __ELPM_dword_enhanced__(addr)
#define __ELPM_float(addr) __ELPM_float_enhanced__(addr)
#else
# 981 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/pgmspace.h"
#define __ELPM(addr) __ELPM_classic__(addr)
#define __ELPM_word(addr) __ELPM_word_classic__(addr)
#define __ELPM_dword(addr) __ELPM_dword_classic__(addr)
#define __ELPM_float(addr) __ELPM_float_classic__(addr)
#endif /* __AVR_HAVE_LPMX__ */
# 988 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/pgmspace.h"
#endif /* __AVR_HAVE_RAMPD__ */
# 990 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/pgmspace.h"
/** \ingroup avr_pgmspace
\def pgm_read_byte_far(address_long)
Read a byte from the program space with a 32-bit (far) address.
\note The address is a byte address.
The address is in the program space. */
#define pgm_read_byte_far(address_long) __ELPM((uint32_t)(address_long))
/** \ingroup avr_pgmspace
\def pgm_read_word_far(address_long)
Read a word from the program space with a 32-bit (far) address.
\note The address is a byte address.
The address is in the program space. */
#define pgm_read_word_far(address_long) __ELPM_word((uint32_t)(address_long))
/** \ingroup avr_pgmspace
\def pgm_read_dword_far(address_long)
Read a double word from the program space with a 32-bit (far) address.
\note The address is a byte address.
The address is in the program space. */
#define pgm_read_dword_far(address_long) __ELPM_dword((uint32_t)(address_long))
/** \ingroup avr_pgmspace
\def pgm_read_float_far(address_long)
Read a float from the program space with a 32-bit (far) address.
\note The address is a byte address.
The address is in the program space. */
#define pgm_read_float_far(address_long) __ELPM_float((uint32_t)(address_long))
/** \ingroup avr_pgmspace
\def pgm_read_ptr_far(address_long)
Read a pointer from the program space with a 32-bit (far) address.
\note The address is a byte address.
The address is in the program space. */
#define pgm_read_ptr_far(address_long) (void*)__ELPM_word((uint32_t)(address_long))
#endif /* RAMPZ or __DOXYGEN__ */
# 1038 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/pgmspace.h"
/** \ingroup avr_pgmspace
\def pgm_read_byte(address_short)
Read a byte from the program space with a 16-bit (near) address.
\note The address is a byte address.
The address is in the program space. */
#define pgm_read_byte(address_short) pgm_read_byte_near(address_short)
/** \ingroup avr_pgmspace
\def pgm_read_word(address_short)
Read a word from the program space with a 16-bit (near) address.
\note The address is a byte address.
The address is in the program space. */
#define pgm_read_word(address_short) pgm_read_word_near(address_short)
/** \ingroup avr_pgmspace
\def pgm_read_dword(address_short)
Read a double word from the program space with a 16-bit (near) address.
\note The address is a byte address.
The address is in the program space. */
#define pgm_read_dword(address_short) pgm_read_dword_near(address_short)
/** \ingroup avr_pgmspace
\def pgm_read_float(address_short)
Read a float from the program space with a 16-bit (near) address.
\note The address is a byte address.
The address is in the program space. */
#define pgm_read_float(address_short) pgm_read_float_near(address_short)
/** \ingroup avr_pgmspace
\def pgm_read_ptr(address_short)
Read a pointer from the program space with a 16-bit (near) address.
\note The address is a byte address.
The address is in the program space. */
#define pgm_read_ptr(address_short) pgm_read_ptr_near(address_short)
/* pgm_get_far_address() macro
This macro facilitates the obtention of a 32 bit "far" pointer (only 24 bits
used) to data even passed the 64KB limit for the 16 bit ordinary pointer. It
is similar to the '&' operator, with some limitations.
Comments:
- The overhead is minimal and it's mainly due to the 32 bit size operation.
- 24 bit sizes guarantees the code compatibility for use in future devices.
- hh8() is an undocumented feature but seems to give the third significant byte
of a 32 bit data and accepts symbols, complementing the functionality of hi8()
and lo8(). There is not an equivalent assembler function to get the high
significant byte.
- 'var' has to be resolved at linking time as an existing symbol, i.e, a simple
type variable name, an array name (not an indexed element of the array, if the
index is a constant the compiler does not complain but fails to get the address
if optimization is enabled), a struct name or a struct field name, a function
identifier, a linker defined identifier,...
- The returned value is the identifier's VMA (virtual memory address) determined
by the linker and falls in the corresponding memory region. The AVR Harvard
architecture requires non overlapping VMA areas for the multiple address spaces
in the processor: Flash ROM, RAM, and EEPROM. Typical offset for this are
0x00000000, 0x00800xx0, and 0x00810000 respectively, derived from the linker
script used and linker options. The value returned can be seen then as a
universal pointer.
*/
#define pgm_get_far_address(var) \
({ \
uint_farptr_t tmp; \
\
__asm__ __volatile__( \
\
"ldi %A0, lo8(%1)" "\n\t" \
"ldi %B0, hi8(%1)" "\n\t" \
"ldi %C0, hh8(%1)" "\n\t" \
"clr %D0" "\n\t" \
: \
"=d" (tmp) \
: \
"p" (&(var)) \
); \
tmp; \
})
extern const void * memchr_P(const void *, int __val, size_t __len) __ATTR_CONST__;
extern int memcmp_P(const void *, const void *, size_t) __ATTR_PURE__;
extern void *memccpy_P(void *, const void *, int __val, size_t);
extern void *memcpy_P(void *, const void *, size_t);
extern void *memmem_P(const void *, size_t, const void *, size_t) __ATTR_PURE__;
extern const void * memrchr_P(const void *, int __val, size_t __len) __ATTR_CONST__;
extern char *strcat_P(char *, const char *);
extern const char * strchr_P(const char *, int __val) __ATTR_CONST__;
extern const char * strchrnul_P(const char *, int __val) __ATTR_CONST__;
extern int strcmp_P(const char *, const char *) __ATTR_PURE__;
extern char *strcpy_P(char *, const char *);
extern int strcasecmp_P(const char *, const char *) __ATTR_PURE__;
extern char *strcasestr_P(const char *, const char *) __ATTR_PURE__;
extern size_t strcspn_P(const char *__s, const char * __reject) __ATTR_PURE__;
extern size_t strlcat_P (char *, const char *, size_t );
extern size_t strlcpy_P (char *, const char *, size_t );
extern size_t __strlen_P(const char *) __ATTR_CONST__; /* program memory can't change */
extern size_t strnlen_P(const char *, size_t) __ATTR_CONST__; /* program memory can't change */
extern int strncmp_P(const char *, const char *, size_t) __ATTR_PURE__;
extern int strncasecmp_P(const char *, const char *, size_t) __ATTR_PURE__;
extern char *strncat_P(char *, const char *, size_t);
extern char *strncpy_P(char *, const char *, size_t);
extern char *strpbrk_P(const char *__s, const char * __accept) __ATTR_PURE__;
extern const char * strrchr_P(const char *, int __val) __ATTR_CONST__;
extern char *strsep_P(char **__sp, const char * __delim);
extern size_t strspn_P(const char *__s, const char * __accept) __ATTR_PURE__;
extern char *strstr_P(const char *, const char *) __ATTR_PURE__;
extern char *strtok_P(char *__s, const char * __delim);
extern char *strtok_rP(char *__s, const char * __delim, char **__last);
extern size_t strlen_PF (uint_farptr_t src) __ATTR_CONST__; /* program memory can't change */
extern size_t strnlen_PF (uint_farptr_t src, size_t len) __ATTR_CONST__; /* program memory can't change */
extern void *memcpy_PF (void *dest, uint_farptr_t src, size_t len);
extern char *strcpy_PF (char *dest, uint_farptr_t src);
extern char *strncpy_PF (char *dest, uint_farptr_t src, size_t len);
extern char *strcat_PF (char *dest, uint_farptr_t src);
extern size_t strlcat_PF (char *dst, uint_farptr_t src, size_t siz);
extern char *strncat_PF (char *dest, uint_farptr_t src, size_t len);
extern int strcmp_PF (const char *s1, uint_farptr_t s2) __ATTR_PURE__;
extern int strncmp_PF (const char *s1, uint_farptr_t s2, size_t n) __ATTR_PURE__;
extern int strcasecmp_PF (const char *s1, uint_farptr_t s2) __ATTR_PURE__;
extern int strncasecmp_PF (const char *s1, uint_farptr_t s2, size_t n) __ATTR_PURE__;
extern char *strstr_PF (const char *s1, uint_farptr_t s2);
extern size_t strlcpy_PF (char *dst, uint_farptr_t src, size_t siz);
extern int memcmp_PF(const void *, uint_farptr_t, size_t) __ATTR_PURE__;
__attribute__((__always_inline__)) static inline size_t strlen_P(const char * s);
static inline size_t strlen_P(const char *s) {
return __builtin_constant_p(__builtin_strlen(s))
? __builtin_strlen(s) : __strlen_P(s);
}
#ifdef __cplusplus
}
#endif
# 1195 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/pgmspace.h"
#endif /* __PGMSPACE_H_ */
# 1197 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/pgmspace.h"
# 29 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h" 2
#if 0 /* expanded by -frewrite-includes */
#include <avr/io.h>
#endif /* expanded by -frewrite-includes */
# 29 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
# 30 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
#if 0 /* expanded by -frewrite-includes */
#include <avr/interrupt.h>
#endif /* expanded by -frewrite-includes */
# 30 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
# 1 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h" 1
/* Copyright (c) 2002,2005,2007 Marek Michalkiewicz
Copyright (c) 2007, Dean Camera
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of the copyright holders nor the names of
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. */
/* $Id$ */
#ifndef _AVR_INTERRUPT_H_
#define _AVR_INTERRUPT_H_
#if 0 /* expanded by -frewrite-includes */
#include <avr/io.h>
#endif /* expanded by -frewrite-includes */
# 38 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h"
# 39 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h"
#if !defined(__DOXYGEN__) && !defined(__STRINGIFY)
/* Auxiliary macro for ISR_ALIAS(). */
#define __STRINGIFY(x) #x
#endif /* !defined(__DOXYGEN__) */
# 44 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h"
/**
\file
\@{
*/
/** \name Global manipulation of the interrupt flag
The global interrupt flag is maintained in the I bit of the status
register (SREG).
Handling interrupts frequently requires attention regarding atomic
access to objects that could be altered by code running within an
interrupt context, see <util/atomic.h>.
Frequently, interrupts are being disabled for periods of time in
order to perform certain operations without being disturbed; see
\ref optim_code_reorder for things to be taken into account with
respect to compiler optimizations.
*/
#if defined(__DOXYGEN__)
/** \def sei()
\ingroup avr_interrupts
Enables interrupts by setting the global interrupt mask. This function
actually compiles into a single line of assembly, so there is no function
call overhead. However, the macro also implies a <i>memory barrier</i>
which can cause additional loss of optimization.
In order to implement atomic access to multi-byte objects,
consider using the macros from <util/atomic.h>, rather than
implementing them manually with cli() and sei().
*/
#define sei()
#else /* !DOXYGEN */
# 81 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h"
# define sei() __asm__ __volatile__ ("sei" ::: "memory")
#endif /* DOXYGEN */
# 83 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h"
#if defined(__DOXYGEN__)
/** \def cli()
\ingroup avr_interrupts
Disables all interrupts by clearing the global interrupt mask. This function
actually compiles into a single line of assembly, so there is no function
call overhead. However, the macro also implies a <i>memory barrier</i>
which can cause additional loss of optimization.
In order to implement atomic access to multi-byte objects,
consider using the macros from <util/atomic.h>, rather than
implementing them manually with cli() and sei().
*/
#define cli()
#else /* !DOXYGEN */
# 99 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h"
# define cli() __asm__ __volatile__ ("cli" ::: "memory")
#endif /* DOXYGEN */
# 101 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h"
/** \name Macros for writing interrupt handler functions */
#if defined(__DOXYGEN__)
/** \def ISR(vector [, attributes])
\ingroup avr_interrupts
Introduces an interrupt handler function (interrupt service
routine) that runs with global interrupts initially disabled
by default with no attributes specified.
The attributes are optional and alter the behaviour and resultant
generated code of the interrupt routine. Multiple attributes may
be used for a single function, with a space seperating each
attribute.
Valid attributes are ISR_BLOCK, ISR_NOBLOCK, ISR_NAKED and
ISR_ALIASOF(vect).
\c vector must be one of the interrupt vector names that are
valid for the particular MCU type.
*/
# define ISR(vector, [attributes])
#else /* real code */
# 127 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h"
#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
# define __INTR_ATTRS used, externally_visible
#else /* GCC < 4.1 */
# 131 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h"
# define __INTR_ATTRS used
#endif
# 133 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h"
#ifdef __cplusplus
# define ISR(vector, ...) \
extern "C" void vector (void) __attribute__ ((signal,__INTR_ATTRS)) __VA_ARGS__; \
void vector (void)
#else
# 139 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h"
# define ISR(vector, ...) \
void vector (void) __attribute__ ((signal,__INTR_ATTRS)) __VA_ARGS__; \
void vector (void)
#endif
# 143 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h"
#endif /* DOXYGEN */
# 145 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h"
#if defined(__DOXYGEN__)
/** \def SIGNAL(vector)
\ingroup avr_interrupts
Introduces an interrupt handler function that runs with global interrupts
initially disabled.
This is the same as the ISR macro without optional attributes.
\deprecated Do not use SIGNAL() in new code. Use ISR() instead.
*/
# define SIGNAL(vector)
#else /* real code */
# 158 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h"
#ifdef __cplusplus
# define SIGNAL(vector) \
extern "C" void vector(void) __attribute__ ((signal, __INTR_ATTRS)); \
void vector (void)
#else
# 164 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h"
# define SIGNAL(vector) \
void vector (void) __attribute__ ((signal, __INTR_ATTRS)); \
void vector (void)
#endif
# 168 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h"
#endif /* DOXYGEN */
# 170 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h"
#if defined(__DOXYGEN__)
/** \def EMPTY_INTERRUPT(vector)
\ingroup avr_interrupts
Defines an empty interrupt handler function. This will not generate
any prolog or epilog code and will only return from the ISR. Do not
define a function body as this will define it for you.
Example:
\code EMPTY_INTERRUPT(ADC_vect);\endcode */
# define EMPTY_INTERRUPT(vector)
#else /* real code */
# 182 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h"
#ifdef __cplusplus
# define EMPTY_INTERRUPT(vector) \
extern "C" void vector(void) __attribute__ ((signal,naked,__INTR_ATTRS)); \
void vector (void) { __asm__ __volatile__ ("reti" ::); }
#else
# 188 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h"
# define EMPTY_INTERRUPT(vector) \
void vector (void) __attribute__ ((signal,naked,__INTR_ATTRS)); \
void vector (void) { __asm__ __volatile__ ("reti" ::); }
#endif
# 192 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h"
#endif /* DOXYGEN */
# 194 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h"
#if defined(__DOXYGEN__)
/** \def ISR_ALIAS(vector, target_vector)
\ingroup avr_interrupts
Aliases a given vector to another one in the same manner as the
ISR_ALIASOF attribute for the ISR() macro. Unlike the ISR_ALIASOF
attribute macro however, this is compatible for all versions of
GCC rather than just GCC version 4.2 onwards.
\note This macro creates a trampoline function for the aliased
macro. This will result in a two cycle penalty for the aliased
vector compared to the ISR the vector is aliased to, due to the
JMP/RJMP opcode used.
\deprecated
For new code, the use of ISR(..., ISR_ALIASOF(...)) is
recommended.
Example:
\code
ISR(INT0_vect)
{
PORTB = 42;
}
ISR_ALIAS(INT1_vect, INT0_vect);
\endcode
*/
# define ISR_ALIAS(vector, target_vector)
#else /* real code */
# 226 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h"
#ifdef __cplusplus
# if defined(__AVR_MEGA__) && __AVR_MEGA__
# define ISR_ALIAS(vector, tgt) extern "C" void vector (void) \
__attribute__((signal, naked, __INTR_ATTRS)); \
void vector (void) { asm volatile ("jmp " __STRINGIFY(tgt) ::); }
# else /* !__AVR_MEGA */
# 233 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h"
# define ISR_ALIAS(vector, tgt) extern "C" void vector (void) \
__attribute__((signal, naked, __INTR_ATTRS)); \
void vector (void) { asm volatile ("rjmp " __STRINGIFY(tgt) ::); }
# endif /* __AVR_MEGA__ */
# 237 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h"
#else /* !__cplusplus */
# 238 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h"
# if defined(__AVR_MEGA__) && __AVR_MEGA__
# define ISR_ALIAS(vector, tgt) void vector (void) \
__attribute__((signal, naked, __INTR_ATTRS)); \
void vector (void) { asm volatile ("jmp " __STRINGIFY(tgt) ::); }
# else /* !__AVR_MEGA */
# 243 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h"
# define ISR_ALIAS(vector, tgt) void vector (void) \
__attribute__((signal, naked, __INTR_ATTRS)); \
void vector (void) { asm volatile ("rjmp " __STRINGIFY(tgt) ::); }
# endif /* __AVR_MEGA__ */
# 247 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h"
#endif /* __cplusplus */
# 248 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h"
#endif /* DOXYGEN */
# 250 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h"
#if defined(__DOXYGEN__)
/** \def reti()
\ingroup avr_interrupts
Returns from an interrupt routine, enabling global interrupts. This should
be the last command executed before leaving an ISR defined with the ISR_NAKED
attribute.
This macro actually compiles into a single line of assembly, so there is
no function call overhead.
*/
# define reti()
#else /* !DOXYGEN */
# 264 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h"
# define reti() __asm__ __volatile__ ("reti" ::)
#endif /* DOXYGEN */
# 266 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h"
#if defined(__DOXYGEN__)
/** \def BADISR_vect
\ingroup avr_interrupts
\code #include <avr/interrupt.h> \endcode
This is a vector which is aliased to __vector_default, the vector
executed when an ISR fires with no accompanying ISR handler. This
may be used along with the ISR() macro to create a catch-all for
undefined but used ISRs for debugging purposes.
*/
# define BADISR_vect
#else /* !DOXYGEN */
# 280 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h"
# define BADISR_vect __vector_default
#endif /* DOXYGEN */
# 282 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h"
/** \name ISR attributes */
#if defined(__DOXYGEN__)
/** \def ISR_BLOCK
\ingroup avr_interrupts
Identical to an ISR with no attributes specified. Global
interrupts are initially disabled by the AVR hardware when
entering the ISR, without the compiler modifying this state.
Use this attribute in the attributes parameter of the ISR macro.
*/
# define ISR_BLOCK
/** \def ISR_NOBLOCK
\ingroup avr_interrupts
ISR runs with global interrupts initially enabled. The interrupt
enable flag is activated by the compiler as early as possible
within the ISR to ensure minimal processing delay for nested
interrupts.
This may be used to create nested ISRs, however care should be
taken to avoid stack overflows, or to avoid infinitely entering
the ISR for those cases where the AVR hardware does not clear the
respective interrupt flag before entering the ISR.
Use this attribute in the attributes parameter of the ISR macro.
*/
# define ISR_NOBLOCK
/** \def ISR_NAKED
\ingroup avr_interrupts
ISR is created with no prologue or epilogue code. The user code is
responsible for preservation of the machine state including the
SREG register, as well as placing a reti() at the end of the
interrupt routine.
Use this attribute in the attributes parameter of the ISR macro.
*/
# define ISR_NAKED
/** \def ISR_ALIASOF(target_vector)
\ingroup avr_interrupts
The ISR is linked to another ISR, specified by the vect parameter.
This is compatible with GCC 4.2 and greater only.
Use this attribute in the attributes parameter of the ISR macro.
*/
# define ISR_ALIASOF(target_vector)
#else /* !DOXYGEN */
# 336 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h"
# define ISR_BLOCK
# define ISR_NOBLOCK __attribute__((interrupt))
# define ISR_NAKED __attribute__((naked))
# define ISR_ALIASOF(v) __attribute__((alias(__STRINGIFY(v))))
#endif /* DOXYGEN */
# 341 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h"
/* \@} */
#endif
# 345 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/interrupt.h"
# 31 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h" 2
#if 0 /* expanded by -frewrite-includes */
#include "binary.h"
#endif /* expanded by -frewrite-includes */
# 32 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
# 1 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/binary.h" 1
/*
binary.h - Definitions for binary constants
Copyright (c) 2006 David A. Mellis. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef Binary_h
#define Binary_h
#define B0 0
#define B00 0
#define B000 0
#define B0000 0
#define B00000 0
#define B000000 0
#define B0000000 0
#define B00000000 0
#define B1 1
#define B01 1
#define B001 1
#define B0001 1
#define B00001 1
#define B000001 1
#define B0000001 1
#define B00000001 1
#define B10 2
#define B010 2
#define B0010 2
#define B00010 2
#define B000010 2
#define B0000010 2
#define B00000010 2
#define B11 3
#define B011 3
#define B0011 3
#define B00011 3
#define B000011 3
#define B0000011 3
#define B00000011 3
#define B100 4
#define B0100 4
#define B00100 4
#define B000100 4
#define B0000100 4
#define B00000100 4
#define B101 5
#define B0101 5
#define B00101 5
#define B000101 5
#define B0000101 5
#define B00000101 5
#define B110 6
#define B0110 6
#define B00110 6
#define B000110 6
#define B0000110 6
#define B00000110 6
#define B111 7
#define B0111 7
#define B00111 7
#define B000111 7
#define B0000111 7
#define B00000111 7
#define B1000 8
#define B01000 8
#define B001000 8
#define B0001000 8
#define B00001000 8
#define B1001 9
#define B01001 9
#define B001001 9
#define B0001001 9
#define B00001001 9
#define B1010 10
#define B01010 10
#define B001010 10
#define B0001010 10
#define B00001010 10
#define B1011 11
#define B01011 11
#define B001011 11
#define B0001011 11
#define B00001011 11
#define B1100 12
#define B01100 12
#define B001100 12
#define B0001100 12
#define B00001100 12
#define B1101 13
#define B01101 13
#define B001101 13
#define B0001101 13
#define B00001101 13
#define B1110 14
#define B01110 14
#define B001110 14
#define B0001110 14
#define B00001110 14
#define B1111 15
#define B01111 15
#define B001111 15
#define B0001111 15
#define B00001111 15
#define B10000 16
#define B010000 16
#define B0010000 16
#define B00010000 16
#define B10001 17
#define B010001 17
#define B0010001 17
#define B00010001 17
#define B10010 18
#define B010010 18
#define B0010010 18
#define B00010010 18
#define B10011 19
#define B010011 19
#define B0010011 19
#define B00010011 19
#define B10100 20
#define B010100 20
#define B0010100 20
#define B00010100 20
#define B10101 21
#define B010101 21
#define B0010101 21
#define B00010101 21
#define B10110 22
#define B010110 22
#define B0010110 22
#define B00010110 22
#define B10111 23
#define B010111 23
#define B0010111 23
#define B00010111 23
#define B11000 24
#define B011000 24
#define B0011000 24
#define B00011000 24
#define B11001 25
#define B011001 25
#define B0011001 25
#define B00011001 25
#define B11010 26
#define B011010 26
#define B0011010 26
#define B00011010 26
#define B11011 27
#define B011011 27
#define B0011011 27
#define B00011011 27
#define B11100 28
#define B011100 28
#define B0011100 28
#define B00011100 28
#define B11101 29
#define B011101 29
#define B0011101 29
#define B00011101 29
#define B11110 30
#define B011110 30
#define B0011110 30
#define B00011110 30
#define B11111 31
#define B011111 31
#define B0011111 31
#define B00011111 31
#define B100000 32
#define B0100000 32
#define B00100000 32
#define B100001 33
#define B0100001 33
#define B00100001 33
#define B100010 34
#define B0100010 34
#define B00100010 34
#define B100011 35
#define B0100011 35
#define B00100011 35
#define B100100 36
#define B0100100 36
#define B00100100 36
#define B100101 37
#define B0100101 37
#define B00100101 37
#define B100110 38
#define B0100110 38
#define B00100110 38
#define B100111 39
#define B0100111 39
#define B00100111 39
#define B101000 40
#define B0101000 40
#define B00101000 40
#define B101001 41
#define B0101001 41
#define B00101001 41
#define B101010 42
#define B0101010 42
#define B00101010 42
#define B101011 43
#define B0101011 43
#define B00101011 43
#define B101100 44
#define B0101100 44
#define B00101100 44
#define B101101 45
#define B0101101 45
#define B00101101 45
#define B101110 46
#define B0101110 46
#define B00101110 46
#define B101111 47
#define B0101111 47
#define B00101111 47
#define B110000 48
#define B0110000 48
#define B00110000 48
#define B110001 49
#define B0110001 49
#define B00110001 49
#define B110010 50
#define B0110010 50
#define B00110010 50
#define B110011 51
#define B0110011 51
#define B00110011 51
#define B110100 52
#define B0110100 52
#define B00110100 52
#define B110101 53
#define B0110101 53
#define B00110101 53
#define B110110 54
#define B0110110 54
#define B00110110 54
#define B110111 55
#define B0110111 55
#define B00110111 55
#define B111000 56
#define B0111000 56
#define B00111000 56
#define B111001 57
#define B0111001 57
#define B00111001 57
#define B111010 58
#define B0111010 58
#define B00111010 58
#define B111011 59
#define B0111011 59
#define B00111011 59
#define B111100 60
#define B0111100 60
#define B00111100 60
#define B111101 61
#define B0111101 61
#define B00111101 61
#define B111110 62
#define B0111110 62
#define B00111110 62
#define B111111 63
#define B0111111 63
#define B00111111 63
#define B1000000 64
#define B01000000 64
#define B1000001 65
#define B01000001 65
#define B1000010 66
#define B01000010 66
#define B1000011 67
#define B01000011 67
#define B1000100 68
#define B01000100 68
#define B1000101 69
#define B01000101 69
#define B1000110 70
#define B01000110 70
#define B1000111 71
#define B01000111 71
#define B1001000 72
#define B01001000 72
#define B1001001 73
#define B01001001 73
#define B1001010 74
#define B01001010 74
#define B1001011 75
#define B01001011 75
#define B1001100 76
#define B01001100 76
#define B1001101 77
#define B01001101 77
#define B1001110 78
#define B01001110 78
#define B1001111 79
#define B01001111 79
#define B1010000 80
#define B01010000 80
#define B1010001 81
#define B01010001 81
#define B1010010 82
#define B01010010 82
#define B1010011 83
#define B01010011 83
#define B1010100 84
#define B01010100 84
#define B1010101 85
#define B01010101 85
#define B1010110 86
#define B01010110 86
#define B1010111 87
#define B01010111 87
#define B1011000 88
#define B01011000 88
#define B1011001 89
#define B01011001 89
#define B1011010 90
#define B01011010 90
#define B1011011 91
#define B01011011 91
#define B1011100 92
#define B01011100 92
#define B1011101 93
#define B01011101 93
#define B1011110 94
#define B01011110 94
#define B1011111 95
#define B01011111 95
#define B1100000 96
#define B01100000 96
#define B1100001 97
#define B01100001 97
#define B1100010 98
#define B01100010 98
#define B1100011 99
#define B01100011 99
#define B1100100 100
#define B01100100 100
#define B1100101 101
#define B01100101 101
#define B1100110 102
#define B01100110 102
#define B1100111 103
#define B01100111 103
#define B1101000 104
#define B01101000 104
#define B1101001 105
#define B01101001 105
#define B1101010 106
#define B01101010 106
#define B1101011 107
#define B01101011 107
#define B1101100 108
#define B01101100 108
#define B1101101 109
#define B01101101 109
#define B1101110 110
#define B01101110 110
#define B1101111 111
#define B01101111 111
#define B1110000 112
#define B01110000 112
#define B1110001 113
#define B01110001 113
#define B1110010 114
#define B01110010 114
#define B1110011 115
#define B01110011 115
#define B1110100 116
#define B01110100 116
#define B1110101 117
#define B01110101 117
#define B1110110 118
#define B01110110 118
#define B1110111 119
#define B01110111 119
#define B1111000 120
#define B01111000 120
#define B1111001 121
#define B01111001 121
#define B1111010 122
#define B01111010 122
#define B1111011 123
#define B01111011 123
#define B1111100 124
#define B01111100 124
#define B1111101 125
#define B01111101 125
#define B1111110 126
#define B01111110 126
#define B1111111 127
#define B01111111 127
#define B10000000 128
#define B10000001 129
#define B10000010 130
#define B10000011 131
#define B10000100 132
#define B10000101 133
#define B10000110 134
#define B10000111 135
#define B10001000 136
#define B10001001 137
#define B10001010 138
#define B10001011 139
#define B10001100 140
#define B10001101 141
#define B10001110 142
#define B10001111 143
#define B10010000 144
#define B10010001 145
#define B10010010 146
#define B10010011 147
#define B10010100 148
#define B10010101 149
#define B10010110 150
#define B10010111 151
#define B10011000 152
#define B10011001 153
#define B10011010 154
#define B10011011 155
#define B10011100 156
#define B10011101 157
#define B10011110 158
#define B10011111 159
#define B10100000 160
#define B10100001 161
#define B10100010 162
#define B10100011 163
#define B10100100 164
#define B10100101 165
#define B10100110 166
#define B10100111 167
#define B10101000 168
#define B10101001 169
#define B10101010 170
#define B10101011 171
#define B10101100 172
#define B10101101 173
#define B10101110 174
#define B10101111 175
#define B10110000 176
#define B10110001 177
#define B10110010 178
#define B10110011 179
#define B10110100 180
#define B10110101 181
#define B10110110 182
#define B10110111 183
#define B10111000 184
#define B10111001 185
#define B10111010 186
#define B10111011 187
#define B10111100 188
#define B10111101 189
#define B10111110 190
#define B10111111 191
#define B11000000 192
#define B11000001 193
#define B11000010 194
#define B11000011 195
#define B11000100 196
#define B11000101 197
#define B11000110 198
#define B11000111 199
#define B11001000 200
#define B11001001 201
#define B11001010 202
#define B11001011 203
#define B11001100 204
#define B11001101 205
#define B11001110 206
#define B11001111 207
#define B11010000 208
#define B11010001 209
#define B11010010 210
#define B11010011 211
#define B11010100 212
#define B11010101 213
#define B11010110 214
#define B11010111 215
#define B11011000 216
#define B11011001 217
#define B11011010 218
#define B11011011 219
#define B11011100 220
#define B11011101 221
#define B11011110 222
#define B11011111 223
#define B11100000 224
#define B11100001 225
#define B11100010 226
#define B11100011 227
#define B11100100 228
#define B11100101 229
#define B11100110 230
#define B11100111 231
#define B11101000 232
#define B11101001 233
#define B11101010 234
#define B11101011 235
#define B11101100 236
#define B11101101 237
#define B11101110 238
#define B11101111 239
#define B11110000 240
#define B11110001 241
#define B11110010 242
#define B11110011 243
#define B11110100 244
#define B11110101 245
#define B11110110 246
#define B11110111 247
#define B11111000 248
#define B11111001 249
#define B11111010 250
#define B11111011 251
#define B11111100 252
#define B11111101 253
#define B11111110 254
#define B11111111 255
#endif
# 535 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/binary.h"
# 33 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h" 2
#ifdef __cplusplus
extern "C"{
#endif
# 37 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
void yield(void);
#define HIGH 0x1
#define LOW 0x0
#define INPUT 0x0
#define OUTPUT 0x1
#define INPUT_PULLUP 0x2
#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 EULER 2.718281828459045235360287471352
#define SERIAL 0x0
#define DISPLAY 0x1
#define LSBFIRST 0
#define MSBFIRST 1
#define CHANGE 1
#define FALLING 2
#define RISING 3
#if defined(__AVR_ATtiny24__) || defined(__AVR_ATtiny44__) || defined(__AVR_ATtiny84__) || defined(__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__)
#define DEFAULT 0
#define EXTERNAL 1
#define INTERNAL 2
#else
# 69 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__) || defined(__AVR_ATmega644__) || defined(__AVR_ATmega644A__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644PA__)
#define INTERNAL1V1 2
#define INTERNAL2V56 3
#else
# 73 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
#define INTERNAL 3
#endif
# 75 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
#define DEFAULT 1
#define EXTERNAL 0
#endif
# 78 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
// undefine stdlib's abs if encountered
#ifdef abs
#undef abs
#endif
# 83 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
#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 interrupts() sei()
#define noInterrupts() cli()
#define clockCyclesPerMicrosecond() ( F_CPU / 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))
// avr-libc defines _NOP() since 1.6.2
#ifndef _NOP
#define _NOP() do { __asm__ volatile ("nop"); } while (0)
#endif
# 112 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
typedef unsigned int word;
#define bit(b) (1UL << (b))
typedef bool boolean;
typedef uint8_t byte;
void init(void);
void initVariant(void);
int atexit(void (*func)()) __attribute__((weak));
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(unsigned int us);
unsigned long pulseIn(uint8_t pin, uint8_t state, unsigned long timeout);
unsigned long pulseInLong(uint8_t pin, uint8_t state, unsigned long timeout);
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 attachInterrupt(uint8_t, void (*)(void), int mode);
void detachInterrupt(uint8_t);
void setup(void);
void loop(void);
// Get the bit location within the hardware port of the given virtual pin.
// This comes from the pins_*.c file for the active board configuration.
#define analogInPinToBit(P) (P)
// On the ATmega1280, the addresses of some of the port registers are
// greater than 255, so we can't store them in uint8_t's.
extern const uint16_t PROGMEM port_to_mode_PGM[];
extern const uint16_t PROGMEM port_to_input_PGM[];
extern const uint16_t PROGMEM port_to_output_PGM[];
extern const uint8_t PROGMEM digital_pin_to_port_PGM[];
// extern const uint8_t PROGMEM digital_pin_to_bit_PGM[];
extern const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[];
extern const uint8_t PROGMEM digital_pin_to_timer_PGM[];
// Get the bit location within the hardware port of the given virtual pin.
// This comes from the pins_*.c file for the active board configuration.
//
// These perform slightly better as macros compared to inline functions
//
#define digitalPinToPort(P) ( pgm_read_byte( digital_pin_to_port_PGM + (P) ) )
#define digitalPinToBitMask(P) ( pgm_read_byte( digital_pin_to_bit_mask_PGM + (P) ) )
#define digitalPinToTimer(P) ( pgm_read_byte( digital_pin_to_timer_PGM + (P) ) )
#define analogInPinToBit(P) (P)
#define portOutputRegister(P) ( (volatile uint8_t *)( pgm_read_word( port_to_output_PGM + (P))) )
#define portInputRegister(P) ( (volatile uint8_t *)( pgm_read_word( port_to_input_PGM + (P))) )
#define portModeRegister(P) ( (volatile uint8_t *)( pgm_read_word( port_to_mode_PGM + (P))) )
#define NOT_A_PIN 0
#define NOT_A_PORT 0
#define NOT_AN_INTERRUPT -1
#ifdef ARDUINO_MAIN
#define PA 1
#define PB 2
#define PC 3
#define PD 4
#define PE 5
#define PF 6
#define PG 7
#define PH 8
#define PJ 10
#define PK 11
#define PL 12
#endif
# 195 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
#define NOT_ON_TIMER 0
#define TIMER0A 1
#define TIMER0B 2
#define TIMER1A 3
#define TIMER1B 4
#define TIMER1C 5
#define TIMER2 6
#define TIMER2A 7
#define TIMER2B 8
#define TIMER3A 9
#define TIMER3B 10
#define TIMER3C 11
#define TIMER4A 12
#define TIMER4B 13
#define TIMER4C 14
#define TIMER4D 15
#define TIMER5A 16
#define TIMER5B 17
#define TIMER5C 18
#ifdef __cplusplus
} // extern "C"
#endif
# 220 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
#ifdef __cplusplus
#if 0 /* expanded by -frewrite-includes */
#include "WCharacter.h"
#endif /* expanded by -frewrite-includes */
# 222 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
# 1 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/WCharacter.h" 1
/*
WCharacter.h - Character utility functions for Wiring & Arduino
Copyright (c) 2010 Hernando Barragan. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef Character_h
#define Character_h
#if 0 /* expanded by -frewrite-includes */
#include <ctype.h>
#endif /* expanded by -frewrite-includes */
# 23 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/WCharacter.h"
# 1 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/ctype.h" 1
/* Copyright (c) 2002,2007 Michael Stumpf
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of the copyright holders nor the names of
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. */
/* $Id$ */
/*
ctype.h - character conversion macros and ctype macros
Author : Michael Stumpf
[email protected]
*/
#ifndef __CTYPE_H_
#define __CTYPE_H_ 1
#ifndef __ATTR_CONST__
#define __ATTR_CONST__ __attribute__((__const__))
#endif
# 46 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/ctype.h"
#ifdef __cplusplus
extern "C" {
#endif
# 50 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/ctype.h"
/** \file */
/** \defgroup ctype <ctype.h>: Character Operations
These functions perform various operations on characters.
\code #include <ctype.h>\endcode
*/
/** \name Character classification routines
These functions perform character classification. They return true or
false status depending whether the character passed to the function falls
into the function's classification (i.e. isdigit() returns true if its
argument is any value '0' though '9', inclusive). If the input is not
an unsigned char value, all of this function return false. */
/* @{ */
/** \ingroup ctype
Checks for an alphanumeric character. It is equivalent to <tt>(isalpha(c)
|| isdigit(c))</tt>. */
extern int isalnum(int __c) __ATTR_CONST__;
/** \ingroup ctype
Checks for an alphabetic character. It is equivalent to <tt>(isupper(c) ||
islower(c))</tt>. */
extern int isalpha(int __c) __ATTR_CONST__;
/** \ingroup ctype
Checks whether \c c is a 7-bit unsigned char value that fits into the
ASCII character set. */
extern int isascii(int __c) __ATTR_CONST__;
/** \ingroup ctype
Checks for a blank character, that is, a space or a tab. */
extern int isblank(int __c) __ATTR_CONST__;
/** \ingroup ctype
Checks for a control character. */
extern int iscntrl(int __c) __ATTR_CONST__;
/** \ingroup ctype
Checks for a digit (0 through 9). */
extern int isdigit(int __c) __ATTR_CONST__;
/** \ingroup ctype
Checks for any printable character except space. */
extern int isgraph(int __c) __ATTR_CONST__;
/** \ingroup ctype
Checks for a lower-case character. */
extern int islower(int __c) __ATTR_CONST__;
/** \ingroup ctype
Checks for any printable character including space. */
extern int isprint(int __c) __ATTR_CONST__;
/** \ingroup ctype
Checks for any printable character which is not a space or an alphanumeric
character. */
extern int ispunct(int __c) __ATTR_CONST__;
/** \ingroup ctype
Checks for white-space characters. For the avr-libc library, these are:
space, form-feed ('\\f'), newline ('\\n'), carriage return ('\\r'),
horizontal tab ('\\t'), and vertical tab ('\\v'). */
extern int isspace(int __c) __ATTR_CONST__;
/** \ingroup ctype
Checks for an uppercase letter. */
extern int isupper(int __c) __ATTR_CONST__;
/** \ingroup ctype
Checks for a hexadecimal digits, i.e. one of 0 1 2 3 4 5 6 7 8 9 a b c d e
f A B C D E F. */
extern int isxdigit(int __c) __ATTR_CONST__;
/* @} */
/** \name Character convertion routines
This realization permits all possible values of integer argument.
The toascii() function clears all highest bits. The tolower() and
toupper() functions return an input argument as is, if it is not an
unsigned char value. */
/* @{ */
/** \ingroup ctype
Converts \c c to a 7-bit unsigned char value that fits into the ASCII
character set, by clearing the high-order bits.
\warning Many people will be unhappy if you use this function. This
function will convert accented letters into random characters. */
extern int toascii(int __c) __ATTR_CONST__;
/** \ingroup ctype
Converts the letter \c c to lower case, if possible. */
extern int tolower(int __c) __ATTR_CONST__;
/** \ingroup ctype
Converts the letter \c c to upper case, if possible. */
extern int toupper(int __c) __ATTR_CONST__;
/* @} */
#ifdef __cplusplus
}
#endif
# 192 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/ctype.h"
#endif
# 194 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/ctype.h"
# 24 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/WCharacter.h" 2
// WCharacter.h prototypes
inline boolean isAlphaNumeric(int c) __attribute__((always_inline));
inline boolean isAlpha(int c) __attribute__((always_inline));
inline boolean isAscii(int c) __attribute__((always_inline));
inline boolean isWhitespace(int c) __attribute__((always_inline));
inline boolean isControl(int c) __attribute__((always_inline));
inline boolean isDigit(int c) __attribute__((always_inline));
inline boolean isGraph(int c) __attribute__((always_inline));
inline boolean isLowerCase(int c) __attribute__((always_inline));
inline boolean isPrintable(int c) __attribute__((always_inline));
inline boolean isPunct(int c) __attribute__((always_inline));
inline boolean isSpace(int c) __attribute__((always_inline));
inline boolean isUpperCase(int c) __attribute__((always_inline));
inline boolean isHexadecimalDigit(int c) __attribute__((always_inline));
inline int toAscii(int c) __attribute__((always_inline));
inline int toLowerCase(int c) __attribute__((always_inline));
inline int toUpperCase(int c)__attribute__((always_inline));
// Checks for an alphanumeric character.
// It is equivalent to (isalpha(c) || isdigit(c)).
inline boolean isAlphaNumeric(int c)
{
return ( isalnum(c) == 0 ? false : true);
}
// Checks for an alphabetic character.
// It is equivalent to (isupper(c) || islower(c)).
inline boolean isAlpha(int c)
{
return ( isalpha(c) == 0 ? false : true);
}
// Checks whether c is a 7-bit unsigned char value
// that fits into the ASCII character set.
inline boolean isAscii(int c)
{
return ( isascii (c) == 0 ? false : true);
}
// Checks for a blank character, that is, a space or a tab.
inline boolean isWhitespace(int c)
{
return ( isblank (c) == 0 ? false : true);
}
// Checks for a control character.
inline boolean isControl(int c)
{
return ( iscntrl (c) == 0 ? false : true);
}
// Checks for a digit (0 through 9).
inline boolean isDigit(int c)
{
return ( isdigit (c) == 0 ? false : true);
}
// Checks for any printable character except space.
inline boolean isGraph(int c)
{
return ( isgraph (c) == 0 ? false : true);
}
// Checks for a lower-case character.
inline boolean isLowerCase(int c)
{
return (islower (c) == 0 ? false : true);
}
// Checks for any printable character including space.
inline boolean isPrintable(int c)
{
return ( isprint (c) == 0 ? false : true);
}
// Checks for any printable character which is not a space
// or an alphanumeric character.
inline boolean isPunct(int c)
{
return ( ispunct (c) == 0 ? false : true);
}
// Checks for white-space characters. For the avr-libc library,
// these are: space, formfeed ('\f'), newline ('\n'), carriage
// return ('\r'), horizontal tab ('\t'), and vertical tab ('\v').
inline boolean isSpace(int c)
{
return ( isspace (c) == 0 ? false : true);
}
// Checks for an uppercase letter.
inline boolean isUpperCase(int c)
{
return ( isupper (c) == 0 ? false : true);
}
// Checks for a hexadecimal digits, i.e. one of 0 1 2 3 4 5 6 7
// 8 9 a b c d e f A B C D E F.
inline boolean isHexadecimalDigit(int c)
{
return ( isxdigit (c) == 0 ? false : true);
}
// Converts c to a 7-bit unsigned char value that fits into the
// ASCII character set, by clearing the high-order bits.
inline int toAscii(int c)
{
return toascii (c);
}
// Warning:
// Many people will be unhappy if you use this function.
// This function will convert accented letters into random
// characters.
// Converts the letter c to lower case, if possible.
inline int toLowerCase(int c)
{
return tolower (c);
}
// Converts the letter c to upper case, if possible.
inline int toUpperCase(int c)
{
return toupper (c);
}
#endif
# 168 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/WCharacter.h"
# 223 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h" 2
#if 0 /* expanded by -frewrite-includes */
#include "WString.h"
#endif /* expanded by -frewrite-includes */
# 223 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
# 1 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/WString.h" 1
/*
WString.h - String library for Wiring & Arduino
...mostly rewritten by Paul Stoffregen...
Copyright (c) 2009-10 Hernando Barragan. All right reserved.
Copyright 2011, Paul Stoffregen, [email protected]
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef String_class_h
#define String_class_h
#ifdef __cplusplus
#if 0 /* expanded by -frewrite-includes */
#include <stdlib.h>
#endif /* expanded by -frewrite-includes */
# 26 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/WString.h"
# 27 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/WString.h"
#if 0 /* expanded by -frewrite-includes */
#include <string.h>
#endif /* expanded by -frewrite-includes */
# 27 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/WString.h"
# 28 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/WString.h"
#if 0 /* expanded by -frewrite-includes */
#include <ctype.h>
#endif /* expanded by -frewrite-includes */
# 28 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/WString.h"
# 29 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/WString.h"
#if 0 /* expanded by -frewrite-includes */
#include <avr/pgmspace.h>
#endif /* expanded by -frewrite-includes */
# 29 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/WString.h"
# 30 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/WString.h"
// When compiling programs with this class, the following gcc parameters
// dramatically increase performance and memory (RAM) efficiency, typically
// with little or no increase in code size.
// -felide-constructors
// -std=c++0x
class __FlashStringHelper;
#define F(string_literal) (reinterpret_cast<const __FlashStringHelper *>(PSTR(string_literal)))
// An inherited class for holding the result of a concatenation. These
// result objects are assumed to be writable by subsequent concatenations.
class StringSumHelper;
// The string class
class String
{
// use a function pointer to allow for "if (s)" without the
// complications of an operator bool(). for more information, see:
// http://www.artima.com/cppsource/safebool.html
typedef void (String::*StringIfHelperType)() const;
void StringIfHelper() const {}
public:
// constructors
// creates a copy of the initial value.
// if the initial value is null or invalid, or if memory allocation
// fails, the string will be marked as invalid (i.e. "if (s)" will
// be false).
String(const char *cstr = "");
String(const String &str);
String(const __FlashStringHelper *str);
#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
String(String &&rval);
String(StringSumHelper &&rval);
#endif
# 66 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/WString.h"
explicit String(char c);
explicit String(unsigned char, unsigned char base=10);
explicit String(int, unsigned char base=10);
explicit String(unsigned int, unsigned char base=10);
explicit String(long, unsigned char base=10);
explicit String(unsigned long, unsigned char base=10);
explicit String(float, unsigned char decimalPlaces=2);
explicit String(double, unsigned char decimalPlaces=2);
~String(void);
// memory management
// return true on success, false on failure (in which case, the string
// is left unchanged). reserve(0), if successful, will validate an
// invalid string (i.e., "if (s)" will be true afterwards)
unsigned char reserve(unsigned int size);
inline unsigned int length(void) const {return len;}
// creates a copy of the assigned value. if the value is null or
// invalid, or if the memory allocation fails, the string will be
// marked as invalid ("if (s)" will be false).
String & operator = (const String &rhs);
String & operator = (const char *cstr);
String & operator = (const __FlashStringHelper *str);
#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
String & operator = (String &&rval);
String & operator = (StringSumHelper &&rval);
#endif
# 93 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/WString.h"
// concatenate (works w/ built-in types)
// returns true on success, false on failure (in which case, the string
// is left unchanged). if the argument is null or invalid, the
// concatenation is considered unsucessful.
unsigned char concat(const String &str);
unsigned char concat(const char *cstr);
unsigned char concat(char c);
unsigned char concat(unsigned char c);
unsigned char concat(int num);
unsigned char concat(unsigned int num);
unsigned char concat(long num);
unsigned char concat(unsigned long num);
unsigned char concat(float num);
unsigned char concat(double num);
unsigned char concat(const __FlashStringHelper * str);
// if there's not enough memory for the concatenated value, the string
// will be left unchanged (but this isn't signalled in any way)
String & operator += (const String &rhs) {concat(rhs); return (*this);}
String & operator += (const char *cstr) {concat(cstr); return (*this);}
String & operator += (char c) {concat(c); return (*this);}
String & operator += (unsigned char num) {concat(num); return (*this);}
String & operator += (int num) {concat(num); return (*this);}
String & operator += (unsigned int num) {concat(num); return (*this);}
String & operator += (long num) {concat(num); return (*this);}
String & operator += (unsigned long num) {concat(num); return (*this);}
String & operator += (float num) {concat(num); return (*this);}
String & operator += (double num) {concat(num); return (*this);}
String & operator += (const __FlashStringHelper *str){concat(str); return (*this);}
friend StringSumHelper & operator + (const StringSumHelper &lhs, const String &rhs);
friend StringSumHelper & operator + (const StringSumHelper &lhs, const char *cstr);
friend StringSumHelper & operator + (const StringSumHelper &lhs, char c);
friend StringSumHelper & operator + (const StringSumHelper &lhs, unsigned char num);
friend StringSumHelper & operator + (const StringSumHelper &lhs, int num);
friend StringSumHelper & operator + (const StringSumHelper &lhs, unsigned int num);
friend StringSumHelper & operator + (const StringSumHelper &lhs, long num);
friend StringSumHelper & operator + (const StringSumHelper &lhs, unsigned long num);
friend StringSumHelper & operator + (const StringSumHelper &lhs, float num);
friend StringSumHelper & operator + (const StringSumHelper &lhs, double num);
friend StringSumHelper & operator + (const StringSumHelper &lhs, const __FlashStringHelper *rhs);
// comparison (only works w/ Strings and "strings")
operator StringIfHelperType() const { return buffer ? &String::StringIfHelper : 0; }
int compareTo(const String &s) const;
unsigned char equals(const String &s) const;
unsigned char equals(const char *cstr) const;
unsigned char operator == (const String &rhs) const {return equals(rhs);}
unsigned char operator == (const char *cstr) const {return equals(cstr);}
unsigned char operator != (const String &rhs) const {return !equals(rhs);}
unsigned char operator != (const char *cstr) const {return !equals(cstr);}
unsigned char operator < (const String &rhs) const;
unsigned char operator > (const String &rhs) const;
unsigned char operator <= (const String &rhs) const;
unsigned char operator >= (const String &rhs) const;
unsigned char equalsIgnoreCase(const String &s) const;
unsigned char startsWith( const String &prefix) const;
unsigned char startsWith(const String &prefix, unsigned int offset) const;
unsigned char endsWith(const String &suffix) const;
// character acccess
char charAt(unsigned int index) const;
void setCharAt(unsigned int index, char c);
char operator [] (unsigned int index) const;
char& operator [] (unsigned int index);
void getBytes(unsigned char *buf, unsigned int bufsize, unsigned int index=0) const;
void toCharArray(char *buf, unsigned int bufsize, unsigned int index=0) const
{getBytes((unsigned char *)buf, bufsize, index);}
const char * c_str() const { return buffer; }
// search
int indexOf( char ch ) const;
int indexOf( char ch, unsigned int fromIndex ) const;
int indexOf( const String &str ) const;
int indexOf( const String &str, unsigned int fromIndex ) const;
int lastIndexOf( char ch ) const;
int lastIndexOf( char ch, unsigned int fromIndex ) const;
int lastIndexOf( const String &str ) const;
int lastIndexOf( const String &str, unsigned int fromIndex ) const;
String substring( unsigned int beginIndex ) const { return substring(beginIndex, len); };
String substring( unsigned int beginIndex, unsigned int endIndex ) const;
// modification
void replace(char find, char replace);
void replace(const String& find, const String& replace);
void remove(unsigned int index);
void remove(unsigned int index, unsigned int count);
void toLowerCase(void);
void toUpperCase(void);
void trim(void);
// parsing/conversion
long toInt(void) const;
float toFloat(void) const;
protected:
char *buffer; // the actual char array
unsigned int capacity; // the array length minus one (for the '\0')
unsigned int len; // the String length (not counting the '\0')
protected:
void init(void);
void invalidate(void);
unsigned char changeBuffer(unsigned int maxStrLen);
unsigned char concat(const char *cstr, unsigned int length);
// copy and move
String & copy(const char *cstr, unsigned int length);
String & copy(const __FlashStringHelper *pstr, unsigned int length);
#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
void move(String &rhs);
#endif
# 206 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/WString.h"
};
class StringSumHelper : public String
{
public:
StringSumHelper(const String &s) : String(s) {}
StringSumHelper(const char *p) : String(p) {}
StringSumHelper(char c) : String(c) {}
StringSumHelper(unsigned char num) : String(num) {}
StringSumHelper(int num) : String(num) {}
StringSumHelper(unsigned int num) : String(num) {}
StringSumHelper(long num) : String(num) {}
StringSumHelper(unsigned long num) : String(num) {}
StringSumHelper(float num) : String(num) {}
StringSumHelper(double num) : String(num) {}
};
#endif // __cplusplus
# 224 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/WString.h"
#endif // String_class_h
# 225 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/WString.h"
# 224 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h" 2
#if 0 /* expanded by -frewrite-includes */
#include "HardwareSerial.h"
#endif /* expanded by -frewrite-includes */
# 224 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
# 1 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/HardwareSerial.h" 1
/*
HardwareSerial.h - Hardware serial library for Wiring
Copyright (c) 2006 Nicholas Zambetti. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Modified 28 September 2010 by Mark Sproul
Modified 14 August 2012 by Alarus
Modified 3 December 2013 by Matthijs Kooijman
*/
#ifndef HardwareSerial_h
#define HardwareSerial_h
#if 0 /* expanded by -frewrite-includes */
#include <inttypes.h>
#endif /* expanded by -frewrite-includes */
# 27 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/HardwareSerial.h"
# 28 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/HardwareSerial.h"
#if 0 /* expanded by -frewrite-includes */
#include "Stream.h"
#endif /* expanded by -frewrite-includes */
# 29 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/HardwareSerial.h"
# 1 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Stream.h" 1
/*
Stream.h - base class for character-based streams.
Copyright (c) 2010 David A. Mellis. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
parsing functions based on TextFinder library by Michael Margolis
*/
#ifndef Stream_h
#define Stream_h
#if 0 /* expanded by -frewrite-includes */
#include <inttypes.h>
#endif /* expanded by -frewrite-includes */
# 25 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Stream.h"
# 26 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Stream.h"
#if 0 /* expanded by -frewrite-includes */
#include "Print.h"
#endif /* expanded by -frewrite-includes */
# 26 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Stream.h"
# 1 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Print.h" 1
/*
Print.h - Base class that provides print() and println()
Copyright (c) 2008 David A. Mellis. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef Print_h
#define Print_h
#if 0 /* expanded by -frewrite-includes */
#include <inttypes.h>
#endif /* expanded by -frewrite-includes */
# 23 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Print.h"
# 24 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Print.h"
#if 0 /* expanded by -frewrite-includes */
#include <stdio.h> // for size_t
#endif /* expanded by -frewrite-includes */
# 24 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Print.h"
# 1 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdio.h" 1
/* Copyright (c) 2002, 2005, 2007 Joerg Wunsch
All rights reserved.
Portions of documentation Copyright (c) 1990, 1991, 1993
The Regents of the University of California.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of the copyright holders nor the names of
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
$Id$
*/
#ifndef _STDIO_H_
#define _STDIO_H_ 1
#ifndef __ASSEMBLER__
#if 0 /* expanded by -frewrite-includes */
#include <inttypes.h>
#endif /* expanded by -frewrite-includes */
# 44 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdio.h"
# 45 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdio.h"
#if 0 /* expanded by -frewrite-includes */
#include <stdarg.h>
#endif /* expanded by -frewrite-includes */
# 45 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdio.h"
# 1 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stdarg.h" 1 3 4
/*===---- stdarg.h - Variable argument handling ----------------------------===
*
* Copyright (c) 2008 Eli Friedman
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*===-----------------------------------------------------------------------===
*/
#ifndef __STDARG_H
#define __STDARG_H
#ifndef _VA_LIST
typedef __builtin_va_list va_list;
#define _VA_LIST
#endif
# 33 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stdarg.h" 3 4
#define va_start(ap, param) __builtin_va_start(ap, param)
#define va_end(ap) __builtin_va_end(ap)
#define va_arg(ap, type) __builtin_va_arg(ap, type)
/* GCC always defines __va_copy, but does not define va_copy unless in c99 mode
* or -ansi is not specified, since it was not part of C90.
*/
#define __va_copy(d,s) __builtin_va_copy(d,s)
#if __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L || !defined(__STRICT_ANSI__)
#define va_copy(dest, src) __builtin_va_copy(dest, src)
#endif
# 45 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stdarg.h" 3 4
/* Hack required to make standard headers work, at least on Ubuntu */
#ifndef __GNUC_VA_LIST
#define __GNUC_VA_LIST 1
#endif
# 50 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stdarg.h" 3 4
typedef __builtin_va_list __gnuc_va_list;
#endif /* __STDARG_H */
# 53 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stdarg.h" 3 4
# 46 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdio.h" 2
#define __need_NULL
#define __need_size_t
#if 0 /* expanded by -frewrite-includes */
#include <stddef.h>
#endif /* expanded by -frewrite-includes */
# 49 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdio.h"
# 1 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 1 3 4
/*===---- stddef.h - Basic type definitions --------------------------------===
*
* Copyright (c) 2008 Eli Friedman
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*===-----------------------------------------------------------------------===
*/
#if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \
defined(__need_size_t) || defined(__need_wchar_t) || \
defined(__need_NULL) || defined(__need_wint_t)
#if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \
!defined(__need_wchar_t) && !defined(__need_NULL) && \
!defined(__need_wint_t)
/* Always define miscellaneous pieces when modules are available. */
#if !__has_feature(modules)
#define __STDDEF_H
#endif
# 37 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#define __need_ptrdiff_t
#define __need_size_t
#define __need_wchar_t
#define __need_NULL
#define __need_STDDEF_H_misc
/* __need_wint_t is intentionally not defined here. */
#endif
# 44 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#if defined(__need_ptrdiff_t)
#if !defined(_PTRDIFF_T) || __has_feature(modules)
/* Always define ptrdiff_t when modules are available. */
#if !__has_feature(modules)
#define _PTRDIFF_T
#endif
# 51 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
typedef __PTRDIFF_TYPE__ ptrdiff_t;
#endif
# 53 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#undef __need_ptrdiff_t
#endif /* defined(__need_ptrdiff_t) */
# 55 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#if defined(__need_size_t)
#if !defined(_SIZE_T) || __has_feature(modules)
/* Always define size_t when modules are available. */
#if !__has_feature(modules)
#define _SIZE_T
#endif
# 62 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
typedef __SIZE_TYPE__ size_t;
#endif
# 64 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#undef __need_size_t
#endif /*defined(__need_size_t) */
# 66 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#if defined(__need_STDDEF_H_misc)
/* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is
* enabled. */
#if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \
!defined(_RSIZE_T)) || __has_feature(modules)
/* Always define rsize_t when modules are available. */
#if !__has_feature(modules)
#define _RSIZE_T
#endif
# 76 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
typedef __SIZE_TYPE__ rsize_t;
#endif
# 78 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#endif /* defined(__need_STDDEF_H_misc) */
# 79 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#if defined(__need_wchar_t)
#ifndef __cplusplus
/* Always define wchar_t when modules are available. */
#if !defined(_WCHAR_T) || __has_feature(modules)
#if !__has_feature(modules)
#define _WCHAR_T
#if defined(_MSC_EXTENSIONS)
#define _WCHAR_T_DEFINED
#endif
# 89 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#endif
# 90 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
typedef __WCHAR_TYPE__ wchar_t;
#endif
# 92 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#endif
# 93 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#undef __need_wchar_t
#endif /* defined(__need_wchar_t) */
# 95 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#if defined(__need_NULL)
#undef NULL
#ifdef __cplusplus
# if !defined(__MINGW32__) && !defined(_MSC_VER)
# define NULL __null
# else
# 102 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
# define NULL 0
# endif
# 104 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#else
# 105 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
# define NULL ((void*)0)
#endif
# 107 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#ifdef __cplusplus
#if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED)
namespace std { typedef decltype(nullptr) nullptr_t; }
using ::std::nullptr_t;
#endif
# 112 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#endif
# 113 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#undef __need_NULL
#endif /* defined(__need_NULL) */
# 115 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#if defined(__need_STDDEF_H_misc)
#if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L
#if 0 /* expanded by -frewrite-includes */
#include "__stddef_max_align_t.h"
#endif /* expanded by -frewrite-includes */
# 118 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
# 119 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#endif
# 120 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#define offsetof(t, d) __builtin_offsetof(t, d)
#undef __need_STDDEF_H_misc
#endif /* defined(__need_STDDEF_H_misc) */
# 123 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
/* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use
__WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */
#if defined(__need_wint_t)
/* Always define wint_t when modules are available. */
#if !defined(_WINT_T) || __has_feature(modules)
#if !__has_feature(modules)
#define _WINT_T
#endif
# 132 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
typedef __WINT_TYPE__ wint_t;
#endif
# 134 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#undef __need_wint_t
#endif /* __need_wint_t */
# 136 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#endif
# 138 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
# 50 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdio.h" 2
/** \file */
/** \defgroup avr_stdio <stdio.h>: Standard IO facilities
\code #include <stdio.h> \endcode
<h3>Introduction to the Standard IO facilities</h3>
This file declares the standard IO facilities that are implemented
in \c avr-libc. Due to the nature of the underlying hardware,
only a limited subset of standard IO is implemented. There is no
actual file implementation available, so only device IO can be
performed. Since there's no operating system, the application
needs to provide enough details about their devices in order to
make them usable by the standard IO facilities.
Due to space constraints, some functionality has not been
implemented at all (like some of the \c printf conversions that
have been left out). Nevertheless, potential users of this
implementation should be warned: the \c printf and \c scanf families of functions, although
usually associated with presumably simple things like the
famous "Hello, world!" program, are actually fairly complex
which causes their inclusion to eat up a fair amount of code space.
Also, they are not fast due to the nature of interpreting the
format string at run-time. Whenever possible, resorting to the
(sometimes non-standard) predetermined conversion facilities that are
offered by avr-libc will usually cost much less in terms of speed
and code size.
<h3>Tunable options for code size vs. feature set</h3>
In order to allow programmers a code size vs. functionality tradeoff,
the function vfprintf() which is the heart of the printf family can be
selected in different flavours using linker options. See the
documentation of vfprintf() for a detailed description. The same
applies to vfscanf() and the \c scanf family of functions.
<h3>Outline of the chosen API</h3>
The standard streams \c stdin, \c stdout, and \c stderr are
provided, but contrary to the C standard, since avr-libc has no
knowledge about applicable devices, these streams are not already
pre-initialized at application startup. Also, since there is no
notion of "file" whatsoever to avr-libc, there is no function
\c fopen() that could be used to associate a stream to some device.
(See \ref stdio_note1 "note 1".) Instead, the function \c fdevopen()
is provided to associate a stream to a device, where the device
needs to provide a function to send a character, to receive a
character, or both. There is no differentiation between "text" and
"binary" streams inside avr-libc. Character \c \\n is sent
literally down to the device's \c put() function. If the device
requires a carriage return (\c \\r) character to be sent before
the linefeed, its \c put() routine must implement this (see
\ref stdio_note2 "note 2").
As an alternative method to fdevopen(), the macro
fdev_setup_stream() might be used to setup a user-supplied FILE
structure.
It should be noted that the automatic conversion of a newline
character into a carriage return - newline sequence breaks binary
transfers. If binary transfers are desired, no automatic
conversion should be performed, but instead any string that aims
to issue a CR-LF sequence must use <tt>"\r\n"</tt> explicitly.
For convenience, the first call to \c fdevopen() that opens a
stream for reading will cause the resulting stream to be aliased
to \c stdin. Likewise, the first call to \c fdevopen() that opens
a stream for writing will cause the resulting stream to be aliased
to both, \c stdout, and \c stderr. Thus, if the open was done
with both, read and write intent, all three standard streams will
be identical. Note that these aliases are indistinguishable from
each other, thus calling \c fclose() on such a stream will also
effectively close all of its aliases (\ref stdio_note3 "note 3").
It is possible to tie additional user data to a stream, using
fdev_set_udata(). The backend put and get functions can then
extract this user data using fdev_get_udata(), and act
appropriately. For example, a single put function could be used
to talk to two different UARTs that way, or the put and get
functions could keep internal state between calls there.
<h3>Format strings in flash ROM</h3>
All the \c printf and \c scanf family functions come in two flavours: the
standard name, where the format string is expected to be in
SRAM, as well as a version with the suffix "_P" where the format
string is expected to reside in the flash ROM. The macro
\c PSTR (explained in \ref avr_pgmspace) becomes very handy
for declaring these format strings.
\anchor stdio_without_malloc
<h3>Running stdio without malloc()</h3>
By default, fdevopen() requires malloc(). As this is often
not desired in the limited environment of a microcontroller, an
alternative option is provided to run completely without malloc().
The macro fdev_setup_stream() is provided to prepare a
user-supplied FILE buffer for operation with stdio.
<h4>Example</h4>
\code
#include <stdio.h>
static int uart_putchar(char c, FILE *stream);
static FILE mystdout = FDEV_SETUP_STREAM(uart_putchar, NULL,
_FDEV_SETUP_WRITE);
static int
uart_putchar(char c, FILE *stream)
{
if (c == '\n')
uart_putchar('\r', stream);
loop_until_bit_is_set(UCSRA, UDRE);
UDR = c;
return 0;
}
int
main(void)
{
init_uart();
stdout = &mystdout;
printf("Hello, world!\n");
return 0;
}
\endcode
This example uses the initializer form FDEV_SETUP_STREAM() rather
than the function-like fdev_setup_stream(), so all data
initialization happens during C start-up.
If streams initialized that way are no longer needed, they can be
destroyed by first calling the macro fdev_close(), and then
destroying the object itself. No call to fclose() should be
issued for these streams. While calling fclose() itself is
harmless, it will cause an undefined reference to free() and thus
cause the linker to link the malloc module into the application.
<h3>Notes</h3>
\anchor stdio_note1 \par Note 1:
It might have been possible to implement a device abstraction that
is compatible with \c fopen() but since this would have required
to parse a string, and to take all the information needed either
out of this string, or out of an additional table that would need to be
provided by the application, this approach was not taken.
\anchor stdio_note2 \par Note 2:
This basically follows the Unix approach: if a device such as a
terminal needs special handling, it is in the domain of the
terminal device driver to provide this functionality. Thus, a
simple function suitable as \c put() for \c fdevopen() that talks
to a UART interface might look like this:
\code
int
uart_putchar(char c, FILE *stream)
{
if (c == '\n')
uart_putchar('\r');
loop_until_bit_is_set(UCSRA, UDRE);
UDR = c;
return 0;
}
\endcode
\anchor stdio_note3 \par Note 3:
This implementation has been chosen because the cost of maintaining
an alias is considerably smaller than the cost of maintaining full
copies of each stream. Yet, providing an implementation that offers
the complete set of standard streams was deemed to be useful. Not
only that writing \c printf() instead of <tt>fprintf(mystream, ...)</tt>
saves typing work, but since avr-gcc needs to resort to pass all
arguments of variadic functions on the stack (as opposed to passing
them in registers for functions that take a fixed number of
parameters), the ability to pass one parameter less by implying
\c stdin or stdout will also save some execution time.
*/
#if !defined(__DOXYGEN__)
/*
* This is an internal structure of the library that is subject to be
* changed without warnings at any time. Please do *never* reference
* elements of it beyond by using the official interfaces provided.
*/
struct __file {
char *buf; /* buffer pointer */
unsigned char unget; /* ungetc() buffer */
uint8_t flags; /* flags, see below */
#define __SRD 0x0001 /* OK to read */
#define __SWR 0x0002 /* OK to write */
#define __SSTR 0x0004 /* this is an sprintf/snprintf string */
#define __SPGM 0x0008 /* fmt string is in progmem */
#define __SERR 0x0010 /* found error */
#define __SEOF 0x0020 /* found EOF */
#define __SUNGET 0x040 /* ungetc() happened */
#define __SMALLOC 0x80 /* handle is malloc()ed */
#if 0
/* possible future extensions, will require uint16_t flags */
#define __SRW 0x0100 /* open for reading & writing */
#define __SLBF 0x0200 /* line buffered */
#define __SNBF 0x0400 /* unbuffered */
#define __SMBF 0x0800 /* buf is from malloc */
#endif
# 261 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdio.h"
int size; /* size of buffer */
int len; /* characters read or written so far */
int (*put)(char, struct __file *); /* function to write one char to device */
int (*get)(struct __file *); /* function to read one char from device */
void *udata; /* User defined and accessible data. */
};
#endif /* not __DOXYGEN__ */
# 269 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdio.h"
/*@{*/
/**
\c FILE is the opaque structure that is passed around between the
various standard IO functions.
*/
#define FILE struct __file
/**
Stream that will be used as an input stream by the simplified
functions that don't take a \c stream argument.
The first stream opened with read intent using \c fdevopen()
will be assigned to \c stdin.
*/
#define stdin (__iob[0])
/**
Stream that will be used as an output stream by the simplified
functions that don't take a \c stream argument.
The first stream opened with write intent using \c fdevopen()
will be assigned to both, \c stdin, and \c stderr.
*/
#define stdout (__iob[1])
/**
Stream destined for error output. Unless specifically assigned,
identical to \c stdout.
If \c stderr should point to another stream, the result of
another \c fdevopen() must be explicitly assigned to it without
closing the previous \c stderr (since this would also close
\c stdout).
*/
#define stderr (__iob[2])
/**
\c EOF declares the value that is returned by various standard IO
functions in case of an error. Since the AVR platform (currently)
doesn't contain an abstraction for actual files, its origin as
"end of file" is somewhat meaningless here.
*/
#define EOF (-1)
/** This macro inserts a pointer to user defined data into a FILE
stream object.
The user data can be useful for tracking state in the put and get
functions supplied to the fdevopen() function. */
#define fdev_set_udata(stream, u) do { (stream)->udata = u; } while(0)
/** This macro retrieves a pointer to user defined data from a FILE
stream object. */
#define fdev_get_udata(stream) ((stream)->udata)
#if defined(__DOXYGEN__)
/**
\brief Setup a user-supplied buffer as an stdio stream
This macro takes a user-supplied buffer \c stream, and sets it up
as a stream that is valid for stdio operations, similar to one that
has been obtained dynamically from fdevopen(). The buffer to setup
must be of type FILE.
The arguments \c put and \c get are identical to those that need to
be passed to fdevopen().
The \c rwflag argument can take one of the values _FDEV_SETUP_READ,
_FDEV_SETUP_WRITE, or _FDEV_SETUP_RW, for read, write, or read/write
intent, respectively.
\note No assignments to the standard streams will be performed by
fdev_setup_stream(). If standard streams are to be used, these
need to be assigned by the user. See also under
\ref stdio_without_malloc "Running stdio without malloc()".
*/
#define fdev_setup_stream(stream, put, get, rwflag)
#else /* !DOXYGEN */
# 348 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdio.h"
#define fdev_setup_stream(stream, p, g, f) \
do { \
(stream)->put = p; \
(stream)->get = g; \
(stream)->flags = f; \
(stream)->udata = 0; \
} while(0)
#endif /* DOXYGEN */
# 356 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdio.h"
#define _FDEV_SETUP_READ __SRD /**< fdev_setup_stream() with read intent */
#define _FDEV_SETUP_WRITE __SWR /**< fdev_setup_stream() with write intent */
#define _FDEV_SETUP_RW (__SRD|__SWR) /**< fdev_setup_stream() with read/write intent */
/**
* Return code for an error condition during device read.
*
* To be used in the get function of fdevopen().
*/
#define _FDEV_ERR (-1)
/**
* Return code for an end-of-file condition during device read.
*
* To be used in the get function of fdevopen().
*/
#define _FDEV_EOF (-2)
#if defined(__DOXYGEN__)
/**
\brief Initializer for a user-supplied stdio stream
This macro acts similar to fdev_setup_stream(), but it is to be
used as the initializer of a variable of type FILE.
The remaining arguments are to be used as explained in
fdev_setup_stream().
*/
#define FDEV_SETUP_STREAM(put, get, rwflag)
#else /* !DOXYGEN */
# 387 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdio.h"
#define FDEV_SETUP_STREAM(p, g, f) \
{ \
.put = p, \
.get = g, \
.flags = f, \
.udata = 0, \
}
#endif /* DOXYGEN */
# 395 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdio.h"
#ifdef __cplusplus
extern "C" {
#endif
# 399 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdio.h"
#if !defined(__DOXYGEN__)
/*
* Doxygen documentation can be found in fdevopen.c.
*/
extern struct __file *__iob[];
#if defined(__STDIO_FDEVOPEN_COMPAT_12)
/*
* Declare prototype for the discontinued version of fdevopen() that
* has been in use up to avr-libc 1.2.x. The new implementation has
* some backwards compatibility with the old version.
*/
extern FILE *fdevopen(int (*__put)(char), int (*__get)(void),
int __opts __attribute__((unused)));
#else /* !defined(__STDIO_FDEVOPEN_COMPAT_12) */
# 416 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdio.h"
/* New prototype for avr-libc 1.4 and above. */
extern FILE *fdevopen(int (*__put)(char, FILE*), int (*__get)(FILE*));
#endif /* defined(__STDIO_FDEVOPEN_COMPAT_12) */
# 419 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdio.h"
#endif /* not __DOXYGEN__ */
# 421 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdio.h"
/**
This function closes \c stream, and disallows and further
IO to and from it.
When using fdevopen() to setup the stream, a call to fclose() is
needed in order to free the internal resources allocated.
If the stream has been set up using fdev_setup_stream() or
FDEV_SETUP_STREAM(), use fdev_close() instead.
It currently always returns 0 (for success).
*/
extern int fclose(FILE *__stream);
/**
This macro frees up any library resources that might be associated
with \c stream. It should be called if \c stream is no longer
needed, right before the application is going to destroy the
\c stream object itself.
(Currently, this macro evaluates to nothing, but this might change
in future versions of the library.)
*/
#if defined(__DOXYGEN__)
# define fdev_close()
#else
# 448 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdio.h"
# define fdev_close() ((void)0)
#endif
# 450 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdio.h"
/**
\c vfprintf is the central facility of the \c printf family of
functions. It outputs values to \c stream under control of a
format string passed in \c fmt. The actual values to print are
passed as a variable argument list \c ap.
\c vfprintf returns the number of characters written to \c stream,
or \c EOF in case of an error. Currently, this will only happen
if \c stream has not been opened with write intent.
The format string is composed of zero or more directives: ordinary
characters (not \c %), which are copied unchanged to the output
stream; and conversion specifications, each of which results in
fetching zero or more subsequent arguments. Each conversion
specification is introduced by the \c % character. The arguments must
properly correspond (after type promotion) with the conversion
specifier. After the \c %, the following appear in sequence:
- Zero or more of the following flags:
<ul>
<li> \c # The value should be converted to an "alternate form". For
c, d, i, s, and u conversions, this option has no effect.
For o conversions, the precision of the number is
increased to force the first character of the output
string to a zero (except if a zero value is printed with
an explicit precision of zero). For x and X conversions,
a non-zero result has the string `0x' (or `0X' for X
conversions) prepended to it.</li>
<li> \c 0 (zero) Zero padding. For all conversions, the converted
value is padded on the left with zeros rather than blanks.
If a precision is given with a numeric conversion (d, i,
o, u, i, x, and X), the 0 flag is ignored.</li>
<li> \c - A negative field width flag; the converted value is to be
left adjusted on the field boundary. The converted value
is padded on the right with blanks, rather than on the
left with blanks or zeros. A - overrides a 0 if both are
given.</li>
<li> ' ' (space) A blank should be left before a positive number
produced by a signed conversion (d, or i).</li>
<li> \c + A sign must always be placed before a number produced by a
signed conversion. A + overrides a space if both are
used.</li>
</ul>
- An optional decimal digit string specifying a minimum field width.
If the converted value has fewer characters than the field width, it
will be padded with spaces on the left (or right, if the left-adjustment
flag has been given) to fill out the field width.
- An optional precision, in the form of a period . followed by an
optional digit string. If the digit string is omitted, the
precision is taken as zero. This gives the minimum number of
digits to appear for d, i, o, u, x, and X conversions, or the
maximum number of characters to be printed from a string for \c s
conversions.
- An optional \c l or \c h length modifier, that specifies that the
argument for the d, i, o, u, x, or X conversion is a \c "long int"
rather than \c int. The \c h is ignored, as \c "short int" is
equivalent to \c int.
- A character that specifies the type of conversion to be applied.
The conversion specifiers and their meanings are:
- \c diouxX The int (or appropriate variant) argument is converted
to signed decimal (d and i), unsigned octal (o), unsigned
decimal (u), or unsigned hexadecimal (x and X) notation.
The letters "abcdef" are used for x conversions; the
letters "ABCDEF" are used for X conversions. The
precision, if any, gives the minimum number of digits that
must appear; if the converted value requires fewer digits,
it is padded on the left with zeros.
- \c p The <tt>void *</tt> argument is taken as an unsigned integer,
and converted similarly as a <tt>%\#x</tt> command would do.
- \c c The \c int argument is converted to an \c "unsigned char", and the
resulting character is written.
- \c s The \c "char *" argument is expected to be a pointer to an array
of character type (pointer to a string). Characters from
the array are written up to (but not including) a
terminating NUL character; if a precision is specified, no
more than the number specified are written. If a precision
is given, no null character need be present; if the
precision is not specified, or is greater than the size of
the array, the array must contain a terminating NUL
character.
- \c % A \c % is written. No argument is converted. The complete
conversion specification is "%%".
- \c eE The double argument is rounded and converted in the format
\c "[-]d.ddde±dd" where there is one digit before the
decimal-point character and the number of digits after it
is equal to the precision; if the precision is missing, it
is taken as 6; if the precision is zero, no decimal-point
character appears. An \e E conversion uses the letter \c 'E'
(rather than \c 'e') to introduce the exponent. The exponent
always contains two digits; if the value is zero,
the exponent is 00.
- \c fF The double argument is rounded and converted to decimal notation
in the format \c "[-]ddd.ddd", where the number of digits after the
decimal-point character is equal to the precision specification.
If the precision is missing, it is taken as 6; if the precision
is explicitly zero, no decimal-point character appears. If a
decimal point appears, at least one digit appears before it.
- \c gG The double argument is converted in style \c f or \c e (or
\c F or \c E for \c G conversions). The precision
specifies the number of significant digits. If the
precision is missing, 6 digits are given; if the precision
is zero, it is treated as 1. Style \c e is used if the
exponent from its conversion is less than -4 or greater
than or equal to the precision. Trailing zeros are removed
from the fractional part of the result; a decimal point
appears only if it is followed by at least one digit.
- \c S Similar to the \c s format, except the pointer is expected to
point to a program-memory (ROM) string instead of a RAM string.
In no case does a non-existent or small field width cause truncation of a
numeric field; if the result of a conversion is wider than the field
width, the field is expanded to contain the conversion result.
Since the full implementation of all the mentioned features becomes
fairly large, three different flavours of vfprintf() can be
selected using linker options. The default vfprintf() implements
all the mentioned functionality except floating point conversions.
A minimized version of vfprintf() is available that only implements
the very basic integer and string conversion facilities, but only
the \c # additional option can be specified using conversion
flags (these flags are parsed correctly from the format
specification, but then simply ignored). This version can be
requested using the following \ref gcc_minusW "compiler options":
\code
-Wl,-u,vfprintf -lprintf_min
\endcode
If the full functionality including the floating point conversions
is required, the following options should be used:
\code
-Wl,-u,vfprintf -lprintf_flt -lm
\endcode
\par Limitations:
- The specified width and precision can be at most 255.
\par Notes:
- For floating-point conversions, if you link default or minimized
version of vfprintf(), the symbol \c ? will be output and double
argument will be skiped. So you output below will not be crashed.
For default version the width field and the "pad to left" ( symbol
minus ) option will work in this case.
- The \c hh length modifier is ignored (\c char argument is
promouted to \c int). More exactly, this realization does not check
the number of \c h symbols.
- But the \c ll length modifier will to abort the output, as this
realization does not operate \c long \c long arguments.
- The variable width or precision field (an asterisk \c * symbol)
is not realized and will to abort the output.
*/
extern int vfprintf(FILE *__stream, const char *__fmt, va_list __ap);
/**
Variant of \c vfprintf() that uses a \c fmt string that resides
in program memory.
*/
extern int vfprintf_P(FILE *__stream, const char *__fmt, va_list __ap);
/**
The function \c fputc sends the character \c c (though given as type
\c int) to \c stream. It returns the character, or \c EOF in case
an error occurred.
*/
extern int fputc(int __c, FILE *__stream);
#if !defined(__DOXYGEN__)
/* putc() function implementation, required by standard */
extern int putc(int __c, FILE *__stream);
/* putchar() function implementation, required by standard */
extern int putchar(int __c);
#endif /* not __DOXYGEN__ */
# 632 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdio.h"
/**
The macro \c putc used to be a "fast" macro implementation with a
functionality identical to fputc(). For space constraints, in
\c avr-libc, it is just an alias for \c fputc.
*/
#define putc(__c, __stream) fputc(__c, __stream)
/**
The macro \c putchar sends character \c c to \c stdout.
*/
#define putchar(__c) fputc(__c, stdout)
/**
The function \c printf performs formatted output to stream
\c stdout. See \c vfprintf() for details.
*/
extern int printf(const char *__fmt, ...);
/**
Variant of \c printf() that uses a \c fmt string that resides
in program memory.
*/
extern int printf_P(const char *__fmt, ...);
/**
The function \c vprintf performs formatted output to stream
\c stdout, taking a variable argument list as in vfprintf().
See vfprintf() for details.
*/
extern int vprintf(const char *__fmt, va_list __ap);
/**
Variant of \c printf() that sends the formatted characters
to string \c s.
*/
extern int sprintf(char *__s, const char *__fmt, ...);
/**
Variant of \c sprintf() that uses a \c fmt string that resides
in program memory.
*/
extern int sprintf_P(char *__s, const char *__fmt, ...);
/**
Like \c sprintf(), but instead of assuming \c s to be of infinite
size, no more than \c n characters (including the trailing NUL
character) will be converted to \c s.
Returns the number of characters that would have been written to
\c s if there were enough space.
*/
extern int snprintf(char *__s, size_t __n, const char *__fmt, ...);
/**
Variant of \c snprintf() that uses a \c fmt string that resides
in program memory.
*/
extern int snprintf_P(char *__s, size_t __n, const char *__fmt, ...);
/**
Like \c sprintf() but takes a variable argument list for the
arguments.
*/
extern int vsprintf(char *__s, const char *__fmt, va_list ap);
/**
Variant of \c vsprintf() that uses a \c fmt string that resides
in program memory.
*/
extern int vsprintf_P(char *__s, const char *__fmt, va_list ap);
/**
Like \c vsprintf(), but instead of assuming \c s to be of infinite
size, no more than \c n characters (including the trailing NUL
character) will be converted to \c s.
Returns the number of characters that would have been written to
\c s if there were enough space.
*/
extern int vsnprintf(char *__s, size_t __n, const char *__fmt, va_list ap);
/**
Variant of \c vsnprintf() that uses a \c fmt string that resides
in program memory.
*/
extern int vsnprintf_P(char *__s, size_t __n, const char *__fmt, va_list ap);
/**
The function \c fprintf performs formatted output to \c stream.
See \c vfprintf() for details.
*/
extern int fprintf(FILE *__stream, const char *__fmt, ...);
/**
Variant of \c fprintf() that uses a \c fmt string that resides
in program memory.
*/
extern int fprintf_P(FILE *__stream, const char *__fmt, ...);
/**
Write the string pointed to by \c str to stream \c stream.
Returns 0 on success and EOF on error.
*/
extern int fputs(const char *__str, FILE *__stream);
/**
Variant of fputs() where \c str resides in program memory.
*/
extern int fputs_P(const char *__str, FILE *__stream);
/**
Write the string pointed to by \c str, and a trailing newline
character, to \c stdout.
*/
extern int puts(const char *__str);
/**
Variant of puts() where \c str resides in program memory.
*/
extern int puts_P(const char *__str);
/**
Write \c nmemb objects, \c size bytes each, to \c stream.
The first byte of the first object is referenced by \c ptr.
Returns the number of objects successfully written, i. e.
\c nmemb unless an output error occured.
*/
extern size_t fwrite(const void *__ptr, size_t __size, size_t __nmemb,
FILE *__stream);
/**
The function \c fgetc reads a character from \c stream. It returns
the character, or \c EOF in case end-of-file was encountered or an
error occurred. The routines feof() or ferror() must be used to
distinguish between both situations.
*/
extern int fgetc(FILE *__stream);
#if !defined(__DOXYGEN__)
/* getc() function implementation, required by standard */
extern int getc(FILE *__stream);
/* getchar() function implementation, required by standard */
extern int getchar(void);
#endif /* not __DOXYGEN__ */
# 782 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdio.h"
/**
The macro \c getc used to be a "fast" macro implementation with a
functionality identical to fgetc(). For space constraints, in
\c avr-libc, it is just an alias for \c fgetc.
*/
#define getc(__stream) fgetc(__stream)
/**
The macro \c getchar reads a character from \c stdin. Return
values and error handling is identical to fgetc().
*/
#define getchar() fgetc(stdin)
/**
The ungetc() function pushes the character \c c (converted to an
unsigned char) back onto the input stream pointed to by \c stream.
The pushed-back character will be returned by a subsequent read on
the stream.
Currently, only a single character can be pushed back onto the
stream.
The ungetc() function returns the character pushed back after the
conversion, or \c EOF if the operation fails. If the value of the
argument \c c character equals \c EOF, the operation will fail and
the stream will remain unchanged.
*/
extern int ungetc(int __c, FILE *__stream);
/**
Read at most <tt>size - 1</tt> bytes from \c stream, until a
newline character was encountered, and store the characters in the
buffer pointed to by \c str. Unless an error was encountered while
reading, the string will then be terminated with a \c NUL
character.
If an error was encountered, the function returns NULL and sets the
error flag of \c stream, which can be tested using ferror().
Otherwise, a pointer to the string will be returned. */
extern char *fgets(char *__str, int __size, FILE *__stream);
/**
Similar to fgets() except that it will operate on stream \c stdin,
and the trailing newline (if any) will not be stored in the string.
It is the caller's responsibility to provide enough storage to hold
the characters read. */
extern char *gets(char *__str);
/**
Read \c nmemb objects, \c size bytes each, from \c stream,
to the buffer pointed to by \c ptr.
Returns the number of objects successfully read, i. e.
\c nmemb unless an input error occured or end-of-file was
encountered. feof() and ferror() must be used to distinguish
between these two conditions.
*/
extern size_t fread(void *__ptr, size_t __size, size_t __nmemb,
FILE *__stream);
/**
Clear the error and end-of-file flags of \c stream.
*/
extern void clearerr(FILE *__stream);
#if !defined(__DOXYGEN__)
/* fast inlined version of clearerr() */
#define clearerror(s) do { (s)->flags &= ~(__SERR | __SEOF); } while(0)
#endif /* !defined(__DOXYGEN__) */
# 852 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdio.h"
/**
Test the end-of-file flag of \c stream. This flag can only be cleared
by a call to clearerr().
*/
extern int feof(FILE *__stream);
#if !defined(__DOXYGEN__)
/* fast inlined version of feof() */
#define feof(s) ((s)->flags & __SEOF)
#endif /* !defined(__DOXYGEN__) */
# 863 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdio.h"
/**
Test the error flag of \c stream. This flag can only be cleared
by a call to clearerr().
*/
extern int ferror(FILE *__stream);
#if !defined(__DOXYGEN__)
/* fast inlined version of ferror() */
#define ferror(s) ((s)->flags & __SERR)
#endif /* !defined(__DOXYGEN__) */
# 874 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdio.h"
extern int vfscanf(FILE *__stream, const char *__fmt, va_list __ap);
/**
Variant of vfscanf() using a \c fmt string in program memory.
*/
extern int vfscanf_P(FILE *__stream, const char *__fmt, va_list __ap);
/**
The function \c fscanf performs formatted input, reading the
input data from \c stream.
See vfscanf() for details.
*/
extern int fscanf(FILE *__stream, const char *__fmt, ...);
/**
Variant of fscanf() using a \c fmt string in program memory.
*/
extern int fscanf_P(FILE *__stream, const char *__fmt, ...);
/**
The function \c scanf performs formatted input from stream \c stdin.
See vfscanf() for details.
*/
extern int scanf(const char *__fmt, ...);
/**
Variant of scanf() where \c fmt resides in program memory.
*/
extern int scanf_P(const char *__fmt, ...);
/**
The function \c vscanf performs formatted input from stream
\c stdin, taking a variable argument list as in vfscanf().
See vfscanf() for details.
*/
extern int vscanf(const char *__fmt, va_list __ap);
/**
The function \c sscanf performs formatted input, reading the
input data from the buffer pointed to by \c buf.
See vfscanf() for details.
*/
extern int sscanf(const char *__buf, const char *__fmt, ...);
/**
Variant of sscanf() using a \c fmt string in program memory.
*/
extern int sscanf_P(const char *__buf, const char *__fmt, ...);
#if defined(__DOXYGEN__)
/**
Flush \c stream.
This is a null operation provided for source-code compatibility
only, as the standard IO implementation currently does not perform
any buffering.
*/
extern int fflush(FILE *stream);
#else
# 938 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdio.h"
static __inline__ int fflush(FILE *stream __attribute__((unused)))
{
return 0;
}
#endif
# 943 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdio.h"
#ifdef __cplusplus
}
#endif
# 947 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdio.h"
/*@}*/
/*
* The following constants are currently not used by avr-libc's
* stdio subsystem. They are defined here since the gcc build
* environment expects them to be here.
*/
#define SEEK_SET 0
#define SEEK_CUR 1
#define SEEK_END 2
#endif /* __ASSEMBLER */
# 960 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdio.h"
#endif /* _STDLIB_H_ */
# 962 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/stdio.h"
# 25 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Print.h" 2
#if 0 /* expanded by -frewrite-includes */
#include "WString.h"
#endif /* expanded by -frewrite-includes */
# 26 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Print.h"
# 27 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Print.h"
#if 0 /* expanded by -frewrite-includes */
#include "Printable.h"
#endif /* expanded by -frewrite-includes */
# 27 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Print.h"
# 1 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Printable.h" 1
/*
Printable.h - Interface class that allows printing of complex types
Copyright (c) 2011 Adrian McEwen. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef Printable_h
#define Printable_h
#if 0 /* expanded by -frewrite-includes */
#include <stdlib.h>
#endif /* expanded by -frewrite-includes */
# 23 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Printable.h"
# 24 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Printable.h"
class Print;
/** The Printable class provides a way for new classes to allow themselves to be printed.
By deriving from Printable and implementing the printTo method, it will then be possible
for users to print out instances of this class by passing them into the usual
Print::print and Print::println methods.
*/
class Printable
{
public:
virtual size_t printTo(Print& p) const = 0;
};
#endif
# 40 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Printable.h"
# 28 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Print.h" 2
#define DEC 10
#define HEX 16
#define OCT 8
#define BIN 2
class Print
{
private:
int write_error;
size_t printNumber(unsigned long, uint8_t);
size_t printFloat(double, uint8_t);
protected:
void setWriteError(int err = 1) { write_error = err; }
public:
Print() : write_error(0) {}
int getWriteError() { return write_error; }
void clearWriteError() { setWriteError(0); }
virtual size_t write(uint8_t) = 0;
size_t write(const char *str) {
if (str == NULL) return 0;
return write((const uint8_t *)str, strlen(str));
}
virtual size_t write(const uint8_t *buffer, size_t size);
size_t write(const char *buffer, size_t size) {
return write((const uint8_t *)buffer, size);
}
size_t print(const __FlashStringHelper *);
size_t print(const String &);
size_t print(const char[]);
size_t print(char);
size_t print(unsigned char, int = DEC);
size_t print(int, int = DEC);
size_t print(unsigned int, int = DEC);
size_t print(long, int = DEC);
size_t print(unsigned long, int = DEC);
size_t print(double, int = 2);
size_t print(const Printable&);
size_t println(const __FlashStringHelper *);
size_t println(const String &s);
size_t println(const char[]);
size_t println(char);
size_t println(unsigned char, int = DEC);
size_t println(int, int = DEC);
size_t println(unsigned int, int = DEC);
size_t println(long, int = DEC);
size_t println(unsigned long, int = DEC);
size_t println(double, int = 2);
size_t println(const Printable&);
size_t println(void);
};
#endif
# 85 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Print.h"
# 27 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Stream.h" 2
// compatability macros for testing
/*
#define getInt() parseInt()
#define getInt(ignore) parseInt(ignore)
#define getFloat() parseFloat()
#define getFloat(ignore) parseFloat(ignore)
#define getString( pre_string, post_string, buffer, length)
readBytesBetween( pre_string, terminator, buffer, length)
*/
// This enumeration provides the lookahead options for parseInt(), parseFloat()
// The rules set out here are used until either the first valid character is found
// or a time out occurs due to lack of input.
enum LookaheadMode{
SKIP_ALL, // All invalid characters are ignored.
SKIP_NONE, // Nothing is skipped, and the stream is not touched unless the first waiting character is valid.
SKIP_WHITESPACE // Only tabs, spaces, line feeds & carriage returns are skipped.
};
#define NO_IGNORE_CHAR '\x01' // a char not found in a valid ASCII numeric field
class Stream : public Print
{
protected:
unsigned long _timeout; // number of milliseconds to wait for the next char before aborting timed read
unsigned long _startMillis; // used for timeout measurement
int timedRead(); // private method to read stream with timeout
int timedPeek(); // private method to peek stream with timeout
int peekNextDigit(LookaheadMode lookahead, bool detectDecimal); // returns the next numeric digit in the stream or -1 if timeout
public:
virtual int available() = 0;
virtual int read() = 0;
virtual int peek() = 0;
virtual void flush() = 0;
Stream() {_timeout=1000;}
// parsing methods
void setTimeout(unsigned long timeout); // sets maximum milliseconds to wait for stream data, default is 1 second
bool find(char *target); // reads data from the stream until the target string is found
bool find(uint8_t *target) { return find ((char *)target); }
// returns true if target string is found, false if timed out (see setTimeout)
bool find(char *target, size_t length); // reads data from the stream until the target string of given length is found
bool find(uint8_t *target, size_t length) { return find ((char *)target, length); }
// returns true if target string is found, false if timed out
bool find(char target) { return find (&target, 1); }
bool findUntil(char *target, char *terminator); // as find but search ends if the terminator string is found
bool findUntil(uint8_t *target, char *terminator) { return findUntil((char *)target, terminator); }
bool findUntil(char *target, size_t targetLen, char *terminate, size_t termLen); // as above but search ends if the terminate string is found
bool findUntil(uint8_t *target, size_t targetLen, char *terminate, size_t termLen) {return findUntil((char *)target, targetLen, terminate, termLen); }
long parseInt(LookaheadMode lookahead = SKIP_ALL, char ignore = NO_IGNORE_CHAR);
// returns the first valid (long) integer value from the current position.
// lookahead determines how parseInt looks ahead in the stream.
// See LookaheadMode enumeration at the top of the file.
// Lookahead is terminated by the first character that is not a valid part of an integer.
// Once parsing commences, 'ignore' will be skipped in the stream.
float parseFloat(LookaheadMode lookahead = SKIP_ALL, char ignore = NO_IGNORE_CHAR);
// float version of parseInt
size_t readBytes( char *buffer, size_t length); // read chars from stream into buffer
size_t readBytes( uint8_t *buffer, size_t length) { return readBytes((char *)buffer, length); }
// terminates if length characters have been read or timeout (see setTimeout)
// returns the number of characters placed in the buffer (0 means no valid data found)
size_t readBytesUntil( char terminator, char *buffer, size_t length); // as readBytes with terminator character
size_t readBytesUntil( char terminator, uint8_t *buffer, size_t length) { return readBytesUntil(terminator, (char *)buffer, length); }
// terminates if length characters have been read, timeout, or if the terminator character detected
// returns the number of characters placed in the buffer (0 means no valid data found)
// Arduino String functions to be added here
String readString();
String readStringUntil(char terminator);
protected:
long parseInt(char ignore) { return parseInt(SKIP_ALL, ignore); }
float parseFloat(char ignore) { return parseFloat(SKIP_ALL, ignore); }
// These overload exists for compatibility with any class that has derived
// Stream and used parseFloat/Int with a custom ignore character. To keep
// the public API simple, these overload remains protected.
struct MultiTarget {
const char *str; // string you're searching for
size_t len; // length of string you're searching for
size_t index; // index used by the search routine.
};
// This allows you to search for an arbitrary number of strings.
// Returns index of the target that is found first or -1 if timeout occurs.
int findMulti(struct MultiTarget *targets, int tCount);
};
#undef NO_IGNORE_CHAR
#endif
# 130 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Stream.h"
# 30 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/HardwareSerial.h" 2
// Define constants and variables for buffering incoming serial data. We're
// using a ring buffer (I think), in which head is the index of the location
// to which to write the next incoming character and tail is the index of the
// location from which to read.
// NOTE: a "power of 2" buffer size is reccomended to dramatically
// optimize all the modulo operations for ring buffers.
// WARNING: When buffer sizes are increased to > 256, the buffer index
// variables are automatically increased in size, but the extra
// atomicity guards needed for that are not implemented. This will
// often work, but occasionally a race condition can occur that makes
// Serial behave erratically. See https://github.com/arduino/Arduino/issues/2405
#if !defined(SERIAL_TX_BUFFER_SIZE)
#if ((RAMEND - RAMSTART) < 1023)
#define SERIAL_TX_BUFFER_SIZE 16
#else
# 46 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/HardwareSerial.h"
#define SERIAL_TX_BUFFER_SIZE 64
#endif
# 48 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/HardwareSerial.h"
#endif
# 49 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/HardwareSerial.h"
#if !defined(SERIAL_RX_BUFFER_SIZE)
#if ((RAMEND - RAMSTART) < 1023)
#define SERIAL_RX_BUFFER_SIZE 16
#else
# 53 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/HardwareSerial.h"
#define SERIAL_RX_BUFFER_SIZE 64
#endif
# 55 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/HardwareSerial.h"
#endif
# 56 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/HardwareSerial.h"
#if (SERIAL_TX_BUFFER_SIZE>256)
typedef uint16_t tx_buffer_index_t;
#else
# 59 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/HardwareSerial.h"
typedef uint8_t tx_buffer_index_t;
#endif
# 61 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/HardwareSerial.h"
#if (SERIAL_RX_BUFFER_SIZE>256)
typedef uint16_t rx_buffer_index_t;
#else
# 64 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/HardwareSerial.h"
typedef uint8_t rx_buffer_index_t;
#endif
# 66 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/HardwareSerial.h"
// Define config for Serial.begin(baud, config);
#define SERIAL_5N1 0x00
#define SERIAL_6N1 0x02
#define SERIAL_7N1 0x04
#define SERIAL_8N1 0x06
#define SERIAL_5N2 0x08
#define SERIAL_6N2 0x0A
#define SERIAL_7N2 0x0C
#define SERIAL_8N2 0x0E
#define SERIAL_5E1 0x20
#define SERIAL_6E1 0x22
#define SERIAL_7E1 0x24
#define SERIAL_8E1 0x26
#define SERIAL_5E2 0x28
#define SERIAL_6E2 0x2A
#define SERIAL_7E2 0x2C
#define SERIAL_8E2 0x2E
#define SERIAL_5O1 0x30
#define SERIAL_6O1 0x32
#define SERIAL_7O1 0x34
#define SERIAL_8O1 0x36
#define SERIAL_5O2 0x38
#define SERIAL_6O2 0x3A
#define SERIAL_7O2 0x3C
#define SERIAL_8O2 0x3E
class HardwareSerial : public Stream
{
protected:
volatile uint8_t * const _ubrrh;
volatile uint8_t * const _ubrrl;
volatile uint8_t * const _ucsra;
volatile uint8_t * const _ucsrb;
volatile uint8_t * const _ucsrc;
volatile uint8_t * const _udr;
// Has any byte been written to the UART since begin()
bool _written;
volatile rx_buffer_index_t _rx_buffer_head;
volatile rx_buffer_index_t _rx_buffer_tail;
volatile tx_buffer_index_t _tx_buffer_head;
volatile tx_buffer_index_t _tx_buffer_tail;
// Don't put any members after these buffers, since only the first
// 32 bytes of this struct can be accessed quickly using the ldd
// instruction.
unsigned char _rx_buffer[SERIAL_RX_BUFFER_SIZE];
unsigned char _tx_buffer[SERIAL_TX_BUFFER_SIZE];
public:
inline HardwareSerial(
volatile uint8_t *ubrrh, volatile uint8_t *ubrrl,
volatile uint8_t *ucsra, volatile uint8_t *ucsrb,
volatile uint8_t *ucsrc, volatile uint8_t *udr);
void begin(unsigned long baud) { begin(baud, SERIAL_8N1); }
void begin(unsigned long, uint8_t);
void end();
virtual int available(void);
virtual int peek(void);
virtual int read(void);
int availableForWrite(void);
virtual void flush(void);
virtual size_t write(uint8_t);
inline size_t write(unsigned long n) { return write((uint8_t)n); }
inline size_t write(long n) { return write((uint8_t)n); }
inline size_t write(unsigned int n) { return write((uint8_t)n); }
inline size_t write(int n) { return write((uint8_t)n); }
using Print::write; // pull in write(str) and write(buf, size) from Print
operator bool() { return true; }
// Interrupt handlers - Not intended to be called externally
inline void _rx_complete_irq(void);
void _tx_udr_empty_irq(void);
};
#if defined(UBRRH) || defined(UBRR0H)
extern HardwareSerial Serial;
#define HAVE_HWSERIAL0
#endif
# 146 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/HardwareSerial.h"
#if defined(UBRR1H)
extern HardwareSerial Serial1;
#define HAVE_HWSERIAL1
#endif
# 150 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/HardwareSerial.h"
#if defined(UBRR2H)
extern HardwareSerial Serial2;
#define HAVE_HWSERIAL2
#endif
# 154 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/HardwareSerial.h"
#if defined(UBRR3H)
extern HardwareSerial Serial3;
#define HAVE_HWSERIAL3
#endif
# 158 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/HardwareSerial.h"
extern void serialEventRun(void) __attribute__((weak));
#endif
# 162 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/HardwareSerial.h"
# 225 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h" 2
#if 0 /* expanded by -frewrite-includes */
#include "USBAPI.h"
#endif /* expanded by -frewrite-includes */
# 225 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
# 1 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/USBAPI.h" 1
/*
USBAPI.h
Copyright (c) 2005-2014 Arduino. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef __USBAPI__
#define __USBAPI__
#if 0 /* expanded by -frewrite-includes */
#include <inttypes.h>
#endif /* expanded by -frewrite-includes */
# 23 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/USBAPI.h"
# 24 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/USBAPI.h"
#if 0 /* expanded by -frewrite-includes */
#include <avr/pgmspace.h>
#endif /* expanded by -frewrite-includes */
# 24 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/USBAPI.h"
# 25 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/USBAPI.h"
#if 0 /* expanded by -frewrite-includes */
#include <avr/eeprom.h>
#endif /* expanded by -frewrite-includes */
# 25 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/USBAPI.h"
# 1 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h" 1
/* Copyright (c) 2002, 2003, 2004, 2007 Marek Michalkiewicz
Copyright (c) 2005, 2006 Bjoern Haase
Copyright (c) 2008 Atmel Corporation
Copyright (c) 2008 Wouter van Gulik
Copyright (c) 2009 Dmitry Xmelkov
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of the copyright holders nor the names of
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. */
/* $Id$ */
#ifndef _AVR_EEPROM_H_
#define _AVR_EEPROM_H_ 1
#if 0 /* expanded by -frewrite-includes */
#include <avr/io.h>
#endif /* expanded by -frewrite-includes */
# 38 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# 39 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
#if !E2END && !defined(__DOXYGEN__) && !defined(__COMPILING_AVR_LIBC__)
# warning "Device does not have EEPROM available."
#else
# 43 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
#ifndef __DOXYGEN__
#if defined (__AVR_AT94K__)
# define _EEPROM_SUFFIX _at94k
#elif defined (__AVR_AT43USB320__)
# 49 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _43u320
#elif defined (__AVR_AT43USB355__)
# 51 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _43u355
#elif defined (__AVR_AT76C711__)
# 53 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _76c711
#elif defined (__AVR_AT86RF401__)
# 55 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _86r401
#elif defined (__AVR_AT90PWM1__)
# 57 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _90pwm1
#elif defined (__AVR_AT90PWM2__)
# 59 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _90pwm2
#elif defined (__AVR_AT90PWM2B__)
# 61 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _90pwm2b
#elif defined (__AVR_AT90PWM3__)
# 63 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _90pwm3
#elif defined (__AVR_AT90PWM3B__)
# 65 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _90pwm3b
#elif defined (__AVR_AT90PWM216__)
# 67 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _90pwm216
#elif defined (__AVR_AT90PWM316__)
# 69 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _90pwm316
#elif defined (__AVR_AT90PWM161__)
# 71 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _90pwm161
#elif defined (__AVR_AT90PWM81__)
# 73 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _90pwm81
#elif defined (__AVR_ATmega16M1__)
# 75 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m16m1
#elif defined (__AVR_ATmega8U2__)
# 77 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m8u2
#elif defined (__AVR_ATmega16U2__)
# 79 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m16u2
#elif defined (__AVR_ATmega16U4__)
# 81 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m16u4
#elif defined (__AVR_ATmega32C1__)
# 83 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m32c1
#elif defined (__AVR_ATmega32M1__)
# 85 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m32m1
#elif defined (__AVR_ATmega32U2__)
# 87 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m32u2
#elif defined (__AVR_ATmega32U4__)
# 89 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m32u4
#elif defined (__AVR_ATmega32U6__)
# 91 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m32u6
#elif defined (__AVR_ATmega64C1__)
# 93 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m64c1
#elif defined (__AVR_ATmega64M1__)
# 95 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m64m1
#elif defined (__AVR_ATmega128__)
# 97 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m128
#elif defined (__AVR_ATmega128A__)
# 99 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m128a
#elif defined (__AVR_ATmega1280__)
# 101 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m1280
#elif defined (__AVR_ATmega1281__)
# 103 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m1281
#elif defined (__AVR_ATmega1284__)
# 105 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m1284
#elif defined (__AVR_ATmega1284P__)
# 107 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m1284p
#elif defined (__AVR_ATmega128RFA1__)
# 109 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m128rfa1
#elif defined (__AVR_ATmega128RFR2__)
# 111 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m128rfr2
#elif defined (__AVR_ATmega1284RFR2__)
# 113 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m1284rfr2
#elif defined (__AVR_ATmega256RFR2__)
# 115 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
#elif defined (__AVR_ATmega2564RFR2__)
# 116 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m2564rfr2
# define _EEPROM_SUFFIX _m256rfr2
#elif defined (__AVR_ATmega2560__)
# 119 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m2560
#elif defined (__AVR_ATmega2561__)
# 121 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m2561
#elif defined (__AVR_AT90CAN32__)
# 123 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _can32
#elif defined (__AVR_AT90CAN64__)
# 125 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _can64
#elif defined (__AVR_AT90CAN128__)
# 127 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _can128
#elif defined (__AVR_AT90USB82__)
# 129 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _usb82
#elif defined (__AVR_AT90USB162__)
# 131 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _usb162
#elif defined (__AVR_AT90USB646__)
# 133 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _usb646
#elif defined (__AVR_AT90USB647__)
# 135 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _usb647
#elif defined (__AVR_AT90USB1286__)
# 137 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _usb1286
#elif defined (__AVR_AT90USB1287__)
# 139 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _usb1287
#elif defined (__AVR_ATmega64RFR2__)
# 141 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m64rfr2
#elif defined (__AVR_ATmega644RFR2__)
# 143 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m644rfr2
#elif defined (__AVR_ATmega64__)
# 145 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m64
#elif defined (__AVR_ATmega64A__)
# 147 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m64a
#elif defined (__AVR_ATmega640__)
# 149 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m640
#elif defined (__AVR_ATmega644__)
# 151 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m644
#elif defined (__AVR_ATmega644A__)
# 153 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m644a
#elif defined (__AVR_ATmega644P__)
# 155 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m644p
#elif defined (__AVR_ATmega644PA__)
# 157 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m644pa
#elif defined (__AVR_ATmega645__)
# 159 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m645
#elif defined (__AVR_ATmega645A__)
# 161 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m645a
#elif defined (__AVR_ATmega645P__)
# 163 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m645p
#elif defined (__AVR_ATmega6450__)
# 165 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m6450
#elif defined (__AVR_ATmega6450A__)
# 167 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m6450a
#elif defined (__AVR_ATmega6450P__)
# 169 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m6450p
#elif defined (__AVR_ATmega649__)
# 171 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m649
#elif defined (__AVR_ATmega649A__)
# 173 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m649a
#elif defined (__AVR_ATmega649P__)
# 175 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m649p
#elif defined (__AVR_ATmega6490__)
# 177 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m6490
#elif defined (__AVR_ATmega6490A__)
# 179 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m6490a
#elif defined (__AVR_ATmega6490P__)
# 181 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m6490p
#elif defined (__AVR_ATmega103__)
# 183 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m103
#elif defined (__AVR_ATmega32__)
# 185 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m32
#elif defined (__AVR_ATmega32A__)
# 187 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m32a
#elif defined (__AVR_ATmega323__)
# 189 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m323
#elif defined (__AVR_ATmega324A__)
# 191 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m324a
#elif defined (__AVR_ATmega324P__)
# 193 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m324p
#elif defined (__AVR_ATmega324PA__)
# 195 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m324pa
#elif defined (__AVR_ATmega325__)
# 197 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m325
#elif defined (__AVR_ATmega325A__)
# 199 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m325a
#elif defined (__AVR_ATmega325P__)
# 201 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m325p
#elif defined (__AVR_ATmega325PA__)
# 203 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m325pa
#elif defined (__AVR_ATmega3250__)
# 205 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m3250
#elif defined (__AVR_ATmega3250A__)
# 207 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m3250a
#elif defined (__AVR_ATmega3250P__)
# 209 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m3250p
#elif defined (__AVR_ATmega3250PA__)
# 211 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m3250pa
#elif defined (__AVR_ATmega328__)
# 213 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m328
#elif defined (__AVR_ATmega328P__)
# 215 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m328p
#elif defined (__AVR_ATmega329__)
# 217 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m329
#elif defined (__AVR_ATmega329A__)
# 219 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m329a
#elif defined (__AVR_ATmega329P__)
# 221 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m329p
#elif defined (__AVR_ATmega329PA__)
# 223 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m329pa
#elif defined (__AVR_ATmega3290__)
# 225 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m3290
#elif defined (__AVR_ATmega3290A__)
# 227 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m3290a
#elif defined (__AVR_ATmega3290P__)
# 229 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m3290p
#elif defined (__AVR_ATmega3290PA__)
# 231 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m3290pa
#elif defined (__AVR_ATmega32HVB__)
# 233 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m32hvb
#elif defined (__AVR_ATmega32HVBREVB__)
# 235 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m32hvbrevb
#elif defined (__AVR_ATmega64HVE__)
# 237 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m64hve
#elif defined (__AVR_ATmega64HVE2__)
# 239 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m64hve2
#elif defined (__AVR_ATmega406__)
# 241 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m406
#elif defined (__AVR_ATmega16__)
# 243 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m16
#elif defined (__AVR_ATmega16A__)
# 245 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m16a
#elif defined (__AVR_ATmega161__)
# 247 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m161
#elif defined (__AVR_ATmega162__)
# 249 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m162
#elif defined (__AVR_ATmega163__)
# 251 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m163
#elif defined (__AVR_ATmega164__)
# 253 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m164
#elif defined (__AVR_ATmega164P__)
# 255 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m164p
#elif defined (__AVR_ATmega164PA__)
# 257 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m164pa
#elif defined (__AVR_ATmega165__)
# 259 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m165
#elif defined (__AVR_ATmega165A__)
# 261 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m165a
#elif defined (__AVR_ATmega165P__)
# 263 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m165p
#elif defined (__AVR_ATmega165PA__)
# 265 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m165pa
#elif defined (__AVR_ATmega168__)
# 267 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m168
#elif defined (__AVR_ATmega168A__)
# 269 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m168a
#elif defined (__AVR_ATmega168P__)
# 271 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m168p
#elif defined (__AVR_ATmega168PA__)
# 273 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m168pa
#elif defined (__AVR_ATmega168PB__)
# 275 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m168pb
#elif defined (__AVR_ATmega169__)
# 277 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m169
#elif defined (__AVR_ATmega169A__)
# 279 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m169a
#elif defined (__AVR_ATmega169P__)
# 281 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m169p
#elif defined (__AVR_ATmega169PA__)
# 283 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m169pa
#elif defined (__AVR_ATmega8HVA__)
# 285 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m8hva
#elif defined (__AVR_ATmega16HVA__)
# 287 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m16hva
#elif defined (__AVR_ATmega16HVA2__)
# 289 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m16hva2
#elif defined (__AVR_ATmega16HVB__)
# 291 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m16hvb
#elif defined (__AVR_ATmega16HVBREVB__)
# 293 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m16hvbrevb
#elif defined (__AVR_ATmega8__)
# 295 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m8
#elif defined (__AVR_ATmega8A__)
# 297 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m8a
#elif defined (__AVR_ATmega48__)
# 299 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m48
#elif defined (__AVR_ATmega48A__)
# 301 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m48a
#elif defined (__AVR_ATmega48PA__)
# 303 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m48pa
#elif defined (__AVR_ATmega48PB__)
# 305 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m48pb
#elif defined (__AVR_ATmega48P__)
# 307 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m48p
#elif defined (__AVR_ATmega88__)
# 309 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m88
#elif defined (__AVR_ATmega88A__)
# 311 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m88a
#elif defined (__AVR_ATmega88P__)
# 313 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m88p
#elif defined (__AVR_ATmega88PA__)
# 315 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m88pa
#elif defined (__AVR_ATmega88PB__)
# 317 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m88pb
#elif defined (__AVR_ATmega8515__)
# 319 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m8515
#elif defined (__AVR_ATmega8535__)
# 321 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _m8535
#elif defined (__AVR_AT90S8535__)
# 323 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _8535
#elif defined (__AVR_AT90C8534__)
# 325 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _8534
#elif defined (__AVR_AT90S8515__)
# 327 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _8515
#elif defined (__AVR_AT90S4434__)
# 329 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _4434
#elif defined (__AVR_AT90S4433__)
# 331 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _4433
#elif defined (__AVR_AT90S4414__)
# 333 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _4414
#elif defined (__AVR_ATtiny22__)
# 335 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _tn22
#elif defined (__AVR_ATtiny26__)
# 337 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _tn26
#elif defined (__AVR_AT90S2343__)
# 339 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _2343
#elif defined (__AVR_AT90S2333__)
# 341 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _2333
#elif defined (__AVR_AT90S2323__)
# 343 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _2323
#elif defined (__AVR_AT90S2313__)
# 345 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _2313
#elif defined (__AVR_ATtiny2313__)
# 347 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _tn2313
#elif defined (__AVR_ATtiny2313A__)
# 349 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _tn2313a
#elif defined (__AVR_ATtiny4313__)
# 351 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _tn4313
#elif defined (__AVR_ATtiny13__)
# 353 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _tn13
#elif defined (__AVR_ATtiny13A__)
# 355 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _tn13a
#elif defined (__AVR_ATtiny25__)
# 357 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _tn25
#elif defined (__AVR_ATtiny45__)
# 359 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _tn45
#elif defined (__AVR_ATtiny85__)
# 361 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _tn85
#elif defined (__AVR_ATtiny24__)
# 363 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _tn24
#elif defined (__AVR_ATtiny24A__)
# 365 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _tn24a
#elif defined (__AVR_ATtiny44__)
# 367 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _tn44
#elif defined (__AVR_ATtiny44A__)
# 369 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _tn44a
#elif defined (__AVR_ATtiny441__)
# 371 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _tn441
#elif defined (__AVR_ATtiny84__)
# 373 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _tn84
#elif defined (__AVR_ATtiny84A__)
# 375 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _tn84a
#elif defined (__AVR_ATtiny841__)
# 377 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _tn841
#elif defined (__AVR_ATtiny261__)
# 379 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _tn261
#elif defined (__AVR_ATtiny261A__)
# 381 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _tn261a
#elif defined (__AVR_ATtiny461__)
# 383 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _tn461
#elif defined (__AVR_ATtiny461A__)
# 385 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _tn461a
#elif defined (__AVR_ATtiny861__)
# 387 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _tn861
#elif defined (__AVR_ATtiny861A__)
# 389 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _tn861a
#elif defined (__AVR_ATtiny43U__)
# 391 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _tn43u
#elif defined (__AVR_ATtiny48__)
# 393 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _tn48
#elif defined (__AVR_ATtiny828__)
# 395 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _tn828
#elif defined (__AVR_ATtiny88__)
# 397 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _tn88
#elif defined (__AVR_ATtiny87__)
# 399 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _tn87
#elif defined (__AVR_ATtiny167__)
# 401 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _tn167
#elif defined (__AVR_ATtiny1634__)
# 403 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _tn1634
#elif defined (__AVR_AT90SCR100__)
# 405 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _90scr100
#elif defined (__AVR_ATxmega16A4__)
# 407 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x16a4
#elif defined (__AVR_ATxmega16A4U__)
# 409 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x16a4u
#elif defined (__AVR_ATxmega16C4__)
# 411 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x16c4
#elif defined (__AVR_ATxmega16D4__)
# 413 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x16d4
#elif defined (__AVR_ATxmega32A4__)
# 415 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x32a4
#elif defined (__AVR_ATxmega32A4U__)
# 417 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x32a4u
#elif defined (__AVR_ATxmega32C3__)
# 419 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x32c3
#elif defined (__AVR_ATxmega32C4__)
# 421 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x32c4
#elif defined (__AVR_ATxmega32D3__)
# 423 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x32d3
#elif defined (__AVR_ATxmega32D4__)
# 425 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x32d4
#elif defined (__AVR_ATxmega8E5__)
# 427 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
#define _EEPROM_SUFFIX _x8e5
#elif defined (__AVR_ATxmega16E5__)
# 429 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
#define _EEPROM_SUFFIX _x16e5
#elif defined (__AVR_ATxmega32E5__)
# 431 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x32e5
#elif defined (__AVR_ATxmega64A1__)
# 433 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x64a1
#elif defined (__AVR_ATxmega64A1U__)
# 435 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x64a1u
#elif defined (__AVR_ATxmega64A3__)
# 437 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x64a3
#elif defined (__AVR_ATxmega64A3U__)
# 439 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x64a3u
#elif defined (__AVR_ATxmega64A4U__)
# 441 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x64a4u
#elif defined (__AVR_ATxmega64B1__)
# 443 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x64b1
#elif defined (__AVR_ATxmega64B3__)
# 445 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x64b3
#elif defined (__AVR_ATxmega64C3__)
# 447 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x64c3
#elif defined (__AVR_ATxmega64D3__)
# 449 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x64d3
#elif defined (__AVR_ATxmega64D4__)
# 451 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x64d4
#elif defined (__AVR_ATxmega128A1__)
# 453 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x128a1
#elif defined (__AVR_ATxmega128A1U__)
# 455 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x128a1u
#elif defined (__AVR_ATxmega128A4U__)
# 457 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x128a4u
#elif defined (__AVR_ATxmega128A3__)
# 459 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x128a3
#elif defined (__AVR_ATxmega128A3U__)
# 461 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x128a3u
#elif defined (__AVR_ATxmega128B1__)
# 463 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x128b1
#elif defined (__AVR_ATxmega128B3__)
# 465 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x128b3
#elif defined (__AVR_ATxmega128C3__)
# 467 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x128c3
#elif defined (__AVR_ATxmega128D3__)
# 469 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x128d3
#elif defined (__AVR_ATxmega128D4__)
# 471 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x128d4
#elif defined (__AVR_ATxmega192A3__)
# 473 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x192a3
#elif defined (__AVR_ATxmega192A3U__)
# 475 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x192a3u
#elif defined (__AVR_ATxmega192C3__)
# 477 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x192c3
#elif defined (__AVR_ATxmega192D3__)
# 479 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x192d3
#elif defined (__AVR_ATxmega256A3__)
# 481 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x256a3
#elif defined (__AVR_ATxmega256A3U__)
# 483 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x256a3u
#elif defined (__AVR_ATxmega256A3B__)
# 485 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x256a3b
#elif defined (__AVR_ATxmega256A3BU__)
# 487 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x256a3bu
#elif defined (__AVR_ATxmega256C3__)
# 489 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x256c3
#elif defined (__AVR_ATxmega256D3__)
# 491 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x256d3
#elif defined (__AVR_ATxmega384C3__)
# 493 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x384c3
#elif defined (__AVR_ATxmega384D3__)
# 495 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _x384d3
#elif defined (__AVR_ATA5505__)
# 497 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _a5505
#elif defined (__AVR_ATA5272__)
# 499 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _a5272
#elif defined (__AVR_ATA6285__)
# 501 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _a6285
#elif defined (__AVR_ATA6286__)
# 503 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _a6286
#elif defined (__AVR_ATA6289__)
# 505 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _a6289
#elif defined (__AVR_ATA5790__)
# 507 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _a5790
#elif defined (__AVR_ATA5790N__)
# 509 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _a5790n
#elif defined (__AVR_ATA5795__)
# 511 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _a5795
#elif defined (__AVR_ATA5702M322__)
# 513 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _a5702m322
#elif defined (__AVR_ATA5782__)
# 515 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _a5782
#elif defined (__AVR_ATA5831__)
# 517 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _a5831
#elif defined (__AVR_ATA6612C__)
# 519 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _a6612c
#elif defined (__AVR_ATA6613C__)
# 521 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _a6613c
#elif defined (__AVR_ATA6614Q__)
# 523 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _a6614q
#elif defined (__AVR_ATA6616C__)
# 525 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _a6616c
#elif defined (__AVR_ATA6617C__)
# 527 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _a6617c
#elif defined (__AVR_ATA664251__)
# 529 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _a664251
/* avr1: the following only supported for assembler programs */
#elif defined (__AVR_ATtiny28__)
# 532 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _tn28
#elif defined (__AVR_AT90S1200__)
# 534 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _1200
#elif defined (__AVR_ATtiny15__)
# 536 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _tn15
#elif defined (__AVR_ATtiny12__)
# 538 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _tn12
#elif defined (__AVR_ATtiny11__)
# 540 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _tn11
#else
# 542 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define _EEPROM_SUFFIX _UNKNOWN
#endif
# 544 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
#define _EEPROM_CONCAT1(s1, s2) s1 ## s2
#define _EEPROM_CONCAT2(s1, s2) _EEPROM_CONCAT1 (s1, s2)
#define eeprom_read_byte _EEPROM_CONCAT2 (__eerd_byte, _EEPROM_SUFFIX)
#define eeprom_read_word _EEPROM_CONCAT2 (__eerd_word, _EEPROM_SUFFIX)
#define eeprom_read_dword _EEPROM_CONCAT2 (__eerd_dword, _EEPROM_SUFFIX)
#define eeprom_read_float _EEPROM_CONCAT2 (__eerd_float, _EEPROM_SUFFIX)
#define eeprom_read_block _EEPROM_CONCAT2 (__eerd_block, _EEPROM_SUFFIX)
#define eeprom_write_byte _EEPROM_CONCAT2 (__eewr_byte, _EEPROM_SUFFIX)
#define eeprom_write_word _EEPROM_CONCAT2 (__eewr_word, _EEPROM_SUFFIX)
#define eeprom_write_dword _EEPROM_CONCAT2 (__eewr_dword, _EEPROM_SUFFIX)
#define eeprom_write_float _EEPROM_CONCAT2 (__eewr_float, _EEPROM_SUFFIX)
#define eeprom_write_block _EEPROM_CONCAT2 (__eewr_block, _EEPROM_SUFFIX)
#define eeprom_update_byte _EEPROM_CONCAT2 (__eeupd_byte, _EEPROM_SUFFIX)
#define eeprom_update_word _EEPROM_CONCAT2 (__eeupd_word, _EEPROM_SUFFIX)
#define eeprom_update_dword _EEPROM_CONCAT2 (__eeupd_dword, _EEPROM_SUFFIX)
#define eeprom_update_float _EEPROM_CONCAT2 (__eeupd_float, _EEPROM_SUFFIX)
#define eeprom_update_block _EEPROM_CONCAT2 (__eeupd_block, _EEPROM_SUFFIX)
#endif /* !__DOXYGEN__ */
# 567 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
#ifndef __ASSEMBLER__
#if 0 /* expanded by -frewrite-includes */
#include <stddef.h> /* size_t */
#endif /* expanded by -frewrite-includes */
# 570 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# 1 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 1 3 4
/*===---- stddef.h - Basic type definitions --------------------------------===
*
* Copyright (c) 2008 Eli Friedman
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*===-----------------------------------------------------------------------===
*/
#if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \
defined(__need_size_t) || defined(__need_wchar_t) || \
defined(__need_NULL) || defined(__need_wint_t)
#if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \
!defined(__need_wchar_t) && !defined(__need_NULL) && \
!defined(__need_wint_t)
/* Always define miscellaneous pieces when modules are available. */
#if !__has_feature(modules)
#define __STDDEF_H
#endif
# 37 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#define __need_ptrdiff_t
#define __need_size_t
#define __need_wchar_t
#define __need_NULL
#define __need_STDDEF_H_misc
/* __need_wint_t is intentionally not defined here. */
#endif
# 44 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#if defined(__need_ptrdiff_t)
#if !defined(_PTRDIFF_T) || __has_feature(modules)
/* Always define ptrdiff_t when modules are available. */
#if !__has_feature(modules)
#define _PTRDIFF_T
#endif
# 51 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
typedef __PTRDIFF_TYPE__ ptrdiff_t;
#endif
# 53 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#undef __need_ptrdiff_t
#endif /* defined(__need_ptrdiff_t) */
# 55 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#if defined(__need_size_t)
#if !defined(_SIZE_T) || __has_feature(modules)
/* Always define size_t when modules are available. */
#if !__has_feature(modules)
#define _SIZE_T
#endif
# 62 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
typedef __SIZE_TYPE__ size_t;
#endif
# 64 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#undef __need_size_t
#endif /*defined(__need_size_t) */
# 66 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#if defined(__need_STDDEF_H_misc)
/* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is
* enabled. */
#if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \
!defined(_RSIZE_T)) || __has_feature(modules)
/* Always define rsize_t when modules are available. */
#if !__has_feature(modules)
#define _RSIZE_T
#endif
# 76 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
typedef __SIZE_TYPE__ rsize_t;
#endif
# 78 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#endif /* defined(__need_STDDEF_H_misc) */
# 79 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#if defined(__need_wchar_t)
#ifndef __cplusplus
/* Always define wchar_t when modules are available. */
#if !defined(_WCHAR_T) || __has_feature(modules)
#if !__has_feature(modules)
#define _WCHAR_T
#if defined(_MSC_EXTENSIONS)
#define _WCHAR_T_DEFINED
#endif
# 89 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#endif
# 90 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
typedef __WCHAR_TYPE__ wchar_t;
#endif
# 92 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#endif
# 93 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#undef __need_wchar_t
#endif /* defined(__need_wchar_t) */
# 95 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#if defined(__need_NULL)
#undef NULL
#ifdef __cplusplus
# if !defined(__MINGW32__) && !defined(_MSC_VER)
# define NULL __null
# else
# 102 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
# define NULL 0
# endif
# 104 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#else
# 105 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
# define NULL ((void*)0)
#endif
# 107 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#ifdef __cplusplus
#if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED)
namespace std { typedef decltype(nullptr) nullptr_t; }
using ::std::nullptr_t;
#endif
# 112 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#endif
# 113 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#undef __need_NULL
#endif /* defined(__need_NULL) */
# 115 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#if defined(__need_STDDEF_H_misc)
#if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L
#if 0 /* expanded by -frewrite-includes */
#include "__stddef_max_align_t.h"
#endif /* expanded by -frewrite-includes */
# 118 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
# 1 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/__stddef_max_align_t.h" 1 3 4
/*===---- __stddef_max_align_t.h - Definition of max_align_t for modules ---===
*
* Copyright (c) 2014 Chandler Carruth
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*===-----------------------------------------------------------------------===
*/
#ifndef __CLANG_MAX_ALIGN_T_DEFINED
#define __CLANG_MAX_ALIGN_T_DEFINED
#if defined(_MSC_VER)
typedef double max_align_t;
#elif defined(__APPLE__)
# 32 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/__stddef_max_align_t.h" 3 4
typedef long double max_align_t;
#else
# 34 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/__stddef_max_align_t.h" 3 4
// Define 'max_align_t' to match the GCC definition.
typedef struct {
long long __clang_max_align_nonce1
__attribute__((__aligned__(__alignof__(long long))));
long double __clang_max_align_nonce2
__attribute__((__aligned__(__alignof__(long double))));
} max_align_t;
#endif
# 42 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/__stddef_max_align_t.h" 3 4
#endif
# 44 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/__stddef_max_align_t.h" 3 4
# 119 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 2 3 4
#endif
# 120 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#define offsetof(t, d) __builtin_offsetof(t, d)
#undef __need_STDDEF_H_misc
#endif /* defined(__need_STDDEF_H_misc) */
# 123 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
/* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use
__WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */
#if defined(__need_wint_t)
/* Always define wint_t when modules are available. */
#if !defined(_WINT_T) || __has_feature(modules)
#if !__has_feature(modules)
#define _WINT_T
#endif
# 132 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
typedef __WINT_TYPE__ wint_t;
#endif
# 134 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#undef __need_wint_t
#endif /* __need_wint_t */
# 136 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
#endif
# 138 "/Users/asmirnov/Documents/dev/src/avr-llvm/build/bin/../lib/clang/3.8.0/include/stddef.h" 3 4
# 571 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h" 2
#if 0 /* expanded by -frewrite-includes */
#include <stdint.h>
#endif /* expanded by -frewrite-includes */
# 571 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# 572 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
/** \defgroup avr_eeprom <avr/eeprom.h>: EEPROM handling
\code #include <avr/eeprom.h> \endcode
This header file declares the interface to some simple library
routines suitable for handling the data EEPROM contained in the
AVR microcontrollers. The implementation uses a simple polled
mode interface. Applications that require interrupt-controlled
EEPROM access to ensure that no time will be wasted in spinloops
will have to deploy their own implementation.
\par Notes:
- In addition to the write functions there is a set of update ones.
This functions read each byte first and skip the burning if the
old value is the same with new. The scaning direction is from
high address to low, to obtain quick return in common cases.
- All of the read/write functions first make sure the EEPROM is
ready to be accessed. Since this may cause long delays if a
write operation is still pending, time-critical applications
should first poll the EEPROM e. g. using eeprom_is_ready() before
attempting any actual I/O. But this functions are not wait until
SELFPRGEN in SPMCSR becomes zero. Do this manually, if your
softwate contains the Flash burning.
- As these functions modify IO registers, they are known to be
non-reentrant. If any of these functions are used from both,
standard and interrupt context, the applications must ensure
proper protection (e.g. by disabling interrupts before accessing
them).
- All write functions force erase_and_write programming mode.
- For Xmega the EEPROM start address is 0, like other architectures.
The reading functions add the 0x2000 value to use EEPROM mapping into
data space.
*/
#ifdef __cplusplus
extern "C" {
#endif
# 614 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
#ifndef __ATTR_PURE__
# ifdef __DOXYGEN__
# define __ATTR_PURE__
# else
# 619 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define __ATTR_PURE__ __attribute__((__pure__))
# endif
# 621 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
#endif
# 622 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
/** \def EEMEM
\ingroup avr_eeprom
Attribute expression causing a variable to be allocated within the
.eeprom section. */
#define EEMEM __attribute__((section(".eeprom")))
/** \def eeprom_is_ready
\ingroup avr_eeprom
\returns 1 if EEPROM is ready for a new read/write operation, 0 if not.
*/
#if defined (__DOXYGEN__)
# define eeprom_is_ready()
#elif defined (__AVR_XMEGA__) && __AVR_XMEGA__
# 636 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define eeprom_is_ready() bit_is_clear (NVM_STATUS, NVM_NVMBUSY_bp)
#elif defined (DEECR)
# 638 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define eeprom_is_ready() bit_is_clear (DEECR, BSY)
#elif defined (EEPE)
# 640 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define eeprom_is_ready() bit_is_clear (EECR, EEPE)
#else
# 642 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# define eeprom_is_ready() bit_is_clear (EECR, EEWE)
#endif
# 644 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
/** \def eeprom_busy_wait
\ingroup avr_eeprom
Loops until the eeprom is no longer busy.
\returns Nothing.
*/
#define eeprom_busy_wait() do {} while (!eeprom_is_ready())
/** \ingroup avr_eeprom
Read one byte from EEPROM address \a __p.
*/
uint8_t eeprom_read_byte (const uint8_t *__p) __ATTR_PURE__;
/** \ingroup avr_eeprom
Read one 16-bit word (little endian) from EEPROM address \a __p.
*/
uint16_t eeprom_read_word (const uint16_t *__p) __ATTR_PURE__;
/** \ingroup avr_eeprom
Read one 32-bit double word (little endian) from EEPROM address \a __p.
*/
uint32_t eeprom_read_dword (const uint32_t *__p) __ATTR_PURE__;
/** \ingroup avr_eeprom
Read one float value (little endian) from EEPROM address \a __p.
*/
float eeprom_read_float (const float *__p) __ATTR_PURE__;
/** \ingroup avr_eeprom
Read a block of \a __n bytes from EEPROM address \a __src to SRAM
\a __dst.
*/
void eeprom_read_block (void *__dst, const void *__src, size_t __n);
/** \ingroup avr_eeprom
Write a byte \a __value to EEPROM address \a __p.
*/
void eeprom_write_byte (uint8_t *__p, uint8_t __value);
/** \ingroup avr_eeprom
Write a word \a __value to EEPROM address \a __p.
*/
void eeprom_write_word (uint16_t *__p, uint16_t __value);
/** \ingroup avr_eeprom
Write a 32-bit double word \a __value to EEPROM address \a __p.
*/
void eeprom_write_dword (uint32_t *__p, uint32_t __value);
/** \ingroup avr_eeprom
Write a float \a __value to EEPROM address \a __p.
*/
void eeprom_write_float (float *__p, float __value);
/** \ingroup avr_eeprom
Write a block of \a __n bytes to EEPROM address \a __dst from \a __src.
\note The argument order is mismatch with common functions like strcpy().
*/
void eeprom_write_block (const void *__src, void *__dst, size_t __n);
/** \ingroup avr_eeprom
Update a byte \a __value to EEPROM address \a __p.
*/
void eeprom_update_byte (uint8_t *__p, uint8_t __value);
/** \ingroup avr_eeprom
Update a word \a __value to EEPROM address \a __p.
*/
void eeprom_update_word (uint16_t *__p, uint16_t __value);
/** \ingroup avr_eeprom
Update a 32-bit double word \a __value to EEPROM address \a __p.
*/
void eeprom_update_dword (uint32_t *__p, uint32_t __value);
/** \ingroup avr_eeprom
Update a float \a __value to EEPROM address \a __p.
*/
void eeprom_update_float (float *__p, float __value);
/** \ingroup avr_eeprom
Update a block of \a __n bytes to EEPROM address \a __dst from \a __src.
\note The argument order is mismatch with common functions like strcpy().
*/
void eeprom_update_block (const void *__src, void *__dst, size_t __n);
/** \name IAR C compatibility defines */
/*@{*/
/** \def _EEPUT
\ingroup avr_eeprom
Write a byte to EEPROM. Compatibility define for IAR C. */
#define _EEPUT(addr, val) eeprom_write_byte ((uint8_t *)(addr), (uint8_t)(val))
/** \def __EEPUT
\ingroup avr_eeprom
Write a byte to EEPROM. Compatibility define for IAR C. */
#define __EEPUT(addr, val) eeprom_write_byte ((uint8_t *)(addr), (uint8_t)(val))
/** \def _EEGET
\ingroup avr_eeprom
Read a byte from EEPROM. Compatibility define for IAR C. */
#define _EEGET(var, addr) (var) = eeprom_read_byte ((const uint8_t *)(addr))
/** \def __EEGET
\ingroup avr_eeprom
Read a byte from EEPROM. Compatibility define for IAR C. */
#define __EEGET(var, addr) (var) = eeprom_read_byte ((const uint8_t *)(addr))
/*@}*/
#ifdef __cplusplus
}
#endif
# 763 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
#endif /* !__ASSEMBLER__ */
# 765 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
#endif /* E2END || defined(__DOXYGEN__) || defined(__COMPILING_AVR_LIBC__) */
# 766 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
#endif /* !_AVR_EEPROM_H_ */
# 767 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/eeprom.h"
# 26 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/USBAPI.h" 2
#if 0 /* expanded by -frewrite-includes */
#include <avr/interrupt.h>
#endif /* expanded by -frewrite-includes */
# 26 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/USBAPI.h"
# 27 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/USBAPI.h"
#if 0 /* expanded by -frewrite-includes */
#include <util/delay.h>
#endif /* expanded by -frewrite-includes */
# 27 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/USBAPI.h"
# 1 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/util/delay.h" 1
/* Copyright (c) 2002, Marek Michalkiewicz
Copyright (c) 2004,2005,2007 Joerg Wunsch
Copyright (c) 2007 Florin-Viorel Petrov
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of the copyright holders nor the names of
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. */
/* $Id$ */
#ifndef _UTIL_DELAY_H_
#define _UTIL_DELAY_H_ 1
#ifndef __HAS_DELAY_CYCLES
#define __HAS_DELAY_CYCLES 1
#endif
# 41 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/util/delay.h"
#if 0 /* expanded by -frewrite-includes */
#include <inttypes.h>
#endif /* expanded by -frewrite-includes */
# 42 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/util/delay.h"
# 43 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/util/delay.h"
#if 0 /* expanded by -frewrite-includes */
#include <util/delay_basic.h>
#endif /* expanded by -frewrite-includes */
# 43 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/util/delay.h"
# 1 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/util/delay_basic.h" 1
/* Copyright (c) 2002, Marek Michalkiewicz
Copyright (c) 2007 Joerg Wunsch
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of the copyright holders nor the names of
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. */
/* $Id$ */
#ifndef _UTIL_DELAY_BASIC_H_
#define _UTIL_DELAY_BASIC_H_ 1
#if 0 /* expanded by -frewrite-includes */
#include <inttypes.h>
#endif /* expanded by -frewrite-includes */
# 37 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/util/delay_basic.h"
# 38 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/util/delay_basic.h"
#if !defined(__DOXYGEN__)
static inline void _delay_loop_1(uint8_t __count) __attribute__((always_inline));
static inline void _delay_loop_2(uint16_t __count) __attribute__((always_inline));
#endif
# 43 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/util/delay_basic.h"
/** \file */
/** \defgroup util_delay_basic <util/delay_basic.h>: Basic busy-wait delay loops
\code
#include <util/delay_basic.h>
\endcode
The functions in this header file implement simple delay loops
that perform a busy-waiting. They are typically used to
facilitate short delays in the program execution. They are
implemented as count-down loops with a well-known CPU cycle
count per loop iteration. As such, no other processing can
occur simultaneously. It should be kept in mind that the
functions described here do not disable interrupts.
In general, for long delays, the use of hardware timers is
much preferrable, as they free the CPU, and allow for
concurrent processing of other events while the timer is
running. However, in particular for very short delays, the
overhead of setting up a hardware timer is too much compared
to the overall delay time.
Two inline functions are provided for the actual delay algorithms.
*/
/** \ingroup util_delay_basic
Delay loop using an 8-bit counter \c __count, so up to 256
iterations are possible. (The value 256 would have to be passed
as 0.) The loop executes three CPU cycles per iteration, not
including the overhead the compiler needs to setup the counter
register.
Thus, at a CPU speed of 1 MHz, delays of up to 768 microseconds
can be achieved.
*/
void
_delay_loop_1(uint8_t __count)
{
__asm__ volatile (
"1: dec %0" "\n\t"
"brne 1b"
: "=r" (__count)
: "0" (__count)
);
}
/** \ingroup util_delay_basic
Delay loop using a 16-bit counter \c __count, so up to 65536
iterations are possible. (The value 65536 would have to be
passed as 0.) The loop executes four CPU cycles per iteration,
not including the overhead the compiler requires to setup the
counter register pair.
Thus, at a CPU speed of 1 MHz, delays of up to about 262.1
milliseconds can be achieved.
*/
void
_delay_loop_2(uint16_t __count)
{
__asm__ volatile (
"1: sbiw %0,1" "\n\t"
"brne 1b"
: "=w" (__count)
: "0" (__count)
);
}
#endif /* _UTIL_DELAY_BASIC_H_ */
# 114 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/util/delay_basic.h"
# 44 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/util/delay.h" 2
#if 0 /* expanded by -frewrite-includes */
#include <math.h>
#endif /* expanded by -frewrite-includes */
# 44 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/util/delay.h"
# 45 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/util/delay.h"
/** \file */
/** \defgroup util_delay <util/delay.h>: Convenience functions for busy-wait delay loops
\code
#define F_CPU 1000000UL // 1 MHz
//#define F_CPU 14.7456E6
#include <util/delay.h>
\endcode
\note As an alternative method, it is possible to pass the
F_CPU macro down to the compiler from the Makefile.
Obviously, in that case, no \c \#define statement should be
used.
The functions in this header file are wrappers around the basic
busy-wait functions from <util/delay_basic.h>. They are meant as
convenience functions where actual time values can be specified
rather than a number of cycles to wait for. The idea behind is
that compile-time constant expressions will be eliminated by
compiler optimization so floating-point expressions can be used
to calculate the number of delay cycles needed based on the CPU
frequency passed by the macro F_CPU.
\note In order for these functions to work as intended, compiler
optimizations <em>must</em> be enabled, and the delay time
<em>must</em> be an expression that is a known constant at
compile-time. If these requirements are not met, the resulting
delay will be much longer (and basically unpredictable), and
applications that otherwise do not use floating-point calculations
will experience severe code bloat by the floating-point library
routines linked into the application.
The functions available allow the specification of microsecond, and
millisecond delays directly, using the application-supplied macro
F_CPU as the CPU clock frequency (in Hertz).
*/
#if !defined(__DOXYGEN__)
static inline void _delay_us(double __us) __attribute__((always_inline));
static inline void _delay_ms(double __ms) __attribute__((always_inline));
#endif
# 87 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/util/delay.h"
#ifndef F_CPU
/* prevent compiler error by supplying a default */
# warning "F_CPU not defined for <util/delay.h>"
# define F_CPU 1000000UL
#endif
# 93 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/util/delay.h"
#ifndef __OPTIMIZE__
# warning "Compiler optimizations disabled; functions from <util/delay.h> won't work as designed"
#endif
# 97 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/util/delay.h"
#if __HAS_DELAY_CYCLES && defined(__OPTIMIZE__) && \
!defined(__DELAY_BACKWARD_COMPATIBLE__) && \
__STDC_HOSTED__
#if 0 /* expanded by -frewrite-includes */
# include <math.h>
#endif /* expanded by -frewrite-includes */
# 101 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/util/delay.h"
# 102 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/util/delay.h"
#endif
# 103 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/util/delay.h"
/**
\ingroup util_delay
Perform a delay of \c __ms milliseconds, using _delay_loop_2().
The macro F_CPU is supposed to be defined to a
constant defining the CPU clock frequency (in Hertz).
The maximal possible delay is 262.14 ms / F_CPU in MHz.
When the user request delay which exceed the maximum possible one,
_delay_ms() provides a decreased resolution functionality. In this
mode _delay_ms() will work with a resolution of 1/10 ms, providing
delays up to 6.5535 seconds (independent from CPU frequency). The
user will not be informed about decreased resolution.
If the avr-gcc toolchain has __builtin_avr_delay_cycles(unsigned long)
support, maximal possible delay is 4294967.295 ms/ F_CPU in MHz. For
values greater than the maximal possible delay, overflows results in
no delay i.e., 0ms.
Conversion of __us into clock cycles may not always result in integer.
By default, the clock cycles rounded up to next integer. This ensures that
the user gets atleast __us microseconds of delay.
Alternatively, user can define __DELAY_ROUND_DOWN__ and __DELAY_ROUND_CLOSEST__
to round down and round to closest integer.
Note: The new implementation of _delay_ms(double __ms) with
__builtin_avr_delay_cycles(unsigned long) support is not backward compatible.
User can define __DELAY_BACKWARD_COMPATIBLE__ to get a backward compatible delay.
Also, the backward compatible
algorithm will be chosen if the code is compiled in a <em>freestanding
environment</em> (GCC option \c -ffreestanding), as the math functions
required for rounding are not available to the compiler then.
*/
void
_delay_ms(double __ms)
{
double __tmp ;
#if __HAS_DELAY_CYCLES && defined(__OPTIMIZE__) && \
!defined(__DELAY_BACKWARD_COMPATIBLE__) && \
__STDC_HOSTED__
uint32_t __ticks_dc;
extern void __builtin_avr_delay_cycles(unsigned long);
__tmp = ((F_CPU) / 1e3) * __ms;
#if defined(__DELAY_ROUND_DOWN__)
__ticks_dc = (uint32_t)fabs(__tmp);
#elif defined(__DELAY_ROUND_CLOSEST__)
# 156 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/util/delay.h"
__ticks_dc = (uint32_t)(fabs(__tmp)+0.5);
#else
# 159 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/util/delay.h"
//round up by default
__ticks_dc = (uint32_t)(ceil(fabs(__tmp)));
#endif
# 162 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/util/delay.h"
__builtin_avr_delay_cycles(__ticks_dc);
#else
# 166 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/util/delay.h"
uint16_t __ticks;
__tmp = ((F_CPU) / 4e3) * __ms;
if (__tmp < 1.0)
__ticks = 1;
else if (__tmp > 65535)
{
// __ticks = requested delay in 1/10 ms
__ticks = (uint16_t) (__ms * 10.0);
while(__ticks)
{
// wait 1/10 ms
_delay_loop_2(((F_CPU) / 4e3) / 10);
__ticks --;
}
return;
}
else
__ticks = (uint16_t)__tmp;
_delay_loop_2(__ticks);
#endif
# 186 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/util/delay.h"
}
/**
\ingroup util_delay
Perform a delay of \c __us microseconds, using _delay_loop_1().
The macro F_CPU is supposed to be defined to a
constant defining the CPU clock frequency (in Hertz).
The maximal possible delay is 768 us / F_CPU in MHz.
If the user requests a delay greater than the maximal possible one,
_delay_us() will automatically call _delay_ms() instead. The user
will not be informed about this case.
If the avr-gcc toolchain has __builtin_avr_delay_cycles(unsigned long)
support, maximal possible delay is 4294967.295 us/ F_CPU in MHz. For
values greater than the maximal possible delay, overflow results in
no delay i.e., 0us.
Conversion of __us into clock cycles may not always result in integer.
By default, the clock cycles rounded up to next integer. This ensures that
the user gets atleast __us microseconds of delay.
Alternatively, user can define __DELAY_ROUND_DOWN__ and __DELAY_ROUND_CLOSEST__
to round down and round to closest integer.
Note: The new implementation of _delay_us(double __us) with
__builtin_avr_delay_cycles(unsigned long) support is not backward compatible.
User can define __DELAY_BACKWARD_COMPATIBLE__ to get a backward compatible delay.
Also, the backward compatible
algorithm will be chosen if the code is compiled in a <em>freestanding
environment</em> (GCC option \c -ffreestanding), as the math functions
required for rounding are not available to the compiler then.
*/
void
_delay_us(double __us)
{
double __tmp ;
#if __HAS_DELAY_CYCLES && defined(__OPTIMIZE__) && \
!defined(__DELAY_BACKWARD_COMPATIBLE__) && \
__STDC_HOSTED__
uint32_t __ticks_dc;
extern void __builtin_avr_delay_cycles(unsigned long);
__tmp = ((F_CPU) / 1e6) * __us;
#if defined(__DELAY_ROUND_DOWN__)
__ticks_dc = (uint32_t)fabs(__tmp);
#elif defined(__DELAY_ROUND_CLOSEST__)
# 238 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/util/delay.h"
__ticks_dc = (uint32_t)(fabs(__tmp)+0.5);
#else
# 241 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/util/delay.h"
//round up by default
__ticks_dc = (uint32_t)(ceil(fabs(__tmp)));
#endif
# 244 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/util/delay.h"
__builtin_avr_delay_cycles(__ticks_dc);
#else
# 248 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/util/delay.h"
uint8_t __ticks;
double __tmp2 ;
__tmp = ((F_CPU) / 3e6) * __us;
__tmp2 = ((F_CPU) / 4e6) * __us;
if (__tmp < 1.0)
__ticks = 1;
else if (__tmp2 > 65535)
{
_delay_ms(__us / 1000.0);
}
else if (__tmp > 255)
{
uint16_t __ticks=(uint16_t)__tmp2;
_delay_loop_2(__ticks);
return;
}
else
__ticks = (uint8_t)__tmp;
_delay_loop_1(__ticks);
#endif
# 268 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/util/delay.h"
}
#endif /* _UTIL_DELAY_H_ */
# 272 "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/util/delay.h"
# 28 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/USBAPI.h" 2
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned long u32;
#if 0 /* expanded by -frewrite-includes */
#include "Arduino.h"
#endif /* expanded by -frewrite-includes */
# 33 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/USBAPI.h"
# 1 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h" 1
/*
Arduino.h - Main include file for the Arduino SDK
Copyright (c) 2005-2013 Arduino Team. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef Arduino_h
#define Arduino_h
#if 0 /* expanded by -frewrite-includes */
#include <stdlib.h>
#endif /* expanded by -frewrite-includes */
# 23 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
# 24 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
#if 0 /* expanded by -frewrite-includes */
#include <stdbool.h>
#endif /* expanded by -frewrite-includes */
# 24 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
# 25 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
#if 0 /* expanded by -frewrite-includes */
#include <string.h>
#endif /* expanded by -frewrite-includes */
# 25 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
# 26 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
#if 0 /* expanded by -frewrite-includes */
#include <math.h>
#endif /* expanded by -frewrite-includes */
# 26 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
# 27 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
#if 0 /* expanded by -frewrite-includes */
#include <avr/pgmspace.h>
#endif /* expanded by -frewrite-includes */
# 28 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
# 29 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
#if 0 /* expanded by -frewrite-includes */
#include <avr/io.h>
#endif /* expanded by -frewrite-includes */
# 29 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
# 30 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
#if 0 /* expanded by -frewrite-includes */
#include <avr/interrupt.h>
#endif /* expanded by -frewrite-includes */
# 30 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
# 31 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
#if 0 /* expanded by -frewrite-includes */
#include "binary.h"
#endif /* expanded by -frewrite-includes */
# 32 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
# 33 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
#ifdef __cplusplus
extern "C"{
#endif
# 37 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
void yield(void);
#define HIGH 0x1
#define LOW 0x0
#define INPUT 0x0
#define OUTPUT 0x1
#define INPUT_PULLUP 0x2
#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 EULER 2.718281828459045235360287471352
#define SERIAL 0x0
#define DISPLAY 0x1
#define LSBFIRST 0
#define MSBFIRST 1
#define CHANGE 1
#define FALLING 2
#define RISING 3
#if defined(__AVR_ATtiny24__) || defined(__AVR_ATtiny44__) || defined(__AVR_ATtiny84__) || defined(__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__)
#define DEFAULT 0
#define EXTERNAL 1
#define INTERNAL 2
#else
# 69 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__) || defined(__AVR_ATmega644__) || defined(__AVR_ATmega644A__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644PA__)
#define INTERNAL1V1 2
#define INTERNAL2V56 3
#else
# 73 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
#define INTERNAL 3
#endif
# 75 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
#define DEFAULT 1
#define EXTERNAL 0
#endif
# 78 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
// undefine stdlib's abs if encountered
#ifdef abs
#undef abs
#endif
# 83 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
#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 interrupts() sei()
#define noInterrupts() cli()
#define clockCyclesPerMicrosecond() ( F_CPU / 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))
// avr-libc defines _NOP() since 1.6.2
#ifndef _NOP
#define _NOP() do { __asm__ volatile ("nop"); } while (0)
#endif
# 112 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
typedef unsigned int word;
#define bit(b) (1UL << (b))
typedef bool boolean;
typedef uint8_t byte;
void init(void);
void initVariant(void);
int atexit(void (*func)()) __attribute__((weak));
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(unsigned int us);
unsigned long pulseIn(uint8_t pin, uint8_t state, unsigned long timeout);
unsigned long pulseInLong(uint8_t pin, uint8_t state, unsigned long timeout);
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 attachInterrupt(uint8_t, void (*)(void), int mode);
void detachInterrupt(uint8_t);
void setup(void);
void loop(void);
// Get the bit location within the hardware port of the given virtual pin.
// This comes from the pins_*.c file for the active board configuration.
#define analogInPinToBit(P) (P)
// On the ATmega1280, the addresses of some of the port registers are
// greater than 255, so we can't store them in uint8_t's.
extern const uint16_t PROGMEM port_to_mode_PGM[];
extern const uint16_t PROGMEM port_to_input_PGM[];
extern const uint16_t PROGMEM port_to_output_PGM[];
extern const uint8_t PROGMEM digital_pin_to_port_PGM[];
// extern const uint8_t PROGMEM digital_pin_to_bit_PGM[];
extern const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[];
extern const uint8_t PROGMEM digital_pin_to_timer_PGM[];
// Get the bit location within the hardware port of the given virtual pin.
// This comes from the pins_*.c file for the active board configuration.
//
// These perform slightly better as macros compared to inline functions
//
#define digitalPinToPort(P) ( pgm_read_byte( digital_pin_to_port_PGM + (P) ) )
#define digitalPinToBitMask(P) ( pgm_read_byte( digital_pin_to_bit_mask_PGM + (P) ) )
#define digitalPinToTimer(P) ( pgm_read_byte( digital_pin_to_timer_PGM + (P) ) )
#define analogInPinToBit(P) (P)
#define portOutputRegister(P) ( (volatile uint8_t *)( pgm_read_word( port_to_output_PGM + (P))) )
#define portInputRegister(P) ( (volatile uint8_t *)( pgm_read_word( port_to_input_PGM + (P))) )
#define portModeRegister(P) ( (volatile uint8_t *)( pgm_read_word( port_to_mode_PGM + (P))) )
#define NOT_A_PIN 0
#define NOT_A_PORT 0
#define NOT_AN_INTERRUPT -1
#ifdef ARDUINO_MAIN
#define PA 1
#define PB 2
#define PC 3
#define PD 4
#define PE 5
#define PF 6
#define PG 7
#define PH 8
#define PJ 10
#define PK 11
#define PL 12
#endif
# 195 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
#define NOT_ON_TIMER 0
#define TIMER0A 1
#define TIMER0B 2
#define TIMER1A 3
#define TIMER1B 4
#define TIMER1C 5
#define TIMER2 6
#define TIMER2A 7
#define TIMER2B 8
#define TIMER3A 9
#define TIMER3B 10
#define TIMER3C 11
#define TIMER4A 12
#define TIMER4B 13
#define TIMER4C 14
#define TIMER4D 15
#define TIMER5A 16
#define TIMER5B 17
#define TIMER5C 18
#ifdef __cplusplus
} // extern "C"
#endif
# 220 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
#ifdef __cplusplus
#if 0 /* expanded by -frewrite-includes */
#include "WCharacter.h"
#endif /* expanded by -frewrite-includes */
# 222 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
# 223 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
#if 0 /* expanded by -frewrite-includes */
#include "WString.h"
#endif /* expanded by -frewrite-includes */
# 223 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
# 224 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
#if 0 /* expanded by -frewrite-includes */
#include "HardwareSerial.h"
#endif /* expanded by -frewrite-includes */
# 224 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
# 225 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
#if 0 /* expanded by -frewrite-includes */
#include "USBAPI.h"
#endif /* expanded by -frewrite-includes */
# 225 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
# 226 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
#if defined(HAVE_HWSERIAL0) && defined(HAVE_CDCSERIAL)
#error "Targets with both UART0 and CDC serial not supported"
#endif
# 229 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
uint16_t makeWord(uint16_t w);
uint16_t makeWord(byte h, byte l);
#define word(...) makeWord(__VA_ARGS__)
unsigned long pulseIn(uint8_t pin, uint8_t state, unsigned long timeout = 1000000L);
unsigned long pulseInLong(uint8_t pin, uint8_t state, unsigned long timeout = 1000000L);
void tone(uint8_t _pin, unsigned int frequency, unsigned long duration = 0);
void noTone(uint8_t _pin);
// WMath prototypes
long random(long);
long random(long, long);
void randomSeed(unsigned long);
long map(long, long, long, long, long);
#endif
# 248 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
#if 0 /* expanded by -frewrite-includes */
#include "pins_arduino.h"
#endif /* expanded by -frewrite-includes */
# 249 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
# 250 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
#endif
# 252 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
# 34 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/USBAPI.h" 2
// This definitions is usefull if you want to reduce the EP_SIZE to 16
// at the moment only 64 and 16 as EP_SIZE for all EPs are supported except the control endpoint
#ifndef USB_EP_SIZE
#define USB_EP_SIZE 64
#endif
# 40 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/USBAPI.h"
#if defined(USBCON)
#if 0 /* expanded by -frewrite-includes */
#include "USBDesc.h"
#endif /* expanded by -frewrite-includes */
# 43 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/USBAPI.h"
# 44 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/USBAPI.h"
#if 0 /* expanded by -frewrite-includes */
#include "USBCore.h"
#endif /* expanded by -frewrite-includes */
# 44 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/USBAPI.h"
# 45 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/USBAPI.h"
//================================================================================
//================================================================================
// USB
#define EP_TYPE_CONTROL (0x00)
#define EP_TYPE_BULK_IN ((1<<EPTYPE1) | (1<<EPDIR))
#define EP_TYPE_BULK_OUT (1<<EPTYPE1)
#define EP_TYPE_INTERRUPT_IN ((1<<EPTYPE1) | (1<<EPTYPE0) | (1<<EPDIR))
#define EP_TYPE_INTERRUPT_OUT ((1<<EPTYPE1) | (1<<EPTYPE0))
#define EP_TYPE_ISOCHRONOUS_IN ((1<<EPTYPE0) | (1<<EPDIR))
#define EP_TYPE_ISOCHRONOUS_OUT (1<<EPTYPE0)
class USBDevice_
{
public:
USBDevice_();
bool configured();
void attach();
void detach(); // Serial port goes down too...
void poll();
bool wakeupHost(); // returns false, when wakeup cannot be processed
};
extern USBDevice_ USBDevice;
//================================================================================
//================================================================================
// Serial over CDC (Serial1 is the physical port)
struct ring_buffer;
#ifndef SERIAL_BUFFER_SIZE
#if ((RAMEND - RAMSTART) < 1023)
#define SERIAL_BUFFER_SIZE 16
#else
# 81 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/USBAPI.h"
#define SERIAL_BUFFER_SIZE 64
#endif
# 83 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/USBAPI.h"
#endif
# 84 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/USBAPI.h"
#if (SERIAL_BUFFER_SIZE>256)
#error Please lower the CDC Buffer size
#endif
# 87 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/USBAPI.h"
class Serial_ : public Stream
{
private:
int peek_buffer;
public:
Serial_() { peek_buffer = -1; };
void begin(unsigned long);
void begin(unsigned long, uint8_t);
void end(void);
virtual int available(void);
virtual int peek(void);
virtual int read(void);
int availableForWrite(void);
virtual void flush(void);
virtual size_t write(uint8_t);
virtual size_t write(const uint8_t*, size_t);
using Print::write; // pull in write(str) and write(buf, size) from Print
operator bool();
volatile uint8_t _rx_buffer_head;
volatile uint8_t _rx_buffer_tail;
unsigned char _rx_buffer[SERIAL_BUFFER_SIZE];
// This method allows processing "SEND_BREAK" requests sent by
// the USB host. Those requests indicate that the host wants to
// send a BREAK signal and are accompanied by a single uint16_t
// value, specifying the duration of the break. The value 0
// means to end any current break, while the value 0xffff means
// to start an indefinite break.
// readBreak() will return the value of the most recent break
// request, but will return it at most once, returning -1 when
// readBreak() is called again (until another break request is
// received, which is again returned once).
// This also mean that if two break requests are received
// without readBreak() being called in between, the value of the
// first request is lost.
// Note that the value returned is a long, so it can return
// 0-0xffff as well as -1.
int32_t readBreak();
// These return the settings specified by the USB host for the
// serial port. These aren't really used, but are offered here
// in case a sketch wants to act on these settings.
uint32_t baud();
uint8_t stopbits();
uint8_t paritytype();
uint8_t numbits();
bool dtr();
bool rts();
enum {
ONE_STOP_BIT = 0,
ONE_AND_HALF_STOP_BIT = 1,
TWO_STOP_BITS = 2,
};
enum {
NO_PARITY = 0,
ODD_PARITY = 1,
EVEN_PARITY = 2,
MARK_PARITY = 3,
SPACE_PARITY = 4,
};
};
extern Serial_ Serial;
#define HAVE_CDCSERIAL
//================================================================================
//================================================================================
// Low level API
typedef struct
{
uint8_t bmRequestType;
uint8_t bRequest;
uint8_t wValueL;
uint8_t wValueH;
uint16_t wIndex;
uint16_t wLength;
} USBSetup;
//================================================================================
//================================================================================
// MSC 'Driver'
int MSC_GetInterface(uint8_t* interfaceNum);
int MSC_GetDescriptor(int i);
bool MSC_Setup(USBSetup& setup);
bool MSC_Data(uint8_t rx,uint8_t tx);
//================================================================================
//================================================================================
// CSC 'Driver'
int CDC_GetInterface(uint8_t* interfaceNum);
int CDC_GetDescriptor(int i);
bool CDC_Setup(USBSetup& setup);
//================================================================================
//================================================================================
#define TRANSFER_PGM 0x80
#define TRANSFER_RELEASE 0x40
#define TRANSFER_ZERO 0x20
int USB_SendControl(uint8_t flags, const void* d, int len);
int USB_RecvControl(void* d, int len);
uint8_t USB_Available(uint8_t ep);
uint8_t USB_SendSpace(uint8_t ep);
int USB_Send(uint8_t ep, const void* data, int len); // blocking
int USB_Recv(uint8_t ep, void* data, int len); // non-blocking
int USB_Recv(uint8_t ep); // non-blocking
void USB_Flush(uint8_t ep);
#endif
# 205 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/USBAPI.h"
#endif /* if defined(USBCON) */
# 207 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/USBAPI.h"
# 226 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h" 2
#if defined(HAVE_HWSERIAL0) && defined(HAVE_CDCSERIAL)
#error "Targets with both UART0 and CDC serial not supported"
#endif
# 229 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
uint16_t makeWord(uint16_t w);
uint16_t makeWord(byte h, byte l);
#define word(...) makeWord(__VA_ARGS__)
unsigned long pulseIn(uint8_t pin, uint8_t state, unsigned long timeout = 1000000L);
unsigned long pulseInLong(uint8_t pin, uint8_t state, unsigned long timeout = 1000000L);
void tone(uint8_t _pin, unsigned int frequency, unsigned long duration = 0);
void noTone(uint8_t _pin);
// WMath prototypes
long random(long);
long random(long, long);
void randomSeed(unsigned long);
long map(long, long, long, long, long);
#endif
# 248 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
#if 0 /* expanded by -frewrite-includes */
#include "pins_arduino.h"
#endif /* expanded by -frewrite-includes */
# 249 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
# 1 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/variants/standard/pins_arduino.h" 1
/*
pins_arduino.h - Pin definition functions for Arduino
Part of Arduino - http://www.arduino.cc/
Copyright (c) 2007 David A. Mellis
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General
Public License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
*/
#ifndef Pins_Arduino_h
#define Pins_Arduino_h
#if 0 /* expanded by -frewrite-includes */
#include <avr/pgmspace.h>
#endif /* expanded by -frewrite-includes */
# 26 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/variants/standard/pins_arduino.h"
# 27 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/variants/standard/pins_arduino.h"
#define NUM_DIGITAL_PINS 20
#define NUM_ANALOG_INPUTS 6
#define analogInputToDigitalPin(p) ((p < 6) ? (p) + 14 : -1)
#if defined(__AVR_ATmega8__)
#define digitalPinHasPWM(p) ((p) == 9 || (p) == 10 || (p) == 11)
#else
# 35 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/variants/standard/pins_arduino.h"
#define digitalPinHasPWM(p) ((p) == 3 || (p) == 5 || (p) == 6 || (p) == 9 || (p) == 10 || (p) == 11)
#endif
# 37 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/variants/standard/pins_arduino.h"
static const uint8_t SS = 10;
static const uint8_t MOSI = 11;
static const uint8_t MISO = 12;
static const uint8_t SCK = 13;
static const uint8_t SDA = 18;
static const uint8_t SCL = 19;
#define LED_BUILTIN 13
static const uint8_t A0 = 14;
static const uint8_t A1 = 15;
static const uint8_t A2 = 16;
static const uint8_t A3 = 17;
static const uint8_t A4 = 18;
static const uint8_t A5 = 19;
static const uint8_t A6 = 20;
static const uint8_t A7 = 21;
#define digitalPinToPCICR(p) (((p) >= 0 && (p) <= 21) ? (&PCICR) : ((uint8_t *)0))
#define digitalPinToPCICRbit(p) (((p) <= 7) ? 2 : (((p) <= 13) ? 0 : 1))
#define digitalPinToPCMSK(p) (((p) <= 7) ? (&PCMSK2) : (((p) <= 13) ? (&PCMSK0) : (((p) <= 21) ? (&PCMSK1) : ((uint8_t *)0))))
#define digitalPinToPCMSKbit(p) (((p) <= 7) ? (p) : (((p) <= 13) ? ((p) - 8) : ((p) - 14)))
#define digitalPinToInterrupt(p) ((p) == 2 ? 0 : ((p) == 3 ? 1 : NOT_AN_INTERRUPT))
#ifdef ARDUINO_MAIN
// On the Arduino board, digital pins are also used
// for the analog output (software PWM). Analog input
// pins are a separate set.
// ATMEL ATMEGA8 & 168 / ARDUINO
//
// +-\/-+
// PC6 1| |28 PC5 (AI 5)
// (D 0) PD0 2| |27 PC4 (AI 4)
// (D 1) PD1 3| |26 PC3 (AI 3)
// (D 2) PD2 4| |25 PC2 (AI 2)
// PWM+ (D 3) PD3 5| |24 PC1 (AI 1)
// (D 4) PD4 6| |23 PC0 (AI 0)
// VCC 7| |22 GND
// GND 8| |21 AREF
// PB6 9| |20 AVCC
// PB7 10| |19 PB5 (D 13)
// PWM+ (D 5) PD5 11| |18 PB4 (D 12)
// PWM+ (D 6) PD6 12| |17 PB3 (D 11) PWM
// (D 7) PD7 13| |16 PB2 (D 10) PWM
// (D 8) PB0 14| |15 PB1 (D 9) PWM
// +----+
//
// (PWM+ indicates the additional PWM pins on the ATmega168.)
// ATMEL ATMEGA1280 / ARDUINO
//
// 0-7 PE0-PE7 works
// 8-13 PB0-PB5 works
// 14-21 PA0-PA7 works
// 22-29 PH0-PH7 works
// 30-35 PG5-PG0 works
// 36-43 PC7-PC0 works
// 44-51 PJ7-PJ0 works
// 52-59 PL7-PL0 works
// 60-67 PD7-PD0 works
// A0-A7 PF0-PF7
// A8-A15 PK0-PK7
// these arrays map port names (e.g. port B) to the
// appropriate addresses for various functions (e.g. reading
// and writing)
const uint16_t PROGMEM port_to_mode_PGM[] = {
NOT_A_PORT,
NOT_A_PORT,
(uint16_t) &DDRB,
(uint16_t) &DDRC,
(uint16_t) &DDRD,
};
const uint16_t PROGMEM port_to_output_PGM[] = {
NOT_A_PORT,
NOT_A_PORT,
(uint16_t) &PORTB,
(uint16_t) &PORTC,
(uint16_t) &PORTD,
};
const uint16_t PROGMEM port_to_input_PGM[] = {
NOT_A_PORT,
NOT_A_PORT,
(uint16_t) &PINB,
(uint16_t) &PINC,
(uint16_t) &PIND,
};
const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
PD, /* 0 */
PD,
PD,
PD,
PD,
PD,
PD,
PD,
PB, /* 8 */
PB,
PB,
PB,
PB,
PB,
PC, /* 14 */
PC,
PC,
PC,
PC,
PC,
};
const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = {
_BV(0), /* 0, port D */
_BV(1),
_BV(2),
_BV(3),
_BV(4),
_BV(5),
_BV(6),
_BV(7),
_BV(0), /* 8, port B */
_BV(1),
_BV(2),
_BV(3),
_BV(4),
_BV(5),
_BV(0), /* 14, port C */
_BV(1),
_BV(2),
_BV(3),
_BV(4),
_BV(5),
};
const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
NOT_ON_TIMER, /* 0 - port D */
NOT_ON_TIMER,
NOT_ON_TIMER,
// on the ATmega168, digital pin 3 has hardware pwm
#if defined(__AVR_ATmega8__)
NOT_ON_TIMER,
#else
# 186 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/variants/standard/pins_arduino.h"
TIMER2B,
#endif
# 188 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/variants/standard/pins_arduino.h"
NOT_ON_TIMER,
// on the ATmega168, digital pins 5 and 6 have hardware pwm
#if defined(__AVR_ATmega8__)
NOT_ON_TIMER,
NOT_ON_TIMER,
#else
# 194 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/variants/standard/pins_arduino.h"
TIMER0B,
TIMER0A,
#endif
# 197 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/variants/standard/pins_arduino.h"
NOT_ON_TIMER,
NOT_ON_TIMER, /* 8 - port B */
TIMER1A,
TIMER1B,
#if defined(__AVR_ATmega8__)
TIMER2,
#else
# 204 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/variants/standard/pins_arduino.h"
TIMER2A,
#endif
# 206 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/variants/standard/pins_arduino.h"
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER, /* 14 - port C */
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
};
#endif
# 217 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/variants/standard/pins_arduino.h"
// These serial port names are intended to allow libraries and architecture-neutral
// sketches to automatically default to the correct port name for a particular type
// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
// the first hardware serial port whose RX/TX pins are not dedicated to another use.
//
// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
//
// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
//
// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
//
// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
//
// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
// pins are NOT connected to anything by default.
#define SERIAL_PORT_MONITOR Serial
#define SERIAL_PORT_HARDWARE Serial
#endif
# 237 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/variants/standard/pins_arduino.h"
# 250 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h" 2
#endif
# 252 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
# 26 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Stream.cpp" 2
#if 0 /* expanded by -frewrite-includes */
#include "Stream.h"
#endif /* expanded by -frewrite-includes */
# 26 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Stream.cpp"
# 27 "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Stream.cpp"
#define PARSE_TIMEOUT 1000 // default number of milli-seconds to wait
// private method to read stream with timeout
int Stream::timedRead()
{
int c;
_startMillis = millis();
do {
c = read();
if (c >= 0) return c;
} while(millis() - _startMillis < _timeout);
return -1; // -1 indicates timeout
}
// private method to peek stream with timeout
int Stream::timedPeek()
{
int c;
_startMillis = millis();
do {
c = peek();
if (c >= 0) return c;
} while(millis() - _startMillis < _timeout);
return -1; // -1 indicates timeout
}
// returns peek of the next digit in the stream or -1 if timeout
// discards non-numeric characters
int Stream::peekNextDigit(LookaheadMode lookahead, bool detectDecimal)
{
int c;
while (1) {
c = timedPeek();
if( c < 0 ||
c == '-' ||
(c >= '0' && c <= '9') ||
(detectDecimal && c == '.')) return c;
switch( lookahead ){
case SKIP_NONE: return -1; // Fail code.
case SKIP_WHITESPACE:
switch( c ){
case ' ':
case '\t':
case '\r':
case '\n': break;
default: return -1; // Fail code.
}
case SKIP_ALL:
break;
}
read(); // discard non-numeric
}
}
// Public Methods
//////////////////////////////////////////////////////////////
void Stream::setTimeout(unsigned long timeout) // sets the maximum number of milliseconds to wait
{
_timeout = timeout;
}
// find returns true if the target string is found
bool Stream::find(char *target)
{
return findUntil(target, strlen(target), NULL, 0);
}
// reads data from the stream until the target string of given length is found
// returns true if target string is found, false if timed out
bool Stream::find(char *target, size_t length)
{
return findUntil(target, length, NULL, 0);
}
// as find but search ends if the terminator string is found
bool Stream::findUntil(char *target, char *terminator)
{
return findUntil(target, strlen(target), terminator, strlen(terminator));
}
// reads data from the stream until the target string of the given length is found
// search terminated if the terminator string is found
// returns true if target string is found, false if terminated or timed out
bool Stream::findUntil(char *target, size_t targetLen, char *terminator, size_t termLen)
{
if (terminator == NULL) {
MultiTarget t[1] = {{target, targetLen, 0}};
return findMulti(t, 1) == 0 ? true : false;
} else {
MultiTarget t[2] = {{target, targetLen, 0}, {terminator, termLen, 0}};
return findMulti(t, 2) == 0 ? true : false;
}
}
// returns the first valid (long) integer value from the current position.
// lookahead determines how parseInt looks ahead in the stream.
// See LookaheadMode enumeration at the top of the file.
// Lookahead is terminated by the first character that is not a valid part of an integer.
// Once parsing commences, 'ignore' will be skipped in the stream.
long Stream::parseInt(LookaheadMode lookahead, char ignore)
{
bool isNegative = false;
long value = 0;
int c;
c = peekNextDigit(lookahead, false);
// ignore non numeric leading characters
if(c < 0)
return 0; // zero returned if timeout
do{
if(c == ignore)
; // ignore this character
else if(c == '-')
isNegative = true;
else if(c >= '0' && c <= '9') // is c a digit?
value = value * 10 + c - '0';
read(); // consume the character we got with peek
c = timedPeek();
}
while( (c >= '0' && c <= '9') || c == ignore );
if(isNegative)
value = -value;
return value;
}
// as parseInt but returns a floating point value
float Stream::parseFloat(LookaheadMode lookahead, char ignore)
{
bool isNegative = false;
bool isFraction = false;
long value = 0;
int c;
float fraction = 1.0;
c = peekNextDigit(lookahead, true);
// ignore non numeric leading characters
if(c < 0)
return 0; // zero returned if timeout
do{
if(c == ignore)
; // ignore
else if(c == '-')
isNegative = true;
else if (c == '.')
isFraction = true;
else if(c >= '0' && c <= '9') { // is c a digit?
value = value * 10 + c - '0';
if(isFraction)
fraction *= 0.1;
}
read(); // consume the character we got with peek
c = timedPeek();
}
while( (c >= '0' && c <= '9') || (c == '.' && !isFraction) || c == ignore );
if(isNegative)
value = -value;
if(isFraction)
return value * fraction;
else
return value;
}
// read characters from stream into buffer
// terminates if length characters have been read, or timeout (see setTimeout)
// returns the number of characters placed in the buffer
// the buffer is NOT null terminated.
//
size_t Stream::readBytes(char *buffer, size_t length)
{
size_t count = 0;
while (count < length) {
int c = timedRead();
if (c < 0) break;
*buffer++ = (char)c;
count++;
}
return count;
}
// as readBytes with terminator character
// terminates if length characters have been read, timeout, or if the terminator character detected
// returns the number of characters placed in the buffer (0 means no valid data found)
size_t Stream::readBytesUntil(char terminator, char *buffer, size_t length)
{
if (length < 1) return 0;
size_t index = 0;
while (index < length) {
int c = timedRead();
if (c < 0 || c == terminator) break;
*buffer++ = (char)c;
index++;
}
return index; // return number of characters, not including null terminator
}
String Stream::readString()
{
String ret;
int c = timedRead();
while (c >= 0)
{
ret += (char)c;
c = timedRead();
}
return ret;
}
String Stream::readStringUntil(char terminator)
{
String ret;
int c = timedRead();
while (c >= 0 && c != terminator)
{
ret += (char)c;
c = timedRead();
}
return ret;
}
int Stream::findMulti( struct Stream::MultiTarget *targets, int tCount) {
// any zero length target string automatically matches and would make
// a mess of the rest of the algorithm.
for (struct MultiTarget *t = targets; t < targets+tCount; ++t) {
if (t->len <= 0)
return t - targets;
}
while (1) {
int c = timedRead();
if (c < 0)
return -1;
for (struct MultiTarget *t = targets; t < targets+tCount; ++t) {
// the simple case is if we match, deal with that first.
if (c == t->str[t->index]) {
if (++t->index == t->len)
return t - targets;
else
continue;
}
// if not we need to walk back and see if we could have matched further
// down the stream (ie '1112' doesn't match the first position in '11112'
// but it will match the second position so we can't just reset the current
// index to 0 when we find a mismatch.
if (t->index == 0)
continue;
int origIndex = t->index;
do {
--t->index;
// first check if current char works against the new current index
if (c != t->str[t->index])
continue;
// if it's the only char then we're good, nothing more to check
if (t->index == 0) {
t->index++;
break;
}
// otherwise we need to check the rest of the found string
int diff = origIndex - t->index;
size_t i;
for (i = 0; i < t->index; ++i) {
if (t->str[i] != t->str[i + diff])
break;
}
// if we successfully got through the previous loop then our current
// index is good.
if (i == t->index) {
t->index++;
break;
}
// otherwise we just try the next index
} while (t->index);
}
}
// unreachable
return -1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment