summaryrefslogtreecommitdiff
path: root/src/class/cdc/cdc_device.c
AgeCommit message (Collapse)Author
2023-04-28add aligned(4) for cdc_line_coding_thathach
2023-04-27cdc: fix line_coding aligmentJean-Baptiste Theou
While calling tud_cdc_n_get_line_coding, the structure is copied into the destination. Dump of assembler code for function tud_cdc_n_get_line_coding: 0x000193f4 <+0>: mov.w r2, #2112 @ 0x840 0x000193f8 <+4>: ldr r3, [pc, #20] @ (0x19410 <tud_cdc_n_get_line_coding+28>) 0x000193fa <+6>: mla r0, r2, r0, r3 => 0x000193fe <+10>: ldr.w r3, [r0, #6] 0x00019402 <+14>: str r3, [r1, #0] On some platform (tested on LPC55S28), the address needs to be 4-bytes aligned. Without this, the address is (gdb) p &_cdcd_itf.line_coding $3 = (cdc_line_coding_t *) 0x40100006 <_cdcd_itf+6> which leads to a HardFault. With this fix (gdb) p &_cdcd_itf.line_coding $5 = (cdc_line_coding_t *) 0x40100008 <_cdcd_itf+8> and the function can be called properly Signed-off-by: Jean-Baptiste Theou <[email protected]>
2023-03-17fix trailing space and new linehathach
temporarily disable codespell
2023-02-22use tu_static instead of static _fuzz_threadhathach
2023-02-22rename maros from FUZZ to _FUZZ, change TU_STATIC to static _fuzz_threadhathach
2023-01-20fix: Change all static variables to thread when fuzzingNathaniel Brough
2022-12-22fix incorrect rx buf in cdchathach
2022-12-15use OSAL_MUTEX_REQUIRED to replace CFG_FIFO_MUTEX/TUSB_OPT_MUTEXhathach
add macro to swallow mutex API in order to simplify code with mutex
2022-12-08fix typo, add -Wno-error=unreachable-code for fuzz due to latest cdc changeshathach
2022-12-06cdc: Fix autoflush for FIFO < MPSTomas Rezucha
2022-06-24add more warning option, also fix -Wconversion with rp2040hathach
-Wuninitialized, -Wunused, -Wredundant-decls
2022-06-02rhport argument in usbd_ API() is not used (always use the initialized port)hathach
remove the usage of TUD_OPT_RHPORT in class driver
2022-02-25rename TUSB_OPT_DEVICE_ENABLED to CFG_TUD_ENABLEDhathach
TUSB_OPT_DEVICE_ENABLED still usable for backward compatible
2021-11-23fix nrf easy dma race conditionhathach
2021-10-15update some sense warning from -Wconversionhathach
2021-06-28change usbh open driver to have max_len and return driver lenhathach
2021-05-27include clean uphathach
2021-04-30Remove all remainings with peek_atReinhard Panhuber
2021-04-03Merge remote-tracking branch 'upstream/master' into edpt_ISO_xferReinhard Panhuber
2021-03-12use !tu_fifo_empty() instead of tu_fifo_count()hathach
2021-03-11Add fifo empty check.HiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2021-03-10Merge branch 'master' into edpt_ISO_xferhathach
2021-03-10Call One time tu_fifo_write_n on cdcd_xfer_cbHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2021-03-04Extend FIFO mutex to use separate write and read mutexes.Reinhard Panhuber
Adjust all USB drivers using FIFO and mutexes.
2021-02-25initial break request handlingamit verma
2020-11-23add tud_ready() check in tud_cdc_n_write_flush()hathach
other clean up
2020-11-23Merge branch 'master' into cdc_without_dtrHa Thach
2020-11-19migrate cdc_device to new control_xfer_cbhathach
2020-11-18Implementation of the discussed changesJan Dümpelmann
- remove usbd_edpt_xfer_abort - rename tu_fifo_change_mode to tu_fifo_set_mode - remove CFG_TUD_CDC_CLEAR_AT_CONNECTION definition - remove auto fifo clear at connection event - add tud_cdc_n_write_clear function
2020-11-04Merge remote-tracking branch 'hathach/master' into cdc_without_dtrJan Dümpelmann
2020-11-02enable cdc auto flush on write()hathach
if there is enough data in the fifo
2020-09-14cdc device: claim endpoint before checking fifo availabilityhathach
- add pre-check to reduce mutex lock in usbd_edpt_claim
2020-09-10update claim edpt for hid and midihathach
2020-09-09typohathach
2020-09-09clean uphathach
2020-09-09update cdc edpt readhathach
2020-09-09introduce optional usbd_edpt_claim, usbd_edpt_release which can be used to ↵hathach
gain exclusive access to usbd_edpt_xfer
2020-09-04Add functionality to abort an ongoing transferJan Dümpelmann
2020-09-03New function to modify fifo overwritabilityJan Dümpelmann
2020-09-03Turn transmit fifo overwritable in no DTR modeJan Dümpelmann
2020-09-03Remove connected check for write flushingJan Dümpelmann
2020-08-24improve midihathach
- fix #436 tud_midi_rx_cb() not invoked - fix xfer_cb() not handle ep in - add ZLP if needed
2020-08-21Merge pull request #434 from gh2o/masterHa Thach
Add TX callback to CDC device
2020-08-20Slight optimization for cdc tx refillGavin Li
2020-08-20Smarter CDC TX refill logicGavin Li
2020-07-16add tud_speed_get()hathach
- define both fs and hs configuration descriptor - rename CFG_TUD_CDC_EPSIZE to CFG_TUD_CDC_EP_BUFSIZE with default size of 64 for FS, and 512 for HS
2020-07-01fix dfu-rt to response to SET_INTERFACE and DFU_GETSTATUShathach
fix #450
2020-06-20Call tud_cdc_tx_cb right after flush to keep tx fifo fullGavin Li
2020-06-18Add tx callback to cdc deviceGavin Li
Useful for continuous transmission of data, which is difficult currently because there is no notification of tx completion.
2020-05-28rename to drv_len to be consistenthathach