|
CTS-SAT-1-OBC-Firmware
|

Functions | |
| static void | _chip_select_low (uint8_t chip_number) |
| static void | _chip_select_high () |
| Deactivates the chip select for all lines. | |
| static HAL_StatusTypeDef | _SPI_fast_receive (SPI_HandleTypeDef *hspi, uint8_t *response, uint16_t response_size) |
| Use DMA to speed up receiving. At least 3x faster than HAL_SPI_Receive when transferring 2048 bytes. | |
| FLASH_error_enum_t | FLASH_SPI_send_command (const FLASH_SPI_Data_t cmd[], uint8_t chip_number) |
| FLASH_error_enum_t | FLASH_SPI_send_command_with_data (const FLASH_SPI_Data_t cmd[], FLASH_SPI_Data_t *data, uint8_t chip_number) |
| FLASH_error_enum_t | FLASH_SPI_send_command_receive_response (const FLASH_SPI_Data_t cmd[], uint8_t *response, uint16_t response_size, uint8_t chip_number) |
| void | FLASH_SPI_enable_then_disable_chip_select (uint8_t chip_number) |
| void | HAL_SPI_RxCpltCallback (SPI_HandleTypeDef *hspi) |
Variables | |
| SPI_HandleTypeDef * | hspi_flash_ptr = &hspi1 |
| const uint16_t | FLASH_SPI_TIMEOUT_MS = 25 |
| volatile uint8_t | SPI_DMA_receive_complete = 0 |
|
inlinestatic |
Deactivates the chip select for all lines.

|
inlinestatic |


|
static |
Use DMA to speed up receiving. At least 3x faster than HAL_SPI_Receive when transferring 2048 bytes.

| void FLASH_SPI_enable_then_disable_chip_select | ( | uint8_t | chip_number | ) |


| FLASH_error_enum_t FLASH_SPI_send_command | ( | const FLASH_SPI_Data_t | cmd[], |
| uint8_t | chip_number ) |


| FLASH_error_enum_t FLASH_SPI_send_command_receive_response | ( | const FLASH_SPI_Data_t | cmd[], |
| uint8_t * | response, | ||
| uint16_t | response_size, | ||
| uint8_t | chip_number ) |


| FLASH_error_enum_t FLASH_SPI_send_command_with_data | ( | const FLASH_SPI_Data_t | cmd[], |
| FLASH_SPI_Data_t * | data, | ||
| uint8_t | chip_number ) |


| void HAL_SPI_RxCpltCallback | ( | SPI_HandleTypeDef * | hspi | ) |
| const uint16_t FLASH_SPI_TIMEOUT_MS = 25 |
| SPI_HandleTypeDef* hspi_flash_ptr = &hspi1 |
| volatile uint8_t SPI_DMA_receive_complete = 0 |