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
#include <windows.h> | |
#include <stdio.h> | |
#include <tchar.h> | |
#define NT_SUCCESS(Status) (((NTSTATUS)(Status)) >= 0) | |
#define STATUS_PRIVILEGE_NOT_HELD ((NTSTATUS)0xC0000061L) | |
typedef enum _SYSTEM_INFORMATION_CLASS { | |
SystemMemoryListInformation = 80, // 80, q: SYSTEM_MEMORY_LIST_INFORMATION; s: SYSTEM_MEMORY_LIST_COMMAND (requires SeProfileSingleProcessPrivilege) | |
} SYSTEM_INFORMATION_CLASS; |
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
// Hello World for Max72xx and a 4 digit 7-segment display (Electric Imp device code) | |
hardware.pin7.configure(DIGITAL_OUT); | |
hardware.spi189.configure(SIMPLEX_TX, 10000); | |
function send(data) { | |
hardware.pin7.write(0); // set CS before sending data | |
hardware.spi189.write(data); | |
hardware.pin7.write(1); // release CS after sending data | |
} |