C語言中struct陣列亂序賦值
阿新 • • 發佈:2019-02-19
static struct resource s3c_wdt_resource[] = { [0] = { .start = S3C24XX_PA_WATCHDOG, .end = S3C24XX_PA_WATCHDOG + S3C24XX_SZ_WATCHDOG - 1, .flags = IORESOURCE_MEM, }, [1] = { .start = IRQ_WDT, .end = IRQ_WDT, .flags = IORESOURCE_IRQ, } }; static struct resource s3c_wdt_resource[] = { [0] = { .start = S3C24XX_PA_WATCHDOG, .end = S3C24XX_PA_WATCHDOG + S3C24XX_SZ_WATCHDOG - 1, .flags = IORESOURCE_MEM, }, [1] = { .start = IRQ_WDT, .end = IRQ_WDT, .flags = IORESOURCE_IRQ, } };
http://hi.baidu.com/cj248248/item/3b4ce73de41002c12f8ec228