[Xenomai-git] Alexis Berlemont : analogy: add wf_generate tool

2011-09-04 Thread GIT version control
Module: xenomai-abe
Branch: analogy
Commit: 22c200d62e97670c6940ba337c66e6f1f5758882
URL:
http://git.xenomai.org/?p=xenomai-abe.git;a=commit;h=22c200d62e97670c6940ba337c66e6f1f5758882

Author: Alexis Berlemont alexis.berlem...@gmail.com
Date:   Sun Oct 31 16:01:24 2010 +0100

analogy: add wf_generate tool

---

 src/utils/analogy/Makefile.am |   18 +++-
 src/utils/analogy/wf_facilities.c |   24 ++--
 src/utils/analogy/wf_facilities.h |   16 ++--
 src/utils/analogy/wf_generate.c   |  232 +
 4 files changed, 266 insertions(+), 24 deletions(-)

diff --git a/src/utils/analogy/Makefile.am b/src/utils/analogy/Makefile.am
index 3d8cb5e..8e7734f 100644
--- a/src/utils/analogy/Makefile.am
+++ b/src/utils/analogy/Makefile.am
@@ -1,6 +1,13 @@
 sbin_PROGRAMS = analogy_config
 
-bin_PROGRAMS = cmd_read cmd_write cmd_bits insn_read insn_write insn_bits
+bin_PROGRAMS = \
+   cmd_read \
+   cmd_write \
+   cmd_bits \
+   insn_read \
+   insn_write \
+   insn_bits \
+   wf_generate
 
 CPPFLAGS = \
@XENO_USER_CFLAGS@ \
@@ -9,11 +16,11 @@ CPPFLAGS = \
 LDFLAGS = \
@XENO_USER_LDFLAGS@
 
-lib_LIBRARIES = libwaveform.a
+noinst_HEADERS = wf_facilities.h
 
-libwaveform_a_SOURCES = signal_generation.c
+lib_LIBRARIES = libwaveform.a
 
-noinst_HEADERS = signal_generation.h
+libwaveform_a_SOURCES = wf_facilities.c
 
 analogy_config_SOURCES = analogy_config.c
 analogy_config_LDADD = \
@@ -58,3 +65,6 @@ insn_bits_LDADD = \
../../drvlib/analogy/libanalogy.la \
../../skins/rtdm/librtdm.la \
../../skins/common/libxenomai.la
+
+wf_generate_SOURCES = wf_generate.c
+wf_generate_LDADD = ./libwaveform.a -lm
diff --git a/src/utils/analogy/wf_facilities.c 
b/src/utils/analogy/wf_facilities.c
index ce250e7..08d105e 100644
--- a/src/utils/analogy/wf_facilities.c
+++ b/src/utils/analogy/wf_facilities.c
@@ -10,7 +10,7 @@
 #define PI 3.14159265358979323846
 #endif
 
-void a4l_sg_init_sine(struct waveform_config *config, double *values)
+void a4l_wf_init_sine(struct waveform_config *config, double *values)
 {
int i;
 
@@ -24,7 +24,7 @@ void a4l_sg_init_sine(struct waveform_config *config, double 
*values)
}
 }
 
-void a4l_sg_init_sawtooth(struct waveform_config *config, double *values)
+void a4l_wf_init_sawtooth(struct waveform_config *config, double *values)
 {
int i;
 
@@ -41,7 +41,7 @@ void a4l_sg_init_sawtooth(struct waveform_config *config, 
double *values)
}
 }
 
-void a4l_sg_init_triangular(struct waveform_config *config, double *values)
+void a4l_wf_init_triangular(struct waveform_config *config, double *values)
 {
int i;
 
@@ -67,7 +67,7 @@ void a4l_sg_init_triangular(struct waveform_config *config, 
double *values)
}
 }
 
-void a4l_sg_init_steps(struct waveform_config *config, double *values)
+void a4l_wf_init_steps(struct waveform_config *config, double *values)
 {
int i;

@@ -82,7 +82,7 @@ void a4l_sg_init_steps(struct waveform_config *config, double 
*values)
}
 }
 
-void a4l_sg_set_sample_count(struct waveform_config *config)
+void a4l_wf_set_sample_count(struct waveform_config *config)
 {
int sample_count = MIN_SAMPLE_COUNT;
int best_count = MIN_SAMPLE_COUNT;
@@ -116,7 +116,7 @@ void a4l_sg_set_sample_count(struct waveform_config *config)
config-spl_count = best_count;
 }
 
-int a4l_sg_check_config(struct waveform_config *config)
+int a4l_wf_check_config(struct waveform_config *config)
 {
 
if (config-wf_amplitude == 0)
@@ -134,18 +134,18 @@ int a4l_sg_check_config(struct waveform_config *config)
 }
 
 static void (* init_values[])(struct waveform_config *, double *) = {
-   a4l_sg_init_sine,
-   a4l_sg_init_sawtooth,
-   a4l_sg_init_triangular,
-   a4l_sg_init_steps,
+   a4l_wf_init_sine,
+   a4l_wf_init_sawtooth,
+   a4l_wf_init_triangular,
+   a4l_wf_init_steps,
 };
 
-void a4l_sg_init_values(struct waveform_config *config, double *values)
+void a4l_wf_init_values(struct waveform_config *config, double *values)
 {
init_values[config-wf_kind](config, values);
 }
 
-void a4l_sg_dump_values(struct waveform_config *config, double *values)
+void a4l_wf_dump_values(struct waveform_config *config, double *values)
 {
int i;

diff --git a/src/utils/analogy/wf_facilities.h 
b/src/utils/analogy/wf_facilities.h
index 6c99d51..7c9c705 100644
--- a/src/utils/analogy/wf_facilities.h
+++ b/src/utils/analogy/wf_facilities.h
@@ -24,13 +24,13 @@ struct waveform_config {
int spl_count;
 };
 
-void a4l_sg_init_sine(struct waveform_config *config, double *values);
-void a4l_sg_init_sawtooth(struct waveform_config *config, double *values);
-void a4l_sg_init_triangular(struct waveform_config *config, double *values);
-void a4l_sg_init_steps(struct waveform_config *config, double *values);
-void a4l_sg_set_sample_count(struct waveform_config *config);
-int a4l_sg_check_config(struct 

[Xenomai-git] Alexis Berlemont : analogy: add wf_generate tool

2011-08-23 Thread GIT version control
Module: xenomai-abe
Branch: experimental
Commit: fcb2d95a9cadf288eb1e967cab4e72b4389afc7c
URL:
http://git.xenomai.org/?p=xenomai-abe.git;a=commit;h=fcb2d95a9cadf288eb1e967cab4e72b4389afc7c

Author: Alexis Berlemont alexis.berlem...@gmail.com
Date:   Sun Oct 31 16:01:24 2010 +0100

analogy: add wf_generate tool

---

 src/utils/analogy/Makefile.am |   18 +++-
 src/utils/analogy/wf_facilities.c |   24 ++--
 src/utils/analogy/wf_facilities.h |   16 ++--
 src/utils/analogy/wf_generate.c   |  232 +
 4 files changed, 266 insertions(+), 24 deletions(-)

diff --git a/src/utils/analogy/Makefile.am b/src/utils/analogy/Makefile.am
index 3d8cb5e..8e7734f 100644
--- a/src/utils/analogy/Makefile.am
+++ b/src/utils/analogy/Makefile.am
@@ -1,6 +1,13 @@
 sbin_PROGRAMS = analogy_config
 
-bin_PROGRAMS = cmd_read cmd_write cmd_bits insn_read insn_write insn_bits
+bin_PROGRAMS = \
+   cmd_read \
+   cmd_write \
+   cmd_bits \
+   insn_read \
+   insn_write \
+   insn_bits \
+   wf_generate
 
 CPPFLAGS = \
@XENO_USER_CFLAGS@ \
@@ -9,11 +16,11 @@ CPPFLAGS = \
 LDFLAGS = \
@XENO_USER_LDFLAGS@
 
-lib_LIBRARIES = libwaveform.a
+noinst_HEADERS = wf_facilities.h
 
-libwaveform_a_SOURCES = signal_generation.c
+lib_LIBRARIES = libwaveform.a
 
-noinst_HEADERS = signal_generation.h
+libwaveform_a_SOURCES = wf_facilities.c
 
 analogy_config_SOURCES = analogy_config.c
 analogy_config_LDADD = \
@@ -58,3 +65,6 @@ insn_bits_LDADD = \
../../drvlib/analogy/libanalogy.la \
../../skins/rtdm/librtdm.la \
../../skins/common/libxenomai.la
+
+wf_generate_SOURCES = wf_generate.c
+wf_generate_LDADD = ./libwaveform.a -lm
diff --git a/src/utils/analogy/wf_facilities.c 
b/src/utils/analogy/wf_facilities.c
index ce250e7..08d105e 100644
--- a/src/utils/analogy/wf_facilities.c
+++ b/src/utils/analogy/wf_facilities.c
@@ -10,7 +10,7 @@
 #define PI 3.14159265358979323846
 #endif
 
-void a4l_sg_init_sine(struct waveform_config *config, double *values)
+void a4l_wf_init_sine(struct waveform_config *config, double *values)
 {
int i;
 
@@ -24,7 +24,7 @@ void a4l_sg_init_sine(struct waveform_config *config, double 
*values)
}
 }
 
-void a4l_sg_init_sawtooth(struct waveform_config *config, double *values)
+void a4l_wf_init_sawtooth(struct waveform_config *config, double *values)
 {
int i;
 
@@ -41,7 +41,7 @@ void a4l_sg_init_sawtooth(struct waveform_config *config, 
double *values)
}
 }
 
-void a4l_sg_init_triangular(struct waveform_config *config, double *values)
+void a4l_wf_init_triangular(struct waveform_config *config, double *values)
 {
int i;
 
@@ -67,7 +67,7 @@ void a4l_sg_init_triangular(struct waveform_config *config, 
double *values)
}
 }
 
-void a4l_sg_init_steps(struct waveform_config *config, double *values)
+void a4l_wf_init_steps(struct waveform_config *config, double *values)
 {
int i;

@@ -82,7 +82,7 @@ void a4l_sg_init_steps(struct waveform_config *config, double 
*values)
}
 }
 
-void a4l_sg_set_sample_count(struct waveform_config *config)
+void a4l_wf_set_sample_count(struct waveform_config *config)
 {
int sample_count = MIN_SAMPLE_COUNT;
int best_count = MIN_SAMPLE_COUNT;
@@ -116,7 +116,7 @@ void a4l_sg_set_sample_count(struct waveform_config *config)
config-spl_count = best_count;
 }
 
-int a4l_sg_check_config(struct waveform_config *config)
+int a4l_wf_check_config(struct waveform_config *config)
 {
 
if (config-wf_amplitude == 0)
@@ -134,18 +134,18 @@ int a4l_sg_check_config(struct waveform_config *config)
 }
 
 static void (* init_values[])(struct waveform_config *, double *) = {
-   a4l_sg_init_sine,
-   a4l_sg_init_sawtooth,
-   a4l_sg_init_triangular,
-   a4l_sg_init_steps,
+   a4l_wf_init_sine,
+   a4l_wf_init_sawtooth,
+   a4l_wf_init_triangular,
+   a4l_wf_init_steps,
 };
 
-void a4l_sg_init_values(struct waveform_config *config, double *values)
+void a4l_wf_init_values(struct waveform_config *config, double *values)
 {
init_values[config-wf_kind](config, values);
 }
 
-void a4l_sg_dump_values(struct waveform_config *config, double *values)
+void a4l_wf_dump_values(struct waveform_config *config, double *values)
 {
int i;

diff --git a/src/utils/analogy/wf_facilities.h 
b/src/utils/analogy/wf_facilities.h
index 6c99d51..7c9c705 100644
--- a/src/utils/analogy/wf_facilities.h
+++ b/src/utils/analogy/wf_facilities.h
@@ -24,13 +24,13 @@ struct waveform_config {
int spl_count;
 };
 
-void a4l_sg_init_sine(struct waveform_config *config, double *values);
-void a4l_sg_init_sawtooth(struct waveform_config *config, double *values);
-void a4l_sg_init_triangular(struct waveform_config *config, double *values);
-void a4l_sg_init_steps(struct waveform_config *config, double *values);
-void a4l_sg_set_sample_count(struct waveform_config *config);
-int 

[Xenomai-git] Alexis Berlemont : analogy: add wf_generate tool

2011-05-12 Thread GIT version control
Module: xenomai-abe
Branch: experimental
Commit: 7c0bacfc88ff8884f2c1664c1543101f2203705d
URL:
http://git.xenomai.org/?p=xenomai-abe.git;a=commit;h=7c0bacfc88ff8884f2c1664c1543101f2203705d

Author: Alexis Berlemont alexis.berlem...@gmail.com
Date:   Sun Oct 31 16:01:24 2010 +0100

analogy: add wf_generate tool

---

 src/utils/analogy/Makefile.am |   18 +++-
 src/utils/analogy/wf_facilities.c |   24 ++--
 src/utils/analogy/wf_facilities.h |   16 ++--
 src/utils/analogy/wf_generate.c   |  232 +
 4 files changed, 266 insertions(+), 24 deletions(-)

diff --git a/src/utils/analogy/Makefile.am b/src/utils/analogy/Makefile.am
index 3d8cb5e..8e7734f 100644
--- a/src/utils/analogy/Makefile.am
+++ b/src/utils/analogy/Makefile.am
@@ -1,6 +1,13 @@
 sbin_PROGRAMS = analogy_config
 
-bin_PROGRAMS = cmd_read cmd_write cmd_bits insn_read insn_write insn_bits
+bin_PROGRAMS = \
+   cmd_read \
+   cmd_write \
+   cmd_bits \
+   insn_read \
+   insn_write \
+   insn_bits \
+   wf_generate
 
 CPPFLAGS = \
@XENO_USER_CFLAGS@ \
@@ -9,11 +16,11 @@ CPPFLAGS = \
 LDFLAGS = \
@XENO_USER_LDFLAGS@
 
-lib_LIBRARIES = libwaveform.a
+noinst_HEADERS = wf_facilities.h
 
-libwaveform_a_SOURCES = signal_generation.c
+lib_LIBRARIES = libwaveform.a
 
-noinst_HEADERS = signal_generation.h
+libwaveform_a_SOURCES = wf_facilities.c
 
 analogy_config_SOURCES = analogy_config.c
 analogy_config_LDADD = \
@@ -58,3 +65,6 @@ insn_bits_LDADD = \
../../drvlib/analogy/libanalogy.la \
../../skins/rtdm/librtdm.la \
../../skins/common/libxenomai.la
+
+wf_generate_SOURCES = wf_generate.c
+wf_generate_LDADD = ./libwaveform.a -lm
diff --git a/src/utils/analogy/wf_facilities.c 
b/src/utils/analogy/wf_facilities.c
index ce250e7..08d105e 100644
--- a/src/utils/analogy/wf_facilities.c
+++ b/src/utils/analogy/wf_facilities.c
@@ -10,7 +10,7 @@
 #define PI 3.14159265358979323846
 #endif
 
-void a4l_sg_init_sine(struct waveform_config *config, double *values)
+void a4l_wf_init_sine(struct waveform_config *config, double *values)
 {
int i;
 
@@ -24,7 +24,7 @@ void a4l_sg_init_sine(struct waveform_config *config, double 
*values)
}
 }
 
-void a4l_sg_init_sawtooth(struct waveform_config *config, double *values)
+void a4l_wf_init_sawtooth(struct waveform_config *config, double *values)
 {
int i;
 
@@ -41,7 +41,7 @@ void a4l_sg_init_sawtooth(struct waveform_config *config, 
double *values)
}
 }
 
-void a4l_sg_init_triangular(struct waveform_config *config, double *values)
+void a4l_wf_init_triangular(struct waveform_config *config, double *values)
 {
int i;
 
@@ -67,7 +67,7 @@ void a4l_sg_init_triangular(struct waveform_config *config, 
double *values)
}
 }
 
-void a4l_sg_init_steps(struct waveform_config *config, double *values)
+void a4l_wf_init_steps(struct waveform_config *config, double *values)
 {
int i;

@@ -82,7 +82,7 @@ void a4l_sg_init_steps(struct waveform_config *config, double 
*values)
}
 }
 
-void a4l_sg_set_sample_count(struct waveform_config *config)
+void a4l_wf_set_sample_count(struct waveform_config *config)
 {
int sample_count = MIN_SAMPLE_COUNT;
int best_count = MIN_SAMPLE_COUNT;
@@ -116,7 +116,7 @@ void a4l_sg_set_sample_count(struct waveform_config *config)
config-spl_count = best_count;
 }
 
-int a4l_sg_check_config(struct waveform_config *config)
+int a4l_wf_check_config(struct waveform_config *config)
 {
 
if (config-wf_amplitude == 0)
@@ -134,18 +134,18 @@ int a4l_sg_check_config(struct waveform_config *config)
 }
 
 static void (* init_values[])(struct waveform_config *, double *) = {
-   a4l_sg_init_sine,
-   a4l_sg_init_sawtooth,
-   a4l_sg_init_triangular,
-   a4l_sg_init_steps,
+   a4l_wf_init_sine,
+   a4l_wf_init_sawtooth,
+   a4l_wf_init_triangular,
+   a4l_wf_init_steps,
 };
 
-void a4l_sg_init_values(struct waveform_config *config, double *values)
+void a4l_wf_init_values(struct waveform_config *config, double *values)
 {
init_values[config-wf_kind](config, values);
 }
 
-void a4l_sg_dump_values(struct waveform_config *config, double *values)
+void a4l_wf_dump_values(struct waveform_config *config, double *values)
 {
int i;

diff --git a/src/utils/analogy/wf_facilities.h 
b/src/utils/analogy/wf_facilities.h
index 6c99d51..7c9c705 100644
--- a/src/utils/analogy/wf_facilities.h
+++ b/src/utils/analogy/wf_facilities.h
@@ -24,13 +24,13 @@ struct waveform_config {
int spl_count;
 };
 
-void a4l_sg_init_sine(struct waveform_config *config, double *values);
-void a4l_sg_init_sawtooth(struct waveform_config *config, double *values);
-void a4l_sg_init_triangular(struct waveform_config *config, double *values);
-void a4l_sg_init_steps(struct waveform_config *config, double *values);
-void a4l_sg_set_sample_count(struct waveform_config *config);
-int 

[Xenomai-git] Alexis Berlemont : analogy: add wf_generate tool

2011-01-12 Thread GIT version control
Module: xenomai-abe
Branch: experimental
Commit: f6c1ac9b75169af4e1e85a5fc2f8e34888d0f30f
URL:
http://git.xenomai.org/?p=xenomai-abe.git;a=commit;h=f6c1ac9b75169af4e1e85a5fc2f8e34888d0f30f

Author: Alexis Berlemont alexis.berlem...@gmail.com
Date:   Sun Oct 31 16:01:24 2010 +0100

analogy: add wf_generate tool

---

 src/utils/analogy/Makefile.am |   18 +++-
 src/utils/analogy/wf_facilities.c |   24 ++--
 src/utils/analogy/wf_facilities.h |   16 ++--
 src/utils/analogy/wf_generate.c   |  232 +
 4 files changed, 266 insertions(+), 24 deletions(-)

diff --git a/src/utils/analogy/Makefile.am b/src/utils/analogy/Makefile.am
index 3d8cb5e..8e7734f 100644
--- a/src/utils/analogy/Makefile.am
+++ b/src/utils/analogy/Makefile.am
@@ -1,6 +1,13 @@
 sbin_PROGRAMS = analogy_config
 
-bin_PROGRAMS = cmd_read cmd_write cmd_bits insn_read insn_write insn_bits
+bin_PROGRAMS = \
+   cmd_read \
+   cmd_write \
+   cmd_bits \
+   insn_read \
+   insn_write \
+   insn_bits \
+   wf_generate
 
 CPPFLAGS = \
@XENO_USER_CFLAGS@ \
@@ -9,11 +16,11 @@ CPPFLAGS = \
 LDFLAGS = \
@XENO_USER_LDFLAGS@
 
-lib_LIBRARIES = libwaveform.a
+noinst_HEADERS = wf_facilities.h
 
-libwaveform_a_SOURCES = signal_generation.c
+lib_LIBRARIES = libwaveform.a
 
-noinst_HEADERS = signal_generation.h
+libwaveform_a_SOURCES = wf_facilities.c
 
 analogy_config_SOURCES = analogy_config.c
 analogy_config_LDADD = \
@@ -58,3 +65,6 @@ insn_bits_LDADD = \
../../drvlib/analogy/libanalogy.la \
../../skins/rtdm/librtdm.la \
../../skins/common/libxenomai.la
+
+wf_generate_SOURCES = wf_generate.c
+wf_generate_LDADD = ./libwaveform.a -lm
diff --git a/src/utils/analogy/wf_facilities.c 
b/src/utils/analogy/wf_facilities.c
index ce250e7..08d105e 100644
--- a/src/utils/analogy/wf_facilities.c
+++ b/src/utils/analogy/wf_facilities.c
@@ -10,7 +10,7 @@
 #define PI 3.14159265358979323846
 #endif
 
-void a4l_sg_init_sine(struct waveform_config *config, double *values)
+void a4l_wf_init_sine(struct waveform_config *config, double *values)
 {
int i;
 
@@ -24,7 +24,7 @@ void a4l_sg_init_sine(struct waveform_config *config, double 
*values)
}
 }
 
-void a4l_sg_init_sawtooth(struct waveform_config *config, double *values)
+void a4l_wf_init_sawtooth(struct waveform_config *config, double *values)
 {
int i;
 
@@ -41,7 +41,7 @@ void a4l_sg_init_sawtooth(struct waveform_config *config, 
double *values)
}
 }
 
-void a4l_sg_init_triangular(struct waveform_config *config, double *values)
+void a4l_wf_init_triangular(struct waveform_config *config, double *values)
 {
int i;
 
@@ -67,7 +67,7 @@ void a4l_sg_init_triangular(struct waveform_config *config, 
double *values)
}
 }
 
-void a4l_sg_init_steps(struct waveform_config *config, double *values)
+void a4l_wf_init_steps(struct waveform_config *config, double *values)
 {
int i;

@@ -82,7 +82,7 @@ void a4l_sg_init_steps(struct waveform_config *config, double 
*values)
}
 }
 
-void a4l_sg_set_sample_count(struct waveform_config *config)
+void a4l_wf_set_sample_count(struct waveform_config *config)
 {
int sample_count = MIN_SAMPLE_COUNT;
int best_count = MIN_SAMPLE_COUNT;
@@ -116,7 +116,7 @@ void a4l_sg_set_sample_count(struct waveform_config *config)
config-spl_count = best_count;
 }
 
-int a4l_sg_check_config(struct waveform_config *config)
+int a4l_wf_check_config(struct waveform_config *config)
 {
 
if (config-wf_amplitude == 0)
@@ -134,18 +134,18 @@ int a4l_sg_check_config(struct waveform_config *config)
 }
 
 static void (* init_values[])(struct waveform_config *, double *) = {
-   a4l_sg_init_sine,
-   a4l_sg_init_sawtooth,
-   a4l_sg_init_triangular,
-   a4l_sg_init_steps,
+   a4l_wf_init_sine,
+   a4l_wf_init_sawtooth,
+   a4l_wf_init_triangular,
+   a4l_wf_init_steps,
 };
 
-void a4l_sg_init_values(struct waveform_config *config, double *values)
+void a4l_wf_init_values(struct waveform_config *config, double *values)
 {
init_values[config-wf_kind](config, values);
 }
 
-void a4l_sg_dump_values(struct waveform_config *config, double *values)
+void a4l_wf_dump_values(struct waveform_config *config, double *values)
 {
int i;

diff --git a/src/utils/analogy/wf_facilities.h 
b/src/utils/analogy/wf_facilities.h
index 6c99d51..7c9c705 100644
--- a/src/utils/analogy/wf_facilities.h
+++ b/src/utils/analogy/wf_facilities.h
@@ -24,13 +24,13 @@ struct waveform_config {
int spl_count;
 };
 
-void a4l_sg_init_sine(struct waveform_config *config, double *values);
-void a4l_sg_init_sawtooth(struct waveform_config *config, double *values);
-void a4l_sg_init_triangular(struct waveform_config *config, double *values);
-void a4l_sg_init_steps(struct waveform_config *config, double *values);
-void a4l_sg_set_sample_count(struct waveform_config *config);
-int 

[Xenomai-git] Alexis Berlemont : analogy: add wf_generate tool

2010-11-02 Thread GIT version control
Module: xenomai-abe
Branch: analogy
Commit: e83bfe75344e75db96fe706e168a5a7ed334eb71
URL:
http://git.xenomai.org/?p=xenomai-abe.git;a=commit;h=e83bfe75344e75db96fe706e168a5a7ed334eb71

Author: Alexis Berlemont alexis.berlem...@gmail.com
Date:   Sun Oct 31 16:01:24 2010 +0100

analogy: add wf_generate tool

---

 src/utils/analogy/Makefile.am |   18 +++-
 src/utils/analogy/wf_facilities.c |   24 ++--
 src/utils/analogy/wf_facilities.h |   16 ++--
 src/utils/analogy/wf_generate.c   |  232 +
 4 files changed, 266 insertions(+), 24 deletions(-)

diff --git a/src/utils/analogy/Makefile.am b/src/utils/analogy/Makefile.am
index 3d8cb5e..8e7734f 100644
--- a/src/utils/analogy/Makefile.am
+++ b/src/utils/analogy/Makefile.am
@@ -1,6 +1,13 @@
 sbin_PROGRAMS = analogy_config
 
-bin_PROGRAMS = cmd_read cmd_write cmd_bits insn_read insn_write insn_bits
+bin_PROGRAMS = \
+   cmd_read \
+   cmd_write \
+   cmd_bits \
+   insn_read \
+   insn_write \
+   insn_bits \
+   wf_generate
 
 CPPFLAGS = \
@XENO_USER_CFLAGS@ \
@@ -9,11 +16,11 @@ CPPFLAGS = \
 LDFLAGS = \
@XENO_USER_LDFLAGS@
 
-lib_LIBRARIES = libwaveform.a
+noinst_HEADERS = wf_facilities.h
 
-libwaveform_a_SOURCES = signal_generation.c
+lib_LIBRARIES = libwaveform.a
 
-noinst_HEADERS = signal_generation.h
+libwaveform_a_SOURCES = wf_facilities.c
 
 analogy_config_SOURCES = analogy_config.c
 analogy_config_LDADD = \
@@ -58,3 +65,6 @@ insn_bits_LDADD = \
../../drvlib/analogy/libanalogy.la \
../../skins/rtdm/librtdm.la \
../../skins/common/libxenomai.la
+
+wf_generate_SOURCES = wf_generate.c
+wf_generate_LDADD = ./libwaveform.a -lm
diff --git a/src/utils/analogy/wf_facilities.c 
b/src/utils/analogy/wf_facilities.c
index ce250e7..08d105e 100644
--- a/src/utils/analogy/wf_facilities.c
+++ b/src/utils/analogy/wf_facilities.c
@@ -10,7 +10,7 @@
 #define PI 3.14159265358979323846
 #endif
 
-void a4l_sg_init_sine(struct waveform_config *config, double *values)
+void a4l_wf_init_sine(struct waveform_config *config, double *values)
 {
int i;
 
@@ -24,7 +24,7 @@ void a4l_sg_init_sine(struct waveform_config *config, double 
*values)
}
 }
 
-void a4l_sg_init_sawtooth(struct waveform_config *config, double *values)
+void a4l_wf_init_sawtooth(struct waveform_config *config, double *values)
 {
int i;
 
@@ -41,7 +41,7 @@ void a4l_sg_init_sawtooth(struct waveform_config *config, 
double *values)
}
 }
 
-void a4l_sg_init_triangular(struct waveform_config *config, double *values)
+void a4l_wf_init_triangular(struct waveform_config *config, double *values)
 {
int i;
 
@@ -67,7 +67,7 @@ void a4l_sg_init_triangular(struct waveform_config *config, 
double *values)
}
 }
 
-void a4l_sg_init_steps(struct waveform_config *config, double *values)
+void a4l_wf_init_steps(struct waveform_config *config, double *values)
 {
int i;

@@ -82,7 +82,7 @@ void a4l_sg_init_steps(struct waveform_config *config, double 
*values)
}
 }
 
-void a4l_sg_set_sample_count(struct waveform_config *config)
+void a4l_wf_set_sample_count(struct waveform_config *config)
 {
int sample_count = MIN_SAMPLE_COUNT;
int best_count = MIN_SAMPLE_COUNT;
@@ -116,7 +116,7 @@ void a4l_sg_set_sample_count(struct waveform_config *config)
config-spl_count = best_count;
 }
 
-int a4l_sg_check_config(struct waveform_config *config)
+int a4l_wf_check_config(struct waveform_config *config)
 {
 
if (config-wf_amplitude == 0)
@@ -134,18 +134,18 @@ int a4l_sg_check_config(struct waveform_config *config)
 }
 
 static void (* init_values[])(struct waveform_config *, double *) = {
-   a4l_sg_init_sine,
-   a4l_sg_init_sawtooth,
-   a4l_sg_init_triangular,
-   a4l_sg_init_steps,
+   a4l_wf_init_sine,
+   a4l_wf_init_sawtooth,
+   a4l_wf_init_triangular,
+   a4l_wf_init_steps,
 };
 
-void a4l_sg_init_values(struct waveform_config *config, double *values)
+void a4l_wf_init_values(struct waveform_config *config, double *values)
 {
init_values[config-wf_kind](config, values);
 }
 
-void a4l_sg_dump_values(struct waveform_config *config, double *values)
+void a4l_wf_dump_values(struct waveform_config *config, double *values)
 {
int i;

diff --git a/src/utils/analogy/wf_facilities.h 
b/src/utils/analogy/wf_facilities.h
index 6c99d51..7c9c705 100644
--- a/src/utils/analogy/wf_facilities.h
+++ b/src/utils/analogy/wf_facilities.h
@@ -24,13 +24,13 @@ struct waveform_config {
int spl_count;
 };
 
-void a4l_sg_init_sine(struct waveform_config *config, double *values);
-void a4l_sg_init_sawtooth(struct waveform_config *config, double *values);
-void a4l_sg_init_triangular(struct waveform_config *config, double *values);
-void a4l_sg_init_steps(struct waveform_config *config, double *values);
-void a4l_sg_set_sample_count(struct waveform_config *config);
-int a4l_sg_check_config(struct