2015-10-03 15:41:15 +02:00
|
|
|
/****************************************************************************
|
2019-08-19 17:16:08 +02:00
|
|
|
* boards/arm/stm32/olimex-stm32-h405/src/olimex-stm32-h405.h
|
2014-06-03 18:34:36 +02:00
|
|
|
*
|
2021-03-31 11:59:38 +02:00
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed with
|
|
|
|
* this work for additional information regarding copyright ownership. The
|
|
|
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
|
|
* "License"); you may not use this file except in compliance with the
|
|
|
|
* License. You may obtain a copy of the License at
|
2014-06-03 18:34:36 +02:00
|
|
|
*
|
2021-03-31 11:59:38 +02:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2014-06-03 18:34:36 +02:00
|
|
|
*
|
2021-03-31 11:59:38 +02:00
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
* License for the specific language governing permissions and limitations
|
|
|
|
* under the License.
|
2014-06-03 18:34:36 +02:00
|
|
|
*
|
2015-10-03 15:41:15 +02:00
|
|
|
****************************************************************************/
|
2014-06-03 18:34:36 +02:00
|
|
|
|
2019-08-19 17:16:08 +02:00
|
|
|
#ifndef __BOARDS_ARM_STM32_OLIMEX_STM32_H405_SRC_H
|
|
|
|
#define __BOARDS_ARM_STM32_OLIMEX_STM32_H405_SRC_H
|
2014-06-03 18:34:36 +02:00
|
|
|
|
2015-10-03 15:41:15 +02:00
|
|
|
/****************************************************************************
|
2014-06-03 18:34:36 +02:00
|
|
|
* Included Files
|
2015-10-03 15:41:15 +02:00
|
|
|
****************************************************************************/
|
2014-06-03 18:34:36 +02:00
|
|
|
|
|
|
|
#include <nuttx/config.h>
|
|
|
|
#include <nuttx/compiler.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2015-10-03 15:41:15 +02:00
|
|
|
/****************************************************************************
|
2015-04-08 17:15:17 +02:00
|
|
|
* Pre-processor Definitions
|
2015-10-03 15:41:15 +02:00
|
|
|
****************************************************************************/
|
2014-06-03 18:34:36 +02:00
|
|
|
|
2021-03-18 09:57:48 +01:00
|
|
|
/* Olimex-STM32-P405 GPIOs **************************************************/
|
|
|
|
|
2014-06-03 18:34:36 +02:00
|
|
|
/* LEDs */
|
|
|
|
|
|
|
|
#define GPIO_LED_STATUS (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\
|
|
|
|
GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN12)
|
|
|
|
|
|
|
|
/* BUTTONS -- NOTE that all have EXTI interrupts configured */
|
|
|
|
|
|
|
|
#define MIN_IRQBUTTON BUTTON_BUT
|
|
|
|
#define MAX_IRQBUTTON BUTTON_BUT
|
|
|
|
#define NUM_IRQBUTTONS 1
|
|
|
|
|
|
|
|
#define GPIO_BTN_BUT (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|GPIO_PORTA|GPIO_PIN0)
|
|
|
|
|
|
|
|
/* USB OTG FS
|
|
|
|
*
|
|
|
|
* PC4 OTG_FS_VBUS VBUS sensing
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define GPIO_OTGFS_VBUS (GPIO_INPUT|GPIO_FLOAT|GPIO_PORTC|GPIO_PIN4)
|
|
|
|
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
|
2019-08-19 17:16:08 +02:00
|
|
|
/****************************************************************************
|
2021-03-18 09:57:48 +01:00
|
|
|
* Public Functions Definitions
|
2019-08-19 17:16:08 +02:00
|
|
|
****************************************************************************/
|
2014-06-03 18:34:36 +02:00
|
|
|
|
2019-08-19 17:16:08 +02:00
|
|
|
/****************************************************************************
|
2014-06-03 18:34:36 +02:00
|
|
|
* Name: stm32_usbinitialize
|
|
|
|
*
|
|
|
|
* Description:
|
2021-03-18 09:57:48 +01:00
|
|
|
* Called from stm32_usbinitialize very early in initialization to setup
|
|
|
|
* USB-related GPIO pins for the Olimex-STM32-H405 board.
|
2014-06-03 18:34:36 +02:00
|
|
|
*
|
2019-08-19 17:16:08 +02:00
|
|
|
****************************************************************************/
|
2014-06-03 18:34:36 +02:00
|
|
|
|
|
|
|
#ifdef CONFIG_STM32_OTGFS
|
|
|
|
void weak_function stm32_usbinitialize(void);
|
|
|
|
#endif
|
|
|
|
|
2019-08-19 17:16:08 +02:00
|
|
|
/****************************************************************************
|
2016-12-06 00:06:08 +01:00
|
|
|
* Name: stm32_adc_setup
|
2014-06-03 18:34:36 +02:00
|
|
|
*
|
|
|
|
* Description:
|
2016-12-06 00:06:08 +01:00
|
|
|
* Initialize ADC and register the ADC driver.
|
2014-06-03 18:34:36 +02:00
|
|
|
*
|
2019-08-19 17:16:08 +02:00
|
|
|
****************************************************************************/
|
2014-06-03 18:34:36 +02:00
|
|
|
|
|
|
|
#ifdef CONFIG_ADC
|
2016-12-06 00:06:08 +01:00
|
|
|
int stm32_adc_setup(void);
|
2014-06-03 18:34:36 +02:00
|
|
|
#endif
|
|
|
|
|
2016-12-06 15:51:37 +01:00
|
|
|
/****************************************************************************
|
|
|
|
* Name: stm32_can_setup
|
2014-06-03 18:34:36 +02:00
|
|
|
*
|
|
|
|
* Description:
|
2016-12-06 15:51:37 +01:00
|
|
|
* Initialize CAN and register the CAN device
|
2014-06-03 18:34:36 +02:00
|
|
|
*
|
2016-12-06 15:51:37 +01:00
|
|
|
****************************************************************************/
|
2014-06-03 18:34:36 +02:00
|
|
|
|
2016-12-06 15:51:37 +01:00
|
|
|
#ifdef CONFIG_CAN
|
|
|
|
int stm32_can_setup(void);
|
2014-06-03 18:34:36 +02:00
|
|
|
#endif
|
|
|
|
|
2020-01-31 19:07:39 +01:00
|
|
|
#endif /* __ASSEMBLY__ */
|
2019-08-19 17:16:08 +02:00
|
|
|
#endif /* __BOARDS_ARM_STM32_OLIMEX_STM32_H405_SRC_H */
|