252
{
OLED_print_char(x_pos, y_pos, '-');
}
else
{
OLED_print_char(x_pos, y_pos, ' ');
}
}
}
main.c
#include <msp430.h>
#include "delay.h"
#include "HW_SPI.h"
#include "SSD1306.h"
void GPIO_graceInit(void);
void BCSplus_graceInit(void);
void USCI_B0_graceInit(void);
void System_graceInit(void);
void WDTplus_graceInit(void);
void main(void)
{
signed char c = -11;
signed int i = -111;
float f = -1.9;
/* Stop watchdog timer from timing out during initial start-up. */
WDTCTL = WDTPW | WDTHOLD;
/* initialize Config for the MSP430 GPIO */
GPIO_graceInit();
/* initialize Config for the MSP430 2xx family clock systems (BCS) */
BCSplus_graceInit();
/* initialize Config for the MSP430 USCI_B0 */
USCI_B0_graceInit();
/* initialize Config for the MSP430 System Registers */
System_graceInit();
/* initialize Config for the MSP430 WDT+ */
WDTplus_graceInit();
OLED_init();
OLED_print_string(4, 0, "MSP430G2553 SSD1306");
OLED_print_string(16, 1, "USCI_B0 SPI Test");
OLED_print_string(0, 4, "Char :");
OLED_print_string(0, 5, "Int. :");
OLED_print_string(0, 6, "Float:");
while(1)