USB Device Programming class project. This project allows a Python/Tk program running on a PC host to monitor/control a test-CPU programmed into an altera development board.
Dependencies: C12832_lcd USBDevice mbed-rtos mbed mmSPI
mmPython/mmProject.txt@4:92539904a4ad, 2013-09-01 (annotated)
- Committer:
- gatedClock
- Date:
- Sun Sep 01 02:58:57 2013 +0000
- Revision:
- 4:92539904a4ad
- Child:
- 8:db29cce17a33
add the project Python files. the tab-formatting needs to be redone.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
gatedClock | 4:92539904a4ad | 1 | #!/usr/bin/python -tt # tt: detect mixed space/tab. |
gatedClock | 4:92539904a4ad | 2 | #---copyright-----------------------------------#------------------------------- |
gatedClock | 4:92539904a4ad | 3 | # licensed for personal and academic use. |
gatedClock | 4:92539904a4ad | 4 | # commercial use must be approved by the account-holder of |
gatedClock | 4:92539904a4ad | 5 | # gated.clock@gmail.com |
gatedClock | 4:92539904a4ad | 6 | #=======imports=================================#=============================== |
gatedClock | 4:92539904a4ad | 7 | import os # import os library. |
gatedClock | 4:92539904a4ad | 8 | import sys # import sys library. |
gatedClock | 4:92539904a4ad | 9 | import usb.core # import PyUSB library. |
gatedClock | 4:92539904a4ad | 10 | from Tkinter import * # Tk library. |
gatedClock | 4:92539904a4ad | 11 | import ttk # from Tk library. |
gatedClock | 4:92539904a4ad | 12 | import tkFileDialog # from Tk library. |
gatedClock | 4:92539904a4ad | 13 | import pexpect # not needed here. |
gatedClock | 4:92539904a4ad | 14 | import mmUI # specify file. |
gatedClock | 4:92539904a4ad | 15 | from mmUI import * # specify module. |
gatedClock | 4:92539904a4ad | 16 | #=======function================================#=============================== |
gatedClock | 4:92539904a4ad | 17 | #=======main====================================#=============================== |
gatedClock | 4:92539904a4ad | 18 | #-------parameters------------------------------#------------------------------- |
gatedClock | 4:92539904a4ad | 19 | #-------locals----------------------------------#------------------------------- |
gatedClock | 4:92539904a4ad | 20 | #-------execution-------------------------------#------------------------------- |
gatedClock | 4:92539904a4ad | 21 | if (1): |
gatedClock | 4:92539904a4ad | 22 | |
gatedClock | 4:92539904a4ad | 23 | root = Tk() |
gatedClock | 4:92539904a4ad | 24 | app = mmUI(root) |
gatedClock | 4:92539904a4ad | 25 | root.mainloop() |
gatedClock | 4:92539904a4ad | 26 | sys.exit(0) |
gatedClock | 4:92539904a4ad | 27 | #-----------------------------------------------#------------------------------- |
gatedClock | 4:92539904a4ad | 28 |