Beispiel #1
0
void tiva_ssiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
{
    ssidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
    if (devid == SPIDEV_MMCSD)
    {
        /* Assert the CS pin to the card */

        ssi_dumpgpio("tiva_ssiselect() before tiva_gpiowrite()");
        tiva_gpiowrite(SDCCS_GPIO, !selected);
        ssi_dumpgpio("tiva_ssiselect() after tiva_gpiowrite()");
    }
}
Beispiel #2
0
void lm_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
{
    ssidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
    ssi_dumpgpio("lm_spiselect() Entry");

    if (devid == SPIDEV_MMCSD)
    {
        /* Assert the CS pin to the card */

        lm_gpiowrite(SDCCS_GPIO, !selected);
    }
    ssi_dumpgpio("lm_spiselect() Exit");
}
Beispiel #3
0
void lm3s_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
{
  ssidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
  ssi_dumpgpio("lm3s_spiselect() Entry");
  if (devid == SPIDEV_MMCSD)
    {
      /* Assert the CS pin to the card */

      lm3s_gpiowrite(SDCCS_GPIO, !selected);
    }
#ifdef CONFIG_NX_LCDDRIVER
  else if (devid == SPIDEV_DISPLAY)
    {
      /* Assert the CS pin to the display */

      lm3s_gpiowrite(OLEDCS_GPIO, !selected);
    }
#endif
  ssi_dumpgpio("lm3s_spiselect() Exit");
}
Beispiel #4
0
uint8_t lm_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
{
  ssidbg("Returning SPI_STATUS_PRESENT\n");
  return SPI_STATUS_PRESENT;
}
Beispiel #5
0
void tiva_ssiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
{
  ssidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
  ssi_dumpgpio("tiva_ssiselect() Entry");
  ssi_dumpgpio("tiva_ssiselect() Exit");
}