summaryrefslogtreecommitdiffstats
path: root/keyboards/keychron/bluetooth/lpm_stm32l432.c
diff options
context:
space:
mode:
authorlalalademaxiya1 <2831039915@qq.com>2023-03-15 16:51:53 +0800
committerlalalademaxiya1 <2831039915@qq.com>2023-03-15 16:51:53 +0800
commitc6243da12f6643747a24a7aa761e103cc4a848c2 (patch)
tree82d29a9567d09c2d3845654c7e5b16b284b2bc30 /keyboards/keychron/bluetooth/lpm_stm32l432.c
parentee715fc26ade41e56f47e60527f17d5cbdfb584b (diff)
Update Keychron K Pro series keyboards
Diffstat (limited to 'keyboards/keychron/bluetooth/lpm_stm32l432.c')
-rwxr-xr-x[-rw-r--r--]keyboards/keychron/bluetooth/lpm_stm32l432.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/keyboards/keychron/bluetooth/lpm_stm32l432.c b/keyboards/keychron/bluetooth/lpm_stm32l432.c
index 8e9f2fa77f..69db4fc30d 100644..100755
--- a/keyboards/keychron/bluetooth/lpm_stm32l432.c
+++ b/keyboards/keychron/bluetooth/lpm_stm32l432.c
@@ -140,7 +140,6 @@ bool lpm_set(pm_t mode) {
}
static inline void enter_low_power_mode_prepare(void) {
-
#if defined(KEEP_USB_CONNECTION_IN_BLUETOOTH_MODE)
/* Usb unit is actived and running, stop and disconnect first */
usbStop(&USBD1);
@@ -204,15 +203,15 @@ static inline void lpm_wakeup(void) {
#ifdef USB_POWER_SENSE_PIN
palDisableLineEvent(USB_POWER_SENSE_PIN);
-#if defined(KEEP_USB_CONNECTION_IN_BLUETOOTH_MODE)
+# if defined(KEEP_USB_CONNECTION_IN_BLUETOOTH_MODE)
if (usb_power_connected()) {
hsi48_init();
/* Remove USB isolation.*/
- //PWR->CR2 |= PWR_CR2_USV; /* PWR_CR2_USV is available on STM32L4x2xx and STM32L4x3xx devices only. */
+ // PWR->CR2 |= PWR_CR2_USV; /* PWR_CR2_USV is available on STM32L4x2xx and STM32L4x3xx devices only. */
usb_power_connect();
usb_start(&USBD1);
}
-#endif
+# endif
#endif
@@ -277,7 +276,7 @@ void stm32_clock_fast_init(void) {
pll_init();
pllsai1_init();
pllsai2_init();
-/* clang-format off */
+ /* clang-format off */
/* Other clock-related settings (dividers, MCO etc).*/
RCC->CFGR = STM32_MCOPRE | STM32_MCOSEL | STM32_STOPWUCK |
STM32_PPRE2 | STM32_PPRE1 | STM32_HPRE;
@@ -289,7 +288,7 @@ void stm32_clock_fast_init(void) {
STM32_I2C3SEL | STM32_I2C2SEL | STM32_I2C1SEL |
STM32_UART5SEL | STM32_UART4SEL | STM32_USART3SEL |
STM32_USART2SEL | STM32_USART1SEL | STM32_LPUART1SEL;
-/* clang-format on */
+/* clang-format on */
# if STM32_SAI2SEL != STM32_SAI2SEL_OFF
ccipr |= STM32_SAI2SEL;
# endif