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
const char splashscreen_data[] = { | |
// 0-37: Page 0 | |
0x01, 0xFF, 0xFF, 0xE0, 0xFF, 0x00, 0xE0, 0xFF, 0x00, 0xE0, | |
0x0A, 0x00, 0x00, 0x00, 0x40, 0x13, 0x01, 0x00, 0x80, 0x40, | |
0x05, 0xE0, 0x10, 0x00, 0x02, 0x02, 0xFD, 0xFD, 0x20, 0x23, | |
0x60, 0x29, 0xE0, 0x21, 0x00, 0x01, 0xFF, 0xFF, | |
// 38-109: Page 1 | |
0x04, 0xFF, 0xDF, 0xFF, 0xBF, 0xFF, 0xE0, 0xFF, 0x03, 0xE1, | |
0x34, 0x07, 0x03, 0xEF, 0xB8, 0xFF, 0xC0, 0x21, 0x4B, 0x02, | |
0xFF, 0xFF, 0xFE, 0x20, 0x03, 0xE0, 0xC5, 0x00, 0x00, 0x00, |
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
I want to make better tools for electronics makers and hobbyists, and I want you | |
to help me do it. | |
About a year ago, I was working on a project with a power supply I needed to | |
test, and I designed the original Re:load. As it happens, I'm not the only one | |
that needed one, and the Re:load became my first commercial product, and led to | |
the formation of Arachnid Labs. The Re:load's hugely popular with anyone who | |
needs to test a power supply, check battery life or discharge rates, or anything | |
else that requires a steady current source - especially if they don't have | |
thousands of dollars to throw at expensive lab equipment. |
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
Archive member included because of file (symbol) | |
.\CortexM0\ARM_GCC_473\Release\Bootloader.a(cyfitter_cfg.o) | |
.\CortexM0\ARM_GCC_473\Release\Cm0Start.o (cyfitter_cfg) | |
.\CortexM0\ARM_GCC_473\Release\Bootloader.a(Bootloader.o) | |
.\CortexM0\ARM_GCC_473\Release\Cm0Start.o (CyBtldr_CheckLaunch) | |
.\CortexM0\ARM_GCC_473\Release\Bootloader.a(UART.o) | |
.\CortexM0\ARM_GCC_473\Release\main.o (UART_Start) | |
.\CortexM0\ARM_GCC_473\Release\Bootloader.a(UART_SPI_UART.o) | |
.\CortexM0\ARM_GCC_473\Release\main.o (UART_SpiUartGetRxBufferSize) |
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
>>> struct.pack("B", 0x38) + struct.pack("H", 0) | |
'8\x00\x00' | |
>>> struct.pack("BH", 0x38, 0) | |
'8\x00\x00\x00' |
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
CommsLink cl("My device", 12345); | |
int my_int; | |
void ioinit() { | |
cl.register(&my_int); | |
} | |
void loop() { | |
while(1) { |
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
#define register(exporter, var) ExportedVariable _exported ## #var (exporter, #var, &var) | |
Exporter ex; | |
int blah; | |
register(ex, blah); |
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
template <typename T> | |
class Monitored { | |
protected: | |
T value; | |
boolean dirty; | |
public: | |
Monitored<T>& operator=(const T source) { | |
value = source; | |
dirty = true; | |
} |
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
#define NEXT goto *opcodes[program[pc++]] | |
int interpret(char *stack, int sp, char *program) { | |
int pc = 0; | |
static const void *opcodes[] = {&&push, &&pop, &&add, &&sub, &&ret}; | |
NEXT; | |
push: | |
stack[sp++] = program[pc++]; | |
NEXT; |
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
switch (GET_DURATION(*pByte)) { | |
case 7: | |
delay(vel * 6); | |
case 6: | |
delay(vel * 2); | |
case 5: | |
delay(vel * 4); | |
case 4: | |
delay(vel * 4); | |
case 3: |
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
typedef enum { | |
STATE_MAIN, | |
STATE_RECEIVE, | |
STATE_SEND, | |
STATE_PLAY | |
} state_t; | |
void state_machine() { | |
while(1) | |
{ |