drivers/sx127x: improve netdev adaption#8232
Conversation
| if (*(const uint16_t*) val == NETDEV_TYPE_LORA) { | ||
| sx127x_set_modem(dev, SX127X_MODEM_LORA); | ||
| return sizeof(uint16_t); | ||
| } |
There was a problem hiding this comment.
else {
return -EINVAL;
}The return-value -ENOTSUP means the operation is not supported. Here we have an unsupported value.
There was a problem hiding this comment.
Ok, I was unsure of that. Will change.
Maybe not useless, but in this case redundant. Since the option was introduced for LoRA however, I agree, that it can be removed (for now). |
|
I also pushed a commit that fixes return values with some boolean getters. It was required for #7482 |
38d186c to
6144c1b
Compare
6144c1b to
c52e11f
Compare
|
squashed and now it's all green, so go! |
|
Welp, you could have used this PR, to fix the |
|
I meant #7482. |
Indeed or in #7482 directly ? |
While working on #8160 and #7356, I noticed that the current netif adaption requires the netdev interface to provide a
NETOPT_DEVICE_TYPE.This PR adapts the sx127x netdev to make it compatible with this design. It also remove the
NETOPT_DEVICE_MODEthat I think now is useless.