2016-09-05 20:17:13 +02:00
|
|
|
#ifndef _SDCARD_H
|
|
|
|
#define _SDCARD_H
|
|
|
|
|
2019-07-23 06:22:38 +02:00
|
|
|
#include <stdint.h>
|
|
|
|
#include <stddef.h>
|
2016-09-05 20:17:13 +02:00
|
|
|
|
|
|
|
int platform_sdcard_init( uint8_t spi_no, uint8_t ss_pin );
|
|
|
|
int platform_sdcard_status( void );
|
|
|
|
int platform_sdcard_error( void );
|
|
|
|
int platform_sdcard_type( void );
|
|
|
|
int platform_sdcard_read_block( uint8_t ss_pin, uint32_t block, uint8_t *dst );
|
|
|
|
int platform_sdcard_read_blocks( uint8_t ss_pin, uint32_t block, size_t num, uint8_t *dst );
|
|
|
|
int platform_sdcard_read_csd( uint8_t ss_pin, uint8_t *csd );
|
|
|
|
int platform_sdcard_read_cid( uint8_t ss_pin, uint8_t *cid );
|
|
|
|
int platform_sdcard_write_block( uint8_t ss_pin, uint32_t block, const uint8_t *src );
|
|
|
|
int platform_sdcard_write_blocks( uint8_t ss_pin, uint32_t block, size_t num, const uint8_t *src );
|
|
|
|
|
|
|
|
#endif
|