Skip to content

Commit

Permalink
xr871: clear GPL code (alibaba#557)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron-Ye authored and librae8226 committed Sep 7, 2018
1 parent a9bfcfc commit d1788bf
Show file tree
Hide file tree
Showing 28 changed files with 173 additions and 3,969 deletions.
8 changes: 4 additions & 4 deletions board/xr871evb/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,10 @@ void board_init(void)
dkey_init();
adc_key_init();

ssd1306_init();
oled_clear_screen();
oled_draw_string_1608(0, 0, "Hello World!!");
oled_draw_string_1608(0, 2, "123456789");
//ssd1306_init();
//oled_clear_screen();
//oled_draw_string_1608(0, 0, "Hello World!!");
//oled_draw_string_1608(0, 2, "123456789");

return;
}
4 changes: 3 additions & 1 deletion board/xr871evb/xr871evb.mk
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ MODULE := XR871EVB
HOST_ARCH := Cortex-M4
HOST_MCU_FAMILY := xr871

$(NAME)_SOURCES := board.c ssd1306.c oled.c
$(NAME)_SOURCES := board.c

#ssd1306.c oled.c

GLOBAL_INCLUDES += .
GLOBAL_DEFINES += STDIO_UART=0
Expand Down
1 change: 0 additions & 1 deletion platform/mcu/xr871/aos/aos.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ $(NAME)_SOURCES := aos.c \
hal/soc/timer.c \
hal/soc/uart.c \
hal/soc/wdg.c \
hal/soc/spi.c \
hal/fota_port.c \
hal/wifi_port.c \
hal/wifi.c \
Expand Down
12 changes: 6 additions & 6 deletions platform/mcu/xr871/image-xip.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
"section" :[
{"id": "0xa5ff5a00", "bin" :"boot.bin", "cert": "null", "flash_offs": "0K", "sram_offs": "0x00067000", "ep": "0x00067101", "attr":"0x1"},
{"id": "0xa5fe5a01", "bin" :"app.bin", "cert": "null", "flash_offs": "32K", "sram_offs": "0x00010000", "ep": "0x00010101", "attr":"0x1"},
{"id": "0xa5fd5a02", "bin" :"app-xip.bin", "cert": "null", "flash_offs": "180K", "sram_offs": "0xffffffff", "ep": "0xffffffff", "attr":"0x2"},
{"id": "0xa5fc5a03", "bin" :"net.bin", "cert": "null", "flash_offs": "852K", "sram_offs": "0x60000000", "ep": "0xffffffff", "attr":"0x1"},
{"id": "0xa5fb5a04", "bin" :"net_ap.bin", "cert": "null", "flash_offs": "1133K", "sram_offs": "0x60000000", "ep": "0xffffffff", "attr":"0x1"},
{"id": "0xa5fa5a05", "bin" :"wlan_bl.bin", "cert": "null", "flash_offs": "1382K", "sram_offs": "0xffffffff", "ep": "0xffffffff", "attr":"0x1"},
{"id": "0xa5f95a06", "bin" :"wlan_fw.bin", "cert": "null", "flash_offs": "1385K", "sram_offs": "0xffffffff", "ep": "0xffffffff", "attr":"0x1"},
{"id": "0xa5f85a07", "bin" :"wlan_sdd.bin", "cert": "null", "flash_offs": "1515K", "sram_offs": "0xffffffff", "ep": "0xffffffff", "attr":"0x1"}
{"id": "0xa5fd5a02", "bin" :"app-xip.bin", "cert": "null", "flash_offs": "266K", "sram_offs": "0xffffffff", "ep": "0xffffffff", "attr":"0x2"},
{"id": "0xa5fc5a03", "bin" :"net.bin", "cert": "null", "flash_offs": "942K", "sram_offs": "0x60000000", "ep": "0xffffffff", "attr":"0x1"},
{"id": "0xa5fb5a04", "bin" :"net_ap.bin", "cert": "null", "flash_offs": "1262K", "sram_offs": "0x60000000", "ep": "0xffffffff", "attr":"0x1"},
{"id": "0xa5fa5a05", "bin" :"wlan_bl.bin", "cert": "null", "flash_offs": "1542K", "sram_offs": "0xffffffff", "ep": "0xffffffff", "attr":"0x1"},
{"id": "0xa5f95a06", "bin" :"wlan_fw.bin", "cert": "null", "flash_offs": "1545K", "sram_offs": "0xffffffff", "ep": "0xffffffff", "attr":"0x1"},
{"id": "0xa5f85a07", "bin" :"wlan_sdd.bin", "cert": "null", "flash_offs": "1685K", "sram_offs": "0xffffffff", "ep": "0xffffffff", "attr":"0x1"}
]
}
50 changes: 25 additions & 25 deletions platform/mcu/xr871/include/driver/chip/sdmmc/card.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,33 +84,32 @@ struct sd_scr {

struct sd_switch_caps {
uint32_t hs_max_dtr;
uint32_t uhs_max_dtr;
#define HIGH_SPEED_MAX_DTR 50000000
#define UHS_SDR104_MAX_DTR 208000000
#define UHS_SDR50_MAX_DTR 100000000
#define UHS_DDR50_MAX_DTR 50000000
#define UHS_SDR25_MAX_DTR UHS_DDR50_MAX_DTR
#define UHS_SDR12_MAX_DTR 25000000
uint32_t sd3_bus_mode;
uint32_t uhs_max_dtr;
#define UHS_SDR12_BUS_SPEED 0
#define HIGH_SPEED_BUS_SPEED 1
#define UHS_SDR25_BUS_SPEED 1
#define UHS_SDR50_BUS_SPEED 2
#define UHS_SDR104_BUS_SPEED 3
#define UHS_DDR50_BUS_SPEED 4

#define SD_MODE_HIGH_SPEED (1 << HIGH_SPEED_BUS_SPEED)
#define SD_MODE_UHS_SDR12 (1 << UHS_SDR12_BUS_SPEED)
#define SD_MODE_UHS_SDR25 (1 << UHS_SDR25_BUS_SPEED)
#define SD_MODE_UHS_SDR50 (1 << UHS_SDR50_BUS_SPEED)
#define SD_MODE_UHS_SDR104 (1 << UHS_SDR104_BUS_SPEED)
#define SD_MODE_UHS_DDR50 (1 << UHS_DDR50_BUS_SPEED)
uint32_t sd3_drv_type;
uint32_t sd3_bus_mode;

#define SD_DRIVER_TYPE_B 0x01
#define SD_DRIVER_TYPE_A 0x02
#define SD_DRIVER_TYPE_C 0x04
#define SD_DRIVER_TYPE_D 0x08
uint32_t sd3_curr_limit;
uint32_t sd3_drv_type;
#define SD_SET_CURRENT_LIMIT_200 0
#define SD_SET_CURRENT_LIMIT_400 1
#define SD_SET_CURRENT_LIMIT_600 2
Expand All @@ -120,6 +119,7 @@ struct sd_switch_caps {
#define SD_MAX_CURRENT_400 (1 << SD_SET_CURRENT_LIMIT_400)
#define SD_MAX_CURRENT_600 (1 << SD_SET_CURRENT_LIMIT_600)
#define SD_MAX_CURRENT_800 (1 << SD_SET_CURRENT_LIMIT_800)
uint32_t sd3_curr_limit;
};

struct mmc_ext_csd {
Expand All @@ -142,27 +142,27 @@ struct mmc_card {
struct mmc_csd csd;
struct sd_scr scr;
struct mmc_ext_csd extcsd;
struct sd_switch_caps sw_caps; /* switch (CMD6) caps */
struct sd_switch_caps sw_caps;
/* card information */
uint32_t type; /* card type */
#define MMC_TYPE_MMC 0 /* MMC card */
#define MMC_TYPE_SD 1 /* SD card */
#define MMC_TYPE_SDIO 2 /* SDIO card */
#define MMC_TYPE_SD_COMBO 3 /* SD combo (IO+mem) card */

uint32_t sd_bus_speed; /* Bus Speed Mode set for the card */
uint32_t state; /* (our) card state */
#define MMC_STATE_PRESENT (1 << 0) /* present */
#define MMC_STATE_READONLY (1 << 1) /* card is read-only */
#define MMC_STATE_HIGHSPEED (1 << 2) /* card is in high speed mode */
#define MMC_STATE_BLOCKADDR (1 << 3) /* card uses block-addressing */
#define MMC_STATE_HIGHSPEED_DDR (1 << 4) /* card is in high speed mode */

#define MMC_STATE_ULTRAHIGHSPEED (1<<5) /* card is in ultra high speed mode */
#define MMC_CARD_SDXC (1<<6) /* card is SDXC */
#define MMC_CARD_REMOVED (1<<7) /* card has been removed */
#define MMC_STATE_HIGHSPEED_200 (1<<8) /* card is in HS200 mode */
#define MMC_STATE_SLEEP (1<<9) /* card is in sleep state */
#define MMC_TYPE_MMC 0
#define MMC_TYPE_SD 1
#define MMC_TYPE_SDIO 2
#define MMC_TYPE_SD_COMBO 3
uint32_t type;

uint32_t sd_bus_speed;
#define MMC_STATE_PRESENT (1 << 0)
#define MMC_STATE_READONLY (1 << 1)
#define MMC_STATE_HIGHSPEED (1 << 2)
#define MMC_STATE_BLOCKADDR (1 << 3)
#define MMC_STATE_HIGHSPEED_DDR (1 << 4)
#define MMC_STATE_ULTRAHIGHSPEED (1<<5)
#define MMC_CARD_SDXC (1<<6)
#define MMC_CARD_REMOVED (1<<7)
#define MMC_STATE_HIGHSPEED_200 (1<<8)
#define MMC_STATE_SLEEP (1<<9)

uint32_t state;

uint8_t bus_width;
uint8_t speed_class;
Expand Down
Loading

0 comments on commit d1788bf

Please sign in to comment.