2016-11-01 21:42:54 +01:00
|
|
|
/****************************************************************************
|
2019-08-14 14:34:18 +02:00
|
|
|
* boards/arm/lpc43xx/bambino-200e/src/bambino-200e.h
|
2016-11-01 21:42:54 +01:00
|
|
|
*
|
2021-03-19 18:16:04 +01: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
|
2016-11-01 21:42:54 +01:00
|
|
|
*
|
2021-03-19 18:16:04 +01:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2016-11-01 21:42:54 +01:00
|
|
|
*
|
2021-03-19 18:16:04 +01: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.
|
2016-11-01 21:42:54 +01:00
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2022-01-15 03:44:35 +01:00
|
|
|
#ifndef __BOARDS_ARM_LPC43X_BAMBINO_200E_SRC_BAMBINO_200E_H
|
|
|
|
#define __BOARDS_ARM_LPC43X_BAMBINO_200E_SRC_BAMBINO_200E_H
|
2016-11-01 21:42:54 +01:00
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Included Files
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#include <nuttx/config.h>
|
|
|
|
#include <nuttx/compiler.h>
|
|
|
|
|
|
|
|
#include "lpc43_pinconfig.h"
|
|
|
|
#include "lpc43_gpio.h"
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Pre-processor Definitions
|
|
|
|
****************************************************************************/
|
|
|
|
|
2017-12-22 19:30:36 +01:00
|
|
|
#define HAVE_MMCSD 1
|
|
|
|
|
2016-11-01 21:42:54 +01:00
|
|
|
/****************************************************************************
|
|
|
|
* LEDs GPIO PIN SIGNAL NAME
|
|
|
|
* -------------------------------- ------- --------------
|
|
|
|
* gpio3[7] - LED1 101 GPIO3[7]
|
|
|
|
* gpio5[5] - LED2 91 GPIO5[5]
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
/* Definitions to configure LED pins as GPIOs:
|
|
|
|
*
|
|
|
|
* - Floating
|
|
|
|
* - Normal drive
|
|
|
|
* - No buffering, glitch filtering, slew=slow
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define PINCONFIG_LED1 PINCONF_GPIO3p7
|
|
|
|
#define PINCONFIG_LED2 PINCONF_GPIO5p5
|
2018-04-09 23:36:27 +02:00
|
|
|
#define GPIO_LED1 (GPIO_MODE_OUTPUT | GPIO_VALUE_ONE | GPIO_PORT3 | \
|
|
|
|
GPIO_PIN7)
|
|
|
|
#define GPIO_LED2 (GPIO_MODE_OUTPUT | GPIO_VALUE_ONE | GPIO_PORT5 | \
|
|
|
|
GPIO_PIN5)
|
2016-11-01 21:42:54 +01:00
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Buttons GPIO
|
|
|
|
* ----------------------------
|
|
|
|
* gpio0[7] - User Button USR1
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#define BAMBINO_BUT1 (GPIO_INTBOTH | GPIO_FLOAT | GPIO_PORT0 | GPIO_PIN7)
|
|
|
|
|
|
|
|
/* Button IRQ numbers */
|
|
|
|
|
|
|
|
#define BAMBINO_BUT1_IRQ LPC43_IRQ_P0p23
|
|
|
|
|
|
|
|
#define GPIO_SSP0_SCK GPIO_SSP0_SCK_1
|
|
|
|
#define GPIO_SSP0_SSEL GPIO_SSP0_SSEL_1
|
|
|
|
#define GPIO_SSP0_MISO GPIO_SSP0_MISO_1
|
|
|
|
#define GPIO_SSP0_MOSI GPIO_SSP0_MOSI_1
|
|
|
|
|
2018-04-09 23:36:27 +02:00
|
|
|
/* Max31855 Chip Select pins */
|
|
|
|
|
|
|
|
#define PINCONFIG_MAX31855_CS1 PINCONF_GPIO0p4
|
|
|
|
#define PINCONFIG_MAX31855_CS2 PINCONF_GPIO1p8
|
|
|
|
#define GPIO_MAX31855_CS1 (GPIO_MODE_OUTPUT | GPIO_VALUE_ONE | \
|
|
|
|
GPIO_PORT0 | GPIO_PIN4)
|
|
|
|
#define GPIO_MAX31855_CS2 (GPIO_MODE_OUTPUT | GPIO_VALUE_ONE | \
|
|
|
|
GPIO_PORT1 | GPIO_PIN8)
|
|
|
|
|
2016-11-01 21:42:54 +01:00
|
|
|
/* We need to redefine USB_PWRD as GPIO to get USB Host working
|
|
|
|
* Also remember to add 2 resistors of 15K to D+ and D- pins.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef CONFIG_USBHOST
|
|
|
|
# ifdef GPIO_USB_PWRD
|
|
|
|
# undef GPIO_USB_PWRD
|
|
|
|
# define GPIO_USB_PWRD (GPIO_INPUT | GPIO_PORT1 | GPIO_PIN22)
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
2017-12-22 19:30:36 +01:00
|
|
|
/* MMC/SD support */
|
|
|
|
|
|
|
|
#ifdef CONFIG_LPC43_SDMMC
|
|
|
|
|
|
|
|
# ifndef CONFIG_MMCSD
|
|
|
|
# warning MMC/SD support requires CONFIG_MMCSD
|
|
|
|
# undef HAVE_MMCSD
|
|
|
|
# endif
|
|
|
|
|
|
|
|
# ifndef CONFIG_MMCSD_SDIO
|
|
|
|
# warning MMC/SD support requires CONFIG_MMCSD_SDIO
|
|
|
|
# undef HAVE_MMCSD
|
|
|
|
# endif
|
|
|
|
|
|
|
|
# ifdef CONFIG_DISABLE_MOUNTPOINT
|
|
|
|
# warning MMC/SD cannot be supported with CONFIG_DISABLE_MOUNTPOINT
|
|
|
|
# undef HAVE_MMCSD
|
|
|
|
# endif
|
|
|
|
|
|
|
|
# ifdef CONFIG_NSH_MMCSDMINOR
|
|
|
|
# define MMCSD_MINOR CONFIG_NSH_MMCSDMINOR
|
|
|
|
# else
|
|
|
|
# define MMCSD_MINOR 0
|
|
|
|
# endif
|
|
|
|
|
|
|
|
#else
|
|
|
|
# undef HAVE_MMCSD
|
|
|
|
#endif
|
|
|
|
|
2016-11-01 21:42:54 +01:00
|
|
|
/****************************************************************************
|
|
|
|
* Public Types
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
/****************************************************************************
|
2021-03-18 09:57:48 +01:00
|
|
|
* Public Data
|
2016-11-01 21:42:54 +01:00
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
|
|
|
|
/****************************************************************************
|
2021-03-18 09:57:48 +01:00
|
|
|
* Public Functions Definitions
|
2016-11-01 21:42:54 +01:00
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Name: lpc43_sspdev_initialize
|
|
|
|
*
|
|
|
|
* Description:
|
2018-04-09 23:36:27 +02:00
|
|
|
* Called to configure SPI chip select GPIO pins for the Bambino-200e
|
|
|
|
* board.
|
2016-11-01 21:42:54 +01:00
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
void weak_function lpc43_sspdev_initialize(void);
|
|
|
|
|
2019-08-14 14:34:18 +02:00
|
|
|
/****************************************************************************
|
2018-04-09 23:36:27 +02:00
|
|
|
* Name: lpc43_max31855initialize
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Initialize and register the MAX31855 Temperature Sensor driver.
|
|
|
|
*
|
|
|
|
* Input parameters:
|
|
|
|
* devpath - The full path to the driver to register. E.g., "/dev/temp0"
|
|
|
|
* spi - An instance of the SPI interface to use to communicate with
|
|
|
|
* MAX31855
|
|
|
|
* devid - Minor device number. E.g., 0, 1, 2, etc.
|
|
|
|
*
|
|
|
|
* Returned Value:
|
|
|
|
* Zero (OK) on success; a negated errno value on failure.
|
|
|
|
*
|
2019-08-14 14:34:18 +02:00
|
|
|
****************************************************************************/
|
2018-04-09 23:36:27 +02:00
|
|
|
|
2022-04-17 08:01:48 +02:00
|
|
|
int lpc43_max31855initialize(const char *devpath, int bus,
|
2019-08-14 14:34:18 +02:00
|
|
|
uint16_t devid);
|
2018-04-09 23:36:27 +02:00
|
|
|
|
2019-08-14 14:34:18 +02:00
|
|
|
/****************************************************************************
|
2016-11-23 20:33:51 +01:00
|
|
|
* Name: lpc43xx_timerinitialize()
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* Perform architecture-specific initialization of the timer hardware.
|
|
|
|
*
|
2019-08-14 14:34:18 +02:00
|
|
|
****************************************************************************/
|
2016-11-23 20:33:51 +01:00
|
|
|
|
|
|
|
#ifdef CONFIG_TIMER
|
|
|
|
int lpc43_timerinitialize(void);
|
|
|
|
#else
|
|
|
|
# define lpc43_timerinitialize() (0)
|
|
|
|
#endif
|
|
|
|
|
2016-11-01 21:42:54 +01:00
|
|
|
#endif /* __ASSEMBLY__ */
|
2022-01-15 03:44:35 +01:00
|
|
|
#endif /* __BOARDS_ARM_LPC43X_BAMBINO_200E_SRC_BAMBINO_200E_H */
|