source: rtems/bsps/arm/lpc32xx/start/bspstart.c @ 65f868c

5
Last change on this file since 65f868c was 65f868c, checked in by Sebastian Huber <sebastian.huber@…>, on 05/23/18 at 12:17:25

Add _CPU_Counter_frequency()

Add rtems_counter_frequency() API function. Use it to initialize the
counter value converter via the new system initialization step
(RTEMS_SYSINIT_CPU_COUNTER). This decouples the counter implementation
and the counter converter. It avoids an unnecessary pull in of the
64-bit integer division from libgcc.

Update #3456.

  • Property mode set to 100644
File size: 724 bytes
Line 
1/**
2 * @file
3 *
4 * @ingroup arm_lpc32xx
5 *
6 * @brief Startup code.
7 */
8
9/*
10 * Copyright (c) 2009-2014 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.org/license/LICENSE.
21 */
22
23#include <rtems/counter.h>
24
25#include <bsp.h>
26#include <bsp/bootcard.h>
27#include <bsp/irq-generic.h>
28
29uint32_t _CPU_Counter_frequency(void)
30{
31  return LPC32XX_PERIPH_CLK;
32}
33
34CPU_Counter_ticks _CPU_Counter_read(void)
35{
36  return lpc32xx_timer();
37}
38
39void bsp_start(void)
40{
41  bsp_interrupt_initialize();
42}
Note: See TracBrowser for help on using the repository browser.