git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5505 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
814bc9e8e7
commit
4a2b276936
|
@ -40,9 +40,9 @@
|
|||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief SPI1 driver identifier.
|
||||
* @brief SPID1 driver identifier.
|
||||
*/
|
||||
#if SPC5_SPI_USE_SPI1 || defined(__DOXYGEN__)
|
||||
#if SPC5_SPI_USE_DSPI1 || defined(__DOXYGEN__)
|
||||
SPIDriver SPID1;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@ struct SPIDriver {
|
|||
/* External declarations. */
|
||||
/*===========================================================================*/
|
||||
|
||||
#if SPC5_SPI_USE_SPI1 && !defined(__DOXYGEN__)
|
||||
#if SPC5_SPI_USE_DSPI1 && !defined(__DOXYGEN__)
|
||||
extern SPIDriver SPID1;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -100,17 +100,8 @@ int main(void) {
|
|||
chSysInit();
|
||||
|
||||
/*
|
||||
* SPI2 I/O pins setup.
|
||||
* SPI1 I/O pins setup.
|
||||
*/
|
||||
palSetPadMode(GPIOB, 13, PAL_MODE_ALTERNATE(5) |
|
||||
PAL_STM32_OSPEED_HIGHEST); /* New SCK. */
|
||||
palSetPadMode(GPIOB, 14, PAL_MODE_ALTERNATE(5) |
|
||||
PAL_STM32_OSPEED_HIGHEST); /* New MISO. */
|
||||
palSetPadMode(GPIOB, 15, PAL_MODE_ALTERNATE(5) |
|
||||
PAL_STM32_OSPEED_HIGHEST); /* New MOSI. */
|
||||
palSetPadMode(GPIOB, 12, PAL_MODE_OUTPUT_PUSHPULL |
|
||||
PAL_STM32_OSPEED_HIGHEST); /* New CS. */
|
||||
palSetPad(GPIOB, 12);
|
||||
|
||||
/*
|
||||
* Prepare transmit pattern.
|
||||
|
|
|
@ -84,4 +84,4 @@
|
|||
/*
|
||||
* SPI driver system settings.
|
||||
*/
|
||||
#define SPC5_SPI_USE_DSPI1 FALSE
|
||||
#define SPC5_SPI_USE_DSPI1 TRUE
|
||||
|
|
Loading…
Reference in New Issue