2023-03-22 22:09:09 -07:00
|
|
|
// Copyright 2022 Framework Computer
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
|
|
|
//#include "quantum.h"
|
|
|
|
|
|
|
|
void *dyn_serial_number_string(void);
|
|
|
|
uint16_t dyn_serial_number_string_len(void);
|
|
|
|
// The serial number is written to the last 4K block in the first 1M of flash
|
|
|
|
#define FLASH_OFFSET 0x10000000
|
|
|
|
#define LAST_4K_BLOCK 0xff000
|
|
|
|
#define SERIALNUM_LEN 18
|
|
|
|
|
|
|
|
// 18-digit serial number. Must be programmed at factory
|
|
|
|
// TODO: Figure out how to do that. Probably a script to compile qmk
|
|
|
|
// Must be wide-string (UTF-16)
|
|
|
|
// KDK = Keyboard RGB Backlight
|
|
|
|
// KDW = Keyboard White Backlight
|
2023-07-10 13:35:45 -07:00
|
|
|
// KDN = Keyboard RGB Macropad
|
2023-03-22 22:09:09 -07:00
|
|
|
// KDM = Keyboard White Numpad
|
|
|
|
#define FALLBACK_SERIAL_NUMBER L"FRAKDKEN0100000000"
|
|
|
|
_Static_assert(sizeof(FALLBACK_SERIAL_NUMBER) == (SERIALNUM_LEN+1)*2, "Fallback serial number must be same length");
|