This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-e1-hardware/+/21716 ) Change subject: icE1usb fw: Have e1_rx_need_data() optionally return FIFO position ...................................................................... icE1usb fw: Have e1_rx_need_data() optionally return FIFO position The position indicates where we are in terms of frame and multiframe. The related code was ported over from e1-tracer. Change-Id: I9e59d86a2e8f4e85ca84c592438ad79966b49448 --- M firmware/ice40-riscv/icE1usb/e1.c M firmware/ice40-riscv/icE1usb/usb_e1.c 2 files changed, 9 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-e1-hardware refs/changes/16/21716/1 diff --git a/firmware/ice40-riscv/icE1usb/e1.c b/firmware/ice40-riscv/icE1usb/e1.c index 83cbd92..b89b7c7 100644 --- a/firmware/ice40-riscv/icE1usb/e1.c +++ b/firmware/ice40-riscv/icE1usb/e1.c @@ -329,7 +329,7 @@ #include "dma.h" unsigned int -e1_rx_need_data(unsigned int usb_addr, unsigned int max_frames) +e1_rx_need_data(unsigned int usb_addr, unsigned int max_frames, unsigned int *pos) { unsigned int ofs; int tot_frames = 0; @@ -341,6 +341,12 @@ if (!n_frames) break; + /* Give pos */ + if (pos) { + *pos = ofs & g_e1.rx.fifo.mask; + pos = NULL; + } + /* Copy from FIFO to USB */ dma_exec(e1f_ofs_to_dma(ofs), usb_addr, n_frames * (32 / 4), false, NULL, NULL); diff --git a/firmware/ice40-riscv/icE1usb/usb_e1.c b/firmware/ice40-riscv/icE1usb/usb_e1.c index f724665..6bcb1b4 100644 --- a/firmware/ice40-riscv/icE1usb/usb_e1.c +++ b/firmware/ice40-riscv/icE1usb/usb_e1.c @@ -23,7 +23,7 @@ /* Hack */ -unsigned int e1_rx_need_data(unsigned int usb_addr, unsigned int max_len); +unsigned int e1_rx_need_data(unsigned int usb_addr, unsigned int max_len, unsigned int *pos); unsigned int e1_tx_feed_data(unsigned int usb_addr, unsigned int len); unsigned int e1_tx_level(void); unsigned int e1_rx_level(void); @@ -93,7 +93,7 @@ else if (!n) break; - n = e1_rx_need_data((ptr >> 2) + 1, n); + n = e1_rx_need_data((ptr >> 2) + 1, n, NULL); /* Write header */ hdr = 0x616b00b5; -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/21716 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-hardware Gerrit-Branch: master Gerrit-Change-Id: I9e59d86a2e8f4e85ca84c592438ad79966b49448 Gerrit-Change-Number: 21716 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge at osmocom.org> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201214/e0df9784/attachment.htm>