c2000ware-core-sdk/driverlib/.meta/usb/usb.board.c.xdt
2023-12-13 16:46:16 +05:30

27 lines
800 B
Plaintext

% var module = system.modules['/driverlib/usb.js'];
% let Common = system.getScript("/driverlib/Common.js");
% var nameOfModule = "usb";
% var nameOfPeripheral = module.peripheralName;
//*****************************************************************************
//
// USB Configurations
//
//*****************************************************************************
void `nameOfPeripheral`_init(){
%if (module != null)
%{
% if((["F28P65x", "F2838x"].includes(Common.getDeviceName()))){
//
// Set the clocking to run from the PLL at 60MHz
//
SysCtl_setAuxClock(DEVICE_AUXSETCLOCK_CFG_USB);
%}
% if((["F28P55x"].includes(Common.getDeviceName()))){
//
// Set the clocking to run from the PLL at 50MHz
//
SysCtl_setUSBClockDivider(SYSCTL_USBCLK_DIV_6);
%}
%}
}