From a970d03f97699ae964e595013bcd3d7aeebf1694 Mon Sep 17 00:00:00 2001 From: Boronnikov Andrey Date: Mon, 8 Apr 2019 21:25:07 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=BC=D0=B5=D0=BD=D1=8F=D0=BB=20?= =?UTF-8?q?=D0=BF=D0=BE=D1=80=D1=8F=D0=B4=D0=BE=D0=BA=20=D0=BC=D0=B5=D1=82?= =?UTF-8?q?=D0=BE=D0=B4=D0=BE=D0=B2=20=D0=B4=D0=BB=D1=8F=20=D0=BA=D0=BE?= =?UTF-8?q?=D0=BC=D0=BF=D0=B8=D0=BB=D1=8F=D1=86=D0=B8=D0=B8=20=D0=B2=20?= =?UTF-8?q?=D1=81=D1=82=D0=B0=D0=BD=D0=B4=D0=B0=D1=80=D1=82=D0=BD=D0=BE?= =?UTF-8?q?=D0=B9=20Arduino=20IDE=20=D1=81=D1=82=D0=B0=D1=80=D1=8B=D1=85?= =?UTF-8?q?=20=D0=B2=D0=B5=D1=80=D1=81=D0=B8=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nrf_listen_air/nrf_listen_air.ino | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/nRF24L01 tests/nrf_listen_air/nrf_listen_air.ino b/nRF24L01 tests/nrf_listen_air/nrf_listen_air.ino index 4584c20..b7ecd4e 100644 --- a/nRF24L01 tests/nrf_listen_air/nrf_listen_air.ino +++ b/nRF24L01 tests/nrf_listen_air/nrf_listen_air.ino @@ -7,6 +7,17 @@ RF24 radio(9,10); // инициализировать модуль на пина const uint8_t num_channels = 128; uint8_t values[num_channels]; +const int num_reps = 100; + +int serial_putc( char c, FILE * ) { + Serial.write( c ); + return c; +} + +void printf_begin(void) { + fdevopen( &serial_putc, 0 ); +} + void setup(void) { Serial.begin(9600); @@ -32,8 +43,6 @@ void setup(void) } printf("\n\r"); } -const int num_reps = 100; - void loop(void) { memset(values,0,sizeof(values)); @@ -56,12 +65,3 @@ void loop(void) } printf("\n\r"); } -int serial_putc( char c, FILE * ) { - Serial.write( c ); - return c; -} - -void printf_begin(void) { - fdevopen( &serial_putc, 0 ); -} -