Merge remote-tracking branch 'origin/master' into ieee802154
This commit is contained in:
commit
4472ed246a
|
@ -233,6 +233,17 @@
|
|||
* Public Functions
|
||||
************************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: stm32_spidev_initialize
|
||||
*
|
||||
* Description:
|
||||
* Called to configure SPI chip select GPIO pins for the Mikroe Clicker2 STM32
|
||||
* board.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void weak_function stm32_spidev_initialize(void);
|
||||
|
||||
/************************************************************************************
|
||||
* Name: stm32_bringup
|
||||
*
|
||||
|
@ -254,7 +265,7 @@ int stm32_bringup(void);
|
|||
*
|
||||
* Description:
|
||||
* Called from stm32_boardinitialize very early in inialization to setup USB-related
|
||||
* GPIO pins for the Olimex STM32 P407 board.
|
||||
* GPIO pins for the Mikroe Clicker2 STM32 board.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
|
|
|
@ -63,6 +63,17 @@
|
|||
|
||||
void stm32_boardinitialize(void)
|
||||
{
|
||||
#if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) || defined(CONFIG_STM32_SPI3)
|
||||
/* Configure SPI chip selects if 1) SPI is not disabled, and 2) the weak function
|
||||
* stm32_spidev_initialize() has been brought into the link.
|
||||
*/
|
||||
|
||||
if (stm32_spidev_initialize)
|
||||
{
|
||||
stm32_spidev_initialize();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_OTGFS
|
||||
/* Initialize USB if the 1) OTG FS controller is in the configuration and 2)
|
||||
* disabled, and 3) the weak function stm32_usb_configure() has been brought
|
||||
|
|
|
@ -135,7 +135,18 @@ uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
|||
void stm32_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||
/* To be provided */
|
||||
|
||||
switch(devid)
|
||||
{
|
||||
#ifdef CONFIG_IEEE802154_MRF24J40
|
||||
case SPIDEV_IEEE802154:
|
||||
/* Set the GPIO low to select and high to de-select */
|
||||
stm32_gpiowrite(GPIO_MB1_CS, !selected);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
|
|
Loading…
Reference in New Issue