|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
114 for (
uint8_t i = 0; i < 10; i++) {
469 (void) cmd; (void) arg;
547 for (
uint8_t i = 0; i < len; i++) {
@ SDCard_SendingCMD24
Busy sending CMD24.
struct spi_transaction spi_t
The SPI transaction used for the writing and reading of registers.
void sdcard_spi_multiwrite_start(struct SDCard *sdcard, uint32_t addr)
Start writing multiple blocks of 512 bytes to the SDCard.
@ SDCard_Idle
Initialization sequence succesful.
enum SPIClockDiv cdiv
prescaler of main clock to use as SPI clock
@ SDCard_ReadingCMD0Resp
Reading R1 response to CMD0 byte by byte.
enum SDCardErrorStatus error_status
Contains information on where the error has occured.
@ SDCard_BeforeSendingDataBlock
Start data block transfer.
struct SDCard sdcard1
This is the definition of the SD card.
enum SPIClockPolarity cpol
clock polarity control
@ SDCardError_InitializationNoResponse
@ SDCard_MultiWriteStopping
Busy sending the stop token.
@ SDCard_SendingCMD16
Busy sending CMD16.
uint16_t output_length
number of data words to write
@ SDCard_MultiWriteBusy
Busy flag after sending data block in multiwrite.
@ SDCard_SendingCMD58
Busy sending CMD58.
SPI transaction structure.
@ SDCard_ReadingCMD8Resp
Reading R7 response to CMD8 byte by byte.
@ SDCardError_SpiDriverError
@ SDCardError_ACMD41NoResponse
@ SPISelectUnselect
slave is selected before transaction and unselected after
enum SPIBitOrder bitorder
MSB/LSB order.
void sdcard_spi_send_app_cmd(struct SDCard *sdcard, uint8_t cmd, uint32_t arg)
Send a app-command to the SDCard.
@ SDCard_ReadingCMD58Parameter
Reading the 32-bit parameter after receiving 0x00 from CMD58.
@ SDCardError_CCSBitInvalid
void sdcard_spi_multiwrite_stop(struct SDCard *sdcard)
Stop with multiwrite procedure.
volatile uint8_t * output_buf
pointer to transmit buffer for DMA
@ SDCard_ReadingCMD8Parameter
Reading the 32-bit parameter after receiving 0x01.
SPI peripheral structure.
enum SPISlaveSelect select
slave selection behavior
@ SDCardError_InvalidCardInfo
void sdcard_spi_periodic(struct SDCard *sdcard)
Periodic function of the SDCard.
void sdcard_spi_init(struct SDCard *sdcard, struct spi_periph *spi_p, const uint8_t slave_idx)
Configure initial values for SDCard.
@ SDCard_SendingCMD8
Busy sending CMD8.
@ SDCard_WaitingForDataToken
Reading a byte each period until there is a data token or error.
void sdcard_spi_request_bytes(struct SDCard *sdcard, uint8_t len)
Request one or more bytes from the SDCard.
@ SDCard_SendingACMD41v2
Busy sending ACMD41.
@ SPICpolIdleLow
CPOL = 0.
@ SDCardError_ACMD41Timeout
@ SDCardError_WriteBlockNoResponse
@ SDCard_ReadingDataBlock
Busy reading data block.
enum SPIClockPhase cpha
clock phase control
SPICallback after_cb
NULL or function called after the transaction.
@ SDCard_MultiWriteWriting
Busy with the SPI transfer in multiwrite.
bool spi_submit(struct spi_periph *p, struct spi_transaction *t)
Submit SPI transaction.
enum SDCardStatus status
The status of the SD card.
@ SDCard_MultiWriteIdle
CMD25 complete, ready to sent blocks.
struct spi_periph * spi_p
The SPI peripheral for the connection.
@ SPINoSelect
slave is not selected nor unselected
@ SDCardError_ReadBlockNoResponse
uint32_t timeout_counter
Timeout counter used for initialization checks with ACMD41.
@ SDCard_BeforeDummyClock
About to send dummy clock cycles to initialize spi mode.
@ SDCard_SendingCMD0
Busy sending CMD0.
@ SDCard_Error
An error has occured, sending debug message.
void sdcard_spi_send_cmd(struct SDCard *sdcard, uint8_t cmd, uint32_t arg)
Send a command to the SDCard.
Interface for reading and writing blocks of data to and from an SD card directly over SPI.
@ SDCardError_ReadBlockTimeout
@ SDCard_ReadingCMD16Resp
Reading R1 response to CMD16 byte by byte.
void sdcard_spi_spicallback(struct spi_transaction *t)
Callback function for SPI transactions.
@ SDCardError_MultiWriteError
uint8_t output_buf[SD_BLOCK_SIZE+10]
The output buffer for the SPI transaction.
void sdcard_spi_write_block(struct SDCard *sdcard, uint32_t addr)
Write a single block (512 bytes) to the SDCard at a given address.
@ SDCardError_CMD58NoResponse
uint16_t input_length
number of data words to read
uint8_t response_counter
Response counter used at various locations.
@ SDCard_Busy
SDCard is busy with internal process.
@ SDCard_ReadingCMD17Resp
Reading R1 response to CMD17 byte by byte.
void(* SDCardCallback)(void)
SDCard Callback function.
enum SPIDataSizeSelect dss
data transfer word size
uint8_t slave_idx
slave id: SPI_SLAVE0 to SPI_SLAVE4
@ SDCard_SendingCMD25
Busy sending CMD25 (multiwrite start command)
volatile uint8_t * input_buf
pointer to receive buffer for DMA
@ SDCardError_SetBlockSizeNoResponse
@ SDCardError_CardInfoNoResponse
@ SDCard_ReadingCMD24Resp
Reading R1 response to CMD24 byte by byte.
void sdcard_spi_read_block(struct SDCard *sdcard, uint32_t addr, SDCardCallback callback)
Read a single block (512 bytes) from the SDCard at a given address.
@ SDCard_ReadingCMD25Resp
Reading R1 response to CMD25 byte by byte.
void sdcard_spi_multiwrite_next(struct SDCard *sdcard, SDCardCallback callback)
Write a(nother) data block (512 bytes) to the SDCard.
@ SDCard_SendingDummyClock
Busy sending dummy clock cycles.
SDCardCallback external_callback
Callback to call when external operation finishes.
@ SDCard_ReadingCMD58Resp
Reading R3 response to CMD58 byte by byte.
@ SDCard_SendingCMD17
Busy sending CMD17 (block read request)
uint8_t input_buf[SD_BLOCK_SIZE+10]
The input buffer for the SPI transaction.
enum SDCardType card_type
Type of SDCard.
enum SPITransactionStatus status
@ SDCardError_BlockWriteError
@ SDCard_SendingDataBlock
Busy sending data block.
@ SDCardError_MultiWriteNoResponse
@ SDCard_ReadingACMD41v2Resp
Reading R1 response to ACMD41 byte by byte.