unsigned value;

flagreg = RSSISTAT;if(flagreg == 0x01){

      value  = RSSI;