This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Could I define both HAL_UART_SPI 2 and HAL_SPI_MASTER?

Hi all

In __HAL_UART_SPI.c  ,I find the defination following :

#if   ((HAL_UART_SPI == 1) || defined HAL_SPI_MASTER)

 #define PxDIR                      P1DIR

#define SPI_RDYOut                 P1_4

#define SPI_RDYOut_BIT             BV(4)

#elif  (HAL_UART_SPI == 2)

#define PxDIR                      P0DIR

#define SPI_RDYOut                 P0_5

#define SPI_RDYOut_BIT             BV(5)

#endif

It mean that I can not define HAL_UART_SPI=2 and HAL_SPI_MASTER at the same time?

 

Thanks .

landao

  • You can set HAL_UART_SPI=2 and HAL_SPI_MASTER. By the way, if you only define HAL_SPI_MASTER but not HAL_UART_SPI, the HAL_UART_SPI will be set to 2 by default. You can refer to the lin2 138 and 139 in _hal_uart_spi.c.