mirror of
https://github.com/opentx/opentx.git
synced 2025-07-26 01:35:21 +03:00
Custom OpenTX types moved to separate file opentx_types.h, fixes linker problem with lcdDrawBitmapPattern() in release build (#4188)
This commit is contained in:
parent
2a0a75a178
commit
afe3d4a1e9
4 changed files with 45 additions and 15 deletions
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include <list>
|
||||
#include "widgets_container.h"
|
||||
#include "lcd.h"
|
||||
|
||||
#define MAX_LAYOUT_ZONES 10
|
||||
#define MAX_LAYOUT_OPTIONS 10
|
||||
|
@ -86,7 +87,6 @@ class BaseLayoutFactory: public LayoutFactory
|
|||
|
||||
virtual void drawThumb(uint16_t x, uint16_t y, uint32_t flags) const
|
||||
{
|
||||
extern void lcdDrawBitmapPattern(int x, int y, const uint8_t * bitmap, uint32_t flags, int width=0, int offset=0);
|
||||
lcdDrawBitmapPattern(x, y, bitmap, flags);
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#define _LCD_H_
|
||||
|
||||
#include "bitmapbuffer.h"
|
||||
#include "opentx_types.h"
|
||||
|
||||
#if LCD_W >= 480
|
||||
#define LCD_COLS 40
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include "definitions.h"
|
||||
#include "opentx_types.h"
|
||||
|
||||
#if defined(SIMU)
|
||||
#define SWITCH_SIMU(a, b) (a)
|
||||
|
@ -349,15 +350,9 @@ void memswap(void * a, void * b, uint8_t size);
|
|||
#include "fifo.h"
|
||||
#include "io/io_arm.h"
|
||||
// This doesn't need protection on this processor
|
||||
typedef uint32_t tmr10ms_t;
|
||||
extern volatile tmr10ms_t g_tmr10ms;
|
||||
#define get_tmr10ms() g_tmr10ms
|
||||
typedef int32_t rotenc_t;
|
||||
typedef int32_t getvalue_t;
|
||||
typedef uint32_t mixsrc_t;
|
||||
typedef int32_t swsrc_t;
|
||||
#else
|
||||
typedef uint16_t tmr10ms_t;
|
||||
extern volatile tmr10ms_t g_tmr10ms;
|
||||
extern inline uint16_t get_tmr10ms()
|
||||
{
|
||||
|
@ -367,10 +362,6 @@ void memswap(void * a, void * b, uint8_t size);
|
|||
sei();
|
||||
return time ;
|
||||
}
|
||||
typedef int8_t rotenc_t;
|
||||
typedef int16_t getvalue_t;
|
||||
typedef uint8_t mixsrc_t;
|
||||
typedef int8_t swsrc_t;
|
||||
#endif
|
||||
|
||||
#if defined(NAVIGATION_STICKS)
|
||||
|
@ -773,10 +764,8 @@ extern uint16_t s_timeCum16ThrP;
|
|||
|
||||
#if defined(OVERRIDE_CHANNEL_FUNCTION)
|
||||
#if defined(CPUARM)
|
||||
typedef int16_t safetych_t;
|
||||
#define OVERRIDE_CHANNEL_UNDEFINED -4096
|
||||
#else
|
||||
typedef int8_t safetych_t;
|
||||
#define OVERRIDE_CHANNEL_UNDEFINED -128
|
||||
#endif
|
||||
extern safetych_t safetyCh[MAX_OUTPUT_CHANNELS];
|
||||
|
@ -1483,10 +1472,8 @@ enum BarThresholdIdx {
|
|||
};
|
||||
|
||||
#if defined(CPUARM)
|
||||
typedef uint16_t bar_threshold_t;
|
||||
#define FILL_THRESHOLD(idx, val) barsThresholds[idx] = (val)
|
||||
#else
|
||||
typedef uint8_t bar_threshold_t;
|
||||
#define FILL_THRESHOLD(idx, val) barsThresholds[idx] = 128 + (val)
|
||||
#endif
|
||||
|
||||
|
|
42
radio/src/opentx_types.h
Normal file
42
radio/src/opentx_types.h
Normal file
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* 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 _OTXTYPES_H_
|
||||
#define _OTXTYPES_H_
|
||||
|
||||
#if defined(CPUARM)
|
||||
typedef uint32_t tmr10ms_t;
|
||||
typedef int32_t rotenc_t;
|
||||
typedef int32_t getvalue_t;
|
||||
typedef uint32_t mixsrc_t;
|
||||
typedef int32_t swsrc_t;
|
||||
typedef int16_t safetych_t;
|
||||
typedef uint16_t bar_threshold_t;
|
||||
#else
|
||||
typedef uint16_t tmr10ms_t;
|
||||
typedef int8_t rotenc_t;
|
||||
typedef int16_t getvalue_t;
|
||||
typedef uint8_t mixsrc_t;
|
||||
typedef int8_t swsrc_t;
|
||||
typedef int8_t safetych_t;
|
||||
typedef uint8_t bar_threshold_t;
|
||||
#endif
|
||||
|
||||
#endif // _OTXTYPES_H_
|
Loading…
Add table
Add a link
Reference in a new issue