Minor changes
This commit is contained in:
parent
a5f923bb81
commit
d2e15ac177
@ -13,7 +13,6 @@ static uint8_t _vibration_motor_timer_id = WM_TIMER_ID_INVALID;
|
|||||||
static void vibration_motor_timer_irq_cb(void *p)
|
static void vibration_motor_timer_irq_cb(void *p)
|
||||||
{
|
{
|
||||||
(void)p;
|
(void)p;
|
||||||
//tls_gpio_write(VIBRATION_MOTOR_ENABLE, 0);
|
|
||||||
tls_pwm_stop(VIBRATION_MOTOR_PWM_CHANNEL);
|
tls_pwm_stop(VIBRATION_MOTOR_PWM_CHANNEL);
|
||||||
tls_gpio_cfg(VIBRATION_MOTOR_ENABLE, WM_GPIO_DIR_OUTPUT, WM_GPIO_ATTR_FLOATING);
|
tls_gpio_cfg(VIBRATION_MOTOR_ENABLE, WM_GPIO_DIR_OUTPUT, WM_GPIO_ATTR_FLOATING);
|
||||||
tls_gpio_write(VIBRATION_MOTOR_ENABLE, 0);
|
tls_gpio_write(VIBRATION_MOTOR_ENABLE, 0);
|
||||||
|
@ -156,12 +156,6 @@ void gfx_task(void *param)
|
|||||||
|
|
||||||
lv_scr_load(watchFace.display);
|
lv_scr_load(watchFace.display);
|
||||||
|
|
||||||
/* Let's init the watch peripherals driver (vibration motor + battery voltage sense) */
|
|
||||||
watch_peripherals_init(27);
|
|
||||||
/* Make the first battery voltage reading here */
|
|
||||||
uint16_t battery_voltage = watch_peripherals_get_battery_voltage(Battery_Unit_mV);
|
|
||||||
battery_percentage = battery_voltage_to_percentage(battery_voltage);
|
|
||||||
|
|
||||||
/* Let's init the I2C interface */
|
/* Let's init the I2C interface */
|
||||||
i2c_init(I2C_SDA, I2C_SCL, 100000);
|
i2c_init(I2C_SDA, I2C_SCL, 100000);
|
||||||
|
|
||||||
@ -265,6 +259,13 @@ void gfx_task(void *param)
|
|||||||
else
|
else
|
||||||
APP_LOG_INFO("BMA456 set pin conf failed");
|
APP_LOG_INFO("BMA456 set pin conf failed");
|
||||||
|
|
||||||
|
/* Let's init the watch peripherals driver (vibration motor + battery voltage sense) */
|
||||||
|
watch_peripherals_init(27);
|
||||||
|
/* Make the first battery voltage reading here */
|
||||||
|
uint16_t battery_voltage = watch_peripherals_get_battery_voltage(Battery_Unit_mV);
|
||||||
|
battery_percentage = battery_voltage_to_percentage(battery_voltage);
|
||||||
|
watch_face_set_battery_indicator(&watchFace, battery_percentage);
|
||||||
|
|
||||||
/* Once we are done with the initializing steps we
|
/* Once we are done with the initializing steps we
|
||||||
don't forget to turn the backlight on ! */
|
don't forget to turn the backlight on ! */
|
||||||
setBrightness(persistency_get_settings()->display.brightness);
|
setBrightness(persistency_get_settings()->display.brightness);
|
||||||
|
Loading…
Reference in New Issue
Block a user