Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
56 lines (45 sloc) 1.47 KB
/*
*
* Copyright (c) 2012, Remo Giermann <mo@liberejo.de>
*
* Permission to use, copy, modify, and/or distribute this software for any purpose
* with or without fee is hereby granted, provided that the above copyright notice
* and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT,
* OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
#ifndef SHELLY_H
#define SHELLY_H
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define SHELLY_TAPESIZE 1024
#define SHELLY_EOF '$'
#define SHELLY_REAL_EOF 0
#define SHELLY_UNDRFLW 'U'
#define SHELLY_OVERFLW 'O'
#define SHELLY_UNMATCH 'B'
#define SHELLY_TAPELIM 'M'
#define SHELLY_USREXIT 'E'
#define SHELLY_SUCCESS 0
int shelly(const char *ip);
#ifdef __AVR_ARCH__
#undef SHELLY_TAPESIZE
#define SHELLY_TAPESIZE 256
#include <avr/io.h>
#include <avr/pgmspace.h>
#include <util/delay.h>
#include "stdio_wrapper.h"
extern int shelly_avr(const char **ip);
#endif // __AVR_ARCH__
#ifndef strict
extern int shelly_extra(const char **ip);
#endif // !strict
#endif