bosko lekovic
/
IO_board_K22
K22 processor
Diff: main.cpp
- Revision:
- 17:f99cdfd01d4e
- Parent:
- 15:3429cdc6e5f4
- Child:
- 18:6196688e2a94
--- a/main.cpp Fri Apr 30 00:08:07 2021 +0200 +++ b/main.cpp Sat May 15 13:59:57 2021 +0200 @@ -21,11 +21,9 @@ #include "IOzcControl.h" - extern vector< S_logTelegram> s_log; - // Blinking rate in milliseconds #define BLINKING_RATE_MS 200 @@ -46,7 +44,6 @@ class C_data c_data; - C_ledControl c_ledControl(&c_data);//( &c_ledLight); C_spiProtokol c_spiProtokol( &c_data, &c_ledControl ); @@ -54,7 +51,6 @@ - C_zeroCrossing c_zeroCrossing( &c_data); @@ -83,6 +79,8 @@ s_log.clear(); printf( " capacity %d max_size %d size %d\n\r", s_log.capacity(), s_log.max_size(), s_log.size()); + + //test_RasaLed.attach_us([=]{ RasaLed = !RasaLed;}, 500000 ); @@ -91,10 +89,15 @@ /* konzolu napraciti kao klasu koja nasledjuje C_thread klasu */ extern void consolafun( void ); + Thread th_consola; th_consola.start( consolafun); + + /* cekanje da se procita prva ispravna adresa sa dip switch-a */ + + do { ThisThread::sleep_for(10ms);;c_spiProtokol.inic_address( ); } while ( c_data.get_address() == 0 ); printf(" adresa je = %d\n\r", c_data.get_address());