1*49a45ad9SMatthias Ringwald /******************************************************************************* 2*49a45ad9SMatthias Ringwald * Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved. 3*49a45ad9SMatthias Ringwald * 4*49a45ad9SMatthias Ringwald * Permission is hereby granted, free of charge, to any person obtaining a 5*49a45ad9SMatthias Ringwald * copy of this software and associated documentation files (the "Software"), 6*49a45ad9SMatthias Ringwald * to deal in the Software without restriction, including without limitation 7*49a45ad9SMatthias Ringwald * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8*49a45ad9SMatthias Ringwald * and/or sell copies of the Software, and to permit persons to whom the 9*49a45ad9SMatthias Ringwald * Software is furnished to do so, subject to the following conditions: 10*49a45ad9SMatthias Ringwald * 11*49a45ad9SMatthias Ringwald * The above copyright notice and this permission notice shall be included 12*49a45ad9SMatthias Ringwald * in all copies or substantial portions of the Software. 13*49a45ad9SMatthias Ringwald * 14*49a45ad9SMatthias Ringwald * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 15*49a45ad9SMatthias Ringwald * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16*49a45ad9SMatthias Ringwald * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 17*49a45ad9SMatthias Ringwald * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES 18*49a45ad9SMatthias Ringwald * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19*49a45ad9SMatthias Ringwald * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20*49a45ad9SMatthias Ringwald * OTHER DEALINGS IN THE SOFTWARE. 21*49a45ad9SMatthias Ringwald * 22*49a45ad9SMatthias Ringwald * Except as contained in this notice, the name of Maxim Integrated 23*49a45ad9SMatthias Ringwald * Products, Inc. shall not be used except as stated in the Maxim Integrated 24*49a45ad9SMatthias Ringwald * Products, Inc. Branding Policy. 25*49a45ad9SMatthias Ringwald * 26*49a45ad9SMatthias Ringwald * The mere transfer of this software does not imply any licenses 27*49a45ad9SMatthias Ringwald * of trade secrets, proprietary technology, copyrights, patents, 28*49a45ad9SMatthias Ringwald * trademarks, maskwork rights, or any other form of intellectual 29*49a45ad9SMatthias Ringwald * property whatsoever. Maxim Integrated Products, Inc. retains all 30*49a45ad9SMatthias Ringwald * ownership rights. 31*49a45ad9SMatthias Ringwald * 32*49a45ad9SMatthias Ringwald * $Date: 2016-03-11 10:46:02 -0700 (Fri, 11 Mar 2016) $ 33*49a45ad9SMatthias Ringwald * $Revision: 21838 $ 34*49a45ad9SMatthias Ringwald * 35*49a45ad9SMatthias Ringwald ******************************************************************************/ 36*49a45ad9SMatthias Ringwald 37*49a45ad9SMatthias Ringwald /** 38*49a45ad9SMatthias Ringwald * @file board.h 39*49a45ad9SMatthias Ringwald * @brief Board support package API. 40*49a45ad9SMatthias Ringwald */ 41*49a45ad9SMatthias Ringwald 42*49a45ad9SMatthias Ringwald #ifndef _BOARD_H 43*49a45ad9SMatthias Ringwald #define _BOARD_H 44*49a45ad9SMatthias Ringwald 45*49a45ad9SMatthias Ringwald #include "gpio.h" 46*49a45ad9SMatthias Ringwald #include "spim.h" 47*49a45ad9SMatthias Ringwald #include "ioman.h" 48*49a45ad9SMatthias Ringwald #include "led.h" 49*49a45ad9SMatthias Ringwald #include "pb.h" 50*49a45ad9SMatthias Ringwald 51*49a45ad9SMatthias Ringwald #ifdef __cplusplus 52*49a45ad9SMatthias Ringwald extern "C" { 53*49a45ad9SMatthias Ringwald #endif 54*49a45ad9SMatthias Ringwald 55*49a45ad9SMatthias Ringwald #ifndef CONSOLE_UART 56*49a45ad9SMatthias Ringwald #define CONSOLE_UART 1 /// UART instance to use for console 57*49a45ad9SMatthias Ringwald #endif 58*49a45ad9SMatthias Ringwald 59*49a45ad9SMatthias Ringwald #ifndef CONSOLE_BAUD 60*49a45ad9SMatthias Ringwald #define CONSOLE_BAUD 115200 /// Console baud rate 61*49a45ad9SMatthias Ringwald #endif 62*49a45ad9SMatthias Ringwald 63*49a45ad9SMatthias Ringwald // Pushbutton Indices 64*49a45ad9SMatthias Ringwald #define SW1 0 /// Pushbutton index for SW1 65*49a45ad9SMatthias Ringwald 66*49a45ad9SMatthias Ringwald #define LED_OFF 1 /// Inactive state of LEDs 67*49a45ad9SMatthias Ringwald #define LED_ON 0 /// Active state of LEDs 68*49a45ad9SMatthias Ringwald 69*49a45ad9SMatthias Ringwald // Console UART configuration 70*49a45ad9SMatthias Ringwald extern const uart_cfg_t console_uart_cfg; 71*49a45ad9SMatthias Ringwald extern const sys_cfg_uart_t console_sys_cfg; 72*49a45ad9SMatthias Ringwald 73*49a45ad9SMatthias Ringwald // MAX14690 PMIC 74*49a45ad9SMatthias Ringwald #define MAX14690_I2CM_INST 0 75*49a45ad9SMatthias Ringwald #define MAX14690_I2CM MXC_I2CM2 76*49a45ad9SMatthias Ringwald extern const ioman_cfg_t max14690_io_cfg; 77*49a45ad9SMatthias Ringwald extern const gpio_cfg_t max14690_int; 78*49a45ad9SMatthias Ringwald extern const gpio_cfg_t max14690_mpc0; 79*49a45ad9SMatthias Ringwald 80*49a45ad9SMatthias Ringwald /** 81*49a45ad9SMatthias Ringwald * \brief Initialize the BSP and board interfaces. 82*49a45ad9SMatthias Ringwald * \returns #E_NO_ERROR if everything is successful 83*49a45ad9SMatthias Ringwald */ 84*49a45ad9SMatthias Ringwald int Board_Init(void); 85*49a45ad9SMatthias Ringwald 86*49a45ad9SMatthias Ringwald /** 87*49a45ad9SMatthias Ringwald * \brief Initialize or reinitialize the console. This may be necessary if the 88*49a45ad9SMatthias Ringwald * system clock rate is changed. 89*49a45ad9SMatthias Ringwald * \returns #E_NO_ERROR if everything is successful 90*49a45ad9SMatthias Ringwald */ 91*49a45ad9SMatthias Ringwald int Console_Init(void); 92*49a45ad9SMatthias Ringwald 93*49a45ad9SMatthias Ringwald /** 94*49a45ad9SMatthias Ringwald * \brief Attempt to prepare the console for sleep. 95*49a45ad9SMatthias Ringwald * \returns #E_NO_ERROR if ready to sleep, #E_BUSY if not ready for sleep. 96*49a45ad9SMatthias Ringwald */ 97*49a45ad9SMatthias Ringwald int Console_PrepForSleep(void); 98*49a45ad9SMatthias Ringwald 99*49a45ad9SMatthias Ringwald #ifdef __cplusplus 100*49a45ad9SMatthias Ringwald } 101*49a45ad9SMatthias Ringwald #endif 102*49a45ad9SMatthias Ringwald 103*49a45ad9SMatthias Ringwald #endif /* _BOARD_H */ 104