瀏覽代碼

Fix compiler warnings with USB Disk on Teensy 2.0

main
PaulStoffregen 7 年之前
父節點
當前提交
4cf0b4ce4b
共有 2 個檔案被更改,包括 5 行新增3 行删除
  1. +2
    -2
      usb_disk/media_sdcard.c
  2. +3
    -1
      usb_disk/usb.c

+ 2
- 2
usb_disk/media_sdcard.c 查看文件



static void media_send_end(void) 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..... // TODO: proper handling of stop transaction.....
// but what is the proper way? Older cards stop instantly, // but what is the proper way? Older cards stop instantly,
// but newer ones spew 1 or 2 bytes of garbage, then maybe // but newer ones spew 1 or 2 bytes of garbage, then maybe

+ 3
- 1
usb_disk/usb.c 查看文件

uint8_t n, state; uint8_t n, state;
const uint8_t *p; const uint8_t *p;
static uint32_t tag, xfer_len, lba; 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 uint8_t scsi_sense, scsi_asense;
static uint16_t sector_count; static uint16_t sector_count;
static uint8_t sector_chunk; static uint8_t sector_chunk;

Loading…
取消
儲存