- Using Windows 10 on ARM, Install Visual Studio with ARM compiler support
- Manually install and configure ANT with Microsoft's experimental ARM Java build https://github.com/microsoft/openjdk-aarch64/releases
- Download the x86 version of Cygwin (the 64-bit version will NOT run on ARM64)
- Take the defaults
- When prompted select a reputable mirror (e.g. for US: https://mirrors.rit.edu)
- Cygwin will ask for packages. Many required packages are provided by default (
shell
,sed
,grep
) however the following must be manually selected:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sun.awt.AppContext; | |
import javax.print.PrintServiceLookup; | |
public class Main { | |
public static void main(String[] args) { | |
int count = 0; | |
while (true) { | |
count++; | |
long time1 = System.currentTimeMillis(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sun.awt.AppContext; | |
import javax.print.PrintServiceLookup; | |
import java.util.Set; | |
public class Main { | |
public static void main(String[] args) { | |
int count = 0; | |
while (true) { | |
count++; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract class Util { | |
public static Util INSTANCE = setInstance(); | |
abstract String getOSName(); | |
public static Util setInstance() { return null; } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Arduino.h> | |
#include <esp_log.h> | |
void setup() { | |
Serial.begin(115200); | |
String a = "test"; | |
String b = "12345678"; | |
String out = a + b; | |
log_printf("%s + %s = %s\n", a, b, out); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sendHidData() { | |
printData = '\x0d\x0a\x50\x52\x49\x4e\x54\x45\x44\x20\x57\x49\x54\x48\x20\x51\x5a\x20\x54\x52\x41\x59\x0d\x0a\x0d\x0a\x55\x53\x49\x4e\x47\x20\x68\x65\x78\x20\x43\x4f\x4d\x4d\x41\x4e\x44\x53\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0a'; | |
qz.hid.sendData({ | |
vendorId: $("#hidVendor").val(), | |
productId: $("#hidProduct").val(), | |
usagePage: $("#hidUsagePage").val(), | |
serial: $("#hidSerial").val(), | |
data: printData.substring(0, 32), | |
endpoint: $("#hidReport").val() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function sendHidData() { | |
printData = '\x0d\x0a\x50\x52\x49\x4e\x54\x45\x44\x20\x57\x49\x54\x48\x20\x51\x5a\x20\x54\x52\x41\x59\x0d\x0a\x0d\x0a\x55\x53\x49\x4e\x47\x20\x68\x65\x78\x20\x43\x4f\x4d\x4d\x41\x4e\x44\x53\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0a'; | |
await qz.hid.sendData({ | |
vendorId: $("#hidVendor").val(), | |
productId: $("#hidProduct").val(), | |
usagePage: $("#hidUsagePage").val(), | |
serial: $("#hidSerial").val(), | |
data: printData.substring(0, 32), | |
endpoint: $("#hidReport").val() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createDataChain(targetFunction, deviceInfo, data, chunkLength) { | |
var chain = Promise.resolve(); | |
for (var i = 0; i < data.length; i += chunkLength) { | |
deviceInfo.data = data.substring(i, Math.min(i + chunkLength, data.length)); | |
chain = chain.then(()=>targetFunction(deviceInfo)); | |
} | |
return chain; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sendHidData() { | |
printData = "abcdefghijklmnopqrstuvwhyz\n" + | |
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
var deviceInfo = { | |
vendorId: $("#hidVendor").val(), | |
productId: $("#hidProduct").val(), | |
usagePage: $("#hidUsagePage").val(), | |
serial: $("#hidSerial").val(), | |
data: "", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
USB kick code for the posiflex 4000 series: | |
- 120 bytes including the report id | |
- all 0x00 with byte[1] and byte[2] the drawer number | |
- the drawers can be assigned a number 0-7 (default is 7) | |
**/ | |
function openDrawer(number) | |
{ | |
// Posiflex Cash Drawer | |
var deviceInfo = { |
OlderNewer