diff options
author | patrickmt <40182064+patrickmt@users.noreply.github.com> | 2018-08-29 15:07:52 -0400 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2018-08-29 15:07:52 -0400 |
commit | 30680c6eb396a2bb06928afd69edae9908ac84fb (patch) | |
tree | a4a6c2598faa25dec208377a70dc0fb895ee9c8a /tmk_core/protocol/arm_atsam/usb/spfssf.h | |
parent | a6c770432f1348c44bc199029ce17b1b9ff4191c (diff) |
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
Diffstat (limited to 'tmk_core/protocol/arm_atsam/usb/spfssf.h')
-rw-r--r-- | tmk_core/protocol/arm_atsam/usb/spfssf.h | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/tmk_core/protocol/arm_atsam/usb/spfssf.h b/tmk_core/protocol/arm_atsam/usb/spfssf.h new file mode 100644 index 0000000000..337a904dfe --- /dev/null +++ b/tmk_core/protocol/arm_atsam/usb/spfssf.h @@ -0,0 +1,57 @@ +#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 + |