26 #ifndef SDLOGGER_SPI_H
27 #define SDLOGGER_SPI_H
29 #define SDLOGGER_BUFFER_SIZE 128
31 #include "pprzlink/pprzlink_device.h"
Interface for reading and writing blocks of data to and from an SD card directly over SPI.
uint8_t buffer[SDLOGGER_BUFFER_SIZE]
void sdlogger_spi_direct_index_received(void)
sdlogger_spi_direct_index_received Callback from SD Card when block at index location is received.
uint8_t sdlogger_spi_direct_get_byte(void *p)
void sdlogger_spi_direct_command(void)
void sdlogger_spi_direct_put_buffer(struct sdlogger_spi_periph *p, long fd, uint8_t *data, uint16_t len)
@ SDLogger_StoppedLogging
@ SDLogger_RetreivingIndex
@ SDLogger_GettingIndexForDownload
@ SDLogger_GettingIndexForUpdate
@ SDLogger_LoggingFinalBlock
struct link_device device
struct sdlogger_spi_periph sdlogger_spi
void sdlogger_spi_direct_init(void)
sdlogger_spi_direct_init Initialize the logger and SD Card.
enum SDLoggerStatus status
void sdlogger_spi_direct_put_byte(struct sdlogger_spi_periph *p, long fd, uint8_t data)
void sdlogger_spi_direct_stop(void)
void sdlogger_spi_direct_multiwrite_written(void)
sdlogger_spi_direct_multiwrite_written Called when a multiwrite is complete.
#define SDLOGGER_BUFFER_SIZE
void sdlogger_spi_direct_send_message(void *p, long fd)
void sdlogger_spi_direct_periodic(void)
sdlogger_spi_direct_periodic Periodic function called at module frequency
int sdlogger_spi_direct_char_available(void *p)
uint32_t download_address
uint32_t next_available_address
int sdlogger_spi_direct_check_free_space(struct sdlogger_spi_periph *p, long *fd, uint16_t len)
void sdlogger_spi_direct_start(void)
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.