Compare commits

...

1148 commits

Author SHA1 Message Date
Jeff Epler
b2ef8cdd42 dcd_samd: Provide implementation for OPT_MCU_SAME5X 2020-06-25 18:51:04 -05:00
Ha Thach
d489581deb
Merge pull request #441 from hathach/add-same5x
added OPT_MCU_SAME5X option
2020-06-26 01:31:39 +07:00
hathach
504b152f88 update readme 2020-06-26 01:30:33 +07:00
Ha Thach
d5bfb70b72
Merge pull request #442 from czeslawmakarski/pr/update-nrfx-to-nrfx-2.2.0
Update NRFX to v2.2.0
2020-06-25 13:45:27 +07:00
Czeslaw Makarski
7c94176b4b Update NRFX to v2.2.0 2020-06-24 15:07:28 +02:00
hathach
d4d6e06c1d added OPT_MCU_SAME5X option 2020-06-24 00:53:17 +07:00
Ha Thach
1cb53dd23e
Merge pull request #438 from UweBonnes/debug
examples/readme.md: Add hint to build for debug
2020-06-22 11:11:00 +07:00
Uwe Bonnes
d96fa8d407 examples/readme.md: Add hint to build for debug. 2020-06-21 14:33:47 +02:00
Ha Thach
bd41504f65
Merge pull request #433 from HiFiPhile/sof
Disable SOF in dcd_stm32_fsdev
2020-06-20 17:33:58 +07:00
Mengsk
9ffb9b69a4 Disable SOF in dcd_stm32_fsdev
Signed-off-by: Mengsk <admin@hifiphile.com>
2020-06-18 14:18:00 +02:00
Ha Thach
2b27eed01a
Merge pull request #431 from HiFiPhile/unaligned
Fix IAR compiler warnings.
2020-06-17 17:24:40 +07:00
Mengsk
57b553e023 Fix IAR warnings.
Pa039 : use of address of unaligned structure member.
Pe188: enumerated type mixed with another type.
2020-06-17 10:08:33 +02:00
Ha Thach
8a67f81397
Merge pull request #430 from PanRe/fix-too-strict-iad-checks
Fix too strict checks on subclass and protocol entries of iad descriptor.
2020-06-14 19:31:32 +07:00
Reinhard Panhuber
bc7e24b659 Fix wrong comment for IAD checks. 2020-06-14 14:22:10 +02:00
Reinhard Panhuber
b25bbf4776 Fix alignment. 2020-06-14 12:58:16 +02:00
Reinhard Panhuber
3012175351 Fix alignment. 2020-06-14 12:57:00 +02:00
Reinhard Panhuber
48b2e6cf78 Fix too strict checks on subclass and interface of iad descriptor. 2020-06-13 13:51:50 +02:00
Ha Thach
d9496256cf
Update feature_request.md 2020-06-01 15:17:45 +07:00
Ha Thach
5a1c86d948
Update bug_report.md 2020-06-01 15:17:05 +07:00
Ha Thach
5efeaf2ac1
Merge pull request #413 from kasjer/kasjer/ble-over-usb
Bluetooth HCI transport over USB
2020-05-31 15:07:56 +07:00
Ha Thach
7258355e8e
Merge pull request #424 from hathach/fix-idf-usb-pin-init
fix idf usb pin init changes
2020-05-29 14:07:37 +07:00
hathach
e0490ae786 fix idf usb pin init changes 2020-05-29 13:06:33 +07:00
Ha Thach
e9b41cb97d
Merge pull request #421 from hathach/add-qualifier-descriptor
add get device qualifier descriptor
2020-05-28 23:34:42 +07:00
hathach
d6d29897f3 add get device qualifier descriptor 2020-05-28 23:16:16 +07:00
Jerzy Kasenberg
56d46483e4 Add bt hci device class
Code implements USB transport for bluetooth HCI.
2020-05-28 10:58:49 +02:00
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
hathach
e61bf415fe minor update net example
samg failed to run net example
2020-05-02 18:35:46 +07:00
hathach
0e30afa691 abstract all UDP_CSR 2020-05-02 18:24:23 +07:00
hathach
3ad0cd041b clean up 2020-05-02 16:29:22 +07:00
hathach
ac3c645dc1 fix EP0 data toggle issue 2020-05-02 16:09:28 +07:00
hathach
2a479175ae remove toggle walkaround, fix control stall race condition 2020-05-02 14:51:21 +07:00
Ha Thach
520df6bb53
Merge pull request #388 from hathach/fix-samd-setup-race
fix dcd samd race condition with setup packet
2020-04-30 00:50:21 +07:00
hathach
a74a823b0a fix dcd samd race condition with setup packet
setup packet can complete together with previous status (in & out).
Always make sure to prepare valid buffer for holding setup packet when
queuing control status.
2020-04-30 00:29:47 +07:00
Jan Dümpelmann
59ff208c65 Changed switch into if statements 2020-04-29 12:37:29 +02:00
Jan Dümpelmann
3e6feb7f6d Redesign of Synopsys device transmission
Changes:
  - checking if tx buffer empty interrupt is masked
  - process more than one packet in isr
  - mask tx buffer empty just after all bytes were written
  - use of transmit_fifo_packet instead of transmit_packet
2020-04-29 11:32:22 +02:00
Ha Thach
e9c71055ac
Merge pull request #386 from hathach/follow-383
Follow 383
2020-04-29 15:27:25 +07:00
hathach
449b337467 fix ci board test with esp32 2020-04-29 13:03:39 +07:00
hathach
6f4b6a1d03 remove the use of TU_VERIFY_HDLR 2020-04-29 11:31:27 +07:00
hathach
94fed7db0e fix esp32 ci adding FREERTOS STATIC to sdkconfig default 2020-04-29 11:31:04 +07:00
Ha Thach
d4511186a2
Merge pull request #383 from kasjer/kasjer/fox-busy-flag-race-condition
Fix endpoint busy flag race condition
2020-04-29 10:12:31 +07:00
Ha Thach
b52bc894f8
Merge pull request #380 from hathach/fix-usbnet-synopsys
synopsys turn off TX FIFO Empty for EPIN if all bytes are written
2020-04-28 11:12:58 +07:00
hathach
fcdb22b2f9 fix typo 2020-04-28 10:53:43 +07:00
Jerzy Kasenberg
63cefb7615 Fix endpoint busy flag race condition
Busy flag was set to true after call to dcd_edpt_xfer().
In some cased it was possible that transfer finished before function
ended.
In this case busy flag could be set to false before it was set to
true.
Then setting it to true after dcd_edpt_xfer() made edpoint busy forever.

This change marks endpoint as busy before transfer is started to
avoid race condition.
2020-04-27 16:42:35 +02:00
hathach
958b5510cb added comment for hw clearing TXFE 2020-04-27 13:17:47 +07:00
hathach
e785b09118 TXFE is read only bit 2020-04-27 12:06:14 +07:00
hathach
d0487088ac revert a change to net driver 2020-04-26 23:04:17 +07:00
hathach
00fcf829a1 sync synopsis fix for esp32s2 2020-04-26 22:41:04 +07:00
hathach
8d18d6077b turn off TX FIFO Empty for EPIN if all bytes are written
fix dcd synopsys issue with usbnet #289
2020-04-26 22:14:59 +07:00
hathach
83353dd93f add TODO for usbnet clean up 2020-04-26 22:03:05 +07:00
hathach
a1c599f4b6 clean up log message 2020-04-26 22:02:49 +07:00
Ha Thach
d54343e4a6
Merge pull request #379 from hathach/add-usbd-edpt-open
add usbd edpt open
2020-04-26 15:23:11 +07:00
hathach
9c8517a8d2 fix missing debug log macros 2020-04-26 14:58:23 +07:00
hathach
017c95037f add usbd edpt open
- RTT mode is blocking to prevent log lost
- Improve logging message
2020-04-26 14:51:44 +07:00
Ha Thach
f1ecda392f
Merge pull request #378 from kasjer/kasjer/synopsys-txfe-interrup-loop
synopsys: Reduce interrupt time for IN ZLP
2020-04-25 17:52:46 +07:00
Jerzy Kasenberg
b949ae596f synopsys: Reduce interrupt time for IN ZLP
For IN endpoints output FIFO is filled in interrupt, therefor before
endpoint is enabled, DIEPTSIZ is set with correct size of packet.
Then endpoint is enabled and FIFO empty interrupt is enabled.

This works fine except for the ZLP. Enabling FIFO empty interrupt
results in interrupt handler being called all the time because
there is nothing to put in the FIFO.
Eventually it ends when IN token is received and empty
packed is transmitted out.

This change does not enable FIFO empty interrupt for ZLP reducing
CPU load.
2020-04-24 17:38:30 +02:00
hathach
c59fa77427 Revert "Merge pull request #359 from versioduo/midi-flow-control"
This reverts commit 1d33aa9b6f, reversing
changes made to 718db7e536.
2020-04-23 23:25:20 +07:00
Ha Thach
f8bb4c86ef
Merge pull request #376 from hathach/add-more-example
Add dynamic configuration example
2020-04-23 14:50:27 +07:00
hathach
a029c63b30 complete the midi output for dynamic configuration 2020-04-23 14:37:22 +07:00
Ha Thach
c39dc03331
Merge pull request #374 from duempel/stm32f1_synopsys_support
Added support for STM32F1 Connectivity Line MCU
2020-04-23 13:38:48 +07:00
hathach
1fab82c94a
add PR template 2020-04-23 13:34:43 +07:00
hathach
10e035241f
house keeping 2020-04-22 23:04:21 +07:00
Jan Dümpelmann
551724498a Added support for STM32F1 Connectivity Line MCU
STM32F105 and STM32F107 are using the Synopsys IP
2020-04-22 17:39:53 +02:00
hathach
7acdcc2ebc Merge branch 'master' into add-more-example 2020-04-22 19:50:23 +07:00
Ha Thach
e2cd5159fd
Merge pull request #373 from hathach/add-log-swo
added swo as logger
2020-04-22 19:47:16 +07:00
hathach
5110ca712d
clean up 2020-04-22 19:19:17 +07:00
hathach
1fc7f54a8a
added swo as logger
tested with feather nrf52840 + jlink
2020-04-22 19:18:03 +07:00
Ha Thach
894a09f2ae
Merge pull request #372 from hathach/add-rtt
Add rtt as logger option
2020-04-22 17:40:14 +07:00
hathach
7784b9c48f
more rtt software 2020-04-22 17:13:52 +07:00
hathach
afc4042375 add LOGGER option to use rtt
update example readme for debug log. Update bug template to ask for LOG
as well.
2020-04-22 17:08:41 +07:00
hathach
3aa3c35986 Merge branch 'master' into add-rtt 2020-04-22 13:45:20 +07:00
Ha Thach
e23206821f
Merge pull request #370 from hathach/remove-cmsis5
remove cmsis 5 from submodules
2020-04-22 13:44:09 +07:00
hathach
4c2d93eec9 remove cmsis 5 from submodules
cmsis 5 use git lfs causing issue with submodule cloning and isn't used
yet. Could re-add later if needed.
2020-04-22 13:34:04 +07:00
Ha Thach
379b8ac556
Merge pull request #365 from pigrew/desc_tu_verify
tu_verify for getting descriptors
2020-04-22 12:24:05 +07:00
hathach
3b83813f01 clean up 2020-04-22 00:29:51 +07:00
hathach
de43df2d97 Merge branch 'master' into add-rtt 2020-04-22 00:24:37 +07:00
Ha Thach
1d33aa9b6f
Merge pull request #359 from versioduo/midi-flow-control
MIDI - Add flow control to incoming packet stream
2020-04-22 00:11:27 +07:00
hathach
ee2b6e0f47 added segger rtt bundle with v670e
opt out the example folder
2020-04-21 23:20:01 +07:00
hathach
5b02deac93 remove old rtt 2020-04-21 23:17:27 +07:00
Nathan Conrad
0ec69de77c sof is optional, revert other changes but remove unneeded check. 2020-04-21 10:06:17 -04:00
Nathan Conrad
d1656c0b8d tu_verify for getting descriptors 2020-04-20 16:09:15 -04:00
Ha Thach
718db7e536
Merge pull request #364 from hathach/add-midi-multi-jack
add back MIDI multiple jack
2020-04-21 00:14:50 +07:00
hathach
bbcf9241bd add back MIDI multiple jack 2020-04-20 23:46:17 +07:00
Ha Thach
bb6c3b1c39
Merge pull request #363 from hathach/improve-hid-descriptor-template
add extra comma to HID_REPORT_ID
2020-04-20 16:32:21 +07:00
hathach
7a24a27d81 update freerots hid composite
clean up unused descriptor for usbtmc example
2020-04-20 16:20:18 +07:00
hathach
d57312602d add extra comma to HID_REPORT_ID
this make the template with Report ID look less weird to the user
2020-04-20 16:09:17 +07:00
hathach
19181ea11d start adding dynamic configuration example 2020-04-20 01:01:33 +07:00
hathach
e4570c35f7 add uart for ea4357 2020-04-20 00:27:35 +07:00
Kay Sievers
a0598ef369 MIDI - Add flow control to incoming packet stream
Larger SysEx transfers get corrupted by incoming packets.

This changes the FIFOs not to overwrite their data. MIDI should not be
a transport that drops packets. A potentially blocking device is easier
to detect and handle than a device that silently corrupts the packet
stream at random overflows, especially when SysEx messages are involved.
2020-04-19 11:44:15 +02:00
Ha Thach
f9262007ac
Merge pull request #258 from versioduo/midi-packets
MIDI packet interface
2020-04-19 15:43:07 +07:00
hathach
7f92e255cf added TODO item for changelog
- rewrite changelog it better later on
- simplify the issue template
2020-04-19 14:02:39 +07:00
Ha Thach
c0047e376f
Merge pull request #357 from hathach/fix-209
add disconnection detection for stm32 synopsys
2020-04-19 13:01:13 +07:00
hathach
1f442c0a9a also add wakeup event 2020-04-18 23:48:36 +07:00
hathach
c3fc5f1595 session end interrupt doesn't trigger on esp32 saola board
it is possibly due to the board design without vbus sense. Revisit
later.
2020-04-18 23:42:51 +07:00
hathach
fa71402e17 implement disconnection detection for stm32 synopsys
- disconnection is OTG INT session end bit
- add USE_SOF to disable 1ms interrupt on mcu which isn't used now by
the stack
- add suspend detection
2020-04-18 23:40:27 +07:00
Ha Thach
72ed11d1e5
Merge pull request #356 from hathach/use-docker-esp32s2-ci
Use docker for esp32s2 ci
2020-04-18 21:45:39 +07:00
hathach
66bd68f1e9 everything seems fine, final test. 2020-04-18 17:11:36 +07:00
hathach
86a46f0467 try again 2020-04-18 17:00:44 +07:00
hathach
7a025c9282 try build script with docker 2020-04-18 16:58:51 +07:00
hathach
474404f6f1 try build with docker 2020-04-18 16:26:54 +07:00
hathach
836c70e80d
pul idf latest 2020-04-18 16:05:23 +07:00
hathach
7691db0e9e
test docker version 2020-04-18 15:39:11 +07:00
hathach
544f878033
test building esp32s2 with docker 2020-04-18 15:38:33 +07:00
Ha Thach
3ed9515e70
Merge pull request #355 from hathach/follow-up-206
follow up to #206
2020-04-18 00:24:48 +07:00
hathach
ce6a81e74d
fix typo 2020-04-17 22:10:31 +07:00
hathach
464b1e8e89
correct return for write flush 2020-04-17 15:57:24 +07:00
hathach
4571ce0d29
add a bit of document for cdc device API. also improve cdc write flush when complete. 2020-04-17 15:54:20 +07:00
Ha Thach
0b1b9a2b9e
Merge pull request #260 from majbthrd/cdczlp
CDC device: fix behavior for transfers that are a whole multiple of endpoint buffer
2020-04-17 15:00:12 +07:00
Ha Thach
823af6ba95
Merge pull request #338 from hathach/remove-dcd-set-config
lpc17xx move set configdevice into set address for removing dcd_set_config()
2020-04-17 14:35:11 +07:00
hathach
6f9c256ad0
complete remove dcd_set_config(), fix unit test 2020-04-17 13:52:34 +07:00
hathach
05476d9ad7 Merge branch 'master' into remove-dcd-set-config 2020-04-17 13:38:22 +07:00
Ha Thach
85f0894fff
Merge pull request #347 from majbthrd/nuc505_config
nuc505: change dcd_set_config() behavior
2020-04-17 13:36:16 +07:00
Ha Thach
1f69807621
Merge pull request #354 from hathach/cxd56-disconnect-connect
Cxd56 disconnect connect
2020-04-17 13:12:47 +07:00
Ha Thach
e9e1b1d07a
Merge pull request #353 from hathach/rename-irq-handler
mass rename tud/dcd_irq_handler to tud/dcd_init_handler
2020-04-17 12:55:38 +07:00
hathach
dddf30f532
added disconnect for spresense 2020-04-17 12:53:42 +07:00
hathach
50be9d7c3a
mass rename tud/dcd_irq_handler to tud/dcd_init_handler 2020-04-17 12:27:53 +07:00
hathach
89f99426fc
add code for disconnect/connect (not tested) 2020-04-17 11:48:49 +07:00
hathach
3f8b9c59dd
update example to include CXD56 for highspeed mode 2020-04-17 11:40:33 +07:00
Ha Thach
4bbbba48cb
Merge pull request #351 from hathach/valentyusb-dcd-disconnect-connect
Valentyusb dcd disconnect connect
2020-04-17 09:52:29 +07:00
Ha Thach
19e2eb66c0
Merge pull request #350 from hathach/synopsys-msp430-dcd-disconnect-connect
Synopsys msp430 dcd disconnect connect
2020-04-17 09:51:15 +07:00
hathach
989cca5b1a
update per review 2020-04-17 09:29:02 +07:00
Ha Thach
9aa553ccc2
Merge pull request #352 from hathach/samg-dcd-disconnect-connect
samg implement dcd connect/disconnect
2020-04-16 23:14:42 +07:00
Ha Thach
33610751d7
Merge pull request #336 from pigrew/edpt_close
> If you notice my chain of events above, the bulk transfer was started BEFORE the SET_INTERFACE call. The USB device hardware swaps the order of them being delivered. On STM32, it gives priority to the lower-numbered EP index.

It shouldn't be a matter, control is 2+ stage, before sending the setup. Host should stop all communication to the endpoint that It wants to close.
2020-04-16 23:10:36 +07:00
hathach
36d4efa077
samg implement dcd connect/disconnect 2020-04-16 22:59:19 +07:00
hathach
6377699d77
implement dcd disconnect connect 2020-04-16 22:30:33 +07:00
hathach
bb2669fbc0
add dfu generate target for fomu 2020-04-16 22:24:48 +07:00
Ha Thach
bfec3b4479
Merge pull request #345 from hathach/add-alt-itf
Implement setInterface(alt) for usb net driver
2020-04-16 21:33:03 +07:00
hathach
3aaad8cd73
add int enable/disable for pullup 2020-04-16 21:30:12 +07:00
hathach
18d936b414
msp430 disconnect/connect 2020-04-16 21:04:28 +07:00
Nathan Conrad
2994d100cd Remove transfer queue filtering. May need to be revisited later. 2020-04-16 09:59:40 -04:00
hathach
63655ac9d7
cleanup for esp32 2020-04-16 20:43:26 +07:00
hathach
4c74140b31
stm32 sysnopsys disconnect/connect 2020-04-16 20:20:20 +07:00
Ha Thach
33888519dd
Merge pull request #349 from hathach/nxp-dcd-disconnect
implement Nxp mcu dcd disconnect
2020-04-16 17:07:15 +07:00
hathach
a009775745
dcd disconnect/connect for transdimension ip 2020-04-16 16:56:16 +07:00
hathach
e5dc0902a0
house keeping 2020-04-16 16:06:11 +07:00
hathach
418b69f2db
implement dcd disconnect/connect for lpc ip3511 2020-04-16 16:05:57 +07:00
hathach
969121df4f
added dcd disconnect/connect to lpc17/40 2020-04-16 15:52:45 +07:00
Ha Thach
aa5ab50e86
Merge pull request #348 from pigrew/net_IAD_devDesc
Set Net example to use IAD device class
2020-04-16 11:36:00 +07:00
hathach
2eed58d096
per review 2020-04-16 11:13:54 +07:00
Nathan Conrad
be9326dc33 Set Net example to use IAD device class 2020-04-15 16:07:01 -04:00
Peter Lawrence
b9fca0bbb4 nuc505: change dcd_set_config() behavior 2020-04-15 14:16:48 -05:00
Ha Thach
eb2aaa5de8
Merge pull request #344 from hathach/enhance-itf-assoc
Enhance Interface Associate descriptor handling
2020-04-16 00:18:49 +07:00
Ha Thach
61104297d5
Merge pull request #342 from hathach/class-driver-id
add subclass and protocol for matching driver id
2020-04-16 00:09:15 +07:00
hathach
86ff5651ad
correct usbnet control complete response
don't return false with STD request get/setInterface() or targeted Data
Interface (itfnum +1)
2020-04-15 23:10:52 +07:00
hathach
0ddbda08cb
always response if GET_INTERFACE even if class driver does not support alt interface 2020-04-15 23:08:49 +07:00
Nathan Conrad
b0270f499b stm32fsdev: dynamic allocation of PMA. 2020-04-15 11:53:30 -04:00
hathach
ae9f01fe95
rename config num to id in net webserver example
also add configuration array bound check.
2020-04-15 22:28:13 +07:00
hathach
dc9f5cc91a
remove unused usb_descriptors.h 2020-04-15 18:09:30 +07:00
hathach
325065a320
better demonstrate usbnet exmaple is multiple configurations 2020-04-15 18:06:12 +07:00
hathach
caa1dceed9
implement alternate setInterface() request
mostly forward these request (recipient = interface) to class driver.
2020-04-15 17:51:02 +07:00
hathach
d315393fbb
use IAD to assign itf2drv mapping correctly
merge net_data back into net driver
2020-04-15 16:18:24 +07:00
hathach
0b39168dc2
add IAD for CDC ECM, remove EEM descriptor template 2020-04-15 15:40:53 +07:00
hathach
b03b9eb939
change cdc template protocol to None 2020-04-15 15:14:26 +07:00
hathach
93ffe317b2
clean up 2020-04-15 13:53:50 +07:00
hathach
3bfb402d8c
clean up 2020-04-15 11:44:12 +07:00
hathach
1faa3b2768
tested usbnet, completely remove class code 2020-04-15 11:41:26 +07:00
hathach
c74f7e708e
remove class_code/subclass/protocol from driver structure, add name for logging 2020-04-15 11:06:35 +07:00
hathach
f1a6f92fab
Merge branch 'master' into class-driver-id 2020-04-15 10:47:49 +07:00
Ha Thach
4ad65342e5
Merge pull request #343 from majbthrd/usbnet_rm_cdceem
usbnet: remove CDC-EEM
2020-04-15 10:42:58 +07:00
hathach
490771a094
test vendor 2020-04-15 10:39:01 +07:00
hathach
c1c9ca5629
test with tmc 2020-04-15 10:37:31 +07:00
hathach
e713b534fa
test ok with cdc and msc 2020-04-15 10:30:34 +07:00
hathach
bae570f7c7
tested with midi 2020-04-15 10:30:07 +07:00
Peter Lawrence
7fa8d87291 usbnet: remove CDC-EEM 2020-04-14 21:10:43 -05:00
hathach
8614dcece7
tested with hid 2020-04-15 01:01:07 +07:00
hathach
3ef6e33533
use class driver open() for interface support detection
tested with dfu_runtime
2020-04-15 01:00:37 +07:00
hathach
ae60146274 use explicit all_subclass and all_protocol since 0xFF is stil valid 2020-04-14 22:35:34 +07:00
Nathan Conrad
16f65890eb Merge branch 'master' into edpt_close 2020-04-14 10:22:03 -04:00
hathach
b90b00d43b
complete adding subclass and protocol to driver id 2020-04-14 18:35:50 +07:00
hathach
593fe154ec
adding subclass & protocol to class driver structure 2020-04-14 18:00:59 +07:00
Ha Thach
57ffa94a52
Merge pull request #334 from majbthrd/usbnet_osagnostic
usbnet: OS-agnostic (Windows/Linux/macOS) network driver
2020-04-14 17:39:50 +07:00
Nathan Conrad
bbc59f1ceb stm32fsdev: add static assert for PMA size bigger than EP0 size. 2020-04-13 20:50:17 -04:00
Nathan Conrad
de208b31cf edpt_close: Remove item from queue instead of modifying it. 2020-04-13 11:05:34 -04:00
Nathan Conrad
f8e7487355 edpt_close: Updated based on feedback. 2020-04-13 09:51:46 -04:00
hathach
f4df829399 lpc17xx move set configdevice into set address
for removing dcd_set_config()
2020-04-13 17:04:18 +07:00
Ha Thach
4f693fea15
Merge pull request #335 from majbthrd/lwip_timeouts
net_lwip_webserver: add support for lwip timeouts
2020-04-13 13:14:26 +07:00
Ha Thach
7a93894b99
Merge pull request #325 from hathach/refactor-irqhandler
move irqhandler to application
2020-04-13 10:18:17 +07:00
Nathan Conrad
0eeaccaf46 Skeleton, and initial stm32fsdev implementation (that leaks memory) 2020-04-12 21:27:27 -04:00
Peter Lawrence
3f1583dd0f net_lwip_webserver: add support for lwip timeouts 2020-04-12 16:13:52 -05:00
Peter Lawrence
bb3bbcc00b usbnet: OS-agnostic (Windows/Linux/macOS) network driver 2020-04-12 15:41:18 -05:00
Ha Thach
04a06ec401
Merge branch 'master' into refactor-irqhandler 2020-04-11 15:49:34 +07:00
hathach
4748b349a2 add dcd_irq_handler to porting doc 2020-04-11 15:46:20 +07:00
Ha Thach
13a3081d30
Merge pull request #333 from hathach/fix-esp32s2-setup-packet
fix incorrect setup packet
2020-04-11 15:18:41 +07:00
hathach
1751064f70 print correct example name 2020-04-11 13:40:40 +07:00
Ha Thach
07809d03a7
Merge pull request #332 from pigrew/stm32fsdev-dcdconnect
stm32fsdev: Implement dcd_connect.
2020-04-11 13:20:31 +07:00
hathach
ae1314f1c7 fix incorrect setup packet
also increase usbd stack in example when debug is enabled
2020-04-11 12:55:45 +07:00
Ha Thach
2ff3f765db
Merge pull request #319 from hathach/add-esp32s2
port ESP32 S2
2020-04-10 23:53:03 +07:00
hathach
a37a56acd3 remove CONFIG_IDF_TARGET_ESP32S2BETA per review 2020-04-10 23:38:36 +07:00
Nathan Conrad
5bd9d14fc1 stm32fsdev: set dcd_connect API definitions to strong, Modify documentation. 2020-04-10 10:26:41 -04:00
hathach
8953bc9255 added comment note for beta chip walkaround 2020-04-10 20:25:53 +07:00
Ha Thach
bbb0e1088d
Merge pull request #330 from hathach/dcd-disconnect-connect
Dcd disconnect connect for samd and nrf
2020-04-10 16:11:04 +07:00
hathach
d8d5902ccb change saola-1 led to pin 18 by default 2020-04-10 15:44:50 +07:00
hathach
c545cfc0bc Correct dedicated FIFO SRAM size to 1024
add note for up to 5 active IN endpoints (including EP0 IN)
2020-04-10 15:42:50 +07:00
hathach
978eec73b3 remove 100us delay at the end of dcd_init() 2020-04-10 15:39:59 +07:00
hathach
30945ab9f3 revert name to dcd_int_handler due to function prototype warning 2020-04-10 15:27:23 +07:00
hathach
c0695b4b55 clear USB_RXFLVI_M before read_rx_fifo()
more format clean up
2020-04-10 15:13:12 +07:00
hathach
933e3cdfc7 change indent from 4 -> 2 spaces 2020-04-10 15:01:12 +07:00
hathach
cec747776d rename dcd_init_handler to dcd_irq_handler to consistent with other ports 2020-04-10 14:47:02 +07:00
hathach
d122d7de88 remove commented code 2020-04-10 14:45:55 +07:00
hathach
a40d1e800d try to fix racing condition with setup 2020-04-10 14:04:18 +07:00
hathach
1b3d1b52c9 fix uint32_t format with log 2020-04-10 13:54:50 +07:00
hathach
778db647c4 add CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y 2020-04-10 13:53:57 +07:00
Nathan Conrad
715c4dbbf8 stm32fsdev: Implement dcd_connect. 2020-04-09 17:03:12 -04:00
hathach
d6578823bb rename static function for dcd_cxd56 to prevent conflict 2020-04-09 12:00:45 +07:00
hathach
c1f3fbbc03 implement dcd connect/disconnect for samd and nrf 2020-04-09 11:47:02 +07:00
hathach
11201f1a06 adding dcd_connect/disconnect 2020-04-09 11:42:42 +07:00
Ha Thach
defea45d44
Merge branch 'master' into refactor-irqhandler 2020-04-09 11:22:20 +07:00
hathach
16dbbb2b4f make saola as cmake component, easier to add more esp32 board 2020-04-09 11:19:08 +07:00
hathach
cefbd9579c add neopixel led strip driver for saola, make saola as an component 2020-04-09 11:02:16 +07:00
hathach
bfde988af3 update cmake 2020-04-08 23:20:05 +07:00
hathach
40e23672ff rename hal_dcd_isr to dcd_irq_handler for fomu 2020-04-08 16:47:20 +07:00
hathach
e879ad1e6f move irq from msp430 2020-04-08 16:42:36 +07:00
hathach
8f17945b67 move irq for stm32 synopsys 2020-04-08 16:37:09 +07:00
hathach
9014ca5528 move irq for stm32 fsdev 2020-04-08 16:26:14 +07:00
hathach
880595433c use macro for easy enable/disable SOF 2020-04-08 15:41:16 +07:00
hathach
7b7a78ab2e disable SOF interrupt since it is not used for now 2020-04-08 15:33:07 +07:00
hathach
fc9170b2c1 clean up 2020-04-08 15:15:52 +07:00
hathach
70df1aff13 add TODO for saola on-board neopixel 2020-04-08 15:00:16 +07:00
Ha Thach
36b33ee775
Merge pull request #328 from majbthrd/nuc_connect
nuvoton: add dcd_disconnect() dcd_connect()
2020-04-07 23:25:03 +07:00
hathach
a2dee7fb50 rename saola to saola_1 2020-04-07 23:07:25 +07:00
hathach
f6edb46c0a update docs for esp32s2 2020-04-07 23:01:26 +07:00
Peter Lawrence
ccb65fcf6a nuvoton: add dcd_disconnect() dcd_connect() 2020-04-07 10:51:55 -05:00
hathach
4265dfb2de minor clean up 2020-04-07 21:47:24 +07:00
hathach
353aa80814 add ci build_esp32s.py 2020-04-07 16:49:17 +07:00
hathach
62c14a6866 esp32s2 work with hid_composite_freertos 2020-04-07 16:35:02 +07:00
hathach
aff52919d6 skip freertos example for cxd56 msp430 and fomu 2020-04-07 16:23:27 +07:00
hathach
ccfc058646 add hid_composite_freertos example 2020-04-07 16:19:47 +07:00
hathach
7394113748 example clean up 2020-04-07 16:05:04 +07:00
hathach
3c724251f0 clean up 2020-04-07 13:45:26 +07:00
hathach
6a9f971882 add saola button pin support, esp32 build with board_test 2020-04-07 13:42:48 +07:00
hathach
51944f0dc9 only check in sdkconfig.defaults 2020-04-07 12:19:12 +07:00
Ha Thach
bfc43bad81
Merge pull request #321 from pigrew/tweak20200331
Misc. tweaks, and fix for USBTMC descriptors without an INT EP
2020-04-07 12:12:44 +07:00
hathach
f44440df5d ci again 2020-04-07 11:21:34 +07:00
hathach
f073a5ecd3 CI: seperate esp32s2 into different job
skip esp32s in build_all.py script
2020-04-07 11:15:59 +07:00
Nathan Conrad
06d7fdc228 Use #define for OSAL_TIMEOUT_WAIT_FOREVER. 2020-04-06 12:40:58 -04:00
hathach
19f767317f more ci 2020-04-06 23:33:09 +07:00
hathach
c64db32b82 ci test 2020-04-06 22:23:24 +07:00
hathach
ef7992ce65 fix CI 2020-04-06 21:36:53 +07:00
hathach
06e87b47a2 revert name to dcd_init_handler()
since the function signature is different
2020-04-06 21:28:02 +07:00
hathach
a344427e3f fix CROSS_COMPILE for esp32s2 2020-04-06 20:39:20 +07:00
hathach
9d26666c91 update ci setup-node / setup-ruby 2020-04-06 20:35:52 +07:00
hathach
22a9b05834 rename dcd_int_handler to dcd_irq_handler for consistency with other port 2020-04-06 19:49:25 +07:00
hathach
cfb2ef1cff move setup nodes before cache msp430 2020-04-06 19:43:47 +07:00
hathach
06377a341b add tud_irq_handler() for all lpc ip3511 (13, 15, 11) 2020-04-06 18:00:37 +07:00
hathach
138965d1d1 add tud_irq_handler() to all NUC board 2020-04-06 17:43:56 +07:00
hathach
4179334aca call tud_irq_handler() for all nrf5x board 2020-04-06 17:35:11 +07:00
hathach
a61d34e09c add WIP changelog 2020-04-06 17:24:34 +07:00
hathach
fb05451a26 mass rename dcd_isr() to dcd_irq_handler() 2020-04-06 17:24:22 +07:00
hathach
dc4bf02dcb mass rename tud_isr to tud_irq_handler 2020-04-06 17:04:49 +07:00
hathach
c026236824 house keeping 2020-04-06 16:33:04 +07:00
hathach
050de0ec33 fix issue and typo with In token when Fifo empty
fix transmit packet endpoint's fifo
2020-04-06 16:32:55 +07:00
hathach
5a00c6ca96 Merge branch 'master' into add-esp32s2 2020-04-06 14:43:49 +07:00
hathach
5963ace5ab add -B for clean and flash 2020-04-06 14:33:36 +07:00
hathach
2d6d298302 move irqhandler to application
tud_isr() must be called by application to forward the irqhandle to the
stack
2020-04-06 14:11:45 +07:00
Ha Thach
4430ea61e2
Merge pull request #323 from pigrew/ci-cache-msp430
Cache MSP430 toolchain and NPM modules.
2020-04-06 00:15:50 +07:00
Ha Thach
9df2a9ba43
Merge pull request #324 from hathach/add-custom-osal
allow application to implement its own os
2020-04-06 00:11:45 +07:00
Nathan Conrad
fa2ba76690 Don't cache xPacks. 2020-04-05 11:43:47 -04:00
hathach
c2606c0213 allow application to implement its own os 2020-04-05 18:22:16 +07:00
Nathan Conrad
5c5807abf7 Cache MSP430 toolchain and NPM modules. Use git action for submodules. 2020-04-03 20:41:15 -04:00
hathach
1e7c3cf95e update dcd esp32s2 fifo allocation to match current dcd synopsys 2020-04-03 17:09:38 +07:00
hathach
0814bd9948 minor clean up 2020-04-03 12:39:57 +07:00
hathach
748cc88769 add saola board.mk 2020-04-03 12:20:06 +07:00
hathach
7c33a7127f make as wrapper to idf.py for consistency
update ci build script to only build esp32-s2 target with freertos
examples
2020-04-03 12:08:06 +07:00
Nathan Conrad
84a9715958 tu_verify: Change some define functions use do-while statement. 2020-04-02 23:22:48 -04:00
Nathan Conrad
55fd9fe392 Typo of usbtmc. 2020-04-02 23:16:28 -04:00
Nathan Conrad
32c982b762 Fix USBTMC descriptors when INT EP is disabled. 2020-04-02 23:08:21 -04:00
Nathan Conrad
0d5f3c7f04 Set OSAL_TIMEOUT_WAIT_FOREVER to be a const, to avoid a pedantic gcc warning about signedness. 2020-04-02 23:07:31 -04:00
hathach
2824e5c97a more ci test 2020-04-01 23:03:57 +07:00
hathach
ec578fa8cb try adding esp32 to ci 2020-04-01 22:55:44 +07:00
hathach
f8422b5a48 rename project to cdc_msc_freertos 2020-04-01 22:55:26 +07:00
hathach
1c0d7a3577 reduce freertos task stack size to fit small mcu 2020-04-01 21:43:23 +07:00
hathach
ff9ceb65d2 doc update 2020-04-01 20:56:46 +07:00
hathach
19f977a274 add esp32s2 saola bsp
update cdc_msc_freertos main.c to work with esp32s2
add CMake file
2020-04-01 20:24:46 +07:00
hathach
a3e50242b9 add dcd_esp32s2
skip esp32s2_saola for make build since idf use cmake
2020-04-01 17:07:28 +07:00
Ha Thach
7a32ee58f3
Merge pull request #318 from majbthrd/confignum
add provision for multiple configurations
2020-04-01 00:05:11 +07:00
Peter Lawrence
794212d44e revise argument order for TUD_CONFIG_DESCRIPTOR macro 2020-03-31 10:53:47 -05:00
Peter Lawrence
87f313da48 add provision for multiple configurations 2020-03-30 13:47:17 -05:00
hathach
370dd18394 more changelog 2020-03-30 12:48:07 +07:00
Ha Thach
75f9ce2e94
Merge pull request #315 from hathach/develop
added changelog for release
2020-03-30 12:19:42 +07:00
hathach
dcbe6fea39 minor changelog 2020-03-30 11:45:33 +07:00
hathach
d1aeac4e33 added changelog 2020-03-30 11:44:03 +07:00
Ha Thach
a582674b91
Merge pull request #312 from hathach/develop
house keeping work
2020-03-29 00:40:36 +07:00
Ha Thach
8179c831ae
Merge pull request #309 from pigrew/stm32_hal_updates
Stm32 F0,F3,F4 updates
2020-03-28 23:19:13 +07:00
Nathan Conrad
3926b28faa Update UARTs for stm32f4xx discovery boards. Other minor cleanups. 2020-03-28 12:05:30 -04:00
hathach
ad2824df8b add ENTRY(Reset_Handler) to linker of samd21 and samd51 board
fix #303
2020-03-28 22:25:07 +07:00
Nathan Conrad
4191363c55 Update F4 BSP with new HAL config 2020-03-28 10:58:36 -04:00
Nathan Conrad
07c1ce76b8 Update F3 BSP for new HAL 2020-03-28 10:58:36 -04:00
Nathan Conrad
62a68034d9 Update F0 BSP for new HAL 2020-03-28 10:58:36 -04:00
hathach
1712b61ab6 added Arduino Nano 33 BLE with/without Sense 2020-03-28 21:34:42 +07:00
hathach
69698ed2e0 Merge branch 'master' into develop 2020-03-28 15:31:39 +07:00
Ha Thach
dc6f90eaf7
Merge pull request #311 from majbthrd/usbnet_ecm_macos
usbnet: tweak CDC-ECM after MacOS testing
2020-03-28 14:33:17 +07:00
Ha Thach
033b295761
Merge pull request #310 from pigrew/ep0_zeroLenResponses
USBD: Fix zero-length EP0 responses
2020-03-28 14:25:19 +07:00
hathach
7640cd875c add repository_dispatch to allow other repo to remote trigger build 2020-03-28 11:44:11 +07:00
Peter Lawrence
622a6c77a1 usbnet: tweak CDC-ECM after MacOS testing 2020-03-27 20:30:57 -05:00
Nathan Conrad
6606cf2896 USBD: Use tud_control_xfer only for data 2020-03-27 15:54:37 -04:00
hathach
09262d7f7e house keeping 2020-03-26 22:04:24 +07:00
Ha Thach
aef2a59f32
Merge pull request #308 from pigrew/stm32f4_uart
Modify include of HAL, remove CMSIS clock configuration code, STM32F407 UART
2020-03-26 22:00:01 +07:00
Nathan Conrad
705d43cda7 Modify include of HAL, and remove CMSIS clock configuration code, and implement UART for STM32F407Disco 2020-03-26 10:10:06 -04:00
hathach
d74a92bf45 makefile clean up
allow board to define CROSS_COMPILE (default to arm gcc)
2020-03-25 14:06:51 +07:00
Ha Thach
435485b524
Merge pull request #304 from pigrew/stm32_xfer_rewrite
STM32FSDEV: Rewrite transfer ISR
2020-03-25 10:19:07 +07:00
Ha Thach
834daa3df9
Merge pull request #305 from hathach/develop
fix mac address for rndis response
2020-03-25 10:18:18 +07:00
Ha Thach
f2b761fee9
Merge pull request #306 from jeremyherbert/master
add support for seeeduino xiao
2020-03-24 14:37:38 +07:00
Jeremy Herbert
01820061b2 add support for seeeduino xiao 2020-03-23 23:39:53 -07:00
Ha Thach
9a48e98fad
Merge branch 'master' into develop 2020-03-24 12:16:15 +07:00
hathach
27ec8451a4 update doc for MSP430 2020-03-24 12:12:38 +07:00
Ha Thach
95009a9e79
Merge pull request #194 from cr1901/msp430f5529
[WIP] MSP430 Support
2020-03-24 11:57:20 +07:00
William D. Jones
7e78e47444 msp_exp430f5529lp: Fix board.mk, remove .travis.yml.bck. 2020-03-24 00:40:25 -04:00
William D. Jones
6b5157fd28 dcd_msp430x5xx: Add dummy dcd_edpt0_status_complete handler. Add
comment which describes why it might be needed.
2020-03-24 00:03:12 -04:00
William D. Jones
27efedc9e6 msp_exp430f5529lp: Allow user to choose mspdebug as alternate programmer. 2020-03-23 23:45:22 -04:00
Ha Thach
b4a9a6e99a
Merge pull request #307 from hathach/upgrade-nrfx
Upgrade nrfx from 2.0.0 to 2.1.0
2020-03-24 10:42:53 +07:00
William D. Jones
48fa67e16b Merge remote-tracking branch 'cr1901/msp430f5529' into msp430f5529 2020-03-23 23:33:27 -04:00
hathach
16d6da18e3 clean up action checkout for sbumodules 2020-03-24 10:28:34 +07:00
hathach
86a8ffa430 ci checkout submodules 2020-03-24 10:24:38 +07:00
hathach
94528ff65b checkout v2 with submodule 2020-03-24 10:13:48 +07:00
hathach
c05990af95 change cmsis5 to master 2020-03-24 09:52:48 +07:00
hathach
a2aa50d2ef update cmsis_5 2020-03-24 09:33:11 +07:00
hathach
905c4b71d1 nrf use new cmsis_4 submodule for core header 2020-03-24 08:51:11 +07:00
hathach
9f5042399e add cmsis_4 as submodule 2020-03-24 08:49:48 +07:00
hathach
fca4a6eabf more string id 2020-03-24 00:07:34 +07:00
hathach
aa01e5f447 enhance string index 2020-03-23 23:46:12 +07:00
hathach
bc0779de0a per review
- remove -Wno-error=lto-type-mismatch
- change back to unsigned int
2020-03-23 23:22:52 +07:00
hathach
056d0bb4bf remove -Wnested-externs since many driver does this including CMSIS_5 2020-03-23 22:52:59 +07:00
hathach
9e0ffbe30f house keeping 2020-03-23 22:51:17 +07:00
hathach
feff6aafd5 add CMSIS_5 as submodule 2020-03-23 22:36:21 +07:00
hathach
c47d9c3c68 upgrade nrfx from 2.0.0 to 2.1.0 2020-03-23 19:21:44 +07:00
hathach
8a22eba7b4 add TODO note to remove tud_network_mac_address 2020-03-23 15:24:30 +07:00
hathach
76a27cf49a fix rndis response to get mac address
- remove cflags -fshort-enums
- clean up webserver descriptor
2020-03-23 15:21:22 +07:00
Nathan Conrad
eaf767b0db STM32FSDEV: Rewrite transfer ISR 2020-03-22 14:26:48 -04:00
hathach
ef5789d7c9 skip freertos and lwip webserver example for msp430 2020-03-22 21:29:13 +07:00
hathach
a101a4f098 finally fixed the ci, clean up 2020-03-22 21:07:14 +07:00
hathach
c34e03986c more ci test 2020-03-22 21:00:53 +07:00
hathach
9227634905 test ci pwd before checkout 2020-03-22 20:49:13 +07:00
hathach
e710f7a47b more on ci 2020-03-22 20:33:59 +07:00
hathach
cf0074e5da try to fix msp430 gcc install 2020-03-22 20:20:36 +07:00
hathach
da31846246 fix unit test 2020-03-22 19:26:40 +07:00
hathach
5cb6500ac8 fix msp430 ci build 2020-03-22 19:24:03 +07:00
hathach
acbb535668 change msp430 flash tool from mspdebug to TI MSP430Flasher 2020-03-22 19:11:24 +07:00
hathach
4f871063fd Merge branch 'master' into cr1901-msp430f5529 2020-03-22 17:19:57 +07:00
Ha Thach
00eabbac35
Merge pull request #302 from hathach/develop
follow up to #301
2020-03-18 00:36:28 +07:00
hathach
a93548cfe9 update comment per review 2020-03-17 23:39:53 +07:00
hathach
a39d170672 follow up to pr #301
rename OPT_MCU_NUC505_USB_DMA to simply USE_DMA
2020-03-17 10:40:45 +07:00
hathach
f8d6bbe43b Merge branch 'master' into develop 2020-03-17 10:24:37 +07:00
Ha Thach
e47f992157
Merge pull request #301 from majbthrd/nuc505tweak
NUC505 : fix operation with net_lwip_webserver
2020-03-17 10:24:09 +07:00
Peter Lawrence
df05440d92 NUC505 : added comment on DMA choice 2020-03-16 13:20:17 -05:00
Ha Thach
14ab9bf2fe
Merge pull request #298 from pigrew/UART_CRLF
Use CRLF on UART log messages?
2020-03-16 11:23:07 +07:00
Ha Thach
f13835a2fb
Merge pull request #290 from majbthrd/usbnet-stm32rndis
usbnet RNDIS correction (STM32 RNDIS now valid)
2020-03-16 11:16:57 +07:00
Peter Lawrence
aafddfe637 following suggestion by @kasjer 2020-03-15 18:32:02 -05:00
Peter Lawrence
e7efcb6fd5 merge with current master 2020-03-15 18:28:13 -05:00
Peter Lawrence
fb56c02a6f NUC505 : fix operation with net_lwip_webserver 2020-03-15 17:44:09 -05:00
Peter Lawrence
5e8ff1f7c2 usb RNDIS revision on @pigrew suggestions 2020-03-15 16:05:45 -05:00
Nathan Conrad
7f6316dbe1 Use CRLF on UART. 2020-03-14 14:26:14 -04:00
hathach
45e32a787b clean up 2020-03-11 14:13:34 +07:00
Ha Thach
a0eb8a2651
Merge pull request #297 from hathach/develop
Added cdc_msc_freertos example to ci build
2020-03-11 12:50:41 +07:00
hathach
5fa1e6e242 hack to undef LITTLE_ENDIAN for samg55 2020-03-11 12:32:29 +07:00
hathach
cc494ab585 skip spresense 2020-03-11 11:57:38 +07:00
hathach
4e6d464c7a add cdc_msc_freertos to ci 2020-03-11 10:25:46 +07:00
hathach
ba74223c2e fix more build 2020-03-11 00:58:28 +07:00
hathach
6a1416d18a fix cortex M7, M23, M33 freertos build 2020-03-11 00:47:13 +07:00
hathach
487b887f80 freertos demo use static only for most optmized sram 2020-03-11 00:09:37 +07:00
hathach
65578dec44 update freertos example
work with samd21 samd51 and nrf
2020-03-10 23:16:09 +07:00
hathach
fd5c64d7b5 fix freertos compile 2020-03-10 15:34:05 +07:00
hathach
5540065085 added FreeRTOS as submodule 2020-03-10 14:55:56 +07:00
hathach
39ce2e8361 adding FreeRTOS as submodule 2020-03-10 14:49:01 +07:00
hathach
1561692e4a rename to cdc_msc_freertos 2020-03-10 14:43:09 +07:00
hathach
61d256c2e1 drop hid for freertos demo to match none os example 2020-03-10 14:42:24 +07:00
Ha Thach
41d9ab5056
Merge pull request #295 from hathach/develop
add webserver into ci build
2020-03-10 14:33:26 +07:00
hathach
9a0c02236e doc update 2020-03-10 13:28:55 +07:00
hathach
cddbc86dc9 Merge branch 'majbthrd-nuc120' 2020-03-10 13:04:59 +07:00
hathach
71fb3985ba Merge branch 'nuc120' of https://github.com/majbthrd/tinyusb into majbthrd-nuc120 2020-03-10 11:53:11 +07:00
hathach
8a8f84cd37 more rename 2020-03-09 23:05:22 +07:00
hathach
ec4323277d fix ci 2020-03-09 17:55:31 +07:00
hathach
6f5466f017 add Flash & Ram to ci build result 2020-03-09 17:42:57 +07:00
hathach
6e6b929f8e add net_webserver into ci build 2020-03-09 15:54:16 +07:00
hathach
1617b9d22e rename lwip_webserver to net_webserver for example naming convention (with class driver) 2020-03-09 15:53:20 +07:00
hathach
85a3315a99 Adding lwip_webserver to ci
- buil_al.py skip specific MCU if .skip.MCU_ exists
- reduce stm32f070 heap & stack size to compile webserver
2020-03-09 15:51:29 +07:00
Ha Thach
e764421164
Merge pull request #294 from hathach/fix-rndis-zlp
Fix zlp for nrf52840
2020-03-08 19:58:09 +07:00
hathach
e0cdab5bf7 fix stm32 fsdev epdesc 2020-03-08 16:28:21 +07:00
hathach
c8247f0907 fix zlp for nrf52840 2020-03-08 14:20:28 +07:00
hathach
7aa5a53652 fix log printf 2020-03-08 13:26:36 +07:00
hathach
b638aabad8 add uart for feather nrf52840 2020-03-08 13:25:14 +07:00
Ha Thach
4620ac5b77
Merge pull request #292 from hathach/develop
Add several boards
2020-03-07 19:15:43 +07:00
hathach
659fc4f29e added itsybitsy m0, m4 2020-03-07 18:26:39 +07:00
hathach
bdc5e3d3bc added feather sense and CLUE 2020-03-07 18:02:54 +07:00
hathach
3ea95c2ab6 clean up LD_FILE using $(BOARD)
make it easier to duplicate bsp
2020-03-07 17:49:30 +07:00
hathach
800330cdf0 added feather nrf52840 sense 2020-03-07 17:27:59 +07:00
Ha Thach
5f5ee465a6
Merge pull request #291 from hathach/port-samg55
Port samg55
2020-03-07 16:38:59 +07:00
Peter Lawrence
d74facfd0a usbnet RNDIS correction 2020-03-04 17:54:11 -06:00
Ha Thach
093b1381f2
Merge pull request #287 from majbthrd/usbnet
add CDC-ECM/RNDIS/CDC-EEM network device class with example
2020-03-03 23:59:43 +07:00
Peter Lawrence
4a4682a80a update net class to follow API naming convention 2020-03-03 10:31:46 -06:00
Ha Thach
048f5e34dc
Merge pull request #280 from majbthrd/nuc505
add Nuvoton NUC505
2020-03-03 21:35:06 +07:00
Peter Lawrence
fee79d7466 add CDC-ECM/RNDIS/CDC-EEM network device class with example 2020-03-02 21:15:01 -06:00
Ha Thach
43025b2ae3
Merge pull request #286 from chang196700/feature-langid
Add feature: langid Support
2020-03-03 10:03:49 +07:00
Chang Feng
8d97e58192
Add langid to tests.
Signed-off-by: Chang Feng <chang_196700@hotmail.com>
2020-02-26 13:37:26 +08:00
Chang Feng
b97d4709c2
Add langid to examples.
Signed-off-by: Chang Feng <chang_196700@hotmail.com>
2020-02-26 13:37:02 +08:00
Chang Feng
75afeb1266
Add langid to example cdc_msc.
Signed-off-by: Chang Feng <chang_196700@hotmail.com>
2020-02-26 13:14:04 +08:00
Chang Feng
5c760e1f74
Add langid to example cdc_dual_ports.
Signed-off-by: Chang Feng <chang_196700@hotmail.com>
2020-02-26 13:11:11 +08:00
Chang Feng
b8ea0f0a6b
Add langid support to descriptor string callback.
Signed-off-by: Chang Feng <chang_196700@hotmail.com>
2020-02-26 13:07:15 +08:00
Ha Thach
cb3de67663
Merge pull request #282 from an-dr/esp32s2_num
add a number for esp32-s2
2020-02-19 22:58:54 +07:00
Andrei Gramakov
8d84bdff21 add a number for esp32-s2 2020-02-19 12:50:36 +01:00
Peter Lawrence
6ab799c7eb atomic GPIO operation in BSP 2020-02-11 14:34:07 -06:00
Peter Lawrence
7d8ecc63a6 add Nuvoton NUC505 2020-02-07 20:11:00 -06:00
hathach
46f22860fb correct waklaround with only status IN
correct usb descriptor msc dual example to work with samg
2020-02-07 22:13:38 +07:00
hathach
02b2c60231 samg55 work with cdc msc example 2020-02-07 17:39:20 +07:00
hathach
087e3c7f56 Merge branch 'master' into port-samg55 2020-02-07 16:50:07 +07:00
hathach
9ca6311ac4 implement walkaround for incorrect DATA Toggle for status control. 2020-02-07 16:46:18 +07:00
hathach
b6b9fe42af more log for debugging 2020-02-07 16:43:44 +07:00
Peter Lawrence
a8e66f0111 added CFG_EXAMPLE_MSC_READONLY to NuTuny-SDK-NUC120 board.mk 2020-01-25 13:32:31 -06:00
Peter Lawrence
cd8eb2a06b added support for Nuvoton NUC120 2020-01-25 13:10:32 -06:00
Ha Thach
0d3a7257f5
Merge pull request #275 from hathach/develop
rt10xx: correct max endpoint count is 8
2020-01-17 17:20:47 +07:00
hathach
e2f60a5134 rt10xx: correct max endpoint count is 8 2020-01-17 17:09:23 +07:00
hathach
04d8671641 clean up, disable SOF for dcd trans since we don't use it for now 2020-01-17 12:59:00 +07:00
hathach
3208fe00b6 clean up 2020-01-17 12:06:59 +07:00
hathach
c3f4c75cfc Merge branch 'master' into develop 2020-01-17 10:58:04 +07:00
Ha Thach
1f95f439e1
Merge pull request #274 from tannewt/dcache
Clean and invalidate the DCache when we have one.
2020-01-17 09:47:38 +07:00
Scott Shawcroft
cd6454a330
Add if guards for dcache flushes. 2020-01-16 17:17:49 -08:00
Kay Sievers
73228a67ef MIDI: Add packet interface
This changes the internal buffering to the raw 4-byte messages. The
conversion of the messages to a byte-stream moved to the read/write
methods.

It adds a raw packet interface to send and retrieve the raw 4-byte
USB MIDI message:
  static inline bool     tud_midi_receive    (uint8_t packet[4]);
  static inline bool     tud_midi_send       (uint8_t const packet[4]);

MIDI USB packets carry virtual cable/wire/plug data in the packet header,
which cannot be exported in the byte-stream interface. The raw packet
interface allows to send and and receive the complete USB message.
2020-01-16 10:11:37 +01:00
Scott Shawcroft
ae68668df9
flush and invalidate the dcache 2020-01-15 21:59:15 -08:00
Ha Thach
4daeb38185
Merge pull request #273 from majbthrd/nucbusreset
nuc121: survive USB bus reset
2020-01-16 11:37:35 +07:00
Ha Thach
12b191510a
Merge branch 'master' into nucbusreset 2020-01-16 11:22:33 +07:00
hathach
05fd02194e correct return value of midid_xfer_cb 2020-01-16 11:12:26 +07:00
Ha Thach
7b20b80dc0
Merge pull request #190 from pigrew/line_endings
Adjust line endings.
2020-01-16 11:10:52 +07:00
Ha Thach
537ceb0f65
Merge branch 'master' into line_endings 2020-01-16 10:55:14 +07:00
Peter Lawrence
2ed395bde3 nuc121: survive USB bus reset 2020-01-15 21:40:24 -06:00
majbthrd
f28fad7bbf
Merge pull request #272 from majbthrd/nucbetter
nuc121: enhanced driver and hopefully added readability
2020-01-15 20:24:53 -06:00
Peter Lawrence
c04bc07c29 nuc121: enhanced driver and hopefully added readability 2020-01-15 20:09:50 -06:00
Nathan Conrad
25c1bea782 Normalize line endings 2020-01-15 14:47:43 -05:00
Nathan Conrad
5b9b36be14 Add gitattributes 2020-01-15 14:46:12 -05:00
majbthrd
906471a487
Merge pull request #271 from majbthrd/nucoutmps
nuc121: fix handling of OUT transfers larger than max packet size
2020-01-15 10:28:49 -06:00
Peter Lawrence
7f2db321bf nuc121: better fix for handling large OUT transfers 2020-01-15 10:23:23 -06:00
Peter Lawrence
f2a5335417 nuc121: fix handling of OUT transfers larger than max packet size 2020-01-14 22:07:38 -06:00
Ha Thach
1210beb906
Merge pull request #270 from hathach/develop
Add LED to NUC BSP
2020-01-15 10:10:48 +07:00
Sean Cross
a6b916ba85
Merge pull request #269 from antmicro/volatile_buffers_fix
dcd_eptri: Fix rx_buffer/tx_buffer volatile annotation
2020-01-15 07:02:11 +10:00
Mateusz Holenko
c1781e5e7c dcd_eptri: Fix rx_buffer/tx_buffer volatile annotation
This makes `rx_buffer` and `tx_buffer` *pointers*
volatile in order to avoid caching them in a register.

The original notation meant "a pointer to a volatile value"
(equivalent of `volatile uint8_t *`). This resulted in
`while(rx_buffer[ep_num] != NULL) ;` loop to get stuck
forever, even though the IRQ handler set the `rx_buffer[ep_num] = NULL`.
2020-01-14 13:57:17 +01:00
hathach
0c1fff735d skip nuc flash verify 2020-01-14 18:19:33 +07:00
hathach
4de9439fb1 more nuvoton support
- add LED for nutiny nuc 121, 125s, 126v
- flash target to use nuvoton's openocd fork
2020-01-14 18:13:42 +07:00
Ha Thach
6781d58449
Merge pull request #267 from majbthrd/adatypo
correct apparent Adafruit typo in SAMD21 board.mk
2020-01-12 11:51:06 +07:00
Peter Lawrence
64b435cf6e correct apparent Adafruit typo in SAMD21 board.mk 2020-01-11 18:25:38 -06:00
Peter Lawrence
53732805b7 CDC device: help ensure code is consistent with the size of the buffers it operates on 2020-01-11 15:31:42 -06:00
Peter Lawrence
33c715bdd0 CDC device: fix behavior for transfers that are a whole multiple of endpoint buffer 2020-01-11 14:21:43 -06:00
Ha Thach
13016c5cbb
Merge pull request #266 from hathach/develop
follow up to PR #240
2020-01-11 13:14:30 +07:00
hathach
516e6e6bea
add cdc_dual_ports example to actionci 2020-01-11 13:02:10 +07:00
hathach
08da3e80b7
echo to both serial at once 2020-01-11 12:59:02 +07:00
hathach
242a2b6126
clean example 2020-01-11 12:43:02 +07:00
Ha Thach
744674bb28
Merge pull request #240 from majbthrd/master
implement multiple interfaces support
2020-01-11 12:23:13 +07:00
Ha Thach
2eb1edcd43
Merge pull request #265 from hathach/develop
add raytac mdbt50q rx dongle
2020-01-10 17:03:34 +07:00
hathach
43eff66d40 add raytac mdbt50q rx dongle 2020-01-10 16:51:24 +07:00
Ha Thach
aa50362e27
Merge pull request #264 from hathach/develop
Added BSP for stm32f401/f411 blackpill
2020-01-10 15:30:56 +07:00
hathach
82c2674b19 clean up 2020-01-10 15:22:45 +07:00
hathach
287d45155d added stm32f401 blackpill 2020-01-10 15:19:33 +07:00
hathach
4494720dbc clean up HSE_VALUE for stm32 2020-01-10 15:14:37 +07:00
hathach
04cf337b79 clean up flash-stlink 2020-01-10 15:09:59 +07:00
hathach
67d88a8348 add generic flash-stlink 2020-01-10 15:00:46 +07:00
Ha Thach
d5d8c38f8d
Merge pull request #263 from arturo182/patch-1
Fix some style issues in the README
2020-01-10 10:37:33 +07:00
arturo182
33723157a4
Fix some style issues in the README 2020-01-10 00:34:12 +01:00
hathach
dd6313a6ca added stm32f411 blackpill 2020-01-10 00:28:46 +07:00
Ha Thach
e685aa9c5e
Merge pull request #262 from hathach/develop
follow up to #261
2020-01-09 22:12:00 +07:00
hathach
84bbe54e17 follow up to #261
- fix button pullup
- flash using teensy_loader_cli
- update boards.md
2020-01-09 22:04:11 +07:00
hathach
03d14f4d83 add trigger.yml 2020-01-09 21:31:10 +07:00
hathach
dd96be492f Merge branch 'master' into develop 2020-01-09 21:31:01 +07:00
Ha Thach
99f76eaaaa
Merge pull request #261 from ladyada/teensy4
add a rough bsp. UART on D0/D1, LED on D13, button on D12
2020-01-09 13:28:06 +07:00
Lady Ada
8ead416865 add a rough bsp. UART on D0/D1, LED on D13, button on D12 2020-01-09 00:59:48 -05:00
Ha Thach
6ccfb4258c
Merge pull request #259 from majbthrd/nuc121
add Nuvoton NUC121/NUC125/NUC126
2020-01-07 22:09:41 +07:00
majbthrd
c1934c36c3
Merge pull request #1 from hathach/majbthrd-nuc121
Majbthrd nuc121
2020-01-07 09:03:51 -06:00
hathach
e85a481db1 added Peter into contributors doc 2020-01-07 17:04:15 +07:00
hathach
8aef8d4b85 fix ci build
- nuc 121/125: add CFG_EXAMPLE_MSC_READONLY since it is not enough SRAM
to hold MSC disk
- nuc 126: drop i2c source files in compile list due to SDK driver
issue.
2020-01-07 16:57:18 +07:00
hathach
0268f24227 skip travis build 2020-01-07 16:29:11 +07:00
Ha Thach
130250a2be
Merge branch 'master' into nuc121 2020-01-07 16:26:58 +07:00
Ha Thach
d6a8d42bd6
Merge pull request #254 from majbthrd/multi-setconfig
gracefully handle multiple SET_CONFIGURATION requests
2020-01-05 17:48:55 +07:00
Peter Lawrence
5c5f876461 dcd_nuc121: allow user ZLP transfers to get a callback 2020-01-04 13:36:26 -06:00
Peter Lawrence
f4371e79b1 add Nuvoton NUC121/NUC125/NUC126 2020-01-04 10:31:55 -06:00
hathach
3362a4b09d change token name 2020-01-04 14:24:21 +07:00
hathach
6f03617ff5 curl 2020-01-04 00:12:03 +07:00
hathach
4282a0d96a curl again 2020-01-03 17:37:10 +07:00
hathach
2cbd0cdf50 change to token 2020-01-03 17:19:23 +07:00
hathach
019d1b09c5 try to trigger mynewt example 2020-01-03 17:11:22 +07:00
Ha Thach
97c216bc04
Merge pull request #257 from gsnxp/rt1010fix
fixed build issue with i.MXRT1010-EVK, corrected typo in examples/readme
2020-01-01 13:35:36 +07:00
Greg Steiert
e06f4a3ffe fixed build issue with i.MXRT1010-EVK, corrected typo in examples/readme 2019-12-30 09:11:52 -08:00
majbthrd
6b3eb5f173 fix missing parentheses in TU_MIN and TU_MAX macros (#256) 2019-12-30 23:12:18 +07:00
Jeremy Herbert
db24b2f372 Let device respond to endpoint requests on EP0 (#251)
Since endpoint 0 is used for control requests, it doesn't have a class driver attached to it. As such, the corresponding `_usbd_dev.ep2drv` entry points to driver `0xFF`, which is invalid and this makes the `TU_ASSERT(drvid < USBD_CLASS_DRIVER_COUNT);` line fail, and eventually causes an endpoint stall. So as-is the stack cannot respond to any endpoint requests on endpoint 0.

However, standard requests on endpoint 0 do not need a class driver to produce a valid response. This commit changes the order of execution so that the assert is only checked if the endpoint is not 0.
2019-12-30 10:58:06 +07:00
Peter Lawrence
e7bf66b29e gracefully handle multiple SET_CONFIGURATION requests 2019-12-28 16:49:52 -06:00
Peter Lawrence
ff0e7d2bed implement multiple interfaces support 2019-12-28 14:27:32 -06:00
Ha Thach
8e04eafb8a
more ci (#253)
* more ci

* ci

* ci

* ci

* ci test

* more ci test

* more ci

* ci typo

* test ci

* ci use github ::add-path::
2019-12-28 16:24:32 +07:00
hathach
1bcf121785
ci use github ::add-path:: 2019-12-28 16:11:10 +07:00
hathach
bfdc9a94f9
test ci 2019-12-28 15:55:18 +07:00
hathach
4406e378ce
ci typo 2019-12-28 15:52:15 +07:00
hathach
f5cc48017a
more ci 2019-12-28 15:49:38 +07:00
hathach
274488ec65
more ci test 2019-12-28 15:45:44 +07:00
hathach
ccbae7538d
ci test 2019-12-28 15:41:44 +07:00
hathach
dc8a68c7c0
ci 2019-12-28 15:36:25 +07:00
hathach
1b8626025e
ci 2019-12-28 15:35:12 +07:00
hathach
ac78f42032
ci 2019-12-28 15:05:33 +07:00
hathach
947e7b803a
more ci 2019-12-28 15:03:25 +07:00
Ha Thach
01fb25ab95
Merge pull request #252 from hathach/develop
use github actions for build badge
2019-12-27 21:53:48 +07:00
hathach
70abfe7f45
use github actions for build badge 2019-12-27 21:39:44 +07:00
Ha Thach
eb6a965cf5
Merge pull request #250 from hathach/github-action
migrate to github action for CI/CD
2019-12-27 21:23:19 +07:00
Ha Thach
2b6b856d7c
wrap up actions 2019-12-27 21:12:53 +07:00
Ha Thach
e4a0af5e5e
Update build.yml 2019-12-27 21:08:16 +07:00
Ha Thach
e14698028c
Update build.yml 2019-12-27 21:03:40 +07:00
Ha Thach
72af007a19
Update build.yml 2019-12-27 20:58:37 +07:00
Ha Thach
e74dd33945
Update build.yml 2019-12-27 20:53:55 +07:00
Ha Thach
6e4df81998
Update build.yml 2019-12-27 20:49:54 +07:00
Ha Thach
424063afd1
Update build.yml 2019-12-27 20:41:51 +07:00
Ha Thach
ce5ceea3c4
Update build.yml 2019-12-27 20:38:39 +07:00
Ha Thach
7590266ad7
Update build.yml 2019-12-27 20:33:09 +07:00
Ha Thach
a4be3a3227
Update build.yml 2019-12-27 20:29:25 +07:00
Ha Thach
81592feca5
Update build.yml 2019-12-27 20:11:43 +07:00
Ha Thach
22ec72cd4b
Update build.yml 2019-12-27 20:09:18 +07:00
Ha Thach
ee3e2bcc91
Update build.yml 2019-12-27 20:07:22 +07:00
Ha Thach
56f717bca1
Update build.yml 2019-12-27 18:01:14 +07:00
Ha Thach
a005a74e3d
Update build.yml 2019-12-27 17:24:37 +07:00
Ha Thach
e5a5d146e1
Update build.yml 2019-12-27 17:05:57 +07:00
Ha Thach
73906cb495
Update build.yml 2019-12-27 16:56:46 +07:00
Ha Thach
8e2cc97319
Update build.yml 2019-12-27 16:55:13 +07:00
Ha Thach
ae6e7fa928
Update build.yml 2019-12-27 16:39:23 +07:00
Ha Thach
9ed7ca39ea
try action 2019-12-27 16:34:25 +07:00
Ha Thach
dda4c9a94b
Merge pull request #248 from hathach/develop
fix #247
2019-12-27 09:54:33 +07:00
hathach
89f3ad59da
fix #247 2019-12-27 09:42:57 +07:00
Ha Thach
76b2c2a001
Merge pull request #246 from hathach/samd-improve
Samd improve
2019-12-26 22:48:06 +07:00
hathach
0da45c2e78
clean up 2019-12-26 22:31:29 +07:00
hathach
b5684c5c10
merge dcd_samd51 & dcd_samd21 into dcd_samd 2019-12-26 21:46:59 +07:00
hathach
49b316143a
improve samd, fix missing setup packet occasionally 2019-12-26 17:11:24 +07:00
Ha Thach
b8cef16b58
Merge pull request #245 from hathach/develop
fix samd51 setup packet handling
2019-12-25 23:59:07 +07:00
hathach
5690e7b304
fix samd51 setup packet handling
issue occur due to race condition
https://github.com/adafruit/Adafruit_TinyUSB_Arduino/issues/37
2019-12-25 23:47:47 +07:00
Ha Thach
8c674d9c11
Merge pull request #244 from hathach/develop
invoke scsi complete callback before queue for csw status
2019-12-24 21:36:42 +07:00
hathach
605129eb66 invoke scsi complete callback before queue for csw status
there is racing issue with samd + qspi flash testing with arduino
otherwise.
2019-12-24 21:24:43 +07:00
hathach
2caa1ac078 Merge branch 'master' into develop 2019-12-24 21:13:05 +07:00
Ha Thach
21cc8237e1
Merge pull request #243 from hathach/port-samg55
merge WIP branch for samd dcd fix
2019-12-24 21:11:40 +07:00
hathach
a1c94067f7 add driver 99-tinyusb.rules for ubuntu, rename window usbser inf 2019-12-23 19:48:52 +07:00
hathach
bbada1d3e6 adding lookup table for debugging
add msc scsi command list
2019-12-23 18:54:06 +07:00
hathach
94e70f9b01 Merge branch 'master' into port-samg55 2019-12-21 23:53:48 +07:00
hathach
421221baa5
making more progress, but failed with WRITE10
incorrect queue 448 bytes instead of 512
2019-12-21 23:51:57 +07:00
hathach
050fa2fd39
able to response to scsi inquiry, but failed to response to test unit ready 2019-12-21 19:33:41 +07:00
hathach
a1e55e57a4
clean warnings 2019-12-20 17:09:42 +07:00
hathach
65711de870 added coverity badge 2019-12-18 15:18:05 +07:00
Ha Thach
a601f59df5
Merge pull request #238 from samveen/add_grave
add "`" and "~" to keycode -> ASCII table
2019-12-17 22:37:57 +07:00
samveen
ba8a232970 add "`" and "~" to keycode -> ASCII table 2019-12-17 12:47:05 +05:30
Ha Thach
627f8c5eb9
Merge pull request #237 from samveen/fix_typo
[tusb]fix typo in comment
2019-12-17 10:46:15 +07:00
samveen
fdce63b268 [tusb]fix typo in comment 2019-12-16 23:01:26 +05:30
Ha Thach
7a05b177a4
Merge pull request #236 from jeremyherbert/master
Update dcd_stm32_fsdev.c with note about F042Fx remapping
2019-12-12 10:17:40 +07:00
Ha Thach
0b540fa55d
Merge pull request #234 from hathach/stm32f4-blackpill
move VBUS sense out of dcd_synosys to bsp
2019-12-12 10:00:17 +07:00
Jeremy Herbert
9d96b6d66e
Update dcd_stm32_fsdev.c
Add a note about pin remapping for the STM32F042Fx
2019-12-12 09:40:06 +10:00
Ha Thach
fc7f6f0e1e
Merge pull request #235 from hathach/develop
close #204 define HSE_VALUE in _hal_conf instead of board.mk
2019-12-11 16:30:06 +07:00
hathach
88bdb12ee5 close #204 define HSE_VALUE in _hal_conf instead of board.mk 2019-12-11 15:19:51 +07:00
hathach
96a9eca6a0 move VBUS sense out of dcd_synosys to bsp 2019-12-11 14:03:36 +07:00
hathach
24009cb689 fixed unit test with dcd_edpt0_status_complete 2019-12-10 08:16:11 +07:00
hathach
752aea7d72 enhance samg 2019-12-09 23:58:13 +07:00
hathach
fa96078882 clear data toggle in clear stall, also set config bit 2019-12-09 23:21:06 +07:00
hathach
75a2157715 fix samd using TUSB_REQ_SET_ADDRESS in dcd_edpt0_status_complete 2019-12-09 23:20:21 +07:00
hathach
0316e0ecd4 update descriptor, enhance ep in transfer 2019-12-09 22:48:35 +07:00
hathach
759fa76280 implementing dcd_edpt_open 2019-12-09 21:36:15 +07:00
hathach
988edce745 fix build 2019-12-09 18:49:38 +07:00
hathach
208a77678c clean up, switch and update submodule samd to circuitpython branch 2019-12-09 18:37:54 +07:00
hathach
9a8e6ed93b added microchip submodule 2019-12-09 18:18:01 +07:00
hathach
69a801c027 change the samd submodule 2019-12-09 17:59:30 +07:00
Ha Thach
88b9a6e84d
Merge pull request #233 from kasjer/kasjer/fix-ymnewt-osal
Fix mynewt osal queue definition
2019-12-09 15:32:21 +07:00
Jerzy Kasenberg
4a1f7d0243 Fix mynewt osal queue definition
Queue table has pointers instead of data os_event structs.
This resulted in crashes when elements were put to queue and
overwritten variables that were just after mpool desiged
for queue.
2019-12-01 12:38:36 +01:00
Ha Thach
97b90b6fc9
Merge pull request #231 from xobs/fix-fomu-out-rx
valentyusb: eptri: don't double-advance read buffer
2019-11-29 17:38:09 +07:00
Sean Cross
26dcc19b18 valentyusb: eptri: don't double-advance read buffer
Due to an error, we were double-advancing the FIFO buffer.  The end
result was that the second half of most reads were getting ignored.

This wasn't found during earlier testing because only 64-byte buffers
were tested.

This corrects this error by avoiding double-advancing the buffer.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-29 18:14:23 +08:00
Ha Thach
acb80dec65
Merge pull request #228 from noebrun/patch-1
fix missing source file for cdc_msc to compile
2019-11-29 00:28:55 +07:00
hathach
e9725dcdbe use dcd_edpt0_status_complete() to prepare for setup packet for samd21/samd51 2019-11-28 13:48:55 +07:00
hathach
d7558e8a0f use dcd_edpt0_status_complete() to set address without blocking for samd21/samd51/stm32_fsdev 2019-11-28 13:39:29 +07:00
hathach
ac701c398b clean up 2019-11-28 12:18:56 +07:00
hathach
552cc3ef33 implement dcd_edpt_stall 2019-11-28 11:56:35 +07:00
hathach
5dc04887e2 get passed set address 2019-11-28 11:48:08 +07:00
hathach
6bc245cb36 add dcd_edpt0_status_complete() which is useful for several mcu port 2019-11-28 11:46:36 +07:00
hathach
40b454cf28 get passed first get device descriptor 2019-11-27 23:20:48 +07:00
hathach
6225d5bcfd able to handle setup packet 2019-11-27 16:01:25 +07:00
hathach
bc21714c7e detect bus reset 2019-11-27 14:49:19 +07:00
Ha Thach
2e0dcd50ea
Merge pull request #230 from hathach/develop
fix #229
2019-11-27 13:44:09 +07:00
hathach
302746d02c Merge branch 'develop' into port-samg55 2019-11-27 12:35:59 +07:00
hathach
fe1eadf177 fix #229 2019-11-27 12:34:30 +07:00
hathach
8a1b6327ba extract code to invoke_class_control()
- also rename usbd_class_drivers to _usbd_driver
2019-11-27 12:12:52 +07:00
hathach
745f0b4521 clean up 2019-11-27 11:02:24 +07:00
Noe Brun
d7228094fd
missing source file for cdc_msc to compile 2019-11-26 13:51:16 +01:00
hathach
4c9c13c767 add uart sync support 2019-11-26 18:21:46 +07:00
hathach
387384c0d9 fix samg55 with newlib missing end symbol 2019-11-26 17:39:51 +07:00
Ha Thach
6a6f3efd0f
Merge pull request #227 from hathach/develop
add CONTRIBUTORS.md
2019-11-25 23:25:20 +07:00
hathach
3a2d63613b logo design 2019-11-25 22:56:37 +07:00
hathach
13f4223517 add the most important contributor 2019-11-25 21:10:08 +07:00
hathach
7c606563ed lower case for arturo 2019-11-25 20:52:27 +07:00
hathach
0fccfc647f update 2019-11-25 13:37:55 +07:00
hathach
168f0cb471 update readme 2019-11-25 13:33:50 +07:00
hathach
a91ac72dbd add the most important file of the project: CONTRIBUTORS.md 2019-11-25 13:29:42 +07:00
hathach
c691dc4cb2 update 2019-11-25 10:42:32 +07:00
hathach
58e8265964 usb hw init OK 2019-11-24 23:46:28 +07:00
hathach
24b2cea139 Merge branch 'master' into port-samg55 2019-11-24 21:22:42 +07:00
Ha Thach
64b05a1d5f
Merge pull request #225 from xobs/fomu-offset-fix
bsp: fomu: fix rom address for example programs
2019-11-24 11:18:53 +07:00
Sean Cross
a106c5114b bsp: fomu: fix rom address for example programs
During development, the ROM address was at offset 0x2001a000
(due to the fact that the test program was located immediately
following the bitstream).

In normal Fomus, the ROM address is at offset 0x20040000, in order
to take into account additional bitstreams and bootloaders.

Correct the address to the offset in order to get examples working
with existing Fomus.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-24 01:15:31 +00:00
hathach
ac65e94b86 Merge branch 'develop' 2019-11-24 00:53:31 +07:00
hathach
a3ed87972d more doc 2019-11-24 00:52:34 +07:00
hathach
2379ce8d65 update doc, RT1011 verified to work, thanks to @arturo182 2019-11-23 21:59:28 +07:00
Ha Thach
15d6f813c2
Merge pull request #224 from hathach/develop
added rt1010 board support
2019-11-23 21:53:58 +07:00
hathach
778cff19c1 added rt1010 board support
not tested on the actual hardware board though.
2019-11-23 21:18:40 +07:00
Ha Thach
0ee70512ac
Merge pull request #223 from hathach/develop
Added board RT1050 EVKB, RT1020 EVK, RT1015 EVK
2019-11-23 01:26:58 +07:00
hathach
9758f3e461 doc update 2019-11-23 01:11:37 +07:00
hathach
a6b1289096 added rt1015 evk board 2019-11-23 01:09:39 +07:00
hathach
d76eb8d659 doc update 2019-11-23 00:51:43 +07:00
hathach
d991466a8e fix rt1010 rt1020 only has 1 usb controller, rt1050 rt1060 has 2 2019-11-23 00:48:56 +07:00
hathach
4ecb07afc5 added MIMX RT1052 Evaluation Kit 2019-11-23 00:19:53 +07:00
Ha Thach
98c5084292
Merge pull request #222 from hathach/develop
add RT1060 evk board support
2019-11-22 17:59:40 +07:00
hathach
cc9b6b93c8 update doc for RT1060 evk 2019-11-22 17:42:52 +07:00
hathach
38b14725f7 rename OPT_MCU_IMXRT10XX to OPT_MCU_MIMXRT10XX 2019-11-22 17:40:12 +07:00
hathach
d1d8ded43b added iMX RT1060 EVK board support
board_text, cdc_msc, hid_composite all work
2019-11-22 17:36:04 +07:00
hathach
281e8cd9ec rename OPT_MCU_RT10XX to OPT_MCU_IMXRT10XX 2019-11-22 15:42:46 +07:00
Ha Thach
b7e5d463e9
Merge pull request #221 from hathach/develop
doc update
2019-11-22 15:41:38 +07:00
hathach
00a571fc38 doc update 2019-11-22 15:37:23 +07:00
Ha Thach
ca741dfc2a
Merge pull request #220 from hathach/develop
Port NXP iMX RT10XX
2019-11-22 15:16:41 +07:00
hathach
a02e723d09 rename dcd lpc18_43 to transdimension 2019-11-22 14:54:23 +07:00
hathach
6123b600fc rename dcd_lpc18_43 to dcd_transdimension 2019-11-22 14:47:07 +07:00
hathach
a0b2561a2d move nxp dcd ehci controller reset and modde into dcd
rt1064 work with cdc msc example
2019-11-22 14:20:10 +07:00
hathach
f623dbc425 config clean up 2019-11-22 12:41:47 +07:00
hathach
636c1475ba clean up 2019-11-22 12:38:24 +07:00
hathach
fca4653b95 able to compile dcd 18/43 with rt1064 2019-11-22 12:34:41 +07:00
hathach
2ead26a12d more clean up 2019-11-22 12:26:40 +07:00
hathach
ccb09db3b7 more clean up 2019-11-22 12:16:47 +07:00
hathach
7e16a9a1db more constant rename clean up 2019-11-22 12:14:55 +07:00
hathach
8aacd1eacd refactor dcd_lpc18_43, making it capatible with rt10xx 2019-11-22 12:11:13 +07:00
hathach
623b16af2e clean up dcd lpc18_43
drop supporting both device mode on both ports.
2019-11-22 00:58:18 +07:00
hathach
1f52273d99 move dcd_lpc18_43.h into .c file 2019-11-22 00:38:22 +07:00
hathach
627d9a2b33 adding irq to rt1064evk 2019-11-22 00:34:31 +07:00
hathach
03deeea465 fix segger host example 2019-11-22 00:33:10 +07:00
hathach
f5d737aa7e moving irq to bsp for lpc17/40 2019-11-21 23:19:38 +07:00
hathach
bbec47b647 adding tud_isr/tuh_isr with lpc18/43 2019-11-21 22:20:30 +07:00
hathach
9fe34c2e62 update build all script to build a specific 2019-11-21 16:37:34 +07:00
hathach
043697ab95 rename lpc 17/18 irq to dcd_isr/hcd_isr 2019-11-21 16:08:08 +07:00
hathach
f0682f6279
Merge pull request #219 from xobs/fix-eptri-ep-clear
eptri: clear proper endpoint when opening IN port
2019-11-20 22:00:59 +07:00
hathach
54d597b723 rt1064evk led, button, uart all work 2019-11-20 17:10:30 +07:00
Sean Cross
a9282eab51 eptri: clear proper endpoint when opening IN port
When opening a USB port, we ensure the buffer is NULL and has
a length of 0.

Due to a mistake in specifying the endpoint type, we never actually
cleared the value when opening an IN endpoint.  This patch fixes
the comparison when opening an IN endpoint.

This fixes issue #218.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-20 17:45:21 +08:00
hathach
f638594536 move -flto to board.mk
current board that doesn work with flto is spresense and mimxrt10xx (due
to xip image_vector_table is optimized out).
2019-11-20 16:06:40 +07:00
hathach
1aa3f085cb adding support for NXP rt1064 evk board, boad test led + sw8 work.
LTO is temporary disabled
2019-11-20 15:30:39 +07:00
hathach
c2fb813658
Merge pull request #217 from xobs/valentyusb-eptri
WIP: Add Valentyusb eptri
2019-11-18 12:37:34 +07:00
hathach
56abce44f3
Merge pull request #208 from hathach/fix-issue-207
Fix issue 207
2019-11-14 10:10:42 +07:00
Sean Cross
679821e917 fomu: bsp: don't call usb isr when usb is disabled
When compiled without usb support, we don't want to call the USB ISR.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 11:10:37 -08:00
Sean Cross
67267a9399 fomu: bsp: remove unused messible functions
These functions are unused in the current implementation.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 11:08:56 -08:00
Sean Cross
dce070ebe0 examples: make: specify CROSS_COMPILE for fomu
When BOARD=fomu, use the riscv cross-compiler.  Otherwise, use the
default arm compiler.  This can be overridden by passing
CROSS_COMIPLE on the command line.

Note that there are now three common risc-v prefixes:

    - riscv32-unknown-elf- : Common for users who compile their own
    - riscv64-unknown-elf- : Upstream multiarch toolchain from SiFive
    - riscv-none-embed-    : xPack embedded version of SiFive toolchain

Here we assume users are using the `riscv-none-embed-` toolchain from
xPack, because it appears to be growing more common.  Additionally,
there is much confusion surrounding `riscv64-unknown-elf-`, which
actually includes both 32- and 64-bit runtimes and can generate software
for both.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 09:26:00 -08:00
Sean Cross
737d437ab8 travis: fetch xPack risc-v toolchain
This toolchain seems popular in the embedded space, and is generally
preferred over the upstream SiFive toolchain.  It can produce both
32- and 64-bit binaries, so its prefix is riscv-none-embed-.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 09:22:18 -08:00
Sean Cross
cc73990530 tusb: rename foosn to valentyusb
Use the name `valentyusb` as the vendor for the `valentyusb`
project, rather than the manufacturer name of the Fomu device.

This is because the `valentyusb` core can be used across multiple
vendors, much like how other cores can be used across chip vendors.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 09:08:47 -08:00
Sean Cross
8c5f02960b valentyusb: rename from foosn
While Fomu is produced by Foosn, the actual name of the hardware
block is `valentyusb`.  Rename the module to match that.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 09:08:47 -08:00
Sean Cross
e05e9801e4 fomu: gate debug/logging features
This gates the majority of the debug and logging features behind
testable macros.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 09:08:47 -08:00
Sean Cross
3292920933 fomu: first stable working commit
This appears to be stable, and works well.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 09:08:47 -08:00
Sean Cross
25d5628063 fomu: csr: sync csr
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 09:08:47 -08:00
Sean Cross
f087cb1580 fomu: crt0: minor text refactor
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 09:08:47 -08:00
Sean Cross
1882a87212 fomu: remove reference to SETUP_CTRL.ACK
THis bit isn't used anymore, so remove it.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 09:08:47 -08:00
Sean Cross
729c8d073c fomu: dcd_fomu: add next_ev support
Now that we have the `USB_NEXT_EV` register, take advantage of
it to work around issue #207.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 09:09:38 -08:00
Sean Cross
77cf0b5bfd fomu: csr: add version with next_ev register
The Fomu bitstream now includes a `USB_NEXT_EV` register to
indicate which is the next logical event to process.  Add this
register to the CSR definition.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 09:08:47 -08:00
Sean Cross
913032ae1d dcd_fomu: nearly there
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 09:08:01 -08:00
Sean Cross
835a72c595 fomu: semi-working dcd file
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 09:08:01 -08:00
Sean Cross
83bca4a74f fomu: semi-working commit
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 09:08:01 -08:00
Sean Cross
843136d0e4 fomu: commit latest version
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 09:08:01 -08:00
Sean Cross
22fd7bf85e fomu: first fully-working release
This is able to transfer lots of data back and forth across MSC.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 09:08:01 -08:00
Sean Cross
4a8475b8a7 src: add eptri to tusb
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 09:08:01 -08:00
Sean Cross
0559fd13fb fomu: fix some issues with dcd_fomu
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 09:08:01 -08:00
Sean Cross
359189ea2d tusb_verify: add riscv assert support
This simply executes an "ebreak" instruction.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 09:08:01 -08:00
Sean Cross
ef07427e06 bsp: fomu: update
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 09:03:13 -08:00
Sean Cross
470d827f13 docs: porting: remove invalid information and fix typo
It is no longer the case that boards need to be added to this file.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 09:03:13 -08:00
Sean Cross
32bb68409e portable: fomu: get msc to enumerate
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 09:03:12 -08:00
Sean Cross
ba889eeb9e bsp: fomu: fix linker script overlap
The end of the data section was overlapping the start of the bss.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 09:03:12 -08:00
Sean Cross
36ede44885 fomu: wip support
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 09:03:12 -08:00
Sean Cross
f152bed4b4 fomu: initial commit
Signed-off-by: Sean Cross <sean@xobs.io>
2019-11-13 09:03:12 -08:00
hathach
23df777b30 update nxp_driver submodule for imx rt families 2019-11-11 12:14:54 +07:00
hathach
34c903023d
Merge pull request #215 from hathach/develop
rename lpc_driver to nxp_driver
2019-11-11 12:12:42 +07:00
hathach
cd96b3de86 update makefile for lpc boards 2019-11-11 11:51:51 +07:00
hathach
eca14a5ab3 re-add submodule nxp_driver 2019-11-11 11:38:30 +07:00
hathach
50cfc556d2 remove submodule lpc_driver 2019-11-11 11:33:50 +07:00
hathach
1684cb06b7 update makefile for lpc mcu 2019-11-11 11:24:10 +07:00
hathach
4c7c7ce88c
Merge pull request #214 from hathach/develop
Added nRF52833 support
2019-11-11 00:27:39 +07:00
hathach
d65bc34bfe added and tested nRF52833DK (pca10100) 2019-11-11 00:11:49 +07:00
hathach
4008f0d1e6 update dcd nrf5x to be indepent from nrf_usbd.h
fix build error with nrfx 2.0
2019-11-11 00:01:12 +07:00
hathach
2f19b9c100 update submodule nrfx to 2.0.0 for nrf52833 support 2019-11-10 21:04:55 +07:00
hathach
620fa572bd
Merge branch 'master' into msp430f5529 2019-11-10 20:12:23 +07:00
hathach
a19db3bdd2 added board nrf52840 mdk dongle 2019-11-10 20:07:43 +07:00
hathach
943b7467d8 correct LED, button and uart for feather_stm32f405 2019-11-09 00:08:32 +07:00
hathach
fc86a308f6 clean up 2019-11-05 11:45:02 +07:00
hathach
5209091c28
Merge branch 'master' into fix-issue-207 2019-11-05 10:20:30 +07:00
hathach
3d748e6e2e Merge branch 'master' into port-samg55 2019-11-05 10:18:32 +07:00
hathach
1ab3a1035c Merge branch 'master' into cr1901-msp430f5529 2019-11-05 10:17:36 +07:00
hathach
3c49ff153e
Merge pull request #149 from pigrew/ZLP_Request2
Zlp request2
2019-11-05 00:05:21 +07:00
hathach
e43e3e9f10
Merge pull request #212 from hathach/develop
fix #211
2019-11-04 23:34:19 +07:00
Nathan Conrad
8d0fa158d7 Change one more TU_ASSERT to TU_VERIFY in usbd. 2019-11-04 11:33:14 -05:00
hathach
2727983a2d fix #211 2019-11-04 22:52:29 +07:00
hathach
8cd19f88b9 clean up 2019-11-04 22:03:31 +07:00
Nathan Conrad
a94fe05ecb usbd: Change TU_ASSERT to TU_VERIFY as the assertion can be hit when bad data is sent from host. 2019-11-04 08:59:29 -05:00
Nathan Conrad
c98acd3873 Use control transfer function to send control data (in usbtmc) 2019-11-04 08:54:18 -05:00
Nathan Conrad
0d856b7116
Merge pull request #3 from hathach/pigrew-ZLP_Request2
fix tud_control_status() didn't update request
2019-11-04 08:09:24 -05:00
hathach
42b55f6621 clean up 2019-11-04 15:00:44 +07:00
hathach
6baa79b330 board test works 2019-11-04 14:54:04 +07:00
hathach
44ad683bd6 fix tud_control_status() didn't update request 2019-11-04 11:21:57 +07:00
Nathan Conrad
68a53e05fc
Merge pull request #2 from hathach/pigrew-ZLP_Request2
zlp request2. PR for PR (has issues with STM32F0 FSDEV)
2019-11-03 17:50:41 -05:00
Nathan Conrad
cebc066813 Add UART HAL source file to stm32f070 makefile. 2019-11-03 15:25:55 -05:00
William D. Jones
965f3a8f1d
Merge pull request #2 from hathach/cr1901-msp430f5529
added void dcd_control_status_complete(uint8_t rhport)
2019-11-03 12:52:34 -05:00
hathach
e2b6f8c92b clean up 2019-11-04 00:11:23 +07:00
hathach
66ce39368e clean up 2019-11-04 00:10:46 +07:00
Nathan Conrad
5839159742 Enable UART debugging on F070. 2019-11-03 09:54:02 -05:00
hathach
65e96e5d52 added optional dcd_control_status_complete() 2019-11-03 18:00:07 +07:00
hathach
62f8c14fae add a bit of log1 for debugging 2019-11-03 14:08:38 +07:00
hathach
5ca75eb84c seperate DEBUG from LOG 2019-11-03 13:18:02 +07:00
hathach
585aebeb12 add uart support for stm32f072disco 2019-11-03 12:54:05 +07:00
hathach
2d98dae13e fix travis build issue 2019-11-03 11:45:41 +07:00
hathach
7bf01e218d make control buf static 2019-11-03 11:43:07 +07:00
William D. Jones
130d7ea530
Merge pull request #1 from hathach/cr1901-msp430f5529
PR to PR for msp430 port
2019-11-02 14:46:57 -04:00
hathach
1b51b78eaf hack the request length for the first get device descriptor if EP0 size =8 or 16
to prevent usbd control send out ZLP
2019-11-03 00:17:17 +07:00
hathach
a0cffdc843 Merge branch 'pigrew-ZLP_Request2' into cr1901-msp430f5529 2019-11-02 23:29:35 +07:00
hathach
51a834f0ae fix travis due to msp430 gcc link changes 2019-11-02 23:04:19 +07:00
hathach
b6ee180b66
add missing ceedling latest version files 2019-11-01 19:26:33 +07:00
hathach
79fbc0b23c
wait for scsi status complete before queueing for next scsi command
fix #207
2019-11-01 18:43:18 +07:00
hathach
838173efc3
remove TEST_FAIL() from TU_ASSERT, since it prevents we testing how stack response with failed assert 2019-11-01 18:27:15 +07:00
hathach
c7d7ac42d8
added first test for msc device 2019-11-01 18:11:14 +07:00
hathach
d0d87d98f6
add assert to prevent div by zero 2019-11-01 18:03:43 +07:00
hathach
83cbe32097
enable retrun_thru_ptr 2019-11-01 17:53:37 +07:00
hathach
5b68cc91ad
adding TEST_FAIL() for TU_ASSERT() 2019-11-01 17:50:40 +07:00
hathach
ab84731f2a
update test project yml 2019-11-01 17:49:46 +07:00
hathach
b25faa97c2
update ceedling to 0.29.0 2019-11-01 17:48:59 +07:00
hathach
774a9f63ab
enable cmock ignore_arg 2019-11-01 15:25:54 +07:00
hathach
e4da80a26c
adding tests for msc device 2019-11-01 13:42:41 +07:00
hathach
164d0db825
Merge branch 'ZLP_Request2' into pigrew-ZLP_Request2 2019-11-01 10:16:59 +07:00
hathach
ac0203b42f
update doc 2019-11-01 10:13:19 +07:00
hathach
981e64d8a1
implement pigrew review 2019-11-01 10:07:56 +07:00
Nathan Conrad
d35f86993f Merge remote-tracking branch 'origin/master' into ZLP_Request2 2019-10-31 12:23:54 -04:00
hathach
bd8b4e48dc
rename zlp test 2019-10-31 21:55:01 +07:00
hathach
f58726887a
update doc, hid set report 2019-10-31 21:28:46 +07:00
hathach
cacbb80a90
zlp should work with control in, tested with Unity framework 2019-10-31 21:14:06 +07:00
hathach
6067adcd08
adeded tests for zlp 2019-10-31 16:42:51 +07:00
hathach
6de9eb4b1a
add more tests, fix an issue with tud_descriptor_configuration_cb() return NULL 2019-10-31 13:06:57 +07:00
hathach
d9ba4d90a8
move function around, more rename 2019-10-31 12:26:36 +07:00
hathach
0029b58417
rename 2019-10-31 12:18:41 +07:00
hathach
e6857d8ee0
clean up 2019-10-31 11:25:41 +07:00
hathach
8a57997c0f Merge branch 'master' into pigrew-ZLP_Request2 2019-10-31 09:57:52 +07:00
hathach
4d329d46cc
Merge pull request #206 from hathach/develop
Added a couple of unit testing with Ceedling/Cmock/Unity
2019-10-31 08:29:11 +07:00
hathach
e69d2a4a83
move test_usbd around 2019-10-30 23:41:42 +07:00
hathach
0653e1d1f5
fix 2nd test when tud_descriptor_device_cb() return NULL 2019-10-30 23:34:09 +07:00
hathach
a0002cc709
rename usbd_init() to tud_init() 2019-10-30 23:26:34 +07:00
hathach
5808993402 add 2nd test, but failed due to lack of tusb_teardown() 2019-10-30 23:22:07 +07:00
hathach
8f2e70756b added firs usbd test with get device descriptor 2019-10-30 16:19:47 +07:00
hathach
16665672a4 initally adding test_usbd.c 2019-10-30 12:24:07 +07:00
hathach
880ac1e398 move dcd event helper to be dcd.h as inline function 2019-10-30 11:35:25 +07:00
William D. Jones
5d585c03bd dcd_msp430x5xx: Improve comments regarding SETUP packet handling. 2019-10-29 14:08:39 -04:00
William D. Jones
3f0f7cfd07 dcd_msp430x5xx: Clarify hardware STALL behavior and current vs ideal
behavior of driver in comments.
2019-10-29 12:52:56 -04:00
William D. Jones
ffeb61a710 msp_exp430f5529lp: Use ti submodule for includes and linker files. 2019-10-29 11:43:26 -04:00
William D. Jones
66faa96f16 tusb_option.h: Assign msp430 ID range 500+ to avoid conflict with Sony. 2019-10-29 11:33:34 -04:00
hathach
a29eb87c38 Merge branch 'ZLP_Request2' of https://github.com/pigrew/tinyusb into pigrew-ZLP_Request2 2019-10-29 18:19:10 +07:00
hathach
6e204ca567 add --allow-fw-update for convenience 2019-10-29 17:36:53 +07:00
hathach
f6a65720e5 should fix #184
only response up to EP0 size with get device descriptor if not
addressed.
2019-10-29 16:25:32 +07:00
hathach
71a4076e73 correct read()/write() retarget for msp430, fix msp430 button state 2019-10-29 16:24:09 +07:00
hathach
de333a6f18 clean up warning, msp430 gcc 8.3 fixed the library lto issue 2019-10-29 16:21:31 +07:00
hathach
78523301bb
Merge pull request #202 from smunaut/dfu-rt
Add support for DFU Runtime class for devices
2019-10-28 22:56:14 +07:00
Sylvain Munaut
03f1a6d926 Add example of usage for the DFU Runtime support
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2019-10-28 16:11:08 +01:00
Sylvain Munaut
ec4ecfa817 Add support for DFU Runtime class for devices
This is really just a few descriptors and then answering to the
request from the host to reboot into DFU mode.

That latter part is delegated to the app since this is platform
specific.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2019-10-28 16:11:08 +01:00
hathach
4e8c57171c Merge branch 'master' into cr1901-msp430f5529 2019-10-25 21:20:05 +07:00
hathach
5d975d9313
Merge pull request #203 from hathach/develop
add log support using uart with CFG_TUSB_DEBUG >= 2, close #200
2019-10-24 13:17:01 +07:00
hathach
6f952a8e84 fix missing board uart read/write() 2019-10-24 12:20:06 +07:00
hathach
33e3bf001c update boards doc 2019-10-24 12:07:37 +07:00
hathach
6ab0663c1a adding more log 2019-10-24 12:00:06 +07:00
hathach
661515a807 adding debug log function 2019-10-23 21:18:46 +07:00
hathach
78bf82291e add uart support for stm32f4nucleo board (via stlink cdc) 2019-10-19 18:19:59 +07:00
hathach
2f3f23fd94 change to use nrfx uarte 2019-10-18 18:30:09 +07:00
hathach
558b4dbde3 change DEBUG optimization option from O0 to Og
add uart write to board test example
2019-10-18 17:50:29 +07:00
hathach
90b6b5d137 clean up tusb_verify 2019-10-18 16:38:02 +07:00
hathach
195d0f5a14 adding log support with uart
started with pca10056
2019-10-12 00:02:51 +07:00
hathach
d9ef34276b update doc 2019-10-11 11:26:19 +07:00
William D. Jones
d0146be00b dcd_msp430x5xx: Fix typo in copy-paste in transmit_packet. 2019-10-10 04:19:48 -04:00
William D. Jones
c8e899fef0 dcd_msp430x5xx: Improve SETUP packet and EP0 NAK interactions, per
42.3.1.3 in Reference Manual; fix is incomplete but works.
2019-10-10 04:02:35 -04:00
hathach
e413c9efa3
Merge pull request #199 from hathach/develop
ti_driver as submodule
2019-10-10 11:31:29 +07:00
hathach
c42edc080c Merge branch 'master' into develop 2019-10-09 11:03:55 +07:00
hathach
b3a5bb3247
Update boards.md 2019-10-08 15:52:00 +07:00
hathach
0b6c031948
Update README.md 2019-10-08 15:49:37 +07:00
hathach
a861a20519
Merge pull request #195 from kamtom480/spresense
Add Spresense board
2019-10-08 15:40:34 +07:00
Kamil Tomaszewski
0cea82568c Disable/enable only USB interrupt 2019-10-08 09:58:56 +02:00
Kamil Tomaszewski
9923604221 Send SUSPEND and RESUME signals 2019-10-07 14:04:48 +02:00
Kamil Tomaszewski
b3872febe2 Disable/enable interrupt 2019-10-07 14:03:02 +02:00
hathach
f86f0e54a9 added ti_driver submodule 2019-10-07 15:06:36 +07:00
hathach
ada73a57c6 add ti_driver as submodule 2019-10-07 14:27:02 +07:00
William D. Jones
97af9e3332 msp_exp430f5529lp: Make board_millis atomic. 2019-10-06 20:44:06 -04:00
William D. Jones
16ff152129 msp_exp430f5529lp: Set up UART functionality. 2019-10-05 09:37:48 -04:00
Kamil Tomaszewski
0747c4b61b Add Spresense board 2019-10-04 13:19:34 +02:00
William D. Jones
e4a88bc826 examples: Fix #ifndef guard for CFG_TUD_ENDPOINT0_SIZE. 2019-10-04 05:36:51 -04:00
William D. Jones
c5ce4619a3 travis.yml: Add msp430 support. 2019-10-04 05:24:59 -04:00
hathach
281cd858b0
adding lpc1549, but couldnt recieve setup packet, though setup received interrupt is triggered 2019-10-04 15:56:45 +07:00
William D. Jones
a01b0a73c1 Remove accidentally-commited debug var. 2019-10-03 23:59:22 -04:00
William D. Jones
432e9dcd2e Merge remote-tracking branch 'pigrew/ZLP_Request2' into msp430f5529 2019-10-03 23:50:55 -04:00
hathach
13d37e4a36 lpcxpresso1549 board test running 2019-10-03 15:23:01 +07:00
hathach
7fd68efe7b couldn't get 32L4 running with crystal less mode 2019-10-03 13:37:10 +07:00
William D. Jones
5ee1070c16 Merge remote-tracking branch 'origin' into msp430f5529 2019-10-02 23:18:49 -04:00
William D. Jones
b0b737b42a usbd_control.c: Decide whether a control transfer has a data stage
based on setup packet wLength.
2019-10-02 23:02:55 -04:00
William D. Jones
05914de109 dcd_msp430x5xx: Fix typos in dcd_edpt_clear_stall. 2019-10-02 22:36:45 -04:00
hathach
0a20e91cc9
move linker file to blue pill bsp 2019-10-02 14:23:23 +07:00
hathach
e59742f200
Merge pull request #193 from hathach/develop
ported stm32f1, tested with f103 blue pill
2019-10-02 12:23:30 +07:00
William D. Jones
3edb5548e9 dcd_msp430x5xx: Ensure DBUF bit is cleared on endpoint open, as it
could get spuriously set in debugging sessions. cdc_msc functional.
2019-10-02 01:19:12 -04:00
Nathan Conrad
cef388b7bd Merge branch 'master' into ZLP_Request2 2019-10-02 01:15:47 -04:00
hathach
820a3705f5
Merge branch 'master' into develop 2019-10-02 12:13:47 +07:00
hathach
d84a31fd5f
Merge pull request #181 from pigrew/ST_FSDEV_EP0
ST FSDEV EP0 left in stall
2019-10-02 12:06:51 +07:00
hathach
0673be7724 ported stm32f1, tested with f103 blue pill 2019-10-02 12:01:34 +07:00
Nathan Conrad
1e193212d7 Add testcase for EP0 stall recovery to USBTMC test script. 2019-10-02 00:31:47 -04:00
Nathan Conrad
e5f38e3e86 Remove references to EP kind. 2019-10-02 00:11:16 -04:00
Nathan Conrad
838cfe02c1 Merge remote-tracking branch 'origin/master' into ST_FSDEV_EP0 2019-10-02 00:09:07 -04:00
William D. Jones
19ee519926 dcd_msp430x5xx: Correct byte count masks in transmit/receive routines. 2019-10-02 00:01:58 -04:00
hathach
ee63111ea0
Merge pull request #192 from hathach/develop
2nd attempt to fix #161
2019-10-02 10:37:26 +07:00
William D. Jones
54478aaa2a dcd_msp430x5xx: Add STALL support for nonzero endpoints. 2019-10-01 23:28:41 -04:00
William D. Jones
fad44c03c8 dcd_msp430x5xx: Fix TOGGLE bit behavior, clear stall when endpoint
opened due to reset potentially not resetting everything.
2019-10-01 23:03:39 -04:00
hathach
204791b3e7 2nd attempt to fix #161 2019-10-01 22:19:04 +07:00
hathach
d3e48da5a1
Merge pull request #191 from hathach/develop
fix #161 and enable -Wextra for more warnings
2019-10-01 16:09:18 +07:00
hathach
6479ee53d5 -Wno-error=cast-function-type is only available for gcc 8+, change travis dist to bionic 2019-10-01 15:43:28 +07:00
hathach
12609f818b fix #161 added volatile for ep_busy_map/ep_stall_map 2019-10-01 14:43:34 +07:00
hathach
d27291f288 Merge branch 'master' into develop 2019-09-30 14:45:34 +07:00
Nathan Conrad
4ea2a4ed60 Github's web interface changed line endings without asking me. Oops. 2019-09-29 10:45:13 -04:00
Nathan Conrad
0078be9c24
Merge branch 'master' into ZLP_Request2 2019-09-29 09:52:53 -04:00
William D. Jones
b623e3023e dcd_msp430x5xx: Implement receive_packet for all endpoints, correct
some mistakes in transmit_packet.
2019-09-29 03:58:30 -04:00
William D. Jones
549ad1d9b6 dcd_msp430x5xx: Fix missing mask when posting IN xfer events. 2019-09-29 03:02:59 -04:00
William D. Jones
838b431fac dcd_msp430x5xx: Implement transmit_packet for nonzero endpoints. Untested. 2019-09-29 02:43:05 -04:00
William D. Jones
2247f132ca Implement dcd_edpt_xfer for nonzero endpoints. 2019-09-29 02:22:09 -04:00
William D. Jones
ea0e799df6 dcd_msp430x5xx: Fix clear stall logic. 2019-09-29 02:17:59 -04:00
hathach
6446701041
Merge pull request #186 from pigrew/EP0_size_typo
CFG_TUD_ENDOINT0_SIZE v CFG_TUD_ENPDOINT0_SIZE
2019-09-29 13:05:39 +07:00
William D. Jones
529efcc0d2 dcd_msp430x5xx: Implement dcd_edpt_open. 2019-09-29 00:21:40 -04:00
William D. Jones
5d9f833915 dcd_msp430x5xx: Implement STALL logic for EP 0. 2019-09-28 02:09:03 -04:00
William D. Jones
63c94ff684 dcd_msp430x5xx: Improve EP0 IN handling (reuse short_packet field). 2019-09-28 01:51:05 -04:00
William D. Jones
030560792d dcd_msp430x5xx: Implement dcd_set_address. 2019-09-27 21:59:45 -04:00
William D. Jones
3ac43076da dcd_msp430x5xx: Implement EP0 IN xfers, clean up. 2019-09-27 21:22:19 -04:00
Nathan Conrad
c4483d244b Fix typo of CFG_TUD_ENDOINT0_SIZE. 2019-09-27 21:22:19 -04:00
Nathan Conrad
4ccdc5522d Fix typo of CFG_TUD_ENDOINT0_SIZE. 2019-09-27 12:41:46 -04:00
Nathan Conrad
91fa24d99c Merge branch 'master' into ZLP_Request2 2019-09-27 00:37:21 -04:00
hathach
6183dbd0ce add -Wextra for more warnings to example
non-stack warning (probably mcu driver) should be suppressed in the
board.mk
2019-09-27 00:15:43 +07:00
Nathan Conrad
f19082f02d Reset TX and RX endpoints to NAK when receiving setup packet. 2019-09-25 20:55:15 -04:00
Nathan Conrad
048e0448c0 ST FSDEV:Remove setting the EP kind, as I think it was causing issues during enumeration (sometimes). Also move a membar. 2019-09-25 20:54:59 -04:00
hathach
9a8d23e95e
Merge pull request #160 from pigrew/usbtmc
Add usbtmc class driver (READY FOR TESTING)
2019-09-26 00:38:37 +07:00
Nathan Conrad
6841b236e8 Remove _app from callback function names. 2019-09-25 12:47:05 -04:00
Nathan Conrad
6c6a01cbcd USBTMC: Minor updates to testing script. 2019-09-25 12:46:45 -04:00
Nathan Conrad
3a87dd65d7 Change getting the capabilities structure to a callback instead of an extern struct. 2019-09-25 12:46:35 -04:00
Nathan Conrad
2d4352bfe9 Rename USBTMC functions. 2019-09-25 12:46:25 -04:00
Nathan Conrad
412a279073 I never understood why I need to write void as empty function arguments. 2019-09-24 13:54:45 -04:00
Nathan Conrad
624f4bf4ce Remove rhport from app code. If anything, it should be the interface_id. Assume a single interface, for now. 2019-09-24 13:42:29 -04:00
Nathan Conrad
10105557dc Let application control interface latency... 2019-09-24 13:11:45 -04:00
William D. Jones
01b4115b0b dcd_msp430x5xx: Fix Setup packet delay by actually enabling
corresponding interrupt.
2019-09-24 04:06:34 -04:00
William D. Jones
550e8215f3 dcd_msp430x5xx: Setup packets are now received successfully (with delay). 2019-09-24 03:43:51 -04:00
William D. Jones
d2e4af5a7b msp430f5529: Change EP0 size to 8, implement interrupt logic up to bus
reset detection.
2019-09-24 02:41:11 -04:00
hathach
1d49fb42ce
Merge pull request #180 from cr1901/ep0-override
examples: Allow user to override EP0 size.
2019-09-24 10:35:25 +07:00
William D. Jones
11de9f0ffd examples: Allow user to override EP0 size. 2019-09-23 23:12:04 -04:00
William D. Jones
742f1f23c5 examples: Allow user to override EP0 size. 2019-09-23 23:11:47 -04:00
William D. Jones
950614a841 msp430f5529: Implement dcd_int_enable/disable. 2019-09-23 22:58:49 -04:00
William D. Jones
a6a79df9fb msp430f5529: Enable clocks/PLL for msp_exp430f5529lp and enable USB
module in dcd_msp430x5xx; device does not enumerate.
2019-09-23 18:53:31 -04:00
William D. Jones
907bc3df9b msp430f5529: Ensure cdc_msc demo compiles. 2019-09-23 17:48:18 -04:00
Nathan Conrad
e61f2b7393 Retool stalling EP on xfer errors. 2019-09-22 09:55:28 -04:00
Nathan Conrad
757c2cdc5b Merge remote-tracking branch 'origin/master' into usbtmc 2019-09-22 09:30:45 -04:00
hathach
7ba8e81852
Merge pull request #177 from cr1901/fifo-fix
dcd_synopsys: Fix off-by-one error in FIFO allocation.
2019-09-22 11:38:54 +07:00
hathach
b1d29947bc
Merge pull request #175 from pigrew/clear_feature_ordering
Clear feature ordering
2019-09-22 11:00:35 +07:00
William D. Jones
108f756e22 dcd_synopsys: Fix off-by-one error in FIFO allocation. 2019-09-21 23:01:06 -04:00
Nathan Conrad
fa5b5e4561 Lots of updates (especially error handling) 2019-09-21 21:46:46 -04:00
Nathan Conrad
2aa10daf26 Merge branch 'clear_feature_ordering' into usbtmc 2019-09-21 21:39:25 -04:00
Nathan Conrad
ec3414ca3a Merge branch 'master' into usbtmc 2019-09-21 21:38:05 -04:00
Nathan Conrad
9498adef71 Changing the bitwise to a logical OR created a huge hard to find bug. It shortcutted the call to the class function,
so, lets use shortcutting anyway?
2019-09-21 19:29:57 -04:00
Nathan Conrad
fbb8520acd logical or. 2019-09-21 14:34:29 -04:00
Nathan Conrad
37b52e354f Correct wording of comment on handling EP requests. 2019-09-21 12:17:17 -04:00
Nathan Conrad
a187f0268c When unstalling, EP must be marked as not busy. Also, mark EP as busy when stalling as xfer requests should fail. 2019-09-21 12:05:57 -04:00
Nathan Conrad
be28a05409 Make type casting explicit 2019-09-21 12:05:46 -04:00
Nathan Conrad
55abb3d717 Calling EP open with bad parameters should be considered a bug. 2019-09-21 12:02:52 -04:00
Nathan Conrad
aebecf169a Reorder handling of EP control requests, 2019-09-21 12:02:06 -04:00
Nathan Conrad
b6590490a8 USB Control: Pointer arithmetic on void* is forbiden 2019-09-21 12:00:52 -04:00
Nathan Conrad
ce9f133d25 FSDEV: go to NAK when unstalling; on reset, set EP0 to NAK, prioritize reset interrupt, fix small typos. 2019-09-21 12:00:04 -04:00
hathach
f90f1a278b
Merge pull request #169 from pigrew/hid_desc
Implement HID desc request.
2019-09-21 00:06:51 +07:00
Nathan Conrad
8a688cd8d0 Revert "Revert "Also need to just return false in the case that it isn't an interface control event. We shouldn't assert. This normally isn't an""
This reverts commit 2281a51484.
2019-09-20 12:58:26 -04:00
Nathan Conrad
2281a51484 Revert "Also need to just return false in the case that it isn't an interface control event. We shouldn't assert. This normally isn't an"
This reverts commit f241ff389f.
2019-09-20 12:27:41 -04:00
hathach
c08fcbbef5
Merge pull request #172 from hathach/develop
Ported stm32 L0 and tested with L0358 discovery board
2019-09-20 23:22:55 +07:00
hathach
c975976a75 update doc 2019-09-20 23:05:08 +07:00
Nathan Conrad
f241ff389f Also need to just return false in the case that it isn't an interface control event. We shouldn't assert. This normally isn't an
error, either, so I don't want to use TU_VERIFY.
2019-09-20 08:56:46 -04:00
Nathan Conrad
a8a65d6cea Use cached HID descriptor. 2019-09-20 08:46:17 -04:00
Nathan Conrad
345806a533 Merge remote-tracking branch 'origin/master' into usbtmc 2019-09-20 08:42:20 -04:00
hathach
94c9cf0eff doc update 2019-09-20 16:14:35 +07:00
hathach
7b2f8cc73a added stm32 L0 support
close #125
2019-09-20 13:49:33 +07:00
hathach
32dcc06429 Merge branch 'master' into develop 2019-09-20 13:09:38 +07:00
hathach
6fb142b0ae Merge branch 'master' of github.com:hathach/tinyusb 2019-09-20 13:08:29 +07:00
hathach
199a628c79
Merge pull request #165 from pigrew/fsdev_smallPacket
Fsdev small packet
2019-09-20 13:07:06 +07:00
hathach
80b430fcfc added stm32L0538 discovery board, board test exmaple works 2019-09-20 13:02:17 +07:00
Nathan Conrad
02b468f56a (little typo fix) 2019-09-19 21:20:04 -04:00
Nathan Conrad
05164c5a27 Cache pointer to HID descriptor. 2019-09-19 21:04:51 -04:00
Nathan Conrad
2a7ca15e2c Rename functions to include tud_ and _cb 2019-09-19 20:43:49 -04:00
Nathan Conrad
f3d6d0127b Rename USBTMC_CFG_ENABLE_488, and fix build with it off. 2019-09-19 19:59:44 -04:00
Nathan Conrad
d742c3e15c s/USBTMC488/USB488/ ; fix types in bitfield 2019-09-19 19:56:00 -04:00
Nathan Conrad
7e0490bbf3 Move descriptors to usbd.h 2019-09-19 19:51:37 -04:00
Nathan Conrad
346443118f Add testcase for aborting bulk in with no data queued (and fix aborting bulk in) 2019-09-19 19:01:08 -04:00
Nathan Conrad
0f1435177b Add trigger test code. 2019-09-19 19:00:02 -04:00
Nathan Conrad
0548f97d33 Remove debug printf. 2019-09-19 18:59:57 -04:00
Nathan Conrad
525b4cdb72 Use ESOF for wakeup timing. 2019-09-19 09:51:40 -04:00
Nathan Conrad
642afeea8b s/static const/define/ 2019-09-19 09:30:16 -04:00
Nathan Conrad
85623584f9 Remove debug assertions. 2019-09-19 09:24:52 -04:00
Nathan Conrad
5fcc1468eb Merge branch 'master' into fsdev_smallPacket 2019-09-19 09:16:48 -04:00
William D. Jones
49f2507b38 msp_exp430f5529lp: Implement enough functionality for board_test. 2019-09-19 01:21:29 -04:00
Nathan Conrad
d4b2dff7c4 Fix more TX bugs... and add variable response delay to the example project. 2019-09-19 00:00:27 -04:00
Nathan Conrad
9a726dc7ed More fixes, and a bit of SRQ. 2019-09-18 21:34:26 -04:00
Nathan Conrad
99d03fcaee small fixes 2019-09-18 19:30:44 -04:00
Nathan Conrad
eea71a8b3b usbtmc updates.... 2019-09-18 19:24:54 -04:00
hathach
3440083bfd added board feather stm32f045 2019-09-18 14:38:56 +07:00
Nathan Conrad
f9a2e8e405 Many updates for USBTMC. 2019-09-17 13:32:54 -04:00
Nathan Conrad
ac2c9ff02f Merge branch 'master' into usbtmc 2019-09-17 13:31:53 -04:00
Nathan Conrad
6dd2296cfc Change inline functions to macros, and make all parameter names uniform. 2019-09-17 13:29:42 -04:00
hathach
237c32b976 fix #143 2019-09-17 13:29:42 -04:00
Nathan Conrad
5a2e510af7 Interpretation of assert vs verify. 2019-09-17 13:29:41 -04:00
hathach
8e17fb4910 follow up to suggestion to pr 155 2019-09-17 13:29:41 -04:00
William D. Jones
ff36957c05 pyboardv11: Fix typo in HSE_VALUE define so that SysTick runs at correct
frequency.
2019-09-17 13:29:41 -04:00
William D. Jones
192e1de66e Add pyboard (v1.1) BSP. cdc_msc_hid example tested. 2019-09-17 13:29:41 -04:00
Nathan Conrad
1ceeab2702 This demonstrates that I don't pre-build things before committing them... oops. 2019-09-17 13:29:40 -04:00
Nathan Conrad
8d05b70a72 Off-by-one error in Synopsys assertions. (and move some braces to their own lines. 2019-09-17 13:29:40 -04:00
Nathan Conrad
41e8b8752e Massive copy&paste typo of mine in the 32-bit byte swapping function.... 2019-09-17 13:29:40 -04:00
Nathan Conrad
a0b6b8187c TI compiler quirks, and le byte swapping functions. 2019-09-17 13:29:40 -04:00
hathach
fd4be23900 Update boards.md 2019-09-17 13:29:39 -04:00
hathach
44013e6e85 Update boards.md 2019-09-17 13:29:39 -04:00
Nathan Conrad
45b69a30a8 Correct port assigned on the STM32F070 BSP 2019-09-17 13:29:39 -04:00
Nathan Conrad
c7006a254b change 3 2019-09-17 13:29:39 -04:00
Nathan Conrad
91cd247c97 changes 2 2019-09-17 13:29:39 -04:00
Nathan Conrad
45871001e6 Changes1... 2019-09-17 13:29:38 -04:00
Nathan Conrad
e234998c6c More proper handling of clear. 2019-09-17 13:29:38 -04:00
Nathan Conrad
c755aee7d0 Clear 2019-09-17 13:29:38 -04:00
Nathan Conrad
915f52730d Implement HID desc request. 2019-09-17 11:28:29 -04:00
hathach
77cc5b1b0c
Merge pull request #157 from pigrew/TI_compiler_quirks
TI compiler quirks, and LE byte swapping functions.
2019-09-17 17:47:19 +07:00
Nathan Conrad
89ffe78f84 ST FSDEV: No need to always reset the interrupt priority, also add some synchronization primitives after disabling interrupts. 2019-09-16 22:56:17 -04:00
Nathan Conrad
a33a854793 Include board header file... :X 2019-09-16 20:56:57 -04:00
Nathan Conrad
d341337c6a Implement remote wakeup + perhaps better sleep? 2019-09-16 20:25:50 -04:00
hathach
13f7121285 add pyboard v1.1 link to bsp 2019-09-16 23:42:56 +07:00
hathach
a161ade338 Merge branch 'master' of github.com:hathach/tinyusb 2019-09-16 23:39:04 +07:00
Nathan Conrad
dfe92542e6 Change inline functions to macros, and make all parameter names uniform. 2019-09-16 11:27:05 -04:00
Nathan Conrad
889c17a442 Merge branch 'master' into TI_compiler_quirks 2019-09-16 09:24:27 -04:00
Nathan Conrad
6b9783cead s/unsigned int/uint32_t/ 2019-09-16 09:20:15 -04:00
hathach
0c70948d0d
Merge pull request #163 from hathach/develop
fix #143
2019-09-16 16:37:27 +07:00
hathach
a37d2d64be fix #143 2019-09-16 13:32:47 +07:00
hathach
88dd83ae5c
Merge pull request #159 from pigrew/assert_documentation
Documentation: assert vs verify.
2019-09-16 11:29:39 +07:00
hathach
19e7b7d85c
Merge pull request #155 from hathach/develop
fix #154 forward all endpoint recipeint request to class driver
2019-09-16 11:27:52 +07:00
hathach
9c5ae0369b follow up to suggestion to pr 155 2019-09-16 11:13:17 +07:00
Nathan Conrad
05c13342a3 Implement EP with size <64. 2019-09-15 23:51:42 -04:00
Nathan Conrad
18303e742e Covert macros to inline functions. 2019-09-15 23:46:03 -04:00
Nathan Conrad
ae873a709e Wrote TX instead of RX. 2019-09-15 23:33:36 -04:00
Nathan Conrad
9593463367 Massive copy&paste typo of mine in the 32-bit byte swapping function.... 2019-09-15 15:20:01 -04:00
Nathan Conrad
e53e9bd4f0 Simulate query delay; getting to a point where implementing clear/aborts makes
sense. Probably adding too many concurance issues; need to figure out
semaphores.
2019-09-14 21:26:43 -04:00
William D. Jones
772b0c17bf rules.mk: Create an LDINC variable for linker script search path. 2019-09-14 21:16:10 -04:00
William D. Jones
d464c26ab2 msp430f5529: Remove -nostdlib and -nostartfiles, as the compiler
provides them.
2019-09-14 21:06:57 -04:00
Nathan Conrad
64bfec79b2 Change requset type parameter back to uint8_t (fix type cast), support USB indicator pulse 2019-09-14 18:11:07 -04:00
William D. Jones
6280e4e7cb msp430f5529: Add empty msp_exp430f5529lp BSP and DCD. 2019-09-14 18:02:17 -04:00
Nathan Conrad
6e00886ffb Handle USBTMC TermChar. 2019-09-14 17:15:34 -04:00
Nathan Conrad
acd8fa7650 (and update the example to match) 2019-09-14 16:56:53 -04:00
Nathan Conrad
e74c6b0874 Combined status response enum (std with 488), support trigger. 2019-09-14 16:51:02 -04:00
Nathan Conrad
1cae96951f Add usbtmc class driver. 2019-09-14 13:35:08 -04:00
Nathan Conrad
21ba37aec6 Interpretation of assert vs verify. 2019-09-14 11:25:40 -04:00
hathach
98a68d600c
Merge pull request #131 from cr1901/pyboard
Add PyBoard BSP
2019-09-14 16:31:43 +07:00
William D. Jones
d7137e36ca pyboardv11: Fix typo in HSE_VALUE define so that SysTick runs at correct
frequency.
2019-09-14 04:32:10 -04:00
hathach
cdc0c36c3f
Merge pull request #158 from pigrew/fix_assertion_off_by_one_synopsys
Off-by-one error in Synopsys assertions. (and move some braces to the…
2019-09-14 11:28:50 +07:00
Nathan Conrad
4ea212a432 This demonstrates that I don't pre-build things before committing them... oops. 2019-09-13 23:52:43 -04:00
Nathan Conrad
c831311a12 Off-by-one error in Synopsys assertions. (and move some braces to their own lines. 2019-09-13 23:38:58 -04:00
Nathan Conrad
bb7f581b6d TI compiler quirks, and le byte swapping functions. 2019-09-13 20:28:26 -04:00
hathach
ac8c343fef fix #154 forward all endpoint recipeint request to class driver
fix typo
remove magic number 0xff of driver id
2019-09-13 22:16:24 +07:00
hathach
de386751b5
Update boards.md 2019-09-13 18:43:46 +07:00
hathach
a75d77417a
Update boards.md 2019-09-13 18:42:58 +07:00
hathach
da548abade
Merge pull request #153 from hathach/develop
fix #152, potential memory issue
2019-09-13 14:18:24 +07:00
hathach
064adebbd0 fix #152, potential memory issue 2019-09-13 14:03:59 +07:00
hathach
9e96c10014
Merge pull request #151 from hathach/develop
fix #139, correct usbd request intepreting, Non-STD request to Interf…  … …ace must be forward to class driver
2019-09-13 13:14:18 +07:00
hathach
c3598f0301 fix #139, correct usbd request intepreting, Non-STD request to Interface must be forward to class driver 2019-09-13 13:03:11 +07:00
Nathan Conrad
705b8be956 Merge branch 'master' into ZLP_Request2 2019-09-13 01:14:54 -04:00
hathach
986beda9eb adding stm32l4 support, board test run with stm32l476disco, usb doens't work yet 2019-09-13 11:22:44 +07:00
hathach
a00ea9a11d
Merge pull request #148 from pigrew/stm32f070rbnucleo_port_assignment
Correct port assigned on the STM32F070 BSP
2019-09-13 10:33:38 +07:00
Nathan Conrad
1e17e2e764 Add details on dcd_edpt_xfer in the porting document. 2019-09-12 16:54:25 -04:00
Nathan Conrad
8cca287683 Add verification that there is enough buffer space for HID OUT control transfer. 2019-09-12 16:07:12 -04:00
Nathan Conrad
340dcb81bf For control transfers, compare the transmitted length against the requested length to know if a ZLP needs to happen. (fixes #139) 2019-09-12 16:06:45 -04:00
Nathan Conrad
f830f6956e Correct port assigned on the STM32F070 BSP 2019-09-12 14:53:53 -04:00
hathach
d256f33bba
Merge pull request #146 from hathach/develop
ported stm32f2
2019-09-12 11:49:30 +07:00
hathach
72046d957c fix #145 2019-09-12 10:43:16 +07:00
hathach
ff7261600c ported stm32f2, added board stm32f207zg nucleo
close #127
2019-09-12 10:41:03 +07:00
hathach
3a17ae8714 Merge branch 'master' into develop 2019-09-12 10:11:22 +07:00
hathach
27371247ee update doc 2019-09-12 10:10:58 +07:00
hathach
e5d0ee53c4
Merge pull request #141 from pigrew/stfsdev_cleanups
Stfsdev cleanups
2019-09-12 09:52:51 +07:00
Nathan Conrad
d3507b0787 Merge remote-tracking branch 'origin/master' into stfsdev_cleanups 2019-09-11 20:36:48 -04:00
Nathan Conrad
3326b9d008 Use types with explicit bit widths. 2019-09-11 20:33:47 -04:00
William D. Jones
6b79f399a1 Merge branch 'master' of https://github.com/hathach/tinyusb into pyboard 2019-09-11 14:14:02 -04:00
hathach
2683d60b33
Merge pull request #142 from hathach/develop
ported stm32f7
2019-09-11 23:17:31 +07:00
hathach
7f166d860d stm32f7 work with dcd synopsis
close #124
2019-09-11 22:48:07 +07:00
Nathan Conrad
7b93177890 Use TU_VERIFY_STATIC, use more uint instead of uint8_t/uint16_t. Create reg16_clear_bits function to reduce typec conversion warnings. 2019-09-11 09:45:48 -04:00
Nathan Conrad
784dc52b62 Update header comments. 2019-09-11 09:44:25 -04:00
Nathan Conrad
4cf2b30759 Fix bug where the EPREGs were not being initialized as expected. 2019-09-11 09:43:57 -04:00
hathach
a3f1c269e9 added stm32f767nucleo board, board_test works 2019-09-11 18:02:27 +07:00
hathach
de659be83e tested all the stm32f4 board, work great 2019-09-11 17:37:23 +07:00
hathach
9cc355d302
Merge pull request #140 from hathach/develop
ported stm32f3, close #67
2019-09-11 17:14:55 +07:00
hathach
8a2b228c3f ported stm32f3, close #67 2019-09-11 16:56:26 +07:00
hathach
e3996b7d45
Merge pull request #138 from hathach/develop
rename cdc_msc_hid to cdc_msc, hid has its own example hid_composite now
2019-09-11 14:32:00 +07:00
hathach
7599541c1a rename cdc_msc_hid to cdc_msc, hid has its own example hid_composite now 2019-09-11 13:09:14 +07:00
hathach
e9bf62bc13 remove hid in cdc_msc_hid demo since many of stm32 mcu doesn't have enough endpoint to run this example 2019-09-11 13:07:11 +07:00
hathach
cbf9f6e0dc added new example hid_composite 2019-09-11 13:00:15 +07:00
hathach
c2e0f565e8
Merge pull request #137 from hathach/develop
added stm32f072disco board
2019-09-11 12:59:50 +07:00
hathach
a337b2a0cb update docs 2019-09-11 12:08:45 +07:00
hathach
ec50b274fc added stm32f072disco board
close #104
2019-09-11 12:05:55 +07:00
hathach
3f02c35983 fix #130 2019-09-11 11:55:16 +07:00
hathach
34b76898da adding stm32f072disco board, board_test example running 2019-09-11 11:41:47 +07:00
hathach
bf76a1e49e
Merge pull request #136 from hathach/develop
fix #132
2019-09-11 11:16:47 +07:00
hathach
6c6a597465 fix #132 2019-09-11 10:47:07 +07:00
hathach
678ba586df
Merge pull request #122 from cr1901/synopsys
Synopsys Refactor
2019-09-11 10:37:49 +07:00
William D. Jones
fc10ff2f05 Add pyboard (v1.1) BSP. cdc_msc_hid example tested. 2019-09-10 14:10:33 -04:00
hathach
f5e58a09ad
Merge pull request #123 from pigrew/stm32_fsdev
STM32 FS Device Driver
2019-09-11 00:06:34 +07:00
Nathan Conrad
4f6bedeac9 Rename the STM32 MCU options. 2019-09-10 12:57:43 -04:00
hathach
b6a5cf83c4 update st_driver 2019-09-10 23:55:45 +07:00
Nathan Conrad
23d39f2b15 Remove OPT_MCU_STM for L and G series. 2019-09-10 12:13:36 -04:00
Nathan Conrad
65e72de7ce Move interrupt handler into device driver, and rename the OPT_MCU_STM32 constants. 2019-09-10 09:35:52 -04:00
Nathan Conrad
2cf2f35fa3 Correct JLINK_DEVICE and FREERTOS_PORT in F070RB make file. FreeRTOS and j-link are untested. 2019-09-10 08:28:56 -04:00
Nathan Conrad
49c58be4ce Fix silly typo in the F3xx support. 2019-09-10 01:31:14 -04:00
Nathan Conrad
bc2a65b20b A few bug fixes, remove the unstested device notices, note supported boards in READMEs, and implement PMA
access stride (used on MCU's with 512 byte USB buffers).
2019-09-10 01:03:24 -04:00
Nathan Conrad
8f3c0663ad Set MSC DISK DUAL readonly on F070. 2019-09-09 19:51:22 -04:00
Nathan Conrad
532abadb78 Ignore build artifact files. 2019-09-09 19:21:29 -04:00
Nathan Conrad
f7b0aeec52 Start clock on F0 and F0, and handle USB interrupts. 2019-09-09 19:20:26 -04:00
Nathan Conrad
d1976a30b3 Update F3 BSP and create F070RB BSP. Both are untested (but compile). 2019-09-09 16:14:38 -04:00
Nathan Conrad
5ec59c2a30 Add STM32 FSDEV driver. 2019-09-09 14:55:39 -04:00
Nathan Conrad
75a3f791e3 Remove some type conversion warnings (using GCC pedantic warnings) 2019-09-09 13:35:41 -04:00
Nathan Conrad
4517d504b8 Fix typo of ENDOINT 2019-09-09 13:34:30 -04:00
Nathan Conrad
b4c8a09f20 Remove STM32 F3 port. 2019-09-09 13:29:26 -04:00
Nathan Conrad
96bead4b2a Add dummy arguments to GET_NTH_ARG to make GCC happy (removes pedantic warnings) 2019-09-09 13:24:08 -04:00
William D. Jones
1385d7c494 stm32: Refactor so F4 and H7 use a single Synopsys IP source file. 2019-09-09 10:48:14 -04:00
William D. Jones
82cd4b5350 dcd_stm32f4: Merge relevant changes from dcd_stm32h7. 2019-09-09 10:27:46 -04:00
William D. Jones
3efc81b285 dcd_stm32h7: Merge relevant changes from dcd_stm32f4. USB2 -> USB works as alias. 2019-09-09 10:14:20 -04:00
hathach
3f5b17ef84 doc update 2019-09-09 17:33:06 +07:00
hathach
b9b9f67698 ngx4330 usb0 work well 2019-09-09 17:30:43 +07:00
hathach
3497dd0264 adding ngx4330 2019-09-09 16:47:57 +07:00
hathach
218aaf94de more clean up 2019-09-09 13:19:00 +07:00
hathach
4f4182e171 clean up lpc makefile 2019-09-09 12:39:58 +07:00
hathach
8ac115a33e clean up 2019-09-09 12:25:39 +07:00
hathach
b76baeda97 docs update 2019-09-09 11:24:43 +07:00
hathach
4fe34c8f9b
Merge pull request #120 from hathach/develop
Ported STM32F412 Discovery board, close #102
2019-09-09 00:53:05 +07:00
hathach
f808153631 update doc 2019-09-09 00:47:04 +07:00
hathach
c2d0d2d4d8 update config 2019-09-09 00:41:17 +07:00
hathach
e123cad7bb enhance dcd stm32f4 to support max 4 or 6 endpoints on 407 or 412 2019-09-08 23:10:51 +07:00
hathach
4663f9084d ported board stm32f412g discovery
- added soft connect for enable pull up register dcd stm32f4
2019-09-08 21:57:02 +07:00
hathach
642ff56b32 ported pca10059 2019-09-08 21:55:03 +07:00
hathach
8fd7836ff6 added board stm32f412 discovery, board_test exmaple run 2019-09-06 17:31:37 +07:00
hathach
f5bb48fed5 update docs 2019-09-06 16:50:00 +07:00
hathach
a5b8a67c80 lpc11u37 supported 2019-09-06 16:02:39 +07:00
hathach
b1296139d0 board test run with lpcxpresso 11u37 2019-09-06 15:49:42 +07:00
hathach
4ef3946a25 adding lpcxpresso11u37 board 2019-09-06 15:06:04 +07:00
hathach
192a95a96e moving lpc11u6x 2019-09-06 12:07:48 +07:00
hathach
5fc6819ddb update submodule st_driver with all stm32 families 2019-09-06 10:47:30 +07:00
hathach
6b7fe012f6
Merge pull request #118 from hathach/develop
replace stm32lib submodule by st_driver
2019-09-06 00:00:38 +07:00
hathach
aa50ba54ef remove submodule stm32lib 2019-09-05 23:45:53 +07:00
hathach
fae8a944f0 swith stm32h7 to use st_driver 2019-09-05 23:39:09 +07:00
hathach
1d2223a116 switch stm32f3 to use st_driver 2019-09-05 22:41:58 +07:00
hathach
c4b384d22f switch stm32f4 to use st_driver submodule 2019-09-05 22:12:43 +07:00
hathach
56f1ccd68a fix #97 2019-09-05 21:59:19 +07:00
hathach
50b0826d4f adding st_driver as submodule 2019-09-05 21:34:49 +07:00
hathach
1c6516aee9 doc update 2019-09-05 16:24:59 +07:00
hathach
143a138028
Merge pull request #116 from hathach/develop
Board update
2019-09-05 16:18:34 +07:00
hathach
a90e2aa2ce 55s69 device work with usb0 2019-09-05 16:12:13 +07:00
hathach
7350e9c25c
Merge pull request #114 from cr1901/stm32h7
STM32H7 Support
2019-09-05 15:29:13 +07:00
hathach
dd07e743d8 added mbed lpc1768 board 2019-09-05 14:29:17 +07:00
William D. Jones
8f8ca77a91 stm32h7: Mark USB FIFOs as volatile, otherwise optimizations will remove
reads/writes to the FIFOs.
2019-09-04 01:06:07 -04:00
hathach
2e00019aae board_test work with lpcxpresso55s69 2019-09-03 13:25:36 +07:00
William D. Jones
910fd867c7 stm32h7: Fix indentation error where OUT XFER interrupt wasn't handled
in the correct scope.
2019-09-03 01:37:44 -04:00
William D. Jones
1a3dc9cba1 stm32h7: USB_OTG_FS -> USB2_OTG_FS. 2019-09-03 01:28:41 -04:00
William D. Jones
4ce8796b2a board_stm32h743nucleo: Implement user button for mouse/keyboard demo. 2019-09-03 01:28:41 -04:00
William D. Jones
f703a74daa stm32h7: Implement STALL logic for endpoints. 2019-09-03 01:28:41 -04:00
William D. Jones
28b131ea94 stm32h7: Implement dcd_edpt_open. cdc_msc_hid demo functional. 2019-09-03 00:37:50 -04:00
William D. Jones
d4302dacc5 stm32h7: Fix accidental overwrite of STUPCNT field in DOEPTSIZ register. 2019-09-03 00:25:21 -04:00
William D. Jones
9210167603 stm32h7: Implement dcd_set_address. 2019-09-02 21:00:30 -04:00
William D. Jones
0d0b802ee0 stm32h7: Implement IN and OUT receive for EP0; device descriptor returned. 2019-09-02 19:32:11 -04:00
William D. Jones
f602534536 stm32h7: Implement setup packet events. 2019-09-02 13:34:33 -04:00
hathach
ee57113981 trying to add LPC55xx support 2019-09-02 15:53:12 +07:00
hathach
85fae75fba clean up 2019-09-02 15:34:47 +07:00
hathach
6268f395eb add button for stm32f407 and stm32f411 board 2019-09-02 14:58:46 +07:00
hathach
47cf7f2245
Merge pull request #112 from hathach/develop
Adding support for LPC54114
2019-09-01 23:37:37 +07:00
hathach
f2bbb75695 clean up 2019-09-01 22:44:56 +07:00
hathach
67d2cf39d5 clean up 2019-09-01 21:04:43 +07:00
hathach
80cde5b0b5 fix potential bug with mis-align issue 2019-09-01 17:20:10 +07:00
hathach
074681da8b dma of lpc54114 can also execute up to 64 bytes each transfer
There is still issue with cdc_msc_hid example
2019-09-01 17:05:34 +07:00
hathach
aeea6754af rename lpc_usbd to lpc_ip3511 2019-09-01 16:44:40 +07:00
hathach
3067809957 adding lpc54xxx to dcd, able to go through enumeration 2019-09-01 16:15:23 +07:00
hathach
403662a1d6 board_test run with lpc54114 2019-09-01 15:58:42 +07:00
hathach
fb1ca24b02 adding lpc54114 port 2019-09-01 15:30:25 +07:00
hathach
96f0f8d2d7 update lpc_driver 2019-09-01 15:13:56 +07:00
hathach
e99ff703dc more lpc51u68 driver clean up 2019-09-01 15:11:09 +07:00
hathach
a5a768e5f7 update lpc51u68 linker 2019-09-01 14:58:36 +07:00
hathach
803d06d685 clean up 2019-09-01 14:51:40 +07:00
hathach
1f31d1b484
Merge pull request #111 from hathach/develop
Added new boards
2019-09-01 12:11:26 +07:00
hathach
957201fc58 fix undef __ARM_ARCH_6M__ 2019-09-01 11:59:50 +07:00
hathach
3aa6e84d98 update doc 2019-09-01 11:54:56 +07:00
hathach
c18a7fd9ad Port new board circuitplayground_bluefruit, close #109 2019-09-01 11:51:12 +07:00
hathach
7010ea79c4 added new board circuit playground express, close #110 2019-09-01 11:44:55 +07:00
hathach
c6f356b4f4 change feather/metro m4_express button to D5 2019-09-01 11:20:22 +07:00
hathach
f02a24a10f change metro_m0_express button to D5 2019-09-01 11:11:26 +07:00
hathach
bb21568875 ported feather m0 express close #108 2019-09-01 11:10:28 +07:00
hathach
2d041aaa1d clean up 2019-09-01 08:11:22 +07:00
hathach
451a415663
Merge pull request #107 from hathach/develop
support LPC51u68 MCU, close #100
2019-09-01 07:56:57 +07:00
hathach
8ae6c76d7c update readme and board md 2019-09-01 00:56:58 +07:00
hathach
30f707cad2 rename lpc11_13_15 to simply lpc_usbd since it is almost used by in recent year for nxp mcu 2019-09-01 00:51:58 +07:00
hathach
0ab8829e55 fix segger embbeded studio compile issue 2019-08-31 23:53:10 +07:00
hathach
c782cc5429 add lpc_driver submobule 2019-08-31 23:20:18 +07:00
hathach
237c7018d9 remove submodule lpcopen 2019-08-31 23:19:35 +07:00
hathach
bac75a81fd support LPC51u68 #100 2019-08-31 22:44:08 +07:00
hathach
c70c61ce26 add button read to board_test example 2019-08-31 17:52:24 +07:00
hathach
b7dbc98ab1 close #105 add tud_vendor_write_available() 2019-08-31 16:31:07 +07:00
William D. Jones
8b165e1024 stm32h7: Ensure FS (and the only) PHY is selected for OTG_HS2. 2019-08-30 22:07:35 -04:00
William D. Jones
7153561984 stm32h7: Enable USB peripheral (device does not enumerate yet). 2019-08-30 21:57:06 -04:00
William D. Jones
0afbf1a9bb board_stm32h743nucleo: Route USB clock and pins. 2019-08-26 16:48:24 -04:00
William D. Jones
1ef98e503a board_stm32h743nucleo: Route major clocks and LED pins. 2019-08-26 14:20:13 -04:00
hathach
fa796de6cd board_test example run with lpcxpresso51u68 2019-08-26 12:24:46 +07:00
William D. Jones
0fb9ab9a09 stm32h7: Add empty template cdc_msc_hid example for STM32H743 Nucleo board that compiles. 2019-08-24 12:40:18 -04:00
hathach
d4895c4af6 add board_test example for testing new board 2019-08-24 23:30:35 +07:00
hathach
b3acce17cc adding lpc51u68 support 2019-08-24 00:52:46 +07:00
hathach
e5e73ed76c drop board_* in bsp c file
move hw/cmsis to hw/mcu/nordic since only nrf uses it.
2019-08-23 23:35:55 +07:00
hathach
48c7b80c57 fix warnings of template descriptor 2019-08-23 13:33:40 +07:00
hathach
b8d15a566a Update issue templates 2019-08-20 12:39:55 +07:00
hathach
2a7991ded9 Update issue templates 2019-08-20 12:36:22 +07:00
Scott Shawcroft
00c440cb26
Merge pull request #99 from jepler/issue98-midi-program-change
midi_device: Send message classes C and D as 2 bytes
2019-08-15 23:34:42 -07:00
96d96a94b8 midi_device: Send message classes C and D as 2 bytes
.. sending these as two 1-byte messages with CIN of 0xF is
misinterpreted by OSes including Windows 10 and (reportedly)
Mac.

Testing performed: Ran the reproducer script, which sends Program
Change (0xCx) messages.  I did not check with Change Pressure (0xDx)
messages, but expect the same thing.

Closes: #98
2019-08-14 19:15:29 -05:00
759 changed files with 66267 additions and 112040 deletions

25
.gitattributes vendored Normal file
View file

@ -0,0 +1,25 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto
*.c text
*.cpp text
*.h text
*.icf text
*.js text
*.json text
*.ld text
*.md text
*.mk text
*.py text
*.rst text
*.s text
*.txt text
*.xml text
*.yml text
Makefile text
# Windows-only Visual Studio things
*.sln text eol=crlf
*.csproj text eol=crlf

View file

@ -1,32 +1,29 @@
---
name: Bug report
about: Create a report to help us improve
title: "[Bug]"
labels: Bug
title: ''
labels: Bug 🐞
assignees: ''
---
**Set up**
[Mandatory] Provide details of your setup help us to reproduce the issue as quick as possible
- **PC OS** : Ubuntu 18.04 / Windows 10/ macOS 10.15
- **Board** : Feather nRF52840 Express
- **Firmware**: examples/device/cdc_msc
**Describe the bug**
A clear and concise description of what the bug is.
**Set up (please complete the following information):**
- OS: [e.g. Ubuntu 18.04]
- Board: [e.g pca10056]
- Firmware Code: [e.g examples/device/cdc_msc_hid]
**To Reproduce**
**To reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
3. See error
**Screenshots**
If applicable, add screenshots to help explain your problem.
If applicable, add screenshots, bus capture to help explain your problem.
**Additional context**
Add any other context about the problem here.
**Log**
Please provide the stack's log (uart/rtt/swo) where the issue occurred, best with comments to explain the actual events. To enable logging, add `LOG=2` to to the make command if building with stock examples or set `CFG_TUSB_DEBUG=2` in your tusb_config.h. More information can be found at [example's readme](/examples/readme.md)

View file

@ -1,8 +1,8 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[Feature]"
labels: Feature
title: ''
labels: Feature 💡
assignees: ''
---
@ -12,9 +12,3 @@ A clear and concise description of what the problem is. Ex. I'm always frustrate
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

11
.github/ISSUE_TEMPLATE/porting.md vendored Normal file
View file

@ -0,0 +1,11 @@
---
name: Porting
about: Adding a new port for this project
title: ''
labels: Porting
assignees: ''
---
**Description**
Describe which API you want to port (DCD/HCD/OSAL/BSP). It is also helpful to go through [porting.md](docs/porting.md) first if you haven't yet.

View file

@ -1,10 +1,10 @@
---
name: Question
about: Question for this project
title: "[Q&A]"
title: ''
labels: Q&A
assignees: ''
---
**Here is my question**
**Describe what the question is**

5
.github/pull_request_template.md vendored Normal file
View file

@ -0,0 +1,5 @@
**Describe the PR**
A clear and concise description of what this PR solve.
**Additional context**
If applicable, add any other context about the PR and/or screenshots here.

95
.github/workflows/build.yml vendored Normal file
View file

@ -0,0 +1,95 @@
name: Build
on: [pull_request, push, repository_dispatch]
jobs:
# Unit testing with Ceedling
unit-test:
runs-on: ubuntu-latest
steps:
- name: Setup Ruby
uses: actions/setup-ruby@v1
- name: Checkout TinyUSB
uses: actions/checkout@v2
- name: Unit Tests
run: |
# Install Ceedling
gem install ceedling
cd test
ceedling test:all
# Build most of the ports
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
example: ['board_test', 'cdc_dual_ports', 'cdc_msc', 'cdc_msc_freertos', 'dfu_rt',
'hid_composite', 'hid_composite_freertos', 'hid_generic_inout', 'midi_test', 'msc_dual_lun', 'net_lwip_webserver',
'usbtmc', 'webusb_serial']
steps:
- name: Setup Python
uses: actions/setup-python@v1
- name: Setup Node.js
uses: actions/setup-node@v1
- name: Cache MSP430 Toolchain
id: cache-msp430
uses: actions/cache@v1
with:
path: /tmp/dl/
# Increment serial number at end when updating downloads
key: msp430-${{ runner.os }}-0
- name: Install Toolchains
run: |
# ARM & RISC-V GCC from xpack
npm install --global xpm
xpm install --global @xpack-dev-tools/arm-none-eabi-gcc@latest
xpm install --global @xpack-dev-tools/riscv-none-embed-gcc@latest
echo "::add-path::`echo $HOME/opt/xPacks/@xpack-dev-tools/arm-none-eabi-gcc/*/.content/bin`"
echo "::add-path::`echo $HOME/opt/xPacks/@xpack-dev-tools/riscv-none-embed-gcc/*/.content/bin`"
# TI MSP430 GCC
mkdir -p /tmp/dl/
[ -f "/tmp/dl/msp430-gcc.tar.bz2" ] || wget --progress=dot:mega http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/8_3_0_0/exports/msp430-gcc-8.3.0.16_linux64.tar.bz2 -O /tmp/dl/msp430-gcc.tar.bz2
tar -C $HOME -xaf /tmp/dl/msp430-gcc.tar.bz2
echo "::add-path::`echo $HOME/msp430-gcc-*_linux64/bin`"
- name: Checkout TinyUSB
uses: actions/checkout@v2
with:
# Cannot do submodule checkout here since LWIP's git server cannot checkout unadventised commits (it must use tags)
submodules: 'false'
- name: Checkout Submodules
run: |
git submodule sync --recursive
# Special case LWIP since GNU's Savannah can't do shallow checkout of non-tagged commits
git submodule update --init --recursive lib/lwip
git submodule update --init --recursive --depth 1
- name: Build
run: |
python3 tools/build_all.py ${{ matrix.example }}
# Build ESP32S
build-esp32s:
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v1
- name: Pull ESP-IDF docker
run: docker pull espressif/idf:latest
- name: Checkout TinyUSB
uses: actions/checkout@v2
with:
submodules: 'false'
- name: Build
run: docker run --rm -v $PWD:/project -w /project espressif/idf:latest python3 tools/build_esp32s.py

14
.github/workflows/trigger.yml vendored Normal file
View file

@ -0,0 +1,14 @@
name: Trigger Repos
on:
push:
branches: master
jobs:
trigger:
runs-on: ubuntu-latest
steps:
- name: mynewt-tinyusb-example
shell: bash
run: |
curl -X POST -H "Authorization: token ${{ secrets.GH_REPO_TOKEN }}" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" --data '{"event_type": "rebuild"}' https://api.github.com/repos/hathach/mynewt-tinyusb-example/dispatches

10
.gitignore vendored
View file

@ -1,6 +1,5 @@
html
latex
test/_build
*.d
*.o
*.P
@ -12,6 +11,13 @@ test/_build
*.elf
*.ind
.env
/examples/*/*/build-*
.settings/
.idea/
/examples/*/*/build*
test_old/
tests_obsolete/
_build
# coverity intermediate files
cov-int
# cppcheck build directories
*-build-dir

36
.gitmodules vendored
View file

@ -1,15 +1,33 @@
[submodule "hw/mcu/nordic/nrfx"]
path = hw/mcu/nordic/nrfx
url = https://github.com/NordicSemiconductor/nrfx.git
[submodule "hw/mcu/microchip/samd/asf4"]
path = hw/mcu/microchip/samd/asf4
url = https://github.com/adafruit/asf4.git
[submodule "hw/mcu/st/stm32lib"]
path = hw/mcu/st/stm32lib
url = https://github.com/hathach/stm32lib.git
[submodule "hw/mcu/nxp/lpcopen"]
path = hw/mcu/nxp/lpcopen
url = https://github.com/hathach/lpcopen.git
[submodule "tools/uf2"]
path = tools/uf2
url = https://github.com/microsoft/uf2.git
[submodule "hw/mcu/st/st_driver"]
path = hw/mcu/st/st_driver
url = https://github.com/hathach/st_driver.git
[submodule "hw/mcu/sony/cxd56/spresense-exported-sdk"]
path = hw/mcu/sony/cxd56/spresense-exported-sdk
url = https://github.com/sonydevworld/spresense-exported-sdk.git
[submodule "hw/mcu/ti"]
path = hw/mcu/ti
url = https://github.com/hathach/ti_driver.git
[submodule "hw/mcu/nxp"]
path = hw/mcu/nxp
url = https://github.com/hathach/nxp_driver.git
[submodule "hw/mcu/microchip"]
path = hw/mcu/microchip
url = https://github.com/hathach/microchip_driver.git
[submodule "hw/mcu/nuvoton"]
path = hw/mcu/nuvoton
url = https://github.com/majbthrd/nuc_driver.git
[submodule "lib/lwip"]
path = lib/lwip
url = https://git.savannah.nongnu.org/git/lwip.git
[submodule "lib/FreeRTOS"]
path = lib/FreeRTOS
url = https://github.com/FreeRTOS/FreeRTOS.git
[submodule "lib/CMSIS_4"]
path = lib/CMSIS_4
url = https://github.com/ARM-software/CMSIS.git

View file

@ -1,30 +0,0 @@
language: c
dist: xenial
compiler:
- gcc
addons:
apt:
sources:
- sourceline: "ppa:team-gcc-arm-embedded/ppa"
packages:
- python3
- ruby
- gcc-arm-embedded
install:
- gem install ceedling
before_script:
- arm-none-eabi-gcc --version
script:
# Build all examples
- python3 tools/build_all.py
# Run unit tests
- cd test
- ceedling test:all
- cd ..
after_success:
- source tools/build_success.sh

61
CONTRIBUTORS.md Normal file
View file

@ -0,0 +1,61 @@
# TinyUSB contributors (sorted alphabetically)
* **[Adafruit Team](https://github.com/adafruit)**
* Main supporter and sponsor for hardware boards and kits
* Discussion and suggestion for feature and improvement
* Design the project logo
* **[arturo182](https://github.com/arturo182)**
* Board support for MiMX RT1010 evaluation kit
* **[Ha Thach](https://github.com/hathach)**
* Author and maintainer
* Most features development
* **[Jeff Epler](https://github.com/jepler)**
* Improvement to MIDI device driver
* **[Kamil Tomaszewski](https://github.com/kamtom480)**
* Sony CXD56 device driver port for spresnese board
* **[Nathan Conrad](https://github.com/pigrew)**
* STM32 fsdev Fullspeed device driver port for STM32 L0, F0, F1, F3 etc ...
* USBTMC class driver support with example
* Various improvement e.g Zero-length packet, Lint setup
* Board support for STM32F070RB Nucleo, STM32F303 Discovery
* **[Peter Lawrence](https://github.com/majbthrd)**
* Nuvoton NUC 120, 121, 125, 126, 505 device driver port
* USBNET RNDIS, CDC-ECM, CDC-EEM class driver
* Added `net_lwip_webserver` example for demonstration of usbnet with lwip
* Board support for NuTiny NUC120, NUC121s, NUC125s, NUC126V, NUC505
* Complete multiple class interfaces & add cdc_dual_ports example
* **[Scott Shawcroft](https://github.com/tannewt)**
* SAMD21 and SAMD51 device driver port
* MIDI device class driver support
* Improvement to USBD control transfer, MSC, CDC class driver
* Board support for Metro M0 & M4 express
* Write the execellent porting.md documentation
* Introduce inital Makefile
* **[Sean Cross](https://github.com/xobs)**
* ValentyUSB eptri device driver port
* Board support for fomu
* **[Sylvain "tnt" Munaut](https://github.com/smunaut)**
* DFU runtime support with example
* **[Timon Skerutsch](https://github.com/PTS93)**
* hid_test.js script and extensive test for bi-directional raw HID
* **[Tod E. Kurt](https://github.com/todbot)**
* hid_test.js script and extensive test for bi-directional raw HID
* **[William D. Jones](https://github.com/cr1901)**
* Synopsys DesignWare device driver port for STM32 L4, F2, F4, F7, H7 etc ...
* TI MSP430 device driver port
* Board support for STM32F407 Discovery, STM32H743 Nucleo, pyboard v1.1, msp_exp430f5529lp etc ...
**[Full contributors list](https://github.com/hathach/tinyusb/contributors).**

View file

@ -2,9 +2,9 @@
![tinyUSB_240x100](https://user-images.githubusercontent.com/249515/62646655-f9393200-b978-11e9-9c53-484862f15503.png)
[![Build Status](https://travis-ci.org/hathach/tinyusb.svg?branch=master)](https://travis-ci.org/hathach/tinyusb) [![License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT)
[![Build Status](https://github.com/hathach/tinyusb/workflows/Build/badge.svg)](https://github.com/hathach/tinyusb/actions) [![License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT) [![Coverity](https://img.shields.io/coverity/scan/458.svg)](https://scan.coverity.com/projects/tinyusb)
TinyUSB is an open-source cross-platform USB Host/Device stack for embedded system. It is designed to be memory-safe with no dynamic allocation and thread-safe with all interrupt events are deferred then handled in the stack's task function.
TinyUSB is an open-source cross-platform USB Host/Device stack for embedded system, designed to be memory-safe with no dynamic allocation and thread-safe with all interrupt events are deferred then handled in the non-ISR task function.
![tinyusb](https://user-images.githubusercontent.com/249515/49858616-f60c9700-fe27-11e8-8627-e76936352ff7.png)
@ -21,14 +21,39 @@ TinyUSB is an open-source cross-platform USB Host/Device stack for embedded syst
└── tools # Files used internally
```
## Contributors
Special thanks to all the people who spent their precious time and effort to help this project so far. Check out the
[CONTRIBUTORS.md](CONTRIBUTORS.md) file for the list of all contributors and their awesome work for the stack.
## Supported MCUs
The stack supports the following MCUs:
- **Espressif:** ESP32-S2
- **MicroChip:** SAMD21, SAMD51, SAME5x (device only)
- **NordicSemi:** nRF52833, nRF52840
- **Nuvoton:** NUC120, NUC121/NUC125, NUC126, NUC505
- **NXP:**
- LPC Series: 11Uxx, 13xx, 175x_6x, 177x_8x, 18xx, 40xx, 43xx, 51Uxx, 54xxx, 55xx
- iMX RT Series: RT1011, RT1015, RT1021, RT1052, RT1062, RT1064
- **Sony:** CXD56
- **ST:** STM32 series: L0, F0, F1, F2, F3, F4, F7, H7 (device only)
- **TI:** MSP430
- **[ValentyUSB](https://github.com/im-tomu/valentyusb)** eptri
[Here is the list of supported Boards](docs/boards.md) that can be used with provided examples.
## Device Stack
Support multiple device configurations by dynamically changing usb descriptors. Low power functions such as suspend, resume and remote wakeup. Following device classes are supported:
Supports multiple device configurations by dynamically changing usb descriptors. Low power functions such like suspend, resume, and remote wakeup. Following device classes are supported:
- Communication Class (CDC)
- Human Interface Device (HID): Generic (In & Out), Keyboard, Mouse, Gamepad etc ...
- Mass Storage Class (MSC): with multiple LUNs
- Musical Instrument Digital Interface (MIDI)
- Network with RNDIS, CDC-ECM (work in progress)
- USB Test and Measurement Class (USBTMC)
- Vendor-specific class support with generic In & Out endpoints. Can be used with MS OS 2.0 compatible descriptor to load winUSB driver without INF file.
- [WebUSB](https://github.com/WICG/webusb) with vendor-specific class
@ -38,34 +63,19 @@ Support multiple device configurations by dynamically changing usb descriptors.
- Human Interface Device (HID): Keyboard, Mouse, Generic
- Mass Storage Class (MSC)
- Hub currently only support 1 level of hub (due to my laziness)
- Hub currently only supports 1 level of hub (due to my laziness)
## OS Abtraction layer
## OS Abstraction layer
Currently the following OS are supported with tinyusb out of the box with a simple change of **CFG_TUSB_OS** macro.
TinyUSB is completely thread-safe by pushing all ISR events into a central queue, then process it later in the non-ISR context task function. It also uses semaphore/mutex to access shared resources such as CDC FIFO. Therefore the stack needs to use some of OS's basic APIs. Following OSes are already supported out of the box.
- **No OS**
- **No OS** : Disabling USB IRQ is used as way to provide mutex
- **FreeRTOS**
- **Mynewt** Due to the newt package build system, Mynewt examples are better to be on its [own repo](https://github.com/hathach/mynewt-tinyusb-example)
## Supported MCUs
The stack supports the following MCUs
- **Nordic:** nRF52840
- **NXP:** LPC11Uxx, LPC13xx, LPC175x_6x, LPC177x_8x, LPC18xx, LPC40xx, LPC43xx
- **MicroChip:** SAMD21, SAMD51 (device only)
- **ST:** STM32F4 (device only)
[Here is the list of supported Boards](docs/boards.md)
## Compiler & IDE
The stack is developed with GCC compiler, and should be compilable with others. Folder `examples` provide Makefile and Segger Embedded Studio build support.
## Getting Started
[Here is the details for getting started](docs/getting_started.md) with the stack.
[Here are the details for getting started](docs/getting_started.md) with the stack.
## Porting
@ -73,7 +83,7 @@ Want to help add TinyUSB support for a new MCU? Read [here](docs/porting.md) for
## License
MIT license for all TinyUSB sources `src` folder, [Full license is here](LICENSE). However each file is individually licensed especially those in `lib` and `hw/mcu` folder. Please make sure you understand all the license term for files you use in your project.
MIT license for all TinyUSB sources `src` folder, [Full license is here](LICENSE). However, each file is individually licensed especially those in `lib` and `hw/mcu` folder. Please make sure you understand all the license term for files you use in your project.
## Uses
@ -83,6 +93,7 @@ TinyUSB is currently used by these other projects:
* [Adafruit nRF52 Bootloader](https://github.com/adafruit/Adafruit_nRF52_Bootloader)
* [Adafruit SAMD Arduino](https://github.com/adafruit/ArduinoCore-samd)
* [CircuitPython](https://github.com/adafruit/circuitpython)
* [MicroPython](https://github.com/micropython/micropython)
* [TinyUSB Arduino Library](https://github.com/adafruit/Adafruit_TinyUSB_Arduino)
Let's me know if your project also uses TinyUSB and want to share.
Let me know if your project also uses TinyUSB and want to share.

View file

@ -1,6 +1,151 @@
# TinyUSB changelog
# TinyUSB Changelog
## New Release
## Master branch (WIP)
### Breaking
- TinyUSB does not directly implement USB IRQ Handler function anymore. Application must implement IRQ Handler and invoke `tud_int_handler(rhport)`. This is due to:
- IRQ Handler name can be different across system depending on the startup
- Some OS need to execute enterISR()/exitISR() to work properly, also tracing tool may need to insert trace ISR enter/exit to record usb event
- Give application full control of IRQ handler, can be useful e.g signaling there is new usb event without constant polling
### MCU
- Added support for Espressif ESP32-S2 and saola-1 board
- All default IRQ Handler is renamed to `dcd_int_handler()`
- STM32 Synopsys
- Bus events disconnection/suspend/resume are supported
- Added `dcd_connect()` and `dcd_disconnect()` to enable/disable internal pullup on D+/D- on supported MCUs.
- Added `dcd_edpt_close()` for STM32 FSDev
### Device Stack
- tud_cdc_n_write_flush() return number of bytes forced to transfer instead of bool
- Support multiple configuration descriptors. `TUD_CONFIG_DESCRIPTOR()` template has extra config_num as 1st argument
- Improve class driver management
- Driver detection is done by open() API
- IAD is handled to assign driver id
- Improve Alternate Interface request with `SET_INTERFACE()` (not fully supported yet).
- Fixed CDC ZLP response #260
- Remove ACM-EEM due to lack of support from host
### Others
- Added OPT_OS_CUMSTOM as hook for application to overwrite and/or add their own OS implementation
- Enhanced `net_lwip_webserver` example with multiple configuration: RNDIS for Windows, CDC-ECM for macOS (Linux will work with both)
## 0.6.0 - 2019.03.30
Added **CONTRIBUTORS.md** to give proper credit for contributors to the stack. Special thanks to [Nathan Conrad](https://github.com/pigrew), [Peter Lawrence](https://github.com/majbthrd) and [William D. Jones](https://github.com/cr1901) and others for spending their precious time to add lots of features and ports for this release.
### Added
**MCU**
- Added support for Microchip SAMG55
- Added support for Nordic nRF52833
- Added support for Nuvoton: NUC120, NUC121/NUC125, NUC126, NUC505
- Added support for NXP LPC: 51Uxx, 54xxx, 55xx
- Added support for NXP iMXRT: RT1011, RT1015, RT1021, RT1052, RT1062, RT1064
- Added support for Sony CXD56 (Spresense)
- Added support for STM32: L0, F0, F1, F2, F3, F4, F7, H7
- Added support for TI MSP430
- Added support for ValentyUSB's eptri
**Class Driver**
- Added DFU Runtime class driver
- Added Network class driver with RNDIS, CDC-ECM, CDC-EEM (work in progress)
- Added USBTMC class driver
- Added WebUSB class driver using vendor-specific class
- Added multiple instances support for CDC and MIDI
- Added a handful of unit test with Ceedling.
- Added LOG support for debugging with CFG_TUSB_DEBUG
- Added `tud_descriptor_bos_cb()` for BOS descriptor (required for USB 2.1)
- Added `dcd_edpt0_status_complete()` as optional API for DCD
**Examples**
Following examples are added:
- board_test
- cdc_dual_ports
- dfu_rt
- hid_composite
- net_lwip_webserver
- usbtmc
- webusb_serial
**Boards**
Following boards are added:
- adafruit_clue
- arduino_nano33_ble
- circuitplayground_bluefruit
- circuitplayground_express
- feather_m0_express
- feather_nrf52840_sense
- feather_stm32f405
- fomu
- itsybitsy_m0
- itsybitsy_m4
- lpcxpresso11u37
- lpcxpresso1549
- lpcxpresso51u68
- lpcxpresso54114
- lpcxpresso55s69
- mbed1768
- mimxrt1010_evk
- mimxrt1015_evk
- mimxrt1020_evk
- mimxrt1050_evkb
- mimxrt1060_evk
- mimxrt1064_evk
- msp_exp430f5529lp
- ngx4330
- nrf52840_mdk_dongle
- nutiny_nuc121s
- nutiny_nuc125s
- nutiny_nuc126v
- nutiny_sdk_nuc120
- nutiny_sdk_nuc505
- pca10059
- pca10100
- pyboardv11
- raytac_mdbt50q_rx
- samg55xplained
- seeeduino_xiao
- spresense
- stm32f070rbnucleo
- stm32f072disco
- stm32f103bluepill
- stm32f207nucleo
- stm32f401blackpill
- stm32f411blackpill
- stm32f411disco
- stm32f412disco
- stm32f767nucleo
- stm32h743nucleo
- stm32l0538disco
- stm32l476disco
- teensy_40
### Changed
- Changed `tud_descriptor_string_cb()` to have additional Language ID argument
- Merged hal_nrf5x.c into dcd_nrf5x.c
- Merged dcd_samd21.c and dcd_samd51.c into dcd_samd.c
- Generalized dcd_stm32f4.c to dcd_synopsys.c
- Changed cdc_msc_hid to cdc_msc (drop hid) due to limited endpoints number of some MCUs
- Improved DCD SAMD stability, fix missing setup packet occasionally
- Improved usbd/usbd_control with proper hanlding of zero-length packet (ZLP)
- Improved STM32 DCD FSDev
- Improved STM32 DCD Synopsys
- Migrated CI from Travis to Github Action
- Updated nrfx submodule to 2.1.0
- Fixed mynewt osal queue definition
- Fixed cdc_msc_freertos example build for all MCUs
## 0.5.0 (Initial Release) - 2019.07.10

View file

@ -1,45 +1,113 @@
# Boards
The board support code is only used for self-contained examples and testing. It is not used when TinyUSB is part of a larger project. It is responsible for getting the MCU started and the USB peripheral clocked with minimal of on-board devices
- One LED for status
- One Button to get input from user
- One UART optionally, mostly for host examples
- One LED : for status
- One Button : to get input from user
- One UART : optional for device, but required for host examples
## Supported Boards
This code base already had supported for a handful of following boards
This code base already had supported for a handful of following boards (sorted alphabetically)
### Nordic nRF5x
### Espressif ESP32-S2
- [Adafruit Feather nRF52840 Express](https://www.adafruit.com/product/4062)
- [Nordic nRF52840 Development Kit (aka pca10056)](https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52840-DK)
### NXP LPC
- [LPCXpresso 11U68](https://www.nxp.com/support/developer-resources/evaluation-and-development-boards/lpcxpresso-boards/lpcxpresso-board-for-lpc11u68:OM13058)
- [LPCXpresso 1347](https://www.nxp.com/support/developer-resources/evaluation-and-development-boards/lpcxpresso-boards/lpcxpresso-board-for-lpc1347:OM13045)
- [LPCXpresso 1769](https://www.nxp.com/support/developer-resources/evaluation-and-development-boards/lpcxpresso-boards/lpcxpresso-board-for-lpc1769:OM13000)
- [Keil MCB1800 Evaluation Board](http://www.keil.com/mcb1800)
- [Embedded Artists LPC4088 Quick Start board](https://www.embeddedartists.com/products/lpc4088-quickstart-board)
- [Embedded Artists LPC4357 Developer Kit](http://www.embeddedartists.com/products/kits/lpc4357_kit.php)
- [ESP32-S2-Saola-1](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/hw-reference/esp32s2/user-guide-saola-1-v1.2.html)
### MicroChip SAMD
- [Adafruit Circuit Playground Express](https://www.adafruit.com/product/3333)
- [Adafruit Feather M0 Express](https://www.adafruit.com/product/3403)
- [Adafruit Feather M4 Express](https://www.adafruit.com/product/3857)
- [Adafruit ItsyBitsy M0 Express](https://www.adafruit.com/product/3727)
- [Adafruit ItsyBitsy M4 Express](https://www.adafruit.com/product/3800)
- [Adafruit Metro M0 Express](https://www.adafruit.com/product/3505)
- [Adafruit Metro M4 Express](https://www.adafruit.com/product/3382)
- [Seeeduino Xiao](https://www.seeedstudio.com/Seeeduino-XIAO-Arduino-Microcontroller-SAMD21-Cortex-M0+-p-4426.html)
### Nordic nRF5x
- [Adafruit Circuit Playground Bluefruit](https://www.adafruit.com/product/4333)
- [Adafruit CLUE](https://www.adafruit.com/product/4500)
- [Adafruit Feather nRF52840 Express](https://www.adafruit.com/product/4062)
- [Adafruit Feather nRF52840 Sense](https://www.adafruit.com/product/4516)
- [Arduino Nano 33 BLE](https://store.arduino.cc/usa/nano-33-ble)
- [Arduino Nano 33 BLE Sense](https://store.arduino.cc/usa/nano-33-ble-sense)
- [Maker Diary nRF52840 MDK Dongle](https://wiki.makerdiary.com/nrf52840-mdk-usb-dongle)
- [Nordic nRF52840 Development Kit (aka pca10056)](https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52840-DK)
- [Nordic nRF52840 Dongle (aka pca10059)](https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52840-Dongle)
- [Nordic nRF52833 Development Kit (aka pca10100)](https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52833-DK)
- [Raytac MDBT50Q-RX Dongle](https://www.raytac.com/product/ins.php?index_id=89)
### Nuvoton
- NuTiny SDK NUC120
- [NuTiny NUC121S](https://direct.nuvoton.com/en/nutiny-nuc121s)
- [NuTiny NUC125S](https://direct.nuvoton.com/en/nutiny-nuc125s)
- [NuTiny NUC126V](https://direct.nuvoton.com/en/nutiny-nuc126v)
- [NuTiny SDK NUC505Y](https://direct.nuvoton.com/en/nutiny-nuc505y)
### NXP iMX RT
- [MIMX RT1010 Evaluation Kit](https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/i.mx-rt1010-evaluation-kit:MIMXRT1010-EVK)
- [MIMX RT1015 Evaluation Kit](https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/i.mx-rt1015-evaluation-kit:MIMXRT1015-EVK)
- [MIMX RT1020 Evaluation Kit](https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/i.mx-rt1020-evaluation-kit:MIMXRT1020-EVK)
- [MIMX RT1050 Evaluation Kit](https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/i.mx-rt1050-evaluation-kit:MIMXRT1050-EVK)
- [MIMX RT1060 Evaluation Kit](https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/mimxrt1060-evk-i.mx-rt1060-evaluation-kit:MIMXRT1060-EVK)
- [MIMX RT1064 Evaluation Kit](https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/mimxrt1064-evk-i.mx-rt1064-evaluation-kit:MIMXRT1064-EVK)
- [Teensy 4.0 Development Board](https://www.pjrc.com/store/teensy40.html)
### NXP LPC
- [ARM mbed LPC1768](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpc1700-cortex-m3/arm-mbed-lpc1768-board:OM11043)
- [Embedded Artists LPC4088 Quick Start board](https://www.embeddedartists.com/products/lpc4088-quickstart-board)
- [Embedded Artists LPC4357 Developer Kit](http://www.embeddedartists.com/products/kits/lpc4357_kit.php)
- [Keil MCB1800 Evaluation Board](http://www.keil.com/mcb1800)
- [LPCXpresso 11u37](https://www.nxp.com/design/microcontrollers-developer-resources/lpcxpresso-boards/lpcxpresso-board-for-lpc11u37h:OM13074)
- [LPCXpresso 11u68](https://www.nxp.com/support/developer-resources/evaluation-and-development-boards/lpcxpresso-boards/lpcxpresso-board-for-lpc11u68:OM13058)
- [LPCXpresso 1347](https://www.nxp.com/support/developer-resources/evaluation-and-development-boards/lpcxpresso-boards/lpcxpresso-board-for-lpc1347:OM13045)
- [LPCXpresso 1769](https://www.nxp.com/support/developer-resources/evaluation-and-development-boards/lpcxpresso-boards/lpcxpresso-board-for-lpc1769:OM13000)
- [LPCXpresso 51U68](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpcxpresso51u68-for-the-lpc51u68-mcus:OM40005)
- [LPCXpresso 54114](https://www.nxp.com/design/microcontrollers-developer-resources/lpcxpresso-boards/lpcxpresso54114-board:OM13089)
- [LPCXpresso 55s69 EVK](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpc5500-cortex-m33/lpcxpresso55s69-development-board:LPC55S69-EVK)
- [NGX LPC4330-Xplorer](https://www.nxp.com/design/designs/lpc4330-xplorer-board:OM13027)
### Sony
- [Sony Spresense CXD5602](https://developer.sony.com/develop/spresense)
### ST STM32
- [STM32F407g Discovery](https://www.st.com/en/evaluation-tools/stm32f4discovery.html)
- [STM32F411e Discovery](https://www.st.com/en/evaluation-tools/32f411ediscovery.html)
- [Adafruit Feather STM32F405](https://www.adafruit.com/product/4382)
- [Micro Python PyBoard v1.1](https://store.micropython.org/product/PYBv1.1)
- [STM32 L035c8 Discovery](https://www.st.com/en/evaluation-tools/32l0538discovery.html)
- [STM32 F070rb Nucleo](https://www.st.com/en/evaluation-tools/nucleo-f070rb.html)
- [STM32 F072rb Discovery](https://www.st.com/en/evaluation-tools/32f072bdiscovery.html)
- STM32 F103c Blue Pill
- [STM32 F207zg Nucleo](https://www.st.com/en/evaluation-tools/nucleo-f207zg.html)
- [STM32 F303vc Discovery](https://www.st.com/en/evaluation-tools/stm32f3discovery.html)
- STM32 F401cc Black Pill
- [STM32 F407vg Discovery](https://www.st.com/en/evaluation-tools/stm32f4discovery.html)
- STM32 F411ce Black Pill
- [STM32 F411ve Discovery](https://www.st.com/en/evaluation-tools/32f411ediscovery.html)
- [STM32 F412zg Discovery](https://www.st.com/en/evaluation-tools/32f412gdiscovery.html)
- [STM32 F746zg Nucleo](https://www.st.com/en/evaluation-tools/nucleo-f746zg.html)
- [STM32 F767zi Nucleo](https://www.st.com/en/evaluation-tools/nucleo-f767zi.html)
- [STM32 H743zi Nucleo](https://www.st.com/en/evaluation-tools/nucleo-h743zi.html)
### TI
- [MSP430F5529 USB LaunchPad Evaluation Kit](http://www.ti.com/tool/MSP-EXP430F5529LP)
### Tomu
- [Fomu](https://www.crowdsupply.com/sutajio-kosagi/fomu)
## Add your own board
If you don't possess any of supported board above. Don't worry you can easily implemented your own one by following this guide as long as the mcu is supported.
- Create new makefile for your board at `hw/bsp/<board name>/board.mk` and linker file as well if needed.
- Create new source file for your board at `hw/bsp/<board name>/board_<board name>.c` and implement following APIs
- Create new source file for your board at `hw/bsp/<board name>/<board name>.c` and implement following APIs
### Board APIs

36
docs/concurrency.md Normal file
View file

@ -0,0 +1,36 @@
# Concurrency
The TinyUSB library is designed to operate on single-core MCUs with multi-threaded applications in mind. Interaction with interrupts is especially important to pay attention to.
It is compatible with optionally using a RTOS.
## General
When writing code, keep in mind that the OS (if using a RTOS) may swap out your code at any time. Also, your code can be preempted by an interrupt at any time.
## Application Code
The USB core does not execute application callbacks while in an interrupt context. Calls to application code are from within the USB core task context. Note that the application core will call class drivers from within their own task.
## Class Drivers
Class driver code should never be called from an interrupt context by the USB core, though the application is allowed to call class driver functions from interrupts. USB core functions may be called simultaneously by multiple tasks. Use care that proper locking is used to guard the USBD core functions from this case.
Class drivers are allowed to call `usbd_*` functions, but not `dcd_*` functions.
## USB Core
All functions that may be called from an (USB core) interrupt context have a `bool in_isr` parameter to remind the implementer that special care must be taken.
Interrupt handlers must not directly call class driver code, they must pass a message to the USB core's task.
`usbd_*` functions may be called from interrupts without any notice. They may also be called simultaneously by multiple tasks.
## Device Drivers
Much of the processing of the USB stack is done in an interrupt context, and care must be taken in order to ensure variables are handled in the appropriate ways by the compiler and optimizer.
In particular:
- Ensure that all memory-mapped registers (including packet memory) are marked as volatile. GCC's optimizer will even combine memory access (like two 16-bit to be a 32-bit) if you don't mark the pointers as volatile. On some architectures, this can use macros like `_I`, `_O`, or `_IO'.
- All defined global variables are marked as `static`.

View file

@ -4,8 +4,6 @@
```
git clone git@github.com:hathach/tinyusb.git tinyusb
cd tinyusb
git submodule update --init
```
*examples* is the folder where all the application & project files are located. There are demos for both device and hosts. For each, there are different projects for each of supported RTOS. Click to have more information on how to [build](../examples/readme.md) and run [device](../examples/device/readme.md) demos.
@ -17,11 +15,11 @@ It is relatively simple to incorporate tinyusb to your (existing) project
1. Copy or `git submodule` this repo into your project in a subfolder. Let's say it is *your_project/tinyusb*
2. Add all the .c in the src folder to your project settings (uvproj, ewp, makefile)
3. Add *your_project/tinysb* to your include path. Also make sure your current include path also contains the configuration file tusb_config.h. Or you could simply put the tusb_config.h into the tinyusb folder as well.
4. Make sure all required macros are all defined properly in tusb_config.h (configure file in demo application is sufficient, but you need to add a few more such as CFG_TUSB_MCU, CFG_TUSB_OS since they are passed by IDE/compiler to maintain a unique configure for all demo projects).
5. If you use the device stack, make sure you have created/modified usb descriptors for your own need. Ultimately you need to fill out required pointers in tusbd_descriptor_pointers for that stack to work.
4. Make sure all required macros are all defined properly in tusb_config.h (configure file in demo application is sufficient, but you need to add a few more such as CFG_TUSB_MCU, CFG_TUSB_OS since they are passed by IDE/compiler to maintain a unique configure for all boards).
5. If you use the device stack, make sure you have created/modified usb descriptors for your own need. Ultimately you need to implement all **tud_descriptor_** callbacks for that stack to work.
6. Add tusb_init() call to your reset initialization code.
7. Implement all enabled classes's callbacks.
8. If you don't use any RTOSes at all, you need to continuously and/or periodically call tud_task()/tuh_task() function. Most of the callbacks and functionality are handled and invoke within the call of that task runner.
8. If you don't use any RTOSes at all, you need to continuously and/or periodically call tud_task()/tuh_task() function. All of the callbacks and functionality are handled and invoke within the call of that task runner.
~~~{.c}
int main(void)

View file

@ -1,12 +1,12 @@
# Porting
TinyUSB is designed to be a universal USB protocol stack for low-cost 32 bit microcontrollers. It
TinyUSB is designed to be a universal USB protocol stack for microcontrollers. It
handles most of the high level USB protocol and relies on the microcontroller's USB peripheral for
data transactions on different endpoints. Porting is the process of adding low-level support for
the rest of the common stack. Once the low-level is implemented, it is very easy to add USB support
for the microcontroller to other projects, especially those already using TinyUSB such as CircuitPython.
Below are instructions on how to get the cdc_msc_hid device example running on a new microcontroller. Doing so includes adding the common code necessary for other uses while minimizing other extra code. Whenever you see a phrase or word in <> it should be replaced.
Below are instructions on how to get the cdc_msc device example running on a new microcontroller. Doing so includes adding the common code necessary for other uses while minimizing other extra code. Whenever you see a phrase or word in <> it should be replaced.
## Register defs
@ -19,14 +19,12 @@ Once this is done, create a directory in `hw/bsp/<your board name>` for the spec
## Build
Now that those directories are in place, we can start our iteration process to get the example building successfully. To build, run from the root of TinyUSB:
`make -C examples/device/cdc_msc_hid BOARD=<board>`
`make -C examples/device/cdc_msc BOARD=<board>`
Unless, you've read ahead, this will fail miserably. Now, lets get it to fail less by updating the files in the board directory. The code in the board's directory is responsible for setting up the microcontroller's clocks and pins so that USB works. TinyUSB itself only operates on the USB peripheral. The board directory also includes information what files are needed to build the example.
One of the first things to change is the `-DCFG_TUSB_MCU` cflag in the `board.mk` file. This is used to tell TinyUSB what platform is being built. So, add an entry to `src/tusb_option.h` and update the CFLAG to match.
Also, add an entry for the board in `hw/bsp/board.h`. The CFLAG is auto-added.
Update `board.mk`'s VENDOR and CHIP_FAMILY values when creating the directory for the struct files. Duplicate one of the other sources from `src/portable` into `src/portable/<vendor>/<chip_family>` and delete all of the implementation internals. We'll cover what everything there does later. For now, get it compiling.
## Implementation
@ -62,24 +60,34 @@ All of the code for the low-level device API is in `src/portable/<vendor>/<chip
#### Device Setup
##### dcd_init
Initializes the USB peripheral for device mode and enables it.
#### dcd_int_enable / dcd_int_disable
Initializes the USB peripheral for device mode and enables it.
This function should leave an internal D+/D- pull-up in its default power-on state. `dcd_connect` will be called by the USBD core following `dcd_init`.
##### dcd_int_enable / dcd_int_disable
Enables or disables the USB device interrupt(s). May be used to prevent concurrency issues when mutating data structures shared between main code and the interrupt handler.
##### dcd_int_handler
Processes all the hardware generated events e.g Bus reset, new data packet from host etc ... It will be called by application in the MCU USB interrupt handler.
##### dcd_set_address
Called when the device is given a new bus address.
If your peripheral automatically changes address during enumeration (like the nrf52) you may leave this empty and also no queue an event for the corresponding SETUP packet.
##### dcd_set_config
Called when the device received SET_CONFIG request, you can leave this empty if your peripheral does not require any specific action.
##### dcd_remote_wakeup
Called to remote wake up host when suspended (e.g hid keyboard)
##### dcd_connect / dcd_disconnect
Connect or disconnect the data-line pull-up resistor. Define only if MCU has an internal pull-up. (BSP may define for MCU without internal pull-up.)
#### Special events
You must let TinyUSB know when certain events occur so that it can continue its work. There are a few methods you can call to queue events for TinyUSB to process.
##### dcd_event_bus_signal
@ -98,13 +106,14 @@ The first `0` is the USB peripheral number. Statically saying 0 is common for si
The `true` indicates the call is from an interrupt handler and will always be the case when porting in this way.
##### dcd_setup_received
SETUP packets are a special type of transaction that can occur at any time on the control endpoint, numbered `0`. Since they are unique, most peripherals have special handling for them. Their data is always 8 bytes in length as well.
Calls to this look like:
dcd_event_setup_received(0, setup, true);
As before with `dcd_event_bus_signal` the first argument is the USB peripheral number and the third is true to signal its being called from an interrup handler. The middle argument is byte array of length 8 with the contents of the SETUP packet. It can be stack allocated because it is copied into the queue.
As before with `dcd_event_bus_signal` the first argument is the USB peripheral number and the third is true to signal its being called from an interrupt handler. The middle argument is byte array of length 8 with the contents of the SETUP packet. It can be stack allocated because it is copied into the queue.
#### Endpoints
@ -121,21 +130,39 @@ Opening an endpoint is done for all non-control endpoints once the host picks a
Also make sure to enable endpoint specific interrupts.
##### dcd_edpt_close
Close an endpoint. his function is used for implementing alternate settings.
After calling this, the device should not respond to any packets directed towards this endpoint. When called, this function must abort any transfers in progress through this endpoint, before returning.
Implementation is optional. Must be called from the USB task. Interrupts could be disabled or enabled during the call.
##### dcd_edpt_xfer
`dcd_edpt_xfer` is responsible for configuring the peripheral to send or receive data from the host. "xfer" is short for "transfer". **This is one of the core methods you must implement for TinyUSB to work (one other is the interrupt handler).** Data from the host is the OUT direction and data to the host is IN. In other words, direction is relative to the host.
`dcd_edpt_xfer` is responsible for configuring the peripheral to send or receive data from the host. "xfer" is short for "transfer". **This is one of the core methods you must implement for TinyUSB to work (one other is the interrupt handler).** Data from the host is the OUT direction and data to the host is IN. It is used for all endpoints including the control endpoint 0. Make sure to handle the zero-length packet STATUS packet on endpoint 0 correctly. It may be a special transaction to the peripheral.
`dcd_edpt_xfer` is used for all endpoints including the control endpoint 0. Make sure to handle the zero-length packet STATUS packet on endpoint 0 correctly. It may be a special transaction to the peripheral.
Besides that, all other transactions are relatively straight-forward. The endpoint address provides the endpoint
number and direction which usually determines where to write the buffer info. The buffer and its length are usually
written to a specific location in memory and the peripheral is told the data is valid. (Maybe by writing a 1 to a
register or setting a counter register to 0 for OUT or length for IN.)
Besides that, all other transactions are relatively straight-forward. The endpoint address provides the endpoint number and direction which usually determines where to write the buffer info. The buffer and its length are usually written to a specific location in memory and the peripheral is told the data is valid. (Maybe by writing a 1 to a register or setting a counter register to 0 for OUT or length for IN.)
The transmit buffer alignment is determined by `CFG_TUSB_MEM_ALIGN`.
TODO: can we promise the buffer is word aligned?
One potential pitfall is that the buffer may be longer than the maximum endpoint size of one USB packet. Some peripherals can handle transmitting multiple USB packets for a provided buffer (like the SAMD21). Others (like the nRF52) may need each USB packet queued individually. To make this work you'll need to track some state for yourself and queue up an intermediate USB packet from the interrupt handler.
One potential pitfall is that the buffer may be longer than the maximum endpoint size of one USB
packet. Some peripherals can handle transmitting multiple USB packets for a provided buffer (like the SAMD21).
Others (like the nRF52) may need each USB packet queued individually. To make this work you'll need to track
some state for yourself and queue up an intermediate USB packet from the interrupt handler.
Once the transaction is going, the interrupt handler will notify TinyUSB of transfer completion.
During transmission, the IN data buffer is guarenteed to remain unchanged in memory until the `dcd_xfer_complete` function is called.
TODO: who handles zero-length data packets?
The dcd_edpt_xfer function must never add zero-length-packets (ZLP) on its own to a transfer. If a ZLP is required,
then it must be explicitly sent by the stack calling dcd_edpt_xfer(), by calling dcd_edpt_xfer() a second time with len=0.
For control transfers, this is automatically done in `usbd_control.c`.
At the moment, only a single buffer can be transmitted at once. There is no provision for double-buffering. new dcd_edpt_xfer() will not
be called again on the same endpoint address until the driver calls dcd_xfer_complete() (except in cases of USB resets).
##### dcd_xfer_complete

View file

@ -0,0 +1,15 @@
# The following five lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
# TOP is absolute path to root directory of TinyUSB git repo
set(TOP "../../..")
get_filename_component(TOP "${TOP}" REALPATH)
# Add example src and bsp directories
set(EXTRA_COMPONENT_DIRS "src" "${TOP}/hw/bsp/esp32s2_saola_1")
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
set(SUPPORTED_TARGETS esp32s2)
project(board_test)

View file

@ -0,0 +1,18 @@
include ../../../tools/top.mk
include ../../make.mk
INC += \
src \
$(TOP)/hw \
# Example source
EXAMPLE_SOURCE += $(wildcard src/*.c)
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
# board_test example is special example that doesn't enable device or host stack
# This can cause some TinyUSB API missing, this hack to allow us to fill those API
# to pass the compilation process
CFLAGS += \
-D"tud_int_handler(x)= " \
include ../../rules.mk

View file

@ -0,0 +1,4 @@
CONFIG_IDF_CMAKE=y
CONFIG_IDF_TARGET="esp32s2"
CONFIG_IDF_TARGET_ESP32S2=y
CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION=y

View file

@ -0,0 +1,15 @@
idf_component_register(SRCS "main.c"
INCLUDE_DIRS "."
REQUIRES freertos soc)
target_compile_options(${COMPONENT_TARGET} PUBLIC
"-DCFG_TUSB_MCU=OPT_MCU_ESP32S2"
"-DCFG_TUSB_OS=OPT_OS_FREERTOS"
)
idf_component_get_property( FREERTOS_ORIG_INCLUDE_PATH freertos ORIG_INCLUDE_PATH)
target_include_directories(${COMPONENT_TARGET} PUBLIC
"${FREERTOS_ORIG_INCLUDE_PATH}"
"${TOP}/hw"
"${TOP}/src"
)

View file

@ -0,0 +1,82 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2019 Ha Thach (tinyusb.org)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "bsp/board.h"
//--------------------------------------------------------------------+
// MACRO CONSTANT TYPEDEF PROTYPES
//--------------------------------------------------------------------+
/* Blink pattern
* - 250 ms : button is not pressed
* - 1000 ms : button is pressed (and hold)
*/
enum {
BLINK_PRESSED = 250,
BLINK_UNPRESSED = 1000
};
#define HELLO_STR "Hello from TinyUSB\r\n"
int main(void)
{
board_init();
uint32_t start_ms = 0;
bool led_state = false;
while (1)
{
uint32_t interval_ms = board_button_read() ? BLINK_PRESSED : BLINK_UNPRESSED;
// uart echo
// uint8_t ch;
// if ( board_uart_read(&ch, 1) ) board_uart_write(&ch, 1);
// Blink every interval ms
if ( !(board_millis() - start_ms < interval_ms) )
{
board_uart_write(HELLO_STR, strlen(HELLO_STR));
start_ms = board_millis();
board_led_write(led_state);
led_state = 1 - led_state; // toggle
}
}
return 0;
}
#if CFG_TUSB_MCU == OPT_MCU_ESP32S2
void app_main(void)
{
main();
}
#endif

View file

@ -0,0 +1,88 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2019 Ha Thach (tinyusb.org)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*/
#ifndef _TUSB_CONFIG_H_
#define _TUSB_CONFIG_H_
#ifdef __cplusplus
extern "C" {
#endif
//--------------------------------------------------------------------
// COMMON CONFIGURATION
//--------------------------------------------------------------------
// defined by compiler flags for flexibility
#ifndef CFG_TUSB_MCU
#error CFG_TUSB_MCU must be defined
#endif
#ifndef CFG_TUSB_OS
#define CFG_TUSB_OS OPT_OS_NONE
#endif
#define CFG_TUSB_RHPORT0_MODE OPT_MODE_NONE
// CFG_TUSB_DEBUG is defined by compiler in DEBUG build
// #define CFG_TUSB_DEBUG 0
/* USB DMA on some MCUs can only access a specific SRAM region with restriction on alignment.
* Tinyusb use follows macros to declare transferring memory so that they can be put
* into those specific section.
* e.g
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
*/
#ifndef CFG_TUSB_MEM_SECTION
#define CFG_TUSB_MEM_SECTION
#endif
#ifndef CFG_TUSB_MEM_ALIGN
#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4)))
#endif
//--------------------------------------------------------------------
// DEVICE CONFIGURATION
//--------------------------------------------------------------------
#ifndef CFG_TUD_ENDPOINT0_SIZE
#define CFG_TUD_ENDPOINT0_SIZE 64
#endif
//------------- CLASS -------------//
#define CFG_TUD_CDC 0
#define CFG_TUD_MSC 1
#define CFG_TUD_HID 0
#define CFG_TUD_MIDI 0
#define CFG_TUD_VENDOR 0
// MSC Buffer size of Device Mass storage
#define CFG_TUD_MSC_BUFSIZE 512
#ifdef __cplusplus
}
#endif
#endif /* _TUSB_CONFIG_H_ */

View file

@ -0,0 +1,12 @@
include ../../../tools/top.mk
include ../../make.mk
INC += \
src \
$(TOP)/hw \
# Example source
EXAMPLE_SOURCE += $(wildcard src/*.c)
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
include ../../rules.mk

View file

@ -0,0 +1,100 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2019 Ha Thach (tinyusb.org)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include "bsp/board.h"
#include "tusb.h"
//------------- prototypes -------------//
static void cdc_task(void);
/*------------- MAIN -------------*/
int main(void)
{
board_init();
tusb_init();
while (1)
{
tud_task(); // tinyusb device task
cdc_task();
}
return 0;
}
// echo to either Serial0 or Serial1
// with Serial0 as all lower case, Serial1 as all upper case
static void echo_serial_port(uint8_t itf, uint8_t buf[], uint32_t count)
{
for(uint32_t i=0; i<count; i++)
{
if (itf == 0)
{
// echo back 1st port as lower case
if (isupper(buf[i])) buf[i] += 'a' - 'A';
}
else
{
// echo back additional ports as upper case
if (islower(buf[i])) buf[i] -= 'a' - 'A';
}
tud_cdc_n_write_char(itf, buf[i]);
if ( buf[i] == '\r' ) tud_cdc_n_write_char(itf, '\n');
}
tud_cdc_n_write_flush(itf);
}
//--------------------------------------------------------------------+
// USB CDC
//--------------------------------------------------------------------+
static void cdc_task(void)
{
uint8_t itf;
for (itf = 0; itf < CFG_TUD_CDC; itf++)
{
if ( tud_cdc_n_connected(itf) )
{
if ( tud_cdc_n_available(itf) )
{
uint8_t buf[64];
uint32_t count = tud_cdc_n_read(itf, buf, sizeof(buf));
// echo back to both serial ports
echo_serial_port(0, buf, count);
echo_serial_port(1, buf, count);
}
}
}
}

View file

@ -0,0 +1,93 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2019 Ha Thach (tinyusb.org)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*/
#ifndef _TUSB_CONFIG_H_
#define _TUSB_CONFIG_H_
#ifdef __cplusplus
extern "C" {
#endif
//--------------------------------------------------------------------
// COMMON CONFIGURATION
//--------------------------------------------------------------------
// defined by compiler flags for flexibility
#ifndef CFG_TUSB_MCU
#error CFG_TUSB_MCU must be defined
#endif
#if CFG_TUSB_MCU == OPT_MCU_LPC18XX || CFG_TUSB_MCU == OPT_MCU_LPC43XX || CFG_TUSB_MCU == OPT_MCU_MIMXRT10XX || \
CFG_TUSB_MCU == OPT_MCU_NUC505 || CFG_TUSB_MCU == OPT_MCU_CXD56
#define CFG_TUSB_RHPORT0_MODE (OPT_MODE_DEVICE | OPT_MODE_HIGH_SPEED)
#else
#define CFG_TUSB_RHPORT0_MODE OPT_MODE_DEVICE
#endif
#define CFG_TUSB_OS OPT_OS_NONE
// CFG_TUSB_DEBUG is defined by compiler in DEBUG build
// #define CFG_TUSB_DEBUG 0
/* USB DMA on some MCUs can only access a specific SRAM region with restriction on alignment.
* Tinyusb use follows macros to declare transferring memory so that they can be put
* into those specific section.
* e.g
* - CFG_TUSB_MEM SECTION : __attribute__ (( section(".usb_ram") ))
* - CFG_TUSB_MEM_ALIGN : __attribute__ ((aligned(4)))
*/
#ifndef CFG_TUSB_MEM_SECTION
#define CFG_TUSB_MEM_SECTION
#endif
#ifndef CFG_TUSB_MEM_ALIGN
#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4)))
#endif
//--------------------------------------------------------------------
// DEVICE CONFIGURATION
//--------------------------------------------------------------------
#ifndef CFG_TUD_ENDPOINT0_SIZE
#define CFG_TUD_ENDPOINT0_SIZE 64
#endif
//------------- CLASS -------------//
#define CFG_TUD_CDC 2
#define CFG_TUD_MSC 0
#define CFG_TUD_HID 0
#define CFG_TUD_MIDI 0
#define CFG_TUD_VENDOR 0
// CDC FIFO size of TX and RX
#define CFG_TUD_CDC_RX_BUFSIZE 64
#define CFG_TUD_CDC_TX_BUFSIZE 64
#ifdef __cplusplus
}
#endif
#endif /* _TUSB_CONFIG_H_ */

View file

@ -0,0 +1,165 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2019 Ha Thach (tinyusb.org)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*/
#include "tusb.h"
/* A combination of interfaces must have a unique product id, since PC will save device driver after the first plug.
* Same VID/PID with different interface e.g MSC (first), then CDC (later) will possibly cause system error on PC.
*
* Auto ProductID layout's Bitmap:
* [MSB] MIDI | HID | MSC | CDC [LSB]
*/
#define _PID_MAP(itf, n) ( (CFG_TUD_##itf) << (n) )
#define USB_PID (0x4000 | _PID_MAP(CDC, 0) | _PID_MAP(MSC, 1) | _PID_MAP(HID, 2) | \
_PID_MAP(MIDI, 3) | _PID_MAP(VENDOR, 4) )
//--------------------------------------------------------------------+
// Device Descriptors
//--------------------------------------------------------------------+
tusb_desc_device_t const desc_device =
{
.bLength = sizeof(tusb_desc_device_t),
.bDescriptorType = TUSB_DESC_DEVICE,
.bcdUSB = 0x0200,
// Use Interface Association Descriptor (IAD) for CDC
// As required by USB Specs IAD's subclass must be common class (2) and protocol must be IAD (1)
.bDeviceClass = TUSB_CLASS_MISC,
.bDeviceSubClass = MISC_SUBCLASS_COMMON,
.bDeviceProtocol = MISC_PROTOCOL_IAD,
.bMaxPacketSize0 = CFG_TUD_ENDPOINT0_SIZE,
.idVendor = 0xCafe,
.idProduct = USB_PID,
.bcdDevice = 0x0100,
.iManufacturer = 0x01,
.iProduct = 0x02,
.iSerialNumber = 0x03,
.bNumConfigurations = 0x01
};
// Invoked when received GET DEVICE DESCRIPTOR
// Application return pointer to descriptor
uint8_t const * tud_descriptor_device_cb(void)
{
return (uint8_t const *) &desc_device;
}
//--------------------------------------------------------------------+
// Configuration Descriptor
//--------------------------------------------------------------------+
enum
{
ITF_NUM_CDC1 = 0,
ITF_NUM_CDC_DATA1,
ITF_NUM_CDC2,
ITF_NUM_CDC_DATA2,
ITF_NUM_TOTAL
};
#define CONFIG_TOTAL_LEN (TUD_CONFIG_DESC_LEN + CFG_TUD_CDC * TUD_CDC_DESC_LEN)
#if CFG_TUSB_MCU == OPT_MCU_LPC175X_6X || CFG_TUSB_MCU == OPT_MCU_LPC177X_8X || CFG_TUSB_MCU == OPT_MCU_LPC40XX
// LPC 17xx and 40xx endpoint type (bulk/interrupt/iso) are fixed by its number
// 0 control, 1 In, 2 Bulk, 3 Iso, 4 In etc ...
#define EPNUM_CDC 2
#else
#define EPNUM_CDC 2
#endif
uint8_t const desc_configuration[] =
{
// Config number, interface count, string index, total length, attribute, power in mA
TUD_CONFIG_DESCRIPTOR(1, ITF_NUM_TOTAL, 0, CONFIG_TOTAL_LEN, TUSB_DESC_CONFIG_ATT_REMOTE_WAKEUP, 100),
// 1st CDC: Interface number, string index, EP notification address and size, EP data address (out, in) and size.
TUD_CDC_DESCRIPTOR(ITF_NUM_CDC1, 4, 0x81, 8, EPNUM_CDC, 0x80 | EPNUM_CDC, 64),
// 2nd CDC: Interface number, string index, EP notification address and size, EP data address (out, in) and size.
TUD_CDC_DESCRIPTOR(ITF_NUM_CDC2, 4, 0x83, 8, EPNUM_CDC + 2, 0x80 | (EPNUM_CDC + 2), 64),
};
// Invoked when received GET CONFIGURATION DESCRIPTOR
// Application return pointer to descriptor
// Descriptor contents must exist long enough for transfer to complete
uint8_t const * tud_descriptor_configuration_cb(uint8_t index)
{
(void) index; // for multiple configurations
return desc_configuration;
}
//--------------------------------------------------------------------+
// String Descriptors
//--------------------------------------------------------------------+
// array of pointer to string descriptors
char const* string_desc_arr [] =
{
(const char[]) { 0x09, 0x04 }, // 0: is supported language is English (0x0409)
"TinyUSB", // 1: Manufacturer
"TinyUSB Device", // 2: Product
"123456", // 3: Serials, should use chip ID
"TinyUSB CDC", // 4: CDC Interface
};
static uint16_t _desc_str[32];
// Invoked when received GET STRING DESCRIPTOR request
// Application return pointer to descriptor, whose contents must exist long enough for transfer to complete
uint16_t const* tud_descriptor_string_cb(uint8_t index, uint16_t langid)
{
(void) langid;
uint8_t chr_count;
if ( index == 0)
{
memcpy(&_desc_str[1], string_desc_arr[0], 2);
chr_count = 1;
}else
{
// Convert ASCII string into UTF-16
if ( !(index < sizeof(string_desc_arr)/sizeof(string_desc_arr[0])) ) return NULL;
const char* str = string_desc_arr[index];
// Cap at max char
chr_count = strlen(str);
if ( chr_count > 31 ) chr_count = 31;
for(uint8_t i=0; i<chr_count; i++)
{
_desc_str[1+i] = str[i];
}
}
// first byte is length (including header), second byte is string type
_desc_str[0] = (TUSB_DESC_STRING << 8 ) | (2*chr_count + 2);
return _desc_str;
}

View file

@ -20,7 +20,7 @@
arm_target_interface_type="SWD"
build_treat_warnings_as_errors="Yes"
c_preprocessor_definitions="__LPC11U68__;__LPC1100_FAMILY;__LPC11U00_SUBFAMILY;ARM_MATH_CM0PLUS;FLASH_PLACEMENT=1;CORE_M0PLUS;CFG_TUSB_MCU=OPT_MCU_LPC11UXX;CFG_TUSB_MEM_SECTION= __attribute__((section(&quot;.bss3&quot;)));CFG_TUSB_MEM_ALIGN=__attribute__ ((aligned(64)))"
c_user_include_directories="../../src;$(rootDir)/hw;$(rootDir)/hw/mcu/nxp/lpcopen/lpc_chip_11u6x/inc;$(rootDir)/src"
c_user_include_directories="../../src;$(rootDir)/hw;$(rootDir)/hw/mcu/nxp/lpc_driver/lpc_chip_11u6x/inc;$(rootDir)/src"
debug_register_definition_file="$(ProjectDir)/LPC11U6x_Registers.xml"
debug_target_connection="J-Link"
gcc_enable_all_warnings="Yes"
@ -63,35 +63,37 @@
</folder>
<folder Name="mcu">
<folder Name="nxp">
<folder Name="lpc_chip_11u6x">
<folder Name="inc">
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_11u6x/inc/chip.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_11u6x/inc/clock_11u6x.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_11u6x/inc/cmsis.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_11u6x/inc/core_cm0.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_11u6x/inc/core_cm0plus.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_11u6x/inc/core_cm3.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_11u6x/inc/core_cm4.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_11u6x/inc/core_cm4_simd.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_11u6x/inc/core_cmFunc.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_11u6x/inc/core_cmInstr.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_11u6x/inc/error.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_11u6x/inc/gpio_11u6x.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_11u6x/inc/gpiogroup_11u6x.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_11u6x/inc/iocon_11u6x.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_11u6x/inc/lpc_types.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_11u6x/inc/sys_config.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_11u6x/inc/syscon_11u6x.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_11u6x/inc/uart_0_11u6x.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_11u6x/inc/usbd_11u6x.h" />
</folder>
<folder Name="src">
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_11u6x/src/chip_11u6x.c" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_11u6x/src/clock_11u6x.c" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_11u6x/src/gpio_11u6x.c" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_11u6x/src/syscon_11u6x.c" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_11u6x/src/sysinit_11u6x.c" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_11u6x/src/iocon_11u6x.c" />
<folder Name="lpc_driver">
<folder Name="lpc_chip_11u6x">
<folder Name="inc">
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_11u6x/inc/chip.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_11u6x/inc/clock_11u6x.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_11u6x/inc/cmsis.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_11u6x/inc/core_cm0.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_11u6x/inc/core_cm0plus.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_11u6x/inc/core_cm3.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_11u6x/inc/core_cm4.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_11u6x/inc/core_cm4_simd.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_11u6x/inc/core_cmFunc.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_11u6x/inc/core_cmInstr.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_11u6x/inc/error.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_11u6x/inc/gpio_11u6x.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_11u6x/inc/gpiogroup_11u6x.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_11u6x/inc/iocon_11u6x.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_11u6x/inc/lpc_types.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_11u6x/inc/sys_config.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_11u6x/inc/syscon_11u6x.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_11u6x/inc/uart_0_11u6x.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_11u6x/inc/usbd_11u6x.h" />
</folder>
<folder Name="src">
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_11u6x/src/chip_11u6x.c" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_11u6x/src/clock_11u6x.c" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_11u6x/src/gpio_11u6x.c" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_11u6x/src/syscon_11u6x.c" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_11u6x/src/sysinit_11u6x.c" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_11u6x/src/iocon_11u6x.c" />
</folder>
</folder>
</folder>
</folder>

View file

@ -19,7 +19,7 @@
arm_target_interface_type="SWD"
build_treat_warnings_as_errors="Yes"
c_preprocessor_definitions="__LPC1347FBD64__;__LPC1300_FAMILY;__LPC134x_SUBFAMILY;ARM_MATH_CM3;FLASH_PLACEMENT=1;CORE_M3;CFG_TUSB_MCU=OPT_MCU_LPC13XX;CFG_TUSB_MEM_SECTION= __attribute__((section(&quot;.bss3&quot;)));CFG_TUSB_MEM_ALIGN=__attribute__ ((aligned(64)))"
c_user_include_directories="../../src;$(rootDir)/hw;$(rootDir)/hw/mcu/nxp/lpcopen/lpc_chip_13xx/inc;$(rootDir)/src"
c_user_include_directories="../../src;$(rootDir)/hw;$(rootDir)/hw/mcu/nxp/lpc_driver/lpc13xx/lpc_chip_13xx/inc;$(rootDir)/src"
debug_register_definition_file="$(ProjectDir)/LPC13Uxx_Registers.xml"
debug_target_connection="J-Link"
gcc_enable_all_warnings="Yes"
@ -53,35 +53,37 @@
<file file_name="../../../../../hw/bsp/ansi_escape.h" />
<file file_name="../../../../../hw/bsp/board.h" />
<folder Name="lpcxpresso1347">
<file file_name="../../../../../hw/bsp/lpcxpresso1347/board_lpcxpresso1347.c" />
<file file_name="../../../../../hw/bsp/lpcxpresso1347/lpcxpresso1347.c" />
</folder>
</folder>
<folder Name="mcu">
<folder Name="nxp">
<folder Name="lpc_chip_13xx">
<folder Name="inc">
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_13xx/inc/chip.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_13xx/inc/clock_13xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_13xx/inc/cmsis.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_13xx/inc/cmsis_1347.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_13xx/inc/core_cm3.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_13xx/inc/core_cmFunc.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_13xx/inc/core_cmInstr.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_13xx/inc/gpio_13xx_1.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_13xx/inc/gpio_13xx_2.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_13xx/inc/iocon_13xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_13xx/inc/lpc_types.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_13xx/inc/sys_config.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_13xx/inc/sysctl_13xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_13xx/inc/uart_13xx.h" />
</folder>
<folder Name="src">
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_13xx/src/chip_13xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_13xx/src/clock_13xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_13xx/src/gpio_13xx_1.c" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_13xx/src/sysctl_13xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_13xx/src/sysinit_13xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_13xx/src/iocon_13xx.c" />
<folder Name="lpc_driver">
<folder Name="lpc_chip_13xx">
<folder Name="inc">
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_13xx/inc/chip.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_13xx/inc/clock_13xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_13xx/inc/cmsis.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_13xx/inc/cmsis_1347.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_13xx/inc/core_cm3.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_13xx/inc/core_cmFunc.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_13xx/inc/core_cmInstr.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_13xx/inc/gpio_13xx_1.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_13xx/inc/gpio_13xx_2.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_13xx/inc/iocon_13xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_13xx/inc/lpc_types.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_13xx/inc/sys_config.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_13xx/inc/sysctl_13xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_13xx/inc/uart_13xx.h" />
</folder>
<folder Name="src">
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_13xx/src/chip_13xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_13xx/src/clock_13xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_13xx/src/gpio_13xx_1.c" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_13xx/src/sysctl_13xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_13xx/src/sysinit_13xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_13xx/src/iocon_13xx.c" />
</folder>
</folder>
</folder>
</folder>

View file

@ -20,7 +20,7 @@
arm_target_interface_type="SWD"
build_treat_warnings_as_errors="Yes"
c_preprocessor_definitions="LPC175x_6x;__LPC1700_FAMILY;__LPC176x_SUBFAMILY;ARM_MATH_CM3;FLASH_PLACEMENT=1;CORE_M3;CFG_TUSB_MCU=OPT_MCU_LPC175X_6X"
c_user_include_directories="../../src;$(rootDir)/hw;$(rootDir)/hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc;$(rootDir)/src"
c_user_include_directories="../../src;$(rootDir)/hw;$(rootDir)/hw/mcu/nxp/lpc_driver/lpc_chip_175x_6x/inc;$(rootDir)/src"
debug_register_definition_file="LPC176x5x_Registers.xml"
debug_target_connection="J-Link"
gcc_enable_all_warnings="Yes"
@ -46,40 +46,40 @@
<file file_name="../../../../../hw/bsp/ansi_escape.h" />
<file file_name="../../../../../hw/bsp/board.h" />
<folder Name="lpcxpresso1769">
<file file_name="../../../../../hw/bsp/lpcxpresso1769/board_lpcxpresso1769.c" />
<file file_name="../../../../../hw/bsp/lpcxpresso1769/lpcxpresso1769.c" />
</folder>
</folder>
<folder Name="mcu">
<folder Name="nxp">
<folder Name="lpcopen">
<folder Name="lpc_driver">
<folder Name="lpc_chip_175x_6x">
<folder Name="inc">
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/chip.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/chip_lpc175x_6x.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/chip_lpc177x_8x.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/chip_lpc407x_8x.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/clock_17xx_40xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/cmsis.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/cmsis_175x_6x.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/core_cm3.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/core_cmFunc.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/core_cmInstr.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/gpio_17xx_40xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/gpioint_17xx_40xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/iocon_17xx_40xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/lpc_types.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/sys_config.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/sysctl_17xx_40xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/inc/uart_17xx_40xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_175x_6x/inc/chip.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_175x_6x/inc/chip_lpc175x_6x.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_175x_6x/inc/chip_lpc177x_8x.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_175x_6x/inc/chip_lpc407x_8x.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_175x_6x/inc/clock_17xx_40xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_175x_6x/inc/cmsis.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_175x_6x/inc/cmsis_175x_6x.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_175x_6x/inc/core_cm3.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_175x_6x/inc/core_cmFunc.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_175x_6x/inc/core_cmInstr.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_175x_6x/inc/gpio_17xx_40xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_175x_6x/inc/gpioint_17xx_40xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_175x_6x/inc/iocon_17xx_40xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_175x_6x/inc/lpc_types.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_175x_6x/inc/sys_config.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_175x_6x/inc/sysctl_17xx_40xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_175x_6x/inc/uart_17xx_40xx.h" />
</folder>
<folder Name="src">
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/src/chip_17xx_40xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/src/clock_17xx_40xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/src/gpio_17xx_40xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/src/iocon_17xx_40xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/src/sysctl_17xx_40xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/src/sysinit_17xx_40xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_175x_6x/src/uart_17xx_40xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_175x_6x/src/chip_17xx_40xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_175x_6x/src/clock_17xx_40xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_175x_6x/src/gpio_17xx_40xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_175x_6x/src/iocon_17xx_40xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_175x_6x/src/sysctl_17xx_40xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_175x_6x/src/sysinit_17xx_40xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_175x_6x/src/uart_17xx_40xx.c" />
</folder>
</folder>
</folder>

View file

@ -0,0 +1,135 @@
<!DOCTYPE CrossStudio_Project_File>
<solution Name="lpc18xx" target="8" version="2">
<project Name="lpc18xx">
<configuration
Name="Common"
Placement="Flash"
Target="LPC1857"
arm_architecture="v7M"
arm_core_type="Cortex-M3"
arm_endian="Little"
arm_fpu_type="None"
arm_interwork="No"
arm_linker_heap_size="256"
arm_linker_process_stack_size="0"
arm_linker_stack_size="256"
arm_simulator_memory_simulation_parameter="RAM;0x10000000;0x00008000;ROM;0x1A000000;0x00080000;ROM;0x1B000000;0x00080000;RAM;0x20000000;0x00010000"
arm_target_debug_interface_type="ADIv5"
arm_target_device_name="LPC1857"
arm_target_interface_type="SWD"
build_treat_warnings_as_errors="Yes"
c_preprocessor_definitions="LPC18xx;__LPC1800_FAMILY;__LPC185x_SUBFAMILY;ARM_MATH_CM3;FLASH_PLACEMENT=1;CORE_M3;CFG_TUSB_MCU=OPT_MCU_LPC18XX;CFG_TUSB_MEM_SECTION= __attribute__((section(&quot;.bss2&quot;)))"
c_user_include_directories="../../src;$(rootDir)/hw;$(rootDir)/hw/mcu/nxp/lpc_driver/lpc_chip_18xx/inc;$(rootDir)/hw/mcu/nxp/lpc_driver/lpc_chip_18xx/inc/config_18xx;$(rootDir)/src"
debug_register_definition_file="$(ProjectDir)/LPC18xx_Registers.xml"
debug_target_connection="J-Link"
gcc_enable_all_warnings="Yes"
gcc_entry_point="Reset_Handler"
linker_memory_map_file="$(ProjectDir)/LPC1857_MemoryMap.xml"
linker_section_placement_file="$(ProjectDir)/flash_placement.xml"
macros="DeviceFamily=LPC1800;DeviceSubFamily=LPC185x;Target=LPC1857;Placement=Flash;rootDir=../../../../.."
package_dependencies="LPC1800"
project_directory=""
project_type="Executable"
target_reset_script="Reset();"
target_trace_initialize_script="EnableTrace(&quot;$(TraceInterfaceType)&quot;)" />
<folder Name="System Files">
<file file_name="thumb_crt0.s" />
<file file_name="LPC1800_Startup.s" />
<file file_name="LPC18xx_Vectors.s">
<configuration Name="Common" file_type="Assembly" />
</file>
<file file_name="LPC1857_MemoryMap.xml" />
<file file_name="flash_placement.xml" />
<file file_name="LPC1800_Target.js">
<configuration Name="Common" file_type="Reset Script" />
</file>
</folder>
<configuration
Name="Debug"
link_use_linker_script_file="No"
linker_section_placement_file="flash_placement.xml" />
<folder Name="hw">
<folder Name="bsp">
<file file_name="../../../../../hw/bsp/ansi_escape.h" />
<file file_name="../../../../../hw/bsp/board.h" />
<folder Name="mcb1800">
<file file_name="../../../../../hw/bsp/mcb1800/mcb1800.c" />
</folder>
</folder>
<folder Name="mcu">
<folder Name="nxp">
<folder Name="lpc_driver">
<folder Name="lpc_chip_18xx">
<folder Name="inc">
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_18xx/inc/arm_common_tables.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_18xx/inc/arm_math.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_18xx/inc/cguccu_18xx_43xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_18xx/inc/chip.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_18xx/inc/chip_clocks.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_18xx/inc/chip_lpc18xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_18xx/inc/chip_lpc43xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_18xx/inc/clock_18xx_43xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_18xx/inc/cmsis.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_18xx/inc/cmsis_18xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_18xx/inc/cmsis_43xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_18xx/inc/cmsis_43xx_m0app.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_18xx/inc/cmsis_43xx_m0sub.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_18xx/inc/core_cm0.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_18xx/inc/core_cm0plus.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_18xx/inc/core_cm3.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_18xx/inc/core_cm4.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_18xx/inc/core_cm4_simd.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_18xx/inc/core_cmFunc.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_18xx/inc/core_cmInstr.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_18xx/inc/core_sc000.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_18xx/inc/core_sc300.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_18xx/inc/creg_18xx_43xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_18xx/inc/gpio_18xx_43xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_18xx/inc/lpc_types.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_18xx/inc/uart_18xx_43xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_18xx/inc/usbhs_18xx_43xx.h" />
<folder Name="config_18xx">
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_18xx/inc/config_18xx/cmsis_18xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_18xx/inc/config_18xx/sys_config.h" />
</folder>
</folder>
<folder Name="src">
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_18xx/src/chip_18xx_43xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_18xx/src/clock_18xx_43xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_18xx/src/gpio_18xx_43xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_18xx/src/sysinit_18xx_43xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_18xx/src/uart_18xx_43xx.c" />
</folder>
</folder>
</folder>
</folder>
</folder>
</folder>
<folder
Name="segger_rtt"
exclude=""
filter="*.c;*.h"
path="../../../../../lib/segger_rtt"
recurse="No" />
<folder
Name="src"
exclude=""
filter="*.c;*.h"
path="../../src"
recurse="Yes" />
<folder
Name="tinyusb"
exclude=""
filter="*.c;*.h"
path="../../../../../src"
recurse="Yes" />
<configuration
Name="MCB1800"
c_preprocessor_definitions="BOARD_MCB1800" />
</project>
<configuration
Name="MCB1800"
c_preprocessor_definitions="DEBUG"
gcc_debugging_level="Level 3"
gcc_optimization_level="None" />
</solution>

View file

@ -20,7 +20,7 @@
arm_target_interface_type="SWD"
build_treat_warnings_as_errors="Yes"
c_preprocessor_definitions="CORE_M4;__LPC4000_FAMILY;__LPC408x_SUBFAMILY;ARM_MATH_CM4;FLASH_PLACEMENT=1;CFG_TUSB_MCU=OPT_MCU_LPC40XX;CFG_TUSB_MEM_SECTION= __attribute__((section(&quot;.bss2&quot;)))"
c_user_include_directories="../../src;$(rootDir)/hw;$(rootDir)/hw/mcu/nxp/lpcopen/lpc_chip_40xx/inc;$(rootDir)/src"
c_user_include_directories="../../src;$(rootDir)/hw;$(rootDir)/hw/mcu/nxp/lpc_driver/lpc_chip_40xx/inc;$(rootDir)/src"
debug_register_definition_file="$(ProjectDir)/LPC408x_7x_Registers.xml"
debug_target_connection="J-Link"
gcc_enable_all_warnings="Yes"
@ -55,39 +55,41 @@
<file file_name="../../../../../hw/bsp/ansi_escape.h" />
<file file_name="../../../../../hw/bsp/board.h" />
<folder Name="ea4088qs">
<file file_name="../../../../../hw/bsp/ea4088qs/board_ea4088qs.c" />
<file file_name="../../../../../hw/bsp/ea4088qs/ea4088qs.c" />
</folder>
</folder>
<folder Name="mcu">
<folder Name="nxp">
<folder Name="lpc_chip_40xx">
<folder Name="inc">
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_40xx/inc/chip.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_40xx/inc/chip_lpc175x_6x.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_40xx/inc/chip_lpc177x_8x.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_40xx/inc/chip_lpc407x_8x.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_40xx/inc/clock_17xx_40xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_40xx/inc/cmsis.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_40xx/inc/cmsis_40xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_40xx/inc/core_cm4.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_40xx/inc/core_cm4_simd.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_40xx/inc/core_cmFunc.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_40xx/inc/core_cmInstr.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_40xx/inc/gpio_17xx_40xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_40xx/inc/sys_config.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_40xx/inc/sysctl_17xx_40xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_40xx/inc/uart_17xx_40xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_40xx/inc/usb_17xx_40xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_40xx/inc/iocon_17xx_40xx.h" />
</folder>
<folder Name="src">
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_40xx/src/chip_17xx_40xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_40xx/src/clock_17xx_40xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_40xx/src/gpio_17xx_40xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_40xx/src/iocon_17xx_40xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_40xx/src/sysctl_17xx_40xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_40xx/src/sysinit_17xx_40xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpcopen/lpc_chip_40xx/src/uart_17xx_40xx.c" />
<folder Name="lpc_driver">
<folder Name="lpc_chip_40xx">
<folder Name="inc">
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_40xx/inc/chip.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_40xx/inc/chip_lpc175x_6x.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_40xx/inc/chip_lpc177x_8x.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_40xx/inc/chip_lpc407x_8x.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_40xx/inc/clock_17xx_40xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_40xx/inc/cmsis.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_40xx/inc/cmsis_40xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_40xx/inc/core_cm4.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_40xx/inc/core_cm4_simd.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_40xx/inc/core_cmFunc.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_40xx/inc/core_cmInstr.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_40xx/inc/gpio_17xx_40xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_40xx/inc/sys_config.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_40xx/inc/sysctl_17xx_40xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_40xx/inc/uart_17xx_40xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_40xx/inc/usb_17xx_40xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_40xx/inc/iocon_17xx_40xx.h" />
</folder>
<folder Name="src">
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_40xx/src/chip_17xx_40xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_40xx/src/clock_17xx_40xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_40xx/src/gpio_17xx_40xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_40xx/src/iocon_17xx_40xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_40xx/src/sysctl_17xx_40xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_40xx/src/sysinit_17xx_40xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_40xx/src/uart_17xx_40xx.c" />
</folder>
</folder>
</folder>
</folder>

View file

@ -0,0 +1,136 @@
<!DOCTYPE CrossStudio_Project_File>
<solution Name="lpc43xx" target="8" version="2">
<project Name="lpc43xx">
<configuration
Name="Common"
Placement="Flash"
Target="LPC4357 Cortex-M4"
arm_architecture="v7EM"
arm_core_type="Cortex-M4"
arm_endian="Little"
arm_fp_abi="Hard"
arm_fpu_type="FPv4-SP-D16"
arm_interwork="No"
arm_linker_heap_size="1024"
arm_linker_process_stack_size="0"
arm_linker_stack_size="1024"
arm_simulator_memory_simulation_parameter="RX 1a000000,00080000,FFFFFFFF;RWX 10000000,00008000,CDCDCDCD"
arm_target_debug_interface_type="ADIv5"
arm_target_device_name="LPC4357_M4"
arm_target_interface_type="SWD"
build_treat_warnings_as_errors="Yes"
c_preprocessor_definitions="CORE_M4;__LPC4300_FAMILY;__LPC435x_SUBFAMILY;ARM_MATH_CM4;FLASH_PLACEMENT=1;CFG_TUSB_MCU=OPT_MCU_LPC43XX;CFG_TUSB_MEM_SECTION= __attribute__((section(&quot;.bss2&quot;)))"
c_user_include_directories="../../src;$(rootDir)/hw;$(rootDir)/hw/mcu/nxp/lpc_driver/lpc_chip_43xx/inc;$(rootDir)/hw/mcu/nxp/lpc_driver/lpc_chip_43xx/inc/config_43xx;$(rootDir)/src;$(lpcDir)//inc"
debug_register_definition_file="LPC43xx_Registers.xml"
debug_target_connection="J-Link"
gcc_enable_all_warnings="Yes"
gcc_entry_point="Reset_Handler"
link_use_linker_script_file="No"
linker_memory_map_file="LPC4357 Cortex-M4_MemoryMap.xml"
linker_section_placement_file="flash_placement.xml"
linker_section_placements_segments="FLASH RX 0x1a000000 0x00080000;RAM RWX 0x10000000 0x00008000"
macros="DeviceFamily=LPC4300;DeviceSubFamily=LPC435x;Target=LPC4357 Cortex-M4;Placement=Flash;rootDir=../../../../.."
project_directory=""
project_type="Executable"
target_reset_script="Reset();"
target_script_file="$(ProjectDir)/LPC4300_Target.js"
target_trace_initialize_script="EnableTrace(&quot;$(TraceInterfaceType)&quot;)" />
<folder
Name="tinyusb"
exclude=""
filter="*.c;*.h"
path="../../../../../src"
recurse="Yes" />
<folder Name="hw">
<folder Name="bsp">
<file file_name="../../../../../hw/bsp/ansi_escape.h" />
<file file_name="../../../../../hw/bsp/board.h" />
<folder Name="ea4357">
<file file_name="../../../../../hw/bsp/ea4357/pca9532.c" />
<file file_name="../../../../../hw/bsp/ea4357/pca9532.h" />
<file file_name="../../../../../hw/bsp/ea4357/ea4357.c" />
</folder>
</folder>
<folder Name="mcu">
<folder Name="nxp">
<folder Name="lpc_driver">
<folder Name="lpc_chip_43xx">
<folder Name="inc">
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/inc/arm_common_tables.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/inc/arm_math.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/inc/cguccu_18xx_43xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/inc/chip.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/inc/chip_clocks.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/inc/chip_lpc18xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/inc/chip_lpc43xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/inc/clock_18xx_43xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/inc/cmsis.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/inc/cmsis_18xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/inc/cmsis_43xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/inc/cmsis_43xx_m0app.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/inc/cmsis_43xx_m0sub.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/inc/core_cm0.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/inc/core_cm0plus.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/inc/core_cm3.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/inc/core_cm4.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/inc/core_cm4_simd.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/inc/core_cmFunc.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/inc/core_cmInstr.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/inc/core_sc000.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/inc/core_sc300.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/inc/creg_18xx_43xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/inc/fpu_init.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/inc/gpio_18xx_43xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/inc/i2c_18xx_43xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/inc/i2c_common_18xx_43xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/inc/i2cm_18xx_43xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/inc/lpc_types.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/inc/packing.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/inc/uart_18xx_43xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/inc/usbhs_18xx_43xx.h" />
<folder Name="config_43xx">
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/inc/config_43xx/cmsis_43xx.h" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/inc/config_43xx/sys_config.h" />
</folder>
</folder>
<folder Name="src">
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/src/chip_18xx_43xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/src/clock_18xx_43xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/src/fpu_init.c" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/src/gpio_18xx_43xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/src/i2c_18xx_43xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/src/i2cm_18xx_43xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/src/sysinit_18xx_43xx.c" />
<file file_name="../../../../../hw/mcu/nxp/lpc_driver/lpc_chip_43xx/src/uart_18xx_43xx.c" />
</folder>
</folder>
</folder>
</folder>
</folder>
</folder>
<configuration Name="Debug" build_treat_warnings_as_errors="Yes" />
<folder
Name="src"
exclude=""
filter="*.c;*.h"
path="../../src"
recurse="Yes" />
<folder Name="System Files">
<file file_name="flash_placement.xml" />
<file file_name="LPC4300_Startup.s" />
<file file_name="LPC4300_Target.js" />
<file file_name="LPC4357 Cortex-M4_MemoryMap.xml" />
<file file_name="LPC43xx_Registers.xml" />
<file file_name="LPC43xx_Vectors.s" />
<file file_name="thumb_crt0.s" />
</folder>
<folder
Name="segger_rtt"
exclude=""
filter="*.c;*.h"
path="../../../../../lib/segger_rtt"
recurse="No" />
<configuration Name="EA4357" c_preprocessor_definitions="BOARD_EA4357" />
</project>
<configuration Name="EA4357" />
</solution>

View file

@ -19,8 +19,9 @@
arm_target_device_name="nRF52840_xxAA"
arm_target_interface_type="SWD"
build_treat_warnings_as_errors="Yes"
c_preprocessor_definitions="NRF52840_XXAA;__nRF_FAMILY;ARM_MATH_CM4;FLASH_PLACEMENT=1;CFG_TUSB_MCU=OPT_MCU_NRF5X"
c_user_include_directories="../../src;$(rootDir)/hw/cmsis/Include;$(rootDir)/hw;$(rootDir)/src;$(nrfxDir)/..;$(nrfxDir);$(nrfxDir)/mdk;$(nrfxDir)/hal;$(nrfxDir)/drivers/include;$(nrfxDir)/drivers/src"
c_additional_options="-Wno-error=undef;-Wno-error=unused-parameter;-Wno-error=cast-align;-Wno-error=cast-function-type"
c_preprocessor_definitions="NRF52840_XXAA;__nRF_FAMILY;ARM_MATH_CM4;FLASH_PLACEMENT=1;CFG_TUSB_MCU=OPT_MCU_NRF5X;CFG_TUSB_DEBUG=1"
c_user_include_directories="../../src;$(rootDir)/lib/CMSIS_4/CMSIS/Include;$(rootDir)/hw;$(rootDir)/src;$(nrfxDir)/..;$(nrfxDir);$(nrfxDir)/mdk;$(nrfxDir)/hal;$(nrfxDir)/drivers/include;$(nrfxDir)/drivers/src"
debug_register_definition_file="nrf52840_Registers.xml"
debug_target_connection="J-Link"
gcc_enable_all_warnings="Yes"
@ -42,11 +43,12 @@
recurse="Yes" />
<folder Name="hw">
<folder Name="bsp">
<folder Name="pca10056">
<file file_name="../../../../../hw/bsp/pca10056/board_pca10056.c" />
</folder>
<file file_name="../../../../../hw/bsp/ansi_escape.h" />
<file file_name="../../../../../hw/bsp/board.h" />
<file file_name="../../../../../hw/bsp/board.c" />
<folder Name="feather_nrf52840_express">
<file file_name="../../../../../hw/bsp/feather_nrf52840_express/feather_nrf52840_express.c" />
</folder>
</folder>
<folder Name="mcu">
<folder Name="nordic">
@ -60,6 +62,7 @@
<folder Name="src">
<file file_name="../../../../../hw/mcu/nordic/nrfx/drivers/src/nrfx_power.c" />
<file file_name="../../../../../hw/mcu/nordic/nrfx/drivers/src/nrfx_qspi.c" />
<file file_name="../../../../../hw/mcu/nordic/nrfx/drivers/src/nrfx_uarte.c" />
</folder>
</folder>
<folder Name="hal">
@ -102,16 +105,10 @@
<file file_name="thumb_crt0.s" />
<file file_name="nRF52840_xxAA_s140v6_MemoryMap.xml" />
</folder>
<folder
Name="segger_rtt"
exclude=""
filter="*.c;*.h"
path="../../../../../lib/segger_rtt"
recurse="No" />
<configuration
Name="pca10056"
build_treat_warnings_as_errors="No"
c_preprocessor_definitions="BOARD_PCA10056"
c_preprocessor_definitions=""
linker_memory_map_file="nRF52840_xxAA_MemoryMap.xml" />
<configuration
Name="pca10056 s140v6"
@ -120,7 +117,16 @@
c_user_include_directories="$(nrfxDir)/../nrf5x/s140_nrf52_6.1.1_API/include;$(nrfxDir)/../nrf5x/s140_nrf52_6.1.1_API/include/nrf52"
debug_start_from_entry_point_symbol="No"
linker_memory_map_file="nRF52840_xxAA_s140v6_MemoryMap.xml" />
<folder Name="SEGGER_RTT">
<folder Name="RTT">
<file file_name="../../../../../lib/SEGGER_RTT/RTT/SEGGER_RTT.c" />
<file file_name="../../../../../lib/SEGGER_RTT/RTT/SEGGER_RTT.h" />
<file file_name="../../../../../lib/SEGGER_RTT/RTT/SEGGER_RTT_Conf.h" />
<file file_name="../../../../../lib/SEGGER_RTT/RTT/SEGGER_RTT_printf.c" />
</folder>
</folder>
</project>
<configuration Name="pca10056" />
<configuration Name="pca10056 s140v6" />
<configuration Name="Feather nRF52840" />
</solution>

View file

@ -45,7 +45,7 @@
<file file_name="../../../../../hw/bsp/ansi_escape.h" />
<file file_name="../../../../../hw/bsp/board.h" />
<folder Name="metro_m0_express">
<file file_name="../../../../../hw/bsp/metro_m0_express/board_metro_m0_express.c" />
<file file_name="../../../../../hw/bsp/metro_m0_express/metro_m0_express.c" />
</folder>
</folder>
<folder Name="mcu">

View file

@ -46,7 +46,7 @@
<file file_name="../../../../../hw/bsp/ansi_escape.h" />
<file file_name="../../../../../hw/bsp/board.h" />
<folder Name="metro_m4_express">
<file file_name="../../../../../hw/bsp/metro_m4_express/board_metro_m4_express.c" />
<file file_name="../../../../../hw/bsp/metro_m4_express/metro_m4_express.c" />
</folder>
</folder>
<folder Name="mcu">

Some files were not shown because too many files have changed in this diff Show more