-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added cp210x driver with fixes for WSDA-200 and WSDA-104
- Loading branch information
Showing
6 changed files
with
1,510 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Linux/cp210x/install.sh | ||
|
||
# vim | ||
*.swp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
obj-m = cp210x.o | ||
KDIR = /lib/modules/`uname -r`/build | ||
SRCDIR = $(PWD) | ||
# try this instead if you don't have PWD defined | ||
# SRCDIR = $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) | ||
all: | ||
$(MAKE) -C $(KDIR) M=$(SRCDIR) modules | ||
clean: | ||
$(MAKE) -C $(KDIR) M=$(SRCDIR) clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import tarfile | ||
from StringIO import StringIO | ||
|
||
def main(): | ||
installScript = open("install.sh.in").read() | ||
payloadStart = len(installScript.splitlines()) + 1 | ||
#payloadStart = len(installScript) - 1 + len(str(len(installScript))) | ||
#if len(installScript) - 1 + len(str(payloadStart)) != payloadStart: | ||
# payloadStart += 1 | ||
|
||
print "payloadstart=%s" % payloadStart | ||
installScript = installScript.replace("payloadstart=0", "payloadstart=%s" % payloadStart) | ||
|
||
output = open("install.sh", 'wb') | ||
|
||
tarData = StringIO() | ||
tarFile = tarfile.open(fileobj=tarData, mode='w:bz2') | ||
tarFile.add("cp210x.c") | ||
tarFile.add("Makefile") | ||
tarFile.add("dkms.conf") | ||
tarFile.close() | ||
|
||
output.write(installScript) | ||
output.write(tarData.getvalue()) | ||
output.close() | ||
|
||
if __name__ == "__main__": | ||
main() |
Oops, something went wrong.