1
0
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:
James Cotton 2012-05-23 23:02:14 -05:00 committed by Sambas
parent 9d6dfee6cc
commit fef6567cff
2 changed files with 6 additions and 5 deletions

View File

@ -80,7 +80,7 @@ extern void PIOS_Vsync_ISR();
#define GRAPHICS_HEIGHT GRAPHICS_HEIGHT_REAL #define GRAPHICS_HEIGHT GRAPHICS_HEIGHT_REAL
// dma lenght // 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 // line types
#define LINE_TYPE_UNKNOWN 0 #define LINE_TYPE_UNKNOWN 0

View File

@ -363,6 +363,7 @@ const struct pios_usb_cdc_cfg pios_usb_cdc_cfg = {
#include <pios_video.h> #include <pios_video.h>
static const struct pios_exti_cfg pios_exti_hsync_cfg __exti_config = { static const struct pios_exti_cfg pios_exti_hsync_cfg __exti_config = {
.vector = PIOS_Hsync_ISR, .vector = PIOS_Hsync_ISR,
.line = EXTI_Line7,
.line = EXTI_Line2, .line = EXTI_Line2,
.pin = { .pin = {
.gpio = GPIOD, .gpio = GPIOD,
@ -430,7 +431,7 @@ static const struct pios_video_cfg pios_video_cfg = {
.init = { .init = {
.SPI_Mode = SPI_Mode_Master, .SPI_Mode = SPI_Mode_Master,
.SPI_Direction = SPI_Direction_1Line_Tx, .SPI_Direction = SPI_Direction_1Line_Tx,
.SPI_DataSize = SPI_DataSize_16b, .SPI_DataSize = SPI_DataSize_8b,
.SPI_NSS = SPI_NSS_Soft, .SPI_NSS = SPI_NSS_Soft,
.SPI_FirstBit = SPI_FirstBit_MSB, .SPI_FirstBit = SPI_FirstBit_MSB,
.SPI_CRCPolynomial = 7, .SPI_CRCPolynomial = 7,
@ -480,7 +481,7 @@ static const struct pios_video_cfg pios_video_cfg = {
.DMA_BufferSize = BUFFER_LINE_LENGTH, .DMA_BufferSize = BUFFER_LINE_LENGTH,
.DMA_PeripheralInc = DMA_PeripheralInc_Disable, .DMA_PeripheralInc = DMA_PeripheralInc_Disable,
.DMA_MemoryInc = DMA_MemoryInc_Enable, .DMA_MemoryInc = DMA_MemoryInc_Enable,
.DMA_PeripheralDataSize = DMA_PeripheralDataSize_HalfWord, .DMA_PeripheralDataSize = DMA_PeripheralDataSize_Byte,
.DMA_MemoryDataSize = DMA_MemoryDataSize_HalfWord, .DMA_MemoryDataSize = DMA_MemoryDataSize_HalfWord,
.DMA_Mode = DMA_Mode_Normal, .DMA_Mode = DMA_Mode_Normal,
.DMA_Priority = DMA_Priority_High, .DMA_Priority = DMA_Priority_High,
@ -529,7 +530,7 @@ static const struct pios_video_cfg pios_video_cfg = {
.init = { .init = {
.SPI_Mode = SPI_Mode_Slave, .SPI_Mode = SPI_Mode_Slave,
.SPI_Direction = SPI_Direction_1Line_Tx, .SPI_Direction = SPI_Direction_1Line_Tx,
.SPI_DataSize = SPI_DataSize_16b, .SPI_DataSize = SPI_DataSize_8b,
.SPI_NSS = SPI_NSS_Soft, .SPI_NSS = SPI_NSS_Soft,
.SPI_FirstBit = SPI_FirstBit_MSB, .SPI_FirstBit = SPI_FirstBit_MSB,
.SPI_CRCPolynomial = 7, .SPI_CRCPolynomial = 7,
@ -577,7 +578,7 @@ static const struct pios_video_cfg pios_video_cfg = {
.DMA_BufferSize = BUFFER_LINE_LENGTH, .DMA_BufferSize = BUFFER_LINE_LENGTH,
.DMA_PeripheralInc = DMA_PeripheralInc_Disable, .DMA_PeripheralInc = DMA_PeripheralInc_Disable,
.DMA_MemoryInc = DMA_MemoryInc_Enable, .DMA_MemoryInc = DMA_MemoryInc_Enable,
.DMA_PeripheralDataSize = DMA_PeripheralDataSize_HalfWord, .DMA_PeripheralDataSize = DMA_PeripheralDataSize_Byte,
.DMA_MemoryDataSize = DMA_MemoryDataSize_HalfWord, .DMA_MemoryDataSize = DMA_MemoryDataSize_HalfWord,
.DMA_Mode = DMA_Mode_Normal, .DMA_Mode = DMA_Mode_Normal,
.DMA_Priority = DMA_Priority_High, .DMA_Priority = DMA_Priority_High,