This file contains 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
// ISTAT Register Bit Definitions | |
#define RTC_INT_CLEAR 0x807F | |
#define RTC_WRITE_COMPLETE 0x8000 | |
// PREN Register Bit Definitions | |
#define RTC_PRESCALER_ENABLE 0x0001 | |
void Init_RTC(void) | |
{ | |
// Ensure clock is running at 1Hz by setting the prescalar |
This file contains 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
template <typename T> | |
class Foo { | |
public: | |
void Get(T in) { | |
} | |
void Bar() { | |
} | |
}; | |
int main() { |
This file contains 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
function IHexChecksum() | |
let l:data = getline(".") | |
let l:dlen = strlen(data) | |
if (empty(matchstr(l:data, "^:\\(\\x\\x\\)\\{5,}$"))) | |
echoerr("Input is not a valid Intel HEX line!") | |
return | |
endif | |
let l:byte = 0 |
This file contains 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
static struct axis_map axes[] = { | |
[0] = { | |
.min_threshold = -32767, | |
.min_key = { .sym = XK_Left }, | |
.max_threshold = 32767, | |
.max_key = { .sym = XK_Right }, | |
}, | |
[1] = { | |
.min_threshold = -32767, | |
.min_key = { .str = "p" }, |