Mike Moore / Mbed 2 deprecated RTOS_LAB_08_problem_2

Dependencies:   mbed

main.cpp

Committer:
gatedClock
Date:
2013-09-06
Revision:
0:07602282e53c
Child:
1:cc6f7a7e1b38

File content as of revision 0:07602282e53c:


    void delay(void);
    
    #define FIO2DIR0 (*(volatile unsigned char *) (0x2009C040))
    #define FIO2PIN0 (*(volatile unsigned char *) (0x2009C054))
//==============================================//==============================  
    int main()
    {
      FIO2DIR0=0xFF;                            // set port 2.  lowest byte to output.          
      while (1)
      {
        FIO2PINO |= 0x01;                       // OR bit 0 with 1 to set pin high.
        delay();
        FIO2PIN) &= ~0x01;                      // AND bit 0 with 0 to set pin low.
        delay();
      }                                         // while (1)  
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    }                                           // main.