source: rtems/c/src/lib/libbsp/arm/gumstix/include/bsp.h @ 46dde0fc

4.115
Last change on this file since 46dde0fc was 46dde0fc, checked in by Sebastian Huber <sebastian.huber@…>, on 10/23/14 at 08:05:17

bsps: Move extern "C" to not cover includes

Some includes may use C++ and this conflicts if surrounded extern "C".

  • Property mode set to 100644
File size: 2.1 KB
Line 
1/**
2 * @file
3 * @ingroup arm_gumstix
4 * @brief Global BSP definitions.
5 */
6
7/*
8 *  By Yang Xi <hiyangxi@gmail.com>.
9 *
10 *  The license and distribution terms for this file may be
11 *  found in the file LICENSE in this distribution or at
12 *  http://www.rtems.org/license/LICENSE.
13 */
14
15#ifndef _BSP_H
16#define _BSP_H
17
18#include <bspopts.h>
19#include <bsp/default-initial-extension.h>
20
21#include <rtems.h>
22#include <rtems/console.h>
23#include <rtems/clockdrv.h>
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29/**
30 * @defgroup arm_gumstix Gumstix Support
31 * @ingroup bsp_arm
32 * @brief Gumstix support package
33 * @{
34 */
35
36#define BSP_FEATURE_IRQ_EXTENSION
37
38#define BSP_HAS_FRAME_BUFFER 1
39
40/** @brief What is the input clock freq in hertz */
41#define BSP_MAIN_FREQ 3686400      /* 3.6864 MHz */
42#define BSP_SLCK_FREQ   32768      /* 32.768 KHz */
43
44/** @brief What is the last interrupt */
45#define BSP_MAX_INT AT91RM9200_MAX_INT
46
47/*
48 * forward reference the type to avoid conflicts between libchip serial
49 * and libchip rtc get and set register types.
50 */
51typedef struct _console_tbl console_tbl;
52console_tbl *BSP_get_uart_from_minor(int minor);
53
54static inline int32_t BSP_get_baud(void) {return 115200;}
55
56/** @brief How big should the interrupt stack be? */
57#define CONFIGURE_INTERRUPT_STACK_MEMORY  (16 * 1024)
58
59#define ST_PIMR_PIV     33      /* 33 ticks of the 32.768Khz clock ~= 1msec */
60
61#define outport_byte(port,val) *((unsigned char volatile*)(port)) = (val)
62#define inport_byte(port,val) (val) = *((unsigned char volatile*)(port))
63#define outport_word(port,val) *((unsigned short volatile*)(port)) = (val)
64#define inport_word(port,val) (val) = *((unsigned short volatile*)(port))
65
66struct rtems_bsdnet_ifconfig;
67extern int rtems_ne_driver_attach(struct rtems_bsdnet_ifconfig *, int);
68#define BSP_NE2000_NETWORK_DRIVER_NAME      "ne1"
69#define BSP_NE2000_NETWORK_DRIVER_ATTACH    rtems_ne_driver_attach
70
71#ifndef RTEMS_BSP_NETWORK_DRIVER_NAME
72#define RTEMS_BSP_NETWORK_DRIVER_NAME   BSP_NE2000_NETWORK_DRIVER_NAME
73#endif
74
75#ifndef RTEMS_BSP_NETWORK_DRIVER_ATTACH
76#define RTEMS_BSP_NETWORK_DRIVER_ATTACH BSP_NE2000_NETWORK_DRIVER_ATTACH
77#endif
78
79/** @} */
80
81#ifdef __cplusplus
82}
83#endif
84
85#endif /* _BSP_H */
86
Note: See TracBrowser for help on using the repository browser.