Merge branch 'next' into schwabe/ar9x_test_and_fix

This commit is contained in:
Bertrand Songis
2016-08-01 07:03:17 +02:00
404 changed files with 3963 additions and 6172 deletions
+2 -1
View File
@@ -16,6 +16,7 @@
#include "opentxsimulator.h"
#include "opentx.h"
#include "simulcd.h"
int16_t g_anas[NUM_STICKS+NUM_POTS];
@@ -159,7 +160,7 @@ void OpenTxSimulator::wheelEvent(int steps)
rotencValue -= 2;
else
rotencValue += 2;
#elif defined(REV9E)
#elif defined(PCBX9E)
if (steps == 255)
rotencValue -= 2;
else
+3 -8
View File
@@ -140,7 +140,7 @@ void simuInit()
break;
#if defined(CPUARM)
#if defined(PCBTARANIS) && !defined(REV9E)
#if defined(PCBTARANIS) && !defined(PCBX9E)
#define SWITCH_CASE NEG_CASE
#else
#define SWITCH_CASE POS_CASE
@@ -247,7 +247,7 @@ void simuSetSwitch(uint8_t swtch, int8_t state)
SWITCH_CASE(5, SWITCHES_GPIO_REG_F, SWITCHES_GPIO_PIN_F)
SWITCH_3_CASE(6, SWITCHES_GPIO_REG_G_L, SWITCHES_GPIO_REG_G_H, SWITCHES_GPIO_PIN_G_L, SWITCHES_GPIO_PIN_G_H)
SWITCH_CASE(7, SWITCHES_GPIO_REG_H, SWITCHES_GPIO_PIN_H)
#if defined(REV9E)
#if defined(PCBX9E)
SWITCH_3_CASE(8, SWITCHES_GPIO_REG_I_L, SWITCHES_GPIO_REG_I_H, SWITCHES_GPIO_PIN_I_L, SWITCHES_GPIO_PIN_I_H)
SWITCH_3_CASE(9, SWITCHES_GPIO_REG_J_L, SWITCHES_GPIO_REG_J_H, SWITCHES_GPIO_PIN_J_L, SWITCHES_GPIO_PIN_J_H)
SWITCH_3_CASE(10, SWITCHES_GPIO_REG_K_L, SWITCHES_GPIO_REG_K_H, SWITCHES_GPIO_PIN_K_L, SWITCHES_GPIO_PIN_K_H)
@@ -1105,11 +1105,6 @@ DSTATUS disk_status (BYTE pdrv)
return (DSTATUS)0;
}
#if !defined(DISK_CACHE)
#define __disk_read disk_read
#define __disk_write disk_write
#endif
DRESULT __disk_read (BYTE pdrv, BYTE* buff, DWORD sector, UINT count)
{
if (diskImage == 0) return RES_NOTRDY;
@@ -1385,7 +1380,7 @@ void unlockFlash() { }
void lockFlash() { }
void writeFlash(uint32_t *address, uint32_t *buffer) { SIMU_SLEEP(100); }
uint32_t isBootloaderStart(const void *block) { return 1; }
#if defined(REVPLUS)
#if defined(PCBX9DP) || defined(PCBX9E)
void turnBacklightOn(uint8_t level, uint8_t color)
{
TIM4->CCR4 = (100-level)*color;
-2
View File
@@ -21,8 +21,6 @@
#ifndef _SIMPGMSPACE_H_
#define _SIMPGMSPACE_H_
extern int g_snapshot_idx;
#ifndef __GNUC__
#include <windows.h>
#define sleep(x) Sleep(x)
+28
View File
@@ -0,0 +1,28 @@
/*
* Copyright (C) OpenTX
*
* 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
*
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
*
* 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.
*
* 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.
*/
#ifndef _SIMULCD_H_
#define _SIMULCD_H_
extern int g_snapshot_idx;
extern bool simuLcdRefresh;
extern display_t simuLcdBuf[DISPLAY_BUFFER_SIZE];
#endif // _SIMULCD_H_