From cfaac313440d16803468a4943011e0207c531147 Mon Sep 17 00:00:00 2001 From: "Patrick H. E. Foubet" Date: Sat, 10 May 2014 23:55:21 +0200 Subject: [PATCH] version0.47 --- AUTHORS | 18 ++--- ChangeLog | 175 +++++++++++++++++++++++++++++++++++++++++++---- Makefile.am | 4 +- Makefile.in | 4 +- NEWS | 11 +++ README | 20 ++++-- config.h.in | 3 + configure | 32 ++++++--- configure.ac | 3 +- src/Makefile.am | 1 + src/Makefile.in | 5 +- src/conf.h | 4 +- src/debug.c | 2 +- src/debug.h | 2 +- src/dev.c | 2 +- src/dev.h | 2 +- src/err.c | 16 ++++- src/err.h | 2 +- src/foncs.c | 2 +- src/foncs.h | 2 +- src/gplot.c | 2 +- src/gplot.h | 2 +- src/help.c | 2 +- src/help.h | 2 +- src/histo.c | 2 +- src/histo.h | 2 +- src/lib.c | 7 +- src/lib.h | 2 +- src/libmath.c | 2 +- src/libmath.h | 2 +- src/libmathc99.c | 2 +- src/mth.c | 2 +- src/mth.h | 2 +- src/net.c | 2 +- src/net.h | 2 +- src/nife.c | 4 +- src/nife.h | 2 +- src/nife.hlp | 11 +++ src/scs.c | 2 +- src/scs.h | 2 +- src/stackC.c | 2 +- src/stackC.h | 2 +- src/stackF.c | 2 +- src/stackF.h | 2 +- src/stackL.c | 2 +- src/stackL.h | 2 +- src/stackN.c | 2 +- src/stackN.h | 2 +- src/stackV.c | 2 +- src/stackV.h | 2 +- src/tasks.c | 4 +- src/tasks.h | 2 +- 52 files changed, 301 insertions(+), 91 deletions(-) diff --git a/AUTHORS b/AUTHORS index 8115717..a57a6d6 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,22 +1,22 @@ -This file lists people who have made significant contribution in the nife +This file lists people who have made significant contribution in the Nife project. Please see the ChangeLog for specific changes by author. ------------------------------------------------------------------------- -Patrick H. E. Foubet +Patrick H. E. Foubet * Original program author, stable series maintainer. * Cohesion of language supervisor. Multiple platform maintainer. - * Stack to Stack protocol developper, and much more. + * Stack to Stack protocol developer, and much more. -Christophe Ondrejec - * Administrator of the site nife-project.org. +Christophe Ondrejec + * Administrator of the site k-nife.org. * Internationalization support head. * Package tester. -Claude Mauvais - * Mathematical functions supervisor and developper. +Claude Mauvais + * Mathematical functions supervisor and developer. * Package tester. -Bruno Guilbert - * Devices interface tester and developper. +Bruno Guilbert + * Devices interface tester and developer. * Package tester. diff --git a/ChangeLog b/ChangeLog index 9c4c387..0f1dd95 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,19 +1,166 @@ -0.9.27 12 January 2005 +History of Nife releases : - This has been a long time in the making... Release highlights: - o New stdio implementation - o New optimized string functions - o Major improvements to the shared lib loader - o Shared libraries work properly on powerpc - o Debugging works on mips - o New architectures: frv, nios, nios2, bfin - o Linux 2.6.x kernel support - o Lots and lots of bug fixes +2014-05-10 - Nife 0.47 is released. + * Beginning an I2C interface for Linux systems, inspired by the Linux + package i2c-tools. + * The I2C interface has been developped and tested by P. Foubet + with his students of ESIGETEL Villejuif, Elodie Kerfourn and Aymeric + Diankouika Ntinou. They connected a Raspberry Pi with an Arduino + board through the I2C bus and wrote a Nife program to highlight the + data exchange between the two elements. + * The Nife official site is now : http://www.k-nife.org. + * The installation has been tested by Bernard Bonno on a Raspberry Pi + board Model A with Porteus ARM (based on a Slackware ARM 14.0). - This release is NOT binary compatible with uClibc 0.9.26 or any earlier - release, so be prepared to recompile your software if you are still using - an old version of uClibc. +2013-09-25 - Nife 0.44 is released. + * Fixed a bug causing a "segmentation violation" during compilation + of the Nife code on some systems as Raspberry Pi A and B and others. + This bug was reported by Bernard Bonno during tests on a Raspberry Pi + Model A with 256 Mo of memory. + * The installation has been tested by Bernard Bonno on a PC i484 + with a Linux Porteus 2.0. + All information about Porteus at http://www.porteus.org/. - -Erik +2013-09-09 - Nife 0.43 is released. + * Establishment of a sub-directory .nife to facilitate debugging and + store temporary files. + * Update some functions dependant on working directory. + * Fixed some bugs in the gplot tools due to new versions of gnuplot. + * The installation has been tested by Patrick Foubet on a Raspberry Pi + board Model B with standard Raspbian (Squeeze). + All information about the board at http://www.raspberrypi.org/faqs. +2012-10-23 - Nife 0.405 is released. + * Fixed a bug in the data transfer protocol STSP. + * Adding Dt indicators in the list giving by ?n function. + * Fixed a bug in the netDt> function. + * The installation has been tested by Patrick Foubet on a Beaglebone + board (Linux beaglebone 3.2.5+ #1 ... armv7l GNU/Linux) lended by the + school ESME Sudria for preparing a course on Linux drivers. + All information about the board at http://beagleboard.org/bone. + +2012-09-01 - Nife 0.401 is released. + * Beginning the multi-threading mechanisms based on POSIX thread. + * Adding programmation tools end: and goto_end. + * Increasing error tracking : + - giving the file name and the line number, + - stopping compilation at first error, + - allowing load in load. + - adding functions ?err, noerr, messerr, ?lasterr and onerr: label. + * Dynamic code tools : + - "load to load a file in a user function, + - "exec to compile some code in a user function, + - functions ' and ` to specify names to be executed latter. + * Limit for all names at 24 characters. + * Modifying install variables functions to work in user functions. + * Adding the free-context loop with do mechanisms : + - do_next to bypass a loop in free-context, + - do_leave and *do_leave to leave one or many loops in free-context, + * Updating the sh command to use the SHELL environment variable. + +2012-07-05 - Nife 0.341 is released. + * Adding more fonctions to deal with devices with Comedilib : + - write fonction available, + - define a default set of parameters to simplify programs. + * Update documentation for theses new commands. + +2012-06-10 - Nife 0.323 is released. + * Continuing distributed systems tools elaborated with Thomas Pabst : + - Adding netCompile to load a Nife file on a remote Nife using NetKey. + If this file contains a call of one or more functions, they will be + executed, and the result will be send on the Net using NetKey. + - Adding NetErr to get the Net Error value. + * Adding the ex directory in src with some program examples : + - gp.nif, an example for gplot functions, + - rpc.nif and rpc2.nif for Nife RPC example. + +2012-06-06 - Nife 0.320 is released. + * Beginning of the gplot module for use of gnuplot (www.gnuplot.info). + * adding theses functions : + - gplot and gplotM (multiple) to create gplots, + - gplotCmd to append text to the plot command, + - ?gp to list the gplots, + - del_gplot to delete a gplot, + - gplotAdd and gplotRepl (with replacement) to add values to plots, + - gplotClear to clear a display panel. + * The installation has been tested by Bruno Guilbert on a Fox board G20 + (Debian debarm 2.6.38 with CPU Atmel AT91SAM9G20 based on ARM926EJ-S) + with the students TRSE2 of Ingesup-Paris : + All information about the board at www.acmesystems.it. + +2012-05-22 - Nife 0.317 is released. + * Adding ndepth giving network stack depth using NetKey, + * Definition of principles for Nife RPC (remote procedure call). + * Adding netExec to execute a function on a remote Nife using NetKey. + * The installation has been tested by Dr Alain Empain (ulg.ac.be) on + Ubuntu Lucid 10.O4 (Linux 2.6.38-15 - x86_64) + * The installation has been tested by Paul Bartoldi (unige.ch) on + Ubuntu 12.O4 LTS (Linux 3.0.0-12 - x86_32) + +2012-05-11 - Nife 0.315 is released. + * Beginning of distributed systems tools elaborated with Thomas Pabst : + - automatic evaluation of the dt values at network connection, + - adding netDt> to get the clock difference value beetween "network" + and Nife system. + * The installation has been tested on + Debian Wheezy Testing (Linux 3.2.0-2 - x86_32) + +2012-05-04 - Nife 0.311 is released. + * Modifying errors traps to get a better bug resolution. + * The installation has been tested by Bernard Perrin (csem.ch) on + MacOS X Snow Leopard 10.6.8 (Darwin Kernel Vers 10.8.0 - x86_32) + +2012-03-16 - Nife 0.307 is released. + * Adding auto-convergent loop : do ... loop + * Adding standards loop : do ... +loop + * Possibility to test the loop level and use indexes I, J and K. + * Adding del_ofunc to delete, by name, the oldest function, + * Adding del_afunc to delete all functions beginning by a prefix, + * Adding "exec to execute a user function giving her name on the + character stack. + * Adding "Var to create a variable giving her name on the character + stack. + * Rename functions sub[] in []-sub and *sub[] in *[]-sub to adopt a + more logical notation. + +2012-03-08 - Nife 0.303 is released. + * This release is specially dedicated to my wife Christine. + * Now you can use nife with redirection or pîpe : + nife < fic.nif or cat fic.nif | nife + Thank you to Denis Bodor for the idea ! + +2012-02-22 - Nife 0.302 is released. + * Christophe Ondrejec has validate the site nife-project.org + * Updating README, NEWS and all informations files. + * The installation has been tested on : + - Debian Lenny (Linux 2.6.26-2 - x86_32) + - Debian Squeeze (Linux 2.6.32-5 - x86_64) + - Mac OS X (Darwin Kernel Version 8.11.1 - x86_32) + - Open BSD (Version 5.0 GENERIC#43 - x86_32) + - Solaris 11 (SunOS v 5.11 - x86_32) + - Fedora Core 15 (Linux 2.6.38-6 - x86_32) + - Open Suze 12.1 (Linux 3.1.0-1 - x86_64) + * Adding a benchmark test. + +2012-02-13 - Nife 0.300 is released (internal). + * Upgrading for working on both 32 or 64 bits. + * Upgrading SCS (Sister Chip Signature) to accept data from machine + differents on code or addresses but using compatible datas. + * Integration of the GNU Autotools to generate the packages. + +2011-11-13 - Nife 0.212 is released. + * Network tools with STSP (stack to stack protocol) v0.5 : + ie WITH ScS (Sister chip signature) v 1. + * correction of function []trot. + * new function []transp to transpose matrix. + +2011-11-09 - Nife 0.209 is released. + * Network tools with STSP (stack to stack protocol) v.0 : + ie without ScS (Sister chip signature). + +2011-10-31 - Nife 0.204 is released. + +2011-10-26 - Nife 0.200 is released. + +2011-09-18 - Nife 0.113 the first public release on Sourceforge.net. diff --git a/Makefile.am b/Makefile.am index 3703e86..b2f8676 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,8 +1,8 @@ ################################################## -# Makefile.am for nife project : upper derectory # +# Makefile.am for nife project : upper directory # ################################################## -EXTRA_DIST = src/nife.hlp src/test.sh src/benchm.nif src/ex +EXTRA_DIST = src/nife.hlp src/test.sh src/benchm.nif src/ex src/i2cbusses.c src/i2cbusses.h SUBDIRS=src diff --git a/Makefile.in b/Makefile.in index 9c6affc..f2e613a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -15,7 +15,7 @@ @SET_MAKE@ ################################################## -# Makefile.am for nife project : upper derectory # +# Makefile.am for nife project : upper directory # ################################################## srcdir = @srcdir@ top_srcdir = @top_srcdir@ @@ -153,7 +153,7 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ -EXTRA_DIST = src/nife.hlp src/test.sh src/benchm.nif src/ex +EXTRA_DIST = src/nife.hlp src/test.sh src/benchm.nif src/ex src/i2cbusses.c src/i2cbusses.h SUBDIRS = src all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive diff --git a/NEWS b/NEWS index a6506cc..a6d8427 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,16 @@ History of Nife releases : +2014-05-10 - Nife 0.47 is released. + * Beginning an I2C interface for Linux systems, inspired by the Linux + package i2c-tools. + * The I2C interface has been developped and tested by P. Foubet + with his students Elodie Kerfourn and Aymeric Diankouika. They + connected a Raspberry Pi with an Arduino board through the I2C bus + and wrote a Nife program to highlight the data exchange between the + two elements. + * The installation has been tested by Bernard Bonno on a Raspberry Pi + board Model A with Porteus ARM (based on a Slackware ARM 14.0). + 2013-09-25 - Nife 0.44 is released. * Fixed a bug causing a "segmentation violation" during compilation of the Nife code on some systems as Raspberry Pi A and B and others. diff --git a/README b/README index 5403ad7..fcc7c87 100644 --- a/README +++ b/README @@ -79,28 +79,34 @@ How to compile and install nife Web Page - http://www.nife-project.org + http://www.k-nife.org + Mailing List and Bug Reports - nife-project.org hosts all the nife-related mailing-lists. - + help-nife@nife-project.org is for those seeking to get help without - wanting to hear about the technical details of its development. + k-nife.org hosts all the nife-related mailing-lists. - + nife-devel@nife-project.org is the list used by the people + + nife-mailing-list@googlegroups.com is the list used by the people that make Nife and a general development discussion list, with moderate traffic. To subscribe, go directely to : - http://nife-project.org/general/newsletter/subone/view-subscribe + http://k-nife.org/mailing_list.html + + + nife-project@mailman.k-nife.org is the list reserved for people + who want to discuss Nife in French, with also a moderate traffic. + + To subscribe, go directely to : + http://mailman.k-nife.org/mailman/listinfo/nife-project For general bug reports, send a description of the problem to nife@seriane.fr or directly to the development list. + Current Status nife is still in beta version. - Patrick Foubet (patrick.foubet@nife-project.org) + Patrick Foubet (nife@seriane.fr) diff --git a/config.h.in b/config.h.in index 90045e3..aa5ad16 100644 --- a/config.h.in +++ b/config.h.in @@ -33,6 +33,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_I2C_DEV_H + /* Define to 1 if your system has a GNU libc compatible `malloc' function, and to 0 otherwise. */ #undef HAVE_MALLOC diff --git a/configure b/configure index c8db414..ef1420d 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67 for nife 0.44. +# Generated by GNU Autoconf 2.67 for nife 0.47. # # Report bugs to . # @@ -552,8 +552,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='nife' PACKAGE_TARNAME='nife' -PACKAGE_VERSION='0.44' -PACKAGE_STRING='nife 0.44' +PACKAGE_VERSION='0.47' +PACKAGE_STRING='nife 0.47' PACKAGE_BUGREPORT='nife@seriane.fr' PACKAGE_URL='' @@ -1231,7 +1231,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures nife 0.44 to adapt to many kinds of systems. +\`configure' configures nife 0.47 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1297,7 +1297,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of nife 0.44:";; + short | recursive ) echo "Configuration of nife 0.47:";; esac cat <<\_ACEOF @@ -1384,7 +1384,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -nife configure 0.44 +nife configure 0.47 generated by GNU Autoconf 2.67 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1807,7 +1807,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by nife $as_me 0.44, which was +It was created by nife $as_me 0.47, which was generated by GNU Autoconf 2.67. Invocation command line was $ $0 $@ @@ -2473,7 +2473,7 @@ fi # Define the identity of the package. PACKAGE='nife' - VERSION='0.44' + VERSION='0.47' cat >>confdefs.h <<_ACEOF @@ -4055,6 +4055,18 @@ fi done +for ac_header in linux/i2c-dev.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "linux/i2c-dev.h" "ac_cv_header_linux_i2c_dev_h" "$ac_includes_default" +if test "x$ac_cv_header_linux_i2c_dev_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LINUX_I2C_DEV_H 1 +_ACEOF + +fi + +done + # Checks for typedefs, structures, and compiler characteristics. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 @@ -5383,7 +5395,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by nife $as_me 0.44, which was +This file was extended by nife $as_me 0.47, which was generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -5449,7 +5461,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -nife config.status 0.44 +nife config.status 0.47 configured by $0, generated by GNU Autoconf 2.67, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 8ee165b..4d2f3ed 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.67]) -AC_INIT([nife], [0.44], [nife@seriane.fr]) +AC_INIT([nife], [0.47], [nife@seriane.fr]) AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR([src/tasks.c]) @@ -18,6 +18,7 @@ AC_PROG_MAKE_SET AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h netdb.h stdlib.h string.h strings.h sys/socket.h sys/time.h termios.h unistd.h]) AC_CHECK_HEADERS([pthread.h]) AC_CHECK_HEADERS([comedilib.h]) +AC_CHECK_HEADERS([linux/i2c-dev.h]) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL diff --git a/src/Makefile.am b/src/Makefile.am index 7f4ffcc..bf35c5c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -19,6 +19,7 @@ nife_SOURCES = nife.c nife.h conf.h \ libmathc99.c \ help.c help.h \ dev.c dev.h \ + i2c.c i2c.h \ net.c net.h \ gplot.c gplot.h \ scs.c scs.h \ diff --git a/src/Makefile.in b/src/Makefile.in index 6d742f8..25f0462 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -56,7 +56,8 @@ am_nife_OBJECTS = nife.$(OBJEXT) mth.$(OBJEXT) err.$(OBJEXT) \ stackL.$(OBJEXT) stackC.$(OBJEXT) stackF.$(OBJEXT) \ stackV.$(OBJEXT) tasks.$(OBJEXT) libmath.$(OBJEXT) \ libmathc99.$(OBJEXT) help.$(OBJEXT) dev.$(OBJEXT) \ - net.$(OBJEXT) gplot.$(OBJEXT) scs.$(OBJEXT) debug.$(OBJEXT) + i2c.$(OBJEXT) net.$(OBJEXT) gplot.$(OBJEXT) scs.$(OBJEXT) \ + debug.$(OBJEXT) nife_OBJECTS = $(am_nife_OBJECTS) nife_LDADD = $(LDADD) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) @@ -167,6 +168,7 @@ nife_SOURCES = nife.c nife.h conf.h \ libmathc99.c \ help.c help.h \ dev.c dev.h \ + i2c.c i2c.h \ net.c net.h \ gplot.c gplot.h \ scs.c scs.h \ @@ -245,6 +247,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gplot.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/help.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/histo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i2c.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmath.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmathc99.Po@am__quote@ diff --git a/src/conf.h b/src/conf.h index 8060d02..231f480 100644 --- a/src/conf.h +++ b/src/conf.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,7 +20,7 @@ along with this program. If not, see #ifdef HAVE_CONFIG_H #include "../config.h" #else -#define VERSION "0.44" +#define VERSION "0.47" #endif #ifdef HAVE_COMEDILIB_H diff --git a/src/debug.c b/src/debug.c index 64e4f4c..7f41cf1 100644 --- a/src/debug.c +++ b/src/debug.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/debug.h b/src/debug.h index a9177fb..c39d367 100644 --- a/src/debug.h +++ b/src/debug.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/dev.c b/src/dev.c index 0766e32..72923d8 100644 --- a/src/dev.c +++ b/src/dev.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/dev.h b/src/dev.h index a59b0a8..1689338 100644 --- a/src/dev.h +++ b/src/dev.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/err.c b/src/err.c index 0bd580c..32985bf 100644 --- a/src/err.c +++ b/src/err.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -106,9 +106,19 @@ static char *TabErr[] = { "too many loads", "label onerr: already found", "label end: already found", - "inside compilation aborted" + "inside compilation aborted", + "I2C is not available", + "invalid I2C bus", /* 50 */ + "error open I2C device", + "could not get I2C adapter functionality matrix", + "bad I2C address", + "bad I2C offset", + "value out of range", + "I2C write failed", + "I2C read failed", + "-" }; -#define ERR_MAX 48 +#define ERR_MAX 57 void stopErr(char *M, char *F) { diff --git a/src/err.h b/src/err.h index 91f6dba..7fe67af 100644 --- a/src/err.h +++ b/src/err.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/foncs.c b/src/foncs.c index 8268a90..585a3f5 100644 --- a/src/foncs.c +++ b/src/foncs.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/foncs.h b/src/foncs.h index d7830db..ac47186 100644 --- a/src/foncs.h +++ b/src/foncs.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/gplot.c b/src/gplot.c index b77a188..d02eaa4 100644 --- a/src/gplot.c +++ b/src/gplot.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/gplot.h b/src/gplot.h index 3025421..9d0d5d8 100644 --- a/src/gplot.h +++ b/src/gplot.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/help.c b/src/help.c index c51a2d3..d81f6dc 100644 --- a/src/help.c +++ b/src/help.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/help.h b/src/help.h index bcaa2c0..5b738ff 100644 --- a/src/help.h +++ b/src/help.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/histo.c b/src/histo.c index dec002c..5f6bf9f 100644 --- a/src/histo.c +++ b/src/histo.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/histo.h b/src/histo.h index 4dd3c1d..f66be51 100644 --- a/src/histo.h +++ b/src/histo.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/lib.c b/src/lib.c index 510c1f5..b0fcee9 100644 --- a/src/lib.c +++ b/src/lib.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -33,6 +33,7 @@ along with this program. If not, see #include "libmath.h" #include "help.h" #include "dev.h" +#include "i2c.h" #include "net.h" #include "gplot.h" #include "debug.h" @@ -487,6 +488,10 @@ void initLib(void) addFonD("?dev_dflt",IF_devShowDflt); addFonD("dev_dflW",IF_devDflW); addFonD("dev_dflR",IF_devDflR); + addFonD("?i2c",IF_listI2C); + addFonD("i2c_info",IF_showI2C); + addFonD("i2c_read",IF_I2CRead); + addFonD("i2c_write",IF_I2CWrite); addFonN("?n",IF_netList); addFonN("netOn",IF_netOn); addFonN("netOff",IF_netOff); diff --git a/src/lib.h b/src/lib.h index 68c6dfd..6cf10e8 100644 --- a/src/lib.h +++ b/src/lib.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/libmath.c b/src/libmath.c index 8e0f383..bf3f6cd 100644 --- a/src/libmath.c +++ b/src/libmath.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/libmath.h b/src/libmath.h index f5baa1d..56dd0ce 100644 --- a/src/libmath.h +++ b/src/libmath.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/libmathc99.c b/src/libmathc99.c index d8a2dd3..e0b5bea 100644 --- a/src/libmathc99.c +++ b/src/libmathc99.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/mth.c b/src/mth.c index 77ff319..958c300 100644 --- a/src/mth.c +++ b/src/mth.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/mth.h b/src/mth.h index 39d110d..8230893 100644 --- a/src/mth.h +++ b/src/mth.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/net.c b/src/net.c index 96ea245..21b689a 100644 --- a/src/net.c +++ b/src/net.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/net.h b/src/net.h index 29985ea..4798e5d 100644 --- a/src/net.h +++ b/src/net.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/nife.c b/src/nife.c index 31ef3bc..e1ba5cd 100644 --- a/src/nife.c +++ b/src/nife.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -106,7 +106,7 @@ char Lib[8]; #ifdef _MULTI_THREADING_ strcpy(Lib,"mt-"); #endif - printf("nife (Networking Industrial Forth-like Environment) - version %s%s-%ld/%ld\n\t (c) S.E.R.I.A.N.E. 2009-13\n",Lib,VERSION,sizeof(long)*8,sizeof(double)*8); + printf("nife (Networking Industrial Forth-like Environment) - version %s%s-%ld/%ld\n\t (c) S.E.R.I.A.N.E. 2009-2014\n",Lib,VERSION,sizeof(long)*8,sizeof(double)*8); } int isSepa(char c, int m) diff --git a/src/nife.h b/src/nife.h index 8e4dddf..fbb0e4e 100644 --- a/src/nife.h +++ b/src/nife.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/nife.hlp b/src/nife.hlp index 711bbba..18e69aa 100644 --- a/src/nife.hlp +++ b/src/nife.hlp @@ -639,4 +639,15 @@ messerr : [ n -- ] { -- "error message" } puts on the character stack the error message number n. noerr : [ -- n ] gives the number of last error. +?i2c : + lists all the I2C buses available. The I2C-ID is at the beginning of the lines. +i2c_info : [ I2C-ID -- ] + shows informations (matrix) about the I2C-ID interface. +i2c_write : [ Value Offset Address I2C-ID -- ] + write Value at data-address Offset for chip-address Address of I2C interface + I2C-ID. +i2c_read : [ Offset Address I2C-ID -- Value ] + read at data-address Offset for chip-address Address of I2C interface I2C-ID. + If Offset equal -1, the read is done directly at Address. + diff --git a/src/scs.c b/src/scs.c index 763aad8..0dc04b2 100644 --- a/src/scs.c +++ b/src/scs.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/scs.h b/src/scs.h index 5058dff..03dc698 100644 --- a/src/scs.h +++ b/src/scs.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/stackC.c b/src/stackC.c index 95361e4..a085ab3 100644 --- a/src/stackC.c +++ b/src/stackC.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/stackC.h b/src/stackC.h index b77a45a..cf739b8 100644 --- a/src/stackC.h +++ b/src/stackC.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/stackF.c b/src/stackF.c index 271b113..d815541 100644 --- a/src/stackF.c +++ b/src/stackF.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/stackF.h b/src/stackF.h index 4f30691..320547e 100644 --- a/src/stackF.h +++ b/src/stackF.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/stackL.c b/src/stackL.c index 883ae59..777c812 100644 --- a/src/stackL.c +++ b/src/stackL.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/stackL.h b/src/stackL.h index 56cb1bc..8540e62 100644 --- a/src/stackL.h +++ b/src/stackL.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/stackN.c b/src/stackN.c index ffffb16..bcb7db1 100644 --- a/src/stackN.c +++ b/src/stackN.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/stackN.h b/src/stackN.h index d33e675..d9f2fd4 100644 --- a/src/stackN.h +++ b/src/stackN.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/stackV.c b/src/stackV.c index 7a2fd2f..69d1eb0 100644 --- a/src/stackV.c +++ b/src/stackV.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/stackV.h b/src/stackV.h index 2d42065..965ea1a 100644 --- a/src/stackV.h +++ b/src/stackV.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/tasks.c b/src/tasks.c index 1c8e3fa..7ae0095 100644 --- a/src/tasks.c +++ b/src/tasks.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -144,8 +144,8 @@ int i; return; } } + TASKp[i] = 0; } - TASKp[i] = 0; } void IF_showCons( void) diff --git a/src/tasks.h b/src/tasks.h index 29a9513..7f3e251 100644 --- a/src/tasks.h +++ b/src/tasks.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2013 Patrick H. E. Foubet - S.E.R.I.A.N.E. +/* Copyright (C) 2011-2014 Patrick H. E. Foubet - S.E.R.I.A.N.E. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by