30 #define PERIODIC_C_LOGGER
43 #define LOGGER_LED_ON LED_ON(LOGGER_LED);
44 #define LOGGER_LED_OFF LED_OFF(LOGGER_LED);
46 #define LOGGER_LED_ON {}
47 #define LOGGER_LED_OFF {}
50 #ifndef TELEMETRY_MODE_Main_empty
51 #warning You need to define a main telemetry mode named "empty" without any \
52 messages in your config file in /conf/telemetry/<your_config.xml>. \
54 Add <mode name="empty"></mode> to your main telemetry process.
57 #ifndef TELEMETRY_PROCESS_Logger
58 #error "You need to use a telemetry xml file with Logger process!"
61 #ifndef DOWNLINK_DEVICE
62 #warning This module can only be used with uart downlink for now.
75 SDLOGGER_SPI_LINK_SLAVE_NUMBER);
141 #if PERIODIC_TELEMETRY
354 telemetry_mode_Main = TELEMETRY_MODE_Main_empty;
370 if (available >= len) {
400 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)
int sdlogger_spi_direct_check_free_space(struct sdlogger_spi_periph *p, long *fd, uint16_t len)
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).
bool autopilot_get_motors_on(void)
get motors status
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.
uint32_t next_available_address
Initialize pprzlog transport.
#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
int uart_check_free_space(struct uart_periph *p, long *fd, uint16_t len)
void uart_put_byte(struct uart_periph *p, long fd, uint8_t data)
Uart transmit implementation.
void sdlogger_spi_direct_start(void)
Core autopilot interface common to all firmwares.
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
struct pprzlog_transport pprzlog_tp
PPRZLOG transport structure.
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.