vor ble umbau

This commit is contained in:
2026-03-12 07:07:00 +01:00
parent 96aed70fc6
commit 5bb0d345da
45 changed files with 3681 additions and 48 deletions

View File

@@ -0,0 +1,56 @@
export const BLE = {
SERVICE_UUID: "e517d988-bab5-4574-8479-97c6cb115ca0",
RX_UUID: "e517d988-bab5-4574-8479-97c6cb115ca1",
TX_UUID: "e517d988-bab5-4574-8479-97c6cb115ca2"
};
export const FRAME = {
REQUEST: 0x00,
RESPONSE: 0x10,
ACK: 0x11,
ERROR: 0x12,
FILE_START: 0x20,
FILE_CHUNK: 0x21,
FILE_END: 0x22,
LS_START: 0x40,
LS_ENTRY: 0x41,
LS_END: 0x42,
};
export const DATA = {
PROTO_INFO: 0x01,
FS_INFO: 0x03,
FILE_GET: 0x20,
FILE_PUT: 0x21,
LS: 0x40
};
export const FS_ENTRY_TYPE = {
FILE: 0x00,
DIR: 0x01,
}
export interface ZephyrError {
text: string;
zephyr: string;
}
export const ZEPHYR_ERRORS: Record<number, ZephyrError> = {
1: { text: "Fehlende Berechtigung", zephyr: "EPERM" },
2: { text: "Datei oder Verzeichnis nicht gefunden", zephyr: "ENOENT" },
5: { text: "Ein-/Ausgabefehler auf dem Flash", zephyr: "EIO" },
12: { text: "Nicht genügend Speicher frei", zephyr: "ENOMEM" },
16: { text: "Gerät oder Ressource belegt", zephyr: "EBUSY" },
22: { text: "Ungültiges Argument oder Parameter", zephyr: "EINVAL" },
24: { text: "Zu viele offene Dateien", zephyr: "EMFILE" },
28: { text: "Kein freier Speicherplatz mehr", zephyr: "ENOSPC" },
36: { text: "Dateiname oder Pfad zu lang", zephyr: "ENAMETOOLONG" },
88: { text: "Funktion im Buzzer nicht implementiert", zephyr: "ENOSYS" },
134: { text: "Operation nicht unterstützt", zephyr: "ENOTSUP" }
};