hathach
c29b7643a5
simplify _ff_correct_read_index()
2023-01-07 18:53:00 +07:00
hathach
248025bb6c
reverse idx2ptr() arguments to be consistent
2023-01-07 17:29:43 +07:00
hathach
24bd1c9562
update advance_pointer/backward_pointer to use depth instead of fifo, also rename to advance/backward_index
2023-01-07 17:27:26 +07:00
hathach
507d5b10b0
simplify _tu_fifo_count() and _tu_fifo_remaining(), also rename to _ff_count() and _ff_remaining()
2023-01-07 17:14:17 +07:00
hathach
a804a1ac09
simplify and remove _tu_fifo_empty, _tu_fifo_full. Also correct full condition check
2023-01-07 16:48:07 +07:00
hathach
82457519fa
minor clean up
2023-01-07 16:12:35 +07:00
hathach
2a1b81e3c5
minimize tu_fifo size to 16
...
- remove non_used_index_space
- packed overwritable with item_size
2023-01-06 11:51:17 +07:00
hathach
9c73c1a532
minor clean up
2023-01-06 10:56:19 +07:00
hathach
b42d298b81
Merge branch 'master' into fix-fifo-memory-overflow
2023-01-06 10:52:25 +07:00
hathach
48d4a67ec5
add tuh_cdc_peek()
2022-12-24 01:11:13 +07:00
hathach
660343d200
update fifo per PanRe review
2022-12-16 16:55:25 +07:00
hathach
04a5c03ea8
fix int conversion warnings
2022-12-12 11:54:33 +07:00
hathach
ce064de6fd
clean up
2022-12-10 00:18:11 +07:00
hathach
82852774a7
add fifo implementation note
...
- handle/fix double overflowed with write()
- other minor clean upp
2022-12-09 18:20:09 +07:00
hathach
3e32fa36b8
enhance tu fifo
...
- rename wr/rd absolute to index, and rel to pointer.
- fix crash with _tu_fifo_remaining()
- change get_relative_pointer() to idx2ptr() and merge with _ff_mod()
2022-12-08 16:39:24 +07:00
Bastien Nocera
6a2cf67289
Fix typos
2022-12-04 19:43:23 +07:00
hathach
4f6e770eda
add more warning option, also fix -Wconversion with rp2040
...
-Wuninitialized, -Wunused, -Wredundant-decls
2022-06-24 19:46:19 +07:00
email
af9a3f646c
fix idfgh-6508: return type in tu_fifo_peek_n()
...
https://github.com/espressif/esp-idf/issues/8161
2022-01-19 09:00:43 +01:00
hathach
161ba73c8b
fix locked mutex when fifo is full
2022-01-19 10:17:39 +07:00
hathach
0b249618b0
fix -Wcast-qual
2021-10-15 23:54:31 +07:00
hathach
98e4ba6a12
correct midi available with already stream read
2021-08-02 18:55:12 +07:00
MasterPhi
7321972380
Force unsigned compare on advance_pointer.
2021-06-30 20:26:27 +02:00
Mengsk
2b2549b573
Fix fifo overflow correction.
2021-06-30 17:00:56 +02:00
hathach
f384d6f67e
more with clean up
2021-05-27 18:11:12 +07:00
hathach
954056da0c
fix warnings cast function type for nrf, fix pico osal warning
...
add TODO for overflow in tusb_fifo.c
2021-05-25 21:02:40 +07:00
hathach
18c35bb89e
some text fomarting, update unit test to test get buffer info for fifo
2021-05-02 15:01:28 +07:00
Reinhard Panhuber
5add664874
Remove n from tu_fifo_get_write_info() and fix bug in vendor class
2021-04-30 17:37:14 +02:00
Reinhard Panhuber
5f88def9c9
Comment cleanup
2021-04-30 15:14:27 +02:00
Reinhard Panhuber
14e2c004cd
Remove variable n in tu_fifo_get_read_info()
2021-04-30 15:08:14 +02:00
Reinhard Panhuber
de933c45bc
Remove all remainings with peek_at
2021-04-30 14:56:14 +02:00
Reinhard Panhuber
5f268608d7
Remove offset feature from fifo.c
2021-04-30 13:39:55 +02:00
Reinhard Panhuber
8f72c97f7b
Change read infos to pointer type
2021-04-30 12:59:12 +02:00
Reinhard Panhuber
7072f0155e
Change tu_fifo_get_linear_write/read_info() to return a struct
...
Compilers always complain that variables set by function via pointer
might be uninitialized so to avoid that return values are now delivered
via struct.
2021-04-23 11:48:54 +02:00
Reinhard Panhuber
03f974c9b9
Implement functions to allow for DMA usage in audio driver.
...
- Add tud_audio_n_get_ep_out_ff(), tud_audio_n_get_ep_in_ff(),
tud_audio_n_get_rx_support_ff(), and tud_audio_n_get_tx_support_ff()
- Change get_linear_read/write_info() to return linear and wrapped part
at once
- Adjusted affected code in audio_device.c and tested with
audio_4_channel.
2021-04-23 10:27:48 +02:00
hathach
d9a0cc9e9f
more cleanup
2021-04-07 16:50:45 +07:00
hathach
893919a848
remove tu_fifo_backward_write/read_pointer API
...
since it is illegal from fifo perspective
2021-04-07 13:27:28 +07:00
hathach
2468f9e26d
more _ff_pull/push clean up
2021-04-07 13:15:25 +07:00
hathach
9042e973d3
clean up _ff_push_n
2021-04-07 12:52:57 +07:00
hathach
d6737fb5fe
use tu_unaligned_write32() for _ff_push_const_addr
2021-04-07 12:34:00 +07:00
hathach
d0fa4d5189
rename
2021-04-07 12:24:24 +07:00
hathach
8ac156622d
fix cast-align warning
2021-04-07 00:38:12 +07:00
hathach
a3c06aa7bc
more clean up for _ff_pull_const_addr_in_full_words()
2021-04-06 23:39:39 +07:00
hathach
d82ee2f8c0
refactor _ff_pull_n() with const addr
2021-04-06 23:12:04 +07:00
Reinhard Panhuber
9b2ddd9cc6
Generalize audio driver for 3 audio functions plus a lot more.
...
- Audio format and parameters are parsed from descriptors thus user no
longer needs to give them explicitely
- Tested for 4 channel software type I PCM encoding with 16 bit with 1
channel per FIFO and 2 channels per FIFO (this is I2S specific)
2021-04-03 09:49:27 +02:00
Reinhard Panhuber
994dddc231
Fix shadowing parameter in fifo.c
2021-03-25 14:38:55 +01:00
Reinhard Panhuber
bfddfbadc7
Implement unaligned word copy.
2021-03-25 14:28:59 +01:00
Reinhard Panhuber
1e4e87de51
Rework to copy wrapped word bytes by byte in copy_to_cont_dst etc.
2021-03-25 13:53:26 +01:00
Reinhard Panhuber
a60bd0c8ac
Fix bug in writing to constant src/dst address.
...
Copying has to be conduct in full words (at least for STM32). Renamed
copy function to tu_fifo_write_n_const_addr_full_words()
2021-03-23 19:33:04 +01:00
hathach
4ee1216aaf
fix fifo unlock typo, also clean up a bit
2021-03-13 00:22:04 +07:00
Reinhard Panhuber
d5a5a1cab6
Implement audio PCM type I enc./decoding acc. to 2.3.1.5 Audio Streams
...
Extending capabilities of support FIFOs
Removing copy from to FIFO
Adjusting audio examples
Remove peek/read into other FIFO
2021-03-10 19:32:13 +01:00