Continued work on MAX5715. MACRO functions are done, mostly tested in logic analyzer. SPI unable to work with hardware SS, so software SS is used instead
Added UART3 on PB10/PB11 for terminal (future use) git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@225 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "Logger.h"
|
||||
#include "spi.h"
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
@@ -81,6 +82,12 @@ ErrorStatus SPI_construct(struct Spi* self, const struct SpiParameters* paramete
|
||||
self->SPI_InitStruct.SPI_CRCPolynomial = parameters->SPI_CRCPolynomial;
|
||||
SPI_Init(self->SPI_TypeDef, &self->SPI_InitStruct);
|
||||
|
||||
if (parameters->SPI_NSS == SPI_NSS_Hard)
|
||||
{
|
||||
SPI_NSSInternalSoftwareConfig(self->SPI_TypeDef, parameters->SPI_NSS_internal);
|
||||
SPI_SSOutputCmd(self->SPI_TypeDef, ENABLE);
|
||||
}
|
||||
|
||||
//! Enable USART interface
|
||||
SPI_Cmd(self->SPI_TypeDef, ENABLE);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user