Subversion Repositories pentevo

Rev

Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. #include <stdint.h>
  2. #include <stdio.h>
  3.  
  4. #include "ihex.h"
  5.  
  6.  
  7. int parse_ihex(uint8_t * buffer, int32_t disp, int32_t low_bound, int32_t high_bound, uint8_t fill, char * filename)
  8. {
  9.         char buf[IHEX_BUF_SZ];
  10.  
  11.         int32_t i;
  12.  
  13.         FILE * file;
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.         // fill the whole buffer with given fill value
  21.         for(i=low_bound+disp,i<high_bound+disp,i++)
  22.                 buffer[i] = fill;
  23.  
  24.        
  25.         // parse interhex line by line
  26.         while( fgets(buf, IHEX_BUF_SZ, file) )
  27.         {
  28.         }
  29.  
  30.         // we are here: EOF reached unexpectedly or error.
  31.         if( feof(file) )
  32.         {
  33.                 fprintf(stderr,
  34.         }
  35. }
  36.  
  37.  
  38.