Mercurial > ~darius > hgwebdir.cgi > stm32temp
comparison sd.c @ 54:79c7892d07b3
Fix comment style.
author | Daniel O'Connor <darius@dons.net.au> |
---|---|
date | Sun, 07 Apr 2013 22:33:16 +0930 |
parents | d7207a9d3c3b |
children | b21db2b47a27 |
comparison
equal
deleted
inserted
replaced
53:6ad0603ea909 | 54:79c7892d07b3 |
---|---|
327 | 327 |
328 void | 328 void |
329 SD_LowLevel_Init(void) { | 329 SD_LowLevel_Init(void) { |
330 GPIO_InitTypeDef GPIO_InitStructure; | 330 GPIO_InitTypeDef GPIO_InitStructure; |
331 | 331 |
332 /*!< GPIOC and GPIOD Periph clock enable */ | 332 /* GPIOC and GPIOD Periph clock enable */ |
333 RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC | RCC_APB2Periph_GPIOD, ENABLE); | 333 RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC | RCC_APB2Periph_GPIOD, ENABLE); |
334 | 334 |
335 /*!< Configure PC.08, PC.09, PC.10, PC.11, PC.12 pin: D0, D1, D2, D3, CLK pin */ | 335 /* Configure PC.08, PC.09, PC.10, PC.11, PC.12 pin: D0, D1, D2, D3, CLK pin */ |
336 GPIO_InitStructure.GPIO_Pin = GPIO_Pin_8 | GPIO_Pin_9 | GPIO_Pin_10 | GPIO_Pin_11 | GPIO_Pin_12; | 336 GPIO_InitStructure.GPIO_Pin = GPIO_Pin_8 | GPIO_Pin_9 | GPIO_Pin_10 | GPIO_Pin_11 | GPIO_Pin_12; |
337 GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; | 337 GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; |
338 GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP; | 338 GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP; |
339 GPIO_Init(GPIOC, &GPIO_InitStructure); | 339 GPIO_Init(GPIOC, &GPIO_InitStructure); |
340 | 340 |
341 /*!< Configure PD.02 CMD line */ | 341 /* Configure PD.02 CMD line */ |
342 GPIO_InitStructure.GPIO_Pin = GPIO_Pin_2; | 342 GPIO_InitStructure.GPIO_Pin = GPIO_Pin_2; |
343 GPIO_Init(GPIOD, &GPIO_InitStructure); | 343 GPIO_Init(GPIOD, &GPIO_InitStructure); |
344 | 344 |
345 #ifdef SD_HAVE_DETECT | 345 #ifdef SD_HAVE_DETECT |
346 RCC_APB2PeriphClockCmd(SD_DETECT_GPIO_CLK, ENABLE); | 346 RCC_APB2PeriphClockCmd(SD_DETECT_GPIO_CLK, ENABLE); |
347 | 347 |
348 /*!< Configure SD_SPI_DETECT_PIN pin: SD Card detect pin */ | 348 /* Configure SD_SPI_DETECT_PIN pin: SD Card detect pin */ |
349 GPIO_InitStructure.GPIO_Pin = SD_DETECT_PIN; | 349 GPIO_InitStructure.GPIO_Pin = SD_DETECT_PIN; |
350 GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU; | 350 GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU; |
351 GPIO_Init(SD_DETECT_GPIO_PORT, &GPIO_InitStructure); | 351 GPIO_Init(SD_DETECT_GPIO_PORT, &GPIO_InitStructure); |
352 #endif | 352 #endif |
353 | 353 |
354 /*!< Enable the SDIO AHB Clock */ | 354 /* Enable the SDIO AHB Clock */ |
355 RCC_AHBPeriphClockCmd(RCC_AHBPeriph_SDIO, ENABLE); | 355 RCC_AHBPeriphClockCmd(RCC_AHBPeriph_SDIO, ENABLE); |
356 | 356 |
357 #ifdef SD_DMA_MODE | 357 #ifdef SD_DMA_MODE |
358 /*!< Enable the DMA2 Clock */ | 358 /* Enable the DMA2 Clock */ |
359 RCC_AHBPeriphClockCmd(RCC_AHBPeriph_DMA2, ENABLE); | 359 RCC_AHBPeriphClockCmd(RCC_AHBPeriph_DMA2, ENABLE); |
360 #endif | 360 #endif |
361 } | 361 } |
362 | 362 |
363 void | 363 void |