test/luos_hal.c
void LuosHAL_FlashWriteLuosMemoryInfo(uint32_t addr, uint16_t size, uint8_t *data)
{
    // Before writing we have to erase the entire page
    // to do that we have to backup current falues by copying it into RAM
    uint8_t page_backup[PAGE_SIZE];
    memcpy(page_backup, (void *)ADDRESS_ALIASES_FLASH, PAGE_SIZE);

    // Now we can erase the page

    // Then add input data into backuped value on RAM
    uint32_t RAMaddr = (addr - ADDRESS_ALIASES_FLASH);
    memcpy(&page_backup[RAMaddr], data, size);

    // and copy it into flash

    //write data
}
/******************************************************************************
 * @brief Write flash page where Luos keep permanente information
 * @param Address page / size to write / pointer to data to write
 * @return
 ******************************************************************************/
@brief Write flash page where Luos keep permanente information
@param Address page / size to write / pointer to data to write
@return
@brief Write flash page where Luos keep permanente information @param Address page / size to write / pointer to data to write @return
void LuosHAL_FlashWriteLuosMemoryInfo(uint32_t addr, uint16_t size, uint8_t *data)
{
    uint8_t page_backup[PAGE_SIZE];
    memcpy(page_backup, (void *)ADDRESS_ALIASES_FLASH, PAGE_SIZE);
    uint32_t RAMaddr = (addr - ADDRESS_ALIASES_FLASH);
    memcpy(&page_backup[RAMaddr], data, size);
}
void LuosHAL_FlashWriteLuosMemoryInfo ( uint32_t addr , uint16_t size , uint8_t * data ) { uint8_t page_backup [ PAGE_SIZE ] ; memcpy ( page_backup , ( void * ) ADDRESS_ALIASES_FLASH , PAGE_SIZE ) ; uint32_t RAMaddr = ( addr - ADDRESS_ALIASES_FLASH ) ; memcpy ( & page_backup [ RAMaddr ] , data , size ) ; }
@brief Write flash page where Luos keep permanente information
 @param Address page / size to write / pointer to data to write
 @return
@brief Write flash page where Luos keep permanente information @param Address page / size to write / pointer to data to write @return
// Before writing we have to erase the entire page // to do that we have to backup current falues by copying it into RAM // Now we can erase the page // Then add input data into backuped value on RAM // and copy it into flash //write data