Updated fileheaders and styled files using astyle.
This commit is contained in:
@@ -1,243 +1,256 @@
|
||||
/**************************************************************************************************************************************
|
||||
* Project: discoverpixy
|
||||
* Website: https://github.com/t-moe/discoverpixy
|
||||
* Authors: Aaron Schmocker, Timo Lang
|
||||
* Institution: BFH Bern University of Applied Sciences
|
||||
* File: discovery/src/font.c
|
||||
*
|
||||
* Version History:
|
||||
* Date Autor Email SHA Changes
|
||||
* 2015-05-11 aaron@duckpond.ch 21fddc3 Implemented new functions
|
||||
*
|
||||
**************************************************************************************************************************************/
|
||||
|
||||
#include<stdint.h>
|
||||
|
||||
// SmallFont.c
|
||||
// SmallFont.c
|
||||
// Font Size : 8x12
|
||||
// Memory usage : 1216 bytes
|
||||
// # characters : 101
|
||||
const char small_font[1216] = {
|
||||
0x08,0x0C,0x20,0x65,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // <Space>
|
||||
0x00,0x00,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x20,0x00,0x00, // !
|
||||
0x00,0x28,0x50,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // "
|
||||
0x00,0x00,0x28,0x28,0xFC,0x28,0x50,0xFC,0x50,0x50,0x00,0x00, // #
|
||||
0x00,0x20,0x78,0xA8,0xA0,0x60,0x30,0x28,0xA8,0xF0,0x20,0x00, // $
|
||||
0x00,0x00,0x48,0xA8,0xB0,0x50,0x28,0x34,0x54,0x48,0x00,0x00, // %
|
||||
0x00,0x00,0x20,0x50,0x50,0x78,0xA8,0xA8,0x90,0x6C,0x00,0x00, // &
|
||||
0x00,0x40,0x40,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // '
|
||||
0x00,0x04,0x08,0x10,0x10,0x10,0x10,0x10,0x10,0x08,0x04,0x00, // (
|
||||
0x00,0x40,0x20,0x10,0x10,0x10,0x10,0x10,0x10,0x20,0x40,0x00, // )
|
||||
0x00,0x00,0x00,0x20,0xA8,0x70,0x70,0xA8,0x20,0x00,0x00,0x00, // *
|
||||
0x00,0x00,0x20,0x20,0x20,0xF8,0x20,0x20,0x20,0x00,0x00,0x00, // +
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x40,0x80, // ,
|
||||
0x00,0x00,0x00,0x00,0x00,0xF8,0x00,0x00,0x00,0x00,0x00,0x00, // -
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00, // .
|
||||
0x00,0x08,0x10,0x10,0x10,0x20,0x20,0x40,0x40,0x40,0x80,0x00, // /
|
||||
0x00,0x00,0x70,0x88,0x88,0x88,0x88,0x88,0x88,0x70,0x00,0x00, // 0
|
||||
0x00,0x00,0x20,0x60,0x20,0x20,0x20,0x20,0x20,0x70,0x00,0x00, // 1
|
||||
0x00,0x00,0x70,0x88,0x88,0x10,0x20,0x40,0x80,0xF8,0x00,0x00, // 2
|
||||
0x00,0x00,0x70,0x88,0x08,0x30,0x08,0x08,0x88,0x70,0x00,0x00, // 3
|
||||
0x00,0x00,0x10,0x30,0x50,0x50,0x90,0x78,0x10,0x18,0x00,0x00, // 4
|
||||
0x00,0x00,0xF8,0x80,0x80,0xF0,0x08,0x08,0x88,0x70,0x00,0x00, // 5
|
||||
0x00,0x00,0x70,0x90,0x80,0xF0,0x88,0x88,0x88,0x70,0x00,0x00, // 6
|
||||
0x00,0x00,0xF8,0x90,0x10,0x20,0x20,0x20,0x20,0x20,0x00,0x00, // 7
|
||||
0x00,0x00,0x70,0x88,0x88,0x70,0x88,0x88,0x88,0x70,0x00,0x00, // 8
|
||||
0x00,0x00,0x70,0x88,0x88,0x88,0x78,0x08,0x48,0x70,0x00,0x00, // 9
|
||||
0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x20,0x00,0x00, // :
|
||||
0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x20,0x20,0x00, // ;
|
||||
0x00,0x04,0x08,0x10,0x20,0x40,0x20,0x10,0x08,0x04,0x00,0x00, // <
|
||||
0x00,0x00,0x00,0x00,0xF8,0x00,0x00,0xF8,0x00,0x00,0x00,0x00, // =
|
||||
0x00,0x40,0x20,0x10,0x08,0x04,0x08,0x10,0x20,0x40,0x00,0x00, // >
|
||||
0x00,0x00,0x70,0x88,0x88,0x10,0x20,0x20,0x00,0x20,0x00,0x00, // ?
|
||||
0x00,0x00,0x70,0x88,0x98,0xA8,0xA8,0xB8,0x80,0x78,0x00,0x00, // @
|
||||
0x00,0x00,0x20,0x20,0x30,0x50,0x50,0x78,0x48,0xCC,0x00,0x00, // A
|
||||
0x00,0x00,0xF0,0x48,0x48,0x70,0x48,0x48,0x48,0xF0,0x00,0x00, // B
|
||||
0x00,0x00,0x78,0x88,0x80,0x80,0x80,0x80,0x88,0x70,0x00,0x00, // C
|
||||
0x00,0x00,0xF0,0x48,0x48,0x48,0x48,0x48,0x48,0xF0,0x00,0x00, // D
|
||||
0x00,0x00,0xF8,0x48,0x50,0x70,0x50,0x40,0x48,0xF8,0x00,0x00, // E
|
||||
0x00,0x00,0xF8,0x48,0x50,0x70,0x50,0x40,0x40,0xE0,0x00,0x00, // F
|
||||
0x00,0x00,0x38,0x48,0x80,0x80,0x9C,0x88,0x48,0x30,0x00,0x00, // G
|
||||
0x00,0x00,0xCC,0x48,0x48,0x78,0x48,0x48,0x48,0xCC,0x00,0x00, // H
|
||||
0x00,0x00,0xF8,0x20,0x20,0x20,0x20,0x20,0x20,0xF8,0x00,0x00, // I
|
||||
0x00,0x00,0x7C,0x10,0x10,0x10,0x10,0x10,0x10,0x90,0xE0,0x00, // J
|
||||
0x00,0x00,0xEC,0x48,0x50,0x60,0x50,0x50,0x48,0xEC,0x00,0x00, // K
|
||||
0x00,0x00,0xE0,0x40,0x40,0x40,0x40,0x40,0x44,0xFC,0x00,0x00, // L
|
||||
0x00,0x00,0xD8,0xD8,0xD8,0xD8,0xA8,0xA8,0xA8,0xA8,0x00,0x00, // M
|
||||
0x00,0x00,0xDC,0x48,0x68,0x68,0x58,0x58,0x48,0xE8,0x00,0x00, // N
|
||||
0x00,0x00,0x70,0x88,0x88,0x88,0x88,0x88,0x88,0x70,0x00,0x00, // O
|
||||
0x00,0x00,0xF0,0x48,0x48,0x70,0x40,0x40,0x40,0xE0,0x00,0x00, // P
|
||||
0x00,0x00,0x70,0x88,0x88,0x88,0x88,0xE8,0x98,0x70,0x18,0x00, // Q
|
||||
0x00,0x00,0xF0,0x48,0x48,0x70,0x50,0x48,0x48,0xEC,0x00,0x00, // R
|
||||
0x00,0x00,0x78,0x88,0x80,0x60,0x10,0x08,0x88,0xF0,0x00,0x00, // S
|
||||
0x00,0x00,0xF8,0xA8,0x20,0x20,0x20,0x20,0x20,0x70,0x00,0x00, // T
|
||||
0x00,0x00,0xCC,0x48,0x48,0x48,0x48,0x48,0x48,0x30,0x00,0x00, // U
|
||||
0x00,0x00,0xCC,0x48,0x48,0x50,0x50,0x30,0x20,0x20,0x00,0x00, // V
|
||||
0x00,0x00,0xA8,0xA8,0xA8,0x70,0x50,0x50,0x50,0x50,0x00,0x00, // W
|
||||
0x00,0x00,0xD8,0x50,0x50,0x20,0x20,0x50,0x50,0xD8,0x00,0x00, // X
|
||||
0x00,0x00,0xD8,0x50,0x50,0x20,0x20,0x20,0x20,0x70,0x00,0x00, // Y
|
||||
0x00,0x00,0xF8,0x90,0x10,0x20,0x20,0x40,0x48,0xF8,0x00,0x00, // Z
|
||||
0x00,0x38,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x38,0x00, // [
|
||||
0x00,0x40,0x40,0x40,0x20,0x20,0x10,0x10,0x10,0x08,0x00,0x00, // <Backslash>
|
||||
0x00,0x70,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x70,0x00, // ]
|
||||
0x00,0x20,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // ^
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC, // _
|
||||
0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // '
|
||||
0x00,0x00,0x00,0x00,0x00,0x30,0x48,0x38,0x48,0x3C,0x00,0x00, // a
|
||||
0x00,0x00,0xC0,0x40,0x40,0x70,0x48,0x48,0x48,0x70,0x00,0x00, // b
|
||||
0x00,0x00,0x00,0x00,0x00,0x38,0x48,0x40,0x40,0x38,0x00,0x00, // c
|
||||
0x00,0x00,0x18,0x08,0x08,0x38,0x48,0x48,0x48,0x3C,0x00,0x00, // d
|
||||
0x00,0x00,0x00,0x00,0x00,0x30,0x48,0x78,0x40,0x38,0x00,0x00, // e
|
||||
0x00,0x00,0x1C,0x20,0x20,0x78,0x20,0x20,0x20,0x78,0x00,0x00, // f
|
||||
0x00,0x00,0x00,0x00,0x00,0x3C,0x48,0x30,0x40,0x78,0x44,0x38, // g
|
||||
0x00,0x00,0xC0,0x40,0x40,0x70,0x48,0x48,0x48,0xEC,0x00,0x00, // h
|
||||
0x00,0x00,0x20,0x00,0x00,0x60,0x20,0x20,0x20,0x70,0x00,0x00, // i
|
||||
0x00,0x00,0x10,0x00,0x00,0x30,0x10,0x10,0x10,0x10,0x10,0xE0, // j
|
||||
0x00,0x00,0xC0,0x40,0x40,0x5C,0x50,0x70,0x48,0xEC,0x00,0x00, // k
|
||||
0x00,0x00,0xE0,0x20,0x20,0x20,0x20,0x20,0x20,0xF8,0x00,0x00, // l
|
||||
0x00,0x00,0x00,0x00,0x00,0xF0,0xA8,0xA8,0xA8,0xA8,0x00,0x00, // m
|
||||
0x00,0x00,0x00,0x00,0x00,0xF0,0x48,0x48,0x48,0xEC,0x00,0x00, // n
|
||||
0x00,0x00,0x00,0x00,0x00,0x30,0x48,0x48,0x48,0x30,0x00,0x00, // o
|
||||
0x00,0x00,0x00,0x00,0x00,0xF0,0x48,0x48,0x48,0x70,0x40,0xE0, // p
|
||||
0x00,0x00,0x00,0x00,0x00,0x38,0x48,0x48,0x48,0x38,0x08,0x1C, // q
|
||||
0x00,0x00,0x00,0x00,0x00,0xD8,0x60,0x40,0x40,0xE0,0x00,0x00, // r
|
||||
0x00,0x00,0x00,0x00,0x00,0x78,0x40,0x30,0x08,0x78,0x00,0x00, // s
|
||||
0x00,0x00,0x00,0x20,0x20,0x70,0x20,0x20,0x20,0x18,0x00,0x00, // t
|
||||
0x00,0x00,0x00,0x00,0x00,0xD8,0x48,0x48,0x48,0x3C,0x00,0x00, // u
|
||||
0x00,0x00,0x00,0x00,0x00,0xEC,0x48,0x50,0x30,0x20,0x00,0x00, // v
|
||||
0x00,0x00,0x00,0x00,0x00,0xA8,0xA8,0x70,0x50,0x50,0x00,0x00, // w
|
||||
0x00,0x00,0x00,0x00,0x00,0xD8,0x50,0x20,0x50,0xD8,0x00,0x00, // x
|
||||
0x00,0x00,0x00,0x00,0x00,0xEC,0x48,0x50,0x30,0x20,0x20,0xC0, // y
|
||||
0x00,0x00,0x00,0x00,0x00,0x78,0x10,0x20,0x20,0x78,0x00,0x00, // z
|
||||
0x00,0x18,0x10,0x10,0x10,0x20,0x10,0x10,0x10,0x10,0x18,0x00, // {
|
||||
0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, // |
|
||||
0x00,0x60,0x20,0x20,0x20,0x10,0x20,0x20,0x20,0x20,0x60,0x00, // }
|
||||
0x40,0xA4,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // ~
|
||||
0x50,0x00,0x20,0x20,0x30,0x50,0x50,0x78,0x48,0xCC,0x00,0x00, // Ä
|
||||
0x50,0x00,0x70,0x88,0x88,0x88,0x88,0x88,0x88,0x70,0x00,0x00, // Ö
|
||||
0x48,0x00,0xCC,0x48,0x48,0x48,0x48,0x48,0x48,0x30,0x00,0x00, // Ü
|
||||
0x00,0x00,0x00,0x48,0x00,0x30,0x48,0x38,0x48,0x3C,0x00,0x00, // ä
|
||||
0x00,0x00,0x00,0x48,0x00,0x30,0x48,0x48,0x48,0x30,0x00,0x00, // ö
|
||||
0x00,0x00,0x00,0x48,0x00,0xD8,0x48,0x48,0x48,0x3C,0x00,0x00 // ü
|
||||
};
|
||||
const char small_font[1216] = {
|
||||
0x08, 0x0C, 0x20, 0x65,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // <Space>
|
||||
0x00, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x20, 0x00, 0x00, // !
|
||||
0x00, 0x28, 0x50, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // "
|
||||
0x00, 0x00, 0x28, 0x28, 0xFC, 0x28, 0x50, 0xFC, 0x50, 0x50, 0x00, 0x00, // #
|
||||
0x00, 0x20, 0x78, 0xA8, 0xA0, 0x60, 0x30, 0x28, 0xA8, 0xF0, 0x20, 0x00, // $
|
||||
0x00, 0x00, 0x48, 0xA8, 0xB0, 0x50, 0x28, 0x34, 0x54, 0x48, 0x00, 0x00, // %
|
||||
0x00, 0x00, 0x20, 0x50, 0x50, 0x78, 0xA8, 0xA8, 0x90, 0x6C, 0x00, 0x00, // &
|
||||
0x00, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // '
|
||||
0x00, 0x04, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x08, 0x04, 0x00, // (
|
||||
0x00, 0x40, 0x20, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x20, 0x40, 0x00, // )
|
||||
0x00, 0x00, 0x00, 0x20, 0xA8, 0x70, 0x70, 0xA8, 0x20, 0x00, 0x00, 0x00, // *
|
||||
0x00, 0x00, 0x20, 0x20, 0x20, 0xF8, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, // +
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x80, // ,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // -
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, // .
|
||||
0x00, 0x08, 0x10, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x40, 0x80, 0x00, // /
|
||||
0x00, 0x00, 0x70, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x70, 0x00, 0x00, // 0
|
||||
0x00, 0x00, 0x20, 0x60, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x00, 0x00, // 1
|
||||
0x00, 0x00, 0x70, 0x88, 0x88, 0x10, 0x20, 0x40, 0x80, 0xF8, 0x00, 0x00, // 2
|
||||
0x00, 0x00, 0x70, 0x88, 0x08, 0x30, 0x08, 0x08, 0x88, 0x70, 0x00, 0x00, // 3
|
||||
0x00, 0x00, 0x10, 0x30, 0x50, 0x50, 0x90, 0x78, 0x10, 0x18, 0x00, 0x00, // 4
|
||||
0x00, 0x00, 0xF8, 0x80, 0x80, 0xF0, 0x08, 0x08, 0x88, 0x70, 0x00, 0x00, // 5
|
||||
0x00, 0x00, 0x70, 0x90, 0x80, 0xF0, 0x88, 0x88, 0x88, 0x70, 0x00, 0x00, // 6
|
||||
0x00, 0x00, 0xF8, 0x90, 0x10, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, // 7
|
||||
0x00, 0x00, 0x70, 0x88, 0x88, 0x70, 0x88, 0x88, 0x88, 0x70, 0x00, 0x00, // 8
|
||||
0x00, 0x00, 0x70, 0x88, 0x88, 0x88, 0x78, 0x08, 0x48, 0x70, 0x00, 0x00, // 9
|
||||
0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, // :
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x20, 0x00, // ;
|
||||
0x00, 0x04, 0x08, 0x10, 0x20, 0x40, 0x20, 0x10, 0x08, 0x04, 0x00, 0x00, // <
|
||||
0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x00, // =
|
||||
0x00, 0x40, 0x20, 0x10, 0x08, 0x04, 0x08, 0x10, 0x20, 0x40, 0x00, 0x00, // >
|
||||
0x00, 0x00, 0x70, 0x88, 0x88, 0x10, 0x20, 0x20, 0x00, 0x20, 0x00, 0x00, // ?
|
||||
0x00, 0x00, 0x70, 0x88, 0x98, 0xA8, 0xA8, 0xB8, 0x80, 0x78, 0x00, 0x00, // @
|
||||
0x00, 0x00, 0x20, 0x20, 0x30, 0x50, 0x50, 0x78, 0x48, 0xCC, 0x00, 0x00, // A
|
||||
0x00, 0x00, 0xF0, 0x48, 0x48, 0x70, 0x48, 0x48, 0x48, 0xF0, 0x00, 0x00, // B
|
||||
0x00, 0x00, 0x78, 0x88, 0x80, 0x80, 0x80, 0x80, 0x88, 0x70, 0x00, 0x00, // C
|
||||
0x00, 0x00, 0xF0, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0xF0, 0x00, 0x00, // D
|
||||
0x00, 0x00, 0xF8, 0x48, 0x50, 0x70, 0x50, 0x40, 0x48, 0xF8, 0x00, 0x00, // E
|
||||
0x00, 0x00, 0xF8, 0x48, 0x50, 0x70, 0x50, 0x40, 0x40, 0xE0, 0x00, 0x00, // F
|
||||
0x00, 0x00, 0x38, 0x48, 0x80, 0x80, 0x9C, 0x88, 0x48, 0x30, 0x00, 0x00, // G
|
||||
0x00, 0x00, 0xCC, 0x48, 0x48, 0x78, 0x48, 0x48, 0x48, 0xCC, 0x00, 0x00, // H
|
||||
0x00, 0x00, 0xF8, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0xF8, 0x00, 0x00, // I
|
||||
0x00, 0x00, 0x7C, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x90, 0xE0, 0x00, // J
|
||||
0x00, 0x00, 0xEC, 0x48, 0x50, 0x60, 0x50, 0x50, 0x48, 0xEC, 0x00, 0x00, // K
|
||||
0x00, 0x00, 0xE0, 0x40, 0x40, 0x40, 0x40, 0x40, 0x44, 0xFC, 0x00, 0x00, // L
|
||||
0x00, 0x00, 0xD8, 0xD8, 0xD8, 0xD8, 0xA8, 0xA8, 0xA8, 0xA8, 0x00, 0x00, // M
|
||||
0x00, 0x00, 0xDC, 0x48, 0x68, 0x68, 0x58, 0x58, 0x48, 0xE8, 0x00, 0x00, // N
|
||||
0x00, 0x00, 0x70, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x70, 0x00, 0x00, // O
|
||||
0x00, 0x00, 0xF0, 0x48, 0x48, 0x70, 0x40, 0x40, 0x40, 0xE0, 0x00, 0x00, // P
|
||||
0x00, 0x00, 0x70, 0x88, 0x88, 0x88, 0x88, 0xE8, 0x98, 0x70, 0x18, 0x00, // Q
|
||||
0x00, 0x00, 0xF0, 0x48, 0x48, 0x70, 0x50, 0x48, 0x48, 0xEC, 0x00, 0x00, // R
|
||||
0x00, 0x00, 0x78, 0x88, 0x80, 0x60, 0x10, 0x08, 0x88, 0xF0, 0x00, 0x00, // S
|
||||
0x00, 0x00, 0xF8, 0xA8, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x00, 0x00, // T
|
||||
0x00, 0x00, 0xCC, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x30, 0x00, 0x00, // U
|
||||
0x00, 0x00, 0xCC, 0x48, 0x48, 0x50, 0x50, 0x30, 0x20, 0x20, 0x00, 0x00, // V
|
||||
0x00, 0x00, 0xA8, 0xA8, 0xA8, 0x70, 0x50, 0x50, 0x50, 0x50, 0x00, 0x00, // W
|
||||
0x00, 0x00, 0xD8, 0x50, 0x50, 0x20, 0x20, 0x50, 0x50, 0xD8, 0x00, 0x00, // X
|
||||
0x00, 0x00, 0xD8, 0x50, 0x50, 0x20, 0x20, 0x20, 0x20, 0x70, 0x00, 0x00, // Y
|
||||
0x00, 0x00, 0xF8, 0x90, 0x10, 0x20, 0x20, 0x40, 0x48, 0xF8, 0x00, 0x00, // Z
|
||||
0x00, 0x38, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x38, 0x00, // [
|
||||
0x00, 0x40, 0x40, 0x40, 0x20, 0x20, 0x10, 0x10, 0x10, 0x08, 0x00, 0x00, // <Backslash>
|
||||
0x00, 0x70, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x70, 0x00, // ]
|
||||
0x00, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ^
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, // _
|
||||
0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // '
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x48, 0x38, 0x48, 0x3C, 0x00, 0x00, // a
|
||||
0x00, 0x00, 0xC0, 0x40, 0x40, 0x70, 0x48, 0x48, 0x48, 0x70, 0x00, 0x00, // b
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x48, 0x40, 0x40, 0x38, 0x00, 0x00, // c
|
||||
0x00, 0x00, 0x18, 0x08, 0x08, 0x38, 0x48, 0x48, 0x48, 0x3C, 0x00, 0x00, // d
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x48, 0x78, 0x40, 0x38, 0x00, 0x00, // e
|
||||
0x00, 0x00, 0x1C, 0x20, 0x20, 0x78, 0x20, 0x20, 0x20, 0x78, 0x00, 0x00, // f
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x48, 0x30, 0x40, 0x78, 0x44, 0x38, // g
|
||||
0x00, 0x00, 0xC0, 0x40, 0x40, 0x70, 0x48, 0x48, 0x48, 0xEC, 0x00, 0x00, // h
|
||||
0x00, 0x00, 0x20, 0x00, 0x00, 0x60, 0x20, 0x20, 0x20, 0x70, 0x00, 0x00, // i
|
||||
0x00, 0x00, 0x10, 0x00, 0x00, 0x30, 0x10, 0x10, 0x10, 0x10, 0x10, 0xE0, // j
|
||||
0x00, 0x00, 0xC0, 0x40, 0x40, 0x5C, 0x50, 0x70, 0x48, 0xEC, 0x00, 0x00, // k
|
||||
0x00, 0x00, 0xE0, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0xF8, 0x00, 0x00, // l
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xA8, 0xA8, 0xA8, 0xA8, 0x00, 0x00, // m
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x48, 0x48, 0x48, 0xEC, 0x00, 0x00, // n
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x48, 0x48, 0x48, 0x30, 0x00, 0x00, // o
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x48, 0x48, 0x48, 0x70, 0x40, 0xE0, // p
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x48, 0x48, 0x48, 0x38, 0x08, 0x1C, // q
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xD8, 0x60, 0x40, 0x40, 0xE0, 0x00, 0x00, // r
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x40, 0x30, 0x08, 0x78, 0x00, 0x00, // s
|
||||
0x00, 0x00, 0x00, 0x20, 0x20, 0x70, 0x20, 0x20, 0x20, 0x18, 0x00, 0x00, // t
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xD8, 0x48, 0x48, 0x48, 0x3C, 0x00, 0x00, // u
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xEC, 0x48, 0x50, 0x30, 0x20, 0x00, 0x00, // v
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xA8, 0xA8, 0x70, 0x50, 0x50, 0x00, 0x00, // w
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xD8, 0x50, 0x20, 0x50, 0xD8, 0x00, 0x00, // x
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xEC, 0x48, 0x50, 0x30, 0x20, 0x20, 0xC0, // y
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x10, 0x20, 0x20, 0x78, 0x00, 0x00, // z
|
||||
0x00, 0x18, 0x10, 0x10, 0x10, 0x20, 0x10, 0x10, 0x10, 0x10, 0x18, 0x00, // {
|
||||
0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, // |
|
||||
0x00, 0x60, 0x20, 0x20, 0x20, 0x10, 0x20, 0x20, 0x20, 0x20, 0x60, 0x00, // }
|
||||
0x40, 0xA4, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ~
|
||||
0x50, 0x00, 0x20, 0x20, 0x30, 0x50, 0x50, 0x78, 0x48, 0xCC, 0x00, 0x00, // Ä
|
||||
0x50, 0x00, 0x70, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x70, 0x00, 0x00, // Ö
|
||||
0x48, 0x00, 0xCC, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x30, 0x00, 0x00, // Ü
|
||||
0x00, 0x00, 0x00, 0x48, 0x00, 0x30, 0x48, 0x38, 0x48, 0x3C, 0x00, 0x00, // ä
|
||||
0x00, 0x00, 0x00, 0x48, 0x00, 0x30, 0x48, 0x48, 0x48, 0x30, 0x00, 0x00, // ö
|
||||
0x00, 0x00, 0x00, 0x48, 0x00, 0xD8, 0x48, 0x48, 0x48, 0x3C, 0x00, 0x00 // ü
|
||||
};
|
||||
|
||||
// BigFont.c (C)2010 by Henning Karlsen
|
||||
// Font Size : 16x16
|
||||
// Memory usage : 3236 bytes
|
||||
// # characters : 101
|
||||
const char big_font[3236] = {
|
||||
0x10,0x10,0x20,0x65,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // <Space>
|
||||
0x00,0x00,0x00,0x00,0x07,0x00,0x0F,0x80,0x0F,0x80,0x0F,0x80,0x0F,0x80,0x0F,0x80,0x07,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x00,0x00, // !
|
||||
0x00,0x00,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x06,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // "
|
||||
0x00,0x00,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x7F,0xFE,0x7F,0xFE,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x7F,0xFE,0x7F,0xFE,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x00,0x00, // #
|
||||
0x00,0x00,0x02,0x40,0x02,0x40,0x0F,0xF8,0x1F,0xF8,0x1A,0x40,0x1A,0x40,0x1F,0xF0,0x0F,0xF8,0x02,0x58,0x02,0x58,0x1F,0xF8,0x1F,0xF0,0x02,0x40,0x02,0x40,0x00,0x00, // $
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x0E,0x10,0x0E,0x30,0x0E,0x70,0x00,0xE0,0x01,0xC0,0x03,0x80,0x07,0x00,0x0E,0x70,0x0C,0x70,0x08,0x70,0x00,0x00,0x00,0x00,0x00,0x00, // %
|
||||
0x00,0x00,0x00,0x00,0x0F,0x00,0x19,0x80,0x19,0x80,0x19,0x80,0x0F,0x00,0x0F,0x08,0x0F,0x98,0x19,0xF8,0x18,0xF0,0x18,0xE0,0x19,0xF0,0x0F,0x98,0x00,0x00,0x00,0x00, // &
|
||||
0x00,0x00,0x00,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // '
|
||||
0x00,0x00,0x00,0x00,0x00,0xF0,0x01,0xC0,0x03,0x80,0x07,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x07,0x00,0x03,0x80,0x01,0xC0,0x00,0xF0,0x00,0x00,0x00,0x00, // (
|
||||
0x00,0x00,0x00,0x00,0x0F,0x00,0x03,0x80,0x01,0xC0,0x00,0xE0,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0xE0,0x01,0xC0,0x03,0x80,0x0F,0x00,0x00,0x00,0x00,0x00, // )
|
||||
0x00,0x00,0x00,0x00,0x01,0x80,0x11,0x88,0x09,0x90,0x07,0xE0,0x07,0xE0,0x3F,0xFC,0x3F,0xFC,0x07,0xE0,0x07,0xE0,0x09,0x90,0x11,0x88,0x01,0x80,0x00,0x00,0x00,0x00, // *
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x01,0x80,0x01,0x80,0x0F,0xF0,0x0F,0xF0,0x01,0x80,0x01,0x80,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // +
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x0E,0x00,0x00,0x00, // ,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xF8,0x1F,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // -
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x00,0x00,0x00,0x00, // ,
|
||||
0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x06,0x00,0x0E,0x00,0x1C,0x00,0x38,0x00,0x70,0x00,0xE0,0x01,0xC0,0x03,0x80,0x07,0x00,0x0E,0x00,0x1C,0x00,0x00,0x00,0x00,0x00, // /
|
||||
const char big_font[3236] = {
|
||||
0x10, 0x10, 0x20, 0x65,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // <Space>
|
||||
0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x0F, 0x80, 0x0F, 0x80, 0x0F, 0x80, 0x0F, 0x80, 0x0F, 0x80, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, // !
|
||||
0x00, 0x00, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x06, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // "
|
||||
0x00, 0x00, 0x0C, 0x30, 0x0C, 0x30, 0x0C, 0x30, 0x7F, 0xFE, 0x7F, 0xFE, 0x0C, 0x30, 0x0C, 0x30, 0x0C, 0x30, 0x0C, 0x30, 0x7F, 0xFE, 0x7F, 0xFE, 0x0C, 0x30, 0x0C, 0x30, 0x0C, 0x30, 0x00, 0x00, // #
|
||||
0x00, 0x00, 0x02, 0x40, 0x02, 0x40, 0x0F, 0xF8, 0x1F, 0xF8, 0x1A, 0x40, 0x1A, 0x40, 0x1F, 0xF0, 0x0F, 0xF8, 0x02, 0x58, 0x02, 0x58, 0x1F, 0xF8, 0x1F, 0xF0, 0x02, 0x40, 0x02, 0x40, 0x00, 0x00, // $
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x0E, 0x30, 0x0E, 0x70, 0x00, 0xE0, 0x01, 0xC0, 0x03, 0x80, 0x07, 0x00, 0x0E, 0x70, 0x0C, 0x70, 0x08, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // %
|
||||
0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x19, 0x80, 0x19, 0x80, 0x19, 0x80, 0x0F, 0x00, 0x0F, 0x08, 0x0F, 0x98, 0x19, 0xF8, 0x18, 0xF0, 0x18, 0xE0, 0x19, 0xF0, 0x0F, 0x98, 0x00, 0x00, 0x00, 0x00, // &
|
||||
0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // '
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x01, 0xC0, 0x03, 0x80, 0x07, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x07, 0x00, 0x03, 0x80, 0x01, 0xC0, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, // (
|
||||
0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x03, 0x80, 0x01, 0xC0, 0x00, 0xE0, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0xE0, 0x01, 0xC0, 0x03, 0x80, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, // )
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x11, 0x88, 0x09, 0x90, 0x07, 0xE0, 0x07, 0xE0, 0x3F, 0xFC, 0x3F, 0xFC, 0x07, 0xE0, 0x07, 0xE0, 0x09, 0x90, 0x11, 0x88, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, // *
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x0F, 0xF0, 0x0F, 0xF0, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // +
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x0E, 0x00, 0x00, 0x00, // ,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xF8, 0x1F, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // -
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, // ,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x06, 0x00, 0x0E, 0x00, 0x1C, 0x00, 0x38, 0x00, 0x70, 0x00, 0xE0, 0x01, 0xC0, 0x03, 0x80, 0x07, 0x00, 0x0E, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, // /
|
||||
|
||||
0x00,0x00,0x00,0x00,0x0F,0xF0,0x1C,0x38,0x1C,0x78,0x1C,0xF8,0x1C,0xF8,0x1D,0xB8,0x1D,0xB8,0x1F,0x38,0x1F,0x38,0x1E,0x38,0x1C,0x38,0x0F,0xF0,0x00,0x00,0x00,0x00, // 0
|
||||
0x00,0x00,0x00,0x00,0x01,0x80,0x01,0x80,0x03,0x80,0x1F,0x80,0x1F,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x1F,0xF0,0x00,0x00,0x00,0x00, // 1
|
||||
0x00,0x00,0x00,0x00,0x0F,0xE0,0x1C,0x70,0x1C,0x38,0x00,0x38,0x00,0x70,0x00,0xE0,0x01,0xC0,0x03,0x80,0x07,0x00,0x0E,0x38,0x1C,0x38,0x1F,0xF8,0x00,0x00,0x00,0x00, // 2
|
||||
0x00,0x00,0x00,0x00,0x0F,0xE0,0x1C,0x70,0x1C,0x38,0x00,0x38,0x00,0x70,0x03,0xC0,0x03,0xC0,0x00,0x70,0x00,0x38,0x1C,0x38,0x1C,0x70,0x0F,0xE0,0x00,0x00,0x00,0x00, // 3
|
||||
0x00,0x00,0x00,0x00,0x00,0xE0,0x01,0xE0,0x03,0xE0,0x06,0xE0,0x0C,0xE0,0x18,0xE0,0x1F,0xF8,0x1F,0xF8,0x00,0xE0,0x00,0xE0,0x00,0xE0,0x03,0xF8,0x00,0x00,0x00,0x00, // 4
|
||||
0x00,0x00,0x00,0x00,0x1F,0xF8,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x1F,0xE0,0x1F,0xF0,0x00,0x78,0x00,0x38,0x1C,0x38,0x1C,0x70,0x0F,0xE0,0x00,0x00,0x00,0x00, // 5
|
||||
0x00,0x00,0x00,0x00,0x03,0xE0,0x07,0x00,0x0E,0x00,0x1C,0x00,0x1C,0x00,0x1F,0xF0,0x1F,0xF8,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x0F,0xF0,0x00,0x00,0x00,0x00, // 6
|
||||
0x00,0x00,0x00,0x00,0x1F,0xFC,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x00,0x1C,0x00,0x38,0x00,0x70,0x00,0xE0,0x01,0xC0,0x03,0x80,0x03,0x80,0x03,0x80,0x00,0x00,0x00,0x00, // 7
|
||||
0x00,0x00,0x00,0x00,0x0F,0xF0,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1F,0x38,0x07,0xE0,0x07,0xE0,0x1C,0xF8,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x0F,0xF0,0x00,0x00,0x00,0x00, // 8
|
||||
0x00,0x00,0x00,0x00,0x0F,0xF0,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1F,0xF8,0x0F,0xF8,0x00,0x38,0x00,0x38,0x00,0x70,0x00,0xE0,0x07,0xC0,0x00,0x00,0x00,0x00, // 9
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x80,0x03,0x80,0x03,0x80,0x00,0x00,0x00,0x00,0x03,0x80,0x03,0x80,0x03,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // :
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x80,0x03,0x80,0x03,0x80,0x00,0x00,0x00,0x00,0x03,0x80,0x03,0x80,0x03,0x80,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // ;
|
||||
0x00,0x00,0x00,0x70,0x00,0xE0,0x01,0xC0,0x03,0x80,0x07,0x00,0x0E,0x00,0x1C,0x00,0x1C,0x00,0x0E,0x00,0x07,0x00,0x03,0x80,0x01,0xC0,0x00,0xE0,0x00,0x70,0x00,0x00, // <
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0xFC,0x3F,0xFC,0x00,0x00,0x00,0x00,0x3F,0xFC,0x3F,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // =
|
||||
0x00,0x00,0x1C,0x00,0x0E,0x00,0x07,0x00,0x03,0x80,0x01,0xC0,0x00,0xE0,0x00,0x70,0x00,0x70,0x00,0xE0,0x01,0xC0,0x03,0x80,0x07,0x00,0x0E,0x00,0x1C,0x00,0x00,0x00, // >
|
||||
0x00,0x00,0x03,0xC0,0x0F,0xF0,0x1E,0x78,0x18,0x38,0x00,0x38,0x00,0x70,0x00,0xE0,0x01,0xC0,0x01,0xC0,0x00,0x00,0x00,0x00,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x00,0x00, // ?
|
||||
0x00, 0x00, 0x00, 0x00, 0x0F, 0xF0, 0x1C, 0x38, 0x1C, 0x78, 0x1C, 0xF8, 0x1C, 0xF8, 0x1D, 0xB8, 0x1D, 0xB8, 0x1F, 0x38, 0x1F, 0x38, 0x1E, 0x38, 0x1C, 0x38, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, // 0
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x01, 0x80, 0x03, 0x80, 0x1F, 0x80, 0x1F, 0x80, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x1F, 0xF0, 0x00, 0x00, 0x00, 0x00, // 1
|
||||
0x00, 0x00, 0x00, 0x00, 0x0F, 0xE0, 0x1C, 0x70, 0x1C, 0x38, 0x00, 0x38, 0x00, 0x70, 0x00, 0xE0, 0x01, 0xC0, 0x03, 0x80, 0x07, 0x00, 0x0E, 0x38, 0x1C, 0x38, 0x1F, 0xF8, 0x00, 0x00, 0x00, 0x00, // 2
|
||||
0x00, 0x00, 0x00, 0x00, 0x0F, 0xE0, 0x1C, 0x70, 0x1C, 0x38, 0x00, 0x38, 0x00, 0x70, 0x03, 0xC0, 0x03, 0xC0, 0x00, 0x70, 0x00, 0x38, 0x1C, 0x38, 0x1C, 0x70, 0x0F, 0xE0, 0x00, 0x00, 0x00, 0x00, // 3
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x01, 0xE0, 0x03, 0xE0, 0x06, 0xE0, 0x0C, 0xE0, 0x18, 0xE0, 0x1F, 0xF8, 0x1F, 0xF8, 0x00, 0xE0, 0x00, 0xE0, 0x00, 0xE0, 0x03, 0xF8, 0x00, 0x00, 0x00, 0x00, // 4
|
||||
0x00, 0x00, 0x00, 0x00, 0x1F, 0xF8, 0x1C, 0x00, 0x1C, 0x00, 0x1C, 0x00, 0x1C, 0x00, 0x1F, 0xE0, 0x1F, 0xF0, 0x00, 0x78, 0x00, 0x38, 0x1C, 0x38, 0x1C, 0x70, 0x0F, 0xE0, 0x00, 0x00, 0x00, 0x00, // 5
|
||||
0x00, 0x00, 0x00, 0x00, 0x03, 0xE0, 0x07, 0x00, 0x0E, 0x00, 0x1C, 0x00, 0x1C, 0x00, 0x1F, 0xF0, 0x1F, 0xF8, 0x1C, 0x38, 0x1C, 0x38, 0x1C, 0x38, 0x1C, 0x38, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, // 6
|
||||
0x00, 0x00, 0x00, 0x00, 0x1F, 0xFC, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x00, 0x1C, 0x00, 0x38, 0x00, 0x70, 0x00, 0xE0, 0x01, 0xC0, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, // 7
|
||||
0x00, 0x00, 0x00, 0x00, 0x0F, 0xF0, 0x1C, 0x38, 0x1C, 0x38, 0x1C, 0x38, 0x1F, 0x38, 0x07, 0xE0, 0x07, 0xE0, 0x1C, 0xF8, 0x1C, 0x38, 0x1C, 0x38, 0x1C, 0x38, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, // 8
|
||||
0x00, 0x00, 0x00, 0x00, 0x0F, 0xF0, 0x1C, 0x38, 0x1C, 0x38, 0x1C, 0x38, 0x1C, 0x38, 0x1F, 0xF8, 0x0F, 0xF8, 0x00, 0x38, 0x00, 0x38, 0x00, 0x70, 0x00, 0xE0, 0x07, 0xC0, 0x00, 0x00, 0x00, 0x00, // 9
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // :
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ;
|
||||
0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, 0x01, 0xC0, 0x03, 0x80, 0x07, 0x00, 0x0E, 0x00, 0x1C, 0x00, 0x1C, 0x00, 0x0E, 0x00, 0x07, 0x00, 0x03, 0x80, 0x01, 0xC0, 0x00, 0xE0, 0x00, 0x70, 0x00, 0x00, // <
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFC, 0x3F, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFC, 0x3F, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // =
|
||||
0x00, 0x00, 0x1C, 0x00, 0x0E, 0x00, 0x07, 0x00, 0x03, 0x80, 0x01, 0xC0, 0x00, 0xE0, 0x00, 0x70, 0x00, 0x70, 0x00, 0xE0, 0x01, 0xC0, 0x03, 0x80, 0x07, 0x00, 0x0E, 0x00, 0x1C, 0x00, 0x00, 0x00, // >
|
||||
0x00, 0x00, 0x03, 0xC0, 0x0F, 0xF0, 0x1E, 0x78, 0x18, 0x38, 0x00, 0x38, 0x00, 0x70, 0x00, 0xE0, 0x01, 0xC0, 0x01, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x01, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x00, 0x00, // ?
|
||||
|
||||
0x00,0x00,0x0F,0xF8,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0xFC,0x1C,0xFC,0x1C,0xFC,0x1C,0xFC,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x1F,0xF0,0x07,0xF8,0x00,0x00, // @
|
||||
0x00,0x00,0x00,0x00,0x03,0xC0,0x07,0xE0,0x0E,0x70,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1F,0xF8,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x00,0x00,0x00,0x00, // A
|
||||
0x00,0x00,0x00,0x00,0x1F,0xF0,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0F,0xF0,0x0F,0xF0,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x1F,0xF0,0x00,0x00,0x00,0x00, // B
|
||||
0x00,0x00,0x00,0x00,0x07,0xF0,0x0E,0x38,0x1C,0x38,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x38,0x0E,0x38,0x07,0xF0,0x00,0x00,0x00,0x00, // C
|
||||
0x00,0x00,0x00,0x00,0x1F,0xE0,0x0E,0x70,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x70,0x1F,0xE0,0x00,0x00,0x00,0x00, // D
|
||||
0x00,0x00,0x00,0x00,0x1F,0xF8,0x0E,0x18,0x0E,0x08,0x0E,0x00,0x0E,0x30,0x0F,0xF0,0x0F,0xF0,0x0E,0x30,0x0E,0x00,0x0E,0x08,0x0E,0x18,0x1F,0xF8,0x00,0x00,0x00,0x00, // E
|
||||
0x00,0x00,0x00,0x00,0x1F,0xF8,0x0E,0x18,0x0E,0x08,0x0E,0x00,0x0E,0x30,0x0F,0xF0,0x0F,0xF0,0x0E,0x30,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x1F,0x00,0x00,0x00,0x00,0x00, // F
|
||||
0x00,0x00,0x00,0x00,0x07,0xF0,0x0E,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x1C,0xF8,0x1C,0x38,0x1C,0x38,0x0E,0x38,0x07,0xF8,0x00,0x00,0x00,0x00, // G
|
||||
0x00,0x00,0x00,0x00,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1F,0xF0,0x1F,0xF0,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x00,0x00,0x00,0x00, // H
|
||||
0x00,0x00,0x00,0x00,0x0F,0xE0,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x0F,0xE0,0x00,0x00,0x00,0x00, // I
|
||||
0x00,0x00,0x00,0x00,0x01,0xFC,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x70,0x38,0x70,0x38,0x70,0x38,0x70,0x38,0x70,0x0F,0xE0,0x00,0x00,0x00,0x00, // J
|
||||
0x00,0x00,0x00,0x00,0x1E,0x38,0x0E,0x38,0x0E,0x70,0x0E,0xE0,0x0F,0xC0,0x0F,0x80,0x0F,0x80,0x0F,0xC0,0x0E,0xE0,0x0E,0x70,0x0E,0x38,0x1E,0x38,0x00,0x00,0x00,0x00, // K
|
||||
0x00,0x00,0x00,0x00,0x1F,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x08,0x0E,0x18,0x0E,0x38,0x1F,0xF8,0x00,0x00,0x00,0x00, // L
|
||||
0x00,0x00,0x00,0x00,0x1C,0x1C,0x1E,0x3C,0x1F,0x7C,0x1F,0xFC,0x1F,0xFC,0x1D,0xDC,0x1C,0x9C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x00,0x00,0x00,0x00, // M
|
||||
0x00,0x00,0x00,0x00,0x1C,0x1C,0x1C,0x1C,0x1E,0x1C,0x1F,0x1C,0x1F,0x9C,0x1D,0xDC,0x1C,0xFC,0x1C,0x7C,0x1C,0x3C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x00,0x00,0x00,0x00, // N
|
||||
0x00,0x00,0x00,0x00,0x03,0xE0,0x07,0xF0,0x0E,0x38,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x0E,0x38,0x07,0xF0,0x03,0xE0,0x00,0x00,0x00,0x00, // O
|
||||
0x00, 0x00, 0x0F, 0xF8, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0xFC, 0x1C, 0xFC, 0x1C, 0xFC, 0x1C, 0xFC, 0x1C, 0x00, 0x1C, 0x00, 0x1C, 0x00, 0x1F, 0xF0, 0x07, 0xF8, 0x00, 0x00, // @
|
||||
0x00, 0x00, 0x00, 0x00, 0x03, 0xC0, 0x07, 0xE0, 0x0E, 0x70, 0x1C, 0x38, 0x1C, 0x38, 0x1C, 0x38, 0x1C, 0x38, 0x1F, 0xF8, 0x1C, 0x38, 0x1C, 0x38, 0x1C, 0x38, 0x1C, 0x38, 0x00, 0x00, 0x00, 0x00, // A
|
||||
0x00, 0x00, 0x00, 0x00, 0x1F, 0xF0, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0F, 0xF0, 0x0F, 0xF0, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x1F, 0xF0, 0x00, 0x00, 0x00, 0x00, // B
|
||||
0x00, 0x00, 0x00, 0x00, 0x07, 0xF0, 0x0E, 0x38, 0x1C, 0x38, 0x1C, 0x00, 0x1C, 0x00, 0x1C, 0x00, 0x1C, 0x00, 0x1C, 0x00, 0x1C, 0x00, 0x1C, 0x38, 0x0E, 0x38, 0x07, 0xF0, 0x00, 0x00, 0x00, 0x00, // C
|
||||
0x00, 0x00, 0x00, 0x00, 0x1F, 0xE0, 0x0E, 0x70, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x70, 0x1F, 0xE0, 0x00, 0x00, 0x00, 0x00, // D
|
||||
0x00, 0x00, 0x00, 0x00, 0x1F, 0xF8, 0x0E, 0x18, 0x0E, 0x08, 0x0E, 0x00, 0x0E, 0x30, 0x0F, 0xF0, 0x0F, 0xF0, 0x0E, 0x30, 0x0E, 0x00, 0x0E, 0x08, 0x0E, 0x18, 0x1F, 0xF8, 0x00, 0x00, 0x00, 0x00, // E
|
||||
0x00, 0x00, 0x00, 0x00, 0x1F, 0xF8, 0x0E, 0x18, 0x0E, 0x08, 0x0E, 0x00, 0x0E, 0x30, 0x0F, 0xF0, 0x0F, 0xF0, 0x0E, 0x30, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, // F
|
||||
0x00, 0x00, 0x00, 0x00, 0x07, 0xF0, 0x0E, 0x38, 0x1C, 0x38, 0x1C, 0x38, 0x1C, 0x00, 0x1C, 0x00, 0x1C, 0x00, 0x1C, 0xF8, 0x1C, 0x38, 0x1C, 0x38, 0x0E, 0x38, 0x07, 0xF8, 0x00, 0x00, 0x00, 0x00, // G
|
||||
0x00, 0x00, 0x00, 0x00, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1F, 0xF0, 0x1F, 0xF0, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x00, 0x00, 0x00, 0x00, // H
|
||||
0x00, 0x00, 0x00, 0x00, 0x0F, 0xE0, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x0F, 0xE0, 0x00, 0x00, 0x00, 0x00, // I
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0xFC, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x38, 0x70, 0x38, 0x70, 0x38, 0x70, 0x38, 0x70, 0x0F, 0xE0, 0x00, 0x00, 0x00, 0x00, // J
|
||||
0x00, 0x00, 0x00, 0x00, 0x1E, 0x38, 0x0E, 0x38, 0x0E, 0x70, 0x0E, 0xE0, 0x0F, 0xC0, 0x0F, 0x80, 0x0F, 0x80, 0x0F, 0xC0, 0x0E, 0xE0, 0x0E, 0x70, 0x0E, 0x38, 0x1E, 0x38, 0x00, 0x00, 0x00, 0x00, // K
|
||||
0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x08, 0x0E, 0x18, 0x0E, 0x38, 0x1F, 0xF8, 0x00, 0x00, 0x00, 0x00, // L
|
||||
0x00, 0x00, 0x00, 0x00, 0x1C, 0x1C, 0x1E, 0x3C, 0x1F, 0x7C, 0x1F, 0xFC, 0x1F, 0xFC, 0x1D, 0xDC, 0x1C, 0x9C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x00, 0x00, 0x00, 0x00, // M
|
||||
0x00, 0x00, 0x00, 0x00, 0x1C, 0x1C, 0x1C, 0x1C, 0x1E, 0x1C, 0x1F, 0x1C, 0x1F, 0x9C, 0x1D, 0xDC, 0x1C, 0xFC, 0x1C, 0x7C, 0x1C, 0x3C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x00, 0x00, 0x00, 0x00, // N
|
||||
0x00, 0x00, 0x00, 0x00, 0x03, 0xE0, 0x07, 0xF0, 0x0E, 0x38, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x0E, 0x38, 0x07, 0xF0, 0x03, 0xE0, 0x00, 0x00, 0x00, 0x00, // O
|
||||
|
||||
0x00,0x00,0x00,0x00,0x1F,0xF0,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0F,0xF0,0x0F,0xF0,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x1F,0x00,0x00,0x00,0x00,0x00, // P
|
||||
0x00,0x00,0x00,0x00,0x03,0xE0,0x0F,0x78,0x0E,0x38,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x7C,0x1C,0xFC,0x0F,0xF8,0x0F,0xF8,0x00,0x38,0x00,0xFC,0x00,0x00, // Q
|
||||
0x00,0x00,0x00,0x00,0x1F,0xF0,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0F,0xF0,0x0F,0xF0,0x0E,0x70,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x1E,0x38,0x00,0x00,0x00,0x00, // R
|
||||
0x00,0x00,0x00,0x00,0x0F,0xF0,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x00,0x0F,0xE0,0x07,0xF0,0x00,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x0F,0xF0,0x00,0x00,0x00,0x00, // S
|
||||
0x00,0x00,0x00,0x00,0x1F,0xFC,0x19,0xCC,0x11,0xC4,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x07,0xF0,0x00,0x00,0x00,0x00, // T
|
||||
0x00,0x00,0x00,0x00,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x0F,0xE0,0x00,0x00,0x00,0x00, // U
|
||||
0x00,0x00,0x00,0x00,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x0E,0xE0,0x07,0xC0,0x03,0x80,0x00,0x00,0x00,0x00, // V
|
||||
0x00,0x00,0x00,0x00,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x9C,0x1C,0x9C,0x1C,0x9C,0x0F,0xF8,0x0F,0xF8,0x07,0x70,0x07,0x70,0x00,0x00,0x00,0x00, // W
|
||||
0x00,0x00,0x00,0x00,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x0E,0xE0,0x07,0xC0,0x03,0x80,0x03,0x80,0x07,0xC0,0x0E,0xE0,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x00,0x00,0x00,0x00, // X
|
||||
0x00,0x00,0x00,0x00,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x0E,0xE0,0x07,0xC0,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x0F,0xE0,0x00,0x00,0x00,0x00, // Y
|
||||
0x00,0x00,0x00,0x00,0x1F,0xF8,0x1C,0x38,0x18,0x38,0x10,0x70,0x00,0xE0,0x01,0xC0,0x03,0x80,0x07,0x00,0x0E,0x08,0x1C,0x18,0x1C,0x38,0x1F,0xF8,0x00,0x00,0x00,0x00, // Z
|
||||
0x00,0x00,0x00,0x00,0x07,0xF0,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0xF0,0x00,0x00,0x00,0x00, // [
|
||||
0x00,0x00,0x00,0x00,0x10,0x00,0x18,0x00,0x1C,0x00,0x0E,0x00,0x07,0x00,0x03,0x80,0x01,0xC0,0x00,0xE0,0x00,0x70,0x00,0x38,0x00,0x1C,0x00,0x07,0x00,0x00,0x00,0x00, // <Backslash>
|
||||
0x00,0x00,0x00,0x00,0x07,0xF0,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x70,0x07,0xF0,0x00,0x00,0x00,0x00, // ]
|
||||
0x00,0x00,0x01,0x80,0x03,0xC0,0x07,0xE0,0x0E,0x70,0x1C,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // ^
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0x7F,0xFF, // _
|
||||
0x00, 0x00, 0x00, 0x00, 0x1F, 0xF0, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0F, 0xF0, 0x0F, 0xF0, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, // P
|
||||
0x00, 0x00, 0x00, 0x00, 0x03, 0xE0, 0x0F, 0x78, 0x0E, 0x38, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x7C, 0x1C, 0xFC, 0x0F, 0xF8, 0x0F, 0xF8, 0x00, 0x38, 0x00, 0xFC, 0x00, 0x00, // Q
|
||||
0x00, 0x00, 0x00, 0x00, 0x1F, 0xF0, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0F, 0xF0, 0x0F, 0xF0, 0x0E, 0x70, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x1E, 0x38, 0x00, 0x00, 0x00, 0x00, // R
|
||||
0x00, 0x00, 0x00, 0x00, 0x0F, 0xF0, 0x1C, 0x38, 0x1C, 0x38, 0x1C, 0x38, 0x1C, 0x00, 0x0F, 0xE0, 0x07, 0xF0, 0x00, 0x38, 0x1C, 0x38, 0x1C, 0x38, 0x1C, 0x38, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, // S
|
||||
0x00, 0x00, 0x00, 0x00, 0x1F, 0xFC, 0x19, 0xCC, 0x11, 0xC4, 0x01, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x07, 0xF0, 0x00, 0x00, 0x00, 0x00, // T
|
||||
0x00, 0x00, 0x00, 0x00, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x0F, 0xE0, 0x00, 0x00, 0x00, 0x00, // U
|
||||
0x00, 0x00, 0x00, 0x00, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x0E, 0xE0, 0x07, 0xC0, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, // V
|
||||
0x00, 0x00, 0x00, 0x00, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x9C, 0x1C, 0x9C, 0x1C, 0x9C, 0x0F, 0xF8, 0x0F, 0xF8, 0x07, 0x70, 0x07, 0x70, 0x00, 0x00, 0x00, 0x00, // W
|
||||
0x00, 0x00, 0x00, 0x00, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x0E, 0xE0, 0x07, 0xC0, 0x03, 0x80, 0x03, 0x80, 0x07, 0xC0, 0x0E, 0xE0, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x00, 0x00, 0x00, 0x00, // X
|
||||
0x00, 0x00, 0x00, 0x00, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x0E, 0xE0, 0x07, 0xC0, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x0F, 0xE0, 0x00, 0x00, 0x00, 0x00, // Y
|
||||
0x00, 0x00, 0x00, 0x00, 0x1F, 0xF8, 0x1C, 0x38, 0x18, 0x38, 0x10, 0x70, 0x00, 0xE0, 0x01, 0xC0, 0x03, 0x80, 0x07, 0x00, 0x0E, 0x08, 0x1C, 0x18, 0x1C, 0x38, 0x1F, 0xF8, 0x00, 0x00, 0x00, 0x00, // Z
|
||||
0x00, 0x00, 0x00, 0x00, 0x07, 0xF0, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0xF0, 0x00, 0x00, 0x00, 0x00, // [
|
||||
0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x18, 0x00, 0x1C, 0x00, 0x0E, 0x00, 0x07, 0x00, 0x03, 0x80, 0x01, 0xC0, 0x00, 0xE0, 0x00, 0x70, 0x00, 0x38, 0x00, 0x1C, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, // <Backslash>
|
||||
0x00, 0x00, 0x00, 0x00, 0x07, 0xF0, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x07, 0xF0, 0x00, 0x00, 0x00, 0x00, // ]
|
||||
0x00, 0x00, 0x01, 0x80, 0x03, 0xC0, 0x07, 0xE0, 0x0E, 0x70, 0x1C, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ^
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0x7F, 0xFF, // _
|
||||
|
||||
0x00,0x00,0x00,0x00,0x1C,0x00,0x1C,0x00,0x07,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // '
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xE0,0x00,0x70,0x00,0x70,0x0F,0xF0,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x0F,0xD8,0x00,0x00,0x00,0x00, // a
|
||||
0x00,0x00,0x00,0x00,0x1E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0F,0xF0,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x1B,0xF0,0x00,0x00,0x00,0x00, // b
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xE0,0x1C,0x70,0x1C,0x70,0x1C,0x00,0x1C,0x00,0x1C,0x70,0x1C,0x70,0x0F,0xE0,0x00,0x00,0x00,0x00, // c
|
||||
0x00,0x00,0x00,0x00,0x00,0xF8,0x00,0x70,0x00,0x70,0x00,0x70,0x0F,0xF0,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x0F,0xD8,0x00,0x00,0x00,0x00, // d
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xE0,0x1C,0x70,0x1C,0x70,0x1F,0xF0,0x1C,0x00,0x1C,0x70,0x1C,0x70,0x0F,0xE0,0x00,0x00,0x00,0x00, // e
|
||||
0x00,0x00,0x00,0x00,0x03,0xE0,0x07,0x70,0x07,0x70,0x07,0x00,0x07,0x00,0x1F,0xE0,0x1F,0xE0,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x1F,0xC0,0x00,0x00,0x00,0x00, // f
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xD8,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x0F,0xF0,0x07,0xF0,0x00,0x70,0x1C,0x70,0x0F,0xE0, // g
|
||||
0x00,0x00,0x00,0x00,0x1E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0xF0,0x0F,0x38,0x0F,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x1E,0x38,0x00,0x00,0x00,0x00, // h
|
||||
0x00,0x00,0x00,0x00,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x00,0x00,0x0F,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x0F,0xF8,0x00,0x00,0x00,0x00, // i
|
||||
0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x00,0x03,0xF0,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x70,0x00,0x70,0x1C,0x70,0x0C,0xF0,0x07,0xE0, // j
|
||||
0x00,0x00,0x00,0x00,0x1E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x38,0x0E,0x70,0x0E,0xE0,0x0F,0xC0,0x0E,0xE0,0x0E,0x70,0x0E,0x38,0x1E,0x38,0x00,0x00,0x00,0x00, // k
|
||||
0x00,0x00,0x00,0x00,0x0F,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x0F,0xF8,0x00,0x00,0x00,0x00, // l
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xF8,0x1C,0x9C,0x1C,0x9C,0x1C,0x9C,0x1C,0x9C,0x1C,0x9C,0x1C,0x9C,0x1C,0x9C,0x00,0x00,0x00,0x00, // m
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xE0,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x00,0x00,0x00,0x00, // n
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xE0,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x0F,0xE0,0x00,0x00,0x00,0x00, // o
|
||||
0x00, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x1C, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // '
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xE0, 0x00, 0x70, 0x00, 0x70, 0x0F, 0xF0, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x0F, 0xD8, 0x00, 0x00, 0x00, 0x00, // a
|
||||
0x00, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x0F, 0xF0, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x1B, 0xF0, 0x00, 0x00, 0x00, 0x00, // b
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xE0, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x00, 0x1C, 0x00, 0x1C, 0x70, 0x1C, 0x70, 0x0F, 0xE0, 0x00, 0x00, 0x00, 0x00, // c
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x0F, 0xF0, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x0F, 0xD8, 0x00, 0x00, 0x00, 0x00, // d
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xE0, 0x1C, 0x70, 0x1C, 0x70, 0x1F, 0xF0, 0x1C, 0x00, 0x1C, 0x70, 0x1C, 0x70, 0x0F, 0xE0, 0x00, 0x00, 0x00, 0x00, // e
|
||||
0x00, 0x00, 0x00, 0x00, 0x03, 0xE0, 0x07, 0x70, 0x07, 0x70, 0x07, 0x00, 0x07, 0x00, 0x1F, 0xE0, 0x1F, 0xE0, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x1F, 0xC0, 0x00, 0x00, 0x00, 0x00, // f
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xD8, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x0F, 0xF0, 0x07, 0xF0, 0x00, 0x70, 0x1C, 0x70, 0x0F, 0xE0, // g
|
||||
0x00, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0xF0, 0x0F, 0x38, 0x0F, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x1E, 0x38, 0x00, 0x00, 0x00, 0x00, // h
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x00, 0x00, 0x0F, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x0F, 0xF8, 0x00, 0x00, 0x00, 0x00, // i
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x00, 0x03, 0xF0, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x1C, 0x70, 0x0C, 0xF0, 0x07, 0xE0, // j
|
||||
0x00, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x38, 0x0E, 0x70, 0x0E, 0xE0, 0x0F, 0xC0, 0x0E, 0xE0, 0x0E, 0x70, 0x0E, 0x38, 0x1E, 0x38, 0x00, 0x00, 0x00, 0x00, // k
|
||||
0x00, 0x00, 0x00, 0x00, 0x0F, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x0F, 0xF8, 0x00, 0x00, 0x00, 0x00, // l
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xF8, 0x1C, 0x9C, 0x1C, 0x9C, 0x1C, 0x9C, 0x1C, 0x9C, 0x1C, 0x9C, 0x1C, 0x9C, 0x1C, 0x9C, 0x00, 0x00, 0x00, 0x00, // m
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xE0, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x00, 0x00, 0x00, 0x00, // n
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xE0, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x0F, 0xE0, 0x00, 0x00, 0x00, 0x00, // o
|
||||
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1B,0xF0,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0F,0xF0,0x0E,0x00,0x0E,0x00,0x1F,0x00, // p
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xB0,0x38,0xE0,0x38,0xE0,0x38,0xE0,0x38,0xE0,0x38,0xE0,0x1F,0xE0,0x00,0xE0,0x00,0xE0,0x01,0xF0, // q
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1E,0xF0,0x0F,0xF8,0x0F,0x38,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x1F,0x00,0x00,0x00,0x00,0x00, // r
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xE0,0x1C,0x30,0x1C,0x30,0x0F,0x80,0x03,0xE0,0x18,0x70,0x18,0x70,0x0F,0xE0,0x00,0x00,0x00,0x00, // s
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x03,0x00,0x07,0x00,0x1F,0xF0,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x70,0x07,0x70,0x03,0xE0,0x00,0x00,0x00,0x00, // t
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x0F,0xD8,0x00,0x00,0x00,0x00, // u
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x0E,0xE0,0x07,0xC0,0x03,0x80,0x00,0x00,0x00,0x00, // v
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x9C,0x1C,0x9C,0x0F,0xF8,0x07,0x70,0x07,0x70,0x00,0x00,0x00,0x00, // w
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0xE0,0x1C,0xE0,0x0F,0xC0,0x07,0x80,0x07,0x80,0x0F,0xC0,0x1C,0xE0,0x1C,0xE0,0x00,0x00,0x00,0x00, // x
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x07,0xF0,0x03,0xE0,0x00,0xE0,0x01,0xC0,0x1F,0x80, // y
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xE0,0x18,0xE0,0x11,0xC0,0x03,0x80,0x07,0x00,0x0E,0x20,0x1C,0x60,0x1F,0xE0,0x00,0x00,0x00,0x00, // z
|
||||
0x00,0x00,0x00,0x00,0x01,0xF8,0x03,0x80,0x03,0x80,0x03,0x80,0x07,0x00,0x1C,0x00,0x1C,0x00,0x07,0x00,0x03,0x80,0x03,0x80,0x03,0x80,0x01,0xF8,0x00,0x00,0x00,0x00, // {
|
||||
0x00,0x00,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x00,0x00, // |
|
||||
0x00,0x00,0x00,0x00,0x1F,0x80,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x00,0xE0,0x00,0x38,0x00,0x38,0x00,0xE0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x1F,0x80,0x00,0x00,0x00,0x00, // }
|
||||
0x00,0x00,0x00,0x00,0x1F,0x1C,0x3B,0x9C,0x39,0xDC,0x38,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // ~
|
||||
0x0C,0x30,0x0C,0x30,0x03,0xC0,0x07,0xE0,0x0E,0x70,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1F,0xF8,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x00,0x00,0x00,0x00, // Ä
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1B, 0xF0, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0F, 0xF0, 0x0E, 0x00, 0x0E, 0x00, 0x1F, 0x00, // p
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xB0, 0x38, 0xE0, 0x38, 0xE0, 0x38, 0xE0, 0x38, 0xE0, 0x38, 0xE0, 0x1F, 0xE0, 0x00, 0xE0, 0x00, 0xE0, 0x01, 0xF0, // q
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xF0, 0x0F, 0xF8, 0x0F, 0x38, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, // r
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xE0, 0x1C, 0x30, 0x1C, 0x30, 0x0F, 0x80, 0x03, 0xE0, 0x18, 0x70, 0x18, 0x70, 0x0F, 0xE0, 0x00, 0x00, 0x00, 0x00, // s
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x07, 0x00, 0x1F, 0xF0, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0x70, 0x07, 0x70, 0x03, 0xE0, 0x00, 0x00, 0x00, 0x00, // t
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x0F, 0xD8, 0x00, 0x00, 0x00, 0x00, // u
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x0E, 0xE0, 0x07, 0xC0, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, // v
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x9C, 0x1C, 0x9C, 0x0F, 0xF8, 0x07, 0x70, 0x07, 0x70, 0x00, 0x00, 0x00, 0x00, // w
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xE0, 0x1C, 0xE0, 0x0F, 0xC0, 0x07, 0x80, 0x07, 0x80, 0x0F, 0xC0, 0x1C, 0xE0, 0x1C, 0xE0, 0x00, 0x00, 0x00, 0x00, // x
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x0E, 0x38, 0x07, 0xF0, 0x03, 0xE0, 0x00, 0xE0, 0x01, 0xC0, 0x1F, 0x80, // y
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xE0, 0x18, 0xE0, 0x11, 0xC0, 0x03, 0x80, 0x07, 0x00, 0x0E, 0x20, 0x1C, 0x60, 0x1F, 0xE0, 0x00, 0x00, 0x00, 0x00, // z
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0xF8, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x07, 0x00, 0x1C, 0x00, 0x1C, 0x00, 0x07, 0x00, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x01, 0xF8, 0x00, 0x00, 0x00, 0x00, // {
|
||||
0x00, 0x00, 0x01, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x00, 0x00, // |
|
||||
0x00, 0x00, 0x00, 0x00, 0x1F, 0x80, 0x01, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x00, 0xE0, 0x00, 0x38, 0x00, 0x38, 0x00, 0xE0, 0x01, 0xC0, 0x01, 0xC0, 0x01, 0xC0, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, // }
|
||||
0x00, 0x00, 0x00, 0x00, 0x1F, 0x1C, 0x3B, 0x9C, 0x39, 0xDC, 0x38, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ~
|
||||
0x0C, 0x30, 0x0C, 0x30, 0x03, 0xC0, 0x07, 0xE0, 0x0E, 0x70, 0x1C, 0x38, 0x1C, 0x38, 0x1C, 0x38, 0x1C, 0x38, 0x1F, 0xF8, 0x1C, 0x38, 0x1C, 0x38, 0x1C, 0x38, 0x1C, 0x38, 0x00, 0x00, 0x00, 0x00, // Ä
|
||||
|
||||
0x0C,0x18,0x0C,0x18,0x03,0xE0,0x07,0xF0,0x0E,0x38,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x0E,0x38,0x07,0xF0,0x03,0xE0,0x00,0x00,0x00,0x00, // Ö
|
||||
0x0C,0x60,0x0C,0x60,0x00,0x00,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x0F,0xE0,0x00,0x00,0x00,0x00, // Ü
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x60,0x0C,0x60,0x00,0x00,0x0F,0xE0,0x00,0x70,0x00,0x70,0x0F,0xF0,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x0F,0xD8,0x00,0x00,0x00,0x00, // ä
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x60,0x0C,0x60,0x00,0x00,0x0F,0xE0,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x0F,0xE0,0x00,0x00,0x00,0x00, // o
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x60,0x0C,0x60,0x00,0x00,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x1C,0x70,0x0F,0xD8,0x00,0x00,0x00,0x00 // u
|
||||
};
|
||||
0x0C, 0x18, 0x0C, 0x18, 0x03, 0xE0, 0x07, 0xF0, 0x0E, 0x38, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x0E, 0x38, 0x07, 0xF0, 0x03, 0xE0, 0x00, 0x00, 0x00, 0x00, // Ö
|
||||
0x0C, 0x60, 0x0C, 0x60, 0x00, 0x00, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x0F, 0xE0, 0x00, 0x00, 0x00, 0x00, // Ü
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x60, 0x0C, 0x60, 0x00, 0x00, 0x0F, 0xE0, 0x00, 0x70, 0x00, 0x70, 0x0F, 0xF0, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x0F, 0xD8, 0x00, 0x00, 0x00, 0x00, // ä
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x60, 0x0C, 0x60, 0x00, 0x00, 0x0F, 0xE0, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x0F, 0xE0, 0x00, 0x00, 0x00, 0x00, // o
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x60, 0x0C, 0x60, 0x00, 0x00, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x1C, 0x70, 0x0F, 0xD8, 0x00, 0x00, 0x00, 0x00 // u
|
||||
};
|
||||
|
||||
// SevenSegNumFont.c
|
||||
// Font Size : 32x50
|
||||
// Memory usage : 2004 bytes
|
||||
// # characters : 10
|
||||
const char seven_seg_num_font[2004] = {
|
||||
0x20,0x32,0x30,0x0A,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFE,0x00,0x01,0xFF,0xFF,0x00,0x03,0xFF,0xFF,0x80,0x01,0xFF,0xFF,0x60,0x0C,0xFF,0xFE,0xF0,0x1E,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3E,0x00,0x00,0x78,0x38,0x00,0x00,0x18,0x20,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x38,0x00,0x00,0x18,0x3E,0x00,0x00,0x78,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x1E,0x00,0x00,0xF0,0x0C,0xFF,0xFE,0x60,0x01,0xFF,0xFF,0x00,0x03,0xFF,0xFF,0x80,0x01,0xFF,0xFF,0x00,0x00,0xFF,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // 0
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0xF0,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x78,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x00,0xF0,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // 1
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFE,0x00,0x01,0xFF,0xFF,0x00,0x03,0xFF,0xFF,0x80,0x01,0xFF,0xFF,0x60,0x00,0xFF,0xFE,0xF0,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x00,0x78,0x01,0xFF,0xFE,0x18,0x03,0xFF,0xFF,0x88,0x0F,0xFF,0xFF,0xE0,0x27,0xFF,0xFF,0xC0,0x39,0xFF,0xFF,0x00,0x3E,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0x0C,0xFF,0xFE,0x00,0x01,0xFF,0xFF,0x00,0x03,0xFF,0xFF,0x80,0x01,0xFF,0xFF,0x00,0x00,0xFF,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // 2
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFE,0x00,0x01,0xFF,0xFF,0x00,0x03,0xFF,0xFF,0x80,0x01,0xFF,0xFF,0x60,0x00,0xFF,0xFE,0xF0,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x00,0x78,0x01,0xFF,0xFE,0x18,0x03,0xFF,0xFF,0x88,0x0F,0xFF,0xFF,0xE0,0x07,0xFF,0xFF,0xC0,0x01,0xFF,0xFF,0x18,0x00,0x00,0x00,0x78,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x00,0xF0,0x00,0xFF,0xFE,0x60,0x01,0xFF,0xFF,0x00,0x03,0xFF,0xFF,0x80,0x01,0xFF,0xFF,0x00,0x00,0xFF,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // 3
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x0C,0x00,0x00,0xF0,0x1E,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3E,0x00,0x00,0x78,0x39,0xFF,0xFE,0x18,0x23,0xFF,0xFF,0x88,0x0F,0xFF,0xFF,0xE0,0x07,0xFF,0xFF,0xC0,0x01,0xFF,0xFF,0x18,0x00,0x00,0x00,0x78,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x00,0xF0,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // 4
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFE,0x00,0x01,0xFF,0xFF,0x00,0x03,0xFF,0xFF,0x80,0x01,0xFF,0xFF,0x00,0x0C,0xFF,0xFE,0x00,0x1E,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,0x39,0xFF,0xFE,0x00,0x23,0xFF,0xFF,0x80,0x0F,0xFF,0xFF,0xE0,0x07,0xFF,0xFF,0xC0,0x01,0xFF,0xFF,0x18,0x00,0x00,0x00,0x78,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x00,0xF0,0x00,0xFF,0xFE,0x60,0x01,0xFF,0xFF,0x00,0x03,0xFF,0xFF,0x80,0x01,0xFF,0xFF,0x00,0x00,0xFF,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // 5
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFE,0x00,0x01,0xFF,0xFF,0x00,0x03,0xFF,0xFF,0x80,0x01,0xFF,0xFF,0x00,0x0C,0xFF,0xFE,0x00,0x1E,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,0x39,0xFF,0xFE,0x00,0x23,0xFF,0xFF,0x80,0x0F,0xFF,0xFF,0xE0,0x27,0xFF,0xFF,0xC0,0x39,0xFF,0xFF,0x18,0x3E,0x00,0x00,0x78,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x1E,0x00,0x00,0xF0,0x0C,0xFF,0xFE,0x60,0x01,0xFF,0xFF,0x00,0x03,0xFF,0xFF,0x80,0x01,0xFF,0xFF,0x00,0x00,0xFF,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // 6
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFE,0x00,0x01,0xFF,0xFF,0x00,0x03,0xFF,0xFF,0x80,0x01,0xFF,0xFF,0x60,0x00,0xFF,0xFE,0xF0,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x78,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x00,0xF0,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // 7
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFE,0x00,0x01,0xFF,0xFF,0x00,0x03,0xFF,0xFF,0x80,0x01,0xFF,0xFF,0x60,0x0C,0xFF,0xFE,0xF0,0x1E,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3E,0x00,0x00,0x78,0x39,0xFF,0xFE,0x18,0x23,0xFF,0xFF,0x88,0x0F,0xFF,0xFF,0xE0,0x27,0xFF,0xFF,0xC0,0x39,0xFF,0xFF,0x18,0x3E,0x00,0x00,0x78,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x1E,0x00,0x00,0xF0,0x0C,0xFF,0xFE,0x60,0x01,0xFF,0xFF,0x00,0x03,0xFF,0xFF,0x80,0x01,0xFF,0xFF,0x00,0x00,0xFF,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // 8
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFE,0x00,0x01,0xFF,0xFF,0x00,0x03,0xFF,0xFF,0x80,0x01,0xFF,0xFF,0x60,0x0C,0xFF,0xFE,0xF0,0x1E,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3F,0x00,0x01,0xF8,0x3E,0x00,0x00,0x78,0x39,0xFF,0xFE,0x18,0x23,0xFF,0xFF,0x88,0x0F,0xFF,0xFF,0xE0,0x07,0xFF,0xFF,0xC0,0x01,0xFF,0xFF,0x18,0x00,0x00,0x00,0x78,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x01,0xF8,0x00,0x00,0x00,0xF0,0x00,0xFF,0xFE,0x60,0x01,0xFF,0xFF,0x00,0x03,0xFF,0xFF,0x80,0x01,0xFF,0xFF,0x00,0x00,0xFF,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // 9
|
||||
const char seven_seg_num_font[2004] = {
|
||||
0x20, 0x32, 0x30, 0x0A,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFE, 0x00, 0x01, 0xFF, 0xFF, 0x00, 0x03, 0xFF, 0xFF, 0x80, 0x01, 0xFF, 0xFF, 0x60, 0x0C, 0xFF, 0xFE, 0xF0, 0x1E, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3E, 0x00, 0x00, 0x78, 0x38, 0x00, 0x00, 0x18, 0x20, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x18, 0x3E, 0x00, 0x00, 0x78, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x1E, 0x00, 0x00, 0xF0, 0x0C, 0xFF, 0xFE, 0x60, 0x01, 0xFF, 0xFF, 0x00, 0x03, 0xFF, 0xFF, 0x80, 0x01, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 1
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFE, 0x00, 0x01, 0xFF, 0xFF, 0x00, 0x03, 0xFF, 0xFF, 0x80, 0x01, 0xFF, 0xFF, 0x60, 0x00, 0xFF, 0xFE, 0xF0, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x00, 0x78, 0x01, 0xFF, 0xFE, 0x18, 0x03, 0xFF, 0xFF, 0x88, 0x0F, 0xFF, 0xFF, 0xE0, 0x27, 0xFF, 0xFF, 0xC0, 0x39, 0xFF, 0xFF, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFE, 0x00, 0x01, 0xFF, 0xFF, 0x00, 0x03, 0xFF, 0xFF, 0x80, 0x01, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 2
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFE, 0x00, 0x01, 0xFF, 0xFF, 0x00, 0x03, 0xFF, 0xFF, 0x80, 0x01, 0xFF, 0xFF, 0x60, 0x00, 0xFF, 0xFE, 0xF0, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x00, 0x78, 0x01, 0xFF, 0xFE, 0x18, 0x03, 0xFF, 0xFF, 0x88, 0x0F, 0xFF, 0xFF, 0xE0, 0x07, 0xFF, 0xFF, 0xC0, 0x01, 0xFF, 0xFF, 0x18, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x00, 0xF0, 0x00, 0xFF, 0xFE, 0x60, 0x01, 0xFF, 0xFF, 0x00, 0x03, 0xFF, 0xFF, 0x80, 0x01, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 3
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x0C, 0x00, 0x00, 0xF0, 0x1E, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3E, 0x00, 0x00, 0x78, 0x39, 0xFF, 0xFE, 0x18, 0x23, 0xFF, 0xFF, 0x88, 0x0F, 0xFF, 0xFF, 0xE0, 0x07, 0xFF, 0xFF, 0xC0, 0x01, 0xFF, 0xFF, 0x18, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 4
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFE, 0x00, 0x01, 0xFF, 0xFF, 0x00, 0x03, 0xFF, 0xFF, 0x80, 0x01, 0xFF, 0xFF, 0x00, 0x0C, 0xFF, 0xFE, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x39, 0xFF, 0xFE, 0x00, 0x23, 0xFF, 0xFF, 0x80, 0x0F, 0xFF, 0xFF, 0xE0, 0x07, 0xFF, 0xFF, 0xC0, 0x01, 0xFF, 0xFF, 0x18, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x00, 0xF0, 0x00, 0xFF, 0xFE, 0x60, 0x01, 0xFF, 0xFF, 0x00, 0x03, 0xFF, 0xFF, 0x80, 0x01, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 5
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFE, 0x00, 0x01, 0xFF, 0xFF, 0x00, 0x03, 0xFF, 0xFF, 0x80, 0x01, 0xFF, 0xFF, 0x00, 0x0C, 0xFF, 0xFE, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x39, 0xFF, 0xFE, 0x00, 0x23, 0xFF, 0xFF, 0x80, 0x0F, 0xFF, 0xFF, 0xE0, 0x27, 0xFF, 0xFF, 0xC0, 0x39, 0xFF, 0xFF, 0x18, 0x3E, 0x00, 0x00, 0x78, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x1E, 0x00, 0x00, 0xF0, 0x0C, 0xFF, 0xFE, 0x60, 0x01, 0xFF, 0xFF, 0x00, 0x03, 0xFF, 0xFF, 0x80, 0x01, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 6
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFE, 0x00, 0x01, 0xFF, 0xFF, 0x00, 0x03, 0xFF, 0xFF, 0x80, 0x01, 0xFF, 0xFF, 0x60, 0x00, 0xFF, 0xFE, 0xF0, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 7
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFE, 0x00, 0x01, 0xFF, 0xFF, 0x00, 0x03, 0xFF, 0xFF, 0x80, 0x01, 0xFF, 0xFF, 0x60, 0x0C, 0xFF, 0xFE, 0xF0, 0x1E, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3E, 0x00, 0x00, 0x78, 0x39, 0xFF, 0xFE, 0x18, 0x23, 0xFF, 0xFF, 0x88, 0x0F, 0xFF, 0xFF, 0xE0, 0x27, 0xFF, 0xFF, 0xC0, 0x39, 0xFF, 0xFF, 0x18, 0x3E, 0x00, 0x00, 0x78, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x1E, 0x00, 0x00, 0xF0, 0x0C, 0xFF, 0xFE, 0x60, 0x01, 0xFF, 0xFF, 0x00, 0x03, 0xFF, 0xFF, 0x80, 0x01, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 8
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFE, 0x00, 0x01, 0xFF, 0xFF, 0x00, 0x03, 0xFF, 0xFF, 0x80, 0x01, 0xFF, 0xFF, 0x60, 0x0C, 0xFF, 0xFE, 0xF0, 0x1E, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3F, 0x00, 0x01, 0xF8, 0x3E, 0x00, 0x00, 0x78, 0x39, 0xFF, 0xFE, 0x18, 0x23, 0xFF, 0xFF, 0x88, 0x0F, 0xFF, 0xFF, 0xE0, 0x07, 0xFF, 0xFF, 0xC0, 0x01, 0xFF, 0xFF, 0x18, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x00, 0xF0, 0x00, 0xFF, 0xFE, 0x60, 0x01, 0xFF, 0xFF, 0x00, 0x03, 0xFF, 0xFF, 0x80, 0x01, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 9
|
||||
};
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/**************************************************************************************************************************************
|
||||
* Project: discoverpixy
|
||||
* Website: https://github.com/t-moe/discoverpixy
|
||||
* Authors: Aaron Schmocker, Timo Lang
|
||||
* Institution: BFH Bern University of Applied Sciences
|
||||
* File: discovery/src/font.h
|
||||
*
|
||||
* Version History:
|
||||
* Date Autor Email SHA Changes
|
||||
* 2015-05-11 aaron@duckpond.ch 21fddc3 Implemented new functions
|
||||
*
|
||||
**************************************************************************************************************************************/
|
||||
|
||||
const char small_font[1216];
|
||||
const char big_font[3236];
|
||||
const char seven_seg_num_font[2004];
|
||||
|
||||
@@ -1,38 +1,56 @@
|
||||
/**************************************************************************************************************************************
|
||||
* Project: discoverpixy
|
||||
* Website: https://github.com/t-moe/discoverpixy
|
||||
* Authors: Aaron Schmocker, Timo Lang
|
||||
* Institution: BFH Bern University of Applied Sciences
|
||||
* File: discovery/src/ll_filesystem.c
|
||||
*
|
||||
* Version History:
|
||||
* Date Autor Email SHA Changes
|
||||
* 2015-05-10 timolang@gmail.com e2bce8f Added filesystem module, tests and implementation for it in emulator.
|
||||
*
|
||||
**************************************************************************************************************************************/
|
||||
|
||||
#include "ll_filesystem.h"
|
||||
#include <stdio.h>
|
||||
|
||||
bool ll_filesystem_init() {
|
||||
return false;
|
||||
bool ll_filesystem_init()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
DIRECTORY_STRUCT* ll_filesystem_dir_open(const char* path) {
|
||||
return NULL;
|
||||
DIRECTORY_STRUCT* ll_filesystem_dir_open(const char* path)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void ll_filesystem_dir_close(DIRECTORY_STRUCT* dir) {
|
||||
|
||||
void ll_filesystem_dir_close(DIRECTORY_STRUCT* dir)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
FILE_HANDLE* ll_filesystem_file_open(const char* filename) {
|
||||
return NULL;
|
||||
FILE_HANDLE* ll_filesystem_file_open(const char* filename)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void ll_filesystem_file_close(FILE_HANDLE* handle) {
|
||||
|
||||
void ll_filesystem_file_close(FILE_HANDLE* handle)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
FILE_STATUS ll_filesystem_file_seek(FILE_HANDLE* handle, uint32_t offset) {
|
||||
return F_DISKERROR;
|
||||
FILE_STATUS ll_filesystem_file_seek(FILE_HANDLE* handle, uint32_t offset)
|
||||
{
|
||||
return F_DISKERROR;
|
||||
}
|
||||
|
||||
FILE_STATUS ll_filesystem_file_read(FILE_HANDLE* handle, uint8_t* buf, uint32_t size) {
|
||||
return F_DISKERROR;
|
||||
FILE_STATUS ll_filesystem_file_read(FILE_HANDLE* handle, uint8_t* buf, uint32_t size)
|
||||
{
|
||||
return F_DISKERROR;
|
||||
}
|
||||
|
||||
FILE_STATUS ll_filesystem_file_write(FILE_HANDLE* handle, uint8_t* buf, uint32_t size) {
|
||||
return F_DISKERROR;
|
||||
FILE_STATUS ll_filesystem_file_write(FILE_HANDLE* handle, uint8_t* buf, uint32_t size)
|
||||
{
|
||||
return F_DISKERROR;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,60 +1,80 @@
|
||||
#include "ll_system.h"
|
||||
#include "stm32f4xx.h"
|
||||
#include "stm32f4_discovery.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#include "usb_hcd_int.h"
|
||||
#include "usbh_usr.h"
|
||||
#include "usbh_core.h"
|
||||
#include "usbh_msc_core.h"
|
||||
|
||||
USB_OTG_CORE_HANDLE USB_OTG_Core;
|
||||
USBH_HOST USB_Host;
|
||||
RCC_ClocksTypeDef RCC_Clocks;
|
||||
|
||||
void SysTick_Handler(void)
|
||||
{
|
||||
USBH_LL_systick();
|
||||
}
|
||||
|
||||
void TIM2_IRQHandler(void)
|
||||
{
|
||||
USB_OTG_BSP_TimerIRQ();
|
||||
}
|
||||
|
||||
void OTG_FS_IRQHandler(void)
|
||||
{
|
||||
USBH_OTG_ISR_Handler(&USB_OTG_Core);
|
||||
}
|
||||
|
||||
bool ll_system_init(void)
|
||||
{
|
||||
/* Initialize LEDS */
|
||||
STM_EVAL_LEDInit(LED3);
|
||||
STM_EVAL_LEDInit(LED4);
|
||||
//LED5 and LED6 can not be used because of pin conflict. See docu
|
||||
|
||||
STM_EVAL_PBInit(BUTTON_USER, BUTTON_MODE_GPIO);
|
||||
|
||||
|
||||
/* SysTick end of count event each 1ms */
|
||||
RCC_GetClocksFreq(&RCC_Clocks); //we run at 168mhz :)
|
||||
SysTick_Config(RCC_Clocks.HCLK_Frequency / 1000);
|
||||
|
||||
/* Init Host Library */
|
||||
USBH_Init(&USB_OTG_Core, USB_OTG_FS_CORE_ID, &USB_Host, &USBH_MSC_cb, &USR_Callbacks);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void ll_system_process() {
|
||||
USBH_Process(&USB_OTG_Core, &USB_Host);
|
||||
}
|
||||
|
||||
void ll_system_delay(uint32_t msec) {
|
||||
USB_OTG_BSP_mDelay(msec);
|
||||
}
|
||||
|
||||
void ll_system_toggle_led() {
|
||||
//no led's free :(
|
||||
}
|
||||
/**************************************************************************************************************************************
|
||||
* Project: discoverpixy
|
||||
* Website: https://github.com/t-moe/discoverpixy
|
||||
* Authors: Aaron Schmocker, Timo Lang
|
||||
* Institution: BFH Bern University of Applied Sciences
|
||||
* File: discovery/src/ll_system.c
|
||||
*
|
||||
* Version History:
|
||||
* Date Autor Email SHA Changes
|
||||
* 2015-04-03 timolang@gmail.com 9a1d12a Refactored discovery, to use new project structure. Almost ready.
|
||||
* 2015-04-25 timolang@gmail.com 3d1e4b2 Simplified code a bit. Emulator does not work stable when replugging pixy.
|
||||
* 2015-04-25 timolang@gmail.com 0858b0d Fixed some bugs when receiving large data.
|
||||
* 2015-04-27 aaron@duckpond.ch 0b61f21 Fixed misplacement of prototypes in ll_tft.h and implemented a propper init function.
|
||||
* 2015-06-02 timolang@gmail.com 16bfdad Removed conflicting led usage from usb code.
|
||||
*
|
||||
**************************************************************************************************************************************/
|
||||
|
||||
#include "ll_system.h"
|
||||
#include "stm32f4xx.h"
|
||||
#include "stm32f4_discovery.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#include "usb_hcd_int.h"
|
||||
#include "usbh_usr.h"
|
||||
#include "usbh_core.h"
|
||||
#include "usbh_msc_core.h"
|
||||
|
||||
USB_OTG_CORE_HANDLE USB_OTG_Core;
|
||||
USBH_HOST USB_Host;
|
||||
RCC_ClocksTypeDef RCC_Clocks;
|
||||
|
||||
void SysTick_Handler(void)
|
||||
{
|
||||
USBH_LL_systick();
|
||||
}
|
||||
|
||||
void TIM2_IRQHandler(void)
|
||||
{
|
||||
USB_OTG_BSP_TimerIRQ();
|
||||
}
|
||||
|
||||
void OTG_FS_IRQHandler(void)
|
||||
{
|
||||
USBH_OTG_ISR_Handler(&USB_OTG_Core);
|
||||
}
|
||||
|
||||
bool ll_system_init(void)
|
||||
{
|
||||
/* Initialize LEDS */
|
||||
STM_EVAL_LEDInit(LED3);
|
||||
STM_EVAL_LEDInit(LED4);
|
||||
//LED5 and LED6 can not be used because of pin conflict. See docu
|
||||
|
||||
STM_EVAL_PBInit(BUTTON_USER, BUTTON_MODE_GPIO);
|
||||
|
||||
|
||||
/* SysTick end of count event each 1ms */
|
||||
RCC_GetClocksFreq(&RCC_Clocks); //we run at 168mhz :)
|
||||
SysTick_Config(RCC_Clocks.HCLK_Frequency / 1000);
|
||||
|
||||
/* Init Host Library */
|
||||
USBH_Init(&USB_OTG_Core, USB_OTG_FS_CORE_ID, &USB_Host, &USBH_MSC_cb, &USR_Callbacks);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void ll_system_process()
|
||||
{
|
||||
USBH_Process(&USB_OTG_Core, &USB_Host);
|
||||
}
|
||||
|
||||
void ll_system_delay(uint32_t msec)
|
||||
{
|
||||
USB_OTG_BSP_mDelay(msec);
|
||||
}
|
||||
|
||||
void ll_system_toggle_led()
|
||||
{
|
||||
//no led's free :(
|
||||
}
|
||||
|
||||
@@ -1,5 +1,31 @@
|
||||
/**************************************************************************************************************************************
|
||||
* Project: discoverpixy
|
||||
* Website: https://github.com/t-moe/discoverpixy
|
||||
* Authors: Aaron Schmocker, Timo Lang
|
||||
* Institution: BFH Bern University of Applied Sciences
|
||||
* File: discovery/src/ll_tft.c
|
||||
*
|
||||
* Version History:
|
||||
* Date Autor Email SHA Changes
|
||||
* 2015-04-03 timolang@gmail.com 9a1d12a Refactored discovery, to use new project structure. Almost ready.
|
||||
* 2015-04-03 timolang@gmail.com 1aa9194 Fixed Drawing of rects in Emulator. Got frames from pixy to emulator. Slooooow.
|
||||
* 2015-04-27 aaron@duckpond.ch aed90ef Drawcircle added (emulator)
|
||||
* 2015-04-27 timolang@gmail.com e249fb2 Added font support
|
||||
* 2015-04-27 aaron@duckpond.ch f0a6c3b Implemented init functions for gpio, fsmc and display
|
||||
* 2015-04-27 aaron@duckpond.ch 0b61f21 Fixed misplacement of prototypes in ll_tft.h and implemented a propper init function.
|
||||
* 2015-04-28 aaron@duckpond.ch a413591 Implemented ll_tft_fill_rectange and ll_tft_set_window
|
||||
* 2015-05-04 aaron@duckpond.ch c224d40 Changed display init
|
||||
* 2015-05-11 aaron@duckpond.ch 21fddc3 Implemented new functions
|
||||
* 2015-05-12 aaron@duckpond.ch aec62d4 Added datasheets, updated touchsupport.
|
||||
* 2015-06-01 aaron@duckpond.ch caa7b5c Added IRQ for user button, fixed some touchproblems.
|
||||
* 2015-06-01 timolang@gmail.com 60c2895 Fixed lowlevel tft discovery functions for draw_char and fill_rect.
|
||||
* 2015-06-02 timolang@gmail.com da34bce Fixed all printf related problems on discovery using workarounds and newlib nano-instead of newlib
|
||||
* 2015-06-06 aaron@duckpond.ch a04cda9 Refactured comments and implemented a bugfix for the PID controller
|
||||
*
|
||||
**************************************************************************************************************************************/
|
||||
|
||||
/* TFT lowlevel functions
|
||||
*
|
||||
*
|
||||
* Pinout:
|
||||
* ----------------------------------------
|
||||
* PB0 -> LCD_Backlight PE3 -> LCD_RS
|
||||
@@ -42,17 +68,18 @@ static void tft_set_backlight(bool state);
|
||||
static void tft_reset(bool state);
|
||||
static void tft_write_reg(uint8_t reg_adr, uint16_t reg_value);
|
||||
static uint16_t tft_read_reg(uint8_t reg_adr);
|
||||
static void tft_set_window(uint16_t xstart, uint16_t ystart, uint16_t xend, uint16_t yend);void tft_reset_window();
|
||||
static void tft_set_window(uint16_t xstart, uint16_t ystart, uint16_t xend, uint16_t yend);
|
||||
void tft_reset_window();
|
||||
|
||||
/* draw functions */
|
||||
void ll_tft_draw_line(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t color);
|
||||
void ll_tft_draw_pixel(uint16_t x,uint16_t y,uint16_t color);
|
||||
void ll_tft_draw_pixel(uint16_t x, uint16_t y, uint16_t color);
|
||||
void ll_tft_draw_rectangle(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t color);
|
||||
void ll_tft_draw_bitmap_unscaled(uint16_t x, uint16_t y, uint16_t width, uint16_t height, const uint16_t* dat);
|
||||
void ll_tft_draw_circle(uint16_t x, uint16_t y, uint16_t r, uint16_t color);
|
||||
|
||||
/* font functions */
|
||||
static const char *get_font(uint8_t font);
|
||||
static const char* get_font(uint8_t font);
|
||||
uint8_t ll_tft_num_fonts();
|
||||
uint8_t ll_tft_font_height(uint8_t fontnum);
|
||||
uint8_t ll_tft_font_width(uint8_t fontnum);
|
||||
@@ -73,7 +100,7 @@ void ll_tft_draw_char(uint16_t x, uint16_t y, uint16_t color, uint16_t bgcolo
|
||||
#define DISPLAY_COLOR_YELLOW 0xFFE0
|
||||
#define DISPLAY_COLOR_GREY 0xF7DE
|
||||
|
||||
// FSMC adresses
|
||||
// FSMC adresses
|
||||
#define TFT_REG (*((volatile unsigned short *) 0x60000000)) // RS = 0
|
||||
#define TFT_RAM (*((volatile unsigned short *) 0x60100000)) // RS = 1
|
||||
#define TFT_RAM_ADR 0x60100000 // RAM adress
|
||||
@@ -115,105 +142,105 @@ bool ll_tft_init()
|
||||
fsmc = fsmc_init(); // init fsmc
|
||||
system_delay(TFT_INIT_TIMEOUT); // delay
|
||||
display = display_init(); // init display
|
||||
|
||||
|
||||
return (gpio & fsmc & display);
|
||||
}
|
||||
|
||||
static bool display_init()
|
||||
static bool display_init()
|
||||
{
|
||||
tft_reset(true); // toggle reset
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_reset(false);
|
||||
|
||||
tft_write_reg(0x0007,0x0021);
|
||||
tft_write_reg(0x0007, 0x0021);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x0000,0x0001);
|
||||
tft_write_reg(0x0000, 0x0001);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x0007,0x0023);
|
||||
tft_write_reg(0x0007, 0x0023);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x0010,0x0000);
|
||||
tft_write_reg(0x0010, 0x0000);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x0007,0x0033);
|
||||
tft_write_reg(0x0007, 0x0033);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(TFT_SSD1289_REG_11,0x6018); // set mode (landscape, portrait)
|
||||
tft_write_reg(TFT_SSD1289_REG_11, 0x6018); // set mode (landscape, portrait)
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x0002,0x0600);
|
||||
tft_write_reg(0x0002, 0x0600);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
//tft_write_reg(0x0012,0x6CEB);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x0003,0xA8A4);
|
||||
tft_write_reg(0x0003, 0xA8A4);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x000C,0x0000);
|
||||
tft_write_reg(0x000C, 0x0000);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x000D,0x080C);
|
||||
tft_write_reg(0x000D, 0x080C);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x000E,0x2B00);
|
||||
tft_write_reg(0x000E, 0x2B00);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x001E,0x00B0);
|
||||
tft_write_reg(0x001E, 0x00B0);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x0001,0x2b3F);
|
||||
tft_write_reg(0x0001, 0x2b3F);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x0005,0x0000);
|
||||
tft_write_reg(0x0005, 0x0000);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x0006,0x0000);
|
||||
tft_write_reg(0x0006, 0x0000);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x0016,0xEF1C);
|
||||
tft_write_reg(0x0016, 0xEF1C);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x0017,0x0103);
|
||||
tft_write_reg(0x0017, 0x0103);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x000B,0x0000);
|
||||
tft_write_reg(0x000B, 0x0000);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x000F,0x0000);
|
||||
tft_write_reg(0x000F, 0x0000);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x0041,0x0000);
|
||||
tft_write_reg(0x0041, 0x0000);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x0042,0x0000);
|
||||
tft_write_reg(0x0042, 0x0000);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x0048,0x0000);
|
||||
tft_write_reg(0x0048, 0x0000);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x0049,0x013F);
|
||||
tft_write_reg(0x0049, 0x013F);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x004A,0x0000);
|
||||
tft_write_reg(0x004A, 0x0000);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x004B,0x0000);
|
||||
tft_write_reg(0x004B, 0x0000);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x0044,0xEF00); // horizontal start and end
|
||||
tft_write_reg(0x0044, 0xEF00); // horizontal start and end
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x0045,0x0000); // vertical start
|
||||
tft_write_reg(0x0045, 0x0000); // vertical start
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x0046,0x013F); // vertical end
|
||||
tft_write_reg(0x0046, 0x013F); // vertical end
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x0030,0x0707);
|
||||
tft_write_reg(0x0030, 0x0707);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x0031,0x0204);
|
||||
tft_write_reg(0x0031, 0x0204);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x0032,0x0204);
|
||||
tft_write_reg(0x0032, 0x0204);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x0033,0x0502);
|
||||
tft_write_reg(0x0033, 0x0502);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x0034,0x0507);
|
||||
tft_write_reg(0x0034, 0x0507);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x0035,0x0204);
|
||||
tft_write_reg(0x0035, 0x0204);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x0036,0x0204);
|
||||
tft_write_reg(0x0036, 0x0204);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x0037,0x0502);
|
||||
tft_write_reg(0x0037, 0x0502);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x003A,0x0302);
|
||||
tft_write_reg(0x003A, 0x0302);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
//tft_write_reg(0x002F,0x12BE);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x003B,0x0302);
|
||||
tft_write_reg(0x003B, 0x0302);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x0023,0x0000);
|
||||
tft_write_reg(0x0023, 0x0000);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x0024,0x0000);
|
||||
tft_write_reg(0x0024, 0x0000);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x0025,0x8000);
|
||||
tft_write_reg(0x0025, 0x8000);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x004f,0x0000);
|
||||
tft_write_reg(0x004f, 0x0000);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
tft_write_reg(0x004e,0x0000);
|
||||
tft_write_reg(0x004e, 0x0000);
|
||||
system_delay(TFT_INIT_TIMEOUT);
|
||||
TFT_REG = TFT_SSD1289_REG_22;
|
||||
|
||||
@@ -225,11 +252,11 @@ static bool fsmc_init()
|
||||
// generate init structures
|
||||
FSMC_NORSRAMInitTypeDef FSMC_NORSRAMInitStructure;
|
||||
FSMC_NORSRAMTimingInitTypeDef FSMC_NORSRAMTimingInitStructure;
|
||||
|
||||
// clock enable
|
||||
RCC_AHB3PeriphClockCmd(RCC_AHB3Periph_FSMC, ENABLE);
|
||||
|
||||
// prepare timing struct
|
||||
|
||||
// clock enable
|
||||
RCC_AHB3PeriphClockCmd(RCC_AHB3Periph_FSMC, ENABLE);
|
||||
|
||||
// prepare timing struct
|
||||
FSMC_NORSRAMTimingInitStructure.FSMC_AddressSetupTime = TFT_SSD1289_FSMC_AST;
|
||||
FSMC_NORSRAMTimingInitStructure.FSMC_AddressHoldTime = 1;
|
||||
FSMC_NORSRAMTimingInitStructure.FSMC_DataSetupTime = TFT_SSD1289_FSMC_DST;
|
||||
@@ -237,26 +264,26 @@ static bool fsmc_init()
|
||||
FSMC_NORSRAMTimingInitStructure.FSMC_CLKDivision = 0;
|
||||
FSMC_NORSRAMTimingInitStructure.FSMC_DataLatency = 0;
|
||||
FSMC_NORSRAMTimingInitStructure.FSMC_AccessMode = FSMC_AccessMode_A;
|
||||
|
||||
|
||||
// bank-1 / PSRAM-1
|
||||
FSMC_NORSRAMInitStructure.FSMC_Bank = FSMC_Bank1_NORSRAM1;
|
||||
FSMC_NORSRAMInitStructure.FSMC_DataAddressMux = FSMC_DataAddressMux_Disable;
|
||||
FSMC_NORSRAMInitStructure.FSMC_MemoryType = FSMC_MemoryType_SRAM;
|
||||
FSMC_NORSRAMInitStructure.FSMC_MemoryDataWidth = FSMC_MemoryDataWidth_16b;
|
||||
FSMC_NORSRAMInitStructure.FSMC_BurstAccessMode = FSMC_BurstAccessMode_Disable;
|
||||
FSMC_NORSRAMInitStructure.FSMC_AsynchronousWait = FSMC_AsynchronousWait_Disable;
|
||||
FSMC_NORSRAMInitStructure.FSMC_WaitSignalPolarity = FSMC_WaitSignalPolarity_Low;
|
||||
FSMC_NORSRAMInitStructure.FSMC_WrapMode = FSMC_WrapMode_Disable;
|
||||
FSMC_NORSRAMInitStructure.FSMC_WaitSignalActive = FSMC_WaitSignalActive_BeforeWaitState;
|
||||
FSMC_NORSRAMInitStructure.FSMC_WriteOperation = FSMC_WriteOperation_Enable;
|
||||
FSMC_NORSRAMInitStructure.FSMC_WaitSignal = FSMC_WaitSignal_Disable;
|
||||
FSMC_NORSRAMInitStructure.FSMC_ExtendedMode = FSMC_ExtendedMode_Disable;
|
||||
FSMC_NORSRAMInitStructure.FSMC_WriteBurst = FSMC_WriteBurst_Disable;
|
||||
FSMC_NORSRAMInitStructure.FSMC_ReadWriteTimingStruct = &FSMC_NORSRAMTimingInitStructure;
|
||||
FSMC_NORSRAMInitStructure.FSMC_AsynchronousWait = FSMC_AsynchronousWait_Disable;
|
||||
FSMC_NORSRAMInitStructure.FSMC_WaitSignalPolarity = FSMC_WaitSignalPolarity_Low;
|
||||
FSMC_NORSRAMInitStructure.FSMC_WrapMode = FSMC_WrapMode_Disable;
|
||||
FSMC_NORSRAMInitStructure.FSMC_WaitSignalActive = FSMC_WaitSignalActive_BeforeWaitState;
|
||||
FSMC_NORSRAMInitStructure.FSMC_WriteOperation = FSMC_WriteOperation_Enable;
|
||||
FSMC_NORSRAMInitStructure.FSMC_WaitSignal = FSMC_WaitSignal_Disable;
|
||||
FSMC_NORSRAMInitStructure.FSMC_ExtendedMode = FSMC_ExtendedMode_Disable;
|
||||
FSMC_NORSRAMInitStructure.FSMC_WriteBurst = FSMC_WriteBurst_Disable;
|
||||
FSMC_NORSRAMInitStructure.FSMC_ReadWriteTimingStruct = &FSMC_NORSRAMTimingInitStructure;
|
||||
FSMC_NORSRAMInitStructure.FSMC_WriteTimingStruct = &FSMC_NORSRAMTimingInitStructure;
|
||||
|
||||
|
||||
// config FSMC
|
||||
FSMC_NORSRAMInit(&FSMC_NORSRAMInitStructure);
|
||||
FSMC_NORSRAMInit(&FSMC_NORSRAMInitStructure);
|
||||
// enable Bank-1 / PSRAM-1
|
||||
FSMC_NORSRAMCmd(FSMC_Bank1_NORSRAM1, ENABLE);
|
||||
|
||||
@@ -269,19 +296,19 @@ static bool gpio_init()
|
||||
GPIO_InitTypeDef GPIO_InitStructure;
|
||||
|
||||
// clock enable PORT_B, PORT_D, PORT_E
|
||||
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOB,ENABLE);
|
||||
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOD,ENABLE);
|
||||
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOE,ENABLE);
|
||||
|
||||
// PORT_B init
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0;
|
||||
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOB, ENABLE);
|
||||
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOD, ENABLE);
|
||||
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOE, ENABLE);
|
||||
|
||||
// PORT_B init
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0;
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
|
||||
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
|
||||
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP;
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
|
||||
// configure PORT_B
|
||||
GPIO_Init(GPIOB, &GPIO_InitStructure);
|
||||
|
||||
GPIO_Init(GPIOB, &GPIO_InitStructure);
|
||||
|
||||
// PORT_D init
|
||||
GPIO_PinAFConfig(GPIOD, GPIO_PinSource0, GPIO_AF_FSMC); // PD0=FSMC_D2 -> DB2
|
||||
GPIO_PinAFConfig(GPIOD, GPIO_PinSource1, GPIO_AF_FSMC); // PD1=FSMC_D3 -> DB3
|
||||
@@ -290,25 +317,25 @@ static bool gpio_init()
|
||||
GPIO_PinAFConfig(GPIOD, GPIO_PinSource7, GPIO_AF_FSMC); // PD7=FSMC_NE1 -> CS
|
||||
GPIO_PinAFConfig(GPIOD, GPIO_PinSource8, GPIO_AF_FSMC); // PD8=FSMC_D13 -> DB15
|
||||
GPIO_PinAFConfig(GPIOD, GPIO_PinSource9, GPIO_AF_FSMC); // PD9=FSMC_D14 -> DB16
|
||||
GPIO_PinAFConfig(GPIOD, GPIO_PinSource10, GPIO_AF_FSMC); // PD10=FSMC_D15 -> DB17
|
||||
GPIO_PinAFConfig(GPIOD, GPIO_PinSource10, GPIO_AF_FSMC); // PD10=FSMC_D15 -> DB17
|
||||
GPIO_PinAFConfig(GPIOD, GPIO_PinSource14, GPIO_AF_FSMC); // PD14=FSMC_D0 -> DB0
|
||||
GPIO_PinAFConfig(GPIOD, GPIO_PinSource15, GPIO_AF_FSMC); // PD15=FSMC_D1 -> DB1
|
||||
// PORT_D struct
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0 | GPIO_Pin_1 | GPIO_Pin_4 | GPIO_Pin_5 |
|
||||
GPIO_Pin_7 | GPIO_Pin_8 | GPIO_Pin_9 | GPIO_Pin_10 |
|
||||
GPIO_Pin_14 | GPIO_Pin_15;
|
||||
GPIO_Pin_7 | GPIO_Pin_8 | GPIO_Pin_9 | GPIO_Pin_10 |
|
||||
GPIO_Pin_14 | GPIO_Pin_15;
|
||||
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
|
||||
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
|
||||
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
|
||||
// configure PORT_D
|
||||
GPIO_Init(GPIOD, &GPIO_InitStructure);
|
||||
|
||||
GPIO_Init(GPIOD, &GPIO_InitStructure);
|
||||
|
||||
// PORT_E init
|
||||
GPIO_PinAFConfig(GPIOE, GPIO_PinSource3, GPIO_AF_FSMC); // PE3=FSMC_A19 -> RS
|
||||
GPIO_PinAFConfig(GPIOE, GPIO_PinSource7, GPIO_AF_FSMC); // PE7=FSMC_D4 -> DB4
|
||||
GPIO_PinAFConfig(GPIOE, GPIO_PinSource8, GPIO_AF_FSMC); // PE8=FSMC_D5 -> DB5
|
||||
GPIO_PinAFConfig(GPIOE, GPIO_PinSource8, GPIO_AF_FSMC); // PE8=FSMC_D5 -> DB5
|
||||
GPIO_PinAFConfig(GPIOE, GPIO_PinSource9, GPIO_AF_FSMC); // PE9=FSMC_D6 -> DB6
|
||||
GPIO_PinAFConfig(GPIOE, GPIO_PinSource10, GPIO_AF_FSMC); // PE10=FSMC_D7 -> DB7
|
||||
GPIO_PinAFConfig(GPIOE, GPIO_PinSource11, GPIO_AF_FSMC); // PE11=FSMC_D8 -> DB10
|
||||
@@ -316,17 +343,17 @@ static bool gpio_init()
|
||||
GPIO_PinAFConfig(GPIOE, GPIO_PinSource13, GPIO_AF_FSMC); // PE13=FSMC_D10 -> DB12
|
||||
GPIO_PinAFConfig(GPIOE, GPIO_PinSource14, GPIO_AF_FSMC); // PE14=FSMC_D11 -> DB13
|
||||
GPIO_PinAFConfig(GPIOE, GPIO_PinSource15, GPIO_AF_FSMC); // PE15=FSMC_D12 -> DB14
|
||||
|
||||
|
||||
// PORT_E struct
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_3 | GPIO_Pin_7 | GPIO_Pin_8 | GPIO_Pin_9 |
|
||||
GPIO_Pin_10 | GPIO_Pin_11 | GPIO_Pin_12 | GPIO_Pin_13 |
|
||||
GPIO_Pin_14 | GPIO_Pin_15;
|
||||
GPIO_Pin_10 | GPIO_Pin_11 | GPIO_Pin_12 | GPIO_Pin_13 |
|
||||
GPIO_Pin_14 | GPIO_Pin_15;
|
||||
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
|
||||
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
|
||||
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
|
||||
|
||||
|
||||
// configure PORT_E
|
||||
GPIO_Init(GPIOE, &GPIO_InitStructure);
|
||||
|
||||
@@ -338,14 +365,14 @@ static bool gpio_init()
|
||||
*/
|
||||
|
||||
// Clear the whole screen by filling it with a specifig color
|
||||
void ll_tft_clear(uint16_t color)
|
||||
void ll_tft_clear(uint16_t color)
|
||||
{
|
||||
uint32_t n = 0;
|
||||
|
||||
|
||||
// set cursor to 0
|
||||
tft_set_cursor(0,0);
|
||||
|
||||
for(n = 0; n < TFT_PIXEL; n++) {
|
||||
tft_set_cursor(0, 0);
|
||||
|
||||
for (n = 0; n < TFT_PIXEL; n++) {
|
||||
TFT_RAM = color;
|
||||
}
|
||||
}
|
||||
@@ -355,24 +382,24 @@ static void tft_set_cursor(uint16_t xpos, uint16_t ypos)
|
||||
{
|
||||
// set cursor
|
||||
tft_write_reg(TFT_SSD1289_REG_4E, ypos);
|
||||
tft_write_reg(TFT_SSD1289_REG_4F, 319-xpos);
|
||||
tft_write_reg(TFT_SSD1289_REG_4F, 319 - xpos);
|
||||
TFT_REG = TFT_SSD1289_REG_22;
|
||||
}
|
||||
|
||||
// Enable / Disable the backlight
|
||||
static void tft_set_backlight(bool state)
|
||||
static void tft_set_backlight(bool state)
|
||||
{
|
||||
if(state){ // if state is true
|
||||
if (state) { // if state is true
|
||||
GPIOB->BSRRH = GPIO_Pin_0; // set the backlight output
|
||||
} else { // else
|
||||
GPIOB->BSRRL = GPIO_Pin_0; // reset the backlight
|
||||
GPIOB->BSRRL = GPIO_Pin_0; // reset the backlight
|
||||
}
|
||||
}
|
||||
|
||||
// Port operations on the screen RS PIN
|
||||
static void tft_reset(bool state)
|
||||
static void tft_reset(bool state)
|
||||
{
|
||||
if(state){ // if state is ture
|
||||
if (state) { // if state is ture
|
||||
GPIOB->BSRRH = GPIO_Pin_0; // Set the reset pin
|
||||
} else { // else
|
||||
GPIOB->BSRRL = GPIO_Pin_0; // reset the reset pin
|
||||
@@ -396,16 +423,16 @@ static uint16_t tft_read_reg(uint8_t reg_adr)
|
||||
// This sets a window for current draw functions
|
||||
static void tft_set_window(uint16_t xstart, uint16_t ystart, uint16_t xend, uint16_t yend)
|
||||
{
|
||||
uint16_t start,end;
|
||||
uint16_t start, end;
|
||||
uint16_t ystart_end;
|
||||
|
||||
start = (ystart & 0x00FF); // Start adress of the window
|
||||
end = ((yend & 0x00FF) << 8); // End adress of the window
|
||||
ystart_end = (start | end); // Calculate y endpoint
|
||||
ystart_end = (start | end); // Calculate y endpoint
|
||||
|
||||
tft_write_reg(TFT_SSD1289_REG_44, ystart_end); // Send y size
|
||||
tft_write_reg(TFT_SSD1289_REG_45, 319-xend); // Send x start
|
||||
tft_write_reg(TFT_SSD1289_REG_46, 319-xstart); // Send x end
|
||||
tft_write_reg(TFT_SSD1289_REG_45, 319 - xend); // Send x start
|
||||
tft_write_reg(TFT_SSD1289_REG_46, 319 - xstart); // Send x end
|
||||
}
|
||||
|
||||
// Reset a Window
|
||||
@@ -422,79 +449,64 @@ void tft_reset_window()
|
||||
*/
|
||||
|
||||
// Draw a line on the given coordinates
|
||||
void ll_tft_draw_line(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t color)
|
||||
void ll_tft_draw_line(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t color)
|
||||
{
|
||||
if(abs(x2-x1) > abs(y2-y1)) //line has more distance in x than y => iterate over x distance
|
||||
{
|
||||
if (abs(x2 - x1) > abs(y2 - y1)) { //line has more distance in x than y => iterate over x distance
|
||||
//Without floating point!
|
||||
int deltax = ((int)x2-(int)x1);
|
||||
int deltay = ((int)y2-(int)y1)<<1;
|
||||
int deltax = ((int)x2 - (int)x1);
|
||||
int deltay = ((int)y2 - (int)y1) << 1;
|
||||
int x = 0;
|
||||
if (x1>x2)
|
||||
{
|
||||
do
|
||||
{
|
||||
tft_set_cursor(x1+x,y1+ (((long)deltay*(long)x/deltax+1)>>1));
|
||||
|
||||
if (x1 > x2) {
|
||||
do {
|
||||
tft_set_cursor(x1 + x, y1 + (((long)deltay * (long)x / deltax + 1) >> 1));
|
||||
TFT_RAM = color;
|
||||
}
|
||||
while(x--!=deltax);
|
||||
} while (x-- != deltax);
|
||||
} else {
|
||||
do {
|
||||
tft_set_cursor(x1 + x, y1 + (((long)deltay * (long)x / deltax + 1) >> 1));
|
||||
TFT_RAM = color;
|
||||
} while (x++ != deltax);
|
||||
}
|
||||
else
|
||||
{
|
||||
do
|
||||
{
|
||||
tft_set_cursor(x1+x,y1+ (((long)deltay*(long)x/deltax+1)>>1));
|
||||
} else { // => iterate over y distance
|
||||
int deltax = ((int)x2 - (int)x1) << 1;
|
||||
int deltay = ((int)y2 - (int)y1);
|
||||
int y = 0;
|
||||
|
||||
if (y1 > y2) {
|
||||
do {
|
||||
tft_set_cursor(x1 + (((long)deltax * (long)y / deltay + 1) >> 1), y1 + y);
|
||||
TFT_RAM = color;
|
||||
}
|
||||
while(x++!=deltax);
|
||||
} while (y-- != deltay);
|
||||
} else {
|
||||
do {
|
||||
tft_set_cursor(x1 + (((long)deltax * (long)y / deltay + 1) >> 1), y1 + y);
|
||||
TFT_RAM = color;
|
||||
} while (y++ != deltay);
|
||||
}
|
||||
}
|
||||
else // => iterate over y distance
|
||||
{
|
||||
int deltax = ((int)x2-(int)x1)<<1;
|
||||
int deltay = ((int)y2-(int)y1);
|
||||
int y = 0;
|
||||
if (y1>y2)
|
||||
{
|
||||
do
|
||||
{
|
||||
tft_set_cursor(x1+ (((long)deltax*(long)y/deltay+1)>>1),y1+ y);
|
||||
TFT_RAM = color;
|
||||
}
|
||||
while(y--!=deltay);
|
||||
}
|
||||
else
|
||||
{
|
||||
do
|
||||
{
|
||||
tft_set_cursor(x1+ (((long)deltax*(long)y/deltay+1)>>1),y1+ y);
|
||||
TFT_RAM = color;
|
||||
}
|
||||
while(y++!=deltay);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Draw a single pixel on (x,y) with the given color
|
||||
void ll_tft_draw_pixel(uint16_t x,uint16_t y,uint16_t color)
|
||||
void ll_tft_draw_pixel(uint16_t x, uint16_t y, uint16_t color)
|
||||
{
|
||||
tft_set_cursor(x,y); // Set the cursor position
|
||||
tft_set_cursor(x, y); // Set the cursor position
|
||||
TFT_RAM = color; // Draw the pixel
|
||||
}
|
||||
|
||||
// Draw a rectangle at the given coordinates with the given color
|
||||
void ll_tft_draw_rectangle(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t color)
|
||||
void ll_tft_draw_rectangle(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t color)
|
||||
{
|
||||
unsigned int tmp;
|
||||
unsigned int i;
|
||||
|
||||
if(x1 > x2){
|
||||
if (x1 > x2) {
|
||||
tmp = x1;
|
||||
x1 = x2;
|
||||
x2 = tmp;
|
||||
}
|
||||
|
||||
if(y1 > y2){
|
||||
if (y1 > y2) {
|
||||
tmp = y1;
|
||||
y1 = y2;
|
||||
y2 = tmp;
|
||||
@@ -503,13 +515,20 @@ void ll_tft_draw_rectangle(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, u
|
||||
i = x1;
|
||||
//Drawing the two horizontal lines
|
||||
tft_set_cursor(x1, y1);
|
||||
while(i++ != x2) TFT_RAM = color;
|
||||
tft_set_cursor(x1,y2);
|
||||
while(i-- != x1) TFT_RAM = color;
|
||||
|
||||
|
||||
|
||||
while (i++ != x2) {
|
||||
TFT_RAM = color;
|
||||
}
|
||||
|
||||
tft_set_cursor(x1, y2);
|
||||
|
||||
while (i-- != x1) {
|
||||
TFT_RAM = color;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
//uncommented because tft_write_reg seems to fail sometimes so it's safer to use draw line instead (below)
|
||||
//uncommented because tft_write_reg seems to fail sometimes so it's safer to use draw line instead (below)
|
||||
i = y1;
|
||||
tft_write_reg(0x11,0x6030); // Change adresspointer direction
|
||||
tft_set_cursor(x2, y1);
|
||||
@@ -518,42 +537,42 @@ void ll_tft_draw_rectangle(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, u
|
||||
while(i-- != y1) TFT_RAM = color;
|
||||
tft_write_reg(0x11,0x6018); // Set adresspointer direction normal again
|
||||
*/
|
||||
tft_draw_line(x1,y1,x1,y2,color);
|
||||
tft_draw_line(x2,y1,x2,y2,color);
|
||||
|
||||
tft_draw_line(x1, y1, x1, y2, color);
|
||||
tft_draw_line(x2, y1, x2, y2, color);
|
||||
|
||||
}
|
||||
|
||||
// Draw a filled rectangle at the given coordinates with the given color
|
||||
void ll_tft_fill_rectangle(uint16_t x1,uint16_t y1,uint16_t x2,uint16_t y2, uint16_t color)
|
||||
void ll_tft_fill_rectangle(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t color)
|
||||
{
|
||||
uint16_t area;
|
||||
uint32_t n;
|
||||
unsigned int tmp;
|
||||
|
||||
if(x1 > x2){
|
||||
if (x1 > x2) {
|
||||
tmp = x1;
|
||||
x1 = x2;
|
||||
x2 = tmp;
|
||||
}
|
||||
|
||||
if(y1 > y2){
|
||||
if (y1 > y2) {
|
||||
tmp = y1;
|
||||
y1 = y2;
|
||||
y2 = tmp;
|
||||
}
|
||||
}
|
||||
|
||||
// set window
|
||||
// set window
|
||||
tft_set_window(x1, y1, x2, y2);
|
||||
tft_set_cursor(x1, y1);
|
||||
|
||||
// calculate area
|
||||
area = (x2 - x1 + 1) * (y2 - y1 + 1);
|
||||
area = (x2 - x1 + 1) * (y2 - y1 + 1);
|
||||
|
||||
// fill area
|
||||
for(n = 0; n < area; n++) {
|
||||
for (n = 0; n < area; n++) {
|
||||
TFT_RAM = color;
|
||||
}
|
||||
|
||||
|
||||
tft_reset_window();
|
||||
}
|
||||
|
||||
@@ -571,77 +590,82 @@ void ll_tft_draw_circle(uint16_t x, uint16_t y, uint16_t r, uint16_t color)
|
||||
* ---------------------- font functions -----------------------------------------------------------
|
||||
*/
|
||||
|
||||
static const char *get_font(uint8_t font)
|
||||
static const char* get_font(uint8_t font)
|
||||
{
|
||||
switch(font){
|
||||
case 0: return small_font;
|
||||
case 1: return big_font;
|
||||
case 2: return seven_seg_num_font;
|
||||
switch (font) {
|
||||
case 0:
|
||||
return small_font;
|
||||
|
||||
case 1:
|
||||
return big_font;
|
||||
|
||||
case 2:
|
||||
return seven_seg_num_font;
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t ll_tft_num_fonts()
|
||||
uint8_t ll_tft_num_fonts()
|
||||
{
|
||||
return 3;
|
||||
return 3;
|
||||
}
|
||||
|
||||
uint8_t ll_tft_font_height(uint8_t fontnum)
|
||||
uint8_t ll_tft_font_height(uint8_t fontnum)
|
||||
{
|
||||
const char *font = get_font(fontnum);
|
||||
const char* font = get_font(fontnum);
|
||||
return (uint8_t) font[1];
|
||||
}
|
||||
|
||||
uint8_t ll_tft_font_width(uint8_t fontnum)
|
||||
uint8_t ll_tft_font_width(uint8_t fontnum)
|
||||
{
|
||||
const char *font = get_font(fontnum);
|
||||
const char* font = get_font(fontnum);
|
||||
return (uint8_t) font[0];
|
||||
}
|
||||
|
||||
void ll_tft_draw_char(uint16_t x, uint16_t y, uint16_t color, uint16_t bgcolor, uint8_t fontnum, char c)
|
||||
void ll_tft_draw_char(uint16_t x, uint16_t y, uint16_t color, uint16_t bgcolor, uint8_t fontnum, char c)
|
||||
{
|
||||
|
||||
const char *font = get_font(fontnum);
|
||||
const char* font = get_font(fontnum);
|
||||
unsigned char width = (uint8_t) font[0];
|
||||
unsigned char height = (uint8_t) font[1];
|
||||
unsigned char offset = (uint8_t) font[2];
|
||||
unsigned int ind = ((c-offset) * ((width / 8) * height)) + 4;
|
||||
unsigned int ind = ((c - offset) * ((width / 8) * height)) + 4;
|
||||
unsigned int cnt = 0;
|
||||
unsigned char bitm = 0;
|
||||
|
||||
bool bgIsTrans = (bgcolor == TRANSPARENT);
|
||||
unsigned char xadd=0;
|
||||
unsigned char yadd=0;
|
||||
unsigned char xadd = 0;
|
||||
unsigned char yadd = 0;
|
||||
|
||||
tft_set_window(x, y, x + width - 1, y + height - 1);
|
||||
tft_set_cursor(x, y);
|
||||
|
||||
for(cnt = (width / 8) * height; cnt > 0; cnt--){
|
||||
for(bitm = 0x80; bitm > 0; bitm >>= 1){
|
||||
if((font[ind]) & bitm){
|
||||
if(bgIsTrans) {
|
||||
tft_set_cursor(x+xadd,y+yadd);
|
||||
tft_set_cursor(x, y);
|
||||
|
||||
for (cnt = (width / 8) * height; cnt > 0; cnt--) {
|
||||
for (bitm = 0x80; bitm > 0; bitm >>= 1) {
|
||||
if ((font[ind]) & bitm) {
|
||||
if (bgIsTrans) {
|
||||
tft_set_cursor(x + xadd, y + yadd);
|
||||
}
|
||||
|
||||
TFT_RAM = color;
|
||||
|
||||
|
||||
} else {
|
||||
if(!bgIsTrans) {
|
||||
if (!bgIsTrans) {
|
||||
TFT_RAM = bgcolor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (bgIsTrans) {
|
||||
xadd++;
|
||||
|
||||
if (xadd == width) {
|
||||
xadd = 0;
|
||||
yadd++;
|
||||
}
|
||||
}
|
||||
|
||||
if(bgIsTrans)
|
||||
{
|
||||
xadd++;
|
||||
if(xadd==width)
|
||||
{
|
||||
xadd=0;
|
||||
yadd++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ind++;
|
||||
}
|
||||
|
||||
|
||||
tft_reset_window();
|
||||
}
|
||||
|
||||
@@ -1,3 +1,28 @@
|
||||
/**************************************************************************************************************************************
|
||||
* Project: discoverpixy
|
||||
* Website: https://github.com/t-moe/discoverpixy
|
||||
* Authors: Aaron Schmocker, Timo Lang
|
||||
* Institution: BFH Bern University of Applied Sciences
|
||||
* File: discovery/src/ll_touch.c
|
||||
*
|
||||
* Version History:
|
||||
* Date Autor Email SHA Changes
|
||||
* 2015-04-27 timolang@gmail.com 259d446 Added touch support to emulator. Implemented basic touch function.
|
||||
* 2015-05-12 aaron@duckpond.ch 3b2ef30 Added PID source code and Pinmap
|
||||
* 2015-05-12 aaron@duckpond.ch 5e374f4 Added datasheet and touch template
|
||||
* 2015-05-12 aaron@duckpond.ch aec62d4 Added datasheets, updated touchsupport.
|
||||
* 2015-05-13 aaron@duckpond.ch 1396d24 Working touchcontroller communication
|
||||
* 2015-05-28 aaron@duckpond.ch 5bda699 implemented functions to get x and y coordinates and a test function
|
||||
* 2015-05-28 aaron@duckpond.ch 9b1020c Working PENIRQ
|
||||
* 2015-05-28 aaron@duckpond.ch 30197bf recent changes
|
||||
* 2015-05-29 aaron@duckpond.ch 7d2d1a1 Implemented basic sampling and averaging of touch coordinates using timer7
|
||||
* 2015-06-01 aaron@duckpond.ch dff2e76 Touch recognition working
|
||||
* 2015-06-01 aaron@duckpond.ch caa7b5c Added IRQ for user button, fixed some touchproblems.
|
||||
* 2015-06-01 timolang@gmail.com eb573bc Finalized calibration. Fixed a bug in screen module.
|
||||
* 2015-06-03 timolang@gmail.com 74aa186 Made pixy_test screen working again. Had to disable pixy_service. Recalibrated initial touch values.
|
||||
*
|
||||
**************************************************************************************************************************************/
|
||||
|
||||
#include "ll_touch.h"
|
||||
#include "screen.h"
|
||||
#include "screen_calibrate.h"
|
||||
@@ -22,8 +47,8 @@
|
||||
/* Globals ----------------------------------------------------------- */
|
||||
volatile bool pen_state = false; // PenDown = True; PenUp = False;
|
||||
volatile bool tim_flag = false;
|
||||
volatile uint16_t x_samples[NSAMPLE-1];
|
||||
volatile uint16_t y_samples[NSAMPLE-1];
|
||||
volatile uint16_t x_samples[NSAMPLE - 1];
|
||||
volatile uint16_t y_samples[NSAMPLE - 1];
|
||||
volatile int i;
|
||||
|
||||
/* Prototypes -------------------------------------------------------- */
|
||||
@@ -42,11 +67,11 @@ static uint16_t avg_vals(volatile uint16_t samples[], uint16_t len)
|
||||
uint16_t j = 0;
|
||||
uint32_t tmp = 0;
|
||||
|
||||
for(j = 0; j < len; j++){
|
||||
tmp += samples[j];
|
||||
for (j = 0; j < len; j++) {
|
||||
tmp += samples[j];
|
||||
}
|
||||
|
||||
return (uint16_t)(tmp/len);
|
||||
return (uint16_t)(tmp / len);
|
||||
}
|
||||
|
||||
static uint16_t touch_get_x_coord()
|
||||
@@ -54,8 +79,8 @@ static uint16_t touch_get_x_coord()
|
||||
uint16_t buf_x = 0;
|
||||
CLEAR_CS; // clear chipselect
|
||||
touch_send(REQ_X_COORD); // request x coordinate
|
||||
|
||||
buf_x = ((uint16_t) touch_send(REQ_1_DATAB)) << 5;
|
||||
|
||||
buf_x = ((uint16_t) touch_send(REQ_1_DATAB)) << 5;
|
||||
buf_x |= touch_send(REQ_1_DATAB) >> 3;
|
||||
|
||||
SET_CS; // set chipselect
|
||||
@@ -69,7 +94,7 @@ static uint16_t touch_get_y_coord()
|
||||
|
||||
CLEAR_CS; // clear chipselect
|
||||
touch_send(REQ_Y_COORD); // request y coordinate
|
||||
|
||||
|
||||
buf_y = ((uint16_t) touch_send(REQ_1_DATAB)) << 5;
|
||||
buf_y |= touch_send(REQ_1_DATAB) >> 3;
|
||||
|
||||
@@ -80,10 +105,13 @@ static uint16_t touch_get_y_coord()
|
||||
|
||||
static uint8_t touch_send(uint8_t dat)
|
||||
{
|
||||
SPI_I2S_SendData(SPI2, dat);
|
||||
while(SPI_I2S_GetFlagStatus(SPI2, SPI_I2S_FLAG_BSY) != RESET);
|
||||
while(SPI_I2S_GetFlagStatus(SPI2, SPI_I2S_FLAG_RXNE) == RESET);
|
||||
return SPI_I2S_ReceiveData(SPI2);
|
||||
SPI_I2S_SendData(SPI2, dat);
|
||||
|
||||
while (SPI_I2S_GetFlagStatus(SPI2, SPI_I2S_FLAG_BSY) != RESET);
|
||||
|
||||
while (SPI_I2S_GetFlagStatus(SPI2, SPI_I2S_FLAG_RXNE) == RESET);
|
||||
|
||||
return SPI_I2S_ReceiveData(SPI2);
|
||||
}
|
||||
|
||||
void touch_test(uint16_t x, uint16_t y)
|
||||
@@ -100,12 +128,12 @@ void touch_test(uint16_t x, uint16_t y)
|
||||
tft_print_line(10, 30, WHITE, TRANSPARENT, 0, (const char*)ys);
|
||||
}
|
||||
|
||||
bool ll_touch_init()
|
||||
bool ll_touch_init()
|
||||
{
|
||||
touch_set_value_convert_mode(true); //Tell the touch module that we need converted values and display calibration
|
||||
touch_set_calibration_values(526, 2922, 588, 2736); //set calibration values (copied from memory using the debugger)
|
||||
|
||||
|
||||
|
||||
|
||||
//We have a ADS7843 Touch controller
|
||||
//Datasheet: http://www.ti.com/lit/ds/symlink/ads7843.pdf
|
||||
|
||||
@@ -124,13 +152,13 @@ bool ll_touch_init()
|
||||
GPIO_SPI2_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
|
||||
GPIO_SPI2_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
|
||||
GPIO_Init(GPIOB, &GPIO_SPI2_InitStructure);
|
||||
|
||||
|
||||
SET_CS; // set chip select
|
||||
|
||||
/* fill gpio init struct and init gpio */
|
||||
GPIO_StructInit(&GPIO_SPI2_InitStructure);
|
||||
GPIO_SPI2_InitStructure.GPIO_Pin = GPIO_Pin_9; // 9 = SPI2_CS
|
||||
GPIO_SPI2_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
|
||||
GPIO_SPI2_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
|
||||
GPIO_SPI2_InitStructure.GPIO_OType = GPIO_OType_PP;
|
||||
GPIO_SPI2_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
|
||||
GPIO_Init(GPIOB, &GPIO_SPI2_InitStructure);
|
||||
@@ -139,7 +167,7 @@ bool ll_touch_init()
|
||||
GPIO_PinAFConfig(GPIOB, GPIO_PinSource10, GPIO_AF_SPI2);
|
||||
GPIO_PinAFConfig(GPIOB, GPIO_PinSource14, GPIO_AF_SPI2);
|
||||
GPIO_PinAFConfig(GPIOB, GPIO_PinSource15, GPIO_AF_SPI2);
|
||||
|
||||
|
||||
SPI_I2S_DeInit(SPI2); // Clear spi initialisation
|
||||
|
||||
/* fill spi init structure */
|
||||
@@ -184,9 +212,9 @@ static void init_exti()
|
||||
gpio.GPIO_PuPd = GPIO_PuPd_UP;
|
||||
gpio.GPIO_Speed = GPIO_Speed_100MHz;
|
||||
GPIO_Init(GPIOC, &gpio);
|
||||
|
||||
|
||||
SYSCFG_EXTILineConfig(EXTI_PortSourceGPIOC, EXTI_PinSource1); // Bind Exti_line1 to PC1
|
||||
|
||||
|
||||
/* Set GPIOA0 as input */
|
||||
gpio.GPIO_Mode = GPIO_Mode_IN;
|
||||
gpio.GPIO_OType = GPIO_OType_OD;
|
||||
@@ -201,10 +229,10 @@ static void init_exti()
|
||||
EXTI_StructInit(&exti);
|
||||
exti.EXTI_Line = EXTI_Line1;
|
||||
exti.EXTI_Mode = EXTI_Mode_Interrupt;
|
||||
exti.EXTI_Trigger = EXTI_Trigger_Falling; // Trigger on falling edge (PENIRQ)
|
||||
exti.EXTI_Trigger = EXTI_Trigger_Falling; // Trigger on falling edge (PENIRQ)
|
||||
exti.EXTI_LineCmd = ENABLE;
|
||||
EXTI_Init(&exti);
|
||||
|
||||
|
||||
/* EXTI on PA0 */
|
||||
EXTI_StructInit(&exti);
|
||||
exti.EXTI_Line = EXTI_Line0;
|
||||
@@ -219,7 +247,7 @@ static void init_exti()
|
||||
nvic.NVIC_IRQChannelSubPriority = 0x00; // Set sub priority
|
||||
nvic.NVIC_IRQChannelCmd = ENABLE; // Enable interrupt
|
||||
NVIC_Init(&nvic); // Config NVIC
|
||||
|
||||
|
||||
/* Add IRQ vector to NVIC */
|
||||
nvic.NVIC_IRQChannel = EXTI0_IRQn; // PA0 -> EXTI_Line0 -> EXTI0_IRQn vector
|
||||
nvic.NVIC_IRQChannelPreemptionPriority = 0x00; // Set priority
|
||||
@@ -232,7 +260,7 @@ static void init_timer()
|
||||
{
|
||||
TIM_TimeBaseInitTypeDef t;
|
||||
const int APB1_CLK = 42E6;
|
||||
|
||||
|
||||
RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM7, ENABLE); // Enable clock for TIM6
|
||||
|
||||
/* Timer 7 configuration */
|
||||
@@ -263,16 +291,16 @@ void EXTI1_IRQHandler()
|
||||
|
||||
void TIM7_IRQHandler()
|
||||
{
|
||||
if(TIM_GetFlagStatus(TIM7, TIM_IT_Update) == SET){ // Make sure the interrupt flag is set
|
||||
|
||||
if (TIM_GetFlagStatus(TIM7, TIM_IT_Update) == SET) { // Make sure the interrupt flag is set
|
||||
|
||||
TIM_Cmd(TIM7, DISABLE); // Disable the timer during the measuring
|
||||
|
||||
if(PENIRQ){ // Only do this if the PENIRQ line is still low
|
||||
for(i = 0; i < (NSAMPLE-1); i++){ // Sample 16 times
|
||||
if (PENIRQ) { // Only do this if the PENIRQ line is still low
|
||||
for (i = 0; i < (NSAMPLE - 1); i++) { // Sample 16 times
|
||||
x_samples[i] = touch_get_x_coord();
|
||||
y_samples[i] = touch_get_y_coord();
|
||||
}
|
||||
|
||||
|
||||
touch_add_raw_event(avg_vals(x_samples, NSAMPLE), avg_vals(y_samples, NSAMPLE), TOUCH_DOWN); // Update position
|
||||
//tft_draw_pixel(avg_vals(x_samples, NSAMPLE), avg_vals(y_samples, NSAMPLE), RED);
|
||||
TIM_Cmd(TIM7, ENABLE); // Reenable timer
|
||||
@@ -281,8 +309,8 @@ void TIM7_IRQHandler()
|
||||
touch_add_raw_event(avg_vals(x_samples, NSAMPLE), avg_vals(y_samples, NSAMPLE), TOUCH_UP); // Update position one last time
|
||||
//tft_draw_pixel(avg_vals(x_samples, NSAMPLE), avg_vals(y_samples, NSAMPLE), RED);
|
||||
TIM_Cmd(TIM7, DISABLE); // Disable timer
|
||||
}
|
||||
}
|
||||
|
||||
TIM_ClearFlag(TIM7, TIM_IT_Update); // Clear timer interrupt flag
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,27 @@
|
||||
#include "app.h"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
app_init();
|
||||
|
||||
while (1)
|
||||
{
|
||||
app_process();
|
||||
}
|
||||
|
||||
}
|
||||
/**************************************************************************************************************************************
|
||||
* Project: discoverpixy
|
||||
* Website: https://github.com/t-moe/discoverpixy
|
||||
* Authors: Aaron Schmocker, Timo Lang
|
||||
* Institution: BFH Bern University of Applied Sciences
|
||||
* File: discovery/src/main.c
|
||||
*
|
||||
* Version History:
|
||||
* Date Autor Email SHA Changes
|
||||
* 2015-04-03 timolang@gmail.com 21dd1e2 Starting to integrate usb branch. Optimized Makefiles
|
||||
* 2015-04-03 timolang@gmail.com 9a1d12a Refactored discovery, to use new project structure. Almost ready.
|
||||
* 2015-04-25 timolang@gmail.com 416883c Pixy&Usb work with the new folder structure now.
|
||||
* 2015-04-25 timolang@gmail.com 3d1e4b2 Simplified code a bit. Emulator does not work stable when replugging pixy.
|
||||
*
|
||||
**************************************************************************************************************************************/
|
||||
|
||||
#include "app.h"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
app_init();
|
||||
|
||||
while (1) {
|
||||
app_process();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/**************************************************************************************************************************************
|
||||
* Project: discoverpixy
|
||||
* Website: https://github.com/t-moe/discoverpixy
|
||||
* Authors: Aaron Schmocker, Timo Lang
|
||||
* Institution: BFH Bern University of Applied Sciences
|
||||
* File: discovery/src/newlib_stubs.c
|
||||
*
|
||||
* Version History:
|
||||
* Date Autor Email SHA Changes
|
||||
* 2015-04-03 timolang@gmail.com 21dd1e2 Starting to integrate usb branch. Optimized Makefiles
|
||||
*
|
||||
**************************************************************************************************************************************/
|
||||
|
||||
/*
|
||||
* newlib_stubs.c
|
||||
*
|
||||
@@ -32,26 +45,30 @@ extern int errno;
|
||||
A pointer to a list of environment variables and their values.
|
||||
For a minimal environment, this empty list is adequate:
|
||||
*/
|
||||
char *__env[1] = { 0 };
|
||||
char **environ = __env;
|
||||
char* __env[1] = { 0 };
|
||||
char** environ = __env;
|
||||
|
||||
int _write(int file, char *ptr, int len);
|
||||
int _write(int file, char* ptr, int len);
|
||||
|
||||
void _exit(int status) {
|
||||
void _exit(int status)
|
||||
{
|
||||
_write(1, "exit", 4);
|
||||
|
||||
while (1) {
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
int _close(int file) {
|
||||
int _close(int file)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
/*
|
||||
execve
|
||||
Transfer control to a new process. Minimal implementation (for a system without processes):
|
||||
*/
|
||||
int _execve(char *name, char **argv, char **env) {
|
||||
int _execve(char* name, char** argv, char** env)
|
||||
{
|
||||
errno = ENOMEM;
|
||||
return -1;
|
||||
}
|
||||
@@ -60,7 +77,8 @@ int _execve(char *name, char **argv, char **env) {
|
||||
Create a new process. Minimal implementation (for a system without processes):
|
||||
*/
|
||||
|
||||
int _fork() {
|
||||
int _fork()
|
||||
{
|
||||
errno = EAGAIN;
|
||||
return -1;
|
||||
}
|
||||
@@ -70,7 +88,8 @@ int _fork() {
|
||||
all files are regarded as character special devices.
|
||||
The `sys/stat.h' header file required is distributed in the `include' subdirectory for this C library.
|
||||
*/
|
||||
int _fstat(int file, struct stat *st) {
|
||||
int _fstat(int file, struct stat* st)
|
||||
{
|
||||
st->st_mode = S_IFCHR;
|
||||
return 0;
|
||||
}
|
||||
@@ -80,7 +99,8 @@ int _fstat(int file, struct stat *st) {
|
||||
Process-ID; this is sometimes used to generate strings unlikely to conflict with other processes. Minimal implementation, for a system without processes:
|
||||
*/
|
||||
|
||||
int _getpid() {
|
||||
int _getpid()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -88,12 +108,14 @@ int _getpid() {
|
||||
isatty
|
||||
Query whether output stream is a terminal. For consistency with the other minimal implementations,
|
||||
*/
|
||||
int _isatty(int file) {
|
||||
switch (file){
|
||||
int _isatty(int file)
|
||||
{
|
||||
switch (file) {
|
||||
case STDOUT_FILENO:
|
||||
case STDERR_FILENO:
|
||||
case STDIN_FILENO:
|
||||
return 1;
|
||||
|
||||
default:
|
||||
//errno = ENOTTY;
|
||||
errno = EBADF;
|
||||
@@ -106,7 +128,8 @@ int _isatty(int file) {
|
||||
kill
|
||||
Send a signal. Minimal implementation:
|
||||
*/
|
||||
int _kill(int pid, int sig) {
|
||||
int _kill(int pid, int sig)
|
||||
{
|
||||
errno = EINVAL;
|
||||
return (-1);
|
||||
}
|
||||
@@ -116,7 +139,8 @@ int _kill(int pid, int sig) {
|
||||
Establish a new name for an existing file. Minimal implementation:
|
||||
*/
|
||||
|
||||
int _link(char *old, char *new) {
|
||||
int _link(char* old, char* new)
|
||||
{
|
||||
errno = EMLINK;
|
||||
return -1;
|
||||
}
|
||||
@@ -125,7 +149,8 @@ int _link(char *old, char *new) {
|
||||
lseek
|
||||
Set position in a file. Minimal implementation:
|
||||
*/
|
||||
int _lseek(int file, int ptr, int dir) {
|
||||
int _lseek(int file, int ptr, int dir)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -134,25 +159,27 @@ int _lseek(int file, int ptr, int dir) {
|
||||
Increase program data space.
|
||||
Malloc and related functions depend on this
|
||||
*/
|
||||
caddr_t _sbrk(int incr) {
|
||||
caddr_t _sbrk(int incr)
|
||||
{
|
||||
|
||||
extern char _ebss; // Defined by the linker
|
||||
static char *heap_end;
|
||||
char *prev_heap_end;
|
||||
static char* heap_end;
|
||||
char* prev_heap_end;
|
||||
|
||||
if (heap_end == 0) {
|
||||
heap_end = &_ebss;
|
||||
}
|
||||
|
||||
prev_heap_end = heap_end;
|
||||
|
||||
char * stack = (char*) __get_MSP();
|
||||
if (heap_end + incr > stack)
|
||||
{
|
||||
_write (STDERR_FILENO, "Heap and stack collision\n", 25);
|
||||
errno = ENOMEM;
|
||||
return (caddr_t) -1;
|
||||
//abort ();
|
||||
}
|
||||
char* stack = (char*) __get_MSP();
|
||||
|
||||
if (heap_end + incr > stack) {
|
||||
_write(STDERR_FILENO, "Heap and stack collision\n", 25);
|
||||
errno = ENOMEM;
|
||||
return (caddr_t) - 1;
|
||||
//abort ();
|
||||
}
|
||||
|
||||
heap_end += incr;
|
||||
return (caddr_t) prev_heap_end;
|
||||
@@ -161,10 +188,10 @@ char * stack = (char*) __get_MSP();
|
||||
|
||||
|
||||
|
||||
int _open(char *path, int flags, ...)
|
||||
int _open(char* path, int flags, ...)
|
||||
{
|
||||
/* Pretend like we always fail */
|
||||
return -1;
|
||||
/* Pretend like we always fail */
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -174,30 +201,33 @@ int _open(char *path, int flags, ...)
|
||||
*/
|
||||
|
||||
|
||||
int _read(int file, char *ptr, int len) {
|
||||
int _read(int file, char* ptr, int len)
|
||||
{
|
||||
int n;
|
||||
int num = 0;
|
||||
|
||||
switch (file) {
|
||||
/*case STDIN_FILENO:
|
||||
for (n = 0; n < len; n++) {
|
||||
#if STDIN_USART == 1
|
||||
while ((USART1->SR & USART_FLAG_RXNE) == (uint16_t)RESET) {}
|
||||
char c = (char)(USART1->DR & (uint16_t)0x01FF);
|
||||
#elif STDIN_USART == 2
|
||||
while ((USART2->SR & USART_FLAG_RXNE) == (uint16_t) RESET) {}
|
||||
char c = (char) (USART2->DR & (uint16_t) 0x01FF);
|
||||
#elif STDIN_USART == 3
|
||||
while ((USART3->SR & USART_FLAG_RXNE) == (uint16_t)RESET) {}
|
||||
char c = (char)(USART3->DR & (uint16_t)0x01FF);
|
||||
#endif
|
||||
*ptr++ = c;
|
||||
num++;
|
||||
}
|
||||
break;
|
||||
default:*/
|
||||
/*case STDIN_FILENO:
|
||||
for (n = 0; n < len; n++) {
|
||||
#if STDIN_USART == 1
|
||||
while ((USART1->SR & USART_FLAG_RXNE) == (uint16_t)RESET) {}
|
||||
char c = (char)(USART1->DR & (uint16_t)0x01FF);
|
||||
#elif STDIN_USART == 2
|
||||
while ((USART2->SR & USART_FLAG_RXNE) == (uint16_t) RESET) {}
|
||||
char c = (char) (USART2->DR & (uint16_t) 0x01FF);
|
||||
#elif STDIN_USART == 3
|
||||
while ((USART3->SR & USART_FLAG_RXNE) == (uint16_t)RESET) {}
|
||||
char c = (char)(USART3->DR & (uint16_t)0x01FF);
|
||||
#endif
|
||||
*ptr++ = c;
|
||||
num++;
|
||||
}
|
||||
break;
|
||||
default:*/
|
||||
errno = EBADF;
|
||||
return -1;
|
||||
}
|
||||
|
||||
return num;
|
||||
}
|
||||
|
||||
@@ -207,7 +237,8 @@ int _read(int file, char *ptr, int len) {
|
||||
int _EXFUN(stat,( const char *__path, struct stat *__sbuf ));
|
||||
*/
|
||||
|
||||
int _stat(const char *filepath, struct stat *st) {
|
||||
int _stat(const char* filepath, struct stat* st)
|
||||
{
|
||||
st->st_mode = S_IFCHR;
|
||||
return 0;
|
||||
}
|
||||
@@ -217,7 +248,8 @@ int _stat(const char *filepath, struct stat *st) {
|
||||
Timing information for current process. Minimal implementation:
|
||||
*/
|
||||
|
||||
clock_t _times(struct tms *buf) {
|
||||
clock_t _times(struct tms* buf)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -225,7 +257,8 @@ clock_t _times(struct tms *buf) {
|
||||
unlink
|
||||
Remove a file's directory entry. Minimal implementation:
|
||||
*/
|
||||
int _unlink(char *name) {
|
||||
int _unlink(char* name)
|
||||
{
|
||||
errno = ENOENT;
|
||||
return -1;
|
||||
}
|
||||
@@ -234,7 +267,8 @@ int _unlink(char *name) {
|
||||
wait
|
||||
Wait for a child process. Minimal implementation:
|
||||
*/
|
||||
int _wait(int *status) {
|
||||
int _wait(int* status)
|
||||
{
|
||||
errno = ECHILD;
|
||||
return -1;
|
||||
}
|
||||
@@ -244,42 +278,61 @@ int _wait(int *status) {
|
||||
Write a character to a file. `libc' subroutines will use this system routine for output to all files, including stdout
|
||||
Returns -1 on error or number of bytes sent
|
||||
*/
|
||||
int _write(int file, char *ptr, int len) {
|
||||
int _write(int file, char* ptr, int len)
|
||||
{
|
||||
int n;
|
||||
|
||||
switch (file) {
|
||||
case STDOUT_FILENO: /*stdout*/
|
||||
for (n = 0; n < len; n++) {
|
||||
#if STDOUT_USART == 1
|
||||
|
||||
while ((USART1->SR & USART_FLAG_TC) == (uint16_t)RESET) {}
|
||||
|
||||
USART1->DR = (*ptr++ & (uint16_t)0x01FF);
|
||||
#elif STDOUT_USART == 2
|
||||
|
||||
while ((USART2->SR & USART_FLAG_TC) == (uint16_t) RESET) {
|
||||
}
|
||||
|
||||
USART2->DR = (*ptr++ & (uint16_t) 0x01FF);
|
||||
#elif STDOUT_USART == 3
|
||||
|
||||
while ((USART3->SR & USART_FLAG_TC) == (uint16_t)RESET) {}
|
||||
|
||||
USART3->DR = (*ptr++ & (uint16_t)0x01FF);
|
||||
#endif
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case STDERR_FILENO: /* stderr */
|
||||
for (n = 0; n < len; n++) {
|
||||
#if STDERR_USART == 1
|
||||
|
||||
while ((USART1->SR & USART_FLAG_TC) == (uint16_t)RESET) {}
|
||||
|
||||
USART1->DR = (*ptr++ & (uint16_t)0x01FF);
|
||||
#elif STDERR_USART == 2
|
||||
|
||||
while ((USART2->SR & USART_FLAG_TC) == (uint16_t) RESET) {
|
||||
}
|
||||
|
||||
USART2->DR = (*ptr++ & (uint16_t) 0x01FF);
|
||||
#elif STDERR_USART == 3
|
||||
|
||||
while ((USART3->SR & USART_FLAG_TC) == (uint16_t)RESET) {}
|
||||
|
||||
USART3->DR = (*ptr++ & (uint16_t)0x01FF);
|
||||
#endif
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
errno = EBADF;
|
||||
return -1;
|
||||
}
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,460 +1,468 @@
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "usb_bsp.h"
|
||||
#include "stm32f4_discovery.h"
|
||||
|
||||
#define USE_ACCURATE_TIME
|
||||
#define TIM_MSEC_DELAY 0x01
|
||||
#define TIM_USEC_DELAY 0x02
|
||||
#define HOST_OVRCURR_PORT GPIOD
|
||||
#define HOST_OVRCURR_LINE GPIO_Pin_5
|
||||
#define HOST_OVRCURR_PORT_SOURCE GPIO_PortSourceGPIOD
|
||||
#define HOST_OVRCURR_PIN_SOURCE GPIO_PinSourceD
|
||||
#define HOST_OVRCURR_PORT_RCC RCC_APB2Periph_GPIOD
|
||||
#define HOST_OVRCURR_EXTI_LINE EXTI_Line5
|
||||
#define HOST_OVRCURR_IRQn EXTI9_5_IRQn
|
||||
|
||||
|
||||
#define HOST_POWERSW_PORT_RCC RCC_AHB1Periph_GPIOC
|
||||
#define HOST_POWERSW_PORT GPIOC
|
||||
#define HOST_POWERSW_VBUS GPIO_Pin_0
|
||||
|
||||
/* Private macros ------------------------------------------------------------*/
|
||||
/* Private variables ---------------------------------------------------------*/
|
||||
ErrorStatus HSEStartUpStatus;
|
||||
#ifdef USE_ACCURATE_TIME
|
||||
__IO uint32_t BSP_delay = 0;
|
||||
#endif
|
||||
|
||||
/* Private function prototypes -----------------------------------------------*/
|
||||
/* Private functions ---------------------------------------------------------*/
|
||||
#ifdef USE_ACCURATE_TIME
|
||||
static void BSP_SetTime(uint8_t Unit);
|
||||
static void BSP_Delay(uint32_t nTime, uint8_t Unit);
|
||||
static void USB_OTG_BSP_TimeInit ( void );
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief BSP_Init
|
||||
* board user initializations
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
void BSP_Init(void)
|
||||
{
|
||||
/* Configure PA0 pin: User Key pin */
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief USB_OTG_BSP_Init
|
||||
* Initilizes BSP configurations
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
void USB_OTG_BSP_Init(USB_OTG_CORE_HANDLE *pdev)
|
||||
{
|
||||
/* Note: On STM32F4-Discovery board only USB OTG FS core is supported. */
|
||||
|
||||
GPIO_InitTypeDef GPIO_InitStructure;
|
||||
#ifdef USE_USB_OTG_FS
|
||||
|
||||
RCC_AHB1PeriphClockCmd( RCC_AHB1Periph_GPIOA , ENABLE);
|
||||
|
||||
/* Configure SOF VBUS ID DM DP Pins */
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9 |
|
||||
GPIO_Pin_11 |
|
||||
GPIO_Pin_12;
|
||||
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
|
||||
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
|
||||
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL ;
|
||||
GPIO_Init(GPIOA, &GPIO_InitStructure);
|
||||
|
||||
GPIO_PinAFConfig(GPIOA,GPIO_PinSource9,GPIO_AF_OTG1_FS) ;
|
||||
GPIO_PinAFConfig(GPIOA,GPIO_PinSource11,GPIO_AF_OTG1_FS) ;
|
||||
GPIO_PinAFConfig(GPIOA,GPIO_PinSource12,GPIO_AF_OTG1_FS) ;
|
||||
|
||||
/* this for ID line debug */
|
||||
|
||||
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10;
|
||||
GPIO_InitStructure.GPIO_OType = GPIO_OType_OD;
|
||||
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP ;
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
|
||||
GPIO_Init(GPIOA, &GPIO_InitStructure);
|
||||
GPIO_PinAFConfig(GPIOA,GPIO_PinSource10,GPIO_AF_OTG1_FS) ;
|
||||
|
||||
|
||||
RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG, ENABLE);
|
||||
RCC_AHB2PeriphClockCmd(RCC_AHB2Periph_OTG_FS, ENABLE) ;
|
||||
#else // USE_USB_OTG_HS
|
||||
|
||||
#ifdef USE_ULPI_PHY // ULPI
|
||||
RCC_AHB1PeriphClockCmd( RCC_AHB1Periph_GPIOA | RCC_AHB1Periph_GPIOB |
|
||||
RCC_AHB1Periph_GPIOC | RCC_AHB1Periph_GPIOH |
|
||||
RCC_AHB1Periph_GPIOI, ENABLE);
|
||||
|
||||
|
||||
GPIO_PinAFConfig(GPIOA,GPIO_PinSource3, GPIO_AF_OTG2_HS) ; // D0
|
||||
GPIO_PinAFConfig(GPIOA,GPIO_PinSource5, GPIO_AF_OTG2_HS) ; // CLK
|
||||
GPIO_PinAFConfig(GPIOB,GPIO_PinSource0, GPIO_AF_OTG2_HS) ; // D1
|
||||
GPIO_PinAFConfig(GPIOB,GPIO_PinSource1, GPIO_AF_OTG2_HS) ; // D2
|
||||
GPIO_PinAFConfig(GPIOB,GPIO_PinSource5, GPIO_AF_OTG2_HS) ; // D7
|
||||
GPIO_PinAFConfig(GPIOB,GPIO_PinSource10,GPIO_AF_OTG2_HS) ; // D3
|
||||
GPIO_PinAFConfig(GPIOB,GPIO_PinSource11,GPIO_AF_OTG2_HS) ; // D4
|
||||
GPIO_PinAFConfig(GPIOB,GPIO_PinSource12,GPIO_AF_OTG2_HS) ; // D5
|
||||
GPIO_PinAFConfig(GPIOB,GPIO_PinSource13,GPIO_AF_OTG2_HS) ; // D6
|
||||
GPIO_PinAFConfig(GPIOH,GPIO_PinSource4, GPIO_AF_OTG2_HS) ; // NXT
|
||||
GPIO_PinAFConfig(GPIOI,GPIO_PinSource11,GPIO_AF_OTG2_HS) ; // DIR
|
||||
GPIO_PinAFConfig(GPIOC,GPIO_PinSource0, GPIO_AF_OTG2_HS) ; // STP
|
||||
|
||||
// CLK
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5 ;
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
|
||||
GPIO_Init(GPIOA, &GPIO_InitStructure);
|
||||
|
||||
// D0
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_3 ;
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
|
||||
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
|
||||
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL ;
|
||||
GPIO_Init(GPIOA, &GPIO_InitStructure);
|
||||
|
||||
|
||||
|
||||
// D1 D2 D3 D4 D5 D6 D7
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0 | GPIO_Pin_1 |
|
||||
GPIO_Pin_5 | GPIO_Pin_10 |
|
||||
GPIO_Pin_11| GPIO_Pin_12 |
|
||||
GPIO_Pin_13 ;
|
||||
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
|
||||
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
|
||||
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL ;
|
||||
GPIO_Init(GPIOB, &GPIO_InitStructure);
|
||||
|
||||
|
||||
// STP
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0 ;
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
|
||||
GPIO_Init(GPIOC, &GPIO_InitStructure);
|
||||
|
||||
//NXT
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_4;
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
|
||||
GPIO_Init(GPIOH, &GPIO_InitStructure);
|
||||
|
||||
|
||||
//DIR
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_11 ;
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
|
||||
GPIO_Init(GPIOI, &GPIO_InitStructure);
|
||||
|
||||
|
||||
RCC_AHB1PeriphClockCmd( RCC_AHB1Periph_OTG_HS |
|
||||
RCC_AHB1Periph_OTG_HS_ULPI, ENABLE) ;
|
||||
|
||||
#else
|
||||
|
||||
#ifdef USE_I2C_PHY
|
||||
RCC_AHB1PeriphClockCmd( RCC_AHB1Periph_GPIOB , ENABLE);
|
||||
/* Configure RESET INTN SCL SDA (Phy/I2C) Pins */
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0 |
|
||||
GPIO_Pin_1 |
|
||||
GPIO_Pin_10 |
|
||||
GPIO_Pin_11;
|
||||
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
|
||||
GPIO_Init(GPIOB, &GPIO_InitStructure);
|
||||
|
||||
GPIO_PinAFConfig(GPIOB,GPIO_PinSource0,GPIO_AF_OTG2_FS) ;
|
||||
GPIO_PinAFConfig(GPIOB,GPIO_PinSource1,GPIO_AF_OTG2_FS) ;
|
||||
GPIO_PinAFConfig(GPIOB,GPIO_PinSource10,GPIO_AF_OTG2_FS) ;
|
||||
GPIO_PinAFConfig(GPIOB,GPIO_PinSource11,GPIO_AF_OTG2_FS);
|
||||
RCC_AHB1PeriphClockCmd( RCC_AHB1Periph_OTG_HS, ENABLE) ;
|
||||
|
||||
#else
|
||||
|
||||
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOB , ENABLE);
|
||||
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_12 |
|
||||
GPIO_Pin_13 |
|
||||
GPIO_Pin_14 |
|
||||
GPIO_Pin_15;
|
||||
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
|
||||
GPIO_Init(GPIOB, &GPIO_InitStructure);
|
||||
|
||||
GPIO_PinAFConfig(GPIOB,GPIO_PinSource12, GPIO_AF_OTG2_FS) ;
|
||||
GPIO_PinAFConfig(GPIOB,GPIO_PinSource13,GPIO_AF_OTG2_FS) ;
|
||||
GPIO_PinAFConfig(GPIOB,GPIO_PinSource14,GPIO_AF_OTG2_FS) ;
|
||||
GPIO_PinAFConfig(GPIOB,GPIO_PinSource15,GPIO_AF_OTG2_FS) ;
|
||||
RCC_AHB1PeriphClockCmd( RCC_AHB1Periph_OTG_HS, ENABLE) ;
|
||||
#endif
|
||||
#endif
|
||||
#endif //USB_OTG_HS
|
||||
|
||||
/* Intialize Timer for delay function */
|
||||
USB_OTG_BSP_TimeInit();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USB_OTG_BSP_EnableInterrupt
|
||||
* Configures USB Global interrupt
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
void USB_OTG_BSP_EnableInterrupt(USB_OTG_CORE_HANDLE *pdev)
|
||||
{
|
||||
|
||||
NVIC_InitTypeDef NVIC_InitStructure;
|
||||
/* Enable USB Interrupt */
|
||||
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_1);
|
||||
|
||||
NVIC_InitStructure.NVIC_IRQChannel = OTG_FS_IRQn;
|
||||
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1;
|
||||
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;
|
||||
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
|
||||
NVIC_Init(&NVIC_InitStructure);
|
||||
|
||||
/* Enable the Overcurrent Interrupt */
|
||||
NVIC_InitStructure.NVIC_IRQChannel = HOST_OVRCURR_IRQn;
|
||||
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1;
|
||||
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 2;
|
||||
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
|
||||
|
||||
NVIC_Init(&NVIC_InitStructure);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief BSP_Drive_VBUS
|
||||
* Drives the Vbus signal through IO
|
||||
* @param state : VBUS states
|
||||
* @retval None
|
||||
*/
|
||||
void USB_OTG_BSP_DriveVBUS(USB_OTG_CORE_HANDLE *pdev, uint8_t state)
|
||||
{
|
||||
/*
|
||||
On-chip 5 V VBUS generation is not supported. For this reason, a charge pump
|
||||
or, if 5 V are available on the application board, a basic power switch, must
|
||||
be added externally to drive the 5 V VBUS line. The external charge pump can
|
||||
be driven by any GPIO output. When the application decides to power on VBUS
|
||||
using the chosen GPIO, it must also set the port power bit in the host port
|
||||
control and status register (PPWR bit in OTG_FS_HPRT).
|
||||
|
||||
Bit 12 PPWR: Port power
|
||||
The application uses this field to control power to this port, and the core
|
||||
clears this bit on an overcurrent condition.
|
||||
*/
|
||||
if (0 == state)
|
||||
{
|
||||
/* DISABLE is needed on output of the Power Switch */
|
||||
GPIO_SetBits(HOST_POWERSW_PORT, HOST_POWERSW_VBUS);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*ENABLE the Power Switch by driving the Enable LOW */
|
||||
GPIO_ResetBits(HOST_POWERSW_PORT, HOST_POWERSW_VBUS);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USB_OTG_BSP_ConfigVBUS
|
||||
* Configures the IO for the Vbus and OverCurrent
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
void USB_OTG_BSP_ConfigVBUS(USB_OTG_CORE_HANDLE *pdev)
|
||||
{
|
||||
GPIO_InitTypeDef GPIO_InitStructure;
|
||||
|
||||
|
||||
RCC_AHB1PeriphClockCmd(HOST_POWERSW_PORT_RCC, ENABLE);
|
||||
|
||||
|
||||
/* Configure Power Switch Vbus Pin */
|
||||
GPIO_InitStructure.GPIO_Pin = HOST_POWERSW_VBUS;
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
|
||||
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
|
||||
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
|
||||
|
||||
GPIO_Init(HOST_POWERSW_PORT, &GPIO_InitStructure);
|
||||
|
||||
/* By Default, DISABLE is needed on output of the Power Switch */
|
||||
GPIO_SetBits(HOST_POWERSW_PORT, HOST_POWERSW_VBUS);
|
||||
|
||||
USB_OTG_BSP_mDelay(200); /* Delay is need for stabilising the Vbus Low
|
||||
in Reset Condition, when Vbus=1 and Reset-button is pressed by user */
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USB_OTG_BSP_TimeInit
|
||||
* Initializes delay unit using Timer2
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
static void USB_OTG_BSP_TimeInit (void)
|
||||
{
|
||||
#ifdef USE_ACCURATE_TIME
|
||||
NVIC_InitTypeDef NVIC_InitStructure;
|
||||
|
||||
/* Set the Vector Table base address at 0x08000000 */
|
||||
// NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x00);
|
||||
|
||||
/* Configure the Priority Group to 2 bits */
|
||||
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);
|
||||
|
||||
/* Enable the TIM2 gloabal Interrupt */
|
||||
NVIC_InitStructure.NVIC_IRQChannel = TIM2_IRQn;
|
||||
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
|
||||
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;
|
||||
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
|
||||
|
||||
NVIC_Init(&NVIC_InitStructure);
|
||||
|
||||
RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2, ENABLE);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USB_OTG_BSP_uDelay
|
||||
* This function provides delay time in micro sec
|
||||
* @param usec : Value of delay required in micro sec
|
||||
* @retval None
|
||||
*/
|
||||
void USB_OTG_BSP_uDelay (const uint32_t usec)
|
||||
{
|
||||
|
||||
#ifdef USE_ACCURATE_TIME
|
||||
BSP_Delay(usec, TIM_USEC_DELAY);
|
||||
#else
|
||||
__IO uint32_t count = 0;
|
||||
const uint32_t utime = (120 * usec / 7);
|
||||
do
|
||||
{
|
||||
if ( ++count > utime )
|
||||
{
|
||||
return ;
|
||||
}
|
||||
}
|
||||
while (1);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USB_OTG_BSP_mDelay
|
||||
* This function provides delay time in milli sec
|
||||
* @param msec : Value of delay required in milli sec
|
||||
* @retval None
|
||||
*/
|
||||
void USB_OTG_BSP_mDelay (const uint32_t msec)
|
||||
{
|
||||
#ifdef USE_ACCURATE_TIME
|
||||
BSP_Delay(msec, TIM_MSEC_DELAY);
|
||||
#else
|
||||
USB_OTG_BSP_uDelay(msec * 1000);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USB_OTG_BSP_TimerIRQ
|
||||
* Time base IRQ
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
void USB_OTG_BSP_TimerIRQ (void)
|
||||
{
|
||||
#ifdef USE_ACCURATE_TIME
|
||||
if (TIM_GetITStatus(TIM2, TIM_IT_Update) != RESET)
|
||||
{
|
||||
TIM_ClearITPendingBit(TIM2, TIM_IT_Update);
|
||||
if (BSP_delay > 0x00)
|
||||
{
|
||||
BSP_delay--;
|
||||
}
|
||||
else
|
||||
{
|
||||
TIM_Cmd(TIM2, DISABLE);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef USE_ACCURATE_TIME
|
||||
|
||||
/**
|
||||
* @brief BSP_Delay
|
||||
* Delay routine based on TIM2
|
||||
* @param nTime : Delay Time
|
||||
* @param unit : Delay Time unit : mili sec / micro sec
|
||||
* @retval None
|
||||
*/
|
||||
static void BSP_Delay(uint32_t nTime, uint8_t unit)
|
||||
{
|
||||
|
||||
BSP_delay = nTime;
|
||||
BSP_SetTime(unit);
|
||||
while (BSP_delay != 0);
|
||||
TIM_Cmd(TIM2, DISABLE);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief BSP_SetTime
|
||||
* Configures TIM2 for delay routine based on TIM2
|
||||
* @param unit : msec /usec
|
||||
* @retval None
|
||||
*/
|
||||
static void BSP_SetTime(uint8_t unit)
|
||||
{
|
||||
TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure;
|
||||
|
||||
TIM_Cmd(TIM2, DISABLE);
|
||||
TIM_ITConfig(TIM2, TIM_IT_Update, DISABLE);
|
||||
|
||||
|
||||
if (unit == TIM_USEC_DELAY)
|
||||
{
|
||||
TIM_TimeBaseStructure.TIM_Period = 11;
|
||||
}
|
||||
else if (unit == TIM_MSEC_DELAY)
|
||||
{
|
||||
TIM_TimeBaseStructure.TIM_Period = 11999;
|
||||
}
|
||||
TIM_TimeBaseStructure.TIM_Prescaler = 5;
|
||||
TIM_TimeBaseStructure.TIM_ClockDivision = 0;
|
||||
TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up;
|
||||
|
||||
TIM_TimeBaseInit(TIM2, &TIM_TimeBaseStructure);
|
||||
TIM_ClearITPendingBit(TIM2, TIM_IT_Update);
|
||||
|
||||
TIM_ARRPreloadConfig(TIM2, ENABLE);
|
||||
|
||||
/* TIM IT enable */
|
||||
TIM_ITConfig(TIM2, TIM_IT_Update, ENABLE);
|
||||
|
||||
/* TIM2 enable counter */
|
||||
TIM_Cmd(TIM2, ENABLE);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
||||
/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
|
||||
/**************************************************************************************************************************************
|
||||
* Project: discoverpixy
|
||||
* Website: https://github.com/t-moe/discoverpixy
|
||||
* Authors: Aaron Schmocker, Timo Lang
|
||||
* Institution: BFH Bern University of Applied Sciences
|
||||
* File: discovery/src/usb_bsp.c
|
||||
*
|
||||
* Version History:
|
||||
* Date Autor Email SHA Changes
|
||||
* 2015-04-03 timolang@gmail.com 21dd1e2 Starting to integrate usb branch. Optimized Makefiles
|
||||
*
|
||||
**************************************************************************************************************************************/
|
||||
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "usb_bsp.h"
|
||||
#include "stm32f4_discovery.h"
|
||||
|
||||
#define USE_ACCURATE_TIME
|
||||
#define TIM_MSEC_DELAY 0x01
|
||||
#define TIM_USEC_DELAY 0x02
|
||||
#define HOST_OVRCURR_PORT GPIOD
|
||||
#define HOST_OVRCURR_LINE GPIO_Pin_5
|
||||
#define HOST_OVRCURR_PORT_SOURCE GPIO_PortSourceGPIOD
|
||||
#define HOST_OVRCURR_PIN_SOURCE GPIO_PinSourceD
|
||||
#define HOST_OVRCURR_PORT_RCC RCC_APB2Periph_GPIOD
|
||||
#define HOST_OVRCURR_EXTI_LINE EXTI_Line5
|
||||
#define HOST_OVRCURR_IRQn EXTI9_5_IRQn
|
||||
|
||||
|
||||
#define HOST_POWERSW_PORT_RCC RCC_AHB1Periph_GPIOC
|
||||
#define HOST_POWERSW_PORT GPIOC
|
||||
#define HOST_POWERSW_VBUS GPIO_Pin_0
|
||||
|
||||
/* Private macros ------------------------------------------------------------*/
|
||||
/* Private variables ---------------------------------------------------------*/
|
||||
ErrorStatus HSEStartUpStatus;
|
||||
#ifdef USE_ACCURATE_TIME
|
||||
__IO uint32_t BSP_delay = 0;
|
||||
#endif
|
||||
|
||||
/* Private function prototypes -----------------------------------------------*/
|
||||
/* Private functions ---------------------------------------------------------*/
|
||||
#ifdef USE_ACCURATE_TIME
|
||||
static void BSP_SetTime(uint8_t Unit);
|
||||
static void BSP_Delay(uint32_t nTime, uint8_t Unit);
|
||||
static void USB_OTG_BSP_TimeInit(void);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief BSP_Init
|
||||
* board user initializations
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
void BSP_Init(void)
|
||||
{
|
||||
/* Configure PA0 pin: User Key pin */
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief USB_OTG_BSP_Init
|
||||
* Initilizes BSP configurations
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
void USB_OTG_BSP_Init(USB_OTG_CORE_HANDLE* pdev)
|
||||
{
|
||||
/* Note: On STM32F4-Discovery board only USB OTG FS core is supported. */
|
||||
|
||||
GPIO_InitTypeDef GPIO_InitStructure;
|
||||
#ifdef USE_USB_OTG_FS
|
||||
|
||||
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA , ENABLE);
|
||||
|
||||
/* Configure SOF VBUS ID DM DP Pins */
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9 |
|
||||
GPIO_Pin_11 |
|
||||
GPIO_Pin_12;
|
||||
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
|
||||
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
|
||||
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL ;
|
||||
GPIO_Init(GPIOA, &GPIO_InitStructure);
|
||||
|
||||
GPIO_PinAFConfig(GPIOA, GPIO_PinSource9, GPIO_AF_OTG1_FS) ;
|
||||
GPIO_PinAFConfig(GPIOA, GPIO_PinSource11, GPIO_AF_OTG1_FS) ;
|
||||
GPIO_PinAFConfig(GPIOA, GPIO_PinSource12, GPIO_AF_OTG1_FS) ;
|
||||
|
||||
/* this for ID line debug */
|
||||
|
||||
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10;
|
||||
GPIO_InitStructure.GPIO_OType = GPIO_OType_OD;
|
||||
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP ;
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
|
||||
GPIO_Init(GPIOA, &GPIO_InitStructure);
|
||||
GPIO_PinAFConfig(GPIOA, GPIO_PinSource10, GPIO_AF_OTG1_FS) ;
|
||||
|
||||
|
||||
RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG, ENABLE);
|
||||
RCC_AHB2PeriphClockCmd(RCC_AHB2Periph_OTG_FS, ENABLE) ;
|
||||
#else // USE_USB_OTG_HS
|
||||
|
||||
#ifdef USE_ULPI_PHY // ULPI
|
||||
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA | RCC_AHB1Periph_GPIOB |
|
||||
RCC_AHB1Periph_GPIOC | RCC_AHB1Periph_GPIOH |
|
||||
RCC_AHB1Periph_GPIOI, ENABLE);
|
||||
|
||||
|
||||
GPIO_PinAFConfig(GPIOA, GPIO_PinSource3, GPIO_AF_OTG2_HS) ; // D0
|
||||
GPIO_PinAFConfig(GPIOA, GPIO_PinSource5, GPIO_AF_OTG2_HS) ; // CLK
|
||||
GPIO_PinAFConfig(GPIOB, GPIO_PinSource0, GPIO_AF_OTG2_HS) ; // D1
|
||||
GPIO_PinAFConfig(GPIOB, GPIO_PinSource1, GPIO_AF_OTG2_HS) ; // D2
|
||||
GPIO_PinAFConfig(GPIOB, GPIO_PinSource5, GPIO_AF_OTG2_HS) ; // D7
|
||||
GPIO_PinAFConfig(GPIOB, GPIO_PinSource10, GPIO_AF_OTG2_HS) ; // D3
|
||||
GPIO_PinAFConfig(GPIOB, GPIO_PinSource11, GPIO_AF_OTG2_HS) ; // D4
|
||||
GPIO_PinAFConfig(GPIOB, GPIO_PinSource12, GPIO_AF_OTG2_HS) ; // D5
|
||||
GPIO_PinAFConfig(GPIOB, GPIO_PinSource13, GPIO_AF_OTG2_HS) ; // D6
|
||||
GPIO_PinAFConfig(GPIOH, GPIO_PinSource4, GPIO_AF_OTG2_HS) ; // NXT
|
||||
GPIO_PinAFConfig(GPIOI, GPIO_PinSource11, GPIO_AF_OTG2_HS) ; // DIR
|
||||
GPIO_PinAFConfig(GPIOC, GPIO_PinSource0, GPIO_AF_OTG2_HS) ; // STP
|
||||
|
||||
// CLK
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5 ;
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
|
||||
GPIO_Init(GPIOA, &GPIO_InitStructure);
|
||||
|
||||
// D0
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_3 ;
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
|
||||
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
|
||||
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL ;
|
||||
GPIO_Init(GPIOA, &GPIO_InitStructure);
|
||||
|
||||
|
||||
|
||||
// D1 D2 D3 D4 D5 D6 D7
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0 | GPIO_Pin_1 |
|
||||
GPIO_Pin_5 | GPIO_Pin_10 |
|
||||
GPIO_Pin_11 | GPIO_Pin_12 |
|
||||
GPIO_Pin_13 ;
|
||||
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
|
||||
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
|
||||
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL ;
|
||||
GPIO_Init(GPIOB, &GPIO_InitStructure);
|
||||
|
||||
|
||||
// STP
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0 ;
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
|
||||
GPIO_Init(GPIOC, &GPIO_InitStructure);
|
||||
|
||||
//NXT
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_4;
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
|
||||
GPIO_Init(GPIOH, &GPIO_InitStructure);
|
||||
|
||||
|
||||
//DIR
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_11 ;
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
|
||||
GPIO_Init(GPIOI, &GPIO_InitStructure);
|
||||
|
||||
|
||||
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_OTG_HS |
|
||||
RCC_AHB1Periph_OTG_HS_ULPI, ENABLE) ;
|
||||
|
||||
#else
|
||||
|
||||
#ifdef USE_I2C_PHY
|
||||
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOB , ENABLE);
|
||||
/* Configure RESET INTN SCL SDA (Phy/I2C) Pins */
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0 |
|
||||
GPIO_Pin_1 |
|
||||
GPIO_Pin_10 |
|
||||
GPIO_Pin_11;
|
||||
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
|
||||
GPIO_Init(GPIOB, &GPIO_InitStructure);
|
||||
|
||||
GPIO_PinAFConfig(GPIOB, GPIO_PinSource0, GPIO_AF_OTG2_FS) ;
|
||||
GPIO_PinAFConfig(GPIOB, GPIO_PinSource1, GPIO_AF_OTG2_FS) ;
|
||||
GPIO_PinAFConfig(GPIOB, GPIO_PinSource10, GPIO_AF_OTG2_FS) ;
|
||||
GPIO_PinAFConfig(GPIOB, GPIO_PinSource11, GPIO_AF_OTG2_FS);
|
||||
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_OTG_HS, ENABLE) ;
|
||||
|
||||
#else
|
||||
|
||||
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOB , ENABLE);
|
||||
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_12 |
|
||||
GPIO_Pin_13 |
|
||||
GPIO_Pin_14 |
|
||||
GPIO_Pin_15;
|
||||
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
|
||||
GPIO_Init(GPIOB, &GPIO_InitStructure);
|
||||
|
||||
GPIO_PinAFConfig(GPIOB, GPIO_PinSource12, GPIO_AF_OTG2_FS) ;
|
||||
GPIO_PinAFConfig(GPIOB, GPIO_PinSource13, GPIO_AF_OTG2_FS) ;
|
||||
GPIO_PinAFConfig(GPIOB, GPIO_PinSource14, GPIO_AF_OTG2_FS) ;
|
||||
GPIO_PinAFConfig(GPIOB, GPIO_PinSource15, GPIO_AF_OTG2_FS) ;
|
||||
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_OTG_HS, ENABLE) ;
|
||||
#endif
|
||||
#endif
|
||||
#endif //USB_OTG_HS
|
||||
|
||||
/* Intialize Timer for delay function */
|
||||
USB_OTG_BSP_TimeInit();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USB_OTG_BSP_EnableInterrupt
|
||||
* Configures USB Global interrupt
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
void USB_OTG_BSP_EnableInterrupt(USB_OTG_CORE_HANDLE* pdev)
|
||||
{
|
||||
|
||||
NVIC_InitTypeDef NVIC_InitStructure;
|
||||
/* Enable USB Interrupt */
|
||||
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_1);
|
||||
|
||||
NVIC_InitStructure.NVIC_IRQChannel = OTG_FS_IRQn;
|
||||
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1;
|
||||
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;
|
||||
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
|
||||
NVIC_Init(&NVIC_InitStructure);
|
||||
|
||||
/* Enable the Overcurrent Interrupt */
|
||||
NVIC_InitStructure.NVIC_IRQChannel = HOST_OVRCURR_IRQn;
|
||||
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1;
|
||||
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 2;
|
||||
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
|
||||
|
||||
NVIC_Init(&NVIC_InitStructure);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief BSP_Drive_VBUS
|
||||
* Drives the Vbus signal through IO
|
||||
* @param state : VBUS states
|
||||
* @retval None
|
||||
*/
|
||||
void USB_OTG_BSP_DriveVBUS(USB_OTG_CORE_HANDLE* pdev, uint8_t state)
|
||||
{
|
||||
/*
|
||||
On-chip 5 V VBUS generation is not supported. For this reason, a charge pump
|
||||
or, if 5 V are available on the application board, a basic power switch, must
|
||||
be added externally to drive the 5 V VBUS line. The external charge pump can
|
||||
be driven by any GPIO output. When the application decides to power on VBUS
|
||||
using the chosen GPIO, it must also set the port power bit in the host port
|
||||
control and status register (PPWR bit in OTG_FS_HPRT).
|
||||
|
||||
Bit 12 PPWR: Port power
|
||||
The application uses this field to control power to this port, and the core
|
||||
clears this bit on an overcurrent condition.
|
||||
*/
|
||||
if (0 == state) {
|
||||
/* DISABLE is needed on output of the Power Switch */
|
||||
GPIO_SetBits(HOST_POWERSW_PORT, HOST_POWERSW_VBUS);
|
||||
} else {
|
||||
/*ENABLE the Power Switch by driving the Enable LOW */
|
||||
GPIO_ResetBits(HOST_POWERSW_PORT, HOST_POWERSW_VBUS);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USB_OTG_BSP_ConfigVBUS
|
||||
* Configures the IO for the Vbus and OverCurrent
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
void USB_OTG_BSP_ConfigVBUS(USB_OTG_CORE_HANDLE* pdev)
|
||||
{
|
||||
GPIO_InitTypeDef GPIO_InitStructure;
|
||||
|
||||
|
||||
RCC_AHB1PeriphClockCmd(HOST_POWERSW_PORT_RCC, ENABLE);
|
||||
|
||||
|
||||
/* Configure Power Switch Vbus Pin */
|
||||
GPIO_InitStructure.GPIO_Pin = HOST_POWERSW_VBUS;
|
||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
|
||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
|
||||
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
|
||||
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
|
||||
|
||||
GPIO_Init(HOST_POWERSW_PORT, &GPIO_InitStructure);
|
||||
|
||||
/* By Default, DISABLE is needed on output of the Power Switch */
|
||||
GPIO_SetBits(HOST_POWERSW_PORT, HOST_POWERSW_VBUS);
|
||||
|
||||
USB_OTG_BSP_mDelay(200); /* Delay is need for stabilising the Vbus Low
|
||||
in Reset Condition, when Vbus=1 and Reset-button is pressed by user */
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USB_OTG_BSP_TimeInit
|
||||
* Initializes delay unit using Timer2
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
static void USB_OTG_BSP_TimeInit(void)
|
||||
{
|
||||
#ifdef USE_ACCURATE_TIME
|
||||
NVIC_InitTypeDef NVIC_InitStructure;
|
||||
|
||||
/* Set the Vector Table base address at 0x08000000 */
|
||||
// NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x00);
|
||||
|
||||
/* Configure the Priority Group to 2 bits */
|
||||
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);
|
||||
|
||||
/* Enable the TIM2 gloabal Interrupt */
|
||||
NVIC_InitStructure.NVIC_IRQChannel = TIM2_IRQn;
|
||||
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
|
||||
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;
|
||||
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
|
||||
|
||||
NVIC_Init(&NVIC_InitStructure);
|
||||
|
||||
RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2, ENABLE);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USB_OTG_BSP_uDelay
|
||||
* This function provides delay time in micro sec
|
||||
* @param usec : Value of delay required in micro sec
|
||||
* @retval None
|
||||
*/
|
||||
void USB_OTG_BSP_uDelay(const uint32_t usec)
|
||||
{
|
||||
|
||||
#ifdef USE_ACCURATE_TIME
|
||||
BSP_Delay(usec, TIM_USEC_DELAY);
|
||||
#else
|
||||
__IO uint32_t count = 0;
|
||||
const uint32_t utime = (120 * usec / 7);
|
||||
|
||||
do {
|
||||
if (++count > utime) {
|
||||
return ;
|
||||
}
|
||||
} while (1);
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USB_OTG_BSP_mDelay
|
||||
* This function provides delay time in milli sec
|
||||
* @param msec : Value of delay required in milli sec
|
||||
* @retval None
|
||||
*/
|
||||
void USB_OTG_BSP_mDelay(const uint32_t msec)
|
||||
{
|
||||
#ifdef USE_ACCURATE_TIME
|
||||
BSP_Delay(msec, TIM_MSEC_DELAY);
|
||||
#else
|
||||
USB_OTG_BSP_uDelay(msec * 1000);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USB_OTG_BSP_TimerIRQ
|
||||
* Time base IRQ
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
void USB_OTG_BSP_TimerIRQ(void)
|
||||
{
|
||||
#ifdef USE_ACCURATE_TIME
|
||||
|
||||
if (TIM_GetITStatus(TIM2, TIM_IT_Update) != RESET) {
|
||||
TIM_ClearITPendingBit(TIM2, TIM_IT_Update);
|
||||
|
||||
if (BSP_delay > 0x00) {
|
||||
BSP_delay--;
|
||||
} else {
|
||||
TIM_Cmd(TIM2, DISABLE);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef USE_ACCURATE_TIME
|
||||
|
||||
/**
|
||||
* @brief BSP_Delay
|
||||
* Delay routine based on TIM2
|
||||
* @param nTime : Delay Time
|
||||
* @param unit : Delay Time unit : mili sec / micro sec
|
||||
* @retval None
|
||||
*/
|
||||
static void BSP_Delay(uint32_t nTime, uint8_t unit)
|
||||
{
|
||||
|
||||
BSP_delay = nTime;
|
||||
BSP_SetTime(unit);
|
||||
|
||||
while (BSP_delay != 0);
|
||||
|
||||
TIM_Cmd(TIM2, DISABLE);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief BSP_SetTime
|
||||
* Configures TIM2 for delay routine based on TIM2
|
||||
* @param unit : msec /usec
|
||||
* @retval None
|
||||
*/
|
||||
static void BSP_SetTime(uint8_t unit)
|
||||
{
|
||||
TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure;
|
||||
|
||||
TIM_Cmd(TIM2, DISABLE);
|
||||
TIM_ITConfig(TIM2, TIM_IT_Update, DISABLE);
|
||||
|
||||
|
||||
if (unit == TIM_USEC_DELAY) {
|
||||
TIM_TimeBaseStructure.TIM_Period = 11;
|
||||
} else if (unit == TIM_MSEC_DELAY) {
|
||||
TIM_TimeBaseStructure.TIM_Period = 11999;
|
||||
}
|
||||
|
||||
TIM_TimeBaseStructure.TIM_Prescaler = 5;
|
||||
TIM_TimeBaseStructure.TIM_ClockDivision = 0;
|
||||
TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up;
|
||||
|
||||
TIM_TimeBaseInit(TIM2, &TIM_TimeBaseStructure);
|
||||
TIM_ClearITPendingBit(TIM2, TIM_IT_Update);
|
||||
|
||||
TIM_ARRPreloadConfig(TIM2, ENABLE);
|
||||
|
||||
/* TIM IT enable */
|
||||
TIM_ITConfig(TIM2, TIM_IT_Update, ENABLE);
|
||||
|
||||
/* TIM2 enable counter */
|
||||
TIM_Cmd(TIM2, ENABLE);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
||||
/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
|
||||
|
||||
@@ -1,250 +1,276 @@
|
||||
|
||||
#include "usbh_msc_core.h"
|
||||
#include "usbh_core.h"
|
||||
|
||||
|
||||
static USBH_Status USBH_MSC_InterfaceInit (USB_OTG_CORE_HANDLE *pdev ,
|
||||
void *phost);
|
||||
|
||||
static void USBH_MSC_InterfaceDeInit (USB_OTG_CORE_HANDLE *pdev ,
|
||||
void *phost);
|
||||
|
||||
static USBH_Status USBH_MSC_Handle(USB_OTG_CORE_HANDLE *pdev ,
|
||||
void *phost);
|
||||
|
||||
static USBH_Status USBH_MSC_ClassRequest(USB_OTG_CORE_HANDLE *pdev ,
|
||||
void *phost);
|
||||
|
||||
|
||||
extern USB_OTG_CORE_HANDLE USB_OTG_Core;
|
||||
extern USBH_HOST USB_Host;
|
||||
|
||||
|
||||
|
||||
USBH_Class_cb_TypeDef USBH_MSC_cb =
|
||||
{
|
||||
USBH_MSC_InterfaceInit,
|
||||
USBH_MSC_InterfaceDeInit,
|
||||
USBH_MSC_ClassRequest,
|
||||
USBH_MSC_Handle,
|
||||
};
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8_t hc_num_in;
|
||||
uint8_t hc_num_out;
|
||||
uint8_t MSBulkOutEp;
|
||||
uint8_t MSBulkInEp;
|
||||
uint16_t MSBulkInEpSize;
|
||||
uint16_t MSBulkOutEpSize;
|
||||
}
|
||||
MSC_Machine_TypeDef;
|
||||
MSC_Machine_TypeDef MSC_Machine;
|
||||
|
||||
|
||||
static USBH_Status USBH_MSC_InterfaceInit ( USB_OTG_CORE_HANDLE *pdev,
|
||||
void *phost)
|
||||
{
|
||||
USBH_HOST *pphost = phost;
|
||||
|
||||
|
||||
|
||||
if((pphost->device_prop.Itf_Desc[1].bInterfaceClass == 255) &&
|
||||
(pphost->device_prop.Itf_Desc[1].bInterfaceProtocol == 0) &&
|
||||
(pphost->device_prop.Itf_Desc[1].bInterfaceSubClass == 1))
|
||||
{
|
||||
if(pphost->device_prop.Ep_Desc[0][0].bEndpointAddress & 0x80)
|
||||
{
|
||||
MSC_Machine.MSBulkInEp = (pphost->device_prop.Ep_Desc[0][0].bEndpointAddress);
|
||||
MSC_Machine.MSBulkInEpSize = pphost->device_prop.Ep_Desc[0][0].wMaxPacketSize;
|
||||
}
|
||||
else
|
||||
{
|
||||
MSC_Machine.MSBulkOutEp = (pphost->device_prop.Ep_Desc[0][0].bEndpointAddress);
|
||||
MSC_Machine.MSBulkOutEpSize = pphost->device_prop.Ep_Desc[0][0].wMaxPacketSize;
|
||||
}
|
||||
|
||||
if(pphost->device_prop.Ep_Desc[0][1].bEndpointAddress & 0x80)
|
||||
{
|
||||
MSC_Machine.MSBulkInEp = (pphost->device_prop.Ep_Desc[0][1].bEndpointAddress);
|
||||
MSC_Machine.MSBulkInEpSize = pphost->device_prop.Ep_Desc[0][1].wMaxPacketSize;
|
||||
}
|
||||
else
|
||||
{
|
||||
MSC_Machine.MSBulkOutEp = (pphost->device_prop.Ep_Desc[0][1].bEndpointAddress);
|
||||
MSC_Machine.MSBulkOutEpSize = pphost->device_prop.Ep_Desc[0][1].wMaxPacketSize;
|
||||
}
|
||||
|
||||
MSC_Machine.hc_num_out = USBH_Alloc_Channel(pdev,MSC_Machine.MSBulkOutEp);
|
||||
MSC_Machine.hc_num_in = USBH_Alloc_Channel(pdev,MSC_Machine.MSBulkInEp);
|
||||
|
||||
USBH_Open_Channel (pdev,
|
||||
MSC_Machine.hc_num_out,
|
||||
pphost->device_prop.address,
|
||||
pphost->device_prop.speed,
|
||||
EP_TYPE_BULK,
|
||||
MSC_Machine.MSBulkOutEpSize);
|
||||
|
||||
USBH_Open_Channel (pdev,
|
||||
MSC_Machine.hc_num_in,
|
||||
pphost->device_prop.address,
|
||||
pphost->device_prop.speed,
|
||||
EP_TYPE_BULK,
|
||||
MSC_Machine.MSBulkInEpSize);
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
pphost->usr_cb->USBH_USR_DeviceNotSupported();
|
||||
}
|
||||
|
||||
return USBH_OK ;
|
||||
|
||||
}
|
||||
|
||||
void USBH_MSC_InterfaceDeInit ( USB_OTG_CORE_HANDLE *pdev,
|
||||
void *phost)
|
||||
{
|
||||
if ( MSC_Machine.hc_num_out)
|
||||
{
|
||||
USB_OTG_HC_Halt(pdev, MSC_Machine.hc_num_out);
|
||||
USBH_Free_Channel (pdev, MSC_Machine.hc_num_out);
|
||||
MSC_Machine.hc_num_out = 0;
|
||||
}
|
||||
|
||||
if ( MSC_Machine.hc_num_in)
|
||||
{
|
||||
USB_OTG_HC_Halt(pdev, MSC_Machine.hc_num_in);
|
||||
USBH_Free_Channel (pdev, MSC_Machine.hc_num_in);
|
||||
MSC_Machine.hc_num_in = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static USBH_Status USBH_MSC_ClassRequest(USB_OTG_CORE_HANDLE *pdev ,
|
||||
void *phost)
|
||||
{
|
||||
|
||||
USBH_Status status = USBH_OK ;
|
||||
return status;
|
||||
}
|
||||
|
||||
static USBH_Status USBH_MSC_Handle(USB_OTG_CORE_HANDLE *pdev ,
|
||||
void *phost)
|
||||
{
|
||||
USBH_HOST *pphost = phost;
|
||||
|
||||
USBH_Status status = USBH_BUSY;
|
||||
|
||||
if(HCD_IsDeviceConnected(pdev))
|
||||
{
|
||||
int appliStatus = pphost->usr_cb->USBH_USR_MSC_Application();
|
||||
if(appliStatus != 0)
|
||||
{
|
||||
status = USBH_APPLY_DEINIT;
|
||||
}
|
||||
}
|
||||
return status;
|
||||
|
||||
}
|
||||
|
||||
|
||||
volatile uint32_t cnt;
|
||||
volatile uint32_t cnt_int;
|
||||
void USBH_LL_systick() {
|
||||
cnt++;
|
||||
cnt_int++;
|
||||
}
|
||||
|
||||
|
||||
void USBH_LL_setTimer() {
|
||||
cnt=0;
|
||||
}
|
||||
|
||||
uint32_t USBH_LL_getTimer() {
|
||||
return cnt;
|
||||
}
|
||||
|
||||
|
||||
int USBH_LL_open() {
|
||||
int timeoutDetect=100;
|
||||
int timeoutStartup=3000;
|
||||
cnt_int=0; //reset timer
|
||||
|
||||
while(USB_Host.gState!=HOST_CLASS && cnt_int < timeoutDetect) {
|
||||
USBH_Process(&USB_OTG_Core, &USB_Host);
|
||||
}
|
||||
|
||||
if(USB_Host.gState!=HOST_CLASS) {
|
||||
return -5; // = LIBUSB_ERROR_NOT_FOUND
|
||||
}
|
||||
|
||||
|
||||
cnt_int=0;
|
||||
while(cnt_int<timeoutStartup) { //let pixy's led flashing pass
|
||||
USBH_Process(&USB_OTG_Core, &USB_Host);
|
||||
}
|
||||
return 0; //ok
|
||||
}
|
||||
|
||||
int USBH_LL_close() {
|
||||
USBH_Process(&USB_OTG_Core, &USB_Host);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int USBH_LL_send(const uint8_t *data, uint32_t len, uint16_t timeoutMs) {
|
||||
USB_OTG_CORE_HANDLE *pdev = &USB_OTG_Core;
|
||||
|
||||
if(!HCD_IsDeviceConnected(pdev)) return -1;
|
||||
|
||||
USBH_BulkSendData (pdev,
|
||||
(uint8_t*)data,
|
||||
len ,
|
||||
MSC_Machine.hc_num_out);
|
||||
|
||||
URB_STATE state;
|
||||
cnt_int=0; //reset timer
|
||||
if(timeoutMs==0) timeoutMs=1000; //Force 1s timeout (testwise)
|
||||
|
||||
while((state=HCD_GetURB_State(pdev , MSC_Machine.hc_num_out)) == URB_IDLE &&
|
||||
(timeoutMs==0 || cnt_int < timeoutMs));
|
||||
|
||||
if(state!=URB_DONE) {
|
||||
if(timeoutMs>0 && cnt_int>=timeoutMs) {
|
||||
STM_EVAL_LEDOn(LED3);
|
||||
return -7; //timeout (error code like with libusb)
|
||||
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
return len;
|
||||
}
|
||||
|
||||
int USBH_LL_receive(uint8_t *data, uint32_t len, uint16_t timeoutMs) {
|
||||
|
||||
USB_OTG_CORE_HANDLE *pdev = &USB_OTG_Core;
|
||||
|
||||
if(!HCD_IsDeviceConnected(pdev)) return -1;
|
||||
|
||||
USBH_BulkReceiveData (pdev,
|
||||
data,
|
||||
len ,
|
||||
MSC_Machine.hc_num_in);
|
||||
|
||||
URB_STATE state;
|
||||
cnt_int=0; //reset timer
|
||||
if(timeoutMs==0) timeoutMs=1000; //Force 1s timeout (testwise)
|
||||
|
||||
while((state=HCD_GetURB_State(pdev , MSC_Machine.hc_num_in)) == URB_IDLE &&
|
||||
(timeoutMs==0 || cnt_int < timeoutMs));
|
||||
|
||||
if(state!=URB_DONE) {
|
||||
if(timeoutMs>0 && cnt_int>=timeoutMs) {
|
||||
STM_EVAL_LEDOn(LED3);
|
||||
return -7; //timeout (error code like with libusb)
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
return len;
|
||||
}
|
||||
/**************************************************************************************************************************************
|
||||
* Project: discoverpixy
|
||||
* Website: https://github.com/t-moe/discoverpixy
|
||||
* Authors: Aaron Schmocker, Timo Lang
|
||||
* Institution: BFH Bern University of Applied Sciences
|
||||
* File: discovery/src/usbh_msc_core.c
|
||||
*
|
||||
* Version History:
|
||||
* Date Autor Email SHA Changes
|
||||
* 2015-04-03 timolang@gmail.com 21dd1e2 Starting to integrate usb branch. Optimized Makefiles
|
||||
* 2015-04-25 timolang@gmail.com 416883c Pixy&Usb work with the new folder structure now.
|
||||
* 2015-04-25 timolang@gmail.com 3d1e4b2 Simplified code a bit. Emulator does not work stable when replugging pixy.
|
||||
*
|
||||
**************************************************************************************************************************************/
|
||||
|
||||
|
||||
#include "usbh_msc_core.h"
|
||||
#include "usbh_core.h"
|
||||
|
||||
|
||||
static USBH_Status USBH_MSC_InterfaceInit(USB_OTG_CORE_HANDLE* pdev ,
|
||||
void* phost);
|
||||
|
||||
static void USBH_MSC_InterfaceDeInit(USB_OTG_CORE_HANDLE* pdev ,
|
||||
void* phost);
|
||||
|
||||
static USBH_Status USBH_MSC_Handle(USB_OTG_CORE_HANDLE* pdev ,
|
||||
void* phost);
|
||||
|
||||
static USBH_Status USBH_MSC_ClassRequest(USB_OTG_CORE_HANDLE* pdev ,
|
||||
void* phost);
|
||||
|
||||
|
||||
extern USB_OTG_CORE_HANDLE USB_OTG_Core;
|
||||
extern USBH_HOST USB_Host;
|
||||
|
||||
|
||||
|
||||
USBH_Class_cb_TypeDef USBH_MSC_cb = {
|
||||
USBH_MSC_InterfaceInit,
|
||||
USBH_MSC_InterfaceDeInit,
|
||||
USBH_MSC_ClassRequest,
|
||||
USBH_MSC_Handle,
|
||||
};
|
||||
|
||||
|
||||
typedef struct {
|
||||
uint8_t hc_num_in;
|
||||
uint8_t hc_num_out;
|
||||
uint8_t MSBulkOutEp;
|
||||
uint8_t MSBulkInEp;
|
||||
uint16_t MSBulkInEpSize;
|
||||
uint16_t MSBulkOutEpSize;
|
||||
}
|
||||
MSC_Machine_TypeDef;
|
||||
MSC_Machine_TypeDef MSC_Machine;
|
||||
|
||||
|
||||
static USBH_Status USBH_MSC_InterfaceInit(USB_OTG_CORE_HANDLE* pdev,
|
||||
void* phost)
|
||||
{
|
||||
USBH_HOST* pphost = phost;
|
||||
|
||||
|
||||
|
||||
if ((pphost->device_prop.Itf_Desc[1].bInterfaceClass == 255) &&
|
||||
(pphost->device_prop.Itf_Desc[1].bInterfaceProtocol == 0) &&
|
||||
(pphost->device_prop.Itf_Desc[1].bInterfaceSubClass == 1)) {
|
||||
if (pphost->device_prop.Ep_Desc[0][0].bEndpointAddress & 0x80) {
|
||||
MSC_Machine.MSBulkInEp = (pphost->device_prop.Ep_Desc[0][0].bEndpointAddress);
|
||||
MSC_Machine.MSBulkInEpSize = pphost->device_prop.Ep_Desc[0][0].wMaxPacketSize;
|
||||
} else {
|
||||
MSC_Machine.MSBulkOutEp = (pphost->device_prop.Ep_Desc[0][0].bEndpointAddress);
|
||||
MSC_Machine.MSBulkOutEpSize = pphost->device_prop.Ep_Desc[0][0].wMaxPacketSize;
|
||||
}
|
||||
|
||||
if (pphost->device_prop.Ep_Desc[0][1].bEndpointAddress & 0x80) {
|
||||
MSC_Machine.MSBulkInEp = (pphost->device_prop.Ep_Desc[0][1].bEndpointAddress);
|
||||
MSC_Machine.MSBulkInEpSize = pphost->device_prop.Ep_Desc[0][1].wMaxPacketSize;
|
||||
} else {
|
||||
MSC_Machine.MSBulkOutEp = (pphost->device_prop.Ep_Desc[0][1].bEndpointAddress);
|
||||
MSC_Machine.MSBulkOutEpSize = pphost->device_prop.Ep_Desc[0][1].wMaxPacketSize;
|
||||
}
|
||||
|
||||
MSC_Machine.hc_num_out = USBH_Alloc_Channel(pdev, MSC_Machine.MSBulkOutEp);
|
||||
MSC_Machine.hc_num_in = USBH_Alloc_Channel(pdev, MSC_Machine.MSBulkInEp);
|
||||
|
||||
USBH_Open_Channel(pdev,
|
||||
MSC_Machine.hc_num_out,
|
||||
pphost->device_prop.address,
|
||||
pphost->device_prop.speed,
|
||||
EP_TYPE_BULK,
|
||||
MSC_Machine.MSBulkOutEpSize);
|
||||
|
||||
USBH_Open_Channel(pdev,
|
||||
MSC_Machine.hc_num_in,
|
||||
pphost->device_prop.address,
|
||||
pphost->device_prop.speed,
|
||||
EP_TYPE_BULK,
|
||||
MSC_Machine.MSBulkInEpSize);
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
pphost->usr_cb->USBH_USR_DeviceNotSupported();
|
||||
}
|
||||
|
||||
return USBH_OK ;
|
||||
|
||||
}
|
||||
|
||||
void USBH_MSC_InterfaceDeInit(USB_OTG_CORE_HANDLE* pdev,
|
||||
void* phost)
|
||||
{
|
||||
if (MSC_Machine.hc_num_out) {
|
||||
USB_OTG_HC_Halt(pdev, MSC_Machine.hc_num_out);
|
||||
USBH_Free_Channel(pdev, MSC_Machine.hc_num_out);
|
||||
MSC_Machine.hc_num_out = 0;
|
||||
}
|
||||
|
||||
if (MSC_Machine.hc_num_in) {
|
||||
USB_OTG_HC_Halt(pdev, MSC_Machine.hc_num_in);
|
||||
USBH_Free_Channel(pdev, MSC_Machine.hc_num_in);
|
||||
MSC_Machine.hc_num_in = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static USBH_Status USBH_MSC_ClassRequest(USB_OTG_CORE_HANDLE* pdev ,
|
||||
void* phost)
|
||||
{
|
||||
|
||||
USBH_Status status = USBH_OK ;
|
||||
return status;
|
||||
}
|
||||
|
||||
static USBH_Status USBH_MSC_Handle(USB_OTG_CORE_HANDLE* pdev ,
|
||||
void* phost)
|
||||
{
|
||||
USBH_HOST* pphost = phost;
|
||||
|
||||
USBH_Status status = USBH_BUSY;
|
||||
|
||||
if (HCD_IsDeviceConnected(pdev)) {
|
||||
int appliStatus = pphost->usr_cb->USBH_USR_MSC_Application();
|
||||
|
||||
if (appliStatus != 0) {
|
||||
status = USBH_APPLY_DEINIT;
|
||||
}
|
||||
}
|
||||
|
||||
return status;
|
||||
|
||||
}
|
||||
|
||||
|
||||
volatile uint32_t cnt;
|
||||
volatile uint32_t cnt_int;
|
||||
void USBH_LL_systick()
|
||||
{
|
||||
cnt++;
|
||||
cnt_int++;
|
||||
}
|
||||
|
||||
|
||||
void USBH_LL_setTimer()
|
||||
{
|
||||
cnt = 0;
|
||||
}
|
||||
|
||||
uint32_t USBH_LL_getTimer()
|
||||
{
|
||||
return cnt;
|
||||
}
|
||||
|
||||
|
||||
int USBH_LL_open()
|
||||
{
|
||||
int timeoutDetect = 100;
|
||||
int timeoutStartup = 3000;
|
||||
cnt_int = 0; //reset timer
|
||||
|
||||
while (USB_Host.gState != HOST_CLASS && cnt_int < timeoutDetect) {
|
||||
USBH_Process(&USB_OTG_Core, &USB_Host);
|
||||
}
|
||||
|
||||
if (USB_Host.gState != HOST_CLASS) {
|
||||
return -5; // = LIBUSB_ERROR_NOT_FOUND
|
||||
}
|
||||
|
||||
|
||||
cnt_int = 0;
|
||||
|
||||
while (cnt_int < timeoutStartup) { //let pixy's led flashing pass
|
||||
USBH_Process(&USB_OTG_Core, &USB_Host);
|
||||
}
|
||||
|
||||
return 0; //ok
|
||||
}
|
||||
|
||||
int USBH_LL_close()
|
||||
{
|
||||
USBH_Process(&USB_OTG_Core, &USB_Host);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int USBH_LL_send(const uint8_t* data, uint32_t len, uint16_t timeoutMs)
|
||||
{
|
||||
USB_OTG_CORE_HANDLE* pdev = &USB_OTG_Core;
|
||||
|
||||
if (!HCD_IsDeviceConnected(pdev)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
USBH_BulkSendData(pdev,
|
||||
(uint8_t*)data,
|
||||
len ,
|
||||
MSC_Machine.hc_num_out);
|
||||
|
||||
URB_STATE state;
|
||||
cnt_int = 0; //reset timer
|
||||
|
||||
if (timeoutMs == 0) {
|
||||
timeoutMs = 1000; //Force 1s timeout (testwise)
|
||||
}
|
||||
|
||||
while ((state = HCD_GetURB_State(pdev , MSC_Machine.hc_num_out)) == URB_IDLE &&
|
||||
(timeoutMs == 0 || cnt_int < timeoutMs));
|
||||
|
||||
if (state != URB_DONE) {
|
||||
if (timeoutMs > 0 && cnt_int >= timeoutMs) {
|
||||
STM_EVAL_LEDOn(LED3);
|
||||
return -7; //timeout (error code like with libusb)
|
||||
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
int USBH_LL_receive(uint8_t* data, uint32_t len, uint16_t timeoutMs)
|
||||
{
|
||||
|
||||
USB_OTG_CORE_HANDLE* pdev = &USB_OTG_Core;
|
||||
|
||||
if (!HCD_IsDeviceConnected(pdev)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
USBH_BulkReceiveData(pdev,
|
||||
data,
|
||||
len ,
|
||||
MSC_Machine.hc_num_in);
|
||||
|
||||
URB_STATE state;
|
||||
cnt_int = 0; //reset timer
|
||||
|
||||
if (timeoutMs == 0) {
|
||||
timeoutMs = 1000; //Force 1s timeout (testwise)
|
||||
}
|
||||
|
||||
while ((state = HCD_GetURB_State(pdev , MSC_Machine.hc_num_in)) == URB_IDLE &&
|
||||
(timeoutMs == 0 || cnt_int < timeoutMs));
|
||||
|
||||
if (state != URB_DONE) {
|
||||
if (timeoutMs > 0 && cnt_int >= timeoutMs) {
|
||||
STM_EVAL_LEDOn(LED3);
|
||||
return -7; //timeout (error code like with libusb)
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
@@ -1,27 +1,38 @@
|
||||
|
||||
/* Define to prevent recursive ----------------------------------------------*/
|
||||
#ifndef __USBH_MSC_CORE_H
|
||||
#define __USBH_MSC_CORE_H
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "usbh_core.h"
|
||||
#include "usbh_stdreq.h"
|
||||
#include "usb_bsp.h"
|
||||
#include "usbh_ioreq.h"
|
||||
#include "usbh_hcs.h"
|
||||
|
||||
|
||||
extern USBH_Class_cb_TypeDef USBH_MSC_cb;
|
||||
|
||||
void USBH_LL_systick();
|
||||
int USBH_LL_open();
|
||||
int USBH_LL_close();
|
||||
int USBH_LL_send(const uint8_t *data, uint32_t len, uint16_t timeoutMs);
|
||||
int USBH_LL_receive(uint8_t *data, uint32_t len, uint16_t timeoutMs);
|
||||
void USBH_LL_setTimer();
|
||||
uint32_t USBH_LL_getTimer();
|
||||
|
||||
|
||||
#endif /* __USBH_MSC_CORE_H */
|
||||
|
||||
|
||||
/**************************************************************************************************************************************
|
||||
* Project: discoverpixy
|
||||
* Website: https://github.com/t-moe/discoverpixy
|
||||
* Authors: Aaron Schmocker, Timo Lang
|
||||
* Institution: BFH Bern University of Applied Sciences
|
||||
* File: discovery/src/usbh_msc_core.h
|
||||
*
|
||||
* Version History:
|
||||
* Date Autor Email SHA Changes
|
||||
* 2015-04-03 timolang@gmail.com 21dd1e2 Starting to integrate usb branch. Optimized Makefiles
|
||||
*
|
||||
**************************************************************************************************************************************/
|
||||
|
||||
|
||||
/* Define to prevent recursive ----------------------------------------------*/
|
||||
#ifndef __USBH_MSC_CORE_H
|
||||
#define __USBH_MSC_CORE_H
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "usbh_core.h"
|
||||
#include "usbh_stdreq.h"
|
||||
#include "usb_bsp.h"
|
||||
#include "usbh_ioreq.h"
|
||||
#include "usbh_hcs.h"
|
||||
|
||||
|
||||
extern USBH_Class_cb_TypeDef USBH_MSC_cb;
|
||||
|
||||
void USBH_LL_systick();
|
||||
int USBH_LL_open();
|
||||
int USBH_LL_close();
|
||||
int USBH_LL_send(const uint8_t* data, uint32_t len, uint16_t timeoutMs);
|
||||
int USBH_LL_receive(uint8_t* data, uint32_t len, uint16_t timeoutMs);
|
||||
void USBH_LL_setTimer();
|
||||
uint32_t USBH_LL_getTimer();
|
||||
|
||||
|
||||
#endif /* __USBH_MSC_CORE_H */
|
||||
|
||||
@@ -1,229 +1,245 @@
|
||||
#include "usbh_usr.h"
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
USBH_Usr_cb_TypeDef USR_Callbacks =
|
||||
{
|
||||
USBH_USR_Init,
|
||||
USBH_USR_DeInit,
|
||||
USBH_USR_DeviceAttached,
|
||||
USBH_USR_ResetDevice,
|
||||
USBH_USR_DeviceDisconnected,
|
||||
USBH_USR_OverCurrentDetected,
|
||||
USBH_USR_DeviceSpeedDetected,
|
||||
USBH_USR_Device_DescAvailable,
|
||||
USBH_USR_DeviceAddressAssigned,
|
||||
USBH_USR_Configuration_DescAvailable,
|
||||
USBH_USR_Manufacturer_String,
|
||||
USBH_USR_Product_String,
|
||||
USBH_USR_SerialNum_String,
|
||||
USBH_USR_EnumerationDone,
|
||||
USBH_USR_UserInput,
|
||||
USBH_USR_MSC_Application,
|
||||
USBH_USR_DeviceNotSupported,
|
||||
USBH_USR_UnrecoveredError
|
||||
};
|
||||
|
||||
|
||||
/* Private function prototypes -----------------------------------------------*/
|
||||
/* Private functions ---------------------------------------------------------*/
|
||||
bool manufacturer_ok;
|
||||
bool product_ok;
|
||||
bool serial_ok;
|
||||
|
||||
/**
|
||||
* @brief USBH_USR_Init
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
void USBH_USR_Init(void)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USBH_USR_DeviceAttached
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
void USBH_USR_DeviceAttached(void)
|
||||
{
|
||||
manufacturer_ok=false;
|
||||
product_ok= false;
|
||||
serial_ok=false;
|
||||
|
||||
STM_EVAL_LEDOff(LED3);
|
||||
STM_EVAL_LEDOn(LED4);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USBH_USR_UnrecoveredError
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
void USBH_USR_UnrecoveredError (void)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USBH_DisconnectEvent
|
||||
* Device disconnect event
|
||||
* @param None
|
||||
* @retval Staus
|
||||
*/
|
||||
void USBH_USR_DeviceDisconnected (void)
|
||||
{
|
||||
STM_EVAL_LEDOff(LED4);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USBH_USR_ResetUSBDevice
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
void USBH_USR_ResetDevice(void)
|
||||
{
|
||||
/* callback for USB-Reset */
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief USBH_USR_DeviceSpeedDetected
|
||||
* Displays the message on LCD for device speed
|
||||
* @param Device speed:
|
||||
* @retval None
|
||||
*/
|
||||
void USBH_USR_DeviceSpeedDetected(uint8_t DeviceSpeed)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USBH_USR_Device_DescAvailable
|
||||
* @param device descriptor
|
||||
* @retval None
|
||||
*/
|
||||
void USBH_USR_Device_DescAvailable(void *DeviceDesc)
|
||||
{
|
||||
/* callback for device descriptor */
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USBH_USR_DeviceAddressAssigned
|
||||
* USB device is successfully assigned the Address
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
void USBH_USR_DeviceAddressAssigned(void)
|
||||
{
|
||||
/* callback for device successfully assigned the Address */
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USBH_USR_Conf_Desc
|
||||
* @param Configuration descriptor
|
||||
* @retval None
|
||||
*/
|
||||
void USBH_USR_Configuration_DescAvailable(USBH_CfgDesc_TypeDef * cfgDesc,
|
||||
USBH_InterfaceDesc_TypeDef *itfDesc,
|
||||
USBH_EpDesc_TypeDef *epDesc)
|
||||
{
|
||||
/* callback for configuration descriptor */
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USBH_USR_Manufacturer_String
|
||||
* @param Manufacturer String
|
||||
* @retval None
|
||||
*/
|
||||
void USBH_USR_Manufacturer_String(void *ManufacturerString)
|
||||
{
|
||||
manufacturer_ok = strcmp((char*)ManufacturerString,"Charmed Labs") == 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USBH_USR_Product_String
|
||||
* @param Product String
|
||||
* @retval None
|
||||
*/
|
||||
void USBH_USR_Product_String(void *ProductString)
|
||||
{
|
||||
product_ok = strcmp((char*)ProductString,"Pixy") == 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USBH_USR_SerialNum_String
|
||||
* @param SerialNum_String
|
||||
* @retval None
|
||||
*/
|
||||
void USBH_USR_SerialNum_String(void *SerialNumString)
|
||||
{
|
||||
serial_ok = strcmp((char*)SerialNumString,"DEMO 0.0") == 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief EnumerationDone
|
||||
* User response request is displayed to ask application jump to class
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
void USBH_USR_EnumerationDone(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USBH_USR_DeviceNotSupported
|
||||
* Device is not supported
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
void USBH_USR_DeviceNotSupported(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief USBH_USR_UserInput
|
||||
* User Action for application state entry
|
||||
* @param None
|
||||
* @retval USBH_USR_Status : User response for key button
|
||||
*/
|
||||
USBH_USR_Status USBH_USR_UserInput(void)
|
||||
{
|
||||
if(product_ok&&manufacturer_ok&&serial_ok) {
|
||||
return USBH_USR_RESP_OK;
|
||||
}
|
||||
return USBH_USR_NO_RESP;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USBH_USR_OverCurrentDetected
|
||||
* Over Current Detected on VBUS
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
void USBH_USR_OverCurrentDetected (void)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USBH_USR_MSC_Application
|
||||
* @param None
|
||||
* @retval Staus
|
||||
*/
|
||||
int USBH_USR_MSC_Application(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USBH_USR_DeInit
|
||||
* Deint User state and associated variables
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
void USBH_USR_DeInit(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**************************************************************************************************************************************
|
||||
* Project: discoverpixy
|
||||
* Website: https://github.com/t-moe/discoverpixy
|
||||
* Authors: Aaron Schmocker, Timo Lang
|
||||
* Institution: BFH Bern University of Applied Sciences
|
||||
* File: discovery/src/usbh_usr.c
|
||||
*
|
||||
* Version History:
|
||||
* Date Autor Email SHA Changes
|
||||
* 2015-04-03 timolang@gmail.com 21dd1e2 Starting to integrate usb branch. Optimized Makefiles
|
||||
* 2015-04-03 timolang@gmail.com 9a1d12a Refactored discovery, to use new project structure. Almost ready.
|
||||
* 2015-04-25 timolang@gmail.com 416883c Pixy&Usb work with the new folder structure now.
|
||||
* 2015-04-25 timolang@gmail.com 3d1e4b2 Simplified code a bit. Emulator does not work stable when replugging pixy.
|
||||
* 2015-06-02 timolang@gmail.com 16bfdad Removed conflicting led usage from usb code.
|
||||
*
|
||||
**************************************************************************************************************************************/
|
||||
|
||||
#include "usbh_usr.h"
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
USBH_Usr_cb_TypeDef USR_Callbacks = {
|
||||
USBH_USR_Init,
|
||||
USBH_USR_DeInit,
|
||||
USBH_USR_DeviceAttached,
|
||||
USBH_USR_ResetDevice,
|
||||
USBH_USR_DeviceDisconnected,
|
||||
USBH_USR_OverCurrentDetected,
|
||||
USBH_USR_DeviceSpeedDetected,
|
||||
USBH_USR_Device_DescAvailable,
|
||||
USBH_USR_DeviceAddressAssigned,
|
||||
USBH_USR_Configuration_DescAvailable,
|
||||
USBH_USR_Manufacturer_String,
|
||||
USBH_USR_Product_String,
|
||||
USBH_USR_SerialNum_String,
|
||||
USBH_USR_EnumerationDone,
|
||||
USBH_USR_UserInput,
|
||||
USBH_USR_MSC_Application,
|
||||
USBH_USR_DeviceNotSupported,
|
||||
USBH_USR_UnrecoveredError
|
||||
};
|
||||
|
||||
|
||||
/* Private function prototypes -----------------------------------------------*/
|
||||
/* Private functions ---------------------------------------------------------*/
|
||||
bool manufacturer_ok;
|
||||
bool product_ok;
|
||||
bool serial_ok;
|
||||
|
||||
/**
|
||||
* @brief USBH_USR_Init
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
void USBH_USR_Init(void)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USBH_USR_DeviceAttached
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
void USBH_USR_DeviceAttached(void)
|
||||
{
|
||||
manufacturer_ok = false;
|
||||
product_ok = false;
|
||||
serial_ok = false;
|
||||
|
||||
STM_EVAL_LEDOff(LED3);
|
||||
STM_EVAL_LEDOn(LED4);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USBH_USR_UnrecoveredError
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
void USBH_USR_UnrecoveredError(void)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USBH_DisconnectEvent
|
||||
* Device disconnect event
|
||||
* @param None
|
||||
* @retval Staus
|
||||
*/
|
||||
void USBH_USR_DeviceDisconnected(void)
|
||||
{
|
||||
STM_EVAL_LEDOff(LED4);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USBH_USR_ResetUSBDevice
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
void USBH_USR_ResetDevice(void)
|
||||
{
|
||||
/* callback for USB-Reset */
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief USBH_USR_DeviceSpeedDetected
|
||||
* Displays the message on LCD for device speed
|
||||
* @param Device speed:
|
||||
* @retval None
|
||||
*/
|
||||
void USBH_USR_DeviceSpeedDetected(uint8_t DeviceSpeed)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USBH_USR_Device_DescAvailable
|
||||
* @param device descriptor
|
||||
* @retval None
|
||||
*/
|
||||
void USBH_USR_Device_DescAvailable(void* DeviceDesc)
|
||||
{
|
||||
/* callback for device descriptor */
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USBH_USR_DeviceAddressAssigned
|
||||
* USB device is successfully assigned the Address
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
void USBH_USR_DeviceAddressAssigned(void)
|
||||
{
|
||||
/* callback for device successfully assigned the Address */
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USBH_USR_Conf_Desc
|
||||
* @param Configuration descriptor
|
||||
* @retval None
|
||||
*/
|
||||
void USBH_USR_Configuration_DescAvailable(USBH_CfgDesc_TypeDef* cfgDesc,
|
||||
USBH_InterfaceDesc_TypeDef* itfDesc,
|
||||
USBH_EpDesc_TypeDef* epDesc)
|
||||
{
|
||||
/* callback for configuration descriptor */
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USBH_USR_Manufacturer_String
|
||||
* @param Manufacturer String
|
||||
* @retval None
|
||||
*/
|
||||
void USBH_USR_Manufacturer_String(void* ManufacturerString)
|
||||
{
|
||||
manufacturer_ok = strcmp((char*)ManufacturerString, "Charmed Labs") == 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USBH_USR_Product_String
|
||||
* @param Product String
|
||||
* @retval None
|
||||
*/
|
||||
void USBH_USR_Product_String(void* ProductString)
|
||||
{
|
||||
product_ok = strcmp((char*)ProductString, "Pixy") == 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USBH_USR_SerialNum_String
|
||||
* @param SerialNum_String
|
||||
* @retval None
|
||||
*/
|
||||
void USBH_USR_SerialNum_String(void* SerialNumString)
|
||||
{
|
||||
serial_ok = strcmp((char*)SerialNumString, "DEMO 0.0") == 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief EnumerationDone
|
||||
* User response request is displayed to ask application jump to class
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
void USBH_USR_EnumerationDone(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USBH_USR_DeviceNotSupported
|
||||
* Device is not supported
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
void USBH_USR_DeviceNotSupported(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief USBH_USR_UserInput
|
||||
* User Action for application state entry
|
||||
* @param None
|
||||
* @retval USBH_USR_Status : User response for key button
|
||||
*/
|
||||
USBH_USR_Status USBH_USR_UserInput(void)
|
||||
{
|
||||
if (product_ok && manufacturer_ok && serial_ok) {
|
||||
return USBH_USR_RESP_OK;
|
||||
}
|
||||
|
||||
return USBH_USR_NO_RESP;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USBH_USR_OverCurrentDetected
|
||||
* Over Current Detected on VBUS
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
void USBH_USR_OverCurrentDetected(void)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USBH_USR_MSC_Application
|
||||
* @param None
|
||||
* @retval Staus
|
||||
*/
|
||||
int USBH_USR_MSC_Application(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief USBH_USR_DeInit
|
||||
* Deint User state and associated variables
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
void USBH_USR_DeInit(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -1,51 +1,60 @@
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __USH_USR_H__
|
||||
#define __USH_USR_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32f4_discovery.h"
|
||||
#include "usbh_core.h"
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
/* Exported macros -----------------------------------------------------------*/
|
||||
/* Exported variables --------------------------------------------------------*/
|
||||
extern USBH_Usr_cb_TypeDef USR_Callbacks;
|
||||
|
||||
/* Exported functions ------------------------------------------------------- */
|
||||
void USBH_USR_Init(void);
|
||||
void USBH_USR_DeviceAttached(void);
|
||||
void USBH_USR_ResetDevice(void);
|
||||
void USBH_USR_DeviceDisconnected (void);
|
||||
void USBH_USR_OverCurrentDetected (void);
|
||||
void USBH_USR_DeviceSpeedDetected(uint8_t DeviceSpeed);
|
||||
void USBH_USR_Device_DescAvailable(void *);
|
||||
void USBH_USR_DeviceAddressAssigned(void);
|
||||
void USBH_USR_Configuration_DescAvailable(USBH_CfgDesc_TypeDef * cfgDesc,
|
||||
USBH_InterfaceDesc_TypeDef *itfDesc,
|
||||
USBH_EpDesc_TypeDef *epDesc);
|
||||
void USBH_USR_Manufacturer_String(void *);
|
||||
void USBH_USR_Product_String(void *);
|
||||
void USBH_USR_SerialNum_String(void *);
|
||||
void USBH_USR_EnumerationDone(void);
|
||||
USBH_USR_Status USBH_USR_UserInput(void);
|
||||
int USBH_USR_MSC_Application(void);
|
||||
void USBH_USR_DeInit(void);
|
||||
void USBH_USR_DeviceNotSupported(void);
|
||||
void USBH_USR_UnrecoveredError(void);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /*__USH_USR_H__*/
|
||||
|
||||
/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
|
||||
|
||||
|
||||
|
||||
|
||||
/**************************************************************************************************************************************
|
||||
* Project: discoverpixy
|
||||
* Website: https://github.com/t-moe/discoverpixy
|
||||
* Authors: Aaron Schmocker, Timo Lang
|
||||
* Institution: BFH Bern University of Applied Sciences
|
||||
* File: discovery/src/usbh_usr.h
|
||||
*
|
||||
* Version History:
|
||||
* Date Autor Email SHA Changes
|
||||
* 2015-04-03 timolang@gmail.com 21dd1e2 Starting to integrate usb branch. Optimized Makefiles
|
||||
*
|
||||
**************************************************************************************************************************************/
|
||||
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __USH_USR_H__
|
||||
#define __USH_USR_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32f4_discovery.h"
|
||||
#include "usbh_core.h"
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
/* Exported macros -----------------------------------------------------------*/
|
||||
/* Exported variables --------------------------------------------------------*/
|
||||
extern USBH_Usr_cb_TypeDef USR_Callbacks;
|
||||
|
||||
/* Exported functions ------------------------------------------------------- */
|
||||
void USBH_USR_Init(void);
|
||||
void USBH_USR_DeviceAttached(void);
|
||||
void USBH_USR_ResetDevice(void);
|
||||
void USBH_USR_DeviceDisconnected(void);
|
||||
void USBH_USR_OverCurrentDetected(void);
|
||||
void USBH_USR_DeviceSpeedDetected(uint8_t DeviceSpeed);
|
||||
void USBH_USR_Device_DescAvailable(void*);
|
||||
void USBH_USR_DeviceAddressAssigned(void);
|
||||
void USBH_USR_Configuration_DescAvailable(USBH_CfgDesc_TypeDef* cfgDesc,
|
||||
USBH_InterfaceDesc_TypeDef* itfDesc,
|
||||
USBH_EpDesc_TypeDef* epDesc);
|
||||
void USBH_USR_Manufacturer_String(void*);
|
||||
void USBH_USR_Product_String(void*);
|
||||
void USBH_USR_SerialNum_String(void*);
|
||||
void USBH_USR_EnumerationDone(void);
|
||||
USBH_USR_Status USBH_USR_UserInput(void);
|
||||
int USBH_USR_MSC_Application(void);
|
||||
void USBH_USR_DeInit(void);
|
||||
void USBH_USR_DeviceNotSupported(void);
|
||||
void USBH_USR_UnrecoveredError(void);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /*__USH_USR_H__*/
|
||||
|
||||
/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
|
||||
|
||||
Reference in New Issue
Block a user