summaryrefslogtreecommitdiff
path: root/nuttx/configs/vsn/include
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-26 01:04:10 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-26 01:04:10 +0000
commit54150a8f62d57bd3af5efce1439ba3c29e20f07f (patch)
tree4c791787398c9f76ccd9c8a56e1dd139c2a4e8e4 /nuttx/configs/vsn/include
parentc62abcf9c8c26757ac5e6fbf0fd9813f1ba087a6 (diff)
downloadpx4-nuttx-54150a8f62d57bd3af5efce1439ba3c29e20f07f.tar.gz
px4-nuttx-54150a8f62d57bd3af5efce1439ba3c29e20f07f.tar.bz2
px4-nuttx-54150a8f62d57bd3af5efce1439ba3c29e20f07f.zip
Incorporate changes from Uros Platise
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3419 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs/vsn/include')
-rw-r--r--nuttx/configs/vsn/include/board.h37
-rw-r--r--nuttx/configs/vsn/include/power.h17
2 files changed, 22 insertions, 32 deletions
diff --git a/nuttx/configs/vsn/include/board.h b/nuttx/configs/vsn/include/board.h
index f5c690f1e..733f1fc32 100644
--- a/nuttx/configs/vsn/include/board.h
+++ b/nuttx/configs/vsn/include/board.h
@@ -105,7 +105,8 @@
/* On-board external frequency source is 9MHz (HSE) provided by the CC1101, so it is
* not available on power-up. Instead we are about to run on HSI*9 = 36 MHz, see
- * up_sysclock.c for details. */
+ * up_sysclock.c for details.
+ */
#define STM32_BOARD_XTAL 9000000UL
#define STM32_BOARD_HCLK 36000000UL
@@ -114,6 +115,7 @@
* When HSI: PLL multiplier is 9, out frequency 36 MHz
* When HSE: PLL multiplier is 8: out frequency is 9 MHz x 8 = 72MHz
*/
+
#define STM32_CFGR_PLLSRC_HSI 0
#define STM32_CFGR_PLLMUL_HSI RCC_CFGR_PLLMUL_CLKx9
@@ -134,13 +136,18 @@
/* APB2 clock (PCLK2) is HCLK (36MHz) */
-#define STM32_RCC_CFGR_PPRE2 RCC_CFGR_PPRE2_HCLK
-#define STM32_PCLK2_FREQUENCY STM32_BOARD_HCLK
+#define STM32_RCC_CFGR_PPRE2 RCC_CFGR_PPRE2_HCLK
+#define STM32_PCLK2_FREQUENCY STM32_BOARD_HCLK
/* APB1 clock (PCLK1) is HCLK (36MHz) */
-#define STM32_RCC_CFGR_PPRE1 RCC_CFGR_PPRE1_HCLK
-#define STM32_PCLK1_FREQUENCY STM32_BOARD_HCLK
+#define STM32_RCC_CFGR_PPRE1 RCC_CFGR_PPRE1_HCLK
+#define STM32_PCLK1_FREQUENCY STM32_BOARD_HCLK
+
+/* Timer 1..8 Frequencies */
+
+#define STM32_TIM27_FREQUENCY (STM32_BOARD_HCLK)
+#define STM32_TIM18_FREQUENCY (STM32_BOARD_HCLK)
/* USB divider -- Divide PLL clock by 1.5 */
@@ -247,28 +254,10 @@ EXTERN uint8_t up_buttons(void);
#endif
-/************************************************************************************
- * Memories
- * - SDcard is tested to work up to 2 GB
- * - RAMTRON has size of 128 kB
- ************************************************************************************/
-
-EXTERN int up_sdcard(void);
-EXTERN int up_ramtron(void);
-
-
-/************************************************************************************
- * Public Power Supply Contol
- ************************************************************************************/
-
-void board_power_reboot(void);
-void board_power_off(void);
-
-
#undef EXTERN
#if defined(__cplusplus)
}
#endif
#endif /* __ASSEMBLY__ */
-#endif /* __ARCH_BOARD_BOARD_H */
+#endif /* __ARCH_BOARD_BOARD_H */
diff --git a/nuttx/configs/vsn/include/power.h b/nuttx/configs/vsn/include/power.h
index 960c40fb1..5be7ab795 100644
--- a/nuttx/configs/vsn/include/power.h
+++ b/nuttx/configs/vsn/include/power.h
@@ -38,11 +38,6 @@
#ifndef __ARCH_BOARD_POWER_H
#define __ARCH_BOARD_POWER_H
-
-/************************************************************************************
- * Included Files
- ************************************************************************************/
-
#ifndef __ASSEMBLY__
#undef EXTERN
#if defined(__cplusplus)
@@ -53,15 +48,21 @@ extern "C" {
#endif
/************************************************************************************
- * Public Power Supply Contol
+ * Public Functions
************************************************************************************/
+/** Perform system reset on board level
+ */
void board_power_reboot(void);
-/* If this function returns, it means, that it was not possible to power-off the board */
+/** Power off the board
+ *
+ * If it returns, then it was not possible to power-off the board due to some
+ * other constraints. In the case of VSN due to external power supply, press
+ * of a push-button or RTC alarm.
+ */
void board_power_off(void);
-
#undef EXTERN
#if defined(__cplusplus)
}