Advertisement
Guest User

Untitled

a guest
Jan 19th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.49 KB | None | 0 0
  1. #include<msp430x14x.h>
  2. #include "UART.h"
  3. #include "LCD.h"
  4. #incude "watchdog.h"
  5. #include "buttons.h"
  6. void main(void)
  7. {
  8.     disableWDT();
  9.     initLCD();
  10.     initButtons();
  11.     clearDisplay();
  12.     initUart(4800);
  13.  
  14.     while(1)
  15.     {
  16.         if(isB1Pressed())
  17.         {
  18.             sendStringToUART("Hello, world!");
  19.         }
  20.  
  21.         while(!isBufferEmpty())
  22.         {
  23.             sendChar(Buffer[bufferStart]);
  24.             bufferStart= (++bufferStart)%30;
  25.         }
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement