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:
mmi
2017-09-29 14:42:38 +00:00
parent b56bc71f36
commit f44979bf75
15 changed files with 412 additions and 95 deletions

View File

@@ -36,6 +36,7 @@
#include "misc.h"
#include "stm32f10x_rcc.h"
#include "MAX5715.h"
#include "nhd0420.h"
#include "keypadMatrix.h"
@@ -77,6 +78,9 @@ static xTaskHandle initTaskHandle;
static xTaskHandle ledTaskHandle;
static xTaskHandle sysTaskHandle;
static struct NHD0420 nhd0420;
static struct MAX5715 max5715;
// -----------------------------------------------------------------------------
// Function declarations
// -----------------------------------------------------------------------------
@@ -153,21 +157,26 @@ static void initTask(void* parameters)
Logger_construct(&uart1->device);
NHD0420_construct(&spiDisplay->device);
NHD0420_construct(&nhd0420, &spiDisplay->device);
NHD0420_turnOffDisplay(&spiDisplay->device);
NHD0420_turnOffDisplay(&nhd0420);
vTaskDelay(1000);
NHD0420_clearScreen(&spiDisplay->device);
NHD0420_clearScreen(&nhd0420);
vTaskDelay(1000);
NHD0420_turnOnDisplay(&spiDisplay->device);
NHD0420_turnOnDisplay(&nhd0420);
vTaskDelay(1000);
NHD0420_setContrast(&spiDisplay->device, 30);
NHD0420_setContrast(&nhd0420, 30);
vTaskDelay(1000);
NHD0420_setBacklightBrightness(&spiDisplay->device, 3);
NHD0420_setBacklightBrightness(&nhd0420, 3);
vTaskDelay(1000);
NHD0420_setCursorToHome(&spiDisplay->device);
NHD0420_setCursorToHome(&nhd0420);
vTaskDelay(1000);
NHD0420_sendData(&spiDisplay->device, "Anode repair A", 20);
NHD0420_sendData(&nhd0420, "Anode repair A", 20);
MAX5715_construct(&max5715, &spiDAC->device);
MAX5715_writeCODEn(&max5715, (MAX5715_SEL_DACA | MAX5715_SEL_DACC), 0x579B);
xTaskCreate(ledBlinkTask, (const char* const)"ledTask", 40, &ledTaskArguments, 0, &ledTaskHandle);