mirror of
https://github.com/xtacocorex/CHIP_IO
synced 2025-07-20 04:43:21 +00:00
@ -1,3 +1,10 @@
|
|||||||
|
0.2.1
|
||||||
|
----
|
||||||
|
* Pull request #12 fixes:
|
||||||
|
- Fixed indent in the i2c-1 dts
|
||||||
|
- Removed import dependencies in the SPI and PWM overlays
|
||||||
|
- Re-enabled building of the dtbo on setup.py install
|
||||||
|
|
||||||
0.2.0
|
0.2.0
|
||||||
----
|
----
|
||||||
* Added the ability to load DTB Overlays from within CHIP_IO
|
* Added the ability to load DTB Overlays from within CHIP_IO
|
||||||
|
@ -2,10 +2,17 @@ CHIP_IO
|
|||||||
============================
|
============================
|
||||||
A CHIP GPIO library
|
A CHIP GPIO library
|
||||||
|
|
||||||
|
NOTE: Now requires the custom DTC to install the library
|
||||||
|
|
||||||
Manual::
|
Manual::
|
||||||
|
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install git build-essential python-dev python-pip -y
|
sudo apt-get install git build-essential python-dev python-pip flex bison -y
|
||||||
|
git clone https://github.com/atenart/dtc
|
||||||
|
cd dtc
|
||||||
|
make
|
||||||
|
sudo make install PREFIX=/usr
|
||||||
|
cd ..
|
||||||
git clone git://github.com/xtacocorex/CHIP_IO.git
|
git clone git://github.com/xtacocorex/CHIP_IO.git
|
||||||
cd CHIP_IO
|
cd CHIP_IO
|
||||||
sudo python setup.py install
|
sudo python setup.py install
|
||||||
|
@ -4,8 +4,6 @@ import shutil
|
|||||||
import glob
|
import glob
|
||||||
|
|
||||||
def compile():
|
def compile():
|
||||||
# The compile needs the include for the spi2 stuff, not enabling that at the moment
|
|
||||||
# as I don't want to pull in the include section from CHIP-dt-overlays
|
|
||||||
call(["dtc", "-O", "dtb", "-o", "overlays/chip-spi2.dtbo", "-b", "o", "-@", "overlays/chip-spi2.dts"])
|
call(["dtc", "-O", "dtb", "-o", "overlays/chip-spi2.dtbo", "-b", "o", "-@", "overlays/chip-spi2.dts"])
|
||||||
call(["dtc", "-O", "dtb", "-o", "overlays/chip-i2c1.dtbo", "-b", "o", "-@", "overlays/chip-i2c1.dts"])
|
call(["dtc", "-O", "dtb", "-o", "overlays/chip-i2c1.dtbo", "-b", "o", "-@", "overlays/chip-i2c1.dts"])
|
||||||
call(["dtc", "-O", "dtb", "-o", "overlays/chip-pwm0.dtbo", "-b", "o", "-@", "overlays/chip-pwm0.dts"])
|
call(["dtc", "-O", "dtb", "-o", "overlays/chip-pwm0.dtbo", "-b", "o", "-@", "overlays/chip-pwm0.dts"])
|
||||||
@ -15,7 +13,7 @@ def copy():
|
|||||||
os.makedirs("/lib/firmware/chip_io/")
|
os.makedirs("/lib/firmware/chip_io/")
|
||||||
for fl in glob.glob("/lib/firmware/chip_io/chip-*-.dtbo"):
|
for fl in glob.glob("/lib/firmware/chip_io/chip-*-.dtbo"):
|
||||||
os.remove(fl)
|
os.remove(fl)
|
||||||
shutil.copy("overlays/chip-spi2.dtbo", "/lib/firmware/chip_io/chip-spi2.dtbo")
|
shutil.move("overlays/chip-spi2.dtbo", "/lib/firmware/chip_io/chip-spi2.dtbo")
|
||||||
shutil.copy("overlays/chip-i2c1.dtbo", "/lib/firmware/chip_io/chip-i2c1.dtbo")
|
shutil.move("overlays/chip-i2c1.dtbo", "/lib/firmware/chip_io/chip-i2c1.dtbo")
|
||||||
shutil.copy("overlays/chip-pwm0.dtbo", "/lib/firmware/chip_io/chip-pwm0.dtbo")
|
shutil.move("overlays/chip-pwm0.dtbo", "/lib/firmware/chip_io/chip-pwm0.dtbo")
|
||||||
|
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -45,8 +45,6 @@
|
|||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
/plugin/;
|
/plugin/;
|
||||||
|
|
||||||
#include <dt-bindings/pwm/pwm.h>
|
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
compatible = "nextthing,chip", "allwinner,sun5i-r8";
|
compatible = "nextthing,chip", "allwinner,sun5i-r8";
|
||||||
|
|
||||||
|
Binary file not shown.
@ -42,10 +42,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
|
|
||||||
#include <dt-bindings/interrupt-controller/irq.h>
|
|
||||||
#include <dt-bindings/pinctrl/sun4i-a10.h>
|
|
||||||
|
|
||||||
/plugin/;
|
/plugin/;
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
@ -59,15 +55,15 @@
|
|||||||
chip_spi2_pins: spi2@0 {
|
chip_spi2_pins: spi2@0 {
|
||||||
allwinner,pins = "PE1", "PE2", "PE3";
|
allwinner,pins = "PE1", "PE2", "PE3";
|
||||||
allwinner,function = "spi2";
|
allwinner,function = "spi2";
|
||||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
allwinner,drive = "0"; //<SUN4I_PINCTRL_10_MA>;
|
||||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
allwinner,pull = "0"; //<SUN4I_PINCTRL_NO_PULL>;
|
||||||
};
|
};
|
||||||
|
|
||||||
chip_spi2_cs0_pins: spi2_cs0@0 {
|
chip_spi2_cs0_pins: spi2_cs0@0 {
|
||||||
allwinner,pins = "PE0";
|
allwinner,pins = "PE0";
|
||||||
allwinner,function = "spi2";
|
allwinner,function = "spi2";
|
||||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
allwinner,drive = "0"; //<SUN4I_PINCTRL_10_MA>;
|
||||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
allwinner,pull = "0"; //<SUN4I_PINCTRL_NO_PULL>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -87,7 +83,6 @@
|
|||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
spi2@0 {
|
spi2@0 {
|
||||||
//compatible = "spidev";
|
|
||||||
compatible = "rohm,dh2228fv";
|
compatible = "rohm,dh2228fv";
|
||||||
reg = <0>;
|
reg = <0>;
|
||||||
spi-max-frequency = <24000000>;
|
spi-max-frequency = <24000000>;
|
||||||
@ -95,3 +90,4 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
4
setup.py
4
setup.py
@ -1,6 +1,6 @@
|
|||||||
try:
|
try:
|
||||||
from overlays import builder
|
from overlays import builder
|
||||||
#builder.compile()
|
builder.compile()
|
||||||
builder.copy()
|
builder.copy()
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
@ -20,7 +20,7 @@ classifiers = ['Development Status :: 3 - Alpha',
|
|||||||
'Topic :: System :: Hardware']
|
'Topic :: System :: Hardware']
|
||||||
|
|
||||||
setup(name = 'CHIP_IO',
|
setup(name = 'CHIP_IO',
|
||||||
version = '0.2.0',
|
version = '0.2.1',
|
||||||
author = 'Robert Wolterman',
|
author = 'Robert Wolterman',
|
||||||
author_email = 'robert.wolterman@gmail.com',
|
author_email = 'robert.wolterman@gmail.com',
|
||||||
description = 'A module to control CHIP IO channels',
|
description = 'A module to control CHIP IO channels',
|
||||||
|
@ -76,6 +76,6 @@ void define_constants(PyObject *module)
|
|||||||
both_edge = Py_BuildValue("i", BOTH_EDGE);
|
both_edge = Py_BuildValue("i", BOTH_EDGE);
|
||||||
PyModule_AddObject(module, "BOTH", both_edge);
|
PyModule_AddObject(module, "BOTH", both_edge);
|
||||||
|
|
||||||
version = Py_BuildValue("s", "0.2.0");
|
version = Py_BuildValue("s", "0.2.1");
|
||||||
PyModule_AddObject(module, "VERSION", version);
|
PyModule_AddObject(module, "VERSION", version);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user