added dcd_dma_descriptor_t typdef
reorganize test project, multiple test projects each is specifically for an MCU
This commit is contained in:
@@ -0,0 +1 @@
|
||||
just a build folder
|
||||
@@ -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
|
||||
@@ -0,0 +1 @@
|
||||
just a build folder
|
||||
@@ -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
|
||||
@@ -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 ]
|
||||
+1
-20
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user