Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 45:092347ceac92, committed 2019-05-27
- Comitter:
 - gorazdko
 - Date:
 - Mon May 27 09:18:47 2019 +0000
 - Parent:
 - 44:3b8a8dba7998
 - Commit message:
 - fix size of samples
 
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file | 
--- a/main.cpp	Mon May 27 07:27:00 2019 +0000
+++ b/main.cpp	Mon May 27 09:18:47 2019 +0000
@@ -71,7 +71,12 @@
         else
           st_uart.putc(255);  /* end of measurement 255 (0xff) */
           
-        st_uart.putc(5000);  /* SIZE OF SAMPLES 5000 == 10000 bytes */
+        /* SIZE OF SAMPLES 5000 == 10000 bytes */
+        uint16_t size_of_samples = 5000;
+        uint8_t byte_little = ((uint8_t *)&size_of_samples)[0];
+        uint8_t byte_big = ((uint8_t *)&size_of_samples)[1];
+        st_uart.putc(byte_little);
+        st_uart.putc(byte_big);
         
         for (int i=0; i<5000; i++)
         {     
    