*/
uintptr_t fat_clear_cluster_callback(uint8_t* buffer, offset_t offset, void* p)
{
+ (void)buffer;
+ (void)offset;
+ (void)p;
return 16;
}
#endif
struct fat_usage_count_callback_arg* count_arg = (struct fat_usage_count_callback_arg*) p;
uintptr_t buffer_size = count_arg->buffer_size;
+ (void)offset;
+
for(uintptr_t i = 0; i < buffer_size; i += 2, buffer += 2)
{
uint16_t cluster = read16(buffer);
struct fat_usage_count_callback_arg* count_arg = (struct fat_usage_count_callback_arg*) p;
uintptr_t buffer_size = count_arg->buffer_size;
+ (void)offset;
+
for(uintptr_t i = 0; i < buffer_size; i += 4, buffer += 4)
{
uint32_t cluster = read32(buffer);
-uint8_t i2c_send(uint8_t addr, uint8_t* data, uint8_t len, uint8_t dummy)
+uint8_t i2c_send(uint8_t addr, uint8_t* data, uint8_t len, uint8_t ctrl)
{
uint8_t i;
uint8_t err = 0;
+ (void)ctrl; /* ignored */
+
err = i2cm_send_start((addr<<1) | 0);
if (err)
return err;
uint8_t i2c_buf[0x20];
-uint8_t i2c_recv(uint8_t addr, uint8_t len, uint8_t dummy)
+uint8_t i2c_recv(uint8_t addr, uint8_t len, uint8_t ctrl)
{
uint8_t i;
uint8_t err = 0;
+ (void)ctrl; /* ignored */
+
err = i2cm_send_start((addr<<1) | 1);
if (err)
return err;
void i2c_recvevent(uint8_t * buf, int8_t size)
+void i2c_recvevent(uint8_t *buf, int8_t size)
{
+ (void)buf;
+ (void)size;
}
void i2c_sendevent(int8_t size)
{
+ (void)size;
}
void do_led_blink(void *dummy)
{
+ (void)dummy;
+
#if 1 /* simple blink */
LED1_TOGGLE();
#endif
uint8_t find_file_in_dir(struct fat_fs_struct* fs, struct fat_dir_struct* dd, const char* name, struct fat_dir_entry_struct* dir_entry)
{
+ (void)fs;
+
while(fat_read_dir(dd, dir_entry))
{
if(strcmp(dir_entry->long_name, name) == 0)
*/
#include <string.h>
+#include <avr/pgmspace.h>
#include <avr/io.h>
#include "sd_raw.h"
+#include <uart.h>
+
/**
* \addtogroup sd_raw MMC/SD/SDHC card raw access
*
/* private helper functions */
static void sd_raw_send_byte(uint8_t b);
-static uint8_t sd_raw_rec_byte();
+static uint8_t sd_raw_rec_byte(void);
static uint8_t sd_raw_send_command(uint8_t command, uint32_t arg);
/**
*
* \returns 0 on failure, 1 on success.
*/
-uint8_t sd_raw_init()
+uint8_t sd_raw_init(void)
{
/* enable inputs for reading card status */
configure_pin_available();
if(i == 0)
{
csd_structure = b >> 6;
+ (void)csd_structure;
}
else if(i == 14)
{
typedef uint8_t (*sd_raw_read_interval_handler_t)(uint8_t* buffer, offset_t offset, void* p);
typedef uintptr_t (*sd_raw_write_interval_handler_t)(uint8_t* buffer, offset_t offset, void* p);
-uint8_t sd_raw_init();
-uint8_t sd_raw_available();
-uint8_t sd_raw_locked();
+uint8_t sd_raw_init(void);
+uint8_t sd_raw_available(void);
+uint8_t sd_raw_locked(void);
uint8_t sd_raw_read(offset_t offset, uint8_t* buffer, uintptr_t length);
uint8_t sd_raw_read_interval(offset_t offset, uint8_t* buffer, uintptr_t interval, uintptr_t length, sd_raw_read_interval_handler_t callback, void* p);
uint8_t sd_raw_write(offset_t offset, const uint8_t* buffer, uintptr_t length);
uint8_t sd_raw_write_interval(offset_t offset, uint8_t* buffer, uintptr_t length, sd_raw_write_interval_handler_t callback, void* p);
-uint8_t sd_raw_sync();
+uint8_t sd_raw_sync(void);
uint8_t sd_raw_get_info(struct sd_raw_info* info);