This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

complete my code

hi.

can someone plz complete the code quickly for me.

it is v v urgent.

< code >
void main ( void )
{
    // start display
    // start keys
    // start clock

    while ( 1 )
    {
          // update display
          // read keys
          Read_clock (); // read clock
    }
}

void Read_cock ( )
{
     RTC->COUNT;
}


Parents
  • This should run :-)

    #include <stm32.h>
    #include <stdio.h>
    #include "gpio.h"
    #include "timer.h"
    #include "glcd.h"
    
    void main ( void )
    {
      int keyPad   = 0;
      int clockVal = 0;
    
      Init_GLCD  ();                // start display
      Init_KeyPad();                // start keys
      Init_Clk   ();                // start clock
    
      while (1) {
        Update_GLCD();              // update display
        keyPad   = Read_KeyPad();   // read keys
        clockVal = Read_Clock ();   // read clock
      }
    }
    
    void Read_cock ( )              // wtf?!?
    {
         RTC->COUNT;
    }
    

Reply
  • This should run :-)

    #include <stm32.h>
    #include <stdio.h>
    #include "gpio.h"
    #include "timer.h"
    #include "glcd.h"
    
    void main ( void )
    {
      int keyPad   = 0;
      int clockVal = 0;
    
      Init_GLCD  ();                // start display
      Init_KeyPad();                // start keys
      Init_Clk   ();                // start clock
    
      while (1) {
        Update_GLCD();              // update display
        keyPad   = Read_KeyPad();   // read keys
        clockVal = Read_Clock ();   // read clock
      }
    }
    
    void Read_cock ( )              // wtf?!?
    {
         RTC->COUNT;
    }
    

Children