5 more files removed

This commit is contained in:
bsongis
2014-03-04 18:31:12 +01:00
parent 9cdd175250
commit 3788f5f562
13 changed files with 77 additions and 1268 deletions
+9 -4
View File
@@ -34,11 +34,16 @@
*
*/
#ifndef eeprom_avr_h
#define eeprom_avr_h
#ifndef eeprom_rlc_h
#define eeprom_rlc_h
#include <inttypes.h>
// TODO duplicated
#ifndef PACK
#define PACK( __Declaration__ ) __Declaration__ __attribute__((__packed__))
#endif
#if defined(PCBTARANIS)
#define blkid_t uint16_t
#if !defined(EESIZE)
@@ -67,7 +72,7 @@
#define BS 16
#endif
PACK(struct DirEnt{
PACK(struct DirEnt {
blkid_t startBlk;
uint16_t size:12;
uint16_t typ:4;
@@ -79,7 +84,7 @@ PACK(struct DirEnt{
#define EEFS_EXTRA_FIELDS
#endif
PACK(struct EeFs{
PACK(struct EeFs {
uint8_t version;
blkid_t mySize;
blkid_t freeList;
+11 -3
View File
@@ -49,6 +49,7 @@ void lcd_clear()
memset(displayBuf, 0, sizeof(displayBuf));
}
#if !defined(BOOT)
void lcd_img(xcoord_t x, uint8_t y, const pm_uchar * img, uint8_t idx, LcdFlags att)
{
const pm_uchar *q = img;
@@ -84,6 +85,7 @@ void lcd_img(xcoord_t x, uint8_t y, const pm_uchar * img, uint8_t idx, LcdFlags
}
}
}
#endif
uint8_t lcdLastPos;
uint8_t lcdNextPos;
@@ -177,7 +179,7 @@ void lcd_putcAtt(xcoord_t x, uint8_t y, const unsigned char c, LcdFlags flags)
}
}
#if defined(CPUARM)
#if defined(CPUARM) && !defined(BOOT)
else if (flags & MIDSIZE) {
/* each letter consists of ten top bytes followed by
* by ten bottom bytes (20 bytes per * char) */
@@ -329,7 +331,7 @@ void lcd_putcAtt(xcoord_t x, uint8_t y, const unsigned char c, LcdFlags flags)
LCD_BYTE_FILTER(r, ~mask, b >> (8-ym8));
}
#if defined(PCBTARANIS)
#if defined(PCBTARANIS) && !defined(BOOT)
if (inv) {
if (ym8) lcd_mask(p, 0x01 << (ym8-1), FORCE);
else if (y) {
@@ -369,9 +371,11 @@ void lcd_putsnAtt(xcoord_t x, uint8_t y, const pm_char * s, uint8_t len, LcdFlag
case BSS:
c = *s;
break;
#if !defined(BOOT)
case ZCHAR:
c = idx2char(*s);
break;
#endif
default:
c = pgm_read_byte(s);
break;
@@ -854,6 +858,7 @@ void lcd_invert_line(int8_t y)
}
}
#if !defined(BOOT)
#if defined(PCBTARANIS)
void lcdDrawTelemetryTopBar()
{
@@ -885,6 +890,7 @@ void lcdDrawTelemetryTopBar()
lcd_invert_line(0);
}
#endif
#endif
void putsTime(xcoord_t x, uint8_t y, putstime_t tme, LcdFlags att, LcdFlags att2)
{
@@ -929,6 +935,7 @@ void putsTime(xcoord_t x, uint8_t y, putstime_t tme, LcdFlags att, LcdFlags att2
lcd_outdezNAtt(lcdNextPos, y, qr.rem, att2|LEADING0|LEFT, 2);
}
#if !defined(BOOT)
// TODO to be optimized with putsTelemetryValue
void putsVolts(xcoord_t x, uint8_t y, uint16_t volts, LcdFlags att)
{
@@ -1175,7 +1182,7 @@ void putsRotaryEncoderMode(xcoord_t x, uint8_t y, uint8_t phase, uint8_t idx, Lc
}
#endif
#if defined(FRSKY) || defined(CPUARM)
#if (defined(FRSKY) || defined(CPUARM)) && !defined(BOOT)
void putsTelemetryValue(xcoord_t x, uint8_t y, lcdint_t val, uint8_t unit, uint8_t att)
{
convertUnit(val, unit);
@@ -1333,3 +1340,4 @@ void lcdSetContrast()
{
lcdSetRefVolt(g_eeGeneral.contrast);
}
#endif
+12 -2
View File
@@ -149,6 +149,12 @@ extern uint8_t lcdNextPos;
extern volatile uint32_t lcdInputs ;
#endif
#if defined(BOOT)
// TODO quick & dirty :(
typedef const unsigned char pm_uchar;
typedef const char pm_char;
#endif
void lcd_putc(xcoord_t x, uint8_t y, const unsigned char c);
void lcd_putcAtt(xcoord_t x, uint8_t y, const unsigned char c, LcdFlags mode);
void lcd_putsAtt(xcoord_t x, uint8_t y, const pm_char * s, LcdFlags mode);
@@ -169,7 +175,7 @@ void putsModelName(xcoord_t x, uint8_t y, char *name, uint8_t id, LcdFlags att);
void putsSwitches(xcoord_t x, uint8_t y, int8_t swtch, LcdFlags att=0);
void putsMixerSource(xcoord_t x, uint8_t y, uint8_t idx, LcdFlags att=0);
void putsFlightPhase(xcoord_t x, uint8_t y, int8_t idx, LcdFlags att=0);
#if defined(PCBTARANIS)
#if defined(PCBTARANIS) && !defined(BOOT)
void putsCurveRef(xcoord_t x, uint8_t y, CurveRef &curve, LcdFlags att);
#endif
void putsCurve(xcoord_t x, uint8_t y, int8_t idx, LcdFlags att=0);
@@ -249,7 +255,11 @@ void lcdRefresh();
const pm_char * bmpLoad(bmp_ptr_t &dest, const char *filename, const xcoord_t width, const uint8_t height);
#endif
#define BLINK_ON_PHASE (g_blinkTmr10ms & (1<<6))
#if defined(BOOT)
#define BLINK_ON_PHASE (0)
#else
#define BLINK_ON_PHASE (g_blinkTmr10ms & (1<<6))
#endif
#ifdef SIMU
extern bool lcd_refresh;
+1 -3
View File
@@ -1513,9 +1513,7 @@ enum AUDIO_SOUNDS {
#include "targets/gruvin9x/somo14d.h"
#endif
#if !defined(BOOT)
#include "translations.h"
#endif
#if defined(HAPTIC)
#include "haptic.h"
@@ -1634,7 +1632,7 @@ extern union ReusableBuffer reusableBuffer;
void checkFlashOnBeep();
#if defined(FRSKY) || defined(CPUARM)
FORCEINLINE void convertUnit(getvalue_t & val, uint8_t & unit);
void convertUnit(getvalue_t & val, uint8_t & unit); // TODO check FORCEINLINE on stock
void putsTelemetryValue(xcoord_t x, uint8_t y, lcdint_t val, uint8_t unit, uint8_t att);
#else
#define convertUnit(...)
+5 -1
View File
@@ -9,7 +9,7 @@
******************************************************************************
*/
#include "../opentx.h"
#include "../../opentx.h"
#define WriteData(x) AspiData(x)
#define WriteCommand(x) AspiCmd(x)
@@ -21,7 +21,11 @@ static void LCD_Init()
AspiCmd(0x25); //Temperature compensation curve definition: 0x25 = -0.05%/oC
AspiCmd(0xEA); //set bias=1/10 :Command table NO.27
AspiCmd(0x81); //Set Vop
#if defined(BOOT)
AspiCmd(CONTRAST_OFS);
#else
AspiCmd(g_eeGeneral.contrast+CONTRAST_OFS); //0--255
#endif
AspiCmd(0xA6); //inverse display off
AspiCmd(0xD1); //SET RGB:Command table NO.21 .SET RGB or BGR. D1=RGB
AspiCmd(0xD5); //set color mode 4K and 12bits :Command table NO.22