Merge branch 'next' of https://github.com/opentx/opentx into TaranisPlus

Conflicts:
	companion/src/firmwares/opentx/opentxinterface.cpp
	radio/src/haptic.cpp
	radio/src/targets/gruvin9x/board_gruvin9x.h
	radio/src/targets/mega2560/board_mega2560.h
	radio/src/targets/sky9x/board_sky9x.h
	radio/src/targets/stock/board_stock.h
	radio/src/targets/taranis/board_taranis.h
	radio/src/targets/taranis/haptic_driver.cpp
This commit is contained in:
Andre Bernet
2014-04-29 15:13:05 +02:00
45 changed files with 3682 additions and 2569 deletions
+2 -2
View File
@@ -186,8 +186,8 @@ void pwrOff();
// Haptic driver
#define hapticOff() // TODO hapticOn() cleaner ...
#define HAPTIC_ON PORTD &= ~(1 << OUT_D_HAPTIC)
#define HAPTIC_OFF PORTD |= (1 << OUT_D_HAPTIC)
#define HAPTIC_ON() PORTD &= ~(1 << OUT_D_HAPTIC)
#define HAPTIC_OFF() PORTD |= (1 << OUT_D_HAPTIC)
// Rotary encoder driver
#if ROTARY_ENCODERS <= 2
+2 -2
View File
@@ -189,7 +189,7 @@ void pwrOff();
// Haptic driver
#define hapticOff() // TODO hapticOn() cleaner ...
#define HAPTIC_ON PORTD &= ~(1 << OUT_D_HAPTIC)
#define HAPTIC_OFF PORTD |= (1 << OUT_D_HAPTIC)
#define HAPTIC_ON() PORTD &= ~(1 << OUT_D_HAPTIC)
#define HAPTIC_OFF() PORTD |= (1 << OUT_D_HAPTIC)
#endif
+1 -1
View File
@@ -239,7 +239,7 @@ extern int8_t Coproc_maxtemp;
// Haptic driver
void hapticOff(void);
void hapticOn(uint32_t pwmPercent);
#define HAPTIC_OFF hapticOff()
#define HAPTIC_OFF() hapticOff()
// BlueTooth driver
#if defined(BLUETOOTH)
+2 -2
View File
@@ -231,8 +231,8 @@ void rotencPoll();
#endif
// Haptic
#define HAPTIC_ON PORTG |= (1 << OUT_G_HAPTIC)
#define HAPTIC_OFF PORTG &= ~(1 << OUT_G_HAPTIC)
#define HAPTIC_ON() PORTG |= (1 << OUT_G_HAPTIC)
#define HAPTIC_OFF() PORTG &= ~(1 << OUT_G_HAPTIC)
// USB fake driver
#define usbPlugged() false
+9 -5
View File
@@ -239,12 +239,16 @@ void eeWriteBlockCmp(const void *pointer_ram, uint16_t pointer_eeprom, size_t si
// Debug driver
void debugPutc(const char c);
// Haptic
void hapticOff(void);
void hapticOn(uint32_t pwmPercent);
// Haptic driver
void hapticInit(void);
#define HAPTIC_OFF hapticOff()
#define HAPTIC_ON hapticOn(100)
void hapticOff(void);
#define HAPTIC_OFF() hapticOff()
#if defined(REVPLUS)
void hapticOn(uint32_t pwmPercent);
#else
void hapticOn();
#define HAPTIC_ON() hapticOn()
#endif
extern uint8_t currentTrainerMode;
+10 -6
View File
@@ -39,22 +39,26 @@
void hapticOff(void)
{
#if defined(REVPLUS)
return; //TODO PWM support
GPIO_ResetBits(GPIO_HAPTIC, PIN_HAPTIC); // Temp, TODO PWM support
return;
#else
GPIO_ResetBits(GPIO_HAPTIC, PIN_HAPTIC);
#endif
}
void hapticOn(uint32_t pwmPercent)
{
#if defined(REVPLUS)
// pwmPercent 0-100
return; //TODO PWM support
void hapticOn(uint32_t pwmPercent)
{ // pwmPercent 0-100
GPIO_SetBits(GPIO_HAPTIC, PIN_HAPTIC); // Temp, TODO PWM support
return;
}
#else
void hapticOn()
{
// No PWM before REVPLUS
GPIO_SetBits(GPIO_HAPTIC, PIN_HAPTIC);
#endif
}
#endif
void hapticInit(void)
{