summaryrefslogtreecommitdiff
path: root/nuttx/configs/stm3210e-eval
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-12-03 17:24:42 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-12-03 17:24:42 +0000
commita3b5fe36549ce9aea15ed0cc84f479207efb27f6 (patch)
treefcc3088c4f75b922e459c340f524b781d4b729c2 /nuttx/configs/stm3210e-eval
parent4c194976e7e58913101fab5dd8318c060bdc5b2f (diff)
downloadpx4-nuttx-a3b5fe36549ce9aea15ed0cc84f479207efb27f6.tar.gz
px4-nuttx-a3b5fe36549ce9aea15ed0cc84f479207efb27f6.tar.bz2
px4-nuttx-a3b5fe36549ce9aea15ed0cc84f479207efb27f6.zip
Add framework to support HC12
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2301 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs/stm3210e-eval')
-rwxr-xr-xnuttx/configs/stm3210e-eval/src/stm3210e-internal.h212
1 files changed, 107 insertions, 105 deletions
diff --git a/nuttx/configs/stm3210e-eval/src/stm3210e-internal.h b/nuttx/configs/stm3210e-eval/src/stm3210e-internal.h
index 64101af73..867318043 100755
--- a/nuttx/configs/stm3210e-eval/src/stm3210e-internal.h
+++ b/nuttx/configs/stm3210e-eval/src/stm3210e-internal.h
@@ -65,52 +65,52 @@
/* LEDs */
-#define GPIO_LED1 (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\
+#define GPIO_LED1 (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\
GPIO_OUTPUT_CLEAR|GPIO_PORTF|GPIO_PIN6)
-#define GPIO_LED2 (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\
+#define GPIO_LED2 (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\
GPIO_OUTPUT_CLEAR|GPIO_PORTF|GPIO_PIN7)
-#define GPIO_LED3 (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\
+#define GPIO_LED3 (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\
GPIO_OUTPUT_CLEAR|GPIO_PORTF|GPIO_PIN8)
-#define GPIO_LED4 (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\
- GPIO_OUTPUT_CLEAR|GPIO_PORTF|GPIO_PIN9)
-
-/* BUTTONS -- NOTE that some have EXTI interrupts configured */
-
-#define GPIO_BTN_WAKEUP (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|\
- GPIO_PORTA|GPIO_PIN0)
-#define GPIO_BTN_TAMPER (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|\
- GPIO_PORTA|GPIO_PIN0)
-#define GPIO_BTN_KEY (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|\
- GPIO_EXTI|GPIO_PORTG|GPIO_PIN8)
-#define GPIO_JOY_KEY (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|\
- GPIO_EXTI|GPIO_PORTG|GPIO_PIN7)
-#define GPIO_JOY_DOWN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|\
- GPIO_EXTI|GPIO_PORTD|GPIO_PIN3)
-#define GPIO_JOY_LEFT (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|\
- GPIO_EXTI|GPIO_PORTG|GPIO_PIN14)
-#define GPIO_JOY_RIGHT (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|\
- GPIO_EXTI|GPIO_PORTG|GPIO_PIN13)
-#define GPIO_JOY_UP (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|\
- GPIO_EXTI|GPIO_PORTG|GPIO_PIN15)
+#define GPIO_LED4 (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\
+ GPIO_OUTPUT_CLEAR|GPIO_PORTF|GPIO_PIN9)
+
+/* BUTTONS -- NOTE that some have EXTI interrupts configured */
+
+#define GPIO_BTN_WAKEUP (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|\
+ GPIO_PORTA|GPIO_PIN0)
+#define GPIO_BTN_TAMPER (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|\
+ GPIO_PORTA|GPIO_PIN0)
+#define GPIO_BTN_KEY (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|\
+ GPIO_EXTI|GPIO_PORTG|GPIO_PIN8)
+#define GPIO_JOY_KEY (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|\
+ GPIO_EXTI|GPIO_PORTG|GPIO_PIN7)
+#define GPIO_JOY_DOWN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|\
+ GPIO_EXTI|GPIO_PORTD|GPIO_PIN3)
+#define GPIO_JOY_LEFT (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|\
+ GPIO_EXTI|GPIO_PORTG|GPIO_PIN14)
+#define GPIO_JOY_RIGHT (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|\
+ GPIO_EXTI|GPIO_PORTG|GPIO_PIN13)
+#define GPIO_JOY_UP (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|\
+ GPIO_EXTI|GPIO_PORTG|GPIO_PIN15)
/* SPI FLASH chip select: PA.4 */
-#define GPIO_FLASH_CS (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\
- GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN2)
-
-/* USB Soft Connect Pullup: PB.14 */
-
-#define GPIO_USB_PULLUP (GPIO_OUTPUT|GPIO_CNF_OUTOD|GPIO_MODE_50MHz|\
- GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN14)
-
+#define GPIO_FLASH_CS (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\
+ GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN2)
+
+/* USB Soft Connect Pullup: PB.14 */
+
+#define GPIO_USB_PULLUP (GPIO_OUTPUT|GPIO_CNF_OUTOD|GPIO_MODE_50MHz|\
+ GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN14)
+
/************************************************************************************
* Public Types
- ************************************************************************************/
-
-/* GPIO settings that will be altered when external memory is selected */
-
-struct extmem_save_s
-{
+ ************************************************************************************/
+
+/* GPIO settings that will be altered when external memory is selected */
+
+struct extmem_save_s
+{
uint32 gpiod_crl;
uint32 gpiod_crh;
uint32 gpioe_crl;
@@ -118,22 +118,24 @@ struct extmem_save_s
uint32 gpiof_crl;
uint32 gpiof_crh;
uint32 gpiog_crl;
- uint32 gpiog_crh;
+ uint32 gpiog_crh;
};
-
+
/************************************************************************************
* Public data
************************************************************************************/
#ifndef __ASSEMBLY__
-/* GPIO configurations common to SRAM and NOR Flash */
-
-#define NCOMMON_CONFIG 37
-extern const uint16 g_commonconfig[NCOMMON_CONFIG];
-
+/* GPIO configurations common to SRAM and NOR Flash */
+
+#define NCOMMON_CONFIG 37
+extern const uint16 g_commonconfig[NCOMMON_CONFIG];
+
/************************************************************************************
- * Public Functions ************************************************************************************/
+ * Public Functions
+ ************************************************************************************/
+
/************************************************************************************
* Name: stm32_spiinitialize
*
@@ -154,57 +156,57 @@ extern void weak_function stm32_spiinitialize(void);
extern void weak_function stm32_usbinitialize(void);
-/************************************************************************************
- * Name: stm32_extcontextsave
- *
- * Description:
- * Save current GPIOs that will used by external memory configurations
- *
- ************************************************************************************/
-
-#ifdef CONFIG_STM32_FSMC
-extern void stm32_extcontextsave(struct extmem_save_s *save);
-
-/************************************************************************************
- * Name: stm32_extcontextrestore
- *
- * Description:
- * Restore GPIOs that were used by external memory configurations
- *
- ************************************************************************************/
-
-extern void stm32_extcontextrestore(struct extmem_save_s *restore);
-
-/************************************************************************************
- * Name: stm32_extmemgpios
- *
- * Description:
- * Initialize GPIOs for NOR or SRAM
- *
- ************************************************************************************/
-
-extern void stm32_extmemgpios(const uint16 *gpios, int ngpios);
-
-/************************************************************************************
- * Name: stm32_enablefsmc
- *
- * Description:
- * enable clocking to the FSMC module
- *
- ************************************************************************************/
-
-extern void stm32_enablefsmc(void);
-
-/************************************************************************************
- * Name: stm32_disablefsmc
- *
- * Description:
- * enable clocking to the FSMC module
- *
- ************************************************************************************/
-
-extern void stm32_disablefsmc(void);
-
+/************************************************************************************
+ * Name: stm32_extcontextsave
+ *
+ * Description:
+ * Save current GPIOs that will used by external memory configurations
+ *
+ ************************************************************************************/
+
+#ifdef CONFIG_STM32_FSMC
+extern void stm32_extcontextsave(struct extmem_save_s *save);
+
+/************************************************************************************
+ * Name: stm32_extcontextrestore
+ *
+ * Description:
+ * Restore GPIOs that were used by external memory configurations
+ *
+ ************************************************************************************/
+
+extern void stm32_extcontextrestore(struct extmem_save_s *restore);
+
+/************************************************************************************
+ * Name: stm32_extmemgpios
+ *
+ * Description:
+ * Initialize GPIOs for NOR or SRAM
+ *
+ ************************************************************************************/
+
+extern void stm32_extmemgpios(const uint16 *gpios, int ngpios);
+
+/************************************************************************************
+ * Name: stm32_enablefsmc
+ *
+ * Description:
+ * enable clocking to the FSMC module
+ *
+ ************************************************************************************/
+
+extern void stm32_enablefsmc(void);
+
+/************************************************************************************
+ * Name: stm32_disablefsmc
+ *
+ * Description:
+ * enable clocking to the FSMC module
+ *
+ ************************************************************************************/
+
+extern void stm32_disablefsmc(void);
+
/************************************************************************************
* Name: stm32_selectnor
*
@@ -212,9 +214,9 @@ extern void stm32_disablefsmc(void);
* Initialize to access NOR flash
*
************************************************************************************/
-
+
extern void stm32_selectnor(void);
-
+
/************************************************************************************
* Name: stm32_deselectnor
*
@@ -222,9 +224,9 @@ extern void stm32_selectnor(void);
* Disable NOR FLASH
*
************************************************************************************/
-
+
extern void stm32_deselectnor(void);
-
+
/************************************************************************************
* Name: stm32_selectsram
*
@@ -232,7 +234,7 @@ extern void stm32_deselectnor(void);
* Initialize to access external SRAM
*
************************************************************************************/
-
+
extern void stm32_selectsram(void);
/************************************************************************************
* Name: stm32_deselectsram
@@ -241,10 +243,10 @@ extern void stm32_selectsram(void);
* Disable external SRAM
*
************************************************************************************/
-
+
extern void stm32_deselectsram(void);
-#endif /* CONFIG_STM32_FSMC */
-
+#endif /* CONFIG_STM32_FSMC */
+
#endif /* __ASSEMBLY__ */
#endif /* __CONFIGS_STM3210E_EVAL_SRC_STM3210E_INTERNAL_H */