doxygen: Added documentation to nrf24l01 module

Signed-off-by: Kiveisha Yevgeniy <yevgeniy.kiveisha@intel.com>
This commit is contained in:
Kiveisha Yevgeniy
2014-06-06 15:40:24 +00:00
parent 7d898e3274
commit 451d0390b6
4 changed files with 195 additions and 24 deletions

View File

@ -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;
}

View File

@ -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;
}