@@ -33,53 +33,54 @@ struct spi_flash_config
3333};
3434
3535static const struct spi_flash_config flash_configs [] =
36- {
36+ {
3737#ifdef BSP_USING_SPI0
38- {
39- .bus_name = "spi0" ,
40- .device_name = "spi00" ,
41- .flash_name = "gd25q_spi0" ,
42- .cs_pin = GET_PIN (A , 4 ),
43- },
38+ {
39+ .bus_name = "spi0" ,
40+ .device_name = "spi00" ,
41+ .flash_name = "gd25q_spi0" ,
42+ .cs_pin = GET_PIN (A , 4 ),
43+ },
4444#endif
4545
4646#ifdef BSP_USING_SPI1
47- {
48- .bus_name = "spi1" ,
49- .device_name = "spi10" ,
50- .flash_name = "gd25q_spi1" ,
51- .cs_pin = GET_PIN (B , 9 ),
52- },
47+ {
48+ .bus_name = "spi1" ,
49+ .device_name = "spi10" ,
50+ .flash_name = "gd25q_spi1" ,
51+ .cs_pin = GET_PIN (B , 9 ),
52+ },
5353#endif
5454
5555#ifdef BSP_USING_SPI2
56- {
57- .bus_name = "spi2" ,
58- .device_name = "spi20" ,
59- .flash_name = "gd25q_spi2" ,
60- .cs_pin = GET_PIN (B , 12 ),
61- },
56+ {
57+ .bus_name = "spi2" ,
58+ .device_name = "spi20" ,
59+ .flash_name = "gd25q_spi2" ,
60+ .cs_pin = GET_PIN (B , 12 ),
61+ },
6262#endif
6363
6464#ifdef BSP_USING_SPI3
65- {
66- .bus_name = "spi3" ,
67- .device_name = "spi30" ,
68- .flash_name = "gd25q_spi3" ,
69- .cs_pin = GET_PIN (E , 4 ),
70- },
65+ {
66+ .bus_name = "spi3" ,
67+ .device_name = "spi30" ,
68+ .flash_name = "gd25q_spi3" ,
69+ .cs_pin = GET_PIN (E , 4 ),
70+ },
7171#endif
7272
7373#ifdef BSP_USING_SPI4
74- {
75- .bus_name = "spi4" ,
76- .device_name = "spi40" ,
77- .flash_name = "gd25qsp " ,
78- .cs_pin = GET_PIN (F , 6 ),
79- },
74+ {
75+ .bus_name = "spi4" ,
76+ .device_name = "spi40" ,
77+ .flash_name = "gd25q_spi4 " ,
78+ .cs_pin = GET_PIN (F , 6 ),
79+ },
8080#endif
8181};
8282
83+
8384static int spi_flash_init (void )
8485{
8586 int result = RT_EOK ;
0 commit comments