[gnoduino] Add USB VID/PID handling for the Leonardo builds
- From: Lucian Langa <lucilanga src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnoduino] Add USB VID/PID handling for the Leonardo builds
- Date: Fri, 6 Jul 2012 11:55:14 +0000 (UTC)
commit c88e78e72f47fd772c3212f40302d526017b3a61
Author: Pascal de Bruijn <pmjdebruijn pcode nl>
Date: Fri Jul 6 01:17:44 2012 +0200
Add USB VID/PID handling for the Leonardo builds
src/board.py | 6 ++++++
src/compiler.py | 5 +++++
2 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/board.py b/src/board.py
index 61724e3..c590469 100644
--- a/src/board.py
+++ b/src/board.py
@@ -108,6 +108,12 @@ class Board(object):
def getPath(self, id):
return self.boards[id]['path']
+ def getBoardUSBVID(self, id):
+ return self.boards[id]['vid']
+
+ def getBoardUSBPID(self, id):
+ return self.boards[id]['pid']
+
def getVariant(self, id):
try:
return self.boards[id]['variant']
diff --git a/src/compiler.py b/src/compiler.py
index 3cace72..3adfe04 100644
--- a/src/compiler.py
+++ b/src/compiler.py
@@ -299,6 +299,11 @@ def compileObjects(objects, flags, objout, output):
compline.append("-DF_CPU="+b.getBoardFCPU(b.getBoard()))
compline.extend(misc.getArduinoIncludes())
if misc.getArduinoVersion() >= 100:
+ try:
+ compline.append("-DUSB_VID="+b.getBoardUSBVID(b.getBoard()))
+ compline.append("-DUSB_PID="+b.getBoardUSBPID(b.getBoard()))
+ except: pass
+ if misc.getArduinoVersion() >= 100:
compline.append("-DARDUINO=100")
compline.append(os.path.join(misc.getArduinoPath(), i))
compline.append("-o"+objout+"/"+i+".o")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]