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 4:f13563de76af, committed 2013-09-06
- Comitter:
- gatedClock
- Date:
- Fri Sep 06 04:20:25 2013 +0000
- Parent:
- 3:741c9aa3891c
- Commit message:
- trying to make LED work
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Sep 06 03:48:34 2013 +0000
+++ b/main.cpp Fri Sep 06 04:20:25 2013 +0000
@@ -1,17 +1,25 @@
void delay(void);
- #define FIO2DIRO (*(volatile unsigned char *) (0x2009C040))
- #define FIO2PINO (*(volatile unsigned char *) (0x2009C054))
-//==============================================//==============================
+ #define FIO0DIRO (*(volatile unsigned char *) (0x2009C000))
+ #define FIO0PINO (*(volatile unsigned char *) (0x2009C054))
+
+ #define FIO1DIRO (*(volatile unsigned char *) (0x2009C020))
+ #define FIO1PINO (*(volatile unsigned char *) (0x2009C034))
+
+
+ #define FIO2DIRO (*(volatile unsigned char *) (0x2009C040)) // original
+ #define FIO2PINO (*(volatile unsigned char *) (0x2009C054)) // original
+
+//==================0============================//==============================
int main()
- {
- FIO2DIRO=0xFF; // set port 2. lowest byte to output.
+ {
+ FIO1DIRO=0x00040000; // set port 1 bit 18 to output.
while (1)
{
- FIO2PINO |= 0x01; // OR bit 0 with 1 to set pin high.
+ FIO1PINO = 0x00040000;
delay();
- FIO2PINO &= ~0x01; // AND bit 0 with 0 to set pin low.
+ FIO1PINO = 0x00000000;
delay();
} // while (1)
} // main.