Commit Graph

3259 Commits

Author SHA1 Message Date
Jerzy Kasenberg 077437b3dc Add non standard request handling in class
For some reason bluetooth stack implementations send class requests
to device instead of interface.
To implement HCI interface over USB non device addressed requests
for class need to be handled.
2020-05-28 10:11:37 +02:00
Ha Thach b8783e10a9
Merge pull request #418 from hathach/enhance-usbd-driver-open
Enhance usbd driver open() API
2020-05-28 15:04:15 +07:00
hathach 53b749fd72 check max_len for vendor and hid 2020-05-28 14:44:26 +07:00
hathach fb214f7cf7 rename to drv_len to be consistent 2020-05-28 13:57:49 +07:00
hathach 10cd3f24bf initial transfer failed in open() shouldn't cause the driver open to fail. 2020-05-28 13:48:02 +07:00
hathach c1db36a15c
update vendor open() 2020-05-28 12:19:06 +07:00
hathach bec5b5f9da
update usbtmc open() 2020-05-28 12:13:48 +07:00
hathach 13860e9f94
update net open() 2020-05-28 11:51:25 +07:00
hathach 8f560bf275
update midi open() 2020-05-28 11:41:37 +07:00
hathach 89a3d1f6d1
update hid open() 2020-05-28 11:19:12 +07:00
hathach 7a15d2e0d2
improve msc 2020-05-28 00:56:33 +07:00
hathach 2eeeda1bcf
change signature for dfu runtime 2020-05-28 00:46:32 +07:00
hathach e340404968
changing usbd driver open() return type, add max_len
only done with cdc and msc, push this interim for feedback first
2020-05-27 19:01:59 +07:00
Ha Thach de88294e05
Merge pull request #416 from hathach/fix-nrf-called-within-critical
fix nrf hanged (blocking wait) when called within critical section
2020-05-21 22:36:24 +07:00
hathach ff9994116e fix nrf hanged (blocking wait) when called within critical section 2020-05-21 21:22:12 +07:00
Ha Thach dc5445e2f4
Merge pull request #414 from hathach/add-queue-is-empty
added tud_task_event_ready()
2020-05-20 15:31:09 +07:00
hathach 8b66098335 fix freeRTOS logic 2020-05-20 15:21:11 +07:00
hathach a0fe3a80e7 remove queue lock/unlock per review 2020-05-20 15:09:46 +07:00
hathach d8a15aca77 remove osal_queue_t const qhdl from osal API
since it doesn't make any differences.
2020-05-20 14:38:34 +07:00
hathach 88a455a9b9 added tud_task_event_ready()
to check if there is pending events in the tud task without executing
it. Useful to check before entering low power mode with WFI/WFE
2020-05-20 14:31:45 +07:00
hathach 4e8d414bc6 added osal_queue_empty() API
ported for osal none/freertos/mynewt
2020-05-20 13:38:41 +07:00
Ha Thach 76bf96bcb0
Merge pull request #411 from hathach/fix-cast-align-warning
enable -Wcast-align
2020-05-18 13:21:37 +07:00
hathach 550746097b fix cast-align warning for nuc505 2020-05-18 13:03:41 +07:00
hathach a7db945cff temporariyly suppress cast-align warning for net_device and net example 2020-05-17 15:34:14 +07:00
hathach 1a8ce043ed enable -Wcast-align
suppress vendor sdk driver at board.mk
2020-05-17 14:24:15 +07:00
Ha Thach 17869f0999
Merge pull request #406 from k0d/stm32f746nucleo
Add support for stm32f746nucleo board
2020-05-15 15:54:12 +07:00
Mark Olsson 3c43009278 Add support for stm32f746nucleo board 2020-05-15 10:23:01 +02:00
Ha Thach be9f938bd3
Merge pull request #405 from hathach/follow-pr404
Follow pr404
2020-05-14 16:18:20 +07:00
hathach 27299a5c47 add test for fifo size 2020-05-14 15:39:42 +07:00
hathach b0d49e55de refactor copy to and from fifo 2020-05-14 14:24:55 +07:00
hathach f445274634 add unit test for fifo write_n and read_n 2020-05-14 11:59:51 +07:00
Ha Thach 7a5c0ee802
Merge pull request #404 from HiFiPhile/tusb_fifo
Optimize tusb_fifo transfer speed.
2020-05-14 11:58:00 +07:00
Mengsk 46875a3912 Optimize FIFO for byte transfer.
Signed-off-by: Mengsk <admin@hifiphile.com>
2020-05-13 23:54:23 +02:00
Ha Thach 4e6aa0d81d
Merge pull request #390 from hathach/detect-nrf-softdevice
detect if SD is actually present on the flash using SD magic
2020-05-12 14:35:45 +07:00
Ha Thach 16a3f0a27a
Update bug_report.md 2020-05-09 17:56:12 +07:00
Ha Thach 71e1609ff3
Merge pull request #398 from HiFiPhile/iar
Add IAR EWARM compiler attribute and endian support.
2020-05-08 23:55:43 +07:00
Mengsk f02ad1d0dc Add IAR compiler attribute and endian support. 2020-05-08 13:29:33 +02:00
Ha Thach e6d946123c
Merge pull request #395 from hathach/define-log-printf
add CFG_TUSB_DEBUG_PRINTF() for log retargeting
2020-05-08 14:48:20 +07:00
hathach eeb076454b add CFG_TUSB_DEBUG_PRINTF() for log retargeting 2020-05-08 12:56:32 +07:00
Ha Thach f9f0873b72
Merge pull request #393 from xobs/fix-debug-warning
device: fix build warning when CFG_TUSB_DEBUG >= 2
2020-05-08 12:38:50 +07:00
Sean Cross 63bd8d2e44 device: fix build warning when CFG_TUSB_DEBUG >= 2
The function is defined inside of a function body which generates a
warning.  Circuit Python treats these warnings as errors, and so
refuses to build with debugging enabled:

    ../../lib/tinyusb/src/device/usbd_control.c: In function 'usbd_control_xfer_cb':
    ../../lib/tinyusb/src/device/usbd_control.c:195:19: error: nested extern declaration of 'usbd_driver_print_control_complete_name' [-Werror=nested-externs]
      195 |       extern void usbd_driver_print_control_complete_name(bool (*control_complete) (uint8_t, tusb_control_request_t const *));
          |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors
    make: *** [../../py/mkrules.mk:55:
    build-simmel/lib/tinyusb/src/device/usbd_control.o] Error 1

Move the declaration to the top of the function to silence this warning.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-07 19:03:40 +08:00
Ha Thach 286ff03ffa
Merge pull request #391 from kasjer/kasjer/stm32l476disco-clock-configuration
stm32l476disco clock configuration
2020-05-07 16:19:13 +07:00
Ha Thach 04c20ff74c
Merge pull request #392 from kasjer/kasjer/change-package-type-to-sdk
Change mynewt package type to sdk
2020-05-07 16:13:00 +07:00
Jerzy Kasenberg 0f8ab86bee Change mynewt package type to sdk
For normal mynewt packages newt tool wants to have specific
folder structure. It wants to have src and include directories,
and only include (and arch related) directory is added to compiler
include search list.
Since TinyUSB has different folder structure newt tool will not
add anything to -I directives and those would need to be
specified as pkg.cflags: "-I@tinyusb/src"

Recent change to newt tool allowed to add specific include directories
for external (sdk) packages so just including package will add
necessary -I to build commands.

This commit changes package type to sdk and specifies src as include
root for TinyUSB.

For older newt tool adding sdk and include_dirs does not break build.
2020-05-07 10:11:58 +02:00
Jerzy Kasenberg 615369a6eb stm32l476disco: Fix system clock setup
Code suggested that PLL with MSI is used resulting in 80MHz clock.
When in fact PLL was not configured and system clock was left at MSI 48MHz.

This happens because PLL configuration requires that SysTick interrupt
has interrupt priority level configured correctly.
As it seems ST code intentionally setups variable uwTickPrio to invalid
value and later when it is not setup by user code configuration
of oscillator will fail before PLL is configured.

This simple changes systick priority to some valid value that
allows clock to use PLL.
2020-05-06 15:13:55 +02:00
Jerzy Kasenberg d9e534f6f2 stm32l476disco: fix uninitialized filed usage
Field PLLState was not initialized in RCC_OscInitStruct.PLL in
function SystemClock_Config().
Value is used in HAL_RCC_OscConfig() regardless of oscillator.
In lucky case value would be 0 RCC_PLL_NONE and nothing would
happen.
If value was incorrect following line would end up in assert:
assert_param(IS_RCC_PLL(RCC_OscInitStruct->PLL.PLLState));

If value was valid but no RCC_PLL_NONE pll could be configured
with some other random values.

Setting PLLState to RCC_PLL_NONE eliminates potential problem.
2020-05-06 14:25:46 +02:00
hathach 58b99e59d4 detect if SD is actually present on the flash using SD magic
even with SOFTDEVICE_PRESENT defined, SD may not be present on actual
flash.
2020-05-05 23:07:56 +07:00
Ha Thach 101f234a16
Merge pull request #387 from duempel/redesign_transmit_synopsys
Redesign of Synopsys device transmission
2020-05-04 14:41:20 +07:00
Jan Dümpelmann fd69cc3dcc clean up
renaming function and variables
changing indent size
2020-05-04 07:59:13 +02:00
Ha Thach d1141c2d9d
Merge pull request #389 from hathach/fix-samg
Fix SAMG
2020-05-02 18:47:27 +07:00