Browse Source

Fix compiler warnings with USB Disk on Teensy 2.0

teensy4-core
PaulStoffregen 8 years ago
parent
commit
4cf0b4ce4b
2 changed files with 5 additions and 3 deletions
  1. +2
    -2
      usb_disk/media_sdcard.c
  2. +3
    -1
      usb_disk/usb.c

+ 2
- 2
usb_disk/media_sdcard.c View File

@@ -454,9 +454,9 @@ static void media_send_chunk(uint32_t lba, uint8_t chunk)

static void media_send_end(void)
{
uint8_t r;
//uint8_t r;

r = sd_command(SD_CMD_STOP_TRANSMISSION, 0);
/* r = */ sd_command(SD_CMD_STOP_TRANSMISSION, 0);
// TODO: proper handling of stop transaction.....
// but what is the proper way? Older cards stop instantly,
// but newer ones spew 1 or 2 bytes of garbage, then maybe

+ 3
- 1
usb_disk/usb.c View File

@@ -508,7 +508,9 @@ static inline uint8_t mass_storage_isr(uint8_t need_rx, uint8_t need_tx)
uint8_t n, state;
const uint8_t *p;
static uint32_t tag, xfer_len, lba;
static uint8_t dir, cmd_len, status;
static uint8_t dir __attribute__ ((used));
static uint8_t cmd_len __attribute__ ((used));
static uint8_t status;
static uint8_t scsi_sense, scsi_asense;
static uint16_t sector_count;
static uint8_t sector_chunk;

Loading…
Cancel
Save