mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Add the chip select glue.
This commit is contained in:
parent
edd4c16f78
commit
cc90639873
2 changed files with 6 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
|||
/* $FreeBSD$ */
|
||||
|
||||
struct spi_command {
|
||||
int cs;
|
||||
void *tx_cmd;
|
||||
uint32_t tx_cmd_sz;
|
||||
void *rx_cmd;
|
||||
|
|
@ -10,3 +11,5 @@ struct spi_command {
|
|||
void *rx_data;
|
||||
uint32_t rx_data_sz;
|
||||
};
|
||||
|
||||
#define SPI_CHIP_SELECT_HIGH 0x1 /* Chip select high (else low) */
|
||||
|
|
|
|||
|
|
@ -158,6 +158,9 @@ spibus_hinted_child(device_t bus, const char *dname, int dunit)
|
|||
static int
|
||||
spibus_transfer_impl(device_t dev, device_t child, struct spi_command *cmd)
|
||||
{
|
||||
/* Maybe set flags too? spi mode? */
|
||||
spibus_get_cs(dev, &cmd->cs);
|
||||
|
||||
return (SPIBUS_TRANSFER(device_get_parent(dev), child, cmd));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue