Created
April 20, 2022 20:53
-
-
Save hanetzer/3d8212a40b2b8de2d1f4eae411e1e3f0 to your computer and use it in GitHub Desktop.
stdin
This file contains hidden or 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
{ | |
"register_field": { | |
"prefix": "regf", | |
"body": [ | |
"\t#define R_${1:reg}_${2:field}_SHIFT (${3:shift})", | |
"\t#define R_$1_$2_LENGTH (${4:length})", | |
"\t#define R_$1_$2_MASK (((~0) >> (64 - ($4))) << ($3))", | |
"$0" | |
], | |
"description": "Code snippet for register bitfield definitions" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment