diff options
| author | hathach <[email protected]> | 2013-06-05 11:23:41 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-06-05 11:23:41 +0700 |
| commit | f69fefefa96339253d46b9f17833f0d0f1c39014 (patch) | |
| tree | fb4ecd89a95b52ea00d6a9ff1c22e95744517219 /tests | |
| parent | 6fb34f0e7a4ed05a3f0095c6850b4abf88aee229 (diff) | |
added dcd_dma_descriptor_t typdef
reorganize test project, multiple test projects each is specifically for an MCU
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/lpc175x_6x/build/readme.md | 1 | ||||
| -rw-r--r-- | tests/support/FreeRTOSConfig.h (renamed from tests/test/support/FreeRTOSConfig.h) | 0 | ||||
| -rw-r--r-- | tests/support/LPC43xx.h (renamed from tests/test/support/LPC43xx.h) | 0 | ||||
| -rw-r--r-- | tests/support/descriptor_test.c (renamed from tests/test/support/descriptor_test.c) | 0 | ||||
| -rw-r--r-- | tests/support/descriptor_test.h (renamed from tests/test/support/descriptor_test.h) | 0 | ||||
| -rw-r--r-- | tests/support/ehci_controller_fake.c (renamed from tests/test/support/ehci_controller_fake.c) | 0 | ||||
| -rw-r--r-- | tests/support/ehci_controller_fake.h (renamed from tests/test/support/ehci_controller_fake.h) | 0 | ||||
| -rw-r--r-- | tests/support/tusb_callback.h (renamed from tests/test/support/tusb_callback.h) | 0 | ||||
| -rw-r--r-- | tests/support/tusb_config.h (renamed from tests/test/support/tusb_config.h) | 0 | ||||
| -rw-r--r-- | tests/support/type_helper.h (renamed from tests/test/support/type_helper.h) | 20 | ||||
| -rw-r--r-- | tests/test/build/readme.md | 1 | ||||
| -rw-r--r-- | tests/test/project.yml (renamed from tests/project.yml) | 22 | ||||
| -rw-r--r-- | tests/test/rakefile.rb (renamed from tests/rakefile.rb) | 2 | ||||
| -rw-r--r-- | tests/test/test/device/usbd/test_usbd.c (renamed from tests/test/device/usbd/test_usbd.c) | 0 | ||||
| -rw-r--r-- | tests/test/test/host/ehci/test_ehci_init.c (renamed from tests/test/host/ehci/test_ehci_init.c) | 0 | ||||
| -rw-r--r-- | tests/test/test/host/ehci/test_ehci_isr.c (renamed from tests/test/host/ehci/test_ehci_isr.c) | 0 | ||||
| -rw-r--r-- | tests/test/test/host/ehci/test_ehci_structure.c (renamed from tests/test/host/ehci/test_ehci_structure.c) | 21 | ||||
| -rw-r--r-- | tests/test/test/host/ehci/test_ehci_usbh_hcd_integration.c (renamed from tests/test/host/ehci/test_ehci_usbh_hcd_integration.c) | 0 | ||||
| -rw-r--r-- | tests/test/test/host/ehci/test_pipe_bulk_open.c (renamed from tests/test/host/ehci/test_pipe_bulk_open.c) | 0 | ||||
| -rw-r--r-- | tests/test/test/host/ehci/test_pipe_bulk_xfer.c (renamed from tests/test/host/ehci/test_pipe_bulk_xfer.c) | 0 | ||||
| -rw-r--r-- | tests/test/test/host/ehci/test_pipe_control_open.c (renamed from tests/test/host/ehci/test_pipe_control_open.c) | 0 | ||||
| -rw-r--r-- | tests/test/test/host/ehci/test_pipe_control_xfer.c (renamed from tests/test/host/ehci/test_pipe_control_xfer.c) | 0 | ||||
| -rw-r--r-- | tests/test/test/host/ehci/test_pipe_interrupt_open.c (renamed from tests/test/host/ehci/test_pipe_interrupt_open.c) | 0 | ||||
| -rw-r--r-- | tests/test/test/host/ehci/test_pipe_interrupt_xfer.c (renamed from tests/test/host/ehci/test_pipe_interrupt_xfer.c) | 0 | ||||
| -rw-r--r-- | tests/test/test/host/ehci/test_pipe_isochronous_open.c (renamed from tests/test/host/ehci/test_pipe_isochronous_open.c) | 0 | ||||
| -rw-r--r-- | tests/test/test/host/hid/hidh_callback.h (renamed from tests/test/host/hid/hidh_callback.h) | 0 | ||||
| -rw-r--r-- | tests/test/test/host/hid/test_hid_host.c (renamed from tests/test/host/hid/test_hid_host.c) | 0 | ||||
| -rw-r--r-- | tests/test/test/host/hid/test_hidh_keyboard.c (renamed from tests/test/host/hid/test_hidh_keyboard.c) | 0 | ||||
| -rw-r--r-- | tests/test/test/host/hid/test_hidh_mouse.c (renamed from tests/test/host/hid/test_hidh_mouse.c) | 0 | ||||
| -rw-r--r-- | tests/test/test/host/host_helper.h (renamed from tests/test/host/host_helper.h) | 0 | ||||
| -rw-r--r-- | tests/test/test/host/hub/test_hub.c (renamed from tests/test/host/hub/test_hub.c) | 0 | ||||
| -rw-r--r-- | tests/test/test/host/integration/test_hidh_keyboard_integrate.c (renamed from tests/test/host/integration/test_hidh_keyboard_integrate.c) | 0 | ||||
| -rw-r--r-- | tests/test/test/host/msc/test_msc_host.c (renamed from tests/test/host/msc/test_msc_host.c) | 0 | ||||
| -rw-r--r-- | tests/test/test/host/usbh/test_enum_task.c (renamed from tests/test/host/usbh/test_enum_task.c) | 0 | ||||
| -rw-r--r-- | tests/test/test/host/usbh/test_usbh.c (renamed from tests/test/host/usbh/test_usbh.c) | 0 | ||||
| -rw-r--r-- | tests/test/test/test_assertion.c (renamed from tests/test/test_assertion.c) | 0 | ||||
| -rw-r--r-- | tests/test/test/test_binary_const.c (renamed from tests/test/test_binary_const.c) | 0 | ||||
| -rw-r--r-- | tests/test/test/test_fifo.c (renamed from tests/test/test_fifo.c) | 0 | ||||
| -rw-r--r-- | tests/test/test/test_osal_freeRTOS.c (renamed from tests/test/test_osal_freeRTOS.c) | 0 | ||||
| -rw-r--r-- | tests/test/test/test_osal_none.c (renamed from tests/test/test_osal_none.c) | 0 | ||||
| -rw-r--r-- | tests/test/test/test_project_settings.c (renamed from tests/test/test_project_settings.c) | 0 |
41 files changed, 34 insertions, 33 deletions
diff --git a/tests/lpc175x_6x/build/readme.md b/tests/lpc175x_6x/build/readme.md new file mode 100644 index 000000000..f525edb1e --- /dev/null +++ b/tests/lpc175x_6x/build/readme.md @@ -0,0 +1 @@ +just a build folder
\ No newline at end of file diff --git a/tests/test/support/FreeRTOSConfig.h b/tests/support/FreeRTOSConfig.h index 6bc0dcb30..6bc0dcb30 100644 --- a/tests/test/support/FreeRTOSConfig.h +++ b/tests/support/FreeRTOSConfig.h diff --git a/tests/test/support/LPC43xx.h b/tests/support/LPC43xx.h index af96a72eb..af96a72eb 100644 --- a/tests/test/support/LPC43xx.h +++ b/tests/support/LPC43xx.h diff --git a/tests/test/support/descriptor_test.c b/tests/support/descriptor_test.c index a972da03e..a972da03e 100644 --- a/tests/test/support/descriptor_test.c +++ b/tests/support/descriptor_test.c diff --git a/tests/test/support/descriptor_test.h b/tests/support/descriptor_test.h index 39d23e2c1..39d23e2c1 100644 --- a/tests/test/support/descriptor_test.h +++ b/tests/support/descriptor_test.h diff --git a/tests/test/support/ehci_controller_fake.c b/tests/support/ehci_controller_fake.c index d3659e834..d3659e834 100644 --- a/tests/test/support/ehci_controller_fake.c +++ b/tests/support/ehci_controller_fake.c diff --git a/tests/test/support/ehci_controller_fake.h b/tests/support/ehci_controller_fake.h index a71beaf03..a71beaf03 100644 --- a/tests/test/support/ehci_controller_fake.h +++ b/tests/support/ehci_controller_fake.h diff --git a/tests/test/support/tusb_callback.h b/tests/support/tusb_callback.h index 8a0b79845..8a0b79845 100644 --- a/tests/test/support/tusb_callback.h +++ b/tests/support/tusb_callback.h diff --git a/tests/test/support/tusb_config.h b/tests/support/tusb_config.h index 6edd59800..6edd59800 100644 --- a/tests/test/support/tusb_config.h +++ b/tests/support/tusb_config.h diff --git a/tests/test/support/type_helper.h b/tests/support/type_helper.h index f8d5090a0..d0712e4f0 100644 --- a/tests/test/support/type_helper.h +++ b/tests/support/type_helper.h @@ -69,6 +69,26 @@ #define TEST_ASSERT_STATUS( actual )\ TEST_ASSERT_EQUAL( TUSB_ERROR_NONE, (actual) ) + +// log2_of a value is equivalent to its highest set bit's position +#define BITFIELD_OFFSET_OF_MEMBER(struct_type, member, bitfield_member) \ + ({\ + uint32_t value=0;\ + struct_type str;\ + memclr_((void*)&str, sizeof(struct_type));\ + str.member.bitfield_member = 1;\ + memcpy(&value, (void*)&str.member, sizeof(str.member));\ + log2_of( value );\ + }) + +#define BITFIELD_OFFSET_OF_UINT32(struct_type, offset, bitfield_member) \ + ({\ + struct_type str;\ + memclr_(&str, sizeof(struct_type));\ + str.bitfield_member = 1;\ + log2_of( ((uint32_t*) &str)[offset] );\ + }) + #ifdef __cplusplus } #endif diff --git a/tests/test/build/readme.md b/tests/test/build/readme.md new file mode 100644 index 000000000..f525edb1e --- /dev/null +++ b/tests/test/build/readme.md @@ -0,0 +1 @@ +just a build folder
\ No newline at end of file diff --git a/tests/project.yml b/tests/test/project.yml index 135280b98..5cf2c6104 100644 --- a/tests/project.yml +++ b/tests/test/project.yml @@ -26,17 +26,16 @@ :paths: :test: - +:test/** - - -:test/support :source: - - ../tinyusb/** - - +:../demos/bsp/lpc43xx/** - - +:../demos/device/keyboard/* - - -:../demos/ - - ../vendor/freertos/freertos/Source/* - - ../vendor/freertos/freertos/Source/portable/MSVC-MingW/* + - ../../tinyusb/** + - +:../../demos/bsp/lpc43xx/** + - +:../../demos/device/keyboard/* + - -:../../demos/ + - ../../vendor/freertos/freertos/Source/* + - ../../vendor/freertos/freertos/Source/portable/MSVC-MingW/* :support: - - test/support + - ../support :defines: # in order to add common defines: @@ -59,8 +58,8 @@ #:flags: # :test: # :compile: -# :hid_host: -# - -Dstatic= +# :dcd_lpc175x_6x.c: +# - -DMCU=MCU_LPC175X_6X # Ceedling defaults to using gcc for compiling, linking, etc. # As [:tools] is blank, gcc will be used (so long as it's in your system path) @@ -75,7 +74,6 @@ - :callback - :array #:ignore: :args_only -# :unity_helper_path: test/support/type_helper.h :treat_as: uint8: HEX8 uint16: HEX16 @@ -85,7 +83,7 @@ :plugins: :load_paths: - - vendor/ceedling/plugins + - ../vendor/ceedling/plugins :enabled: #- stdout_pretty_tests_report - stdout_ide_tests_report diff --git a/tests/rakefile.rb b/tests/test/rakefile.rb index 563d2e0d3..6b217f931 100644 --- a/tests/rakefile.rb +++ b/tests/test/rakefile.rb @@ -1,4 +1,4 @@ -PROJECT_CEEDLING_ROOT = "vendor/ceedling" +PROJECT_CEEDLING_ROOT = "../vendor/ceedling" load "#{PROJECT_CEEDLING_ROOT}/lib/rakefile.rb" task :default => %w[ test:all release ] diff --git a/tests/test/device/usbd/test_usbd.c b/tests/test/test/device/usbd/test_usbd.c index 5e2282344..5e2282344 100644 --- a/tests/test/device/usbd/test_usbd.c +++ b/tests/test/test/device/usbd/test_usbd.c diff --git a/tests/test/host/ehci/test_ehci_init.c b/tests/test/test/host/ehci/test_ehci_init.c index 86103d841..86103d841 100644 --- a/tests/test/host/ehci/test_ehci_init.c +++ b/tests/test/test/host/ehci/test_ehci_init.c diff --git a/tests/test/host/ehci/test_ehci_isr.c b/tests/test/test/host/ehci/test_ehci_isr.c index 4f5f040c4..4f5f040c4 100644 --- a/tests/test/host/ehci/test_ehci_isr.c +++ b/tests/test/test/host/ehci/test_ehci_isr.c diff --git a/tests/test/host/ehci/test_ehci_structure.c b/tests/test/test/host/ehci/test_ehci_structure.c index 8298f102a..3ca2f3e45 100644 --- a/tests/test/host/ehci/test_ehci_structure.c +++ b/tests/test/test/host/ehci/test_ehci_structure.c @@ -41,6 +41,7 @@ #include "tusb_option.h" #include "errors.h" #include "binary.h" +#include "type_helper.h" #include "hal.h" #include "hcd.h" @@ -55,26 +56,6 @@ usbh_device_info_t usbh_devices[TUSB_CFG_HOST_DEVICE_MAX+1]; //--------------------------------------------------------------------+ // Setup/Teardown + helper declare //--------------------------------------------------------------------+ - -// log2_of a value is equivalent to its highest set bit's position -#define BITFIELD_OFFSET_OF_MEMBER(struct_type, member, bitfield_member) \ - ({\ - uint32_t value=0;\ - struct_type str;\ - memclr_((void*)&str, sizeof(struct_type));\ - str.member.bitfield_member = 1;\ - memcpy(&value, (void*)&str.member, sizeof(str.member));\ - log2_of( value );\ - }) - -#define BITFIELD_OFFSET_OF_UINT32(struct_type, offset, bitfield_member) \ - ({\ - struct_type str;\ - memclr_(&str, sizeof(struct_type));\ - str.bitfield_member = 1;\ - log2_of( ((uint32_t*) &str)[offset] );\ - }) - void setUp(void) { diff --git a/tests/test/host/ehci/test_ehci_usbh_hcd_integration.c b/tests/test/test/host/ehci/test_ehci_usbh_hcd_integration.c index cf5669487..cf5669487 100644 --- a/tests/test/host/ehci/test_ehci_usbh_hcd_integration.c +++ b/tests/test/test/host/ehci/test_ehci_usbh_hcd_integration.c diff --git a/tests/test/host/ehci/test_pipe_bulk_open.c b/tests/test/test/host/ehci/test_pipe_bulk_open.c index 4ddc519aa..4ddc519aa 100644 --- a/tests/test/host/ehci/test_pipe_bulk_open.c +++ b/tests/test/test/host/ehci/test_pipe_bulk_open.c diff --git a/tests/test/host/ehci/test_pipe_bulk_xfer.c b/tests/test/test/host/ehci/test_pipe_bulk_xfer.c index ccf30d724..ccf30d724 100644 --- a/tests/test/host/ehci/test_pipe_bulk_xfer.c +++ b/tests/test/test/host/ehci/test_pipe_bulk_xfer.c diff --git a/tests/test/host/ehci/test_pipe_control_open.c b/tests/test/test/host/ehci/test_pipe_control_open.c index 7cfdec4bb..7cfdec4bb 100644 --- a/tests/test/host/ehci/test_pipe_control_open.c +++ b/tests/test/test/host/ehci/test_pipe_control_open.c diff --git a/tests/test/host/ehci/test_pipe_control_xfer.c b/tests/test/test/host/ehci/test_pipe_control_xfer.c index 266cf0ef2..266cf0ef2 100644 --- a/tests/test/host/ehci/test_pipe_control_xfer.c +++ b/tests/test/test/host/ehci/test_pipe_control_xfer.c diff --git a/tests/test/host/ehci/test_pipe_interrupt_open.c b/tests/test/test/host/ehci/test_pipe_interrupt_open.c index 946d8f0c8..946d8f0c8 100644 --- a/tests/test/host/ehci/test_pipe_interrupt_open.c +++ b/tests/test/test/host/ehci/test_pipe_interrupt_open.c diff --git a/tests/test/host/ehci/test_pipe_interrupt_xfer.c b/tests/test/test/host/ehci/test_pipe_interrupt_xfer.c index f72b5d3ae..f72b5d3ae 100644 --- a/tests/test/host/ehci/test_pipe_interrupt_xfer.c +++ b/tests/test/test/host/ehci/test_pipe_interrupt_xfer.c diff --git a/tests/test/host/ehci/test_pipe_isochronous_open.c b/tests/test/test/host/ehci/test_pipe_isochronous_open.c index b2ebbf944..b2ebbf944 100644 --- a/tests/test/host/ehci/test_pipe_isochronous_open.c +++ b/tests/test/test/host/ehci/test_pipe_isochronous_open.c diff --git a/tests/test/host/hid/hidh_callback.h b/tests/test/test/host/hid/hidh_callback.h index 0a0d7ddef..0a0d7ddef 100644 --- a/tests/test/host/hid/hidh_callback.h +++ b/tests/test/test/host/hid/hidh_callback.h diff --git a/tests/test/host/hid/test_hid_host.c b/tests/test/test/host/hid/test_hid_host.c index 19111840e..19111840e 100644 --- a/tests/test/host/hid/test_hid_host.c +++ b/tests/test/test/host/hid/test_hid_host.c diff --git a/tests/test/host/hid/test_hidh_keyboard.c b/tests/test/test/host/hid/test_hidh_keyboard.c index a92040639..a92040639 100644 --- a/tests/test/host/hid/test_hidh_keyboard.c +++ b/tests/test/test/host/hid/test_hidh_keyboard.c diff --git a/tests/test/host/hid/test_hidh_mouse.c b/tests/test/test/host/hid/test_hidh_mouse.c index 27d32212c..27d32212c 100644 --- a/tests/test/host/hid/test_hidh_mouse.c +++ b/tests/test/test/host/hid/test_hidh_mouse.c diff --git a/tests/test/host/host_helper.h b/tests/test/test/host/host_helper.h index f4fdf62d4..f4fdf62d4 100644 --- a/tests/test/host/host_helper.h +++ b/tests/test/test/host/host_helper.h diff --git a/tests/test/host/hub/test_hub.c b/tests/test/test/host/hub/test_hub.c index 5aef5dccc..5aef5dccc 100644 --- a/tests/test/host/hub/test_hub.c +++ b/tests/test/test/host/hub/test_hub.c diff --git a/tests/test/host/integration/test_hidh_keyboard_integrate.c b/tests/test/test/host/integration/test_hidh_keyboard_integrate.c index a9fec44a1..a9fec44a1 100644 --- a/tests/test/host/integration/test_hidh_keyboard_integrate.c +++ b/tests/test/test/host/integration/test_hidh_keyboard_integrate.c diff --git a/tests/test/host/msc/test_msc_host.c b/tests/test/test/host/msc/test_msc_host.c index 4e42b3023..4e42b3023 100644 --- a/tests/test/host/msc/test_msc_host.c +++ b/tests/test/test/host/msc/test_msc_host.c diff --git a/tests/test/host/usbh/test_enum_task.c b/tests/test/test/host/usbh/test_enum_task.c index 3d0f9f193..3d0f9f193 100644 --- a/tests/test/host/usbh/test_enum_task.c +++ b/tests/test/test/host/usbh/test_enum_task.c diff --git a/tests/test/host/usbh/test_usbh.c b/tests/test/test/host/usbh/test_usbh.c index b72fd2966..b72fd2966 100644 --- a/tests/test/host/usbh/test_usbh.c +++ b/tests/test/test/host/usbh/test_usbh.c diff --git a/tests/test/test_assertion.c b/tests/test/test/test_assertion.c index c0e2b3b7f..c0e2b3b7f 100644 --- a/tests/test/test_assertion.c +++ b/tests/test/test/test_assertion.c diff --git a/tests/test/test_binary_const.c b/tests/test/test/test_binary_const.c index 5d69c994f..5d69c994f 100644 --- a/tests/test/test_binary_const.c +++ b/tests/test/test/test_binary_const.c diff --git a/tests/test/test_fifo.c b/tests/test/test/test_fifo.c index f9ae2c59f..f9ae2c59f 100644 --- a/tests/test/test_fifo.c +++ b/tests/test/test/test_fifo.c diff --git a/tests/test/test_osal_freeRTOS.c b/tests/test/test/test_osal_freeRTOS.c index b22797e55..b22797e55 100644 --- a/tests/test/test_osal_freeRTOS.c +++ b/tests/test/test/test_osal_freeRTOS.c diff --git a/tests/test/test_osal_none.c b/tests/test/test/test_osal_none.c index 814a8602c..814a8602c 100644 --- a/tests/test/test_osal_none.c +++ b/tests/test/test/test_osal_none.c diff --git a/tests/test/test_project_settings.c b/tests/test/test/test_project_settings.c index f020476b9..f020476b9 100644 --- a/tests/test/test_project_settings.c +++ b/tests/test/test/test_project_settings.c |
