Files
tinyUSB/examples/device/webusb_serial/website/index.html
raldone01 d3f7dff180 Major overhaul and logic cleanup.
Adds support for web serial as well.
2025-07-05 19:42:44 +02:00

73 lines
2.8 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>TinyUSB WebUSB Serial</title>
<link rel="stylesheet" href="style.css" />
<script defer src="serial.js"></script>
<script defer src="application.js"></script>
<script defer src="divider.js"></script>
</head>
<body>
<header class="header">
<h1 class="title">TinyUSB - WebUSB Serial</h1>
<a class="github-link" href="https://github.com/hathach/tinyusb/tree/master/examples/device/webusb_serial/website"
target="_blank">
Find my source on GitHub
</a>
</header>
<main>
<section class="controls-section">
<button id="connect_webusb_serial_btn" class="controls btn good">Connect WebUSB</button>
<button id="connect_serial_btn" class="controls btn good">Connect Serial</button>
<button id="disconnect_btn" class="controls btn danger">Disconnect</button>
<label for="newline_mode_select" class="controls">
Newline mode:
<select id="newline_mode_select">
<option value="CR">Only \r</option>
<option value="CRLF">\r\n</option>
<option value="ANY" selected>\r, \n or \r\n</option>
</select>
</label>
<label for="auto_reconnect_checkbox" class="controls">
<input type="checkbox" id="auto_reconnect_checkbox" />
Auto Reconnect
</label>
<button id="forget_device_btn" class="controls btn danger">Forget Device</button>
<button id="forget_all_devices_btn" class="controls btn danger">Forget All Devices</button>
<button id="reset_all_btn" class="controls btn danger">Reset All</button>
<button id="reset_output_btn" class="controls btn danger">Reset Output</button>
<button id="copy_output_btn" class="controls btn good">Copy Output</button>
</section>
<section class="status-section">
<span id="status_span" class="status">
Click "Connect" to start
</span>
</section>
<div class="io-container">
<section class="column sender">
<h2>Command History</h2>
<div class="scrollbox-wrapper">
<div id="command_history_scrollbox" class="scrollbox monospaced"></div>
</div>
<div class="send-container">
<input id="command_line_input" class="input" placeholder="Start typing..." autocomplete="off" disabled />
<button id="send_mode_btn" class="btn send-mode-command">Command Mode</button>
</div>
</section>
<div class="resizer" id="resizer"></div>
<section class="column">
<h2>Received Data</h2>
<div class="scrollbox-wrapper">
<div id="received_data_scrollbox" class="scrollbox monospaced"></div>
</div>
</section>
</div>
</main>
</body>
</html>