main.c 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * main.c
  3. *
  4. * Copyright 2024 dh33ex <dh33ex@riseup.net>
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  19. * MA 02110-1301, USA or visit <http://www.gnu.org/licenses/>.
  20. *
  21. *
  22. */
  23. #include <msp430g2553.h>
  24. #include "dpd201.h"
  25. int main(void) {
  26. WDTCTL = WDTPW | WDTHOLD;
  27. /* use 1 MHz */
  28. if (CALBC1_1MHZ != 0xFF) {
  29. DCOCTL = 0;
  30. BCSCTL1 = CALBC1_1MHZ;
  31. DCOCTL = CALDCO_1MHZ;
  32. }
  33. VFD_init();
  34. VFD_clear();
  35. VFD_brightness(4);
  36. VFD_write("test");
  37. while (1) {
  38. __delay_cycles(1000000);
  39. VFD_write(".");
  40. }
  41. return 0;
  42. }