addded TEST register to rf writes (causes rf reset), time of rf register transfer fixed
This commit is contained in:
parent
70df09c6a1
commit
3d31ec42c1
|
@ -128,8 +128,18 @@ void WIFI_setRF_DATA(wifimac_t *wifi, u16 val, u8 part)
|
||||||
case 0: /* write to RF chip */
|
case 0: /* write to RF chip */
|
||||||
wifi->rfIOData.array16[part] = val ;
|
wifi->rfIOData.array16[part] = val ;
|
||||||
if (wifi->rfIOData.bits.address > (sizeof(wifi->RF) / 4)) return ; /* out of bound */
|
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 */
|
/* set content of the addressed register */
|
||||||
rfreg[wifi->rfIOData.bits.address].bits.content = wifi->rfIOData.bits.content ;
|
rfreg[wifi->rfIOData.bits.address].bits.content = wifi->rfIOData.bits.content ;
|
||||||
|
}
|
||||||
break ;
|
break ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue