⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ks0108test.c

📁 for ks0108 LCD Controller
💻 C
字号:
/*
 * Copyright:      Fabian Maximilian Thiele  mailto:me@apetech.de
 * Author:         Fabian Maximilian Thiele
 * Remarks:        this Copyright must be included
 * known Problems: none
 * Version:        1.1
 * Description:    KS0108 Library Demo Program 
 * 
 */

#include <inttypes.h>
#include <avr/io.h>
#include <avr/pgmspace.h>

#include "ks0108.h"
#include "arial_bold_14.h"
#include "SC.h"
#include "Bitmap.h"


int main(void) {
	
	// Wait a little while the display starts up
	for(volatile uint16_t i=0; i<15000; i++);
	
	// Initialize the LCD
	ks0108Init(0);
	
	// Select a font
	//ks0108SelectFont(Arial_Bold_14, ks0108ReadFontData, BLACK);
	// Set a position
	//ks0108GotoXY(15,10);
	// Print some text
	//ks0108Puts_P(PSTR("test"));
	// a nice little round rect
	//ks0108DrawRoundRect(5, 5, 117, 20, 8, BLACK);

	// Once again :)
	// Select a font
	//ks0108SelectFont(SC, ks0108ReadFontData, BLACK);
	// Set a position
	//ks0108GotoXY(5,30);
	// Print some text
	//ks0108Puts("test");
   // ks0108DrawLine(0, 0, 100, 50, BLACK);
	//ks0108DrawCircle(50, 40, 20, BLACK);
	ks0108ClearScreen();
	LoadBitmap(IMAGE);
	while(1);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -