/* It changes SPI configuartion according to trasmission or reception mode requirements.  */
void STUSB16xx_HW_IF_Switch_Mode(uint8_t PortNum, STUSB1602_SPI_Mode_TypeDef mode)
/* It changes SPI configuartion according to trasmission or reception mode requirements.  */
void STUSB16xx_HW_IF_Switch_Mode(uint8_t PortNum, STUSB1602_SPI_Mode_TypeDef mode)
{
  HW_IF_SPI_Mode(PortNum, mode);
  HW_IF_NSS_RisingFalling_Interrupt (PortNum, mode == STUSB16xx_SPI_Mode_RX ? ENABLE : DISABLE);
}