mirror of
https://github.com/eclipse/upm.git
synced 2025-07-01 09:21:12 +03:00
doxygen: Added documentation to nrf24l01 module
Signed-off-by: Kiveisha Yevgeniy <yevgeniy.kiveisha@intel.com>
This commit is contained in:
@ -41,20 +41,23 @@ sig_handler(int signo)
|
||||
}
|
||||
}
|
||||
|
||||
//! [Interesting]
|
||||
void nrf_handler () {
|
||||
std::cout << "devi1 :: " << *((uint32_t *)&(comm->m_rxBuffer[0])) << std::endl;
|
||||
}
|
||||
//! [Interesting]
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
//! [Interesting]
|
||||
comm = new upm::NRF24l01(7);
|
||||
comm->nrfSetRXaddr ((uint8_t *) "devi1");
|
||||
comm->nrfSetTXaddr ((uint8_t *) "devi2");
|
||||
comm->nrfSetPayload (MAX_BUFFER);
|
||||
comm->nrfConfigModule ();
|
||||
comm->dataRecievedHandler = nrf_handler;
|
||||
|
||||
|
||||
signal(SIGINT, sig_handler);
|
||||
|
||||
while (!running) {
|
||||
@ -64,6 +67,6 @@ main(int argc, char **argv)
|
||||
std::cout << "exiting application" << std::endl;
|
||||
|
||||
delete comm;
|
||||
|
||||
//! [Interesting]
|
||||
return 0;
|
||||
}
|
||||
|
@ -47,6 +47,7 @@ void nrf_handler () {
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
//! [Interesting]
|
||||
uint32_t dummyData = 0;
|
||||
comm = new upm::NRF24l01(7);
|
||||
comm->nrfSetRXaddr ((uint8_t *) "devi2");
|
||||
@ -54,7 +55,7 @@ main(int argc, char **argv)
|
||||
comm->nrfSetPayload (MAX_BUFFER);
|
||||
comm->nrfConfigModule ();
|
||||
comm->dataRecievedHandler = nrf_handler;
|
||||
|
||||
|
||||
signal(SIGINT, sig_handler);
|
||||
|
||||
while (!running) {
|
||||
@ -68,6 +69,6 @@ main(int argc, char **argv)
|
||||
std::cout << "exiting application" << std::endl;
|
||||
|
||||
delete comm;
|
||||
|
||||
//! [Interesting]
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user