Paparazzi UAS  v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
sdio_arch.c File Reference

SDIO interface using ChibiOS API for Paparazzi. More...

#include "std.h"
#include <string.h>
#include <ch.h>
#include <hal.h>
#include "mcu_periph/sdio.h"
#include <stdarg.h>
#include "mcu_periph/gpio.h"
#include <BOARD_CONFIG>
+ Include dependency graph for sdio_arch.c:

Go to the source code of this file.

Enumerations

enum  { STOP, CONNECT }
 

Functions

bool sdio_connect (void)
 Connect a SD card on SDIO peripheral. More...
 
bool sdio_disconnect (void)
 Disconnect a SD card on SDIO peripheral. More...
 
bool is_card_inserted (void)
 Check if a SD card is inserted. More...
 

Variables

static enum { ... }  cnxState = STOP
 

Detailed Description

SDIO interface using ChibiOS API for Paparazzi.

Definition in file sdio_arch.c.

Enumeration Type Documentation

anonymous enum
Enumerator
STOP 
CONNECT 

Definition at line 45 of file sdio_arch.c.

Function Documentation

bool is_card_inserted ( void  )

Check if a SD card is inserted.

Definition at line 99 of file sdio_arch.c.

bool sdio_connect ( void  )

Connect a SD card on SDIO peripheral.

Definition at line 48 of file sdio_arch.c.

References cnxState, CONNECT, FALSE, mode, SDIO_AF, SDIO_CK_PIN, SDIO_CK_PORT, SDIO_CMD_PIN, SDIO_CMD_PORT, SDIO_D0_PIN, SDIO_D0_PORT, SDIO_D1_PIN, SDIO_D1_PORT, SDIO_D2_PIN, SDIO_D2_PORT, SDIO_D3_PIN, SDIO_D3_PORT, and TRUE.

Referenced by sdLogInit(), and thdUsbStorage().

+ Here is the caller graph for this function:

bool sdio_disconnect ( void  )

Disconnect a SD card on SDIO peripheral.

Definition at line 87 of file sdio_arch.c.

References cnxState, FALSE, STOP, and TRUE.

Referenced by sdLogInit().

+ Here is the caller graph for this function:

Variable Documentation

enum { ... } cnxState

Referenced by sdio_connect(), and sdio_disconnect().