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.
Diff: main.cpp
- Revision:
- 1:e3bea6b4ce47
- Parent:
- 0:56723d925d39
--- a/main.cpp Sat Oct 02 11:08:24 2021 +0000
+++ b/main.cpp Sat Oct 02 14:41:23 2021 +0000
@@ -1,37 +1,25 @@
-/*-----------------------------------------------------------------------
-Before to use this example, ensure that you an hyperterminal installed on your computer.
-More info here: https://developer.mbed.org/handbook/Terminals
-The default serial comm port uses the SERIAL_TX and SERIAL_RX pins (see their definition in the PinNames.h file).
-The default serial configuration in this case is 9600 bauds, 8-bit data, no parity.
-If you want to change the baudrate for example, you have to redeclare the
-serial object in your code:
-
-Serial pc(SERIAL_TX, SERIAL_RX);
+#include "mbed.h"
-Then, you can modify the baudrate and print like this:
-
-pc.baud(115200);
-pc.printf("Hello World !\n");
--------------------------------------------------------------------------*/
-#include "mbed.h"
-Serial pc(PG_14,PG_9); // Déclaration d’un objet de type Serial
-
-
+Serial UART(USBTX,USBRX); // Déclaration d’un objet de type Serial
int main() {
-//char c ; // Variable ou ranger un caractère
-int i=0;
-
-pc.printf("\nTest liaison serie PC-Carte Nucleo\n");
-pc.printf("Appuyer sur une touche du clavier \n");
+
+char *i = (char *)0x0100; // Adresse de départ
+int j,k ;
+
+ UART.printf("\nAffichage de la zone memoire\n");
-while(1) {
- wait(1);
- i++;
- printf("i = %d \n",i);
- pc.putc(i);
- if (i == 255){
- i=0;}
-
+ for (j=0; j < 16 ; j++) {
+ UART.printf("Adresse %#04x : ",i);
+ for(k = 0; k < 16; k++) {
+ UART.printf("%02X ",*i++);
+ }
+
+ UART.printf("\n");
+ }
+
+while(1)
+ {
+
}
}
\ No newline at end of file