Skip to content

Commit

Permalink
ISO updates
Browse files Browse the repository at this point in the history
  • Loading branch information
libusb.win32.support@gmail.com committed Jun 26, 2011
1 parent 63c4c39 commit 81b562f
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 33 deletions.
Binary file modified BmFW/AVR/ASF/Benchmark/Benchmark.avrsuo
Binary file not shown.
25 changes: 1 addition & 24 deletions BmFW/AVR/ASF/Benchmark/Benchmark/Benchmark.avrgccproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,7 @@
<ToolchainDirPath />
<MakeDirPath />
<avrtool>com.atmel.avrdbg.tool.avrdragon</avrtool>
<com_atmel_avrdbg_tool_avrdragon>
<ToolType>com.atmel.avrdbg.tool.avrdragon</ToolType>
<ToolName>AVR Dragon</ToolName>
<ToolNumber>00A2000016A5</ToolNumber>
<Channel>
<host>127.0.0.1</host>
<port>49953</port>
<ssl>False</ssl>
</Channel>
<ToolOptions>
<InterfaceName>JTAG</InterfaceName>
<InterfaceProperties>
<JtagDbgClock>0</JtagDbgClock>
<JtagProgClock>1000000</JtagProgClock>
<IspClock>150000</IspClock>
<JtagInChain>false</JtagInChain>
<JtagEnableExtResetOnStartSession>true</JtagEnableExtResetOnStartSession>
<JtagDevicesBefore>0</JtagDevicesBefore>
<JtagDevicesAfter>0</JtagDevicesAfter>
<JtagInstrBitsBefore>0</JtagInstrBitsBefore>
<JtagInstrBitsAfter>0</JtagInstrBitsAfter>
</InterfaceProperties>
</ToolOptions>
</com_atmel_avrdbg_tool_avrdragon>
<com_atmel_avrdbg_tool_avrdragon>&lt;ToolType&gt;com.atmel.avrdbg.tool.avrdragon&lt;/ToolType&gt;&lt;ToolName&gt;AVR Dragon&lt;/ToolName&gt;&lt;ToolNumber&gt;6&amp;1B0FFA04&amp;0&amp;3&lt;/ToolNumber&gt;&lt;Channel&gt;&lt;host&gt;127.0.0.1&lt;/host&gt;&lt;port&gt;49265&lt;/port&gt;&lt;ssl&gt;False&lt;/ssl&gt;&lt;/Channel&gt;&lt;ToolOptions&gt;&lt;InterfaceName&gt;JTAG&lt;/InterfaceName&gt;&lt;InterfaceProperties&gt;&lt;JtagDbgClock&gt;0&lt;/JtagDbgClock&gt;&lt;JtagProgClock&gt;1000000&lt;/JtagProgClock&gt;&lt;IspClock&gt;150000&lt;/IspClock&gt;&lt;JtagInChain&gt;false&lt;/JtagInChain&gt;&lt;JtagEnableExtResetOnStartSession&gt;false&lt;/JtagEnableExtResetOnStartSession&gt;&lt;JtagDevicesBefore&gt;0&lt;/JtagDevicesBefore&gt;&lt;JtagDevicesAfter&gt;0&lt;/JtagDevicesAfter&gt;&lt;JtagInstrBitsBefore&gt;0&lt;/JtagInstrBitsBefore&gt;&lt;JtagInstrBitsAfter&gt;0&lt;/JtagInstrBitsAfter&gt;&lt;/InterfaceProperties&gt;&lt;/ToolOptions&gt;</com_atmel_avrdbg_tool_avrdragon>
<avrtoolinterface>JTAG</avrtoolinterface>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
Expand Down
25 changes: 25 additions & 0 deletions BmFW/AVR/ASF/Benchmark/Benchmark/src/benchmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,3 +385,28 @@ bool Bm_VendorRequestHandler(void)

return false;
}

void user_callback_sof_action(void)
{
#if (BM_EP_TYPE==EP_TYPE_ISO)
// -ISO
#if defined(USB_DEVICE_HS_SUPPORT)
// High-Speed ISO
// TODO:
#else
// Full-Speed ISO
// TODO:
#endif
#elif (BM_EP_TYPE==EP_TYPE_INT)
#if defined(USB_DEVICE_HS_SUPPORT)
// High-Speed INT
// TODO:
#else
// Full-Speed INT
// TODO:
#endif
#else
// -BULK
/* nothing to do */
#endif
}
19 changes: 14 additions & 5 deletions BmFW/AVR/ASF/Benchmark/Benchmark/src/config/conf_benchmark.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,23 @@
#define BM_EP_INTERVAL 4
#elif (BM_EP_TYPE==EP_TYPE_ISO)
#define BM_EP_ATTRIBUTES BM_EP_TYPE|EP_ISO_SYNC_NS|EP_ISO_USAGE_DE
#define BM_EP_INTERVAL 4
#define BM_EP_INTERVAL 3 /* User Assignable */
#endif

//! Benchmark TX/RX endpoint packet size.
#ifdef USB_DEVICE_HS_SUPPORT
#define BM_EP_MAX_PACKET_SIZE 512
#define BM_EP_MAX_PACKET_SIZE 256 /* User Assignable */
#else
#define BM_EP_MAX_PACKET_SIZE 64 /* User Assignable */
#endif

//! Number of packets per transfer. (should not modify)
#if defined(USB_DEVICE_HS_SUPPORT) && (BM_EP_TYPE==EP_TYPE_ISO)
#define BM_BUFFER_MULTIPLIER (8 >> (BM_EP_INTERVAL-1))
#elif defined(USB_DEVICE_HS_SUPPORT)
#define BM_BUFFER_MULTIPLIER 8
#else
#define BM_EP_MAX_PACKET_SIZE 64
#define BM_BUFFER_MULTIPLIER 4
#endif

//! Number of buffers to use per endpoint. (should not modify)
Expand All @@ -107,8 +116,8 @@
//! Configured endpoint bank size. (should not modify)
#define BM_BANK_SIZE 512

//! Size of each buffer. Must be a multiple of the configured BANK size.
#define BM_BUFFER_SIZE MAKE_INTERVAL_SIZE(BM_EP_MAX_PACKET_SIZE,16,BM_BANK_SIZE)
//! Size of each buffer. Must be a multiple of the configured BANK size. (should not modify)
#define BM_BUFFER_SIZE MAKE_INTERVAL_SIZE(BM_EP_MAX_PACKET_SIZE,BM_BUFFER_MULTIPLIER,BM_BANK_SIZE)

//! Benchmark vendor control request handler.
extern bool Bm_VendorRequestHandler(void);
Expand Down
9 changes: 5 additions & 4 deletions BmFW/AVR/ASF/Benchmark/Benchmark/src/config/conf_usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@
#define USB_DEVICE_PRODUCT_ID 0x2315
#define USB_DEVICE_MAJOR_VERSION 1
#define USB_DEVICE_MINOR_VERSION 0
#define USB_DEVICE_POWER 50 // Consumption on Vbus line (mA)
#define USB_DEVICE_POWER 100 // Consumption on Vbus line (mA)

#define USB_DEVICE_ATTR (USB_CONFIG_ATTR_BUS_POWERED)
#define USB_DEVICE_ATTR (USB_CONFIG_ATTR_SELF_POWERED)
//#define USB_DEVICE_ATTR (USB_CONFIG_ATTR_BUS_POWERED)
//#define USB_DEVICE_ATTR (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_SELF_POWERED)
//#define USB_DEVICE_ATTR (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_BUS_POWERED)
Expand All @@ -68,7 +68,7 @@

//! To authorize the High speed
#if (UC3A3||UC3A4)
// #define USB_DEVICE_HS_SUPPORT
#define USB_DEVICE_HS_SUPPORT
#endif

//! Control endpoint size. (Endpoint 0)
Expand All @@ -81,7 +81,8 @@
extern void user_callback_vbus_event(bool b_high);
#define UDC_VBUS_EVENT(b_vbus_high) user_callback_vbus_event(b_vbus_high)

// #define UDC_SOF_EVENT() user_callback_sof_action()
extern void user_callback_sof_action(void);
#define UDC_SOF_EVENT() user_callback_sof_action()
// #define UDC_SUSPEND_EVENT() user_callback_suspend_action()
// #define UDC_RESUME_EVENT() user_callback_resume_action()

Expand Down

0 comments on commit 81b562f

Please sign in to comment.