forked from PAWPAW-Mirror/lib_xua
- fixed a bug and renamed generic iteration counter i as tileNum
This commit is contained in:
@@ -60,9 +60,9 @@ void device_reboot_aux(void)
|
|||||||
|
|
||||||
#ifdef __XS2A__
|
#ifdef __XS2A__
|
||||||
/* Find tile number of the local tile ID*/
|
/* Find tile number of the local tile ID*/
|
||||||
for(int i = 0; i<tileArrayLength; i++) {
|
for(int tileNum = 0; tileNum<tileArrayLength; tileNum++) {
|
||||||
if (get_tile_id(tile[i]) == localTileId) {
|
if (get_tile_id(tile[tileNum]) == localTileId) {
|
||||||
localTileNum = i;
|
localTileNum = tileNum;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -70,22 +70,22 @@ void device_reboot_aux(void)
|
|||||||
|
|
||||||
#ifndef __XS2A__
|
#ifndef __XS2A__
|
||||||
/* Reset all tiles, starting from the remote ones */
|
/* Reset all tiles, starting from the remote ones */
|
||||||
for(int i = tileArrayLength-1; i>=0; i--)
|
for(int tileNum = tileArrayLength-1; tileNum>=0; tileNum--)
|
||||||
#else
|
#else
|
||||||
/* Reset all even tiles, starting from the remote ones */
|
/* Reset all even tiles, starting from the remote ones */
|
||||||
for(int i = tileArrayLength-2; i>=0; i=i-2)
|
for(int tileNum = tileArrayLength-2; tileNum>=0; tileNum=tileNum-2)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
|
||||||
/* Cannot cast tileref to unsigned! */
|
/* Cannot cast tileref to unsigned! */
|
||||||
tileId = get_tile_id(tile[i]);
|
tileId = get_tile_id(tile[tileNum]);
|
||||||
|
|
||||||
/* Do not reboot local tile yet! */
|
/* Do not reboot local tile yet! */
|
||||||
#ifndef __XS2A__
|
#ifndef __XS2A__
|
||||||
if(localTileId != tileId)
|
if(localTileId != tileId)
|
||||||
#else
|
#else
|
||||||
/* In XS2A the tile paired up with the local tile can't be rebooted either */
|
/* In XS2A the tile paired up with the local tile can't be rebooted either */
|
||||||
if((localTileNum&0xFFFE) != (tileId&0xFFFE))
|
if((localTileNum|0x01) != (tileNum|0x01))
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
reset_tile(tileId);
|
reset_tile(tileId);
|
||||||
|
|||||||
Reference in New Issue
Block a user