Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
marlin-anet-a8
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jonas Leder
marlin-anet-a8
Commits
a8c446c3
Commit
a8c446c3
authored
Jan 10, 2018
by
teemuatlut
Committed by
Scott Lahteine
Jan 10, 2018
Browse files
Options
Downloads
Patches
Plain Diff
[2.0.x]DUE: Fix includes for SDSUPPORT (#9112)
parent
cf654b9a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Marlin/src/HAL/HAL_DUE/usb/conf_access.h
+1
-1
1 addition, 1 deletion
Marlin/src/HAL/HAL_DUE/usb/conf_access.h
Marlin/src/HAL/HAL_DUE/usb/sd_mmc_spi_mem.cpp
+24
-28
24 additions, 28 deletions
Marlin/src/HAL/HAL_DUE/usb/sd_mmc_spi_mem.cpp
with
25 additions
and
29 deletions
Marlin/src/HAL/HAL_DUE/usb/conf_access.h
+
1
−
1
View file @
a8c446c3
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
#define _CONF_ACCESS_H_
#define _CONF_ACCESS_H_
#include
"compiler.h"
#include
"compiler.h"
#include
"../../../inc/MarlinConfigPre.h"
/*! \name Activation of Logical Unit Numbers
/*! \name Activation of Logical Unit Numbers
*/
*/
...
...
This diff is collapsed.
Click to expand it.
Marlin/src/HAL/HAL_DUE/usb/sd_mmc_spi_mem.cpp
+
24
−
28
View file @
a8c446c3
...
@@ -2,9 +2,12 @@
...
@@ -2,9 +2,12 @@
* Interface from Atmel USB MSD to Marlin SD card
* Interface from Atmel USB MSD to Marlin SD card
*/
*/
#if
def
ined(
ARDUINO_ARCH_SAM
) && defined(SDSUPPORT)
#ifdef
ARDUINO_ARCH_SAM
#include
"../../../inc/MarlinConfig.h"
#include
"../../../inc/MarlinConfig.h"
#if ENABLED(SDSUPPORT)
#include
"../../../sd/cardreader.h"
#include
"../../../sd/cardreader.h"
extern
"C"
{
extern
"C"
{
#include
"sd_mmc_spi_mem.h"
#include
"sd_mmc_spi_mem.h"
...
@@ -12,37 +15,31 @@ extern "C" {
...
@@ -12,37 +15,31 @@ extern "C" {
#define SD_MMC_BLOCK_SIZE 512
#define SD_MMC_BLOCK_SIZE 512
void
sd_mmc_spi_mem_init
(
void
)
void
sd_mmc_spi_mem_init
(
void
)
{
{
}
}
Ctrl_status
sd_mmc_spi_test_unit_ready
(
void
)
Ctrl_status
sd_mmc_spi_test_unit_ready
(
void
)
{
{
if
(
!
IS_SD_INSERTED
||
IS_SD_PRINTING
||
IS_SD_FILE_OPEN
||
!
card
.
cardOK
)
if
(
!
IS_SD_INSERTED
||
IS_SD_PRINTING
||
IS_SD_FILE_OPEN
||
!
card
.
cardOK
)
return
CTRL_NO_PRESENT
;
return
CTRL_NO_PRESENT
;
return
CTRL_GOOD
;
return
CTRL_GOOD
;
}
}
Ctrl_status
sd_mmc_spi_read_capacity
(
uint32_t
*
nb_sector
)
Ctrl_status
sd_mmc_spi_read_capacity
(
uint32_t
*
nb_sector
)
{
{
if
(
!
IS_SD_INSERTED
||
IS_SD_PRINTING
||
IS_SD_FILE_OPEN
||
!
card
.
cardOK
)
if
(
!
IS_SD_INSERTED
||
IS_SD_PRINTING
||
IS_SD_FILE_OPEN
||
!
card
.
cardOK
)
return
CTRL_NO_PRESENT
;
return
CTRL_NO_PRESENT
;
*
nb_sector
=
card
.
getSd2Card
().
cardSize
();
*
nb_sector
=
card
.
getSd2Card
().
cardSize
();
return
CTRL_GOOD
;
return
CTRL_GOOD
;
}
}
bool
sd_mmc_spi_unload
(
bool
unload
)
bool
sd_mmc_spi_unload
(
bool
unload
)
{
{
return
true
;
return
true
;
}
}
bool
sd_mmc_spi_wr_protect
(
void
)
bool
sd_mmc_spi_wr_protect
(
void
)
{
{
return
false
;
return
false
;
}
}
bool
sd_mmc_spi_removal
(
void
)
bool
sd_mmc_spi_removal
(
void
)
{
{
if
(
!
IS_SD_INSERTED
||
IS_SD_PRINTING
||
IS_SD_FILE_OPEN
||
!
card
.
cardOK
)
if
(
!
IS_SD_INSERTED
||
IS_SD_PRINTING
||
IS_SD_FILE_OPEN
||
!
card
.
cardOK
)
return
true
;
return
true
;
return
false
;
return
false
;
...
@@ -61,8 +58,7 @@ uint8_t sector_buf[SD_MMC_BLOCK_SIZE];
...
@@ -61,8 +58,7 @@ uint8_t sector_buf[SD_MMC_BLOCK_SIZE];
// #define DEBUG_MMC
// #define DEBUG_MMC
Ctrl_status
sd_mmc_spi_usb_read_10
(
uint32_t
addr
,
uint16_t
nb_sector
)
Ctrl_status
sd_mmc_spi_usb_read_10
(
uint32_t
addr
,
uint16_t
nb_sector
)
{
{
if
(
!
IS_SD_INSERTED
||
IS_SD_PRINTING
||
IS_SD_FILE_OPEN
||
!
card
.
cardOK
)
if
(
!
IS_SD_INSERTED
||
IS_SD_PRINTING
||
IS_SD_FILE_OPEN
||
!
card
.
cardOK
)
return
CTRL_NO_PRESENT
;
return
CTRL_NO_PRESENT
;
...
@@ -96,8 +92,7 @@ Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector)
...
@@ -96,8 +92,7 @@ Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector)
return
CTRL_GOOD
;
return
CTRL_GOOD
;
}
}
Ctrl_status
sd_mmc_spi_usb_write_10
(
uint32_t
addr
,
uint16_t
nb_sector
)
Ctrl_status
sd_mmc_spi_usb_write_10
(
uint32_t
addr
,
uint16_t
nb_sector
)
{
{
if
(
!
IS_SD_INSERTED
||
IS_SD_PRINTING
||
IS_SD_FILE_OPEN
||
!
card
.
cardOK
)
if
(
!
IS_SD_INSERTED
||
IS_SD_PRINTING
||
IS_SD_FILE_OPEN
||
!
card
.
cardOK
)
return
CTRL_NO_PRESENT
;
return
CTRL_NO_PRESENT
;
...
@@ -132,4 +127,5 @@ Ctrl_status sd_mmc_spi_usb_write_10(uint32_t addr, uint16_t nb_sector)
...
@@ -132,4 +127,5 @@ Ctrl_status sd_mmc_spi_usb_write_10(uint32_t addr, uint16_t nb_sector)
#endif // ACCESS_USB == true
#endif // ACCESS_USB == true
#endif
#endif // SDSUPPORT
\ No newline at end of file
#endif // ARDUINO_ARCH_SAM
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