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/+/21706 )
Change subject: ice1usb: define e1_data_ptr() using e1_data_ofs()
......................................................................
ice1usb: define e1_data_ptr() using e1_data_ofs()
It's best to compute the offset only at one place and use that
computation elsewhere.
Change-Id: I9a6cce07ea8b6eff1527215de00621da960b0472
---
M firmware/ice40-riscv/icE1usb/e1.c
1 file changed, 5 insertions(+), 7 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-e1-hardware refs/changes/06/21706/1
diff --git a/firmware/ice40-riscv/icE1usb/e1.c b/firmware/ice40-riscv/icE1usb/e1.c
index e5108ce..776edba 100644
--- a/firmware/ice40-riscv/icE1usb/e1.c
+++ b/firmware/ice40-riscv/icE1usb/e1.c
@@ -80,19 +80,17 @@
static volatile struct e1_core * const e1_regs = (void *)(E1_CORE_BASE);
static volatile uint8_t * const e1_data = (void *)(E1_DATA_BASE);
-
-volatile uint8_t *
-e1_data_ptr(int mf, int frame, int ts)
-{
- return &e1_data[(mf << 9) | (frame << 5) | ts];
-}
-
unsigned int
e1_data_ofs(int mf, int frame, int ts)
{
return (mf << 9) | (frame << 5) | ts;
}
+volatile uint8_t *
+e1_data_ptr(int mf, int frame, int ts)
+{
+ return &e1_data[e1_data_ofs(mf, frame, ts)];
+}
// FIFOs
// -----
--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/21706
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: I9a6cce07ea8b6eff1527215de00621da960b0472
Gerrit-Change-Number: 21706
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/a600afe4/attachment.htm>