-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Bluetooth: controller: nRF5: Back-to-Back Radio Tx interface #33118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
tested with #31875
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To improve readability: can we use define's instead of hardcoded 1/0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To improve readability: can we use define's instead of hardcoded 1/0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To improve readability: can we use define's instead of hardcoded 1/0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the comment still correct? If (dir_curr !=0) then no such assumption is made, but flags_curr is used, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor comments, verified again with #31875 and works fine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SW_SWITCH_DIR_* used for both TX and RX would be less confusing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are aliases to hardcoded 0 or 1, used to convey the parameter name supplied to inlined sw_switch file static function. They are not intended to be used as parameter values to other functions.
Do you mean to rename to
| #define SW_SWITCH_PREV_RX 0 | |
| #define SW_SWITCH_PREV_DIR_RX 0 | |
| #define SW_SWITCH_NEXT_DIR_RX 0 | |
| #define SW_SWITCH_PREV_DIR_TX 1 | |
| #define SW_SWITCH_NEXT_DIR_TX 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better use PHY_LEGACY or even better PHY_1M instead since this is actual value passed from LLL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, macros are used as readable string (instead of using defines) which would convey the parameters purpose. Otherwise, the call at line 607 will look like:
sw_switch(SW_SWITCH_DIR_TX, SW_SWITCH_DIR_RX,
PHY_1M, SW_SWITCH_PREV_FLAGS_DONTCARE,
phy_rx, SW_SWITCH_NEXT_FLAGS_DONTCARE);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could be defined in pdu.h and eventually also used in LLL since flags are magic values there as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again the macros are replacement to hardcoded values passed to sw_switch function which is vendor specific interface, not sure if other vendors will use 0 as the dont care values.
Change other magic values is outside the scope of this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are aliases to hardcoded 0 or 1, used to convey the parameter name supplied to inlined sw_switch file static function. They are not intended to be used as parameter values to other functions.
Do you mean to rename to
| #define SW_SWITCH_PREV_RX 0 | |
| #define SW_SWITCH_PREV_DIR_RX 0 | |
| #define SW_SWITCH_NEXT_DIR_RX 0 | |
| #define SW_SWITCH_PREV_DIR_TX 1 | |
| #define SW_SWITCH_NEXT_DIR_TX 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again the macros are replacement to hardcoded values passed to sw_switch function which is vendor specific interface, not sure if other vendors will use 0 as the dont care values.
Change other magic values is outside the scope of this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, macros are used as readable string (instead of using defines) which would convey the parameters purpose. Otherwise, the call at line 607 will look like:
sw_switch(SW_SWITCH_DIR_TX, SW_SWITCH_DIR_RX,
PHY_1M, SW_SWITCH_PREV_FLAGS_DONTCARE,
phy_rx, SW_SWITCH_NEXT_FLAGS_DONTCARE);
|
@andrzej-kaczmarek can you please take another look? |
|
This needs a rebase and also would like #31336 to go first to avoid more work resolving conflicts |
Enclose macro parameters in paranthesis to avoid ambiguous macro expansions. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Minor indentation change and replaced if-then-else-if clause with toggle implementation. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
nRF53 implementation of sw_switch always requires Radio End event, hence optimize out redundant code due to explicit use of radio_tmr_end_capture. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Add Radio interface to perform back-to-back transmit of PDU with a configurable inter frame spacing. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Add Radio interface to perform back-to-back transmit of PDU
with a configurable inter frame spacing.
Signed-off-by: Vinayak Kariappa Chettimada [email protected]