chore(hal): remove StdPeriph (#5023)
Co-authored-by: raphaelcoeffic <1050031+raphaelcoeffic@users.noreply.github.com> Co-authored-by: Malte Langermann <malte@langermann.net> Co-authored-by: 3djc <3djc@gh.com> Co-authored-by: Richard Li <richard.li@ces.hk>
This commit is contained in:
co-authored by
raphaelcoeffic
Malte Langermann
3djc
Richard Li
parent
fea402a6e3
commit
6579905088
+1
-24
@@ -19,12 +19,11 @@
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include "opentx.h"
|
||||
|
||||
#include "hal/adc_driver.h"
|
||||
#include "hal/storage.h"
|
||||
#include "hal/abnormal_reboot.h"
|
||||
#include "hal/usb_driver.h"
|
||||
#include "opentx.h"
|
||||
|
||||
#if defined(LIBOPENUI)
|
||||
#include "libopenui.h"
|
||||
@@ -203,28 +202,6 @@ void handleUsbConnection()
|
||||
#endif // defined(STM32) && !defined(SIMU)
|
||||
}
|
||||
|
||||
#if defined(JACK_DETECT_GPIO) && !defined(SIMU)
|
||||
bool isJackPlugged()
|
||||
{
|
||||
// debounce
|
||||
static bool debounced_state = 0;
|
||||
static bool last_state = 0;
|
||||
|
||||
if (GPIO_ReadInputDataBit(JACK_DETECT_GPIO, JACK_DETECT_GPIO_PIN)) {
|
||||
if (!last_state) {
|
||||
debounced_state = false;
|
||||
}
|
||||
last_state = false;
|
||||
} else {
|
||||
if (last_state) {
|
||||
debounced_state = true;
|
||||
}
|
||||
last_state = true;
|
||||
}
|
||||
return debounced_state;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(PCBXLITES)
|
||||
uint8_t jackState = SPEAKER_ACTIVE;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user