예제 #1
0
int fb_init() {
	if(gFbHasInit) return 0;
	fb_setup();
	fb_clear();
    fb_set_loc(0,0);
	fb_display_text(TRUE);

	fb_print("=====================================================");
#ifdef S5L8930X
	fb_print("=====================================================");
	fb_print("                          ");
#endif

	fb_print("                 Haifisch - AESPayload               ");

#ifdef S5L8930X
	fb_print("                                                     ");
#endif

	fb_print("                  http://haifisch.me                 ");

#ifdef S5L8930X
	fb_print("                           ");
	fb_print("=====================================================");
#endif
	fb_print("=====================================================");
	cmd_add("fbecho", &fb_cmd, "write characters back to framebuffer");
	gFbHasInit = TRUE;
	return 0;
}
예제 #2
0
파일: common.c 프로젝트: AsadManzur/cyanide
int common_init() {
	_printf = find_printf();
	if(_printf == NULL) {
		fb_print("Unable to find printf\n");
		return -1;
	} else {
		printf("Found printf at 0x%x\n", _printf);
	}

	_malloc = find_malloc();
	if(_malloc == NULL) {
		puts("Unable to find malloc\n");
		return -1;
	} else {
		printf("Found malloc at 0x%x\n", _malloc);
	}

	_free = find_free();
	if(_free == NULL) {
		puts("Unable to find free\n");
		return -1;
	} else {
		printf("Found free at 0x%x\n", _free);
	}

	return 0;
}
예제 #3
0
파일: fb.c 프로젝트: pra85/tantra
void fb_printcolor(const char* str, uint8_t bg, uint8_t fg)
{
    uint16_t original_attribute = s_attribute;
    s_attribute = fb_attribute_opts(bg, fg);
    fb_print(str);
    s_attribute = original_attribute;
}
예제 #4
0
int fb_cmd(int argc, CmdArg* argv) {
	cmd_start();
	int i = 0;
	if (argc < 2) {
		puts("usage: fbecho <message>\n");
		return 0;
	}

	//enter_critical_section();
	for (i = 1; i < argc; i++) {
		fb_print(argv[i].string);
		fb_print(" ");
	}
	//exit_critical_section();
	fb_print("\n");
	return 0;
}
예제 #5
0
void fb_print_center(const char* str) {
	int i;
	int pad = (gFbTWidth-strlen(str))/2;
	for(i=0;i<pad;i++) {
		fb_putc(' ');
	}
	fb_print(str);
}
예제 #6
0
파일: scales.c 프로젝트: dosbre/scales
int main(int argc, char *argv[])
{
	int t[MAX_STRING] = { E, B, G, D, A, E };	/* tunning	*/
	int s = 6;					/* strings	*/
	int f = 12;					/* frets	*/
	int c = 0;					/* capo		*/
	int m = 0;					/* mode (scale)	*/
	int n = C;					/* tone		*/
	int opt;

	while ((opt = getopt(argc, argv, "t:s:f:c:m:n:h")) != -1) {
		switch (opt) {
		case 't':
			if (*optarg == '?')
				return tune_table();
			s = tunestr(t, optarg);
			break;
		case 's':
			if ((s = atoi(optarg)) > MAX_STRING) {
				fprintf(stderr, "max strings %d\n",
								MAX_STRING);
				return -1;
			}
			break;
		case 'f': f = atoi(optarg); break;
		case 'c': c = atoi(optarg); break;
		case 'm':
			if (*optarg == '?')
				return scale_table();
			if ((m = atoi(optarg)) > sizeof(scales)) {
				fprintf(stderr, "invalid scale\n");
				return -1;
			}
			break;
		case 'n':
			if ((n = aton(optarg)) < 0) {
				fprintf(stderr, "invalid tone %s\n", optarg);
				return -1;
			}
			break;
		case 'h':
		default:
			fprintf(stderr, "Usage: %s [-s strings] [-f frets] "
					"[-c capo] [-t tunning]\n", argv[0]);
			return -1;
		}
	}

	if (f < c) {
		fprintf(stderr, "nothing to print\n");
		return -1;
	}

	printf("Scale: %s\t Tone: %s\n\n", scales[m].name, notes[n]);
	fb_print(s, t, f, c, scales[m].bit, n);

	return 0;
}
예제 #7
0
void eb_print(const eb_t p) {
	fb_print(p->x);
	fb_print(p->y);
	fb_print(p->z);
}
예제 #8
0
void eb_print(eb_t p) {
	fb_print(p->x);
	fb_print(p->y);
	fb_print(p->z);
}
예제 #9
0
파일: common.c 프로젝트: AsadManzur/cyanide
void _puts(const char* message) {
	printf("%s", message);
	fb_print(message);
}
예제 #10
0
static void fb_show_cursor(void)
{
	fb_print(seq_show_cursor);
}
예제 #11
0
static void fb_hide_cursor(void)
{
	fb_print(seq_hide_cursor);
}