Paparazzi UAS  v5.15_devel-88-gb3ad7fe
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
sdlogger_spi_direct.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) Bart Slinger
3  *
4  * This file is part of paparazzi
5  *
6  * paparazzi is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * paparazzi is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with paparazzi; see the file COPYING. If not, see
18  * <http://www.gnu.org/licenses/>.
19  */
26 #ifndef SDLOGGER_SPI_H
27 #define SDLOGGER_SPI_H
28 
29 #define SDLOGGER_BUFFER_SIZE 128
30 
31 #include "pprzlink/pprzlink_device.h"
32 #include "peripherals/sdcard_spi.h"
33 
47 };
48 
61  struct link_device device;
63 };
64 
65 extern struct sdlogger_spi_periph sdlogger_spi;
66 
67 extern void sdlogger_spi_direct_init(void);
68 extern void sdlogger_spi_direct_periodic(void);
69 extern void sdlogger_spi_direct_start(void);
70 extern void sdlogger_spi_direct_stop(void);
71 
72 extern void sdlogger_spi_direct_index_received(void);
74 extern void sdlogger_spi_direct_command(void);
75 
77 extern void sdlogger_spi_direct_put_byte(struct sdlogger_spi_periph *p, long fd, uint8_t data);
78 extern void sdlogger_spi_direct_put_buffer(struct sdlogger_spi_periph *p, long fd, uint8_t *data, uint16_t len);
79 extern void sdlogger_spi_direct_send_message(void *p, long fd);
80 extern int sdlogger_spi_direct_char_available(void *p);
82 
83 #endif
84 
enum SDLoggerStatus status
unsigned short uint16_t
Definition: types.h:16
uint8_t buffer[SDLOGGER_BUFFER_SIZE]
struct link_device device
void sdlogger_spi_direct_send_message(void *p, long fd)
bool sdlogger_spi_direct_check_free_space(struct sdlogger_spi_periph *p, long *fd, uint16_t len)
void sdlogger_spi_direct_init(void)
sdlogger_spi_direct_init Initialize the logger and SD Card.
#define SDLOGGER_BUFFER_SIZE
uint8_t sdlogger_spi_direct_get_byte(void *p)
int sdlogger_spi_direct_char_available(void *p)
void sdlogger_spi_direct_stop(void)
void sdlogger_spi_direct_command(void)
unsigned long uint32_t
Definition: types.h:18
void sdlogger_spi_direct_multiwrite_written(void)
sdlogger_spi_direct_multiwrite_written Called when a multiwrite is complete.
void sdlogger_spi_direct_index_received(void)
sdlogger_spi_direct_index_received Callback from SD Card when block at index location is received...
SDLoggerStatus
Interface for reading and writing blocks of data to and from an SD card directly over SPI...
unsigned char uint8_t
Definition: types.h:14
void sdlogger_spi_direct_put_buffer(struct sdlogger_spi_periph *p, long fd, uint8_t *data, uint16_t len)
int fd
Definition: serial.c:26
void sdlogger_spi_direct_periodic(void)
sdlogger_spi_direct_periodic Periodic function called at module frequency
void sdlogger_spi_direct_put_byte(struct sdlogger_spi_periph *p, long fd, uint8_t data)
static float p[2][2]
struct sdlogger_spi_periph sdlogger_spi
void sdlogger_spi_direct_start(void)