Hi SPI Macro can be defined following two types,
SPI_S_SPTEF_MASK is a mask for the SPI Transmit Buffer Empty Flag (SPTEF) in the SPI Status Register (SPI_S).
On the other hand, LPSPI_SR_TDF_MASK is a mask for the Transmit Data Flag (TDF) in the LPSPI Status Register (LPSPI_SR).
Both of these masks are used to check the status of the respective SPI modules' transmit buffers, but they are specific to different SPI modules within the NXP product range. The SPI_S_SPTEF_MASK is used with the classic SPI module, while the LPSPI_SR_TDF_MASK is used with the Low Power SPI (LPSPI) module.
For more information on these modules and their respective registers, you can refer to the following documentation: