tetris/game-ctrl/display.c

27 lines
349 B
C
Raw Permalink Normal View History

2024-03-22 18:38:30 +01:00
#include <stdint.h>
#include "display.h"
#include "spi.h"
void displayInit() {
}
2024-03-22 22:49:43 +01:00
void displaySetValue(uint16_t v) {
union {
uint16_t value;
uint8_t sendBuffer[2];
} value;
2024-03-22 18:38:30 +01:00
2024-03-22 22:49:43 +01:00
value.value = v;
2024-03-22 18:38:30 +01:00
spiSendBegin(e_SPI_DISPLAY);
2024-03-22 22:49:43 +01:00
spiSendOctet(value.sendBuffer[0]);
spiSendOctet(value.sendBuffer[1]);
2024-03-22 18:38:30 +01:00
spiSendEnd(e_SPI_DISPLAY);
}