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.
Dependencies: mbed
Revision 0:9c7b9c8c700f, committed 2016-09-02
- Comitter:
- TetsuyaKonno
- Date:
- Fri Sep 02 07:10:14 2016 +0000
- Commit message:
- First program
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
| mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Fri Sep 02 07:10:14 2016 +0000
@@ -0,0 +1,44 @@
+//------------------------------------------------------------------//
+//Supported MCU: RZ/A1H
+//File Contents: Serial Communication (GR-PEACH version)
+//Version number: Ver.1.00
+//Date: 2016.01.18
+//Copyright: Renesas Electronics Corporation
+//------------------------------------------------------------------//
+
+//Include
+//------------------------------------------------------------------//
+#include "mbed.h"
+
+//Constructor
+//------------------------------------------------------------------//
+Serial pc(USBTX, USBRX);
+DigitalOut LED_G(LED2);
+
+//Main
+//------------------------------------------------------------------//
+int main( void )
+{
+ int i, ret;
+
+ /* Initialize MCU functions */
+ pc.baud(9600);
+
+ pc.printf( "Hello World!\n" );
+
+ while(1) {
+ pc.printf( "Input data : " );
+ ret = pc.scanf( "%d", &i );
+ if( ret == 1 ) {
+ pc.printf( "Get data : %d\n", i );
+ LED_G = 1;
+ } else {
+ pc.printf( "Data Error!!\n" );
+ pc.scanf( "%*[^\n]" );
+ }
+ }
+}
+
+//------------------------------------------------------------------//
+// End of file
+//------------------------------------------------------------------//
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Sep 02 07:10:14 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/2241e3a39974 \ No newline at end of file