summaryrefslogtreecommitdiff
path: root/components/slcd
diff options
context:
space:
mode:
Diffstat (limited to 'components/slcd')
-rw-r--r--components/slcd/s7leklcd/s7leklcd.c271
-rw-r--r--components/slcd/s7leklcd/s7leklcd.dir40
-rw-r--r--components/slcd/s7leklcd/s7leklcd.h321
-rw-r--r--components/slcd/s7lstklcd/font.h71
-rw-r--r--components/slcd/s7lstklcd/font1.c306
-rw-r--r--components/slcd/s7lstklcd/s7lstklcd.c187
-rw-r--r--components/slcd/s7lstklcd/s7lstklcd.dir40
-rw-r--r--components/slcd/s7lstklcd/s7lstklcd.h83
8 files changed, 1319 insertions, 0 deletions
diff --git a/components/slcd/s7leklcd/s7leklcd.c b/components/slcd/s7leklcd/s7leklcd.c
new file mode 100644
index 0000000..aa3c894
--- /dev/null
+++ b/components/slcd/s7leklcd/s7leklcd.c
@@ -0,0 +1,271 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+//------------------------------------------------------------------------------
+// Headers
+//------------------------------------------------------------------------------
+
+#include "s7leklcd.h"
+#include <board.h>
+#include <utility/assert.h>
+
+//------------------------------------------------------------------------------
+// Local variables
+//------------------------------------------------------------------------------
+
+/// List of the 26 SLCD upper chars ( A ~ Z )
+static const unsigned short pLcdUpperChars[26] = {
+ S7LEKLCD_A, S7LEKLCD_B, S7LEKLCD_C, S7LEKLCD_D,
+ S7LEKLCD_E, S7LEKLCD_F, S7LEKLCD_G, S7LEKLCD_H,
+ S7LEKLCD_I, S7LEKLCD_J, S7LEKLCD_K, S7LEKLCD_L,
+ S7LEKLCD_M, S7LEKLCD_N, S7LEKLCD_O, S7LEKLCD_P,
+ S7LEKLCD_Q, S7LEKLCD_R, S7LEKLCD_S, S7LEKLCD_T,
+ S7LEKLCD_U, S7LEKLCD_V, S7LEKLCD_W, S7LEKLCD_X,
+ S7LEKLCD_Y, S7LEKLCD_Z
+};
+
+/// List of the 26 SLCD lower chars ( a ~ z )
+static const unsigned short pLcdLowerChars[26] = {
+ S7LEKLCD_a, S7LEKLCD_b, S7LEKLCD_c, S7LEKLCD_d,
+ S7LEKLCD_e, S7LEKLCD_f, S7LEKLCD_g, S7LEKLCD_h,
+ S7LEKLCD_i, S7LEKLCD_j, S7LEKLCD_k, S7LEKLCD_l,
+ S7LEKLCD_m, S7LEKLCD_n, S7LEKLCD_o, S7LEKLCD_p,
+ S7LEKLCD_q, S7LEKLCD_r, S7LEKLCD_s, S7LEKLCD_t,
+ S7LEKLCD_u, S7LEKLCD_v, S7LEKLCD_w, S7LEKLCD_x,
+ S7LEKLCD_y, S7LEKLCD_z
+};
+
+/// List of the 10 SLCD numbers ( 0 ~ 9 )
+static const unsigned short pLcdNumbers[10] = {
+ S7LEKLCD_0, S7LEKLCD_1, S7LEKLCD_2, S7LEKLCD_3,
+ S7LEKLCD_4, S7LEKLCD_5, S7LEKLCD_6, S7LEKLCD_7,
+ S7LEKLCD_8, S7LEKLCD_9
+};
+
+//------------------------------------------------------------------------------
+// Local functions
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+/// Returns the LCD character code to display given an input character.
+/// \param c Character to display.
+/// \param dot Indicates if the character should be dotted or not.
+//------------------------------------------------------------------------------
+static unsigned short GetSLcdChar(unsigned char c, unsigned char dot)
+{
+ unsigned short symbol = 0;
+
+ // Add dot if needed
+ if (dot) {
+
+ symbol = S7LEKLCD_DOT;
+ }
+
+ // Find corresponding symbol for character
+ // Space
+ if (c == ' ') {
+
+ symbol |= S7LEKLCD_NONE;
+ }
+ // Single dot
+ else if (c == '.') {
+
+ symbol |= S7LEKLCD_NONE | S7LEKLCD_DOT;
+ }
+ // Number
+ else if ((c >= '0') && (c <= '9')) {
+
+ symbol |= pLcdNumbers[c - '0'];
+ }
+ // Lower-case letter
+ else if ((c >= 'a') && (c <= 'z')) {
+
+ symbol |= pLcdLowerChars[c - 'a'];
+ }
+ // Upper case letter
+ else if ((c >= 'A') && (c <= 'Z')) {
+
+ symbol |= pLcdUpperChars[c - 'A'];
+ }
+ // Special characters
+ else {
+ switch (c) {
+ case '+': symbol |= S7LEKLCD_PLUS; break;
+ case '-': symbol |= S7LEKLCD_MINUS; break;
+ case '=': symbol |= S7LEKLCD_EQUAL; break;
+ case '>': symbol |= S7LEKLCD_LARGE; break;
+ case '<': symbol |= S7LEKLCD_LESS; break;
+ case '\\': symbol |= S7LEKLCD_SLASH; break;
+ case '/': symbol |= S7LEKLCD_BACKSLASH; break;
+ case '$': symbol |= S7LEKLCD_DOLLAR; break;
+ case '|': symbol |= S7LEKLCD_OR; break;
+ case ',': symbol |= S7LEKLCD_COMMA; break;
+ case '\'': symbol |= S7LEKLCD_INVCOMMA1; break;
+ case '"': symbol |= S7LEKLCD_INVCOMMA2; break;
+ case '_': symbol |= D; break;
+ default: symbol = S7LEKLCD_NONE;
+ }
+ }
+
+ return symbol;
+}
+
+//------------------------------------------------------------------------------
+// Global functions
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+/// Switches a symbol of the LCD on or off.
+/// \param symbol Symbol Index in the LCD buffer matrix.
+/// \param set If 1, the symbol is turned on; otherwise it is turned off.
+//------------------------------------------------------------------------------
+void S7LEKLCD_Symbol(unsigned short symbol, unsigned char set)
+{
+ unsigned int common = symbol / 40;
+ unsigned int reg = (symbol % 40) / 32;
+ unsigned int bit = (symbol % 40) % 32;
+
+ if (set) {
+
+ AT91C_BASE_SLCDC->SLCDC_MEM[common * 2 + reg] |= 1 << bit;
+ }
+ else {
+
+ AT91C_BASE_SLCDC->SLCDC_MEM[common * 2 + reg] &= ~(1 << bit);
+ }
+}
+
+//------------------------------------------------------------------------------
+/// Switches a pixel of the matrix on or off.
+/// \param x Horizontal pixel coordinate.
+/// \param y Vertical pixel coordinate.
+/// \param set If true, the pixel is switched on; otherwise it is switched off.
+//------------------------------------------------------------------------------
+void S7LEKLCD_Pixel(unsigned char x, unsigned char y, unsigned char set)
+{
+ SANITY_CHECK(x < 12);
+ SANITY_CHECK(y < 10);
+
+ S7LEKLCD_Symbol((x + 1) + (40 * (9 - y)), set);
+}
+
+//------------------------------------------------------------------------------
+/// Displays a character at the given position on the LCD.
+/// \param c Character definition.
+/// \param index Position of the character on the LCD ([0...11]).
+//------------------------------------------------------------------------------
+void S7LEKLCD_Char(unsigned short c, unsigned char index)
+{
+ SANITY_CHECK(index < 12);
+
+ S7LEKLCD_Symbol((40 * 2) + 37 - index * 2 , (c & A) != 0);
+ S7LEKLCD_Symbol((40 * 4) + 37 - index * 2 , (c & B) != 0);
+ S7LEKLCD_Symbol((40 * 6) + 37 - index * 2 , (c & C) != 0);
+ S7LEKLCD_Symbol((40 * 8) + 38 - index * 2 , (c & D) != 0);
+ S7LEKLCD_Symbol((40 * 6) + 38 - index * 2 , (c & E) != 0);
+ S7LEKLCD_Symbol((40 * 4) + 38 - index * 2 , (c & F) != 0);
+ S7LEKLCD_Symbol((40 * 5) + 38 - index * 2 , (c & G) != 0);
+ S7LEKLCD_Symbol((40 * 5) + 37 - index * 2 , (c & H) != 0);
+ S7LEKLCD_Symbol((40 * 3) + 38 - index * 2 , (c & I) != 0);
+ S7LEKLCD_Symbol((40 * 2) + 38 - index * 2 , (c & J) != 0);
+ S7LEKLCD_Symbol((40 * 3) + 37 - index * 2 , (c & K) != 0);
+ S7LEKLCD_Symbol((40 * 7) + 38 - index * 2 , (c & L) != 0);
+ S7LEKLCD_Symbol((40 * 8) + 37 - index * 2 , (c & M) != 0);
+ S7LEKLCD_Symbol((40 * 7) + 37 - index * 2 , (c & N) != 0);
+ S7LEKLCD_Symbol((40 * 9) + 37 - index * 2 , (c & P) != 0);
+}
+
+//------------------------------------------------------------------------------
+/// Displays a clock number at the given position.
+/// \param c Number definition.
+/// \param index Position of the character to be displayed ([0..3]).
+//------------------------------------------------------------------------------
+void S7LEKLCD_ClockNumber(unsigned short c, unsigned char index)
+{
+ SANITY_CHECK(index < 4);
+
+ S7LEKLCD_Symbol((40 * 0) + 30 - index * 4 , (c & A) != 0);
+ S7LEKLCD_Symbol((40 * 0) + 29 - index * 4 , (c & B) != 0);
+ S7LEKLCD_Symbol((40 * 0) + 27 - index * 4 , (c & C) != 0);
+ S7LEKLCD_Symbol((40 * 1) + 27 - index * 4 , (c & D) != 0);
+ S7LEKLCD_Symbol((40 * 1) + 28 - index * 4 , (c & E) != 0);
+ S7LEKLCD_Symbol((40 * 1) + 29 - index * 4 , (c & F) != 0);
+ S7LEKLCD_Symbol((40 * 0) + 28 - index * 4 , (c & G) != 0);
+}
+
+//------------------------------------------------------------------------------
+/// Displays a string on the SLCD starting at the specified character index.
+/// \param pString String to display.
+/// \param index Starting index of string.
+//------------------------------------------------------------------------------
+void S7LEKLCD_PutString(const char *pString, unsigned char index)
+{
+ unsigned char i;
+ unsigned char j;
+ unsigned char dot;
+
+ // Clear characters before index
+ for (i=0; i < index; i++) {
+
+ S7LEKLCD_Char(S7LEKLCD_NONE, i);
+ }
+
+ // Display string
+ j = 0;
+ dot = 0;
+ while ((i < S7LEKLCD_MAX_CHARS) && (pString[j] != 0)) {
+
+ // Check if next character is a dot
+ if (pString[j+1] == '.') {
+
+ dot = 1;
+ }
+
+ // Skip dots
+ if (pString[j] == '.') {
+
+ j++;
+ }
+ // Display character
+ else {
+
+ S7LEKLCD_Char(GetSLcdChar(pString[j], dot), i);
+ dot = 0;
+ i++;
+ j++;
+ }
+ }
+
+ // Clear characters at end of string
+ for (; i < S7LEKLCD_MAX_CHARS; i++) {
+
+ S7LEKLCD_Char(S7LEKLCD_NONE, i);
+ }
+}
+
diff --git a/components/slcd/s7leklcd/s7leklcd.dir b/components/slcd/s7leklcd/s7leklcd.dir
new file mode 100644
index 0000000..0b88b5d
--- /dev/null
+++ b/components/slcd/s7leklcd/s7leklcd.dir
@@ -0,0 +1,40 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+//------------------------------------------------------------------------------
+/// \dir
+///
+/// !!!Purpose
+///
+/// This directory contains APIs for segment LCD display of AT91SAM7L-EK board.
+///
+/// !!!Contents
+///
+/// Contains code for display symbol, pixel of the matrix, char, clock number and string.
+//------------------------------------------------------------------------------ \ No newline at end of file
diff --git a/components/slcd/s7leklcd/s7leklcd.h b/components/slcd/s7leklcd/s7leklcd.h
new file mode 100644
index 0000000..336ee47
--- /dev/null
+++ b/components/slcd/s7leklcd/s7leklcd.h
@@ -0,0 +1,321 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+//------------------------------------------------------------------------------
+/// \unit
+///
+/// !!!Purpose
+///
+/// Interface for displaying on segment LCD of AT91SAM7L-EK board..
+///
+/// !!!Usage
+///
+/// -# call corresponding function to display symbol, pixel of the matrix, char,
+/// clock number and string.
+//------------------------------------------------------------------------------
+
+#ifndef _S7LEKLCD_H
+#define _S7LEKLCD_H
+
+//------------------------------------------------------------------------------
+// Global Constants
+//------------------------------------------------------------------------------
+
+/// Maximum number of characters that can be displayed on the LCD.
+#define S7LEKLCD_MAX_CHARS 12
+
+//------------------------------------------------------------------------------
+/// \page "SAM7L-EK SLCD Segments"
+/// This page lists the segment constants used to describe letters on the
+/// SAM7L-EK segment LCD display.
+///
+/// !Constants
+/// - A
+/// - B
+/// - C
+/// - D
+/// - E
+/// - F
+/// - G
+/// - H
+/// - I
+/// - J
+/// - K
+/// - L
+/// - M
+/// - N
+/// - P
+
+/// A segment definition.
+#define A (1 << 0)
+/// B segment definition.
+#define B (1 << 1)
+/// C segment definition.
+#define C (1 << 2)
+/// D segment definition.
+#define D (1 << 3)
+/// E segment definition.
+#define E (1 << 4)
+/// F segment definition.
+#define F (1 << 5)
+/// G segment definition.
+#define G (1 << 6)
+/// H segment definition.
+#define H (1 << 7)
+/// I segment definition.
+#define I (1 << 8)
+/// J segment definition.
+#define J (1 << 9)
+/// K segment definition.
+#define K (1 << 10)
+/// L segment definition.
+#define L (1 << 11)
+/// M segment definition.
+#define M (1 << 12)
+/// N segment definition.
+#define N (1 << 13)
+/// P segment definition.
+#define P (1 << 14)
+//------------------------------------------------------------------------------
+
+/// Enables all the segments of one LCD slot.
+#define S7LEKLCD_ALL (A | B | C | D | E | F | G | H | I |J | K | L | M | N)
+/// Disables all the segments of one LCD slot.
+#define S7LEKLCD_NONE 0
+/// Dot definition.
+#define S7LEKLCD_DOT P
+
+// Upper-case letters.
+#define S7LEKLCD_A (A | B | C | E | F | G | H)
+#define S7LEKLCD_B (A | B | C | D | H | J | M)
+#define S7LEKLCD_C (A | D | E | F)
+#define S7LEKLCD_D (A | B | C | D | J | M)
+#define S7LEKLCD_E (A | D | E | F | G | H)
+#define S7LEKLCD_F (A | E | F | G | H)
+#define S7LEKLCD_G (A | C | D | E | F | H)
+#define S7LEKLCD_H (B | C | E | F | G | H)
+#define S7LEKLCD_I (A | J | M | D)
+#define S7LEKLCD_J (B | C | D | E)
+#define S7LEKLCD_K (E | F | G | K | N)
+#define S7LEKLCD_L (D | E | F )
+#define S7LEKLCD_M (B | C | E | F | I | K )
+#define S7LEKLCD_N (B | C | E | F | I | N)
+#define S7LEKLCD_O (A | B | C | D | E | F)
+#define S7LEKLCD_P (A | B | E | F | G | H)
+#define S7LEKLCD_Q (A | B | C | D | E | F | N)
+#define S7LEKLCD_R (A | B | E | F | G | H | N)
+#define S7LEKLCD_S (A | C | D | F | G | H)
+#define S7LEKLCD_T (A | J | M )
+#define S7LEKLCD_U (B | C | D | E | F)
+#define S7LEKLCD_V (E | F | K | L)
+#define S7LEKLCD_W (B | C | E | F | J | L | N)
+#define S7LEKLCD_X (I | K | L | N)
+#define S7LEKLCD_Y (I | K | M)
+#define S7LEKLCD_Z (A | D | K | L)
+
+// Lower-case letters.
+#define S7LEKLCD_a (D | E | G | M)
+#define S7LEKLCD_b (E | F | G | L)
+#define S7LEKLCD_c (D | E | G )
+#define S7LEKLCD_d (B | C | H | N)
+#define S7LEKLCD_e (D | E | G | L)
+#define S7LEKLCD_f (A | E | F | G)
+#define S7LEKLCD_g (A | B | C | D | H | J)
+#define S7LEKLCD_h (E | F | G | M)
+#define S7LEKLCD_i (M)
+#define S7LEKLCD_j (J | L)
+#define S7LEKLCD_k (J | K | M | N)
+#define S7LEKLCD_l (J | M )
+#define S7LEKLCD_m (C | E | G | H | M)
+#define S7LEKLCD_n (C | E | G | H)
+#define S7LEKLCD_o (C | D | E | G | H)
+#define S7LEKLCD_p (A | E | F | G | K)
+#define S7LEKLCD_q (A | B | C | F | H | I)
+#define S7LEKLCD_r (J | K | M)
+#define S7LEKLCD_s (D | H | N)
+#define S7LEKLCD_t (G | H | J | N)
+#define S7LEKLCD_u (C | D | E)
+#define S7LEKLCD_v (E | H | L)
+#define S7LEKLCD_w (C | E | L | N)
+#define S7LEKLCD_x (I | J | L | N)
+#define S7LEKLCD_y (I | K | L)
+#define S7LEKLCD_z (D | G | L)
+
+// Numbers.
+#define S7LEKLCD_0 (A | B | C | D | E | F)
+#define S7LEKLCD_1 (J | M)
+#define S7LEKLCD_2 (A | B | D | E | G | H)
+#define S7LEKLCD_3 (A | B | C | D | G | H)
+#define S7LEKLCD_4 (F | G | H | J | M)
+#define S7LEKLCD_5 (A | C | D | F | G | H)
+#define S7LEKLCD_6 (A | C | D | E | F | G| H)
+#define S7LEKLCD_7 (A | B | C)
+#define S7LEKLCD_8 (A | B | C | D | E | F | G | H)
+#define S7LEKLCD_9 (A | B | C | D | F | G | H)
+
+// Clock numbers.
+#define S7LEKLCD_C0 (A | B | C | D | E | F)
+#define S7LEKLCD_C1 (B | C)
+#define S7LEKLCD_C2 (A | B | D | E | G )
+#define S7LEKLCD_C3 (A | B | C | D | G )
+#define S7LEKLCD_C4 (B | C | F | G)
+#define S7LEKLCD_C5 (A | C | D | F | G )
+#define S7LEKLCD_C6 (A | C | D | E | F | G)
+#define S7LEKLCD_C7 (A | B | C)
+#define S7LEKLCD_C8 (A | B | C | D | E | F | G )
+#define S7LEKLCD_C9 (A | B | C | D | F | G )
+
+// Symbols
+#define S7LEKLCD_PLUS (G | H | J | M)
+#define S7LEKLCD_MINUS (G | H)
+#define S7LEKLCD_LARGE (I | L)
+#define S7LEKLCD_LESS (K | N)
+#define S7LEKLCD_SLASH (K | L)
+#define S7LEKLCD_BACKSLASH (I | M)
+#define S7LEKLCD_DOLLAR (A | C | D | F | G | H | J | M)
+#define S7LEKLCD_OR (J | M)
+#define S7LEKLCD_COMMA L
+#define S7LEKLCD_UNDERSCORE D
+#define S7LEKLCD_INVCOMMA1 I
+#define S7LEKLCD_INVCOMMA2 K
+#define S7LEKLCD_EQUAL (D | G |H)
+#define S7LEKLCD_MULTIPLY (G | H | I | J | K | L | M | N)
+#define S7LEKLCD_AT (A | B | C | D | E | G |M)
+
+/// Symbols definitions
+/// Each symbol is defined by the bit offset in the 400 bits matrix
+#define S7LEKLCD_ARROW1 (40 * 0 )
+#define S7LEKLCD_ARROW2 (40 * 1 )
+#define S7LEKLCD_ARROW3 (40 * 2 )
+#define S7LEKLCD_Q2 (40 * 3 )
+#define S7LEKLCD_Q1 (40 * 4 )
+#define S7LEKLCD_Q0 (40 * 5 )
+#define S7LEKLCD_Q4 (40 * 6 )
+#define S7LEKLCD_Q3 (40 * 7 )
+#define S7LEKLCD_KEY (40 * 8 )
+#define S7LEKLCD_SOUND (40 * 9 )
+
+#define S7LEKLCD_S0 (40 * 1 + 39)
+#define S7LEKLCD_S1 (40 * 0 + 39)
+#define S7LEKLCD_S2 (40 * 1 + 39)
+#define S7LEKLCD_S3 (40 * 2 + 39)
+#define S7LEKLCD_S4 (40 * 3 + 39)
+#define S7LEKLCD_S5 (40 * 4 + 39)
+#define S7LEKLCD_S6 (40 * 5 + 39)
+#define S7LEKLCD_S7 (40 * 6 + 39)
+#define S7LEKLCD_S8 (40 * 7 + 39)
+#define S7LEKLCD_S9 (40 * 8 + 39)
+#define S7LEKLCD_S10 (40 * 9 + 39)
+#define S7LEKLCD_COLON (40 * 0 + 38)
+#define S7LEKLCD_LINE (40 * 1 + 38)
+#define S7LEKLCD_HEX (40 * 9 + 38)
+
+#define S7LEKLCD_ATMEL (40 * 0 + 37)
+
+#define S7LEKLCD_SNOW (40 * 0 + 36)
+#define S7LEKLCD_FIRE (40 * 1 + 36)
+
+#define S7LEKLCD_BIN (40 * 9 + 36)
+#define S7LEKLCD_DEC (40 * 9 + 34)
+#define S7LEKLCD_AUTO (40 * 9 + 32)
+#define S7LEKLCD_TIME (40 * 9 + 30)
+#define S7LEKLCD_DATE (40 * 9 + 26)
+#define S7LEKLCD_PROG (40 * 9 + 24)
+#define S7LEKLCD_SETUP (40 * 9 + 20)
+#define S7LEKLCD_2NDF (40 * 9 + 16)
+
+#define S7LEKLCD_1P (40 * 9 + 37)
+#define S7LEKLCD_2P (40 * 9 + 35)
+#define S7LEKLCD_3P (40 * 9 + 33)
+#define S7LEKLCD_4P (40 * 9 + 31)
+#define S7LEKLCD_5P (40 * 9 + 29)
+#define S7LEKLCD_6P (40 * 9 + 27)
+#define S7LEKLCD_7P (40 * 9 + 25)
+#define S7LEKLCD_8P (40 * 9 + 23)
+#define S7LEKLCD_9P (40 * 9 + 21)
+#define S7LEKLCD_10P (40 * 9 + 19)
+#define S7LEKLCD_11P (40 * 9 + 17)
+#define S7LEKLCD_12P (40 * 9 + 15)
+
+#define S7LEKLCD_V0 (40 * 0 + 35)
+#define S7LEKLCD_VOL (40 * 1 + 35)
+#define S7LEKLCD_V1 (40 * 0 + 34)
+#define S7LEKLCD_V2 (40 * 1 + 34)
+#define S7LEKLCD_V4 (40 * 0 + 33)
+#define S7LEKLCD_V3 (40 * 1 + 33)
+
+#define S7LEKLCD_CLOCK (40 * 0 + 32)
+#define S7LEKLCD_TOOL (40 * 1 + 32)
+
+#define S7LEKLCD_AM (40 * 0 + 31)
+#define S7LEKLCD_PM (40 * 1 + 31)
+
+#define S7LEKLCD_COL1 (40 * 9 + 28)
+#define S7LEKLCD_COL2 (40 * 9 + 22)
+#define S7LEKLCD_COL3 (40 * 9 + 18)
+#define S7LEKLCD_COL4 (40 * 1 + 30)
+
+#define S7LEKLCD_DMM (40 * 0 + 13)
+#define S7LEKLCD_TMP (40 * 1 + 13)
+#define S7LEKLCD_BARO (40 * 2 + 13)
+#define S7LEKLCD_HZ (40 * 3 + 13)
+#define S7LEKLCD_MHZ (40 * 4 + 13)
+#define S7LEKLCD_INHG (40 * 5 + 13)
+#define S7LEKLCD_KHZ (40 * 6 + 13)
+#define S7LEKLCD_HPA (40 * 7 + 13)
+#define S7LEKLCD_OHM (40 * 8 + 13)
+#define S7LEKLCD_SUN (40 * 9 + 13)
+
+#define S7LEKLCD_CALC (40 * 0 + 14)
+#define S7LEKLCD_FAHRENHEIT (40 * 1 + 14)
+#define S7LEKLCD_CELSIUS (40 * 2 + 14)
+#define S7LEKLCD_PENSENT (40 * 3 + 14)
+#define S7LEKLCD_AMPS (40 * 4 + 14)
+#define S7LEKLCD_VOLTS (40 * 5 + 14)
+#define S7LEKLCD_KWH (40 * 6 + 14)
+#define S7LEKLCD_FINE (40 * 7 + 14)
+#define S7LEKLCD_CLOUD (40 * 8 + 14)
+#define S7LEKLCD_RAIN (40 * 9 + 14)
+
+//------------------------------------------------------------------------------
+// Global functions
+//------------------------------------------------------------------------------
+
+extern void S7LEKLCD_Symbol(unsigned short symbol, unsigned char set);
+
+extern void S7LEKLCD_Pixel(unsigned char x, unsigned char y, unsigned char set);
+
+extern void S7LEKLCD_Char(unsigned short c, unsigned char index);
+
+extern void S7LEKLCD_ClockNumber(unsigned short c, unsigned char index);
+
+extern void S7LEKLCD_PutString(const char *pString, unsigned char index);
+
+#endif //#ifndef _S7LEKLCD_H
+
diff --git a/components/slcd/s7lstklcd/font.h b/components/slcd/s7lstklcd/font.h
new file mode 100644
index 0000000..ae5b27f
--- /dev/null
+++ b/components/slcd/s7lstklcd/font.h
@@ -0,0 +1,71 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+#ifndef FONT_H
+#define FONT_H
+
+//-----------------------------------------------------------------------------
+// Definitions
+//-----------------------------------------------------------------------------
+
+/// Maximum character width in pixels.
+#define FONT_CHAR_MAX_WIDTH 8
+
+//-----------------------------------------------------------------------------
+// Types
+//-----------------------------------------------------------------------------
+
+/// Font information structure.
+typedef struct _Font {
+
+ // Font width in pixels.
+ unsigned char width;
+ // Font height in pixels.
+ unsigned char height;
+ // First character in font data.
+ unsigned char firstCharacter;
+ // Last character in font data.
+ unsigned char lastCharacter;
+ // Font data, containing (lastCharacter - firstCharacter) characters,
+ // (height) bytes per character, each byte corresponding
+ // to one line of the character. Bits are ordered as follow:
+ // MSB ------------------------------------ LSB
+ // Leftmost bit - ... - Rightmost bit - Padding
+ const unsigned char *pData;
+
+} Font;
+
+//-----------------------------------------------------------------------------
+// Global variables
+//-----------------------------------------------------------------------------
+
+extern const Font gFont;
+
+#endif //#ifndef FONT_H
+
diff --git a/components/slcd/s7lstklcd/font1.c b/components/slcd/s7lstklcd/font1.c
new file mode 100644
index 0000000..d1c60f2
--- /dev/null
+++ b/components/slcd/s7lstklcd/font1.c
@@ -0,0 +1,306 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+//-----------------------------------------------------------------------------
+// Headers
+//-----------------------------------------------------------------------------
+
+#include "font.h"
+
+//-----------------------------------------------------------------------------
+// Local variables
+//-----------------------------------------------------------------------------
+
+/// Font data.
+static const unsigned char pData[] = {
+
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x70, 0x88, 0xD8, 0x88, 0xF8, 0xA8, 0x88, 0x70,
+ 0x70, 0xF8, 0xA8, 0xF8, 0x88, 0xD8, 0x88, 0x70,
+ 0x00, 0x50, 0xF8, 0xF8, 0xF8, 0x70, 0x20, 0x00,
+ 0x00, 0x20, 0x70, 0xF8, 0x70, 0x20, 0x00, 0x00,
+ 0x20, 0x70, 0x70, 0xD8, 0x70, 0x20, 0x20, 0x70,
+ 0x20, 0x70, 0xF8, 0xF8, 0x70, 0x20, 0x20, 0x70,
+ 0x00, 0x00, 0x20, 0x70, 0x70, 0x20, 0x00, 0x00,
+ 0xF8, 0xF8, 0xD8, 0x88, 0x88, 0xD8, 0xF8, 0xF8,
+ 0x00, 0x00, 0x20, 0x50, 0x50, 0x20, 0x00, 0x00,
+ 0xF8, 0xF8, 0xD8, 0xA8, 0xA8, 0xD8, 0xF8, 0xF8,
+ 0x38, 0x18, 0x28, 0x60, 0x90, 0x90, 0x60, 0x00,
+ 0x70, 0x88, 0x88, 0x70, 0x20, 0xF8, 0x20, 0x20,
+ 0x38, 0x28, 0x20, 0x20, 0x20, 0x60, 0xE0, 0x40,
+ 0x78, 0x48, 0x78, 0x48, 0x48, 0x58, 0xD8, 0xC0,
+ 0x20, 0xA8, 0x70, 0xD8, 0x70, 0xA8, 0x20, 0x00,
+ 0x40, 0x60, 0x70, 0x78, 0x70, 0x60, 0x40, 0x00,
+ 0x10, 0x30, 0x70, 0xF0, 0x70, 0x30, 0x10, 0x00,
+ 0x20, 0x70, 0xF8, 0x20, 0x20, 0xF8, 0x70, 0x20,
+ 0x50, 0x50, 0x50, 0x50, 0x50, 0x00, 0x50, 0x50,
+ 0x78, 0xA8, 0xA8, 0xA8, 0x68, 0x28, 0x28, 0x28,
+ 0x30, 0x48, 0x20, 0x50, 0x20, 0x90, 0x60, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xF0, 0x00,
+ 0x20, 0x70, 0xF8, 0x20, 0xF8, 0x70, 0x20, 0xF8,
+ 0x20, 0x70, 0xF8, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0xF8, 0x70, 0x20,
+ 0x00, 0x20, 0x30, 0xF8, 0x30, 0x20, 0x00, 0x00,
+ 0x00, 0x20, 0x60, 0xF8, 0x60, 0x20, 0x00, 0x00,
+ 0x00, 0x00, 0x60, 0x60, 0x78, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x50, 0xF8, 0x50, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x20, 0x70, 0xF8, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xF8, 0x70, 0x20, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x40,
+ 0x50, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x50, 0xF8, 0x50, 0xF8, 0x50, 0x00, 0x00,
+ 0x20, 0x78, 0x80, 0x60, 0x30, 0x08, 0xF0, 0x20,
+ 0x00, 0xC0, 0xC8, 0x10, 0x20, 0x40, 0x98, 0x18,
+ 0x60, 0x90, 0x90, 0x60, 0x68, 0x90, 0x90, 0x68,
+ 0x20, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x10, 0x20, 0x40, 0x40, 0x40, 0x40, 0x20, 0x10,
+ 0x40, 0x20, 0x10, 0x10, 0x10, 0x10, 0x20, 0x40,
+ 0x20, 0xA8, 0x70, 0xF8, 0x70, 0xA8, 0x20, 0x00,
+ 0x00, 0x20, 0x20, 0xF8, 0x20, 0x20, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xC0,
+ 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
+ 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80,
+ 0x70, 0x88, 0x98, 0xA8, 0xA8, 0xC8, 0x88, 0x70,
+ 0x20, 0x60, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70,
+ 0x70, 0x88, 0x08, 0x08, 0x10, 0x20, 0x40, 0xF8,
+ 0x70, 0x88, 0x08, 0x30, 0x08, 0x08, 0x88, 0x70,
+ 0x10, 0x30, 0x50, 0x90, 0xF8, 0x10, 0x10, 0x10,
+ 0xF8, 0x80, 0x80, 0xF0, 0x08, 0x08, 0x88, 0x70,
+ 0x70, 0x88, 0x80, 0xF0, 0x88, 0x88, 0x88, 0x70,
+ 0xF8, 0x08, 0x08, 0x10, 0x20, 0x20, 0x20, 0x20,
+ 0x70, 0x88, 0x88, 0x70, 0x88, 0x88, 0x88, 0x70,
+ 0x70, 0x88, 0x88, 0x78, 0x08, 0x08, 0x88, 0x70,
+ 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00,
+ 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0xC0,
+ 0x10, 0x20, 0x40, 0x80, 0x40, 0x20, 0x10, 0x00,
+ 0x00, 0x00, 0xF0, 0x00, 0xF0, 0x00, 0x00, 0x00,
+ 0x40, 0x20, 0x10, 0x08, 0x10, 0x20, 0x40, 0x00,
+ 0x70, 0x88, 0x08, 0x10, 0x20, 0x20, 0x00, 0x20,
+ 0x70, 0x88, 0xB8, 0xA8, 0xA8, 0xB8, 0x80, 0x78,
+ 0x70, 0x88, 0x88, 0xF8, 0x88, 0x88, 0x88, 0x88,
+ 0xF0, 0x88, 0x88, 0xF0, 0x88, 0x88, 0x88, 0xF0,
+ 0x70, 0x88, 0x80, 0x80, 0x80, 0x80, 0x88, 0x70,
+ 0xF0, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0xF0,
+ 0xF8, 0x80, 0x80, 0xF0, 0x80, 0x80, 0x80, 0xF8,
+ 0xF8, 0x80, 0x80, 0xF0, 0x80, 0x80, 0x80, 0x80,
+ 0x70, 0x88, 0x80, 0xB8, 0x88, 0x88, 0x88, 0x70,
+ 0x88, 0x88, 0x88, 0xF8, 0x88, 0x88, 0x88, 0x88,
+ 0x70, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70,
+ 0x10, 0x10, 0x10, 0x10, 0x10, 0x90, 0x90, 0x60,
+ 0x88, 0x90, 0xA0, 0xC0, 0xC0, 0xA0, 0x90, 0x88,
+ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xF8,
+ 0x88, 0xD8, 0xA8, 0xA8, 0xA8, 0x88, 0x88, 0x88,
+ 0x88, 0xC8, 0xC8, 0xA8, 0xA8, 0x98, 0x98, 0x88,
+ 0x70, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x70,
+ 0xF0, 0x88, 0x88, 0xF0, 0x80, 0x80, 0x80, 0x80,
+ 0x70, 0x88, 0x88, 0x88, 0x88, 0xA8, 0x90, 0x68,
+ 0xF0, 0x88, 0x88, 0xF0, 0xC0, 0xA0, 0x90, 0x88,
+ 0x70, 0x88, 0x80, 0x70, 0x08, 0x08, 0x88, 0x70,
+ 0xF8, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x70,
+ 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x50, 0x20,
+ 0x88, 0x88, 0x88, 0xA8, 0xA8, 0xA8, 0xD8, 0x88,
+ 0x88, 0x88, 0x50, 0x20, 0x20, 0x50, 0x88, 0x88,
+ 0x88, 0x88, 0x50, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0xF8, 0x08, 0x10, 0x20, 0x20, 0x40, 0x80, 0xF8,
+ 0x60, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x60,
+ 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x10, 0x08,
+ 0x60, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x60,
+ 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8,
+ 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x70, 0x08, 0x78, 0x88, 0x78, 0x00,
+ 0x80, 0x80, 0xF0, 0x88, 0x88, 0x88, 0xF0, 0x00,
+ 0x00, 0x00, 0x70, 0x88, 0x80, 0x88, 0x70, 0x00,
+ 0x08, 0x08, 0x78, 0x88, 0x88, 0x88, 0x78, 0x00,
+ 0x00, 0x00, 0x70, 0x88, 0xF8, 0x80, 0x78, 0x00,
+ 0x30, 0x40, 0xE0, 0x40, 0x40, 0x40, 0x40, 0x00,
+ 0x00, 0x00, 0x78, 0x88, 0x88, 0x78, 0x08, 0xF0,
+ 0x80, 0x80, 0xF0, 0x88, 0x88, 0x88, 0x88, 0x00,
+ 0x20, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00,
+ 0x20, 0x00, 0x20, 0x20, 0x20, 0x20, 0xA0, 0x40,
+ 0x80, 0x80, 0x90, 0xA0, 0xC0, 0xA0, 0x90, 0x00,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00,
+ 0x00, 0x00, 0x50, 0xA8, 0xA8, 0x88, 0x88, 0x00,
+ 0x00, 0x00, 0xB0, 0xC8, 0x88, 0x88, 0x88, 0x00,
+ 0x00, 0x00, 0x70, 0x88, 0x88, 0x88, 0x70, 0x00,
+ 0x00, 0x00, 0xE0, 0x90, 0x90, 0xE0, 0x80, 0x80,
+ 0x00, 0x00, 0x70, 0x90, 0x90, 0x70, 0x10, 0x10,
+ 0x00, 0x00, 0xB0, 0xC0, 0x80, 0x80, 0x80, 0x00,
+ 0x00, 0x00, 0x78, 0x80, 0x70, 0x08, 0xF0, 0x00,
+ 0x40, 0x40, 0xE0, 0x40, 0x40, 0x40, 0x60, 0x00,
+ 0x00, 0x00, 0x88, 0x88, 0x88, 0x88, 0x70, 0x00,
+ 0x00, 0x00, 0x88, 0x88, 0x50, 0x50, 0x20, 0x00,
+ 0x00, 0x00, 0x88, 0x88, 0xA8, 0xA8, 0x50, 0x00,
+ 0x00, 0x00, 0x88, 0x50, 0x20, 0x50, 0x88, 0x00,
+ 0x00, 0x00, 0x88, 0x88, 0x88, 0x78, 0x08, 0xF0,
+ 0x00, 0x00, 0xF8, 0x10, 0x20, 0x40, 0xF8, 0x00,
+ 0x10, 0x20, 0x20, 0x40, 0x40, 0x20, 0x20, 0x10,
+ 0x20, 0x20, 0x20, 0x00, 0x00, 0x20, 0x20, 0x20,
+ 0x40, 0x20, 0x20, 0x10, 0x10, 0x20, 0x20, 0x40,
+ 0x50, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x60, 0x60, 0x90, 0x90, 0xF0,
+ 0x70, 0x88, 0x80, 0x80, 0x88, 0x70, 0x20, 0x60,
+ 0x50, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x70,
+ 0x10, 0x20, 0x70, 0x88, 0xF8, 0x80, 0x88, 0x70,
+ 0x30, 0x48, 0x70, 0x08, 0x78, 0x88, 0x88, 0x78,
+ 0x50, 0x00, 0x70, 0x08, 0x78, 0x88, 0x88, 0x78,
+ 0x40, 0x20, 0x70, 0x08, 0x78, 0x88, 0x88, 0x78,
+ 0x20, 0x00, 0x70, 0x08, 0x78, 0x88, 0x88, 0x78,
+ 0x70, 0x88, 0x80, 0x80, 0x88, 0x70, 0x20, 0x60,
+ 0x20, 0x50, 0x70, 0x88, 0xF8, 0x80, 0x88, 0x70,
+ 0x50, 0x00, 0x70, 0x88, 0xF8, 0x80, 0x88, 0x70,
+ 0x40, 0x20, 0x70, 0x88, 0xF8, 0x80, 0x88, 0x70,
+ 0x50, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x50, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x50, 0x00, 0x70, 0x88, 0x88, 0xF8, 0x88, 0x88,
+ 0x20, 0x00, 0x70, 0x88, 0x88, 0xF8, 0x88, 0x88,
+ 0x20, 0x40, 0xF8, 0x80, 0xE0, 0x80, 0x80, 0xF8,
+ 0x00, 0x00, 0x50, 0xA8, 0x38, 0x60, 0xA8, 0x70,
+ 0x78, 0xA0, 0xA0, 0xF0, 0xA0, 0xA0, 0xA0, 0xB8,
+ 0x20, 0x50, 0x70, 0x88, 0x88, 0x88, 0x88, 0x70,
+ 0x88, 0x00, 0x70, 0x88, 0x88, 0x88, 0x88, 0x70,
+ 0x40, 0x20, 0x70, 0x88, 0x88, 0x88, 0x88, 0x70,
+ 0x20, 0x50, 0x88, 0x88, 0x88, 0x88, 0x88, 0x70,
+ 0x40, 0x20, 0x88, 0x88, 0x88, 0x88, 0x88, 0x70,
+ 0x50, 0x00, 0x88, 0x50, 0x20, 0x20, 0x20, 0x20,
+ 0x88, 0x00, 0x70, 0x88, 0x88, 0x88, 0x88, 0x70,
+ 0x50, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x70,
+ 0x20, 0x70, 0xA8, 0xA0, 0xA0, 0xA8, 0x70, 0x20,
+ 0x70, 0x88, 0x80, 0x40, 0x70, 0x40, 0x88, 0xF0,
+ 0x88, 0x50, 0x20, 0x70, 0x20, 0x70, 0x20, 0x20,
+ 0xF0, 0x88, 0x88, 0xF0, 0xA0, 0xF0, 0xA8, 0xB0,
+ 0x30, 0x28, 0x20, 0x70, 0x20, 0xA0, 0xA0, 0x40,
+ 0x10, 0x20, 0x70, 0x88, 0x78, 0x88, 0x88, 0x78,
+ 0x10, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x10, 0x20, 0x70, 0x88, 0x88, 0x88, 0x88, 0x70,
+ 0x10, 0x20, 0x88, 0x88, 0x88, 0x88, 0x88, 0x70,
+ 0x50, 0xA8, 0xB0, 0xC8, 0x88, 0x88, 0x88, 0x88,
+ 0x50, 0xA8, 0x88, 0xC8, 0xA8, 0xA8, 0x98, 0x88,
+ 0x00, 0x70, 0x88, 0x78, 0x88, 0x78, 0x00, 0xF8,
+ 0x00, 0x70, 0x88, 0x88, 0x88, 0x70, 0x00, 0xF8,
+ 0x20, 0x00, 0x20, 0x20, 0x40, 0x88, 0x88, 0x70,
+ 0x00, 0x00, 0x00, 0x78, 0x40, 0x40, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0xF0, 0x10, 0x10, 0x00, 0x00,
+ 0x40, 0xC8, 0x50, 0xE0, 0x50, 0xA8, 0x10, 0x38,
+ 0x40, 0xC8, 0x50, 0xE0, 0x50, 0xD0, 0x78, 0x10,
+ 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
+ 0x00, 0x10, 0x28, 0x50, 0xA0, 0x50, 0x28, 0x10,
+ 0x00, 0x40, 0xA0, 0x50, 0x28, 0x50, 0xA0, 0x40,
+ 0x20, 0x90, 0x48, 0x20, 0x90, 0x48, 0x20, 0x90,
+ 0x56, 0xAE, 0x51, 0xAC, 0x55, 0xA8, 0x50, 0xA8,
+ 0x68, 0xD8, 0xB0, 0x68, 0xD8, 0xB6, 0x6F, 0xD8,
+ 0x20, 0x20, 0x27, 0x22, 0x23, 0x22, 0x24, 0x20,
+ 0x20, 0x22, 0x27, 0xE2, 0x25, 0x23, 0x24, 0x20,
+ 0x23, 0x24, 0xE5, 0x23, 0xE4, 0x27, 0x23, 0x20,
+ 0x21, 0x25, 0x24, 0xE5, 0x23, 0x24, 0x23, 0x20,
+ 0x01, 0x05, 0x04, 0xFE, 0x2D, 0x28, 0x2F, 0x28,
+ 0x06, 0x03, 0xE0, 0x20, 0xE0, 0x20, 0x23, 0x20,
+ 0x2F, 0x2D, 0xE8, 0x0E, 0xE9, 0x2C, 0x28, 0x28,
+ 0x2F, 0x2B, 0x28, 0x2F, 0x2F, 0x28, 0x28, 0x28,
+ 0x03, 0x00, 0x06, 0xFC, 0x0A, 0xED, 0x2B, 0x28,
+ 0x2C, 0x2E, 0x2D, 0xE8, 0x08, 0xF8, 0x00, 0x00,
+ 0x29, 0x28, 0x28, 0xF8, 0x03, 0x01, 0x00, 0x00,
+ 0x22, 0xE0, 0x20, 0xE0, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x05, 0xE3, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x3E, 0x04, 0x01, 0x04, 0x00,
+ 0x21, 0x20, 0x20, 0xF8, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x02, 0x00, 0xF8, 0x20, 0x23, 0x21, 0x20,
+ 0x27, 0x24, 0x20, 0x38, 0x20, 0x20, 0x20, 0x20,
+ 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x00,
+ 0x20, 0x20, 0x20, 0xF8, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x24, 0x38, 0x20, 0x38, 0x20, 0x20, 0x20,
+ 0xA0, 0xA0, 0xA2, 0xB8, 0xA0, 0xA0, 0xA2, 0xA0,
+ 0xA0, 0xA4, 0xA0, 0xB8, 0x80, 0xFF, 0x06, 0x00,
+ 0x07, 0x06, 0x04, 0xFD, 0x80, 0xBF, 0xA0, 0xA0,
+ 0x50, 0x53, 0x50, 0xD9, 0x05, 0xF9, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0xF8, 0x00, 0xD8, 0x50, 0x50,
+ 0x50, 0x50, 0x50, 0x58, 0x40, 0x58, 0x50, 0x50,
+ 0x00, 0x00, 0x00, 0xF8, 0x00, 0xF8, 0x00, 0x00,
+ 0x50, 0x50, 0x50, 0xD8, 0x00, 0xD8, 0x50, 0x50,
+ 0x20, 0x20, 0x20, 0xF8, 0x00, 0xF8, 0x00, 0x00,
+ 0x50, 0x50, 0x50, 0x50, 0xF8, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0xF8, 0x00, 0xF8, 0x20, 0x20,
+ 0x00, 0x00, 0x00, 0xF8, 0x50, 0x50, 0x50, 0x50,
+ 0x50, 0x50, 0x50, 0x78, 0x00, 0x00, 0x00, 0x00,
+ 0x20, 0x38, 0x20, 0x38, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x38, 0x20, 0x38, 0x20, 0x20,
+ 0x00, 0x00, 0x00, 0x78, 0x50, 0x50, 0x50, 0x50,
+ 0x50, 0x50, 0x50, 0xD8, 0x50, 0x50, 0x50, 0x50,
+ 0x20, 0x20, 0xF8, 0x00, 0xF8, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0xE0, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x38, 0x20, 0x20, 0x20, 0x20,
+ 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8,
+ 0x00, 0x00, 0x00, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8,
+ 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0,
+ 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38,
+ 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x68, 0x90, 0x68, 0x00, 0x00,
+ 0x60, 0x90, 0x90, 0xE0, 0x90, 0x88, 0xC8, 0xB0,
+ 0xF8, 0x88, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
+ 0xF8, 0x50, 0x50, 0x50, 0x50, 0x50, 0x50, 0x58,
+ 0xF8, 0x88, 0x80, 0x40, 0x20, 0x40, 0x88, 0xF8,
+ 0x00, 0x00, 0x00, 0x00, 0x78, 0x90, 0x90, 0x60,
+ 0x00, 0x00, 0x00, 0x88, 0x88, 0x98, 0xE8, 0x80,
+ 0x00, 0x00, 0x00, 0x58, 0xA0, 0x20, 0x20, 0x20,
+ 0xF8, 0x70, 0xA8, 0xA8, 0xA8, 0xA8, 0x70, 0xF8,
+ 0x70, 0x88, 0x88, 0xF8, 0x88, 0x88, 0x88, 0x70,
+ 0x70, 0x88, 0x88, 0x88, 0x50, 0x50, 0x50, 0xD8,
+ 0x70, 0x88, 0x80, 0x40, 0x70, 0x88, 0x88, 0x70,
+ 0x00, 0x00, 0x00, 0x88, 0xD8, 0xA8, 0xD8, 0x88,
+ 0x00, 0x00, 0x00, 0x70, 0x98, 0xA8, 0xC8, 0x70,
+ 0x38, 0x40, 0x80, 0xE0, 0x80, 0x80, 0x40, 0x38,
+ 0x70, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
+ 0x00, 0x00, 0xF8, 0x00, 0xF8, 0x00, 0xF8, 0x00,
+ 0x00, 0x20, 0x70, 0x20, 0x20, 0x00, 0xF8, 0x00,
+ 0x40, 0x20, 0x10, 0x08, 0x10, 0x20, 0x40, 0xF8,
+ 0x10, 0x20, 0x40, 0x80, 0x40, 0x20, 0x10, 0xF8,
+ 0x10, 0x28, 0x28, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0xA0, 0xA0, 0x40,
+ 0x00, 0x20, 0x00, 0x70, 0x00, 0x20, 0x00, 0x00,
+ 0x00, 0x50, 0xA8, 0x00, 0x50, 0xA8, 0x00, 0x00,
+ 0x20, 0x50, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x70, 0x70, 0x70, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00,
+ 0x38, 0x20, 0x20, 0x20, 0x20, 0xA0, 0x60, 0x20,
+ 0x40, 0xA0, 0xA0, 0xA0, 0x00, 0x00, 0x00, 0x00,
+ 0x40, 0xA0, 0x40, 0xE0, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x70, 0x70, 0x70, 0x70, 0x70, 0x70, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+//-----------------------------------------------------------------------------
+// Global variables
+//-----------------------------------------------------------------------------
+
+const Font gFont = {5, 8, 0, 255, pData};
+
diff --git a/components/slcd/s7lstklcd/s7lstklcd.c b/components/slcd/s7lstklcd/s7lstklcd.c
new file mode 100644
index 0000000..7ab1671
--- /dev/null
+++ b/components/slcd/s7lstklcd/s7lstklcd.c
@@ -0,0 +1,187 @@
+/* ---------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+//-----------------------------------------------------------------------------
+// Headers
+//-----------------------------------------------------------------------------
+
+#include "s7lstklcd.h"
+#include "font.h"
+#include <board.h>
+#include <utility/assert.h>
+#include <utility/trace.h>
+
+//-----------------------------------------------------------------------------
+// Global functions
+//-----------------------------------------------------------------------------
+
+//-----------------------------------------------------------------------------
+/// Switches a pixel on the SLCD on or off.
+/// \param x X-coordinate of pixel.
+/// \param y Y-coordinate of pixel.
+/// \param set If 1, pixel is displayed; otherwise it is hidden.
+//-----------------------------------------------------------------------------
+void S7LSTKLCD_Pixel(unsigned char x, unsigned char y, unsigned char set)
+{
+ unsigned int symbol = y * S7LSTKLCD_WIDTH + x;
+ unsigned int common = symbol / S7LSTKLCD_NUM_SEGMENTS;
+ unsigned int segment = symbol % S7LSTKLCD_NUM_SEGMENTS;
+ unsigned int reg = segment / 32;
+ unsigned int bit = segment % 32;
+
+ SANITY_CHECK(x < S7LSTKLCD_WIDTH);
+ SANITY_CHECK(y < S7LSTKLCD_HEIGHT);
+
+ if (set) {
+
+ AT91C_BASE_SLCDC->SLCDC_MEM[common * 2 + reg] |= (1 << bit);
+ }
+ else {
+
+ AT91C_BASE_SLCDC->SLCDC_MEM[common * 2 + reg] &= ~(1 << bit);
+ }
+}
+
+//-----------------------------------------------------------------------------
+/// Displays a character at the given position on the SLCD. The character is
+/// clipped according to the SLCD dimensions.
+/// Note that x and y can be negative (upper-left part of character will be
+/// clipped).
+/// \param x X-coordinate of upper-left corner of character.
+/// \param y Y-coordinate of upper-left corner of character.
+/// \param c Character to display.
+//-----------------------------------------------------------------------------
+void S7LSTKLCD_Char(signed int x, signed int y, unsigned char c)
+{
+ const unsigned char *pChar;
+ signed int i, j;
+
+ SANITY_CHECK(c >= gFont.firstCharacter);
+ SANITY_CHECK(c <= gFont.lastCharacter);
+
+ // Optimization: return if coordinates are out of bounds
+ if ((x > S7LSTKLCD_WIDTH) || ((x+gFont.width) < 0)
+ || (y > S7LSTKLCD_HEIGHT) || ((y+gFont.height) < 0)) {
+
+ return;
+ }
+
+ // Get pointer to character in font data
+ pChar = &(gFont.pData[(c - gFont.firstCharacter) * gFont.height]);
+
+ // Display character at requested location
+ for (j=0; j < gFont.height; j++) {
+ for (i=0; i < gFont.width; i++) {
+
+ if (((x+i) >= 0) && ((x+i) < S7LSTKLCD_WIDTH)
+ && ((y+i >= 0)) && ((y+i) < S7LSTKLCD_HEIGHT)) {
+
+ S7LSTKLCD_Pixel(x+i, y+j, (pChar[j] & (1 << (FONT_CHAR_MAX_WIDTH-i-1))));
+ }
+ }
+ }
+}
+
+//-----------------------------------------------------------------------------
+/// Displays a string on the SLCD given the top-left corner coordinates. String
+/// is clipped according to the SLCD dimensions.
+/// X and Y can be negative (top-left clipping).
+/// \param x X-coordinate of top-left corner.
+/// \param y Y-coordinate of top-left corner.
+/// \param pString String to display.
+//-----------------------------------------------------------------------------
+void S7LSTKLCD_String(signed int x, signed int y, const char *pString)
+{
+ signed int j;
+ while (*pString != 0) {
+
+ // Display character
+ S7LSTKLCD_Char(x, y, *pString);
+ x += gFont.width + 1;
+ pString++;
+
+ // Vertical blank line
+ if ((*pString != 0) && ((x-1) < S7LSTKLCD_WIDTH) && ((x-1) > 0)) {
+
+ for (j=0; j < gFont.height; j++) {
+
+ if (((j+y) >= 0) && ((j+y) < S7LSTKLCD_HEIGHT)) {
+
+ S7LSTKLCD_Pixel(x-1, y+j, 0);
+ }
+ }
+ }
+ }
+}
+
+//-----------------------------------------------------------------------------
+/// Returns the height and width in pixels of the given string.
+/// \param pString String to examinate.
+/// \param pWidth Width of string in pixels.
+/// \param pHeight Height of string in pixels.
+//-----------------------------------------------------------------------------
+void S7LSTKLCD_GetStringSize(
+ const char *pString,
+ signed int *pWidth,
+ signed int *pHeight)
+{
+ unsigned int size = 0;
+
+ // Get string size
+ while (*pString != 0) {
+
+ size++;
+ pString++;
+ }
+
+ // Return size in pixel
+ if (pWidth) {
+
+ *pWidth = size * (gFont.width + 1) - 1;
+ }
+ if (pHeight) {
+
+ *pHeight = gFont.height;
+ }
+}
+
+//-----------------------------------------------------------------------------
+/// Displays the given string on the SLCD, centered along the X and Y axis
+/// (this may result in the string being clipped).
+/// \param pString String to display.
+//-----------------------------------------------------------------------------
+void S7LSTKLCD_PutString(const char *pString)
+{
+ signed int width, height;
+ SANITY_CHECK(pString);
+
+ S7LSTKLCD_GetStringSize(pString, &width, &height);
+ S7LSTKLCD_String((S7LSTKLCD_WIDTH - width) / 2, (S7LSTKLCD_HEIGHT - height) / 2, pString);
+}
+
diff --git a/components/slcd/s7lstklcd/s7lstklcd.dir b/components/slcd/s7lstklcd/s7lstklcd.dir
new file mode 100644
index 0000000..145e4d3
--- /dev/null
+++ b/components/slcd/s7lstklcd/s7lstklcd.dir
@@ -0,0 +1,40 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+//------------------------------------------------------------------------------
+/// \dir
+///
+/// !!!Purpose
+///
+/// This directory contains APIs for segment LCD display of AT91SAM7L-STK board.
+///
+/// !!!Contents
+///
+/// Contains code for display pixel, char and string.
+//------------------------------------------------------------------------------ \ No newline at end of file
diff --git a/components/slcd/s7lstklcd/s7lstklcd.h b/components/slcd/s7lstklcd/s7lstklcd.h
new file mode 100644
index 0000000..e5614df
--- /dev/null
+++ b/components/slcd/s7lstklcd/s7lstklcd.h
@@ -0,0 +1,83 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+ //------------------------------------------------------------------------------
+/// \unit
+///
+/// !!!Purpose
+///
+/// Interface for displaying on segment LCD of AT91SAM7L-STK board.
+///
+/// !!!Usage
+///
+/// -# call corresponding function to display pixel, char and string.
+//------------------------------------------------------------------------------
+
+#ifndef S7LSTKLCD_H
+#define S7LSTKLCD_H
+
+//-----------------------------------------------------------------------------
+// Defines
+//-----------------------------------------------------------------------------
+
+/// Number of segments in SLCD
+#define S7LSTKLCD_NUM_SEGMENTS 40
+/// Number of commons in SLCD
+#define S7LSTKLCD_NUM_COMMONS 10
+
+/// SLCD width in pixels.
+#define S7LSTKLCD_WIDTH 40
+/// SLCD height in pixels.
+#define S7LSTKLCD_HEIGHT 10
+
+//-----------------------------------------------------------------------------
+// Global Functions
+//-----------------------------------------------------------------------------
+
+extern void S7LSTKLCD_Pixel(
+ unsigned char x,
+ unsigned char y,
+ unsigned char set);
+
+extern void S7LSTKLCD_Char(
+ signed int x,
+ signed int y,
+ unsigned char c);
+
+extern void S7LSTKLCD_String(signed int x, signed int y, const char *pString);
+
+extern void S7LSTKLCD_GetStringSize(
+ const char *pString,
+ signed int *pWidth,
+ signed int *pHeight);
+
+extern void S7LSTKLCD_PutString(const char *pString);
+
+#endif
+
personal git repositories of Harald Welte. Your mileage may vary