spi: added transaction length check to refuse longer than hardware supported length

This commit is contained in:
Armando
2023-04-14 11:43:38 +08:00
parent 1438d9a02c
commit ea10aac4f0
8 changed files with 23 additions and 7 deletions

View File

@@ -38,7 +38,8 @@ extern "C" {
#define HAL_SPI_SWAP_DATA_TX(data, len) HAL_SWAP32((uint32_t)(data) << (32 - len))
#define SPI_LL_GET_HW(ID) ((ID)==0? ({abort();NULL;}):&GPSPI2)
#define SPI_LL_DATA_MAX_BIT_LEN (1 << 18)
#define SPI_LL_DMA_MAX_BIT_LEN (1 << 18) //reg len: 18 bits
#define SPI_LL_CPU_MAX_BIT_LEN (16 * 32) //Fifo len: 16 words
/**
* The data structure holding calculated clock configuration. Since the