mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
Clock the SPI device with bytes. Image is now totally stable.
This commit is contained in:
parent
9d6dfee6cc
commit
fef6567cff
@ -80,7 +80,7 @@ extern void PIOS_Vsync_ISR();
|
||||
#define GRAPHICS_HEIGHT GRAPHICS_HEIGHT_REAL
|
||||
|
||||
// dma lenght
|
||||
#define BUFFER_LINE_LENGTH GRAPHICS_WIDTH //Yes, in 16 bit halfwords.
|
||||
#define BUFFER_LINE_LENGTH (GRAPHICS_WIDTH*2) //Yes, in 16 bit halfwords.
|
||||
|
||||
// line types
|
||||
#define LINE_TYPE_UNKNOWN 0
|
||||
|
@ -363,6 +363,7 @@ const struct pios_usb_cdc_cfg pios_usb_cdc_cfg = {
|
||||
#include <pios_video.h>
|
||||
static const struct pios_exti_cfg pios_exti_hsync_cfg __exti_config = {
|
||||
.vector = PIOS_Hsync_ISR,
|
||||
.line = EXTI_Line7,
|
||||
.line = EXTI_Line2,
|
||||
.pin = {
|
||||
.gpio = GPIOD,
|
||||
@ -430,7 +431,7 @@ static const struct pios_video_cfg pios_video_cfg = {
|
||||
.init = {
|
||||
.SPI_Mode = SPI_Mode_Master,
|
||||
.SPI_Direction = SPI_Direction_1Line_Tx,
|
||||
.SPI_DataSize = SPI_DataSize_16b,
|
||||
.SPI_DataSize = SPI_DataSize_8b,
|
||||
.SPI_NSS = SPI_NSS_Soft,
|
||||
.SPI_FirstBit = SPI_FirstBit_MSB,
|
||||
.SPI_CRCPolynomial = 7,
|
||||
@ -480,7 +481,7 @@ static const struct pios_video_cfg pios_video_cfg = {
|
||||
.DMA_BufferSize = BUFFER_LINE_LENGTH,
|
||||
.DMA_PeripheralInc = DMA_PeripheralInc_Disable,
|
||||
.DMA_MemoryInc = DMA_MemoryInc_Enable,
|
||||
.DMA_PeripheralDataSize = DMA_PeripheralDataSize_HalfWord,
|
||||
.DMA_PeripheralDataSize = DMA_PeripheralDataSize_Byte,
|
||||
.DMA_MemoryDataSize = DMA_MemoryDataSize_HalfWord,
|
||||
.DMA_Mode = DMA_Mode_Normal,
|
||||
.DMA_Priority = DMA_Priority_High,
|
||||
@ -529,7 +530,7 @@ static const struct pios_video_cfg pios_video_cfg = {
|
||||
.init = {
|
||||
.SPI_Mode = SPI_Mode_Slave,
|
||||
.SPI_Direction = SPI_Direction_1Line_Tx,
|
||||
.SPI_DataSize = SPI_DataSize_16b,
|
||||
.SPI_DataSize = SPI_DataSize_8b,
|
||||
.SPI_NSS = SPI_NSS_Soft,
|
||||
.SPI_FirstBit = SPI_FirstBit_MSB,
|
||||
.SPI_CRCPolynomial = 7,
|
||||
@ -577,7 +578,7 @@ static const struct pios_video_cfg pios_video_cfg = {
|
||||
.DMA_BufferSize = BUFFER_LINE_LENGTH,
|
||||
.DMA_PeripheralInc = DMA_PeripheralInc_Disable,
|
||||
.DMA_MemoryInc = DMA_MemoryInc_Enable,
|
||||
.DMA_PeripheralDataSize = DMA_PeripheralDataSize_HalfWord,
|
||||
.DMA_PeripheralDataSize = DMA_PeripheralDataSize_Byte,
|
||||
.DMA_MemoryDataSize = DMA_MemoryDataSize_HalfWord,
|
||||
.DMA_Mode = DMA_Mode_Normal,
|
||||
.DMA_Priority = DMA_Priority_High,
|
||||
|
Loading…
Reference in New Issue
Block a user