connectcore-demo-example: add support for ccmp157-dvk board
Signed-off-by: David Escalona <david.escalona@digi.com>
This commit is contained in:
parent
d275ad225f
commit
4e2f032267
|
|
@ -740,6 +740,7 @@ Digi Demo - Dashboard
|
||||||
|
|
||||||
<!-- Local JS files and functions -->
|
<!-- Local JS files and functions -->
|
||||||
<script type="text/javascript" src="./static/js/sidebar.js"></script>
|
<script type="text/javascript" src="./static/js/sidebar.js"></script>
|
||||||
|
<script type="text/javascript" src="./static/js/ccmp157-dvk.js"></script>
|
||||||
<script type="text/javascript" src="./static/js/ccimx6ulsbc.js"></script>
|
<script type="text/javascript" src="./static/js/ccimx6ulsbc.js"></script>
|
||||||
<script type="text/javascript" src="./static/js/ccimx8mm-dvk.js"></script>
|
<script type="text/javascript" src="./static/js/ccimx8mm-dvk.js"></script>
|
||||||
<script type="text/javascript" src="./static/js/ccimx8m-nano.js"></script>
|
<script type="text/javascript" src="./static/js/ccimx8m-nano.js"></script>
|
||||||
|
|
|
||||||
|
|
@ -286,6 +286,7 @@ Digi Demo - Management
|
||||||
|
|
||||||
<!-- Local JS files and functions -->
|
<!-- Local JS files and functions -->
|
||||||
<script type="text/javascript" src="./static/js/sidebar.js"></script>
|
<script type="text/javascript" src="./static/js/sidebar.js"></script>
|
||||||
|
<script type="text/javascript" src="./static/js/ccmp157-dvk.js"></script>
|
||||||
<script type="text/javascript" src="./static/js/ccimx6ulsbc.js"></script>
|
<script type="text/javascript" src="./static/js/ccimx6ulsbc.js"></script>
|
||||||
<script type="text/javascript" src="./static/js/ccimx8mm-dvk.js"></script>
|
<script type="text/javascript" src="./static/js/ccimx8mm-dvk.js"></script>
|
||||||
<script type="text/javascript" src="./static/js/ccimx8m-nano.js"></script>
|
<script type="text/javascript" src="./static/js/ccimx8m-nano.js"></script>
|
||||||
|
|
|
||||||
|
|
@ -227,6 +227,7 @@ Digi Demo - Multimedia
|
||||||
|
|
||||||
<!-- Local JS files and functions -->
|
<!-- Local JS files and functions -->
|
||||||
<script type="text/javascript" src="./static/js/sidebar.js"></script>
|
<script type="text/javascript" src="./static/js/sidebar.js"></script>
|
||||||
|
<script type="text/javascript" src="./static/js/ccmp157-dvk.js"></script>
|
||||||
<script type="text/javascript" src="./static/js/ccimx6ulsbc.js"></script>
|
<script type="text/javascript" src="./static/js/ccimx6ulsbc.js"></script>
|
||||||
<script type="text/javascript" src="./static/js/ccimx8mm-dvk.js"></script>
|
<script type="text/javascript" src="./static/js/ccimx8mm-dvk.js"></script>
|
||||||
<script type="text/javascript" src="./static/js/ccimx8m-nano.js"></script>
|
<script type="text/javascript" src="./static/js/ccimx8m-nano.js"></script>
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 1.6 MiB |
|
|
@ -0,0 +1,147 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2022, Digi International Inc.
|
||||||
|
*
|
||||||
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||||
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||||
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
class CCMP157 extends ConnectCoreDevice {
|
||||||
|
|
||||||
|
// Public constants.
|
||||||
|
static DEVICE_TYPE = "ccmp157-dvk";
|
||||||
|
static PLATFORM_NAME = "ConnectCore MP157";
|
||||||
|
|
||||||
|
// Variables.
|
||||||
|
BOARD_IMAGE = "ccmp157_board.png";
|
||||||
|
BOARD_IMAGE_SCALE = 82;
|
||||||
|
|
||||||
|
CPU_COMPONENT_VISIBLE = true;
|
||||||
|
CPU_COMPONENT_HAS_PANEL = true;
|
||||||
|
CPU_COMPONENT_HAS_ARROW = true;
|
||||||
|
CPU_COMPONENT_PANEL_ALWAYS_VISIBLE = false;
|
||||||
|
CPU_COMPONENT_PANEL_ORIENTATION = VALUE_RIGHT;
|
||||||
|
CPU_COMPONENT_PANEL_HORIZONTAL_PERCENT = 68.5;
|
||||||
|
CPU_COMPONENT_PANEL_VERTICAL_PERCENT = 45;
|
||||||
|
CPU_COMPONENT_ARROW_PERCENT = 54.5;
|
||||||
|
CPU_COMPONENT_AREA_TOP_PERCENT = 50;
|
||||||
|
CPU_COMPONENT_AREA_LEFT_PERCENT = 32.9;
|
||||||
|
CPU_COMPONENT_AREA_WIDTH_PERCENT = 10;
|
||||||
|
CPU_COMPONENT_AREA_HEIGHT_PERCENT = 13;
|
||||||
|
|
||||||
|
MEMORY_COMPONENT_VISIBLE = true;
|
||||||
|
MEMORY_COMPONENT_HAS_PANEL = true;
|
||||||
|
MEMORY_COMPONENT_HAS_ARROW = true;
|
||||||
|
MEMORY_COMPONENT_PANEL_ALWAYS_VISIBLE = false;
|
||||||
|
MEMORY_COMPONENT_PANEL_ORIENTATION = VALUE_BOTTOM;
|
||||||
|
MEMORY_COMPONENT_PANEL_HORIZONTAL_PERCENT = 25;
|
||||||
|
MEMORY_COMPONENT_PANEL_VERTICAL_PERCENT = 67.5;
|
||||||
|
MEMORY_COMPONENT_ARROW_PERCENT = 37;
|
||||||
|
MEMORY_COMPONENT_AREA_TOP_PERCENT = 34.5;
|
||||||
|
MEMORY_COMPONENT_AREA_LEFT_PERCENT = 31.1;
|
||||||
|
MEMORY_COMPONENT_AREA_WIDTH_PERCENT = 15.4;
|
||||||
|
MEMORY_COMPONENT_AREA_HEIGHT_PERCENT = 15.5;
|
||||||
|
|
||||||
|
WIFI_BT_COMPONENT_VISIBLE = true;
|
||||||
|
WIFI_BT_COMPONENT_HAS_PANEL = true;
|
||||||
|
WIFI_BT_COMPONENT_HAS_ARROW = true;
|
||||||
|
WIFI_BT_COMPONENT_PANEL_ALWAYS_VISIBLE = false;
|
||||||
|
WIFI_BT_COMPONENT_PANEL_ORIENTATION = VALUE_LEFT;
|
||||||
|
WIFI_BT_COMPONENT_PANEL_HORIZONTAL_PERCENT = 55;
|
||||||
|
WIFI_BT_COMPONENT_PANEL_VERTICAL_PERCENT = 28;
|
||||||
|
WIFI_BT_COMPONENT_ARROW_PERCENT = 43.5;
|
||||||
|
WIFI_BT_COMPONENT_AREA_TOP_PERCENT = 41;
|
||||||
|
WIFI_BT_COMPONENT_AREA_LEFT_PERCENT = 46.7;
|
||||||
|
WIFI_BT_COMPONENT_AREA_WIDTH_PERCENT = 6.8;
|
||||||
|
WIFI_BT_COMPONENT_AREA_HEIGHT_PERCENT = 9;
|
||||||
|
|
||||||
|
ETHERNET0_COMPONENT_VISIBLE = true;
|
||||||
|
ETHERNET0_COMPONENT_HAS_PANEL = true;
|
||||||
|
ETHERNET0_COMPONENT_HAS_ARROW = true;
|
||||||
|
ETHERNET0_COMPONENT_PANEL_ALWAYS_VISIBLE = false;
|
||||||
|
ETHERNET0_COMPONENT_PANEL_ORIENTATION = VALUE_BOTTOM;
|
||||||
|
ETHERNET0_COMPONENT_PANEL_HORIZONTAL_PERCENT = -3;
|
||||||
|
ETHERNET0_COMPONENT_PANEL_VERTICAL_PERCENT = 73;
|
||||||
|
ETHERNET0_COMPONENT_ARROW_PERCENT = 8;
|
||||||
|
ETHERNET0_COMPONENT_AREA_TOP_PERCENT = 29;
|
||||||
|
ETHERNET0_COMPONENT_AREA_LEFT_PERCENT = 3.8;
|
||||||
|
ETHERNET0_COMPONENT_AREA_WIDTH_PERCENT = 12.2;
|
||||||
|
ETHERNET0_COMPONENT_AREA_HEIGHT_PERCENT = 12.5;
|
||||||
|
|
||||||
|
CONSOLE_COMPONENT_VISIBLE = true;
|
||||||
|
CONSOLE_COMPONENT_HAS_PANEL = false;
|
||||||
|
CONSOLE_COMPONENT_HAS_ARROW = false;
|
||||||
|
CONSOLE_COMPONENT_PANEL_ALWAYS_VISIBLE = false;
|
||||||
|
CONSOLE_COMPONENT_AREA_TOP_PERCENT = 79.9;
|
||||||
|
CONSOLE_COMPONENT_AREA_LEFT_PERCENT = 90.5;
|
||||||
|
CONSOLE_COMPONENT_AREA_WIDTH_PERCENT = 3.3;
|
||||||
|
CONSOLE_COMPONENT_AREA_HEIGHT_PERCENT = 6.2;
|
||||||
|
|
||||||
|
VIDEO_COMPONENT_VISIBLE = true;
|
||||||
|
VIDEO_COMPONENT_HAS_PANEL = true;
|
||||||
|
VIDEO_COMPONENT_HAS_ARROW = true;
|
||||||
|
VIDEO_COMPONENT_PANEL_ALWAYS_VISIBLE = false;
|
||||||
|
VIDEO_COMPONENT_PANEL_ORIENTATION = VALUE_TOP;
|
||||||
|
VIDEO_COMPONENT_PANEL_HORIZONTAL_PERCENT = 55;
|
||||||
|
VIDEO_COMPONENT_PANEL_VERTICAL_PERCENT = 16;
|
||||||
|
VIDEO_COMPONENT_ARROW_PERCENT = 72.8;
|
||||||
|
VIDEO_COMPONENT_AREA_TOP_PERCENT = 4.8;
|
||||||
|
VIDEO_COMPONENT_AREA_LEFT_PERCENT = 70.2;
|
||||||
|
VIDEO_COMPONENT_AREA_WIDTH_PERCENT = 8.6;
|
||||||
|
VIDEO_COMPONENT_AREA_HEIGHT_PERCENT = 9.1;
|
||||||
|
|
||||||
|
AUDIO_COMPONENT_VISIBLE = false;
|
||||||
|
AUDIO_COMPONENT_HAS_PANEL = true;
|
||||||
|
AUDIO_COMPONENT_HAS_ARROW = true;
|
||||||
|
AUDIO_COMPONENT_PANEL_ALWAYS_VISIBLE = false;
|
||||||
|
AUDIO_COMPONENT_PANEL_ORIENTATION = VALUE_TOP;
|
||||||
|
AUDIO_COMPONENT_PANEL_HORIZONTAL_PERCENT = 1;
|
||||||
|
AUDIO_COMPONENT_PANEL_VERTICAL_PERCENT = 19;
|
||||||
|
AUDIO_COMPONENT_ARROW_PERCENT = 16;
|
||||||
|
AUDIO_COMPONENT_AREA_TOP_PERCENT = 7;
|
||||||
|
AUDIO_COMPONENT_AREA_LEFT_PERCENT = 14.5;
|
||||||
|
AUDIO_COMPONENT_AREA_WIDTH_PERCENT = 5.4;
|
||||||
|
AUDIO_COMPONENT_AREA_HEIGHT_PERCENT = 11;
|
||||||
|
|
||||||
|
LED_COMPONENT_VISIBLE = true;
|
||||||
|
LED_COMPONENT_HAS_PANEL = true;
|
||||||
|
LED_COMPONENT_HAS_ARROW = false;
|
||||||
|
LED_COMPONENT_PANEL_ALWAYS_VISIBLE = true;
|
||||||
|
LED_COMPONENT_PANEL_ORIENTATION = VALUE_BOTTOM;
|
||||||
|
LED_COMPONENT_PANEL_HORIZONTAL_PERCENT = 69;
|
||||||
|
LED_COMPONENT_PANEL_VERTICAL_PERCENT = 10;
|
||||||
|
LED_COMPONENT_AREA_TOP_PERCENT = 91;
|
||||||
|
LED_COMPONENT_AREA_LEFT_PERCENT = 70.6;
|
||||||
|
LED_COMPONENT_AREA_WIDTH_PERCENT = 1.8;
|
||||||
|
LED_COMPONENT_AREA_HEIGHT_PERCENT = 4;
|
||||||
|
|
||||||
|
FLASH_MEMORY_COMPONENT_VISIBLE = true;
|
||||||
|
FLASH_MEMORY_COMPONENT_HAS_PANEL = true;
|
||||||
|
FLASH_MEMORY_COMPONENT_HAS_ARROW = true;
|
||||||
|
FLASH_MEMORY_COMPONENT_PANEL_ALWAYS_VISIBLE = false;
|
||||||
|
FLASH_MEMORY_COMPONENT_PANEL_ORIENTATION = VALUE_TOP;
|
||||||
|
FLASH_MEMORY_COMPONENT_PANEL_HORIZONTAL_PERCENT = 27;
|
||||||
|
FLASH_MEMORY_COMPONENT_PANEL_VERTICAL_PERCENT = 65;
|
||||||
|
FLASH_MEMORY_COMPONENT_ARROW_PERCENT = 46.7;
|
||||||
|
FLASH_MEMORY_COMPONENT_AREA_TOP_PERCENT = 50;
|
||||||
|
FLASH_MEMORY_COMPONENT_AREA_LEFT_PERCENT = 43.5;
|
||||||
|
FLASH_MEMORY_COMPONENT_AREA_WIDTH_PERCENT = 10;
|
||||||
|
FLASH_MEMORY_COMPONENT_AREA_HEIGHT_PERCENT = 13;
|
||||||
|
|
||||||
|
|
||||||
|
// Capabilities
|
||||||
|
SUPPORTS_VIDEO_BRIGHTNESS = false;
|
||||||
|
SUPPORTS_DUAL_ETHERNET = false;
|
||||||
|
|
||||||
|
// Constructor.
|
||||||
|
constructor(deviceData) {
|
||||||
|
super(CCMP157.DEVICE_TYPE, CCMP157.PLATFORM_NAME, deviceData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -493,7 +493,7 @@ function getDeviceName() {
|
||||||
// Updates the available web sections.
|
// Updates the available web sections.
|
||||||
function updateAvailableSections() {
|
function updateAvailableSections() {
|
||||||
// Remove multimedia section when rendering the demo from a computer.
|
// Remove multimedia section when rendering the demo from a computer.
|
||||||
if (!navigator.platform.includes("aarch"))
|
if (!navigator.platform.includes("aarch") && !navigator.platform.includes("arm"))
|
||||||
removeSection(ID_SECTION_MULTIMEDIA);
|
removeSection(ID_SECTION_MULTIMEDIA);
|
||||||
// Set visible sections based on device type.
|
// Set visible sections based on device type.
|
||||||
$.post(
|
$.post(
|
||||||
|
|
|
||||||
|
|
@ -365,6 +365,9 @@ function createDevice(deviceData) {
|
||||||
case CCIMX6ULSBC.DEVICE_TYPE:
|
case CCIMX6ULSBC.DEVICE_TYPE:
|
||||||
device = new CCIMX6ULSBC(deviceData);
|
device = new CCIMX6ULSBC(deviceData);
|
||||||
break;
|
break;
|
||||||
|
case CCMP157.DEVICE_TYPE:
|
||||||
|
device = new CCMP157(deviceData);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (device != null) {
|
if (device != null) {
|
||||||
// Draw the device.
|
// Draw the device.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue