2 ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010 Giovanni Di Sirio.
4 This file is part of ChibiOS/RT.
6 ChibiOS/RT is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
11 ChibiOS/RT is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
21 A special exception to the GPL can be applied should you wish to distribute
22 a combined work that includes ChibiOS/RT, without being obliged to provide
23 the source code for any proprietary components. See the file exception.txt
24 for full details of how and when the exception can be applied.
32 * Setup for the STBee Mini board.
38 #define BOARD_STBEE_MINI
39 #define BOARD_NAME "STBee Mini"
40 #define CPU_WITH_NO_GPIOE 1
45 #define STM32_LSECLK 32768
46 #define STM32_HSECLK 12000000
49 * MCU type, this macro is used by both the ST library and the ChibiOS/RT
55 * IO pins assignments.
58 #define GPIOA_USB_ENABLE 14
61 #define GPIOC_BUTTON 13
64 * I/O ports initial setup, this configuration is established soon after reset
65 * in the initialization code.
67 * The digits have the following meaning:
69 * 1 - Push Pull output 10MHz.
70 * 2 - Push Pull output 2MHz.
71 * 3 - Push Pull output 50MHz.
73 * 5 - Open Drain output 10MHz.
74 * 6 - Open Drain output 2MHz.
75 * 7 - Open Drain output 50MHz.
76 * 8 - Digital input with PullUp or PullDown resistor depending on ODR.
77 * 9 - Alternate Push Pull output 10MHz.
78 * A - Alternate Push Pull output 2MHz.
79 * B - Alternate Push Pull output 50MHz.
81 * D - Alternate Open Drain output 10MHz.
82 * E - Alternate Open Drain output 2MHz.
83 * F - Alternate Open Drain output 50MHz.
84 * Please refer to the STM32 Reference Manual for details.
89 * PA11 - input with pull-up (USBDM)
90 * PA12 - input with pull-up (USBDP)
91 * Everything input with pull-up except:
92 * PA13 - Open Drain output (LED1 0:ON 1:OFF)
93 * PA14 - Push pull output (USB ENABLE 0:DISABLE 1:ENABLE)
94 * PA15 - Open Drain output (LED2 0:ON 1:OFF)
96 #define VAL_GPIOACRL 0x88888888 /* PA7...PA0 */
97 #define VAL_GPIOACRH 0x63688888 /* PA15...PA8 */
98 #define VAL_GPIOAODR 0xFFFFFFFF
101 #if defined(PINPAD_SUPPORT)
103 #define GPIOB_BUTTON 2
104 #define GPIOB_ROT_A 3
105 #define GPIOB_ROT_B 4
107 #define GPIOB_7SEG_DP 15
108 #define GPIOB_7SEG_A 14
109 #define GPIOB_7SEG_B 13
110 #define GPIOB_7SEG_C 12
111 #define GPIOB_7SEG_D 11
112 #define GPIOB_7SEG_E 10
113 #define GPIOB_7SEG_F 9
114 #define GPIOB_7SEG_G 8
116 #define VAL_GPIOBCRL 0x88888888 /* PB7...PB0 */
117 #define VAL_GPIOBCRH 0x66666666 /* PB15...PB8 */
118 #define VAL_GPIOBODR 0xFFFFFFFF
120 /* Everything input with pull-up */
121 #define VAL_GPIOBCRL 0x88888888 /* PB7...PB0 */
122 #define VAL_GPIOBCRH 0x88888888 /* PB15...PB8 */
123 #define VAL_GPIOBODR 0xFFFFFFFF
128 * Everything input with pull-up except:
129 * PC13 - Normal input.
130 * PC14 - Normal input.
131 * PC15 - Normal input.
133 #define VAL_GPIOCCRL 0x88888888 /* PC7...PC0 */
134 #define VAL_GPIOCCRH 0x44488888 /* PC15...PC8 */
135 #define VAL_GPIOCODR 0xFFFFFFFF
139 * Everything input with pull-up except:
140 * PD0 - Normal input (XTAL).
141 * PD1 - Normal input (XTAL).
143 #define VAL_GPIODCRL 0x88888844 /* PD7...PD0 */
144 #define VAL_GPIODCRH 0x88888888 /* PD15...PD8 */
145 #define VAL_GPIODODR 0xFFFFFFFF
147 #if defined(PINPAD_SUPPORT)
148 extern void cir_ext_disable (void);
149 extern void cir_ext_enable (void);
152 #endif /* _BOARD_H_ */