Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Oct 30, 2022
1 parent 5889d25 commit b10e1fc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Marlin/src/HAL/STM32/tft/tft_spi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ void TFT_SPI::Init() {
}

// Call before any HAL initialization (DMA or SPI).
void TFT_SPI::HALPrepare(eSPIMode spiMode) {
void TFT_SPI::HAL_SPI_Prepare(eSPIMode spiMode) {
uint8_t clkdiv = 1;
#if PIN_EXISTS(TFT_MISO)
if (spiMode == eSPIMode::READ) clkdiv = clkdiv_read;
Expand Down Expand Up @@ -194,7 +194,7 @@ void TFT_SPI::HALPrepare(eSPIMode spiMode) {
#endif
}

void TFT_SPI::HALDismantle() {
void TFT_SPI::HAL_SPI_Dismantle() {
#ifdef STM32F1xx
#define _DMATX_DISMANTLE(N1,N4) \
__HAL_RCC_DMA##N1##_CLK_DISABLE(); \
Expand Down Expand Up @@ -227,7 +227,7 @@ void TFT_SPI::HALDismantle() {
}

void TFT_SPI::DataTransferBegin(uint16_t DataSize, eSPIMode spiMode) {
HALPrepare(spiMode);
HAL_SPI_Prepare(spiMode);
SPIx.Init.DataSize = ( DataSize == DATASIZE_8BIT ) ? SPI_DATASIZE_8BIT : SPI_DATASIZE_16BIT;
HAL_SPI_Init(&SPIx);
WRITE(TFT_CS_PIN, LOW);
Expand All @@ -237,7 +237,7 @@ void TFT_SPI::DataTransferBegin(uint16_t DataSize, eSPIMode spiMode) {
void TFT_SPI::DataTransferEnd() {
// TODO: apply strong integrity to the active_transfer variable!
HAL_SPI_DeInit(&SPIx);
HALDismantle();
HAL_SPI_Dismantle();
WRITE(TFT_CS_PIN, HIGH);
active_transfer = false;
}
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/HAL/STM32/tft/tft_spi.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ class TFT_SPI {
static void TransmitDMA_IT(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Count);
#endif

static void HALPrepare(eSPIMode spiMode);
static void HALDismantle(void);
static void HAL_SPI_Prepare(eSPIMode spiMode);
static void HAL_SPI_Dismantle();

static uint8_t _GetClockDivider( uint32_t spibasefreq, uint32_t speed );

Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/HAL/STM32/tft/xpt2046.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ class XPT2046 {
static uint16_t SoftwareIO(uint16_t data);
static uint16_t IO(uint16_t data = 0) { return SPIx.Instance ? HardwareIO(data) : SoftwareIO(data); }

static void HALPrepare(void);
static void HALDismantle(void);
static void HAL_SPI_Prepare();
static void HAL_SPI_Dismantle();

public:
static void Init();
Expand Down

0 comments on commit b10e1fc

Please sign in to comment.