// move to next block if current block doesn't have enough space
if ( sizeof( m_header ) + len > bytes_left )
// move to next block if current block doesn't have enough space
if ( sizeof( m_header ) + len > bytes_left )
uint8_t calcSector( uint8_t client, stm25p_addr_t addr ) {
uint8_t sector = call Sector.getNumSectors[ client ]();
uint8_t calcSector( uint8_t client, stm25p_addr_t addr ) {
uint8_t sector = call Sector.getNumSectors[ client ]();
- call Sector.read[ id ]( log_info->write_addr, &m_header,
+ call Sector.read[ id ]( calcAddr(id, log_info->write_addr), &m_header,
log_info->read_addr += sizeof( m_header ) + m_header;
// if not yet at cookie, keep searching
if ( log_info->read_addr < m_log_state[ id ].cookie ) {
log_info->read_addr += sizeof( m_header ) + m_header;
// if not yet at cookie, keep searching
if ( log_info->read_addr < m_log_state[ id ].cookie ) {
- call Sector.read[ id ]( log_info->read_addr, &m_header,
+ call Sector.read[ id ]( calcAddr(id, log_info->read_addr), &m_header,