[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/stm25p Stm25pLogP.nc, 1.7, 1.8
Chieh-Jan Mike Liang
liang_mike at users.sourceforge.net
Thu Sep 4 10:21:02 PDT 2008
Update of /cvsroot/tinyos/tinyos-2.x/tos/chips/stm25p
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv25677
Modified Files:
Stm25pLogP.nc
Log Message:
Some calls to underlying STM25 sector layer use cookie addresses, instead of the "real" addresses
Index: Stm25pLogP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/stm25p/Stm25pLogP.nc,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** Stm25pLogP.nc 28 Nov 2007 03:15:30 -0000 1.7
--- Stm25pLogP.nc 4 Sep 2008 17:20:59 -0000 1.8
***************
*** 202,206 ****
uint8_t calcSector( uint8_t client, stm25p_addr_t addr ) {
uint8_t sector = call Sector.getNumSectors[ client ]();
! return (uint8_t)( addr >> STM25P_SECTOR_SIZE_LOG2 ) % sector;
}
--- 202,206 ----
uint8_t calcSector( uint8_t client, stm25p_addr_t addr ) {
uint8_t sector = call Sector.getNumSectors[ client ]();
! return (uint8_t)(( addr >> STM25P_SECTOR_SIZE_LOG2 ) % sector);
}
***************
*** 343,347 ****
log_info->write_addr += sizeof( m_addr );
m_rw_state = S_SEARCH_RECORDS;
! call Sector.read[ id ]( log_info->write_addr, &m_header,
sizeof( m_header ) );
}
--- 343,347 ----
log_info->write_addr += sizeof( m_addr );
m_rw_state = S_SEARCH_RECORDS;
! call Sector.read[ id ]( calcAddr(id, log_info->write_addr), &m_header,
sizeof( m_header ) );
}
***************
*** 374,378 ****
// 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,
sizeof( m_header ) );
}
--- 374,378 ----
// if not yet at cookie, keep searching
if ( log_info->read_addr < m_log_state[ id ].cookie ) {
! call Sector.read[ id ]( calcAddr(id, log_info->read_addr), &m_header,
sizeof( m_header ) );
}
More information about the Tinyos-2-commits
mailing list