addded TEST register to rf writes (causes rf reset), time of rf register transfer fixed

This commit is contained in:
mightymax 2007-01-12 13:04:25 +00:00
parent 70df09c6a1
commit 3d31ec42c1
1 changed files with 12 additions and 2 deletions

View File

@ -128,8 +128,18 @@ void WIFI_setRF_DATA(wifimac_t *wifi, u16 val, u8 part)
case 0: /* write to RF chip */
wifi->rfIOData.array16[part] = val ;
if (wifi->rfIOData.bits.address > (sizeof(wifi->RF) / 4)) return ; /* out of bound */
/* the actual transfer is done on high part write */
if (part==1)
{
/* special purpose register: TEST1, on write, the RF chip resets */
if (wifi->rfIOData.bits.address == 13)
{
WIFI_resetRF(&wifi->RF) ;
return ;
}
/* set content of the addressed register */
rfreg[wifi->rfIOData.bits.address].bits.content = wifi->rfIOData.bits.content ;
}
break ;
}
}