URL
https://opencores.org/ocsvn/gecko3/gecko3/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 13 |
Rev 35 |
Line 73... |
Line 73... |
//print_error("en\n");
|
//print_error("en\n");
|
return;
|
return;
|
}
|
}
|
else {
|
else {
|
bitSPI_CLK = 0; //make shure spi_clk is low before we activate a device
|
bitSPI_CLK = 0; //make shure spi_clk is low before we activate a device
|
SPI_OE |= bmSPI_MASK; //activate spi bus
|
SPI_OE |= bmSPI_OE_MASK; //activate spi bus
|
enables &= bmSPI_CS_MASK;
|
enables &= bmSPI_CS_MASK;
|
SPI_CS_PORT |= bmSPI_CS_MASK; //disable all chipselect signals
|
SPI_CS_PORT |= bmSPI_CS_MASK; //disable all chipselect signals
|
SPI_CS_PORT &= ~enables;
|
SPI_CS_PORT &= ~enables;
|
//SPI_CS_OE |= enables;
|
SPI_CS_OE |= enables;
|
SPI_CS_OE |= bmSPI_CS_MASK;
|
SPI_CS_OE |= bmSPI_CS_MASK;
|
}
|
}
|
}
|
}
|
|
|
|
// setup_enables (0); SPI_CS_PORT |= bmSPI_CS_MASK; \ \
|
/** disables all SPI devices and sets the SPI and SPI CS signals to tri-state */
|
/** disables all SPI devices and sets the SPI and SPI CS signals to tri-state */
|
#define disable_all() { \
|
#define disable_all() { \
|
setup_enables (0); \
|
setup_enables (0); \
|
} /* SPI_OE &= ~bmSPI_MASK; \
|
SPI_CS_OE &= ~bmSPI_CS_MASK; \
|
SPI_CS_OE &= ~bmSPI_CS_MASK; \
|
SPI_OE &= ~bmSPI_OE_MASK; \
|
} */
|
}
|
|
|
|
|
/** \brief Internal: Writes one byte to the SPI bus
|
/** \brief Internal: Writes one byte to the SPI bus
|
*
|
*
|
* \param[in] data to write to the bus
|
* \param[in] data to write to the bus
|
*/
|
*/
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.