struct spi_bitbang { struct mutex lock;
u8 busy;
u8 use_dma;
u16 flags; /* extra spi->mode support */
struct spi_controller *ctlr;
/* setup_transfer() changes clock and/or wordsize to match settings * for this transfer; zeroes restore defaults from spi_device.
*/ int (*setup_transfer)(struct spi_device *spi, struct spi_transfer *t);
void (*chipselect)(struct spi_device *spi, int is_on); #define BITBANG_CS_ACTIVE 1 /* normally nCS, active low */ #define BITBANG_CS_INACTIVE 0
void (*set_mosi_idle)(struct spi_device *spi); /* txrx_bufs() may handle dma mapping for transfers that don't * already have one (transfer.{tx,rx}_dma is zero), or use PIO
*/ int (*txrx_bufs)(struct spi_device *spi, struct spi_transfer *t);
/* txrx_word[SPI_MODE_*]() just looks like a shift register */
spi_bb_txrx_word_fn txrx_word[SPI_MODE_X_MASK + 1];
int (*set_line_direction)(struct spi_device *spi, bool output);
};
/* you can call these default bitbang->master methods from your custom * methods, if you like.
*/ externint spi_bitbang_setup(struct spi_device *spi); externvoid spi_bitbang_cleanup(struct spi_device *spi); externint spi_bitbang_setup_transfer(struct spi_device *spi, struct spi_transfer *t);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.