Bsongis/gui refactoring for x7 d (#3701)
* [X7D] New board added * Cosmetics
This commit is contained in:
@@ -28,8 +28,8 @@ endif()
|
||||
|
||||
set(BOOTLOADER_SRC
|
||||
${BOOTLOADER_SRC}
|
||||
../../../gui/212x64/lcd.cpp
|
||||
../../../gui/212x64/fonts.cpp
|
||||
../../../gui/${GUI_DIR}/lcd.cpp
|
||||
../../../gui/${GUI_DIR}/fonts.cpp
|
||||
../../../keys.cpp
|
||||
../../../strhelpers.cpp
|
||||
../../../${STM32USB_DIR}/STM32_USB_OTG_Driver/src/usb_core.c
|
||||
@@ -52,11 +52,11 @@ set(BOOTLOADER_SRC
|
||||
../diskio.cpp
|
||||
../../common/arm/stm32/usbd_usr.cpp
|
||||
../../common/arm/stm32/usbd_storage_msd.cpp
|
||||
../delays.c
|
||||
../../common/arm/stm32/delays.cpp
|
||||
../../common/arm/stm32/usbd_desc.c
|
||||
../../common/arm/stm32/usb_bsp.c
|
||||
../../common/arm/stm32/usb_driver.c
|
||||
../pwr_driver.c
|
||||
../pwr_driver.cpp
|
||||
init.c
|
||||
boot.cpp
|
||||
)
|
||||
@@ -67,7 +67,7 @@ add_definitions(-DBOOT -DUSB_MASS_STORAGE)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-mcpu=${MCU} -mthumb -nostartfiles -lm -T${RADIO_SRC_DIRECTORY}/targets/taranis/stm32_ramboot.ld -Wl,-Map=bootloader.map,--cref,--no-warn-mismatch,--gc-sections")
|
||||
|
||||
add_executable(bootloader ${BOOTLOADER_SRC})
|
||||
add_dependencies(bootloader taranis_fonts firmware_translations)
|
||||
add_dependencies(bootloader ${BITMAPS_TARGET} firmware_translations)
|
||||
|
||||
add_custom_command(
|
||||
TARGET bootloader POST_BUILD
|
||||
|
||||
@@ -1,60 +1,29 @@
|
||||
/****************************************************************************
|
||||
* Copyright (c) 2014 by Michael Blandford. All rights reserved.
|
||||
/*
|
||||
* Copyright (C) OpenTX
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Based on code named
|
||||
* th9x - http://code.google.com/p/th9x
|
||||
* er9x - http://code.google.com/p/er9x
|
||||
* gruvin9x - http://code.google.com/p/gruvin9x
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the author nor the names of its contributors may
|
||||
* be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
****************************************************************************
|
||||
* Other Authors:
|
||||
* - Andre Bernet
|
||||
* - Bertrand Songis
|
||||
* - Bryan J. Rentoul (Gruvin)
|
||||
* - Cameron Weeks
|
||||
* - Erez Raviv
|
||||
* - Jean-Pierre Parisy
|
||||
* - Karl Szmutny
|
||||
* - Michal Hlavinka
|
||||
* - Pat Mackenzie
|
||||
* - Philip Moss
|
||||
* - Rob Thomson
|
||||
* - Romolo Manfredini
|
||||
* - Thomas Husterer
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Headers
|
||||
*----------------------------------------------------------------------------*/
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "../../../gui/212x64/lcd.h"
|
||||
#include "board.h"
|
||||
#include "lcd.h"
|
||||
#include "storage/eeprom_rlc.h"
|
||||
#include "pwr.h"
|
||||
#include "keys.h"
|
||||
@@ -164,12 +133,12 @@ void interrupt10ms(void)
|
||||
{
|
||||
Tenms |= 1; // 10 mS has passed
|
||||
|
||||
uint8_t enuk = KEY_MENU;
|
||||
uint8_t index = KEY_MENU;
|
||||
uint8_t in = readKeys();
|
||||
for (uint8_t i = 1; i != uint8_t(1 << TRM_BASE); i <<= 1) {
|
||||
uint8_t value = (in & i);
|
||||
keys[enuk].input(value);
|
||||
++enuk;
|
||||
keys[index].input(value);
|
||||
++index;
|
||||
}
|
||||
|
||||
#if defined(PCBX9E)
|
||||
@@ -399,7 +368,7 @@ int main()
|
||||
#endif
|
||||
|
||||
pwrInit();
|
||||
delaysInit(); //needed for lcdInit()
|
||||
delaysInit(); // needed for lcdInit()
|
||||
lcdInit();
|
||||
backlightInit();
|
||||
|
||||
@@ -672,7 +641,7 @@ int main()
|
||||
}
|
||||
|
||||
if (state != ST_FLASHING && state != ST_USB) {
|
||||
#if defined(PCBX9E)
|
||||
#if defined(PCBX9E) || defined(PCBX7D)
|
||||
if (pwrPressed()) {
|
||||
#else
|
||||
if (pwrCheck() == e_power_off) {
|
||||
|
||||
Reference in New Issue
Block a user