sketches/SerialReadWrite/optiboot.h
// Function to read a flash page and store it in an array (storage_array[]), but without blank_character
Function to read a flash page and store it in an array (storage_array[]), but without blank_character
Function to read a flash page and store it in an array ( storage_array [] ) but without blank_character
void optiboot_readPage(const char allocated_flash_space[], uint8_t storage_array[], uint16_t page)
{
  uint8_t read_character;
  for(uint16_t j = 0; j < SPM_PAGESIZE; j++) 
  {
    read_character = pgm_read_byte(&allocated_flash_space[j + SPM_PAGESIZE*(page-1)]);
    if(read_character != 0 && read_character != 255)
      storage_array[j] = read_character;
  }
}
void optiboot_readPage ( const char allocated_flash_space [ ] , uint8_t storage_array [ ] , uint16_t page ) { uint8_t read_character ; for ( uint16_t j = 0 ; j < SPM_PAGESIZE ; j ++ ) { read_character = pgm_read_byte ( & allocated_flash_space [ j + SPM_PAGESIZE * ( page - 1 ) ] ) ; if ( read_character != 0 && read_character != 255 ) storage_array [ j ] = read_character ; } }
Function to read a flash page and store it in an array (storage_array[]), but without blank_character
Function to read a flash page and store it in an array ( storage_array [] ) but without blank_character