示例#1
0
文件: main.go 项目: zyxar/berry
func main() {
	flag.Int64Var(&step, "step", 5000, "clock step")
	flag.Parse()
	lcd = pcd8544.OpenLCD(19, 26, 13, 5, 6, 60)
	core.Delay(500)
	ch := make(chan os.Signal, 1)
	signal.Notify(ch, syscall.SIGINT, syscall.SIGTERM)
	go func() {
		for s := range ch {
			fmt.Printf("%v caught, exit\n", s)
			lcd.Reset()
			os.Exit(0)
		}
	}()
	for {
		loop()
	}
}
示例#2
0
文件: lcd.go 项目: zyxar/berry
func initLcd() {
	lcd = pcd8544.OpenLCD(19, 26, 13, 5, 6, 60)
}