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
// example for xmega256d3 | |
// bit delay | |
static void delay(void) { | |
__no_operation(); | |
__no_operation(); | |
__no_operation(); | |
__no_operation(); | |
__no_operation(); | |
__no_operation(); |
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
char *itoaFixedWidth(int32_t zahl) { | |
static uint32_t subtractors[] = {1000000000, 100000000, 10000000, 1000000, | |
100000, 10000, 1000, 100, 10, 1}; | |
static char string[12]; | |
char n, *str = string, sign = zahl < 0 ? '-' : ' '; | |
uint32_t *sub = subtractors; | |
uint32_t u = zahl < 0 ? (uint32_t) -zahl : (uint32_t) zahl; | |
uint8_t i = 10; | |
*str++ = ' '; | |
while (i > 1 && u < *sub) { |
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 <stdio.h> | |
#define _ 0 | |
#define S(x) x, | |
#define D(x) x x x | |
#define L(x) D(S(x)) | |
#define R(x) D(D(S(x))) | |
#define E(f,x) f(x)f(x+1)f(x+2) | |
char sudoku[] = { | |
1, _, _, _, _, 7, _, 9, _, | |
_, 3, _, _, 2, _, _, _, 8, |