qmk-firmware/tmk_core/protocol/arm_atsam/usb/spfssf.h

58 lines
2.7 KiB
C
Raw Normal View History

Massdrop keyboard support (#3780) * Massdrop SAMD51 Massdrop SAMD51 keyboards initial project upload * Removing relocated files Removing files that were relocated and not deleted from previous location * LED queue fix and cleaning Cleaned some white space or comments. Fix for LED I2C command queue. Cleaned up interrupts. Added debug function for printing numbers to scope through m15 line. * Factory programmed serial usage Ability to use factory programmed serial in hub and keyboard usb descriptors * USB serial number and bugfix Added support for factory programmed serial and usage. Incorporated bootloader's conditional compiling to align project closer. Fixed issue when USB device attempted to send before enabled. General white space and comment cleanup. * Project cleanup Cleaned up project in terms of white space, commented code, and unecessary files. NKRO keyboard is now using correct setreport although KBD was fine to use. Fixed broken linkage to __xprintf for serial debug statements. * Fix for extra keys Fixed possible USB hang on extra keys report set missing * I2C cleanup I2C cleanup and file renames necessary for master branch merge * Boot tracing and clocks cleanup Added optional boot debug trace mode through debug LED codes. General clock code cleanup. * Relocate ARM/Atmel headers Moved ARM/Atmel header folder from drivers to lib and made necessary makefile changes. * Pull request changes Pull request changes * Keymap and compile flag fix Keymap fix for momentary layer. Potential compile flag fix for Travis CI failure. * va_list include fix Fix for va_list compile failure * Include file case fixes Fixes for include files with incorrect case * ctrl and alt67 keyboard readme Added ctrl and alt67 keyboard readme files
2018-08-29 19:07:52 +00:00
#ifndef ____spfssf_h
#define ____spfssf_h
#include <stdarg.h>
#define sprintf spf
#define sscanf ssf
#define SIZEOF_OFFSET 1
#ifndef NULL
#define NULL 0
#endif
#define SPF_NONE 0
#define SPF_SPEC_START 37 //%
#define SPF_SPEC_DECIMAL 100 //d 16bit dec signed (-32767 to 32767) DONE same as i
#define SPF_SPEC_INT 105 //i 16bit dec signed (-32767 to 32767) DONE same as d
#define SPF_SPEC_UINT 117 //u 16bit dec unsigned (0 to 65535) DONE
#define SPF_SPEC_STRING 115 //s variable length (abcd...) DONE
#define SPF_SPEC_UHINT 120 //x 16bit hex lwrc (7fa) DONE
#define SPF_SPEC_UHINT_UP 88 //x 16bit hex lwrc (7fa) DONE
#define SPF_SPEC_LONG 108 //l start of either ld or lu DONE
#define SPF_SPEC_DECIMAL 100 //ld 32bit dec signed (-2147483647 to 2147483647) DONE
#define SPF_SPEC_UNSIGNED 117 //lu 32bit dec unsigned (0 to 4294967295) DONE
#define SPF_SPEC_UHINT 120 //lx 32bit hex unsigned (0 to ffffffff) DONE
#define SSF_SPEC_START 37 //%
#define SSF_SPEC_SHORTINT 104 //h 8bit dec signed (-127 to 127) DONE
#define SSF_LEN_SHORTINT 3 //hhd
#define SSF_SPEC_DECIMAL 100 //d 16bit dec signed (-32767 to 32767) DONE
#define SSF_LEN_DECIMAL 5 //32767
#define SSF_SPEC_INT 105 //i 16bit dec signed (-32767 to 32767) DONE
#define SSF_LEN_INT 5 //32767
#define SSF_SPEC_LONG 108 //l start of either ld or lu DONE
#define SSF_SPEC_DECIMAL 100 //ld 32bit dec signed (-2147483647 to 2147483647) DONE
#define SSF_SPEC_UHINT 120 //lx 32bit hex unsigned DONE
#define SSF_LEN_LDECIMAL 10 //2147483647
#define SSF_SPEC_STRING 115 //s variable length (abcd...) DONE
#define SSF_SKIP_SPACE 32 //space
#define SSF_SPEC_VERSION 118 //v collect to comma delimiter - special
#define SSF_DELIM_COMMA 44 //,
#define ASCII_NUM_START 48 //0
#define ASCII_NUM_END 58 //9
#define T_UINT32_0_LIMIT 14
#define T_UINT32_1_LIMIT 27
int vspf(char *_Dest, const char *_Format, va_list va);
int spf(char *_Dest, const char *_Format, ...);
int ssf(const char *_Src, const char *_Format, ...);
#endif //____spfssf_h