1 |
595 |
jeremybenn |
/**************************************************************************//**
|
2 |
|
|
* @file
|
3 |
|
|
* @brief Board Control register definitions
|
4 |
|
|
* @author Energy Micro AS
|
5 |
|
|
* @version 1.0.1
|
6 |
|
|
******************************************************************************
|
7 |
|
|
* @section License
|
8 |
|
|
* <b>(C) Copyright 2009 Energy Micro AS, http://www.energymicro.com</b>
|
9 |
|
|
******************************************************************************
|
10 |
|
|
*
|
11 |
|
|
* This source code is the property of Energy Micro AS. The source and compiled
|
12 |
|
|
* code may only be used on Energy Micro "EFM32" microcontrollers.
|
13 |
|
|
*
|
14 |
|
|
* This copyright notice may not be removed from the source code nor changed.
|
15 |
|
|
*
|
16 |
|
|
* DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Energy Micro AS has no
|
17 |
|
|
* obligation to support this Software. Energy Micro AS is providing the
|
18 |
|
|
* Software "AS IS", with no express or implied warranties of any kind,
|
19 |
|
|
* including, but not limited to, any implied warranties of merchantability
|
20 |
|
|
* or fitness for any particular purpose or warranties against infringement
|
21 |
|
|
* of any proprietary rights of a third party.
|
22 |
|
|
*
|
23 |
|
|
* Energy Micro AS will not be liable for any consequential, incidental, or
|
24 |
|
|
* special damages, or any other relief, or for any claim by any third party,
|
25 |
|
|
* arising from your use of this Software.
|
26 |
|
|
*
|
27 |
|
|
*****************************************************************************/
|
28 |
|
|
|
29 |
|
|
#ifndef __DVK_BCREGISTERS_H
|
30 |
|
|
#define __DVK_BCREGISTERS_H
|
31 |
|
|
|
32 |
|
|
#include <stdint.h>
|
33 |
|
|
|
34 |
|
|
/**************************************************************************//**
|
35 |
|
|
* Defines FPGA register bank for Energy Micro Development Kit (DVK) board,
|
36 |
|
|
* i.e. board control registers
|
37 |
|
|
*****************************************************************************/
|
38 |
|
|
#define BC_REGISTER_BASE 0x8c000000
|
39 |
|
|
|
40 |
|
|
#define BC_CFG ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x00))
|
41 |
|
|
#define BC_EM ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x01))
|
42 |
|
|
#define BC_MAGIC ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x02))
|
43 |
|
|
#define BC_LED ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x03))
|
44 |
|
|
#define BC_PUSHBUTTON ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x04))
|
45 |
|
|
#define BC_DIPSWITCH ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x05))
|
46 |
|
|
#define BC_JOYSTICK ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x06))
|
47 |
|
|
#define BC_AEM ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x07))
|
48 |
|
|
#define BC_DISPLAY_CTRL ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x08))
|
49 |
|
|
#define BC_EBI_CFG ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x09))
|
50 |
|
|
#define BC_BUS_CFG ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x0a))
|
51 |
|
|
#define BC_PERCTRL ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x0c))
|
52 |
|
|
#define BC_AEMSTATE ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x0d))
|
53 |
|
|
#define BC_SPI_CFG ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x0e))
|
54 |
|
|
#define BC_RESET ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x0f))
|
55 |
|
|
#define BC_ADC_START ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x10))
|
56 |
|
|
#define BC_ADC_STATUS ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x11))
|
57 |
|
|
#define BC_ADC_DATA ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x12))
|
58 |
|
|
#define BC_HW_VERSION ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x14))
|
59 |
|
|
#define BC_FW_BUILDNO ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x15))
|
60 |
|
|
#define BC_FW_VERSION ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x16))
|
61 |
|
|
#define BC_SCRATCH_COMMON ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x17))
|
62 |
|
|
#define BC_SCRATCH_EFM0 ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x18))
|
63 |
|
|
#define BC_SCRATCH_EFM1 ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x19))
|
64 |
|
|
#define BC_SCRATCH_EFM2 ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x1A))
|
65 |
|
|
#define BC_SCRATCH_EFM3 ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x1B))
|
66 |
|
|
#define BC_SCRATCH_BC0 ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x1C))
|
67 |
|
|
#define BC_SCRATCH_BC1 ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x1D))
|
68 |
|
|
#define BC_SCRATCH_BC2 ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x1E))
|
69 |
|
|
#define BC_SCRATCH_BC3 ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x1f))
|
70 |
|
|
#define BC_INTFLAG ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x20))
|
71 |
|
|
#define BC_INTEN ((volatile uint16_t *)(BC_REGISTER_BASE + sizeof(uint16_t) * 0x21))
|
72 |
|
|
|
73 |
|
|
/**************************************************************************//**
|
74 |
|
|
* Defines bit fields for board control registers
|
75 |
|
|
*****************************************************************************/
|
76 |
|
|
#define BC_PERCTRL_ACCEL (1 << 0)
|
77 |
|
|
#define BC_PERCTRL_AMBIENT (1 << 1)
|
78 |
|
|
#define BC_PERCTRL_POTMETER (1 << 2)
|
79 |
|
|
#define BC_PERCTRL_RS232A (1 << 3)
|
80 |
|
|
#define BC_PERCTRL_RS232B (1 << 4)
|
81 |
|
|
#define BC_PERCTRL_SPI (1 << 5)
|
82 |
|
|
#define BC_PERCTRL_I2C (1 << 6)
|
83 |
|
|
#define BC_PERCTRL_IRDA (1 << 7)
|
84 |
|
|
#define BC_PERCTRL_ANALOG_SE (1 << 8)
|
85 |
|
|
#define BC_PERCTRL_ANALOG_DIFF (1 << 9)
|
86 |
|
|
#define BC_PERCTRL_AUDIO_OUT (1 << 10)
|
87 |
|
|
#define BC_PERCTRL_AUDIO_IN (1 << 11)
|
88 |
|
|
#define BC_PERCTRL_ACCEL_GSEL (1 << 12)
|
89 |
|
|
#define BC_PERCTRL_ACCEL_SELFTEST (1 << 13)
|
90 |
|
|
#define BC_PERCTRL_RS232_SHUTDOWN (1 << 14)
|
91 |
|
|
#define BC_PERCTRL_IRDA_SHUTDOWN (1 << 15)
|
92 |
|
|
|
93 |
|
|
#define BC_INTEN_PB (1 << 0)
|
94 |
|
|
#define BC_INTEN_DIP (1 << 1)
|
95 |
|
|
#define BC_INTEN_JOYSTICK (1 << 2)
|
96 |
|
|
#define BC_INTEN_AEM (1 << 3)
|
97 |
|
|
|
98 |
|
|
#define BC_CFG_SPI (0)
|
99 |
|
|
#define BC_CFG_EBI (1)
|
100 |
|
|
|
101 |
|
|
#define BC_MAGIC_VALUE (0xef32)
|
102 |
|
|
|
103 |
|
|
#endif
|