-
Notifications
You must be signed in to change notification settings - Fork 2.1k
drivers/nrf24l01+ : added low-level functions for nrf24l01+ transceiver #1704
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
drivers/nrf24l01+ : added low-level functions for nrf24l01+ transceiver #1704
Conversation
include ../Makefile.tests_common | ||
|
||
# Change this to 0 show compiler invocation lines by default: | ||
QUIET ?= 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.
remove?
Looking great! Will test soon. |
|
||
puts("Init Transceiver\n"); | ||
|
||
nrf24l01p_init(&NRF24L01P_0, SPI_0, GPIO_8, GPIO_7, GPIO_6); |
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.
I think it might make sense to define these externally in the Makefile.
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.
Hm, I think the Makefile is maybe not the right place because this seems so unfelxible. Correct me if I'm wrong? A comprise could be the definition of e.g. SPI_PORT
, CS_PIN
, CE_PIN
, IRQ_PIN
on top of the script, what do you think?
char buf_return[num_bytes]; | ||
int ret; | ||
|
||
vtimer_init(); |
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.
Now that you un-disabled auto_init this is unnecessary at best.
I addressed your comments @LudwigOrtmann |
Travis says:
|
/* nrf24l01p_t *dev = (nrf24l01p_t*)f; | ||
dev->state = 0;//INT; | ||
*/ | ||
} |
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.
missing newline according to git
You still need to either use auto_init OR initialize vtimer (possibly more, didn't look). |
return 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.
stray blank lines
Could you rebase (now that the SPI driver is merged)? Thx! |
8965047
to
f1d986f
Compare
4106341
to
3034caa
Compare
* @ingroup drivers | ||
* @{ | ||
* | ||
* @file nrf24l01p.h |
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.
Remove the file name, doxygen is better off without it.
I deleted a blocking while loop and added a delay for the "on-air" transmission after the transmit command. This managed the hanging state on the arduino-due. Also it turned out, that |
6df720d
to
154c4e8
Compare
rebased and already squashed |
RIOT/drivers/Makefile.include:27: *** missing `endif'. Stop. Da ist dir in der viert letzten Zeile ein |
Uuuuups, I corrected this |
No problem. Using and a stm32f4discovery and a stm32f0discovery the test application still crashes. I am not sure, but I suspect the SPI driver for the F0. I will run another test using two stm32f4discoverys once I am back in the office... |
I once had this setup and it worked. However, I'll also try this in this forenoon. |
f2a26c8
to
0e8bcff
Compare
If you look at 0e8bcff I increased a delay value for this code line so the driver also runs on the stm32f0. On the stm32f4 the driver works fine without this change. However, I think we can live with 10 us longer delay and merge this PR but we should be aware that this has nothing to do with #1956 or similar. |
Now it works perfectly, very cool! ACK when squashed. |
0946db2
to
d8a26d5
Compare
Squashed |
and go |
drivers/nrf24l01+ : added low-level functions for nrf24l01+ transceiver
Hooray! |
Congrats! |
:) |
The delays were introduced in an attempt to fix "inexplicable timing errors", although the errors were in the SPI bus driver rather than the nrf24l01p driver. See also: - RIOT-OS#1704 - RIOT-OS#2315 Signed-off-by: Joakim Gebart <[email protected]>
The delays were introduced in an attempt to fix "inexplicable timing errors", although the errors were in the SPI bus driver rather than the nrf24l01p driver. See also: - RIOT-OS#1704 - RIOT-OS#2315 Signed-off-by: Joakim Gebart <[email protected]>
@PeterKietzmann It's been a while - any news? |
Unfortunately not. |
This PR contains multiple low-level functions for the nrf24l01+ driver. Maybe some of them seem useless here but these are interesting when it comes to bind the driver to the general network driver interface, which will be part of another PR soon. Furthermore there are some functions on which I'm not sure if they are necessary. Feel free to discuss :-) !
Depends on #1584(merged)