Cosmetics

This commit is contained in:
Bertrand Songis
2015-06-12 16:26:36 +02:00
parent e88dd59c93
commit 74b43c478b
6 changed files with 9 additions and 14 deletions
+3 -3
View File
@@ -58,16 +58,16 @@ void hapticQueue::heartbeat()
hapticOn(HAPTIC_STRENGTH() * 20);
#else
if (hapticTick-- > 0) {
HAPTIC_ON();
hapticOn();
}
else {
HAPTIC_OFF();
hapticOff();
hapticTick = HAPTIC_STRENGTH();
}
#endif
}
else {
HAPTIC_OFF();
hapticOff();
if (buzzPause > 0) {
buzzPause--;
}
+2 -3
View File
@@ -165,9 +165,8 @@ void pwrOff();
#define usbPlugged() false
// Haptic driver
#define hapticOff() // TODO hapticOn() cleaner ...
#define HAPTIC_ON() PORTD &= ~(1 << OUT_D_HAPTIC)
#define HAPTIC_OFF() PORTD |= (1 << OUT_D_HAPTIC)
#define hapticOn() PORTD &= ~(1 << OUT_D_HAPTIC)
#define hapticOff() PORTD |= (1 << OUT_D_HAPTIC)
// Rotary encoder driver
#define REA_DOWN() (~PIND & 0x20)
+2 -3
View File
@@ -162,9 +162,8 @@ void pwrOff();
#define usbPlugged() false
// Haptic driver
#define hapticOff() // TODO hapticOn() cleaner ...
#define HAPTIC_ON() PORTH |= (1 << OUT_H_HAPTIC)
#define HAPTIC_OFF() PORTH &= ~(1 << OUT_H_HAPTIC)
#define hapticOn() PORTH |= (1 << OUT_H_HAPTIC)
#define hapticOff() PORTH &= ~(1 << OUT_H_HAPTIC)
// Buzzer driver
#define buzzerOn() PORTB |= (1 << OUT_B_BUZZER)
-1
View File
@@ -254,7 +254,6 @@ extern int8_t Coproc_maxtemp;
// Haptic driver
void hapticOff(void);
void hapticOn(uint32_t pwmPercent);
#define HAPTIC_OFF() hapticOff()
// BlueTooth driver
#if defined(BLUETOOTH)
+2 -2
View File
@@ -235,8 +235,8 @@ void rotencPoll();
#endif
// Haptic
#define HAPTIC_ON() PORTG |= (1 << OUT_G_HAPTIC)
#define HAPTIC_OFF() PORTG &= ~(1 << OUT_G_HAPTIC)
#define hapticOn() PORTG |= (1 << OUT_G_HAPTIC)
#define hapticOff() PORTG &= ~(1 << OUT_G_HAPTIC)
// USB fake driver
#define usbPlugged() false
@@ -314,12 +314,10 @@ void setVolume(uint8_t volume);
// Haptic driver
void hapticInit(void);
void hapticOff(void);
#define HAPTIC_OFF() hapticOff()
#if defined(REVPLUS)
void hapticOn(uint32_t pwmPercent);
#else
void hapticOn(void);
#define HAPTIC_ON() hapticOn()
#endif
// SERIAL_USART driver