source: rtems/c/src/lib/libbsp/arm/lpc32xx/misc/nand-select.c @ 2d6543d4

4.115
Last change on this file since 2d6543d4 was 2d6543d4, checked in by Daniel Ramirez <javamonn@…>, on 11/30/13 at 02:18:44

doxygen: refactored doxygen in libbsp/arm/lpc32xx

This patch refactors a lot of the existing doxygen within libbsp/arm/lpc32xx.
Much of this refactoring was just renaming of existing groups to conform to a
more consistent naming structure. With the addition of a doxygen header for
tm27.h, all files within lpc32xx belong to doxygen group now. lpc32xx should
be used a reference for adding doxygen to other bsps.

  • Property mode set to 100644
File size: 1.0 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup arm_lpc32xx
5 *
6 * @brief NAND controller selection.
7 */
8
9/*
10 * Copyright (c) 2012 embedded brains GmbH.  All rights reserved.
11 *
12 *  embedded brains GmbH
13 *  Obere Lagerstr. 30
14 *  82178 Puchheim
15 *  Germany
16 *  <rtems@embedded-brains.de>
17 *
18 * The license and distribution terms for this file may be
19 * found in the file LICENSE in this distribution or at
20 * http://www.rtems.com/license/LICENSE.
21 */
22
23#include <bsp.h>
24#include <bsp/lpc32xx.h>
25#include <bsp/nand-mlc.h>
26
27void lpc32xx_select_nand_controller(lpc32xx_nand_controller nand_controller)
28{
29  uint32_t flashclk_ctrl = LPC32XX_FLASHCLK_CTRL & ~(FLASHCLK_IRQ_MLC
30    | FLASHCLK_SELECT_SLC | FLASHCLK_MLC_CLK_ENABLE | FLASHCLK_SLC_CLK_ENABLE);
31
32  switch (nand_controller) {
33    case LPC32XX_NAND_CONTROLLER_MLC:
34      flashclk_ctrl |= FLASHCLK_IRQ_MLC | FLASHCLK_MLC_CLK_ENABLE;
35      break;
36    case LPC32XX_NAND_CONTROLLER_SLC:
37      flashclk_ctrl |= FLASHCLK_SELECT_SLC | FLASHCLK_SLC_CLK_ENABLE;
38      break;
39    default:
40      break;
41  }
42
43  LPC32XX_FLASHCLK_CTRL = flashclk_ctrl;
44}
Note: See TracBrowser for help on using the repository browser.