Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RIOT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cm-projects
RIOT
Commits
49118f8c
Commit
49118f8c
authored
8 years ago
by
Hauke Petersen
Browse files
Options
Downloads
Patches
Plain Diff
boards/arduino-due: added SD card configuration
parent
a2d9d9a3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
boards/arduino-due/include/sdcard_spi_params.h
+79
-0
79 additions, 0 deletions
boards/arduino-due/include/sdcard_spi_params.h
with
79 additions
and
0 deletions
boards/arduino-due/include/sdcard_spi_params.h
0 → 100644
+
79
−
0
View file @
49118f8c
/*
* Copyright (C) 2017 Michel Rottleuthner <michel.rottleuthner@haw-hamburg.de>
* 2017 Freie Universität Berlin
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup boards_arduino-due
* @{
*
* @file
* @brief SD card configuration for the Arduino due
*
* @author Michel Rottleuthner <michel.rottleuthner@haw-hamburg.de>
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
*/
#ifndef SDCARD_SPI_PARAMS_H
#define SDCARD_SPI_PARAMS_H
#include
"board.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/**
* @brief Set default configuration parameters for the sdcard_spi driver
* @{
*/
#ifndef SDCARD_SPI_PARAM_SPI
#define SDCARD_SPI_PARAM_SPI (SPI_DEV(0))
#endif
#ifndef SDCARD_SPI_PARAM_CS
#define SDCARD_SPI_PARAM_CS (GPIO_PIN(PA, 29))
#endif
#ifndef SDCARD_SPI_PARAM_CLK
#define SDCARD_SPI_PARAM_CLK (GPIO_PIN(PA, 27))
#endif
#ifndef SDCARD_SPI_PARAM_MOSI
#define SDCARD_SPI_PARAM_MOSI (GPIO_PIN(PA, 26))
#endif
#ifndef SDCARD_SPI_PARAM_MISO
#define SDCARD_SPI_PARAM_MISO (GPIO_PIN(PA, 25))
#endif
#ifndef SDCARD_SPI_PARAM_POWER
#define SDCARD_SPI_PARAM_POWER (GPIO_UNDEF)
#endif
#ifndef SDCARD_SPI_PARAM_POWER_AH
/** treated as 'don't care' if SDCARD_SPI_PARAM_POWER is GPIO_UNDEF */
#define SDCARD_SPI_PARAM_POWER_AH (true)
#endif
/** @} */
/**
* @brief sdcard_spi configuration
*/
static
const
sdcard_spi_params_t
sdcard_spi_params
[]
=
{
{
.
spi_dev
=
SDCARD_SPI_PARAM_SPI
,
.
cs
=
SDCARD_SPI_PARAM_CS
,
.
clk
=
SDCARD_SPI_PARAM_CLK
,
.
mosi
=
SDCARD_SPI_PARAM_MOSI
,
.
miso
=
SDCARD_SPI_PARAM_MISO
,
.
power
=
SDCARD_SPI_PARAM_POWER
,
.
power_act_high
=
SDCARD_SPI_PARAM_POWER_AH
},
};
/** @} */
#ifdef __cplusplus
}
#endif
#endif
/* SDCARD_SPI_PARAMS_H */
/** @} */
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment