mirror of
https://github.com/eclipse/upm.git
synced 2025-07-01 09:21:12 +03:00
styling: convert TAB to four SPACES
Signed-off-by: Kiveisha Yevgeniy <yevgeniy.kiveisha@intel.com>
This commit is contained in:
@ -29,14 +29,14 @@
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
uint8_t data[] = { 0xaa, 0xff, 0xff, 0xff };
|
||||
uint8_t data[] = { 0xaa, 0xff, 0xff, 0xff };
|
||||
|
||||
upm::TM1637 *display = new upm::TM1637(8, 9); // di - 8, dcki - 9
|
||||
display->write ("1981");
|
||||
|
||||
std::cout << "exiting application" << std::endl;
|
||||
display->write ("1981");
|
||||
|
||||
std::cout << "exiting application" << std::endl;
|
||||
|
||||
delete display;
|
||||
delete display;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ int running = 0;
|
||||
void
|
||||
sig_handler(int signo)
|
||||
{
|
||||
printf("got signal\n");
|
||||
printf("got signal\n");
|
||||
if (signo == SIGINT) {
|
||||
printf("exiting application\n");
|
||||
running = 1;
|
||||
@ -42,25 +42,25 @@ sig_handler(int signo)
|
||||
|
||||
int
|
||||
main(int argc, char **argv) {
|
||||
int chord[] = { DO, RE, MI, FA, SOL, LA, SI, DO, SI };
|
||||
// create Buzzer instance
|
||||
int chord[] = { DO, RE, MI, FA, SOL, LA, SI, DO, SI };
|
||||
// create Buzzer instance
|
||||
upm::Buzzer* sound = new upm::Buzzer(5);
|
||||
// print sensor name
|
||||
// print sensor name
|
||||
std::cout << sound->name() << std::endl;
|
||||
// play sound (DO, RE, ME, etc...)
|
||||
// play sound (DO, RE, ME, etc...)
|
||||
|
||||
signal(SIGINT, sig_handler);
|
||||
signal(SIGINT, sig_handler);
|
||||
|
||||
while (!running) {
|
||||
for (int chord_ind = 0; chord_ind < 9; chord_ind++) {
|
||||
std::cout << sound->playSound(chord[chord_ind]) << std::endl;
|
||||
usleep(1000);
|
||||
}
|
||||
}
|
||||
while (!running) {
|
||||
for (int chord_ind = 0; chord_ind < 9; chord_ind++) {
|
||||
std::cout << sound->playSound(chord[chord_ind]) << std::endl;
|
||||
usleep(1000);
|
||||
}
|
||||
}
|
||||
|
||||
std::cout << "exiting application" << std::endl;
|
||||
std::cout << "exiting application" << std::endl;
|
||||
|
||||
delete sound;
|
||||
delete sound;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ int running = 0;
|
||||
void
|
||||
sig_handler(int signo)
|
||||
{
|
||||
printf("got signal\n");
|
||||
printf("got signal\n");
|
||||
if (signo == SIGINT) {
|
||||
printf("exiting application\n");
|
||||
running = 1;
|
||||
@ -43,19 +43,19 @@ int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
upm::MY9221 *bar = new upm::MY9221(8, 9);
|
||||
|
||||
signal(SIGINT, sig_handler);
|
||||
|
||||
signal(SIGINT, sig_handler);
|
||||
|
||||
while (!running) {
|
||||
for (int idx = 1; idx < 11; idx++) {
|
||||
bar->setBarLevel (idx);
|
||||
usleep(1000);
|
||||
}
|
||||
}
|
||||
while (!running) {
|
||||
for (int idx = 1; idx < 11; idx++) {
|
||||
bar->setBarLevel (idx);
|
||||
usleep(1000);
|
||||
}
|
||||
}
|
||||
|
||||
std::cout << "exiting application" << std::endl;
|
||||
std::cout << "exiting application" << std::endl;
|
||||
|
||||
delete bar;
|
||||
delete bar;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ upm::NRF24l01 *comm = NULL;
|
||||
void
|
||||
sig_handler(int signo)
|
||||
{
|
||||
printf("got signal\n");
|
||||
printf("got signal\n");
|
||||
if (signo == SIGINT) {
|
||||
printf("exiting application\n");
|
||||
running = 1;
|
||||
@ -42,28 +42,28 @@ sig_handler(int signo)
|
||||
}
|
||||
|
||||
void nrf_handler () {
|
||||
std::cout << "devi1 :: " << *((uint32_t *)&(comm->m_rxBuffer[0])) << std::endl;
|
||||
std::cout << "devi1 :: " << *((uint32_t *)&(comm->m_rxBuffer[0])) << std::endl;
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
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);
|
||||
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) {
|
||||
comm->nrfListenForChannel ();
|
||||
}
|
||||
while (!running) {
|
||||
comm->nrfListenForChannel ();
|
||||
}
|
||||
|
||||
std::cout << "exiting application" << std::endl;
|
||||
std::cout << "exiting application" << std::endl;
|
||||
|
||||
delete comm;
|
||||
delete comm;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ upm::NRF24l01 *comm = NULL;
|
||||
void
|
||||
sig_handler(int signo)
|
||||
{
|
||||
printf("got signal\n");
|
||||
printf("got signal\n");
|
||||
if (signo == SIGINT) {
|
||||
printf("exiting application\n");
|
||||
running = 1;
|
||||
@ -47,27 +47,27 @@ void nrf_handler () {
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
uint32_t dummyData = 0;
|
||||
uint32_t dummyData = 0;
|
||||
comm = new upm::NRF24l01(7);
|
||||
comm->nrfSetRXaddr ((uint8_t *) "devi2");
|
||||
comm->nrfSetTXaddr ((uint8_t *) "devi1");
|
||||
comm->nrfSetPayload (MAX_BUFFER);
|
||||
comm->nrfConfigModule ();
|
||||
comm->dataRecievedHandler = nrf_handler;
|
||||
|
||||
signal(SIGINT, sig_handler);
|
||||
comm->nrfSetRXaddr ((uint8_t *) "devi2");
|
||||
comm->nrfSetTXaddr ((uint8_t *) "devi1");
|
||||
comm->nrfSetPayload (MAX_BUFFER);
|
||||
comm->nrfConfigModule ();
|
||||
comm->dataRecievedHandler = nrf_handler;
|
||||
|
||||
signal(SIGINT, sig_handler);
|
||||
|
||||
while (!running) {
|
||||
memcpy (comm->m_txBuffer, &dummyData, sizeof (dummyData));
|
||||
comm->nrfSend ();
|
||||
std::cout << "devi2 :: sending data ...." << dummyData << std::endl;
|
||||
usleep (3000000);
|
||||
dummyData += 3000;
|
||||
}
|
||||
while (!running) {
|
||||
memcpy (comm->m_txBuffer, &dummyData, sizeof (dummyData));
|
||||
comm->nrfSend ();
|
||||
std::cout << "devi2 :: sending data ...." << dummyData << std::endl;
|
||||
usleep (3000000);
|
||||
dummyData += 3000;
|
||||
}
|
||||
|
||||
std::cout << "exiting application" << std::endl;
|
||||
std::cout << "exiting application" << std::endl;
|
||||
|
||||
delete comm;
|
||||
delete comm;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -27,9 +27,9 @@
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
// 0x62 RGB_ADDRESS, 0x3E LCD_ADDRESS
|
||||
// 0x62 RGB_ADDRESS, 0x3E LCD_ADDRESS
|
||||
upm::Jhd1313m1 *lcd = new upm::Jhd1313m1(0, 0x3E, 0x62);
|
||||
lcd->setCursor(0,0);
|
||||
lcd->setCursor(0,0);
|
||||
lcd->write("Hello World");
|
||||
lcd->setCursor(1,2);
|
||||
lcd->write("Hello World");
|
||||
|
Reference in New Issue
Block a user