Paparazzi UAS  v4.0.4_stable-3-gf39211a
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
sd_card.c File Reference
#include "sd_card.h"
#include "spi.h"
+ Include dependency graph for sd_card.c:

Go to the source code of this file.

Macros

#define CMD_INIT_1   0x24
 
#define CMD_INIT_2   0xCF
 
#define CMD_INIT_3   0x34
 
#define CMD_INIT_4   0x00
 
#define CMD_INIT_5   0x14
 
#define CMD_INIT_6   0x20
 
#define CMD_MEASUREMENT   0x54
 

Functions

static void send1_on_spi (uint8_t d)
 
void sd_card_init (void)
 
void sd_card_periodic (void)
 
void sd_card_event (void)
 

Variables

bool_t sd_card_available
 
static bool_t status_read_data
 
uint8_t buf_input [3]
 
uint8_t buf_output [3]
 

Macro Definition Documentation

#define CMD_INIT_1   0x24

Definition at line 37 of file sd_card.c.

Referenced by sd_card_init().

#define CMD_INIT_2   0xCF

Definition at line 38 of file sd_card.c.

Referenced by sd_card_init().

#define CMD_INIT_3   0x34

Definition at line 39 of file sd_card.c.

Referenced by sd_card_init().

#define CMD_INIT_4   0x00

Definition at line 40 of file sd_card.c.

Referenced by sd_card_init().

#define CMD_INIT_5   0x14

Definition at line 41 of file sd_card.c.

Referenced by sd_card_init().

#define CMD_INIT_6   0x20

Definition at line 42 of file sd_card.c.

Referenced by sd_card_init().

#define CMD_MEASUREMENT   0x54

Definition at line 43 of file sd_card.c.

Referenced by sd_card_periodic().

Function Documentation

void sd_card_event ( void  )

Definition at line 99 of file sd_card.c.

References status_read_data.

Referenced by main_event_task().

+ Here is the caller graph for this function:

void sd_card_init ( void  )

Definition at line 60 of file sd_card.c.

References CMD_INIT_1, CMD_INIT_2, CMD_INIT_3, CMD_INIT_4, CMD_INIT_5, CMD_INIT_6, FALSE, sd_card_available, send1_on_spi(), and status_read_data.

Referenced by main_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void sd_card_periodic ( void  )
static void send1_on_spi ( uint8_t  d)
static

Definition at line 50 of file sd_card.c.

References buf_input, buf_output, spi_buffer_input, spi_buffer_length, and spi_buffer_output.

Referenced by sd_card_init().

+ Here is the caller graph for this function:

Variable Documentation

uint8_t buf_input[3]

Definition at line 46 of file sd_card.c.

Referenced by sd_card_periodic(), and send1_on_spi().

uint8_t buf_output[3]

Definition at line 47 of file sd_card.c.

Referenced by sd_card_periodic(), and send1_on_spi().

bool_t sd_card_available

Definition at line 33 of file sd_card.c.

Referenced by sd_card_init().

bool_t status_read_data
static

Definition at line 35 of file sd_card.c.

Referenced by sd_card_event(), sd_card_init(), and sd_card_periodic().