-
Notifications
You must be signed in to change notification settings - Fork 7.7k
lorawan: pass callback pointer to callback invocation #86868
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
base: main
Are you sure you want to change the base?
lorawan: pass callback pointer to callback invocation #86868
Conversation
9aebdd0
to
21fb262
Compare
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.
Makes sense, the change will need a migration notes entry though.
21fb262
to
826c387
Compare
4320f69
to
2846066
Compare
d6e6ced
to
28010b0
Compare
28010b0
to
dd39249
Compare
@@ -122,7 +123,8 @@ static void smp_lorawan_uplink_thread(void *p1, void *p2, void *p3) | |||
} | |||
#endif | |||
|
|||
static void smp_lorawan_downlink(uint8_t port, uint8_t flags, int16_t rssi, int8_t snr, | |||
static void smp_lorawan_downlink(struct lorawan_downlink_cb *cb, | |||
uint8_t port, uint8_t flags, int16_t rssi, int8_t snr, | |||
uint8_t len, const uint8_t *hex_data) | |||
{ | |||
ARG_UNUSED(flags); |
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.
ARG_UNUSED()?
dd39249
to
1684921
Compare
1684921
to
0cfdc1a
Compare
0cfdc1a
to
754c9fd
Compare
This allows to make use of CONTAINER_OF() macro when registered 'struct lorawan_downlink_cb' is part of another structure. Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
This structure has updated callback, with additional parameter. Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
754c9fd
to
fdd541b
Compare
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.
Tiny change request, otherwise LGTM.
@@ -305,6 +305,13 @@ SPI | |||
Other subsystems | |||
**************** | |||
|
|||
LoRa |
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.
LoRa | |
LoRaWAN |
This allows to make use of
CONTAINER_OF()
macro when registeredstruct lorawan_downlink_cb
ispart of another structure.