added packet received queue
fixed small bugs with SPI configuration and packet receiving code