source: rtems/bsps/arm/lpc24xx/include/bsp.h @ ba619b7f

Last change on this file since ba619b7f was ba619b7f, checked in by Joel Sherrill <joel@…>, on 03/01/22 at 21:38:20

bsps/arm/: Scripted embedded brains header file clean up

Updates #4625.

  • Property mode set to 100644
File size: 2.5 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup RTEMSBSPsARMLPC24XX
5 *
6 * @brief Global BSP definitions.
7 */
8
9/*
10 * Copyright (c) 2008-2014 embedded brains GmbH.  All rights reserved.
11 *
12 * The license and distribution terms for this file may be
13 * found in the file LICENSE in this distribution or at
14 * http://www.rtems.org/license/LICENSE.
15 */
16
17#ifndef LIBBSP_ARM_LPC24XX_BSP_H
18#define LIBBSP_ARM_LPC24XX_BSP_H
19
20/**
21 * @defgroup RTEMSBSPsARMLPC24XX NXP LPC17XX, LPC23XX, LPC24XX and LPC40XX
22 *
23 * @ingroup RTEMSBSPsARM
24 *
25 * @brief NXP LPC17XX, LPC23XX, LPC24XX and LPC40XX Board Support Package.
26 *
27 * @{
28 */
29
30#include <bspopts.h>
31
32#define BSP_FEATURE_IRQ_EXTENSION
33
34#define LPC24XX_PCLK (LPC24XX_CCLK / LPC24XX_PCLKDIV)
35
36#define LPC24XX_EMCCLK (LPC24XX_CCLK / LPC24XX_EMCCLKDIV)
37
38#define LPC24XX_MPU_REGION_COUNT 8
39
40#define BSP_ARMV7M_IRQ_PRIORITY_DEFAULT (29 << 3)
41
42#define BSP_ARMV7M_SYSTICK_PRIORITY (30 << 3)
43
44#define BSP_ARMV7M_SYSTICK_FREQUENCY LPC24XX_CCLK
45
46#ifndef ASM
47
48#include <rtems.h>
49
50#include <bsp/default-initial-extension.h>
51
52#ifdef __cplusplus
53extern "C" {
54#endif /* __cplusplus */
55
56struct rtems_bsdnet_ifconfig;
57
58struct rtems_termios_device_context;
59
60/**
61 * @brief Network driver attach and detach function.
62 */
63int lpc_eth_attach_detach(
64  struct rtems_bsdnet_ifconfig *config,
65  int attaching
66);
67
68/**
69 * @brief Standard network driver attach and detach function.
70 */
71#define RTEMS_BSP_NETWORK_DRIVER_ATTACH lpc_eth_attach_detach
72
73/**
74 * @brief Standard network driver name.
75 */
76#define RTEMS_BSP_NETWORK_DRIVER_NAME "eth0"
77
78/**
79 * @brief Optimized idle task.
80 *
81 * This idle task sets the power mode to idle.  This causes the processor clock
82 * to be stopped, while on-chip peripherals remain active.  Any enabled
83 * interrupt from a peripheral or an external interrupt source will cause the
84 * processor to resume execution.
85 *
86 * To enable the idle task use the following in the system configuration:
87 *
88 * @code
89 * #include <bsp.h>
90 *
91 * #define CONFIGURE_INIT
92 *
93 * #define CONFIGURE_IDLE_TASK_BODY bsp_idle_thread
94 *
95 * #include <confdefs.h>
96 * @endcode
97 */
98void *bsp_idle_thread(uintptr_t ignored);
99
100#ifdef ARM_MULTILIB_ARCH_V4
101  #define BSP_CONSOLE_UART_BASE 0xe000c000
102#else
103  #define BSP_CONSOLE_UART_BASE 0x4000c000
104#endif
105
106void bsp_restart(void *addr);
107
108bool lpc24xx_uart_probe_1(struct rtems_termios_device_context *context);
109
110bool lpc24xx_uart_probe_2(struct rtems_termios_device_context *context);
111
112bool lpc24xx_uart_probe_3(struct rtems_termios_device_context *context);
113
114#ifdef __cplusplus
115}
116#endif /* __cplusplus */
117
118#endif /* ASM */
119
120/** @} */
121
122#endif /* LIBBSP_ARM_LPC24XX_BSP_H */
Note: See TracBrowser for help on using the repository browser.