2023-06-24 09:05:38 +03:00
let Common = system . getScript ( "/driverlib/Common.js" ) ;
let Pinmux = system . getScript ( "/driverlib/pinmux.js" ) ;
let references = system . getScript ( "/driverlib/PeripheralComponentsReferences.js" ) ;
var staticConfig = [ ]
staticConfig . push (
{
name : "build" ,
displayName : "Driverlib Build" ,
options : [
{ name : "Debug" , displayName : "Debug" } ,
{ name : "Release" , displayName : "Release" }
] ,
default : "Debug"
} ,
{
name : "useStandardCodeStartBranch" ,
displayName : "Use Standard Code Start Branch" ,
default : true
}
)
function modules ( inst )
{
var mods = [ ]
mods = [
{
name : "sysctl" ,
moduleName : "/driverlib/sysctl.js" ,
}
] ;
if ( inst . useStandardCodeStartBranch )
{
mods . push ( {
name : "codestartbranch" ,
moduleName : "/driverlib/codestartbranch.dynamic.js" ,
} )
}
return mods
}
function onValidate ( inst , validation )
{
2023-07-24 12:14:00 +03:00
if ( ( ! Common . isMultiCoreSysConfig ( ) ) && ( Common . isContextCPU2 ( ) ) ) {
validation . logWarning ( "You will not be able to use clocking functions, unless both CPU1 and CPU2 are open in SysConfig" , inst , "useStandardCodeStartBranch" ) ;
}
2023-06-24 09:05:38 +03:00
}
var mod = {
displayName : "Device Support" ,
maxInstances : 1 ,
defaultInstanceName : "myDEVICESUPPORT" ,
description : "Device Support" ,
longDescription : "" ,
moduleStatic : {
config : staticConfig ,
modules : modules ,
2023-07-24 12:14:00 +03:00
validate : onValidate ,
2023-06-24 09:05:38 +03:00
} ,
references : [
//references.getReferencePath("driverlib_h"),
] ,
templates : {
"/driverlib/device/device.c.xdt" : "" ,
"/driverlib/device/device.h.xdt" : "" ,
}
} ;
exports = mod ;