mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-31 05:52:55 +08:00
Merge remote-tracking branch 'upstream/master' into edpt_ISO_xfer
Conflicts: src/common/tusb_fifo.h
This commit is contained in:
commit
ae20d11124
@ -74,7 +74,7 @@ bool tu_fifo_config(tu_fifo_t *f, void* buffer, uint16_t depth, uint16_t item_si
|
|||||||
f->overwritable = overwritable;
|
f->overwritable = overwritable;
|
||||||
|
|
||||||
f->max_pointer_idx = 2*depth - 1; // Limit index space to 2*depth - this allows for a fast "modulo" calculation but limits the maximum depth to 2^16/2 = 2^15 and buffer overflows are detectable only if overflow happens once (important for unsupervised DMA applications)
|
f->max_pointer_idx = 2*depth - 1; // Limit index space to 2*depth - this allows for a fast "modulo" calculation but limits the maximum depth to 2^16/2 = 2^15 and buffer overflows are detectable only if overflow happens once (important for unsupervised DMA applications)
|
||||||
f->non_used_index_space = 0xFFFF - f->max_pointer_idx;
|
f->non_used_index_space = UINT16_MAX - f->max_pointer_idx;
|
||||||
|
|
||||||
f->rd_mode = f->wr_mode = TU_FIFO_COPY_INC; // Default copy mode is incrementing addresses
|
f->rd_mode = f->wr_mode = TU_FIFO_COPY_INC; // Default copy mode is incrementing addresses
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ typedef struct
|
|||||||
.item_size = sizeof(_type), \
|
.item_size = sizeof(_type), \
|
||||||
.overwritable = _overwritable, \
|
.overwritable = _overwritable, \
|
||||||
.max_pointer_idx = 2*_depth-1, \
|
.max_pointer_idx = 2*_depth-1, \
|
||||||
.non_used_index_space = 0xFFFF - 2*_depth-1, \
|
.non_used_index_space = UINT16_MAX - (2*_depth-1), \
|
||||||
.wr_mode = TU_FIFO_COPY_INC, \
|
.wr_mode = TU_FIFO_COPY_INC, \
|
||||||
.rd_mode = TU_FIFO_COPY_INC, \
|
.rd_mode = TU_FIFO_COPY_INC, \
|
||||||
}
|
}
|
||||||
|
@ -123,6 +123,8 @@ typedef osal_queue_def_t* osal_queue_t;
|
|||||||
.depth = _depth, \
|
.depth = _depth, \
|
||||||
.item_size = sizeof(_type), \
|
.item_size = sizeof(_type), \
|
||||||
.overwritable = false, \
|
.overwritable = false, \
|
||||||
|
.max_pointer_idx = 2*_depth-1, \
|
||||||
|
.non_used_index_space = UINT16_MAX - (2*_depth-1), \
|
||||||
}\
|
}\
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user