Getting Started

(lily) #1

Chapter 1 1 The Butterfly LCD


// LCD test messages
const char PUTF_msg[] PROGMEM = "Called LCD_puts_f \0";
const char PUTS_msg[] PROGMEM = "Called LCD_puts with \0";
const char PUTC_msg[] PROGMEM = "Called LCD_putc\r\0";
const char CLEAR_msg[] PROGMEM = "LCD_Clear()\r\0";
const char COLON_msg[] PROGMEM = "Called LCD_Colon\r\0";
const char SETC_msg[] PROGMEM = "Called SetContrast\r\0";
const char SCROLL_msg[] PROGMEM = "Called OnScroll\r\0";


// LCD_test.h


void OnPUTF(char PUTFstr);
void OnPUTS(char
pStr);
void OnPUTC(char PUTCstr);
void OnCLEAR(void);
void OnCOLON(char
pOnoff);
void OnSETC(char SETCstr);
void OnSCROLL(char
SCROLL);


// LCD_test.c
#include "LCD_driver.h"
#include "LCD_functions.h"
#include "LCD_test.h"
#include "PC_Comm.h"
#include "Messages.h"


// Start-up delay before scrolling a string over the LCD. "LCD_driver.c"
extern char gLCD_Start_Scroll_Timer;


//PUTF,#
//Verify that # represents a valid string in flash.
//Set the pFlashStr pointer to the string
//Call LCD_puts_f(pFlashStr, scrollmode);
//Send "Called LCD_puts_f" to the PC
void OnPUTF(char
PUTFstr)
{
sendFString(PUTF_msg);


PGM_P text;


text = PSTR("LCD_putf test\0"); // won't show the


LCD_puts_f(text, 1);
}


//PUTS,string
//Load the string and point pStr to it.
//Call LCD_puts(*pStr, scrollmode);

Free download pdf