30 #define PERIODIC_C_LOGGER
38 #include "autopilot.h"
42 #define LOGGER_LED_ON LED_ON(LOGGER_LED);
43 #define LOGGER_LED_OFF LED_OFF(LOGGER_LED);
45 #define LOGGER_LED_ON {}
46 #define LOGGER_LED_OFF {}
49 #ifndef TELEMETRY_MODE_Main_empty
50 #warning You need to define a main telemetry mode named "empty" without any \
51 messages in your config file in /conf/telemetry/<your_config.xml>. \
53 Add <mode name="empty"></mode> to your main telemetry process.
56 #ifndef TELEMETRY_PROCESS_Logger
57 #error "You need to use a telemetry xml file with Logger process!"
60 #ifndef DOWNLINK_DEVICE
61 #warning This module can only be used with uart downlink for now.
74 SDLOGGER_SPI_LINK_SLAVE_NUMBER);
140 #if PERIODIC_TELEMETRY
142 &pprzlog_tp.trans_tx,
353 telemetry_mode_Main = TELEMETRY_MODE_Main_empty;
398 for (i = 0; i < len; i++) {
enum SDLoggerStatus status
Initialization sequence succesful.
uint8_t buffer[SDLOGGER_BUFFER_SIZE]
void sdlogger_spi_direct_send_message(void *p, long fd)
struct link_device device
uint8_t input_buf[SD_BLOCK_SIZE+10]
The input buffer for the SPI transaction.
uint8_t sdlogger_spi_direct_get_byte(void *p)
void sdcard_spi_write_block(struct SDCard *sdcard, uint32_t addr)
Write a single block (512 bytes) to the SDCard at a given address.
Periodic telemetry system header (includes downlink utility and generated code).
void sdlogger_spi_direct_init(void)
sdlogger_spi_direct_init Initialize the logger and SD Card.
int sdlogger_spi_direct_char_available(void *p)
enum SDCardStatus status
The status of the SD card.
void sdcard_spi_init(struct SDCard *sdcard, struct spi_periph *spi_p, const uint8_t slave_idx)
Configure initial values for SDCard.
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.
uint8_t output_buf[SD_BLOCK_SIZE+10]
The output buffer for the SPI transaction.
bool sdlogger_spi_direct_check_free_space(struct sdlogger_spi_periph *p, long *fd, uint16_t len)
uint32_t next_available_address
bool uart_check_free_space(struct uart_periph *p, long *fd, uint16_t len)
#define SDLOGGER_BUFFER_SIZE
void sdcard_spi_multiwrite_stop(struct SDCard *sdcard)
Stop with multiwrite procedure.
void sdcard_spi_multiwrite_next(struct SDCard *sdcard, SDCardCallback callback)
Write a(nother) data block (512 bytes) to the SDCard.
void sdlogger_spi_direct_stop(void)
void sdcard_spi_periodic(struct SDCard *sdcard)
Periodic function of the SDCard.
struct sdlogger_spi_periph sdlogger_spi
#define DefaultPeriodic
Set default periodic telemetry.
void sdlogger_spi_direct_multiwrite_written(void)
sdlogger_spi_direct_multiwrite_written Called when a multiwrite is complete.
void sdcard_spi_multiwrite_start(struct SDCard *sdcard, uint32_t addr)
Start writing multiple blocks of 512 bytes to the SDCard.
void sdlogger_spi_direct_periodic(void)
sdlogger_spi_direct_periodic Periodic function called at module frequency
void uart_put_byte(struct uart_periph *p, long fd, uint8_t data)
Uart transmit implementation.
void sdlogger_spi_direct_start(void)
struct SDCard sdcard1
This is the definition of the SD card.
void sdlogger_spi_direct_index_received(void)
sdlogger_spi_direct_index_received Callback from SD Card when block at index location is received...
void sdlogger_spi_direct_command(void)
Common code for AP and FBW telemetry.
uint32_t download_address
arch independent LED (Light Emitting Diodes) API
void sdlogger_spi_direct_put_byte(struct sdlogger_spi_periph *p, long fd, uint8_t data)
void sdlogger_spi_direct_put_buffer(struct sdlogger_spi_periph *p, long fd, uint8_t *data, uint16_t len)
CMD25 complete, ready to sent blocks.