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

Subversion Repositories or1k

[/] [or1k/] [tags/] [first/] [mp3/] [sw/] [mad-xess/] [bin2c.c] - Diff between revs 769 and 1765

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 769 Rev 1765
#include <stdio.h>
#include <stdio.h>
 
 
int main(void)
int main(void)
{
{
 
 
        int c, i = 0;
        int c, i = 0;
 
 
        printf("#ifdef HAVE_CONFIG_H\n");
        printf("#ifdef HAVE_CONFIG_H\n");
        printf("# include \"config.h\"\n");
        printf("# include \"config.h\"\n");
        printf("#endif\n\n");
        printf("#endif\n\n");
        printf("#ifdef EMBED\n");
        printf("#ifdef EMBED\n");
 
 
        printf("unsigned char flash_data[] = {\n");
        printf("unsigned char flash_data[] = {\n");
 
 
        while((c = getchar()) != EOF) {
        while((c = getchar()) != EOF) {
                printf("0x%.2x, ", c);
                printf("0x%.2x, ", c);
                if(!(i % 32))
                if(!(i % 32))
                        printf("\n");
                        printf("\n");
                i++;
                i++;
        }
        }
 
 
        printf(" };\n");
        printf(" };\n");
        printf("#endif\n");
        printf("#endif\n");
}
}
 
 

powered by: WebSVN 2.1.0

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