OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [mp3/] [sw/] [utils/] [bin2c.c] - Blame information for rev 1782

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 281 simons
#include <stdio.h>
2
 
3
int main(void)
4
{
5
 
6
        int c, i = 0;
7
 
8
        printf("#ifdef HAVE_CONFIG_H\n");
9
        printf("# include \"config.h\"\n");
10
        printf("#endif\n\n");
11
        printf("#ifdef EMBED\n");
12
 
13
        printf("unsigned char flash_data[] = {\n");
14
 
15
        while((c = getchar()) != EOF) {
16
                printf("0x%.2x, ", c);
17
                if(!(i % 32))
18
                        printf("\n");
19
                i++;
20
        }
21
 
22
        printf(" };\n");
23
        printf("#endif\n");
24
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.