max7456 driver io tags, moved some sirin #defines out (they're in common now)
This commit is contained in:
parent
e07808e2a8
commit
cd5335ddec
|
@ -31,8 +31,10 @@
|
||||||
|
|
||||||
#include "max7456.h"
|
#include "max7456.h"
|
||||||
|
|
||||||
#define DISABLE_MAX7456 GPIO_SetBits(MAX7456_CS_GPIO, MAX7456_CS_PIN)
|
#define DISABLE_MAX7456 IOHi(max7456CsPin)
|
||||||
#define ENABLE_MAX7456 GPIO_ResetBits(MAX7456_CS_GPIO, MAX7456_CS_PIN)
|
#define ENABLE_MAX7456 IOLo(max7456CsPin)
|
||||||
|
|
||||||
|
static IO_t max7456CsPin = IO_NONE;
|
||||||
|
|
||||||
/** PAL or NTSC, value is number of chars total */
|
/** PAL or NTSC, value is number of chars total */
|
||||||
#define VIDEO_MODE_PIXELS_NTSC 390
|
#define VIDEO_MODE_PIXELS_NTSC 390
|
||||||
|
@ -57,6 +59,12 @@ void max7456_init(uint8_t system) {
|
||||||
uint16_t x;
|
uint16_t x;
|
||||||
char buf[30];
|
char buf[30];
|
||||||
|
|
||||||
|
#ifdef MAX7456_SPI_CS_PIN
|
||||||
|
max7456CsPin = IOGetByTag(IO_TAG(MAX7456_SPI_CS_PIN));
|
||||||
|
#endif
|
||||||
|
IOInit(max7456CsPin, OWNER_SYSTEM, RESOURCE_SPI);
|
||||||
|
IOConfigGPIO(max7456CsPin, SPI_IO_CS_CFG);
|
||||||
|
|
||||||
//Minimum spi clock period for max7456 is 100ns (10Mhz)
|
//Minimum spi clock period for max7456 is 100ns (10Mhz)
|
||||||
spiSetDivisor(MAX7456_SPI_INSTANCE, SPI_9MHZ_CLOCK_DIVIDER);
|
spiSetDivisor(MAX7456_SPI_INSTANCE, SPI_9MHZ_CLOCK_DIVIDER);
|
||||||
|
|
||||||
|
|
|
@ -109,9 +109,8 @@
|
||||||
#define SPI3_MOSI_PIN PB5
|
#define SPI3_MOSI_PIN PB5
|
||||||
|
|
||||||
#define USE_MAX7456
|
#define USE_MAX7456
|
||||||
#define MAX7456_CS_GPIO GPIOA
|
#define MAX7456_SPI_INSTANCE SPI3
|
||||||
#define MAX7456_CS_PIN GPIO_Pin_15
|
#define MAX7456_SPI_CS_PIN PA15
|
||||||
#define MAX7456_SPI_INSTANCE SPI3
|
|
||||||
|
|
||||||
#define USE_RTC6705
|
#define USE_RTC6705
|
||||||
#define RTC6705_SPIDATA_GPIO GPIOC
|
#define RTC6705_SPIDATA_GPIO GPIOC
|
||||||
|
@ -155,11 +154,7 @@
|
||||||
#define VBAT_ADC_CHANNEL ADC_Channel_1
|
#define VBAT_ADC_CHANNEL ADC_Channel_1
|
||||||
|
|
||||||
//#define USE_QUAD_MIXER_ONLY
|
//#define USE_QUAD_MIXER_ONLY
|
||||||
#define BLACKBOX
|
|
||||||
#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
|
#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
|
||||||
#define TELEMETRY
|
|
||||||
#define SERIAL_RX
|
|
||||||
#define USE_CLI
|
|
||||||
#define OSD
|
#define OSD
|
||||||
|
|
||||||
#define CONFIG_FASTLOOP_PREFERRED_ACC ACC_DEFAULT
|
#define CONFIG_FASTLOOP_PREFERRED_ACC ACC_DEFAULT
|
||||||
|
|
Loading…
Reference in New Issue