drivers/ata8520e: add initial implementation (without netdev but provides Sigfox feature)#7087
Conversation
a70d4b3 to
a51814e
Compare
a51814e to
d30c74f
Compare
2b1f0d5 to
361c37a
Compare
361c37a to
254607f
Compare
b988bee to
646333a
Compare
646333a to
80a4246
Compare
a3c9df9 to
b39c258
Compare
|
This PR is ready for review, I tested it (with #7093) and it works now. |
kYc0o
left a comment
There was a problem hiding this comment.
I've found some minor things. Please also state in the title "without netdev". It might be used in the future, though I really doubt we can use any protocol on top of sigfox (VERY limited bandwidth).
| #define CSPIN (dev->params.cs_pin) | ||
| #define INTPIN (dev->params.int_pin) | ||
| #define RESETPIN (dev->params.reset_pin) | ||
| #define POWERPIN (dev->params.power_pin) |
There was a problem hiding this comment.
Hmmm... all the above defines look a bit weird to me, since I have no knowledge of what is dev. Did you find this style in other drivers?
There was a problem hiding this comment.
Yes, these are helper defines, see here for example
drivers/ata8520e/ata8520e.c
Outdated
| #define SPI_CS_DELAY (US_PER_MS) | ||
| #define DELAY_10_MS (10 * US_PER_MS) /* 10 ms */ | ||
| #define TX_TIMEOUT (8U) /* 8 s */ | ||
| #define TX_RX_TIMEOUT (50U) /* 50 s */ |
b39c258 to
11b7e3b
Compare
|
Comments addressed @kYc0o |
|
And PR title updated |
|
Tested (with #7093) ACK. |
|
Sorry for mentioning this only now (are scanning through my backlog this morning...): I think there are still some issues to fix in this driver, most of them w.r.t. to debug code. For example in the Also, the These are all things that a reviewer should notice when doing a CODE review! So please make sure you watch for these things! |
Another thing is to look at the datasheet before starting reviewing.
This is what is in the datasheet, see section 2.1.2.5 page 11
No because this function is called by other functions that switch the device on before. |
|
BTW, if you see some things that could be changed (e.g remove ata8520e_status from public API, etc). Let me know here and I'll open a PR with the changes. |
|
Never mind about the issue in the
In general yes, but with debug enabled this seems not to be true for line 291. Power is disabled in line 281, and then not enabled agian inside the And I forgot to say: nice work with this driver! I am really not just trying to be nitpicky here. I just recently started to stumbled upon many cases where we (me included) merged stuff with more or less obvious flaws, so I am trying to raise the awareness for thorough reviewing a bit... |
I accept that there are some things I don't check exhaustively, but here the real mistake is that this review was done with the author sit next to me, so I asked why some things seemed weird and he explained them. Problem: if someone comes afterwards and such questions are not logged here we trigger the situation just happened. I'll make myself sure I log every question when I review something along with the author. Second, this is a new driver and the users are very limited. I wasn't expecting a perfect implementation when a first version is PRed. If someone uses it and discovers a problem that can be fixed with another PR, and so on. IMHO there's nothing critical here. And third: this PR adds a new feature which is super useful in RIOT, I was suprised about the simplicity of the driver and how we could send packets (small, yes) and receive them through the Internet with 0 infrastructure on our side! Thus, having this on master seemed awesome to me, with no harm, nothing was broken in RIOT afterwards. |
|
@aabadie see #8449 -> better to fix than to complaim, right :-) @kYc0o I think we have very differing opinions about reviewing...
This is IMHO a problem.
Ok, here we seem to have a very different understanding and/or expectation in the group of maintainers. But here is the wrong place for discussion, I will put this on the agenda of the next maintainer meeting.
I totally agree, this driver is awesome! |
I was talking about this PR.
Yes, let's discuss it in the right channel. |
The ATA8520E is a Sigfox communication module from Microchip. It can be controlled from SPI and is available on the arduino-mkrfox1200 (see #7092).
This PR add supports for the following features:
I think it can also be possible to add a netdev adaption.