From: "Christophe Coutand" <ccoutand@stmi.com>
To: "Sergei Gavrikov" <sergei.gavrikov@gmail.com>
Cc: <ecos-patches@ecos.sourceware.org>
Subject: RE: Update to CYGPKG_IO_ADC
Date: Tue, 25 May 2010 19:06:00 -0000 [thread overview]
Message-ID: <D6050C555CC56940A7AF32652283027602EAC58D@mail2.STMIRV01.COM> (raw)
In-Reply-To: <alpine.DEB.2.00.1005251255510.2263@sg-desktop.local>
[-- Attachment #1: Type: text/plain, Size: 2101 bytes --]
Hi Sergei,
I have generated a new patch using CYG_IO_SET_CONFIG_ADC_DATA_FLUSH instead.
The second patch is pending. I have fixed the compilation error due to CYGPKG_DEVS_ADC_ARM_AT91_DEBUG_LEVEL == 0, remove the CRs and cleanup the CDL file. I am however not sure what you mean by placing CYGNUM_IO_ADC_SAMPLE_SIZE inside a CDL component. CYGNUM_IO_ADC_SAMPLE_SIZE is defined from the IO/ADC package, am I allowed to redefine it inside a CDL component in the DEVS/ADC? Also I never use tabulation so if you can pin-point where you have find one, I will investigate.
Regards,
Christophe
-----Original Message-----
From: Sergei Gavrikov [mailto:sergei.gavrikov@gmail.com]
Sent: 25. mai 2010 12:50
To: Christophe Coutand
Cc: ecos-patches@ecos.sourceware.org
Subject: Re: Update to CYGPKG_IO_ADC
On Sat, 22 May 2010, Christophe Coutand wrote:
> Added option to flush the ADC sample buffer.
>
> Christophe
Hi Christophe,
First, thank you for your contribution! Some things so far (first look
on both patches)
1) I could not compile the driver, if cdl_option
CYGPKG_DEVS_ADC_ARM_AT91_DEBUG_LEVEL != 0: (test target to build the
driver was sam7ex256):
ecos/packages/devs/adc/arm/at91/current/src/adc_at91.c: In function ‘at91_adc_enable’:
ecos/packages/devs/adc/arm/at91/current/src/adc_at91.c:342: error: ‘at91_adc_info’ has no member named ‘zero_time’
Could you fix this, please?
2) Minor
Could you please, clean-up the first patch (src), i.e. remove CRs, expand
TABs, fix some indents there; format (wrap on) a few long lines in CDL.
It seemed for me those direct requirements of a range ([10; 12]) for
CYGNUM_IO_ADC_SAMPLE_SIZE on top your CDL can be placed in a separate
CDL component.
About new I/O key for config_key.h (your second patch), I would prefer
rename your CYG_IO_SET_CONFIG_ADC_FLUSH_DATABUF, because all *flush* key
names end itself on _FLUSH. What would you say about:
CYG_IO_SET_CONFIG_ADC_DATA_FLUSH?
Note: In the next patches do not diff ecos.db, please. Send new
db-entries as a separate file.
Thank you,
Sergei
[-- Attachment #2: adc_buf_flush_v2 --]
[-- Type: application/octet-stream, Size: 2142 bytes --]
diff -r ae816c83f082 packages/io/common/current/ChangeLog
--- a/packages/io/common/current/ChangeLog Tue May 11 16:26:19 2010 +0000
+++ b/packages/io/common/current/ChangeLog Tue May 25 20:41:19 2010 +0200
@@ -1,3 +1,8 @@
+20010-05-25 ccoutand <ccoutand@stmi.com>
+ * src/adc.c:
+ Add new key to ADC driver to flush data buffer:
+ CYG_IO_SET_CONFIG_ADC_DATA_FLUSH
+
2008-08-08 Nick Garnett <nickg@ecoscentric.com>
* include/config_keys.h: Add keys for ADC devices.
diff -r ae816c83f082 packages/io/adc/current/ChangeLog
--- a/packages/io/adc/current/ChangeLog Tue May 11 16:26:19 2010 +0000
+++ b/packages/io/adc/current/ChangeLog Tue May 25 20:41:32 2010 +0200
@@ -1,3 +1,8 @@
+20010-05-25 ccoutand <ccoutand@stmi.com>
+ * src/adc.c:
+ Add new key to ADC driver to flush data buffer:
+ CYG_IO_SET_CONFIG_ADC_DATA_FLUSH
+
2009-03-02 Simon Kallweit <simon.kallweit@intefo.ch>
* cdl/io_adc.cdl:
diff -r ae816c83f082 packages/io/adc/current/src/adc.c
--- a/packages/io/adc/current/src/adc.c Tue May 11 16:26:19 2010 +0000
+++ b/packages/io/adc/current/src/adc.c Tue May 25 20:42:24 2010 +0200
@@ -298,6 +298,13 @@
chan->device->funs->disable( chan );
break;
+ case CYG_IO_SET_CONFIG_ADC_DATA_FLUSH:
+ cyg_drv_isr_lock();
+ chan->put = 0;
+ chan->get = 0;
+ cyg_drv_isr_unlock();
+ break;
+
case CYG_IO_SET_CONFIG_READ_BLOCKING:
if (*len < sizeof(cyg_uint32))
return -EINVAL;
diff -r ae816c83f082 packages/io/common/current/include/config_keys.h
--- a/packages/io/common/current/include/config_keys.h Tue May 11 16:26:19 2010 +0000
+++ b/packages/io/common/current/include/config_keys.h Tue May 25 20:42:39 2010 +0200
@@ -159,6 +159,7 @@
#define CYG_IO_SET_CONFIG_ADC_RATE 0x0981
#define CYG_IO_SET_CONFIG_ADC_ENABLE 0x0982
#define CYG_IO_SET_CONFIG_ADC_DISABLE 0x0983
+#define CYG_IO_SET_CONFIG_ADC_DATA_FLUSH 0x0984
// ======== 0x1000 Generic ===================================================
// Get/Set configuration 'key' values that can apply to more than one
next prev parent reply other threads:[~2010-05-25 19:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-22 9:43 Christophe Coutand
2010-05-25 10:51 ` Sergei Gavrikov
2010-05-25 19:06 ` Christophe Coutand [this message]
2010-05-25 20:21 ` Sergei Gavrikov
2010-05-25 21:32 ` Christophe Coutand
2010-05-26 7:20 ` Sergei Gavrikov
2010-05-26 6:53 ` Sergei Gavrikov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=D6050C555CC56940A7AF32652283027602EAC58D@mail2.STMIRV01.COM \
--to=ccoutand@stmi.com \
--cc=ecos-patches@ecos.sourceware.org \
--cc=sergei.gavrikov@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).