Maxim Integrated
/
MAXREFDES99_demo
Demo for MAXREFDES99
Diff: maxrefdes99.cpp
- Revision:
- 8:a6a0c9e280ae
- Parent:
- 6:00aabe967e51
- Child:
- 9:3c6d6c856e3d
--- a/maxrefdes99.cpp Thu Apr 28 08:46:24 2016 +0000 +++ b/maxrefdes99.cpp Tue May 24 08:40:07 2016 +0000 @@ -1,17 +1,5 @@ /******************************************************************//** * @file maxrefdes99.cpp -* -* @author Justin Jordan -* -* @version 0.2 -* -* Started: 08JAN16 -* -* Updated: 26 APR16,Pradip Vatharkar -* -* @brief Source file for maxrefdes99 demo with 5x7, 16x16 aerial bold -* and 16x16 manual fonts -*********************************************************************** * Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a @@ -146,7 +134,15 @@ {0x00,0x0C,0x02,0x0C,0x10,0x0C} // ~ }; -// 16*16 character bit map for Aerial bold fonts +/******************************************************************************* +* 16*16 character bit map for Aerial bold fonts +* These font data taken from the rinkydinkelectronic.com +* All fonts are considered Public Domain. This means that +* you are free to use them as you see fit in any project, +* commercial or not. +* Important note: Commercial projects will still need a +* commercial license for any libraries used +*********************************************************************************/ static const uint8_t Aerial_bold_font_16x16[95][32] = { @@ -629,7 +625,7 @@ // Manually created 16*16 character bit map static const uint8_t Manual_font_16x16[95][32] = { - // Number 0-9, char A-Z and char a-z bit map data created manually, other + // Note: Number 0-9, char A-Z and char a-z bit map data created manually, other // font bit map data taken from Aerial_bold font {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, @@ -732,340 +728,340 @@ 0x00,0x00,0x0C,0x0E,0x06,0x06,0x06,0x06, 0x86,0xC6,0x66,0x7E,0x3E,0x1C,0x00,0x00 }, // 3 - {0x00,0x00,0x00,0x01,0x03,0x06,0xC,0x18, - 0x30,0x7F,0xFF,0xFF,0x00,0x00,0x00,0x00, - 0x00,0x00,0xE0,0xE0,0x60,0x60,0x60,0x60, - 0x60,0xFE,0xFE,0xFE,0x60,0x60,0x00,0x00 }, // 4 + {0x00,0x00,0x00,0x01,0x03,0x06,0xC,0x18, + 0x30,0x7F,0xFF,0xFF,0x00,0x00,0x00,0x00, + 0x00,0x00,0xE0,0xE0,0x60,0x60,0x60,0x60, + 0x60,0xFE,0xFE,0xFE,0x60,0x60,0x00,0x00 }, // 4 - {0x00,0x00,0x7F,0x7F,0x7F,0x61,0x61,0x61, - 0x61,0x61,0x61,0x61,0x61,0x60,0x00,0x00, - 0x00,0x00,0x04,0x86,0x86,0x86,0x86,0x86, - 0x86,0x86,0x86,0xFE,0xFE,0xFC,0x00,0x00 }, // 5 + {0x00,0x00,0x7F,0x7F,0x7F,0x61,0x61,0x61, + 0x61,0x61,0x61,0x61,0x61,0x60,0x00,0x00, + 0x00,0x00,0x04,0x86,0x86,0x86,0x86,0x86, + 0x86,0x86,0x86,0xFE,0xFE,0xFC,0x00,0x00 }, // 5 - {0x00,0x00,0x3F,0x7F,0x7F,0x61,0x61,0x61, - 0x61,0x61,0x61,0x61,0x61,0x20,0x00,0x00, - 0x00,0x00,0xFC,0xFE,0xFE,0x86,0x86,0x86, - 0x86,0x86,0x86,0xFE,0xFE,0xFC,0x00,0x00 }, // 6 + {0x00,0x00,0x3F,0x7F,0x7F,0x61,0x61,0x61, + 0x61,0x61,0x61,0x61,0x61,0x20,0x00,0x00, + 0x00,0x00,0xFC,0xFE,0xFE,0x86,0x86,0x86, + 0x86,0x86,0x86,0xFE,0xFE,0xFC,0x00,0x00 }, // 6 - {0x00,0x00,0x00,0x30,0x30,0x30,0x30,0x30, - 0x30,0x30,0x31,0x3F,0x3E,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x06,0x0C,0x18,0x30, - 0x60,0xC0,0x80,0x00,0x00,0x00,0x00,0x00 }, // 7 + {0x00,0x00,0x00,0x30,0x30,0x30,0x30,0x30, + 0x30,0x30,0x31,0x3F,0x3E,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x06,0x0C,0x18,0x30, + 0x60,0xC0,0x80,0x00,0x00,0x00,0x00,0x00 }, // 7 - {0x00,0x00,0x3F,0x7F,0x7F,0x60,0x60,0x60, - 0x60,0x60,0x60,0x7F,0x7F,0x3F,0x00,0x00, - 0x00,0x00,0x3E,0xFF,0xFF,0xC3,0xC3,0xC3, - 0xC3,0xC3,0xC3,0xFF,0xFF,0x03E,0x00,0x00}, // 8 + {0x00,0x00,0x3F,0x7F,0x7F,0x60,0x60,0x60, + 0x60,0x60,0x60,0x7F,0x7F,0x3F,0x00,0x00, + 0x00,0x00,0x3E,0xFF,0xFF,0xC3,0xC3,0xC3, + 0xC3,0xC3,0xC3,0xFF,0xFF,0x03E,0x00,0x00}, // 8 - {0x00,0x00,0x3F,0x7F,0x7F,0x60,0x60,0x60, - 0x60,0x60,0x60,0x7F,0x7F,0x3F,0x00,0x00, - 0x00,0x00,0x86,0xC7,0xC3,0xC3,0xC3,0xC3, - 0xC3,0xC3,0xC3,0xFF,0xFF,0x0FE,0x00,0x00}, // 9 + {0x00,0x00,0x3F,0x7F,0x7F,0x60,0x60,0x60, + 0x60,0x60,0x60,0x7F,0x7F,0x3F,0x00,0x00, + 0x00,0x00,0x86,0xC7,0xC3,0xC3,0xC3,0xC3, + 0xC3,0xC3,0xC3,0xFF,0xFF,0x0FE,0x00,0x00}, // 9 - {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x18, - 0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30, - 0x30,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // : + {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x18, + 0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0, + 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30, + 0x30,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // : {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x18, - 0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0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x0,0xEC, - 0xEC,0x80,0x0,0x0,0x0,0x0,0x0,0x0}, // ? + 0x31,0x33,0x1F,0xE,0x0,0x0,0x0,0x0, + 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xEC, + 0xEC,0x80,0x0,0x0,0x0,0x0,0x0,0x0}, // ? {0x0,0x0,0x7,0x18,0x27,0x6F,0x58,0x58, - 0x4F,0x5F,0x38,0x30,0x1F,0x0,0x0,0x0, - 0x0,0x0,0xC0,0x20,0x90,0xC8,0xC8,0x88, - 0xC8,0xC8,0x48,0x90,0x20,0x0,0x0,0x0}, //@ + 0x4F,0x5F,0x38,0x30,0x1F,0x0,0x0,0x0, + 0x0,0x0,0xC0,0x20,0x90,0xC8,0xC8,0x88, + 0xC8,0xC8,0x48,0x90,0x20,0x0,0x0,0x0}, //@ {0x00,0x00,0x3F,0x7F,0x7F,0x60,0x60,0x60, - 0x60,0x60,0x60,0x7F,0x7F,0x3F,0x00,0x00, - 0x00,0x00,0xFF,0xFF,0xFF,0x60,0x60,0x60, - 0x60,0x60,0x60,0xFF,0xFF,0xFF,0x00,0x00 }, // A + 0x60,0x60,0x60,0x7F,0x7F,0x3F,0x00,0x00, + 0x00,0x00,0xFF,0xFF,0xFF,0x60,0x60,0x60, + 0x60,0x60,0x60,0xFF,0xFF,0xFF,0x00,0x00 }, // A {0x00,0x00,0x7F,0x7F,0x7F,0x60,0x60,0x60, - 0x60,0x60,0x60,0x7F,0x07F,0x3E,0x00,0x00, - 0x00,0x00,0xFF,0xFF,0xFF,0xC3,0xC3,0xC3, - 0xC3,0xC3,0xC3,0xFF,0xFF,0x3E,0x00,0x00}, // B + 0x60,0x60,0x60,0x7F,0x07F,0x3E,0x00,0x00, + 0x00,0x00,0xFF,0xFF,0xFF,0xC3,0xC3,0xC3, + 0xC3,0xC3,0xC3,0xFF,0xFF,0x3E,0x00,0x00}, // B {0x00,0x00,0x3F,0x7F,0x7F,0x60,0x60,0x60, - 0x60,0x60,0x60,0x70,0x30,0x00,0x00,0x00, - 0x00,0x00,0xFE,0xFF,0xFF,0x03,0x03,0x03, - 0x03,0x03,0x03,0x07,0x06,0x00,0x00,0x00}, // C + 0x60,0x60,0x60,0x70,0x30,0x00,0x00,0x00, + 0x00,0x00,0xFE,0xFF,0xFF,0x03,0x03,0x03, + 0x03,0x03,0x03,0x07,0x06,0x00,0x00,0x00}, // C {0x00,0x00,0x7F,0x7F,0x7F,0x60,0x60,0x60, - 0x60,0x60,0x60,0x70,0x3F,0x1F,0x00,0x00, - 0x00,0x00,0xFF,0xFF,0xFF,0x03,0x03,0x03, - 0x03,0x03,0x03,0x07,0xFE,0x0FC,0x00,0x00}, // D - + 0x60,0x60,0x60,0x70,0x3F,0x1F,0x00,0x00, + 0x00,0x00,0xFF,0xFF,0xFF,0x03,0x03,0x03, + 0x03,0x03,0x03,0x07,0xFE,0x0FC,0x00,0x00}, // D + {0x00,0x00,0x07F,0x7F,0x7F,0x60,0x60,0x60, - 0x60,0x60,0x60,0x60,0x60,0x060,0x00,0x00, - 0x00,0x00,0xFF,0xFF,0xFF,0xC3,0xC3,0xC3, - 0xC3,0xC3,0xC3,0xC3,0x03,0x03,0x00,0x00}, // E + 0x60,0x60,0x60,0x60,0x60,0x060,0x00,0x00, + 0x00,0x00,0xFF,0xFF,0xFF,0xC3,0xC3,0xC3, + 0xC3,0xC3,0xC3,0xC3,0x03,0x03,0x00,0x00}, // E {0x00,0x00,0x7F,0x7F,0x7F,0x60,0x60,0x60, - 0x60,0x60,0x60,0x60,0x60,0x060,0x00,0x00, - 0x00,0x00,0xFF,0xFF,0xFF,0xC0,0xC0,0xC0, - 0xC0,0xC0,0xC0,0xC0,0x00,0x00,0x00,0x00}, // F + 0x60,0x60,0x60,0x60,0x60,0x060,0x00,0x00, + 0x00,0x00,0xFF,0xFF,0xFF,0xC0,0xC0,0xC0, + 0xC0,0xC0,0xC0,0xC0,0x00,0x00,0x00,0x00}, // F {0x00,0x00,0x3F,0x7F,0x7F,0x60,0x60,0x60, - 0x60,0x60,0x60,0x78,0x38,0x18,0x00,0x00, - 0x00,0x00,0xFE,0xFF,0xFF,0x03,0x03,0x03, - 0x03,0x23,0x33,0x3F,0x3F,0x3F,0x00,0x00}, // G + 0x60,0x60,0x60,0x78,0x38,0x18,0x00,0x00, + 0x00,0x00,0xFE,0xFF,0xFF,0x03,0x03,0x03, + 0x03,0x23,0x33,0x3F,0x3F,0x3F,0x00,0x00}, // G {0x00,0x00,0x7F,0x7F,0x7F,0x00,0x00,0x00, - 0x00,0x00,0x00,0x7F,0x7F,0x7F,0x00,0x00, - 0x00,0x00,0xFF,0xFF,0xFF,0xC0,0xC0,0xC0, - 0xC0,0xC0,0xC0,0xFF,0xFF,0xFF,0x00,0x00 }, // H + 0x00,0x00,0x00,0x7F,0x7F,0x7F,0x00,0x00, + 0x00,0x00,0xFF,0xFF,0xFF,0xC0,0xC0,0xC0, + 0xC0,0xC0,0xC0,0xFF,0xFF,0xFF,0x00,0x00 }, // H {0x00,0x00,0x00,0x00,0x60,0x60,0x7F,0x7F, - 0x7F,0x7F,0x60,0x60,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x03,0x03,0xFF,0xFF, - 0xFF,0xFF,0x03,0x03,0x00,0x00,0x00,0x00 }, // I + 0x7F,0x7F,0x60,0x60,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x03,0x03,0xFF,0xFF, + 0xFF,0xFF,0x03,0x03,0x00,0x00,0x00,0x00 }, // I {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x7F,0x7F,0x7F,0x00,0x00, - 0x00,0x00,0x00,0x01E,0x1F,0x1F,0x03,0x03, - 0x03,0x03,0x03,0xFF,0xFF,0xFE,0x00,0x00 }, // J + 0x00,0x00,0x00,0x7F,0x7F,0x7F,0x00,0x00, + 0x00,0x00,0x00,0x01E,0x1F,0x1F,0x03,0x03, + 0x03,0x03,0x03,0xFF,0xFF,0xFE,0x00,0x00 }, // J {0x00,0x00,0x7F,0x7F,0x7F,0x03,0x03,0x06, - 0x0C,0x18,0x30,0x60,0x60,0x00,0x00,0x00, - 0x00,0x00,0xFE,0xFE,0xFE,0xC0,0xC0,0x60, - 0x30,0x18,0x0C,0x06,0x06,0x00,0x00,0x00 }, // K + 0x0C,0x18,0x30,0x60,0x60,0x00,0x00,0x00, + 0x00,0x00,0xFE,0xFE,0xFE,0xC0,0xC0,0x60, + 0x30,0x18,0x0C,0x06,0x06,0x00,0x00,0x00 }, // K {0x00,0x00,0x7F,0x7F,0x7F,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0xFF,0xFF,0xFF,0x03,0x03,0x03, - 0x03,0x03,0x03,0x03,0x03,0x00,0x00,0x00 }, // L + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0xFF,0xFF,0xFF,0x03,0x03,0x03, + 0x03,0x03,0x03,0x03,0x03,0x00,0x00,0x00 }, // L {0x00,0x00,0x7F,0x7F,0x7F,0x1C,0x0E,0x07, - 0x07,0x0E,0x1C,0x7F,0x7F,0x7F,0x00,0x00, - 0x00,0x00,0xFC,0xFC,0xFC,0x00,0x00,0x80, - 0x80,0x00,0x00,0xFC,0xFC,0xFC,0x00,0x00 }, // M + 0x07,0x0E,0x1C,0x7F,0x7F,0x7F,0x00,0x00, + 0x00,0x00,0xFC,0xFC,0xFC,0x00,0x00,0x80, + 0x80,0x00,0x00,0xFC,0xFC,0xFC,0x00,0x00 }, // M {0x00,0x00,0x7F,0x7F,0x7F,0x38,0x1C,0x07, - 0x03,0x00,0x00,0x7F,0x7F,0x7F,0x00,0x00, - 0x00,0x00,0xFC,0xFC,0xFC,0x00,0x00,0x00, - 0x80,0xE0,0x70,0xFC,0xFC,0xFC,0x00,0x00 }, // N + 0x03,0x00,0x00,0x7F,0x7F,0x7F,0x00,0x00, + 0x00,0x00,0xFC,0xFC,0xFC,0x00,0x00,0x00, + 0x80,0xE0,0x70,0xFC,0xFC,0xFC,0x00,0x00 }, // N {0x00,0x00,0x3F,0x7F,0x7F,0x60,0x60,0x60, - 0x60,0x60,0x60,0x7F,0x7F,0x3F,0x00,0x00, - 0x00,0x00,0xFE,0xFF,0xFF,0x03,0x03,0x03, - 0x03,0x03,0x03,0xFF,0xFF,0x0FE,0x00,0x00}, // O + 0x60,0x60,0x60,0x7F,0x7F,0x3F,0x00,0x00, + 0x00,0x00,0xFE,0xFF,0xFF,0x03,0x03,0x03, + 0x03,0x03,0x03,0xFF,0xFF,0x0FE,0x00,0x00}, // O {0x00,0x00,0x07F,0x7F,0x7F,0x60,0x60,0x60, - 0x60,0x60,0x60,0x7F,0x7F,0x03F,0x00,0x00, - 0x00,0x00,0xFF,0xFF,0xFF,0xC0,0xC0,0xC0, - 0xC0,0xC0,0xC0,0xC0,0xC0,0x80,0x00,0x00}, // P + 0x60,0x60,0x60,0x7F,0x7F,0x03F,0x00,0x00, + 0x00,0x00,0xFF,0xFF,0xFF,0xC0,0xC0,0xC0, + 0xC0,0xC0,0xC0,0xC0,0xC0,0x80,0x00,0x00}, // P {0x00,0x00,0x3F,0x7F,0x60,0x60,0x60,0x60, - 0x60,0x60,0x60,0x60,0x7F,0x3F,0x00,0x00, - 0x00,0x00,0xF8,0xFC,0x0C,0x0C,0x0C,0x0C, - 0x0C,0x0C,0x3C,0x3C,0xFE,0xFF,0x03,0x00}, // Q + 0x60,0x60,0x60,0x60,0x7F,0x3F,0x00,0x00, + 0x00,0x00,0xF8,0xFC,0x0C,0x0C,0x0C,0x0C, + 0x0C,0x0C,0x3C,0x3C,0xFE,0xFF,0x03,0x00}, // Q {0x00,0x00,0x07F,0x7F,0x7F,0x61,0x61,0x61, - 0x61,0x61,0x61,0x7F,0x7F,0x03F,0x00,0x00, - 0x00,0x00,0xFF,0xFF,0xFF,0xC0,0xE0,0xF0, - 0xB8,0x9C,0x8E,0x87,0x83,0x03,0x00,0x00}, // R + 0x61,0x61,0x61,0x7F,0x7F,0x03F,0x00,0x00, + 0x00,0x00,0xFF,0xFF,0xFF,0xC0,0xE0,0xF0, + 0xB8,0x9C,0x8E,0x87,0x83,0x03,0x00,0x00}, // R {0x00,0x00,0x1E,0x3F,0x73,0x61,0x61,0x61, - 0x61,0x61,0x61,0x70,0x30,0x00,0x00,0x00, - 0x00,0x00,0x0C,0x0C,0x86,0x86,0x86,0x86, - 0x86,0x86,0xC6,0xFC,0x78,0x00,0x00,0x00}, // S + 0x61,0x61,0x61,0x70,0x30,0x00,0x00,0x00, + 0x00,0x00,0x0C,0x0C,0x86,0x86,0x86,0x86, + 0x86,0x86,0xC6,0xFC,0x78,0x00,0x00,0x00}, // S {0x00,0x00,0x10,0x30,0x30,0x30,0x30,0x3F, - 0x3F,0x30,0x30,0x30,0x30,0x10,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF, - 0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, // T + 0x3F,0x30,0x30,0x30,0x30,0x10,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF, + 0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, // T {0x00,0x00,0x7F,0x7F,0x7F,0x00,0x00,0x00, - 0x00,0x00,0x00,0x7F,0x7F,0x7F,0x00,0x00, - 0x00,0x00,0xFC,0xFE,0xFE,0x06,0x06,0x06, - 0x06,0x06,0x06,0xFE,0xFE,0xFC,0x00,0x00 }, // U + 0x00,0x00,0x00,0x7F,0x7F,0x7F,0x00,0x00, + 0x00,0x00,0xFC,0xFE,0xFE,0x06,0x06,0x06, + 0x06,0x06,0x06,0xFE,0xFE,0xFC,0x00,0x00 }, // U {0x60,0x70,0x1C,0x0F,0x03,0x00,0x00, - 0x00,0x00,0x00,0x00,0x03,0x0F,0x1C,0x70,0x60, - 0x00,0x00,0x00,0x00,0xC0,0xF0,0x3C,0x06, - 0x06,0x3C,0xF0,0xC0,0x00,0x00,0x00,0x00 }, // V + 0x00,0x00,0x00,0x00,0x03,0x0F,0x1C,0x70,0x60, + 0x00,0x00,0x00,0x00,0xC0,0xF0,0x3C,0x06, + 0x06,0x3C,0xF0,0xC0,0x00,0x00,0x00,0x00 }, // V {0x00,0x00,0x7F,0x7F,0x7F,0x00,0x00,0x00, - 0x00,0x00,0x00,0x7F,0x7F,0x7F,0x00,0x00, - 0x00,0x00,0xFC,0xFE,0xFE,0x1C,0x38,0x70, - 0x70,0x38,0x1C,0xFE,0xFE,0xFC,0x00,0x00 }, // W + 0x00,0x00,0x00,0x7F,0x7F,0x7F,0x00,0x00, + 0x00,0x00,0xFC,0xFE,0xFE,0x1C,0x38,0x70, + 0x70,0x38,0x1C,0xFE,0xFE,0xFC,0x00,0x00 }, // W {0x00,0x00,0x60,0x70,0x78,0x0E,0x07,0x03, - 0x03,0x07,0x0E,0x78,0x70,0x60,0x00,0x00, - 0x00,0x00,0x06,0x0E,0x1E,0x70,0xE0,0xC0, - 0xC0,0xE0,0x70,0x1E,0x0E,0x06,0x00,0x00 }, // X + 0x03,0x07,0x0E,0x78,0x70,0x60,0x00,0x00, + 0x00,0x00,0x06,0x0E,0x1E,0x70,0xE0,0xC0, + 0xC0,0xE0,0x70,0x1E,0x0E,0x06,0x00,0x00 }, // X {0x00,0x00,0x20,0x30,0x18,0x0C,0x06,0x03, - 0x03,0x06,0x0C,0x18,0x30,0x20,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC, - 0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, // Y + 0x03,0x06,0x0C,0x18,0x30,0x20,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC, + 0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, // Y {0x00,0x00,0x70,0x70,0x60,0x60,0x60,0x61, - 0x63,0x67,0x6E,0x78,0x70,0x60,0x00,0x00, - 0x00,0x00,0x06,0x0E,0x3E,0x76,0xE6,0xC6, - 0x86,0x06,0x06,0x06,0x0E,0x0E,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0x0,0x0, + 0x0,0x0,0xF0,0xF0,0x60,0x30,0x30,0x30, + 0x60,0xE0,0x80,0x0,0x0,0x0,0x0,0x0}, // b {0x0,0x0,0x07,0x0F,0x0C,0x18,0x18,0x18, - 0xC,0x4,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0xC0,0xE0,0x60,0x30,0x30,0x30, - 0x60,0x40,0x0,0x0,0x0,0x0,0x0,0x0}, // c + 0xC,0x4,0x0,0x0,0x0,0x0,0x0,0x0, + 0x0,0x0,0xC0,0xE0,0x60,0x30,0x30,0x30, + 0x60,0x40,0x0,0x0,0x0,0x0,0x0,0x0}, // c {0x0,0x0,0x03,0x07,0x0C,0x18,0x18,0x18, - 0xFF,0xFF,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0xC0,0xE0,0x60,0x30,0x30,0x30, - 0xF8,0xF8,0x0,0x0,0x0,0x0,0x0,0x0}, // d + 0xFF,0xFF,0x0,0x0,0x0,0x0,0x0,0x0, + 0x0,0x0,0xC0,0xE0,0x60,0x30,0x30,0x30, + 0xF8,0xF8,0x0,0x0,0x0,0x0,0x0,0x0}, // d {0x0,0x0,0x03,0x0F,0x0D,0x19,0x19,0x19, - 0x19,0x0F,0x06,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0xC0,0xE0,0x30,0x30,0x10,0x30, - 0x30,0x60,0x40,0x0,0x0,0x0,0x0,0x0}, // e + 0x19,0x0F,0x06,0x0,0x0,0x0,0x0,0x0, + 0x0,0x0,0xC0,0xE0,0x30,0x30,0x10,0x30, + 0x30,0x60,0x40,0x0,0x0,0x0,0x0,0x0}, // e {0x0,0x0,0x0,0x0,0x00,0x03,0x03,0x3F, - 0x7F,0x43,0x03,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0x00,0xFE, - 0xFE,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // f + 0x7F,0x43,0x03,0x0,0x0,0x0,0x0,0x0, + 0x0,0x0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x0,0x0,0x0, + 0xF0,0xF0,0x0,0x0,0x0,0x0,0x0,0x0}, // n {0x0,0x0,0x03,0x07,0x0C,0x18,0x18,0x18, - 0x0C,0x07,0x03,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x80,0xC0,0x60,0x30,0x30,0x30, - 0x60,0xC0,0x80,0x0,0x0,0x0,0x0,0x0}, // o + 0x0C,0x07,0x03,0x0,0x0,0x0,0x0,0x0, + 0x0,0x0,0x80,0xC0,0x60,0x30,0x30,0x30, + 0x60,0xC0,0x80,0x0,0x0,0x0,0x0,0x0}, // o {0x0,0x0,0x0,0x1F,0x1F,0x0C,0x08,0x08, - 0x0C,0x07,0x03,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0xFE,0xFE,0x30,0x10,0x10, - 0x30,0xE0,0xC0,0x0,0x0,0x0,0x0,0x0}, // p + 0x0C,0x07,0x03,0x0,0x0,0x0,0x0,0x0, + 0x0,0x0,0x0,0xFE,0xFE,0x30,0x10,0x10, + 0x30,0xE0,0xC0,0x0,0x0,0x0,0x0,0x0}, // p {0x0,0x0,0x01,0x07,0x0C,0x08,0x08,0x0C, - 0x1F,0x1F,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x80,0xE0,0x30,0x10,0x10,0x30, - 0xFE,0xFE,0x0,0x0,0x0,0x0,0x0,0x0}, // q + 0x1F,0x1F,0x0,0x0,0x0,0x0,0x0,0x0, + 0x0,0x0,0x80,0xE0,0x30,0x10,0x10,0x30, + 0xFE,0xFE,0x0,0x0,0x0,0x0,0x0,0x0}, // q {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1F, - 0x1F,0x0C,0x08,0x0C,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xF0, - 0xF0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // r + 0x1F,0x0C,0x08,0x0C,0x0,0x0,0x0,0x0, + 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x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,0x0,0x0,0x0,0x0,0x0,0x0}, // v {0x0,0x0,0x18,0x1F,0x0,0x0,0x07,0x0E, 0x07,0x0,0x0,0x1F,0x18,0x0,0x0,0x0, @@ -1073,39 +1069,39 @@ 0xC0,0x60,0x60,0xC0,0x0,0x0,0x0,0x0}, // w {0x0,0x0,0x0,0x0,0x08,0x0C,0x06,0x03, - 0x03,0x06,0x0C,0x08,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x10,0x30,0x60,0xC0, - 0xC0,0x60,0x30,0x10,0x0,0x0,0x0,0x0}, // x + 0x03,0x06,0x0C,0x08,0x0,0x0,0x0,0x0, + 0x0,0x0,0x0,0x0,0x10,0x30,0x60,0xC0, + 0xC0,0x60,0x30,0x10,0x0,0x0,0x0,0x0}, // x {0x0,0x0,0x08,0x0C,0x06,0x03,0x01,0x01, - 0x03,0x06,0x0C,0x08,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0C,0x18,0x30,0x60,0xC0,0x80, - 0x00,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // y + 0x03,0x06,0x0C,0x08,0x0,0x0,0x0,0x0, + 0x0,0x0,0x0C,0x18,0x30,0x60,0xC0,0x80, + 0x00,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // y {0x0,0x0,0x08,0x08,0x08,0x09,0x0B,0x0E, - 0x0C,0x08,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x30,0x070,0xD0,0x90,0x10,0x10, - 0x10,0x10,0x0,0x0,0x0,0x0,0x0,0x0}, // z + 0x0C,0x08,0x0,0x0,0x0,0x0,0x0,0x0, + 0x0,0x0,0x30,0x070,0xD0,0x90,0x10,0x10, + 0x10,0x10,0x0,0x0,0x0,0x0,0x0,0x0}, // z {0x0,0x0,0x0,0x0,0x3,0x3,0x7F,0xFC, - 0xC0,0xC0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0xFC,0xFE, - 0x6,0x6,0x0,0x0,0x0,0x0,0x0,0x0}, // { + 0xC0,0xC0,0x0,0x0,0x0,0x0,0x0,0x0, + 0x0,0x0,0x0,0x0,0x0,0x0,0xFC,0xFE, + 0x6,0x6,0x0,0x0,0x0,0x0,0x0,0x0}, // { {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xFF, - 0xFF,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xFF, - 0xFF,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // | + 0xFF,0x0,0x0,0x0,0x0,0x0,0x0,0x0, + 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xFF, + 0xFF,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // | {0x0,0x0,0x0,0x0,0x0,0x0,0xC0,0xC0, - 0xFC,0x7F,0x3,0x3,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0x6,0x6, - 0xFE,0xFC,0x0,0x0,0x0,0x0,0x0,0x0}, // } + 0xFC,0x7F,0x3,0x3,0x0,0x0,0x0,0x0, + 0x0,0x0,0x0,0x0,0x0,0x0,0x6,0x6, + 0xFE,0xFC,0x0,0x0,0x0,0x0,0x0,0x0}, // } {0x0,0x0,0x0,0x0,0x18,0x30,0x30,0x30, - 0x38,0x18,0x18,0x18,0x30,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, - 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // ~ + 0x38,0x18,0x18,0x18,0x30,0x0,0x0,0x0, + 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, + 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // ~ }; @@ -1145,7 +1141,6 @@ } } - //********************************************************************* void print_char(Max7219 *p_display, uint8_t position99, char c) { @@ -1160,73 +1155,69 @@ if(position99 < 33) { - //get device and device_position - if(position99 > 8) - { - if(position99%8) - { - device = ((position99/8) + 1); - position99 = position99%8; - } - else - { - device = position99/8; - position99 = 8; - } - } - else - { - device = 1; - } - - //check for dispaly wrap around - //(moving to next 8x8 grid cause character doesn't fit on current one) - if(position99 > 3) - { - wrap_idx = (9 - position99); - if(device < 4) - { - wrap_device = (device + 1); - } - else - { - wrap_device = 1; - } - } - else - { - wrap_idx = 6; //make bigger than idx, not used - wrap_device = 0; //not used - } - - //print character to position - for(idx = 0; idx < 6; idx++) - { - //check for wrap - if((idx >= wrap_idx) && (device != 4)) - { - p_display->write_digit(wrap_device, ((idx - wrap_idx) + 1), char_buff[idx]); - } - else - { - p_display->write_digit(device, (position99 + idx), char_buff[idx]); - } - - buff_end = ((buff_start - 1) + idx); - display_buff[buff_end] = char_buff[idx]; - } + //get device and device_position + if(position99 > 8) + { + if(position99%8) + { + device = ((position99/8) + 1); + position99 = position99%8; + } + else + { + device = position99/8; + position99 = 8; + } + } + else + { + device = 1; + } + //check for dispaly wrap around + //(moving to next 8x8 grid cause character doesn't fit on current one) + if(position99 > 3) + { + wrap_idx = (9 - position99); + if(device < 4) + { + wrap_device = (device + 1); + } + else + { + wrap_device = 1; + } + } + else + { + wrap_idx = 6; //make bigger than idx, not used + wrap_device = 0; //not used + } + //print character to position + for(idx = 0; idx < 6; idx++) + { + //check for wrap + if((idx >= wrap_idx) && (device != 4)) + { + p_display->write_digit(wrap_device, ((idx - wrap_idx) + 1), char_buff[idx]); + } + else + { + p_display->write_digit(device, (position99 + idx), char_buff[idx]); + } + buff_end = ((buff_start - 1) + idx); + display_buff[buff_end] = char_buff[idx]; + } } else { - for(idx = 0; idx < 6; idx++) - { - buff_end = ((buff_start - 1) + idx); - display_buff[buff_end] = char_buff[idx]; - } + for(idx = 0; idx < 6; idx++) + { + buff_end = ((buff_start - 1) + idx); + display_buff[buff_end] = char_buff[idx]; + } } } - //********************************************************************* void print_string(Max7219 *p_display, uint8_t position, const char *s) { @@ -1239,7 +1230,6 @@ } } - //********************************************************************* void shift_display_right(Max7219 *p_display, uint8_t count, uint8_t ms_delay) { @@ -1259,12 +1249,10 @@ temp_buff[idy + 1] = display_buff[idy]; } } - for(idy = 0; idy < (buff_end + 1); idy++) { //save shifted display in buffer display_buff[idy] = temp_buff[idy]; - if(idy <= DISPLAY_BUFF_END) { position99 = ((idy - DISPLAY_BUFF_START) + 1); @@ -1300,7 +1288,7 @@ } else { - position99 = 8; + position99 = 8; } p_display->write_digit(2, position99, display_buff[idy]); } @@ -1310,12 +1298,10 @@ } } } - wait_ms(ms_delay); } } - //********************************************************************* void shift_display_left(Max7219 *p_display, uint8_t count, uint8_t ms_delay) { @@ -1335,12 +1321,10 @@ temp_buff[idy - 1] = display_buff[idy]; } } - for(idy = 0; idy < (buff_end + 1); idy++) { //save shifted display in buffer display_buff[idy] = temp_buff[idy]; - if(idy <= DISPLAY_BUFF_END) { position99 = ((idy - DISPLAY_BUFF_START) + 1); @@ -1376,7 +1360,7 @@ } else { - position99 = 8; + position99 = 8; } p_display->write_digit(2, position99, display_buff[idy]); } @@ -1386,7 +1370,6 @@ } } } - wait_ms(ms_delay); } } @@ -1409,16 +1392,13 @@ display_buff[idx + DISPLAY_BUFF_START] = 0xFF; } } - if(buff_end < (quad * 8)) { - buff_end = (quad * 8); + buff_end = (quad * 8); } - p_display->device_all_on(quad); } - //********************************************************************* void quad_all_off(Max7219 *p_display, uint8_t quad) { @@ -1440,14 +1420,12 @@ //is buff_end in the quad? if((((quad - 1) * 8) < buff_end) && ((quad * 8) > buff_end)) { - buff_end = ((quad - 1) * 8); + buff_end = ((quad - 1) * 8); } //leave it alone otherwise - p_display->device_all_off(quad); } - //********************************************************************* void all_on(Max7219 *p_display) { @@ -1455,16 +1433,13 @@ { display_buff[idx] = 0xFF; } - if(buff_end < 32) { - buff_end = 32; + buff_end = 32; } - p_display->display_all_on(); } - //********************************************************************* void all_off(Max7219 *p_display) { @@ -1472,55 +1447,45 @@ { display_buff[idx] = 0; } - if(buff_end < 32) { - buff_end = 0; + buff_end = 0; } - p_display->display_all_off(); } - //********************************************************************* void demo(Max7219 *display, max7219_configuration_t display_config, bool endless_loop) { uint8_t position = 1; uint8_t idx = 0; - do { all_off(display); - if(position > 25) { position = 1; } printf("\nPosition = %d\n", position); - for(idx = 0x20; idx < 0x7F; idx++) { print_char(display, position, (char) idx); wait(0.25); } position = (position + 8); - all_on(display); - for(idx = 0; idx < 16; idx++) { display_config.intensity = 15 - idx; display->init_display(display_config); wait_ms(50); } - for(idx = 0; idx < 16; idx++) { display_config.intensity = idx; display->init_display(display_config); wait_ms(100); } - wait_ms(100); all_off(display); wait_ms(100); @@ -1541,7 +1506,6 @@ while(endless_loop); } - //********************************************************************* void endless_scroll_display(Max7219 *display, uint32_t scroll_right) { @@ -1564,231 +1528,208 @@ } /********************************************************************/ -void get_16x16_character(char c, uint8_t *char_buff,uint8_t font_type) +void get_16x16_character(char c, uint8_t *char_buff, uint8_t font_type) { uint8_t idx; switch(font_type) { - case 1: - for(idx = 0; idx < 32; idx++) - { - //Get byte of char from map & store in buffer - char_buff[idx] = Aerial_bold_font_16x16[c - 0x20][idx]; - } - break; - - case 2: - for(idx = 0; idx < 32; idx++) - { - //Get byte of char from map & store in buffer - char_buff[idx] = Manual_font_16x16[c - 0x20][idx]; - } - break; - default : - for(idx = 0; idx < 32; idx++) - { - //Get byte of char from map & store in buffer - char_buff[idx] = Aerial_bold_font_16x16[c - 0x20][idx]; - } - break; - } //switch - + case 1: // Use 16x16 Aerial bold font + for(idx = 0; idx < 32; idx++) + { + //Get byte of char from map & store in buffer + char_buff[idx] = Aerial_bold_font_16x16[c - 0x20][idx]; + } + break; + case 2: // Use For 16x16 manual font + for(idx = 0; idx < 32; idx++) + { + //Get byte of char from map & store in buffer + char_buff[idx] = Manual_font_16x16[c - 0x20][idx]; + } + break; + default : //Use 16x16 Aerial bold font + for(idx = 0; idx < 32; idx++) + { + //Get byte of char from map & store in buffer + char_buff[idx] = Aerial_bold_font_16x16[c - 0x20][idx]; + } + break; + } //end of switch } - -void print_char_16x16(Max7219 *p_display, uint16_t position, char c,uint8_t font_type) +void print_char_16x16(Max7219 *p_display, uint16_t position, char c, uint8_t font_type) { - uint8_t idx; + uint8_t idx,device; uint8_t char_buff[32]; - uint8_t device; uint16_t buff_start = position; get_16x16_character(c, char_buff,font_type); - - for(device =1;device<5;device++) + //Write bit map data to display device and store it in buffer + for(device = 1; device < 5; device++) { - for(idx = 0; idx < 8; idx++) - { - p_display->write_digit(device, idx+1,char_buff[idx+(device-1)*8]); - - //get index for display buffer, keeps image of display for shifting - buff_end = (device - 1) * 8 + idx + buff_start; - - //wrap buff back around - if(buff_end > 1023) + for(idx = 0; idx < 8; idx++) { - buff_end -= 1023; - } - display_buff[buff_end] = char_buff[idx+(device-1)*8]; - - } + p_display->write_digit(device, (idx+1), char_buff[idx + ( device - 1) * 8]); + //Get index for display buffer, keeps image of display for shifting + buff_end = (device - 1) * 8 + idx + buff_start; + //Wrap buffer back around + if(buff_end > 1023) + { + buff_end -= 1023; + } + display_buff[buff_end] = char_buff[idx + ( device - 1) * 8]; + } } buff_end +=1; - //Arrange single character data in upper and lower row - for(idx=0;idx<16;idx++) - { - disp_buff1[idx] = display_buff[idx]; - disp_buff2[idx] = display_buff[idx+16]; - } - + //Arrange single character data in buffers as upper and lower row + for(idx = 0;idx < 16; idx++) + { + disp_buff1[idx] = display_buff[idx]; + disp_buff2[idx] = display_buff[idx+16]; + } } + void print_string_16x16(Max7219 *p_display, char *s,uint8_t font_type) { - uint16_t idx=0,idy=0; + uint16_t idx1=0,idy1=0; - while(s[idx] != '\0') + while(s[idx1] != '\0') { - print_char_16x16(p_display, (idx*32), s[idx],font_type); - idx++; + print_char_16x16(p_display, (idx1 * 32), s[idx1], font_type); + idx1++; wait_ms(200); } - //Arrange character data in upper and lower row data - for (idy=0;idy<buff_end/32;idy++) + for (idy1=0; idy1 < (buff_end/32); idy1++) { - for(idx=0;idx<16;idx++) - { - disp_buff1[idx+16*idy] = display_buff[idx+32*idy]; - disp_buff2[idx+16*idy] = display_buff[idx+16+32*idy]; - } + for(idx1 = 0; idx1 < 16; idx1++) + { + disp_buff1[idx1 + (16 * idy1)] = display_buff[idx1 + (32 * idy1)]; + disp_buff2[idx1 + (16 * idy1)] = display_buff[idx1 + 16 + (32 * idy1)]; + } } - - // Clear buffer - for(idx=0;idx<1024;idx++) - display_buff[idx] = 0; - + // Clear buffer for next iteration + for(idx1 = 0; idx1 < 1024; idx1++) + display_buff[idx1] = 0; } //********************************************************************* void shift_display_right_16x16(Max7219 *p_display, uint8_t count, uint8_t delay) { - uint16_t idx, idy; - uint8_t position; - int device; - - for(idx = 0; idx < count; idx++) + uint16_t idx1, idy1; + uint8_t position,device; + + for(idx1 = 0; idx1 < count; idx1++) { - - for(idy = 0; idy < buff_end/2; idy++) - { - if(idy ==(buff_end/2-1)) - { - temp_buff1[0] = disp_buff1[(buff_end/2) - 1]; - temp_buff2[0] = disp_buff2[(buff_end/2) - 1]; - - } - else - { - temp_buff1[idy + 1] = disp_buff1[idy]; - temp_buff2[idy + 1] = disp_buff2[idy]; - } - - } - for(idy = 0; idy < buff_end/2; idy++) - { - disp_buff1[idy] = temp_buff1[idy]; - disp_buff2[idy] = temp_buff2[idy]; - - } - for(idy = 0; idy < 16; idy++) - { - display_buff_16x16[idy] = disp_buff1[idy]; - display_buff_16x16[idy+16] = disp_buff2[idy]; - } - - position = 0; - for(device =1;device<5;device++) + // Right shift data in display buffer 1 & 2 + for(idy1 = 0; idy1 < buff_end/2; idy1++) { - for(idy = 0; idy < 8; idy++) - { - p_display->write_digit(device, idy+1,display_buff_16x16[idy+position]); - } - position+=8; - } - wait_ms(delay); - } - -} - -void shift_display_left_16x16(Max7219 *p_display, uint8_t count, uint8_t delay) -{ - uint16_t idx, idy; - uint8_t position; - int device; - - for(idx = 0; idx < count; idx++) - { - for(idy = 0; idy < buff_end/2; idy++) + if(idy1 == ((buff_end/2)-1)) + { + temp_buff1[0] = disp_buff1[(buff_end/2) - 1]; + temp_buff2[0] = disp_buff2[(buff_end/2) - 1]; + } + else + { + temp_buff1[idy1 + 1] = disp_buff1[idy1]; + temp_buff2[idy1 + 1] = disp_buff2[idy1]; + } + } + // Save shifted data in the display buffer 1 & 2 + for(idy1 = 0; idy1 < buff_end/2; idy1++) + { + disp_buff1[idy1] = temp_buff1[idy1]; + disp_buff2[idy1] = temp_buff2[idy1]; + } + for(idy1 = 0; idy1 < 16; idy1++) { - if(idy == 0) - { - temp_buff1[buff_end/2-1] = disp_buff1[idy]; - temp_buff2[buff_end/2-1] = disp_buff2[idy]; - - } - else - { - temp_buff1[idy - 1] = disp_buff1[idy]; - temp_buff2[idy - 1] = disp_buff2[idy]; - - } - - } - for(idy = 0; idy < buff_end/2; idy++) - { - disp_buff1[idy] = temp_buff1[idy]; - disp_buff2[idy] = temp_buff2[idy]; - - } - for(idy = 0; idy < 16; idy++) - { - display_buff_16x16[idy] = disp_buff1[idy]; - display_buff_16x16[idy+16] = disp_buff2[idy]; + display_buff_16x16[idy1] = disp_buff1[idy1]; + display_buff_16x16[idy1 + 16] = disp_buff2[idy1]; } position = 0; - for(device =1;device<5;device++) + for(device = 1; device < 5; device++) { - for(idy = 0; idy < 8; idy++) - { - p_display->write_digit(device, idy+1,display_buff_16x16[idy+position]); - } - position+=8; - } - - wait_ms(delay); + for(idy1 = 0; idy1 < 8; idy1++) + { + p_display->write_digit(device, (idy1 + 1), display_buff_16x16[idy1 + position]); + } + position+= 8; + } + wait_ms(delay); } - } //********************************************************************* -void demo_16x16(Max7219 *display, max7219_configuration_t display_config, uint8_t font_type,bool endless_loop) +void shift_display_left_16x16(Max7219 *p_display, uint8_t count, uint8_t delay) { - uint8_t idx = 0; + uint16_t idx1,idy1; + uint8_t position,device; + + for(idx1 = 0; idx1 < count; idx1++) + { + // Left shift data in display buffer 1 & 2 + for(idy1 = 0; idy1 < buff_end/2; idy1++) + { + if(idy1 == 0) + { + temp_buff1[(buff_end/2) - 1] = disp_buff1[idy1]; + temp_buff2[(buff_end/2) - 1] = disp_buff2[idy1]; + } + else + { + temp_buff1[idy1 - 1] = disp_buff1[idy1]; + temp_buff2[idy1 - 1] = disp_buff2[idy1]; + } + } + // Save shifted data in the display buffer 1 & 2 + for(idy1 = 0; idy1 < buff_end/2; idy1++) + { + disp_buff1[idy1] = temp_buff1[idy1]; + disp_buff2[idy1] = temp_buff2[idy1]; + } + for(idy1 = 0; idy1 < 16; idy1++) + { + display_buff_16x16[idy1] = disp_buff1[idy1]; + display_buff_16x16[idy1 + 16] = disp_buff2[idy1]; + } + position = 0; + for(device = 1; device < 5; device++) + { + for(idy1 = 0; idy1 < 8; idy1++) + { + p_display->write_digit(device, (idy1+1), display_buff_16x16[idy1 + position]); + } + position+= 8; + } + wait_ms(delay); + } +} + +//********************************************************************* +void demo_16x16(Max7219 *display, max7219_configuration_t display_config, uint8_t font_type, bool endless_loop) +{ + uint8_t index = 0; do { all_off(display); - - for(idx = 0x20; idx < 0x7F; idx++) + for(index = 0x20; index < 0x7F; index++) { - print_char_16x16(display, 0, (char) idx,font_type); + print_char_16x16(display, 0, (char) index, font_type); wait(0.25); } - all_on(display); - - for(idx = 0; idx < 16; idx++) + for(index = 0; index < 16; index++) { - display_config.intensity = 15 - idx; + display_config.intensity = 15 - index; display->init_display(display_config); wait_ms(50); } - - for(idx = 0; idx < 16; idx++) + for(index = 0; index < 16; index++) { - display_config.intensity = idx; + display_config.intensity = index; display->init_display(display_config); wait_ms(100); } @@ -1798,14 +1739,15 @@ all_on(display); wait_ms(500); - print_char_16x16(display,0,'A',font_type); + // Display character then shift right and left + print_char_16x16(display, 0, 'A', font_type); wait_ms(500); shift_display_right_16x16(display, 32, 100); shift_display_left_16x16(display, 32, 100); all_off(display); wait_ms(100); - - print_string_16x16(display, "Maxim",font_type); + // Display string then shift right and left + print_string_16x16(display, "Maxim", font_type); wait_ms(500); shift_display_right_16x16(display, 32, 100); shift_display_left_16x16(display, 32, 100); @@ -1856,7 +1798,6 @@ return(user_input); } - //********************************************************************* uint32_t get_user_input(char *msg, uint32_t max_val) { @@ -1875,23 +1816,19 @@ str[strlen(str) - 1] = '\0'; str[strlen(str) - 1] = '\0'; } - user_input = strtoul(str, NULL, 0); - printf("\nYou entered = %d\n", user_input); if(user_input > max_val) { printf("\nOut of range\n"); } - } while(user_input > max_val); return(user_input); } - //********************************************************************* char get_user_char(char *msg) { @@ -1939,5 +1876,3 @@ return(str); } - -