/[H9]/trunk/Embedded/main.c
ViewVC logotype

Diff of /trunk/Embedded/main.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 161 by hedin, Wed Dec 5 15:01:15 2007 UTC revision 162 by hedin, Wed Dec 5 15:20:07 2007 UTC
# Line 228  void serial_send(void) Line 228  void serial_send(void)
228  // global_serial_recieve_buffer, to global_message_buffer1, and sets the flag global_recieve_done.  // global_serial_recieve_buffer, to global_message_buffer1, and sets the flag global_recieve_done.
229  void serial_recieved(void)  void serial_recieved(void)
230  {  {
231          char data_byte, saved_data[LCD_LENGTH];          char data_byte;
232                    
233          data_byte = RCREG;          data_byte = RCREG;
234                    
# Line 238  void serial_recieved(void) Line 238  void serial_recieved(void)
238          if (global_serial_byte_counter == 0 && data_byte == '\r')       // don't care about '\r', if it's the first byte we recieve.          if (global_serial_byte_counter == 0 && data_byte == '\r')       // don't care about '\r', if it's the first byte we recieve.
239                  return;                  return;
240    
 //      if (global_serial_byte_counter == BUFFER -1)  
 //              global_seriaæl_recieve_buffer[global_serial_byte_counter] = 0;  
241    
242  //      if (data_byte != '\r' && (global_serial_byte_counter-1) < BUFFER)                if ( global_serial_byte_counter < BUFFER) //Prevent buffer overrun
243  //              global_serial_recieve_buffer[ global_serial_byte_counter++ ] = data_byte;       // fills the data_byte into our buffer.                  global_serial_recieve_buffer[ global_serial_byte_counter++ ] = data_byte;       // fills the data_byte into our buffer.
244          global_serial_recieve_buffer[ global_serial_byte_counter] = data_byte;  
245                    
246                    
247          if (data_byte == '\r')  // when we meet a '\r', the transmission is done, and we fill the constxt of          if (data_byte == '\r')  // when we meet a '\r', the transmission is done, and we fill the constxt of
# Line 265  void serial_recieved(void) Line 263  void serial_recieved(void)
263                                    
264                  global_serial_byte_counter = 0;                  global_serial_byte_counter = 0;
265          }                }      
         else  
         {  
                 global_serial_byte_counter++;  
         }  
           
266  }  }
267    
268  void timer1_interrupt(void)  void timer1_interrupt(void)
# Line 501  void main() Line 494  void main()
494                          global_Pot_Hi = ADRESH;                          global_Pot_Hi = ADRESH;
495                          global_Pot_Lo = ADRESL;                          global_Pot_Lo = ADRESL;
496                          convertTemp();                          convertTemp();
497                          update_lcd();                          if (global_time_counter % 5 == 0)
498                                    update_lcd();
499                          GODONE = 1;                          GODONE = 1;
500                  }                  }
501          // Handels the recieve sms'es.          // Handels the recieve sms'es.

Legend:
Removed from v.161  
changed lines
  Added in v.162

  ViewVC Help
Powered by ViewVC 1.1.20