示例#1
0
__author__ = """Alexander Krause <*****@*****.**>"""
__date__ = "2012-11-22"
__version__ = "0.1.0"

import os
import sys
import time

sys.path=\
 [os.path.dirname(os.path.realpath(__file__))+'/../']+sys.path

from lib.nrfeep import EEP_nRF
from lib.cdc import CDC_nRF

myDev = CDC_nRF(sys.argv[1])

data = myDev.readEEPROM()
print data
if data:
    myEEP = EEP_nRF()
    myEEP.parse(data)

    myEEP.dumpData()

#print sys.argv[1]
#myEEP=EEP_nRF(sys.argv[1])

#myEEP.parse()

#myEEP.dumpData()
示例#2
0
"""
	write eeprom hex file into module
"""
__author__	= """Alexander Krause <*****@*****.**>"""
__date__ 		= "2012-11-22"
__version__	= "0.1.0"

import os
import sys
import time

sys.path=\
	[os.path.dirname(os.path.realpath(__file__))+'/../']+sys.path


from lib.cdc import CDC_nRF
from lib.nrfeep import EEP_nRF

myDev=CDC_nRF(sys.argv[1])
myEEP=EEP_nRF(sys.argv[2])

data=list(myEEP.tobinarray(start=0x00))
data=data+[255,255]
print data

myDev.writeEEPROM(0,data)


print myDev.readEEPROM(0,len(data))
#print myEEP.tobinarray(start=0x00)
示例#3
0
__author__ = """Alexander Krause <*****@*****.**>"""
__date__ = "2012-11-22"
__version__ = "0.1.0"

import os
import sys
import time

sys.path = [os.path.dirname(os.path.realpath(__file__)) + "/../"] + sys.path

from lib.nrfeep import EEP_nRF
from lib.cdc import CDC_nRF


myDev = CDC_nRF(sys.argv[1])

data = myDev.readEEPROM()
print data
if data:
    myEEP = EEP_nRF()
    myEEP.parse(data)

    myEEP.dumpData()

# print sys.argv[1]
# myEEP=EEP_nRF(sys.argv[1])

# myEEP.parse()

# myEEP.dumpData()
示例#4
0
# -*- coding: utf-8 -*-
"""
	write eeprom hex file into module
"""
__author__ = """Alexander Krause <*****@*****.**>"""
__date__ = "2012-11-22"
__version__ = "0.1.0"

import os
import sys
import time

sys.path=\
 [os.path.dirname(os.path.realpath(__file__))+'/../']+sys.path

from lib.cdc import CDC_nRF
from lib.nrfeep import EEP_nRF

myDev = CDC_nRF(sys.argv[1])
myEEP = EEP_nRF(sys.argv[2])

data = list(myEEP.tobinarray(start=0x00))
data = data + [255, 255]
print data

myDev.writeEEPROM(0, data)

print myDev.readEEPROM(0, len(data))
#print myEEP.tobinarray(start=0x00)