Dado Sutter |
Wow,
That was quick ! :) Thank you James !! Best Dado ---------- Forwarded message ---------- From: jbsnyder at BerliOS <[hidden email]> Date: Thu, Sep 3, 2009 at 00:24 Subject: [Elua-svn] r414 - tags/pre0.6/doc/eluadoc To: [hidden email] Author: jbsnyder Date: 2009-09-03 06:24:47 +0200 (Thu, 03 Sep 2009) New Revision: 414 Modified: tags/pre0.6/doc/eluadoc/refman_gen_adc.lua Log: Some additional detail for the ADC documentation. Modified: tags/pre0.6/doc/eluadoc/refman_gen_adc.lua =================================================================== --- tags/pre0.6/doc/eluadoc/refman_gen_adc.lua 2009-08-27 17:35:32 UTC (rev 413) +++ tags/pre0.6/doc/eluadoc/refman_gen_adc.lua 2009-09-03 04:24:47 UTC (rev 414) @@ -10,21 +10,23 @@ menu_name = "adc", -- Overview - overview = [[This module contains functions that access analog to digital converter (ADC) peripherals. ]], + overview = [[This module contains functions that access analog to digital converter (ADC) peripherals.</p> + <p>Getting samples from an ADC channel is a two part process involving requesting conversions (using adc.sample), and extraction of conversion results from a conversion buffer (using adc.getsample, adc.getsamples or adc.insertsamples). Various configuration parameters are available to set conversion rate, how results are extracted from the buffer and how these results are processed prior to extraction.</p> + <p>This module can be utilized if the device in use has a supported ADC peripheral (see @status.html@status@ for details) and if ADC functionality is enabled at build time (see @building.html@building@).]], -- Functions funcs = { { sig = "#adc.sample#( id, count )", - desc = "Request sample conversions.", + desc = "Initiate conversion and buffering of samples on an ADC channel.", args = { "$id$ - ADC channel ID. Optionally, this may be a table containing a list of channel IDs (i.e.: {0, 2, 3}), allowing synchronization of acquisition. NOTE: This acceptance of mixed types is only for the sample function.", - "$count$ - number of samples to acquire." + "$count$ - number of samples to acquire and place in buffer." } }, { sig = "sample = #adc.getsample#( id )", - desc = "Get converted samples.", + desc = "Get a single conversion value from the buffer associated with a given channel.", args = { "$id$ - ADC channel ID." @@ -32,7 +34,7 @@ ret = "$sample$ - numeric value of conversion, or nil if sample was not available." }, { sig = "samples = #adc.getsamples#( id, count )", - desc = "Get multiple converted samples.", + desc = "Get multiple conversion values from the buffer associated with a given channel.", args = { "$id$ - ADC channel ID.", @@ -41,35 +43,35 @@ ret = "$samples$ - table containing integer conversion values. If not enough samples are available, remaining indices will be nil." }, { sig = "#adc.insertsamples#( id, table, idx, count )", - desc = "Write multiple samples to a table.", + desc = "Get multiple conversion values from a channel's buffer, and write them into a table.", args = { "$id$ - ADC channel ID.", "$table$ - table to write samples to. Values at $table$[$idx$] to $table$[$idx$ + $count$ -1] will be overwritten with samples (or nil if not enough samples are available).", - "$idx$ - first index to use for writing samples", + "$idx$ - first index to use in the table for writing samples.", "$count$ - number of samples to return. If not enough samples are available (after blocking, if enabled) remaining values will be nil." } }, { sig = "maxval = #adc.maxval#( id )", - desc = "Get maximum conversion value.", + desc = "Get the maximum value that can be returned on a given channel. This integer value corresponds to the maximum voltage supported by the channel.", args = { "$id$ - ADC channel ID." }, - ret = "$maxval$ - maximum conversion value (based on channel resolution)" + ret = "$maxval$ - maximum integer conversion value (based on channel resolution)" }, { sig = "clock = #adc.setclock#( id, clock, timer_id )", - desc = "Set frequency of sample acquisition.", + desc = "Set the frequency (number of samples per second) at which voltages will be converted into samples.", args = { "$id$ - ADC channel ID.", "$clock$ - frequency to acquire samples at in Hz (number of samples per second), 0 to acquire as fast as possible.", - "$timer_id$ - Timer channel ID to use to control ADC conversion. Note: At this time, a timer selection will apply to all channels on a given ADC peripheral." + "$timer_id$ - Timer channel ID to use to control ADC conversion. <strong>Note:</strong> At this time, a timer selection will apply to all channels on a given ADC peripheral." }, ret = "$clock$ - actual acquisition frequency to be used" }, { sig = "status = #adc.isdone#( id )", - desc = "Check if sampling is done.", + desc = "Check whether samples are still being acquired on a channel.", args = { "$id$ - ADC channel ID." @@ -77,7 +79,7 @@ ret = "$status$ - 1 if no samples are being acquired, 0 if samples are pending acquisition." }, { sig = "#adc.setblocking#( id, mode )", - desc = "Set whether or not to block waiting for requested samples.", + desc = "Set whether or not functions that request converted samples should wait for requested samples or return immediately with what is available.", args = { "$id$ - ADC channel ID.", @@ -85,11 +87,11 @@ }, }, { sig = "#adc.setsmoothing#( id, length )", - desc = "Set length of moving average filter.", + desc = "Set the length of the moving average filter. When $length$ is greater than 1, samples pulled from the conversion buffer will be averaged with the preceding $length$ - 1 buffered values.", args = { "$id$ - ADC channel ID.", - "$length$ - number of samples to include in moving average filter (must be a power of 2). If 1, filter is disabled." + "$length$ - number of preceding samples to include in moving average filter (must be a power of 2). If 1, filter is disabled. When enabled, a filter buffer is filled before the main conversion buffer, so that averages are always over the same number of samples." } } } _______________________________________________ Elua-svn mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-svn _______________________________________________ Elua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Free forum by Nabble | Edit this page |