📄 usb_new_pck_configuration.vhdl
字号:
Result(0)(0).CorrespondingEP := 1;
Result(0)(0).N_Buffers := 1;
-- Endpoint 1
Result(0)(1).EndpointType := CONTROL;
Result(0)(1).USBDirection := DIR_IN;
Result(0)(1).HasCorrespondingEP:= TRUE;
Result(0)(1).CorrespondingEP := 0;
Result(0)(1).N_Buffers := 1;
-- Endpoint 2
Result(0)(2).EndpointType := BULK_OR_INTERRUPT;
Result(0)(2).USBDirection := DIR_OUT;
Result(0)(2).HasCorrespondingEP:= TRUE;
Result(0)(2).CorrespondingEP := 3;
Result(0)(2).N_Buffers := 1;
-- Endpoint 3
Result(0)(3).EndpointType := BULK_OR_INTERRUPT;
Result(0)(3).USBDirection := DIR_IN;
Result(0)(3).HasCorrespondingEP:= TRUE;
Result(0)(3).CorrespondingEP := 2;
Result(0)(3).N_Buffers := 1;
-- Endpoint 4
Result(0)(4).EndpointType := BULK_OR_INTERRUPT;
Result(0)(4).USBDirection := DIR_OUT;
Result(0)(4).HasCorrespondingEP:= TRUE;
Result(0)(4).CorrespondingEP := 5;
Result(0)(4).N_Buffers := 2; -- changed by fma 99/07/28: only one buffer
-- Endpoint 5
Result(0)(5).EndpointType := BULK_OR_INTERRUPT;
Result(0)(5).USBDirection := DIR_IN;
Result(0)(5).HasCorrespondingEP:= TRUE;
Result(0)(5).CorrespondingEP := 4;
Result(0)(5).N_Buffers := 2; -- changed by fma 99/07/28: only one buffer
-- Endpoint 6
Result(0)(6).EndpointType := BULK_OR_INTERRUPT;
Result(0)(6).USBDirection := DIR_OUT;
Result(0)(6).HasCorrespondingEP:= TRUE;
Result(0)(6).CorrespondingEP := 7;
Result(0)(6).N_Buffers := 2;
-- Endpoint 7
Result(0)(7).EndpointType := BULK_OR_INTERRUPT;
Result(0)(7).USBDirection := DIR_IN;
Result(0)(7).HasCorrespondingEP:= TRUE;
Result(0)(7).CorrespondingEP := 6;
Result(0)(7).N_Buffers := 2;
-- Endpoint 8
Result(0)(8).EndpointType := ISOCHRONOUS;
Result(0)(8).USBDirection := DIR_OUT;
Result(0)(8).HasCorrespondingEP:= TRUE;
Result(0)(8).CorrespondingEP := 9;
Result(0)(8).N_Buffers := 2;
-- Endpoint 9
Result(0)(9).EndpointType := ISOCHRONOUS;
Result(0)(9).USBDirection := DIR_IN;
Result(0)(9).HasCorrespondingEP:= TRUE;
Result(0)(9).CorrespondingEP := 8;
Result(0)(9).N_Buffers := 2;
-- Configuration 1
-- changed by fma 99/07/13: only one configuration
-- Endpoint 0
-- Result(1)(0).EndpointType := CONTROL;
-- Result(1)(0).USBDirection := DIR_OUT;
-- Result(1)(0).HasCorrespondingEP:= TRUE;
-- Result(1)(0).CorrespondingEP := 1;
-- Result(1)(0).N_Buffers := 1;
-- Endpoint 1
-- Result(1)(1).EndpointType := CONTROL;
-- Result(1)(1).USBDirection := DIR_IN;
-- Result(1)(1).HasCorrespondingEP:= TRUE;
-- Result(1)(1).CorrespondingEP := 0;
-- Result(1)(1).N_Buffers := 1;
-- Endpoint 2
-- Result(1)(2).EndpointType := BULK_OR_INTERRUPT;
-- Result(1)(2).USBDirection := DIR_OUT;
-- Result(1)(2).HasCorrespondingEP:= TRUE;
-- Result(1)(2).CorrespondingEP := 3;
-- Result(1)(2).N_Buffers := 1;
-- Endpoint 3
-- Result(1)(3).EndpointType := BULK_OR_INTERRUPT;
-- Result(1)(3).USBDirection := DIR_IN;
-- Result(1)(3).HasCorrespondingEP:= TRUE;
-- Result(1)(3).CorrespondingEP := 2;
-- Result(1)(3).N_Buffers := 1;
-- Endpoint 4
-- Result(1)(4).EndpointType := BULK_OR_INTERRUPT;
-- Result(1)(4).USBDirection := DIR_OUT;
-- Result(1)(4).HasCorrespondingEP:= TRUE;
-- Result(1)(4).CorrespondingEP := 5;
-- Result(1)(4).N_Buffers := 2;
-- Endpoint 5
-- Result(1)(5).EndpointType := BULK_OR_INTERRUPT;
-- Result(1)(5).USBDirection := DIR_IN;
-- Result(1)(5).HasCorrespondingEP:= TRUE;
-- Result(1)(5).CorrespondingEP := 4;
-- Result(1)(5).N_Buffers := 2;
-- Endpoint 6
-- Result(1)(6).EndpointType := ISOCHRONOUS;
-- Result(1)(6).USBDirection := DIR_OUT;
-- Result(1)(6).HasCorrespondingEP:= TRUE;
-- Result(1)(6).CorrespondingEP := 7;-
-- Result(1)(6).N_Buffers := 2;
-- Endpoint 7
-- Result(1)(7).EndpointType := ISOCHRONOUS;
-- Result(1)(7).USBDirection := DIR_IN;
-- Result(1)(7).HasCorrespondingEP:= TRUE;
-- Result(1)(7).CorrespondingEP := 6;
-- Result(1)(7).N_Buffers := 2;
return Result;
end;
-- function UC_HANDLER_RAMinfo return T_UC_HANDLER_RAMInfo is
-- variable Result: T_UC_HANDLER_RAMInfo;
-- begin
--
-- -- Configuration 0
--
-- -- Endpoint 0
-- Result(0)(0).BufferSize := 8;
-- Result(0)(0).BufferStart := 0;
--
-- -- Endpoint 1
-- Result(0)(1).BufferSize := 8;
-- Result(0)(1).BufferStart := 10;
--
-- -- Endpoint 2
-- Result(0)(2).BufferSize := 8;
-- Result(0)(2).BufferStart := 20;
--
-- -- Endpoint 3
-- Result(0)(3).BufferSize := 8;
-- Result(0)(3).BufferStart := 30;
--
-- -- Endpoint 4
-- Result(0)(4).BufferSize := 8;
-- Result(0)(4).BufferStart := 40;
--
-- -- Endpoint 5
-- Result(0)(5).BufferSize := 8;
-- Result(0)(5).BufferStart := 60;
--
-- -- Endpoint 6
-- Result(0)(6).BufferSize := 64;
-- Result(0)(6).BufferStart := 80;
--
-- -- Endpoint 7
-- Result(0)(7).BufferSize := 64;
-- Result(0)(7).BufferStart := 212;
--
-- -- Endpoint 8
-- Result(0)(8).BufferSize := 128;
-- Result(0)(8).BufferStart := 344;
--
-- -- Endpoint 9
-- Result(0)(9).BufferSize := 128;
-- Result(0)(9).BufferStart := 604;
--
-- -- Configuration 1
--
-- -- Endpoint 0
-- Result(1)(0).BufferSize := 8;
-- Result(1)(0).BufferStart := 0;
--
-- -- Endpoint 1
-- Result(1)(1).BufferSize := 8;
-- Result(1)(1).BufferStart := 10;
--
-- -- Endpoint 2
-- Result(1)(2).BufferSize := 8;
-- Result(1)(2).BufferStart := 20;
--
-- -- Endpoint 3
-- Result(1)(3).BufferSize := 8;
-- Result(1)(3).BufferStart := 30;
--
-- -- Endpoint 4
-- Result(1)(4).BufferSize := 8;
-- Result(1)(4).BufferStart := 40;
--
-- -- Endpoint 5
-- Result(1)(5).BufferSize := 8;
-- Result(1)(5).BufferStart := 60;
--
-- -- Endpoint 6
-- Result(1)(6).BufferSize := 196;
-- Result(1)(6).BufferStart := 80;
--
-- -- Endpoint 7
-- Result(1)(7).BufferSize := 196;
-- Result(1)(7).BufferStart := 476;
-- return Result;
-- end;
-- Functions for DEVICE_HANDLER (ID = 1) --
function RemoteWakeUpEnable(Config: S_ConfigArray)
return boolean is
begin
return FALSE;
end RemoteWakeUpEnable;
function NumberOfEmbeddedPorts(Config: S_ConfigArray)
return integer is
begin
return 1;
end NumberOfEmbeddedPorts;
function GangModeOvercurrent(Config: S_ConfigArray)
return boolean is
begin
return TRUE;
end GangModeOvercurrent;
function GetDeviceSpeed(Config: S_ConfigArray)
return T_UsbSpeed_enum is
begin
return USB_FULL_SPEED;
end GetDeviceSpeed;
function EdgeInterrupt(Config: S_ConfigArray)
return boolean is
begin
return FALSE;
end EdgeInterrupt;
function NoBlinkingLEDs(Config: S_ConfigArray)
return boolean is
begin
return TRUE;
end NoBlinkingLEDs;
function InterruptOnNAK(Config: S_ConfigArray)
return boolean is
begin
return Config(1);
end InterruptOnNAK;
function AlwaysPLLClock(Config: S_ConfigArray)
return boolean is
begin
return Config(0);
end AlwaysPLLClock;
function GetConfiguration(Config: S_ConfigArray)
return S_ConfigurationRange is
begin
if Equal(Config, (X,X,X,X,X,X,X,X,T)) then
return 0;--1; changed by fma 99/07/15 Only one configuration always return 0.
else
return 0;
end if;
end GetConfiguration;
function AllowConnect(Config: S_ConfigArray)
return boolean is
begin
return FALSE;
end AllowConnect;
function NoLazyClock(Config: S_ConfigArray)
return boolean is
begin
return FALSE;
end NoLazyClock;
function NumberOfDownstreamPorts(Config: S_ConfigArray)
return integer is
begin
return 1;
end NumberOfDownstreamPorts;
function ClockDiv(Config: S_ConfigArray)
return integer is
begin
return 0;
end ClockDiv;
function GangModePower(Config: S_ConfigArray)
return boolean is
begin
return TRUE;
end GangModePower;
function InterruptMask(Endpoint: S_PhysEndpointRange;
ConfigArray: S_ConfigArray) return boolean is
begin
return TRUE;
end InterruptMask;
end PCK_CONFIGURATION;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -