mirror of
https://github.com/linux-sunxi/meta-sunxi.git
synced 2024-11-16 02:08:23 +01:00
339dc8af45
pyA20 allows controlling GPIO, SPI and I2C on Allwinner boards from python. Although it is named A20 it should work on A10, A13 and other CPUs. Provided by Olimex for their boards but should work for others as well. Tested on A20-OLinuXino-MICRO. Signed-off-by: Jens Lucius <info@jenslucius.com>
52 lines
1.9 KiB
Diff
52 lines
1.9 KiB
Diff
--- pyA20-0.2.0/setup.py 2014-09-04 12:17:18.000000000 +0200
|
|
+++ pyA20-0.2.0/setup.py 2014-11-24 17:44:37.000000000 +0100
|
|
@@ -43,31 +43,31 @@
|
|
Detect processor type
|
|
:return:
|
|
"""
|
|
- cpuinfo = open("/proc/cpuinfo", 'r')
|
|
- for line in cpuinfo:
|
|
- if "Hardware" in line:
|
|
- processor = line.split(":")[1].rstrip()
|
|
+ #cpuinfo = open("/proc/cpuinfo", 'r')
|
|
+ #for line in cpuinfo:
|
|
+ # if "Hardware" in line:
|
|
+ # processor = line.split(":")[1].rstrip()
|
|
|
|
- if "sun4i" in processor:
|
|
- print ("Detected processor: " + print_color(processor) + " (Probably Allwinner A10)")
|
|
+ # if "sun4i" in processor:
|
|
+ # print ("Detected processor: " + print_color(processor) + " (Probably Allwinner A10)")
|
|
|
|
- elif "sun5i" in processor:
|
|
- print ("Detected processor: " + print_color(processor) + " (Probably Allwinner A13)")
|
|
+ # elif "sun5i" in processor:
|
|
+ # print ("Detected processor: " + print_color(processor) + " (Probably Allwinner A13)")
|
|
|
|
- elif "sun7i" in processor:
|
|
- print ("Detected processor: " + print_color(processor) + " (Probably Allwinner A20)")
|
|
+ # elif "sun7i" in processor:
|
|
+ # print ("Detected processor: " + print_color(processor) + " (Probably Allwinner A20)")
|
|
|
|
- else:
|
|
- print ("Detected processor: " + print_color("unknown"))
|
|
+ # else:
|
|
+ # print ("Detected processor: " + print_color("unknown"))
|
|
|
|
|
|
- if processor_type not in processor:
|
|
- print_warning()
|
|
+ # if processor_type not in processor:
|
|
+ # print_warning()
|
|
|
|
- return
|
|
+ return
|
|
|
|
- print ("No processor detected")
|
|
- print_warning()
|
|
+ #print ("No processor detected")
|
|
+ #print_warning()
|
|
|
|
|
|
class build_ext(_build_ext):
|