Revision: 1768
Author: sebastien.lelong
Date: Fri Mar 12 11:46:50 2010
Log: reindent
http://code.google.com/p/jallib/source/detail?r=1768
Modified:
/trunk/tools/adc/adc_channels_generator.py
=======================================
--- /trunk/tools/adc/adc_channels_generator.py Sat May 23 11:49:17 2009
+++ /trunk/tools/adc/adc_channels_generator.py Fri Mar 12 11:46:50 2010
@@ -18,32 +18,33 @@
import Cheetah.Template
if __name__ == "__main__":
- import sys
- # Prepare template
- tmpl_file = "adc_channels.jal.tmpl"
- tmplsrc = "".join(file(tmpl_file,"r").readlines())
- klass = Cheetah.Template.Template.compile(tmplsrc)
- tmpl = klass()
- # ADC pins grouped + whole pin map
- from pinmap import pinmap
- from adc_pcfg import adc_pcfg
- from adc_pins import adc_pins
- from pic_ds_map import pic_ds, ds_pic
-
- # extract PICs where PCFG is used to configure dependent ADC channels
- dependent_pcfg_dsref = adc_pcfg.keys()
- pcfg_combination_pics = []
- [pcfg_combination_pics.extend(ds_pic[r]) for r in dependent_pcfg_dsref]
-
- tmpl.pinmap = pinmap
- tmpl.pcfg_combination_pics = pcfg_combination_pics
- tmpl.adc_pcfg = adc_pcfg
- tmpl.pic_ds = pic_ds
- tmpl.ds_pic = ds_pic
- tmpl.adc_pins = adc_pins
-
- fout = file("adc_channels.jal","w")
- print >> fout,tmpl.main()
- fout.close()
- sys.exit(0)
-
+ import sys
+ # Prepare template
+ tmpl_file = "adc_channels.jal.tmpl"
+ tmplsrc = "".join(file(tmpl_file,"r").readlines())
+ klass = Cheetah.Template.Template.compile(tmplsrc)
+ tmpl = klass()
+ # ADC pins grouped + whole pin map
+ from pinmap import pinmap
+ from adc_pcfg import adc_pcfg
+ from adc_pins import adc_pins
+ from pic_ds_map import pic_ds, ds_pic
+
+ # extract PICs where PCFG is used to configure dependent ADC channels
+ dependent_pcfg_dsref = adc_pcfg.keys()
+ pcfg_combination_pics = []
+ for r in dependent_pcfg_dsref:
+ pcfg_combination_pics.extend(ds_pic[r])
+
+ tmpl.pinmap = pinmap
+ tmpl.pcfg_combination_pics = pcfg_combination_pics
+ tmpl.adc_pcfg = adc_pcfg
+ tmpl.pic_ds = pic_ds
+ tmpl.ds_pic = ds_pic
+ tmpl.adc_pins = adc_pins
+
+ fout = file("adc_channels.jal","w")
+ print >> fout,tmpl.main()
+ fout.close()
+ sys.exit(0)
+
--
You received this message because you are subscribed to the Google Groups
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/jallib?hl=en.