Commit d8d0a28e authored by Guilherme Sanches's avatar Guilherme Sanches

Modified files to include the canbus option on the configurator tool. Not a...

Modified files to include the canbus option on the configurator tool. Not a compiling version (Work in progress)
parent f3bb1da4
......@@ -13,5 +13,5 @@ iop_supported_devices = {
'CPSW' : [ ETH, ti.phy_cpsw, ti.sch_cpsw, 'iop_cpsw.mako' ],
'GRSPW' : [ SPW, gaisler.phy_grspw, gaisler.sch_grspw, 'iop_grspw.mako'],
'SPWRTR' : [ RTR, gaisler.phy_spwrtr, gaisler.sch_spwrtr, 'iop_spw_router.mako'],
'OCCAN' : [ CAN, gaisler.phy gaisler ''],
}
## @package parsers.iop.gaisler_devices
# @author pfnf and lumm
# @author pfnf
# modified by lumm and gmvs
# @brief Functions to parse gaisler devices
__author__ = 'pfnf and lumm'
__author__ = 'pfnf'
__modified__ = 'lumm'
__modified__ ='gmvs'
from definitions import *
from utils.parser import str2int
......@@ -39,6 +42,8 @@ SPWRTR_IID = 'Idd'
SPWRTR_IDIV = 'Idiv'
SPWRTR_PRESCALER = 'Prescaler'
# Insert definition for CANBUS
VALID_EN = [ parserutils.str2int, lambda x : 0 <= x <= 1 ]
VALID_XD = [ parserutils.str2int, lambda x : 0 <= x <= 128 ]
VALID_READS = [ parserutils.str2int, lambda x : 0 <= x <= 2048 ]
......@@ -132,6 +137,19 @@ class SPWRTRSchSetup(object):
def details(self):
return 'SPWRTR Schedule Setup (Reads - {0})'.format(self.reads)
# CANBUS physical device
class CANBUSPhySetup(object):
def __init__(self):
self.speed = 0
self.code = ''
self.mask = ''
def details(self):
return 'CAN Physical Device Setup (Speed: {0} Code: {1} Mask: {3})'\
.format(self.speed, bin(self.code), bin(self.masks))
## Greth physical device setup
# @param iop_parser IOP parser object
......@@ -269,3 +287,13 @@ def sch_spwrtr(iop_parser, xml, pdevice):
# parse complete
setup.device = pdevice
return setup
def phy_canbus(iop_parser, xml, pdevices):
# clear previous errors and warnings
iop_parser.logger.clear_errors(0)
# parse setup
return True
\ No newline at end of file
## @package parsers.iop.ti_devices
# @author pfnf
# @modified by gmvs
# @brief Functions to parse ti devices
__author__ = 'pfnf'
__modifier__ = 'gmvs'
from definitions import *
from utils.parser import str2int
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment