mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Merge pull request #998 from openmv/winc_spih
WINC: Use static SPI handle to avoid conflicts.
This commit is contained in:
commit
7f5969dfa4
@ -255,7 +255,6 @@
|
||||
// SPI5 clock source is PLL2 (200MHz/4 == 50MHz) - Slightly over the maximum of 48 MHz.
|
||||
#define WINC_SPI_PRESCALER (SPI_BAUDRATEPRESCALER_4)
|
||||
#define WINC_SPI_CLK_ENABLE() __HAL_RCC_SPI5_CLK_ENABLE()
|
||||
#define WINC_SPI_HANDLE SPIHandle5
|
||||
|
||||
#define WINC_SPI_SCLK_PIN (GPIO_PIN_6)
|
||||
#define WINC_SPI_MISO_PIN (GPIO_PIN_7)
|
||||
|
||||
@ -53,14 +53,7 @@
|
||||
#include "extint.h"
|
||||
#include "omv_boardconfig.h"
|
||||
|
||||
// Re-use MicroPython's SPI2 Handle.
|
||||
#ifndef WINC_SPI_HANDLE
|
||||
extern SPI_HandleTypeDef SPIHandle2;
|
||||
#define SPI_HANDLE (SPIHandle2)
|
||||
#else
|
||||
SPI_HandleTypeDef WINC_SPI_HANDLE;
|
||||
#define SPI_HANDLE (WINC_SPI_HANDLE)
|
||||
#endif
|
||||
static SPI_HandleTypeDef SPI_HANDLE;
|
||||
|
||||
#define NM_BUS_MAX_TRX_SZ 4096
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user