summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJean-François Milants <jf@codingfield.com>2021-03-07 08:44:14 +0100
committerJean-François Milants <jf@codingfield.com>2021-03-07 08:44:14 +0100
commit9f67e6f6525bd4071609ff9edd6ce132d7ca1464 (patch)
tree65b2dc22bb257c6dd4fc8be77762173b564c340c /src
parent740b3d7b58dd92a6a6f99620a090ae4f05c03299 (diff)
parentada942535718d48eec37cca4f50d678e7201dc67 (diff)
Merge branch 'develop' into recovery-firmware
# Conflicts: # src/CMakeLists.txt # src/displayapp/DisplayApp.h # src/systemtask/SystemTask.cpp # src/systemtask/SystemTask.h
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt305
-rw-r--r--src/FreeRTOS/port_cmsis.c20
-rw-r--r--src/FreeRTOS/portmacro_cmsis.h6
-rw-r--r--src/FreeRTOSConfig.h2
-rw-r--r--src/components/ble/AlertNotificationClient.h2
-rw-r--r--src/components/ble/AlertNotificationService.cpp65
-rw-r--r--src/components/ble/AlertNotificationService.h35
-rw-r--r--src/components/ble/BatteryInformationService.cpp1
-rw-r--r--src/components/ble/CurrentTimeClient.cpp1
-rw-r--r--src/components/ble/CurrentTimeService.cpp1
-rw-r--r--src/components/ble/HeartRateService.cpp4
-rw-r--r--src/components/ble/NimbleController.cpp4
-rw-r--r--src/components/ble/NimbleController.h1
-rw-r--r--src/components/ble/NotificationManager.cpp8
-rw-r--r--src/components/ble/NotificationManager.h3
-rw-r--r--src/components/heartrate/Ppg.cpp2
-rw-r--r--src/components/motor/MotorController.cpp25
-rw-r--r--src/components/motor/MotorController.h19
-rw-r--r--src/displayapp/Apps.h2
-rw-r--r--src/displayapp/DisplayApp.cpp11
-rw-r--r--src/displayapp/DisplayApp.h3
-rw-r--r--src/displayapp/DisplayAppRecovery.h1
-rw-r--r--src/displayapp/LittleVgl.cpp627
-rw-r--r--src/displayapp/LittleVgl.h60
-rw-r--r--src/displayapp/fonts/Readme.md6
-rw-r--r--src/displayapp/fonts/jetbrains_mono_bold_20.c878
-rw-r--r--src/displayapp/lv_pinetime_theme.c482
-rw-r--r--src/displayapp/lv_pinetime_theme.h62
-rw-r--r--src/displayapp/screens/ApplicationList.cpp2
-rw-r--r--src/displayapp/screens/Brightness.cpp5
-rw-r--r--src/displayapp/screens/Clock.cpp80
-rw-r--r--src/displayapp/screens/Clock.h31
-rw-r--r--src/displayapp/screens/DropDownDemo.cpp2
-rw-r--r--src/displayapp/screens/FirmwareUpdate.cpp2
-rw-r--r--src/displayapp/screens/FirmwareValidation.cpp2
-rw-r--r--src/displayapp/screens/Gauge.cpp57
-rw-r--r--src/displayapp/screens/Gauge.h30
-rw-r--r--src/displayapp/screens/HeartRate.cpp18
-rw-r--r--src/displayapp/screens/InfiniPaint.cpp2
-rw-r--r--src/displayapp/screens/Meter.cpp30
-rw-r--r--src/displayapp/screens/Modal.cpp81
-rw-r--r--src/displayapp/screens/Modal.h36
-rw-r--r--src/displayapp/screens/Music.cpp18
-rw-r--r--src/displayapp/screens/Navigation.cpp3
-rw-r--r--src/displayapp/screens/Notifications.cpp248
-rw-r--r--src/displayapp/screens/Notifications.h58
-rw-r--r--src/displayapp/screens/Paddle.cpp2
-rw-r--r--src/displayapp/screens/Symbols.h10
-rw-r--r--src/displayapp/screens/Tile.cpp7
-rw-r--r--src/displayapp/screens/Tile.h3
-rw-r--r--src/displayapp/screens/Twos.cpp97
-rw-r--r--src/displayapp/screens/Twos.h7
-rw-r--r--src/drivers/Hrs3300.cpp9
-rw-r--r--src/libs/lv_conf.h405
-rw-r--r--src/libs/lvgl/LICENCE.txt8
-rw-r--r--src/libs/lvgl/README.md398
-rw-r--r--src/libs/lvgl/docs/CODE_OF_CONDUCT.md46
-rw-r--r--src/libs/lvgl/docs/CODING_STYLE.md94
-rw-r--r--src/libs/lvgl/docs/CONTRIBUTING.md111
-rw-r--r--src/libs/lvgl/library.json14
-rw-r--r--src/libs/lvgl/lv_conf_template.h591
-rw-r--r--src/libs/lvgl/lvgl.h97
-rw-r--r--src/libs/lvgl/lvgl.mk8
-rw-r--r--src/libs/lvgl/patches/0001-lv_refr-add-support-for-selecting-render-direction.patch122
-rw-r--r--src/libs/lvgl/patches/0002-fix_bug_in_animation_management_for_lv_label.patch51
-rw-r--r--src/libs/lvgl/porting/lv_port_disp_template.c196
-rw-r--r--src/libs/lvgl/porting/lv_port_disp_template.h44
-rw-r--r--src/libs/lvgl/porting/lv_port_fs_template.c379
-rw-r--r--src/libs/lvgl/porting/lv_port_fs_template.h44
-rw-r--r--src/libs/lvgl/porting/lv_port_indev_template.c428
-rw-r--r--src/libs/lvgl/porting/lv_port_indev_template.h45
-rw-r--r--src/libs/lvgl/scripts/Doxyfile2455
-rw-r--r--src/libs/lvgl/scripts/built_in_font/FontAwesome5-Solid+Brands+Regular.woffbin353228 -> 0 bytes
-rw-r--r--src/libs/lvgl/scripts/built_in_font/Roboto-Regular.woffbin61736 -> 0 bytes
-rw-r--r--src/libs/lvgl/scripts/built_in_font/built_in_font_gen.py47
-rwxr-xr-xsrc/libs/lvgl/scripts/clang-formatter.sh13
-rwxr-xr-xsrc/libs/lvgl/scripts/cppcheck_run.sh2
-rwxr-xr-xsrc/libs/lvgl/scripts/lv_conf_checker.py60
-rw-r--r--src/libs/lvgl/src/lv_conf_checker.h851
-rw-r--r--src/libs/lvgl/src/lv_core/lv_core.mk12
-rw-r--r--src/libs/lvgl/src/lv_core/lv_debug.c193
-rw-r--r--src/libs/lvgl/src/lv_core/lv_debug.h154
-rw-r--r--src/libs/lvgl/src/lv_core/lv_disp.c178
-rw-r--r--src/libs/lvgl/src/lv_core/lv_disp.h152
-rw-r--r--src/libs/lvgl/src/lv_core/lv_group.c708
-rw-r--r--src/libs/lvgl/src/lv_core/lv_group.h293
-rw-r--r--src/libs/lvgl/src/lv_core/lv_indev.c1240
-rw-r--r--src/libs/lvgl/src/lv_core/lv_indev.h159
-rw-r--r--src/libs/lvgl/src/lv_core/lv_obj.c2649
-rw-r--r--src/libs/lvgl/src/lv_core/lv_obj.h1025
-rw-r--r--src/libs/lvgl/src/lv_core/lv_refr.c612
-rw-r--r--src/libs/lvgl/src/lv_core/lv_refr.h93
-rw-r--r--src/libs/lvgl/src/lv_core/lv_style.c353
-rw-r--r--src/libs/lvgl/src/lv_core/lv_style.h301
-rw-r--r--src/libs/lvgl/src/lv_draw/lv_draw.c191
-rw-r--r--src/libs/lvgl/src/lv_draw/lv_draw.h109
-rw-r--r--src/libs/lvgl/src/lv_draw/lv_draw.mk15
-rw-r--r--src/libs/lvgl/src/lv_draw/lv_draw_arc.c251
-rw-r--r--src/libs/lvgl/src/lv_draw/lv_draw_arc.h52
-rw-r--r--src/libs/lvgl/src/lv_draw/lv_draw_basic.c783
-rw-r--r--src/libs/lvgl/src/lv_draw/lv_draw_basic.h82
-rw-r--r--src/libs/lvgl/src/lv_draw/lv_draw_img.c601
-rw-r--r--src/libs/lvgl/src/lv_draw/lv_draw_img.h172
-rw-r--r--src/libs/lvgl/src/lv_draw/lv_draw_label.c319
-rw-r--r--src/libs/lvgl/src/lv_draw/lv_draw_label.h80
-rw-r--r--src/libs/lvgl/src/lv_draw/lv_draw_line.c637
-rw-r--r--src/libs/lvgl/src/lv_draw/lv_draw_line.h48
-rw-r--r--src/libs/lvgl/src/lv_draw/lv_draw_rect.c1521
-rw-r--r--src/libs/lvgl/src/lv_draw/lv_draw_rect.h47
-rw-r--r--src/libs/lvgl/src/lv_draw/lv_draw_triangle.c343
-rw-r--r--src/libs/lvgl/src/lv_draw/lv_draw_triangle.h58
-rw-r--r--src/libs/lvgl/src/lv_draw/lv_img_cache.c206
-rw-r--r--src/libs/lvgl/src/lv_draw/lv_img_cache.h78
-rw-r--r--src/libs/lvgl/src/lv_draw/lv_img_decoder.c756
-rw-r--r--src/libs/lvgl/src/lv_draw/lv_img_decoder.h357
-rw-r--r--src/libs/lvgl/src/lv_font/lv_font.c84
-rw-r--r--src/libs/lvgl/src/lv_font/lv_font.h164
-rw-r--r--src/libs/lvgl/src/lv_font/lv_font.mk12
-rw-r--r--src/libs/lvgl/src/lv_font/lv_font_fmt_txt.c479
-rw-r--r--src/libs/lvgl/src/lv_font/lv_font_fmt_txt.h235
-rw-r--r--src/libs/lvgl/src/lv_font/lv_font_roboto_12.c1628
-rw-r--r--src/libs/lvgl/src/lv_font/lv_font_roboto_12_subpx.c3419
-rw-r--r--src/libs/lvgl/src/lv_font/lv_font_roboto_16.c2116
-rw-r--r--src/libs/lvgl/src/lv_font/lv_font_roboto_22.c3224
-rw-r--r--src/libs/lvgl/src/lv_font/lv_font_roboto_28.c4609
-rw-r--r--src/libs/lvgl/src/lv_font/lv_font_roboto_28_compressed.c2451
-rw-r--r--src/libs/lvgl/src/lv_font/lv_font_unscii_8.c462
-rw-r--r--src/libs/lvgl/src/lv_font/lv_symbol_def.h159
-rw-r--r--src/libs/lvgl/src/lv_hal/lv_hal.h40
-rw-r--r--src/libs/lvgl/src/lv_hal/lv_hal.mk8
-rw-r--r--src/libs/lvgl/src/lv_hal/lv_hal_disp.c359
-rw-r--r--src/libs/lvgl/src/lv_hal/lv_hal_disp.h298
-rw-r--r--src/libs/lvgl/src/lv_hal/lv_hal_indev.c158
-rw-r--r--src/libs/lvgl/src/lv_hal/lv_hal_indev.h213
-rw-r--r--src/libs/lvgl/src/lv_hal/lv_hal_tick.c100
-rw-r--r--src/libs/lvgl/src/lv_hal/lv_hal_tick.h70
-rw-r--r--src/libs/lvgl/src/lv_misc/lv_anim.c474
-rw-r--r--src/libs/lvgl/src/lv_misc/lv_anim.h331
-rw-r--r--src/libs/lvgl/src/lv_misc/lv_area.c210
-rw-r--r--src/libs/lvgl/src/lv_misc/lv_area.h186
-rw-r--r--src/libs/lvgl/src/lv_misc/lv_async.c75
-rw-r--r--src/libs/lvgl/src/lv_misc/lv_async.h62
-rw-r--r--src/libs/lvgl/src/lv_misc/lv_bidi.c544
-rw-r--r--src/libs/lvgl/src/lv_misc/lv_bidi.h76
-rw-r--r--src/libs/lvgl/src/lv_misc/lv_circ.c79
-rw-r--r--src/libs/lvgl/src/lv_misc/lv_circ.h77
-rw-r--r--src/libs/lvgl/src/lv_misc/lv_color.c171
-rw-r--r--src/libs/lvgl/src/lv_misc/lv_color.h526
-rw-r--r--src/libs/lvgl/src/lv_misc/lv_fs.c642
-rw-r--r--src/libs/lvgl/src/lv_misc/lv_fs.h299
-rw-r--r--src/libs/lvgl/src/lv_misc/lv_gc.c51
-rw-r--r--src/libs/lvgl/src/lv_misc/lv_gc.h77
-rw-r--r--src/libs/lvgl/src/lv_misc/lv_ll.c422
-rw-r--r--src/libs/lvgl/src/lv_misc/lv_ll.h160
-rw-r--r--src/libs/lvgl/src/lv_misc/lv_log.c78
-rw-r--r--src/libs/lvgl/src/lv_misc/lv_log.h144
-rw-r--r--src/libs/lvgl/src/lv_misc/lv_math.c203
-rw-r--r--src/libs/lvgl/src/lv_misc/lv_math.h85
-rw-r--r--src/libs/lvgl/src/lv_misc/lv_mem.c481
-rw-r--r--src/libs/lvgl/src/lv_misc/lv_mem.h113
-rw-r--r--src/libs/lvgl/src/lv_misc/lv_misc.mk22
-rw-r--r--src/libs/lvgl/src/lv_misc/lv_printf.c852
-rw-r--r--src/libs/lvgl/src/lv_misc/lv_printf.h75
-rw-r--r--src/libs/lvgl/src/lv_misc/lv_task.c382
-rw-r--r--src/libs/lvgl/src/lv_misc/lv_task.h177
-rw-r--r--src/libs/lvgl/src/lv_misc/lv_templ.c40
-rw-r--r--src/libs/lvgl/src/lv_misc/lv_templ.h37
-rw-r--r--src/libs/lvgl/src/lv_misc/lv_txt.c845
-rw-r--r--src/libs/lvgl/src/lv_misc/lv_txt.h211
-rw-r--r--src/libs/lvgl/src/lv_misc/lv_types.h64
-rw-r--r--src/libs/lvgl/src/lv_misc/lv_utils.c115
-rw-r--r--src/libs/lvgl/src/lv_misc/lv_utils.h66
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_arc.c305
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_arc.h123
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_bar.c548
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_bar.h193
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_btn.c723
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_btn.h329
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_btnm.c1125
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_btnm.h276
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_calendar.c983
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_calendar.h229
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_canvas.c870
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_canvas.h265
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_cb.c338
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_cb.h173
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_chart.c1557
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_chart.h395
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_cont.c710
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_cont.h210
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_cpicker.c1068
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_cpicker.h263
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_ddlist.c1032
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_ddlist.h269
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_gauge.c473
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_gauge.h233
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_img.c435
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_img.h179
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_imgbtn.c437
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_imgbtn.h230
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_kb.c471
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_kb.h207
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_label.c1441
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_label.h351
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_led.c258
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_led.h126
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_line.c308
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_line.h147
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_list.c1067
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_list.h359
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_lmeter.c422
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_lmeter.h179
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_mbox.c573
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_mbox.h212
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_objx.mk37
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_objx_templ.c229
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_objx_templ.h108
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_page.c1263
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_page.h416
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_preload.c444
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_preload.h197
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_roller.c733
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_roller.h212
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_slider.c620
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_slider.h216
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_spinbox.c479
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_spinbox.h188
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_sw.c403
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_sw.h159
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_ta.c1948
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_ta.h478
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_table.c894
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_table.h268
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_tabview.c1175
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_tabview.h231
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_tileview.c584
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_tileview.h178
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_win.c618
-rw-r--r--src/libs/lvgl/src/lv_objx/lv_win.h302
-rw-r--r--src/libs/lvgl/src/lv_themes/lv_theme.c124
-rw-r--r--src/libs/lvgl/src/lv_themes/lv_theme.h382
-rw-r--r--src/libs/lvgl/src/lv_themes/lv_theme_alien.c958
-rw-r--r--src/libs/lvgl/src/lv_themes/lv_theme_alien.h59
-rw-r--r--src/libs/lvgl/src/lv_themes/lv_theme_default.c477
-rw-r--r--src/libs/lvgl/src/lv_themes/lv_theme_default.h60
-rw-r--r--src/libs/lvgl/src/lv_themes/lv_theme_material.c936
-rw-r--r--src/libs/lvgl/src/lv_themes/lv_theme_material.h60
-rw-r--r--src/libs/lvgl/src/lv_themes/lv_theme_mono.c525
-rw-r--r--src/libs/lvgl/src/lv_themes/lv_theme_mono.h60
-rw-r--r--src/libs/lvgl/src/lv_themes/lv_theme_nemo.c929
-rw-r--r--src/libs/lvgl/src/lv_themes/lv_theme_nemo.h60
-rw-r--r--src/libs/lvgl/src/lv_themes/lv_theme_night.c847
-rw-r--r--src/libs/lvgl/src/lv_themes/lv_theme_night.h60
-rw-r--r--src/libs/lvgl/src/lv_themes/lv_theme_templ.c473
-rw-r--r--src/libs/lvgl/src/lv_themes/lv_theme_templ.h60
-rw-r--r--src/libs/lvgl/src/lv_themes/lv_theme_zen.c902
-rw-r--r--src/libs/lvgl/src/lv_themes/lv_theme_zen.h60
-rw-r--r--src/libs/lvgl/src/lv_themes/lv_themes.mk14
-rw-r--r--src/libs/lvgl/src/lv_version.h66
-rw-r--r--src/libs/mynewt-nimble/apps/README.md54
-rw-r--r--src/libs/mynewt-nimble/apps/blemesh/src/main.c24
-rw-r--r--src/libs/mynewt-nimble/apps/blemesh_light/src/light_model.c30
-rw-r--r--src/libs/mynewt-nimble/apps/blemesh_light/src/light_model.h12
-rw-r--r--src/libs/mynewt-nimble/apps/blemesh_light/src/main.c4
-rw-r--r--src/libs/mynewt-nimble/apps/blemesh_models_example_1/src/main.c58
-rw-r--r--src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/ble_mesh.c6
-rw-r--r--src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/device_composition.c171
-rw-r--r--src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/device_composition.h122
-rw-r--r--src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/main.c24
-rw-r--r--src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/publisher.c8
-rw-r--r--src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/state_binding.c42
-rw-r--r--src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/state_binding.h10
-rw-r--r--src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/storage.c14
-rw-r--r--src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/storage.h4
-rw-r--r--src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/transition.c28
-rw-r--r--src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/transition.h30
-rw-r--r--src/libs/mynewt-nimble/apps/blemesh_shell/src/main.c10
-rw-r--r--src/libs/mynewt-nimble/apps/blestress/src/rx_stress.c19
-rw-r--r--src/libs/mynewt-nimble/apps/blestress/src/stress.c7
-rw-r--r--src/libs/mynewt-nimble/apps/blestress/src/stress.h3
-rw-r--r--src/libs/mynewt-nimble/apps/blestress/src/tx_stress.c22
-rw-r--r--src/libs/mynewt-nimble/apps/btshell/src/cmd.c16
-rw-r--r--src/libs/mynewt-nimble/apps/bttester/pkg.yml2
-rw-r--r--src/libs/mynewt-nimble/apps/bttester/src/bttester.c44
-rw-r--r--src/libs/mynewt-nimble/apps/bttester/src/bttester.h743
-rw-r--r--src/libs/mynewt-nimble/apps/bttester/src/bttester_pipe.h6
-rw-r--r--src/libs/mynewt-nimble/apps/bttester/src/gap.c162
-rw-r--r--src/libs/mynewt-nimble/apps/bttester/src/gatt.c144
-rw-r--r--src/libs/mynewt-nimble/apps/bttester/src/glue.c4
-rw-r--r--src/libs/mynewt-nimble/apps/bttester/src/glue.h18
-rw-r--r--src/libs/mynewt-nimble/apps/bttester/src/l2cap.c375
-rw-r--r--src/libs/mynewt-nimble/apps/bttester/src/mesh.c182
-rw-r--r--src/libs/mynewt-nimble/apps/bttester/src/rtt_pipe.c8
-rw-r--r--src/libs/mynewt-nimble/apps/bttester/src/uart_pipe.c8
-rw-r--r--src/libs/mynewt-nimble/apps/bttester/syscfg.yml18
-rwxr-xr-xsrc/libs/mynewt-nimble/apps/central/pkg.yml34
-rwxr-xr-xsrc/libs/mynewt-nimble/apps/central/src/main.c186
-rw-r--r--src/libs/mynewt-nimble/apps/mesh_badge/README.md48
-rw-r--r--src/libs/mynewt-nimble/apps/mesh_badge/pkg.yml39
-rw-r--r--src/libs/mynewt-nimble/apps/mesh_badge/src/board.h15
-rw-r--r--src/libs/mynewt-nimble/apps/mesh_badge/src/gatt_svr.c226
-rw-r--r--src/libs/mynewt-nimble/apps/mesh_badge/src/main.c393
-rw-r--r--src/libs/mynewt-nimble/apps/mesh_badge/src/mesh.c313
-rw-r--r--src/libs/mynewt-nimble/apps/mesh_badge/src/mesh.h14
-rw-r--r--src/libs/mynewt-nimble/apps/mesh_badge/src/mesh_badge.h28
-rw-r--r--src/libs/mynewt-nimble/apps/mesh_badge/src/reel_board.c508
-rw-r--r--src/libs/mynewt-nimble/apps/mesh_badge/syscfg.yml58
-rw-r--r--src/libs/mynewt-nimble/nimble/controller/include/controller/ble_ll.h30
-rw-r--r--src/libs/mynewt-nimble/nimble/controller/include/controller/ble_ll_conn.h7
-rw-r--r--src/libs/mynewt-nimble/nimble/controller/include/controller/ble_ll_ctrl.h87
-rw-r--r--src/libs/mynewt-nimble/nimble/controller/include/controller/ble_ll_hci.h2
-rw-r--r--src/libs/mynewt-nimble/nimble/controller/include/controller/ble_ll_iso.h53
-rw-r--r--src/libs/mynewt-nimble/nimble/controller/include/controller/ble_phy.h2
-rw-r--r--src/libs/mynewt-nimble/nimble/controller/src/ble_ll.c63
-rw-r--r--src/libs/mynewt-nimble/nimble/controller/src/ble_ll_adv.c30
-rw-r--r--src/libs/mynewt-nimble/nimble/controller/src/ble_ll_conn.c470
-rw-r--r--src/libs/mynewt-nimble/nimble/controller/src/ble_ll_conn_hci.c35
-rw-r--r--src/libs/mynewt-nimble/nimble/controller/src/ble_ll_conn_priv.h13
-rw-r--r--src/libs/mynewt-nimble/nimble/controller/src/ble_ll_ctrl.c133
-rw-r--r--src/libs/mynewt-nimble/nimble/controller/src/ble_ll_hci.c220
-rw-r--r--src/libs/mynewt-nimble/nimble/controller/src/ble_ll_hci_ev.c31
-rw-r--r--src/libs/mynewt-nimble/nimble/controller/src/ble_ll_iso.c146
-rw-r--r--src/libs/mynewt-nimble/nimble/controller/src/ble_ll_rand.c18
-rw-r--r--src/libs/mynewt-nimble/nimble/controller/src/ble_ll_scan.c52
-rw-r--r--src/libs/mynewt-nimble/nimble/controller/src/ble_ll_sched.c32
-rw-r--r--src/libs/mynewt-nimble/nimble/controller/src/ble_ll_supp_cmd.c91
-rw-r--r--src/libs/mynewt-nimble/nimble/controller/src/ble_ll_sync.c4
-rw-r--r--src/libs/mynewt-nimble/nimble/controller/src/ble_ll_utils.c7
-rw-r--r--src/libs/mynewt-nimble/nimble/controller/syscfg.yml70
-rw-r--r--src/libs/mynewt-nimble/nimble/drivers/dialog_cmac/README.md68
-rw-r--r--src/libs/mynewt-nimble/nimble/drivers/dialog_cmac/include/ble/xcvr.h39
-rw-r--r--src/libs/mynewt-nimble/nimble/drivers/dialog_cmac/pkg.yml33
-rw-r--r--src/libs/mynewt-nimble/nimble/drivers/dialog_cmac/src/ble_hw.c340
-rw-r--r--src/libs/mynewt-nimble/nimble/drivers/dialog_cmac/src/ble_hw_priv.h29
-rw-r--r--src/libs/mynewt-nimble/nimble/drivers/dialog_cmac/src/ble_phy.c1798
-rw-r--r--src/libs/mynewt-nimble/nimble/drivers/dialog_cmac/src/ble_rf.c747
-rw-r--r--src/libs/mynewt-nimble/nimble/drivers/dialog_cmac/src/ble_rf_priv.h38
-rw-r--r--src/libs/mynewt-nimble/nimble/drivers/dialog_cmac/syscfg.yml29
-rw-r--r--src/libs/mynewt-nimble/nimble/drivers/native/src/ble_hw.c23
-rw-r--r--src/libs/mynewt-nimble/nimble/drivers/nrf5340/include/ble/xcvr.h50
-rw-r--r--src/libs/mynewt-nimble/nimble/drivers/nrf5340/pkg.yml31
-rw-r--r--src/libs/mynewt-nimble/nimble/drivers/nrf5340/src/ble_hw.c475
-rw-r--r--src/libs/mynewt-nimble/nimble/drivers/nrf5340/src/ble_phy.c1820
-rw-r--r--src/libs/mynewt-nimble/nimble/drivers/nrf5340/src/ble_phy_trace.c44
-rw-r--r--src/libs/mynewt-nimble/nimble/drivers/nrf5340/syscfg.yml23
-rw-r--r--src/libs/mynewt-nimble/nimble/host/include/host/ble_gap.h52
-rw-r--r--src/libs/mynewt-nimble/nimble/host/include/host/ble_hs_log.h1
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/access.h109
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/atomic.h409
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/cdb.h267
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/cfg.h485
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/cfg_cli.h244
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/cfg_srv.h42
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/glue.h196
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/health_cli.h42
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/health_srv.h20
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/heartbeat.h123
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/main.h198
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/mesh.h5
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/model_cli.h18
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/model_srv.h24
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/testing.h22
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/access.c188
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/access.h23
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/adv.c47
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/adv.h19
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/aes-ccm.c224
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/app_keys.c507
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/app_keys.h86
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/beacon.c281
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/beacon.h1
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/cdb.c389
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/cfg.c267
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/cfg.h9
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/cfg_cli.c901
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/cfg_srv.c1792
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/crypto.c546
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/crypto.h143
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/foundation.h42
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/friend.c440
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/friend.h20
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/glue.c91
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/health_cli.c68
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/health_srv.c38
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/heartbeat.c351
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/heartbeat.h40
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/light_model.c22
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/light_model.h12
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/lpn.c195
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/lpn.h6
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/mesh.c231
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/mesh_priv.h22
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/model_cli.c30
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/model_srv.c16
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/net.c1146
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/net.h245
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/pb_adv.c888
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/pb_gatt.c158
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/prov.c1892
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/prov.h133
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/prov_bearer.h116
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/prov_device.c569
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/provisioner.c746
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/provisioner.h10
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/proxy.c271
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/proxy.h15
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/rpl.c162
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/rpl.h30
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/settings.c1290
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/settings.h17
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/shell.c1226
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/subnet.c666
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/subnet.h197
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/testing.c67
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/testing.h12
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/transport.c1193
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/src/transport.h80
-rw-r--r--src/libs/mynewt-nimble/nimble/host/mesh/syscfg.yml280
-rw-r--r--src/libs/mynewt-nimble/nimble/host/pts/tpg/94654-20170317-085122560.tpg4
-rw-r--r--src/libs/mynewt-nimble/nimble/host/pts/tpg/94654-20170317-085441153.pts2
-rw-r--r--src/libs/mynewt-nimble/nimble/host/services/bas/include/services/bas/ble_svc_bas.h2
-rw-r--r--src/libs/mynewt-nimble/nimble/host/services/gap/include/services/gap/ble_svc_gap.h1
-rw-r--r--src/libs/mynewt-nimble/nimble/host/src/ble_att_cmd.c7
-rw-r--r--src/libs/mynewt-nimble/nimble/host/src/ble_att_svr.c2
-rw-r--r--src/libs/mynewt-nimble/nimble/host/src/ble_eddystone.c2
-rw-r--r--src/libs/mynewt-nimble/nimble/host/src/ble_gap.c128
-rw-r--r--src/libs/mynewt-nimble/nimble/host/src/ble_gap_priv.h3
-rw-r--r--src/libs/mynewt-nimble/nimble/host/src/ble_hs.c13
-rw-r--r--src/libs/mynewt-nimble/nimble/host/src/ble_hs_conn.c111
-rw-r--r--src/libs/mynewt-nimble/nimble/host/src/ble_hs_flow.c40
-rw-r--r--src/libs/mynewt-nimble/nimble/host/src/ble_hs_flow_priv.h2
-rw-r--r--src/libs/mynewt-nimble/nimble/host/src/ble_hs_hci.c4
-rw-r--r--src/libs/mynewt-nimble/nimble/host/src/ble_hs_misc.c8
-rw-r--r--src/libs/mynewt-nimble/nimble/host/src/ble_hs_priv.h6
-rw-r--r--src/libs/mynewt-nimble/nimble/host/src/ble_l2cap_coc.c65
-rw-r--r--src/libs/mynewt-nimble/nimble/host/src/ble_l2cap_sig.c24
-rw-r--r--src/libs/mynewt-nimble/nimble/host/src/ble_l2cap_sig_cmd.c8
-rw-r--r--src/libs/mynewt-nimble/nimble/host/src/ble_monitor.c3
-rw-r--r--src/libs/mynewt-nimble/nimble/host/src/ble_sm.c5
-rw-r--r--src/libs/mynewt-nimble/nimble/host/src/ble_sm_alg.c2
-rw-r--r--src/libs/mynewt-nimble/nimble/host/src/ble_sm_cmd.c11
-rw-r--r--src/libs/mynewt-nimble/nimble/host/src/ble_sm_priv.h8
-rw-r--r--src/libs/mynewt-nimble/nimble/host/src/ble_store_util.c16
-rw-r--r--src/libs/mynewt-nimble/nimble/host/store/config/src/ble_store_config.c1
-rw-r--r--src/libs/mynewt-nimble/nimble/host/store/ram/include/store/ram/ble_store_ram.h5
-rw-r--r--src/libs/mynewt-nimble/nimble/host/store/ram/src/ble_store_ram.c5
-rw-r--r--src/libs/mynewt-nimble/nimble/host/store/ram/syscfg.yml9
-rw-r--r--src/libs/mynewt-nimble/nimble/host/test/src/ble_gap_test.c67
-rw-r--r--src/libs/mynewt-nimble/nimble/include/nimble/ble.h9
-rw-r--r--src/libs/mynewt-nimble/nimble/include/nimble/hci_common.h338
-rw-r--r--src/libs/mynewt-nimble/nimble/syscfg.yml13
-rw-r--r--src/libs/mynewt-nimble/nimble/transport/dialog_cmac/.gitignore2
-rw-r--r--src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/diag/pkg.yml28
-rw-r--r--src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/diag/src/cmac_diag.c68
-rw-r--r--src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/include/cmac_driver/cmac_diag.h34
-rw-r--r--src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/include/cmac_driver/cmac_host.h35
-rw-r--r--src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/include/cmac_driver/cmac_shared.h193
-rw-r--r--src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/pkg.yml39
-rwxr-xr-xsrc/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/scripts/build_libcmac.sh45
-rwxr-xr-xsrc/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/scripts/create_cmac_bin.sh31
-rw-r--r--src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/src/cmac_host.c326
-rw-r--r--src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/src/cmac_mbox.c162
-rw-r--r--src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/src/cmac_rand.c145
-rw-r--r--src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/src/cmac_shared.c98
-rw-r--r--src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/syscfg.yml104
-rw-r--r--src/libs/mynewt-nimble/nimble/transport/dialog_cmac/pkg.yml36
-rw-r--r--src/libs/mynewt-nimble/nimble/transport/dialog_cmac/src/ble_hci_cmac_common.c194
-rw-r--r--src/libs/mynewt-nimble/nimble/transport/dialog_cmac/src/ble_hci_cmac_hs.c153
-rw-r--r--src/libs/mynewt-nimble/nimble/transport/dialog_cmac/src/ble_hci_cmac_ll.c141
-rw-r--r--src/libs/mynewt-nimble/nimble/transport/dialog_cmac/src/ble_hci_cmac_priv.h29
-rw-r--r--src/libs/mynewt-nimble/nimble/transport/dialog_cmac/src/ble_hci_trans_h4.c332
-rw-r--r--src/libs/mynewt-nimble/nimble/transport/dialog_cmac/src/ble_hci_trans_h4.h49
-rw-r--r--src/libs/mynewt-nimble/nimble/transport/dialog_cmac/syscfg.yml43
-rw-r--r--src/libs/mynewt-nimble/nimble/transport/emspi/src/ble_hci_emspi.c10
-rw-r--r--src/libs/mynewt-nimble/nimble/transport/nrf5340/pkg.yml38
-rw-r--r--src/libs/mynewt-nimble/nimble/transport/nrf5340/src/nrf5340_ble_hci.c426
-rw-r--r--src/libs/mynewt-nimble/nimble/transport/nrf5340/syscfg.yml51
-rw-r--r--src/libs/mynewt-nimble/nimble/transport/pkg.yml9
-rw-r--r--src/libs/mynewt-nimble/nimble/transport/socket/src/ble_hci_socket.c183
-rw-r--r--src/libs/mynewt-nimble/nimble/transport/syscfg.yml17
-rw-r--r--src/libs/mynewt-nimble/nimble/transport/uart/src/ble_hci_uart.c2
-rw-r--r--src/libs/mynewt-nimble/nimble/transport/usb/pkg.yml39
-rw-r--r--src/libs/mynewt-nimble/nimble/transport/usb/src/ble_hci_usb.c410
-rw-r--r--src/libs/mynewt-nimble/nimble/transport/usb/syscfg.yml57
-rw-r--r--src/libs/mynewt-nimble/porting/examples/linux/include/logcfg/logcfg.h2
-rw-r--r--src/libs/mynewt-nimble/porting/examples/linux/include/syscfg/syscfg.h22
-rw-r--r--src/libs/mynewt-nimble/porting/examples/linux/include/sysflash/sysflash.h2
-rw-r--r--src/libs/mynewt-nimble/porting/examples/linux_blemesh/ble.c24
-rw-r--r--src/libs/mynewt-nimble/porting/examples/linux_blemesh/include/logcfg/logcfg.h30
-rw-r--r--src/libs/mynewt-nimble/porting/examples/linux_blemesh/include/syscfg/syscfg.h165
-rw-r--r--src/libs/mynewt-nimble/porting/examples/linux_blemesh/include/sysflash/sysflash.h2
-rw-r--r--src/libs/mynewt-nimble/porting/examples/nuttx/Make.defs58
-rw-r--r--src/libs/mynewt-nimble/porting/examples/nuttx/ble.c118
-rw-r--r--src/libs/mynewt-nimble/porting/examples/nuttx/include/logcfg/logcfg.h32
-rw-r--r--src/libs/mynewt-nimble/porting/examples/nuttx/include/syscfg/syscfg.h1074
-rw-r--r--src/libs/mynewt-nimble/porting/examples/nuttx/include/sysflash/sysflash.h24
-rw-r--r--src/libs/mynewt-nimble/porting/examples/nuttx/main.c124
-rw-r--r--src/libs/mynewt-nimble/porting/nimble/Makefile.defs2
-rw-r--r--src/libs/mynewt-nimble/porting/nimble/include/log/log.h4
-rw-r--r--src/libs/mynewt-nimble/porting/nimble/include/log_common/log_common.h105
-rw-r--r--src/libs/mynewt-nimble/porting/nimble/include/logcfg/logcfg.h14
-rw-r--r--src/libs/mynewt-nimble/porting/nimble/include/modlog/modlog.h1
-rw-r--r--src/libs/mynewt-nimble/porting/nimble/include/syscfg/syscfg.h20
-rw-r--r--src/libs/mynewt-nimble/porting/nimble/include/sysflash/sysflash.h2
-rw-r--r--src/libs/mynewt-nimble/porting/nimble/src/nimble_port.c18
-rw-r--r--src/libs/mynewt-nimble/porting/npl/freertos/include/nimble/nimble_npl_os.h2
-rw-r--r--src/libs/mynewt-nimble/porting/npl/freertos/src/nimble_port_freertos.c4
-rw-r--r--src/libs/mynewt-nimble/porting/npl/freertos/src/npl_os_freertos.c6
-rw-r--r--src/libs/mynewt-nimble/porting/npl/nuttx/include/console/console.h36
-rw-r--r--src/libs/mynewt-nimble/porting/npl/nuttx/include/modlog/modlog.h68
-rw-r--r--src/libs/mynewt-nimble/porting/npl/nuttx/include/nimble/nimble_npl_os.h71
-rw-r--r--src/libs/mynewt-nimble/porting/npl/nuttx/include/nimble/os_types.h90
-rw-r--r--src/libs/mynewt-nimble/porting/npl/nuttx/src/os_atomic.c39
-rw-r--r--src/libs/mynewt-nimble/porting/npl/nuttx/src/os_callout.c166
-rw-r--r--src/libs/mynewt-nimble/porting/npl/nuttx/src/os_eventq.c177
-rw-r--r--src/libs/mynewt-nimble/porting/npl/nuttx/src/os_mutex.c82
-rw-r--r--src/libs/mynewt-nimble/porting/npl/nuttx/src/os_sem.c100
-rw-r--r--src/libs/mynewt-nimble/porting/npl/nuttx/src/os_task.c117
-rw-r--r--src/libs/mynewt-nimble/porting/npl/nuttx/src/os_time.c85
-rw-r--r--src/libs/mynewt-nimble/porting/npl/nuttx/src/wqueue.h104
-rw-r--r--src/libs/mynewt-nimble/porting/npl/nuttx/test/Make.defs58
-rw-r--r--src/libs/mynewt-nimble/porting/npl/nuttx/test/test_npl_callout.c116
-rw-r--r--src/libs/mynewt-nimble/porting/npl/nuttx/test/test_npl_eventq.c131
-rw-r--r--src/libs/mynewt-nimble/porting/npl/nuttx/test/test_npl_mempool.c111
-rw-r--r--src/libs/mynewt-nimble/porting/npl/nuttx/test/test_npl_sem.c155
-rw-r--r--src/libs/mynewt-nimble/porting/npl/nuttx/test/test_npl_task.c98
-rw-r--r--src/libs/mynewt-nimble/porting/npl/nuttx/test/test_util.h56
-rw-r--r--src/libs/mynewt-nimble/porting/npl/riot/include/logcfg/logcfg.h2
-rw-r--r--src/libs/mynewt-nimble/porting/npl/riot/include/syscfg/syscfg.h93
-rw-r--r--src/libs/mynewt-nimble/porting/npl/riot/include/sysflash/sysflash.h2
-rw-r--r--src/libs/mynewt-nimble/porting/targets/linux/pkg.yml2
-rw-r--r--src/libs/mynewt-nimble/porting/targets/linux_blemesh/pkg.yml2
-rw-r--r--src/libs/mynewt-nimble/porting/targets/nuttx/pkg.yml40
-rw-r--r--src/libs/mynewt-nimble/porting/targets/nuttx/syscfg.yml28
-rw-r--r--src/libs/mynewt-nimble/porting/targets/nuttx/target.yml20
-rw-r--r--src/libs/mynewt-nimble/porting/targets/porting_default/pkg.yml2
-rw-r--r--src/libs/mynewt-nimble/porting/targets/riot/pkg.yml2
-rw-r--r--src/libs/mynewt-nimble/porting/targets/riot/syscfg.yml2
-rwxr-xr-xsrc/libs/mynewt-nimble/porting/update_generated_files.sh10
-rw-r--r--src/libs/mynewt-nimble/targets/dialog_cmac/pkg.yml5
-rw-r--r--src/libs/mynewt-nimble/targets/dialog_cmac/syscfg.yml16
-rw-r--r--src/libs/mynewt-nimble/targets/dialog_cmac/target.yml3
-rw-r--r--src/main.cpp5
-rw-r--r--src/systemtask/SystemTask.cpp12
-rw-r--r--src/systemtask/SystemTask.h9
545 files changed, 33426 insertions, 100324 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index c39c1ac5..47b34335 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -2,6 +2,17 @@ cmake_minimum_required(VERSION 3.10)
project(pinetime-app C CXX ASM)
+
+set(CMAKE_C_STANDARD 99)
+set(CMAKE_CXX_STANDARD 14)
+
+# set(CMAKE_GENERATOR "Unix Makefiles")
+set(CMAKE_C_EXTENSIONS OFF)
+set(CMAKE_C_STANDARD_REQUIRED ON)
+set(CMAKE_CXX_EXTENSIONS OFF)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
+
# define some variables just for this example to determine file locations
set(NRF_PROJECT_NAME pinetime-app)
set(NRF_BOARD pca10040)
@@ -36,10 +47,12 @@ set(SDK_SOURCE_FILES
# Base SDK
"${NRF5_SDK_PATH}/components/boards/boards.c"
"${NRF5_SDK_PATH}/integration/nrfx/legacy/nrf_drv_clock.c"
+ "${NRF5_SDK_PATH}/integration/nrfx/legacy/nrf_drv_clock.h"
"${NRF5_SDK_PATH}/modules/nrfx/drivers/src/nrfx_clock.c"
"${NRF5_SDK_PATH}/modules/nrfx/drivers/src/nrfx_gpiote.c"
"${NRF5_SDK_PATH}/modules/nrfx/soc/nrfx_atomic.c"
"${NRF5_SDK_PATH}/modules/nrfx/drivers/src/nrfx_saadc.c"
+ "${NRF5_SDK_PATH}/components/libraries/timer/app_timer.h"
# FreeRTOS
${NRF5_SDK_PATH}/external/freertos/source/croutine.c
@@ -166,132 +179,180 @@ set(NIMBLE_SRC
set(LVGL_SRC
libs/lv_conf.h
libs/lvgl/lvgl.h
- libs/lvgl/src/lv_core/lv_obj.c
- libs/lvgl/src/lv_core/lv_obj.h
- libs/lvgl/src/lv_core/lv_group.c
- libs/lvgl/src/lv_core/lv_group.h
- libs/lvgl/src/lv_core/lv_disp.c
+
+ libs/lvgl/src/lvgl.h
+ libs/lvgl/src/lv_api_map.h
+ libs/lvgl/src/lv_conf_internal.h
libs/lvgl/src/lv_core/lv_disp.h
- libs/lvgl/src/lv_core/lv_debug.h
- libs/lvgl/src/lv_core/lv_debug.c
- libs/lvgl/src/lv_core/lv_indev.c
+ libs/lvgl/src/lv_core/lv_group.h
libs/lvgl/src/lv_core/lv_indev.h
- libs/lvgl/src/lv_core/lv_refr.c
+ libs/lvgl/src/lv_core/lv_obj.h
+ libs/lvgl/src/lv_core/lv_obj_style_dec.h
libs/lvgl/src/lv_core/lv_refr.h
- libs/lvgl/src/lv_core/lv_style.c
libs/lvgl/src/lv_core/lv_style.h
- libs/lvgl/src/lv_misc/lv_anim.c
+ libs/lvgl/src/lv_draw/lv_draw.h
+ libs/lvgl/src/lv_draw/lv_draw_arc.h
+ libs/lvgl/src/lv_draw/lv_draw_blend.h
+ libs/lvgl/src/lv_draw/lv_draw_img.h
+ libs/lvgl/src/lv_draw/lv_draw_label.h
+ libs/lvgl/src/lv_draw/lv_draw_line.h
+ libs/lvgl/src/lv_draw/lv_draw_mask.h
+ libs/lvgl/src/lv_draw/lv_draw_rect.h
+ libs/lvgl/src/lv_draw/lv_draw_triangle.h
+ libs/lvgl/src/lv_draw/lv_img_buf.h
+ libs/lvgl/src/lv_draw/lv_img_cache.h
+ libs/lvgl/src/lv_draw/lv_img_decoder.h
+ libs/lvgl/src/lv_font/lv_font.h
+ libs/lvgl/src/lv_font/lv_font_fmt_txt.h
+ libs/lvgl/src/lv_font/lv_font_loader.h
+ libs/lvgl/src/lv_font/lv_symbol_def.h
+ libs/lvgl/src/lv_hal/lv_hal.h
+ libs/lvgl/src/lv_hal/lv_hal_disp.h
+ libs/lvgl/src/lv_hal/lv_hal_indev.h
+ libs/lvgl/src/lv_hal/lv_hal_tick.h
libs/lvgl/src/lv_misc/lv_anim.h
- libs/lvgl/src/lv_misc/lv_async.h
- libs/lvgl/src/lv_misc/lv_async.c
- libs/lvgl/src/lv_misc/lv_fs.c
- libs/lvgl/src/lv_misc/lv_fs.h
- libs/lvgl/src/lv_misc/lv_task.c
- libs/lvgl/src/lv_misc/lv_task.h
- libs/lvgl/src/lv_misc/lv_area.c
libs/lvgl/src/lv_misc/lv_area.h
- libs/lvgl/src/lv_misc/lv_bidi.c
+ libs/lvgl/src/lv_misc/lv_async.h
libs/lvgl/src/lv_misc/lv_bidi.h
- libs/lvgl/src/lv_misc/lv_circ.c
- libs/lvgl/src/lv_misc/lv_circ.h
- libs/lvgl/src/lv_misc/lv_color.c
libs/lvgl/src/lv_misc/lv_color.h
- libs/lvgl/src/lv_misc/lv_fs.c
+ libs/lvgl/src/lv_misc/lv_debug.h
libs/lvgl/src/lv_misc/lv_fs.h
- libs/lvgl/src/lv_misc/lv_gc.c
libs/lvgl/src/lv_misc/lv_gc.h
- libs/lvgl/src/lv_misc/lv_ll.c
libs/lvgl/src/lv_misc/lv_ll.h
- libs/lvgl/src/lv_misc/lv_log.c
libs/lvgl/src/lv_misc/lv_log.h
- libs/lvgl/src/lv_misc/lv_math.c
libs/lvgl/src/lv_misc/lv_math.h
- libs/lvgl/src/lv_misc/lv_mem.c
libs/lvgl/src/lv_misc/lv_mem.h
- libs/lvgl/src/lv_misc/lv_printf.c
libs/lvgl/src/lv_misc/lv_printf.h
- libs/lvgl/src/lv_misc/lv_task.c
libs/lvgl/src/lv_misc/lv_task.h
- libs/lvgl/src/lv_misc/lv_templ.c
libs/lvgl/src/lv_misc/lv_templ.h
- libs/lvgl/src/lv_misc/lv_txt.c
libs/lvgl/src/lv_misc/lv_txt.h
+ libs/lvgl/src/lv_misc/lv_txt_ap.h
libs/lvgl/src/lv_misc/lv_types.h
- libs/lvgl/src/lv_misc/lv_utils.c
libs/lvgl/src/lv_misc/lv_utils.h
- libs/lvgl/src/lv_draw/lv_draw.c
- libs/lvgl/src/lv_draw/lv_draw.h
+ libs/lvgl/src/lv_themes/lv_theme.h
+ libs/lvgl/src/lv_themes/lv_theme_empty.h
+ libs/lvgl/src/lv_themes/lv_theme_material.h
+ #libs/lvgl/src/lv_themes/lv_theme_mono.h
+ #libs/lvgl/src/lv_themes/lv_theme_template.h
+ libs/lvgl/src/lv_widgets/lv_arc.h
+ libs/lvgl/src/lv_widgets/lv_bar.h
+ libs/lvgl/src/lv_widgets/lv_btn.h
+ libs/lvgl/src/lv_widgets/lv_btnmatrix.h
+ libs/lvgl/src/lv_widgets/lv_calendar.h
+ libs/lvgl/src/lv_widgets/lv_canvas.h
+ libs/lvgl/src/lv_widgets/lv_chart.h
+ libs/lvgl/src/lv_widgets/lv_checkbox.h
+ libs/lvgl/src/lv_widgets/lv_cont.h
+ libs/lvgl/src/lv_widgets/lv_cpicker.h
+ libs/lvgl/src/lv_widgets/lv_dropdown.h
+ libs/lvgl/src/lv_widgets/lv_img.h
+ libs/lvgl/src/lv_widgets/lv_imgbtn.h
+ libs/lvgl/src/lv_widgets/lv_keyboard.h
+ libs/lvgl/src/lv_widgets/lv_label.h
+ libs/lvgl/src/lv_widgets/lv_led.h
+ libs/lvgl/src/lv_widgets/lv_line.h
+ libs/lvgl/src/lv_widgets/lv_linemeter.h
+ libs/lvgl/src/lv_widgets/lv_list.h
+ libs/lvgl/src/lv_widgets/lv_msgbox.h
+ libs/lvgl/src/lv_widgets/lv_objmask.h
+ libs/lvgl/src/lv_widgets/lv_objx_templ.h
+ libs/lvgl/src/lv_widgets/lv_page.h
+ libs/lvgl/src/lv_widgets/lv_roller.h
+ libs/lvgl/src/lv_widgets/lv_slider.h
+ libs/lvgl/src/lv_widgets/lv_spinbox.h
+ libs/lvgl/src/lv_widgets/lv_spinner.h
+ libs/lvgl/src/lv_widgets/lv_switch.h
+ libs/lvgl/src/lv_widgets/lv_table.h
+ libs/lvgl/src/lv_widgets/lv_tabview.h
+ libs/lvgl/src/lv_widgets/lv_textarea.h
+ libs/lvgl/src/lv_widgets/lv_tileview.h
+ libs/lvgl/src/lv_widgets/lv_win.h
+ libs/lvgl/src/lv_core/lv_disp.c
+ libs/lvgl/src/lv_core/lv_group.c
+ libs/lvgl/src/lv_core/lv_indev.c
+ libs/lvgl/src/lv_core/lv_obj.c
+ libs/lvgl/src/lv_core/lv_refr.c
+ libs/lvgl/src/lv_core/lv_style.c
libs/lvgl/src/lv_draw/lv_draw_arc.c
- libs/lvgl/src/lv_draw/lv_draw_arc.h
- libs/lvgl/src/lv_draw/lv_draw_basic.c
- libs/lvgl/src/lv_draw/lv_draw_basic.h
+ libs/lvgl/src/lv_draw/lv_draw_blend.c
libs/lvgl/src/lv_draw/lv_draw_img.c
- libs/lvgl/src/lv_draw/lv_draw_img.h
libs/lvgl/src/lv_draw/lv_draw_label.c
- libs/lvgl/src/lv_draw/lv_draw_label.h
libs/lvgl/src/lv_draw/lv_draw_line.c
- libs/lvgl/src/lv_draw/lv_draw_line.h
+ libs/lvgl/src/lv_draw/lv_draw_mask.c
libs/lvgl/src/lv_draw/lv_draw_rect.c
- libs/lvgl/src/lv_draw/lv_draw_rect.h
libs/lvgl/src/lv_draw/lv_draw_triangle.c
- libs/lvgl/src/lv_draw/lv_draw_triangle.h
+ libs/lvgl/src/lv_draw/lv_img_buf.c
libs/lvgl/src/lv_draw/lv_img_cache.c
- libs/lvgl/src/lv_draw/lv_img_cache.h
libs/lvgl/src/lv_draw/lv_img_decoder.c
- libs/lvgl/src/lv_draw/lv_img_decoder.h
- libs/lvgl/src/lv_hal/lv_hal.h
+ libs/lvgl/src/lv_font/lv_font.c
+ #libs/lvgl/src/lv_font/lv_font_dejavu_16_persian_hebrew.c
+ libs/lvgl/src/lv_font/lv_font_fmt_txt.c
+ libs/lvgl/src/lv_font/lv_font_loader.c
+ # LVGL Fonts
+ libs/lvgl/src/lv_font/lv_font_montserrat_14.c
+ libs/lvgl/src/lv_font/lv_font_montserrat_18.c
+ libs/lvgl/src/lv_font/lv_font_montserrat_22.c
+ libs/lvgl/src/lv_font/lv_font_montserrat_28.c
+ #
libs/lvgl/src/lv_hal/lv_hal_disp.c
- libs/lvgl/src/lv_hal/lv_hal_disp.h
libs/lvgl/src/lv_hal/lv_hal_indev.c
- libs/lvgl/src/lv_hal/lv_hal_indev.h
libs/lvgl/src/lv_hal/lv_hal_tick.c
- libs/lvgl/src/lv_hal/lv_hal_tick.h
- libs/lvgl/src/lv_font/lv_font.c
- libs/lvgl/src/lv_font/lv_font.h
- libs/lvgl/src/lv_font/lv_font_fmt_txt.c
- libs/lvgl/src/lv_font/lv_font_fmt_txt.h
- libs/lvgl/src/lv_font/lv_symbol_def.h
- libs/lvgl/src/lv_themes/lv_theme.c
- libs/lvgl/src/lv_themes/lv_theme.h
- libs/lvgl/src/lv_objx/lv_btn.h
- libs/lvgl/src/lv_objx/lv_btn.c
- libs/lvgl/src/lv_objx/lv_cont.h
- libs/lvgl/src/lv_objx/lv_cont.c
- libs/lvgl/src/lv_objx/lv_label.h
- libs/lvgl/src/lv_objx/lv_label.c
- libs/lvgl/src/lv_objx/lv_table.c
+ libs/lvgl/src/lv_misc/lv_anim.c
+ libs/lvgl/src/lv_misc/lv_area.c
+ libs/lvgl/src/lv_misc/lv_async.c
+ libs/lvgl/src/lv_misc/lv_bidi.c
+ libs/lvgl/src/lv_misc/lv_color.c
+ libs/lvgl/src/lv_misc/lv_debug.c
+ libs/lvgl/src/lv_misc/lv_fs.c
+ libs/lvgl/src/lv_misc/lv_gc.c
+ libs/lvgl/src/lv_misc/lv_ll.c
+ libs/lvgl/src/lv_misc/lv_log.c
+ libs/lvgl/src/lv_misc/lv_math.c
+ libs/lvgl/src/lv_misc/lv_mem.c
+ libs/lvgl/src/lv_misc/lv_printf.c
+ libs/lvgl/src/lv_misc/lv_task.c
+ libs/lvgl/src/lv_misc/lv_templ.c
+ libs/lvgl/src/lv_misc/lv_txt.c
+ libs/lvgl/src/lv_misc/lv_txt_ap.c
+ libs/lvgl/src/lv_misc/lv_utils.c
libs/lvgl/src/lv_themes/lv_theme.c
- libs/lvgl/src/lv_themes/lv_theme.h
- libs/lvgl/src/lv_themes/lv_theme_night.h
- libs/lvgl/src/lv_themes/lv_theme_night.c
- libs/lvgl/src/lv_objx/lv_list.c
- libs/lvgl/src/lv_objx/lv_list.h
- libs/lvgl/src/lv_objx/lv_tileview.c
- libs/lvgl/src/lv_objx/lv_tileview.h
- libs/lvgl/src/lv_objx/lv_tabview.c
- libs/lvgl/src/lv_objx/lv_tabview.h
- libs/lvgl/src/lv_objx/lv_btnm.c
- libs/lvgl/src/lv_objx/lv_btnm.h
- libs/lvgl/src/lv_objx/lv_page.c
- libs/lvgl/src/lv_objx/lv_page.h
- libs/lvgl/src/lv_objx/lv_img.c
- libs/lvgl/src/lv_objx/lv_img.h
- libs/lvgl/src/lv_objx/lv_lmeter.c
- libs/lvgl/src/lv_objx/lv_lmeter.h
- libs/lvgl/src/lv_objx/lv_arc.c
- libs/lvgl/src/lv_objx/lv_arc.h
- libs/lvgl/src/lv_objx/lv_gauge.c
- libs/lvgl/src/lv_objx/lv_gauge.h
- libs/lvgl/src/lv_objx/lv_mbox.c
- libs/lvgl/src/lv_objx/lv_mbox.h
- libs/lvgl/src/lv_objx/lv_bar.c
- libs/lvgl/src/lv_objx/lv_bar.h
- libs/lvgl/src/lv_objx/lv_slider.h
- libs/lvgl/src/lv_objx/lv_slider.c
- libs/lvgl/src/lv_objx/lv_ddlist.c
- libs/lvgl/src/lv_objx/lv_ddlist.h
- libs/lvgl/src/lv_objx/lv_line.c
- libs/lvgl/src/lv_objx/lv_line.h
+ libs/lvgl/src/lv_themes/lv_theme_empty.c
+ libs/lvgl/src/lv_themes/lv_theme_material.c
+ #libs/lvgl/src/lv_themes/lv_theme_mono.c
+ #libs/lvgl/src/lv_themes/lv_theme_template.c
+ libs/lvgl/src/lv_widgets/lv_arc.c
+ libs/lvgl/src/lv_widgets/lv_bar.c
+ libs/lvgl/src/lv_widgets/lv_btn.c
+ libs/lvgl/src/lv_widgets/lv_btnmatrix.c
+ libs/lvgl/src/lv_widgets/lv_calendar.c
+ libs/lvgl/src/lv_widgets/lv_canvas.c
+ libs/lvgl/src/lv_widgets/lv_chart.c
+ libs/lvgl/src/lv_widgets/lv_checkbox.c
+ libs/lvgl/src/lv_widgets/lv_cont.c
+ libs/lvgl/src/lv_widgets/lv_cpicker.c
+ libs/lvgl/src/lv_widgets/lv_dropdown.c
+ libs/lvgl/src/lv_widgets/lv_img.c
+ libs/lvgl/src/lv_widgets/lv_imgbtn.c
+ libs/lvgl/src/lv_widgets/lv_keyboard.c
+ libs/lvgl/src/lv_widgets/lv_label.c
+ libs/lvgl/src/lv_widgets/lv_led.c
+ libs/lvgl/src/lv_widgets/lv_line.c
+ libs/lvgl/src/lv_widgets/lv_linemeter.c
+ libs/lvgl/src/lv_widgets/lv_list.c
+ libs/lvgl/src/lv_widgets/lv_msgbox.c
+ libs/lvgl/src/lv_widgets/lv_objmask.c
+ libs/lvgl/src/lv_widgets/lv_objx_templ.c
+ libs/lvgl/src/lv_widgets/lv_page.c
+ libs/lvgl/src/lv_widgets/lv_roller.c
+ libs/lvgl/src/lv_widgets/lv_slider.c
+ libs/lvgl/src/lv_widgets/lv_spinbox.c
+ libs/lvgl/src/lv_widgets/lv_spinner.c
+ libs/lvgl/src/lv_widgets/lv_switch.c
+ libs/lvgl/src/lv_widgets/lv_table.c
+ libs/lvgl/src/lv_widgets/lv_tabview.c
+ libs/lvgl/src/lv_widgets/lv_textarea.c
+ libs/lvgl/src/lv_widgets/lv_tileview.c
+ libs/lvgl/src/lv_widgets/lv_win.c
)
list(APPEND IMAGE_FILES
@@ -422,11 +483,8 @@ list(APPEND SOURCE_FILES
displayapp/screens/Clock.cpp
displayapp/screens/Tile.cpp
displayapp/screens/Meter.cpp
- displayapp/screens/Gauge.cpp
displayapp/screens/InfiniPaint.cpp
displayapp/screens/Paddle.cpp
- displayapp/screens/DropDownDemo.cpp
- displayapp/screens/Modal.cpp
displayapp/screens/BatteryIcon.cpp
displayapp/screens/BleIcon.cpp
displayapp/screens/NotificationIcon.cpp
@@ -469,6 +527,7 @@ list(APPEND SOURCE_FILES
components/ble/ServiceDiscovery.cpp
components/ble/HeartRateService.cpp
components/firmwarevalidator/FirmwareValidator.cpp
+ components/motor/MotorController.cpp
drivers/Cst816s.cpp
FreeRTOS/port.c
FreeRTOS/port_cmsis_systick.c
@@ -477,6 +536,7 @@ list(APPEND SOURCE_FILES
displayapp/LittleVgl.cpp
displayapp/fonts/jetbrains_mono_extrabold_compressed.c
displayapp/fonts/jetbrains_mono_bold_20.c
+ displayapp/lv_pinetime_theme.c
systemtask/SystemTask.cpp
drivers/TwiMaster.cpp
@@ -536,7 +596,7 @@ list(APPEND RECOVERY_SOURCE_FILES
components/heartrate/Ppg.cpp
components/heartrate/Biquad.cpp
components/heartrate/Ptagc.cpp
-
+ components/motor/MotorController.cpp
)
list(APPEND RECOVERYLOADER_SOURCE_FILES
@@ -572,11 +632,9 @@ set(INCLUDE_FILES
displayapp/screens/Clock.h
displayapp/screens/Tile.h
displayapp/screens/Meter.h
- displayapp/screens/Gauge.h
displayapp/screens/InfiniPaint.h
displayapp/screens/Paddle.h
displayapp/screens/DropDownDemo.h
- displayapp/screens/Modal.h
displayapp/screens/BatteryIcon.h
displayapp/screens/BleIcon.h
displayapp/screens/NotificationIcon.h
@@ -625,6 +683,8 @@ set(INCLUDE_FILES
libs/date/includes/date/julian.h
libs/date/includes/date/ptz.h
libs/date/includes/date/tz_private.h
+ displayapp/LittleVgl.h
+ displayapp/lv_pinetime_theme.h
systemtask/SystemTask.h
systemtask/SystemMonitor.h
displayapp/screens/Symbols.h
@@ -634,6 +694,7 @@ set(INCLUDE_FILES
components/heartrate/Biquad.h
components/heartrate/Ptagc.h
components/heartrate/HeartRateController.h
+ components/motor/MotorController.h
)
include_directories(
@@ -665,7 +726,7 @@ include_directories(
"${NRF5_SDK_PATH}/modules/nrfx/drivers/include"
"${NRF5_SDK_PATH}/modules/nrfx/hal"
"${NRF5_SDK_PATH}/modules/nrfx/mdk"
- ${NRF5_SDK_PATH}/external/freertos/source/include
+ "${NRF5_SDK_PATH}/external/freertos/source/include"
"${NRF5_SDK_PATH}/components/toolchain/cmsis/include"
"${NRF5_SDK_PATH}/components/libraries/atomic"
"${NRF5_SDK_PATH}/components/libraries/atomic_fifo"
@@ -755,7 +816,7 @@ target_compile_options(nrf-sdk PRIVATE
$<$<AND:$<COMPILE_LANGUAGE:C>,$<CONFIG:RELEASE>>: ${COMMON_FLAGS} -O3>
$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CONFIG:DEBUG>>: ${COMMON_FLAGS} -O0>
$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CONFIG:RELEASE>>: ${COMMON_FLAGS} -O3>
- $<$<COMPILE_LANGUAGE:ASM>: -MP -MD -std=c99 -x assembler-with-cpp>
+ $<$<COMPILE_LANGUAGE:ASM>: -MP -MD -x assembler-with-cpp>
)
# NimBLE
@@ -767,7 +828,7 @@ target_compile_options(nimble PRIVATE
$<$<AND:$<COMPILE_LANGUAGE:C>,$<CONFIG:RELEASE>>: ${COMMON_FLAGS} -O3 -Wno-unused-but-set-variable -Wno-maybe-uninitialized>
$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CONFIG:DEBUG>>: ${COMMON_FLAGS} -O0 -g3 -Wno-unused-but-set-variable -Wno-maybe-uninitialized>
$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CONFIG:RELEASE>>: ${COMMON_FLAGS} -O3 -Wno-unused-but-set-variable -Wno-maybe-uninitialized>
- $<$<COMPILE_LANGUAGE:ASM>: -MP -MD -std=c99 -x assembler-with-cpp>
+ $<$<COMPILE_LANGUAGE:ASM>: -MP -MD -x assembler-with-cpp>
)
# lvgl
@@ -779,7 +840,7 @@ target_compile_options(lvgl PRIVATE
$<$<AND:$<COMPILE_LANGUAGE:C>,$<CONFIG:RELEASE>>: ${COMMON_FLAGS} -O3>
$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CONFIG:DEBUG>>: ${COMMON_FLAGS} -O0 -g3>
$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CONFIG:RELEASE>>: ${COMMON_FLAGS} -O3>
- $<$<COMPILE_LANGUAGE:ASM>: -MP -MD -std=c99 -x assembler-with-cpp>
+ $<$<COMPILE_LANGUAGE:ASM>: -MP -MD -x assembler-with-cpp>
)
# Build autonomous binary (without support for bootloader)
@@ -794,12 +855,12 @@ target_compile_options(${EXECUTABLE_NAME} PUBLIC
$<$<AND:$<COMPILE_LANGUAGE:C>,$<CONFIG:RELEASE>>: ${COMMON_FLAGS} -O3>
$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CONFIG:DEBUG>>: ${COMMON_FLAGS} -O0 -g3>
$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CONFIG:RELEASE>>: ${COMMON_FLAGS} -O3>
- $<$<COMPILE_LANGUAGE:ASM>: -MP -MD -std=c99 -x assembler-with-cpp>
+ $<$<COMPILE_LANGUAGE:ASM>: -MP -MD -x assembler-with-cpp>
)
set_target_properties(${EXECUTABLE_NAME} PROPERTIES
SUFFIX ".out"
- LINK_FLAGS "-mthumb -mabi=aapcs -std=gnu++98 -std=c99 -L ${NRF5_SDK_PATH}/modules/nrfx/mdk -T${NRF5_LINKER_SCRIPT} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Wl,--gc-sections --specs=nano.specs -lc -lnosys -lm -Wl,-Map=${EXECUTABLE_FILE_NAME}.map"
+ LINK_FLAGS "-mthumb -mabi=aapcs -L ${NRF5_SDK_PATH}/modules/nrfx/mdk -T${NRF5_LINKER_SCRIPT} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Wl,--gc-sections --specs=nano.specs -lc -lnosys -lm -Wl,-Map=${EXECUTABLE_FILE_NAME}.map"
CXX_STANDARD 11
C_STANDARD 99
)
@@ -826,12 +887,12 @@ target_compile_options(${EXECUTABLE_MCUBOOT_NAME} PUBLIC
$<$<AND:$<COMPILE_LANGUAGE:C>,$<CONFIG:RELEASE>>: ${COMMON_FLAGS} -O3>
$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CONFIG:DEBUG>>: ${COMMON_FLAGS} -O0 -g3>
$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CONFIG:RELEASE>>: ${COMMON_FLAGS} -O3>
- $<$<COMPILE_LANGUAGE:ASM>: -MP -MD -std=c99 -x assembler-with-cpp>
+ $<$<COMPILE_LANGUAGE:ASM>: -MP -MD -x assembler-with-cpp>
)
set_target_properties(${EXECUTABLE_MCUBOOT_NAME} PROPERTIES
SUFFIX ".out"
- LINK_FLAGS "-mthumb -mabi=aapcs -std=gnu++98 -std=c99 -L ${NRF5_SDK_PATH}/modules/nrfx/mdk -T${NRF5_LINKER_SCRIPT_MCUBOOT} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Wl,--gc-sections --specs=nano.specs -lc -lnosys -lm -Wl,-Map=${EXECUTABLE_MCUBOOT_FILE_NAME}.map"
+ LINK_FLAGS "-mthumb -mabi=aapcs -L ${NRF5_SDK_PATH}/modules/nrfx/mdk -T${NRF5_LINKER_SCRIPT_MCUBOOT} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Wl,--gc-sections --specs=nano.specs -lc -lnosys -lm -Wl,-Map=${EXECUTABLE_MCUBOOT_FILE_NAME}.map"
CXX_STANDARD 11
C_STANDARD 99
)
@@ -865,12 +926,12 @@ target_compile_options(${EXECUTABLE_RECOVERY_NAME} PUBLIC
$<$<AND:$<COMPILE_LANGUAGE:C>,$<CONFIG:RELEASE>>: ${COMMON_FLAGS} -O3>
$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CONFIG:DEBUG>>: ${COMMON_FLAGS} -O0 -g3>
$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CONFIG:RELEASE>>: ${COMMON_FLAGS} -O3>
- $<$<COMPILE_LANGUAGE:ASM>: -MP -MD -std=c99 -x assembler-with-cpp>
+ $<$<COMPILE_LANGUAGE:ASM>: -MP -MD -x assembler-with-cpp>
)
set_target_properties(${EXECUTABLE_RECOVERY_NAME} PROPERTIES
SUFFIX ".out"
- LINK_FLAGS "-mthumb -mabi=aapcs -std=gnu++98 -std=c99 -L ${NRF5_SDK_PATH}/modules/nrfx/mdk -T${NRF5_LINKER_SCRIPT} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Wl,--gc-sections --specs=nano.specs -lc -lnosys -lm -Wl,-Map=${EXECUTABLE_RECOVERY_FILE_NAME}.map"
+ LINK_FLAGS "-mthumb -mabi=aapcs -L ${NRF5_SDK_PATH}/modules/nrfx/mdk -T${NRF5_LINKER_SCRIPT} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Wl,--gc-sections --specs=nano.specs -lc -lnosys -lm -Wl,-Map=${EXECUTABLE_RECOVERY_FILE_NAME}.map"
CXX_STANDARD 11
C_STANDARD 99
)
@@ -897,12 +958,12 @@ target_compile_options(${EXECUTABLE_RECOVERY_MCUBOOT_NAME} PUBLIC
$<$<AND:$<COMPILE_LANGUAGE:C>,$<CONFIG:RELEASE>>: ${COMMON_FLAGS} -O3>
$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CONFIG:DEBUG>>: ${COMMON_FLAGS} -O0 -g3>
$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CONFIG:RELEASE>>: ${COMMON_FLAGS} -O3>
- $<$<COMPILE_LANGUAGE:ASM>: -MP -MD -std=c99 -x assembler-with-cpp>
+ $<$<COMPILE_LANGUAGE:ASM>: -MP -MD -x assembler-with-cpp>
)
set_target_properties(${EXECUTABLE_RECOVERY_MCUBOOT_NAME} PROPERTIES
SUFFIX ".out"
- LINK_FLAGS "-mthumb -mabi=aapcs -std=gnu++98 -std=c99 -L ${NRF5_SDK_PATH}/modules/nrfx/mdk -T${NRF5_LINKER_SCRIPT_MCUBOOT} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Wl,--gc-sections --specs=nano.specs -lc -lnosys -lm -Wl,-Map=${EXECUTABLE_RECOVERY_MCUBOOT_FILE_NAME}.map"
+ LINK_FLAGS "-mthumb -mabi=aapcs -L ${NRF5_SDK_PATH}/modules/nrfx/mdk -T${NRF5_LINKER_SCRIPT_MCUBOOT} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Wl,--gc-sections --specs=nano.specs -lc -lnosys -lm -Wl,-Map=${EXECUTABLE_RECOVERY_MCUBOOT_FILE_NAME}.map"
CXX_STANDARD 11
C_STANDARD 99
)
@@ -936,7 +997,7 @@ target_compile_options(${EXECUTABLE_RECOVERYLOADER_NAME} PUBLIC
$<$<AND:$<COMPILE_LANGUAGE:C>,$<CONFIG:RELEASE>>: ${COMMON_FLAGS} -O3>
$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CONFIG:DEBUG>>: ${COMMON_FLAGS} -O0 -g3>
$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CONFIG:RELEASE>>: ${COMMON_FLAGS} -O3>
- $<$<COMPILE_LANGUAGE:ASM>: -MP -MD -std=c99 -x assembler-with-cpp>
+ $<$<COMPILE_LANGUAGE:ASM>: -MP -MD -x assembler-with-cpp>
)
target_include_directories(${EXECUTABLE_RECOVERYLOADER_NAME} PUBLIC
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/src>
@@ -945,7 +1006,7 @@ add_dependencies(${EXECUTABLE_RECOVERYLOADER_NAME} ${EXECUTABLE_RECOVERY_MCUBOOT
set_target_properties(${EXECUTABLE_RECOVERYLOADER_NAME} PROPERTIES
SUFFIX ".out"
- LINK_FLAGS "-mthumb -mabi=aapcs -std=gnu++98 -std=c99 -L ${NRF5_SDK_PATH}/modules/nrfx/mdk -T${NRF5_LINKER_SCRIPT} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Wl,--gc-sections --specs=nano.specs -lc -lnosys -lm -Wl,-Map=${EXECUTABLE_RECOVERYLOADER_FILE_NAME}.map"
+ LINK_FLAGS "-mthumb -mabi=aapcs -L ${NRF5_SDK_PATH}/modules/nrfx/mdk -T${NRF5_LINKER_SCRIPT} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Wl,--gc-sections --specs=nano.specs -lc -lnosys -lm -Wl,-Map=${EXECUTABLE_RECOVERYLOADER_FILE_NAME}.map"
CXX_STANDARD 11
C_STANDARD 99
)
@@ -971,7 +1032,7 @@ target_compile_options(${EXECUTABLE_MCUBOOT_RECOVERYLOADER_NAME} PUBLIC
$<$<AND:$<COMPILE_LANGUAGE:C>,$<CONFIG:RELEASE>>: ${COMMON_FLAGS} -O3>
$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CONFIG:DEBUG>>: ${COMMON_FLAGS} -O0 -g3>
$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CONFIG:RELEASE>>: ${COMMON_FLAGS} -O3>
- $<$<COMPILE_LANGUAGE:ASM>: -MP -MD -std=c99 -x assembler-with-cpp>
+ $<$<COMPILE_LANGUAGE:ASM>: -MP -MD -x assembler-with-cpp>
)
target_include_directories(${EXECUTABLE_MCUBOOT_RECOVERYLOADER_NAME} PUBLIC
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/src>
@@ -1015,7 +1076,7 @@ if (USE_JLINK)
COMMAND ${NRFJPROG} --program ${EXECUTABLE_FILE_NAME}.hex -f ${NRF_TARGET} --sectorerase
COMMAND sleep 0.5s
COMMAND ${NRFJPROG} --reset -f ${NRF_TARGET}
- COMMENT "flashing ${EXECUTABLE_NAME}.hex"
+ COMMENT "flashing ${EXECUTABLE_FILE_NAME}.hex"
)
elseif (USE_GDB_CLIENT)
@@ -1025,8 +1086,8 @@ elseif (USE_GDB_CLIENT)
)
add_custom_target("FLASH_${EXECUTABLE_NAME}"
DEPENDS ${EXECUTABLE_NAME}
- COMMAND ${GDB_CLIENT_BIN_PATH} -nx --batch -ex 'target extended-remote ${GDB_CLIENT_TARGET_REMOTE}' -ex 'monitor swdp_scan' -ex 'attach 1' -ex 'load' -ex 'kill' ${EXECUTABLE_NAME}.hex
- COMMENT "flashing ${EXECUTABLE_NAME}.hex"
+ COMMAND ${GDB_CLIENT_BIN_PATH} -nx --batch -ex 'target extended-remote ${GDB_CLIENT_TARGET_REMOTE}' -ex 'monitor swdp_scan' -ex 'attach 1' -ex 'load' -ex 'kill' ${EXECUTABLE_FILE_NAME}.hex
+ COMMENT "flashing ${EXECUTABLE_FILE_NAME}.hex"
)
elseif (USE_OPENOCD)
if (USE_CMSIS_DAP)
@@ -1051,10 +1112,10 @@ elseif (USE_OPENOCD)
-c 'transport select swd'
-c 'source [find target/nrf52.cfg]'
-c 'halt'
- -c "program \"${EXECUTABLE_NAME}.hex\""
+ -c "program \"${EXECUTABLE_FILE_NAME}.hex\""
-c 'reset'
-c 'shutdown'
- COMMENT "flashing ${EXECUTABLE_NAME}.hex"
+ COMMENT "flashing ${EXECUTABLE_BIN_NAME}.hex"
)
else ()
add_custom_target(FLASH_ERASE
@@ -1063,8 +1124,8 @@ elseif (USE_OPENOCD)
)
add_custom_target("FLASH_${EXECUTABLE_NAME}"
DEPENDS ${EXECUTABLE_NAME}
- COMMAND ${OPENOCD_BIN_PATH} -c "tcl_port disabled" -c "gdb_port 3333" -c "telnet_port 4444" -f interface/stlink.cfg -c 'transport select hla_swd' -f target/nrf52.cfg -c "program \"${EXECUTABLE_NAME}.hex\"" -c reset -c shutdown
- COMMENT "flashing ${EXECUTABLE_NAME}.hex"
+ COMMAND ${OPENOCD_BIN_PATH} -c "tcl_port disabled" -c "gdb_port 3333" -c "telnet_port 4444" -f interface/stlink.cfg -c 'transport select hla_swd' -f target/nrf52.cfg -c "program \"${EXECUTABLE_FILE_NAME}.hex\"" -c reset -c shutdown
+ COMMENT "flashing ${EXECUTABLE_FILE_NAME}.hex"
)
endif ()
endif ()
diff --git a/src/FreeRTOS/port_cmsis.c b/src/FreeRTOS/port_cmsis.c
index 2fbec43f..d8850b52 100644
--- a/src/FreeRTOS/port_cmsis.c
+++ b/src/FreeRTOS/port_cmsis.c
@@ -354,4 +354,24 @@ static void vPortEnableVFP( void )
configASSERT( NVIC_GetPriorityGrouping() <= ulMaxPRIGROUPValue );
}
+uint32_t ulSetInterruptMaskFromISR( void )
+{
+ __asm volatile (
+ " mrs r0, PRIMASK \n"
+ " cpsid i \n"
+ " bx lr "
+ ::: "memory"
+ );
+}
+/*-----------------------------------------------------------*/
+
+void vClearInterruptMaskFromISR( __attribute__( ( unused ) ) uint32_t ulMask )
+{
+ __asm volatile (
+ " msr PRIMASK, r0 \n"
+ " bx lr "
+ ::: "memory"
+ );
+}
+
#endif /* configASSERT_DEFINED */
diff --git a/src/FreeRTOS/portmacro_cmsis.h b/src/FreeRTOS/portmacro_cmsis.h
index 0497538f..e6e09158 100644
--- a/src/FreeRTOS/portmacro_cmsis.h
+++ b/src/FreeRTOS/portmacro_cmsis.h
@@ -104,8 +104,10 @@ typedef unsigned long UBaseType_t;
/* Critical section management. */
extern void vPortEnterCritical( void );
extern void vPortExitCritical( void );
-#define portSET_INTERRUPT_MASK_FROM_ISR() ulPortRaiseBASEPRI()
-#define portCLEAR_INTERRUPT_MASK_FROM_ISR(x) vPortSetBASEPRI(x)
+extern uint32_t ulSetInterruptMaskFromISR( void ) __attribute__( ( naked ) );
+extern void vClearInterruptMaskFromISR( uint32_t ulMask ) __attribute__( ( naked ) );
+#define portSET_INTERRUPT_MASK_FROM_ISR() ulSetInterruptMaskFromISR()
+#define portCLEAR_INTERRUPT_MASK_FROM_ISR(x) vClearInterruptMaskFromISR( x )
#define portDISABLE_INTERRUPTS() __asm volatile ( " cpsid i " ::: "memory" )
#define portENABLE_INTERRUPTS() __asm volatile ( " cpsie i " ::: "memory" )
#define portENTER_CRITICAL() vPortEnterCritical()
diff --git a/src/FreeRTOSConfig.h b/src/FreeRTOSConfig.h
index 0b6a4b33..3ba7faa0 100644
--- a/src/FreeRTOSConfig.h
+++ b/src/FreeRTOSConfig.h
@@ -63,7 +63,7 @@
#define configTICK_RATE_HZ 1024
#define configMAX_PRIORITIES ( 3 )
#define configMINIMAL_STACK_SIZE ( 120 )
-#define configTOTAL_HEAP_SIZE ( 1024*14 )
+#define configTOTAL_HEAP_SIZE ( 1024*15 )
#define configMAX_TASK_NAME_LEN ( 4 )
#define configUSE_16_BIT_TICKS 0
#define configIDLE_SHOULD_YIELD 1
diff --git a/src/components/ble/AlertNotificationClient.h b/src/components/ble/AlertNotificationClient.h
index fa10456c..d49205e3 100644
--- a/src/components/ble/AlertNotificationClient.h
+++ b/src/components/ble/AlertNotificationClient.h
@@ -83,4 +83,4 @@ namespace Pinetime {
bool isDescriptorFound = false;
};
}
-} \ No newline at end of file
+}
diff --git a/src/components/ble/AlertNotificationService.cpp b/src/components/ble/AlertNotificationService.cpp
index 3156470c..0639119c 100644
--- a/src/components/ble/AlertNotificationService.cpp
+++ b/src/components/ble/AlertNotificationService.cpp
@@ -9,6 +9,7 @@ using namespace Pinetime::Controllers;
constexpr ble_uuid16_t AlertNotificationService::ansUuid;
constexpr ble_uuid16_t AlertNotificationService::ansCharUuid;
+constexpr ble_uuid128_t AlertNotificationService::notificationEventUuid;
int AlertNotificationCallback(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt *ctxt, void *arg) {
@@ -34,6 +35,13 @@ AlertNotificationService::AlertNotificationService ( System::SystemTask& systemT
.flags = BLE_GATT_CHR_F_WRITE
},
{
+ .uuid = (ble_uuid_t *) &notificationEventUuid,
+ .access_cb = AlertNotificationCallback,
+ .arg = this,
+ .flags = BLE_GATT_CHR_F_NOTIFY,
+ .val_handle = &eventHandle
+ },
+ {
0
}
},
@@ -61,14 +69,65 @@ int AlertNotificationService::OnAlert(uint16_t conn_handle, uint16_t attr_handle
const auto dbgPacketLen = OS_MBUF_PKTLEN(ctxt->om);
size_t bufferSize = std::min(dbgPacketLen + stringTerminatorSize, maxBufferSize);
auto messageSize = std::min(maxMessageSize, (bufferSize-headerSize));
+ Categories category;
NotificationManager::Notification notif;
os_mbuf_copydata(ctxt->om, headerSize, messageSize-1, notif.message.data());
+ os_mbuf_copydata(ctxt->om, 0, 1, &category);
notif.message[messageSize-1] = '\0';
- notif.category = Pinetime::Controllers::NotificationManager::Categories::SimpleAlert;
- notificationManager.Push(std::move(notif));
- systemTask.PushMessage(Pinetime::System::SystemTask::Messages::OnNewNotification);
+ // TODO convert all ANS categories to NotificationController categories
+ switch(category) {
+ case Categories::Call:
+ notif.category = Pinetime::Controllers::NotificationManager::Categories::IncomingCall;
+ break;
+ default:
+ notif.category = Pinetime::Controllers::NotificationManager::Categories::SimpleAlert;
+ break;
+ }
+
+ auto event = Pinetime::System::SystemTask::Messages::OnNewNotification;
+ notificationManager.Push(std::move(notif));
+ systemTask.PushMessage(event);
}
return 0;
}
+
+void AlertNotificationService::AcceptIncomingCall() {
+ auto response = IncomingCallResponses::Answer;
+ auto *om = ble_hs_mbuf_from_flat(&response, 1);
+
+ uint16_t connectionHandle = systemTask.nimble().connHandle();
+
+ if (connectionHandle == 0 || connectionHandle == BLE_HS_CONN_HANDLE_NONE) {
+ return;
+ }
+
+ ble_gattc_notify_custom(connectionHandle, eventHandle, om);
+}
+
+void AlertNotificationService::RejectIncomingCall() {
+ auto response = IncomingCallResponses::Reject;
+ auto *om = ble_hs_mbuf_from_flat(&response, 1);
+
+ uint16_t connectionHandle = systemTask.nimble().connHandle();
+
+ if (connectionHandle == 0 || connectionHandle == BLE_HS_CONN_HANDLE_NONE) {
+ return;
+ }
+
+ ble_gattc_notify_custom(connectionHandle, eventHandle, om);
+}
+
+void AlertNotificationService::MuteIncomingCall() {
+ auto response = IncomingCallResponses::Mute;
+ auto *om = ble_hs_mbuf_from_flat(&response, 1);
+
+ uint16_t connectionHandle = systemTask.nimble().connHandle();
+
+ if (connectionHandle == 0 || connectionHandle == BLE_HS_CONN_HANDLE_NONE) {
+ return;
+ }
+
+ ble_gattc_notify_custom(connectionHandle, eventHandle, om);
+} \ No newline at end of file
diff --git a/src/components/ble/AlertNotificationService.h b/src/components/ble/AlertNotificationService.h
index 120312d2..caad7a2b 100644
--- a/src/components/ble/AlertNotificationService.h
+++ b/src/components/ble/AlertNotificationService.h
@@ -7,6 +7,9 @@
#undef max
#undef min
+//00020001-78fc-48fe-8e23-433b3a1942d0
+#define NOTIFICATION_EVENT_SERVICE_UUID_BASE {0xd0, 0x42, 0x19, 0x3a, 0x3b, 0x43, 0x23, 0x8e, 0xfe, 0x48, 0xfc, 0x78, 0x01, 0x00, 0x02, 0x00}
+
namespace Pinetime {
namespace System {
@@ -24,8 +27,31 @@ namespace Pinetime {
int OnAlert(uint16_t conn_handle, uint16_t attr_handle,
struct ble_gatt_access_ctxt *ctxt);
+ void AcceptIncomingCall();
+ void RejectIncomingCall();
+ void MuteIncomingCall();
+
+ enum class IncomingCallResponses : uint8_t {
+ Reject = 0x00,
+ Answer = 0x01,
+ Mute = 0x02
+ };
private:
+ enum class Categories : uint8_t {
+ SimpleAlert = 0x00,
+ Email = 0x01,
+ News = 0x02,
+ Call = 0x03,
+ MissedCall = 0x04,
+ MmsSms = 0x05,
+ VoiceMail = 0x06,
+ Schedule = 0x07,
+ HighPrioritizedAlert = 0x08,
+ InstantMessage = 0x09,
+ All = 0xff
+ };
+
static constexpr uint16_t ansId {0x1811};
static constexpr uint16_t ansCharId {0x2a46};
@@ -39,11 +65,18 @@ namespace Pinetime {
.value = ansCharId
};
- struct ble_gatt_chr_def characteristicDefinition[2];
+ static constexpr ble_uuid128_t notificationEventUuid {
+ .u { .type = BLE_UUID_TYPE_128 },
+ .value = NOTIFICATION_EVENT_SERVICE_UUID_BASE
+ };
+
+ struct ble_gatt_chr_def characteristicDefinition[3];
struct ble_gatt_svc_def serviceDefinition[2];
Pinetime::System::SystemTask &systemTask;
NotificationManager &notificationManager;
+
+ uint16_t eventHandle;
};
}
}
diff --git a/src/components/ble/BatteryInformationService.cpp b/src/components/ble/BatteryInformationService.cpp
index f7d895c2..bc66ff72 100644
--- a/src/components/ble/BatteryInformationService.cpp
+++ b/src/components/ble/BatteryInformationService.cpp
@@ -1,3 +1,4 @@
+#include <nrf_log.h>
#include "BatteryInformationService.h"
#include "components/battery/BatteryController.h"
diff --git a/src/components/ble/CurrentTimeClient.cpp b/src/components/ble/CurrentTimeClient.cpp
index be50fede..758f636c 100644
--- a/src/components/ble/CurrentTimeClient.cpp
+++ b/src/components/ble/CurrentTimeClient.cpp
@@ -1,5 +1,6 @@
#include "CurrentTimeClient.h"
#include <hal/nrf_rtc.h>
+#include <nrf_log.h>
#include "components/datetime/DateTimeController.h"
using namespace Pinetime::Controllers;
diff --git a/src/components/ble/CurrentTimeService.cpp b/src/components/ble/CurrentTimeService.cpp
index 3a6264e2..9f14edc7 100644
--- a/src/components/ble/CurrentTimeService.cpp
+++ b/src/components/ble/CurrentTimeService.cpp
@@ -1,5 +1,6 @@
#include "CurrentTimeService.h"
#include <hal/nrf_rtc.h>
+#include <nrf_log.h>
using namespace Pinetime::Controllers;
diff --git a/src/components/ble/HeartRateService.cpp b/src/components/ble/HeartRateService.cpp
index ecd6235d..ee115ed0 100644
--- a/src/components/ble/HeartRateService.cpp
+++ b/src/components/ble/HeartRateService.cpp
@@ -57,9 +57,7 @@ void HeartRateService::Init() {
int HeartRateService::OnHeartRateRequested(uint16_t connectionHandle, uint16_t attributeHandle,
ble_gatt_access_ctxt *context) {
if(attributeHandle == heartRateMeasurementHandle) {
- NRF_LOG_INFO("BATTERY : handle = %d", heartRateMeasurementHandle);
- static uint8_t batteryValue = heartRateController.HeartRate();
-
+ NRF_LOG_INFO("HEARTRATE : handle = %d", heartRateMeasurementHandle);
uint8_t buffer[2] = {0, heartRateController.HeartRate()}; // [0] = flags, [1] = hr value
int res = os_mbuf_append(context->om, buffer, 2);
diff --git a/src/components/ble/NimbleController.cpp b/src/components/ble/NimbleController.cpp
index f2786ea1..eb83c709 100644
--- a/src/components/ble/NimbleController.cpp
+++ b/src/components/ble/NimbleController.cpp
@@ -38,8 +38,8 @@ NimbleController::NimbleController(Pinetime::System::SystemTask& systemTask,
navService{systemTask},
batteryInformationService{batteryController},
immediateAlertService{systemTask, notificationManager},
- serviceDiscovery({&currentTimeClient, &alertNotificationClient}),
- heartRateService{systemTask, heartRateController} {
+ heartRateService{systemTask, heartRateController},
+ serviceDiscovery({&currentTimeClient, &alertNotificationClient}) {
}
int GAPEventCallback(struct ble_gap_event *event, void *arg) {
diff --git a/src/components/ble/NimbleController.h b/src/components/ble/NimbleController.h
index a109800c..7bb135da 100644
--- a/src/components/ble/NimbleController.h
+++ b/src/components/ble/NimbleController.h
@@ -58,6 +58,7 @@ namespace Pinetime {
Pinetime::Controllers::MusicService& music() {return musicService;};
Pinetime::Controllers::NavigationService& navigation() {return navService;};
+ Pinetime::Controllers::AlertNotificationService& alertService() {return anService;};
uint16_t connHandle();
diff --git a/src/components/ble/NotificationManager.cpp b/src/components/ble/NotificationManager.cpp
index dabcb4ba..36abf026 100644
--- a/src/components/ble/NotificationManager.cpp
+++ b/src/components/ble/NotificationManager.cpp
@@ -71,6 +71,14 @@ bool NotificationManager::AreNewNotificationsAvailable() {
return newNotification;
}
+bool NotificationManager::IsVibrationEnabled() {
+ return vibrationEnabled;
+}
+
+void NotificationManager::ToggleVibrations() {
+ vibrationEnabled = !vibrationEnabled;
+}
+
bool NotificationManager::ClearNewNotificationFlag() {
return newNotification.exchange(false);
}
diff --git a/src/components/ble/NotificationManager.h b/src/components/ble/NotificationManager.h
index 036d2ed9..075a9a45 100644
--- a/src/components/ble/NotificationManager.h
+++ b/src/components/ble/NotificationManager.h
@@ -28,6 +28,8 @@ namespace Pinetime {
Notification GetPrevious(Notification::Id id);
bool ClearNewNotificationFlag();
bool AreNewNotificationsAvailable();
+ bool IsVibrationEnabled();
+ void ToggleVibrations();
static constexpr size_t MaximumMessageSize() { return MessageSize; };
size_t NbNotifications() const;
@@ -40,6 +42,7 @@ namespace Pinetime {
uint8_t writeIndex = 0;
bool empty = true;
std::atomic<bool> newNotification{false};
+ bool vibrationEnabled = true;
};
}
} \ No newline at end of file
diff --git a/src/components/heartrate/Ppg.cpp b/src/components/heartrate/Ppg.cpp
index 233c3003..e84cbdf3 100644
--- a/src/components/heartrate/Ppg.cpp
+++ b/src/components/heartrate/Ppg.cpp
@@ -13,7 +13,7 @@ using namespace Pinetime::Controllers;
namespace {
int Compare(int* d1, int* d2, size_t count) {
int e = 0;
- for(int i = 0; i < count; i++) {
+ for(size_t i = 0; i < count; i++) {
auto d = d1[i] - d2[i];
e += d * d;
}
diff --git a/src/components/motor/MotorController.cpp b/src/components/motor/MotorController.cpp
new file mode 100644
index 00000000..7f53fbf7
--- /dev/null
+++ b/src/components/motor/MotorController.cpp
@@ -0,0 +1,25 @@
+#include "MotorController.h"
+#include <hal/nrf_gpio.h>
+#include "systemtask/SystemTask.h"
+#include "app_timer.h"
+
+APP_TIMER_DEF(vibTimer);
+
+using namespace Pinetime::Controllers;
+
+void MotorController::Init() {
+ nrf_gpio_cfg_output(pinMotor);
+ nrf_gpio_pin_set(pinMotor);
+ app_timer_init();
+ app_timer_create(&vibTimer, APP_TIMER_MODE_SINGLE_SHOT, vibrate);
+}
+
+void MotorController::SetDuration(uint8_t motorDuration) {
+ nrf_gpio_pin_clear(pinMotor);
+ /* Start timer for motorDuration miliseconds and timer triggers vibrate() when it finishes*/
+ app_timer_start(vibTimer, APP_TIMER_TICKS(motorDuration), NULL);
+}
+
+void MotorController::vibrate(void * p_context) {
+ nrf_gpio_pin_set(pinMotor);
+} \ No newline at end of file
diff --git a/src/components/motor/MotorController.h b/src/components/motor/MotorController.h
new file mode 100644
index 00000000..bdc20c0c
--- /dev/null
+++ b/src/components/motor/MotorController.h
@@ -0,0 +1,19 @@
+#pragma once
+
+#include <cstdint>
+#include "app_timer.h"
+
+namespace Pinetime {
+ namespace Controllers {
+ static constexpr uint8_t pinMotor = 16;
+
+ class MotorController {
+ public:
+ void Init();
+ void SetDuration(uint8_t motorDuration);
+
+ private:
+ static void vibrate(void * p_context);
+ };
+ }
+}
diff --git a/src/displayapp/Apps.h b/src/displayapp/Apps.h
index 69aedb37..028fc80c 100644
--- a/src/displayapp/Apps.h
+++ b/src/displayapp/Apps.h
@@ -2,6 +2,6 @@
namespace Pinetime {
namespace Applications {
- enum class Apps {None, Launcher, Clock, SysInfo, Meter, Gauge, Brightness, Music, FirmwareValidation, Paint, Paddle, Notifications, Twos, HeartRate, Navigation};
+ enum class Apps {None, Launcher, Clock, SysInfo, Meter, Brightness, Music, FirmwareValidation, Paint, Paddle, Notifications, Twos, HeartRate, Navigation};
}
}
diff --git a/src/displayapp/DisplayApp.cpp b/src/displayapp/DisplayApp.cpp
index 6d62acbc..4e9042ab 100644
--- a/src/displayapp/DisplayApp.cpp
+++ b/src/displayapp/DisplayApp.cpp
@@ -10,7 +10,6 @@
#include "displayapp/screens/Clock.h"
#include "displayapp/screens/FirmwareUpdate.h"
#include "displayapp/screens/FirmwareValidation.h"
-#include "displayapp/screens/Gauge.h"
#include "displayapp/screens/InfiniPaint.h"
#include "displayapp/screens/Paddle.h"
#include "displayapp/screens/Meter.h"
@@ -47,7 +46,6 @@ DisplayApp::DisplayApp(Drivers::St7789 &lcd, Components::LittleVgl &lvgl, Driver
heartRateController{heartRateController} {
msgQueue = xQueueCreate(queueSize, itemSize);
onClockApp = true;
- modal.reset(new Screens::Modal(this));
}
void DisplayApp::Start() {
@@ -111,9 +109,6 @@ void DisplayApp::Refresh() {
brightnessController.Restore();
state = States::Running;
break;
- case Messages::UpdateDateTime:
-// modal->Show();
- break;
case Messages::UpdateBleConnection:
// clockScreen.SetBleConnectionState(bleController.IsConnected() ? Screens::Clock::BleConnectionStates::Connected : Screens::Clock::BleConnectionStates::NotConnected);
break;
@@ -125,7 +120,7 @@ void DisplayApp::Refresh() {
currentScreen.reset(nullptr);
lvgl.SetFullRefresh(Components::LittleVgl::FullRefreshDirections::Up);
onClockApp = false;
- currentScreen.reset(new Screens::Notifications(this, notificationManager, Screens::Notifications::Modes::Preview));
+ currentScreen.reset(new Screens::Notifications(this, notificationManager, systemTask.nimble().alertService(), Screens::Notifications::Modes::Preview));
}
}
break;
@@ -205,18 +200,16 @@ void DisplayApp::RunningState() {
currentScreen.reset(new Screens::Clock(this, dateTimeController, batteryController, bleController, notificationManager, heartRateController));
onClockApp = true;
break;
-// case Apps::Test: currentScreen.reset(new Screens::Message(this)); break;
case Apps::SysInfo: currentScreen.reset(new Screens::SystemInfo(this, dateTimeController, batteryController, brightnessController, bleController, watchdog)); break;
case Apps::Meter: currentScreen.reset(new Screens::Meter(this)); break;
case Apps::Twos: currentScreen.reset(new Screens::Twos(this)); break;
- case Apps::Gauge: currentScreen.reset(new Screens::Gauge(this)); break;
case Apps::Paint: currentScreen.reset(new Screens::InfiniPaint(this, lvgl)); break;
case Apps::Paddle: currentScreen.reset(new Screens::Paddle(this, lvgl)); break;
case Apps::Brightness : currentScreen.reset(new Screens::Brightness(this, brightnessController)); break;
case Apps::Music : currentScreen.reset(new Screens::Music(this, systemTask.nimble().music())); break;
case Apps::Navigation : currentScreen.reset(new Screens::Navigation(this, systemTask.nimble().navigation())); break;
case Apps::FirmwareValidation: currentScreen.reset(new Screens::FirmwareValidation(this, validator)); break;
- case Apps::Notifications: currentScreen.reset(new Screens::Notifications(this, notificationManager, Screens::Notifications::Modes::Normal)); break;
+ case Apps::Notifications: currentScreen.reset(new Screens::Notifications(this, notificationManager, systemTask.nimble().alertService(), Screens::Notifications::Modes::Normal)); break;
case Apps::HeartRate: currentScreen.reset(new Screens::HeartRate(this, heartRateController)); break;
}
nextApp = Apps::None;
diff --git a/src/displayapp/DisplayApp.h b/src/displayapp/DisplayApp.h
index 346ed72e..9a3d1191 100644
--- a/src/displayapp/DisplayApp.h
+++ b/src/displayapp/DisplayApp.h
@@ -9,7 +9,7 @@
#include "TouchEvents.h"
#include "components/brightness/BrightnessController.h"
#include "components/firmwarevalidator/FirmwareValidator.h"
-#include "displayapp/screens/Modal.h"
+#include "displayapp/screens/Screen.h"
#include "Messages.h"
namespace Pinetime {
@@ -83,7 +83,6 @@ namespace Pinetime {
Apps nextApp = Apps::None;
bool onClockApp = false; // TODO find a better way to know that we should handle gestures and button differently for the Clock app.
Controllers::BrightnessController brightnessController;
- std::unique_ptr<Screens::Modal> modal;
Pinetime::Controllers::NotificationManager& notificationManager;
Pinetime::Controllers::FirmwareValidator validator;
TouchModes touchMode = TouchModes::Gestures;
diff --git a/src/displayapp/DisplayAppRecovery.h b/src/displayapp/DisplayAppRecovery.h
index 3e865ae4..bcabea3a 100644
--- a/src/displayapp/DisplayAppRecovery.h
+++ b/src/displayapp/DisplayAppRecovery.h
@@ -15,7 +15,6 @@
#include "drivers/Cst816s.h"
#include <date/date.h>
#include "displayapp/screens/Clock.h"
-#include "displayapp/screens/Modal.h"
#include <drivers/Watchdog.h>
#include "TouchEvents.h"
#include "Apps.h"
diff --git a/src/displayapp/LittleVgl.cpp b/src/displayapp/LittleVgl.cpp
index b4e5cac0..44fa5657 100644
--- a/src/displayapp/LittleVgl.cpp
+++ b/src/displayapp/LittleVgl.cpp
@@ -1,4 +1,5 @@
#include "LittleVgl.h"
+#include "lv_pinetime_theme.h"
#include <FreeRTOS.h>
#include <task.h>
@@ -8,11 +9,6 @@
using namespace Pinetime::Components;
-extern "C" {
-LV_FONT_DECLARE(jetbrains_mono_extrabold_compressed)
-LV_FONT_DECLARE(jetbrains_mono_bold_20)
-}
-
lv_style_t* LabelBigStyle = nullptr;
static void disp_flush(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p) {
@@ -210,620 +206,15 @@ bool LittleVgl::GetTouchPadInfo(lv_indev_data_t *ptr) {
}
void LittleVgl::InitTheme() {
- uint16_t i;
- lv_style_t ** style_p = (lv_style_t **)&theme.style;
- for(i = 0; i < LV_THEME_STYLE_COUNT; i++) {
- *style_p = &def;
- style_p++;
- }
-
- InitBaseTheme();
- InitThemeContainer();
- InitThemeButton();
- InitThemeLabel();
- InitThemeLine();
- InitThemeLed();
- InitThemeImage();
- InitThemeBar();
- InitThemeSlider();
- InitThemeSwitch();
- InitThemeMeter();
- InitThemeGauge();
- InitThemeArc();
- InitThemePreload();
- InitThemeChart();
- InitThemeCalendar();
- InitThemeCheckBox();
- InitThemeButtonMatrix();
- InitThemeKnob();
- InitThemeMessageBox();
- InitThemePage();
- InitThemeTextArea();
- InitThemeSpinBox();
- InitThemeList();
- InitThemeDropDownList();
- InitThemeRoller();
- InitThemeTabView();
- InitThemeTileView();
- InitThemeTable();
- InitThemeWindow();
-
- lv_theme_set_current(&theme);
-}
-
-void LittleVgl::InitBaseTheme() {
- if(font == nullptr) font = &jetbrains_mono_bold_20;
- lv_style_copy(&def, &lv_style_plain); /*Initialize the default style*/
- def.text.font = font;
-
- lv_style_copy(&bg, &lv_style_plain);
- bg.body.main_color = LV_COLOR_BLACK;
- bg.body.grad_color = LV_COLOR_BLACK;
- bg.text.color = LV_COLOR_WHITE;
- bg.text.font = font;
- bg.image.color = LV_COLOR_WHITE;
-
- lv_style_copy(&scr, &bg);
- scr.body.padding.bottom = 0;
- scr.body.padding.top = 0;
- scr.body.padding.left = 0;
- scr.body.padding.right = 0;
-
- lv_style_copy(&sb, &def);
- sb.body.main_color = lv_color_hsv_to_rgb(hue, 30, 60);
- sb.body.grad_color = lv_color_hsv_to_rgb(hue, 30, 60);
- sb.body.border.width = 0;
- sb.body.padding.inner = LV_DPI / 20;
- sb.body.padding.left = 0;
- sb.body.padding.right = 0;
- sb.body.padding.top = 0;
- sb.body.padding.bottom = 0;
- sb.body.radius = LV_DPI / 30;
- sb.body.opa = LV_OPA_COVER;
-
- lv_style_copy(&panel, &bg);
- panel.body.main_color = lv_color_hsv_to_rgb(hue, 11, 18);
- panel.body.grad_color = lv_color_hsv_to_rgb(hue, 11, 18);
- panel.body.radius = LV_DPI / 20;
- panel.body.border.color = lv_color_hsv_to_rgb(hue, 10, 25);
- panel.body.border.width = 1;
- panel.body.border.opa = LV_OPA_COVER;
- panel.body.padding.left = LV_DPI / 10;
- panel.body.padding.right = LV_DPI / 10;
- panel.body.padding.top = LV_DPI / 10;
- panel.body.padding.bottom = LV_DPI / 10;
- panel.line.color = lv_color_hsv_to_rgb(hue, 20, 40);
- panel.line.width = 1;
-
- theme.style.scr = &scr;
- theme.style.bg = &bg;
- theme.style.panel = &def;
-}
-
-void LittleVgl::InitThemeContainer() {
- theme.style.cont = &panel;
-}
-void LittleVgl::InitThemeButton() {
-
-
- lv_style_copy(&btn_rel, &def);
- btn_rel.body.main_color = lv_color_hsv_to_rgb(hue, 10, 40);
- btn_rel.body.grad_color = lv_color_hsv_to_rgb(hue, 10, 20);
- btn_rel.body.border.color = lv_color_hex3(0x111);
- btn_rel.body.border.width = 1;
- btn_rel.body.border.opa = LV_OPA_70;
- btn_rel.body.padding.left = LV_DPI / 4;
- btn_rel.body.padding.right = LV_DPI / 4;
- btn_rel.body.padding.top = LV_DPI / 8;
- btn_rel.body.padding.bottom = LV_DPI / 8;
- btn_rel.body.shadow.type = LV_SHADOW_BOTTOM;
- btn_rel.body.shadow.color = lv_color_hex3(0x111);
- btn_rel.body.shadow.width = LV_DPI / 30;
- btn_rel.text.color = lv_color_hex3(0xeee);
- btn_rel.image.color = lv_color_hex3(0xeee);
-
- lv_style_copy(&btn_pr, &btn_rel);
- btn_pr.body.main_color = lv_color_hsv_to_rgb(hue, 10, 30);
- btn_pr.body.grad_color = lv_color_hsv_to_rgb(hue, 10, 10);
-
- lv_style_copy(&btn_tgl_rel, &btn_rel);
- btn_tgl_rel.body.main_color = lv_color_hsv_to_rgb(hue, 10, 20);
- btn_tgl_rel.body.grad_color = lv_color_hsv_to_rgb(hue, 10, 40);
- btn_tgl_rel.body.shadow.width = LV_DPI / 40;
- btn_tgl_rel.text.color = lv_color_hex3(0xddd);
- btn_tgl_rel.image.color = lv_color_hex3(0xddd);
-
- lv_style_copy(&btn_tgl_pr, &btn_rel);
- btn_tgl_pr.body.main_color = lv_color_hsv_to_rgb(hue, 10, 10);
- btn_tgl_pr.body.grad_color = lv_color_hsv_to_rgb(hue, 10, 30);
- btn_tgl_pr.body.shadow.width = LV_DPI / 30;
- btn_tgl_pr.text.color = lv_color_hex3(0xddd);
- btn_tgl_pr.image.color = lv_color_hex3(0xddd);
-
- lv_style_copy(&btn_ina, &btn_rel);
- btn_ina.body.main_color = lv_color_hsv_to_rgb(hue, 10, 20);
- btn_ina.body.grad_color = lv_color_hsv_to_rgb(hue, 10, 20);
- btn_ina.body.shadow.width = 0;
- btn_ina.text.color = lv_color_hex3(0xaaa);
- btn_ina.image.color = lv_color_hex3(0xaaa);
-
- theme.style.btn.rel = &btn_rel;
- theme.style.btn.pr = &btn_pr;
- theme.style.btn.tgl_rel = &btn_tgl_rel;
- theme.style.btn.tgl_pr = &btn_tgl_pr;
- theme.style.btn.ina = &btn_ina;
-}
-
-void LittleVgl::InitThemeLabel() {
- lv_style_copy(&prim, &bg);
- prim.text.color = lv_color_hsv_to_rgb(hue, 5, 95);
-
- lv_style_copy(&labelBigStyle, &prim);
- labelBigStyle.text.font = &jetbrains_mono_extrabold_compressed;
- LabelBigStyle = &(this->labelBigStyle);
-
- lv_style_copy(&sec, &bg);
- sec.text.color = lv_color_hsv_to_rgb(hue, 15, 65);
-
- lv_style_copy(&hint, &bg);
- hint.text.color = lv_color_hsv_to_rgb(hue, 20, 55);
-
- theme.style.label.prim = &prim;
- theme.style.label.sec = &sec;
- theme.style.label.hint = &hint;
-}
-
-void LittleVgl::InitThemeLine() {
- theme.style.line.decor = &def;
-}
+ lv_theme_t * th = lv_pinetime_theme_init(
+ LV_COLOR_WHITE, LV_COLOR_SILVER,
+ 0,
+ &jetbrains_mono_bold_20,
+ &jetbrains_mono_bold_20,
+ &jetbrains_mono_bold_20,
+ &jetbrains_mono_bold_20);
-void LittleVgl::InitThemeLed() {
- lv_style_copy(&led, &def);
- led.body.shadow.width = LV_DPI / 10;
- led.body.radius = LV_RADIUS_CIRCLE;
- led.body.border.width = LV_DPI / 30;
- led.body.border.opa = LV_OPA_30;
- led.body.main_color = lv_color_hsv_to_rgb(hue, 100, 100);
- led.body.grad_color = lv_color_hsv_to_rgb(hue, 100, 40);
- led.body.border.color = lv_color_hsv_to_rgb(hue, 60, 60);
- led.body.shadow.color = lv_color_hsv_to_rgb(hue, 100, 100);
-
- theme.style.led = &led;
-}
-
-void LittleVgl::InitThemeImage() {
- theme.style.img.light = &def;
- theme.style.img.dark = &def;
-}
-
-void LittleVgl::InitThemeBar() {
- lv_style_copy(&bar_bg, &panel);
- bar_bg.body.padding.left = LV_DPI / 16;
- bar_bg.body.padding.right = LV_DPI / 16;
- bar_bg.body.padding.top = LV_DPI / 16;
- bar_bg.body.padding.bottom = LV_DPI / 16;
- bar_bg.body.radius = LV_RADIUS_CIRCLE;
-
- lv_style_copy(&bar_indic, &def);
- bar_indic.body.main_color = lv_color_hsv_to_rgb(hue, 80, 70);
- bar_indic.body.grad_color = lv_color_hsv_to_rgb(hue, 80, 70);
- bar_indic.body.border.color = lv_color_hsv_to_rgb(hue, 20, 15);
- bar_indic.body.border.width = 1;
- bar_indic.body.border.opa = LV_OPA_COVER;
- bar_indic.body.radius = LV_RADIUS_CIRCLE;
- bar_indic.body.padding.left = 0;
- bar_indic.body.padding.right = 0;
- bar_indic.body.padding.top = 0;
- bar_indic.body.padding.bottom = 0;
-
- theme.style.bar.bg = &bar_bg;
- theme.style.bar.indic = &bar_indic;
-}
-
-void LittleVgl::InitThemeSlider() {
- lv_style_copy(&slider_knob, theme.style.btn.rel);
- slider_knob.body.radius = LV_RADIUS_CIRCLE;
-
- theme.style.slider.bg = theme.style.bar.bg;
- theme.style.slider.indic = theme.style.bar.indic;
- theme.style.slider.knob = &slider_knob;
-}
-
-void LittleVgl::InitThemeSwitch() {
- theme.style.sw.bg = theme.style.bar.bg;
- theme.style.sw.indic = theme.style.bar.indic;
- theme.style.sw.knob_off = theme.style.slider.knob;
- theme.style.sw.knob_on = theme.style.slider.knob;
-}
-
-void LittleVgl::InitThemeMeter() {
- static lv_style_t lmeter_bg;
- lv_style_copy(&lmeter_bg, &def);
- lmeter_bg.body.main_color = lv_color_hsv_to_rgb(hue, 10, 70);
- lmeter_bg.body.grad_color = lv_color_hsv_to_rgb(hue, 95, 90);
- lmeter_bg.body.padding.left = LV_DPI / 10; /*Scale line length*/
- lmeter_bg.body.padding.inner = LV_DPI / 10; /*Text padding*/
- lmeter_bg.body.border.color = lv_color_hex3(0x333);
- lmeter_bg.line.color = lv_color_hex3(0x555);
- lmeter_bg.line.width = 1;
- lmeter_bg.text.color = lv_color_hex3(0xddd);
-
- theme.style.lmeter = &lmeter_bg;
-}
-
-void LittleVgl::InitThemeGauge() {
- static lv_style_t gauge_bg;
- lv_style_copy(&gauge_bg, &def);
- gauge_bg.body.main_color = lv_color_hsv_to_rgb(hue, 10, 70);
- gauge_bg.body.grad_color = gauge_bg.body.main_color;
- gauge_bg.line.color = lv_color_hsv_to_rgb(hue, 80, 75);
- gauge_bg.line.width = 1;
- gauge_bg.text.color = lv_color_hex3(0xddd);
-
- theme.style.gauge = &gauge_bg;
-}
-
-void LittleVgl::InitThemeArc() {
- lv_style_copy(&arc, &def);
- arc.line.width = 8;
- arc.line.color = lv_color_hsv_to_rgb(hue, 80, 70);
- arc.line.rounded = 1;
-
- /*For preloader*/
- arc.body.border.width = 7;
- arc.body.border.color = lv_color_hsv_to_rgb(hue, 11, 48);
- arc.body.padding.left = 1;
- arc.body.padding.right = 1;
- arc.body.padding.top = 1;
- arc.body.padding.bottom = 1;
-
- theme.style.arc = &arc;
-}
-
-void LittleVgl::InitThemePreload() {
-// theme.style.preload = theme.style.arc;
-}
-
-void LittleVgl::InitThemeChart() {
- theme.style.chart = &panel;
-}
-
-void LittleVgl::InitThemeCalendar() {
-
- lv_style_copy(&cal_bg, &bg);
- cal_bg.body.main_color = lv_color_hsv_to_rgb(hue, 10, 40);
- cal_bg.body.grad_color = lv_color_hsv_to_rgb(hue, 10, 40);
- cal_bg.body.border.color = lv_color_hex3(0x333);
- cal_bg.body.border.width = 1;
- cal_bg.body.radius = LV_DPI / 20;
- cal_bg.body.padding.left = LV_DPI / 10;
- cal_bg.body.padding.right = LV_DPI / 10;
- cal_bg.body.padding.top = LV_DPI / 10;
- cal_bg.body.padding.bottom = LV_DPI / 10;
-
-
- lv_style_copy(&cal_header, &bg);
- cal_header.body.main_color = lv_color_hsv_to_rgb(hue, 10, 20);
- cal_header.body.grad_color = lv_color_hsv_to_rgb(hue, 10, 20);
- cal_header.body.radius = 0;
- cal_header.body.border.width = 1;
- cal_header.body.border.color = lv_color_hex3(0x333);
- cal_header.body.padding.left = LV_DPI / 10;
- cal_header.body.padding.right = LV_DPI / 10;
- cal_header.body.padding.top = LV_DPI / 10;
- cal_header.body.padding.bottom = LV_DPI / 10;
-
-
- lv_style_copy(&week_box, &panel);
- week_box.body.main_color = lv_color_hsv_to_rgb(hue, 30, 45);
- week_box.body.grad_color = lv_color_hsv_to_rgb(hue, 30, 45);
- week_box.body.radius = LV_DPI / 20;
- week_box.body.border.width = 1;
- week_box.body.padding.left = LV_DPI / 20;
- week_box.body.padding.right = LV_DPI / 20;
- week_box.body.padding.top = LV_DPI / 25;
- week_box.body.padding.bottom = LV_DPI / 25;
-
- lv_style_copy(&today_box, &week_box);
- today_box.body.main_color = lv_color_hsv_to_rgb(hue, 80, 70);
- today_box.body.grad_color = lv_color_hsv_to_rgb(hue, 80, 70);
- today_box.body.radius = LV_DPI / 20;
- today_box.body.padding.left = LV_DPI / 14;
- today_box.body.padding.right = LV_DPI / 14;
- today_box.body.padding.top = LV_DPI / 14;
- today_box.body.padding.bottom = LV_DPI / 14;
-
- lv_style_copy(&highlighted_days, &bg);
- highlighted_days.text.color = lv_color_hsv_to_rgb(hue, 40, 80);
-
- lv_style_copy(&ina_days, &bg);
- ina_days.text.color = lv_color_hsv_to_rgb(hue, 0, 60);
-
- theme.style.calendar.bg = &cal_bg;
- theme.style.calendar.header = &cal_header;
- theme.style.calendar.week_box = &week_box;
- theme.style.calendar.today_box = &today_box;
- theme.style.calendar.highlighted_days = &highlighted_days;
- theme.style.calendar.day_names = &cal_bg;
- theme.style.calendar.inactive_days = &ina_days;
-}
-
-void LittleVgl::InitThemeCheckBox() {
-
- lv_style_copy(&rel, &def);
- rel.body.radius = LV_DPI / 20;
- rel.body.main_color = lv_color_hsv_to_rgb(hue, 10, 95);
- rel.body.grad_color = lv_color_hsv_to_rgb(hue, 10, 95);
- rel.body.border.color = lv_color_hsv_to_rgb(hue, 10, 50);
- rel.body.border.width = 2;
- ;
-
- lv_style_copy(&pr, &rel);
- pr.body.main_color = lv_color_hsv_to_rgb(hue, 10, 80);
- pr.body.grad_color = lv_color_hsv_to_rgb(hue, 10, 80);
- pr.body.border.color = lv_color_hsv_to_rgb(hue, 10, 20);
- pr.body.border.width = 1;
- ;
-
- lv_style_copy(&tgl_rel, &rel);
- tgl_rel.body.main_color = lv_color_hsv_to_rgb(hue, 80, 90);
- tgl_rel.body.grad_color = lv_color_hsv_to_rgb(hue, 80, 90);
- tgl_rel.body.border.color = lv_color_hsv_to_rgb(hue, 80, 50);
-
- lv_style_copy(&tgl_pr, &tgl_rel);
- tgl_pr.body.main_color = lv_color_hsv_to_rgb(hue, 80, 70);
- tgl_pr.body.grad_color = lv_color_hsv_to_rgb(hue, 80, 70);
- tgl_pr.body.border.color = lv_color_hsv_to_rgb(hue, 80, 30);
- tgl_pr.body.border.width = 1;
- ;
-
- lv_style_copy(&ina, &rel);
- ina.body.main_color = lv_color_hex3(0x777);
- ina.body.grad_color = lv_color_hex3(0x777);
- ina.body.border.width = 0;
-
- theme.style.cb.bg = &lv_style_transp;
- theme.style.cb.box.rel = &rel;
- theme.style.cb.box.pr = &pr;
- theme.style.cb.box.tgl_rel = &tgl_rel;
- theme.style.cb.box.tgl_pr = &tgl_pr;
- theme.style.cb.box.ina = &def;
-}
-
-void LittleVgl::InitThemeButtonMatrix() {
-
- lv_style_copy(&btnm_bg, theme.style.btn.rel);
- btnm_bg.body.padding.left = 2;
- btnm_bg.body.padding.right = 2;
- btnm_bg.body.padding.top = 2;
- btnm_bg.body.padding.bottom = 2;
- btnm_bg.body.padding.inner = 0;
- btnm_bg.body.border.width = 1;
-
- lv_style_copy(&btnm_rel, theme.style.btn.rel);
- btnm_rel.body.border.part = LV_BORDER_FULL | LV_BORDER_INTERNAL;
- btnm_rel.body.border.width = 1;
- btnm_rel.body.radius = 2;
-
- lv_style_copy(&btnm_pr, theme.style.btn.pr);
- btnm_pr.body.border.part = btnm_rel.body.border.part;
- btnm_pr.body.border.width = btnm_rel.body.border.width;
- btnm_pr.body.radius = btnm_rel.body.radius;
-
- lv_style_copy(&btnm_tgl_rel, theme.style.btn.tgl_rel);
- btnm_tgl_rel.body.border.part = btnm_rel.body.border.part;
- btnm_tgl_rel.body.border.width = btnm_rel.body.border.width;
- btnm_tgl_rel.body.radius = btnm_rel.body.radius;
-
- lv_style_copy(&btnm_tgl_pr, theme.style.btn.pr);
- btnm_tgl_pr.body.border.part = btnm_rel.body.border.part;
- btnm_tgl_pr.body.border.width = btnm_rel.body.border.width;
- btnm_tgl_pr.body.radius = btnm_rel.body.radius;
-
- lv_style_copy(&btnm_ina, theme.style.btn.ina);
- btnm_ina.body.border.part = btnm_rel.body.border.part;
- btnm_ina.body.border.width = btnm_rel.body.border.width;
- btnm_ina.body.radius = btnm_rel.body.radius;
-
- theme.style.btnm.bg = &btnm_bg;
- theme.style.btnm.btn.rel = &btnm_rel;
- theme.style.btnm.btn.pr = &btnm_pr;
- theme.style.btnm.btn.tgl_rel = &btnm_tgl_rel;
- theme.style.btnm.btn.tgl_pr = &btnm_tgl_pr;
- theme.style.btnm.btn.ina = &btnm_ina;
-}
-
-void LittleVgl::InitThemeKnob() {
- theme.style.kb.bg = &bg;
- theme.style.kb.btn.rel = theme.style.btn.rel;
- theme.style.kb.btn.pr = theme.style.btn.pr;
- theme.style.kb.btn.tgl_rel = theme.style.btn.tgl_rel;
- theme.style.kb.btn.tgl_pr = theme.style.btn.tgl_pr;
- theme.style.kb.btn.ina = theme.style.btn.ina;
-}
-
-void LittleVgl::InitThemeMessageBox() {
- lv_style_copy(&mbox_bg, &bg);
- mbox_bg.body.main_color = lv_color_hsv_to_rgb(hue, 30, 30);
- mbox_bg.body.grad_color = lv_color_hsv_to_rgb(hue, 30, 30);
- mbox_bg.body.border.color = lv_color_hsv_to_rgb(hue, 11, 20);
- mbox_bg.body.border.width = 1;
- mbox_bg.body.shadow.width = LV_DPI / 10;
- mbox_bg.body.shadow.color = lv_color_hex3(0x222);
- mbox_bg.body.radius = LV_DPI / 20;
- theme.style.mbox.bg = &mbox_bg;
- theme.style.mbox.btn.bg = &lv_style_transp;
- theme.style.mbox.btn.rel = theme.style.btn.rel;
- theme.style.mbox.btn.pr = theme.style.btn.pr;
-}
-
-void LittleVgl::InitThemePage() {
- lv_style_copy(&page_scrl, &bg);
- page_scrl.body.main_color = lv_color_hsv_to_rgb(hue, 10, 40);
- page_scrl.body.grad_color = lv_color_hsv_to_rgb(hue, 10, 40);
- page_scrl.body.border.color = lv_color_hex3(0x333);
- page_scrl.body.border.width = 1;
- page_scrl.body.radius = LV_DPI / 20;
-
- theme.style.page.bg = &panel;
- theme.style.page.scrl = &page_scrl;
- theme.style.page.sb = &sb;
-}
-
-void LittleVgl::InitThemeTextArea() {
- theme.style.ta.area = &panel;
- theme.style.ta.oneline = &panel;
- theme.style.ta.cursor = NULL;
- theme.style.ta.sb = &def;
-}
-
-void LittleVgl::InitThemeSpinBox() {
- theme.style.spinbox.bg = &panel;
- theme.style.spinbox.cursor = theme.style.ta.cursor;
- theme.style.spinbox.sb = theme.style.ta.sb;
-}
-
-void LittleVgl::InitThemeList() {
-
- lv_style_copy(&list_bg, &panel);
- list_bg.body.padding.top = 0;
- list_bg.body.padding.bottom = 0;
- list_bg.body.padding.left = 0;
- list_bg.body.padding.right = 0;
- list_bg.body.padding.inner = 0;
-
- lv_style_copy(&list_btn_rel, &bg);
- list_btn_rel.body.opa = LV_OPA_TRANSP;
- list_btn_rel.body.border.part = LV_BORDER_BOTTOM;
- list_btn_rel.body.border.color = lv_color_hsv_to_rgb(hue, 10, 5);
- list_btn_rel.body.border.width = 1;
- list_btn_rel.body.radius = LV_DPI / 10;
- list_btn_rel.text.color = lv_color_hsv_to_rgb(hue, 5, 80);
- list_btn_rel.image.color = lv_color_hsv_to_rgb(hue, 5, 80);
- list_btn_rel.body.padding.top = LV_DPI / 6;
- list_btn_rel.body.padding.bottom = LV_DPI / 6;
- list_btn_rel.body.padding.left = LV_DPI / 8;
- list_btn_rel.body.padding.right = LV_DPI / 8;
-
- lv_style_copy(&list_btn_pr, theme.style.btn.pr);
- list_btn_pr.body.main_color = lv_color_hsv_to_rgb(hue, 10, 5);
- list_btn_pr.body.grad_color = lv_color_hsv_to_rgb(hue, 10, 5);
- list_btn_pr.body.border.color = lv_color_hsv_to_rgb(hue, 10, 5);
- list_btn_pr.body.border.width = 0;
- list_btn_pr.body.padding.top = LV_DPI / 6;
- list_btn_pr.body.padding.bottom = LV_DPI / 6;
- list_btn_pr.body.padding.left = LV_DPI / 8;
- list_btn_pr.body.padding.right = LV_DPI / 8;
- list_btn_pr.text.color = lv_color_hsv_to_rgb(hue, 5, 80);
- list_btn_pr.image.color = lv_color_hsv_to_rgb(hue, 5, 80);
-
- lv_style_copy(&list_btn_tgl_rel, &list_btn_rel);
- list_btn_tgl_rel.body.opa = LV_OPA_COVER;
- list_btn_tgl_rel.body.main_color = lv_color_hsv_to_rgb(hue, 80, 70);
- list_btn_tgl_rel.body.grad_color = lv_color_hsv_to_rgb(hue, 80, 70);
- list_btn_tgl_rel.body.border.color = lv_color_hsv_to_rgb(hue, 60, 40);
- list_btn_tgl_rel.body.radius = list_bg.body.radius;
-
- lv_style_copy(&list_btn_tgl_pr, &list_btn_tgl_rel);
- list_btn_tgl_pr.body.main_color = lv_color_hsv_to_rgb(hue, 80, 60);
- list_btn_tgl_pr.body.grad_color = lv_color_hsv_to_rgb(hue, 80, 60);
-
- theme.style.list.sb = &sb;
- theme.style.list.bg = &list_bg;
- theme.style.list.scrl = &lv_style_transp_tight;
- theme.style.list.btn.rel = &list_btn_rel;
- theme.style.list.btn.pr = &list_btn_pr;
- theme.style.list.btn.tgl_rel = &list_btn_tgl_rel;
- theme.style.list.btn.tgl_pr = &list_btn_tgl_pr;
- theme.style.list.btn.ina = &def;
-}
-
-void LittleVgl::InitThemeDropDownList() {
- lv_style_copy(&ddlist_bg, theme.style.btn.rel);
- ddlist_bg.text.line_space = LV_DPI / 8;
- ddlist_bg.body.padding.top = LV_DPI / 8;
- ddlist_bg.body.padding.bottom = LV_DPI / 8;
- ddlist_bg.body.padding.left = LV_DPI / 8;
- ddlist_bg.body.padding.right = LV_DPI / 8;
- ddlist_bg.body.radius = LV_DPI / 30;
-
- lv_style_copy(&ddlist_sel, theme.style.btn.rel);
- ddlist_sel.body.main_color = lv_color_hsv_to_rgb(hue, 20, 50);
- ddlist_sel.body.grad_color = lv_color_hsv_to_rgb(hue, 20, 50);
- ddlist_sel.body.radius = 0;
-
- theme.style.ddlist.bg = &ddlist_bg;
- theme.style.ddlist.sel = &ddlist_sel;
- theme.style.ddlist.sb = &def;
-}
-
-void LittleVgl::InitThemeRoller() {
- lv_style_t roller_bg;
-
- lv_style_copy(&roller_bg, theme.style.ddlist.bg);
- roller_bg.body.main_color = lv_color_hsv_to_rgb(hue, 10, 20);
- roller_bg.body.grad_color = lv_color_hsv_to_rgb(hue, 10, 40);
- roller_bg.text.color = lv_color_hsv_to_rgb(hue, 5, 70);
- roller_bg.text.opa = LV_OPA_60;
-
- theme.style.roller.bg = &roller_bg;
- theme.style.roller.sel = theme.style.ddlist.sel;
-}
-
-void LittleVgl::InitThemeTabView() {
- theme.style.tabview.bg = &bg;
- theme.style.tabview.indic = &lv_style_transp;
- theme.style.tabview.btn.bg = &lv_style_transp;
- theme.style.tabview.btn.rel = theme.style.btn.rel;
- theme.style.tabview.btn.pr = theme.style.btn.pr;
- theme.style.tabview.btn.tgl_rel = theme.style.btn.tgl_rel;
- theme.style.tabview.btn.tgl_pr = theme.style.btn.tgl_pr;
-}
-
-void LittleVgl::InitThemeTileView() {
- theme.style.tileview.bg = &lv_style_transp_tight;
- theme.style.tileview.scrl = &lv_style_transp_tight;
- theme.style.tileview.sb = theme.style.page.sb;
-}
-
-void LittleVgl::InitThemeTable() {
- lv_style_copy(&cell, &panel);
- cell.body.radius = 0;
- cell.body.border.width = 1;
- cell.body.padding.left = LV_DPI / 12;
- cell.body.padding.right = LV_DPI / 12;
- cell.body.padding.top = LV_DPI / 12;
- cell.body.padding.bottom = LV_DPI / 12;
-
- theme.style.table.bg = &lv_style_transp_tight;
- theme.style.table.cell = &cell;
-}
+ lv_theme_set_act(th);
-void LittleVgl::InitThemeWindow() {
-// lv_style_copy(&win_bg, &bg);
-// win_bg.body.border.color = lv_color_hex3(0x333);
-// win_bg.body.border.width = 1;
-//
-// lv_style_copy(&win_header, &win_bg);
-// win_header.body.main_color = lv_color_hsv_to_rgb(hue, 10, 20);
-// win_header.body.grad_color = lv_color_hsv_to_rgb(hue, 10, 20);
-// win_header.body.radius = 0;
-// win_header.body.padding.left = 0;
-// win_header.body.padding.right = 0;
-// win_header.body.padding.top = 0;
-// win_header.body.padding.bottom = 0;
-//
-// lv_style_copy(&win_btn_pr, &def);
-// win_btn_pr.body.main_color = lv_color_hsv_to_rgb(hue, 10, 10);
-// win_btn_pr.body.grad_color = lv_color_hsv_to_rgb(hue, 10, 10);
-// win_btn_pr.text.color = lv_color_hex3(0xaaa);
-// win_btn_pr.image.color = lv_color_hex3(0xaaa);
-//
-// theme.style.win.bg = &win_bg;
-// theme.style.win.sb = &sb;
-// theme.style.win.header = &win_header;
-// theme.style.win.content = &lv_style_transp;
-// theme.style.win.btn.rel = &lv_style_transp;
-// theme.style.win.btn.pr = &win_btn_pr;
}
diff --git a/src/displayapp/LittleVgl.h b/src/displayapp/LittleVgl.h
index ea50985c..9b0bd5c6 100644
--- a/src/displayapp/LittleVgl.h
+++ b/src/displayapp/LittleVgl.h
@@ -28,36 +28,7 @@ namespace Pinetime {
void InitDisplay();
void InitTouchpad();
void InitTheme();
- void InitBaseTheme();
- void InitThemeContainer();
- void InitThemeButton();
- void InitThemeLabel();
- void InitThemeLine();
- void InitThemeLed();
- void InitThemeImage();
- void InitThemeBar();
- void InitThemeSlider();
- void InitThemeSwitch();
- void InitThemeMeter();
- void InitThemeGauge();
- void InitThemeArc();
- void InitThemePreload();
- void InitThemeChart();
- void InitThemeCalendar();
- void InitThemeCheckBox();
- void InitThemeButtonMatrix();
- void InitThemeKnob();
- void InitThemeMessageBox();
- void InitThemePage();
- void InitThemeTextArea();
- void InitThemeSpinBox();
- void InitThemeList();
- void InitThemeDropDownList();
- void InitThemeRoller();
- void InitThemeTabView();
- void InitThemeTileView();
- void InitThemeTable();
- void InitThemeWindow();
+
Pinetime::Drivers::St7789& lcd;
Pinetime::Drivers::Cst816S& touchPanel;
@@ -70,35 +41,6 @@ namespace Pinetime {
lv_disp_drv_t disp_drv;
lv_point_t previousClick;
- lv_style_t def;
- lv_style_t scr, bg, sb, panel;
- lv_font_t * font = nullptr;
- uint16_t hue = 10;
- lv_theme_t theme;
- lv_style_t btn_rel, btn_pr, btn_tgl_rel, btn_tgl_pr, btn_ina;
- lv_style_t labelBigStyle;
- lv_style_t prim, sec, hint;
- lv_style_t led;
- lv_style_t bar_bg, bar_indic;
- lv_style_t slider_knob;
- lv_style_t arc;
- lv_style_t cal_bg;
- lv_style_t cal_header;
- lv_style_t week_box;
- lv_style_t today_box;
- lv_style_t highlighted_days;
- lv_style_t ina_days;
- lv_style_t rel, pr, tgl_rel, tgl_pr, ina;
- lv_style_t btnm_bg, btnm_rel, btnm_pr, btnm_tgl_rel, btnm_tgl_pr, btnm_ina;
- lv_style_t mbox_bg;
- lv_style_t page_scrl;
- lv_style_t list_bg, list_btn_rel, list_btn_pr, list_btn_tgl_rel, list_btn_tgl_pr;
- lv_style_t ddlist_bg, ddlist_sel;
- lv_style_t cell;
- lv_style_t win_bg;
- lv_style_t win_header;
- lv_style_t win_btn_pr;
-
bool firstTouch = true;
static constexpr uint8_t nbWriteLines = 4;
static constexpr uint16_t totalNbLines = 320;
diff --git a/src/displayapp/fonts/Readme.md b/src/displayapp/fonts/Readme.md
index 314cb197..8e50c297 100644
--- a/src/displayapp/fonts/Readme.md
+++ b/src/displayapp/fonts/Readme.md
@@ -9,13 +9,13 @@
* Size : 20
* Bpp : 1 bit-per-pixel
* Do not enable font compression and horizontal subpixel hinting
- * Load the file `JetBrainsMono-Bold.woff` and specify the following range : `0x20-0x7f, 0x410-0x44f`
- * Add a 2nd font, load the file `FontAwesome5-Solid+Brands+Regular.woff` and specify the following range : `0xf293, 0xf294, 0xf244, 0xf240, 0xf242, 0xf243, 0xf241, 0xf54b, 0xf21e, 0xf1e6, 0xf54b, 0xf017, 0xf129, 0xf03a, 0xf185, 0xf560, 0xf001, 0xf3fd, 0xf069, 0xf1fc, 0xf45d`
+ * Load the file `JetBrainsMono-Bold.tff` and specify the following range : `0x20-0x7f, 0x410-0x44f`
+ * Add a 2nd font, load the file `FontAwesome5-Solid+Brands+Regular.woff` and specify the following range : `0xf293, 0xf294, 0xf244, 0xf240, 0xf242, 0xf243, 0xf241, 0xf54b, 0xf21e, 0xf1e6, 0xf54b, 0xf017, 0xf129, 0xf03a, 0xf185, 0xf560, 0xf001, 0xf3fd, 0xf069, 0xf1fc, 0xf45d, 0xf59f, 0xf5a0, 0xf029, 0xf027, 0xf028, 0xf6a9, 0xf04b, 0xf04c, 0xf048, 0xf051, 0xf095, 0xf3dd`
* Click on Convert, and download the file `jetbrains_mono_bold_20.c` and copy it in `src/DisplayApp/Fonts`
Add new symbols:
* Browse the [cheatsheet](https://fontawesome.com/cheatsheet/free/solid) and find your new symbols
- * For each symbol, add its hex code (0xf641 for the 'Ad' icon, for example) to the *Range* list
+ * For each symbol, add its hex code (0xf641 for the 'Ad' icon, for example) to the *Range* list (Remember to keep this readme updated with newest range list)
* Convert this hex value into a UTF-8 code using [this site](http://www.ltg.ed.ac.uk/~richard/utf-8.cgi?input=f185&mode=hex)
* Define the new symbols in `src/DisplayApp/Screens/Symbols.h`:
```
diff --git a/src/displayapp/fonts/jetbrains_mono_bold_20.c b/src/displayapp/fonts/jetbrains_mono_bold_20.c
index 2539eeed..dc30104a 100644
--- a/src/displayapp/fonts/jetbrains_mono_bold_20.c
+++ b/src/displayapp/fonts/jetbrains_mono_bold_20.c
@@ -22,43 +22,44 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = {
0x0,
/* U+21 "!" */
- 0xff, 0xff, 0xff, 0xe0, 0xf, 0xc0,
+ 0xff, 0xff, 0xff, 0xfc, 0xf, 0xc0,
/* U+22 "\"" */
0xef, 0xdf, 0xbf, 0x7e, 0xfd, 0xc0,
/* U+23 "#" */
- 0x8, 0xc3, 0x10, 0x62, 0x3f, 0xf7, 0xfe, 0x23,
+ 0x8, 0xc3, 0x10, 0x66, 0x3f, 0xf7, 0xfe, 0x23,
0x4, 0x61, 0x88, 0x31, 0x1f, 0xfb, 0xff, 0x19,
0x82, 0x30, 0xc4, 0x0,
/* U+24 "$" */
- 0x8, 0x2, 0x1, 0xc1, 0xfe, 0xeb, 0xf2, 0x7c,
- 0x83, 0xa0, 0x7c, 0xf, 0xc0, 0xf8, 0x27, 0x9,
- 0xf2, 0x7f, 0xf9, 0xfc, 0x8, 0x2, 0x0, 0x80,
+ 0x8, 0x2, 0x0, 0x80, 0xfc, 0x7f, 0xba, 0x7e,
+ 0x9f, 0xa0, 0xf8, 0x1f, 0x83, 0xf8, 0x3f, 0x9,
+ 0xfa, 0x7e, 0x9d, 0xfe, 0x7f, 0x2, 0x0, 0x80,
+ 0x20,
/* U+25 "%" */
- 0x78, 0x1f, 0x83, 0x30, 0x66, 0x1f, 0xcc, 0xf2,
- 0x1, 0x80, 0xde, 0x67, 0xf8, 0xcc, 0x19, 0x83,
- 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0xf, 0x0, 0xf0, 0xf, 0x1, 0xf8, 0x19, 0x81,
- 0x98, 0x19, 0x83, 0x9c, 0x3f, 0xc3, 0xfc, 0x70,
- 0xe7, 0xe, 0x60, 0x66, 0x6,
+ 0x1e, 0x7, 0x81, 0xe0, 0xfc, 0x3f, 0xc, 0xc3,
+ 0x31, 0xce, 0x73, 0x9f, 0xe7, 0xfb, 0x87, 0xe1,
+ 0xf0, 0x30,
/* U+42 "B" */
0xfe, 0x3f, 0xce, 0x3b, 0x8e, 0xe3, 0xb8, 0xcf,
@@ -172,9 +174,8 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = {
0x8f, 0xc0,
/* U+44 "D" */
- 0xfe, 0x3f, 0xee, 0x3f, 0x87, 0xe1, 0xf8, 0x7e,
- 0x1f, 0x87, 0xe1, 0xf8, 0x7e, 0x1f, 0x8f, 0xff,
- 0xbf, 0x80,
+ 0xfe, 0x7f, 0xb9, 0xfc, 0x7e, 0x3f, 0x1f, 0x8f,
+ 0xc7, 0xe3, 0xf1, 0xf8, 0xfc, 0xff, 0xf7, 0xf0,
/* U+45 "E" */
0xff, 0xff, 0xf8, 0x1c, 0xe, 0x7, 0x3, 0xfd,
@@ -185,34 +186,34 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = {
0xff, 0xe0, 0x70, 0x38, 0x1c, 0xe, 0x7, 0x0,
/* U+47 "G" */
- 0x3f, 0x1f, 0xef, 0x3f, 0x87, 0xe0, 0x38, 0xe,
+ 0x3f, 0x1f, 0xef, 0x1f, 0x87, 0xe0, 0x38, 0xe,
0x7f, 0x9f, 0xe1, 0xf8, 0x7e, 0x1f, 0xcf, 0x7f,
- 0x87, 0x80,
+ 0x8f, 0xc0,
/* U+48 "H" */
0xe3, 0xf1, 0xf8, 0xfc, 0x7e, 0x3f, 0x1f, 0xff,
0xff, 0xe3, 0xf1, 0xf8, 0xfc, 0x7e, 0x3f, 0x1c,
/* U+49 "I" */
- 0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ef, 0x3f, 0x87, 0xe1, 0xf8, 0x7e,
- 0x1f, 0x87, 0xe1, 0xf8, 0x7e, 0x1f, 0xcf, 0x7f,
- 0x8f, 0x80,
+ 0x3e, 0x3f, 0xb8, 0xfc, 0x7e, 0x3f, 0x1f, 0x8f,
+ 0xc7, 0xe3, 0xf1, 0xf8, 0xfc, 0x77, 0xf1, 0xf0,
/* U+50 "P" */
0xff, 0x3f, 0xee, 0x3f, 0x87, 0xe1, 0xf8, 0xff,
@@ -233,7 +233,7 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = {
/* U+51 "Q" */
0x3f, 0x1f, 0xef, 0x3f, 0x87, 0xe1, 0xf8, 0x7e,
0x1f, 0x87, 0xe1, 0xf8, 0x7e, 0x1f, 0xcf, 0x7f,
- 0x8f, 0x80, 0x70, 0xe, 0x1, 0xc0,
+ 0x8f, 0x80, 0x70, 0xe, 0x3, 0x80, 0x70,
/* U+52 "R" */
0xff, 0x3f, 0xee, 0x3f, 0x87, 0xe1, 0xf8, 0xff,
@@ -241,8 +241,8 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = {
0xb8, 0x70,
/* U+53 "S" */
- 0x3f, 0x1f, 0xee, 0x1f, 0x87, 0xe0, 0x3e, 0x7,
- 0xf0, 0x7e, 0x3, 0xc0, 0x7e, 0x1f, 0xcf, 0x7f,
+ 0x3f, 0x1f, 0xee, 0x3f, 0x87, 0xe0, 0x3c, 0x7,
+ 0xf0, 0xfe, 0x3, 0xc0, 0x7e, 0x1f, 0xcf, 0x7f,
0x8f, 0xc0,
/* U+54 "T" */
@@ -255,14 +255,14 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = {
0xc7, 0xe3, 0xf1, 0xf8, 0xfc, 0x77, 0xf1, 0xf0,
/* U+56 "V" */
- 0x60, 0x66, 0x6, 0x70, 0xe7, 0xe, 0x30, 0xc3,
- 0xc, 0x39, 0xc1, 0x98, 0x19, 0x81, 0x98, 0x1f,
- 0x80, 0xf0, 0xf, 0x0, 0xf0,
+ 0xc0, 0xf8, 0x7e, 0x1d, 0x86, 0x61, 0x9c, 0xe7,
+ 0x38, 0xcc, 0x33, 0xf, 0xc3, 0xf0, 0x78, 0x1e,
+ 0x7, 0x80,
/* U+57 "W" */
- 0xc6, 0x78, 0xcf, 0x39, 0xe7, 0x3e, 0xa6, 0xd6,
- 0xda, 0xdb, 0x5b, 0x6b, 0x6d, 0x2d, 0xe7, 0x3c,
- 0xe7, 0x9c, 0xe3, 0x80,
+ 0xce, 0x79, 0xcf, 0x29, 0xe5, 0x3c, 0xa7, 0xd5,
+ 0xda, 0xb3, 0x56, 0x7b, 0xcf, 0x79, 0xef, 0x38,
+ 0xe7, 0x1c, 0xe3, 0x80,
/* U+58 "X" */
0xe1, 0xd8, 0x67, 0x38, 0xcc, 0x3f, 0x7, 0x81,
@@ -270,12 +270,12 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = {
0xf8, 0x70,
/* U+59 "Y" */
- 0xe0, 0xfc, 0x1d, 0xc7, 0x38, 0xe3, 0x98, 0x77,
+ 0xe0, 0xfc, 0x1d, 0xc7, 0x38, 0xe3, 0xb8, 0x77,
0x6, 0xc0, 0xf8, 0xe, 0x1, 0xc0, 0x38, 0x7,
0x0, 0xe0, 0x1c, 0x0,
/* U+5A "Z" */
- 0xff, 0xff, 0xc0, 0xe0, 0xe0, 0x60, 0x70, 0x70,
+ 0xff, 0xff, 0xc0, 0xe0, 0xe0, 0x70, 0x70, 0x70,
0x38, 0x38, 0x38, 0x1c, 0x1c, 0xf, 0xff, 0xfc,
/* U+5B "[" */
@@ -299,29 +299,27 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = {
0xff, 0xff, 0xf0,
/* U+60 "`" */
- 0x63, 0x8e,
+ 0xe3, 0x8c,
/* U+61 "a" */
- 0x3f, 0x1f, 0xee, 0x1c, 0x7, 0x3f, 0xdf, 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0, 0xfc, 0x3f, 0xc, 0xc3,
+ 0x31, 0xce, 0x73, 0x9f, 0xe7, 0xfb, 0x87, 0xe1,
+ 0xf0, 0x30,
/* U+411 "Б" */
0xff, 0xbf, 0xee, 0x3, 0x80, 0xe0, 0x3f, 0xcf,
0xfb, 0x8f, 0xe1, 0xf8, 0x7e, 0x1f, 0x8f, 0xff,
- 0xbf, 0xc0,
+ 0xbf, 0x80,
/* U+412 "В" */
0xfe, 0x3f, 0xce, 0x3b, 0x8e, 0xe3, 0xb8, 0xcf,
@@ -454,7 +453,7 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = {
/* U+414 "Д" */
0x3f, 0xc7, 0xf8, 0xe7, 0x1c, 0xe3, 0x9c, 0x73,
- 0x8e, 0x71, 0xce, 0x39, 0xc7, 0x39, 0xe7, 0x38,
+ 0x8e, 0x71, 0xce, 0x39, 0xc7, 0x38, 0xe7, 0x38,
0xef, 0xff, 0xff, 0xf8, 0x3f, 0x7, 0xe0, 0xe0,
/* U+415 "Е" */
@@ -462,36 +461,36 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = {
0xfe, 0xe0, 0x70, 0x38, 0x1c, 0xf, 0xff, 0xfc,
/* U+416 "Ж" */
- 0xe6, 0x36, 0x66, 0x66, 0x66, 0x66, 0x36, 0xc3,
- 0x6c, 0x3f, 0xc3, 0x6c, 0x36, 0xc6, 0x66, 0x66,
- 0x66, 0x66, 0xe6, 0x7c, 0x63,
+ 0xe6, 0x76, 0x66, 0x66, 0x67, 0x66, 0x36, 0xc3,
+ 0x6c, 0x3f, 0xc3, 0x6c, 0x36, 0xc7, 0x6e, 0x66,
+ 0x66, 0x66, 0x66, 0x6c, 0x63,
/* U+417 "З" */
- 0x1f, 0x87, 0xf9, 0xc7, 0xb0, 0x70, 0xe, 0x3,
- 0x87, 0xe0, 0xfe, 0x1, 0xe0, 0x1d, 0x83, 0xb8,
+ 0x1f, 0x8f, 0xfd, 0xc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73, 0x9d, 0xe7, 0xf1,
+ 0xf8, 0x70,
/* U+41C "М" */
- 0xe1, 0xf8, 0x7f, 0x3f, 0xcf, 0xda, 0xf7, 0xbd,
+ 0xe1, 0xf8, 0x7f, 0x3f, 0xcf, 0xd2, 0xf7, 0xbd,
0xef, 0x33, 0xc0, 0xf0, 0x3c, 0xf, 0x3, 0xc0,
0xf0, 0x30,
@@ -500,9 +499,8 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = {
0xff, 0xe3, 0xf1, 0xf8, 0xfc, 0x7e, 0x3f, 0x1c,
/* U+41E "О" */
- 0x3f, 0x1f, 0xef, 0x3f, 0x87, 0xe1, 0xf8, 0x7e,
- 0x1f, 0x87, 0xe1, 0xf8, 0x7e, 0x1f, 0xcf, 0x7f,
- 0x8f, 0x80,
+ 0x3e, 0x3f, 0xb8, 0xfc, 0x7e, 0x3f, 0x1f, 0x8f,
+ 0xc7, 0xe3, 0xf1, 0xf8, 0xfc, 0x77, 0xf1, 0xf0,
/* U+41F "П" */
0xff, 0xff, 0xf8, 0xfc, 0x7e, 0x3f, 0x1f, 0x8f,
@@ -524,14 +522,14 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = {
0x3, 0x80,
/* U+423 "У" */
- 0xc0, 0xf8, 0x76, 0x1d, 0xc6, 0x73, 0x8c, 0xc3,
- 0xf0, 0x7c, 0x1e, 0x3, 0x80, 0xc0, 0x70, 0x1c,
+ 0xe1, 0xf8, 0x76, 0x19, 0xce, 0x33, 0x8c, 0xc3,
+ 0xb0, 0x7c, 0x1e, 0x3, 0x80, 0xc0, 0x70, 0x1c,
0x6, 0x0,
/* U+424 "Ф" */
0xc, 0xf, 0xc7, 0xfb, 0xb7, 0xcc, 0xf3, 0x3c,
0xcf, 0x33, 0xcc, 0xf3, 0x3c, 0xcf, 0xb7, 0x7f,
- 0x8f, 0xc0, 0xc0,
+ 0x8f, 0xc0, 0xc0, 0x30,
/* U+425 "Х" */
0xe1, 0xd8, 0x67, 0x38, 0xcc, 0x3f, 0x7, 0x81,
@@ -544,9 +542,8 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = {
0xff, 0xf0, 0x1c, 0x7, 0x1, 0xc0,
/* U+427 "Ч" */
- 0xe1, 0xf8, 0x7e, 0x1f, 0x87, 0xe1, 0xf8, 0x7f,
- 0x1d, 0xff, 0x3f, 0xc0, 0x70, 0x1c, 0x7, 0x1,
- 0xc0, 0x70,
+ 0xe3, 0xf1, 0xf8, 0xfc, 0x7e, 0x3f, 0x1f, 0xce,
+ 0xff, 0x3f, 0x81, 0xc0, 0xe0, 0x70, 0x38, 0x1c,
/* U+428 "Ш" */
0xcc, 0xf3, 0x3c, 0xcf, 0x33, 0xcc, 0xf3, 0x3c,
@@ -559,9 +556,9 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = {
0x6f, 0xff, 0xff, 0xc0, 0x18, 0x3,
/* U+42A "Ъ" */
- 0xf8, 0xf, 0x80, 0x38, 0x3, 0x80, 0x38, 0x3,
- 0xf8, 0x3f, 0xe3, 0x8f, 0x38, 0x73, 0x87, 0x38,
- 0x73, 0x8f, 0x3f, 0xe3, 0xf8,
+ 0xfc, 0xf, 0xc0, 0x1c, 0x1, 0xc0, 0x1c, 0x1,
+ 0xfc, 0x1f, 0xe1, 0xcf, 0x1c, 0x71, 0xc7, 0x1c,
+ 0x71, 0xcf, 0x1f, 0xe1, 0xf8,
/* U+42B "Ы" */
0xc0, 0xf0, 0x3c, 0xf, 0x3, 0xc0, 0xfe, 0x3f,
@@ -571,17 +568,16 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = {
/* U+42C "Ь" */
0xe0, 0x38, 0xe, 0x3, 0x80, 0xe0, 0x3f, 0xcf,
0xfb, 0x8f, 0xe1, 0xf8, 0x7e, 0x1f, 0x8f, 0xff,
- 0xbf, 0xc0,
+ 0xbf, 0x80,
/* U+42D "Э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GE_CONST const uint8_t gylph_bitmap[] = {
0xc0, 0x70,
/* U+447 "ч" */
- 0xe1, 0xf8, 0x7e, 0x1f, 0x87, 0xe1, 0xfc, 0x77,
- 0xfc, 0xff, 0x1, 0xc0, 0x70, 0x1c,
+ 0xe3, 0xf1, 0xf8, 0xfc, 0x7e, 0x3b, 0xfc, 0xfe,
+ 0x7, 0x3, 0x81, 0xc0, 0xe0,
/* U+448 "ш" */
0xcc, 0xf3, 0x3c, 0xcf, 0x33, 0xcc, 0xf3, 0x3c,
@@ -708,23 +703,23 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = {
/* U+44B "ы" */
0xc0, 0xf0, 0x3c, 0xf, 0x3, 0xf8, 0xff, 0x3c,
- 0xef, 0x1b, 0xce, 0xff, 0x3f, 0x8c,
+ 0x6f, 0x1b, 0xc6, 0xff, 0x3f, 0x8c,
/* U+44C "ь" */
0xe0, 0x38, 0xe, 0x3, 0x80, 0xff, 0x3f, 0xee,
0x1f, 0x87, 0xe1, 0xff, 0xef, 0xf0,
/* U+44D "э" */
- 0x3f, 0x1f, 0xee, 0x3c, 0x7, 0x1f, 0xc7, 0xf0,
- 0x1f, 0x87, 0xe3, 0xdf, 0xe1, 0xf0,
+ 0x3e, 0x3f, 0xb8, 0xe0, 0x70, 0xf8, 0x7c, 0xf,
+ 0xc7, 0xe7, 0xbf, 0x8f, 0x80,
/* U+44E "ю" */
0xc7, 0xb3, 0xfc, 0xcf, 0x33, 0xfc, 0xff, 0x3c,
0xcf, 0x33, 0xcc, 0xf3, 0xfc, 0x78,
/* U+44F "я" */
- 0x3f, 0xdf, 0xfe, 0x1f, 0x87, 0xe1, 0xff, 0xf7,
- 0xfc, 0xe7, 0x71, 0xdc, 0x7e, 0x1c,
+ 0x3f, 0xbf, 0xf8, 0xfc, 0x7e, 0x3b, 0xfc, 0xfe,
+ 0x77, 0x33, 0xb9, 0xf8, 0xe0,
/* U+F001 "" */
0x0, 0x0, 0x70, 0x0, 0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0xfb, 0xcc, 0x0, 0x6c, 0x0
+ 0xfb, 0xcc, 0x0, 0x6c, 0x0,
+
+ /* U+F6A9 "" */
+ 0x0, 0xc0, 0x0, 0x1c, 0x0, 0x3, 0xc0, 0x0,
+ 0x7c, 0x0, 0xff, 0xc6, 0x2f, 0xfc, 0x77, 0xff,
+ 0xc7, 0xef, 0xfc, 0x3c, 0xff, 0xc7, 0xef, 0xfc,
+ 0x77, 0xff, 0xc6, 0x20, 0x7c, 0x0, 0x3, 0xc0,
+ 0x0, 0x1c, 0x0, 0x0, 0xc0, 0x0
};
@@ -902,182 +982,193 @@ static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
{.bitmap_index = 1, .adv_w = 192, .box_w = 3, .box_h = 14, .ofs_x = 4, .ofs_y = 0},
{.bitmap_index = 7, .adv_w = 192, .box_w = 7, .box_h = 6, .ofs_x = 3, .ofs_y = 8},
{.bitmap_index = 13, .adv_w = 192, .box_w = 11, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 33, .adv_w = 192, .box_w = 10, .box_h = 19, .ofs_x = 1, .ofs_y = -3},
- {.bitmap_index = 57, .adv_w = 192, .box_w = 11, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 77, .adv_w = 192, .box_w = 11, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 97, .adv_w = 192, .box_w = 3, .box_h = 6, .ofs_x = 5, .ofs_y = 8},
- {.bitmap_index = 100, .adv_w = 192, .box_w = 7, .box_h = 19, .ofs_x = 3, .ofs_y = -2},
- {.bitmap_index = 117, .adv_w = 192, .box_w = 7, .box_h = 19, .ofs_x = 2, .ofs_y = -2},
- {.bitmap_index = 134, .adv_w = 192, .box_w = 10, .box_h = 10, .ofs_x = 1, .ofs_y = 1},
- {.bitmap_index = 147, .adv_w = 192, .box_w = 10, .box_h = 9, .ofs_x = 1, .ofs_y = 2},
- {.bitmap_index = 159, .adv_w = 192, .box_w = 5, .box_h = 6, .ofs_x = 3, .ofs_y = -3},
- {.bitmap_index = 163, .adv_w = 192, .box_w = 8, .box_h = 2, .ofs_x = 2, .ofs_y = 5},
- {.bitmap_index = 165, .adv_w = 192, .box_w = 4, .box_h = 4, .ofs_x = 4, .ofs_y = 0},
- {.bitmap_index = 167, .adv_w = 192, .box_w = 10, .box_h = 19, .ofs_x = 1, .ofs_y = -2},
- {.bitmap_index = 191, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 209, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 225, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 33, .adv_w = 192, .box_w = 10, .box_h = 20, .ofs_x = 1, .ofs_y = -3},
+ {.bitmap_index = 58, .adv_w = 192, .box_w = 12, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 79, .adv_w = 192, .box_w = 11, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 99, .adv_w = 192, .box_w = 3, .box_h = 6, .ofs_x = 5, .ofs_y = 8},
+ {.bitmap_index = 102, .adv_w = 192, .box_w = 7, .box_h = 19, .ofs_x = 3, .ofs_y = -2},
+ {.bitmap_index = 119, .adv_w = 192, .box_w = 7, .box_h = 19, .ofs_x = 2, .ofs_y = -2},
+ {.bitmap_index = 136, .adv_w = 192, .box_w = 10, .box_h = 10, .ofs_x = 1, .ofs_y = 1},
+ {.bitmap_index = 149, .adv_w = 192, .box_w = 10, .box_h = 9, .ofs_x = 1, .ofs_y = 2},
+ {.bitmap_index = 161, .adv_w = 192, .box_w = 5, .box_h = 6, .ofs_x = 3, .ofs_y = -4},
+ {.bitmap_index = 165, .adv_w = 192, .box_w = 6, .box_h = 2, .ofs_x = 3, .ofs_y = 5},
+ {.bitmap_index = 167, .adv_w = 192, .box_w = 4, .box_h = 3, .ofs_x = 4, .ofs_y = 0},
+ {.bitmap_index = 169, .adv_w = 192, .box_w = 10, .box_h = 19, .ofs_x = 1, .ofs_y = -2},
+ {.bitmap_index = 193, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 211, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
+ {.bitmap_index = 227, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 243, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
{.bitmap_index = 261, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 277, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 293, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 311, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 329, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 347, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 365, .adv_w = 192, .box_w = 3, .box_h = 11, .ofs_x = 4, .ofs_y = 0},
- {.bitmap_index = 370, .adv_w = 192, .box_w = 5, .box_h = 14, .ofs_x = 3, .ofs_y = -3},
- {.bitmap_index = 379, .adv_w = 192, .box_w = 9, .box_h = 11, .ofs_x = 2, .ofs_y = 1},
- {.bitmap_index = 392, .adv_w = 192, .box_w = 9, .box_h = 7, .ofs_x = 2, .ofs_y = 3},
- {.bitmap_index = 400, .adv_w = 192, .box_w = 9, .box_h = 11, .ofs_x = 2, .ofs_y = 1},
- {.bitmap_index = 413, .adv_w = 192, .box_w = 8, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 427, .adv_w = 192, .box_w = 11, .box_h = 17, .ofs_x = 1, .ofs_y = -3},
- {.bitmap_index = 451, .adv_w = 192, .box_w = 12, .box_h = 14, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 472, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 490, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 508, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 526, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 542, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 558, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 576, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 592, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 608, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 626, .adv_w = 192, .box_w = 11, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 646, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 662, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 680, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 696, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 714, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 732, .adv_w = 192, .box_w = 10, .box_h = 17, .ofs_x = 1, .ofs_y = -3},
- {.bitmap_index = 754, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 772, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 790, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 808, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 824, .adv_w = 192, .box_w = 12, .box_h = 14, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 845, .adv_w = 192, .box_w = 11, .box_h = 14, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 865, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 883, .adv_w = 192, .box_w = 11, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 903, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 919, .adv_w = 192, .box_w = 6, .box_h = 18, .ofs_x = 4, .ofs_y = -2},
- {.bitmap_index = 933, .adv_w = 192, .box_w = 10, .box_h = 19, .ofs_x = 1, .ofs_y = -2},
- {.bitmap_index = 957, .adv_w = 192, .box_w = 6, .box_h = 18, .ofs_x = 3, .ofs_y = -2},
- {.bitmap_index = 971, .adv_w = 192, .box_w = 10, .box_h = 8, .ofs_x = 1, .ofs_y = 6},
- {.bitmap_index = 981, .adv_w = 192, .box_w = 10, .box_h = 2, .ofs_x = 1, .ofs_y = -3},
- {.bitmap_index = 984, .adv_w = 192, .box_w = 5, .box_h = 3, .ofs_x = 3, .ofs_y = 13},
- {.bitmap_index = 986, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1000, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1018, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1032, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1050, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1064, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1082, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = -3},
- {.bitmap_index = 1100, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1116, .adv_w = 192, .box_w = 10, .box_h = 15, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 1135, .adv_w = 192, .box_w = 8, .box_h = 18, .ofs_x = 1, .ofs_y = -3},
- {.bitmap_index = 1153, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 1171, .adv_w = 192, .box_w = 11, .box_h = 14, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1191, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1205, .adv_w = 192, .box_w = 9, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1218, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1232, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = -3},
- {.bitmap_index = 1250, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = -3},
- {.bitmap_index = 1268, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 1282, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1296, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1314, .adv_w = 192, .box_w = 9, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1327, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1341, .adv_w = 192, .box_w = 11, .box_h = 11, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1357, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1371, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = -3},
- {.bitmap_index = 1389, .adv_w = 192, .box_w = 9, .box_h = 11, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 1402, .adv_w = 192, .box_w = 9, .box_h = 18, .ofs_x = 2, .ofs_y = -2},
- {.bitmap_index = 1423, .adv_w = 192, .box_w = 3, .box_h = 18, .ofs_x = 5, .ofs_y = -2},
- {.bitmap_index = 1430, .adv_w = 192, .box_w = 10, .box_h = 18, .ofs_x = 1, .ofs_y = -2},
- {.bitmap_index = 1453, .adv_w = 192, .box_w = 10, .box_h = 4, .ofs_x = 1, .ofs_y = 5},
- {.bitmap_index = 1458, .adv_w = 192, .box_w = 12, .box_h = 14, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1479, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 1497, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1515, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 1531, .adv_w = 192, .box_w = 11, .box_h = 17, .ofs_x = 1, .ofs_y = -3},
- {.bitmap_index = 1555, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 1571, .adv_w = 192, .box_w = 12, .box_h = 14, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1592, .adv_w = 192, .box_w = 11, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1612, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1628, .adv_w = 192, .box_w = 9, .box_h = 19, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1650, .adv_w = 192, .box_w = 11, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1670, .adv_w = 192, .box_w = 11, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1690, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1708, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1724, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1742, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1758, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1776, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1794, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1812, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1830, .adv_w = 192, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1849, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1867, .adv_w = 192, .box_w = 10, .box_h = 17, .ofs_x = 1, .ofs_y = -3},
- {.bitmap_index = 1889, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1907, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1925, .adv_w = 192, .box_w = 11, .box_h = 16, .ofs_x = 1, .ofs_y = -2},
- {.bitmap_index = 1947, .adv_w = 192, .box_w = 12, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1968, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1986, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 2004, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2022, .adv_w = 192, .box_w = 11, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2042, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2060, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2074, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2092, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2106, .adv_w = 192, .box_w = 9, .box_h = 11, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 2119, .adv_w = 192, .box_w = 11, .box_h = 14, .ofs_x = 1, .ofs_y = -3},
- {.bitmap_index = 2139, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2153, .adv_w = 192, .box_w = 12, .box_h = 11, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2170, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2184, .adv_w = 192, .box_w = 9, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2197, .adv_w = 192, .box_w = 9, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2215, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 2229, .adv_w = 192, .box_w = 11, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2245, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2259, .adv_w = 192, .box_w = 9, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2272, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2286, .adv_w = 192, .box_w = 9, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2299, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = -3},
- {.bitmap_index = 2317, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2331, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2345, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = -3},
- {.bitmap_index = 2363, .adv_w = 192, .box_w = 10, .box_h = 17, .ofs_x = 1, .ofs_y = -3},
- {.bitmap_index = 2385, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2399, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = -3},
- {.bitmap_index = 2417, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2431, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2445, .adv_w = 192, .box_w = 11, .box_h = 13, .ofs_x = 1, .ofs_y = -2},
- {.bitmap_index = 2463, .adv_w = 192, .box_w = 12, .box_h = 11, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2480, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2494, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 2508, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2522, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2536, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2550, .adv_w = 320, .box_w = 20, .box_h = 20, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 2600, .adv_w = 320, .box_w = 19, .box_h = 20, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 2648, .adv_w = 320, .box_w = 20, .box_h = 17, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 2691, .adv_w = 320, .box_w = 19, .box_h = 20, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 2739, .adv_w = 120, .box_w = 8, .box_h = 19, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 2758, .adv_w = 320, .box_w = 20, .box_h = 20, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 2808, .adv_w = 240, .box_w = 15, .box_h = 19, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 2844, .adv_w = 320, .box_w = 20, .box_h = 19, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 2892, .adv_w = 320, .box_w = 20, .box_h = 17, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 2935, .adv_w = 400, .box_w = 25, .box_h = 12, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 2973, .adv_w = 400, .box_w = 25, .box_h = 12, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 3011, .adv_w = 400, .box_w = 25, .box_h = 12, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 3049, .adv_w = 400, .box_w = 25, .box_h = 12, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 3087, .adv_w = 400, .box_w = 25, .box_h = 12, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 3125, .adv_w = 280, .box_w = 15, .box_h = 20, .ofs_x = 1, .ofs_y = -3},
- {.bitmap_index = 3163, .adv_w = 200, .box_w = 11, .box_h = 21, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 3192, .adv_w = 360, .box_w = 23, .box_h = 17, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 3241, .adv_w = 320, .box_w = 20, .box_h = 20, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 3291, .adv_w = 400, .box_w = 25, .box_h = 19, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 3351, .adv_w = 320, .box_w = 20, .box_h = 21, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 3404, .adv_w = 360, .box_w = 22, .box_h = 19, .ofs_x = 0, .ofs_y = -2}
+ {.bitmap_index = 277, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 295, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 313, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 331, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 349, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 367, .adv_w = 192, .box_w = 3, .box_h = 11, .ofs_x = 4, .ofs_y = 0},
+ {.bitmap_index = 372, .adv_w = 192, .box_w = 5, .box_h = 15, .ofs_x = 3, .ofs_y = -4},
+ {.bitmap_index = 382, .adv_w = 192, .box_w = 9, .box_h = 11, .ofs_x = 2, .ofs_y = 1},
+ {.bitmap_index = 395, .adv_w = 192, .box_w = 9, .box_h = 7, .ofs_x = 2, .ofs_y = 3},
+ {.bitmap_index = 403, .adv_w = 192, .box_w = 9, .box_h = 11, .ofs_x = 2, .ofs_y = 1},
+ {.bitmap_index = 416, .adv_w = 192, .box_w = 8, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
+ {.bitmap_index = 430, .adv_w = 192, .box_w = 11, .box_h = 18, .ofs_x = 1, .ofs_y = -4},
+ {.bitmap_index = 455, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 473, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
+ {.bitmap_index = 491, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 509, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 525, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
+ {.bitmap_index = 541, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
+ {.bitmap_index = 557, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 575, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
+ {.bitmap_index = 591, .adv_w = 192, .box_w = 8, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
+ {.bitmap_index = 605, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 623, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
+ {.bitmap_index = 641, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
+ {.bitmap_index = 657, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 675, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 691, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 707, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
+ {.bitmap_index = 725, .adv_w = 192, .box_w = 10, .box_h = 18, .ofs_x = 1, .ofs_y = -4},
+ {.bitmap_index = 748, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
+ {.bitmap_index = 766, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 784, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 802, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 818, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 836, .adv_w = 192, .box_w = 11, .box_h = 14, .ofs_x = 0, .ofs_y = 0},
+ {.bitmap_index = 856, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 874, .adv_w = 192, .box_w = 11, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 894, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
+ {.bitmap_index = 910, .adv_w = 192, .box_w = 6, .box_h = 18, .ofs_x = 4, .ofs_y = -2},
+ {.bitmap_index = 924, .adv_w = 192, .box_w = 10, .box_h = 19, .ofs_x = 1, .ofs_y = -2},
+ {.bitmap_index = 948, .adv_w = 192, .box_w = 6, .box_h = 18, .ofs_x = 3, .ofs_y = -2},
+ {.bitmap_index = 962, .adv_w = 192, .box_w = 10, .box_h = 8, .ofs_x = 1, .ofs_y = 7},
+ {.bitmap_index = 972, .adv_w = 192, .box_w = 10, .box_h = 2, .ofs_x = 1, .ofs_y = -3},
+ {.bitmap_index = 975, .adv_w = 192, .box_w = 5, .box_h = 3, .ofs_x = 3, .ofs_y = 13},
+ {.bitmap_index = 977, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 991, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
+ {.bitmap_index = 1007, .adv_w = 192, .box_w = 9, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 1020, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 1036, .adv_w = 192, .box_w = 9, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 1049, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 1067, .adv_w = 192, .box_w = 9, .box_h = 15, .ofs_x = 1, .ofs_y = -4},
+ {.bitmap_index = 1084, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
+ {.bitmap_index = 1100, .adv_w = 192, .box_w = 10, .box_h = 16, .ofs_x = 2, .ofs_y = 0},
+ {.bitmap_index = 1120, .adv_w = 192, .box_w = 8, .box_h = 19, .ofs_x = 1, .ofs_y = -4},
+ {.bitmap_index = 1139, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
+ {.bitmap_index = 1157, .adv_w = 192, .box_w = 11, .box_h = 14, .ofs_x = 0, .ofs_y = 0},
+ {.bitmap_index = 1177, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 1191, .adv_w = 192, .box_w = 9, .box_h = 11, .ofs_x = 2, .ofs_y = 0},
+ {.bitmap_index = 1204, .adv_w = 192, .box_w = 9, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 1217, .adv_w = 192, .box_w = 9, .box_h = 15, .ofs_x = 2, .ofs_y = -4},
+ {.bitmap_index = 1234, .adv_w = 192, .box_w = 9, .box_h = 15, .ofs_x = 1, .ofs_y = -4},
+ {.bitmap_index = 1251, .adv_w = 192, .box_w = 9, .box_h = 11, .ofs_x = 2, .ofs_y = 0},
+ {.bitmap_index = 1264, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 1278, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 1296, .adv_w = 192, .box_w = 9, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 1309, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 1323, .adv_w = 192, .box_w = 12, .box_h = 11, .ofs_x = 0, .ofs_y = 0},
+ {.bitmap_index = 1340, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 1354, .adv_w = 192, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = -4},
+ {.bitmap_index = 1373, .adv_w = 192, .box_w = 9, .box_h = 11, .ofs_x = 2, .ofs_y = 0},
+ {.bitmap_index = 1386, .adv_w = 192, .box_w = 9, .box_h = 18, .ofs_x = 2, .ofs_y = -2},
+ {.bitmap_index = 1407, .adv_w = 192, .box_w = 3, .box_h = 18, .ofs_x = 5, .ofs_y = -2},
+ {.bitmap_index = 1414, .adv_w = 192, .box_w = 10, .box_h = 18, .ofs_x = 1, .ofs_y = -2},
+ {.bitmap_index = 1437, .adv_w = 192, .box_w = 10, .box_h = 5, .ofs_x = 1, .ofs_y = 5},
+ {.bitmap_index = 1444, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 1462, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
+ {.bitmap_index = 1480, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
+ {.bitmap_index = 1498, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
+ {.bitmap_index = 1514, .adv_w = 192, .box_w = 11, .box_h = 17, .ofs_x = 1, .ofs_y = -3},
+ {.bitmap_index = 1538, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
+ {.bitmap_index = 1554, .adv_w = 192, .box_w = 12, .box_h = 14, .ofs_x = 0, .ofs_y = 0},
+ {.bitmap_index = 1575, .adv_w = 192, .box_w = 11, .box_h = 14, .ofs_x = 0, .ofs_y = 0},
+ {.bitmap_index = 1595, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 1611, .adv_w = 192, .box_w = 9, .box_h = 19, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 1633, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
+ {.bitmap_index = 1651, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 1669, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 1687, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
+ {.bitmap_index = 1703, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 1719, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
+ {.bitmap_index = 1735, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
+ {.bitmap_index = 1753, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 1771, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 1789, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 1807, .adv_w = 192, .box_w = 10, .box_h = 16, .ofs_x = 1, .ofs_y = -1},
+ {.bitmap_index = 1827, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 1845, .adv_w = 192, .box_w = 10, .box_h = 17, .ofs_x = 2, .ofs_y = -3},
+ {.bitmap_index = 1867, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 1883, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 1901, .adv_w = 192, .box_w = 11, .box_h = 16, .ofs_x = 1, .ofs_y = -2},
+ {.bitmap_index = 1923, .adv_w = 192, .box_w = 12, .box_h = 14, .ofs_x = 0, .ofs_y = 0},
+ {.bitmap_index = 1944, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 1962, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 2, .ofs_y = 0},
+ {.bitmap_index = 1980, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 1996, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 2014, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 2032, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 2046, .adv_w = 192, .box_w = 9, .box_h = 14, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 2062, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 2, .ofs_y = 0},
+ {.bitmap_index = 2076, .adv_w = 192, .box_w = 8, .box_h = 11, .ofs_x = 2, .ofs_y = 0},
+ {.bitmap_index = 2087, .adv_w = 192, .box_w = 11, .box_h = 14, .ofs_x = 1, .ofs_y = -3},
+ {.bitmap_index = 2107, .adv_w = 192, .box_w = 9, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 2120, .adv_w = 192, .box_w = 12, .box_h = 11, .ofs_x = 0, .ofs_y = 0},
+ {.bitmap_index = 2137, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 2151, .adv_w = 192, .box_w = 9, .box_h = 11, .ofs_x = 2, .ofs_y = 0},
+ {.bitmap_index = 2164, .adv_w = 192, .box_w = 9, .box_h = 16, .ofs_x = 2, .ofs_y = 0},
+ {.bitmap_index = 2182, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 2, .ofs_y = 0},
+ {.bitmap_index = 2196, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 2210, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 2224, .adv_w = 192, .box_w = 9, .box_h = 11, .ofs_x = 2, .ofs_y = 0},
+ {.bitmap_index = 2237, .adv_w = 192, .box_w = 9, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 2250, .adv_w = 192, .box_w = 9, .box_h = 11, .ofs_x = 2, .ofs_y = 0},
+ {.bitmap_index = 2263, .adv_w = 192, .box_w = 9, .box_h = 15, .ofs_x = 2, .ofs_y = -4},
+ {.bitmap_index = 2280, .adv_w = 192, .box_w = 9, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 2293, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 2307, .adv_w = 192, .box_w = 10, .box_h = 15, .ofs_x = 1, .ofs_y = -4},
+ {.bitmap_index = 2326, .adv_w = 192, .box_w = 10, .box_h = 18, .ofs_x = 1, .ofs_y = -4},
+ {.bitmap_index = 2349, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 2363, .adv_w = 192, .box_w = 10, .box_h = 14, .ofs_x = 2, .ofs_y = -3},
+ {.bitmap_index = 2381, .adv_w = 192, .box_w = 9, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 2394, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 2408, .adv_w = 192, .box_w = 11, .box_h = 13, .ofs_x = 1, .ofs_y = -2},
+ {.bitmap_index = 2426, .adv_w = 192, .box_w = 12, .box_h = 11, .ofs_x = 0, .ofs_y = 0},
+ {.bitmap_index = 2443, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 2457, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 2, .ofs_y = 0},
+ {.bitmap_index = 2471, .adv_w = 192, .box_w = 9, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 2484, .adv_w = 192, .box_w = 10, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 2498, .adv_w = 192, .box_w = 9, .box_h = 11, .ofs_x = 1, .ofs_y = 0},
+ {.bitmap_index = 2511, .adv_w = 320, .box_w = 20, .box_h = 20, .ofs_x = 0, .ofs_y = -3},
+ {.bitmap_index = 2561, .adv_w = 320, .box_w = 19, .box_h = 20, .ofs_x = 0, .ofs_y = -3},
+ {.bitmap_index = 2609, .adv_w = 240, .box_w = 15, .box_h = 15, .ofs_x = 0, .ofs_y = 0},
+ {.bitmap_index = 2638, .adv_w = 360, .box_w = 23, .box_h = 19, .ofs_x = 0, .ofs_y = -2},
+ {.bitmap_index = 2693, .adv_w = 280, .box_w = 18, .box_h = 17, .ofs_x = 0, .ofs_y = -1},
+ {.bitmap_index = 2732, .adv_w = 320, .box_w = 20, .box_h = 17, .ofs_x = 0, .ofs_y = -1},
+ {.bitmap_index = 2775, .adv_w = 280, .box_w = 13, .box_h = 17, .ofs_x = 2, .ofs_y = -1},
+ {.bitmap_index = 2803, .adv_w = 280, .box_w = 18, .box_h = 21, .ofs_x = 0, .ofs_y = -3},
+ {.bitmap_index = 2851, .adv_w = 280, .box_w = 18, .box_h = 17, .ofs_x = 0, .ofs_y = -1},
+ {.bitmap_index = 2890, .adv_w = 280, .box_w = 13, .box_h = 17, .ofs_x = 2, .ofs_y = -1},
+ {.bitmap_index = 2918, .adv_w = 320, .box_w = 19, .box_h = 20, .ofs_x = 0, .ofs_y = -3},
+ {.bitmap_index = 2966, .adv_w = 320, .box_w = 20, .box_h = 21, .ofs_x = 0, .ofs_y = -3},
+ {.bitmap_index = 3019, .adv_w = 120, .box_w = 8, .box_h = 19, .ofs_x = 0, .ofs_y = -2},
+ {.bitmap_index = 3038, .adv_w = 320, .box_w = 20, .box_h = 20, .ofs_x = 0, .ofs_y = -3},
+ {.bitmap_index = 3088, .adv_w = 240, .box_w = 15, .box_h = 19, .ofs_x = 0, .ofs_y = -2},
+ {.bitmap_index = 3124, .adv_w = 320, .box_w = 20, .box_h = 19, .ofs_x = 0, .ofs_y = -2},
+ {.bitmap_index = 3172, .adv_w = 320, .box_w = 20, .box_h = 17, .ofs_x = 0, .ofs_y = -1},
+ {.bitmap_index = 3215, .adv_w = 400, .box_w = 25, .box_h = 12, .ofs_x = 0, .ofs_y = 1},
+ {.bitmap_index = 3253, .adv_w = 400, .box_w = 25, .box_h = 12, .ofs_x = 0, .ofs_y = 1},
+ {.bitmap_index = 3291, .adv_w = 400, .box_w = 25, .box_h = 12, .ofs_x = 0, .ofs_y = 1},
+ {.bitmap_index = 3329, .adv_w = 400, .box_w = 25, .box_h = 12, .ofs_x = 0, .ofs_y = 1},
+ {.bitmap_index = 3367, .adv_w = 400, .box_w = 25, .box_h = 12, .ofs_x = 0, .ofs_y = 1},
+ {.bitmap_index = 3405, .adv_w = 280, .box_w = 15, .box_h = 20, .ofs_x = 1, .ofs_y = -3},
+ {.bitmap_index = 3443, .adv_w = 200, .box_w = 11, .box_h = 21, .ofs_x = 0, .ofs_y = -3},
+ {.bitmap_index = 3472, .adv_w = 400, .box_w = 25, .box_h = 21, .ofs_x = 0, .ofs_y = -3},
+ {.bitmap_index = 3538, .adv_w = 360, .box_w = 23, .box_h = 17, .ofs_x = 0, .ofs_y = -1},
+ {.bitmap_index = 3587, .adv_w = 320, .box_w = 20, .box_h = 20, .ofs_x = 0, .ofs_y = -2},
+ {.bitmap_index = 3637, .adv_w = 400, .box_w = 25, .box_h = 19, .ofs_x = 0, .ofs_y = -2},
+ {.bitmap_index = 3697, .adv_w = 320, .box_w = 20, .box_h = 21, .ofs_x = 0, .ofs_y = -3},
+ {.bitmap_index = 3750, .adv_w = 360, .box_w = 22, .box_h = 20, .ofs_x = 0, .ofs_y = -2},
+ {.bitmap_index = 3805, .adv_w = 360, .box_w = 22, .box_h = 19, .ofs_x = 0, .ofs_y = -2},
+ {.bitmap_index = 3858, .adv_w = 320, .box_w = 20, .box_h = 15, .ofs_x = 0, .ofs_y = 0}
};
/*---------------------
@@ -1085,9 +1176,10 @@ static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
*--------------------*/
static const uint16_t unicode_list_2[] = {
- 0x0, 0x16, 0x39, 0x68, 0x128, 0x184, 0x1e5, 0x1fb,
+ 0x0, 0x16, 0x26, 0x27, 0x28, 0x39, 0x47, 0x4a,
+ 0x4b, 0x50, 0x68, 0x94, 0x128, 0x184, 0x1e5, 0x1fb,
0x21d, 0x23f, 0x240, 0x241, 0x242, 0x243, 0x292, 0x293,
- 0x3fc, 0x45c, 0x54a, 0x55f, 0x59f
+ 0x3dc, 0x3fc, 0x45c, 0x54a, 0x55f, 0x59e, 0x59f, 0x6a8
};
/*Collect the unicode lists and glyph_id offsets*/
@@ -1102,8 +1194,8 @@ static const lv_font_fmt_txt_cmap_t cmaps[] =
.unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY
},
{
- .range_start = 61441, .range_length = 1440, .glyph_id_start = 160,
- .unicode_list = unicode_list_2, .glyph_id_ofs_list = NULL, .list_length = 21, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
+ .range_start = 61441, .range_length = 1705, .glyph_id_start = 160,
+ .unicode_list = unicode_list_2, .glyph_id_ofs_list = NULL, .list_length = 32, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
}
};
@@ -1135,13 +1227,13 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
lv_font_t jetbrains_mono_bold_20 = {
.get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/
.get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/
- .line_height = 22, /*The maximum line height required by the font*/
- .base_line = 3, /*Baseline measured from the bottom of the line*/
+ .line_height = 23, /*The maximum line height required by the font*/
+ .base_line = 4, /*Baseline measured from the bottom of the line*/
#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
.subpx = LV_FONT_SUBPX_NONE,
#endif
#if LV_VERSION_CHECK(7, 4, 0)
- .underline_position = -2,
+ .underline_position = -3,
.underline_thickness = 1,
#endif
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
diff --git a/src/displayapp/lv_pinetime_theme.c b/src/displayapp/lv_pinetime_theme.c
new file mode 100644
index 00000000..88f77557
--- /dev/null
+++ b/src/displayapp/lv_pinetime_theme.c
@@ -0,0 +1,482 @@
+/**
+ * @file lv_pinetime_theme.c
+ *
+ */
+
+/*********************
+ * INCLUDES
+ *********************/
+#include "lv_pinetime_theme.h"
+
+/*********************
+ * DEFINES
+ *********************/
+
+/**********************
+ * TYPEDEFS
+ **********************/
+
+/**********************
+ * STATIC PROTOTYPES
+ **********************/
+static void theme_apply(lv_obj_t * obj, lv_theme_style_t name);
+
+/**********************
+ * STATIC VARIABLES
+ **********************/
+static lv_theme_t theme;
+
+static lv_style_t style_pad;
+static lv_style_t style_circle;
+
+static lv_style_t style_bg;
+static lv_style_t style_box;
+static lv_style_t style_box_border;
+static lv_style_t style_btn;
+static lv_style_t style_btn_border;
+static lv_style_t style_title;
+static lv_style_t style_label_white;
+static lv_style_t style_back;
+static lv_style_t style_icon;
+static lv_style_t style_bar_indic;
+static lv_style_t style_slider_knob;
+static lv_style_t style_scrollbar;
+static lv_style_t style_list_btn;
+static lv_style_t style_ddlist_list;
+static lv_style_t style_ddlist_selected;
+static lv_style_t style_sw_bg;
+static lv_style_t style_sw_indic;
+static lv_style_t style_sw_knob;
+static lv_style_t style_arc_bg;
+static lv_style_t style_arc_indic;
+static lv_style_t style_table_cell;
+static lv_style_t style_pad_small;
+static lv_style_t style_bg_grad;
+static lv_style_t style_lmeter;
+
+static bool inited;
+
+/**********************
+ * MACROS
+ **********************/
+
+/**********************
+ * STATIC FUNCTIONS
+ **********************/
+
+static void style_init_reset(lv_style_t * style)
+{
+ if(inited) lv_style_reset(style);
+ else lv_style_init(style);
+}
+
+
+static void basic_init(void)
+{
+
+ style_init_reset(&style_pad);
+ lv_style_set_pad_top(&style_pad, LV_STATE_DEFAULT, LV_VER_RES / 30);
+ lv_style_set_pad_bottom(&style_pad, LV_STATE_DEFAULT, LV_VER_RES / 30);
+ lv_style_set_pad_left(&style_pad, LV_STATE_DEFAULT, LV_VER_RES / 40);
+ lv_style_set_pad_right(&style_pad, LV_STATE_DEFAULT, LV_VER_RES / 40);
+
+ style_init_reset(&style_circle);
+ lv_style_set_radius(&style_circle, LV_STATE_DEFAULT, LV_RADIUS_CIRCLE);
+
+ style_init_reset(&style_bg);
+ lv_style_set_bg_opa(&style_bg, LV_STATE_DEFAULT, LV_OPA_COVER);
+ lv_style_set_bg_color(&style_bg, LV_STATE_DEFAULT, LV_COLOR_BLACK);
+ lv_style_set_text_font(&style_bg, LV_STATE_DEFAULT, theme.font_normal);
+
+ style_init_reset(&style_box);
+ lv_style_set_bg_opa(&style_box, LV_STATE_DEFAULT, LV_OPA_COVER);
+ lv_style_set_radius(&style_box, LV_STATE_DEFAULT, 10);
+ lv_style_set_value_color(&style_box, LV_STATE_DEFAULT, LV_PINETIME_BLUE);
+ lv_style_set_value_font(&style_box, LV_STATE_DEFAULT, theme.font_normal);
+
+ style_init_reset(&style_box_border);
+ lv_style_set_bg_opa(&style_box_border, LV_STATE_DEFAULT, LV_OPA_TRANSP);
+ lv_style_set_border_width(&style_box_border, LV_STATE_DEFAULT, 2);
+ lv_style_set_border_color(&style_box_border, LV_STATE_DEFAULT, LV_PINETIME_GRAY);
+ lv_style_set_text_color(&style_box, LV_STATE_DEFAULT, LV_PINETIME_BLUE);
+
+
+ style_init_reset(&style_title);
+ lv_style_set_text_color(&style_title, LV_STATE_DEFAULT, LV_PINETIME_WHITE);
+ lv_style_set_text_font(&style_title, LV_STATE_DEFAULT, theme.font_subtitle);
+
+ style_init_reset(&style_label_white);
+ lv_style_set_text_color(&style_label_white, LV_STATE_DEFAULT, LV_PINETIME_WHITE);
+
+ style_init_reset(&style_btn);
+ lv_style_set_radius(&style_btn, LV_STATE_DEFAULT, 10);
+ lv_style_set_bg_opa(&style_btn, LV_STATE_DEFAULT, LV_OPA_COVER);
+ lv_style_set_bg_color(&style_btn, LV_STATE_DEFAULT, LV_PINETIME_GRAY);
+ lv_style_set_text_color(&style_btn, LV_STATE_DEFAULT, LV_PINETIME_WHITE);
+ lv_style_set_value_color(&style_btn, LV_STATE_DEFAULT, LV_PINETIME_WHITE);
+ lv_style_set_pad_top(&style_btn, LV_STATE_DEFAULT, LV_VER_RES / 40);
+ lv_style_set_pad_bottom(&style_btn, LV_STATE_DEFAULT, LV_VER_RES / 40);
+
+ lv_style_set_pad_left(&style_btn, LV_STATE_DEFAULT, LV_DPX(15));
+ lv_style_set_pad_right(&style_btn, LV_STATE_DEFAULT, LV_DPX(15));
+ lv_style_set_pad_top(&style_btn, LV_STATE_DEFAULT, LV_DPX(10));
+ lv_style_set_pad_bottom(&style_btn, LV_STATE_DEFAULT, LV_DPX(10));
+ lv_style_set_pad_inner(&style_btn, LV_STATE_DEFAULT, LV_DPX(5));
+ lv_style_set_outline_width(&style_btn, LV_STATE_DEFAULT, LV_DPX(2));
+
+
+ style_init_reset(&style_btn_border);
+ lv_style_set_radius(&style_btn_border, LV_STATE_DEFAULT, LV_RADIUS_CIRCLE);
+ lv_style_set_border_color(&style_btn_border, LV_STATE_DEFAULT, LV_PINETIME_WHITE);
+ lv_style_set_border_width(&style_btn_border, LV_STATE_DEFAULT, 2);
+ lv_style_set_bg_opa(&style_btn_border, LV_STATE_DEFAULT, LV_OPA_TRANSP);
+ lv_style_set_bg_color(&style_btn_border, LV_STATE_DEFAULT, LV_PINETIME_WHITE);
+ lv_style_set_text_color(&style_btn_border, LV_STATE_DEFAULT, LV_PINETIME_WHITE);
+ lv_style_set_value_color(&style_btn_border, LV_STATE_DEFAULT, LV_PINETIME_WHITE);
+ lv_style_set_transition_prop_3(&style_btn_border, LV_STATE_DEFAULT, LV_STYLE_BG_OPA);
+
+ style_init_reset(&style_icon);
+ lv_style_set_text_color(&style_icon, LV_STATE_DEFAULT, LV_PINETIME_WHITE);
+
+ style_init_reset(&style_back);
+ lv_style_set_value_color(&style_back, LV_STATE_DEFAULT, LV_PINETIME_GRAY);
+ lv_style_set_value_str(&style_back, LV_STATE_DEFAULT, LV_SYMBOL_LEFT);
+ lv_style_set_value_font(&style_back, LV_STATE_DEFAULT, theme.font_subtitle);
+
+ style_init_reset(&style_bar_indic);
+ lv_style_set_bg_opa(&style_bar_indic, LV_STATE_DEFAULT, LV_OPA_COVER);
+ lv_style_set_radius(&style_bar_indic, LV_STATE_DEFAULT, 10);
+
+ style_init_reset(&style_scrollbar);
+ lv_style_set_bg_opa(&style_scrollbar, LV_STATE_DEFAULT, LV_OPA_COVER);
+ lv_style_set_radius(&style_scrollbar, LV_STATE_DEFAULT, LV_RADIUS_CIRCLE);
+ lv_style_set_bg_color(&style_scrollbar, LV_STATE_DEFAULT, LV_PINETIME_LIGHT_GRAY);
+ lv_style_set_size(&style_scrollbar, LV_STATE_DEFAULT, LV_HOR_RES / 80);
+ lv_style_set_pad_right(&style_scrollbar, LV_STATE_DEFAULT, LV_HOR_RES / 60);
+
+ style_init_reset(&style_list_btn);
+ lv_style_set_bg_opa(&style_list_btn, LV_STATE_DEFAULT, LV_OPA_COVER);
+ lv_style_set_bg_color(&style_list_btn, LV_STATE_DEFAULT, LV_PINETIME_WHITE);
+ lv_style_set_bg_color(&style_list_btn, LV_STATE_CHECKED, LV_PINETIME_GRAY);
+ lv_style_set_bg_color(&style_list_btn, LV_STATE_CHECKED | LV_STATE_PRESSED, lv_color_darken(LV_PINETIME_GRAY, LV_OPA_20));
+ lv_style_set_text_color(&style_list_btn, LV_STATE_DEFAULT, LV_PINETIME_BLUE);
+ lv_style_set_text_color(&style_list_btn, LV_STATE_CHECKED, LV_PINETIME_WHITE);
+ lv_style_set_text_color(&style_list_btn, LV_STATE_CHECKED | LV_STATE_PRESSED, LV_PINETIME_WHITE);
+ lv_style_set_image_recolor(&style_list_btn, LV_STATE_DEFAULT, LV_PINETIME_BLUE);
+ lv_style_set_image_recolor(&style_list_btn, LV_STATE_CHECKED, LV_PINETIME_WHITE);
+ lv_style_set_image_recolor(&style_list_btn, LV_STATE_CHECKED | LV_STATE_PRESSED, LV_PINETIME_WHITE);
+ lv_style_set_pad_left(&style_list_btn, LV_STATE_DEFAULT, LV_HOR_RES / 25);
+ lv_style_set_pad_right(&style_list_btn, LV_STATE_DEFAULT, LV_HOR_RES / 25);
+ lv_style_set_pad_top(&style_list_btn, LV_STATE_DEFAULT, LV_HOR_RES / 100);
+ lv_style_set_pad_bottom(&style_list_btn, LV_STATE_DEFAULT, LV_HOR_RES / 100);
+ lv_style_set_pad_inner(&style_list_btn, LV_STATE_DEFAULT, LV_HOR_RES / 50);
+
+ style_init_reset(&style_ddlist_list);
+ lv_style_set_text_line_space(&style_ddlist_list, LV_STATE_DEFAULT, LV_VER_RES / 25);
+ lv_style_set_shadow_width(&style_ddlist_list, LV_STATE_DEFAULT, LV_VER_RES / 20);
+ lv_style_set_shadow_color(&style_ddlist_list, LV_STATE_DEFAULT, LV_PINETIME_GRAY);
+
+ style_init_reset(&style_ddlist_selected);
+ lv_style_set_bg_opa(&style_ddlist_selected, LV_STATE_DEFAULT, LV_OPA_COVER);
+ lv_style_set_bg_color(&style_ddlist_selected, LV_STATE_DEFAULT, LV_PINETIME_BLUE);
+
+ style_init_reset(&style_sw_bg);
+ lv_style_set_bg_opa(&style_sw_bg, LV_STATE_DEFAULT, LV_OPA_COVER);
+ lv_style_set_bg_color(&style_sw_bg, LV_STATE_DEFAULT, LV_PINETIME_LIGHT_GRAY);
+ lv_style_set_radius(&style_sw_bg, LV_STATE_DEFAULT, LV_RADIUS_CIRCLE);
+ lv_style_set_value_color(&style_sw_bg, LV_STATE_DEFAULT, LV_PINETIME_BLUE);
+
+ style_init_reset(&style_sw_indic);
+ lv_style_set_bg_opa(&style_sw_indic, LV_STATE_DEFAULT, LV_OPA_COVER);
+ lv_style_set_bg_color(&style_sw_indic, LV_STATE_DEFAULT, LV_PINETIME_GREEN);
+
+ style_init_reset(&style_sw_knob);
+ lv_style_set_bg_opa(&style_sw_knob, LV_STATE_DEFAULT, LV_OPA_COVER);
+ lv_style_set_bg_color(&style_sw_knob, LV_STATE_DEFAULT, LV_PINETIME_WHITE);
+ lv_style_set_radius(&style_sw_knob, LV_STATE_DEFAULT, LV_RADIUS_CIRCLE);
+ lv_style_set_pad_top(&style_sw_knob, LV_STATE_DEFAULT, - 4);
+ lv_style_set_pad_bottom(&style_sw_knob, LV_STATE_DEFAULT, - 4);
+ lv_style_set_pad_left(&style_sw_knob, LV_STATE_DEFAULT, - 4);
+ lv_style_set_pad_right(&style_sw_knob, LV_STATE_DEFAULT, - 4);
+
+ style_init_reset(&style_slider_knob);
+ lv_style_set_bg_opa(&style_slider_knob, LV_STATE_DEFAULT, LV_OPA_COVER);
+ lv_style_set_bg_color(&style_slider_knob, LV_STATE_DEFAULT, LV_COLOR_RED);
+ lv_style_set_border_color(&style_slider_knob, LV_STATE_DEFAULT, LV_COLOR_WHITE);
+ lv_style_set_border_width(&style_slider_knob, LV_STATE_DEFAULT, 6);
+ lv_style_set_radius(&style_slider_knob, LV_STATE_DEFAULT, LV_RADIUS_CIRCLE);
+ lv_style_set_pad_top(&style_slider_knob, LV_STATE_DEFAULT, 10);
+ lv_style_set_pad_bottom(&style_slider_knob, LV_STATE_DEFAULT, 10);
+ lv_style_set_pad_left(&style_slider_knob, LV_STATE_DEFAULT, 10);
+ lv_style_set_pad_right(&style_slider_knob, LV_STATE_DEFAULT, 10);
+ lv_style_set_pad_top(&style_slider_knob, LV_STATE_PRESSED, 14);
+ lv_style_set_pad_bottom(&style_slider_knob, LV_STATE_PRESSED, 14);
+ lv_style_set_pad_left(&style_slider_knob, LV_STATE_PRESSED, 14);
+ lv_style_set_pad_right(&style_slider_knob, LV_STATE_PRESSED, 14);
+
+ style_init_reset(&style_arc_indic);
+ lv_style_set_line_color(&style_arc_indic, LV_STATE_DEFAULT, LV_PINETIME_BLUE);
+ lv_style_set_line_width(&style_arc_indic, LV_STATE_DEFAULT, LV_DPX(25));
+ lv_style_set_line_rounded(&style_arc_indic, LV_STATE_DEFAULT, true);
+
+ style_init_reset(&style_arc_bg);
+ lv_style_set_line_color(&style_arc_bg, LV_STATE_DEFAULT, LV_PINETIME_GRAY);
+ lv_style_set_line_width(&style_arc_bg, LV_STATE_DEFAULT, LV_DPX(25));
+ lv_style_set_line_rounded(&style_arc_bg, LV_STATE_DEFAULT, true);
+
+ style_init_reset(&style_table_cell);
+ lv_style_set_border_color(&style_table_cell, LV_STATE_DEFAULT, LV_PINETIME_GRAY);
+ lv_style_set_border_width(&style_table_cell, LV_STATE_DEFAULT, 1);
+ lv_style_set_border_side(&style_table_cell, LV_STATE_DEFAULT, LV_BORDER_SIDE_FULL);
+ lv_style_set_pad_left(&style_table_cell, LV_STATE_DEFAULT, 12);
+ lv_style_set_pad_right(&style_table_cell, LV_STATE_DEFAULT, 12);
+ lv_style_set_pad_top(&style_table_cell, LV_STATE_DEFAULT, 12);
+ lv_style_set_pad_bottom(&style_table_cell, LV_STATE_DEFAULT, 12);
+
+ style_init_reset(&style_pad_small);
+ lv_style_int_t pad_small_value = 10;
+ lv_style_set_pad_left(&style_pad_small, LV_STATE_DEFAULT, pad_small_value);
+ lv_style_set_pad_right(&style_pad_small, LV_STATE_DEFAULT, pad_small_value);
+ lv_style_set_pad_top(&style_pad_small, LV_STATE_DEFAULT, pad_small_value);
+ lv_style_set_pad_bottom(&style_pad_small, LV_STATE_DEFAULT, pad_small_value);
+ lv_style_set_pad_inner(&style_pad_small, LV_STATE_DEFAULT, pad_small_value);
+
+ style_init_reset(&style_bg_grad);
+ lv_style_set_bg_color(&style_bg_grad, LV_STATE_DEFAULT, lv_color_hsv_to_rgb(10, 10, 40));
+ lv_style_set_bg_grad_color(&style_bg_grad, LV_STATE_DEFAULT, lv_color_hsv_to_rgb(10, 10, 20));
+ lv_style_set_bg_grad_dir(&style_bg_grad, LV_STATE_DEFAULT, LV_GRAD_DIR_VER);
+
+ style_init_reset(&style_lmeter);
+ lv_style_set_radius(&style_lmeter, LV_STATE_DEFAULT, LV_RADIUS_CIRCLE);
+ lv_style_set_pad_left(&style_lmeter, LV_STATE_DEFAULT, LV_DPX(20));
+ lv_style_set_pad_right(&style_lmeter, LV_STATE_DEFAULT, LV_DPX(20));
+ lv_style_set_pad_top(&style_lmeter, LV_STATE_DEFAULT, LV_DPX(20));
+ lv_style_set_pad_inner(&style_lmeter, LV_STATE_DEFAULT, LV_DPX(30));
+ lv_style_set_scale_width(&style_lmeter, LV_STATE_DEFAULT, LV_DPX(25));
+
+ lv_style_set_line_color(&style_lmeter, LV_STATE_DEFAULT, theme.color_primary);
+ lv_style_set_scale_grad_color(&style_lmeter, LV_STATE_DEFAULT, theme.color_primary);
+ lv_style_set_scale_end_color(&style_lmeter, LV_STATE_DEFAULT, lv_color_hex3(0x888));
+ lv_style_set_line_width(&style_lmeter, LV_STATE_DEFAULT, LV_DPX(10));
+ lv_style_set_scale_end_line_width(&style_lmeter, LV_STATE_DEFAULT, LV_DPX(7));
+
+}
+
+
+/**********************
+ * GLOBAL FUNCTIONS
+ **********************/
+
+/**
+ * Initialize the default
+ * @param color_primary the primary color of the theme
+ * @param color_secondary the secondary color for the theme
+ * @param flags ORed flags starting with `LV_THEME_DEF_FLAG_...`
+ * @param font_small pointer to a small font
+ * @param font_normal pointer to a normal font
+ * @param font_subtitle pointer to a large font
+ * @param font_title pointer to a extra large font
+ * @return a pointer to reference this theme later
+ */
+lv_theme_t * lv_pinetime_theme_init(lv_color_t color_primary, lv_color_t color_secondary, uint32_t flags,
+ const lv_font_t * font_small, const lv_font_t * font_normal, const lv_font_t * font_subtitle,
+ const lv_font_t * font_title)
+{
+ theme.color_primary = color_primary;
+ theme.color_secondary = color_secondary;
+ theme.font_small = font_small;
+ theme.font_normal = font_normal;
+ theme.font_subtitle = font_subtitle;
+ theme.font_title = font_title;
+ theme.flags = flags;
+
+ basic_init();
+
+ theme.apply_xcb = theme_apply;
+
+ inited = true;
+
+ return &theme;
+}
+
+
+static void theme_apply(lv_obj_t * obj, lv_theme_style_t name)
+{
+ lv_style_list_t * list;
+
+ /*To avoid warnings*/
+ uint32_t name_int = (uint32_t) name;
+ switch(name_int) {
+ case LV_THEME_NONE:
+ break;
+
+ case LV_THEME_SCR:
+ lv_obj_clean_style_list(obj, LV_OBJ_PART_MAIN);
+ list = lv_obj_get_style_list(obj, LV_OBJ_PART_MAIN);
+ _lv_style_list_add_style(list, &style_bg);
+ break;
+
+ case LV_THEME_OBJ:
+ lv_obj_clean_style_list(obj, LV_OBJ_PART_MAIN);
+ list = lv_obj_get_style_list(obj, LV_OBJ_PART_MAIN);
+ _lv_style_list_add_style(list, &style_box);
+ break;
+
+ case LV_THEME_CONT:
+ lv_obj_clean_style_list(obj, LV_OBJ_PART_MAIN);
+ list = lv_obj_get_style_list(obj, LV_CONT_PART_MAIN);
+ _lv_style_list_add_style(list, &style_box);
+ break;
+
+ case LV_THEME_BTN:
+ lv_obj_clean_style_list(obj, LV_BTN_PART_MAIN);
+ list = lv_obj_get_style_list(obj, LV_BTN_PART_MAIN);
+ _lv_style_list_add_style(list, &style_btn);
+ _lv_style_list_add_style(list, &style_bg_grad);
+ break;
+
+ case LV_THEME_BTNMATRIX:
+ list = lv_obj_get_style_list(obj, LV_BTNMATRIX_PART_BG);
+ _lv_style_list_add_style(list, &style_bg);
+ _lv_style_list_add_style(list, &style_pad_small);
+
+ list = lv_obj_get_style_list(obj, LV_BTNMATRIX_PART_BTN);
+ _lv_style_list_add_style(list, &style_btn);
+ _lv_style_list_add_style(list, &style_bg_grad);
+ //_lv_style_list_add_style(list, &styles->bg_click);
+ break;
+
+ case LV_THEME_BAR:
+ lv_obj_clean_style_list(obj, LV_BAR_PART_BG);
+ list = lv_obj_get_style_list(obj, LV_BAR_PART_BG);
+
+ lv_obj_clean_style_list(obj, LV_BAR_PART_INDIC);
+ list = lv_obj_get_style_list(obj, LV_BAR_PART_INDIC);
+ _lv_style_list_add_style(list, &style_bar_indic);
+ break;
+
+ case LV_THEME_IMAGE:
+ lv_obj_clean_style_list(obj, LV_IMG_PART_MAIN);
+ list = lv_obj_get_style_list(obj, LV_IMG_PART_MAIN);
+ _lv_style_list_add_style(list, &style_icon);
+ break;
+
+ case LV_THEME_LABEL:
+ lv_obj_clean_style_list(obj, LV_LABEL_PART_MAIN);
+ list = lv_obj_get_style_list(obj, LV_LABEL_PART_MAIN);
+ _lv_style_list_add_style(list, &style_label_white);
+ break;
+
+ case LV_THEME_SLIDER:
+ lv_obj_clean_style_list(obj, LV_SLIDER_PART_BG);
+ list = lv_obj_get_style_list(obj, LV_SLIDER_PART_BG);
+ _lv_style_list_add_style(list, &style_sw_bg);
+
+ lv_obj_clean_style_list(obj, LV_SLIDER_PART_INDIC);
+ list = lv_obj_get_style_list(obj, LV_SLIDER_PART_INDIC);
+
+ lv_obj_clean_style_list(obj, LV_SLIDER_PART_KNOB);
+ list = lv_obj_get_style_list(obj, LV_SLIDER_PART_KNOB);
+ _lv_style_list_add_style(list, &style_slider_knob);
+ break;
+
+ case LV_THEME_LIST:
+ lv_obj_clean_style_list(obj, LV_LIST_PART_BG);
+ list = lv_obj_get_style_list(obj, LV_LIST_PART_BG);
+ _lv_style_list_add_style(list, &style_box);
+
+ lv_obj_clean_style_list(obj, LV_LIST_PART_SCROLLABLE);
+ list = lv_obj_get_style_list(obj, LV_LIST_PART_SCROLLABLE);
+
+ lv_obj_clean_style_list(obj, LV_LIST_PART_SCROLLBAR);
+ list = lv_obj_get_style_list(obj, LV_LIST_PART_SCROLLBAR);
+ _lv_style_list_add_style(list, &style_scrollbar);
+ break;
+
+ case LV_THEME_LIST_BTN:
+ lv_obj_clean_style_list(obj, LV_BTN_PART_MAIN);
+ list = lv_obj_get_style_list(obj, LV_BTN_PART_MAIN);
+ _lv_style_list_add_style(list, &style_list_btn);
+ break;
+
+
+ case LV_THEME_ARC:
+ lv_obj_clean_style_list(obj, LV_ARC_PART_BG);
+ list = lv_obj_get_style_list(obj, LV_ARC_PART_BG);
+ _lv_style_list_add_style(list, &style_arc_bg);
+
+ lv_obj_clean_style_list(obj, LV_ARC_PART_INDIC);
+ list = lv_obj_get_style_list(obj, LV_ARC_PART_INDIC);
+ _lv_style_list_add_style(list, &style_arc_indic);
+ break;
+
+
+ case LV_THEME_SWITCH:
+ lv_obj_clean_style_list(obj, LV_SWITCH_PART_BG);
+ list = lv_obj_get_style_list(obj, LV_SWITCH_PART_BG);
+ _lv_style_list_add_style(list, &style_sw_bg);
+
+ lv_obj_clean_style_list(obj, LV_SWITCH_PART_INDIC);
+ list = lv_obj_get_style_list(obj, LV_SWITCH_PART_INDIC);
+ _lv_style_list_add_style(list, &style_sw_indic);
+
+ lv_obj_clean_style_list(obj, LV_SWITCH_PART_KNOB);
+ list = lv_obj_get_style_list(obj, LV_SWITCH_PART_KNOB);
+ _lv_style_list_add_style(list, &style_sw_knob);
+ break;
+
+ case LV_THEME_DROPDOWN:
+ lv_obj_clean_style_list(obj, LV_DROPDOWN_PART_MAIN);
+ list = lv_obj_get_style_list(obj, LV_DROPDOWN_PART_MAIN);
+ _lv_style_list_add_style(list, &style_btn);
+ _lv_style_list_add_style(list, &style_pad);
+
+ lv_obj_clean_style_list(obj, LV_DROPDOWN_PART_LIST);
+ list = lv_obj_get_style_list(obj, LV_DROPDOWN_PART_LIST);
+ _lv_style_list_add_style(list, &style_box);
+ _lv_style_list_add_style(list, &style_ddlist_list);
+ _lv_style_list_add_style(list, &style_pad);
+
+ lv_obj_clean_style_list(obj, LV_DROPDOWN_PART_SELECTED);
+ list = lv_obj_get_style_list(obj, LV_DROPDOWN_PART_SELECTED);
+ _lv_style_list_add_style(list, &style_ddlist_selected);
+
+ lv_obj_clean_style_list(obj, LV_DROPDOWN_PART_SCROLLBAR);
+ list = lv_obj_get_style_list(obj, LV_DROPDOWN_PART_SCROLLBAR);
+ _lv_style_list_add_style(list, &style_scrollbar);
+ break;
+
+ case LV_THEME_TABLE:
+ list = lv_obj_get_style_list(obj, LV_TABLE_PART_BG);
+ _lv_style_list_add_style(list, &style_bg);
+
+ int idx = 1; /* start value should be 1, not zero, since cell styles
+ start at 1 due to presence of LV_TABLE_PART_BG=0
+ in the enum (lv_table.h) */
+ /* declaring idx outside loop to work with older compilers */
+ for(; idx <= LV_TABLE_CELL_STYLE_CNT; idx ++) {
+ list = lv_obj_get_style_list(obj, idx);
+ _lv_style_list_add_style(list, &style_table_cell);
+ }
+ break;
+
+ case LV_THEME_LINEMETER:
+ list = lv_obj_get_style_list(obj, LV_LINEMETER_PART_MAIN);
+ _lv_style_list_add_style(list, &style_bg);
+ _lv_style_list_add_style(list, &style_lmeter);
+ break;
+
+
+ default:
+ break;
+ }
+
+
+ lv_obj_refresh_style(obj, LV_OBJ_PART_ALL, LV_STYLE_PROP_ALL);
+
+
+}
+
+/**********************
+ * STATIC FUNCTIONS
+ **********************/
diff --git a/src/displayapp/lv_pinetime_theme.h b/src/displayapp/lv_pinetime_theme.h
new file mode 100644
index 00000000..6697015e
--- /dev/null
+++ b/src/displayapp/lv_pinetime_theme.h
@@ -0,0 +1,62 @@
+/**
+ * @file lv_pinetime_theme.h
+ *
+ */
+
+#ifndef LV_PINETIME_THEME_H
+#define LV_PINETIME_THEME_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*********************
+ * INCLUDES
+ *********************/
+#include <lvgl/lvgl.h>
+
+/*********************
+ * DEFINES
+ *********************/
+/*Colors*/
+#define LV_PINETIME_WHITE lv_color_hex(0xffffff)
+#define LV_PINETIME_LIGHT lv_color_hex(0xf3f8fe)
+#define LV_PINETIME_GRAY lv_color_hex(0x8a8a8a)
+#define LV_PINETIME_LIGHT_GRAY lv_color_hex(0xc4c4c4)
+#define LV_PINETIME_BLUE lv_color_hex(0x2f3243) //006fb6
+#define LV_PINETIME_GREEN lv_color_hex(0x4cb242)
+#define LV_PINETIME_RED lv_color_hex(0xd51732)
+
+/**********************
+ * TYPEDEFS
+ **********************/
+
+
+/**********************
+ * GLOBAL PROTOTYPES
+ **********************/
+
+
+/**
+ * Initialize the default
+ * @param color_primary the primary color of the theme
+ * @param color_secondary the secondary color for the theme
+ * @param flags ORed flags starting with `LV_THEME_DEF_FLAG_...`
+ * @param font_small pointer to a small font
+ * @param font_normal pointer to a normal font
+ * @param font_subtitle pointer to a large font
+ * @param font_title pointer to a extra large font
+ * @return a pointer to reference this theme later
+ */
+lv_theme_t * lv_pinetime_theme_init(lv_color_t color_primary, lv_color_t color_secondary, uint32_t flags,
+ const lv_font_t * font_small, const lv_font_t * font_normal, const lv_font_t * font_subtitle,
+ const lv_font_t * font_title);
+/**********************
+ * MACROS
+ **********************/
+
+#endif
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
diff --git a/src/displayapp/screens/ApplicationList.cpp b/src/displayapp/screens/ApplicationList.cpp
index dd7fcd41..531636eb 100644
--- a/src/displayapp/screens/ApplicationList.cpp
+++ b/src/displayapp/screens/ApplicationList.cpp
@@ -71,7 +71,7 @@ std::unique_ptr<Screen> ApplicationList::CreateScreen2() {
std::unique_ptr<Screen> ApplicationList::CreateScreen3() {
std::array<Screens::Tile::Applications, 6> applications {
{{"A", Apps::Meter},
- {"B", Apps::Gauge},
+ {"B", Apps::Navigation},
{"C", Apps::Clock},
{"D", Apps::Music},
{"E", Apps::SysInfo},
diff --git a/src/displayapp/screens/Brightness.cpp b/src/displayapp/screens/Brightness.cpp
index c8085bed..36820417 100644
--- a/src/displayapp/screens/Brightness.cpp
+++ b/src/displayapp/screens/Brightness.cpp
@@ -22,7 +22,7 @@ Brightness::Brightness(Pinetime::Applications::DisplayApp *app, Controllers::Bri
slider_label = lv_label_create(lv_scr_act(), nullptr);
lv_label_set_text(slider_label, LevelToString(brightness.Level()));
lv_obj_set_auto_realign(slider_label, true);
- lv_obj_align(slider_label, slider, LV_ALIGN_OUT_BOTTOM_MID, 0, 10);
+ lv_obj_align(slider_label, slider, LV_ALIGN_OUT_BOTTOM_MID, 0, 30);
}
Brightness::~Brightness() {
@@ -75,6 +75,9 @@ bool Brightness::OnTouchEvent(Pinetime::Applications::TouchEvents event) {
switch(event) {
case TouchEvents::SwipeLeft:
brightness.Lower();
+ if ( brightness.Level() == Pinetime::Controllers::BrightnessController::Levels::Off) {
+ brightness.Set(Controllers::BrightnessController::Levels::Low);
+ }
SetValue();
return true;
case TouchEvents::SwipeRight:
diff --git a/src/displayapp/screens/Clock.cpp b/src/displayapp/screens/Clock.cpp
index 2988922e..eb0e37be 100644
--- a/src/displayapp/screens/Clock.cpp
+++ b/src/displayapp/screens/Clock.cpp
@@ -14,9 +14,45 @@
#include "../DisplayApp.h"
using namespace Pinetime::Applications::Screens;
-extern lv_font_t jetbrains_mono_extrabold_compressed;
-extern lv_font_t jetbrains_mono_bold_20;
-extern lv_style_t* LabelBigStyle;
+
+namespace {
+
+char const *DaysString[] = {
+ "",
+ "MONDAY",
+ "TUESDAY",
+ "WEDNESDAY",
+ "THURSDAY",
+ "FRIDAY",
+ "SATURDAY",
+ "SUNDAY"
+};
+
+char const *MonthsString[] = {
+ "",
+ "JAN",
+ "FEB",
+ "MAR",
+ "APR",
+ "MAY",
+ "JUN",
+ "JUL",
+ "AUG",
+ "SEP",
+ "OCT",
+ "NOV",
+ "DEC"
+};
+
+const char *MonthToString(Pinetime::Controllers::DateTime::Months month) {
+ return MonthsString[static_cast<uint8_t>(month)];
+}
+
+const char *DayOfWeekToString(Pinetime::Controllers::DateTime::Days dayOfWeek) {
+ return DaysString[static_cast<uint8_t>(dayOfWeek)];
+}
+
+}
static void event_handler(lv_obj_t * obj, lv_event_t event) {
Clock* screen = static_cast<Clock *>(obj->user_data);
@@ -59,7 +95,9 @@ Clock::Clock(DisplayApp* app,
lv_obj_align(label_date, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, 60);
label_time = lv_label_create(lv_scr_act(), nullptr);
- lv_label_set_style(label_time, LV_LABEL_STYLE_MAIN, LabelBigStyle);
+
+ lv_obj_set_style_local_text_font(label_time, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_extrabold_compressed);
+
lv_obj_align(label_time, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, 0);
backgroundLabel = lv_label_create(lv_scr_act(), nullptr);
@@ -201,40 +239,6 @@ bool Clock::Refresh() {
return running;
}
-const char *Clock::MonthToString(Pinetime::Controllers::DateTime::Months month) {
- return Clock::MonthsString[static_cast<uint8_t>(month)];
-}
-
-const char *Clock::DayOfWeekToString(Pinetime::Controllers::DateTime::Days dayOfWeek) {
- return Clock::DaysString[static_cast<uint8_t>(dayOfWeek)];
-}
-
-char const *Clock::DaysString[] = {
- "",
- "MONDAY",
- "TUESDAY",
- "WEDNESDAY",
- "THURSDAY",
- "FRIDAY",
- "SATURDAY",
- "SUNDAY"
-};
-
-char const *Clock::MonthsString[] = {
- "",
- "JAN",
- "FEB",
- "MAR",
- "APR",
- "MAY",
- "JUN",
- "JUL",
- "AUG",
- "SEP",
- "OCT",
- "NOV",
- "DEC"
-};
void Clock::OnObjectEvent(lv_obj_t *obj, lv_event_t event) {
if(obj == backgroundLabel) {
diff --git a/src/displayapp/screens/Clock.h b/src/displayapp/screens/Clock.h
index 3a4c67a3..5e9cfeaa 100644
--- a/src/displayapp/screens/Clock.h
+++ b/src/displayapp/screens/Clock.h
@@ -21,11 +21,10 @@ namespace Pinetime {
template <class T>
class DirtyValue {
public:
- explicit DirtyValue(T v) { value = v; }
- explicit DirtyValue(T& v) { value = v; }
+ DirtyValue() = default; // Use NSDMI
+ explicit DirtyValue(T const& v):value{v}{} // Use MIL and const-lvalue-ref
bool IsUpdated() const { return isUpdated; }
- T& Get() { this->isUpdated = false; return value; }
-
+ T const& Get() { this->isUpdated = false; return value; } // never expose a non-const lvalue-ref
DirtyValue& operator=(const T& other) {
if (this->value != other) {
this->value = other;
@@ -34,9 +33,10 @@ namespace Pinetime {
return *this;
}
private:
- T value;
- bool isUpdated = true;
+ T value{}; // NSDMI - default initialise type
+ bool isUpdated{true}; // NSDMI - use brace initilisation
};
+
class Clock : public Screen {
public:
Clock(DisplayApp* app,
@@ -52,11 +52,6 @@ namespace Pinetime {
void OnObjectEvent(lv_obj_t *pObj, lv_event_t i);
private:
- static const char* MonthToString(Pinetime::Controllers::DateTime::Months month);
- static const char* DayOfWeekToString(Pinetime::Controllers::DateTime::Days dayOfWeek);
- static char const *DaysString[];
- static char const *MonthsString[];
-
char displayedChar[5];
uint16_t currentYear = 1970;
@@ -64,13 +59,13 @@ namespace Pinetime {
Pinetime::Controllers::DateTime::Days currentDayOfWeek = Pinetime::Controllers::DateTime::Days::Unknown;
uint8_t currentDay = 0;
- DirtyValue<int> batteryPercentRemaining {0};
- DirtyValue<bool> bleState {false};
- DirtyValue<std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds>> currentDateTime;
- DirtyValue<uint32_t> stepCount {0};
- DirtyValue<uint8_t> heartbeat {0};
- DirtyValue<bool> heartbeatRunning {false};
- DirtyValue<bool> notificationState {false};
+ DirtyValue<int> batteryPercentRemaining {};
+ DirtyValue<bool> bleState {};
+ DirtyValue<std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds>> currentDateTime{};
+ DirtyValue<uint32_t> stepCount {};
+ DirtyValue<uint8_t> heartbeat {};
+ DirtyValue<bool> heartbeatRunning {};
+ DirtyValue<bool> notificationState {};
lv_obj_t* label_time;
lv_obj_t* label_date;
diff --git a/src/displayapp/screens/DropDownDemo.cpp b/src/displayapp/screens/DropDownDemo.cpp
index 37728e17..944c63bb 100644
--- a/src/displayapp/screens/DropDownDemo.cpp
+++ b/src/displayapp/screens/DropDownDemo.cpp
@@ -4,8 +4,6 @@
#include "../DisplayApp.h"
using namespace Pinetime::Applications::Screens;
-extern lv_font_t jetbrains_mono_extrabold_compressed;
-extern lv_font_t jetbrains_mono_bold_20;
DropDownDemo::DropDownDemo(Pinetime::Applications::DisplayApp *app) : Screen(app) {
// Create the dropdown object, with many item, and fix its height
diff --git a/src/displayapp/screens/FirmwareUpdate.cpp b/src/displayapp/screens/FirmwareUpdate.cpp
index b9f891d0..2f0bb5ad 100644
--- a/src/displayapp/screens/FirmwareUpdate.cpp
+++ b/src/displayapp/screens/FirmwareUpdate.cpp
@@ -4,8 +4,6 @@
#include "../DisplayApp.h"
using namespace Pinetime::Applications::Screens;
-extern lv_font_t jetbrains_mono_extrabold_compressed;
-extern lv_font_t jetbrains_mono_bold_20;
FirmwareUpdate::FirmwareUpdate(Pinetime::Applications::DisplayApp *app, Pinetime::Controllers::Ble& bleController) :
diff --git a/src/displayapp/screens/FirmwareValidation.cpp b/src/displayapp/screens/FirmwareValidation.cpp
index d4165dc5..adacd8cd 100644
--- a/src/displayapp/screens/FirmwareValidation.cpp
+++ b/src/displayapp/screens/FirmwareValidation.cpp
@@ -5,8 +5,6 @@
#include "../DisplayApp.h"
using namespace Pinetime::Applications::Screens;
-extern lv_font_t jetbrains_mono_extrabold_compressed;
-extern lv_font_t jetbrains_mono_bold_20;
namespace {
static void ButtonEventHandler(lv_obj_t * obj, lv_event_t event)
diff --git a/src/displayapp/screens/Gauge.cpp b/src/displayapp/screens/Gauge.cpp
deleted file mode 100644
index 1b9f2c6d..00000000
--- a/src/displayapp/screens/Gauge.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-#include "Gauge.h"
-#include "../DisplayApp.h"
-
-using namespace Pinetime::Applications::Screens;
-extern lv_font_t jetbrains_mono_extrabold_compressed;
-extern lv_font_t jetbrains_mono_bold_20;
-
-
-Gauge::Gauge(Pinetime::Applications::DisplayApp *app) : Screen(app) {
- /*Create a style*/
- lv_style_copy(&style, &lv_style_pretty_color);
- style.body.main_color = LV_COLOR_CYAN; /*Line color at the beginning*/
- style.body.grad_color = LV_COLOR_RED; /*Line color at the end*/
- style.body.padding.left = 10; /*Scale line length*/
- style.body.padding.inner = 8 ; /*Scale label padding*/
- style.body.border.color = lv_color_hex3(0x333); /*Needle middle circle color*/
- style.line.width = 3;
- style.text.color = LV_COLOR_WHITE;
- style.line.color = LV_COLOR_RED; /*Line color after the critical value*/
-
-
- /*Describe the color for the needles*/
-
- needle_colors[0] = LV_COLOR_ORANGE;
-
- /*Create a gauge*/
- gauge1 = lv_gauge_create(lv_scr_act(), nullptr);
- lv_gauge_set_style(gauge1, LV_GAUGE_STYLE_MAIN, &style);
- lv_gauge_set_needle_count(gauge1, 1, needle_colors);
- lv_obj_set_size(gauge1, 180, 180);
- lv_obj_align(gauge1, nullptr, LV_ALIGN_CENTER, 0, 0);
- lv_gauge_set_scale(gauge1, 360, 60, 0);
- lv_gauge_set_range(gauge1, 0, 59);
-
- /*Set the values*/
- lv_gauge_set_value(gauge1, 0, value);
-}
-
-Gauge::~Gauge() {
-
-
- lv_obj_clean(lv_scr_act());
-}
-
-bool Gauge::Refresh() {
-// lv_lmeter_set_value(lmeter, value++); /*Set the current value*/
-// if(value>=60) value = 0;
-
- lv_gauge_set_value(gauge1, 0, value++);
- if(value == 59) value = 0;
- return running;
-}
-
-bool Gauge::OnButtonPushed() {
- running = false;
- return true;
-}
diff --git a/src/displayapp/screens/Gauge.h b/src/displayapp/screens/Gauge.h
deleted file mode 100644
index 2a6b8f83..00000000
--- a/src/displayapp/screens/Gauge.h
+++ /dev/null
@@ -1,30 +0,0 @@
-#pragma once
-
-#include <cstdint>
-#include "Screen.h"
-#include <lvgl/lvgl.h>
-
-namespace Pinetime {
- namespace Applications {
- namespace Screens {
-
- class Gauge : public Screen{
- public:
- Gauge(DisplayApp* app);
- ~Gauge() override;
-
- bool Refresh() override;
- bool OnButtonPushed() override;
-
- private:
- lv_style_t style;
- lv_color_t needle_colors[3];
- lv_obj_t * gauge1;
-
- uint32_t value=30;
- bool running = true;
-
- };
- }
- }
-}
diff --git a/src/displayapp/screens/HeartRate.cpp b/src/displayapp/screens/HeartRate.cpp
index d55ed019..401d57d9 100644
--- a/src/displayapp/screens/HeartRate.cpp
+++ b/src/displayapp/screens/HeartRate.cpp
@@ -5,8 +5,6 @@
#include "../DisplayApp.h"
using namespace Pinetime::Applications::Screens;
-extern lv_font_t jetbrains_mono_extrabold_compressed;
-extern lv_font_t jetbrains_mono_bold_20;
namespace {
const char *ToString(Pinetime::Controllers::HeartRateController::States s) {
@@ -30,28 +28,22 @@ namespace {
}
HeartRate::HeartRate(Pinetime::Applications::DisplayApp *app, Controllers::HeartRateController& heartRateController) : Screen(app), heartRateController{heartRateController} {
- label_bpm = lv_label_create(lv_scr_act(), NULL);
-
- labelStyle = const_cast<lv_style_t *>(lv_label_get_style(label_bpm, LV_LABEL_STYLE_MAIN));
- labelStyle->text.font = &jetbrains_mono_bold_20;
-
- lv_style_copy(&labelBigStyle, labelStyle);
- labelBigStyle.text.font = &jetbrains_mono_extrabold_compressed;
+
+ label_hr = lv_label_create(lv_scr_act(), NULL);
- lv_label_set_style(label_bpm, LV_LABEL_STYLE_MAIN, labelStyle);
+ lv_obj_set_style_local_text_font(label_hr, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_extrabold_compressed);
- label_hr = lv_label_create(lv_scr_act(), NULL);
- lv_label_set_style(label_hr, LV_LABEL_STYLE_MAIN, &labelBigStyle);
lv_obj_align(label_hr, lv_scr_act(), LV_ALIGN_CENTER, -70, -40);
lv_label_set_text(label_hr, "000");
+ label_bpm = lv_label_create(lv_scr_act(), NULL);
lv_label_set_text(label_bpm, "Heart rate BPM");
lv_obj_align(label_bpm, label_hr, LV_ALIGN_OUT_TOP_MID, 0, -20);
label_status = lv_label_create(lv_scr_act(), NULL);
lv_label_set_text(label_status, ToString(Pinetime::Controllers::HeartRateController::States::NotEnoughData));
- lv_label_set_style(label_status, LV_LABEL_STYLE_MAIN, labelStyle);
+
lv_obj_align(label_status, label_hr, LV_ALIGN_OUT_BOTTOM_MID, 0, 10);
btn_startStop = lv_btn_create(lv_scr_act(), NULL);
diff --git a/src/displayapp/screens/InfiniPaint.cpp b/src/displayapp/screens/InfiniPaint.cpp
index 65be6622..6d1f75b8 100644
--- a/src/displayapp/screens/InfiniPaint.cpp
+++ b/src/displayapp/screens/InfiniPaint.cpp
@@ -3,8 +3,6 @@
#include "../LittleVgl.h"
using namespace Pinetime::Applications::Screens;
-extern lv_font_t jetbrains_mono_extrabold_compressed;
-extern lv_font_t jetbrains_mono_bold_20;
InfiniPaint::InfiniPaint(Pinetime::Applications::DisplayApp* app, Pinetime::Components::LittleVgl& lvgl) : Screen(app), lvgl{lvgl} {
app->SetTouchMode(DisplayApp::TouchModes::Polling);
diff --git a/src/displayapp/screens/Meter.cpp b/src/displayapp/screens/Meter.cpp
index 3c8e703c..58a0636f 100644
--- a/src/displayapp/screens/Meter.cpp
+++ b/src/displayapp/screens/Meter.cpp
@@ -3,27 +3,23 @@
#include "../DisplayApp.h"
using namespace Pinetime::Applications::Screens;
-extern lv_font_t jetbrains_mono_extrabold_compressed;
-extern lv_font_t jetbrains_mono_bold_20;
Meter::Meter(Pinetime::Applications::DisplayApp *app) : Screen(app) {
- lv_style_copy(&style_lmeter, &lv_style_pretty_color);
- style_lmeter.line.width = 2;
- style_lmeter.line.color = LV_COLOR_SILVER;
- style_lmeter.body.main_color = lv_color_make(255,0,0);
- style_lmeter.body.grad_color = lv_color_make(160,0,0);
- style_lmeter.body.padding.left = 16; /*Line length*/
-
/*Create a line meter */
- lmeter = lv_lmeter_create(lv_scr_act(), nullptr);
- lv_lmeter_set_range(lmeter, 0, 60); /*Set the range*/
- lv_lmeter_set_value(lmeter, value); /*Set the current value*/
- lv_lmeter_set_angle_offset(lmeter, 180);
- lv_lmeter_set_scale(lmeter, 360, 60); /*Set the angle and number of lines*/
- lv_lmeter_set_style(lmeter, LV_LMETER_STYLE_MAIN, &style_lmeter); /*Apply the new style*/
- lv_obj_set_size(lmeter, 150, 150);
+ lmeter = lv_linemeter_create(lv_scr_act(), nullptr);
+ lv_linemeter_set_range(lmeter, 0, 60); /*Set the range*/
+ lv_linemeter_set_value(lmeter, value); /*Set the current value*/
+ lv_linemeter_set_angle_offset(lmeter, 180);
+ lv_linemeter_set_scale(lmeter, 360, 60); /*Set the angle and number of lines*/
+
+ lv_obj_set_style_local_scale_end_color(lmeter, LV_LINEMETER_PART_MAIN, LV_STATE_DEFAULT, lv_color_make(255,0,0));
+ lv_obj_set_style_local_scale_grad_color(lmeter, LV_LINEMETER_PART_MAIN, LV_STATE_DEFAULT, lv_color_make(160,0,0));
+ lv_obj_set_style_local_line_width(lmeter, LV_LINEMETER_PART_MAIN, LV_STATE_DEFAULT, 2);
+ lv_obj_set_style_local_line_color(lmeter, LV_LINEMETER_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_SILVER);
+
+ lv_obj_set_size(lmeter, 200, 200);
lv_obj_align(lmeter, nullptr, LV_ALIGN_CENTER, 0, 0);
}
@@ -35,7 +31,7 @@ Meter::~Meter() {
}
bool Meter::Refresh() {
- lv_lmeter_set_value(lmeter, value++); /*Set the current value*/
+ lv_linemeter_set_value(lmeter, value++); /*Set the current value*/
if(value>=60) value = 0;
return running;
diff --git a/src/displayapp/screens/Modal.cpp b/src/displayapp/screens/Modal.cpp
deleted file mode 100644
index d1a110ea..00000000
--- a/src/displayapp/screens/Modal.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-#include "Modal.h"
-#include <lvgl/lvgl.h>
-#include "../DisplayApp.h"
-
-using namespace Pinetime::Applications::Screens;
-extern lv_font_t jetbrains_mono_extrabold_compressed;
-extern lv_font_t jetbrains_mono_bold_20;
-
-Modal::Modal(Pinetime::Applications::DisplayApp *app) : Screen(app) {
-
-
-}
-
-Modal::~Modal() {
- lv_obj_clean(lv_scr_act());
-}
-
-bool Modal::Refresh() {
-
- return running;
-}
-
-bool Modal::OnButtonPushed() {
- running = false;
- return true;
-}
-
-void Modal::Hide() {
- /* Delete the parent modal background */
- lv_obj_del_async(lv_obj_get_parent(mbox));
- mbox = NULL; /* happens before object is actually deleted! */
- isVisible = false;
-}
-
-void Modal::mbox_event_cb(lv_obj_t *obj, lv_event_t evt) {
- auto* m = static_cast<Modal *>(obj->user_data);
- m->OnEvent(obj, evt);
-}
-
-void Modal::OnEvent(lv_obj_t *event_obj, lv_event_t evt) {
- if(evt == LV_EVENT_DELETE && event_obj == mbox) {
- Hide();
- } else if(evt == LV_EVENT_VALUE_CHANGED) {
- /* A button was clicked */
- lv_mbox_start_auto_close(mbox, 0);
-// Hide();
- }
-}
-
-void Modal::Show(const char* msg) {
- if(isVisible) return;
- isVisible = true;
- lv_style_copy(&modal_style, &lv_style_plain_color);
- modal_style.body.main_color = modal_style.body.grad_color = LV_COLOR_BLACK;
- modal_style.body.opa = LV_OPA_50;
-
- obj = lv_obj_create(lv_scr_act(), nullptr);
- lv_obj_set_style(obj, &modal_style);
- lv_obj_set_pos(obj, 0, 0);
- lv_obj_set_size(obj, LV_HOR_RES, LV_VER_RES);
- lv_obj_set_opa_scale_enable(obj, true); /* Enable opacity scaling for the animation */
-
- static const char * btns2[] = {"Ok", ""};
-
- /* Create the message box as a child of the modal background */
- mbox = lv_mbox_create(obj, nullptr);
- lv_mbox_add_btns(mbox, btns2);
- lv_mbox_set_text(mbox, msg);
- lv_obj_align(mbox, nullptr, LV_ALIGN_CENTER, 0, 0);
- lv_obj_set_event_cb(mbox, Modal::mbox_event_cb);
-
- mbox->user_data = this;
-
- /* Fade the message box in with an animation */
- lv_anim_t a;
- lv_anim_init(&a);
- lv_anim_set_time(&a, 500, 0);
- lv_anim_set_values(&a, LV_OPA_TRANSP, LV_OPA_COVER);
- lv_anim_set_exec_cb(&a, obj, (lv_anim_exec_xcb_t)lv_obj_set_opa_scale);
- lv_anim_create(&a);
-}
diff --git a/src/displayapp/screens/Modal.h b/src/displayapp/screens/Modal.h
deleted file mode 100644
index 9cc177f0..00000000
--- a/src/displayapp/screens/Modal.h
+++ /dev/null
@@ -1,36 +0,0 @@
-#pragma once
-
-#include "Screen.h"
-#include <lvgl/src/lv_core/lv_style.h>
-#include <lvgl/src/lv_core/lv_obj.h>
-
-namespace Pinetime {
- namespace Applications {
- namespace Screens {
-
- class Modal : public Screen{
- public:
- Modal(DisplayApp* app);
- ~Modal() override;
-
- void Show(const char* msg);
- void Hide();
-
- bool Refresh() override;
- bool OnButtonPushed() override;
-
- static void mbox_event_cb(lv_obj_t *obj, lv_event_t evt);
- private:
- void OnEvent(lv_obj_t *event_obj, lv_event_t evt);
-
- lv_style_t modal_style;
- lv_obj_t *obj;
- lv_obj_t *mbox;
- lv_obj_t *info;
- bool running = true;
- bool isVisible = false;
-
- };
- }
- }
-}
diff --git a/src/displayapp/screens/Music.cpp b/src/displayapp/screens/Music.cpp
index c4ae3ac5..b68f3781 100644
--- a/src/displayapp/screens/Music.cpp
+++ b/src/displayapp/screens/Music.cpp
@@ -16,6 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "Music.h"
+#include "Symbols.h"
#include <cstdint>
#include "../DisplayApp.h"
#include "components/ble/MusicService.h"
@@ -25,9 +26,6 @@
using namespace Pinetime::Applications::Screens;
-extern lv_font_t jetbrains_mono_extrabold_compressed;
-extern lv_font_t jetbrains_mono_bold_20;
-
static void event_handler(lv_obj_t *obj, lv_event_t event) {
Music *screen = static_cast<Music *>(obj->user_data);
screen->OnObjectEvent(obj, event);
@@ -58,7 +56,7 @@ Music::Music(Pinetime::Applications::DisplayApp *app, Pinetime::Controllers::Mus
lv_obj_set_size(btnVolDown, LV_HOR_RES / 3, 80);
lv_obj_align(btnVolDown, nullptr, LV_ALIGN_IN_BOTTOM_LEFT, 0, 0);
label = lv_label_create(btnVolDown, nullptr);
- lv_label_set_text(label, "V-");
+ lv_label_set_text(label, Symbols::volumDown);
lv_obj_set_hidden(btnVolDown, !displayVolumeButtons);
btnVolUp = lv_btn_create(lv_scr_act(), nullptr);
@@ -67,7 +65,7 @@ Music::Music(Pinetime::Applications::DisplayApp *app, Pinetime::Controllers::Mus
lv_obj_set_size(btnVolUp, LV_HOR_RES / 3, 80);
lv_obj_align(btnVolUp, nullptr, LV_ALIGN_IN_BOTTOM_RIGHT, 0, 0);
label = lv_label_create(btnVolUp, nullptr);
- lv_label_set_text(label, "V+");
+ lv_label_set_text(label, Symbols::volumUp);
lv_obj_set_hidden(btnVolDown, !displayVolumeButtons);
btnPrev = lv_btn_create(lv_scr_act(), nullptr);
@@ -76,7 +74,7 @@ Music::Music(Pinetime::Applications::DisplayApp *app, Pinetime::Controllers::Mus
lv_obj_set_size(btnPrev, LV_HOR_RES / 3, 80);
lv_obj_align(btnPrev, nullptr, LV_ALIGN_IN_BOTTOM_LEFT, 0, 0);
label = lv_label_create(btnPrev, nullptr);
- lv_label_set_text(label, "<<");
+ lv_label_set_text(label, Symbols::stepBackward);
btnNext = lv_btn_create(lv_scr_act(), nullptr);
btnNext->user_data = this;
@@ -84,7 +82,7 @@ Music::Music(Pinetime::Applications::DisplayApp *app, Pinetime::Controllers::Mus
lv_obj_set_size(btnNext, LV_HOR_RES / 3, 80);
lv_obj_align(btnNext, nullptr, LV_ALIGN_IN_BOTTOM_RIGHT, 0, 0);
label = lv_label_create(btnNext, nullptr);
- lv_label_set_text(label, ">>");
+ lv_label_set_text(label, Symbols::stepForward);
btnPlayPause = lv_btn_create(lv_scr_act(), nullptr);
btnPlayPause->user_data = this;
@@ -92,7 +90,7 @@ Music::Music(Pinetime::Applications::DisplayApp *app, Pinetime::Controllers::Mus
lv_obj_set_size(btnPlayPause, LV_HOR_RES / 3, 80);
lv_obj_align(btnPlayPause, nullptr, LV_ALIGN_IN_BOTTOM_MID, 0, 0);
txtPlayPause = lv_label_create(btnPlayPause, nullptr);
- lv_label_set_text(txtPlayPause, ">");
+ lv_label_set_text(txtPlayPause, Symbols::play);
txtTrackDuration = lv_label_create(lv_scr_act(), nullptr);
lv_label_set_long_mode(txtTrackDuration, LV_LABEL_LONG_SROLL);
@@ -179,7 +177,7 @@ bool Music::Refresh() {
}
if (playing == Pinetime::Controllers::MusicService::MusicStatus::Playing) {
- lv_label_set_text(txtPlayPause, "||");
+ lv_label_set_text(txtPlayPause, Symbols::pause);
if (xTaskGetTickCount() - 1024 >= lastIncrement) {
if (frameB) {
@@ -203,7 +201,7 @@ bool Music::Refresh() {
UpdateLength();
}
} else {
- lv_label_set_text(txtPlayPause, ">");
+ lv_label_set_text(txtPlayPause, Symbols::play);
}
return running;
diff --git a/src/displayapp/screens/Navigation.cpp b/src/displayapp/screens/Navigation.cpp
index 4b0e92c4..9fbcbe57 100644
--- a/src/displayapp/screens/Navigation.cpp
+++ b/src/displayapp/screens/Navigation.cpp
@@ -22,9 +22,6 @@
using namespace Pinetime::Applications::Screens;
-extern lv_font_t jetbrains_mono_extrabold_compressed;
-extern lv_font_t jetbrains_mono_bold_20;
-
/**
* Set the pixel array to display by the image
* This just calls lv_img_set_src but adds type safety
diff --git a/src/displayapp/screens/Notifications.cpp b/src/displayapp/screens/Notifications.cpp
index 51a601c4..4219bac7 100644
--- a/src/displayapp/screens/Notifications.cpp
+++ b/src/displayapp/screens/Notifications.cpp
@@ -1,30 +1,48 @@
#include "Notifications.h"
#include <displayapp/DisplayApp.h>
+#include "components/ble/MusicService.h"
+#include "components/ble/AlertNotificationService.h"
+#include "Symbols.h"
using namespace Pinetime::Applications::Screens;
+extern lv_font_t jetbrains_mono_extrabold_compressed;
+extern lv_font_t jetbrains_mono_bold_20;
-Notifications::Notifications(DisplayApp *app, Pinetime::Controllers::NotificationManager &notificationManager, Modes mode) :
- Screen(app), notificationManager{notificationManager}, mode{mode} {
+Notifications::Notifications(DisplayApp *app,
+ Pinetime::Controllers::NotificationManager &notificationManager,
+ Pinetime::Controllers::AlertNotificationService& alertNotificationService,
+ Modes mode) :
+ Screen(app), notificationManager{notificationManager}, alertNotificationService{alertNotificationService}, mode{mode} {
notificationManager.ClearNewNotificationFlag();
auto notification = notificationManager.GetLastNotification();
if(notification.valid) {
currentId = notification.id;
- currentItem.reset(new NotificationItem("\nNotification", notification.message.data(), notification.index, notificationManager.NbNotifications(), mode));
+ currentItem.reset(new NotificationItem("\nNotification",
+ notification.message.data(),
+ notification.index,
+ notification.category,
+ notificationManager.NbNotifications(),
+ mode,
+ alertNotificationService));
validDisplay = true;
} else {
- currentItem.reset(new NotificationItem("\nNotification", "No notification to display", 0, notificationManager.NbNotifications(), Modes::Preview));
+ currentItem.reset(new NotificationItem("\nNotification",
+ "No notification to display",
+ 0,
+ notification.category,
+ notificationManager.NbNotifications(),
+ Modes::Preview,
+ alertNotificationService));
}
if(mode == Modes::Preview) {
- static lv_style_t style_line;
- lv_style_copy(&style_line, &lv_style_plain);
- style_line.line.color = LV_COLOR_WHITE;
- style_line.line.width = 3;
- style_line.line.rounded = 0;
-
timeoutLine = lv_line_create(lv_scr_act(), nullptr);
- lv_line_set_style(timeoutLine, LV_LINE_STYLE_MAIN, &style_line);
+
+ lv_obj_set_style_local_line_width(timeoutLine, LV_LINE_PART_MAIN, LV_STATE_DEFAULT, 3);
+ lv_obj_set_style_local_line_color(timeoutLine, LV_LINE_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_WHITE);
+ lv_obj_set_style_local_line_rounded(timeoutLine, LV_LINE_PART_MAIN, LV_STATE_DEFAULT, true);
+
lv_line_set_points(timeoutLine, timeoutLinePoints, 2);
timeoutTickCountStart = xTaskGetTickCount();
timeoutTickCountEnd = timeoutTickCountStart + (5*1024);
@@ -69,7 +87,13 @@ bool Notifications::OnTouchEvent(Pinetime::Applications::TouchEvents event) {
currentId = previousNotification.id;
currentItem.reset(nullptr);
app->SetFullRefresh(DisplayApp::FullRefreshDirections::Up);
- currentItem.reset(new NotificationItem("\nNotification", previousNotification.message.data(), previousNotification.index, notificationManager.NbNotifications(), mode));
+ currentItem.reset(new NotificationItem("\nNotification",
+ previousNotification.message.data(),
+ previousNotification.index,
+ previousNotification.category,
+ notificationManager.NbNotifications(),
+ mode,
+ alertNotificationService));
}
return true;
case Pinetime::Applications::TouchEvents::SwipeDown: {
@@ -85,9 +109,19 @@ bool Notifications::OnTouchEvent(Pinetime::Applications::TouchEvents event) {
currentId = nextNotification.id;
currentItem.reset(nullptr);
app->SetFullRefresh(DisplayApp::FullRefreshDirections::Down);
- currentItem.reset(new NotificationItem("\nNotification", nextNotification.message.data(), nextNotification.index, notificationManager.NbNotifications(), mode));
+ currentItem.reset(new NotificationItem("\nNotification",
+ nextNotification.message.data(),
+ nextNotification.index,
+ nextNotification.category,
+ notificationManager.NbNotifications(),
+ mode,
+ alertNotificationService));
}
return true;
+ case Pinetime::Applications::TouchEvents::LongTap: {
+ notificationManager.ToggleVibrations();
+ return true;
+ }
default:
return false;
}
@@ -99,73 +133,137 @@ bool Notifications::OnButtonPushed() {
return true;
}
+namespace {
+ static void AcceptIncomingCallEventHandler(lv_obj_t* obj, lv_event_t event) {
+ auto* item = static_cast<Notifications::NotificationItem*>(obj->user_data);
+ item->OnAcceptIncomingCall(event);
+ }
+
+ static void MuteIncomingCallEventHandler(lv_obj_t* obj, lv_event_t event) {
+ auto* item = static_cast<Notifications::NotificationItem*>(obj->user_data);
+ item->OnMuteIncomingCall(event);
+ }
+
+ static void RejectIncomingCallEventHandler(lv_obj_t *obj, lv_event_t event) {
+ auto* item = static_cast<Notifications::NotificationItem *>(obj->user_data);
+ item->OnRejectIncomingCall(event);
+ }
+}
+
+ Notifications::NotificationItem::NotificationItem(const char *title,
+ const char *msg,
+ uint8_t notifNr,
+ Controllers::NotificationManager::Categories category,
+ uint8_t notifNb,
+ Modes mode,
+ Pinetime::Controllers::AlertNotificationService& alertNotificationService)
+ : notifNr{notifNr}, notifNb{notifNb}, mode{mode}, alertNotificationService{alertNotificationService} {
+
+ lv_obj_t* container1 = lv_cont_create(lv_scr_act(), NULL);
+
+ lv_obj_set_style_local_bg_color(container1, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x222222));
+ lv_obj_set_style_local_pad_all(container1, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, 10);
+ lv_obj_set_style_local_pad_inner(container1, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, 5);
+ lv_obj_set_style_local_border_width(container1, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, 0);
+
+ lv_obj_set_pos(container1, 0, 50);
+ lv_obj_set_width(container1, 240);
+ lv_obj_set_height(container1, 190);
+
+ lv_cont_set_layout(container1, LV_LAYOUT_COLUMN_LEFT);
+
+ lv_obj_t* alert_count = lv_label_create(lv_scr_act(), nullptr);
+ lv_label_set_text_fmt(alert_count, "%i/%i", notifNr, notifNb);
+ lv_obj_align(alert_count, NULL, LV_ALIGN_IN_TOP_RIGHT, 0, 16);
-Notifications::NotificationItem::NotificationItem(const char *title, const char *msg, uint8_t notifNr, uint8_t notifNb, Modes mode)
- : notifNr{notifNr}, notifNb{notifNb}, mode{mode} {
- container1 = lv_cont_create(lv_scr_act(), nullptr);
- static lv_style_t contStyle;
- lv_style_copy(&contStyle, lv_cont_get_style(container1, LV_CONT_STYLE_MAIN));
- contStyle.body.padding.inner = 20;
- lv_cont_set_style(container1, LV_CONT_STYLE_MAIN, &contStyle);
- lv_obj_set_width(container1, LV_HOR_RES);
- lv_obj_set_height(container1, LV_VER_RES);
- lv_obj_set_pos(container1, 0, 0);
- lv_cont_set_layout(container1, LV_LAYOUT_OFF);
- lv_cont_set_fit2(container1, LV_FIT_FLOOD, LV_FIT_FLOOD);
-
- t1 = lv_label_create(container1, nullptr);
- static lv_style_t titleStyle;
- static lv_style_t textStyle;
- static lv_style_t bottomStyle;
- lv_style_copy(&titleStyle, lv_label_get_style(t1, LV_LABEL_STYLE_MAIN));
- lv_style_copy(&textStyle, lv_label_get_style(t1, LV_LABEL_STYLE_MAIN));
- lv_style_copy(&bottomStyle, lv_label_get_style(t1, LV_LABEL_STYLE_MAIN));
- titleStyle.body.padding.inner = 5;
- titleStyle.body.grad_color = LV_COLOR_GRAY;
- titleStyle.body.main_color = LV_COLOR_GRAY;
- titleStyle.body.radius = 20;
- textStyle.body.border.part = LV_BORDER_NONE;
- textStyle.body.padding.inner = 5;
-
- bottomStyle.body.main_color = LV_COLOR_GREEN;
- bottomStyle.body.grad_color = LV_COLOR_GREEN;
- bottomStyle.body.border.part = LV_BORDER_TOP;
- bottomStyle.body.border.color = LV_COLOR_RED;
-
- lv_label_set_style(t1, LV_LABEL_STYLE_MAIN, &titleStyle);
- lv_label_set_long_mode(t1, LV_LABEL_LONG_BREAK);
- lv_label_set_body_draw(t1, true);
- lv_obj_set_width(t1, LV_HOR_RES - (titleStyle.body.padding.left + titleStyle.body.padding.right));
- lv_label_set_text(t1, title);
- static constexpr int16_t offscreenOffset = -20 ;
- lv_obj_set_pos(t1, titleStyle.body.padding.left, offscreenOffset);
-
- auto titleHeight = lv_obj_get_height(t1);
-
- l1 = lv_label_create(container1, nullptr);
- lv_label_set_style(l1, LV_LABEL_STYLE_MAIN, &textStyle);
- lv_obj_set_pos(l1, textStyle.body.padding.left,
- titleHeight + offscreenOffset + textStyle.body.padding.bottom +
- textStyle.body.padding.top);
-
- lv_label_set_long_mode(l1, LV_LABEL_LONG_BREAK);
- lv_label_set_body_draw(l1, true);
- lv_obj_set_width(l1, LV_HOR_RES - (textStyle.body.padding.left + textStyle.body.padding.right));
- lv_label_set_text(l1, msg);
-
- if(mode == Modes::Normal) {
- if(notifNr < notifNb) {
- bottomPlaceholder = lv_label_create(container1, nullptr);
- lv_label_set_style(bottomPlaceholder, LV_LABEL_STYLE_MAIN, &titleStyle);
- lv_label_set_long_mode(bottomPlaceholder, LV_LABEL_LONG_BREAK);
- lv_label_set_body_draw(bottomPlaceholder, true);
- lv_obj_set_width(bottomPlaceholder, LV_HOR_RES - (titleStyle.body.padding.left + titleStyle.body.padding.right));
- lv_label_set_text(bottomPlaceholder, " ");
- lv_obj_set_pos(bottomPlaceholder, titleStyle.body.padding.left, LV_VER_RES - 5);
+ lv_obj_t* alert_type = lv_label_create(lv_scr_act(), nullptr);
+ lv_obj_set_style_local_text_color(alert_type, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x888888));
+ lv_label_set_text(alert_type, title);
+ lv_obj_align(alert_type, NULL, LV_ALIGN_IN_TOP_LEFT, 0, -4);
+
+ /////////
+ switch(category) {
+ default: {
+ lv_obj_t* alert_subject = lv_label_create(container1, nullptr);
+ lv_obj_set_style_local_text_color(alert_subject, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_ORANGE);
+ lv_label_set_long_mode(alert_subject, LV_LABEL_LONG_BREAK);
+ lv_obj_set_width(alert_subject, LV_HOR_RES - 20);
+ lv_label_set_text(alert_subject, msg);
}
+ break;
+ case Controllers::NotificationManager::Categories::IncomingCall: {
+ lv_obj_t* alert_subject = lv_label_create(container1, nullptr);
+ lv_obj_set_style_local_text_color(alert_subject, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_ORANGE);
+ lv_label_set_long_mode(alert_subject, LV_LABEL_LONG_BREAK);
+ lv_obj_set_width(alert_subject, LV_HOR_RES - 20);
+ lv_label_set_text(alert_subject, "Incoming call from");
+
+ lv_obj_t* alert_caller = lv_label_create(container1, nullptr);
+ lv_obj_align(alert_caller, alert_subject, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 0);
+ lv_label_set_long_mode(alert_caller, LV_LABEL_LONG_BREAK);
+ lv_obj_set_width(alert_caller, LV_HOR_RES - 20);
+ lv_label_set_text(alert_caller, msg);
+
+ lv_obj_t* callBtnContainer = lv_cont_create(container1, NULL);
+ lv_obj_set_width(callBtnContainer, 240);
+ lv_obj_set_height(callBtnContainer, 90);
+ lv_cont_set_layout(callBtnContainer, LV_LAYOUT_ROW_MID);
+
+ lv_obj_set_style_local_bg_color(callBtnContainer, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x222222));
+ lv_obj_set_style_local_pad_all(callBtnContainer, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, 0);
+ lv_obj_set_style_local_margin_top(callBtnContainer, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, 40);
+ lv_obj_set_style_local_margin_left(callBtnContainer, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, -8);
+ lv_obj_set_style_local_pad_inner(callBtnContainer, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, 5);
+ lv_obj_set_style_local_border_width(callBtnContainer, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, 0);
+
+ bt_accept = lv_btn_create(callBtnContainer, nullptr);
+ bt_accept->user_data = this;
+ lv_obj_set_event_cb(bt_accept, AcceptIncomingCallEventHandler);
+ lv_obj_set_size(bt_accept, (LV_HOR_RES / 3) - 5, 80);
+ label_accept = lv_label_create(bt_accept, nullptr);
+ lv_label_set_text(label_accept, Symbols::phone);
+
+ bt_reject = lv_btn_create(callBtnContainer, nullptr);
+ bt_reject->user_data = this;
+ lv_obj_set_event_cb(bt_reject, RejectIncomingCallEventHandler);
+ lv_obj_set_size(bt_reject, (LV_HOR_RES / 3) - 5, 80);
+ label_reject = lv_label_create(bt_reject, nullptr);
+ lv_label_set_text(label_reject, Symbols::phoneSlash);
+
+ bt_mute = lv_btn_create(callBtnContainer, nullptr);
+ bt_mute->user_data = this;
+ lv_obj_set_event_cb(bt_mute, MuteIncomingCallEventHandler);
+ lv_obj_set_size(bt_mute, (LV_HOR_RES / 3) - 5, 80);
+ label_mute = lv_label_create(bt_mute, nullptr);
+ lv_label_set_text(label_mute, Symbols::volumMute);
+ }
+ break;
}
+
+ lv_obj_t* backgroundLabel = lv_label_create(lv_scr_act(), nullptr);
+ lv_label_set_long_mode(backgroundLabel, LV_LABEL_LONG_CROP);
+ lv_obj_set_size(backgroundLabel, 240, 240);
+ lv_obj_set_pos(backgroundLabel, 0, 0);
+ lv_label_set_text(backgroundLabel, "");
}
+void Notifications::NotificationItem::OnAcceptIncomingCall(lv_event_t event) {
+ if (event != LV_EVENT_CLICKED) return;
+
+ alertNotificationService.AcceptIncomingCall();
+}
+
+void Notifications::NotificationItem::OnMuteIncomingCall(lv_event_t event) {
+ if (event != LV_EVENT_CLICKED) return;
+
+ alertNotificationService.MuteIncomingCall();
+}
+
+void Notifications::NotificationItem::OnRejectIncomingCall(lv_event_t event) {
+ if (event != LV_EVENT_CLICKED) return;
+
+ alertNotificationService.RejectIncomingCall();
+}
Notifications::NotificationItem::~NotificationItem() {
lv_obj_clean(lv_scr_act());
diff --git a/src/displayapp/screens/Notifications.h b/src/displayapp/screens/Notifications.h
index f5c6a860..028a3780 100644
--- a/src/displayapp/screens/Notifications.h
+++ b/src/displayapp/screens/Notifications.h
@@ -7,50 +7,68 @@
#include "components/ble/NotificationManager.h"
namespace Pinetime {
+ namespace Controllers {
+ class AlertNotificationService;
+ }
namespace Applications {
namespace Screens {
+
class Notifications : public Screen {
public:
enum class Modes {Normal, Preview};
- explicit Notifications(DisplayApp* app, Pinetime::Controllers::NotificationManager& notificationManager, Modes mode);
+ explicit Notifications(DisplayApp* app, Pinetime::Controllers::NotificationManager& notificationManager, Pinetime::Controllers::AlertNotificationService& alertNotificationService, Modes mode);
~Notifications() override;
bool Refresh() override;
bool OnButtonPushed() override;
bool OnTouchEvent(Pinetime::Applications::TouchEvents event) override;
+ class NotificationItem {
+ public:
+ NotificationItem(const char* title, const char* msg, uint8_t notifNr, Controllers::NotificationManager::Categories, uint8_t notifNb, Modes mode, Pinetime::Controllers::AlertNotificationService& alertNotificationService);
+ ~NotificationItem();
+ bool Refresh() {return false;}
+ void OnAcceptIncomingCall(lv_event_t event);
+ void OnMuteIncomingCall(lv_event_t event);
+ void OnRejectIncomingCall(lv_event_t event);
+
private:
- bool running = true;
+ uint8_t notifNr = 0;
+ uint8_t notifNb = 0;
+ char pageText[4];
- class NotificationItem {
- public:
- NotificationItem(const char* title, const char* msg, uint8_t notifNr, uint8_t notifNb, Modes mode);
- ~NotificationItem();
- bool Refresh() {return false;}
-
- private:
- uint8_t notifNr = 0;
- uint8_t notifNb = 0;
- char pageText[4];
-
- lv_obj_t* container1;
- lv_obj_t* t1;
- lv_obj_t* l1;
- lv_obj_t* bottomPlaceholder;
- Modes mode;
- };
+ lv_obj_t* container1;
+ lv_obj_t* t1;
+ lv_obj_t* l1;
+ lv_obj_t* l2;
+ lv_obj_t* bt_accept;
+ lv_obj_t* bt_mute;
+ lv_obj_t* bt_reject;
+ lv_obj_t* label_accept;
+ lv_obj_t* label_mute;
+ lv_obj_t* label_reject;
+ lv_obj_t* bottomPlaceholder;
+ Modes mode;
+ Pinetime::Controllers::AlertNotificationService& alertNotificationService;
+
+
+ };
+
+ private:
+ bool running = true;
struct NotificationData {
const char* title;
const char* text;
};
Pinetime::Controllers::NotificationManager& notificationManager;
+ Pinetime::Controllers::AlertNotificationService& alertNotificationService;
Modes mode = Modes::Normal;
std::unique_ptr<NotificationItem> currentItem;
Controllers::NotificationManager::Notification::Id currentId;
bool validDisplay = false;
- lv_point_t timeoutLinePoints[2] { {0, 237}, {239, 237} };
+ lv_point_t timeoutLinePoints[2] { {0, 1}, {239, 1} };
lv_obj_t* timeoutLine;
uint32_t timeoutTickCountStart;
uint32_t timeoutTickCountEnd;
diff --git a/src/displayapp/screens/Paddle.cpp b/src/displayapp/screens/Paddle.cpp
index 9a04b3b7..eda06547 100644
--- a/src/displayapp/screens/Paddle.cpp
+++ b/src/displayapp/screens/Paddle.cpp
@@ -3,8 +3,6 @@
#include "../LittleVgl.h"
using namespace Pinetime::Applications::Screens;
-extern lv_font_t jetbrains_mono_extrabold_compressed;
-extern lv_font_t jetbrains_mono_bold_20;
namespace{
const uint8_t paddle_map[] = {
diff --git a/src/displayapp/screens/Symbols.h b/src/displayapp/screens/Symbols.h
index bd6a0f90..1a6bbd7f 100644
--- a/src/displayapp/screens/Symbols.h
+++ b/src/displayapp/screens/Symbols.h
@@ -26,6 +26,16 @@ namespace Pinetime {
static constexpr const char* paintbrush = "\xEF\x87\xBC";
static constexpr const char* paddle = "\xEF\x91\x9D";
static constexpr const char* map = "\xEF\x96\xa0";
+ static constexpr const char* qrcode = "\xEF\x80\xa9";
+ static constexpr const char* phone = "\xEF\x82\x95";
+ static constexpr const char* phoneSlash = "\xEF\x8F\x9D";
+ static constexpr const char* volumMute = "\xEF\x9A\xA9";
+ static constexpr const char* volumUp = "\xEF\x80\xA8";
+ static constexpr const char* volumDown = "\xEF\x80\xA7";
+ static constexpr const char* stepForward = "\xEF\x81\x91";
+ static constexpr const char* stepBackward = "\xEF\x81\x88";
+ static constexpr const char* play = "\xEF\x81\x8B";
+ static constexpr const char* pause = "\xEF\x81\x8C";
}
}
}
diff --git a/src/displayapp/screens/Tile.cpp b/src/displayapp/screens/Tile.cpp
index c1a5e94f..3b82b060 100644
--- a/src/displayapp/screens/Tile.cpp
+++ b/src/displayapp/screens/Tile.cpp
@@ -3,8 +3,6 @@
using namespace Pinetime::Applications::Screens;
-extern lv_font_t jetbrains_mono_bold_20;
-
static void event_handler(lv_obj_t * obj, lv_event_t event) {
Tile* screen = static_cast<Tile *>(obj->user_data);
uint32_t* eventDataPtr = (uint32_t*) lv_event_get_data();
@@ -22,10 +20,9 @@ Tile::Tile(DisplayApp* app, std::array<Applications, 6>& applications) : Screen(
appIndex++;
}
}
- modal.reset(new Modal(app));
- btnm1 = lv_btnm_create(lv_scr_act(), nullptr);
- lv_btnm_set_map(btnm1, btnm_map1);
+ btnm1 = lv_btnmatrix_create(lv_scr_act(), nullptr);
+ lv_btnmatrix_set_map(btnm1, btnm_map1);
lv_obj_set_size(btnm1, LV_HOR_RES, LV_VER_RES);
btnm1->user_data = this;
diff --git a/src/displayapp/screens/Tile.h b/src/displayapp/screens/Tile.h
index 7edf67b2..55ed45e3 100644
--- a/src/displayapp/screens/Tile.h
+++ b/src/displayapp/screens/Tile.h
@@ -3,7 +3,6 @@
#include <lvgl/lvgl.h>
#include <cstdint>
#include <memory>
-#include "Modal.h"
#include "Screen.h"
#include "../Apps.h"
@@ -29,8 +28,6 @@ namespace Pinetime {
lv_obj_t * btnm1;
bool running = true;
- std::unique_ptr<Modal> modal;
-
const char* btnm_map1[8];
Pinetime::Applications::Apps apps[6];
};
diff --git a/src/displayapp/screens/Twos.cpp b/src/displayapp/screens/Twos.cpp
index f36e35d4..b51a9ec6 100644
--- a/src/displayapp/screens/Twos.cpp
+++ b/src/displayapp/screens/Twos.cpp
@@ -8,43 +8,50 @@
using namespace Pinetime::Applications::Screens;
-extern lv_font_t jetbrains_mono_bold_20;
-
Twos::Twos(Pinetime::Applications::DisplayApp *app) : Screen(app) {
// create styles to apply to different valued tiles
- static lv_style_t style_cell1;
- lv_style_copy(&style_cell1, &lv_style_plain);
- style_cell1.body.border.width = 1;
- style_cell1.text.font = &jetbrains_mono_bold_20;
- style_cell1.body.padding.top = 16;
- style_cell1.body.padding.bottom = 16;
- style_cell1.body.main_color = LV_COLOR_MAKE(214, 197, 165);
- style_cell1.body.grad_color = LV_COLOR_MAKE(214, 197, 165);
- style_cell1.text.color = LV_COLOR_BLACK;
+ lv_style_init(&style_cell1);
+ lv_style_init(&style_cell2);
+ lv_style_init(&style_cell3);
+ lv_style_init(&style_cell4);
+ lv_style_init(&style_cell5);
+
+ lv_style_set_border_color(&style_cell1, LV_STATE_DEFAULT, lv_color_hex(0xbbada0));
+ lv_style_set_border_width(&style_cell1, LV_STATE_DEFAULT, 3);
+ lv_style_set_bg_opa(&style_cell1, LV_STATE_DEFAULT, LV_OPA_COVER);
+ lv_style_set_bg_color(&style_cell1, LV_STATE_DEFAULT, lv_color_hex(0xcdc0b4));
- static lv_style_t style_cell2;
- lv_style_copy(&style_cell2, &style_cell1);
- style_cell2.body.main_color = LV_COLOR_MAKE(209, 146, 92);
- style_cell2.body.grad_color = LV_COLOR_MAKE(209, 146, 92);
- style_cell2.text.color = LV_COLOR_WHITE;
+ lv_style_set_border_color(&style_cell2, LV_STATE_DEFAULT, lv_color_hex(0xbbada0));
+ lv_style_set_border_width(&style_cell2, LV_STATE_DEFAULT, 3);
+ lv_style_set_bg_opa(&style_cell2, LV_STATE_DEFAULT, LV_OPA_COVER);
+ lv_style_set_bg_color(&style_cell2, LV_STATE_DEFAULT, lv_color_hex(0xefdfc6));
- static lv_style_t style_cell3;
- lv_style_copy(&style_cell3, &style_cell2);
- style_cell3.body.main_color = LV_COLOR_MAKE(246, 94, 59);
- style_cell3.body.grad_color = LV_COLOR_MAKE(246, 94, 59);
+ lv_style_set_border_color(&style_cell3, LV_STATE_DEFAULT, lv_color_hex(0xbbada0));
+ lv_style_set_border_width(&style_cell3, LV_STATE_DEFAULT, 3);
+ lv_style_set_bg_opa(&style_cell3, LV_STATE_DEFAULT, LV_OPA_COVER);
+ lv_style_set_bg_color(&style_cell3, LV_STATE_DEFAULT, lv_color_hex(0xef9263));
- static lv_style_t style_cell4;
- lv_style_copy(&style_cell4, &style_cell3);
- style_cell4.body.main_color = LV_COLOR_MAKE(212, 170, 28);
- style_cell4.body.grad_color = LV_COLOR_MAKE(212, 170, 28);
+ lv_style_set_border_color(&style_cell4, LV_STATE_DEFAULT, lv_color_hex(0xbbada0));
+ lv_style_set_border_width(&style_cell4, LV_STATE_DEFAULT, 3);
+ lv_style_set_bg_opa(&style_cell4, LV_STATE_DEFAULT, LV_OPA_COVER);
+ lv_style_set_bg_color(&style_cell4, LV_STATE_DEFAULT, lv_color_hex(0xf76142));
+ //lv_style_set_text_color(&style_cell4, LV_STATE_DEFAULT, LV_COLOR_WHITE);
+
+ lv_style_set_border_color(&style_cell5, LV_STATE_DEFAULT, lv_color_hex(0xbbada0));
+ lv_style_set_border_width(&style_cell5, LV_STATE_DEFAULT, 3);
+ lv_style_set_bg_opa(&style_cell5, LV_STATE_DEFAULT, LV_OPA_COVER);
+ lv_style_set_bg_color(&style_cell5, LV_STATE_DEFAULT, lv_color_hex(0x007dc5));
+ //lv_style_set_text_color(&style_cell5, LV_STATE_DEFAULT, LV_COLOR_WHITE);
// format grid display
- gridDisplay = lv_table_create(lv_scr_act(), nullptr);
- lv_table_set_style(gridDisplay, LV_TABLE_STYLE_CELL1, &style_cell1);
- lv_table_set_style(gridDisplay, LV_TABLE_STYLE_CELL2, &style_cell2);
- lv_table_set_style(gridDisplay, LV_TABLE_STYLE_CELL3, &style_cell3);
- lv_table_set_style(gridDisplay, LV_TABLE_STYLE_CELL4, &style_cell4);
+
+ gridDisplay = lv_table_create(lv_scr_act(), nullptr);
+ lv_obj_add_style(gridDisplay, LV_TABLE_PART_CELL1, &style_cell1);
+ lv_obj_add_style(gridDisplay, LV_TABLE_PART_CELL2, &style_cell2);
+ lv_obj_add_style(gridDisplay, LV_TABLE_PART_CELL3, &style_cell3);
+ lv_obj_add_style(gridDisplay, LV_TABLE_PART_CELL4, &style_cell4);
+ lv_obj_add_style(gridDisplay, LV_TABLE_PART_CELL4 + 1, &style_cell5);
lv_table_set_col_cnt(gridDisplay, 4);
lv_table_set_row_cnt(gridDisplay, 4);
lv_table_set_col_width(gridDisplay, 0, LV_HOR_RES/4);
@@ -53,11 +60,13 @@ Twos::Twos(Pinetime::Applications::DisplayApp *app) : Screen(app) {
lv_table_set_col_width(gridDisplay, 3, LV_HOR_RES/4);
lv_obj_align(gridDisplay, NULL, LV_ALIGN_IN_BOTTOM_MID, 0, 0);
+ lv_obj_clean_style_list(gridDisplay, LV_TABLE_PART_BG);
+
// initialize grid
for(int row = 0; row < 4; row++) {
for(int col = 0; col < 4; col++) {
grid[row][col].value = 0;
- lv_table_set_cell_type(gridDisplay, row, col, 2);
+ lv_table_set_cell_type(gridDisplay, row, col, 1);
lv_table_set_cell_align(gridDisplay, row, col, LV_LABEL_ALIGN_CENTER);
}
}
@@ -68,11 +77,23 @@ Twos::Twos(Pinetime::Applications::DisplayApp *app) : Screen(app) {
scoreText = lv_label_create(lv_scr_act(), nullptr);
lv_obj_set_width(scoreText, LV_HOR_RES);
lv_label_set_align(scoreText, LV_ALIGN_IN_LEFT_MID);
- lv_obj_align(scoreText, nullptr, LV_ALIGN_IN_TOP_LEFT, 0, 0);
- lv_label_set_text(scoreText, ("Score: " + std::to_string(score)).c_str());
+ lv_obj_align(scoreText, nullptr, LV_ALIGN_IN_TOP_LEFT, 0, 10);
+ lv_label_set_recolor(scoreText, true);
+ lv_label_set_text_fmt(scoreText, "Score #FFFF00 %i#", score);
+
+ lv_obj_t * backgroundLabel = lv_label_create(lv_scr_act(), nullptr);
+ lv_label_set_long_mode(backgroundLabel, LV_LABEL_LONG_CROP);
+ lv_obj_set_size(backgroundLabel, 240, 240);
+ lv_obj_set_pos(backgroundLabel, 0, 0);
+ lv_label_set_text(backgroundLabel, "");
}
Twos::~Twos() {
+ lv_style_reset(&style_cell1);
+ lv_style_reset(&style_cell2);
+ lv_style_reset(&style_cell3);
+ lv_style_reset(&style_cell4);
+ lv_style_reset(&style_cell5);
lv_obj_clean(lv_scr_act());
}
@@ -117,7 +138,7 @@ bool Twos::tryMerge(Tile grid[][4], int &newRow, int &newCol, int oldRow, int ol
unsigned int newVal = grid[oldRow][oldCol].value *= 2;
grid[newRow][newCol].value = newVal;
score += newVal;
- lv_label_set_text(scoreText, ("Score: " + std::to_string(score)).c_str());
+ lv_label_set_text_fmt(scoreText, "Score #FFFF00 %i#", score);
grid[oldRow][oldCol].value = 0;
grid[newRow][newCol].merged = true;
return true;
@@ -250,20 +271,22 @@ void Twos::updateGridDisplay(Tile grid[][4]) {
}
switch (grid[row][col].value) {
case 0:
+ lv_table_set_cell_type(gridDisplay, row, col, 1);
+ break;
case 2:
case 4:
- lv_table_set_cell_type(gridDisplay, row, col, 1);
+ lv_table_set_cell_type(gridDisplay, row, col, 2);
break;
case 8:
case 16:
- lv_table_set_cell_type(gridDisplay, row, col, 2);
+ lv_table_set_cell_type(gridDisplay, row, col, 3);
break;
case 32:
case 64:
- lv_table_set_cell_type(gridDisplay, row, col, 3);
+ lv_table_set_cell_type(gridDisplay, row, col, 4);
break;
default:
- lv_table_set_cell_type(gridDisplay, row, col, 4);
+ lv_table_set_cell_type(gridDisplay, row, col, 5);
break;
}
}
diff --git a/src/displayapp/screens/Twos.h b/src/displayapp/screens/Twos.h
index ad80ca15..ec021971 100644
--- a/src/displayapp/screens/Twos.h
+++ b/src/displayapp/screens/Twos.h
@@ -19,6 +19,13 @@ namespace Pinetime {
bool OnTouchEvent(TouchEvents event) override;
private:
+
+ lv_style_t style_cell1;
+ lv_style_t style_cell2;
+ lv_style_t style_cell3;
+ lv_style_t style_cell4;
+ lv_style_t style_cell5;
+
bool running = true;
lv_obj_t *scoreText;
lv_obj_t *gridDisplay;
diff --git a/src/drivers/Hrs3300.cpp b/src/drivers/Hrs3300.cpp
index 2aded7d3..dc9f9cd8 100644
--- a/src/drivers/Hrs3300.cpp
+++ b/src/drivers/Hrs3300.cpp
@@ -70,13 +70,14 @@ uint16_t Hrs3300::ReadAls() {
}
void Hrs3300::SetGain(uint8_t gain) {
- static constexpr uint8_t maxGain = 64;
+ constexpr uint8_t maxGain = 64U;
gain = std::min(gain, maxGain);
uint8_t hgain = 0;
- while((1 << hgain) < gain)
- hgain++;
+ while((1 << hgain) < gain){
+ ++hgain;
+ }
- WriteRegister(static_cast<uint8_t>(Registers::Hgain), hgain << 2);
+ WriteRegister(static_cast<uint8_t>(Registers::Hgain), hgain << 2);
}
void Hrs3300::SetDrive(uint8_t drive) {
diff --git a/src/libs/lv_conf.h b/src/libs/lv_conf.h
index 309d65be..7a800b31 100644
--- a/src/libs/lv_conf.h
+++ b/src/libs/lv_conf.h
@@ -1,10 +1,8 @@
/**
* @file lv_conf.h
- *
+ * Configuration file for v7.7.0-dev
*/
-#if 1 /*Set it to "1" to enable content*/
-
#ifndef LV_CONF_H
#define LV_CONF_H
/* clang-format off */
@@ -21,7 +19,7 @@
/* Color depth:
* - 1: 1 byte per pixel
- * - 8: RGB233
+ * - 8: RGB332
* - 16: RGB565
* - 32: ARGB8888
*/
@@ -37,10 +35,7 @@
#define LV_COLOR_SCREEN_TRANSP 0
/*Images pixels with this color will not be drawn (with chroma keying)*/
-#define LV_COLOR_TRANSP LV_COLOR_MAKE(0x6c, 0xFc, 0x6a)/*LV_COLOR_LIME*/ /*LV_COLOR_LIME: pure green*/
-
-/* Enable chroma keying for indexed images. */
-#define LV_INDEXED_CHROMA 1
+#define LV_COLOR_TRANSP LV_COLOR_MAKE(0x6c, 0xFc, 0x6a) /*LV_COLOR_LIME: pure green*/
/* Enable anti-aliasing (lines, and radiuses will be smoothed) */
#define LV_ANTIALIAS 1
@@ -54,6 +49,17 @@
* (Not so important, you can adjust it to modify default sizes and spaces)*/
#define LV_DPI 100 /*[px]*/
+/* The the real width of the display changes some default values:
+ * default object sizes, layout of examples, etc.
+ * According to the width of the display (hor. res. / dpi)
+ * the displays fall in 4 categories.
+ * The 4th is extra large which has no upper limit so not listed here
+ * The upper limit of the categories are set below in 0.1 inch unit.
+ */
+#define LV_DISP_SMALL_LIMIT 30
+#define LV_DISP_MEDIUM_LIMIT 50
+#define LV_DISP_LARGE_LIMIT 70
+
/* Type of coordinates. Should be `int16_t` (or `int32_t` for extreme cases) */
typedef int16_t lv_coord_t;
@@ -68,30 +74,34 @@ typedef int16_t lv_coord_t;
#define LV_MEM_CUSTOM 0
#if LV_MEM_CUSTOM == 0
/* Size of the memory used by `lv_mem_alloc` in bytes (>= 2kB)*/
-# define LV_MEM_SIZE (4U * 1024U)
+#define LV_MEM_SIZE (12U * 1024U)
/* Complier prefix for a big array declaration */
-# define LV_MEM_ATTR
+#define LV_MEM_ATTR
/* Set an address for the memory pool instead of allocating it as an array.
* Can be in external SRAM too. */
-# define LV_MEM_ADR 0
+#define LV_MEM_ADR 0
/* Automatically defrag. on free. Defrag. means joining the adjacent free cells. */
-# define LV_MEM_AUTO_DEFRAG 1
+#define LV_MEM_AUTO_DEFRAG 1
#else /*LV_MEM_CUSTOM*/
-# define LV_MEM_CUSTOM_INCLUDE <stdlib.h> /*Header for the dynamic memory function*/
-# define LV_MEM_CUSTOM_ALLOC malloc /*Wrapper to malloc*/
-# define LV_MEM_CUSTOM_FREE free /*Wrapper to free*/
+#define LV_MEM_CUSTOM_INCLUDE <stdlib.h> /*Header for the dynamic memory function*/
+#define LV_MEM_CUSTOM_ALLOC malloc /*Wrapper to malloc*/
+#define LV_MEM_CUSTOM_FREE free /*Wrapper to free*/
#endif /*LV_MEM_CUSTOM*/
+/* Use the standard memcpy and memset instead of LVGL's own functions.
+ * The standard functions might or might not be faster depending on their implementation. */
+#define LV_MEMCPY_MEMSET_STD 1
+
/* Garbage Collector settings
* Used if lvgl is binded to higher level language and the memory is managed by that language */
#define LV_ENABLE_GC 0
#if LV_ENABLE_GC != 0
-# define LV_GC_INCLUDE "gc.h" /*Include Garbage Collector related things*/
-# define LV_MEM_CUSTOM_REALLOC your_realloc /*Wrapper to realloc*/
-# define LV_MEM_CUSTOM_GET_SIZE your_mem_get_size /*Wrapper to lv_mem_get_size*/
+#define LV_GC_INCLUDE "gc.h" /*Include Garbage Collector related things*/
+#define LV_MEM_CUSTOM_REALLOC your_realloc /*Wrapper to realloc*/
+#define LV_MEM_CUSTOM_GET_SIZE your_mem_get_size /*Wrapper to lv_mem_get_size*/
#endif /* LV_ENABLE_GC */
/*=======================
@@ -118,32 +128,82 @@ typedef int16_t lv_coord_t;
* Time between `LV_EVENT_LONG_PRESSED_REPEAT */
#define LV_INDEV_DEF_LONG_PRESS_REP_TIME 100
+
+/* Gesture threshold in pixels */
+#define LV_INDEV_DEF_GESTURE_LIMIT 50
+
+/* Gesture min velocity at release before swipe (pixels)*/
+#define LV_INDEV_DEF_GESTURE_MIN_VELOCITY 3
+
/*==================
* Feature usage
*==================*/
/*1: Enable the Animations */
-#define LV_USE_ANIMATION 1
+#define LV_USE_ANIMATION 0
#if LV_USE_ANIMATION
/*Declare the type of the user data of animations (can be e.g. `void *`, `int`, `struct`)*/
-typedef void * lv_anim_user_data_t;
+typedef void* lv_anim_user_data_t;
#endif
-/* 1: Enable shadow drawing*/
+/* 1: Enable shadow drawing on rectangles*/
#define LV_USE_SHADOW 0
+#if LV_USE_SHADOW
+/* Allow buffering some shadow calculation
+ * LV_SHADOW_CACHE_SIZE is the max. shadow size to buffer,
+ * where shadow size is `shadow_width + radius`
+ * Caching has LV_SHADOW_CACHE_SIZE^2 RAM cost*/
+#define LV_SHADOW_CACHE_SIZE 0
+#endif
+
+/*1: enable outline drawing on rectangles*/
+#define LV_USE_OUTLINE 0
+
+/*1: enable pattern drawing on rectangles*/
+#define LV_USE_PATTERN 0
+
+/*1: enable value string drawing on rectangles*/
+#define LV_USE_VALUE_STR 1
+
+/* 1: Use other blend modes than normal (`LV_BLEND_MODE_...`)*/
+#define LV_USE_BLEND_MODES 0
+
+/* 1: Use the `opa_scale` style property to set the opacity of an object and its children at once*/
+#define LV_USE_OPA_SCALE 0
+
+/* 1: Use image zoom and rotation*/
+#define LV_USE_IMG_TRANSFORM 0
/* 1: Enable object groups (for keyboard/encoder navigation) */
-#define LV_USE_GROUP 0
+#define LV_USE_GROUP 1
#if LV_USE_GROUP
-typedef void * lv_group_user_data_t;
+typedef void* lv_group_user_data_t;
#endif /*LV_USE_GROUP*/
/* 1: Enable GPU interface*/
-#define LV_USE_GPU 0
+#define LV_USE_GPU 0 /*Only enables `gpu_fill_cb` and `gpu_blend_cb` in the disp. drv- */
+#define LV_USE_GPU_STM32_DMA2D 0
+/*If enabling LV_USE_GPU_STM32_DMA2D, LV_GPU_DMA2D_CMSIS_INCLUDE must be defined to include path of CMSIS header of target processor
+e.g. "stm32f769xx.h" or "stm32f429xx.h" */
+#define LV_GPU_DMA2D_CMSIS_INCLUDE
+
+/*1: Use PXP for CPU off-load on NXP RTxxx platforms */
+#define LV_USE_GPU_NXP_PXP 0
+
+/*1: Add default bare metal and FreeRTOS interrupt handling routines for PXP (lv_gpu_nxp_pxp_osa.c)
+ * and call lv_gpu_nxp_pxp_init() automatically during lv_init(). Note that symbol FSL_RTOS_FREE_RTOS
+ * has to be defined in order to use FreeRTOS OSA, otherwise bare-metal implementation is selected.
+ *0: lv_gpu_nxp_pxp_init() has to be called manually before lv_init()
+ * */
+#define LV_USE_GPU_NXP_PXP_AUTO_INIT 0
+
+/*1: Use VG-Lite for CPU offload on NXP RTxxx platforms */
+#define LV_USE_GPU_NXP_VG_LITE 0
/* 1: Enable file system (might be required for images */
+// TODO: Enable FS
#define LV_USE_FILESYSTEM 0
#if LV_USE_FILESYSTEM
/*Declare the type of the user data of file system drivers (can be e.g. `void *`, `int`, `struct`)*/
@@ -153,6 +213,13 @@ typedef void * lv_fs_drv_user_data_t;
/*1: Add a `user_data` to drivers and objects*/
#define LV_USE_USER_DATA 1
+/*1: Show CPU usage and FPS count in the right bottom corner*/
+#define LV_USE_PERF_MONITOR 0
+
+/*1: Use the functions and types from the older API if possible */
+#define LV_USE_API_EXTENSION_V6 0
+#define LV_USE_API_EXTENSION_V7 1
+
/*========================
* Image decoder and cache
*========================*/
@@ -161,7 +228,7 @@ typedef void * lv_fs_drv_user_data_t;
#define LV_IMG_CF_INDEXED 1
/* 1: Enable alpha indexed images */
-#define LV_IMG_CF_ALPHA 1
+#define LV_IMG_CF_ALPHA 0
/* Default image cache size. Image caching keeps the images opened.
* If only the built-in image formats are used there is no real advantage of caching.
@@ -172,26 +239,42 @@ typedef void * lv_fs_drv_user_data_t;
#define LV_IMG_CACHE_DEF_SIZE 1
/*Declare the type of the user data of image decoder (can be e.g. `void *`, `int`, `struct`)*/
-typedef void * lv_img_decoder_user_data_t;
+typedef void* lv_img_decoder_user_data_t;
/*=====================
* Compiler settings
*====================*/
+
+/* For big endian systems set to 1 */
+#define LV_BIG_ENDIAN_SYSTEM 0
+
/* Define a custom attribute to `lv_tick_inc` function */
#define LV_ATTRIBUTE_TICK_INC
/* Define a custom attribute to `lv_task_handler` function */
#define LV_ATTRIBUTE_TASK_HANDLER
+/* Define a custom attribute to `lv_disp_flush_ready` function */
+#define LV_ATTRIBUTE_FLUSH_READY
+
+/* Required alignment size for buffers */
+#define LV_ATTRIBUTE_MEM_ALIGN_SIZE
+
/* With size optimization (-Os) the compiler might not align data to
- * 4 or 8 byte boundary. This alignment will be explicitly applied where needed.
- * E.g. __attribute__((aligned(4))) */
+ * 4 or 8 byte boundary. Some HW may need even 32 or 64 bytes.
+ * This alignment will be explicitly applied where needed.
+ * LV_ATTRIBUTE_MEM_ALIGN_SIZE should be used to specify required align size.
+ * E.g. __attribute__((aligned(LV_ATTRIBUTE_MEM_ALIGN_SIZE))) */
#define LV_ATTRIBUTE_MEM_ALIGN
/* Attribute to mark large constant arrays for example
* font's bitmaps */
#define LV_ATTRIBUTE_LARGE_CONST
+/* Prefix performance critical functions to place them into a faster memory (e.g RAM)
+ * Uses 15-20 kB extra memory */
+//#define LV_ATTRIBUTE_FAST_MEM
+
/* Export integer constant to binding.
* This macro is used with constants in the form of LV_<CONST> that
* should also appear on lvgl binding API such as Micropython
@@ -200,6 +283,10 @@ typedef void * lv_img_decoder_user_data_t;
*/
#define LV_EXPORT_CONST_INT(int_value) struct _silence_gcc_warning
+/* Prefix variables that are used in GPU accelerated operations, often these need to be
+ * placed in RAM sections that are DMA accessible */
+// #define LV_ATTRIBUTE_DMA
+
/*===================
* HAL settings
*==================*/
@@ -208,12 +295,12 @@ typedef void * lv_img_decoder_user_data_t;
* It removes the need to manually update the tick with `lv_tick_inc`) */
#define LV_TICK_CUSTOM 0
#if LV_TICK_CUSTOM == 1
-#define LV_TICK_CUSTOM_INCLUDE "something.h" /*Header for the sys time function*/
-#define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current systime in ms*/
+#define LV_TICK_CUSTOM_INCLUDE "Arduino.h" /*Header for the system time function*/
+#define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current system time in ms*/
#endif /*LV_TICK_CUSTOM*/
-typedef void * lv_disp_drv_user_data_t; /*Type of user data in the display driver*/
-typedef void * lv_indev_drv_user_data_t; /*Type of user data in the input device driver*/
+typedef void* lv_disp_drv_user_data_t; /*Type of user data in the display driver*/
+typedef void* lv_indev_drv_user_data_t; /*Type of user data in the input device driver*/
/*================
* Log settings
@@ -229,11 +316,11 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in the i
* LV_LOG_LEVEL_ERROR Only critical issue, when the system may fail
* LV_LOG_LEVEL_NONE Do not log anything
*/
-# define LV_LOG_LEVEL LV_LOG_LEVEL_WARN
+#define LV_LOG_LEVEL LV_LOG_LEVEL_WARN
/* 1: Print the log with 'printf';
* 0: user need to register a callback with `lv_log_register_print_cb`*/
-# define LV_LOG_PRINTF 0
+#define LV_LOG_PRINTF 0
#endif /*LV_USE_LOG*/
/*=================
@@ -258,6 +345,9 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in the i
/*Checks is the memory is successfully allocated or no. (Quite fast)*/
#define LV_USE_ASSERT_MEM 1
+/*Check the integrity of `lv_mem` after critical operations. (Slow)*/
+#define LV_USE_ASSERT_MEM_INTEGRITY 0
+
/* Check the strings.
* Search for NULL, very long strings, invalid characters, and unnatural repetitions. (Slow)
* If disabled `LV_USE_ASSERT_NULL` will be performed instead (if it's enabled) */
@@ -268,44 +358,49 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in the i
#define LV_USE_ASSERT_OBJ 0
/*Check if the styles are properly initialized. (Fast)*/
-#define LV_USE_ASSERT_STYLE 1
+#define LV_USE_ASSERT_STYLE 0
#endif /*LV_USE_DEBUG*/
-/*================
- * THEME USAGE
- *================*/
-#define LV_THEME_LIVE_UPDATE 0 /*1: Allow theme switching at run time. Uses 8..10 kB of RAM*/
-
-#define LV_USE_THEME_TEMPL 0 /*Just for test*/
-#define LV_USE_THEME_DEFAULT 1 /*Built mainly from the built-in styles. Consumes very few RAM*/
-#define LV_USE_THEME_ALIEN 0 /*Dark futuristic theme*/
-#define LV_USE_THEME_NIGHT 1 /*Dark elegant theme*/
-#define LV_USE_THEME_MONO 0 /*Mono color theme for monochrome displays*/
-#define LV_USE_THEME_MATERIAL 0 /*Flat theme with bold colors and light shadows*/
-#define LV_USE_THEME_ZEN 0 /*Peaceful, mainly light theme */
-#define LV_USE_THEME_NEMO 0 /*Water-like theme based on the movie "Finding Nemo"*/
-
/*==================
* FONT USAGE
*===================*/
/* The built-in fonts contains the ASCII range and some Symbols with 4 bit-per-pixel.
* The symbols are available via `LV_SYMBOL_...` defines
- * More info about fonts: https://docs.littlevgl.com/#Fonts
- * To create a new font go to: https://littlevgl.com/ttf-font-to-c-array
+ * More info about fonts: https://docs.lvgl.io/v7/en/html/overview/font.html
+ * To create a new font go to: https://lvgl.com/ttf-font-to-c-array
*/
-/* Robot fonts with bpp = 4
- * https://fonts.google.com/specimen/Roboto */
-#define LV_FONT_ROBOTO_12 0
-#define LV_FONT_ROBOTO_16 0
-#define LV_FONT_ROBOTO_22 0
-#define LV_FONT_ROBOTO_28 0
+/* Montserrat fonts with bpp = 4
+ * https://fonts.google.com/specimen/Montserrat */
+#define LV_FONT_MONTSERRAT_8 0
+#define LV_FONT_MONTSERRAT_10 0
+#define LV_FONT_MONTSERRAT_12 0
+#define LV_FONT_MONTSERRAT_14 0
+#define LV_FONT_MONTSERRAT_16 0
+#define LV_FONT_MONTSERRAT_18 0
+#define LV_FONT_MONTSERRAT_20 0
+#define LV_FONT_MONTSERRAT_22 0
+#define LV_FONT_MONTSERRAT_24 0
+#define LV_FONT_MONTSERRAT_26 0
+#define LV_FONT_MONTSERRAT_28 0
+#define LV_FONT_MONTSERRAT_30 0
+#define LV_FONT_MONTSERRAT_32 0
+#define LV_FONT_MONTSERRAT_34 0
+#define LV_FONT_MONTSERRAT_36 0
+#define LV_FONT_MONTSERRAT_38 0
+#define LV_FONT_MONTSERRAT_40 0
+#define LV_FONT_MONTSERRAT_42 0
+#define LV_FONT_MONTSERRAT_44 0
+#define LV_FONT_MONTSERRAT_46 0
+#define LV_FONT_MONTSERRAT_48 0
/* Demonstrate special features */
-#define LV_FONT_ROBOTO_12_SUBPX 1
-#define LV_FONT_ROBOTO_28_COMPRESSED 1 /*bpp = 3*/
+#define LV_FONT_MONTSERRAT_12_SUBPX 0
+#define LV_FONT_MONTSERRAT_28_COMPRESSED 0 /*bpp = 3*/
+#define LV_FONT_DEJAVU_16_PERSIAN_HEBREW 0 /*Hebrew, Arabic, PErisan letters and all their forms*/
+#define LV_FONT_SIMSUN_16_CJK 0 /*1000 most common CJK radicals*/
/*Pixel perfect monospace font
* http://pelulamu.net/unscii/ */
@@ -314,27 +409,75 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in the i
/* Optionally declare your custom fonts here.
* You can use these fonts as default font too
* and they will be available globally. E.g.
- * #define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(my_font_1) \LV_SUBPX_BGR
+ * #define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(my_font_1) \
* LV_FONT_DECLARE(my_font_2)
*/
-#define LV_FONT_CUSTOM_DECLARE
-/*Always set a default font from the built-in fonts*/
-#define LV_FONT_DEFAULT NULL; // The default font is specified in the custom theme.
+#define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(jetbrains_mono_bold_20) \
+ LV_FONT_DECLARE(jetbrains_mono_extrabold_compressed)
/* Enable it if you have fonts with a lot of characters.
* The limit depends on the font size, font face and bpp
* but with > 10,000 characters if you see issues probably you need to enable it.*/
#define LV_FONT_FMT_TXT_LARGE 0
+/* Enables/disables support for compressed fonts. If it's disabled, compressed
+ * glyphs cannot be processed by the library and won't be rendered.
+ */
+#define LV_USE_FONT_COMPRESSED 0
+
+/* Enable subpixel rendering */
+#define LV_USE_FONT_SUBPX 0
+#if LV_USE_FONT_SUBPX
/* Set the pixel order of the display.
* Important only if "subpx fonts" are used.
* With "normal" font it doesn't matter.
*/
#define LV_FONT_SUBPX_BGR 0
+#endif
/*Declare the type of the user data of fonts (can be e.g. `void *`, `int`, `struct`)*/
-typedef void * lv_font_user_data_t;
+typedef void* lv_font_user_data_t;
+
+/*================
+ * THEME USAGE
+ *================*/
+
+/*Always enable at least on theme*/
+
+/* No theme, you can apply your styles as you need
+ * No flags. Set LV_THEME_DEFAULT_FLAG 0 */
+#define LV_USE_THEME_EMPTY 1
+
+/*Simple to the create your theme based on it
+ * No flags. Set LV_THEME_DEFAULT_FLAG 0 */
+#define LV_USE_THEME_TEMPLATE 0
+
+/* A fast and impressive theme.
+ * Flags:
+ * LV_THEME_MATERIAL_FLAG_LIGHT: light theme
+ * LV_THEME_MATERIAL_FLAG_DARK: dark theme
+ * LV_THEME_MATERIAL_FLAG_NO_TRANSITION: disable transitions (state change animations)
+ * LV_THEME_MATERIAL_FLAG_NO_FOCUS: disable indication of focused state)
+ * */
+#define LV_USE_THEME_MATERIAL 0
+
+/* Mono-color theme for monochrome displays.
+ * If LV_THEME_DEFAULT_COLOR_PRIMARY is LV_COLOR_BLACK the
+ * texts and borders will be black and the background will be
+ * white. Else the colors are inverted.
+ * No flags. Set LV_THEME_DEFAULT_FLAG 0 */
+#define LV_USE_THEME_MONO 0
+
+#define LV_THEME_DEFAULT_INCLUDE <stdint.h> /*Include a header for the init. function*/
+#define LV_THEME_DEFAULT_INIT lv_theme_empty_init//lv_theme_material_init
+#define LV_THEME_DEFAULT_COLOR_PRIMARY lv_color_hex(0xffffff)
+#define LV_THEME_DEFAULT_COLOR_SECONDARY lv_color_hex(0xaaaaaa)
+#define LV_THEME_DEFAULT_FLAG 0//LV_THEME_MATERIAL_FLAG_DARK
+#define LV_THEME_DEFAULT_FONT_SMALL &jetbrains_mono_bold_20
+#define LV_THEME_DEFAULT_FONT_NORMAL &jetbrains_mono_bold_20
+#define LV_THEME_DEFAULT_FONT_SUBTITLE &jetbrains_mono_bold_20
+#define LV_THEME_DEFAULT_FONT_TITLE &jetbrains_mono_bold_20
/*=================
* Text settings
@@ -347,7 +490,7 @@ typedef void * lv_font_user_data_t;
* */
#define LV_TXT_ENC LV_TXT_ENC_UTF8
- /*Can break (wrap) texts on these chars*/
+/*Can break (wrap) texts on these chars*/
#define LV_TXT_BREAK_CHARS " ,.;:-_"
/* If a word is at least this long, will break wherever "prettiest"
@@ -378,22 +521,38 @@ typedef void * lv_font_user_data_t;
#define LV_BIDI_BASE_DIR_DEF LV_BIDI_DIR_AUTO
#endif
+/* Enable Arabic/Persian processing
+ * In these languages characters should be replaced with
+ * an other form based on their position in the text */
+#define LV_USE_ARABIC_PERSIAN_CHARS 0
+
/*Change the built in (v)snprintf functions*/
#define LV_SPRINTF_CUSTOM 0
#if LV_SPRINTF_CUSTOM
-# define LV_SPRINTF_INCLUDE <stdio.h>
-# define lv_snprintf snprintf
-# define lv_vsnprintf vsnprintf
+#define LV_SPRINTF_INCLUDE <stdio.h>
+#define lv_snprintf snprintf
+#define lv_vsnprintf vsnprintf
+#else /*!LV_SPRINTF_CUSTOM*/
+#define LV_SPRINTF_DISABLE_FLOAT 1
#endif /*LV_SPRINTF_CUSTOM*/
/*===================
* LV_OBJ SETTINGS
*==================*/
+#if LV_USE_USER_DATA
/*Declare the type of the user data of object (can be e.g. `void *`, `int`, `struct`)*/
-typedef void * lv_obj_user_data_t;
+typedef void* lv_obj_user_data_t;
+/*Provide a function to free user data*/
+#define LV_USE_USER_DATA_FREE 0
+#if LV_USE_USER_DATA_FREE
+#define LV_USER_DATA_FREE_INCLUDE "something.h" /*Header for user data free function*/
+/* Function prototype : void user_data_free(lv_obj_t * obj); */
+#define LV_USER_DATA_FREE (user_data_free) /*Invoking for user data free function*/
+#endif
+#endif
-/*1: enable `lv_obj_realaign()` based on `lv_obj_align()` parameters*/
+/*1: enable `lv_obj_realign()` based on `lv_obj_align()` parameters*/
#define LV_USE_OBJ_REALIGN 1
/* Enable to make the object clickable on a larger area.
@@ -401,13 +560,13 @@ typedef void * lv_obj_user_data_t;
* LV_EXT_CLICK_AREA_TINY: The extra area can be adjusted horizontally and vertically (0..255 px)
* LV_EXT_CLICK_AREA_FULL: The extra area can be adjusted in all 4 directions (-32k..+32k px)
*/
-#define LV_USE_EXT_CLICK_AREA LV_EXT_CLICK_AREA_OFF
+#define LV_USE_EXT_CLICK_AREA LV_EXT_CLICK_AREA_TINY
/*==================
* LV OBJ X USAGE
*================*/
/*
- * Documentation of the object types: https://docs.littlevgl.com/#Object-types
+ * Documentation of the object types: https://docs.lvgl.com/#Object-types
*/
/*Arc (dependencies: -)*/
@@ -418,43 +577,42 @@ typedef void * lv_obj_user_data_t;
/*Button (dependencies: lv_cont*/
#define LV_USE_BTN 1
-#if LV_USE_BTN != 0
-/*Enable button-state animations - draw a circle on click (dependencies: LV_USE_ANIMATION)*/
-# define LV_BTN_INK_EFFECT 0
-#endif
/*Button matrix (dependencies: -)*/
-#define LV_USE_BTNM 1
+#define LV_USE_BTNMATRIX 1
/*Calendar (dependencies: -)*/
#define LV_USE_CALENDAR 1
+#if LV_USE_CALENDAR
+#define LV_CALENDAR_WEEK_STARTS_MONDAY 0
+#endif
/*Canvas (dependencies: lv_img)*/
#define LV_USE_CANVAS 1
/*Check box (dependencies: lv_btn, lv_label)*/
-#define LV_USE_CB 1
+#define LV_USE_CHECKBOX 1
/*Chart (dependencies: -)*/
#define LV_USE_CHART 1
#if LV_USE_CHART
-# define LV_CHART_AXIS_TICK_LABEL_MAX_LEN 20
+#define LV_CHART_AXIS_TICK_LABEL_MAX_LEN 256
#endif
/*Container (dependencies: -*/
#define LV_USE_CONT 1
/*Color picker (dependencies: -*/
-#define LV_USE_CPICKER 1
+#define LV_USE_CPICKER 0
/*Drop down list (dependencies: lv_page, lv_label, lv_symbol_def.h)*/
-#define LV_USE_DDLIST 1
-#if LV_USE_DDLIST != 0
+#define LV_USE_DROPDOWN 1
+#if LV_USE_DROPDOWN != 0
/*Open and close default animation time [ms] (0: no animation)*/
-# define LV_DDLIST_DEF_ANIM_TIME 200
+#define LV_DROPDOWN_DEF_ANIM_TIME 200
#endif
-/*Gauge (dependencies:lv_bar, lv_lmeter)*/
+/*Gauge (dependencies:lv_bar, lv_linemeter)*/
#define LV_USE_GAUGE 1
/*Image (dependencies: lv_label*/
@@ -464,30 +622,34 @@ typedef void * lv_obj_user_data_t;
#define LV_USE_IMGBTN 1
#if LV_USE_IMGBTN
/*1: The imgbtn requires left, mid and right parts and the width can be set freely*/
-# define LV_IMGBTN_TILED 0
+#define LV_IMGBTN_TILED 0
#endif
/*Keyboard (dependencies: lv_btnm)*/
-#define LV_USE_KB 1
+#define LV_USE_KEYBOARD 0
/*Label (dependencies: -*/
#define LV_USE_LABEL 1
#if LV_USE_LABEL != 0
/*Hor, or ver. scroll speed [px/sec] in 'LV_LABEL_LONG_ROLL/ROLL_CIRC' mode*/
-# define LV_LABEL_DEF_SCROLL_SPEED 25
+#define LV_LABEL_DEF_SCROLL_SPEED 25
/* Waiting period at beginning/end of animation cycle */
-# define LV_LABEL_WAIT_CHAR_COUNT 3
+#define LV_LABEL_WAIT_CHAR_COUNT 3
/*Enable selecting text of the label */
-# define LV_LABEL_TEXT_SEL 0
+#define LV_LABEL_TEXT_SEL 0
/*Store extra some info in labels (12 bytes) to speed up drawing of very long texts*/
-# define LV_LABEL_LONG_TXT_HINT 0
+#define LV_LABEL_LONG_TXT_HINT 0
#endif
/*LED (dependencies: -)*/
-#define LV_USE_LED 1
+#define LV_USE_LED 0
+#if LV_USE_LED
+#define LV_LED_BRIGHT_MIN 120 /*Minimal brightness*/
+#define LV_LED_BRIGHT_MAX 255 /*Maximal brightness*/
+#endif
/*Line (dependencies: -*/
#define LV_USE_LINE 1
@@ -496,38 +658,50 @@ typedef void * lv_obj_user_data_t;
#define LV_USE_LIST 1
#if LV_USE_LIST != 0
/*Default animation time of focusing to a list element [ms] (0: no animation) */
-# define LV_LIST_DEF_ANIM_TIME 100
+#define LV_LIST_DEF_ANIM_TIME 100
#endif
/*Line meter (dependencies: *;)*/
-#define LV_USE_LMETER 1
+#define LV_USE_LINEMETER 1
+#if LV_USE_LINEMETER
+/* Draw line more precisely at cost of performance.
+ * Useful if there are lot of lines any minor are visible
+ * 0: No extra precision
+ * 1: Some extra precision
+ * 2: Best precision
+ */
+#define LV_LINEMETER_PRECISE 0
+#endif
+
+/*Mask (dependencies: -)*/
+#define LV_USE_OBJMASK 1
/*Message box (dependencies: lv_rect, lv_btnm, lv_label)*/
-#define LV_USE_MBOX 1
+#define LV_USE_MSGBOX 1
/*Page (dependencies: lv_cont)*/
#define LV_USE_PAGE 1
#if LV_USE_PAGE != 0
/*Focus default animation time [ms] (0: no animation)*/
-# define LV_PAGE_DEF_ANIM_TIME 400
+#define LV_PAGE_DEF_ANIM_TIME 400
#endif
/*Preload (dependencies: lv_arc, lv_anim)*/
-#define LV_USE_PRELOAD 0
-#if LV_USE_PRELOAD != 0
-# define LV_PRELOAD_DEF_ARC_LENGTH 60 /*[deg]*/
-# define LV_PRELOAD_DEF_SPIN_TIME 1000 /*[ms]*/
-# define LV_PRELOAD_DEF_ANIM LV_PRELOAD_TYPE_SPINNING_ARC
+#define LV_USE_SPINNER 0
+#if LV_USE_SPINNER != 0
+#define LV_SPINNER_DEF_ARC_LENGTH 60 /*[deg]*/
+#define LV_SPINNER_DEF_SPIN_TIME 1000 /*[ms]*/
+#define LV_SPINNER_DEF_ANIM LV_SPINNER_TYPE_SPINNING_ARC
#endif
/*Roller (dependencies: lv_ddlist)*/
#define LV_USE_ROLLER 1
#if LV_USE_ROLLER != 0
/*Focus animation time [ms] (0: no animation)*/
-# define LV_ROLLER_DEF_ANIM_TIME 200
+#define LV_ROLLER_DEF_ANIM_TIME 200
/*Number of extra "pages" when the roller is infinite*/
-# define LV_ROLLER_INF_PAGES 7
+#define LV_ROLLER_INF_PAGES 7
#endif
/*Slider (dependencies: lv_bar)*/
@@ -537,33 +711,35 @@ typedef void * lv_obj_user_data_t;
#define LV_USE_SPINBOX 1
/*Switch (dependencies: lv_slider)*/
-#define LV_USE_SW 1
+#define LV_USE_SWITCH 1
/*Text area (dependencies: lv_label, lv_page)*/
-#define LV_USE_TA 1
-#if LV_USE_TA != 0
-# define LV_TA_DEF_CURSOR_BLINK_TIME 400 /*ms*/
-# define LV_TA_DEF_PWD_SHOW_TIME 1500 /*ms*/
+#define LV_USE_TEXTAREA 1
+#if LV_USE_TEXTAREA != 0
+#define LV_TEXTAREA_DEF_CURSOR_BLINK_TIME 400 /*ms*/
+#define LV_TEXTAREA_DEF_PWD_SHOW_TIME 1500 /*ms*/
#endif
/*Table (dependencies: lv_label)*/
#define LV_USE_TABLE 1
#if LV_USE_TABLE
-# define LV_TABLE_COL_MAX 12
+#define LV_TABLE_COL_MAX 12
+#define LV_TABLE_CELL_STYLE_CNT 5
#endif
+
/*Tab (dependencies: lv_page, lv_btnm)*/
#define LV_USE_TABVIEW 1
# if LV_USE_TABVIEW != 0
/*Time of slide animation [ms] (0: no animation)*/
-# define LV_TABVIEW_DEF_ANIM_TIME 300
+#define LV_TABVIEW_DEF_ANIM_TIME 300
#endif
/*Tileview (dependencies: lv_page) */
#define LV_USE_TILEVIEW 1
#if LV_USE_TILEVIEW
/*Time of slide animation [ms] (0: no animation)*/
-# define LV_TILEVIEW_DEF_ANIM_TIME 300
+#define LV_TILEVIEW_DEF_ANIM_TIME 300
#endif
/*Window (dependencies: lv_cont, lv_btn, lv_label, lv_img, lv_page)*/
@@ -574,14 +750,9 @@ typedef void * lv_obj_user_data_t;
*==================*/
#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) /* Disable warnings for Visual Studio*/
-# define _CRT_SECURE_NO_WARNINGS
+#define _CRT_SECURE_NO_WARNINGS
#endif
/*--END OF LV_CONF_H--*/
-/*Be sure every define has a default value*/
-#include "lvgl/src/lv_conf_checker.h"
-
-#endif /*LV_CONF_H*/
-
-#endif /*End of "Content enable"*/
+#endif /*LV_CONF_H*/ \ No newline at end of file
diff --git a/src/libs/lvgl/LICENCE.txt b/src/libs/lvgl/LICENCE.txt
deleted file mode 100644
index beaef1d2..00000000
--- a/src/libs/lvgl/LICENCE.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-MIT licence
-Copyright (c) 2016 Gábor Kiss-Vámosi
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/src/libs/lvgl/README.md b/src/libs/lvgl/README.md
deleted file mode 100644
index 9d170887..00000000
--- a/src/libs/lvgl/README.md
+++ /dev/null
@@ -1,398 +0,0 @@
-<h1 align="center"> LittlevGL - Open-source Embedded GUI Library</h1>
-<p align="center">
-<a href="https://github.com/littlevgl/lvgl/blob/master/LICENCE.txt"><img src="https://img.shields.io/badge/licence-MIT-blue.svg"></a>
-<a href="https://github.com/littlevgl/lvgl/releases/tag/v6.0"><img src="https://img.shields.io/badge/version-6.0-blue.svg"></a>
-</p>
-
-<p align="center">
-<img src="https://littlevgl.com/github/cover_ori_reduced_2.gif">
-</p>
-
-<p align="center">
-LittlevGL provides everything you need to create a Graphical User Interface (GUI) on embedded systems with easy-to-use graphical elements, beautiful visual effects and low memory footprint.
-</p>
-
-<h4 align="center">
-<a href="https://littlevgl.com">Website </a> &middot;
-<a href="https://littlevgl.com/live-demo">Live demo</a> &middot;
-<a href="https://docs.littlevgl.com/en/html/get-started/pc-simulator.html">Simulator</a> &middot;
-<a href="https://forum.littlevgl.com">Forum</a> &middot;
-<a href="https://docs.littlevgl.com/">Docs</a> &middot;
-<a href="https://blog.littlevgl.com/">Blog</a>
-</h4>
-
----
-
-- [Features](#features)
-- [Supported devices](#supported-devices)
-- [Quick start in a simulator](#quick-start-in-a-simulator)
-- [Add LittlevGL to your project](#add-littlevgl-to-your-project)
-- [Learn the basics](#learn-the-basics)
-- [Examples](#examples)
-- [Contributing](#contributing)
-- [Donate](#donate)
-
-
-## Features
-* **Powerful building blocks** buttons, charts, lists, sliders, images, etc.
-* **Advanced graphics** with animations, anti-aliasing, opacity, smooth scrolling
-* **Simultaneously use various input devices** touchscreen, mouse, keyboard, encoder, buttons, etc.
-* **Simultaneously use multiple displays** i.e. monochrome and color display
-* **Multi-language support** with UTF-8 encoding
-* **Fully customizable** graphical elements
-* **Hardware independent** to use with any microcontroller or display
-* **Scalable** to operate with little memory (64 kB Flash, 10 kB RAM)
-* **OS, External memory and GPU** supported but not required
-* **Single frame buffer** operation even with advances graphical effects
-* **Written in C** for maximal compatibility
-* **Micropython Binding** exposes [LittlevGL API in Micropython](https://blog.littlevgl.com/2019-02-20/micropython-bindings)
-* **Simulator** to develop on PC without embedded hardware
-* **Tutorials, examples, themes** for rapid development
-* **Documentation** and API references
-
-## Supported devices
-Basically, every modern controller - which is able to drive a display - is suitable to run LittlevGL. The minimal requirements:
-- 16, 32 or 64 bit microcontroller or processor
-- &gt; 16 MHz clock speed is recommended
-- Flash/ROM: &gt; 64 kB for the very essential components (&gt; 180 kB is recommended)
-- RAM:
- - Static RAM usage: ~8..16 kB depending on the used features and objects types
- - Stack: &gt; 2kB (&gt; 4 kB is recommended)
- - Dynamic data (heap): &gt; 4 KB (&gt; 16 kB is recommended if using several objects).
- Set by `LV_MEM_SIZE` in *lv_conf.h*.
- - Display buffer: &gt; *"Horizontal resolution"* pixels (&gt; 10 &times; *"Horizontal resolution"* is recommended)
-- C99 or newer compiler
-
-*Note that the memory usage might vary depending on the architecture, compiler and build options.*
-
-Just to mention some **platforms**:
-- STM32F1, STM32F3, [STM32F4](https://blog.littlevgl.com/2017-07-15/stm32f429_disco_port), [STM32F7](https://github.com/littlevgl/stm32f746_disco_no_os_sw4stm32)
-- Microchip dsPIC33, PIC24, PIC32MX, PIC32MZ
-- NXP Kinetis, LPC, iMX
-- [Linux frame buffer](https://blog.littlevgl.com/2018-01-03/linux_fb) (/dev/fb)
-- [Raspberry PI](http://www.vk3erw.com/index.php/16-software/63-raspberry-pi-official-7-touchscreen-and-littlevgl)
-- [Espressif ESP32](https://github.com/littlevgl/esp32_ili9431)
-- Nordic nrf52
-- Quectell M66
-
-## Quick start in a simulator
-The easiest way to get started with LittlevGL is to run it in a simulator on your PC without any embedded hardware.
-
-Choose a project with your favourite IDE:
-
-| Eclipse | CodeBlocks | Visual Studio | PlatformIO | Qt Creator |
-|-------------|-------------|---------------|-----------|------------|
-| [![Eclipse](https://littlevgl.com/logo/ide/eclipse.jpg)](https://github.com/littlevgl/pc_simulator_sdl_eclipse) | [![CodeBlocks](https://littlevgl.com/logo/ide/codeblocks.jpg)](https://github.com/littlevgl/pc_simulator_win_codeblocks) | [![VisualStudio](https://littlevgl.com/logo/ide/visualstudio.jpg)](https://github.com/littlevgl/visual_studio_2017_sdl_x64) | [![PlatformIO](https://littlevgl.com/logo/ide/platformio.jpg)](https://github.com/littlevgl/pc_simulator_sdl_platformio) | [![QtCreator](https://littlevgl.com/logo/ide/qtcreator.jpg)](https://blog.littlevgl.com/2019-01-03/qt-creator) |
-| Cross-platform<br>with SDL<br>(Recommended on<br>Linux and Mac) | Native Windows | Windows<br>with SDL | Cross-platform<br>with SDL | Cross-platform<br>with SDL |
-
-
-## Add LittlevGL to your project
-
-The steps below show how to setup LittlevGL on an embedded system with a display and a touchpad.
-You can use the [Simulators](https://docs.littlevgl.com/en/html/get-started/pc-simulator) to get ready to use projects which can be run on your PC.
-
-1. [Download](https://littlevgl.com/download) or [Clone](https://github.com/littlevgl/lvgl) the library
-2. Copy the `lvgl` folder into your project
-3. Copy `lvgl/lv_conf_template.h` as `lv_conf.h` next to the `lvgl` folder and set at least `LV_HOR_RES_MAX`, `LV_VER_RES_MAX` and `LV_COLOR_DEPTH`.
-4. Include `lvgl/lvgl.h` where you need to use LittlevGL related functions.
-5. Call `lv_tick_inc(x)` every `x` milliseconds **in a Timer or Task** (`x` should be between 1 and 10). It is required for the internal timing of LittlevGL.
-6. Call `lv_init()`
-7. Create a display buffer for LittlevGL
-```c
-static lv_disp_buf_t disp_buf;
-static lv_color_t buf[LV_HOR_RES_MAX * 10]; /*Declare a buffer for 10 lines*/
-lv_disp_buf_init(&disp_buf, buf, NULL, LV_HOR_RES_MAX * 10); /*Initialize the display buffer*/
-```
-8. Implement and register a function which can **copy a pixel array** to an area of your display:
-```c
-lv_disp_drv_t disp_drv; /*Descriptor of a display driver*/
-lv_disp_drv_init(&disp_drv); /*Basic initialization*/
-disp_drv.flush_cb = my_disp_flush; /*Set your driver function*/
-disp_drv.buffer = &disp_buf; /*Assign the buffer to the display*/
-lv_disp_drv_register(&disp_drv); /*Finally register the driver*/
-
-void my_disp_flush(lv_disp_t * disp, const lv_area_t * area, lv_color_t * color_p)
-{
- int32_t x, y;
- for(y = area->y1; y <= area->y2; y++) {
- for(x = area->x1; x <= area->x2; x++) {
- set_pixel(x, y, *color_p); /* Put a pixel to the display.*/
- color_p++;
- }
- }
-
- lv_disp_flush_ready(disp); /* Indicate you are ready with the flushing*/
-}
-
-```
-9. Implement and register a function which can **read an input device**. E.g. for a touch pad:
-```c
-lv_indev_drv_init(&indev_drv); /*Descriptor of a input device driver*/
-indev_drv.type = LV_INDEV_TYPE_POINTER; /*Touch pad is a pointer-like device*/
-indev_drv.read_cb = my_touchpad_read; /*Set your driver function*/
-lv_indev_drv_register(&indev_drv); /*Finally register the driver*/
-
-bool my_touchpad_read(lv_indev_drv_t * indev_driver, lv_indev_data_t * data)
-{
- static lv_coord_t last_x = 0;
- static lv_coord_t last_y = 0;
-
- /*Save the state and save the pressed coordinate*/
- data->state = touchpad_is_pressed() ? LV_INDEV_STATE_PR : LV_INDEV_STATE_REL;
- if(data->state == LV_INDEV_STATE_PR) touchpad_get_xy(&last_x, &last_y);
-
- /*Set the coordinates (if released use the last pressed coordinates)*/
- data->point.x = last_x;
- data->point.y = last_y;
-
- return false; /*Return `false` because we are not buffering and no more data to read*/
-}
-```
-10. Call `lv_task_handler()` periodically every few milliseconds in the main `while(1)` loop, in Timer interrupt or in an Operation system task.
-It will redraw the screen if required, handle input devices etc.
-
-
-## Learn the basics
-
-### Objects (Widgets)
-
-The graphical elements like Buttons, Labels, Sliders, Charts etc are called objects in LittelvGL. Go to [Object types](https://docs.littlevgl.com/en/html/object-types/index) to see the full list of available types.
-
-Every object has a parent object. The child object moves with the parent and if you delete the parent the children will be deleted too. Children can be visible only on their parent.
-
-The *screen* are the "root" parents. To get the current screen call `lv_scr_act()`.
-
-You can create a new object with `lv_<type>_create(parent, obj_to_copy)`. It will return an `lv_obj_t *` variable which should be used as a reference to the object to set its parameters.
-The first parameter is the desired *parent*, te second parameters can be an object to copy (`NULL` is unused).
-For example:
-```c
-lv_obj_t * slider1 = lv_slider_create(lv_scr_act(), NULL);
-```
-
-To set some basic attribute `lv_obj_set_<paramters_name>(obj, <value>)` function can be used. For example:
-```c
-lv_obj_set_x(btn1, 30);
-lv_obj_set_y(btn1, 10);
-lv_obj_set_size(btn1, 200, 50);
-```
-
-The objects has type specific parameters too which can be set by `lv_<type>_set_<paramters_name>(obj, <value>)` functions. For example:
-```c
-lv_slider_set_value(slider1, 70, LV_ANIM_ON);
-```
-
-To see the full API visit the documentation of the object types or the related header file (e.g. `lvgl/src/lv_objx/lv_slider.h`).
-
-### Styles
-Styles can be assigned to the objects to changed their appearance. A style describes the appearance of rectangle-like objects (like a button or slider), texts, images and lines at once.
-
-You can create a new style like this:
-```c
-static lv_style_t style1; /*Declare a new style. Should be `static`*/
-lv_style_copy(&style1, &lv_style_plain); /*Copy a built-in style*/
-style1.body.main_color = LV_COLOR_RED; /*Main color*/
-style1.body.grad_color = lv_color_hex(0xffd83c) /*Gradient color (orange)*/
-style1.body.radius = 3;
-style1.text.color = lv_color_hex3(0x0F0) /*Label color (green)*/
-style1.text.font = &lv_font_dejavu_22; /*Change font*/
-...
-```
-
-To set a new style for an object use the `lv_<type>set_style(obj, LV_<TYPE>_STYLE_<NAME>, &my_style)` functions. For example:
-```c
-lv_slider_set_style(slider1, LV_SLIDER_STYLE_BG, &slider_bg_style);
-lv_slider_set_style(slider1, LV_SLIDER_STYLE_INDIC, &slider_indic_style);
-lv_slider_set_style(slider1, LV_SLIDER_STYLE_KNOB, &slider_knob_style);
-```
-
-If an object's style is `NULL` then it will inherit its parent's style. For example, the labels' style are `NULL` by default. If you place them on a button then they will use the `style.text` properties from the button's style.
-
-Learn more in [Style overview](https://docs.littlevgl.com/en/html/overview/style) section.
-
-### Events
-Events are used to inform the user if something has happened with an object. You can assign a callback to an object which will be called if the object is clicked, released, dragged, being deleted etc. It should look like this:
-
-```c
-lv_obj_set_event_cb(btn, btn_event_cb); /*Assign a callback to the button*/
-
-...
-
-void btn_event_cb(lv_obj_t * btn, lv_event_t event)
-{
- if(event == LV_EVENT_CLICKED) {
- printf("Clicked\n");
- }
-}
-```
-
-Learn more about the events in the [Event overview](https://docs.littlevgl.com/en/html/overview/event) section.
-
-
-## Examples
-
-### Button with label
-```c
-lv_obj_t * btn = lv_btn_create(lv_scr_act(), NULL); /*Add a button the current screen*/
-lv_obj_set_pos(btn, 10, 10); /*Set its position*/
-lv_obj_set_size(btn, 100, 50); /*Set its size*/
-lv_obj_set_event_cb(btn, btn_event_cb); /*Assign a callback to the button*/
-
-lv_obj_t * label = lv_label_create(btn, NULL); /*Add a label to the button*/
-lv_label_set_text(label, "Button"); /*Set the labels text*/
-
-...
-
-void btn_event_cb(lv_obj_t * btn, lv_event_t event)
-{
- if(event == LV_EVENT_CLICKED) {
- printf("Clicked\n");
- }
-}
-```
-![LittlevGL button with label example](https://docs.littlevgl.com/en/misc/simple_button_example.gif)
-
-### Button with styles
-Add styles to the previously button from the previous example
-```c
-static lv_style_t style_btn_rel; /*A variable to store the released style*/
-lv_style_copy(&style_btn_rel, &lv_style_plain); /*Initialize from a built-in style*/
-style_btn_rel.body.border.color = lv_color_hex3(0x269);
-style_btn_rel.body.border.width = 1;
-style_btn_rel.body.main_color = lv_color_hex3(0xADF);
-style_btn_rel.body.grad_color = lv_color_hex3(0x46B);
-style_btn_rel.body.shadow.width = 4;
-style_btn_rel.body.shadow.type = LV_SHADOW_BOTTOM;
-style_btn_rel.body.radius = LV_RADIUS_CIRCLE;
-style_btn_rel.text.color = lv_color_hex3(0xDEF);
-
-static lv_style_t style_btn_pr; /*A variable to store the pressed style*/
-lv_style_copy(&style_btn_pr, &style_btn_rel); /*Initialize from the released style*/
-style_btn_pr.body.border.color = lv_color_hex3(0x46B);
-style_btn_pr.body.main_color = lv_color_hex3(0x8BD);
-style_btn_pr.body.grad_color = lv_color_hex3(0x24A);
-style_btn_pr.body.shadow.width = 2;
-style_btn_pr.text.color = lv_color_hex3(0xBCD);
-
-lv_btn_set_style(btn, LV_BTN_STYLE_REL, &style_btn_rel); /*Set the button's released style*/
-lv_btn_set_style(btn, LV_BTN_STYLE_PR, &style_btn_pr); /*Set the button's pressed style*/
-```
-
-![Stylsd button is LittelvGL](https://docs.littlevgl.com/en/misc/button_style_example.gif)
-
-### Slider and object alignment
-```c
-lv_obj_t * label;
-
-...
-
-/* Create a slider in the center of the display */
-lv_obj_t * slider = lv_slider_create(lv_scr_act(), NULL);
-lv_obj_set_width(slider, 200); /*Set the width*/
-lv_obj_align(slider, NULL, LV_ALIGN_CENTER, 0, 0); /*Align to the center of the parent (screen)*/
-lv_obj_set_event_cb(slider, slider_event_cb); /*Assign an event function*/
-
-/* Create a label below the slider */
-label = lv_label_create(lv_scr_act(), NULL);
-lv_label_set_text(label, "0");
-lv_obj_set_auto_realign(slider, true);
-lv_obj_align(label, slider, LV_ALIGN_OUT_BOTTOM_MID, 0, 10);
-
-...
-
-void slider_event_cb(lv_obj_t * slider, lv_event_t event)
-{
- if(event == LV_EVENT_VALUE_CHANGED) {
- static char buf[4]; /* max 3 bytes for number plus 1 null terminating byte */
- snprintf(buf, 4, "%u", lv_slider_get_value(slider));
- lv_label_set_text(slider_label, buf); /*Refresh the text*/
- }
-}
-```
-
-![Slider example with LittlevGL](https://docs.littlevgl.com/en/misc/slider_example.gif)
-
-### List and themes
-```c
-/*Texts of the list elements*/
-const char * txts[] = {"First", "Second", "Third", "Forth", "Fifth", "Sixth", NULL};
-
-/* Initialize and set a theme. `LV_THEME_NIGHT` needs to enabled in lv_conf.h. */
-lv_theme_t * th = lv_theme_night_init(20, NULL);
-lv_theme_set_current(th);
-
-/*Create a list*/
-lv_obj_t* list = lv_list_create(lv_scr_act(), NULL);
-lv_obj_set_size(list, 120, 180);
-lv_obj_set_pos(list, 10, 10);
-
-/*Add buttons*/
-uint8_t i;
-for(i = 0; txts[i]; i++) {
- lv_obj_t * btn = lv_list_add_btn(list, LV_SYMBOL_FILE, txts[i]);
- lv_obj_set_event_cb(btn, list_event); /*Assign event function*/
- lv_btn_set_toggle(btn, true); /*Enable on/off states*/
-}
-
-/* Initialize and set an other theme. `LV_THEME_MATERIAL` needs to enabled in lv_conf.h.
- * If `LV_TEHE_LIVE_UPDATE 1` then the previous list's style will be updated too.*/
-th = lv_theme_material_init(210, NULL);
-lv_theme_set_current(th);
-
-/*Create an other list*/
-list = lv_list_create(lv_scr_act(), NULL);
-lv_obj_set_size(list, 120, 180);
-lv_obj_set_pos(list, 150, 10);
-
-/*Add buttons with the same texts*/
-for(i = 0; txts[i]; i++) {
- lv_obj_t * btn = lv_list_add_btn(list, LV_SYMBOL_FILE, txts[i]);
- lv_obj_set_event_cb(btn, list_event);
- lv_btn_set_toggle(btn, true);
-}
-
-...
-
-static void list_event(lv_obj_t * btn, lv_event_t e)
-{
- if(e == LV_EVENT_CLICKED) {
- printf("%s\n", lv_list_get_btn_text(btn));
- }
-
-}
-```
-![List and theme example with LittlevGL](https://docs.littlevgl.com/en/misc/list_theme_example.gif)
-
-### Use LittlevGL from Micropython
-Learn more about [Micropython](https://docs.littlevgl.com/en/html/get-started/micropython).
-```python
-# Create a Button and a Label
-scr = lv.obj()
-btn = lv.btn(scr)
-btn.align(lv.scr_act(), lv.ALIGN.CENTER, 0, 0)
-label = lv.label(btn)
-label.set_text("Button")
-
-# Load the screen
-lv.scr_load(scr)
-```
-
-## Contributing
-To ask questions please use the [Forum](https://forum.littlevgl.com).
-For development-related things (bug reports, feature suggestions) use [GitHub's Issue tracker](https://github.com/littlevgl/lvgl/issues).
-
-If you are interested in contributing to LittlevGL you can
-- **Help others** in the [Forum](https://forum.littlevgl.com).
-- **Inspire people** by speaking about your project in [My project](https://forum.littlevgl.com/c/my-projects) category in the Forum or add it to the [References](https://blog.littlevgl.com/2018-12-26/references) post
-- **Improve and/or translate the documentation.** Go to the [Documentation](https://github.com/littlevgl/docs) repository to learn more
-- **Write a blog post** about your experiences. See how to do it in the [Blog](https://github.com/littlevgl/blog) repository
-- **Report and/or fix bugs** in [GitHub's issue tracker](https://github.com/littlevgl/lvgl/issues)
-- **Help in the developement**. Check the [Open issues](https://github.com/littlevgl/lvgl/issues) especially the ones with [Help wanted](https://github.com/littlevgl/lvgl/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) label and tell your ideas about a topic or implement a feature.
-
-It should be useful to read the
-- [Contributing guide](https://blog.littlevgl.com/2018-12-06/contributing)
-- [Coding style guide](https://github.com/littlevgl/lvgl/blob/master/docs/CODING_STYLE.md)
-
-## Donate
-If you are pleased with the library, found it useful, or you are happy with the support you got, please help its further development:
-
-[![Donate](https://littlevgl.com/donate_dir/donate_btn.png)](https://littlevgl.com/donate)
diff --git a/src/libs/lvgl/docs/CODE_OF_CONDUCT.md b/src/libs/lvgl/docs/CODE_OF_CONDUCT.md
deleted file mode 100644
index c7d7eeb1..00000000
--- a/src/libs/lvgl/docs/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,46 +0,0 @@
-# Contributor Covenant Code of Conduct
-
-## Our Pledge
-
-In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
-
-## Our Standards
-
-Examples of behavior that contributes to creating a positive environment include:
-
-* Using welcoming and inclusive language
-* Being respectful of differing viewpoints and experiences
-* Gracefully accepting constructive criticism
-* Focusing on what is best for the community
-* Showing empathy towards other community members
-
-Examples of unacceptable behavior by participants include:
-
-* The use of sexualized language or imagery and unwelcome sexual attention or advances
-* Trolling, insulting/derogatory comments, and personal or political attacks
-* Public or private harassment
-* Publishing others' private information, such as a physical or electronic address, without explicit permission
-* Other conduct which could reasonably be considered inappropriate in a professional setting
-
-## Our Responsibilities
-
-Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
-
-Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
-
-## Scope
-
-This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
-
-## Enforcement
-
-Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [atom@github.com](mailto:atom@github.com). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
-
-Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
-
-## Attribution
-
-This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
-
-[homepage]: http://contributor-covenant.org
-[version]: http://contributor-covenant.org/version/1/4/
diff --git a/src/libs/lvgl/docs/CODING_STYLE.md b/src/libs/lvgl/docs/CODING_STYLE.md
deleted file mode 100644
index 31071e94..00000000
--- a/src/libs/lvgl/docs/CODING_STYLE.md
+++ /dev/null
@@ -1,94 +0,0 @@
-
-## File format
-Use [lv_misc/lv_templ.c](https://github.com/littlevgl/lvgl/blob/master/src/lv_misc/lv_templ.c) and [lv_misc/lv_templ.h](https://github.com/littlevgl/lvgl/blob/master/src/lv_misc/lv_templ.h)
-
-## Naming conventions
-* Words are separated by '_'
-* In variable and function names use only lower case letters (e.g. *height_tmp*)
-* In enums and defines use only upper case letters (e.g. *e.g. MAX_LINE_NUM*)
-* Global names (API):
- * starts with *lv*
- * followed by module name: *btn*, *label*, *style* etc.
- * followed by the action (for functions): *set*, *get*, *refr* etc.
- * closed with the subject: *name*, *size*, *state* etc.
-* Typedefs
- * prefer `typedef struct` and `typedef enum` instead of `struct name` and `enum name`
- * always end `typedef struct` and `typedef enum` type names with `_t`
-* Abbreviations:
- * Use abbreviations on public names only if they become longer than 32 characters
- * Use only very straightforward (e.g. pos: position) or well-established (e.g. pr: press) abbreviations
-
-## Coding guide
-* Functions:
- * Try to write function shorter than is 50 lines
- * Always shorter than 100 lines (except very straightforwards)
-* Variables:
- * One line, one declaration (BAD: char x, y;)
- * Use `<stdint.h>` (*uint8_t*, *int32_t* etc)
- * Declare variables when needed (not all at function start)
- * Use the smallest required scope
- * Variables in a file (outside functions) are always *static*
- * Do not use global variables (use functions to set/get static variables)
-
-## Comments
-Before every function have a comment like this:
-
-```c
-/**
- * Return with the screen of an object
- * @param obj pointer to an object
- * @return pointer to a screen
- */
-lv_obj_t * lv_obj_get_scr(lv_obj_t * obj);
-```
-
-Always use `/* Something */` format and NOT `//Something`
-
-Write readable code to avoid descriptive comments like:
-`x++; /* Add 1 to x */`.
-The code should show clearly what you are doing.
-
-You should write **why** have you done this:
-`x++; /*Because of closing '\0' of the string */`
-
-Short "code summaries" of a few lines are accepted. E.g. `/*Calculate the new coordinates*/`
-
-In comments use \` \` when referring to a variable. E.g. ``/*Update the value of `x_act`*/``
-
-### Formatting
-Here is example to show bracket placing and using of white spaces:
-```c
-/**
- * Set a new text for a label. Memory will be allocated to store the text by the label.
- * @param label pointer to a label object
- * @param text '\0' terminated character string. NULL to refresh with the current text.
- */
-void lv_label_set_text(lv_obj_t * label, const char * text)
-{ /* Main brackets of functions in new line*/
-
- if(label == NULL) return; /*No bracket only if the command is inline with the if statement*/
-
- lv_obj_inv(label);
-
- lv_label_ext_t * ext = lv_obj_get_ext(label);
-
- /*Comment before a section */
- if(text == ext->txt || text == NULL) { /*Bracket of statements start inline*/
- lv_label_refr_text(label);
- return;
- }
-
- ...
-}
-```
-
-Use 4 spaces indentation instead of tab.
-
-You can use **astyle** to format the code. The required config flies are: `docs/astyle_c` and `docs/astyle_h`.
-To format the source files:
- `$ find . -type f -name "*.c" | xargs astyle --options=docs/astyle_c`
-
-To format the header files:
- `$ find . -type f -name "*.h" | xargs astyle --options=docs/astyle_h`
-
-Append `-n` to the end to skip creation of backup file OR use `$ find . -type f -name "*.bak" -delete` (for source file's backups) and `find . -type f -name "*.orig" -delete` (for header file's backups)
diff --git a/src/libs/lvgl/docs/CONTRIBUTING.md b/src/libs/lvgl/docs/CONTRIBUTING.md
deleted file mode 100644
index aa31870e..00000000
--- a/src/libs/lvgl/docs/CONTRIBUTING.md
+++ /dev/null
@@ -1,111 +0,0 @@
-# Contributing to Littlev Graphics Library
-
-**Do you have some free time to spend with programming?
-Are you working on an Embedded GUI project with LittlevGL?
-See how can you help to improve the graphics library!**
-
-There are many ways to join the community. If you have some time to work with us I'm sure you will find something that fits you! You can:
-- help others in the [Forum](https://forum.littlevgl.com/)
-- improve and/or translate the documentation
-- write a blog post about your experiences
-- report and/or fix bugs
-- suggest and/or implement new features
-
-But first, start with the most Frequently Asked Questions.
-
-# FAQ about contributing
-
-## Where can I write my question and remarks?
-
-We use the [Forum](https://forum.littlevgl.com/) to ask and answer questions and [GitHub's issue tracker](https://github.com/littlevgl/lvgl/issues) for development-related discussion.
-
-But there are some simple rules:
-- Be kind and friendly.
-- Speak about one thing in one issue/topic.
-- Give feedback and close the issue or mark the topic as solved if your question is answered.
-- Tell what you experience or expect. _"The button is not working"_ is not enough info to get help.
-- If possible send an absolute minimal code example in order to reproduce the issue
-- Use [Markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) to format your post.
-
-## How can I send fixes and improvements?
-
-Merging new code happens via Pull Requests. If you are still not familiar with the Pull Requests (PR for short) here is a quick guide:
-1. **Fork** the [lvgl repository](https://github.com/littlevgl/lvgl). To do this click the "Fork" button in the top right corner. It will "copy" the `lvgl` repository to your GitHub account (`https://github.com/your_name?tab=repositories`)
-2. **Clone** the forked repository and add your changes
-3. **Create a PR** on GitHub from the page of your `lvgl` repository (`https://github.com/your_name/lvgl`) by hitting the "New pull request" button
-4. **Set the base branch**. It means where you want to merge your update. Fixes go to `master`, new features to the actual `dev-x.y` branch.
-5. **Describe** what is in the update. An example code is welcome if applicable.
-
-Some advice:
-- If you are not sure about your fix or feature it's better to open an issue first and discuss the details there.
-- Maybe your fix or update won't be perfect at first. Don't be afraid, just improve it and push the new commits. The PR will be updated accordingly.
-- If your update needs some extra work it's okay to say: _"I'm busy now and I will improve it soon"_ or _"Sorry, I don't have time to improve it, I hope it helps in this form too"_.
-So it's better to say don't have time to continue than saying nothing.
-- Please read and follow this [guide about the coding style](https://github.com/littlevgl/lvgl/blob/master/docs/CODING_STYLE.md)
-
-
-## Where is the documentation?
-
-You can read the documentation here: <https://docs.littlevgl.com/>
-You can edit the documentation here: <https://github.com/littlevgl/doc>
-
-## Where is the blog?
-
-You can read the blog here: <https://blog.littlevgl.com/>
-You can edit the blog here: <https://github.com/littlevgl/blog>
-
-# So how and where can you contribute?
-
-## Help others in the Forum
-
-It's a great way to contribute to the library if you already use it.
-Just go to [https://forum.littlevgl.com/](https://forum.littlevgl.com/) a register (Google and GitHub login also works).
-Log in, read the titles and if you are already familiar with a topic, don't be shy, and write your suggestion.
-
-## Improving and/or translating the documentation
-
-If you would like to contribute to LittlevGL the documentation is the best place to start.
-
-### Fix typos, add missing parts
-
-If you find a typo, an obscure sentence or something which is not explained well enough in the [English documentation](https://docs.littlevgl.com/en/html/index.html)
-click the *"Edit on GitHub"* button in the top right corner and fix the issue by sending a Pull Request.
-
-### Translate the documentation
-
-If you have time and interest you can translate the documentation to your native language or any language you speak.
-You can join others to work on an already existing language or you can start a new one.
-
-To translate the documentation we use [Zanata](https://zanata.org) which is an online translation platform.
-You will find the LittlevGL project here: [LittlevGL on Zanata](https://translate.zanata.org/iteration/view/littlevgl-docs/v6.0-doc1?dswid=3430)
-
-To get started you need to:
-- register at [Zanata](https://zanata.org) which is an online translation platform.
-- comment to [this post](https://forum.littlevgl.com/t/translate-the-documentation/238?u=kisvegabor)
-- tell your username at *Zanata* and your selected language(s) to get permission the edit the translations
-
-Note that a translation will be added to the documentation only if at least the [Porting section](https://docs.littlevgl.com/en/html/porting/index.html) is translated.
-
-
-## Writing a blog post about your experiences
-
-Have you ported LittlevGL to a new platform? Have you created a fancy GUI? Do you know a great trick?
-You can share your knowledge on LittlevGL's blog! It's super easy to add your own post:
-- Fork and clone the [blog repository](https://github.com/littlevgl/blog)
-- Add your post in Markdown to the `_posts` folder.
-- Store the images and other resources in a dedicated folder in `assets`
-- Create a Pull Request
-
-The blog uses [Jekyll](https://jekyllrb.com/) to convert the `.md` files to a webpage. You can easily [run Jekyll offline](https://jekyllrb.com/docs/) to check your post before creating the Pull request
-
-## Reporting and/or fixing bugs
-For simple bugfixes (typos, missing error handling, fixing a warning) is fine to send a Pull request directly. However, for more complex bugs it's better to open an issue first. In the issue, you should describe how to reproduce the bug and even add the minimal code snippet.
-
-## Suggesting and/or implementing new features
-If you have a good idea don't hesitate to share with us. It's even better if you have time to deal with its implementation. Don't be afraid if you still don't know LittlevGL well enough. We will help you to get started.
-
-During the implementation don't forget the [Code style guide](https://github.com/littlevgl/lvgl/blob/master/docs/CODING_STYLE.md).
-
-# Summary
-
-I hope you have taken a liking to contribute to LittlevGL. A helpful and friendly community is waiting for you! :)
diff --git a/src/libs/lvgl/library.json b/src/libs/lvgl/library.json
deleted file mode 100644
index d8b0bf76..00000000
--- a/src/libs/lvgl/library.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "name": "lvgl",
- "version": "v6.1.2",
- "keywords": "graphics, gui, embedded, littlevgl",
- "description": "Graphics library to create embedded GUI with easy-to-use graphical elements, beautiful visual effects and low memory footprint. It offers anti-aliasing, opacity, and animations using only one frame buffer.",
- "repository":
- {
- "type": "git",
- "url": "https://github.com/littlevgl/lvgl.git"
- },
- "build": {
- "includeDir": "."
- }
-}
diff --git a/src/libs/lvgl/lv_conf_template.h b/src/libs/lvgl/lv_conf_template.h
deleted file mode 100644
index 77b97b11..00000000
--- a/src/libs/lvgl/lv_conf_template.h
+++ /dev/null
@@ -1,591 +0,0 @@
-/**
- * @file lv_conf.h
- *
- */
-
-/*
- * COPY THIS FILE AS `lv_conf.h` NEXT TO the `lvgl` FOLDER
- */
-
-#if 0 /*Set it to "1" to enable content*/
-
-#ifndef LV_CONF_H
-#define LV_CONF_H
-/* clang-format off */
-
-#include <stdint.h>
-
-/*====================
- Graphical settings
- *====================*/
-
-/* Maximal horizontal and vertical resolution to support by the library.*/
-#define LV_HOR_RES_MAX (480)
-#define LV_VER_RES_MAX (320)
-
-/* Color depth:
- * - 1: 1 byte per pixel
- * - 8: RGB233
- * - 16: RGB565
- * - 32: ARGB8888
- */
-#define LV_COLOR_DEPTH 16
-
-/* Swap the 2 bytes of RGB565 color.
- * Useful if the display has a 8 bit interface (e.g. SPI)*/
-#define LV_COLOR_16_SWAP 0
-
-/* 1: Enable screen transparency.
- * Useful for OSD or other overlapping GUIs.
- * Requires `LV_COLOR_DEPTH = 32` colors and the screen's style should be modified: `style.body.opa = ...`*/
-#define LV_COLOR_SCREEN_TRANSP 0
-
-/*Images pixels with this color will not be drawn (with chroma keying)*/
-#define LV_COLOR_TRANSP LV_COLOR_LIME /*LV_COLOR_LIME: pure green*/
-
-/* Enable chroma keying for indexed images. */
-#define LV_INDEXED_CHROMA 1
-
-/* Enable anti-aliasing (lines, and radiuses will be smoothed) */
-#define LV_ANTIALIAS 1
-
-/* Default display refresh period.
- * Can be changed in the display driver (`lv_disp_drv_t`).*/
-#define LV_DISP_DEF_REFR_PERIOD 30 /*[ms]*/
-
-/* Dot Per Inch: used to initialize default sizes.
- * E.g. a button with width = LV_DPI / 2 -> half inch wide
- * (Not so important, you can adjust it to modify default sizes and spaces)*/
-#define LV_DPI 100 /*[px]*/
-
-/* Type of coordinates. Should be `int16_t` (or `int32_t` for extreme cases) */
-typedef int16_t lv_coord_t;
-
-/*=========================
- Memory manager settings
- *=========================*/
-
-/* LittelvGL's internal memory manager's settings.
- * The graphical objects and other related data are stored here. */
-
-/* 1: use custom malloc/free, 0: use the built-in `lv_mem_alloc` and `lv_mem_free` */
-#define LV_MEM_CUSTOM 0
-#if LV_MEM_CUSTOM == 0
-/* Size of the memory used by `lv_mem_alloc` in bytes (>= 2kB)*/
-# define LV_MEM_SIZE (32U * 1024U)
-
-/* Complier prefix for a big array declaration */
-# define LV_MEM_ATTR
-
-/* Set an address for the memory pool instead of allocating it as an array.
- * Can be in external SRAM too. */
-# define LV_MEM_ADR 0
-
-/* Automatically defrag. on free. Defrag. means joining the adjacent free cells. */
-# define LV_MEM_AUTO_DEFRAG 1
-#else /*LV_MEM_CUSTOM*/
-# define LV_MEM_CUSTOM_INCLUDE <stdlib.h> /*Header for the dynamic memory function*/
-# define LV_MEM_CUSTOM_ALLOC malloc /*Wrapper to malloc*/
-# define LV_MEM_CUSTOM_FREE free /*Wrapper to free*/
-#endif /*LV_MEM_CUSTOM*/
-
-/* Garbage Collector settings
- * Used if lvgl is binded to higher level language and the memory is managed by that language */
-#define LV_ENABLE_GC 0
-#if LV_ENABLE_GC != 0
-# define LV_GC_INCLUDE "gc.h" /*Include Garbage Collector related things*/
-# define LV_MEM_CUSTOM_REALLOC your_realloc /*Wrapper to realloc*/
-# define LV_MEM_CUSTOM_GET_SIZE your_mem_get_size /*Wrapper to lv_mem_get_size*/
-#endif /* LV_ENABLE_GC */
-
-/*=======================
- Input device settings
- *=======================*/
-
-/* Input device default settings.
- * Can be changed in the Input device driver (`lv_indev_drv_t`)*/
-
-/* Input device read period in milliseconds */
-#define LV_INDEV_DEF_READ_PERIOD 30
-
-/* Drag threshold in pixels */
-#define LV_INDEV_DEF_DRAG_LIMIT 10
-
-/* Drag throw slow-down in [%]. Greater value -> faster slow-down */
-#define LV_INDEV_DEF_DRAG_THROW 20
-
-/* Long press time in milliseconds.
- * Time to send `LV_EVENT_LONG_PRESSSED`) */
-#define LV_INDEV_DEF_LONG_PRESS_TIME 400
-
-/* Repeated trigger period in long press [ms]
- * Time between `LV_EVENT_LONG_PRESSED_REPEAT */
-#define LV_INDEV_DEF_LONG_PRESS_REP_TIME 100
-
-/*==================
- * Feature usage
- *==================*/
-
-/*1: Enable the Animations */
-#define LV_USE_ANIMATION 1
-#if LV_USE_ANIMATION
-
-/*Declare the type of the user data of animations (can be e.g. `void *`, `int`, `struct`)*/
-typedef void * lv_anim_user_data_t;
-
-#endif
-
-/* 1: Enable shadow drawing*/
-#define LV_USE_SHADOW 1
-
-/* 1: Enable object groups (for keyboard/encoder navigation) */
-#define LV_USE_GROUP 1
-#if LV_USE_GROUP
-typedef void * lv_group_user_data_t;
-#endif /*LV_USE_GROUP*/
-
-/* 1: Enable GPU interface*/
-#define LV_USE_GPU 1
-
-/* 1: Enable file system (might be required for images */
-#define LV_USE_FILESYSTEM 1
-#if LV_USE_FILESYSTEM
-/*Declare the type of the user data of file system drivers (can be e.g. `void *`, `int`, `struct`)*/
-typedef void * lv_fs_drv_user_data_t;
-#endif
-
-/*1: Add a `user_data` to drivers and objects*/
-#define LV_USE_USER_DATA 0
-
-/*========================
- * Image decoder and cache
- *========================*/
-
-/* 1: Enable indexed (palette) images */
-#define LV_IMG_CF_INDEXED 1
-
-/* 1: Enable alpha indexed images */
-#define LV_IMG_CF_ALPHA 1
-
-/* Default image cache size. Image caching keeps the images opened.
- * If only the built-in image formats are used there is no real advantage of caching.
- * (I.e. no new image decoder is added)
- * With complex image decoders (e.g. PNG or JPG) caching can save the continuous open/decode of images.
- * However the opened images might consume additional RAM.
- * LV_IMG_CACHE_DEF_SIZE must be >= 1 */
-#define LV_IMG_CACHE_DEF_SIZE 1
-
-/*Declare the type of the user data of image decoder (can be e.g. `void *`, `int`, `struct`)*/
-typedef void * lv_img_decoder_user_data_t;
-
-/*=====================
- * Compiler settings
- *====================*/
-/* Define a custom attribute to `lv_tick_inc` function */
-#define LV_ATTRIBUTE_TICK_INC
-
-/* Define a custom attribute to `lv_task_handler` function */
-#define LV_ATTRIBUTE_TASK_HANDLER
-
-/* With size optimization (-Os) the compiler might not align data to
- * 4 or 8 byte boundary. This alignment will be explicitly applied where needed.
- * E.g. __attribute__((aligned(4))) */
-#define LV_ATTRIBUTE_MEM_ALIGN
-
-/* Attribute to mark large constant arrays for example
- * font's bitmaps */
-#define LV_ATTRIBUTE_LARGE_CONST
-
-/* Export integer constant to binding.
- * This macro is used with constants in the form of LV_<CONST> that
- * should also appear on lvgl binding API such as Micropython
- *
- * The default value just prevents a GCC warning.
- */
-#define LV_EXPORT_CONST_INT(int_value) struct _silence_gcc_warning
-
-/*===================
- * HAL settings
- *==================*/
-
-/* 1: use a custom tick source.
- * It removes the need to manually update the tick with `lv_tick_inc`) */
-#define LV_TICK_CUSTOM 0
-#if LV_TICK_CUSTOM == 1
-#define LV_TICK_CUSTOM_INCLUDE "something.h" /*Header for the sys time function*/
-#define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current systime in ms*/
-#endif /*LV_TICK_CUSTOM*/
-
-typedef void * lv_disp_drv_user_data_t; /*Type of user data in the display driver*/
-typedef void * lv_indev_drv_user_data_t; /*Type of user data in the input device driver*/
-
-/*================
- * Log settings
- *===============*/
-
-/*1: Enable the log module*/
-#define LV_USE_LOG 0
-#if LV_USE_LOG
-/* How important log should be added:
- * LV_LOG_LEVEL_TRACE A lot of logs to give detailed information
- * LV_LOG_LEVEL_INFO Log important events
- * LV_LOG_LEVEL_WARN Log if something unwanted happened but didn't cause a problem
- * LV_LOG_LEVEL_ERROR Only critical issue, when the system may fail
- * LV_LOG_LEVEL_NONE Do not log anything
- */
-# define LV_LOG_LEVEL LV_LOG_LEVEL_WARN
-
-/* 1: Print the log with 'printf';
- * 0: user need to register a callback with `lv_log_register_print_cb`*/
-# define LV_LOG_PRINTF 0
-#endif /*LV_USE_LOG*/
-
-/*=================
- * Debug settings
- *================*/
-
-/* If Debug is enabled LittelvGL validates the parameters of the functions.
- * If an invalid parameter is found an error log message is printed and
- * the MCU halts at the error. (`LV_USE_LOG` should be enabled)
- * If you are debugging the MCU you can pause
- * the debugger to see exactly where the issue is.
- *
- * The behavior of asserts can be overwritten by redefining them here.
- * E.g. #define LV_ASSERT_MEM(p) <my_assert_code>
- */
-#define LV_USE_DEBUG 1
-#if LV_USE_DEBUG
-
-/*Check if the parameter is NULL. (Quite fast) */
-#define LV_USE_ASSERT_NULL 1
-
-/*Checks is the memory is successfully allocated or no. (Quite fast)*/
-#define LV_USE_ASSERT_MEM 1
-
-/* Check the strings.
- * Search for NULL, very long strings, invalid characters, and unnatural repetitions. (Slow)
- * If disabled `LV_USE_ASSERT_NULL` will be performed instead (if it's enabled) */
-#define LV_USE_ASSERT_STR 0
-
-/* Check NULL, the object's type and existence (e.g. not deleted). (Quite slow)
- * If disabled `LV_USE_ASSERT_NULL` will be performed instead (if it's enabled) */
-#define LV_USE_ASSERT_OBJ 0
-
-/*Check if the styles are properly initialized. (Fast)*/
-#define LV_USE_ASSERT_STYLE 1
-
-#endif /*LV_USE_DEBUG*/
-
-/*================
- * THEME USAGE
- *================*/
-#define LV_THEME_LIVE_UPDATE 0 /*1: Allow theme switching at run time. Uses 8..10 kB of RAM*/
-
-#define LV_USE_THEME_TEMPL 0 /*Just for test*/
-#define LV_USE_THEME_DEFAULT 0 /*Built mainly from the built-in styles. Consumes very few RAM*/
-#define LV_USE_THEME_ALIEN 0 /*Dark futuristic theme*/
-#define LV_USE_THEME_NIGHT 0 /*Dark elegant theme*/
-#define LV_USE_THEME_MONO 0 /*Mono color theme for monochrome displays*/
-#define LV_USE_THEME_MATERIAL 0 /*Flat theme with bold colors and light shadows*/
-#define LV_USE_THEME_ZEN 0 /*Peaceful, mainly light theme */
-#define LV_USE_THEME_NEMO 0 /*Water-like theme based on the movie "Finding Nemo"*/
-
-/*==================
- * FONT USAGE
- *===================*/
-
-/* The built-in fonts contains the ASCII range and some Symbols with 4 bit-per-pixel.
- * The symbols are available via `LV_SYMBOL_...` defines
- * More info about fonts: https://docs.littlevgl.com/#Fonts
- * To create a new font go to: https://littlevgl.com/ttf-font-to-c-array
- */
-
-/* Robot fonts with bpp = 4
- * https://fonts.google.com/specimen/Roboto */
-#define LV_FONT_ROBOTO_12 0
-#define LV_FONT_ROBOTO_16 1
-#define LV_FONT_ROBOTO_22 0
-#define LV_FONT_ROBOTO_28 0
-
-/* Demonstrate special features */
-#define LV_FONT_ROBOTO_12_SUBPX 1
-#define LV_FONT_ROBOTO_28_COMPRESSED 1 /*bpp = 3*/
-
-/*Pixel perfect monospace font
- * http://pelulamu.net/unscii/ */
-#define LV_FONT_UNSCII_8 0
-
-/* Optionally declare your custom fonts here.
- * You can use these fonts as default font too
- * and they will be available globally. E.g.
- * #define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(my_font_1) \
- * LV_FONT_DECLARE(my_font_2)
- */
-#define LV_FONT_CUSTOM_DECLARE
-
-/*Always set a default font from the built-in fonts*/
-#define LV_FONT_DEFAULT &lv_font_roboto_16
-
-/* Enable it if you have fonts with a lot of characters.
- * The limit depends on the font size, font face and bpp
- * but with > 10,000 characters if you see issues probably you need to enable it.*/
-#define LV_FONT_FMT_TXT_LARGE 0
-
-/* Set the pixel order of the display.
- * Important only if "subpx fonts" are used.
- * With "normal" font it doesn't matter.
- */
-#define LV_FONT_SUBPX_BGR 0
-
-/*Declare the type of the user data of fonts (can be e.g. `void *`, `int`, `struct`)*/
-typedef void * lv_font_user_data_t;
-
-/*=================
- * Text settings
- *=================*/
-
-/* Select a character encoding for strings.
- * Your IDE or editor should have the same character encoding
- * - LV_TXT_ENC_UTF8
- * - LV_TXT_ENC_ASCII
- * */
-#define LV_TXT_ENC LV_TXT_ENC_UTF8
-
- /*Can break (wrap) texts on these chars*/
-#define LV_TXT_BREAK_CHARS " ,.;:-_"
-
-/* If a word is at least this long, will break wherever "prettiest"
- * To disable, set to a value <= 0 */
-#define LV_TXT_LINE_BREAK_LONG_LEN 12
-
-/* Minimum number of characters in a long word to put on a line before a break.
- * Depends on LV_TXT_LINE_BREAK_LONG_LEN. */
-#define LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN 3
-
-/* Minimum number of characters in a long word to put on a line after a break.
- * Depends on LV_TXT_LINE_BREAK_LONG_LEN. */
-#define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 3
-
-/* The control character to use for signalling text recoloring. */
-#define LV_TXT_COLOR_CMD "#"
-
-/* Support bidirectional texts.
- * Allows mixing Left-to-Right and Right-to-Left texts.
- * The direction will be processed according to the Unicode Bidirectioanl Algorithm:
- * https://www.w3.org/International/articles/inline-bidi-markup/uba-basics*/
-#define LV_USE_BIDI 0
-#if LV_USE_BIDI
-/* Set the default direction. Supported values:
- * `LV_BIDI_DIR_LTR` Left-to-Right
- * `LV_BIDI_DIR_RTL` Right-to-Left
- * `LV_BIDI_DIR_AUTO` detect texts base direction */
-#define LV_BIDI_BASE_DIR_DEF LV_BIDI_DIR_AUTO
-#endif
-
-/*Change the built in (v)snprintf functions*/
-#define LV_SPRINTF_CUSTOM 0
-#if LV_SPRINTF_CUSTOM
-# define LV_SPRINTF_INCLUDE <stdio.h>
-# define lv_snprintf snprintf
-# define lv_vsnprintf vsnprintf
-#endif /*LV_SPRINTF_CUSTOM*/
-
-/*===================
- * LV_OBJ SETTINGS
- *==================*/
-
-/*Declare the type of the user data of object (can be e.g. `void *`, `int`, `struct`)*/
-typedef void * lv_obj_user_data_t;
-
-/*1: enable `lv_obj_realaign()` based on `lv_obj_align()` parameters*/
-#define LV_USE_OBJ_REALIGN 1
-
-/* Enable to make the object clickable on a larger area.
- * LV_EXT_CLICK_AREA_OFF or 0: Disable this feature
- * LV_EXT_CLICK_AREA_TINY: The extra area can be adjusted horizontally and vertically (0..255 px)
- * LV_EXT_CLICK_AREA_FULL: The extra area can be adjusted in all 4 directions (-32k..+32k px)
- */
-#define LV_USE_EXT_CLICK_AREA LV_EXT_CLICK_AREA_OFF
-
-/*==================
- * LV OBJ X USAGE
- *================*/
-/*
- * Documentation of the object types: https://docs.littlevgl.com/#Object-types
- */
-
-/*Arc (dependencies: -)*/
-#define LV_USE_ARC 1
-
-/*Bar (dependencies: -)*/
-#define LV_USE_BAR 1
-
-/*Button (dependencies: lv_cont*/
-#define LV_USE_BTN 1
-#if LV_USE_BTN != 0
-/*Enable button-state animations - draw a circle on click (dependencies: LV_USE_ANIMATION)*/
-# define LV_BTN_INK_EFFECT 0
-#endif
-
-/*Button matrix (dependencies: -)*/
-#define LV_USE_BTNM 1
-
-/*Calendar (dependencies: -)*/
-#define LV_USE_CALENDAR 1
-
-/*Canvas (dependencies: lv_img)*/
-#define LV_USE_CANVAS 1
-
-/*Check box (dependencies: lv_btn, lv_label)*/
-#define LV_USE_CB 1
-
-/*Chart (dependencies: -)*/
-#define LV_USE_CHART 1
-#if LV_USE_CHART
-# define LV_CHART_AXIS_TICK_LABEL_MAX_LEN 20
-#endif
-
-/*Container (dependencies: -*/
-#define LV_USE_CONT 1
-
-/*Color picker (dependencies: -*/
-#define LV_USE_CPICKER 1
-
-/*Drop down list (dependencies: lv_page, lv_label, lv_symbol_def.h)*/
-#define LV_USE_DDLIST 1
-#if LV_USE_DDLIST != 0
-/*Open and close default animation time [ms] (0: no animation)*/
-# define LV_DDLIST_DEF_ANIM_TIME 200
-#endif
-
-/*Gauge (dependencies:lv_bar, lv_lmeter)*/
-#define LV_USE_GAUGE 1
-
-/*Image (dependencies: lv_label*/
-#define LV_USE_IMG 1
-
-/*Image Button (dependencies: lv_btn*/
-#define LV_USE_IMGBTN 1
-#if LV_USE_IMGBTN
-/*1: The imgbtn requires left, mid and right parts and the width can be set freely*/
-# define LV_IMGBTN_TILED 0
-#endif
-
-/*Keyboard (dependencies: lv_btnm)*/
-#define LV_USE_KB 1
-
-/*Label (dependencies: -*/
-#define LV_USE_LABEL 1
-#if LV_USE_LABEL != 0
-/*Hor, or ver. scroll speed [px/sec] in 'LV_LABEL_LONG_ROLL/ROLL_CIRC' mode*/
-# define LV_LABEL_DEF_SCROLL_SPEED 25
-
-/* Waiting period at beginning/end of animation cycle */
-# define LV_LABEL_WAIT_CHAR_COUNT 3
-
-/*Enable selecting text of the label */
-# define LV_LABEL_TEXT_SEL 0
-
-/*Store extra some info in labels (12 bytes) to speed up drawing of very long texts*/
-# define LV_LABEL_LONG_TXT_HINT 0
-#endif
-
-/*LED (dependencies: -)*/
-#define LV_USE_LED 1
-
-/*Line (dependencies: -*/
-#define LV_USE_LINE 1
-
-/*List (dependencies: lv_page, lv_btn, lv_label, (lv_img optionally for icons ))*/
-#define LV_USE_LIST 1
-#if LV_USE_LIST != 0
-/*Default animation time of focusing to a list element [ms] (0: no animation) */
-# define LV_LIST_DEF_ANIM_TIME 100
-#endif
-
-/*Line meter (dependencies: *;)*/
-#define LV_USE_LMETER 1
-
-/*Message box (dependencies: lv_rect, lv_btnm, lv_label)*/
-#define LV_USE_MBOX 1
-
-/*Page (dependencies: lv_cont)*/
-#define LV_USE_PAGE 1
-#if LV_USE_PAGE != 0
-/*Focus default animation time [ms] (0: no animation)*/
-# define LV_PAGE_DEF_ANIM_TIME 400
-#endif
-
-/*Preload (dependencies: lv_arc, lv_anim)*/
-#define LV_USE_PRELOAD 1
-#if LV_USE_PRELOAD != 0
-# define LV_PRELOAD_DEF_ARC_LENGTH 60 /*[deg]*/
-# define LV_PRELOAD_DEF_SPIN_TIME 1000 /*[ms]*/
-# define LV_PRELOAD_DEF_ANIM LV_PRELOAD_TYPE_SPINNING_ARC
-#endif
-
-/*Roller (dependencies: lv_ddlist)*/
-#define LV_USE_ROLLER 1
-#if LV_USE_ROLLER != 0
-/*Focus animation time [ms] (0: no animation)*/
-# define LV_ROLLER_DEF_ANIM_TIME 200
-
-/*Number of extra "pages" when the roller is infinite*/
-# define LV_ROLLER_INF_PAGES 7
-#endif
-
-/*Slider (dependencies: lv_bar)*/
-#define LV_USE_SLIDER 1
-
-/*Spinbox (dependencies: lv_ta)*/
-#define LV_USE_SPINBOX 1
-
-/*Switch (dependencies: lv_slider)*/
-#define LV_USE_SW 1
-
-/*Text area (dependencies: lv_label, lv_page)*/
-#define LV_USE_TA 1
-#if LV_USE_TA != 0
-# define LV_TA_DEF_CURSOR_BLINK_TIME 400 /*ms*/
-# define LV_TA_DEF_PWD_SHOW_TIME 1500 /*ms*/
-#endif
-
-/*Table (dependencies: lv_label)*/
-#define LV_USE_TABLE 1
-#if LV_USE_TABLE
-# define LV_TABLE_COL_MAX 12
-#endif
-
-/*Tab (dependencies: lv_page, lv_btnm)*/
-#define LV_USE_TABVIEW 1
-# if LV_USE_TABVIEW != 0
-/*Time of slide animation [ms] (0: no animation)*/
-# define LV_TABVIEW_DEF_ANIM_TIME 300
-#endif
-
-/*Tileview (dependencies: lv_page) */
-#define LV_USE_TILEVIEW 1
-#if LV_USE_TILEVIEW
-/*Time of slide animation [ms] (0: no animation)*/
-# define LV_TILEVIEW_DEF_ANIM_TIME 300
-#endif
-
-/*Window (dependencies: lv_cont, lv_btn, lv_label, lv_img, lv_page)*/
-#define LV_USE_WIN 1
-
-/*==================
- * Non-user section
- *==================*/
-
-#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) /* Disable warnings for Visual Studio*/
-# define _CRT_SECURE_NO_WARNINGS
-#endif
-
-/*--END OF LV_CONF_H--*/
-
-/*Be sure every define has a default value*/
-#include "lvgl/src/lv_conf_checker.h"
-
-#endif /*LV_CONF_H*/
-
-#endif /*End of "Content enable"*/
diff --git a/src/libs/lvgl/lvgl.h b/src/libs/lvgl/lvgl.h
deleted file mode 100644
index 418ffd2a..00000000
--- a/src/libs/lvgl/lvgl.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
- * @file lvgl.h
- * Include all LittleV GL related headers
- */
-
-#ifndef LVGL_H
-#define LVGL_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-
-#include "src/lv_version.h"
-
-#include "src/lv_misc/lv_log.h"
-#include "src/lv_misc/lv_task.h"
-#include "src/lv_misc/lv_math.h"
-#include "src/lv_misc/lv_async.h"
-
-#include "src/lv_hal/lv_hal.h"
-
-#include "src/lv_core/lv_obj.h"
-#include "src/lv_core/lv_group.h"
-#include "src/lv_core/lv_indev.h"
-
-#include "src/lv_core/lv_refr.h"
-#include "src/lv_core/lv_disp.h"
-#include "src/lv_core/lv_debug.h"
-
-#include "src/lv_themes/lv_theme.h"
-
-#include "src/lv_font/lv_font.h"
-#include "src/lv_font/lv_font_fmt_txt.h"
-#include "src/lv_misc/lv_bidi.h"
-#include "src/lv_misc/lv_printf.h"
-
-#include "src/lv_objx/lv_btn.h"
-#include "src/lv_objx/lv_imgbtn.h"
-#include "src/lv_objx/lv_img.h"
-#include "src/lv_objx/lv_label.h"
-#include "src/lv_objx/lv_line.h"
-#include "src/lv_objx/lv_page.h"
-#include "src/lv_objx/lv_cont.h"
-#include "src/lv_objx/lv_list.h"
-#include "src/lv_objx/lv_chart.h"
-#include "src/lv_objx/lv_table.h"
-#include "src/lv_objx/lv_cb.h"
-#include "src/lv_objx/lv_cpicker.h"
-#include "src/lv_objx/lv_bar.h"
-#include "src/lv_objx/lv_slider.h"
-#include "src/lv_objx/lv_led.h"
-#include "src/lv_objx/lv_btnm.h"
-#include "src/lv_objx/lv_kb.h"
-#include "src/lv_objx/lv_ddlist.h"
-#include "src/lv_objx/lv_roller.h"
-#include "src/lv_objx/lv_ta.h"
-#include "src/lv_objx/lv_canvas.h"
-#include "src/lv_objx/lv_win.h"
-#include "src/lv_objx/lv_tabview.h"
-#include "src/lv_objx/lv_tileview.h"
-#include "src/lv_objx/lv_mbox.h"
-#include "src/lv_objx/lv_gauge.h"
-#include "src/lv_objx/lv_lmeter.h"
-#include "src/lv_objx/lv_sw.h"
-#include "src/lv_objx/lv_kb.h"
-#include "src/lv_objx/lv_arc.h"
-#include "src/lv_objx/lv_preload.h"
-#include "src/lv_objx/lv_calendar.h"
-#include "src/lv_objx/lv_spinbox.h"
-
-#include "src/lv_draw/lv_img_cache.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*LVGL_H*/
diff --git a/src/libs/lvgl/lvgl.mk b/src/libs/lvgl/lvgl.mk
deleted file mode 100644
index 830fe119..00000000
--- a/src/libs/lvgl/lvgl.mk
+++ /dev/null
@@ -1,8 +0,0 @@
-include $(LVGL_DIR)/lvgl/src/lv_core/lv_core.mk
-include $(LVGL_DIR)/lvgl/src/lv_hal/lv_hal.mk
-include $(LVGL_DIR)/lvgl/src/lv_objx/lv_objx.mk
-include $(LVGL_DIR)/lvgl/src/lv_font/lv_font.mk
-include $(LVGL_DIR)/lvgl/src/lv_misc/lv_misc.mk
-include $(LVGL_DIR)/lvgl/src/lv_themes/lv_themes.mk
-include $(LVGL_DIR)/lvgl/src/lv_draw/lv_draw.mk
-
diff --git a/src/libs/lvgl/patches/0001-lv_refr-add-support-for-selecting-render-direction.patch b/src/libs/lvgl/patches/0001-lv_refr-add-support-for-selecting-render-direction.patch
deleted file mode 100644
index 2996c063..00000000
--- a/src/libs/lvgl/patches/0001-lv_refr-add-support-for-selecting-render-direction.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-From 1f57703589c6d202d9f6259f1d0fefe7bfd39061 Mon Sep 17 00:00:00 2001
-From: Koen Zandberg <koen@bergzand.net>
-Date: Thu, 27 Feb 2020 16:33:06 +0100
-Subject: [PATCH] lv_refr: add support for selecting render direction
-
----
- src/lv_core/lv_refr.c | 71 ++++++++++++++++++++++++++++------------
- src/lv_hal/lv_hal_disp.h | 6 ++++
- 2 files changed, 56 insertions(+), 21 deletions(-)
-
-diff --git a/src/lv_core/lv_refr.c b/src/lv_core/lv_refr.c
-index 5ee3fbb2..e71e1629 100644
---- a/src/lv_core/lv_refr.c
-+++ b/src/lv_core/lv_refr.c
-@@ -339,30 +339,59 @@ static void lv_refr_area(const lv_area_t * area_p)
- }
- }
-
-- /*Always use the full row*/
-- lv_coord_t row;
-- lv_coord_t row_last = 0;
-- for(row = area_p->y1; row + max_row - 1 <= y2; row += max_row) {
-- /*Calc. the next y coordinates of VDB*/
-- vdb->area.x1 = area_p->x1;
-- vdb->area.x2 = area_p->x2;
-- vdb->area.y1 = row;
-- vdb->area.y2 = row + max_row - 1;
-- if(vdb->area.y2 > y2) vdb->area.y2 = y2;
-- row_last = vdb->area.y2;
-- lv_refr_area_part(area_p);
-+ if (disp_refr->render_direction) {
-+ /*Always use the full row*/
-+ lv_coord_t row;
-+ lv_coord_t row_last = y2;
-+ for(row = area_p->y2; row > max_row - 1 + area_p->y1; row -= max_row) {
-+ /*Calc. the next y coordinates of VDB*/
-+ vdb->area.x1 = area_p->x1;
-+ vdb->area.x2 = area_p->x2;
-+ vdb->area.y1 = row - max_row + 1;
-+ vdb->area.y2 = row;
-+ if(vdb->area.y2 > y2) vdb->area.y2 = y2;
-+ row_last = vdb->area.y1;
-+ lv_refr_area_part(area_p);
-+ }
-+
-+ /*If the last (first) y coordinates are not handled yet ...*/
-+ if(area_p->y1 != row_last) {
-+ /*Calc. the next y coordinates of VDB*/
-+ vdb->area.x1 = area_p->x1;
-+ vdb->area.x2 = area_p->x2;
-+ vdb->area.y1 = area_p->y1;
-+ vdb->area.y2 = row;
-+
-+ /*Refresh this part too*/
-+ lv_refr_area_part(area_p);
-+ }
- }
-+ else {
-+ /*Always use the full row*/
-+ lv_coord_t row;
-+ lv_coord_t row_last = 0;
-+ for(row = area_p->y1; row + max_row - 1 <= y2; row += max_row) {
-+ /*Calc. the next y coordinates of VDB*/
-+ vdb->area.x1 = area_p->x1;
-+ vdb->area.x2 = area_p->x2;
-+ vdb->area.y1 = row;
-+ vdb->area.y2 = row + max_row - 1;
-+ if(vdb->area.y2 > y2) vdb->area.y2 = y2;
-+ row_last = vdb->area.y2;
-+ lv_refr_area_part(area_p);
-+ }
-
-- /*If the last y coordinates are not handled yet ...*/
-- if(y2 != row_last) {
-- /*Calc. the next y coordinates of VDB*/
-- vdb->area.x1 = area_p->x1;
-- vdb->area.x2 = area_p->x2;
-- vdb->area.y1 = row;
-- vdb->area.y2 = y2;
-+ /*If the last y coordinates are not handled yet ...*/
-+ if(y2 != row_last) {
-+ /*Calc. the next y coordinates of VDB*/
-+ vdb->area.x1 = area_p->x1;
-+ vdb->area.x2 = area_p->x2;
-+ vdb->area.y1 = row;
-+ vdb->area.y2 = y2;
-
-- /*Refresh this part too*/
-- lv_refr_area_part(area_p);
-+ /*Refresh this part too*/
-+ lv_refr_area_part(area_p);
-+ }
- }
- }
- }
-diff --git a/src/lv_hal/lv_hal_disp.h b/src/lv_hal/lv_hal_disp.h
-index 8db692a0..eef22d98 100644
---- a/src/lv_hal/lv_hal_disp.h
-+++ b/src/lv_hal/lv_hal_disp.h
-@@ -143,6 +143,7 @@ typedef struct _disp_t
- uint8_t inv_area_joined[LV_INV_BUF_SIZE];
- uint32_t inv_p : 10;
-
-+ int render_direction; /**< 0 when rendering down, 1 when rendering up */
- /*Miscellaneous data*/
- uint32_t last_activity_time; /**< Last time there was activity on this display */
- } lv_disp_t;
-@@ -230,6 +231,11 @@ lv_coord_t lv_disp_get_ver_res(lv_disp_t * disp);
- */
- bool lv_disp_get_antialiasing(lv_disp_t * disp);
-
-+static inline void lv_disp_set_direction(lv_disp_t * disp, int direction)
-+{
-+ disp->render_direction = direction;
-+}
-+
- //! @cond Doxygen_Suppress
-
- /**
---
-2.24.1
-
diff --git a/src/libs/lvgl/patches/0002-fix_bug_in_animation_management_for_lv_label.patch b/src/libs/lvgl/patches/0002-fix_bug_in_animation_management_for_lv_label.patch
deleted file mode 100644
index 7b4c204a..00000000
--- a/src/libs/lvgl/patches/0002-fix_bug_in_animation_management_for_lv_label.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-Index: src/libs/lvgl/src/lv_misc/lv_anim.c
-IDEA additional info:
-Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
-<+>UTF-8
-===================================================================
-diff --git a/src/libs/lvgl/src/lv_misc/lv_anim.c b/src/libs/lvgl/src/lv_misc/lv_anim.c
---- a/src/libs/lvgl/src/lv_misc/lv_anim.c (revision 12a3b6cc8ec1fd6b951c353ab3a5fbbb9934fdd4)
-+++ b/src/libs/lvgl/src/lv_misc/lv_anim.c (date 1610901672072)
-@@ -158,12 +158,12 @@
- * @param end end value of the animation
- * @return the required time [ms] for the animation with the given parameters
- */
--uint16_t lv_anim_speed_to_time(uint16_t speed, lv_anim_value_t start, lv_anim_value_t end)
-+uint32_t lv_anim_speed_to_time(uint16_t speed, lv_anim_value_t start, lv_anim_value_t end)
- {
- int32_t d = LV_MATH_ABS((int32_t)start - end);
- uint32_t time = (int32_t)((int32_t)(d * 1000) / speed);
-
-- if(time > UINT16_MAX) time = UINT16_MAX;
-+ if(time > UINT32_MAX) time = UINT32_MAX;
-
- if(time == 0) {
- time++;
-Index: src/libs/lvgl/src/lv_misc/lv_anim.h
-IDEA additional info:
-Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
-<+>UTF-8
-===================================================================
-diff --git a/src/libs/lvgl/src/lv_misc/lv_anim.h b/src/libs/lvgl/src/lv_misc/lv_anim.h
---- a/src/libs/lvgl/src/lv_misc/lv_anim.h (revision 12a3b6cc8ec1fd6b951c353ab3a5fbbb9934fdd4)
-+++ b/src/libs/lvgl/src/lv_misc/lv_anim.h (date 1610901672076)
-@@ -73,8 +73,8 @@
- lv_anim_ready_cb_t ready_cb; /**< Call it when the animation is ready*/
- int32_t start; /**< Start value*/
- int32_t end; /**< End value*/
-- uint16_t time; /**< Animation time in ms*/
-- int16_t act_time; /**< Current time in animation. Set to negative to make delay.*/
-+ uint32_t time; /**< Animation time in ms*/
-+ int32_t act_time; /**< Current time in animation. Set to negative to make delay.*/
- uint16_t playback_pause; /**< Wait before play back*/
- uint16_t repeat_pause; /**< Wait before repeat*/
- #if LV_USE_USER_DATA
-@@ -266,7 +266,7 @@
- * @param end end value of the animation
- * @return the required time [ms] for the animation with the given parameters
- */
--uint16_t lv_anim_speed_to_time(uint16_t speed, lv_anim_value_t start, lv_anim_value_t end);
-+uint32_t lv_anim_speed_to_time(uint16_t speed, lv_anim_value_t start, lv_anim_value_t end);
-
- /**
- * Calculate the current value of an animation applying linear characteristic
diff --git a/src/libs/lvgl/porting/lv_port_disp_template.c b/src/libs/lvgl/porting/lv_port_disp_template.c
deleted file mode 100644
index 9752d5d9..00000000
--- a/src/libs/lvgl/porting/lv_port_disp_template.c
+++ /dev/null
@@ -1,196 +0,0 @@
-/**
- * @file lv_port_disp_templ.c
- *
- */
-
- /*Copy this file as "lv_port_disp.c" and set this value to "1" to enable content*/
-#if 0
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_port_disp_template.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static void disp_init(void);
-
-static void disp_flush(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p);
-#if LV_USE_GPU
-static void gpu_blend(lv_disp_drv_t * disp_drv, lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa);
-static void gpu_fill(lv_disp_drv_t * disp_drv, lv_color_t * dest_buf, lv_coord_t dest_width,
- const lv_area_t * fill_area, lv_color_t color);
-#endif
-
-/**********************
- * STATIC VARIABLES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-void lv_port_disp_init(void)
-{
- /*-------------------------
- * Initialize your display
- * -----------------------*/
- disp_init();
-
- /*-----------------------------
- * Create a buffer for drawing
- *----------------------------*/
-
- /* LittlevGL requires a buffer where it draws the objects. The buffer's has to be greater than 1 display row
- *
- * There are three buffering configurations:
- * 1. Create ONE buffer with some rows:
- * LittlevGL will draw the display's content here and writes it to your display
- *
- * 2. Create TWO buffer with some rows:
- * LittlevGL will draw the display's content to a buffer and writes it your display.
- * You should use DMA to write the buffer's content to the display.
- * It will enable LittlevGL to draw the next part of the screen to the other buffer while
- * the data is being sent form the first buffer. It makes rendering and flushing parallel.
- *
- * 3. Create TWO screen-sized buffer:
- * Similar to 2) but the buffer have to be screen sized. When LittlevGL is ready it will give the
- * whole frame to display. This way you only need to change the frame buffer's address instead of
- * copying the pixels.
- * */
-
- /* Example for 1) */
- static lv_disp_buf_t disp_buf_1;
- static lv_color_t buf1_1[LV_HOR_RES_MAX * 10]; /*A buffer for 10 rows*/
- lv_disp_buf_init(&disp_buf_1, buf1_1, NULL, LV_HOR_RES_MAX * 10); /*Initialize the display buffer*/
-
- /* Example for 2) */
- static lv_disp_buf_t disp_buf_2;
- static lv_color_t buf2_1[LV_HOR_RES_MAX * 10]; /*A buffer for 10 rows*/
- static lv_color_t buf2_2[LV_HOR_RES_MAX * 10]; /*An other buffer for 10 rows*/
- lv_disp_buf_init(&disp_buf_2, buf2_1, buf2_2, LV_HOR_RES_MAX * 10); /*Initialize the display buffer*/
-
- /* Example for 3) */
- static lv_disp_buf_t disp_buf_3;
- static lv_color_t buf3_1[LV_HOR_RES_MAX * LV_VER_RES_MAX]; /*A screen sized buffer*/
- static lv_color_t buf3_2[LV_HOR_RES_MAX * LV_VER_RES_MAX]; /*An other screen sized buffer*/
- lv_disp_buf_init(&disp_buf_3, buf3_1, buf3_2, LV_HOR_RES_MAX * LV_VER_RES_MAX); /*Initialize the display buffer*/
-
-
- /*-----------------------------------
- * Register the display in LittlevGL
- *----------------------------------*/
-
- lv_disp_drv_t disp_drv; /*Descriptor of a display driver*/
- lv_disp_drv_init(&disp_drv); /*Basic initialization*/
-
- /*Set up the functions to access to your display*/
-
- /*Set the resolution of the display*/
- disp_drv.hor_res = 480;
- disp_drv.ver_res = 320;
-
- /*Used to copy the buffer's content to the display*/
- disp_drv.flush_cb = disp_flush;
-
- /*Set a display buffer*/
- disp_drv.buffer = &disp_buf_2;
-
-#if LV_USE_GPU
- /*Optionally add functions to access the GPU. (Only in buffered mode, LV_VDB_SIZE != 0)*/
-
- /*Blend two color array using opacity*/
- disp_drv.gpu_blend_cb = gpu_blend;
-
- /*Fill a memory array with a color*/
- disp_drv.gpu_fill_cb = gpu_fill;
-#endif
-
- /*Finally register the driver*/
- lv_disp_drv_register(&disp_drv);
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/* Initialize your display and the required peripherals. */
-static void disp_init(void)
-{
- /*You code here*/
-}
-
-/* Flush the content of the internal buffer the specific area on the display
- * You can use DMA or any hardware acceleration to do this operation in the background but
- * 'lv_disp_flush_ready()' has to be called when finished. */
-static void disp_flush(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p)
-{
- /*The most simple case (but also the slowest) to put all pixels to the screen one-by-one*/
-
- int32_t x;
- int32_t y;
- for(y = area->y1; y <= area->y2; y++) {
- for(x = area->x1; x <= area->x2; x++) {
- /* Put a pixel to the display. For example: */
- /* put_px(x, y, *color_p)*/
- color_p++;
- }
- }
-
- /* IMPORTANT!!!
- * Inform the graphics library that you are ready with the flushing*/
- lv_disp_flush_ready(disp_drv);
-}
-
-
-/*OPTIONAL: GPU INTERFACE*/
-#if LV_USE_GPU
-
-/* If your MCU has hardware accelerator (GPU) then you can use it to blend to memories using opacity
- * It can be used only in buffered mode (LV_VDB_SIZE != 0 in lv_conf.h)*/
-static void gpu_blend(lv_disp_drv_t * disp_drv, lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa)
-{
- /*It's an example code which should be done by your GPU*/
- uint32_t i;
- for(i = 0; i < length; i++) {
- dest[i] = lv_color_mix(dest[i], src[i], opa);
- }
-}
-
-/* If your MCU has hardware accelerator (GPU) then you can use it to fill a memory with a color
- * It can be used only in buffered mode (LV_VDB_SIZE != 0 in lv_conf.h)*/
-static void gpu_fill(lv_disp_drv_t * disp_drv, lv_color_t * dest_buf, lv_coord_t dest_width,
- const lv_area_t * fill_area, lv_color_t color)
-{
- /*It's an example code which should be done by your GPU*/
- int32_t x, y;
- dest_buf += dest_width * fill_area->y1; /*Go to the first line*/
-
- for(y = fill_area->y1; y < fill_area->y2; y++) {
- for(x = fill_area->x1; x < fill_area->x2; x++) {
- dest_buf[x] = color;
- }
- dest_buf+=dest_width; /*Go to the next line*/
- }
-}
-
-#endif /*LV_USE_GPU*/
-
-#else /* Enable this file at the top */
-
-/* This dummy typedef exists purely to silence -Wpedantic. */
-typedef int keep_pedantic_happy;
-#endif
diff --git a/src/libs/lvgl/porting/lv_port_disp_template.h b/src/libs/lvgl/porting/lv_port_disp_template.h
deleted file mode 100644
index eeca802b..00000000
--- a/src/libs/lvgl/porting/lv_port_disp_template.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * @file lv_port_disp_templ.h
- *
- */
-
- /*Copy this file as "lv_port_disp.h" and set this value to "1" to enable content*/
-#if 0
-
-#ifndef LV_PORT_DISP_TEMPL_H
-#define LV_PORT_DISP_TEMPL_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#include "lvgl/lvgl.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_PORT_DISP_TEMPL_H*/
-
-#endif /*Disable/Enable content*/
diff --git a/src/libs/lvgl/porting/lv_port_fs_template.c b/src/libs/lvgl/porting/lv_port_fs_template.c
deleted file mode 100644
index 454899d6..00000000
--- a/src/libs/lvgl/porting/lv_port_fs_template.c
+++ /dev/null
@@ -1,379 +0,0 @@
-/**
- * @file lv_port_fs_templ.c
- *
- */
-
- /*Copy this file as "lv_port_fs.c" and set this value to "1" to enable content*/
-#if 0
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_port_fs_template.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/* Create a type to store the required data about your file.
- * If you are using a File System library
- * it already should have a File type.
- * For example FatFS has `FIL`. In this case use `typedef FIL file_t`*/
-typedef struct {
- /*Add the data you need to store about a file*/
- uint32_t dummy1;
- uint32_t dummy2;
-}file_t;
-
-/*Similarly to `file_t` create a type for directory reading too */
-typedef struct {
- /*Add the data you need to store about directory reading*/
- uint32_t dummy1;
- uint32_t dummy2;
-}dir_t;
-
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static void fs_init(void);
-
-static lv_fs_res_t fs_open (lv_fs_drv_t * drv, void * file_p, const char * path, lv_fs_mode_t mode);
-static lv_fs_res_t fs_close (lv_fs_drv_t * drv, void * file_p);
-static lv_fs_res_t fs_read (lv_fs_drv_t * drv, void * file_p, void * buf, uint32_t btr, uint32_t * br);
-static lv_fs_res_t fs_write(lv_fs_drv_t * drv, void * file_p, const void * buf, uint32_t btw, uint32_t * bw);
-static lv_fs_res_t fs_seek (lv_fs_drv_t * drv, void * file_p, uint32_t pos);
-static lv_fs_res_t fs_size (lv_fs_drv_t * drv, void * file_p, uint32_t * size_p);
-static lv_fs_res_t fs_tell (lv_fs_drv_t * drv, void * file_p, uint32_t * pos_p);
-static lv_fs_res_t fs_remove (lv_fs_drv_t * drv, const char *path);
-static lv_fs_res_t fs_trunc (lv_fs_drv_t * drv, void * file_p);
-static lv_fs_res_t fs_rename (lv_fs_drv_t * drv, const char * oldname, const char * newname);
-static lv_fs_res_t fs_free (lv_fs_drv_t * drv, uint32_t * total_p, uint32_t * free_p);
-static lv_fs_res_t fs_dir_open (lv_fs_drv_t * drv, void * rddir_p, const char *path);
-static lv_fs_res_t fs_dir_read (lv_fs_drv_t * drv, void * rddir_p, char *fn);
-static lv_fs_res_t fs_dir_close (lv_fs_drv_t * drv, void * rddir_p);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-void lv_port_fs_init(void)
-{
- /*----------------------------------------------------
- * Initialize your storage device and File System
- * -------------------------------------------------*/
- fs_init();
-
- /*---------------------------------------------------
- * Register the file system interface in LittlevGL
- *--------------------------------------------------*/
-
- /* Add a simple drive to open images */
- lv_fs_drv_t fs_drv;
- lv_fs_drv_init(&fs_drv);
-
- /*Set up fields...*/
- fs_drv.file_size = sizeof(file_t);
- fs_drv.letter = 'P';
- fs_drv.open_cb = fs_open;
- fs_drv.close_cb = fs_close;
- fs_drv.read_cb = fs_read;
- fs_drv.write_cb = fs_write;
- fs_drv.seek_cb = fs_seek;
- fs_drv.tell_cb = fs_tell;
- fs_drv.free_space_cb = fs_free;
- fs_drv.size_cb = fs_size;
- fs_drv.remove_cb = fs_remove;
- fs_drv.rename_cb = fs_rename;
- fs_drv.trunc_cb = fs_trunc;
-
- fs_drv.rddir_size = sizeof(dir_t);
- fs_drv.dir_close_cb = fs_dir_close;
- fs_drv.dir_open_cb = fs_dir_open;
- fs_drv.dir_read_cb = fs_dir_read;
-
- lv_fs_drv_register(&fs_drv);
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/* Initialize your Storage device and File system. */
-static void fs_init(void)
-{
- /*E.g. for FatFS initalize the SD card and FatFS itself*/
-
- /*You code here*/
-}
-
-/**
- * Open a file
- * @param drv pointer to a driver where this function belongs
- * @param file_p pointer to a file_t variable
- * @param path path to the file beginning with the driver letter (e.g. S:/folder/file.txt)
- * @param mode read: FS_MODE_RD, write: FS_MODE_WR, both: FS_MODE_RD | FS_MODE_WR
- * @return LV_FS_RES_OK or any error from lv_fs_res_t enum
- */
-static lv_fs_res_t fs_open (lv_fs_drv_t * drv, void * file_p, const char * path, lv_fs_mode_t mode)
-{
- lv_fs_res_t res = LV_FS_RES_NOT_IMP;
-
- if(mode == LV_FS_MODE_WR)
- {
- /*Open a file for write*/
-
- /* Add your code here*/
- }
- else if(mode == LV_FS_MODE_RD)
- {
- /*Open a file for read*/
-
- /* Add your code here*/
- }
- else if(mode == (LV_FS_MODE_WR | LV_FS_MODE_RD))
- {
- /*Open a file for read and write*/
-
- /* Add your code here*/
- }
-
- return res;
-}
-
-
-/**
- * Close an opened file
- * @param drv pointer to a driver where this function belongs
- * @param file_p pointer to a file_t variable. (opened with lv_ufs_open)
- * @return LV_FS_RES_OK: no error, the file is read
- * any error from lv_fs_res_t enum
- */
-static lv_fs_res_t fs_close (lv_fs_drv_t * drv, void * file_p)
-{
- lv_fs_res_t res = LV_FS_RES_NOT_IMP;
-
- /* Add your code here*/
-
- return res;
-}
-
-/**
- * Read data from an opened file
- * @param drv pointer to a driver where this function belongs
- * @param file_p pointer to a file_t variable.
- * @param buf pointer to a memory block where to store the read data
- * @param btr number of Bytes To Read
- * @param br the real number of read bytes (Byte Read)
- * @return LV_FS_RES_OK: no error, the file is read
- * any error from lv_fs_res_t enum
- */
-static lv_fs_res_t fs_read (lv_fs_drv_t * drv, void * file_p, void * buf, uint32_t btr, uint32_t * br)
-{
- lv_fs_res_t res = LV_FS_RES_NOT_IMP;
-
- /* Add your code here*/
-
- return res;
-}
-
-/**
- * Write into a file
- * @param drv pointer to a driver where this function belongs
- * @param file_p pointer to a file_t variable
- * @param buf pointer to a buffer with the bytes to write
- * @param btr Bytes To Write
- * @param br the number of real written bytes (Bytes Written). NULL if unused.
- * @return LV_FS_RES_OK or any error from lv_fs_res_t enum
- */
-static lv_fs_res_t fs_write(lv_fs_drv_t * drv, void * file_p, const void * buf, uint32_t btw, uint32_t * bw)
-{
- lv_fs_res_t res = LV_FS_RES_NOT_IMP;
-
- /* Add your code here*/
-
- return res;
-}
-
-/**
- * Set the read write pointer. Also expand the file size if necessary.
- * @param drv pointer to a driver where this function belongs
- * @param file_p pointer to a file_t variable. (opened with lv_ufs_open )
- * @param pos the new position of read write pointer
- * @return LV_FS_RES_OK: no error, the file is read
- * any error from lv_fs_res_t enum
- */
-static lv_fs_res_t fs_seek (lv_fs_drv_t * drv, void * file_p, uint32_t pos)
-{
- lv_fs_res_t res = LV_FS_RES_NOT_IMP;
-
- /* Add your code here*/
-
- return res;
-}
-
-/**
- * Give the size of a file bytes
- * @param drv pointer to a driver where this function belongs
- * @param file_p pointer to a file_t variable
- * @param size pointer to a variable to store the size
- * @return LV_FS_RES_OK or any error from lv_fs_res_t enum
- */
-static lv_fs_res_t fs_size (lv_fs_drv_t * drv, void * file_p, uint32_t * size_p)
-{
- lv_fs_res_t res = LV_FS_RES_NOT_IMP;
-
- /* Add your code here*/
-
- return res;
-}
-/**
- * Give the position of the read write pointer
- * @param drv pointer to a driver where this function belongs
- * @param file_p pointer to a file_t variable.
- * @param pos_p pointer to to store the result
- * @return LV_FS_RES_OK: no error, the file is read
- * any error from lv_fs_res_t enum
- */
-static lv_fs_res_t fs_tell (lv_fs_drv_t * drv, void * file_p, uint32_t * pos_p)
-{
- lv_fs_res_t res = LV_FS_RES_NOT_IMP;
-
- /* Add your code here*/
-
- return res;
-}
-
-/**
- * Delete a file
- * @param drv pointer to a driver where this function belongs
- * @param path path of the file to delete
- * @return LV_FS_RES_OK or any error from lv_fs_res_t enum
- */
-static lv_fs_res_t fs_remove (lv_fs_drv_t * drv, const char *path)
-{
- lv_fs_res_t res = LV_FS_RES_NOT_IMP;
-
- /* Add your code here*/
-
- return res;
-}
-
-/**
- * Truncate the file size to the current position of the read write pointer
- * @param drv pointer to a driver where this function belongs
- * @param file_p pointer to an 'ufs_file_t' variable. (opened with lv_fs_open )
- * @return LV_FS_RES_OK: no error, the file is read
- * any error from lv_fs_res_t enum
- */
-static lv_fs_res_t fs_trunc (lv_fs_drv_t * drv, void * file_p)
-{
- lv_fs_res_t res = LV_FS_RES_NOT_IMP;
-
- /* Add your code here*/
-
- return res;
-}
-
-/**
- * Rename a file
- * @param drv pointer to a driver where this function belongs
- * @param oldname path to the file
- * @param newname path with the new name
- * @return LV_FS_RES_OK or any error from 'fs_res_t'
- */
-static lv_fs_res_t fs_rename (lv_fs_drv_t * drv, const char * oldname, const char * newname)
-{
- lv_fs_res_t res = LV_FS_RES_NOT_IMP;
-
- /* Add your code here*/
-
- return res;
-}
-
-/**
- * Get the free and total size of a driver in kB
- * @param drv pointer to a driver where this function belongs
- * @param letter the driver letter
- * @param total_p pointer to store the total size [kB]
- * @param free_p pointer to store the free size [kB]
- * @return LV_FS_RES_OK or any error from lv_fs_res_t enum
- */
-static lv_fs_res_t fs_free (lv_fs_drv_t * drv, uint32_t * total_p, uint32_t * free_p)
-{
- lv_fs_res_t res = LV_FS_RES_NOT_IMP;
-
- /* Add your code here*/
-
- return res;
-}
-
-/**
- * Initialize a 'fs_read_dir_t' variable for directory reading
- * @param drv pointer to a driver where this function belongs
- * @param rddir_p pointer to a 'fs_read_dir_t' variable
- * @param path path to a directory
- * @return LV_FS_RES_OK or any error from lv_fs_res_t enum
- */
-static lv_fs_res_t fs_dir_open (lv_fs_drv_t * drv, void * rddir_p, const char *path)
-{
- lv_fs_res_t res = LV_FS_RES_NOT_IMP;
-
- /* Add your code here*/
-
- return res;
-}
-
-/**
- * Read the next filename form a directory.
- * The name of the directories will begin with '/'
- * @param drv pointer to a driver where this function belongs
- * @param rddir_p pointer to an initialized 'fs_read_dir_t' variable
- * @param fn pointer to a buffer to store the filename
- * @return LV_FS_RES_OK or any error from lv_fs_res_t enum
- */
-static lv_fs_res_t fs_dir_read (lv_fs_drv_t * drv, void * rddir_p, char *fn)
-{
- lv_fs_res_t res = LV_FS_RES_NOT_IMP;
-
- /* Add your code here*/
-
- return res;
-}
-
-/**
- * Close the directory reading
- * @param drv pointer to a driver where this function belongs
- * @param rddir_p pointer to an initialized 'fs_read_dir_t' variable
- * @return LV_FS_RES_OK or any error from lv_fs_res_t enum
- */
-static lv_fs_res_t fs_dir_close (lv_fs_drv_t * drv, void * rddir_p)
-{
- lv_fs_res_t res = LV_FS_RES_NOT_IMP;
-
- /* Add your code here*/
-
- return res;
-}
-
-#else /* Enable this file at the top */
-
-/* This dummy typedef exists purely to silence -Wpedantic. */
-typedef int keep_pedantic_happy;
-#endif
diff --git a/src/libs/lvgl/porting/lv_port_fs_template.h b/src/libs/lvgl/porting/lv_port_fs_template.h
deleted file mode 100644
index 7db06f65..00000000
--- a/src/libs/lvgl/porting/lv_port_fs_template.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * @file lv_port_fs_templ.h
- *
- */
-
- /*Copy this file as "lv_port_fs.h" and set this value to "1" to enable content*/
-#if 0
-
-#ifndef LV_PORT_FS_TEMPL_H
-#define LV_PORT_FS_TEMPL_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#include "lvgl/lvgl.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_PORT_FS_TEMPL_H*/
-
-#endif /*Disable/Enable content*/
diff --git a/src/libs/lvgl/porting/lv_port_indev_template.c b/src/libs/lvgl/porting/lv_port_indev_template.c
deleted file mode 100644
index 54b8c9fd..00000000
--- a/src/libs/lvgl/porting/lv_port_indev_template.c
+++ /dev/null
@@ -1,428 +0,0 @@
-/**
- * @file lv_port_indev_templ.c
- *
- */
-
- /*Copy this file as "lv_port_indev.c" and set this value to "1" to enable content*/
-#if 0
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_port_indev_template.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-
-static void touchpad_init(void);
-static bool touchpad_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data);
-static bool touchpad_is_pressed(void);
-static void touchpad_get_xy(lv_coord_t * x, lv_coord_t * y);
-
-static void mouse_init(void);
-static bool mouse_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data);
-static bool mouse_is_pressed(void);
-static void mouse_get_xy(lv_coord_t * x, lv_coord_t * y);
-
-static void keypad_init(void);
-static bool keypad_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data);
-static uint32_t keypad_get_key(void);
-
-static void encoder_init(void);
-static bool encoder_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data);
-static void encoder_handler(void);
-
-static void button_init(void);
-static bool button_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data);
-static int8_t button_get_pressed_id(void);
-static bool button_is_pressed(uint8_t id);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-lv_indev_t * indev_touchpad;
-lv_indev_t * indev_mouse;
-lv_indev_t * indev_keypad;
-lv_indev_t * indev_encoder;
-lv_indev_t * indev_button;
-
-static int32_t encoder_diff;
-static lv_indev_state_t encoder_state;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-void lv_port_indev_init(void)
-{
- /* Here you will find example implementation of input devices supported by LittelvGL:
- * - Touchpad
- * - Mouse (with cursor support)
- * - Keypad (supports GUI usage only with key)
- * - Encoder (supports GUI usage only with: left, right, push)
- * - Button (external buttons to press points on the screen)
- *
- * The `..._read()` function are only examples.
- * You should shape them according to your hardware
- */
-
-
- lv_indev_drv_t indev_drv;
-
- /*------------------
- * Touchpad
- * -----------------*/
-
- /*Initialize your touchpad if you have*/
- touchpad_init();
-
- /*Register a touchpad input device*/
- lv_indev_drv_init(&indev_drv);
- indev_drv.type = LV_INDEV_TYPE_POINTER;
- indev_drv.read_cb = touchpad_read;
- indev_touchpad = lv_indev_drv_register(&indev_drv);
-
- /*------------------
- * Mouse
- * -----------------*/
-
- /*Initialize your touchpad if you have*/
- mouse_init();
-
- /*Register a mouse input device*/
- lv_indev_drv_init(&indev_drv);
- indev_drv.type = LV_INDEV_TYPE_POINTER;
- indev_drv.read_cb = mouse_read;
- indev_mouse = lv_indev_drv_register(&indev_drv);
-
- /*Set cursor. For simplicity set a HOME symbol now.*/
- lv_obj_t * mouse_cursor = lv_img_create(lv_disp_get_scr_act(NULL), NULL);
- lv_img_set_src(mouse_cursor, LV_SYMBOL_HOME);
- lv_indev_set_cursor(indev_mouse, mouse_cursor);
-
- /*------------------
- * Keypad
- * -----------------*/
-
- /*Initialize your keypad or keyboard if you have*/
- keypad_init();
-
- /*Register a keypad input device*/
- lv_indev_drv_init(&indev_drv);
- indev_drv.type = LV_INDEV_TYPE_KEYPAD;
- indev_drv.read_cb = keypad_read;
- indev_keypad = lv_indev_drv_register(&indev_drv);
-
- /* Later you should create group(s) with `lv_group_t * group = lv_group_create()`,
- * add objects to the group with `lv_group_add_obj(group, obj)`
- * and assign this input device to group to navigate in it:
- * `lv_indev_set_group(indev_keypad, group);` */
-
- /*------------------
- * Encoder
- * -----------------*/
-
- /*Initialize your encoder if you have*/
- encoder_init();
-
- /*Register a encoder input device*/
- lv_indev_drv_init(&indev_drv);
- indev_drv.type = LV_INDEV_TYPE_KEYPAD;
- indev_drv.read_cb = encoder_read;
- indev_encoder = lv_indev_drv_register(&indev_drv);
-
- /* Later you should create group(s) with `lv_group_t * group = lv_group_create()`,
- * add objects to the group with `lv_group_add_obj(group, obj)`
- * and assign this input device to group to navigate in it:
- * `lv_indev_set_group(indev_keypad, group);` */
-
- /*------------------
- * Button
- * -----------------*/
-
- /*Initialize your button if you have*/
- button_init();
-
- /*Register a button input device*/
- lv_indev_drv_init(&indev_drv);
- indev_drv.type = LV_INDEV_TYPE_BUTTON;
- indev_drv.read_cb = button_read;
- indev_button = lv_indev_drv_register(&indev_drv);
-
- /*Assign buttons to points on the screen*/
- static const lv_point_t btn_points[2] = {
- {10, 10}, /*Button 0 -> x:10; y:10*/
- {40, 100}, /*Button 1 -> x:40; y:100*/
- };
- lv_indev_set_button_points(indev_button, btn_points);
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-
-
-/*------------------
- * Touchpad
- * -----------------*/
-
-/*Initialize your touchpad*/
-static void touchpad_init(void)
-{
- /*Your code comes here*/
-}
-
-/* Will be called by the library to read the touchpad */
-static bool touchpad_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data)
-{
- static lv_coord_t last_x = 0;
- static lv_coord_t last_y = 0;
-
- /*Save the pressed coordinates and the state*/
- if(touchpad_is_pressed()) {
- touchpad_get_xy(&last_x, &last_y);
- data->state = LV_INDEV_STATE_PR;
- } else {
- data->state = LV_INDEV_STATE_REL;
- }
-
- /*Set the last pressed coordinates*/
- data->point.x = last_x;
- data->point.y = last_y;
-
- /*Return `false` because we are not buffering and no more data to read*/
- return false;
-}
-
-/*Return true is the touchpad is pressed*/
-static bool touchpad_is_pressed(void)
-{
- /*Your code comes here*/
-
- return false;
-}
-
-/*Get the x and y coordinates if the touchpad is pressed*/
-static void touchpad_get_xy(lv_coord_t * x, lv_coord_t * y)
-{
- /*Your code comes here*/
-
- (*x) = 0;
- (*y) = 0;
-}
-
-
-/*------------------
- * Mouse
- * -----------------*/
-
-/* Initialize your mouse */
-static void mouse_init(void)
-{
- /*Your code comes here*/
-}
-
-/* Will be called by the library to read the mouse */
-static bool mouse_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data)
-{
- /*Get the current x and y coordinates*/
- mouse_get_xy(&data->point.x, &data->point.y);
-
- /*Get whether the mouse button is pressed or released*/
- if(mouse_is_pressed()) {
- data->state = LV_INDEV_STATE_PR;
- } else {
- data->state = LV_INDEV_STATE_REL;
- }
-
- /*Return `false` because we are not buffering and no more data to read*/
- return false;
-}
-
-/*Return true is the mouse button is pressed*/
-static bool mouse_is_pressed(void)
-{
- /*Your code comes here*/
-
- return false;
-}
-
-/*Get the x and y coordinates if the mouse is pressed*/
-static void mouse_get_xy(lv_coord_t * x, lv_coord_t * y)
-{
- /*Your code comes here*/
-
- (*x) = 0;
- (*y) = 0;
-}
-
-/*------------------
- * Keypad
- * -----------------*/
-
-/* Initialize your keypad */
-static void keypad_init(void)
-{
- /*Your code comes here*/
-}
-
-/* Will be called by the library to read the mouse */
-static bool keypad_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data)
-{
- static uint32_t last_key = 0;
-
- /*Get the current x and y coordinates*/
- mouse_get_xy(&data->point.x, &data->point.y);
-
- /*Get whether the a key is pressed and save the pressed key*/
- uint32_t act_key = keypad_get_key();
- if(act_key != 0) {
- data->state = LV_INDEV_STATE_PR;
-
- /*Translate the keys to LittlevGL control characters according to your key definitions*/
- switch(act_key) {
- case 1:
- act_key = LV_KEY_NEXT;
- break;
- case 2:
- act_key = LV_KEY_PREV;
- break;
- case 3:
- act_key = LV_KEY_LEFT;
- break;
- case 4:
- act_key = LV_KEY_RIGHT;
- break;
- case 5:
- act_key = LV_KEY_ENTER;
- break;
- }
-
- last_key = act_key;
- } else {
- data->state = LV_INDEV_STATE_REL;
- }
-
- data->key = last_key;
-
- /*Return `false` because we are not buffering and no more data to read*/
- return false;
-}
-
-/*Get the currently being pressed key. 0 if no key is pressed*/
-static uint32_t keypad_get_key(void)
-{
- /*Your code comes here*/
-
- return 0;
-}
-
-/*------------------
- * Encoder
- * -----------------*/
-
-/* Initialize your keypad */
-static void encoder_init(void)
-{
- /*Your code comes here*/
-}
-
-/* Will be called by the library to read the encoder */
-static bool encoder_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data)
-{
-
- data->enc_diff = encoder_diff;
- data->state = encoder_state;
-
- /*Return `false` because we are not buffering and no more data to read*/
- return false;
-}
-
-/*Call this function in an interrupt to process encoder events (turn, press)*/
-static void encoder_handler(void)
-{
- /*Your code comes here*/
-
- encoder_diff += 0;
- encoder_state = LV_INDEV_STATE_REL;
-}
-
-
-/*------------------
- * Button
- * -----------------*/
-
-/* Initialize your buttons */
-static void button_init(void)
-{
- /*Your code comes here*/
-}
-
-/* Will be called by the library to read the button */
-static bool button_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data)
-{
-
- static uint8_t last_btn = 0;
-
- /*Get the pressed button's ID*/
- int8_t btn_act = button_get_pressed_id();
-
- if(btn_act >= 0) {
- data->state = LV_INDEV_STATE_PR;
- last_btn = btn_act;
- } else {
- data->state = LV_INDEV_STATE_REL;
- }
-
- /*Save the last pressed button's ID*/
- data->btn_id = last_btn;
-
- /*Return `false` because we are not buffering and no more data to read*/
- return false;
-}
-
-/*Get ID (0, 1, 2 ..) of the pressed button*/
-static int8_t button_get_pressed_id(void)
-{
- uint8_t i;
-
- /*Check to buttons see which is being pressed (assume there are 2 buttons)*/
- for(i = 0; i < 2; i++) {
- /*Return the pressed button's ID*/
- if(button_is_pressed(i)) {
- return i;
- }
- }
-
- /*No button pressed*/
- return -1;
-}
-
-/*Test if `id` button is pressed or not*/
-static bool button_is_pressed(uint8_t id)
-{
-
- /*Your code comes here*/
-
- return false;
-}
-
-#else /* Enable this file at the top */
-
-/* This dummy typedef exists purely to silence -Wpedantic. */
-typedef int keep_pedantic_happy;
-#endif
diff --git a/src/libs/lvgl/porting/lv_port_indev_template.h b/src/libs/lvgl/porting/lv_port_indev_template.h
deleted file mode 100644
index ca0274e8..00000000
--- a/src/libs/lvgl/porting/lv_port_indev_template.h
+++ /dev/null
@@ -1,45 +0,0 @@
-
-/**
- * @file lv_port_indev_templ.h
- *
- */
-
- /*Copy this file as "lv_port_indev.h" and set this value to "1" to enable content*/
-#if 0
-
-#ifndef LV_PORT_INDEV_TEMPL_H
-#define LV_PORT_INDEV_TEMPL_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#include "lvgl/lvgl.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_PORT_INDEV_TEMPL_H*/
-
-#endif /*Disable/Enable content*/
diff --git a/src/libs/lvgl/scripts/Doxyfile b/src/libs/lvgl/scripts/Doxyfile
deleted file mode 100644
index 7120f5d2..00000000
--- a/src/libs/lvgl/scripts/Doxyfile
+++ /dev/null
@@ -1,2455 +0,0 @@
-# Doxyfile 1.8.13
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project.
-#
-# All text after a double hash (##) is considered a comment and is placed in
-# front of the TAG it is preceding.
-#
-# All text after a single hash (#) is considered a comment and will be ignored.
-# The format is:
-# TAG = value [value, ...]
-# For lists, items can also be appended using:
-# TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (\" \").
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all text
-# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
-# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
-# for the list of possible encodings.
-# The default value is: UTF-8.
-
-DOXYFILE_ENCODING = UTF-8
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
-# double-quotes, unless you are using Doxywizard) that should identify the
-# project for which the documentation is generated. This name is used in the
-# title of most generated pages and in a few other places.
-# The default value is: My Project.
-
-PROJECT_NAME = "LittlevGL"
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
-# could be handy for archiving the generated documentation or if some version
-# control system is used.
-
-PROJECT_NUMBER =
-
-# Using the PROJECT_BRIEF tag one can provide an optional one line description
-# for a project that appears at the top of each page and should give viewer a
-# quick idea about the purpose of the project. Keep the description short.
-
-PROJECT_BRIEF =
-
-# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
-# in the documentation. The maximum height of the logo should not exceed 55
-# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
-# the logo to the output directory.
-
-PROJECT_LOGO =
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
-# into which the generated documentation will be written. If a relative path is
-# entered, it will be relative to the location where doxygen was started. If
-# left blank the current directory will be used.
-
-OUTPUT_DIRECTORY = ../docs/api_doc
-
-# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
-# directories (in 2 levels) under the output directory of each output format and
-# will distribute the generated files over these directories. Enabling this
-# option can be useful when feeding doxygen a huge amount of source files, where
-# putting all generated files in the same directory would otherwise causes
-# performance problems for the file system.
-# The default value is: NO.
-
-CREATE_SUBDIRS = NO
-
-# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
-# characters to appear in the names of generated files. If set to NO, non-ASCII
-# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode
-# U+3044.
-# The default value is: NO.
-
-ALLOW_UNICODE_NAMES = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
-# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
-# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
-# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
-# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
-# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
-# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
-# Ukrainian and Vietnamese.
-# The default value is: English.
-
-OUTPUT_LANGUAGE = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
-# descriptions after the members that are listed in the file and class
-# documentation (similar to Javadoc). Set to NO to disable this.
-# The default value is: YES.
-
-BRIEF_MEMBER_DESC = YES
-
-# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief
-# description of a member or function before the detailed description
-#
-# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-# brief descriptions will be completely suppressed.
-# The default value is: YES.
-
-REPEAT_BRIEF = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator that is
-# used to form the text in various listings. Each string in this list, if found
-# as the leading text of the brief description, will be stripped from the text
-# and the result, after processing the whole list, is used as the annotated
-# text. Otherwise, the brief description is used as-is. If left blank, the
-# following values are used ($name is automatically replaced with the name of
-# the entity):The $name class, The $name widget, The $name file, is, provides,
-# specifies, contains, represents, a, an and the.
-
-ABBREVIATE_BRIEF = "The $name class" \
- "The $name widget" \
- "The $name file" \
- is \
- provides \
- specifies \
- contains \
- represents \
- a \
- an \
- the
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# doxygen will generate a detailed section even if there is only a brief
-# description.
-# The default value is: NO.
-
-ALWAYS_DETAILED_SEC = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
-# operators of the base classes will not be shown.
-# The default value is: NO.
-
-INLINE_INHERITED_MEMB = NO
-
-# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path
-# before files name in the file list and in the header files. If set to NO the
-# shortest path that makes the file name unique will be used
-# The default value is: YES.
-
-FULL_PATH_NAMES = YES
-
-# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
-# Stripping is only done if one of the specified strings matches the left-hand
-# part of the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the path to
-# strip.
-#
-# Note that you can specify absolute paths here, but also relative paths, which
-# will be relative from the directory where doxygen is started.
-# This tag requires that the tag FULL_PATH_NAMES is set to YES.
-
-STRIP_FROM_PATH =
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
-# path mentioned in the documentation of a class, which tells the reader which
-# header file to include in order to use a class. If left blank only the name of
-# the header file containing the class definition is used. Otherwise one should
-# specify the list of include paths that are normally passed to the compiler
-# using the -I flag.
-
-STRIP_FROM_INC_PATH =
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
-# less readable) file names. This can be useful is your file systems doesn't
-# support long names like on DOS, Mac, or CD-ROM.
-# The default value is: NO.
-
-SHORT_NAMES = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
-# first line (until the first dot) of a Javadoc-style comment as the brief
-# description. If set to NO, the Javadoc-style will behave just like regular Qt-
-# style comments (thus requiring an explicit @brief command for a brief
-# description.)
-# The default value is: NO.
-
-JAVADOC_AUTOBRIEF = NO
-
-# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
-# line (until the first dot) of a Qt-style comment as the brief description. If
-# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
-# requiring an explicit \brief command for a brief description.)
-# The default value is: NO.
-
-QT_AUTOBRIEF = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
-# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
-# a brief description. This used to be the default behavior. The new default is
-# to treat a multi-line C++ comment block as a detailed description. Set this
-# tag to YES if you prefer the old behavior instead.
-#
-# Note that setting this tag to YES also means that rational rose comments are
-# not recognized any more.
-# The default value is: NO.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
-# documentation from any documented member that it re-implements.
-# The default value is: YES.
-
-INHERIT_DOCS = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new
-# page for each member. If set to NO, the documentation of a member will be part
-# of the file/class/namespace that contains it.
-# The default value is: NO.
-
-SEPARATE_MEMBER_PAGES = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
-# uses this value to replace tabs by spaces in code fragments.
-# Minimum value: 1, maximum value: 16, default value: 4.
-
-TAB_SIZE = 4
-
-# This tag can be used to specify a number of aliases that act as commands in
-# the documentation. An alias has the form:
-# name=value
-# For example adding
-# "sideeffect=@par Side Effects:\n"
-# will allow you to put the command \sideeffect (or @sideeffect) in the
-# documentation, which will result in a user-defined paragraph with heading
-# "Side Effects:". You can put \n's in the value part of an alias to insert
-# newlines.
-
-ALIASES =
-
-# This tag can be used to specify a number of word-keyword mappings (TCL only).
-# A mapping has the form "name=value". For example adding "class=itcl::class"
-# will allow you to use the command class in the itcl::class meaning.
-
-TCL_SUBST =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
-# only. Doxygen will then generate output that is more tailored for C. For
-# instance, some of the names that are used will be different. The list of all
-# members will be omitted, etc.
-# The default value is: NO.
-
-OPTIMIZE_OUTPUT_FOR_C = YES
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
-# Python sources only. Doxygen will then generate output that is more tailored
-# for that language. For instance, namespaces will be presented as packages,
-# qualified scopes will look different, etc.
-# The default value is: NO.
-
-OPTIMIZE_OUTPUT_JAVA = NO
-
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-# sources. Doxygen will then generate output that is tailored for Fortran.
-# The default value is: NO.
-
-OPTIMIZE_FOR_FORTRAN = NO
-
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-# sources. Doxygen will then generate output that is tailored for VHDL.
-# The default value is: NO.
-
-OPTIMIZE_OUTPUT_VHDL = NO
-
-# Doxygen selects the parser to use depending on the extension of the files it
-# parses. With this tag you can assign which parser to use for a given
-# extension. Doxygen has a built-in mapping, but you can override or extend it
-# using this tag. The format is ext=language, where ext is a file extension, and
-# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
-# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
-# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
-# Fortran. In the later case the parser tries to guess whether the code is fixed
-# or free formatted code, this is the default for Fortran type files), VHDL. For
-# instance to make doxygen treat .inc files as Fortran files (default is PHP),
-# and .f files as C (default is Fortran), use: inc=Fortran f=C.
-#
-# Note: For files without extension you can use no_extension as a placeholder.
-#
-# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
-# the files are not read by doxygen.
-
-EXTENSION_MAPPING =
-
-# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
-# according to the Markdown format, which allows for more readable
-# documentation. See http://daringfireball.net/projects/markdown/ for details.
-# The output of markdown processing is further processed by doxygen, so you can
-# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
-# case of backward compatibilities issues.
-# The default value is: YES.
-
-MARKDOWN_SUPPORT = YES
-
-# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up
-# to that level are automatically included in the table of contents, even if
-# they do not have an id attribute.
-# Note: This feature currently applies only to Markdown headings.
-# Minimum value: 0, maximum value: 99, default value: 0.
-# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.
-
-TOC_INCLUDE_HEADINGS = 0
-
-# When enabled doxygen tries to link words that correspond to documented
-# classes, or namespaces to their corresponding documentation. Such a link can
-# be prevented in individual cases by putting a % sign in front of the word or
-# globally by setting AUTOLINK_SUPPORT to NO.
-# The default value is: YES.
-
-AUTOLINK_SUPPORT = YES
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
-# to include (a tag file for) the STL sources as input, then you should set this
-# tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string);
-# versus func(std::string) {}). This also make the inheritance and collaboration
-# diagrams that involve STL classes more complete and accurate.
-# The default value is: NO.
-
-BUILTIN_STL_SUPPORT = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-# The default value is: NO.
-
-CPP_CLI_SUPPORT = NO
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
-# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
-# will parse them like normal C++ but will assume all classes use public instead
-# of private inheritance when no explicit protection keyword is present.
-# The default value is: NO.
-
-SIP_SUPPORT = NO
-
-# For Microsoft's IDL there are propget and propput attributes to indicate
-# getter and setter methods for a property. Setting this option to YES will make
-# doxygen to replace the get and set methods by a property in the documentation.
-# This will only work if the methods are indeed getting or setting a simple
-# type. If this is not the case, or you want to show the methods anyway, you
-# should set this option to NO.
-# The default value is: YES.
-
-IDL_PROPERTY_SUPPORT = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-# The default value is: NO.
-
-DISTRIBUTE_GROUP_DOC = NO
-
-# If one adds a struct or class to a group and this option is enabled, then also
-# any nested class or struct is added to the same group. By default this option
-# is disabled and one has to add nested compounds explicitly via \ingroup.
-# The default value is: NO.
-
-GROUP_NESTED_COMPOUNDS = NO
-
-# Set the SUBGROUPING tag to YES to allow class member groups of the same type
-# (for instance a group of public functions) to be put as a subgroup of that
-# type (e.g. under the Public Functions section). Set it to NO to prevent
-# subgrouping. Alternatively, this can be done per class using the
-# \nosubgrouping command.
-# The default value is: YES.
-
-SUBGROUPING = YES
-
-# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
-# are shown inside the group in which they are included (e.g. using \ingroup)
-# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
-# and RTF).
-#
-# Note that this feature does not work in combination with
-# SEPARATE_MEMBER_PAGES.
-# The default value is: NO.
-
-INLINE_GROUPED_CLASSES = NO
-
-# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
-# with only public data fields or simple typedef fields will be shown inline in
-# the documentation of the scope in which they are defined (i.e. file,
-# namespace, or group documentation), provided this scope is documented. If set
-# to NO, structs, classes, and unions are shown on a separate page (for HTML and
-# Man pages) or section (for LaTeX and RTF).
-# The default value is: NO.
-
-INLINE_SIMPLE_STRUCTS = NO
-
-# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
-# enum is documented as struct, union, or enum with the name of the typedef. So
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
-# with name TypeT. When disabled the typedef will appear as a member of a file,
-# namespace, or class. And the struct will be named TypeS. This can typically be
-# useful for C code in case the coding convention dictates that all compound
-# types are typedef'ed and only the typedef is referenced, never the tag name.
-# The default value is: NO.
-
-TYPEDEF_HIDES_STRUCT = NO
-
-# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
-# cache is used to resolve symbols given their name and scope. Since this can be
-# an expensive process and often the same symbol appears multiple times in the
-# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
-# doxygen will become slower. If the cache is too large, memory is wasted. The
-# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
-# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
-# symbols. At the end of a run doxygen will report the cache usage and suggest
-# the optimal cache size from a speed point of view.
-# Minimum value: 0, maximum value: 9, default value: 0.
-
-LOOKUP_CACHE_SIZE = 0
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in
-# documentation are documented, even if no documentation was available. Private
-# class members and static file members will be hidden unless the
-# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
-# Note: This will also disable the warnings about undocumented members that are
-# normally produced when WARNINGS is set to YES.
-# The default value is: NO.
-
-EXTRACT_ALL = NO
-
-# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
-# be included in the documentation.
-# The default value is: NO.
-
-EXTRACT_PRIVATE = NO
-
-# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
-# scope will be included in the documentation.
-# The default value is: NO.
-
-EXTRACT_PACKAGE = NO
-
-# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be
-# included in the documentation.
-# The default value is: NO.
-
-EXTRACT_STATIC = NO
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
-# locally in source files will be included in the documentation. If set to NO,
-# only classes defined in header files are included. Does not have any effect
-# for Java sources.
-# The default value is: YES.
-
-EXTRACT_LOCAL_CLASSES = YES
-
-# This flag is only useful for Objective-C code. If set to YES, local methods,
-# which are defined in the implementation section but not in the interface are
-# included in the documentation. If set to NO, only methods in the interface are
-# included.
-# The default value is: NO.
-
-EXTRACT_LOCAL_METHODS = NO
-
-# If this flag is set to YES, the members of anonymous namespaces will be
-# extracted and appear in the documentation as a namespace called
-# 'anonymous_namespace{file}', where file will be replaced with the base name of
-# the file that contains the anonymous namespace. By default anonymous namespace
-# are hidden.
-# The default value is: NO.
-
-EXTRACT_ANON_NSPACES = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
-# undocumented members inside documented classes or files. If set to NO these
-# members will be included in the various overviews, but no documentation
-# section is generated. This option has no effect if EXTRACT_ALL is enabled.
-# The default value is: NO.
-
-HIDE_UNDOC_MEMBERS = NO
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy. If set
-# to NO, these classes will be included in the various overviews. This option
-# has no effect if EXTRACT_ALL is enabled.
-# The default value is: NO.
-
-HIDE_UNDOC_CLASSES = NO
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
-# (class|struct|union) declarations. If set to NO, these declarations will be
-# included in the documentation.
-# The default value is: NO.
-
-HIDE_FRIEND_COMPOUNDS = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
-# documentation blocks found inside the body of a function. If set to NO, these
-# blocks will be appended to the function's detailed documentation block.
-# The default value is: NO.
-
-HIDE_IN_BODY_DOCS = NO
-
-# The INTERNAL_DOCS tag determines if documentation that is typed after a
-# \internal command is included. If the tag is set to NO then the documentation
-# will be excluded. Set it to YES to include the internal documentation.
-# The default value is: NO.
-
-INTERNAL_DOCS = YES
-
-# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
-# names in lower-case letters. If set to YES, upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
-# The default value is: system dependent.
-
-CASE_SENSE_NAMES = YES
-
-# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
-# their full class and namespace scopes in the documentation. If set to YES, the
-# scope will be hidden.
-# The default value is: NO.
-
-HIDE_SCOPE_NAMES = NO
-
-# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will
-# append additional text to a page's title, such as Class Reference. If set to
-# YES the compound reference will be hidden.
-# The default value is: NO.
-
-HIDE_COMPOUND_REFERENCE= NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
-# the files that are included by a file in the documentation of that file.
-# The default value is: YES.
-
-SHOW_INCLUDE_FILES = YES
-
-# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
-# grouped member an include statement to the documentation, telling the reader
-# which file to include in order to use the member.
-# The default value is: NO.
-
-SHOW_GROUPED_MEMB_INC = NO
-
-# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
-# files with double quotes in the documentation rather than with sharp brackets.
-# The default value is: NO.
-
-FORCE_LOCAL_INCLUDES = NO
-
-# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
-# documentation for inline members.
-# The default value is: YES.
-
-INLINE_INFO = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
-# (detailed) documentation of file and class members alphabetically by member
-# name. If set to NO, the members will appear in declaration order.
-# The default value is: YES.
-
-SORT_MEMBER_DOCS = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
-# descriptions of file, namespace and class members alphabetically by member
-# name. If set to NO, the members will appear in declaration order. Note that
-# this will also influence the order of the classes in the class list.
-# The default value is: NO.
-
-SORT_BRIEF_DOCS = NO
-
-# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
-# (brief and detailed) documentation of class members so that constructors and
-# destructors are listed first. If set to NO the constructors will appear in the
-# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
-# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
-# member documentation.
-# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
-# detailed member documentation.
-# The default value is: NO.
-
-SORT_MEMBERS_CTORS_1ST = NO
-
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
-# of group names into alphabetical order. If set to NO the group names will
-# appear in their defined order.
-# The default value is: NO.
-
-SORT_GROUP_NAMES = NO
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
-# fully-qualified names, including namespaces. If set to NO, the class list will
-# be sorted only by class name, not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the alphabetical
-# list.
-# The default value is: NO.
-
-SORT_BY_SCOPE_NAME = NO
-
-# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
-# type resolution of all parameters of a function it will reject a match between
-# the prototype and the implementation of a member function even if there is
-# only one candidate or it is obvious which candidate to choose by doing a
-# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
-# accept a match between prototype and implementation in such cases.
-# The default value is: NO.
-
-STRICT_PROTO_MATCHING = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo
-# list. This list is created by putting \todo commands in the documentation.
-# The default value is: YES.
-
-GENERATE_TODOLIST = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test
-# list. This list is created by putting \test commands in the documentation.
-# The default value is: YES.
-
-GENERATE_TESTLIST = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug
-# list. This list is created by putting \bug commands in the documentation.
-# The default value is: YES.
-
-GENERATE_BUGLIST = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO)
-# the deprecated list. This list is created by putting \deprecated commands in
-# the documentation.
-# The default value is: YES.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional documentation
-# sections, marked by \if <section_label> ... \endif and \cond <section_label>
-# ... \endcond blocks.
-
-ENABLED_SECTIONS =
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
-# initial value of a variable or macro / define can have for it to appear in the
-# documentation. If the initializer consists of more lines than specified here
-# it will be hidden. Use a value of 0 to hide initializers completely. The
-# appearance of the value of individual variables and macros / defines can be
-# controlled using \showinitializer or \hideinitializer command in the
-# documentation regardless of this setting.
-# Minimum value: 0, maximum value: 10000, default value: 30.
-
-MAX_INITIALIZER_LINES = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
-# the bottom of the documentation of classes and structs. If set to YES, the
-# list will mention the files that were used to generate the documentation.
-# The default value is: YES.
-
-SHOW_USED_FILES = YES
-
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
-# will remove the Files entry from the Quick Index and from the Folder Tree View
-# (if specified).
-# The default value is: YES.
-
-SHOW_FILES = YES
-
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
-# page. This will remove the Namespaces entry from the Quick Index and from the
-# Folder Tree View (if specified).
-# The default value is: YES.
-
-SHOW_NAMESPACES = YES
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from
-# the version control system). Doxygen will invoke the program by executing (via
-# popen()) the command command input-file, where command is the value of the
-# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
-# by doxygen. Whatever the program writes to standard output is used as the file
-# version. For an example see the documentation.
-
-FILE_VERSION_FILTER =
-
-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
-# by doxygen. The layout file controls the global structure of the generated
-# output files in an output format independent way. To create the layout file
-# that represents doxygen's defaults, run doxygen with the -l option. You can
-# optionally specify a file name after the option, if omitted DoxygenLayout.xml
-# will be used as the name of the layout file.
-#
-# Note that if you run doxygen from a directory containing a file called
-# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
-# tag is left empty.
-
-LAYOUT_FILE =
-
-# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
-# the reference definitions. This must be a list of .bib files. The .bib
-# extension is automatically appended if omitted. This requires the bibtex tool
-# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
-# For LaTeX the style of the bibliography can be controlled using
-# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
-# search path. See also \cite for info how to create references.
-
-CITE_BIB_FILES =
-
-#---------------------------------------------------------------------------
-# Configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated to
-# standard output by doxygen. If QUIET is set to YES this implies that the
-# messages are off.
-# The default value is: NO.
-
-QUIET = YES
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
-# this implies that the warnings are on.
-#
-# Tip: Turn warnings on while writing the documentation.
-# The default value is: YES.
-
-WARNINGS = NO
-
-# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate
-# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
-# will automatically be disabled.
-# The default value is: YES.
-
-WARN_IF_UNDOCUMENTED = NO
-
-# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some parameters
-# in a documented function, or documenting parameters that don't exist or using
-# markup commands wrongly.
-# The default value is: YES.
-
-WARN_IF_DOC_ERROR = NO
-
-# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
-# are documented, but have no documentation for their parameters or return
-# value. If set to NO, doxygen will only warn about wrong or incomplete
-# parameter documentation, but not about the absence of documentation.
-# The default value is: NO.
-
-WARN_NO_PARAMDOC = NO
-
-# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when
-# a warning is encountered.
-# The default value is: NO.
-
-WARN_AS_ERROR = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that doxygen
-# can produce. The string should contain the $file, $line, and $text tags, which
-# will be replaced by the file and line number from which the warning originated
-# and the warning text. Optionally the format may contain $version, which will
-# be replaced by the version of the file (if it could be obtained via
-# FILE_VERSION_FILTER)
-# The default value is: $file:$line: $text.
-
-WARN_FORMAT = "WARNING: $file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning and error
-# messages should be written. If left blank the output is written to standard
-# error (stderr).
-
-WARN_LOGFILE =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag is used to specify the files and/or directories that contain
-# documented source files. You may enter file names like myfile.cpp or
-# directories like /usr/src/myproject. Separate the files or directories with
-# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
-# Note: If this tag is empty the current directory is searched.
-
-INPUT = ../src
-
-# This tag can be used to specify the character encoding of the source files
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
-# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
-# documentation (see: http://www.gnu.org/software/libiconv) for the list of
-# possible encodings.
-# The default value is: UTF-8.
-
-INPUT_ENCODING = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
-# *.h) to filter out the source-files in the directories.
-#
-# Note that for custom extensions or not directly supported extensions you also
-# need to set EXTENSION_MAPPING for the extension otherwise the files are not
-# read by doxygen.
-#
-# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,
-# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
-# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc,
-# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08,
-# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf.
-
-FILE_PATTERNS = *.h \
- *.hh \
- *.hxx \
- *.hpp \
- *.h++ \
-
-# The RECURSIVE tag can be used to specify whether or not subdirectories should
-# be searched for input files as well.
-# The default value is: NO.
-
-RECURSIVE = YES
-
-# The EXCLUDE tag can be used to specify files and/or directories that should be
-# excluded from the INPUT source files. This way you can easily exclude a
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-#
-# Note that relative paths are relative to the directory from which doxygen is
-# run.
-
-EXCLUDE =
-
-# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
-# directories that are symbolic links (a Unix file system feature) are excluded
-# from the input.
-# The default value is: NO.
-
-EXCLUDE_SYMLINKS = NO
-
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories.
-#
-# Note that the wildcards are matched against the file with absolute path, so to
-# exclude all test directories for example use the pattern */test/*
-
-EXCLUDE_PATTERNS =
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-# (namespaces, classes, functions, etc.) that should be excluded from the
-# output. The symbol name can be a fully qualified name, a word, or if the
-# wildcard * is used, a substring. Examples: ANamespace, AClass,
-# AClass::ANamespace, ANamespace::*Test
-#
-# Note that the wildcards are matched against the file with absolute path, so to
-# exclude all test directories use the pattern */test/*
-
-EXCLUDE_SYMBOLS =
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or directories
-# that contain example code fragments that are included (see the \include
-# command).
-
-EXAMPLE_PATH =
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
-# *.h) to filter out the source-files in the directories. If left blank all
-# files are included.
-
-EXAMPLE_PATTERNS = *
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude commands
-# irrespective of the value of the RECURSIVE tag.
-# The default value is: NO.
-
-EXAMPLE_RECURSIVE = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or directories
-# that contain images that are to be included in the documentation (see the
-# \image command).
-
-IMAGE_PATH =
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command:
-#
-# <filter> <input-file>
-#
-# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
-# name of an input file. Doxygen will then use the output that the filter
-# program writes to standard output. If FILTER_PATTERNS is specified, this tag
-# will be ignored.
-#
-# Note that the filter must not add or remove lines; it is applied before the
-# code is scanned, but not when the output code is generated. If lines are added
-# or removed, the anchors will not be placed correctly.
-#
-# Note that for custom extensions or not directly supported extensions you also
-# need to set EXTENSION_MAPPING for the extension otherwise the files are not
-# properly processed by doxygen.
-
-INPUT_FILTER =
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis. Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match. The filters are a list of the form: pattern=filter
-# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
-# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
-# patterns match the file name, INPUT_FILTER is applied.
-#
-# Note that for custom extensions or not directly supported extensions you also
-# need to set EXTENSION_MAPPING for the extension otherwise the files are not
-# properly processed by doxygen.
-
-FILTER_PATTERNS =
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will also be used to filter the input files that are used for
-# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
-# The default value is: NO.
-
-FILTER_SOURCE_FILES = NO
-
-# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
-# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
-# it is also possible to disable source filtering for a specific pattern using
-# *.ext= (so without naming a filter).
-# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-
-FILTER_SOURCE_PATTERNS =
-
-# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
-# is part of the input, its contents will be placed on the main page
-# (index.html). This can be useful if you have a project on for instance GitHub
-# and want to reuse the introduction page also for the doxygen output.
-
-USE_MDFILE_AS_MAINPAGE =
-
-#---------------------------------------------------------------------------
-# Configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
-# generated. Documented entities will be cross-referenced with these sources.
-#
-# Note: To get rid of all source code in the generated output, make sure that
-# also VERBATIM_HEADERS is set to NO.
-# The default value is: NO.
-
-SOURCE_BROWSER = NO
-
-# Setting the INLINE_SOURCES tag to YES will include the body of functions,
-# classes and enums directly into the documentation.
-# The default value is: NO.
-
-INLINE_SOURCES = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
-# special comment blocks from generated source code fragments. Normal C, C++ and
-# Fortran comments will always remain visible.
-# The default value is: YES.
-
-STRIP_CODE_COMMENTS = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
-# function all documented functions referencing it will be listed.
-# The default value is: NO.
-
-REFERENCED_BY_RELATION = NO
-
-# If the REFERENCES_RELATION tag is set to YES then for each documented function
-# all documented entities called/used by that function will be listed.
-# The default value is: NO.
-
-REFERENCES_RELATION = NO
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
-# to YES then the hyperlinks from functions in REFERENCES_RELATION and
-# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
-# link to the documentation.
-# The default value is: YES.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
-# source code will show a tooltip with additional information such as prototype,
-# brief description and links to the definition and documentation. Since this
-# will make the HTML file larger and loading of large files a bit slower, you
-# can opt to disable this feature.
-# The default value is: YES.
-# This tag requires that the tag SOURCE_BROWSER is set to YES.
-
-SOURCE_TOOLTIPS = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code will
-# point to the HTML generated by the htags(1) tool instead of doxygen built-in
-# source browser. The htags tool is part of GNU's global source tagging system
-# (see http://www.gnu.org/software/global/global.html). You will need version
-# 4.8.6 or higher.
-#
-# To use it do the following:
-# - Install the latest version of global
-# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
-# - Make sure the INPUT points to the root of the source tree
-# - Run doxygen as normal
-#
-# Doxygen will invoke htags (and that will in turn invoke gtags), so these
-# tools must be available from the command line (i.e. in the search path).
-#
-# The result: instead of the source browser generated by doxygen, the links to
-# source code will now point to the output of htags.
-# The default value is: NO.
-# This tag requires that the tag SOURCE_BROWSER is set to YES.
-
-USE_HTAGS = NO
-
-# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
-# verbatim copy of the header file for each class for which an include is
-# specified. Set to NO to disable this.
-# See also: Section \class.
-# The default value is: YES.
-
-VERBATIM_HEADERS = YES
-
-# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
-# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the
-# cost of reduced performance. This can be particularly helpful with template
-# rich C++ code for which doxygen's built-in parser lacks the necessary type
-# information.
-# Note: The availability of this option depends on whether or not doxygen was
-# generated with the -Duse-libclang=ON option for CMake.
-# The default value is: NO.
-
-CLANG_ASSISTED_PARSING = NO
-
-# If clang assisted parsing is enabled you can provide the compiler with command
-# line options that you would normally use when invoking the compiler. Note that
-# the include paths will already be set by doxygen for the files and directories
-# specified with INPUT and INCLUDE_PATH.
-# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-
-CLANG_OPTIONS =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
-# compounds will be generated. Enable this if the project contains a lot of
-# classes, structs, unions or interfaces.
-# The default value is: YES.
-
-ALPHABETICAL_INDEX = YES
-
-# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
-# which the alphabetical index list will be split.
-# Minimum value: 1, maximum value: 20, default value: 5.
-# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-
-COLS_IN_ALPHA_INDEX = 5
-
-# In case all classes in a project start with a common prefix, all classes will
-# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
-# can be used to specify a prefix (or a list of prefixes) that should be ignored
-# while generating the index headers.
-# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-
-IGNORE_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output
-# The default value is: YES.
-
-GENERATE_HTML = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it.
-# The default directory is: html.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_OUTPUT = html
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
-# generated HTML page (for example: .htm, .php, .asp).
-# The default value is: .html.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_FILE_EXTENSION = .html
-
-# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
-# each generated HTML page. If the tag is left blank doxygen will generate a
-# standard header.
-#
-# To get valid HTML the header file that includes any scripts and style sheets
-# that doxygen needs, which is dependent on the configuration options used (e.g.
-# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
-# default header using
-# doxygen -w html new_header.html new_footer.html new_stylesheet.css
-# YourConfigFile
-# and then modify the file new_header.html. See also section "Doxygen usage"
-# for information on how to generate the default header that doxygen normally
-# uses.
-# Note: The header is subject to change so you typically have to regenerate the
-# default header when upgrading to a newer version of doxygen. For a description
-# of the possible markers and block names see the documentation.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_HEADER =
-
-# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
-# generated HTML page. If the tag is left blank doxygen will generate a standard
-# footer. See HTML_HEADER for more information on how to generate a default
-# footer and what special commands can be used inside the footer. See also
-# section "Doxygen usage" for information on how to generate the default footer
-# that doxygen normally uses.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_FOOTER =
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
-# sheet that is used by each HTML page. It can be used to fine-tune the look of
-# the HTML output. If left blank doxygen will generate a default style sheet.
-# See also section "Doxygen usage" for information on how to generate the style
-# sheet that doxygen normally uses.
-# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
-# it is more robust and this tag (HTML_STYLESHEET) will in the future become
-# obsolete.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_STYLESHEET =
-
-# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
-# cascading style sheets that are included after the standard style sheets
-# created by doxygen. Using this option one can overrule certain style aspects.
-# This is preferred over using HTML_STYLESHEET since it does not replace the
-# standard style sheet and is therefore more robust against future updates.
-# Doxygen will copy the style sheet files to the output directory.
-# Note: The order of the extra style sheet files is of importance (e.g. the last
-# style sheet in the list overrules the setting of the previous ones in the
-# list). For an example see the documentation.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_EXTRA_STYLESHEET =
-
-# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
-# other source files which should be copied to the HTML output directory. Note
-# that these files will be copied to the base HTML output directory. Use the
-# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
-# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
-# files will be copied as-is; there are no commands or markers available.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_EXTRA_FILES =
-
-# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
-# will adjust the colors in the style sheet and background images according to
-# this color. Hue is specified as an angle on a colorwheel, see
-# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
-# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
-# purple, and 360 is red again.
-# Minimum value: 0, maximum value: 359, default value: 220.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_COLORSTYLE_HUE = 220
-
-# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
-# in the HTML output. For a value of 0 the output will use grayscales only. A
-# value of 255 will produce the most vivid colors.
-# Minimum value: 0, maximum value: 255, default value: 100.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_COLORSTYLE_SAT = 100
-
-# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
-# luminance component of the colors in the HTML output. Values below 100
-# gradually make the output lighter, whereas values above 100 make the output
-# darker. The value divided by 100 is the actual gamma applied, so 80 represents
-# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
-# change the gamma.
-# Minimum value: 40, maximum value: 240, default value: 80.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_COLORSTYLE_GAMMA = 80
-
-# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
-# page will contain the date and time when the page was generated. Setting this
-# to YES can help to show when doxygen was last run and thus if the
-# documentation is up to date.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_TIMESTAMP = NO
-
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
-# documentation will contain sections that can be hidden and shown after the
-# page has loaded.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_DYNAMIC_SECTIONS = NO
-
-# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
-# shown in the various tree structured indices initially; the user can expand
-# and collapse entries dynamically later on. Doxygen will expand the tree to
-# such a level that at most the specified number of entries are visible (unless
-# a fully collapsed tree already exceeds this amount). So setting the number of
-# entries 1 will produce a full collapsed tree by default. 0 is a special value
-# representing an infinite number of entries and will result in a full expanded
-# tree by default.
-# Minimum value: 0, maximum value: 9999, default value: 100.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_INDEX_NUM_ENTRIES = 100
-
-# If the GENERATE_DOCSET tag is set to YES, additional index files will be
-# generated that can be used as input for Apple's Xcode 3 integrated development
-# environment (see: http://developer.apple.com/tools/xcode/), introduced with
-# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
-# Makefile in the HTML output directory. Running make will produce the docset in
-# that directory and running make install will install the docset in
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
-# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
-# for more information.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_DOCSET = NO
-
-# This tag determines the name of the docset feed. A documentation feed provides
-# an umbrella under which multiple documentation sets from a single provider
-# (such as a company or product suite) can be grouped.
-# The default value is: Doxygen generated docs.
-# This tag requires that the tag GENERATE_DOCSET is set to YES.
-
-DOCSET_FEEDNAME = "Doxygen generated docs"
-
-# This tag specifies a string that should uniquely identify the documentation
-# set bundle. This should be a reverse domain-name style string, e.g.
-# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
-# The default value is: org.doxygen.Project.
-# This tag requires that the tag GENERATE_DOCSET is set to YES.
-
-DOCSET_BUNDLE_ID = org.doxygen.Project
-
-# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
-# the documentation publisher. This should be a reverse domain-name style
-# string, e.g. com.mycompany.MyDocSet.documentation.
-# The default value is: org.doxygen.Publisher.
-# This tag requires that the tag GENERATE_DOCSET is set to YES.
-
-DOCSET_PUBLISHER_ID = org.doxygen.Publisher
-
-# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
-# The default value is: Publisher.
-# This tag requires that the tag GENERATE_DOCSET is set to YES.
-
-DOCSET_PUBLISHER_NAME = Publisher
-
-# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
-# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
-# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
-# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
-# Windows.
-#
-# The HTML Help Workshop contains a compiler that can convert all HTML output
-# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
-# files are now used as the Windows 98 help format, and will replace the old
-# Windows help format (.hlp) on all Windows platforms in the future. Compressed
-# HTML files also contain an index, a table of contents, and you can search for
-# words in the documentation. The HTML workshop also contains a viewer for
-# compressed HTML files.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_HTMLHELP = NO
-
-# The CHM_FILE tag can be used to specify the file name of the resulting .chm
-# file. You can add a path in front of the file if the result should not be
-# written to the html output directory.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-CHM_FILE =
-
-# The HHC_LOCATION tag can be used to specify the location (absolute path
-# including file name) of the HTML help compiler (hhc.exe). If non-empty,
-# doxygen will try to run the HTML help compiler on the generated index.hhp.
-# The file has to be specified with full path.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-HHC_LOCATION =
-
-# The GENERATE_CHI flag controls if a separate .chi index file is generated
-# (YES) or that it should be included in the master .chm file (NO).
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-GENERATE_CHI = NO
-
-# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc)
-# and project file content.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-CHM_INDEX_ENCODING =
-
-# The BINARY_TOC flag controls whether a binary table of contents is generated
-# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it
-# enables the Previous and Next buttons.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-BINARY_TOC = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members to
-# the table of contents of the HTML help documentation and to the tree view.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-TOC_EXPAND = NO
-
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
-# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
-# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
-# (.qch) of the generated HTML documentation.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_QHP = NO
-
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
-# the file name of the resulting .qch file. The path specified is relative to
-# the HTML output folder.
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QCH_FILE =
-
-# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
-# Project output. For more information please see Qt Help Project / Namespace
-# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
-# The default value is: org.doxygen.Project.
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_NAMESPACE = org.doxygen.Project
-
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
-# Help Project output. For more information please see Qt Help Project / Virtual
-# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
-# folders).
-# The default value is: doc.
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_VIRTUAL_FOLDER = doc
-
-# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
-# filter to add. For more information please see Qt Help Project / Custom
-# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
-# filters).
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_CUST_FILTER_NAME =
-
-# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
-# custom filter to add. For more information please see Qt Help Project / Custom
-# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
-# filters).
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_CUST_FILTER_ATTRS =
-
-# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
-# project's filter section matches. Qt Help Project / Filter Attributes (see:
-# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_SECT_FILTER_ATTRS =
-
-# The QHG_LOCATION tag can be used to specify the location of Qt's
-# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
-# generated .qhp file.
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHG_LOCATION =
-
-# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
-# generated, together with the HTML files, they form an Eclipse help plugin. To
-# install this plugin and make it available under the help contents menu in
-# Eclipse, the contents of the directory containing the HTML and XML files needs
-# to be copied into the plugins directory of eclipse. The name of the directory
-# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
-# After copying Eclipse needs to be restarted before the help appears.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_ECLIPSEHELP = NO
-
-# A unique identifier for the Eclipse help plugin. When installing the plugin
-# the directory name containing the HTML and XML files should also have this
-# name. Each documentation set should have its own identifier.
-# The default value is: org.doxygen.Project.
-# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
-
-ECLIPSE_DOC_ID = org.doxygen.Project
-
-# If you want full control over the layout of the generated HTML pages it might
-# be necessary to disable the index and replace it with your own. The
-# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
-# of each HTML page. A value of NO enables the index and the value YES disables
-# it. Since the tabs in the index contain the same information as the navigation
-# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-DISABLE_INDEX = NO
-
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information. If the tag
-# value is set to YES, a side panel will be generated containing a tree-like
-# index structure (just like the one that is generated for HTML Help). For this
-# to work a browser that supports JavaScript, DHTML, CSS and frames is required
-# (i.e. any modern browser). Windows users are probably better off using the
-# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can
-# further fine-tune the look of the index. As an example, the default style
-# sheet generated by doxygen has an example that shows how to put an image at
-# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
-# the same information as the tab index, you could consider setting
-# DISABLE_INDEX to YES when enabling this option.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_TREEVIEW = YES
-
-# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
-# doxygen will group on one line in the generated HTML documentation.
-#
-# Note that a value of 0 will completely suppress the enum values from appearing
-# in the overview section.
-# Minimum value: 0, maximum value: 20, default value: 4.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-ENUM_VALUES_PER_LINE = 4
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
-# to set the initial width (in pixels) of the frame in which the tree is shown.
-# Minimum value: 0, maximum value: 1500, default value: 250.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-TREEVIEW_WIDTH = 250
-
-# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to
-# external symbols imported via tag files in a separate window.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-EXT_LINKS_IN_WINDOW = NO
-
-# Use this tag to change the font size of LaTeX formulas included as images in
-# the HTML documentation. When you change the font size after a successful
-# doxygen run you need to manually remove any form_*.png images from the HTML
-# output directory to force them to be regenerated.
-# Minimum value: 8, maximum value: 50, default value: 10.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-FORMULA_FONTSIZE = 10
-
-# Use the FORMULA_TRANPARENT tag to determine whether or not the images
-# generated for formulas are transparent PNGs. Transparent PNGs are not
-# supported properly for IE 6.0, but are supported on all modern browsers.
-#
-# Note that when changing this option you need to delete any form_*.png files in
-# the HTML output directory before the changes have effect.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-FORMULA_TRANSPARENT = YES
-
-# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
-# http://www.mathjax.org) which uses client side Javascript for the rendering
-# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
-# installed or if you want to formulas look prettier in the HTML output. When
-# enabled you may also need to install MathJax separately and configure the path
-# to it using the MATHJAX_RELPATH option.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-USE_MATHJAX = NO
-
-# When MathJax is enabled you can set the default output format to be used for
-# the MathJax output. See the MathJax site (see:
-# http://docs.mathjax.org/en/latest/output.html) for more details.
-# Possible values are: HTML-CSS (which is slower, but has the best
-# compatibility), NativeMML (i.e. MathML) and SVG.
-# The default value is: HTML-CSS.
-# This tag requires that the tag USE_MATHJAX is set to YES.
-
-MATHJAX_FORMAT = HTML-CSS
-
-# When MathJax is enabled you need to specify the location relative to the HTML
-# output directory using the MATHJAX_RELPATH option. The destination directory
-# should contain the MathJax.js script. For instance, if the mathjax directory
-# is located at the same level as the HTML output directory, then
-# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
-# Content Delivery Network so you can quickly see the result without installing
-# MathJax. However, it is strongly recommended to install a local copy of
-# MathJax from http://www.mathjax.org before deployment.
-# The default value is: http://cdn.mathjax.org/mathjax/latest.
-# This tag requires that the tag USE_MATHJAX is set to YES.
-
-MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
-
-# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
-# extension names that should be enabled during MathJax rendering. For example
-# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
-# This tag requires that the tag USE_MATHJAX is set to YES.
-
-MATHJAX_EXTENSIONS =
-
-# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
-# of code that will be used on startup of the MathJax code. See the MathJax site
-# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
-# example see the documentation.
-# This tag requires that the tag USE_MATHJAX is set to YES.
-
-MATHJAX_CODEFILE =
-
-# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
-# the HTML output. The underlying search engine uses javascript and DHTML and
-# should work on any modern browser. Note that when using HTML help
-# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
-# there is already a search function so this one should typically be disabled.
-# For large projects the javascript based search engine can be slow, then
-# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
-# search using the keyboard; to jump to the search box use <access key> + S
-# (what the <access key> is depends on the OS and browser, but it is typically
-# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
-# key> to jump into the search results window, the results can be navigated
-# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
-# the search. The filter options can be selected when the cursor is inside the
-# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
-# to select a filter and <Enter> or <escape> to activate or cancel the filter
-# option.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-SEARCHENGINE = YES
-
-# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
-# implemented using a web server instead of a web client using Javascript. There
-# are two flavors of web server based searching depending on the EXTERNAL_SEARCH
-# setting. When disabled, doxygen will generate a PHP script for searching and
-# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
-# and searching needs to be provided by external tools. See the section
-# "External Indexing and Searching" for details.
-# The default value is: NO.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-SERVER_BASED_SEARCH = NO
-
-# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
-# script for searching. Instead the search results are written to an XML file
-# which needs to be processed by an external indexer. Doxygen will invoke an
-# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
-# search results.
-#
-# Doxygen ships with an example indexer (doxyindexer) and search engine
-# (doxysearch.cgi) which are based on the open source search engine library
-# Xapian (see: http://xapian.org/).
-#
-# See the section "External Indexing and Searching" for details.
-# The default value is: NO.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-EXTERNAL_SEARCH = NO
-
-# The SEARCHENGINE_URL should point to a search engine hosted by a web server
-# which will return the search results when EXTERNAL_SEARCH is enabled.
-#
-# Doxygen ships with an example indexer (doxyindexer) and search engine
-# (doxysearch.cgi) which are based on the open source search engine library
-# Xapian (see: http://xapian.org/). See the section "External Indexing and
-# Searching" for details.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-SEARCHENGINE_URL =
-
-# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
-# search data is written to a file for indexing by an external tool. With the
-# SEARCHDATA_FILE tag the name of this file can be specified.
-# The default file is: searchdata.xml.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-SEARCHDATA_FILE = searchdata.xml
-
-# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
-# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
-# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
-# projects and redirect the results back to the right project.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-EXTERNAL_SEARCH_ID =
-
-# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
-# projects other than the one defined by this configuration file, but that are
-# all added to the same external search index. Each project needs to have a
-# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
-# to a relative location where the documentation can be found. The format is:
-# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-EXTRA_SEARCH_MAPPINGS =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
-# The default value is: YES.
-
-GENERATE_LATEX = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it.
-# The default directory is: latex.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_OUTPUT = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked.
-#
-# Note that when enabling USE_PDFLATEX this option is only used for generating
-# bitmaps for formulas in the HTML output, but not in the Makefile that is
-# written to the output directory.
-# The default file is: latex.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_CMD_NAME = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
-# index for LaTeX.
-# The default file is: makeindex.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-MAKEINDEX_CMD_NAME = makeindex
-
-# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
-# documents. This may be useful for small projects and may help to save some
-# trees in general.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-COMPACT_LATEX = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used by the
-# printer.
-# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
-# 14 inches) and executive (7.25 x 10.5 inches).
-# The default value is: a4.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-PAPER_TYPE = a4
-
-# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
-# that should be included in the LaTeX output. The package can be specified just
-# by its name or with the correct syntax as to be used with the LaTeX
-# \usepackage command. To get the times font for instance you can specify :
-# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times}
-# To use the option intlimits with the amsmath package you can specify:
-# EXTRA_PACKAGES=[intlimits]{amsmath}
-# If left blank no extra packages will be included.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-EXTRA_PACKAGES =
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
-# generated LaTeX document. The header should contain everything until the first
-# chapter. If it is left blank doxygen will generate a standard header. See
-# section "Doxygen usage" for information on how to let doxygen write the
-# default header to a separate file.
-#
-# Note: Only use a user-defined header if you know what you are doing! The
-# following commands have a special meaning inside the header: $title,
-# $datetime, $date, $doxygenversion, $projectname, $projectnumber,
-# $projectbrief, $projectlogo. Doxygen will replace $title with the empty
-# string, for the replacement values of the other commands the user is referred
-# to HTML_HEADER.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_HEADER =
-
-# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
-# generated LaTeX document. The footer should contain everything after the last
-# chapter. If it is left blank doxygen will generate a standard footer. See
-# LATEX_HEADER for more information on how to generate a default footer and what
-# special commands can be used inside the footer.
-#
-# Note: Only use a user-defined footer if you know what you are doing!
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_FOOTER =
-
-# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined
-# LaTeX style sheets that are included after the standard style sheets created
-# by doxygen. Using this option one can overrule certain style aspects. Doxygen
-# will copy the style sheet files to the output directory.
-# Note: The order of the extra style sheet files is of importance (e.g. the last
-# style sheet in the list overrules the setting of the previous ones in the
-# list).
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_EXTRA_STYLESHEET =
-
-# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
-# other source files which should be copied to the LATEX_OUTPUT output
-# directory. Note that the files will be copied as-is; there are no commands or
-# markers available.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_EXTRA_FILES =
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
-# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
-# contain links (just like the HTML output) instead of page references. This
-# makes the output suitable for online browsing using a PDF viewer.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-PDF_HYPERLINKS = YES
-
-# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
-# the PDF file directly from the LaTeX files. Set this option to YES, to get a
-# higher quality PDF documentation.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-USE_PDFLATEX = YES
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
-# command to the generated LaTeX files. This will instruct LaTeX to keep running
-# if errors occur, instead of asking the user for help. This option is also used
-# when generating formulas in HTML.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_BATCHMODE = NO
-
-# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
-# index chapters (such as File Index, Compound Index, etc.) in the output.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_HIDE_INDICES = NO
-
-# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
-# code with syntax highlighting in the LaTeX output.
-#
-# Note that which sources are shown also depends on other settings such as
-# SOURCE_BROWSER.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_SOURCE_CODE = NO
-
-# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
-# bibliography, e.g. plainnat, or ieeetr. See
-# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
-# The default value is: plain.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_BIB_STYLE = plain
-
-# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated
-# page will contain the date and time when the page was generated. Setting this
-# to NO can help when comparing the output of multiple runs.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_TIMESTAMP = NO
-
-#---------------------------------------------------------------------------
-# Configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The
-# RTF output is optimized for Word 97 and may not look too pretty with other RTF
-# readers/editors.
-# The default value is: NO.
-
-GENERATE_RTF = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it.
-# The default directory is: rtf.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-RTF_OUTPUT = rtf
-
-# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF
-# documents. This may be useful for small projects and may help to save some
-# trees in general.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-COMPACT_RTF = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
-# contain hyperlink fields. The RTF file will contain links (just like the HTML
-# output) instead of page references. This makes the output suitable for online
-# browsing using Word or some other Word compatible readers that support those
-# fields.
-#
-# Note: WordPad (write) and others do not support links.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-RTF_HYPERLINKS = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's config
-# file, i.e. a series of assignments. You only have to provide replacements,
-# missing definitions are set to their default value.
-#
-# See also section "Doxygen usage" for information on how to generate the
-# default style sheet that doxygen normally uses.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-RTF_STYLESHEET_FILE =
-
-# Set optional variables used in the generation of an RTF document. Syntax is
-# similar to doxygen's config file. A template extensions file can be generated
-# using doxygen -e rtf extensionFile.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-RTF_EXTENSIONS_FILE =
-
-# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code
-# with syntax highlighting in the RTF output.
-#
-# Note that which sources are shown also depends on other settings such as
-# SOURCE_BROWSER.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-RTF_SOURCE_CODE = NO
-
-#---------------------------------------------------------------------------
-# Configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for
-# classes and files.
-# The default value is: NO.
-
-GENERATE_MAN = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it. A directory man3 will be created inside the directory specified by
-# MAN_OUTPUT.
-# The default directory is: man.
-# This tag requires that the tag GENERATE_MAN is set to YES.
-
-MAN_OUTPUT = man
-
-# The MAN_EXTENSION tag determines the extension that is added to the generated
-# man pages. In case the manual section does not start with a number, the number
-# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
-# optional.
-# The default value is: .3.
-# This tag requires that the tag GENERATE_MAN is set to YES.
-
-MAN_EXTENSION = .3
-
-# The MAN_SUBDIR tag determines the name of the directory created within
-# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by
-# MAN_EXTENSION with the initial . removed.
-# This tag requires that the tag GENERATE_MAN is set to YES.
-
-MAN_SUBDIR =
-
-# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
-# will generate one additional man file for each entity documented in the real
-# man page(s). These additional files only source the real man page, but without
-# them the man command would be unable to find the correct page.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_MAN is set to YES.
-
-MAN_LINKS = NO
-
-#---------------------------------------------------------------------------
-# Configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that
-# captures the structure of the code including all documentation.
-# The default value is: NO.
-
-GENERATE_XML = YES
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it.
-# The default directory is: xml.
-# This tag requires that the tag GENERATE_XML is set to YES.
-
-XML_OUTPUT = xml
-
-# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program
-# listings (including syntax highlighting and cross-referencing information) to
-# the XML output. Note that enabling this will significantly increase the size
-# of the XML output.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_XML is set to YES.
-
-XML_PROGRAMLISTING = YES
-
-#---------------------------------------------------------------------------
-# Configuration options related to the DOCBOOK output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files
-# that can be used to generate PDF.
-# The default value is: NO.
-
-GENERATE_DOCBOOK = NO
-
-# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
-# front of it.
-# The default directory is: docbook.
-# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
-
-DOCBOOK_OUTPUT = docbook
-
-# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the
-# program listings (including syntax highlighting and cross-referencing
-# information) to the DOCBOOK output. Note that enabling this will significantly
-# increase the size of the DOCBOOK output.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
-
-DOCBOOK_PROGRAMLISTING = NO
-
-#---------------------------------------------------------------------------
-# Configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
-# AutoGen Definitions (see http://autogen.sf.net) file that captures the
-# structure of the code including all documentation. Note that this feature is
-# still experimental and incomplete at the moment.
-# The default value is: NO.
-
-GENERATE_AUTOGEN_DEF = NO
-
-#---------------------------------------------------------------------------
-# Configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module
-# file that captures the structure of the code including all documentation.
-#
-# Note that this feature is still experimental and incomplete at the moment.
-# The default value is: NO.
-
-GENERATE_PERLMOD = NO
-
-# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary
-# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
-# output from the Perl module output.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-
-PERLMOD_LATEX = NO
-
-# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely
-# formatted so it can be parsed by a human reader. This is useful if you want to
-# understand what is going on. On the other hand, if this tag is set to NO, the
-# size of the Perl module output will be much smaller and Perl will parse it
-# just the same.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-
-PERLMOD_PRETTY = YES
-
-# The names of the make variables in the generated doxyrules.make file are
-# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
-# so different doxyrules.make files included by the same Makefile don't
-# overwrite each other's variables.
-# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-
-PERLMOD_MAKEVAR_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all
-# C-preprocessor directives found in the sources and include files.
-# The default value is: YES.
-
-ENABLE_PREPROCESSING = NO
-
-# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names
-# in the source code. If set to NO, only conditional compilation will be
-# performed. Macro expansion can be done in a controlled way by setting
-# EXPAND_ONLY_PREDEF to YES.
-# The default value is: NO.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-MACRO_EXPANSION = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
-# the macro expansion is limited to the macros specified with the PREDEFINED and
-# EXPAND_AS_DEFINED tags.
-# The default value is: NO.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-EXPAND_ONLY_PREDEF = NO
-
-# If the SEARCH_INCLUDES tag is set to YES, the include files in the
-# INCLUDE_PATH will be searched if a #include is found.
-# The default value is: YES.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-SEARCH_INCLUDES = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by the
-# preprocessor.
-# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-
-INCLUDE_PATH =
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will be
-# used.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-INCLUDE_FILE_PATTERNS =
-
-# The PREDEFINED tag can be used to specify one or more macro names that are
-# defined before the preprocessor is started (similar to the -D option of e.g.
-# gcc). The argument of the tag is a list of macros of the form: name or
-# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
-# is assumed. To prevent a macro definition from being undefined via #undef or
-# recursively expanded use the := operator instead of the = operator.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-PREDEFINED =
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
-# tag can be used to specify a list of macro names that should be expanded. The
-# macro definition that is found in the sources will be used. Use the PREDEFINED
-# tag if you want to use a different macro definition that overrules the
-# definition found in the source code.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-EXPAND_AS_DEFINED =
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
-# remove all references to function-like macros that are alone on a line, have
-# an all uppercase name, and do not end with a semicolon. Such function macros
-# are typically used for boiler-plate code, and will confuse the parser if not
-# removed.
-# The default value is: YES.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-SKIP_FUNCTION_MACROS = YES
-
-#---------------------------------------------------------------------------
-# Configuration options related to external references
-#---------------------------------------------------------------------------
-
-# The TAGFILES tag can be used to specify one or more tag files. For each tag
-# file the location of the external documentation should be added. The format of
-# a tag file without this location is as follows:
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where loc1 and loc2 can be relative or absolute paths or URLs. See the
-# section "Linking to external documentation" for more information about the use
-# of tag files.
-# Note: Each tag file must have a unique name (where the name does NOT include
-# the path). If a tag file is not located in the directory in which doxygen is
-# run, you must also specify the path to the tagfile here.
-
-TAGFILES =
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
-# tag file that is based on the input files it reads. See section "Linking to
-# external documentation" for more information about the usage of tag files.
-
-GENERATE_TAGFILE =
-
-# If the ALLEXTERNALS tag is set to YES, all external class will be listed in
-# the class index. If set to NO, only the inherited external classes will be
-# listed.
-# The default value is: NO.
-
-ALLEXTERNALS = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will be
-# listed.
-# The default value is: YES.
-
-EXTERNAL_GROUPS = YES
-
-# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in
-# the related pages index. If set to NO, only the current project's pages will
-# be listed.
-# The default value is: YES.
-
-EXTERNAL_PAGES = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of 'which perl').
-# The default file (with absolute path) is: /usr/bin/perl.
-
-PERL_PATH = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram
-# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
-# NO turns the diagrams off. Note that this option also works with HAVE_DOT
-# disabled, but it is recommended to install and use dot, since it yields more
-# powerful graphs.
-# The default value is: YES.
-
-CLASS_DIAGRAMS = YES
-
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see:
-# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-MSCGEN_PATH =
-
-# You can include diagrams made with dia in doxygen documentation. Doxygen will
-# then run dia to produce the diagram and insert it in the documentation. The
-# DIA_PATH tag allows you to specify the directory where the dia binary resides.
-# If left empty dia is assumed to be found in the default search path.
-
-DIA_PATH =
-
-# If set to YES the inheritance and collaboration graphs will hide inheritance
-# and usage relations if the target is undocumented or is not a class.
-# The default value is: YES.
-
-HIDE_UNDOC_RELATIONS = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz (see:
-# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
-# Bell Labs. The other options in this section have no effect if this option is
-# set to NO
-# The default value is: YES.
-
-HAVE_DOT = NO
-
-# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
-# to run in parallel. When set to 0 doxygen will base this on the number of
-# processors available in the system. You can set it explicitly to a value
-# larger than 0 to get control over the balance between CPU load and processing
-# speed.
-# Minimum value: 0, maximum value: 32, default value: 0.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_NUM_THREADS = 0
-
-# When you want a differently looking font in the dot files that doxygen
-# generates you can specify the font name using DOT_FONTNAME. You need to make
-# sure dot is able to find the font, which can be done by putting it in a
-# standard location or by setting the DOTFONTPATH environment variable or by
-# setting DOT_FONTPATH to the directory containing the font.
-# The default value is: Helvetica.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_FONTNAME = Helvetica
-
-# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
-# dot graphs.
-# Minimum value: 4, maximum value: 24, default value: 10.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_FONTSIZE = 10
-
-# By default doxygen will tell dot to use the default font as specified with
-# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
-# the path where dot can find it using this tag.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_FONTPATH =
-
-# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
-# each documented class showing the direct and indirect inheritance relations.
-# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-CLASS_GRAPH = YES
-
-# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
-# graph for each documented class showing the direct and indirect implementation
-# dependencies (inheritance, containment, and class references variables) of the
-# class with other documented classes.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-COLLABORATION_GRAPH = YES
-
-# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
-# groups, showing the direct groups dependencies.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-GROUP_GRAPHS = YES
-
-# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
-# Language.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-UML_LOOK = NO
-
-# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
-# class node. If there are many fields or methods and many nodes the graph may
-# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
-# number of items for each type to make the size more manageable. Set this to 0
-# for no limit. Note that the threshold may be exceeded by 50% before the limit
-# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
-# but if the number exceeds 15, the total amount of fields shown is limited to
-# 10.
-# Minimum value: 0, maximum value: 100, default value: 10.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-UML_LIMIT_NUM_FIELDS = 10
-
-# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
-# collaboration graphs will show the relations between templates and their
-# instances.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-TEMPLATE_RELATIONS = NO
-
-# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
-# YES then doxygen will generate a graph for each documented file showing the
-# direct and indirect include dependencies of the file with other documented
-# files.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-INCLUDE_GRAPH = YES
-
-# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
-# set to YES then doxygen will generate a graph for each documented file showing
-# the direct and indirect include dependencies of the file with other documented
-# files.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-INCLUDED_BY_GRAPH = YES
-
-# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
-# dependency graph for every global function or class method.
-#
-# Note that enabling this option will significantly increase the time of a run.
-# So in most cases it will be better to enable call graphs for selected
-# functions only using the \callgraph command. Disabling a call graph can be
-# accomplished by means of the command \hidecallgraph.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-CALL_GRAPH = NO
-
-# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
-# dependency graph for every global function or class method.
-#
-# Note that enabling this option will significantly increase the time of a run.
-# So in most cases it will be better to enable caller graphs for selected
-# functions only using the \callergraph command. Disabling a caller graph can be
-# accomplished by means of the command \hidecallergraph.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-CALLER_GRAPH = NO
-
-# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
-# hierarchy of all classes instead of a textual one.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-GRAPHICAL_HIERARCHY = YES
-
-# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
-# dependencies a directory has on other directories in a graphical way. The
-# dependency relations are determined by the #include relations between the
-# files in the directories.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DIRECTORY_GRAPH = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot. For an explanation of the image formats see the section
-# output formats in the documentation of the dot tool (Graphviz (see:
-# http://www.graphviz.org/)).
-# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
-# to make the SVG files visible in IE 9+ (other browsers do not have this
-# requirement).
-# Possible values are: png, png:cairo, png:cairo:cairo, png:cairo:gd, png:gd,
-# png:gd:gd, jpg, jpg:cairo, jpg:cairo:gd, jpg:gd, jpg:gd:gd, gif, gif:cairo,
-# gif:cairo:gd, gif:gd, gif:gd:gd, svg, png:gd, png:gd:gd, png:cairo,
-# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and
-# png:gdiplus:gdiplus.
-# The default value is: png.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_IMAGE_FORMAT = png
-
-# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
-# enable generation of interactive SVG images that allow zooming and panning.
-#
-# Note that this requires a modern browser other than Internet Explorer. Tested
-# and working are Firefox, Chrome, Safari, and Opera.
-# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
-# the SVG files visible. Older versions of IE do not have SVG support.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-INTERACTIVE_SVG = NO
-
-# The DOT_PATH tag can be used to specify the path where the dot tool can be
-# found. If left blank, it is assumed the dot tool can be found in the path.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_PATH =
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the \dotfile
-# command).
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOTFILE_DIRS =
-
-# The MSCFILE_DIRS tag can be used to specify one or more directories that
-# contain msc files that are included in the documentation (see the \mscfile
-# command).
-
-MSCFILE_DIRS =
-
-# The DIAFILE_DIRS tag can be used to specify one or more directories that
-# contain dia files that are included in the documentation (see the \diafile
-# command).
-
-DIAFILE_DIRS =
-
-# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the
-# path where java can find the plantuml.jar file. If left blank, it is assumed
-# PlantUML is not used or called during a preprocessing step. Doxygen will
-# generate a warning when it encounters a \startuml command in this case and
-# will not generate output for the diagram.
-
-PLANTUML_JAR_PATH =
-
-# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
-# configuration file for plantuml.
-
-PLANTUML_CFG_FILE =
-
-# When using plantuml, the specified paths are searched for files specified by
-# the !include statement in a plantuml block.
-
-PLANTUML_INCLUDE_PATH =
-
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
-# that will be shown in the graph. If the number of nodes in a graph becomes
-# larger than this value, doxygen will truncate the graph, which is visualized
-# by representing a node as a red box. Note that doxygen if the number of direct
-# children of the root node in a graph is already larger than
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
-# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-# Minimum value: 0, maximum value: 10000, default value: 50.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_GRAPH_MAX_NODES = 50
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
-# generated by dot. A depth value of 3 means that only nodes reachable from the
-# root by following a path via at most 3 edges will be shown. Nodes that lay
-# further from the root node will be omitted. Note that setting this option to 1
-# or 2 may greatly reduce the computation time needed for large code bases. Also
-# note that the size of a graph can be further restricted by
-# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
-# Minimum value: 0, maximum value: 1000, default value: 0.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-MAX_DOT_GRAPH_DEPTH = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, because dot on Windows does not seem
-# to support this out of the box.
-#
-# Warning: Depending on the platform used, enabling this option may lead to
-# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
-# read).
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_TRANSPARENT = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10) support
-# this, this feature is disabled by default.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_MULTI_TARGETS = NO
-
-# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
-# explaining the meaning of the various boxes and arrows in the dot generated
-# graphs.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-GENERATE_LEGEND = YES
-
-# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot
-# files that are used to generate the various graphs.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_CLEANUP = YES
diff --git a/src/libs/lvgl/scripts/built_in_font/FontAwesome5-Solid+Brands+Regular.woff b/src/libs/lvgl/scripts/built_in_font/FontAwesome5-Solid+Brands+Regular.woff
deleted file mode 100644
index 791b4101..00000000
--- a/src/libs/lvgl/scripts/built_in_font/FontAwesome5-Solid+Brands+Regular.woff
+++ /dev/null
Binary files differ
diff --git a/src/libs/lvgl/scripts/built_in_font/Roboto-Regular.woff b/src/libs/lvgl/scripts/built_in_font/Roboto-Regular.woff
deleted file mode 100644
index f823258a..00000000
--- a/src/libs/lvgl/scripts/built_in_font/Roboto-Regular.woff
+++ /dev/null
Binary files differ
diff --git a/src/libs/lvgl/scripts/built_in_font/built_in_font_gen.py b/src/libs/lvgl/scripts/built_in_font/built_in_font_gen.py
deleted file mode 100644
index db8e88c1..00000000
--- a/src/libs/lvgl/scripts/built_in_font/built_in_font_gen.py
+++ /dev/null
@@ -1,47 +0,0 @@
-import argparse
-from argparse import RawTextHelpFormatter
-import os
-import sys
-
-parser = argparse.ArgumentParser(description="""Create fonts for LittelvGL including the built-in symbols. lv_font_conv needs to be installed. See https://github.com/littlevgl/lv_font_conv
-Example: python built_in_font_gen.py --size 16 -o lv_font_roboto_16.c --bpp 4 -r 0x20-0x7F""", formatter_class=RawTextHelpFormatter)
-parser.add_argument('-s', '--size',
- type=int,
- metavar = 'px',
- nargs='?',
- help='Size of the font in px')
-parser.add_argument('--bpp',
- type=int,
- metavar = '1,2,4',
- nargs='?',
- help='Bit per pixel')
-parser.add_argument('-r', '--range',
- nargs='+',
- metavar = 'start-end',
- default='0x20-0x7F',
- help='Ranges and/or characters to include. Default is 0x20-7F (ASCII). E.g. -r 0x20-0x7F, 0x200, 324')
-parser.add_argument('--font',
- metavar = 'file',
- nargs='?',
- default='Roboto-Regular.woff',
- help='A TTF or WOFF file')
-parser.add_argument('-o', '--output',
- nargs='?',
- metavar='file',
- help='Output file name. E.g. my_font_20.c')
-parser.add_argument('--compressed', action='store_true',
- help='Compress the bitmaps')
-
-args = parser.parse_args()
-
-if args.compressed == False:
- compr = "--no-compress --no-prefilter"
-else:
- compr = ""
-
-#Built in symbols
-syms = "61441,61448,61451,61452,61452,61453,61457,61459,61461,61465,61468,61473,61478,61479,61480,61502,61512,61515,61516,61517,61521,61522,61523,61524,61543,61544,61550,61552,61553,61556,61559,61560,61561,61563,61587,61589,61636,61637,61639,61671,61674,61683,61724,61732,61787,61931,62016,62017,62018,62019,62020,62087,62099,62212,62189,62810,63426,63650"
-
-#Run the command
-cmd = "lv_font_conv {} --bpp {} --size {} --font Roboto-Regular.woff -r {} --font FontAwesome5-Solid+Brands+Regular.woff -r {} --format lvgl -o {} --force-fast-kern-format".format(compr, args.bpp, args.size, args.range[0], syms, args.output)
-os.system(cmd)
diff --git a/src/libs/lvgl/scripts/clang-formatter.sh b/src/libs/lvgl/scripts/clang-formatter.sh
deleted file mode 100755
index d831917c..00000000
--- a/src/libs/lvgl/scripts/clang-formatter.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-clang-format-7 -style=file ../src/lv_core/*.c -i
-clang-format-7 -style=file ../src/lv_draw/*.c -i
-clang-format-7 -style=file ../src/lv_hal/*.c -i
-clang-format-7 -style=file ../src/lv_misc/*.c -i
-clang-format-7 -style=file ../src/lv_objx/*.c -i
-clang-format-7 -style=file ../src/lv_themes/*.c -i
-
-clang-format-7 -style=file ../src/lv_core/*.h -i
-clang-format-7 -style=file ../src/lv_draw/*.h -i
-clang-format-7 -style=file ../src/lv_hal/*.h -i
-clang-format-7 -style=file ../src/lv_misc/*.h -i
-clang-format-7 -style=file ../src/lv_objx/*.h -i
-clang-format-7 -style=file ../src/lv_themes/*.h -i
diff --git a/src/libs/lvgl/scripts/cppcheck_run.sh b/src/libs/lvgl/scripts/cppcheck_run.sh
deleted file mode 100755
index 1db16fc9..00000000
--- a/src/libs/lvgl/scripts/cppcheck_run.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-cppcheck --template="{severity}\t{file}:{line}\t{id}: {message}" --enable=all ../src/ --output-file=cppcheck_res.txt --suppress=unusedFunction --suppress=preprocessorErrorDirective --force
-
diff --git a/src/libs/lvgl/scripts/lv_conf_checker.py b/src/libs/lvgl/scripts/lv_conf_checker.py
deleted file mode 100755
index c2171ff8..00000000
--- a/src/libs/lvgl/scripts/lv_conf_checker.py
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/env python3.6
-
-'''
-Generates a checker file for lv_conf.h from lv_conf_templ.h define all the not defined values
-'''
-
-
-import re
-
-fin = open("../lv_conf_template.h", "r")
-fout = open("../src/lv_conf_checker.h", "w")
-
-
-fout.write(
-'''/**
- * GENERATED FILE, DO NOT EDIT IT!
- * @file lv_conf_checker.h
- * Make sure all the defines of lv_conf.h have a default value
-**/
-
-#ifndef LV_CONF_CHECKER_H
-#define LV_CONF_CHECKER_H
-'''
-)
-
-started = 0
-
-for i in fin.read().splitlines():
- if not started:
- if '#define LV_CONF_H' in i:
- started = 1
- continue
- else:
- continue
-
- if '/*--END OF LV_CONF_H--*/' in i: break
-
- r = re.search(r'^ *# *define ([^\s]+).*$', i)
-
- if r:
- line = re.sub('\(.*?\)', '', r[1], 1) #remove parentheses from macros
- fout.write(
- f'#ifndef {line}\n'
- f'{i}\n'
- '#endif\n'
- )
- elif re.search('^ *typedef .*;.*$', i):
- continue #ignore typedefs to avoide redeclaration
- else:
- fout.write(f'{i}\n')
-
-
-fout.write(
-'''
-#endif /*LV_CONF_CHECKER_H*/
-'''
-)
-
-fin.close()
-fout.close()
diff --git a/src/libs/lvgl/src/lv_conf_checker.h b/src/libs/lvgl/src/lv_conf_checker.h
deleted file mode 100644
index 4b0d9a67..00000000
--- a/src/libs/lvgl/src/lv_conf_checker.h
+++ /dev/null
@@ -1,851 +0,0 @@
-/**
- * GENERATED FILE, DO NOT EDIT IT!
- * @file lv_conf_checker.h
- * Make sure all the defines of lv_conf.h have a default value
-**/
-
-#ifndef LV_CONF_CHECKER_H
-#define LV_CONF_CHECKER_H
-/* clang-format off */
-
-#include <stdint.h>
-
-/*====================
- Graphical settings
- *====================*/
-
-/* Maximal horizontal and vertical resolution to support by the library.*/
-#ifndef LV_HOR_RES_MAX
-#define LV_HOR_RES_MAX (480)
-#endif
-#ifndef LV_VER_RES_MAX
-#define LV_VER_RES_MAX (320)
-#endif
-
-/* Color depth:
- * - 1: 1 byte per pixel
- * - 8: RGB233
- * - 16: RGB565
- * - 32: ARGB8888
- */
-#ifndef LV_COLOR_DEPTH
-#define LV_COLOR_DEPTH 16
-#endif
-
-/* Swap the 2 bytes of RGB565 color.
- * Useful if the display has a 8 bit interface (e.g. SPI)*/
-#ifndef LV_COLOR_16_SWAP
-#define LV_COLOR_16_SWAP 0
-#endif
-
-/* 1: Enable screen transparency.
- * Useful for OSD or other overlapping GUIs.
- * Requires `LV_COLOR_DEPTH = 32` colors and the screen's style should be modified: `style.body.opa = ...`*/
-#ifndef LV_COLOR_SCREEN_TRANSP
-#define LV_COLOR_SCREEN_TRANSP 0
-#endif
-
-/*Images pixels with this color will not be drawn (with chroma keying)*/
-#ifndef LV_COLOR_TRANSP
-#define LV_COLOR_TRANSP LV_COLOR_LIME /*LV_COLOR_LIME: pure green*/
-#endif
-
-/* Enable chroma keying for indexed images. */
-#ifndef LV_INDEXED_CHROMA
-#define LV_INDEXED_CHROMA 1
-#endif
-
-/* Enable anti-aliasing (lines, and radiuses will be smoothed) */
-#ifndef LV_ANTIALIAS
-#define LV_ANTIALIAS 1
-#endif
-
-/* Default display refresh period.
- * Can be changed in the display driver (`lv_disp_drv_t`).*/
-#ifndef LV_DISP_DEF_REFR_PERIOD
-#define LV_DISP_DEF_REFR_PERIOD 30 /*[ms]*/
-#endif
-
-/* Dot Per Inch: used to initialize default sizes.
- * E.g. a button with width = LV_DPI / 2 -> half inch wide
- * (Not so important, you can adjust it to modify default sizes and spaces)*/
-#ifndef LV_DPI
-#define LV_DPI 100 /*[px]*/
-#endif
-
-/* Type of coordinates. Should be `int16_t` (or `int32_t` for extreme cases) */
-
-/*=========================
- Memory manager settings
- *=========================*/
-
-/* LittelvGL's internal memory manager's settings.
- * The graphical objects and other related data are stored here. */
-
-/* 1: use custom malloc/free, 0: use the built-in `lv_mem_alloc` and `lv_mem_free` */
-#ifndef LV_MEM_CUSTOM
-#define LV_MEM_CUSTOM 0
-#endif
-#if LV_MEM_CUSTOM == 0
-/* Size of the memory used by `lv_mem_alloc` in bytes (>= 2kB)*/
-#ifndef LV_MEM_SIZE
-# define LV_MEM_SIZE (32U * 1024U)
-#endif
-
-/* Complier prefix for a big array declaration */
-#ifndef LV_MEM_ATTR
-# define LV_MEM_ATTR
-#endif
-
-/* Set an address for the memory pool instead of allocating it as an array.
- * Can be in external SRAM too. */
-#ifndef LV_MEM_ADR
-# define LV_MEM_ADR 0
-#endif
-
-/* Automatically defrag. on free. Defrag. means joining the adjacent free cells. */
-#ifndef LV_MEM_AUTO_DEFRAG
-# define LV_MEM_AUTO_DEFRAG 1
-#endif
-#else /*LV_MEM_CUSTOM*/
-#ifndef LV_MEM_CUSTOM_INCLUDE
-# define LV_MEM_CUSTOM_INCLUDE <stdlib.h> /*Header for the dynamic memory function*/
-#endif
-#ifndef LV_MEM_CUSTOM_ALLOC
-# define LV_MEM_CUSTOM_ALLOC malloc /*Wrapper to malloc*/
-#endif
-#ifndef LV_MEM_CUSTOM_FREE
-# define LV_MEM_CUSTOM_FREE free /*Wrapper to free*/
-#endif
-#endif /*LV_MEM_CUSTOM*/
-
-/* Garbage Collector settings
- * Used if lvgl is binded to higher level language and the memory is managed by that language */
-#ifndef LV_ENABLE_GC
-#define LV_ENABLE_GC 0
-#endif
-#if LV_ENABLE_GC != 0
-#ifndef LV_GC_INCLUDE
-# define LV_GC_INCLUDE "gc.h" /*Include Garbage Collector related things*/
-#endif
-#ifndef LV_MEM_CUSTOM_REALLOC
-# define LV_MEM_CUSTOM_REALLOC your_realloc /*Wrapper to realloc*/
-#endif
-#ifndef LV_MEM_CUSTOM_GET_SIZE
-# define LV_MEM_CUSTOM_GET_SIZE your_mem_get_size /*Wrapper to lv_mem_get_size*/
-#endif
-#endif /* LV_ENABLE_GC */
-
-/*=======================
- Input device settings
- *=======================*/
-
-/* Input device default settings.
- * Can be changed in the Input device driver (`lv_indev_drv_t`)*/
-
-/* Input device read period in milliseconds */
-#ifndef LV_INDEV_DEF_READ_PERIOD
-#define LV_INDEV_DEF_READ_PERIOD 30
-#endif
-
-/* Drag threshold in pixels */
-#ifndef LV_INDEV_DEF_DRAG_LIMIT
-#define LV_INDEV_DEF_DRAG_LIMIT 10
-#endif
-
-/* Drag throw slow-down in [%]. Greater value -> faster slow-down */
-#ifndef LV_INDEV_DEF_DRAG_THROW
-#define LV_INDEV_DEF_DRAG_THROW 20
-#endif
-
-/* Long press time in milliseconds.
- * Time to send `LV_EVENT_LONG_PRESSSED`) */
-#ifndef LV_INDEV_DEF_LONG_PRESS_TIME
-#define LV_INDEV_DEF_LONG_PRESS_TIME 400
-#endif
-
-/* Repeated trigger period in long press [ms]
- * Time between `LV_EVENT_LONG_PRESSED_REPEAT */
-#ifndef LV_INDEV_DEF_LONG_PRESS_REP_TIME
-#define LV_INDEV_DEF_LONG_PRESS_REP_TIME 100
-#endif
-
-/*==================
- * Feature usage
- *==================*/
-
-/*1: Enable the Animations */
-#ifndef LV_USE_ANIMATION
-#define LV_USE_ANIMATION 1
-#endif
-#if LV_USE_ANIMATION
-
-/*Declare the type of the user data of animations (can be e.g. `void *`, `int`, `struct`)*/
-
-#endif
-
-/* 1: Enable shadow drawing*/
-#ifndef LV_USE_SHADOW
-#define LV_USE_SHADOW 1
-#endif
-
-/* 1: Enable object groups (for keyboard/encoder navigation) */
-#ifndef LV_USE_GROUP
-#define LV_USE_GROUP 1
-#endif
-#if LV_USE_GROUP
-#endif /*LV_USE_GROUP*/
-
-/* 1: Enable GPU interface*/
-#ifndef LV_USE_GPU
-#define LV_USE_GPU 1
-#endif
-
-/* 1: Enable file system (might be required for images */
-#ifndef LV_USE_FILESYSTEM
-#define LV_USE_FILESYSTEM 1
-#endif
-#if LV_USE_FILESYSTEM
-/*Declare the type of the user data of file system drivers (can be e.g. `void *`, `int`, `struct`)*/
-#endif
-
-/*1: Add a `user_data` to drivers and objects*/
-#ifndef LV_USE_USER_DATA
-#define LV_USE_USER_DATA 0
-#endif
-
-/*========================
- * Image decoder and cache
- *========================*/
-
-/* 1: Enable indexed (palette) images */
-#ifndef LV_IMG_CF_INDEXED
-#define LV_IMG_CF_INDEXED 1
-#endif
-
-/* 1: Enable alpha indexed images */
-#ifndef LV_IMG_CF_ALPHA
-#define LV_IMG_CF_ALPHA 1
-#endif
-
-/* Default image cache size. Image caching keeps the images opened.
- * If only the built-in image formats are used there is no real advantage of caching.
- * (I.e. no new image decoder is added)
- * With complex image decoders (e.g. PNG or JPG) caching can save the continuous open/decode of images.
- * However the opened images might consume additional RAM.
- * LV_IMG_CACHE_DEF_SIZE must be >= 1 */
-#ifndef LV_IMG_CACHE_DEF_SIZE
-#define LV_IMG_CACHE_DEF_SIZE 1
-#endif
-
-/*Declare the type of the user data of image decoder (can be e.g. `void *`, `int`, `struct`)*/
-
-/*=====================
- * Compiler settings
- *====================*/
-/* Define a custom attribute to `lv_tick_inc` function */
-#ifndef LV_ATTRIBUTE_TICK_INC
-#define LV_ATTRIBUTE_TICK_INC
-#endif
-
-/* Define a custom attribute to `lv_task_handler` function */
-#ifndef LV_ATTRIBUTE_TASK_HANDLER
-#define LV_ATTRIBUTE_TASK_HANDLER
-#endif
-
-/* With size optimization (-Os) the compiler might not align data to
- * 4 or 8 byte boundary. This alignment will be explicitly applied where needed.
- * E.g. __attribute__((aligned(4))) */
-#ifndef LV_ATTRIBUTE_MEM_ALIGN
-#define LV_ATTRIBUTE_MEM_ALIGN
-#endif
-
-/* Attribute to mark large constant arrays for example
- * font's bitmaps */
-#ifndef LV_ATTRIBUTE_LARGE_CONST
-#define LV_ATTRIBUTE_LARGE_CONST
-#endif
-
-/* Export integer constant to binding.
- * This macro is used with constants in the form of LV_<CONST> that
- * should also appear on lvgl binding API such as Micropython
- *
- * The default value just prevents a GCC warning.
- */
-#ifndef LV_EXPORT_CONST_INT
-#define LV_EXPORT_CONST_INT(int_value) struct _silence_gcc_warning
-#endif
-
-/*===================
- * HAL settings
- *==================*/
-
-/* 1: use a custom tick source.
- * It removes the need to manually update the tick with `lv_tick_inc`) */
-#ifndef LV_TICK_CUSTOM
-#define LV_TICK_CUSTOM 0
-#endif
-#if LV_TICK_CUSTOM == 1
-#ifndef LV_TICK_CUSTOM_INCLUDE
-#define LV_TICK_CUSTOM_INCLUDE "something.h" /*Header for the sys time function*/
-#endif
-#ifndef LV_TICK_CUSTOM_SYS_TIME_EXPR
-#define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current systime in ms*/
-#endif
-#endif /*LV_TICK_CUSTOM*/
-
-
-/*================
- * Log settings
- *===============*/
-
-/*1: Enable the log module*/
-#ifndef LV_USE_LOG
-#define LV_USE_LOG 0
-#endif
-#if LV_USE_LOG
-/* How important log should be added:
- * LV_LOG_LEVEL_TRACE A lot of logs to give detailed information
- * LV_LOG_LEVEL_INFO Log important events
- * LV_LOG_LEVEL_WARN Log if something unwanted happened but didn't cause a problem
- * LV_LOG_LEVEL_ERROR Only critical issue, when the system may fail
- * LV_LOG_LEVEL_NONE Do not log anything
- */
-#ifndef LV_LOG_LEVEL
-# define LV_LOG_LEVEL LV_LOG_LEVEL_WARN
-#endif
-
-/* 1: Print the log with 'printf';
- * 0: user need to register a callback with `lv_log_register_print_cb`*/
-#ifndef LV_LOG_PRINTF
-# define LV_LOG_PRINTF 0
-#endif
-#endif /*LV_USE_LOG*/
-
-/*=================
- * Debug settings
- *================*/
-
-/* If Debug is enabled LittelvGL validates the parameters of the functions.
- * If an invalid parameter is found an error log message is printed and
- * the MCU halts at the error. (`LV_USE_LOG` should be enabled)
- * If you are debugging the MCU you can pause
- * the debugger to see exactly where the issue is.
- *
- * The behavior of asserts can be overwritten by redefining them here.
- * E.g. #define LV_ASSERT_MEM(p) <my_assert_code>
- */
-#ifndef LV_USE_DEBUG
-#define LV_USE_DEBUG 1
-#endif
-#if LV_USE_DEBUG
-
-/*Check if the parameter is NULL. (Quite fast) */
-#ifndef LV_USE_ASSERT_NULL
-#define LV_USE_ASSERT_NULL 1
-#endif
-
-/*Checks is the memory is successfully allocated or no. (Quite fast)*/
-#ifndef LV_USE_ASSERT_MEM
-#define LV_USE_ASSERT_MEM 1
-#endif
-
-/* Check the strings.
- * Search for NULL, very long strings, invalid characters, and unnatural repetitions. (Slow)
- * If disabled `LV_USE_ASSERT_NULL` will be performed instead (if it's enabled) */
-#ifndef LV_USE_ASSERT_STR
-#define LV_USE_ASSERT_STR 0
-#endif
-
-/* Check NULL, the object's type and existence (e.g. not deleted). (Quite slow)
- * If disabled `LV_USE_ASSERT_NULL` will be performed instead (if it's enabled) */
-#ifndef LV_USE_ASSERT_OBJ
-#define LV_USE_ASSERT_OBJ 0
-#endif
-
-/*Check if the styles are properly initialized. (Fast)*/
-#ifndef LV_USE_ASSERT_STYLE
-#define LV_USE_ASSERT_STYLE 1
-#endif
-
-#endif /*LV_USE_DEBUG*/
-
-/*================
- * THEME USAGE
- *================*/
-#ifndef LV_THEME_LIVE_UPDATE
-#define LV_THEME_LIVE_UPDATE 0 /*1: Allow theme switching at run time. Uses 8..10 kB of RAM*/
-#endif
-
-#ifndef LV_USE_THEME_TEMPL
-#define LV_USE_THEME_TEMPL 0 /*Just for test*/
-#endif
-#ifndef LV_USE_THEME_DEFAULT
-#define LV_USE_THEME_DEFAULT 0 /*Built mainly from the built-in styles. Consumes very few RAM*/
-#endif
-#ifndef LV_USE_THEME_ALIEN
-#define LV_USE_THEME_ALIEN 0 /*Dark futuristic theme*/
-#endif
-#ifndef LV_USE_THEME_NIGHT
-#define LV_USE_THEME_NIGHT 0 /*Dark elegant theme*/
-#endif
-#ifndef LV_USE_THEME_MONO
-#define LV_USE_THEME_MONO 0 /*Mono color theme for monochrome displays*/
-#endif
-#ifndef LV_USE_THEME_MATERIAL
-#define LV_USE_THEME_MATERIAL 0 /*Flat theme with bold colors and light shadows*/
-#endif
-#ifndef LV_USE_THEME_ZEN
-#define LV_USE_THEME_ZEN 0 /*Peaceful, mainly light theme */
-#endif
-#ifndef LV_USE_THEME_NEMO
-#define LV_USE_THEME_NEMO 0 /*Water-like theme based on the movie "Finding Nemo"*/
-#endif
-
-/*==================
- * FONT USAGE
- *===================*/
-
-/* The built-in fonts contains the ASCII range and some Symbols with 4 bit-per-pixel.
- * The symbols are available via `LV_SYMBOL_...` defines
- * More info about fonts: https://docs.littlevgl.com/#Fonts
- * To create a new font go to: https://littlevgl.com/ttf-font-to-c-array
- */
-
-/* Robot fonts with bpp = 4
- * https://fonts.google.com/specimen/Roboto */
-#ifndef LV_FONT_ROBOTO_12
-#define LV_FONT_ROBOTO_12 0
-#endif
-#ifndef LV_FONT_ROBOTO_16
-#define LV_FONT_ROBOTO_16 1
-#endif
-#ifndef LV_FONT_ROBOTO_22
-#define LV_FONT_ROBOTO_22 0
-#endif
-#ifndef LV_FONT_ROBOTO_28
-#define LV_FONT_ROBOTO_28 0
-#endif
-
-/* Demonstrate special features */
-#ifndef LV_FONT_ROBOTO_12_SUBPX
-#define LV_FONT_ROBOTO_12_SUBPX 1
-#endif
-#ifndef LV_FONT_ROBOTO_28_COMPRESSED
-#define LV_FONT_ROBOTO_28_COMPRESSED 1 /*bpp = 3*/
-#endif
-
-/*Pixel perfect monospace font
- * http://pelulamu.net/unscii/ */
-#ifndef LV_FONT_UNSCII_8
-#define LV_FONT_UNSCII_8 0
-#endif
-
-/* Optionally declare your custom fonts here.
- * You can use these fonts as default font too
- * and they will be available globally. E.g.
- * #define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(my_font_1) \
- * LV_FONT_DECLARE(my_font_2)
- */
-#ifndef LV_FONT_CUSTOM_DECLARE
-#define LV_FONT_CUSTOM_DECLARE
-#endif
-
-/*Always set a default font from the built-in fonts*/
-#ifndef LV_FONT_DEFAULT
-#define LV_FONT_DEFAULT &lv_font_roboto_16
-#endif
-
-/* Enable it if you have fonts with a lot of characters.
- * The limit depends on the font size, font face and bpp
- * but with > 10,000 characters if you see issues probably you need to enable it.*/
-#ifndef LV_FONT_FMT_TXT_LARGE
-#define LV_FONT_FMT_TXT_LARGE 0
-#endif
-
-/* Set the pixel order of the display.
- * Important only if "subpx fonts" are used.
- * With "normal" font it doesn't matter.
- */
-#ifndef LV_FONT_SUBPX_BGR
-#define LV_FONT_SUBPX_BGR 0
-#endif
-
-/*Declare the type of the user data of fonts (can be e.g. `void *`, `int`, `struct`)*/
-
-/*=================
- * Text settings
- *=================*/
-
-/* Select a character encoding for strings.
- * Your IDE or editor should have the same character encoding
- * - LV_TXT_ENC_UTF8
- * - LV_TXT_ENC_ASCII
- * */
-#ifndef LV_TXT_ENC
-#define LV_TXT_ENC LV_TXT_ENC_UTF8
-#endif
-
- /*Can break (wrap) texts on these chars*/
-#ifndef LV_TXT_BREAK_CHARS
-#define LV_TXT_BREAK_CHARS " ,.;:-_"
-#endif
-
-/* If a word is at least this long, will break wherever "prettiest"
- * To disable, set to a value <= 0 */
-#ifndef LV_TXT_LINE_BREAK_LONG_LEN
-#define LV_TXT_LINE_BREAK_LONG_LEN 12
-#endif
-
-/* Minimum number of characters in a long word to put on a line before a break.
- * Depends on LV_TXT_LINE_BREAK_LONG_LEN. */
-#ifndef LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN
-#define LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN 3
-#endif
-
-/* Minimum number of characters in a long word to put on a line after a break.
- * Depends on LV_TXT_LINE_BREAK_LONG_LEN. */
-#ifndef LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN
-#define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 3
-#endif
-
-/* The control character to use for signalling text recoloring. */
-#ifndef LV_TXT_COLOR_CMD
-#define LV_TXT_COLOR_CMD "#"
-#endif
-
-/* Support bidirectional texts.
- * Allows mixing Left-to-Right and Right-to-Left texts.
- * The direction will be processed according to the Unicode Bidirectioanl Algorithm:
- * https://www.w3.org/International/articles/inline-bidi-markup/uba-basics*/
-#ifndef LV_USE_BIDI
-#define LV_USE_BIDI 0
-#endif
-#if LV_USE_BIDI
-/* Set the default direction. Supported values:
- * `LV_BIDI_DIR_LTR` Left-to-Right
- * `LV_BIDI_DIR_RTL` Right-to-Left
- * `LV_BIDI_DIR_AUTO` detect texts base direction */
-#ifndef LV_BIDI_BASE_DIR_DEF
-#define LV_BIDI_BASE_DIR_DEF LV_BIDI_DIR_AUTO
-#endif
-#endif
-
-/*Change the built in (v)snprintf functions*/
-#ifndef LV_SPRINTF_CUSTOM
-#define LV_SPRINTF_CUSTOM 0
-#endif
-#if LV_SPRINTF_CUSTOM
-#ifndef LV_SPRINTF_INCLUDE
-# define LV_SPRINTF_INCLUDE <stdio.h>
-#endif
-#ifndef lv_snprintf
-# define lv_snprintf snprintf
-#endif
-#ifndef lv_vsnprintf
-# define lv_vsnprintf vsnprintf
-#endif
-#endif /*LV_SPRINTF_CUSTOM*/
-
-/*===================
- * LV_OBJ SETTINGS
- *==================*/
-
-/*Declare the type of the user data of object (can be e.g. `void *`, `int`, `struct`)*/
-
-/*1: enable `lv_obj_realaign()` based on `lv_obj_align()` parameters*/
-#ifndef LV_USE_OBJ_REALIGN
-#define LV_USE_OBJ_REALIGN 1
-#endif
-
-/* Enable to make the object clickable on a larger area.
- * LV_EXT_CLICK_AREA_OFF or 0: Disable this feature
- * LV_EXT_CLICK_AREA_TINY: The extra area can be adjusted horizontally and vertically (0..255 px)
- * LV_EXT_CLICK_AREA_FULL: The extra area can be adjusted in all 4 directions (-32k..+32k px)
- */
-#ifndef LV_USE_EXT_CLICK_AREA
-#define LV_USE_EXT_CLICK_AREA LV_EXT_CLICK_AREA_OFF
-#endif
-
-/*==================
- * LV OBJ X USAGE
- *================*/
-/*
- * Documentation of the object types: https://docs.littlevgl.com/#Object-types
- */
-
-/*Arc (dependencies: -)*/
-#ifndef LV_USE_ARC
-#define LV_USE_ARC 1
-#endif
-
-/*Bar (dependencies: -)*/
-#ifndef LV_USE_BAR
-#define LV_USE_BAR 1
-#endif
-
-/*Button (dependencies: lv_cont*/
-#ifndef LV_USE_BTN
-#define LV_USE_BTN 1
-#endif
-#if LV_USE_BTN != 0
-/*Enable button-state animations - draw a circle on click (dependencies: LV_USE_ANIMATION)*/
-#ifndef LV_BTN_INK_EFFECT
-# define LV_BTN_INK_EFFECT 0
-#endif
-#endif
-
-/*Button matrix (dependencies: -)*/
-#ifndef LV_USE_BTNM
-#define LV_USE_BTNM 1
-#endif
-
-/*Calendar (dependencies: -)*/
-#ifndef LV_USE_CALENDAR
-#define LV_USE_CALENDAR 1
-#endif
-
-/*Canvas (dependencies: lv_img)*/
-#ifndef LV_USE_CANVAS
-#define LV_USE_CANVAS 1
-#endif
-
-/*Check box (dependencies: lv_btn, lv_label)*/
-#ifndef LV_USE_CB
-#define LV_USE_CB 1
-#endif
-
-/*Chart (dependencies: -)*/
-#ifndef LV_USE_CHART
-#define LV_USE_CHART 1
-#endif
-#if LV_USE_CHART
-#ifndef LV_CHART_AXIS_TICK_LABEL_MAX_LEN
-# define LV_CHART_AXIS_TICK_LABEL_MAX_LEN 20
-#endif
-#endif
-
-/*Container (dependencies: -*/
-#ifndef LV_USE_CONT
-#define LV_USE_CONT 1
-#endif
-
-/*Color picker (dependencies: -*/
-#ifndef LV_USE_CPICKER
-#define LV_USE_CPICKER 1
-#endif
-
-/*Drop down list (dependencies: lv_page, lv_label, lv_symbol_def.h)*/
-#ifndef LV_USE_DDLIST
-#define LV_USE_DDLIST 1
-#endif
-#if LV_USE_DDLIST != 0
-/*Open and close default animation time [ms] (0: no animation)*/
-#ifndef LV_DDLIST_DEF_ANIM_TIME
-# define LV_DDLIST_DEF_ANIM_TIME 200
-#endif
-#endif
-
-/*Gauge (dependencies:lv_bar, lv_lmeter)*/
-#ifndef LV_USE_GAUGE
-#define LV_USE_GAUGE 1
-#endif
-
-/*Image (dependencies: lv_label*/
-#ifndef LV_USE_IMG
-#define LV_USE_IMG 1
-#endif
-
-/*Image Button (dependencies: lv_btn*/
-#ifndef LV_USE_IMGBTN
-#define LV_USE_IMGBTN 1
-#endif
-#if LV_USE_IMGBTN
-/*1: The imgbtn requires left, mid and right parts and the width can be set freely*/
-#ifndef LV_IMGBTN_TILED
-# define LV_IMGBTN_TILED 0
-#endif
-#endif
-
-/*Keyboard (dependencies: lv_btnm)*/
-#ifndef LV_USE_KB
-#define LV_USE_KB 1
-#endif
-
-/*Label (dependencies: -*/
-#ifndef LV_USE_LABEL
-#define LV_USE_LABEL 1
-#endif
-#if LV_USE_LABEL != 0
-/*Hor, or ver. scroll speed [px/sec] in 'LV_LABEL_LONG_ROLL/ROLL_CIRC' mode*/
-#ifndef LV_LABEL_DEF_SCROLL_SPEED
-# define LV_LABEL_DEF_SCROLL_SPEED 25
-#endif
-
-/* Waiting period at beginning/end of animation cycle */
-#ifndef LV_LABEL_WAIT_CHAR_COUNT
-# define LV_LABEL_WAIT_CHAR_COUNT 3
-#endif
-
-/*Enable selecting text of the label */
-#ifndef LV_LABEL_TEXT_SEL
-# define LV_LABEL_TEXT_SEL 0
-#endif
-
-/*Store extra some info in labels (12 bytes) to speed up drawing of very long texts*/
-#ifndef LV_LABEL_LONG_TXT_HINT
-# define LV_LABEL_LONG_TXT_HINT 0
-#endif
-#endif
-
-/*LED (dependencies: -)*/
-#ifndef LV_USE_LED
-#define LV_USE_LED 1
-#endif
-
-/*Line (dependencies: -*/
-#ifndef LV_USE_LINE
-#define LV_USE_LINE 1
-#endif
-
-/*List (dependencies: lv_page, lv_btn, lv_label, (lv_img optionally for icons ))*/
-#ifndef LV_USE_LIST
-#define LV_USE_LIST 1
-#endif
-#if LV_USE_LIST != 0
-/*Default animation time of focusing to a list element [ms] (0: no animation) */
-#ifndef LV_LIST_DEF_ANIM_TIME
-# define LV_LIST_DEF_ANIM_TIME 100
-#endif
-#endif
-
-/*Line meter (dependencies: *;)*/
-#ifndef LV_USE_LMETER
-#define LV_USE_LMETER 1
-#endif
-
-/*Message box (dependencies: lv_rect, lv_btnm, lv_label)*/
-#ifndef LV_USE_MBOX
-#define LV_USE_MBOX 1
-#endif
-
-/*Page (dependencies: lv_cont)*/
-#ifndef LV_USE_PAGE
-#define LV_USE_PAGE 1
-#endif
-#if LV_USE_PAGE != 0
-/*Focus default animation time [ms] (0: no animation)*/
-#ifndef LV_PAGE_DEF_ANIM_TIME
-# define LV_PAGE_DEF_ANIM_TIME 400
-#endif
-#endif
-
-/*Preload (dependencies: lv_arc, lv_anim)*/
-#ifndef LV_USE_PRELOAD
-#define LV_USE_PRELOAD 1
-#endif
-#if LV_USE_PRELOAD != 0
-#ifndef LV_PRELOAD_DEF_ARC_LENGTH
-# define LV_PRELOAD_DEF_ARC_LENGTH 60 /*[deg]*/
-#endif
-#ifndef LV_PRELOAD_DEF_SPIN_TIME
-# define LV_PRELOAD_DEF_SPIN_TIME 1000 /*[ms]*/
-#endif
-#ifndef LV_PRELOAD_DEF_ANIM
-# define LV_PRELOAD_DEF_ANIM LV_PRELOAD_TYPE_SPINNING_ARC
-#endif
-#endif
-
-/*Roller (dependencies: lv_ddlist)*/
-#ifndef LV_USE_ROLLER
-#define LV_USE_ROLLER 1
-#endif
-#if LV_USE_ROLLER != 0
-/*Focus animation time [ms] (0: no animation)*/
-#ifndef LV_ROLLER_DEF_ANIM_TIME
-# define LV_ROLLER_DEF_ANIM_TIME 200
-#endif
-
-/*Number of extra "pages" when the roller is infinite*/
-#ifndef LV_ROLLER_INF_PAGES
-# define LV_ROLLER_INF_PAGES 7
-#endif
-#endif
-
-/*Slider (dependencies: lv_bar)*/
-#ifndef LV_USE_SLIDER
-#define LV_USE_SLIDER 1
-#endif
-
-/*Spinbox (dependencies: lv_ta)*/
-#ifndef LV_USE_SPINBOX
-#define LV_USE_SPINBOX 1
-#endif
-
-/*Switch (dependencies: lv_slider)*/
-#ifndef LV_USE_SW
-#define LV_USE_SW 1
-#endif
-
-/*Text area (dependencies: lv_label, lv_page)*/
-#ifndef LV_USE_TA
-#define LV_USE_TA 1
-#endif
-#if LV_USE_TA != 0
-#ifndef LV_TA_DEF_CURSOR_BLINK_TIME
-# define LV_TA_DEF_CURSOR_BLINK_TIME 400 /*ms*/
-#endif
-#ifndef LV_TA_DEF_PWD_SHOW_TIME
-# define LV_TA_DEF_PWD_SHOW_TIME 1500 /*ms*/
-#endif
-#endif
-
-/*Table (dependencies: lv_label)*/
-#ifndef LV_USE_TABLE
-#define LV_USE_TABLE 1
-#endif
-#if LV_USE_TABLE
-#ifndef LV_TABLE_COL_MAX
-# define LV_TABLE_COL_MAX 12
-#endif
-#endif
-
-/*Tab (dependencies: lv_page, lv_btnm)*/
-#ifndef LV_USE_TABVIEW
-#define LV_USE_TABVIEW 1
-#endif
-# if LV_USE_TABVIEW != 0
-/*Time of slide animation [ms] (0: no animation)*/
-#ifndef LV_TABVIEW_DEF_ANIM_TIME
-# define LV_TABVIEW_DEF_ANIM_TIME 300
-#endif
-#endif
-
-/*Tileview (dependencies: lv_page) */
-#ifndef LV_USE_TILEVIEW
-#define LV_USE_TILEVIEW 1
-#endif
-#if LV_USE_TILEVIEW
-/*Time of slide animation [ms] (0: no animation)*/
-#ifndef LV_TILEVIEW_DEF_ANIM_TIME
-# define LV_TILEVIEW_DEF_ANIM_TIME 300
-#endif
-#endif
-
-/*Window (dependencies: lv_cont, lv_btn, lv_label, lv_img, lv_page)*/
-#ifndef LV_USE_WIN
-#define LV_USE_WIN 1
-#endif
-
-/*==================
- * Non-user section
- *==================*/
-
-#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) /* Disable warnings for Visual Studio*/
-#ifndef _CRT_SECURE_NO_WARNINGS
-# define _CRT_SECURE_NO_WARNINGS
-#endif
-#endif
-
-
-#endif /*LV_CONF_CHECKER_H*/
diff --git a/src/libs/lvgl/src/lv_core/lv_core.mk b/src/libs/lvgl/src/lv_core/lv_core.mk
deleted file mode 100644
index eb1c5e0c..00000000
--- a/src/libs/lvgl/src/lv_core/lv_core.mk
+++ /dev/null
@@ -1,12 +0,0 @@
-CSRCS += lv_group.c
-CSRCS += lv_indev.c
-CSRCS += lv_disp.c
-CSRCS += lv_obj.c
-CSRCS += lv_refr.c
-CSRCS += lv_style.c
-CSRCS += lv_debug.c
-
-DEPPATH += --dep-path $(LVGL_DIR)/lvgl/src/lv_core
-VPATH += :$(LVGL_DIR)/lvgl/src/lv_core
-
-CFLAGS += "-I$(LVGL_DIR)/lvgl/src/lv_core"
diff --git a/src/libs/lvgl/src/lv_core/lv_debug.c b/src/libs/lvgl/src/lv_core/lv_debug.c
deleted file mode 100644
index 83071af5..00000000
--- a/src/libs/lvgl/src/lv_core/lv_debug.c
+++ /dev/null
@@ -1,193 +0,0 @@
-/**
- * @file lv_debug.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_obj.h"
-#include "lv_debug.h"
-
-#if LV_USE_DEBUG
-
-/*********************
- * DEFINES
- *********************/
-#ifndef LV_DEBUG_STR_MAX_LENGTH
-#define LV_DEBUG_STR_MAX_LENGTH (1024 * 8)
-#endif
-
-#ifndef LV_DEBUG_STR_MAX_REPEAT
-#define LV_DEBUG_STR_MAX_REPEAT 8
-#endif
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static bool obj_valid_child(const lv_obj_t * parent, const lv_obj_t * obj_to_find);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-bool lv_debug_check_null(const void * p)
-{
- if(p) return true;
-
- return false;
-}
-
-bool lv_debug_check_obj_type(const lv_obj_t * obj, const char * obj_type)
-{
- if(obj_type[0] == '\0') return true;
-
- lv_obj_type_t types;
- lv_obj_get_type((lv_obj_t *)obj, &types);
-
- uint8_t i;
- for(i = 0; i < LV_MAX_ANCESTOR_NUM; i++) {
- if(strcmp(types.type[i], obj_type) == 0) return true;
- }
-
- return false;
-}
-
-bool lv_debug_check_obj_valid(const lv_obj_t * obj)
-{
- lv_disp_t * disp = lv_disp_get_next(NULL);
- while(disp) {
- lv_obj_t * scr;
- LV_LL_READ(disp->scr_ll, scr) {
-
- if(scr == obj) return true;
- bool found = obj_valid_child(scr, obj);
- if(found) return true;
- }
-
- disp = lv_disp_get_next(disp);
- }
-
- return false;
-}
-
-bool lv_debug_check_style(const lv_style_t * style)
-{
- if(style == NULL) return true; /*NULL style is still valid*/
-
-#if LV_USE_ASSERT_STYLE
- if(style->debug_sentinel != LV_STYLE_DEGUG_SENTINEL_VALUE) {
- LV_LOG_WARN("Invalid style (local variable or not initialized?)");
- return false;
- }
-#endif
-
- return true;
-}
-
-bool lv_debug_check_str(const void * str)
-{
- const uint8_t * s = (const uint8_t *)str;
- uint8_t last_byte = 0;
- uint32_t rep = 0;
- uint32_t i;
-
- for(i = 0; s[i] != '\0' && i < LV_DEBUG_STR_MAX_LENGTH; i++) {
- if(s[i] != last_byte) {
- last_byte = s[i];
- rep = 1;
- } else if(s[i] > 0x7F){
- rep++;
- if(rep > LV_DEBUG_STR_MAX_REPEAT) {
- LV_LOG_WARN("lv_debug_check_str: a non-ASCII char has repeated more than LV_DEBUG_STR_MAX_REPEAT times)");
- return false;
- }
- }
-
- if(s[i] < 10) {
- LV_LOG_WARN("lv_debug_check_str: invalid char in the string (< 10 value)");
- return false; /*Shouldn't occur in strings*/
- }
- }
-
- if(s[i] == '\0') return true;
-
- LV_LOG_WARN("lv_debug_check_str: string is longer than LV_DEBUG_STR_MAX_LENGTH");
- return false;
-}
-
-void lv_debug_log_error(const char * msg, uint64_t value)
-{
- static const char hex[] = "0123456789ABCDEF";
-
- size_t msg_len = strlen(msg);
- uint32_t value_len = sizeof(unsigned long int);
-
- if(msg_len < 230) {
- char buf[255];
- char * bufp = buf;
-
- /*Add the function name*/
- memcpy(bufp, msg, msg_len);
- bufp += msg_len;
-
- /*Add value in hey*/
- *bufp = ' ';
- bufp ++;
- *bufp = '(';
- bufp ++;
- *bufp = '0';
- bufp ++;
- *bufp = 'x';
- bufp ++;
-
- int8_t i;
- for(i = value_len * 2 - 1; i >= 0; i--) {
- uint8_t x = (unsigned long int)((unsigned long int)value >> (i * 4)) & 0xF;
-
- *bufp = hex[x];
- bufp++;
- }
-
- *bufp = ')';
- bufp ++;
-
- *bufp = '\0';
- LV_LOG_ERROR(buf);
- } else {
- LV_LOG_ERROR(msg);
- }
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-static bool obj_valid_child(const lv_obj_t * parent, const lv_obj_t * obj_to_find)
-{
- /*Check all children of `parent`*/
- lv_obj_t * child;
- LV_LL_READ(parent->child_ll, child) {
- if(child == obj_to_find) return true;
-
- /*Check the children*/
- bool found = obj_valid_child(child, obj_to_find);
- if(found) return true;
- }
-
- return false;
-}
-
-#endif /*LV_USE_DEBUG*/
-
diff --git a/src/libs/lvgl/src/lv_core/lv_debug.h b/src/libs/lvgl/src/lv_core/lv_debug.h
deleted file mode 100644
index a932004e..00000000
--- a/src/libs/lvgl/src/lv_core/lv_debug.h
+++ /dev/null
@@ -1,154 +0,0 @@
-/**
- * @file lv_debug.h
- *
- */
-
-#ifndef LV_DEBUG_H
-#define LV_DEBUG_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_obj.h"
-
-#if LV_USE_DEBUG
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-bool lv_debug_check_null(const void * p);
-
-bool lv_debug_check_obj_type(const lv_obj_t * obj, const char * obj_type);
-
-bool lv_debug_check_obj_valid(const lv_obj_t * obj);
-
-bool lv_debug_check_style(const lv_style_t * style);
-
-bool lv_debug_check_str(const void * str);
-
-void lv_debug_log_error(const char * msg, uint64_t value);
-
-/**********************
- * MACROS
- **********************/
-
-#ifndef LV_DEBUG_ASSERT
-#define LV_DEBUG_ASSERT(expr, msg, value) \
-{ \
- if(!(expr)) { \
- LV_LOG_ERROR(__func__); \
- lv_debug_log_error(msg, (uint64_t)((uintptr_t)value)); \
- while(1); \
- } \
-}
-#endif
-
-/*----------------
- * CHECKS
- *----------------*/
-
-#ifndef LV_DEBUG_IS_NULL
-#define LV_DEBUG_IS_NULL(p) (lv_debug_check_null(p))
-#endif
-
-#ifndef LV_DEBUG_IS_STR
-#define LV_DEBUG_IS_STR(str) (lv_debug_check_null(str) && \
- lv_debug_check_str(str))
-#endif
-
-#ifndef LV_DEBUG_IS_OBJ
-#define LV_DEBUG_IS_OBJ(obj_p, obj_type) (lv_debug_check_null(obj_p) && \
- lv_debug_check_obj_valid(obj_p) && \
- lv_debug_check_obj_type(obj_p, obj_type))
-#endif
-
-#ifndef LV_DEBUG_IS_STYLE
-#define LV_DEBUG_IS_STYLE(style_p) (lv_debug_check_style(style_p))
-#endif
-
-/*-----------------
- * ASSERTS
- *-----------------*/
-
-/*clang-format off*/
-
-#if LV_USE_ASSERT_NULL
-# ifndef LV_ASSERT_NULL
-# define LV_ASSERT_NULL(p) LV_DEBUG_ASSERT(LV_DEBUG_IS_NULL(p), "NULL pointer", p);
-# endif
-#else
-# define LV_ASSERT_NULL(p) true
-#endif
-
-#if LV_USE_ASSERT_MEM
-# ifndef LV_ASSERT_MEM
-# define LV_ASSERT_MEM(p) LV_DEBUG_ASSERT(LV_DEBUG_IS_NULL(p), "Out of memory", p);
-# endif
-#else
-# define LV_ASSERT_MEM(p) true
-#endif
-
-#if LV_USE_ASSERT_STR
-# ifndef LV_ASSERT_STR
-# define LV_ASSERT_STR(str) LV_DEBUG_ASSERT(LV_DEBUG_IS_STR(str), "Strange or invalid string", str);
-# endif
-#else /* LV_USE_ASSERT_OBJ == 0 */
-# if LV_USE_ASSERT_NULL /*Use at least LV_ASSERT_NULL if enabled*/
-# define LV_ASSERT_STR(str) LV_ASSERT_NULL(str)
-# else
-# define LV_ASSERT_STR(str) true
-# endif
-#endif
-
-
-#if LV_USE_ASSERT_OBJ
-# ifndef LV_ASSERT_OBJ
-# define LV_ASSERT_OBJ(obj_p, obj_type) LV_DEBUG_ASSERT(LV_DEBUG_IS_OBJ(obj_p, obj_type), "Invalid object", obj_p);
-# endif
-#else /* LV_USE_ASSERT_OBJ == 0 */
-# if LV_USE_ASSERT_NULL /*Use at least LV_ASSERT_NULL if enabled*/
-# define LV_ASSERT_OBJ(obj_p, obj_type) LV_ASSERT_NULL(obj_p)
-# else
-# define LV_ASSERT_OBJ(obj_p, obj_type) true
-# endif
-#endif
-
-
-#if LV_USE_ASSERT_STYLE
-# ifndef LV_ASSERT_STYLE
-# define LV_ASSERT_STYLE(style_p) LV_DEBUG_ASSERT(LV_DEBUG_IS_STYLE(style_p), "Invalid style", style_p);
-# endif
-#else
-# define LV_ASSERT_STYLE(style) true
-#endif
-
-#else /* LV_USE_DEBUG == 0 */
-
-#define LV_DEBUG_ASSERT(expr, msg, value) do{}while(0)
-
-#define LV_ASSERT_NULL(p) true
-#define LV_ASSERT_MEM(p) true
-#define LV_ASSERT_STR(p) true
-#define LV_ASSERT_OBJ(obj, obj_type) true
-#define LV_ASSERT_STYLE(p) true
-
-#endif /* LV_USE_DEBUG */
-/*clang-format on*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_DEBUG_H*/
diff --git a/src/libs/lvgl/src/lv_core/lv_disp.c b/src/libs/lvgl/src/lv_core/lv_disp.c
deleted file mode 100644
index bcb73829..00000000
--- a/src/libs/lvgl/src/lv_core/lv_disp.c
+++ /dev/null
@@ -1,178 +0,0 @@
-/**
- * @file lv_disp.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_disp.h"
-#include "../lv_misc/lv_math.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-
-/**********************
- * STATIC VARIABLES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Return with a pointer to the active screen
- * @param disp pointer to display which active screen should be get. (NULL to use the default
- * screen)
- * @return pointer to the active screen object (loaded by 'lv_scr_load()')
- */
-lv_obj_t * lv_disp_get_scr_act(lv_disp_t * disp)
-{
- if(!disp) disp = lv_disp_get_default();
- if(!disp) {
- LV_LOG_WARN("lv_scr_act: no display registered to get its top layer");
- return NULL;
- }
-
- return disp->act_scr;
-}
-
-/**
- * Make a screen active
- * @param scr pointer to a screen
- */
-void lv_disp_load_scr(lv_obj_t * scr)
-{
- lv_disp_t * d = lv_obj_get_disp(scr);
-
- d->act_scr = scr;
-
- lv_obj_invalidate(scr);
-}
-
-/**
- * Return with the top layer. (Same on every screen and it is above the normal screen layer)
- * @param disp pointer to display which top layer should be get. (NULL to use the default screen)
- * @return pointer to the top layer object (transparent screen sized lv_obj)
- */
-lv_obj_t * lv_disp_get_layer_top(lv_disp_t * disp)
-{
- if(!disp) disp = lv_disp_get_default();
- if(!disp) {
- LV_LOG_WARN("lv_layer_top: no display registered to get its top layer");
- return NULL;
- }
-
- return disp->top_layer;
-}
-
-/**
- * Return with the sys. layer. (Same on every screen and it is above the normal screen and the top
- * layer)
- * @param disp pointer to display which sys. layer should be get. (NULL to use the default screen)
- * @return pointer to the sys layer object (transparent screen sized lv_obj)
- */
-lv_obj_t * lv_disp_get_layer_sys(lv_disp_t * disp)
-{
- if(!disp) disp = lv_disp_get_default();
- if(!disp) {
- LV_LOG_WARN("lv_layer_sys: no display registered to get its top layer");
- return NULL;
- }
-
- return disp->sys_layer;
-}
-
-/**
- * Assign a screen to a display.
- * @param disp pointer to a display where to assign the screen
- * @param scr pointer to a screen object to assign
- */
-void lv_disp_assign_screen(lv_disp_t * disp, lv_obj_t * scr)
-{
- if(lv_obj_get_parent(scr) != NULL) {
- LV_LOG_WARN("lv_disp_assign_screen: try to assign a non-screen object");
- return;
- }
-
- lv_disp_t * old_disp = lv_obj_get_disp(scr);
-
- if(old_disp == disp) return;
-
- lv_ll_chg_list(&old_disp->scr_ll, &disp->scr_ll, scr, true);
-}
-
-/**
- * Get a pointer to the screen refresher task to
- * modify its parameters with `lv_task_...` functions.
- * @param disp pointer to a display
- * @return pointer to the display refresher task. (NULL on error)
- */
-lv_task_t * lv_disp_get_refr_task(lv_disp_t * disp)
-{
- if(!disp) disp = lv_disp_get_default();
- if(!disp) {
- LV_LOG_WARN("lv_disp_get_refr_task: no display registered");
- return NULL;
- }
-
- return disp->refr_task;
-}
-
-/**
- * Get elapsed time since last user activity on a display (e.g. click)
- * @param disp pointer to an display (NULL to get the overall smallest inactivity)
- * @return elapsed ticks (milliseconds) since the last activity
- */
-uint32_t lv_disp_get_inactive_time(const lv_disp_t * disp)
-{
- if(!disp) disp = lv_disp_get_default();
- if(!disp) {
- LV_LOG_WARN("lv_disp_get_inactive_time: no display registered");
- return 0;
- }
-
- if(disp) return lv_tick_elaps(disp->last_activity_time);
-
- lv_disp_t * d;
- uint32_t t = UINT32_MAX;
- d = lv_disp_get_next(NULL);
- while(d) {
- t = LV_MATH_MIN(t, lv_tick_elaps(d->last_activity_time));
- d = lv_disp_get_next(d);
- }
-
- return t;
-}
-
-/**
- * Manually trigger an activity on a display
- * @param disp pointer to an display (NULL to use the default display)
- */
-void lv_disp_trig_activity(lv_disp_t * disp)
-{
- if(!disp) disp = lv_disp_get_default();
- if(!disp) {
- LV_LOG_WARN("lv_disp_trig_activity: no display registered");
- return;
- }
-
- disp->last_activity_time = lv_tick_get();
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
diff --git a/src/libs/lvgl/src/lv_core/lv_disp.h b/src/libs/lvgl/src/lv_core/lv_disp.h
deleted file mode 100644
index 30471543..00000000
--- a/src/libs/lvgl/src/lv_core/lv_disp.h
+++ /dev/null
@@ -1,152 +0,0 @@
-/**
- * @file lv_disp.h
- *
- */
-
-#ifndef LV_DISP_H
-#define LV_DISP_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#include "../lv_hal/lv_hal.h"
-#include "lv_obj.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Return with a pointer to the active screen
- * @param disp pointer to display which active screen should be get. (NULL to use the default
- * screen)
- * @return pointer to the active screen object (loaded by 'lv_scr_load()')
- */
-lv_obj_t * lv_disp_get_scr_act(lv_disp_t * disp);
-
-/**
- * Make a screen active
- * @param scr pointer to a screen
- */
-void lv_disp_load_scr(lv_obj_t * scr);
-
-/**
- * Return with the top layer. (Same on every screen and it is above the normal screen layer)
- * @param disp pointer to display which top layer should be get. (NULL to use the default screen)
- * @return pointer to the top layer object (transparent screen sized lv_obj)
- */
-lv_obj_t * lv_disp_get_layer_top(lv_disp_t * disp);
-
-/**
- * Return with the sys. layer. (Same on every screen and it is above the normal screen and the top
- * layer)
- * @param disp pointer to display which sys. layer should be get. (NULL to use the default screen)
- * @return pointer to the sys layer object (transparent screen sized lv_obj)
- */
-lv_obj_t * lv_disp_get_layer_sys(lv_disp_t * disp);
-
-/**
- * Assign a screen to a display.
- * @param disp pointer to a display where to assign the screen
- * @param scr pointer to a screen object to assign
- */
-void lv_disp_assign_screen(lv_disp_t * disp, lv_obj_t * scr);
-
-/**
- * Get a pointer to the screen refresher task to
- * modify its parameters with `lv_task_...` functions.
- * @param disp pointer to a display
- * @return pointer to the display refresher task. (NULL on error)
- */
-lv_task_t * lv_disp_get_refr_task(lv_disp_t * disp);
-
-/**
- * Get elapsed time since last user activity on a display (e.g. click)
- * @param disp pointer to an display (NULL to get the overall smallest inactivity)
- * @return elapsed ticks (milliseconds) since the last activity
- */
-uint32_t lv_disp_get_inactive_time(const lv_disp_t * disp);
-
-/**
- * Manually trigger an activity on a display
- * @param disp pointer to an display (NULL to use the default display)
- */
-void lv_disp_trig_activity(lv_disp_t * disp);
-
-/*------------------------------------------------
- * To improve backward compatibility
- * Recommended only if you have one display
- *------------------------------------------------*/
-
-/**
- * Get the active screen of the default display
- * @return pointer to the active screen
- */
-static inline lv_obj_t * lv_scr_act(void)
-{
- return lv_disp_get_scr_act(lv_disp_get_default());
-}
-
-/**
- * Get the top layer of the default display
- * @return pointer to the top layer
- */
-static inline lv_obj_t * lv_layer_top(void)
-{
- return lv_disp_get_layer_top(lv_disp_get_default());
-}
-
-/**
- * Get the active screen of the default display
- * @return pointer to the sys layer
- */
-static inline lv_obj_t * lv_layer_sys(void)
-{
- return lv_disp_get_layer_sys(lv_disp_get_default());
-}
-
-static inline void lv_scr_load(lv_obj_t * scr)
-{
- lv_disp_load_scr(scr);
-}
-
-/**********************
- * MACROS
- **********************/
-
-/*------------------------------------------------
- * To improve backward compatibility
- * Recommended only if you have one display
- *------------------------------------------------*/
-
-#ifndef LV_HOR_RES
-/**
- * The horizontal resolution of the currently active display.
- */
-#define LV_HOR_RES lv_disp_get_hor_res(lv_disp_get_default())
-#endif
-
-#ifndef LV_VER_RES
-/**
- * The vertical resolution of the currently active display.
- */
-#define LV_VER_RES lv_disp_get_ver_res(lv_disp_get_default())
-#endif
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_TEMPL_H*/
diff --git a/src/libs/lvgl/src/lv_core/lv_group.c b/src/libs/lvgl/src/lv_core/lv_group.c
deleted file mode 100644
index b26de56e..00000000
--- a/src/libs/lvgl/src/lv_core/lv_group.c
+++ /dev/null
@@ -1,708 +0,0 @@
-/**
- * @file lv_group.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_group.h"
-#if LV_USE_GROUP != 0
-#include <stddef.h>
-#include "../lv_core/lv_debug.h"
-#include "../lv_themes/lv_theme.h"
-#include "../lv_misc/lv_gc.h"
-
-#if defined(LV_GC_INCLUDE)
-#include LV_GC_INCLUDE
-#endif /* LV_ENABLE_GC */
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static void style_mod_def(lv_group_t * group, lv_style_t * style);
-static void style_mod_edit_def(lv_group_t * group, lv_style_t * style);
-static void refresh_theme(lv_group_t * g, lv_theme_t * th);
-static void focus_next_core(lv_group_t * group, void * (*begin)(const lv_ll_t *),
- void * (*move)(const lv_ll_t *, const void *));
-static void lv_group_refocus(lv_group_t * g);
-static void obj_to_foreground(lv_obj_t * obj);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Init. the group module
- */
-void lv_group_init(void)
-{
- lv_ll_init(&LV_GC_ROOT(_lv_group_ll), sizeof(lv_group_t));
-}
-
-/**
- * Create a new object group
- * @return pointer to the new object group
- */
-lv_group_t * lv_group_create(void)
-{
- lv_group_t * group = lv_ll_ins_head(&LV_GC_ROOT(_lv_group_ll));
- LV_ASSERT_MEM(group);
- if(group == NULL) return NULL;
- lv_ll_init(&group->obj_ll, sizeof(lv_obj_t *));
-
- group->obj_focus = NULL;
- group->frozen = 0;
- group->focus_cb = NULL;
- group->click_focus = 1;
- group->editing = 0;
- group->refocus_policy = LV_GROUP_REFOCUS_POLICY_PREV;
- group->wrap = 1;
-
-#if LV_USE_USER_DATA
- memset(&group->user_data, 0, sizeof(lv_group_user_data_t));
-#endif
-
- /*Initialize style modification callbacks from current theme*/
- refresh_theme(group, lv_theme_get_current());
-
- return group;
-}
-
-/**
- * Delete a group object
- * @param group pointer to a group
- */
-void lv_group_del(lv_group_t * group)
-{
- /*Defocus the the currently focused object*/
- if(group->obj_focus != NULL) {
- (*group->obj_focus)->signal_cb(*group->obj_focus, LV_SIGNAL_DEFOCUS, NULL);
- lv_obj_invalidate(*group->obj_focus);
- }
-
- /*Remove the objects from the group*/
- lv_obj_t ** obj;
- LV_LL_READ(group->obj_ll, obj)
- {
- (*obj)->group_p = NULL;
- }
-
- lv_ll_clear(&(group->obj_ll));
- lv_ll_rem(&LV_GC_ROOT(_lv_group_ll), group);
- lv_mem_free(group);
-}
-
-/**
- * Add an object to a group
- * @param group pointer to a group
- * @param obj pointer to an object to add
- */
-void lv_group_add_obj(lv_group_t * group, lv_obj_t * obj)
-{
- if(group == NULL) return;
-
- /*Do not add the object twice*/
- lv_obj_t ** obj_i;
- LV_LL_READ(group->obj_ll, obj_i)
- {
- if((*obj_i) == obj) {
- LV_LOG_INFO("lv_group_add_obj: the object is already added to this group");
- return;
- }
- }
-
- /*If the object is already in a group and focused then defocus it*/
- if(obj->group_p) {
- if(lv_obj_is_focused(obj)) {
- lv_group_refocus(obj->group_p);
-
- LV_LOG_INFO("lv_group_add_obj: assign object to an other group");
- }
- }
-
- obj->group_p = group;
- lv_obj_t ** next = lv_ll_ins_tail(&group->obj_ll);
- LV_ASSERT_MEM(next);
- if(next == NULL) return;
- *next = obj;
-
- /* If the head and the tail is equal then there is only one object in the linked list.
- * In this case automatically activate it*/
- if(lv_ll_get_head(&group->obj_ll) == next) {
- lv_group_refocus(group);
- }
-}
-
-/**
- * Remove an object from its group
- * @param obj pointer to an object to remove
- */
-void lv_group_remove_obj(lv_obj_t * obj)
-{
- lv_group_t * g = obj->group_p;
- if(g == NULL) return;
- if(g->obj_focus == NULL) return; /*Just to be sure (Not possible if there is at least one object in the group)*/
-
- /*Focus on the next object*/
- if(*g->obj_focus == obj) {
- /*If this is the only object in the group then focus to nothing.*/
- if(lv_ll_get_head(&g->obj_ll) == g->obj_focus && lv_ll_get_tail(&g->obj_ll) == g->obj_focus) {
- (*g->obj_focus)->signal_cb(*g->obj_focus, LV_SIGNAL_DEFOCUS, NULL);
- }
- /*If there more objects in the group then focus to the next/prev object*/
- else {
- lv_group_refocus(g);
- }
- }
-
- /* If the focuses object is still the same then it was the only object in the group but it will
- * be deleted. Set the `obj_focus` to NULL to get back to the initial state of the group with
- * zero objects*/
- if(*g->obj_focus == obj) {
- g->obj_focus = NULL;
- }
-
- /*Search the object and remove it from its group */
- lv_obj_t ** i;
- LV_LL_READ(g->obj_ll, i)
- {
- if(*i == obj) {
- lv_ll_rem(&g->obj_ll, i);
- lv_mem_free(i);
- obj->group_p = NULL;
- break;
- }
- }
-}
-
-/**
- * Remove all objects from a group
- * @param group pointer to a group
- */
-void lv_group_remove_all_objs(lv_group_t * group)
-{
- /*Defocus the the currently focused object*/
- if(group->obj_focus != NULL) {
- (*group->obj_focus)->signal_cb(*group->obj_focus, LV_SIGNAL_DEFOCUS, NULL);
- lv_obj_invalidate(*group->obj_focus);
- group->obj_focus = NULL;
- }
-
- /*Remove the objects from the group*/
- lv_obj_t ** obj;
- LV_LL_READ(group->obj_ll, obj)
- {
- (*obj)->group_p = NULL;
- }
-
- lv_ll_clear(&(group->obj_ll));
-}
-
-/**
- * Focus on an object (defocus the current)
- * @param obj pointer to an object to focus on
- */
-void lv_group_focus_obj(lv_obj_t * obj)
-{
- if(obj == NULL) return;
- lv_group_t * g = obj->group_p;
- if(g == NULL) return;
-
- if(g->frozen != 0) return;
-
- /*On defocus edit mode must be leaved*/
- lv_group_set_editing(g, false);
-
- lv_obj_t ** i;
- LV_LL_READ(g->obj_ll, i)
- {
- if(*i == obj) {
- if(g->obj_focus != NULL) {
- (*g->obj_focus)->signal_cb(*g->obj_focus, LV_SIGNAL_DEFOCUS, NULL);
- lv_res_t res = lv_event_send(*g->obj_focus, LV_EVENT_DEFOCUSED, NULL);
- if(res != LV_RES_OK) return;
- lv_obj_invalidate(*g->obj_focus);
- }
-
- g->obj_focus = i;
-
- if(g->obj_focus != NULL) {
- (*g->obj_focus)->signal_cb(*g->obj_focus, LV_SIGNAL_FOCUS, NULL);
- if(g->focus_cb) g->focus_cb(g);
- lv_res_t res = lv_event_send(*g->obj_focus, LV_EVENT_FOCUSED, NULL);
- if(res != LV_RES_OK) return;
- lv_obj_invalidate(*g->obj_focus);
-
- /*If the object or its parent has `top == true` bring it to the foregorund*/
- obj_to_foreground(*g->obj_focus);
- }
- break;
- }
- }
-}
-
-/**
- * Focus the next object in a group (defocus the current)
- * @param group pointer to a group
- */
-void lv_group_focus_next(lv_group_t * group)
-{
- focus_next_core(group, lv_ll_get_head, lv_ll_get_next);
-}
-
-/**
- * Focus the previous object in a group (defocus the current)
- * @param group pointer to a group
- */
-void lv_group_focus_prev(lv_group_t * group)
-{
- focus_next_core(group, lv_ll_get_tail, lv_ll_get_prev);
-}
-
-/**
- * Do not let to change the focus from the current object
- * @param group pointer to a group
- * @param en true: freeze, false: release freezing (normal mode)
- */
-void lv_group_focus_freeze(lv_group_t * group, bool en)
-{
- if(en == false)
- group->frozen = 0;
- else
- group->frozen = 1;
-}
-
-/**
- * Send a control character to the focuses object of a group
- * @param group pointer to a group
- * @param c a character (use LV_KEY_.. to navigate)
- * @return result of focused object in group.
- */
-lv_res_t lv_group_send_data(lv_group_t * group, uint32_t c)
-{
- lv_obj_t * act = lv_group_get_focused(group);
- if(act == NULL) return LV_RES_OK;
-
- lv_res_t res;
-
- res = act->signal_cb(act, LV_SIGNAL_CONTROL, &c);
- if(res != LV_RES_OK) return res;
-
- res = lv_event_send(act, LV_EVENT_KEY, &c);
- if(res != LV_RES_OK) return res;
-
- return res;
-}
-
-/**
- * Set a function for a group which will modify the object's style if it is in focus
- * @param group pointer to a group
- * @param style_mod_cb the style modifier function pointer
- */
-void lv_group_set_style_mod_cb(lv_group_t * group, lv_group_style_mod_cb_t style_mod_cb)
-{
- group->style_mod_cb = style_mod_cb;
- if(group->obj_focus != NULL) lv_obj_invalidate(*group->obj_focus);
-}
-
-/**
- * Set a function for a group which will modify the object's style if it is in focus in edit mode
- * @param group pointer to a group
- * @param style_mod_func the style modifier function pointer
- */
-void lv_group_set_style_mod_edit_cb(lv_group_t * group, lv_group_style_mod_cb_t style_mod_edit_cb)
-{
- group->style_mod_edit_cb = style_mod_edit_cb;
- if(group->obj_focus != NULL) lv_obj_invalidate(*group->obj_focus);
-}
-
-/**
- * Set a function for a group which will be called when a new object is focused
- * @param group pointer to a group
- * @param focus_cb the call back function or NULL if unused
- */
-void lv_group_set_focus_cb(lv_group_t * group, lv_group_focus_cb_t focus_cb)
-{
- group->focus_cb = focus_cb;
-}
-
-/**
- * Manually set the current mode (edit or navigate).
- * @param group pointer to group
- * @param edit: true: edit mode; false: navigate mode
- */
-void lv_group_set_editing(lv_group_t * group, bool edit)
-{
- uint8_t en_val = edit ? 1 : 0;
-
- if(en_val == group->editing) return; /*Do not set the same mode again*/
-
- group->editing = en_val;
- lv_obj_t * focused = lv_group_get_focused(group);
-
- if(focused) {
- focused->signal_cb(focused, LV_SIGNAL_FOCUS, NULL); /*Focus again to properly leave/open edit/navigate mode*/
- lv_res_t res = lv_event_send(*group->obj_focus, LV_EVENT_FOCUSED, NULL);
- if(res != LV_RES_OK) return;
- }
-
- lv_obj_invalidate(focused);
-}
-
-/**
- * Set the `click_focus` attribute. If enabled then the object will be focused then it is clicked.
- * @param group pointer to group
- * @param en: true: enable `click_focus`
- */
-void lv_group_set_click_focus(lv_group_t * group, bool en)
-{
- group->click_focus = en ? 1 : 0;
-}
-
-void lv_group_set_refocus_policy(lv_group_t * group, lv_group_refocus_policy_t policy)
-{
- group->refocus_policy = policy & 0x01;
-}
-
-/**
- * Set whether focus next/prev will allow wrapping from first->last or last->first.
- * @param group pointer to group
- * @param en: true: enable `wrap`
- */
-void lv_group_set_wrap(lv_group_t * group, bool en)
-{
- group->wrap = en ? 1 : 0;
-}
-
-/**
- * Modify a style with the set 'style_mod' function. The input style remains unchanged.
- * @param group pointer to group
- * @param style pointer to a style to modify
- * @return a copy of the input style but modified with the 'style_mod' function
- */
-lv_style_t * lv_group_mod_style(lv_group_t * group, const lv_style_t * style)
-{
- /*Load the current style. It will be modified by the callback*/
- lv_style_copy(&group->style_tmp, style);
-
- if(group->editing) {
- if(group->style_mod_edit_cb) group->style_mod_edit_cb(group, &group->style_tmp);
- } else {
- if(group->style_mod_cb) group->style_mod_cb(group, &group->style_tmp);
- }
- return &group->style_tmp;
-}
-
-/**
- * Get the focused object or NULL if there isn't one
- * @param group pointer to a group
- * @return pointer to the focused object
- */
-lv_obj_t * lv_group_get_focused(const lv_group_t * group)
-{
- if(!group) return NULL;
- if(group->obj_focus == NULL) return NULL;
-
- return *group->obj_focus;
-}
-
-#if LV_USE_USER_DATA
-/**
- * Get a pointer to the group's user data
- * @param group pointer to an group
- * @return pointer to the user data
- */
-lv_group_user_data_t * lv_group_get_user_data(lv_group_t * group)
-{
- return &group->user_data;
-}
-#endif
-
-/**
- * Get a the style modifier function of a group
- * @param group pointer to a group
- * @return pointer to the style modifier function
- */
-lv_group_style_mod_cb_t lv_group_get_style_mod_cb(const lv_group_t * group)
-{
- if(!group) return false;
- return group->style_mod_cb;
-}
-
-/**
- * Get a the style modifier function of a group in edit mode
- * @param group pointer to a group
- * @return pointer to the style modifier function
- */
-lv_group_style_mod_cb_t lv_group_get_style_mod_edit_cb(const lv_group_t * group)
-{
- if(!group) return false;
- return group->style_mod_edit_cb;
-}
-
-/**
- * Get the focus callback function of a group
- * @param group pointer to a group
- * @return the call back function or NULL if not set
- */
-lv_group_focus_cb_t lv_group_get_focus_cb(const lv_group_t * group)
-{
- if(!group) return false;
- return group->focus_cb;
-}
-
-/**
- * Get the current mode (edit or navigate).
- * @param group pointer to group
- * @return true: edit mode; false: navigate mode
- */
-bool lv_group_get_editing(const lv_group_t * group)
-{
- if(!group) return false;
- return group->editing ? true : false;
-}
-
-/**
- * Get the `click_focus` attribute.
- * @param group pointer to group
- * @return true: `click_focus` is enabled; false: disabled
- */
-bool lv_group_get_click_focus(const lv_group_t * group)
-{
- if(!group) return false;
- return group->click_focus ? true : false;
-}
-
-/**
- * Get whether focus next/prev will allow wrapping from first->last or last->first object.
- * @param group pointer to group
- * @param en: true: wrapping enabled; false: wrapping disabled
- */
-bool lv_group_get_wrap(lv_group_t * group)
-{
- if(!group) return false;
- return group->wrap ? true : false;
-}
-
-/**
- * Notify the group that current theme changed and style modification callbacks need to be
- * refreshed.
- * @param group pointer to group. If NULL then all groups are notified.
- */
-void lv_group_report_style_mod(lv_group_t * group)
-{
- lv_theme_t * th = lv_theme_get_current();
-
- if(group != NULL) {
- refresh_theme(group, th);
- return;
- }
-
- lv_group_t * i;
- LV_LL_READ(LV_GC_ROOT(_lv_group_ll), i)
- {
- refresh_theme(i, th);
- }
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-static void lv_group_refocus(lv_group_t * g)
-{
- /*Refocus must temporarily allow wrapping to work correctly*/
- uint8_t temp_wrap = g->wrap;
- g->wrap = 1;
-
- if(g->refocus_policy == LV_GROUP_REFOCUS_POLICY_NEXT)
- lv_group_focus_next(g);
- else if(g->refocus_policy == LV_GROUP_REFOCUS_POLICY_PREV)
- lv_group_focus_prev(g);
- /*Restore wrap property*/
- g->wrap = temp_wrap;
-}
-
-/**
- * Default style modifier function
- * @param group pointer to the caller group
- * @param style pointer to a style to modify. (Typically group.style_tmp) It will be OVERWRITTEN.
- */
-static void style_mod_def(lv_group_t * group, lv_style_t * style)
-{
- (void)group; /*Unused*/
-#if LV_COLOR_DEPTH != 1
-
- /*Make the style to be a little bit orange*/
- style->body.border.opa = LV_OPA_COVER;
- style->body.border.color = LV_COLOR_ORANGE;
-
- /*If not transparent or has border then emphasis the border*/
- if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20;
-
- style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_ORANGE, LV_OPA_70);
- style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_ORANGE, LV_OPA_70);
- style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_ORANGE, LV_OPA_60);
-
- style->text.color = lv_color_mix(style->text.color, LV_COLOR_ORANGE, LV_OPA_70);
-
- /*Add some recolor to the images*/
- if(style->image.intense < LV_OPA_MIN) {
- style->image.color = LV_COLOR_ORANGE;
- style->image.intense = LV_OPA_40;
- }
-#else
- style->body.border.opa = LV_OPA_COVER;
- style->body.border.color = LV_COLOR_BLACK;
- style->body.border.width = 2;
-
-#endif
-}
-
-/**
- * Default style modifier function
- * @param group pointer to the caller group
- * @param style pointer to a style to modify. (Typically group.style_tmp) It will be OVERWRITTEN.
- */
-static void style_mod_edit_def(lv_group_t * group, lv_style_t * style)
-{
- (void)group; /*Unused*/
-#if LV_COLOR_DEPTH != 1
-
- /*Make the style to be a little bit orange*/
- style->body.border.opa = LV_OPA_COVER;
- style->body.border.color = LV_COLOR_GREEN;
-
- /*If not empty or has border then emphasis the border*/
- if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20;
-
- style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70);
- style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70);
- style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_GREEN, LV_OPA_60);
-
- style->text.color = lv_color_mix(style->text.color, LV_COLOR_GREEN, LV_OPA_70);
-
- /*Add some recolor to the images*/
- if(style->image.intense < LV_OPA_MIN) {
- style->image.color = LV_COLOR_GREEN;
- style->image.intense = LV_OPA_40;
- }
-
-#else
- style->body.border.opa = LV_OPA_COVER;
- style->body.border.color = LV_COLOR_BLACK;
- style->body.border.width = 3;
-
-#endif
-}
-
-static void refresh_theme(lv_group_t * g, lv_theme_t * th)
-{
- g->style_mod_cb = style_mod_def;
- g->style_mod_edit_cb = style_mod_edit_def;
- if(th) {
- if(th->group.style_mod_xcb) g->style_mod_cb = th->group.style_mod_xcb;
- if(th->group.style_mod_edit_xcb) g->style_mod_edit_cb = th->group.style_mod_edit_xcb;
- }
-}
-
-static void focus_next_core(lv_group_t * group, void * (*begin)(const lv_ll_t *),
- void * (*move)(const lv_ll_t *, const void *))
-{
- if(group->frozen) return;
-
- lv_obj_t ** obj_next = group->obj_focus;
- lv_obj_t ** obj_sentinel = NULL;
- bool can_move = true;
- bool can_begin = true;
-
- for(;;) {
- if(obj_next == NULL) {
- if(group->wrap || obj_sentinel == NULL) {
- if(!can_begin) return;
- obj_next = begin(&group->obj_ll);
- can_move = false;
- can_begin = false;
- } else {
- /*Currently focused object is the last/first in the group, keep it that way*/
- return;
- }
- }
-
- if(obj_sentinel == NULL) {
- obj_sentinel = obj_next;
- if(obj_sentinel == NULL) return; /*Group is empty*/
- }
-
- if(can_move) {
- obj_next = move(&group->obj_ll, obj_next);
-
- /*Give up if we walked the entire list and haven't found another visible object*/
- if(obj_next == obj_sentinel) return;
- }
-
- can_move = true;
-
- if(obj_next == NULL) continue;
-
- /*Hidden objects don't receive focus*/
- if(!lv_obj_get_hidden(*obj_next)) break;
- }
-
- if(obj_next == group->obj_focus) return; /*There's only one visible object and it's already focused*/
-
- if(group->obj_focus) {
- (*group->obj_focus)->signal_cb(*group->obj_focus, LV_SIGNAL_DEFOCUS, NULL);
- lv_res_t res = lv_event_send(*group->obj_focus, LV_EVENT_DEFOCUSED, NULL);
- if(res != LV_RES_OK) return;
- lv_obj_invalidate(*group->obj_focus);
- }
-
- group->obj_focus = obj_next;
-
- (*group->obj_focus)->signal_cb(*group->obj_focus, LV_SIGNAL_FOCUS, NULL);
- lv_res_t res = lv_event_send(*group->obj_focus, LV_EVENT_FOCUSED, NULL);
- if(res != LV_RES_OK) return;
-
- /*If the object or its parent has `top == true` bring it to the foregorund*/
- obj_to_foreground(*group->obj_focus);
-
- lv_obj_invalidate(*group->obj_focus);
-
- if(group->focus_cb) group->focus_cb(group);
-}
-
-static void obj_to_foreground(lv_obj_t * obj)
-{
- /*Search for 'top' attribute*/
- lv_obj_t * i = obj;
- lv_obj_t * last_top = NULL;
- while(i != NULL) {
- if(i->top != 0) last_top = i;
- i = lv_obj_get_parent(i);
- }
-
- if(last_top != NULL) {
- /*Move the last_top object to the foreground*/
- lv_obj_move_foreground(last_top);
- }
-}
-
-#endif /*LV_USE_GROUP != 0*/
diff --git a/src/libs/lvgl/src/lv_core/lv_group.h b/src/libs/lvgl/src/lv_core/lv_group.h
deleted file mode 100644
index c27f7693..00000000
--- a/src/libs/lvgl/src/lv_core/lv_group.h
+++ /dev/null
@@ -1,293 +0,0 @@
-/**
- * @file lv_group.h
- *
- */
-
-#ifndef LV_GROUP_H
-#define LV_GROUP_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#include "lv_obj.h"
-
-/*********************
- * DEFINES
- *********************/
-/*Predefined keys to control the focused object via lv_group_send(group, c)*/
-/*For compatibility in signal function define the keys regardless to `LV_USE_GROUP`*/
-
-enum {
- LV_KEY_UP = 17, /*0x11*/
- LV_KEY_DOWN = 18, /*0x12*/
- LV_KEY_RIGHT = 19, /*0x13*/
- LV_KEY_LEFT = 20, /*0x14*/
- LV_KEY_ESC = 27, /*0x1B*/
- LV_KEY_DEL = 127, /*0x7F*/
- LV_KEY_BACKSPACE = 8, /*0x08*/
- LV_KEY_ENTER = 10, /*0x0A, '\n'*/
- LV_KEY_NEXT = 9, /*0x09, '\t'*/
- LV_KEY_PREV = 11, /*0x0B, '*/
- LV_KEY_HOME = 2, /*0x02, STX*/
- LV_KEY_END = 3, /*0x03, ETX*/
-};
-typedef uint8_t lv_key_t;
-
-#if LV_USE_GROUP != 0
-/**********************
- * TYPEDEFS
- **********************/
-struct _lv_group_t;
-
-typedef void (*lv_group_style_mod_cb_t)(struct _lv_group_t *, lv_style_t *);
-typedef void (*lv_group_focus_cb_t)(struct _lv_group_t *);
-
-/**
- * Groups can be used to logically hold objects so that they can be individually focused.
- * They are NOT for laying out objects on a screen (try `lv_cont` for that).
- */
-typedef struct _lv_group_t
-{
- lv_ll_t obj_ll; /**< Linked list to store the objects in the group */
- lv_obj_t ** obj_focus; /**< The object in focus*/
-
- lv_group_style_mod_cb_t style_mod_cb; /**< A function to modifies the style of the focused object*/
- lv_group_style_mod_cb_t style_mod_edit_cb; /**< A function which modifies the style of the edited object*/
- lv_group_focus_cb_t focus_cb; /**< A function to call when a new object is focused (optional)*/
- lv_style_t style_tmp; /**< Stores the modified style of the focused object */
-#if LV_USE_USER_DATA
- lv_group_user_data_t user_data;
-#endif
-
- uint8_t frozen : 1; /**< 1: can't focus to new object*/
- uint8_t editing : 1; /**< 1: Edit mode, 0: Navigate mode*/
- uint8_t click_focus : 1; /**< 1: If an object in a group is clicked by an indev then it will be
- focused */
- uint8_t refocus_policy : 1; /**< 1: Focus prev if focused on deletion. 0: Focus next if focused on
- deletion.*/
- uint8_t wrap : 1; /**< 1: Focus next/prev can wrap at end of list. 0: Focus next/prev stops at end
- of list.*/
-} lv_group_t;
-
-enum { LV_GROUP_REFOCUS_POLICY_NEXT = 0, LV_GROUP_REFOCUS_POLICY_PREV = 1 };
-typedef uint8_t lv_group_refocus_policy_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Init. the group module
- * @remarks Internal function, do not call directly.
- */
-void lv_group_init(void);
-
-/**
- * Create a new object group
- * @return pointer to the new object group
- */
-lv_group_t * lv_group_create(void);
-
-/**
- * Delete a group object
- * @param group pointer to a group
- */
-void lv_group_del(lv_group_t * group);
-
-/**
- * Add an object to a group
- * @param group pointer to a group
- * @param obj pointer to an object to add
- */
-void lv_group_add_obj(lv_group_t * group, lv_obj_t * obj);
-
-/**
- * Remove an object from its group
- * @param obj pointer to an object to remove
- */
-void lv_group_remove_obj(lv_obj_t * obj);
-
-/**
- * Remove all objects from a group
- * @param group pointer to a group
- */
-void lv_group_remove_all_objs(lv_group_t * group);
-
-/**
- * Focus on an object (defocus the current)
- * @param obj pointer to an object to focus on
- */
-void lv_group_focus_obj(lv_obj_t * obj);
-
-/**
- * Focus the next object in a group (defocus the current)
- * @param group pointer to a group
- */
-void lv_group_focus_next(lv_group_t * group);
-
-/**
- * Focus the previous object in a group (defocus the current)
- * @param group pointer to a group
- */
-void lv_group_focus_prev(lv_group_t * group);
-
-/**
- * Do not let to change the focus from the current object
- * @param group pointer to a group
- * @param en true: freeze, false: release freezing (normal mode)
- */
-void lv_group_focus_freeze(lv_group_t * group, bool en);
-
-/**
- * Send a control character to the focuses object of a group
- * @param group pointer to a group
- * @param c a character (use LV_KEY_.. to navigate)
- * @return result of focused object in group.
- */
-lv_res_t lv_group_send_data(lv_group_t * group, uint32_t c);
-
-/**
- * Set a function for a group which will modify the object's style if it is in focus
- * @param group pointer to a group
- * @param style_mod_cb the style modifier function pointer
- */
-void lv_group_set_style_mod_cb(lv_group_t * group, lv_group_style_mod_cb_t style_mod_cb);
-
-/**
- * Set a function for a group which will modify the object's style if it is in focus in edit mode
- * @param group pointer to a group
- * @param style_mod_edit_cb the style modifier function pointer
- */
-void lv_group_set_style_mod_edit_cb(lv_group_t * group, lv_group_style_mod_cb_t style_mod_edit_cb);
-
-/**
- * Set a function for a group which will be called when a new object is focused
- * @param group pointer to a group
- * @param focus_cb the call back function or NULL if unused
- */
-void lv_group_set_focus_cb(lv_group_t * group, lv_group_focus_cb_t focus_cb);
-
-/**
- * Set whether the next or previous item in a group is focused if the currently focussed obj is
- * deleted.
- * @param group pointer to a group
- * @param new refocus policy enum
- */
-void lv_group_set_refocus_policy(lv_group_t * group, lv_group_refocus_policy_t policy);
-
-/**
- * Manually set the current mode (edit or navigate).
- * @param group pointer to group
- * @param edit: true: edit mode; false: navigate mode
- */
-void lv_group_set_editing(lv_group_t * group, bool edit);
-
-/**
- * Set the `click_focus` attribute. If enabled then the object will be focused then it is clicked.
- * @param group pointer to group
- * @param en: true: enable `click_focus`
- */
-void lv_group_set_click_focus(lv_group_t * group, bool en);
-
-/**
- * Set whether focus next/prev will allow wrapping from first->last or last->first object.
- * @param group pointer to group
- * @param en: true: wrapping enabled; false: wrapping disabled
- */
-void lv_group_set_wrap(lv_group_t * group, bool en);
-
-/**
- * Modify a style with the set 'style_mod' function. The input style remains unchanged.
- * @param group pointer to group
- * @param style pointer to a style to modify
- * @return a copy of the input style but modified with the 'style_mod' function
- */
-lv_style_t * lv_group_mod_style(lv_group_t * group, const lv_style_t * style);
-
-/**
- * Get the focused object or NULL if there isn't one
- * @param group pointer to a group
- * @return pointer to the focused object
- */
-lv_obj_t * lv_group_get_focused(const lv_group_t * group);
-
-#if LV_USE_USER_DATA
-/**
- * Get a pointer to the group's user data
- * @param group pointer to an group
- * @return pointer to the user data
- */
-lv_group_user_data_t * lv_group_get_user_data(lv_group_t * group);
-
-#endif
-
-/**
- * Get a the style modifier function of a group
- * @param group pointer to a group
- * @return pointer to the style modifier function
- */
-lv_group_style_mod_cb_t lv_group_get_style_mod_cb(const lv_group_t * group);
-
-/**
- * Get a the style modifier function of a group in edit mode
- * @param group pointer to a group
- * @return pointer to the style modifier function
- */
-lv_group_style_mod_cb_t lv_group_get_style_mod_edit_cb(const lv_group_t * group);
-
-/**
- * Get the focus callback function of a group
- * @param group pointer to a group
- * @return the call back function or NULL if not set
- */
-lv_group_focus_cb_t lv_group_get_focus_cb(const lv_group_t * group);
-
-/**
- * Get the current mode (edit or navigate).
- * @param group pointer to group
- * @return true: edit mode; false: navigate mode
- */
-bool lv_group_get_editing(const lv_group_t * group);
-
-/**
- * Get the `click_focus` attribute.
- * @param group pointer to group
- * @return true: `click_focus` is enabled; false: disabled
- */
-bool lv_group_get_click_focus(const lv_group_t * group);
-
-/**
- * Get whether focus next/prev will allow wrapping from first->last or last->first object.
- * @param group pointer to group
- * @param en: true: wrapping enabled; false: wrapping disabled
- */
-bool lv_group_get_wrap(lv_group_t * group);
-
-/**
- * Notify the group that current theme changed and style modification callbacks need to be
- * refreshed.
- * @param group pointer to group. If NULL then all groups are notified.
- */
-void lv_group_report_style_mod(lv_group_t * group);
-
-/**********************
- * MACROS
- **********************/
-
-#endif /*LV_USE_GROUP != 0*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_GROUP_H*/
diff --git a/src/libs/lvgl/src/lv_core/lv_indev.c b/src/libs/lvgl/src/lv_core/lv_indev.c
deleted file mode 100644
index 6ec59bda..00000000
--- a/src/libs/lvgl/src/lv_core/lv_indev.c
+++ /dev/null
@@ -1,1240 +0,0 @@
-/**
- * @file lv_indev.c
- *
- */
-
-/*********************
- * INCLUDES
- ********************/
-#include "lv_indev.h"
-#include "lv_disp.h"
-#include "lv_obj.h"
-
-#include "../lv_hal/lv_hal_tick.h"
-#include "../lv_core/lv_group.h"
-#include "../lv_core/lv_refr.h"
-#include "../lv_misc/lv_task.h"
-#include "../lv_misc/lv_math.h"
-
-/*********************
- * DEFINES
- *********************/
-
-#if LV_INDEV_DEF_DRAG_THROW <= 0
-#warning "LV_INDEV_DRAG_THROW must be greater than 0"
-#endif
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-
-static void indev_pointer_proc(lv_indev_t * i, lv_indev_data_t * data);
-static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data);
-static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data);
-static void indev_button_proc(lv_indev_t * i, lv_indev_data_t * data);
-static void indev_proc_press(lv_indev_proc_t * proc);
-static void indev_proc_release(lv_indev_proc_t * proc);
-static void indev_proc_reset_query_handler(lv_indev_t * indev);
-static lv_obj_t * indev_search_obj(const lv_indev_proc_t * proc, lv_obj_t * obj);
-static void indev_drag(lv_indev_proc_t * state);
-static void indev_drag_throw(lv_indev_proc_t * proc);
-static bool indev_reset_check(lv_indev_proc_t * proc);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_indev_t * indev_act;
-static lv_obj_t * indev_obj_act = NULL;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Initialize the display input device subsystem
- */
-void lv_indev_init(void)
-{
- lv_indev_reset(NULL); /*Reset all input devices*/
-}
-
-/**
- * Called periodically to read the input devices
- * @param param pointer to and input device to read
- */
-void lv_indev_read_task(lv_task_t * task)
-{
- LV_LOG_TRACE("indev read task started");
-
- lv_indev_data_t data;
-
- indev_act = task->user_data;
-
- /*Read and process all indevs*/
- if(indev_act->driver.disp == NULL) return; /*Not assigned to any displays*/
-
- /*Handle reset query before processing the point*/
- indev_proc_reset_query_handler(indev_act);
-
- if(indev_act->proc.disabled) return;
- bool more_to_read;
- do {
- /*Read the data*/
- more_to_read = lv_indev_read(indev_act, &data);
-
- /*The active object might deleted even in the read function*/
- indev_proc_reset_query_handler(indev_act);
- indev_obj_act = NULL;
-
- indev_act->proc.state = data.state;
-
- /*Save the last activity time*/
- if(indev_act->proc.state == LV_INDEV_STATE_PR) {
- indev_act->driver.disp->last_activity_time = lv_tick_get();
- } else if(indev_act->driver.type == LV_INDEV_TYPE_ENCODER && data.enc_diff) {
- indev_act->driver.disp->last_activity_time = lv_tick_get();
- }
-
- if(indev_act->driver.type == LV_INDEV_TYPE_POINTER) {
- indev_pointer_proc(indev_act, &data);
- } else if(indev_act->driver.type == LV_INDEV_TYPE_KEYPAD) {
- indev_keypad_proc(indev_act, &data);
- } else if(indev_act->driver.type == LV_INDEV_TYPE_ENCODER) {
- indev_encoder_proc(indev_act, &data);
- } else if(indev_act->driver.type == LV_INDEV_TYPE_BUTTON) {
- indev_button_proc(indev_act, &data);
- }
- /*Handle reset query if it happened in during processing*/
- indev_proc_reset_query_handler(indev_act);
- } while(more_to_read);
-
- /*End of indev processing, so no act indev*/
- indev_act = NULL;
- indev_obj_act = NULL;
-
- LV_LOG_TRACE("indev read task finished");
-}
-
-/**
- * Get the currently processed input device. Can be used in action functions too.
- * @return pointer to the currently processed input device or NULL if no input device processing
- * right now
- */
-lv_indev_t * lv_indev_get_act(void)
-{
- return indev_act;
-}
-
-/**
- * Get the type of an input device
- * @param indev pointer to an input device
- * @return the type of the input device from `lv_hal_indev_type_t` (`LV_INDEV_TYPE_...`)
- */
-lv_indev_type_t lv_indev_get_type(const lv_indev_t * indev)
-{
- if(indev == NULL) return LV_INDEV_TYPE_NONE;
-
- return indev->driver.type;
-}
-/**
- * Reset one or all input devices
- * @param indev pointer to an input device to reset or NULL to reset all of them
- */
-void lv_indev_reset(lv_indev_t * indev)
-{
- if(indev)
- indev->proc.reset_query = 1;
- else {
- lv_indev_t * i = lv_indev_get_next(NULL);
- while(i) {
- i->proc.reset_query = 1;
-
- i = lv_indev_get_next(i);
- }
- }
-}
-
-/**
- * Reset the long press state of an input device
- * @param indev pointer to an input device
- */
-void lv_indev_reset_long_press(lv_indev_t * indev)
-{
- indev->proc.long_pr_sent = 0;
- indev->proc.longpr_rep_timestamp = lv_tick_get();
- indev->proc.pr_timestamp = lv_tick_get();
-}
-
-/**
- * Enable or disable an input devices
- * @param indev pointer to an input device
- * @param en true: enable; false: disable
- */
-void lv_indev_enable(lv_indev_t * indev, bool en)
-{
- if(!indev) return;
-
- indev->proc.disabled = en ? 0 : 1;
-}
-
-/**
- * Set a cursor for a pointer input device (for LV_INPUT_TYPE_POINTER and LV_INPUT_TYPE_BUTTON)
- * @param indev pointer to an input device
- * @param cur_obj pointer to an object to be used as cursor
- */
-void lv_indev_set_cursor(lv_indev_t * indev, lv_obj_t * cur_obj)
-{
- if(indev->driver.type != LV_INDEV_TYPE_POINTER) return;
-
- indev->cursor = cur_obj;
- lv_obj_set_parent(indev->cursor, lv_disp_get_layer_sys(indev->driver.disp));
- lv_obj_set_pos(indev->cursor, indev->proc.types.pointer.act_point.x, indev->proc.types.pointer.act_point.y);
-}
-
-#if LV_USE_GROUP
-/**
- * Set a destination group for a keypad input device (for LV_INDEV_TYPE_KEYPAD)
- * @param indev pointer to an input device
- * @param group point to a group
- */
-void lv_indev_set_group(lv_indev_t * indev, lv_group_t * group)
-{
- if(indev->driver.type == LV_INDEV_TYPE_KEYPAD || indev->driver.type == LV_INDEV_TYPE_ENCODER) {
- indev->group = group;
- }
-}
-#endif
-
-/**
- * Set the an array of points for LV_INDEV_TYPE_BUTTON.
- * These points will be assigned to the buttons to press a specific point on the screen
- * @param indev pointer to an input device
- * @param group point to a group
- */
-void lv_indev_set_button_points(lv_indev_t * indev, const lv_point_t * points)
-{
- if(indev->driver.type == LV_INDEV_TYPE_BUTTON) {
- indev->btn_points = points;
- }
-}
-
-/**
- * Get the last point of an input device (for LV_INDEV_TYPE_POINTER and LV_INDEV_TYPE_BUTTON)
- * @param indev pointer to an input device
- * @param point pointer to a point to store the result
- */
-void lv_indev_get_point(const lv_indev_t * indev, lv_point_t * point)
-{
- if(indev->driver.type != LV_INDEV_TYPE_POINTER && indev->driver.type != LV_INDEV_TYPE_BUTTON) {
- point->x = -1;
- point->y = -1;
- } else {
- point->x = indev->proc.types.pointer.act_point.x;
- point->y = indev->proc.types.pointer.act_point.y;
- }
-}
-
-/**
- * Get the last pressed key of an input device (for LV_INDEV_TYPE_KEYPAD)
- * @param indev pointer to an input device
- * @return the last pressed key (0 on error)
- */
-uint32_t lv_indev_get_key(const lv_indev_t * indev)
-{
- if(indev->driver.type != LV_INDEV_TYPE_KEYPAD)
- return 0;
- else
- return indev->proc.types.keypad.last_key;
-}
-
-/**
- * Check if there is dragging with an input device or not (for LV_INDEV_TYPE_POINTER and
- * LV_INDEV_TYPE_BUTTON)
- * @param indev pointer to an input device
- * @return true: drag is in progress
- */
-bool lv_indev_is_dragging(const lv_indev_t * indev)
-{
- if(indev == NULL) return false;
- if(indev->driver.type != LV_INDEV_TYPE_POINTER && indev->driver.type != LV_INDEV_TYPE_BUTTON) return false;
- return indev->proc.types.pointer.drag_in_prog == 0 ? false : true;
-}
-
-/**
- * Get the types.pointer.vector of dragging of an input device (for LV_INDEV_TYPE_POINTER and
- * LV_INDEV_TYPE_BUTTON)
- * @param indev pointer to an input device
- * @param point pointer to a point to store the types.pointer.vector
- */
-void lv_indev_get_vect(const lv_indev_t * indev, lv_point_t * point)
-{
- if(indev == NULL) {
- point->x = 0;
- point->y = 0;
- return;
- }
-
- if(indev->driver.type != LV_INDEV_TYPE_POINTER && indev->driver.type != LV_INDEV_TYPE_BUTTON) {
- point->x = 0;
- point->y = 0;
- } else {
- point->x = indev->proc.types.pointer.vect.x;
- point->y = indev->proc.types.pointer.vect.y;
- }
-}
-
-/**
- * Do nothing until the next release
- * @param indev pointer to an input device
- */
-void lv_indev_wait_release(lv_indev_t * indev)
-{
- indev->proc.wait_until_release = 1;
-}
-
-/**
- * Get a pointer to the indev read task to
- * modify its parameters with `lv_task_...` functions.
- * @param indev pointer to an input device
- * @return pointer to the indev read refresher task. (NULL on error)
- */
-lv_task_t * lv_indev_get_read_task(lv_disp_t * indev)
-{
- if(!indev) {
- LV_LOG_WARN("lv_indev_get_read_task: indev was NULL");
- return NULL;
- }
-
- return indev->refr_task;
-}
-
-/**
- * Gets a pointer to the currently active object in the currently processed input device.
- * @return pointer to currently active object or NULL if no active object
- */
-lv_obj_t * lv_indev_get_obj_act(void)
-{
- return indev_obj_act;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Process a new point from LV_INDEV_TYPE_POINTER input device
- * @param i pointer to an input device
- * @param data pointer to the data read from the input device
- */
-static void indev_pointer_proc(lv_indev_t * i, lv_indev_data_t * data)
-{
- /*Move the cursor if set and moved*/
- if(i->cursor != NULL &&
- (i->proc.types.pointer.last_point.x != data->point.x || i->proc.types.pointer.last_point.y != data->point.y)) {
- lv_obj_set_pos(i->cursor, data->point.x, data->point.y);
- }
-
- i->proc.types.pointer.act_point.x = data->point.x;
- i->proc.types.pointer.act_point.y = data->point.y;
-
- if(i->proc.state == LV_INDEV_STATE_PR) {
- indev_proc_press(&i->proc);
- } else {
- indev_proc_release(&i->proc);
- }
-
- i->proc.types.pointer.last_point.x = i->proc.types.pointer.act_point.x;
- i->proc.types.pointer.last_point.y = i->proc.types.pointer.act_point.y;
-}
-
-/**
- * Process a new point from LV_INDEV_TYPE_KEYPAD input device
- * @param i pointer to an input device
- * @param data pointer to the data read from the input device
- */
-static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data)
-{
-#if LV_USE_GROUP
- if(data->state == LV_INDEV_STATE_PR && i->proc.wait_until_release) return;
-
- if(i->proc.wait_until_release) {
- i->proc.wait_until_release = 0;
- i->proc.pr_timestamp = 0;
- i->proc.long_pr_sent = 0;
- i->proc.types.keypad.last_state = LV_INDEV_STATE_REL; /*To skip the processing of release*/
- }
-
- lv_group_t * g = i->group;
- if(g == NULL) return;
-
- indev_obj_act = lv_group_get_focused(g);
- if(indev_obj_act == NULL) return;
-
- /*Save the last key to compare it with the current latter on RELEASE*/
- uint32_t prev_key = i->proc.types.keypad.last_key;
-
- /* Save the last key.
- * It must be done here else `lv_indev_get_key` will return the last key in events and signals*/
- i->proc.types.keypad.last_key = data->key;
-
- /* Save the previous state so we can detect state changes below and also set the last state now
- * so if any signal/event handler on the way returns `LV_RES_INV` the last state is remembered
- * for the next time*/
- uint32_t prev_state = i->proc.types.keypad.last_state;
- i->proc.types.keypad.last_state = data->state;
-
- /*Key press happened*/
- if(data->state == LV_INDEV_STATE_PR && prev_state == LV_INDEV_STATE_REL) {
- i->proc.pr_timestamp = lv_tick_get();
-
- /*Simulate a press on the object if ENTER was pressed*/
- if(data->key == LV_KEY_ENTER) {
- /*Send the ENTER as a normal KEY*/
- lv_group_send_data(g, LV_KEY_ENTER);
-
- indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_PRESSED, NULL);
- if(indev_reset_check(&i->proc)) return;
- lv_event_send(indev_obj_act, LV_EVENT_PRESSED, NULL);
- if(indev_reset_check(&i->proc)) return;
- } else if(data->key == LV_KEY_ESC) {
- /*Send the ESC as a normal KEY*/
- lv_group_send_data(g, LV_KEY_ESC);
-
- lv_event_send(indev_obj_act, LV_EVENT_CANCEL, NULL);
- if(indev_reset_check(&i->proc)) return;
- }
- /*Move the focus on NEXT*/
- else if(data->key == LV_KEY_NEXT) {
- lv_group_set_editing(g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/
- lv_group_focus_next(g);
- if(indev_reset_check(&i->proc)) return;
- }
- /*Move the focus on PREV*/
- else if(data->key == LV_KEY_PREV) {
- lv_group_set_editing(g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/
- lv_group_focus_prev(g);
- if(indev_reset_check(&i->proc)) return;
- }
- /*Just send other keys to the object (e.g. 'A' or `LV_GROUP_KEY_RIGHT`)*/
- else {
- lv_group_send_data(g, data->key);
- }
- }
- /*Pressing*/
- else if(data->state == LV_INDEV_STATE_PR && prev_state == LV_INDEV_STATE_PR) {
- /*Long press time has elapsed?*/
- if(i->proc.long_pr_sent == 0 && lv_tick_elaps(i->proc.pr_timestamp) > i->driver.long_press_time) {
- i->proc.long_pr_sent = 1;
- if(data->key == LV_KEY_ENTER) {
- i->proc.longpr_rep_timestamp = lv_tick_get();
- indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_LONG_PRESS, NULL);
- if(indev_reset_check(&i->proc)) return;
- lv_event_send(indev_obj_act, LV_EVENT_LONG_PRESSED, NULL);
- if(indev_reset_check(&i->proc)) return;
- }
- }
- /*Long press repeated time has elapsed?*/
- else if(i->proc.long_pr_sent != 0 &&
- lv_tick_elaps(i->proc.longpr_rep_timestamp) > i->driver.long_press_rep_time) {
-
- i->proc.longpr_rep_timestamp = lv_tick_get();
-
- /*Send LONG_PRESS_REP on ENTER*/
- if(data->key == LV_KEY_ENTER) {
- indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_LONG_PRESS_REP, NULL);
- if(indev_reset_check(&i->proc)) return;
- lv_event_send(indev_obj_act, LV_EVENT_LONG_PRESSED_REPEAT, NULL);
- if(indev_reset_check(&i->proc)) return;
- }
- /*Move the focus on NEXT again*/
- else if(data->key == LV_KEY_NEXT) {
- lv_group_set_editing(g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/
- lv_group_focus_next(g);
- if(indev_reset_check(&i->proc)) return;
- }
- /*Move the focus on PREV again*/
- else if(data->key == LV_KEY_PREV) {
- lv_group_set_editing(g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/
- lv_group_focus_prev(g);
- if(indev_reset_check(&i->proc)) return;
- }
- /*Just send other keys again to the object (e.g. 'A' or `LV_GORUP_KEY_RIGHT)*/
- else {
- lv_group_send_data(g, data->key);
- if(indev_reset_check(&i->proc)) return;
- }
- }
- }
- /*Release happened*/
- else if(data->state == LV_INDEV_STATE_REL && prev_state == LV_INDEV_STATE_PR) {
- /*The user might clear the key when it was released. Always release the pressed key*/
- data->key = prev_key;
- if(data->key == LV_KEY_ENTER) {
-
- indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_RELEASED, NULL);
- if(indev_reset_check(&i->proc)) return;
-
- if(i->proc.long_pr_sent == 0) {
- lv_event_send(indev_obj_act, LV_EVENT_SHORT_CLICKED, NULL);
- if(indev_reset_check(&i->proc)) return;
- }
-
- lv_event_send(indev_obj_act, LV_EVENT_CLICKED, NULL);
- if(indev_reset_check(&i->proc)) return;
-
- lv_event_send(indev_obj_act, LV_EVENT_RELEASED, NULL);
- if(indev_reset_check(&i->proc)) return;
- }
- i->proc.pr_timestamp = 0;
- i->proc.long_pr_sent = 0;
- }
- indev_obj_act = NULL;
-#else
- (void)data; /*Unused*/
- (void)i; /*Unused*/
-#endif
-}
-
-/**
- * Process a new point from LV_INDEV_TYPE_ENCODER input device
- * @param i pointer to an input device
- * @param data pointer to the data read from the input device
- */
-static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data)
-{
-#if LV_USE_GROUP
-
- if(data->state == LV_INDEV_STATE_PR && i->proc.wait_until_release) return;
-
- if(i->proc.wait_until_release) {
- i->proc.wait_until_release = 0;
- i->proc.pr_timestamp = 0;
- i->proc.long_pr_sent = 0;
- i->proc.types.keypad.last_state = LV_INDEV_STATE_REL; /*To skip the processing of release*/
- }
-
- /* Save the last keys before anything else.
- * They need to be already saved if the the function returns for any reason*/
- lv_indev_state_t last_state = i->proc.types.keypad.last_state;
- i->proc.types.keypad.last_state = data->state;
- i->proc.types.keypad.last_key = data->key;
-
- lv_group_t * g = i->group;
- if(g == NULL) return;
-
- indev_obj_act = lv_group_get_focused(g);
- if(indev_obj_act == NULL) return;
-
- /*Process the steps first. They are valid only with released button*/
- if(data->state == LV_INDEV_STATE_REL) {
- /*In edit mode send LEFT/RIGHT keys*/
- if(lv_group_get_editing(g)) {
- int32_t s;
- if(data->enc_diff < 0) {
- for(s = 0; s < -data->enc_diff; s++) lv_group_send_data(g, LV_KEY_LEFT);
- } else if(data->enc_diff > 0) {
- for(s = 0; s < data->enc_diff; s++) lv_group_send_data(g, LV_KEY_RIGHT);
- }
- }
- /*In navigate mode focus on the next/prev objects*/
- else {
- int32_t s;
- if(data->enc_diff < 0) {
- for(s = 0; s < -data->enc_diff; s++) lv_group_focus_prev(g);
- } else if(data->enc_diff > 0) {
- for(s = 0; s < data->enc_diff; s++) lv_group_focus_next(g);
- }
- }
- }
-
- /*Refresh the focused object. It might change due to lv_group_focus_prev/next*/
- indev_obj_act = lv_group_get_focused(g);
- if(indev_obj_act == NULL) return;
-
- /*Button press happened*/
- if(data->state == LV_INDEV_STATE_PR && last_state == LV_INDEV_STATE_REL) {
- bool editable = false;
- indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_GET_EDITABLE, &editable);
-
- i->proc.pr_timestamp = lv_tick_get();
- if(lv_group_get_editing(g) == true || editable == false) {
- indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_PRESSED, NULL);
- if(indev_reset_check(&i->proc)) return;
-
- lv_event_send(indev_obj_act, LV_EVENT_PRESSED, NULL);
- if(indev_reset_check(&i->proc)) return;
- }
- }
- /*Pressing*/
- else if(data->state == LV_INDEV_STATE_PR && last_state == LV_INDEV_STATE_PR) {
- if(i->proc.long_pr_sent == 0 && lv_tick_elaps(i->proc.pr_timestamp) > i->driver.long_press_time) {
- bool editable = false;
- indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_GET_EDITABLE, &editable);
-
- /*On enter long press toggle edit mode.*/
- if(editable) {
- /*Don't leave edit mode if there is only one object (nowhere to navigate)*/
- if(lv_ll_is_empty(&g->obj_ll) == false) {
- lv_group_set_editing(g, lv_group_get_editing(g) ? false : true); /*Toggle edit mode on long press*/
- }
- }
- /*If not editable then just send a long press signal*/
- else {
- indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_LONG_PRESS, NULL);
- if(indev_reset_check(&i->proc)) return;
- lv_event_send(indev_obj_act, LV_EVENT_LONG_PRESSED, NULL);
- if(indev_reset_check(&i->proc)) return;
- }
- i->proc.long_pr_sent = 1;
- }
- }
- /*Release happened*/
- else if(data->state == LV_INDEV_STATE_REL && last_state == LV_INDEV_STATE_PR) {
-
- bool editable = false;
- indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_GET_EDITABLE, &editable);
-
- /*The button was released on a non-editable object. Just send enter*/
- if(editable == false) {
- indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_RELEASED, NULL);
- if(indev_reset_check(&i->proc)) return;
-
- if(i->proc.long_pr_sent == 0) lv_event_send(indev_obj_act, LV_EVENT_SHORT_CLICKED, NULL);
- if(indev_reset_check(&i->proc)) return;
-
- lv_event_send(indev_obj_act, LV_EVENT_CLICKED, NULL);
- if(indev_reset_check(&i->proc)) return;
-
- lv_event_send(indev_obj_act, LV_EVENT_RELEASED, NULL);
- if(indev_reset_check(&i->proc)) return;
- }
- /*An object is being edited and the button is released. */
- else if(g->editing) {
- /*Ignore long pressed enter release because it comes from mode switch*/
- if(!i->proc.long_pr_sent || lv_ll_is_empty(&g->obj_ll)) {
- indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_RELEASED, NULL);
- if(indev_reset_check(&i->proc)) return;
-
- lv_event_send(indev_obj_act, LV_EVENT_SHORT_CLICKED, NULL);
- if(indev_reset_check(&i->proc)) return;
-
- lv_event_send(indev_obj_act, LV_EVENT_CLICKED, NULL);
- if(indev_reset_check(&i->proc)) return;
-
- lv_event_send(indev_obj_act, LV_EVENT_RELEASED, NULL);
- if(indev_reset_check(&i->proc)) return;
-
- lv_group_send_data(g, LV_KEY_ENTER);
- }
- }
- /*If the focused object is editable and now in navigate mode then on enter switch edit
- mode*/
- else if(editable && !g->editing && !i->proc.long_pr_sent) {
- lv_group_set_editing(g, true); /*Set edit mode*/
- }
-
- i->proc.pr_timestamp = 0;
- i->proc.long_pr_sent = 0;
- }
- indev_obj_act = NULL;
-#else
- (void)data; /*Unused*/
- (void)i; /*Unused*/
-#endif
-}
-
-/**
- * Process new points from a input device. indev->state.pressed has to be set
- * @param indev pointer to an input device state
- * @param x x coordinate of the next point
- * @param y y coordinate of the next point
- */
-static void indev_button_proc(lv_indev_t * i, lv_indev_data_t * data)
-{
- i->proc.types.pointer.act_point.x = i->btn_points[data->btn_id].x;
- i->proc.types.pointer.act_point.y = i->btn_points[data->btn_id].y;
-
- /*Still the same point is pressed*/
- if(i->proc.types.pointer.last_point.x == i->proc.types.pointer.act_point.x &&
- i->proc.types.pointer.last_point.y == i->proc.types.pointer.act_point.y && data->state == LV_INDEV_STATE_PR) {
- indev_proc_press(&i->proc);
- } else {
- /*If a new point comes always make a release*/
- indev_proc_release(&i->proc);
- }
-
- i->proc.types.pointer.last_point.x = i->proc.types.pointer.act_point.x;
- i->proc.types.pointer.last_point.y = i->proc.types.pointer.act_point.y;
-}
-
-/**
- * Process the pressed state of LV_INDEV_TYPE_POINER input devices
- * @param indev pointer to an input device 'proc'
- * @return LV_RES_OK: no indev reset required; LV_RES_INV: indev reset is required
- */
-static void indev_proc_press(lv_indev_proc_t * proc)
-{
- indev_obj_act = proc->types.pointer.act_obj;
-
- if(proc->wait_until_release != 0) return;
-
- lv_disp_t * disp = indev_act->driver.disp;
- bool new_obj_searched = false;
-
- /*If there is no last object then search*/
- if(indev_obj_act == NULL) {
- indev_obj_act = indev_search_obj(proc, lv_disp_get_layer_sys(disp));
- if(indev_obj_act == NULL) indev_obj_act = indev_search_obj(proc, lv_disp_get_layer_top(disp));
- if(indev_obj_act == NULL) indev_obj_act = indev_search_obj(proc, lv_disp_get_scr_act(disp));
- new_obj_searched = true;
- }
- /*If there is last object but it is not dragged and not protected also search*/
- else if(proc->types.pointer.drag_in_prog == 0 &&
- lv_obj_is_protected(indev_obj_act, LV_PROTECT_PRESS_LOST) == false) {
- indev_obj_act = indev_search_obj(proc, lv_disp_get_layer_sys(disp));
- if(indev_obj_act == NULL) indev_obj_act = indev_search_obj(proc, lv_disp_get_layer_top(disp));
- if(indev_obj_act == NULL) indev_obj_act = indev_search_obj(proc, lv_disp_get_scr_act(disp));
- new_obj_searched = true;
- }
- /*If a dragable or a protected object was the last then keep it*/
- else {
- }
-
- /*The last object might have drag throw. Stop it manually*/
- if(new_obj_searched && proc->types.pointer.last_obj) {
- proc->types.pointer.drag_throw_vect.x = 0;
- proc->types.pointer.drag_throw_vect.y = 0;
- indev_drag_throw(proc);
- }
-
- /*If a new object was found reset some variables and send a pressed signal*/
- if(indev_obj_act != proc->types.pointer.act_obj) {
- proc->types.pointer.last_point.x = proc->types.pointer.act_point.x;
- proc->types.pointer.last_point.y = proc->types.pointer.act_point.y;
-
- /*If a new object found the previous was lost, so send a signal*/
- if(proc->types.pointer.act_obj != NULL) {
- /*Save the obj because in special cases `act_obj` can change in the signal function*/
- lv_obj_t * last_obj = proc->types.pointer.act_obj;
-
- last_obj->signal_cb(last_obj, LV_SIGNAL_PRESS_LOST, indev_act);
- if(indev_reset_check(proc)) return;
- lv_event_send(last_obj, LV_EVENT_PRESS_LOST, NULL);
- if(indev_reset_check(proc)) return;
-
- }
-
- proc->types.pointer.act_obj = indev_obj_act; /*Save the pressed object*/
- proc->types.pointer.last_obj = indev_obj_act;
-
- if(indev_obj_act != NULL) {
- /* Save the time when the obj pressed.
- * It is necessary to count the long press time.*/
- proc->pr_timestamp = lv_tick_get();
- proc->long_pr_sent = 0;
- proc->types.pointer.drag_limit_out = 0;
- proc->types.pointer.drag_in_prog = 0;
- proc->types.pointer.drag_sum.x = 0;
- proc->types.pointer.drag_sum.y = 0;
- proc->types.pointer.vect.x = 0;
- proc->types.pointer.vect.y = 0;
-
- /*Search for 'top' attribute*/
- lv_obj_t * i = indev_obj_act;
- lv_obj_t * last_top = NULL;
- while(i != NULL) {
- if(i->top) last_top = i;
- i = lv_obj_get_parent(i);
- }
-
- if(last_top != NULL) {
- /*Move the last_top object to the foreground*/
- lv_obj_move_foreground(last_top);
- }
-
- /*Send a signal about the press*/
- indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_PRESSED, indev_act);
- if(indev_reset_check(proc)) return;
-
- lv_event_send(indev_obj_act, LV_EVENT_PRESSED, NULL);
- if(indev_reset_check(proc)) return;
- }
- }
-
- /*Calculate the types.pointer.vector*/
- proc->types.pointer.vect.x = proc->types.pointer.act_point.x - proc->types.pointer.last_point.x;
- proc->types.pointer.vect.y = proc->types.pointer.act_point.y - proc->types.pointer.last_point.y;
-
- proc->types.pointer.drag_throw_vect.x = (proc->types.pointer.drag_throw_vect.x * 5) >> 3;
- proc->types.pointer.drag_throw_vect.y = (proc->types.pointer.drag_throw_vect.y * 5) >> 3;
-
- if(proc->types.pointer.drag_throw_vect.x < 0)
- proc->types.pointer.drag_throw_vect.x++;
- else if(proc->types.pointer.drag_throw_vect.x > 0)
- proc->types.pointer.drag_throw_vect.x--;
-
- if(proc->types.pointer.drag_throw_vect.y < 0)
- proc->types.pointer.drag_throw_vect.y++;
- else if(proc->types.pointer.drag_throw_vect.y > 0)
- proc->types.pointer.drag_throw_vect.y--;
-
- proc->types.pointer.drag_throw_vect.x += (proc->types.pointer.vect.x * 4) >> 3;
- proc->types.pointer.drag_throw_vect.y += (proc->types.pointer.vect.y * 4) >> 3;
-
- /*If there is active object and it can be dragged run the drag*/
- if(indev_obj_act != NULL) {
- indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_PRESSING, indev_act);
- if(indev_reset_check(proc)) return;
- lv_event_send(indev_obj_act, LV_EVENT_PRESSING, NULL);
- if(indev_reset_check(proc)) return;
-
- indev_drag(proc);
- if(indev_reset_check(proc)) return;
-
- /*If there is no drag then check for long press time*/
- if(proc->types.pointer.drag_in_prog == 0 && proc->long_pr_sent == 0) {
- /*Send a signal about the long press if enough time elapsed*/
- if(lv_tick_elaps(proc->pr_timestamp) > indev_act->driver.long_press_time) {
- indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_LONG_PRESS, indev_act);
- if(indev_reset_check(proc)) return;
- lv_event_send(indev_obj_act, LV_EVENT_LONG_PRESSED, NULL);
- if(indev_reset_check(proc)) return;
-
- /*Mark the signal sending to do not send it again*/
- proc->long_pr_sent = 1;
-
- /*Save the long press time stamp for the long press repeat handler*/
- proc->longpr_rep_timestamp = lv_tick_get();
- }
- }
- /*Send long press repeated signal*/
- if(proc->types.pointer.drag_in_prog == 0 && proc->long_pr_sent == 1) {
- /*Send a signal about the long press repeat if enough time elapsed*/
- if(lv_tick_elaps(proc->longpr_rep_timestamp) > indev_act->driver.long_press_rep_time) {
- indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_LONG_PRESS_REP, indev_act);
- if(indev_reset_check(proc)) return;
- lv_event_send(indev_obj_act, LV_EVENT_LONG_PRESSED_REPEAT, NULL);
- if(indev_reset_check(proc)) return;
- proc->longpr_rep_timestamp = lv_tick_get();
- }
- }
- }
-}
-
-/**
- * Process the released state of LV_INDEV_TYPE_POINER input devices
- * @param proc pointer to an input device 'proc'
- */
-static void indev_proc_release(lv_indev_proc_t * proc)
-{
- if(proc->wait_until_release != 0) {
- proc->types.pointer.act_obj = NULL;
- proc->types.pointer.last_obj = NULL;
- proc->pr_timestamp = 0;
- proc->longpr_rep_timestamp = 0;
- proc->wait_until_release = 0;
- }
- indev_obj_act = proc->types.pointer.act_obj;
-
- /*Forget the act obj and send a released signal */
- if(indev_obj_act) {
- /* If the object was protected against press lost then it possible that
- * the object is already not pressed but still it is the `act_obj`.
- * In this case send the `LV_SIGNAL_RELEASED/CLICKED` instead of `LV_SIGNAL_PRESS_LOST` if
- * the indev is ON the `types.pointer.act_obj` */
- if(lv_obj_is_protected(indev_obj_act, LV_PROTECT_PRESS_LOST)) {
- indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_RELEASED, indev_act);
- if(indev_reset_check(proc)) return;
-
- if(proc->types.pointer.drag_in_prog == 0) {
- if(proc->long_pr_sent == 0) {
- lv_event_send(indev_obj_act, LV_EVENT_SHORT_CLICKED, NULL);
- if(indev_reset_check(proc)) return;
- }
-
- lv_event_send(indev_obj_act, LV_EVENT_CLICKED, NULL);
- if(indev_reset_check(proc)) return;
- }
-
- lv_event_send(indev_obj_act, LV_EVENT_RELEASED, NULL);
- if(indev_reset_check(proc)) return;
- }
- /* The simple case: `act_obj` was not protected against press lost.
- * If it is already not pressed then `indev_proc_press` would set `indev_obj_act = NULL`*/
- else {
- indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_RELEASED, indev_act);
- if(indev_reset_check(proc)) return;
-
- if(proc->long_pr_sent == 0 && proc->types.pointer.drag_in_prog == 0) {
- lv_event_send(indev_obj_act, LV_EVENT_SHORT_CLICKED, NULL);
- if(indev_reset_check(proc)) return;
- }
-
- if(proc->types.pointer.drag_in_prog == 0) {
- lv_event_send(indev_obj_act, LV_EVENT_CLICKED, NULL);
- if(indev_reset_check(proc)) return;
- }
-
- lv_event_send(indev_obj_act, LV_EVENT_RELEASED, NULL);
- if(indev_reset_check(proc)) return;
- }
-
- if(indev_reset_check(proc)) return;
-
- /*Handle click focus*/
- bool click_focus_sent = false;
-#if LV_USE_GROUP
- lv_group_t * g = lv_obj_get_group(indev_obj_act);
-
- /*Check, if the parent is in a group and focus on it.*/
- /*Respect the click focus protection*/
- if(lv_obj_is_protected(indev_obj_act, LV_PROTECT_CLICK_FOCUS) == false) {
- lv_obj_t * parent = indev_obj_act;
-
- while(g == NULL) {
- parent = lv_obj_get_parent(parent);
- if(parent == NULL) break;
-
- /*Ignore is the protected against click focus*/
- if(lv_obj_is_protected(parent, LV_PROTECT_CLICK_FOCUS)) {
- parent = NULL;
- break;
- }
- g = lv_obj_get_group(parent);
- }
-
- /* If a parent is in a group make it focused.
- * `LV_EVENT_FOCUSED/DEFOCUSED` will be sent by `lv_group_focus_obj`*/
- if(g && parent) {
- if(lv_group_get_click_focus(g)) {
- click_focus_sent = true;
- lv_group_focus_obj(parent);
- }
- }
- }
-#endif
-
- /* Send defocus to the lastly "active" object and foucus to the new one.
- * DO not sent the events if they was sent by the click focus*/
- if(proc->types.pointer.last_pressed != indev_obj_act && click_focus_sent == false) {
- lv_event_send(proc->types.pointer.last_pressed, LV_EVENT_DEFOCUSED, NULL);
- if(indev_reset_check(proc)) return;
-
- lv_event_send(proc->types.pointer.act_obj, LV_EVENT_FOCUSED, NULL);
- if(indev_reset_check(proc)) return;
-
- proc->types.pointer.last_pressed = indev_obj_act;
- }
-
- if(indev_reset_check(proc)) return;
-
- /*Send LV_EVENT_DRAG_THROW_BEGIN if required */
- /*If drag parent is active check recursively the drag_parent attribute*/
- lv_obj_t * drag_obj = indev_obj_act;
- while(lv_obj_get_drag_parent(drag_obj) != false && drag_obj != NULL) {
- drag_obj = lv_obj_get_parent(drag_obj);
- }
-
- if(drag_obj) {
- if(lv_obj_get_drag_throw(drag_obj) && proc->types.pointer.drag_in_prog) {
- lv_event_send(drag_obj, LV_EVENT_DRAG_THROW_BEGIN, NULL);
- if(indev_reset_check(proc)) return;
- }
- }
-
- proc->types.pointer.act_obj = NULL;
- proc->pr_timestamp = 0;
- proc->longpr_rep_timestamp = 0;
- }
-
- /*The reset can be set in the signal function.
- * In case of reset query ignore the remaining parts.*/
- if(proc->types.pointer.last_obj != NULL && proc->reset_query == 0) {
- indev_drag_throw(proc);
- if(indev_reset_check(proc)) return;
- }
-}
-
-/**
- * Process a new point from LV_INDEV_TYPE_BUTTON input device
- * @param i pointer to an input device
- * @param data pointer to the data read from the input device
- * Reset input device if a reset query has been sent to it
- * @param indev pointer to an input device
- */
-static void indev_proc_reset_query_handler(lv_indev_t * indev)
-{
- if(indev->proc.reset_query) {
- indev->proc.types.pointer.act_obj = NULL;
- indev->proc.types.pointer.last_obj = NULL;
- indev->proc.types.pointer.last_pressed = NULL;
- indev->proc.types.pointer.drag_limit_out = 0;
- indev->proc.types.pointer.drag_in_prog = 0;
- indev->proc.long_pr_sent = 0;
- indev->proc.pr_timestamp = 0;
- indev->proc.longpr_rep_timestamp = 0;
- indev->proc.types.pointer.drag_sum.x = 0;
- indev->proc.types.pointer.drag_sum.y = 0;
- indev->proc.types.pointer.drag_throw_vect.x = 0;
- indev->proc.types.pointer.drag_throw_vect.y = 0;
- indev->proc.reset_query = 0;
- indev_obj_act = NULL;
- }
-}
-/**
- * Search the most top, clickable object on the last point of an input device
- * @param proc pointer to the `lv_indev_proc_t` part of the input device
- * @param obj pointer to a start object, typically the screen
- * @return pointer to the found object or NULL if there was no suitable object
- */
-static lv_obj_t * indev_search_obj(const lv_indev_proc_t * proc, lv_obj_t * obj)
-{
- lv_obj_t * found_p = NULL;
-
- /*If the point is on this object check its children too*/
-#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_TINY
- lv_area_t ext_area;
- ext_area.x1 = obj->coords.x1 - obj->ext_click_pad_hor;
- ext_area.x2 = obj->coords.x2 + obj->ext_click_pad_hor;
- ext_area.y1 = obj->coords.y1 - obj->ext_click_pad_ver;
- ext_area.y2 = obj->coords.y2 + obj->ext_click_pad_ver;
-
- if(lv_area_is_point_on(&ext_area, &proc->types.pointer.act_point)) {
-#elif LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL
- lv_area_t ext_area;
- ext_area.x1 = obj->coords.x1 - obj->ext_click_pad.x1;
- ext_area.x2 = obj->coords.x2 + obj->ext_click_pad.x2;
- ext_area.y1 = obj->coords.y1 - obj->ext_click_pad.y1;
- ext_area.y2 = obj->coords.y2 + obj->ext_click_pad.y2;
-
- if(lv_area_is_point_on(&ext_area, &proc->types.pointer.act_point)) {
-#else
- if(lv_area_is_point_on(&obj->coords, &proc->types.pointer.act_point)) {
-#endif
- lv_obj_t * i;
-
- LV_LL_READ(obj->child_ll, i)
- {
- found_p = indev_search_obj(proc, i);
-
- /*If a child was found then break*/
- if(found_p != NULL) {
- break;
- }
- }
-
- /*If then the children was not ok, and this obj is clickable
- * and it or its parent is not hidden then save this object*/
- if(found_p == NULL && lv_obj_get_click(obj) != false) {
- lv_obj_t * hidden_i = obj;
- while(hidden_i != NULL) {
- if(lv_obj_get_hidden(hidden_i) == true) break;
- hidden_i = lv_obj_get_parent(hidden_i);
- }
- /*No parent found with hidden == true*/
- if(hidden_i == NULL) found_p = obj;
- }
- }
-
- return found_p;
-}
-
-/**
- * Handle the dragging of indev_proc_p->types.pointer.act_obj
- * @param indev pointer to a input device state
- */
-static void indev_drag(lv_indev_proc_t * state)
-{
- lv_obj_t * drag_obj = state->types.pointer.act_obj;
- bool drag_just_started = false;
-
- /*If drag parent is active check recursively the drag_parent attribute*/
- while(lv_obj_get_drag_parent(drag_obj) != false && drag_obj != NULL) {
- drag_obj = lv_obj_get_parent(drag_obj);
- }
-
- if(drag_obj == NULL) return;
-
- if(lv_obj_get_drag(drag_obj) == false) return;
-
- lv_drag_dir_t allowed_dirs = lv_obj_get_drag_dir(drag_obj);
-
- /*Count the movement by drag*/
- state->types.pointer.drag_sum.x += state->types.pointer.vect.x;
- state->types.pointer.drag_sum.y += state->types.pointer.vect.y;
-
- /*Enough move?*/
- if(state->types.pointer.drag_limit_out == 0) {
- /*If a move is greater then LV_DRAG_LIMIT then begin the drag*/
- if(((allowed_dirs & LV_DRAG_DIR_HOR) &&
- LV_MATH_ABS(state->types.pointer.drag_sum.x) >= indev_act->driver.drag_limit) ||
- ((allowed_dirs & LV_DRAG_DIR_VER) &&
- LV_MATH_ABS(state->types.pointer.drag_sum.y) >= indev_act->driver.drag_limit)) {
- state->types.pointer.drag_limit_out = 1;
- drag_just_started = true;
- }
- }
-
- /*If the drag limit is exceeded handle the dragging*/
- if(state->types.pointer.drag_limit_out != 0) {
- /*Set new position if the vector is not zero*/
- if(state->types.pointer.vect.x != 0 || state->types.pointer.vect.y != 0) {
-
- uint16_t inv_buf_size =
- lv_disp_get_inv_buf_size(indev_act->driver.disp); /*Get the number of currently invalidated areas*/
-
- lv_coord_t prev_x = drag_obj->coords.x1;
- lv_coord_t prev_y = drag_obj->coords.y1;
- lv_coord_t prev_par_w = lv_obj_get_width(lv_obj_get_parent(drag_obj));
- lv_coord_t prev_par_h = lv_obj_get_height(lv_obj_get_parent(drag_obj));
-
- /*Get the coordinates of the object and modify them*/
- lv_coord_t act_x = lv_obj_get_x(drag_obj);
- lv_coord_t act_y = lv_obj_get_y(drag_obj);
-
- if(allowed_dirs == LV_DRAG_DIR_ALL) {
- if(drag_just_started) {
- act_x += state->types.pointer.drag_sum.x;
- act_y += state->types.pointer.drag_sum.y;
- }
- lv_obj_set_pos(drag_obj, act_x + state->types.pointer.vect.x, act_y + state->types.pointer.vect.y);
- } else if(allowed_dirs & LV_DRAG_DIR_HOR) {
- if(drag_just_started) {
- act_x += state->types.pointer.drag_sum.x;
- }
- lv_obj_set_x(drag_obj, act_x + state->types.pointer.vect.x);
- } else if(allowed_dirs & LV_DRAG_DIR_VER) {
- if(drag_just_started) {
- act_y += state->types.pointer.drag_sum.y;
- }
- lv_obj_set_y(drag_obj, act_y + state->types.pointer.vect.y);
- }
-
- /*If the object didn't moved then clear the invalidated areas*/
- if(drag_obj->coords.x1 == prev_x && drag_obj->coords.y1 == prev_y) {
-// state->types.pointer.drag_in_prog = 0;
- /*In a special case if the object is moved on a page and
- * the scrollable has fit == true and the object is dragged of the page then
- * while its coordinate is not changing only the parent's size is reduced */
- lv_coord_t act_par_w = lv_obj_get_width(lv_obj_get_parent(drag_obj));
- lv_coord_t act_par_h = lv_obj_get_height(lv_obj_get_parent(drag_obj));
- if(act_par_w == prev_par_w && act_par_h == prev_par_h) {
- uint16_t new_inv_buf_size = lv_disp_get_inv_buf_size(indev_act->driver.disp);
- lv_disp_pop_from_inv_buf(indev_act->driver.disp, new_inv_buf_size - inv_buf_size);
- }
- } else {
- state->types.pointer.drag_in_prog = 1;
- /*Set the drag in progress flag*/
- /*Send the drag begin signal on first move*/
- if(drag_just_started) {
- drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_BEGIN, indev_act);
- if(indev_reset_check(state)) return;
- lv_event_send(drag_obj, LV_EVENT_DRAG_BEGIN, NULL);
- if(indev_reset_check(state)) return;
- }
- }
- }
- }
-}
-
-/**
- * Handle throwing by drag if the drag is ended
- * @param indev pointer to an input device state
- */
-static void indev_drag_throw(lv_indev_proc_t * proc)
-{
- if(proc->types.pointer.drag_in_prog == 0) return;
-
- lv_obj_t * drag_obj = proc->types.pointer.last_obj;
-
- /*If drag parent is active check recursively the drag_parent attribute*/
- while(lv_obj_get_drag_parent(drag_obj) != false && drag_obj != NULL) {
- drag_obj = lv_obj_get_parent(drag_obj);
- }
-
- if(drag_obj == NULL) {
- return;
- }
-
- /*Return if the drag throw is not enabled*/
- if(lv_obj_get_drag_throw(drag_obj) == false) {
- proc->types.pointer.drag_in_prog = 0;
- drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_END, indev_act);
- lv_event_send(drag_obj, LV_EVENT_DRAG_END, NULL);
- if(indev_reset_check(proc)) return;
-
- lv_event_send(drag_obj, LV_EVENT_DRAG_END, NULL);
- return;
- }
-
- lv_drag_dir_t allowed_dirs = lv_obj_get_drag_dir(drag_obj);
-
- /*Reduce the vectors*/
- proc->types.pointer.drag_throw_vect.x =
- proc->types.pointer.drag_throw_vect.x * (100 - indev_act->driver.drag_throw) / 100;
- proc->types.pointer.drag_throw_vect.y =
- proc->types.pointer.drag_throw_vect.y * (100 - indev_act->driver.drag_throw) / 100;
-
- if(proc->types.pointer.drag_throw_vect.x != 0 || proc->types.pointer.drag_throw_vect.y != 0) {
- /*Get the coordinates and modify them*/
- lv_area_t coords_ori;
- lv_obj_get_coords(drag_obj, &coords_ori);
- lv_coord_t act_x = lv_obj_get_x(drag_obj) + proc->types.pointer.drag_throw_vect.x;
- lv_coord_t act_y = lv_obj_get_y(drag_obj) + proc->types.pointer.drag_throw_vect.y;
-
- if(allowed_dirs == LV_DRAG_DIR_ALL)
- lv_obj_set_pos(drag_obj, act_x, act_y);
- else if(allowed_dirs & LV_DRAG_DIR_HOR)
- lv_obj_set_x(drag_obj, act_x);
- else if(allowed_dirs & LV_DRAG_DIR_VER)
- lv_obj_set_y(drag_obj, act_y);
-
- lv_area_t coord_new;
- lv_obj_get_coords(drag_obj, &coord_new);
-
- /*If non of the coordinates are changed then do not continue throwing*/
- if((coords_ori.x1 == coord_new.x1 || proc->types.pointer.drag_throw_vect.x == 0) &&
- (coords_ori.y1 == coord_new.y1 || proc->types.pointer.drag_throw_vect.y == 0)) {
- proc->types.pointer.drag_in_prog = 0;
- proc->types.pointer.vect.x = 0;
- proc->types.pointer.vect.y = 0;
- proc->types.pointer.drag_throw_vect.x = 0;
- proc->types.pointer.drag_throw_vect.y = 0;
- drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_END, indev_act);
- if(indev_reset_check(proc)) return;
- lv_event_send(drag_obj, LV_EVENT_DRAG_END, NULL);
- if(indev_reset_check(proc)) return;
- }
- }
- /*If the types.pointer.vectors become 0 -> types.pointer.drag_in_prog = 0 and send a drag end
- signal*/
- else {
- proc->types.pointer.drag_in_prog = 0;
- drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_END, indev_act);
- if(indev_reset_check(proc)) return;
- lv_event_send(drag_obj, LV_EVENT_DRAG_END, NULL);
- if(indev_reset_check(proc)) return;
- }
-}
-
-/**
- * Checks if the reset_query flag has been set. If so, perform necessary global indev cleanup actions
- * @param proc pointer to an input device 'proc'
- * return true if indev query should be immediately truncated.
- */
-static bool indev_reset_check(lv_indev_proc_t * proc)
-{
- if(proc->reset_query) {
- indev_obj_act = NULL;
- }
-
- return proc->reset_query ? true : false;
-}
diff --git a/src/libs/lvgl/src/lv_core/lv_indev.h b/src/libs/lvgl/src/lv_core/lv_indev.h
deleted file mode 100644
index 69ab5a41..00000000
--- a/src/libs/lvgl/src/lv_core/lv_indev.h
+++ /dev/null
@@ -1,159 +0,0 @@
-/**
- * @file lv_indev.h
- *
- */
-
-#ifndef LV_INDEV_H
-#define LV_INDEV_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_obj.h"
-#include "../lv_hal/lv_hal_indev.h"
-#include "../lv_core/lv_group.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Initialize the display input device subsystem
- */
-void lv_indev_init(void);
-
-/**
- * Called periodically to read the input devices
- * @param task pointer to the task itself
- */
-void lv_indev_read_task(lv_task_t * task);
-
-/**
- * Get the currently processed input device. Can be used in action functions too.
- * @return pointer to the currently processed input device or NULL if no input device processing
- * right now
- */
-lv_indev_t * lv_indev_get_act(void);
-
-/**
- * Get the type of an input device
- * @param indev pointer to an input device
- * @return the type of the input device from `lv_hal_indev_type_t` (`LV_INDEV_TYPE_...`)
- */
-lv_indev_type_t lv_indev_get_type(const lv_indev_t * indev);
-
-/**
- * Reset one or all input devices
- * @param indev pointer to an input device to reset or NULL to reset all of them
- */
-void lv_indev_reset(lv_indev_t * indev);
-
-/**
- * Reset the long press state of an input device
- * @param indev_proc pointer to an input device
- */
-void lv_indev_reset_long_press(lv_indev_t * indev);
-
-/**
- * Enable or disable an input devices
- * @param indev pointer to an input device
- * @param en true: enable; false: disable
- */
-void lv_indev_enable(lv_indev_t * indev, bool en);
-
-/**
- * Set a cursor for a pointer input device (for LV_INPUT_TYPE_POINTER and LV_INPUT_TYPE_BUTTON)
- * @param indev pointer to an input device
- * @param cur_obj pointer to an object to be used as cursor
- */
-void lv_indev_set_cursor(lv_indev_t * indev, lv_obj_t * cur_obj);
-
-#if LV_USE_GROUP
-/**
- * Set a destination group for a keypad input device (for LV_INDEV_TYPE_KEYPAD)
- * @param indev pointer to an input device
- * @param group point to a group
- */
-void lv_indev_set_group(lv_indev_t * indev, lv_group_t * group);
-#endif
-
-/**
- * Set the an array of points for LV_INDEV_TYPE_BUTTON.
- * These points will be assigned to the buttons to press a specific point on the screen
- * @param indev pointer to an input device
- * @param group point to a group
- */
-void lv_indev_set_button_points(lv_indev_t * indev, const lv_point_t * points);
-
-/**
- * Get the last point of an input device (for LV_INDEV_TYPE_POINTER and LV_INDEV_TYPE_BUTTON)
- * @param indev pointer to an input device
- * @param point pointer to a point to store the result
- */
-void lv_indev_get_point(const lv_indev_t * indev, lv_point_t * point);
-
-/**
- * Get the last pressed key of an input device (for LV_INDEV_TYPE_KEYPAD)
- * @param indev pointer to an input device
- * @return the last pressed key (0 on error)
- */
-uint32_t lv_indev_get_key(const lv_indev_t * indev);
-
-/**
- * Check if there is dragging with an input device or not (for LV_INDEV_TYPE_POINTER and
- * LV_INDEV_TYPE_BUTTON)
- * @param indev pointer to an input device
- * @return true: drag is in progress
- */
-bool lv_indev_is_dragging(const lv_indev_t * indev);
-
-/**
- * Get the vector of dragging of an input device (for LV_INDEV_TYPE_POINTER and
- * LV_INDEV_TYPE_BUTTON)
- * @param indev pointer to an input device
- * @param point pointer to a point to store the vector
- */
-void lv_indev_get_vect(const lv_indev_t * indev, lv_point_t * point);
-
-/**
- * Do nothing until the next release
- * @param indev pointer to an input device
- */
-void lv_indev_wait_release(lv_indev_t * indev);
-
-/**
- * Get a pointer to the indev read task to
- * modify its parameters with `lv_task_...` functions.
- * @param indev pointer to an inout device
- * @return pointer to the indev read refresher task. (NULL on error)
- */
-lv_task_t * lv_indev_get_read_task(lv_disp_t * indev);
-
-/**
- * Gets a pointer to the currently active object in indev proc functions.
- * NULL if no object is currently being handled or if groups aren't used.
- * @return pointer to currently active object
- */
-lv_obj_t * lv_indev_get_obj_act(void);
-
-/**********************
- * MACROS
- **********************/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_INDEV_H*/
diff --git a/src/libs/lvgl/src/lv_core/lv_obj.c b/src/libs/lvgl/src/lv_core/lv_obj.c
deleted file mode 100644
index 511e72db..00000000
--- a/src/libs/lvgl/src/lv_core/lv_obj.c
+++ /dev/null
@@ -1,2649 +0,0 @@
-/**
- * @file lv_base_obj.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_obj.h"
-#include "lv_indev.h"
-#include "lv_refr.h"
-#include "lv_group.h"
-#include "lv_disp.h"
-#include "../lv_core/lv_debug.h"
-#include "../lv_themes/lv_theme.h"
-#include "../lv_draw/lv_draw.h"
-#include "../lv_misc/lv_anim.h"
-#include "../lv_misc/lv_task.h"
-#include "../lv_misc/lv_async.h"
-#include "../lv_misc/lv_fs.h"
-#include "../lv_hal/lv_hal.h"
-#include <stdint.h>
-#include <string.h>
-#include "../lv_misc/lv_gc.h"
-#include "../lv_misc/lv_math.h"
-
-#if defined(LV_GC_INCLUDE)
-#include LV_GC_INCLUDE
-#endif /* LV_ENABLE_GC */
-
-/*********************
- * DEFINES
- *********************/
-#define LV_OBJX_NAME "lv_obj"
-#define LV_OBJ_DEF_WIDTH (LV_DPI)
-#define LV_OBJ_DEF_HEIGHT (2 * LV_DPI / 3)
-
-/**********************
- * TYPEDEFS
- **********************/
-typedef struct _lv_event_temp_data
-{
- lv_obj_t * obj;
- bool deleted;
- struct _lv_event_temp_data * prev;
-} lv_event_temp_data_t;
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static void refresh_children_position(lv_obj_t * obj, lv_coord_t x_diff, lv_coord_t y_diff);
-static void report_style_mod_core(void * style_p, lv_obj_t * obj);
-static void refresh_children_style(lv_obj_t * obj);
-static void delete_children(lv_obj_t * obj);
-static void base_dir_refr_children(lv_obj_t * obj);
-static void lv_event_mark_deleted(lv_obj_t * obj);
-static void lv_obj_del_async_cb(void * obj);
-static bool lv_obj_design(lv_obj_t * obj, const lv_area_t * mask_p, lv_design_mode_t mode);
-static lv_res_t lv_obj_signal(lv_obj_t * obj, lv_signal_t sign, void * param);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static bool lv_initialized = false;
-static lv_event_temp_data_t * event_temp_data_head;
-static const void * event_act_data;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Init. the 'lv' library.
- */
-void lv_init(void)
-{
- /* Do nothing if already initialized */
- if(lv_initialized) {
- LV_LOG_WARN("lv_init: already inited");
- return;
- }
-
- LV_LOG_TRACE("lv_init started");
-
- /*Initialize the lv_misc modules*/
- lv_mem_init();
- lv_task_core_init();
-
-#if LV_USE_FILESYSTEM
- lv_fs_init();
-#endif
-
-#if LV_USE_ANIMATION
- lv_anim_core_init();
-#endif
-
-#if LV_USE_GROUP
- lv_group_init();
-#endif
-
- /*Init. the sstyles*/
- lv_style_init();
-
- /*Initialize the screen refresh system*/
- lv_refr_init();
-
- lv_ll_init(&LV_GC_ROOT(_lv_disp_ll), sizeof(lv_disp_t));
- lv_ll_init(&LV_GC_ROOT(_lv_indev_ll), sizeof(lv_indev_t));
-
- /*Init the input device handling*/
- lv_indev_init();
-
- lv_img_decoder_init();
- lv_img_cache_set_size(LV_IMG_CACHE_DEF_SIZE);
-
- lv_initialized = true;
- LV_LOG_INFO("lv_init ready");
-}
-
-#if LV_ENABLE_GC || !LV_MEM_CUSTOM
-void lv_deinit(void)
-{
- lv_gc_clear_roots();
-#if LV_USE_LOG
- lv_log_register_print_cb(NULL);
-#endif
- lv_disp_set_default(NULL);
- lv_mem_deinit();
- lv_initialized = false;
- LV_LOG_INFO("lv_deinit done");
-}
-#endif
-
-/*--------------------
- * Create and delete
- *-------------------*/
-
-/**
- * Create a basic object
- * @param parent pointer to a parent object.
- * If NULL then a screen will be created
- * @param copy pointer to a base object, if not NULL then the new object will be copied from it
- * @return pointer to the new object
- */
-lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy)
-{
-
- lv_obj_t * new_obj = NULL;
- /*Create a screen if the parent is NULL*/
- if(parent == NULL) {
- LV_LOG_TRACE("Screen create started");
- lv_disp_t * disp = lv_disp_get_default();
- if(!disp) {
- LV_LOG_WARN("lv_obj_create: not display created to so far. No place to assign the new screen");
- return NULL;
- }
-
- new_obj = lv_ll_ins_head(&disp->scr_ll);
- LV_ASSERT_MEM(new_obj);
- if(new_obj == NULL) return NULL;
-
- new_obj->par = NULL; /*screens has no a parent*/
- lv_ll_init(&(new_obj->child_ll), sizeof(lv_obj_t));
-
- /*Set the callbacks*/
- new_obj->signal_cb = lv_obj_signal;
- new_obj->design_cb = lv_obj_design;
- new_obj->event_cb = NULL;
-
- /*Set coordinates to full screen size*/
- new_obj->coords.x1 = 0;
- new_obj->coords.y1 = 0;
- new_obj->coords.x2 = lv_disp_get_hor_res(NULL) - 1;
- new_obj->coords.y2 = lv_disp_get_ver_res(NULL) - 1;
- new_obj->ext_draw_pad = 0;
-
-#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL
- memset(&new_obj->ext_click_pad, 0, sizeof(new_obj->ext_click_pad));
-#endif
-
-#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_TINY
- new_obj->ext_click_pad_hor = 0;
- new_obj->ext_click_pad_ver = 0;
-#endif
-
- /*Init realign*/
-#if LV_USE_OBJ_REALIGN
- new_obj->realign.align = LV_ALIGN_CENTER;
- new_obj->realign.xofs = 0;
- new_obj->realign.yofs = 0;
- new_obj->realign.base = NULL;
- new_obj->realign.auto_realign = 0;
-#endif
-
- /*Set the default styles*/
- lv_theme_t * th = lv_theme_get_current();
- if(th) {
- new_obj->style_p = th->style.scr;
- } else {
- new_obj->style_p = &lv_style_scr;
- }
-
- /*Init. user date*/
-#if LV_USE_USER_DATA
- memset(&new_obj->user_data, 0, sizeof(lv_obj_user_data_t));
-#endif
-
-#if LV_USE_GROUP
- new_obj->group_p = NULL;
-#endif
- /*Set attributes*/
- new_obj->click = 0;
- new_obj->drag = 0;
- new_obj->drag_throw = 0;
- new_obj->drag_parent = 0;
- new_obj->hidden = 0;
- new_obj->top = 0;
- new_obj->protect = LV_PROTECT_NONE;
- new_obj->opa_scale_en = 0;
- new_obj->opa_scale = LV_OPA_COVER;
- new_obj->parent_event = 0;
-#if LV_USE_BIDI
- new_obj->base_dir = LV_BIDI_BASE_DIR_DEF;
-#else
- new_obj->base_dir = LV_BIDI_DIR_LTR;
-#endif
-
- new_obj->reserved = 0;
-
- new_obj->ext_attr = NULL;
-
- LV_LOG_INFO("Screen create ready");
- }
- /*parent != NULL create normal obj. on a parent*/
- else {
- LV_LOG_TRACE("Object create started");
- LV_ASSERT_OBJ(parent, LV_OBJX_NAME);
-
- new_obj = lv_ll_ins_head(&parent->child_ll);
- LV_ASSERT_MEM(new_obj);
- if(new_obj == NULL) return NULL;
-
- new_obj->par = parent; /*Set the parent*/
- lv_ll_init(&(new_obj->child_ll), sizeof(lv_obj_t));
-
- /*Set the callbacks*/
- new_obj->signal_cb = lv_obj_signal;
- new_obj->design_cb = lv_obj_design;
- new_obj->event_cb = NULL;
-
-#if LV_USE_BIDI
- new_obj->base_dir = LV_BIDI_DIR_INHERIT;
-#else
- new_obj->base_dir = LV_BIDI_DIR_LTR;
-#endif
-
- /*Set coordinates left top corner of parent*/
- new_obj->coords.y1 = parent->coords.y1;
- new_obj->coords.y2 = parent->coords.y1 + LV_OBJ_DEF_HEIGHT;
- if(lv_obj_get_base_dir(new_obj) == LV_BIDI_DIR_RTL) {
- new_obj->coords.x2 = parent->coords.x2;
- new_obj->coords.x1 = parent->coords.x2 - LV_OBJ_DEF_WIDTH;
- } else {
- new_obj->coords.x1 = parent->coords.x1;
- new_obj->coords.x2 = parent->coords.x1 + LV_OBJ_DEF_WIDTH;
- }
- new_obj->ext_draw_pad = 0;
-
-#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL
- memset(&new_obj->ext_click_pad, 0, sizeof(new_obj->ext_click_pad));
-#endif
-
-#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_TINY
- new_obj->ext_click_pad_hor = 0;
- new_obj->ext_click_pad_ver = 0;
-#endif
-
- /*Init realign*/
-#if LV_USE_OBJ_REALIGN
- new_obj->realign.align = LV_ALIGN_CENTER;
- new_obj->realign.xofs = 0;
- new_obj->realign.yofs = 0;
- new_obj->realign.base = NULL;
- new_obj->realign.auto_realign = 0;
-#endif
- /*Set appearance*/
- lv_theme_t * th = lv_theme_get_current();
- if(th) {
- new_obj->style_p = th->style.panel;
- } else {
- new_obj->style_p = &lv_style_plain_color;
- }
-
-#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL
- memset(&new_obj->ext_click_pad, 0, sizeof(new_obj->ext_click_pad));
-#endif
-
-#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_TINY
- new_obj->ext_click_pad_hor = 0;
- new_obj->ext_click_pad_ver = 0;
-#endif
-
- /*Init. user date*/
-#if LV_USE_USER_DATA
- memset(&new_obj->user_data, 0, sizeof(lv_obj_user_data_t));
-#endif
-
-#if LV_USE_GROUP
- new_obj->group_p = NULL;
-#endif
-
- /*Set attributes*/
- new_obj->click = 1;
- new_obj->drag = 0;
- new_obj->drag_dir = LV_DRAG_DIR_ALL;
- new_obj->drag_throw = 0;
- new_obj->drag_parent = 0;
- new_obj->hidden = 0;
- new_obj->top = 0;
- new_obj->protect = LV_PROTECT_NONE;
- new_obj->opa_scale = LV_OPA_COVER;
- new_obj->opa_scale_en = 0;
- new_obj->parent_event = 0;
- new_obj->reserved = 0;
-
- new_obj->ext_attr = NULL;
- }
-
- /*Copy the attributes if required*/
- if(copy != NULL) {
- LV_ASSERT_OBJ(copy, LV_OBJX_NAME);
- lv_area_copy(&new_obj->coords, &copy->coords);
- new_obj->ext_draw_pad = copy->ext_draw_pad;
-
-#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL
- lv_area_copy(&new_obj->ext_click_pad, &copy->ext_click_pad);
-#endif
-
-#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_TINY
- new_obj->ext_click_pad_hor = copy->ext_click_pad_hor;
- new_obj->ext_click_pad_ver = copy->ext_click_pad_ver;
-#endif
-
- /*Set free data*/
-#if LV_USE_USER_DATA
- memcpy(&new_obj->user_data, &copy->user_data, sizeof(lv_obj_user_data_t));
-#endif
- /*Copy realign*/
-#if LV_USE_OBJ_REALIGN
- new_obj->realign.align = copy->realign.align;
- new_obj->realign.xofs = copy->realign.xofs;
- new_obj->realign.yofs = copy->realign.yofs;
- new_obj->realign.base = copy->realign.base;
- new_obj->realign.auto_realign = copy->realign.auto_realign;
-#endif
-
- /*Only copy the `event_cb`. `signal_cb` and `design_cb` will be copied in the derived
- * object type (e.g. `lv_btn`)*/
- new_obj->event_cb = copy->event_cb;
-
- /*Copy attributes*/
- new_obj->click = copy->click;
- new_obj->drag = copy->drag;
- new_obj->drag_dir = copy->drag_dir;
- new_obj->drag_throw = copy->drag_throw;
- new_obj->drag_parent = copy->drag_parent;
- new_obj->hidden = copy->hidden;
- new_obj->top = copy->top;
- new_obj->parent_event = copy->parent_event;
-
- new_obj->opa_scale_en = copy->opa_scale_en;
- new_obj->protect = copy->protect;
- new_obj->opa_scale = copy->opa_scale;
-
- new_obj->style_p = copy->style_p;
-
-#if LV_USE_GROUP
- /*Add to the same group*/
- if(copy->group_p != NULL) {
- lv_group_add_obj(copy->group_p, new_obj);
- }
-#endif
-
- /*Set the same coordinates for non screen objects*/
- if(lv_obj_get_parent(copy) != NULL && parent != NULL) {
- lv_obj_set_pos(new_obj, lv_obj_get_x(copy), lv_obj_get_y(copy));
- } else {
- lv_obj_set_pos(new_obj, 0, 0);
- }
-
- LV_LOG_INFO("Object create ready");
- }
-
- /*Send a signal to the parent to notify it about the new child*/
- if(parent != NULL) {
- parent->signal_cb(parent, LV_SIGNAL_CHILD_CHG, new_obj);
-
- /*Invalidate the area if not screen created*/
- lv_obj_invalidate(new_obj);
- }
-
- return new_obj;
-}
-
-/**
- * Delete 'obj' and all of its children
- * @param obj pointer to an object to delete
- * @return LV_RES_INV because the object is deleted
- */
-lv_res_t lv_obj_del(lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
- lv_obj_invalidate(obj);
-
- /*Delete from the group*/
-#if LV_USE_GROUP
- lv_group_t * group = lv_obj_get_group(obj);
- if(group) lv_group_remove_obj(obj);
-#endif
-
- /*Remove the animations from this object*/
-#if LV_USE_ANIMATION
- lv_anim_del(obj, NULL);
-#endif
-
- /*Recursively delete the children*/
- lv_obj_t * i;
- lv_obj_t * i_next;
- i = lv_ll_get_head(&(obj->child_ll));
- while(i != NULL) {
- /*Get the next object before delete this*/
- i_next = lv_ll_get_next(&(obj->child_ll), i);
-
- /*Call the recursive del to the child too*/
- delete_children(i);
-
- /*Set i to the next node*/
- i = i_next;
- }
-
- /*Let the user free the resources used in `LV_EVENT_DELETE`*/
- lv_event_send(obj, LV_EVENT_DELETE, NULL);
-
- lv_event_mark_deleted(obj);
-
- /* Reset all input devices if the object to delete is used*/
- lv_indev_t * indev = lv_indev_get_next(NULL);
- while(indev) {
- if(indev->proc.types.pointer.act_obj == obj || indev->proc.types.pointer.last_obj == obj) {
- lv_indev_reset(indev);
- }
- if(indev->proc.types.pointer.last_pressed == obj) {
- indev->proc.types.pointer.last_pressed = NULL;
- }
-
-#if LV_USE_GROUP
- if(indev->group == group && obj == lv_indev_get_obj_act()) {
- lv_indev_reset(indev);
- }
-#endif
- indev = lv_indev_get_next(indev);
- }
-
- /* All children deleted.
- * Now clean up the object specific data*/
- obj->signal_cb(obj, LV_SIGNAL_CLEANUP, NULL);
-
- /*Remove the object from parent's children list*/
- lv_obj_t * par = lv_obj_get_parent(obj);
- if(par == NULL) { /*It is a screen*/
- lv_disp_t * d = lv_obj_get_disp(obj);
- lv_ll_rem(&d->scr_ll, obj);
- } else {
- lv_ll_rem(&(par->child_ll), obj);
- }
-
- /*Delete the base objects*/
- if(obj->ext_attr != NULL) lv_mem_free(obj->ext_attr);
- lv_mem_free(obj); /*Free the object itself*/
-
- /*Send a signal to the parent to notify it about the child delete*/
- if(par != NULL) {
- par->signal_cb(par, LV_SIGNAL_CHILD_CHG, NULL);
- }
-
- return LV_RES_INV;
-}
-
-/**
- * Helper function for asynchronously deleting objects.
- * Useful for cases where you can't delete an object directly in an `LV_EVENT_DELETE` handler (i.e. parent).
- * @param obj object to delete
- * @see lv_async_call
- */
-void lv_obj_del_async(lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
- lv_async_call(lv_obj_del_async_cb, obj);
-}
-
-/**
- * Delete all children of an object
- * @param obj pointer to an object
- */
-void lv_obj_clean(lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
- lv_obj_t * child = lv_obj_get_child(obj, NULL);
- lv_obj_t * child_next;
- while(child) {
- /* Read the next child before deleting the current
- * because the next couldn't be read from a deleted (invalid) node*/
- child_next = lv_obj_get_child(obj, child);
- lv_obj_del(child);
- child = child_next;
- }
-}
-
-/**
- * Mark an area of an object as invalid.
- * This area will be redrawn by 'lv_refr_task'
- * @param obj pointer to an object
- * @param area the area to redraw
- */
-void lv_obj_invalidate_area(const lv_obj_t * obj, const lv_area_t * area)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- if(lv_obj_get_hidden(obj)) return;
-
- /*Invalidate the object only if it belongs to the 'LV_GC_ROOT(_lv_act_scr)'*/
- lv_obj_t * obj_scr = lv_obj_get_screen(obj);
- lv_disp_t * disp = lv_obj_get_disp(obj_scr);
- if(obj_scr == lv_disp_get_scr_act(disp) || obj_scr == lv_disp_get_layer_top(disp) ||
- obj_scr == lv_disp_get_layer_sys(disp)) {
-
- /*Truncate the area to the object*/
- lv_area_t obj_coords;
- lv_coord_t ext_size = obj->ext_draw_pad;
- lv_area_copy(&obj_coords, &obj->coords);
- obj_coords.x1 -= ext_size;
- obj_coords.y1 -= ext_size;
- obj_coords.x2 += ext_size;
- obj_coords.y2 += ext_size;
-
- bool is_common;
- lv_area_t area_trunc;
-
- is_common = lv_area_intersect(&area_trunc, area, &obj_coords);
- if(is_common == false) return; /*The area is not on the object*/
-
- /*Truncate recursively to the parents*/
- lv_obj_t * par = lv_obj_get_parent(obj);
- while(par != NULL) {
- is_common = lv_area_intersect(&area_trunc, &area_trunc, &par->coords);
- if(is_common == false) break; /*If no common parts with parent break;*/
- if(lv_obj_get_hidden(par)) return; /*If the parent is hidden then the child is hidden and won't be drawn*/
-
- par = lv_obj_get_parent(par);
- }
-
- if(is_common) lv_inv_area(disp, &area_trunc);
- }
-}
-
-/**
- * Mark the object as invalid therefore its current position will be redrawn by 'lv_refr_task'
- * @param obj pointer to an object
- */
-void lv_obj_invalidate(const lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- /*Truncate the area to the object*/
- lv_area_t obj_coords;
- lv_coord_t ext_size = obj->ext_draw_pad;
- lv_area_copy(&obj_coords, &obj->coords);
- obj_coords.x1 -= ext_size;
- obj_coords.y1 -= ext_size;
- obj_coords.x2 += ext_size;
- obj_coords.y2 += ext_size;
-
- lv_obj_invalidate_area(obj, &obj_coords);
-
-}
-/*=====================
- * Setter functions
- *====================*/
-
-/*--------------------
- * Parent/children set
- *--------------------*/
-
-/**
- * Set a new parent for an object. Its relative position will be the same.
- * @param obj pointer to an object. Can't be a screen.
- * @param parent pointer to the new parent object. (Can't be NULL)
- */
-void lv_obj_set_parent(lv_obj_t * obj, lv_obj_t * parent)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
- LV_ASSERT_OBJ(parent, LV_OBJX_NAME);
-
- if(obj->par == NULL) {
- LV_LOG_WARN("Can't set the parent of a screen");
- return;
- }
-
- if(parent == NULL) {
- LV_LOG_WARN("Can't set parent == NULL to an object");
- return;
- }
-
- lv_obj_invalidate(obj);
-
- lv_point_t old_pos;
- old_pos.x = lv_obj_get_x(obj);
- old_pos.y = lv_obj_get_y(obj);
-
- lv_obj_t * old_par = obj->par;
-
- lv_ll_chg_list(&obj->par->child_ll, &parent->child_ll, obj, true);
- obj->par = parent;
- lv_obj_set_pos(obj, old_pos.x, old_pos.y);
-
- /*Notify the original parent because one of its children is lost*/
- old_par->signal_cb(old_par, LV_SIGNAL_CHILD_CHG, NULL);
-
- /*Notify the new parent about the child*/
- parent->signal_cb(parent, LV_SIGNAL_CHILD_CHG, obj);
-
- lv_obj_invalidate(obj);
-}
-
-/**
- * Move and object to the foreground
- * @param obj pointer to an object
- */
-void lv_obj_move_foreground(lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- lv_obj_t * parent = lv_obj_get_parent(obj);
-
- /*Do nothing of already in the foreground*/
- if(lv_ll_get_head(&parent->child_ll) == obj) return;
-
- lv_obj_invalidate(parent);
-
- lv_ll_chg_list(&parent->child_ll, &parent->child_ll, obj, true);
-
- /*Notify the new parent about the child*/
- parent->signal_cb(parent, LV_SIGNAL_CHILD_CHG, obj);
-
- lv_obj_invalidate(parent);
-}
-
-/**
- * Move and object to the background
- * @param obj pointer to an object
- */
-void lv_obj_move_background(lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- lv_obj_t * parent = lv_obj_get_parent(obj);
-
- /*Do nothing of already in the background*/
- if(lv_ll_get_tail(&parent->child_ll) == obj) return;
-
- lv_obj_invalidate(parent);
-
- lv_ll_chg_list(&parent->child_ll, &parent->child_ll, obj, false);
-
- /*Notify the new parent about the child*/
- parent->signal_cb(parent, LV_SIGNAL_CHILD_CHG, obj);
-
- lv_obj_invalidate(parent);
-}
-
-/*--------------------
- * Coordinate set
- * ------------------*/
-
-/**
- * Set relative the position of an object (relative to the parent)
- * @param obj pointer to an object
- * @param x new distance from the left side of the parent
- * @param y new distance from the top of the parent
- */
-void lv_obj_set_pos(lv_obj_t * obj, lv_coord_t x, lv_coord_t y)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- /*Convert x and y to absolute coordinates*/
- lv_obj_t * par = obj->par;
-
- x = x + par->coords.x1;
- y = y + par->coords.y1;
-
- /*Calculate and set the movement*/
- lv_point_t diff;
- diff.x = x - obj->coords.x1;
- diff.y = y - obj->coords.y1;
-
- /* Do nothing if the position is not changed */
- /* It is very important else recursive positioning can
- * occur without position change*/
- if(diff.x == 0 && diff.y == 0) return;
-
- /*Invalidate the original area*/
- lv_obj_invalidate(obj);
-
- /*Save the original coordinates*/
- lv_area_t ori;
- lv_obj_get_coords(obj, &ori);
-
- obj->coords.x1 += diff.x;
- obj->coords.y1 += diff.y;
- obj->coords.x2 += diff.x;
- obj->coords.y2 += diff.y;
-
- refresh_children_position(obj, diff.x, diff.y);
-
- /*Inform the object about its new coordinates*/
- obj->signal_cb(obj, LV_SIGNAL_CORD_CHG, &ori);
-
- /*Send a signal to the parent too*/
- par->signal_cb(par, LV_SIGNAL_CHILD_CHG, obj);
-
- /*Invalidate the new area*/
- lv_obj_invalidate(obj);
-}
-
-/**
- * Set the x coordinate of a object
- * @param obj pointer to an object
- * @param x new distance from the left side from the parent
- */
-void lv_obj_set_x(lv_obj_t * obj, lv_coord_t x)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- lv_obj_set_pos(obj, x, lv_obj_get_y(obj));
-}
-
-/**
- * Set the y coordinate of a object
- * @param obj pointer to an object
- * @param y new distance from the top of the parent
- */
-void lv_obj_set_y(lv_obj_t * obj, lv_coord_t y)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- lv_obj_set_pos(obj, lv_obj_get_x(obj), y);
-}
-
-/**
- * Set the size of an object
- * @param obj pointer to an object
- * @param w new width
- * @param h new height
- */
-void lv_obj_set_size(lv_obj_t * obj, lv_coord_t w, lv_coord_t h)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
-
- /* Do nothing if the size is not changed */
- /* It is very important else recursive resizing can
- * occur without size change*/
- if(lv_obj_get_width(obj) == w && lv_obj_get_height(obj) == h) {
- return;
- }
-
- /*Invalidate the original area*/
- lv_obj_invalidate(obj);
-
- /*Save the original coordinates*/
- lv_area_t ori;
- lv_obj_get_coords(obj, &ori);
-
- /*Set the length and height*/
- obj->coords.y2 = obj->coords.y1 + h - 1;
- if(lv_obj_get_base_dir(obj) == LV_BIDI_DIR_RTL) {
- obj->coords.x1 = obj->coords.x2 - w + 1;
- } else {
- obj->coords.x2 = obj->coords.x1 + w - 1;
- }
-
- /*Send a signal to the object with its new coordinates*/
- obj->signal_cb(obj, LV_SIGNAL_CORD_CHG, &ori);
-
- /*Send a signal to the parent too*/
- lv_obj_t * par = lv_obj_get_parent(obj);
- if(par != NULL) par->signal_cb(par, LV_SIGNAL_CHILD_CHG, obj);
-
- /*Tell the children the parent's size has changed*/
- lv_obj_t * i;
- LV_LL_READ(obj->child_ll, i)
- {
- i->signal_cb(i, LV_SIGNAL_PARENT_SIZE_CHG, NULL);
- }
-
- /*Invalidate the new area*/
- lv_obj_invalidate(obj);
-
- /*Automatically realign the object if required*/
-#if LV_USE_OBJ_REALIGN
- if(obj->realign.auto_realign) lv_obj_realign(obj);
-#endif
-}
-
-/**
- * Set the width of an object
- * @param obj pointer to an object
- * @param w new width
- */
-void lv_obj_set_width(lv_obj_t * obj, lv_coord_t w)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- lv_obj_set_size(obj, w, lv_obj_get_height(obj));
-}
-
-/**
- * Set the height of an object
- * @param obj pointer to an object
- * @param h new height
- */
-void lv_obj_set_height(lv_obj_t * obj, lv_coord_t h)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- lv_obj_set_size(obj, lv_obj_get_width(obj), h);
-}
-
-/**
- * Align an object to an other object.
- * @param obj pointer to an object to align
- * @param base pointer to an object (if NULL the parent is used). 'obj' will be aligned to it.
- * @param align type of alignment (see 'lv_align_t' enum)
- * @param x_mod x coordinate shift after alignment
- * @param y_mod y coordinate shift after alignment
- */
-void lv_obj_align(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, lv_coord_t x_mod, lv_coord_t y_mod)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- lv_coord_t new_x = lv_obj_get_x(obj);
- lv_coord_t new_y = lv_obj_get_y(obj);
-
- if(base == NULL) {
- base = lv_obj_get_parent(obj);
- }
-
- LV_ASSERT_OBJ(base, LV_OBJX_NAME);
-
-
- switch(align) {
- case LV_ALIGN_CENTER:
- new_x = lv_obj_get_width(base) / 2 - lv_obj_get_width(obj) / 2;
- new_y = lv_obj_get_height(base) / 2 - lv_obj_get_height(obj) / 2;
- break;
-
- case LV_ALIGN_IN_TOP_LEFT:
- new_x = 0;
- new_y = 0;
- break;
- case LV_ALIGN_IN_TOP_MID:
- new_x = lv_obj_get_width(base) / 2 - lv_obj_get_width(obj) / 2;
- new_y = 0;
- break;
-
- case LV_ALIGN_IN_TOP_RIGHT:
- new_x = lv_obj_get_width(base) - lv_obj_get_width(obj);
- new_y = 0;
- break;
-
- case LV_ALIGN_IN_BOTTOM_LEFT:
- new_x = 0;
- new_y = lv_obj_get_height(base) - lv_obj_get_height(obj);
- break;
- case LV_ALIGN_IN_BOTTOM_MID:
- new_x = lv_obj_get_width(base) / 2 - lv_obj_get_width(obj) / 2;
- new_y = lv_obj_get_height(base) - lv_obj_get_height(obj);
- break;
-
- case LV_ALIGN_IN_BOTTOM_RIGHT:
- new_x = lv_obj_get_width(base) - lv_obj_get_width(obj);
- new_y = lv_obj_get_height(base) - lv_obj_get_height(obj);
- break;
-
- case LV_ALIGN_IN_LEFT_MID:
- new_x = 0;
- new_y = lv_obj_get_height(base) / 2 - lv_obj_get_height(obj) / 2;
- break;
-
- case LV_ALIGN_IN_RIGHT_MID:
- new_x = lv_obj_get_width(base) - lv_obj_get_width(obj);
- new_y = lv_obj_get_height(base) / 2 - lv_obj_get_height(obj) / 2;
- break;
-
- case LV_ALIGN_OUT_TOP_LEFT:
- new_x = 0;
- new_y = -lv_obj_get_height(obj);
- break;
-
- case LV_ALIGN_OUT_TOP_MID:
- new_x = lv_obj_get_width(base) / 2 - lv_obj_get_width(obj) / 2;
- new_y = -lv_obj_get_height(obj);
- break;
-
- case LV_ALIGN_OUT_TOP_RIGHT:
- new_x = lv_obj_get_width(base) - lv_obj_get_width(obj);
- new_y = -lv_obj_get_height(obj);
- break;
-
- case LV_ALIGN_OUT_BOTTOM_LEFT:
- new_x = 0;
- new_y = lv_obj_get_height(base);
- break;
-
- case LV_ALIGN_OUT_BOTTOM_MID:
- new_x = lv_obj_get_width(base) / 2 - lv_obj_get_width(obj) / 2;
- new_y = lv_obj_get_height(base);
- break;
-
- case LV_ALIGN_OUT_BOTTOM_RIGHT:
- new_x = lv_obj_get_width(base) - lv_obj_get_width(obj);
- new_y = lv_obj_get_height(base);
- break;
-
- case LV_ALIGN_OUT_LEFT_TOP:
- new_x = -lv_obj_get_width(obj);
- new_y = 0;
- break;
-
- case LV_ALIGN_OUT_LEFT_MID:
- new_x = -lv_obj_get_width(obj);
- new_y = lv_obj_get_height(base) / 2 - lv_obj_get_height(obj) / 2;
- break;
-
- case LV_ALIGN_OUT_LEFT_BOTTOM:
- new_x = -lv_obj_get_width(obj);
- new_y = lv_obj_get_height(base) - lv_obj_get_height(obj);
- break;
-
- case LV_ALIGN_OUT_RIGHT_TOP:
- new_x = lv_obj_get_width(base);
- new_y = 0;
- break;
-
- case LV_ALIGN_OUT_RIGHT_MID:
- new_x = lv_obj_get_width(base);
- new_y = lv_obj_get_height(base) / 2 - lv_obj_get_height(obj) / 2;
- break;
-
- case LV_ALIGN_OUT_RIGHT_BOTTOM:
- new_x = lv_obj_get_width(base);
- new_y = lv_obj_get_height(base) - lv_obj_get_height(obj);
- break;
- }
-
- /*Bring together the coordination system of base and obj*/
- lv_obj_t * par = lv_obj_get_parent(obj);
- lv_coord_t base_abs_x = base->coords.x1;
- lv_coord_t base_abs_y = base->coords.y1;
- lv_coord_t par_abs_x = par->coords.x1;
- lv_coord_t par_abs_y = par->coords.y1;
- new_x += x_mod + base_abs_x;
- new_y += y_mod + base_abs_y;
- new_x -= par_abs_x;
- new_y -= par_abs_y;
-
- lv_obj_set_pos(obj, new_x, new_y);
-
-#if LV_USE_OBJ_REALIGN
- /*Save the last align parameters to use them in `lv_obj_realign`*/
- obj->realign.align = align;
- obj->realign.xofs = x_mod;
- obj->realign.yofs = y_mod;
- obj->realign.base = base;
- obj->realign.origo_align = 0;
-#endif
-}
-
-/**
- * Align an object's middle point to an other object.
- * @param obj pointer to an object to align
- * @param base pointer to an object (if NULL the parent is used). 'obj' will be aligned to it.
- * @param align type of alignment (see 'lv_align_t' enum)
- * @param x_mod x coordinate shift after alignment
- * @param y_mod y coordinate shift after alignment
- */
-void lv_obj_align_origo(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, lv_coord_t x_mod, lv_coord_t y_mod)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- lv_coord_t new_x = lv_obj_get_x(obj);
- lv_coord_t new_y = lv_obj_get_y(obj);
-
- lv_coord_t obj_w_half = lv_obj_get_width(obj) / 2;
- lv_coord_t obj_h_half = lv_obj_get_height(obj) / 2;
-
- if(base == NULL) {
- base = lv_obj_get_parent(obj);
- }
-
- LV_ASSERT_OBJ(base, LV_OBJX_NAME);
-
-
- switch(align) {
- case LV_ALIGN_CENTER:
- new_x = lv_obj_get_width(base) / 2 - obj_w_half;
- new_y = lv_obj_get_height(base) / 2 - obj_h_half;
- break;
-
- case LV_ALIGN_IN_TOP_LEFT:
- new_x = -obj_w_half;
- new_y = -obj_h_half;
- break;
- case LV_ALIGN_IN_TOP_MID:
- new_x = lv_obj_get_width(base) / 2 - obj_w_half;
- new_y = -obj_h_half;
- break;
-
- case LV_ALIGN_IN_TOP_RIGHT:
- new_x = lv_obj_get_width(base) - obj_w_half;
- new_y = -obj_h_half;
- break;
-
- case LV_ALIGN_IN_BOTTOM_LEFT:
- new_x = -obj_w_half;
- new_y = lv_obj_get_height(base) - obj_h_half;
- break;
- case LV_ALIGN_IN_BOTTOM_MID:
- new_x = lv_obj_get_width(base) / 2 - obj_w_half;
- new_y = lv_obj_get_height(base) - obj_h_half;
- break;
-
- case LV_ALIGN_IN_BOTTOM_RIGHT:
- new_x = lv_obj_get_width(base) - obj_w_half;
- new_y = lv_obj_get_height(base) - obj_h_half;
- break;
-
- case LV_ALIGN_IN_LEFT_MID:
- new_x = -obj_w_half;
- new_y = lv_obj_get_height(base) / 2 - obj_h_half;
- break;
-
- case LV_ALIGN_IN_RIGHT_MID:
- new_x = lv_obj_get_width(base) - obj_w_half;
- new_y = lv_obj_get_height(base) / 2 - obj_h_half;
- break;
-
- case LV_ALIGN_OUT_TOP_LEFT:
- new_x = -obj_w_half;
- new_y = -obj_h_half;
- break;
-
- case LV_ALIGN_OUT_TOP_MID:
- new_x = lv_obj_get_width(base) / 2 - obj_w_half;
- new_y = -obj_h_half;
- break;
-
- case LV_ALIGN_OUT_TOP_RIGHT:
- new_x = lv_obj_get_width(base) - obj_w_half;
- new_y = -obj_h_half;
- break;
-
- case LV_ALIGN_OUT_BOTTOM_LEFT:
- new_x = -obj_w_half;
- new_y = lv_obj_get_height(base) - obj_h_half;
- break;
-
- case LV_ALIGN_OUT_BOTTOM_MID:
- new_x = lv_obj_get_width(base) / 2 - obj_w_half;
- new_y = lv_obj_get_height(base) - obj_h_half;
- break;
-
- case LV_ALIGN_OUT_BOTTOM_RIGHT:
- new_x = lv_obj_get_width(base) - obj_w_half;
- new_y = lv_obj_get_height(base) - obj_h_half;
- break;
-
- case LV_ALIGN_OUT_LEFT_TOP:
- new_x = -obj_w_half;
- new_y = -obj_h_half;
- break;
-
- case LV_ALIGN_OUT_LEFT_MID:
- new_x = -obj_w_half;
- new_y = lv_obj_get_height(base) / 2 - obj_h_half;
- break;
-
- case LV_ALIGN_OUT_LEFT_BOTTOM:
- new_x = -obj_w_half;
- new_y = lv_obj_get_height(base) - obj_h_half;
- break;
-
- case LV_ALIGN_OUT_RIGHT_TOP:
- new_x = lv_obj_get_width(base) - obj_w_half;
- new_y = -obj_h_half;
- break;
-
- case LV_ALIGN_OUT_RIGHT_MID:
- new_x = lv_obj_get_width(base) - obj_w_half;
- new_y = lv_obj_get_height(base) / 2 - obj_h_half;
- break;
-
- case LV_ALIGN_OUT_RIGHT_BOTTOM:
- new_x = lv_obj_get_width(base) - obj_w_half;
- new_y = lv_obj_get_height(base) - obj_h_half;
- break;
- }
-
- /*Bring together the coordination system of base and obj*/
- lv_obj_t * par = lv_obj_get_parent(obj);
- lv_coord_t base_abs_x = base->coords.x1;
- lv_coord_t base_abs_y = base->coords.y1;
- lv_coord_t par_abs_x = par->coords.x1;
- lv_coord_t par_abs_y = par->coords.y1;
- new_x += x_mod + base_abs_x;
- new_y += y_mod + base_abs_y;
- new_x -= par_abs_x;
- new_y -= par_abs_y;
-
- lv_obj_set_pos(obj, new_x, new_y);
-
-#if LV_USE_OBJ_REALIGN
- /*Save the last align parameters to use them in `lv_obj_realign`*/
- obj->realign.align = align;
- obj->realign.xofs = x_mod;
- obj->realign.yofs = y_mod;
- obj->realign.base = base;
- obj->realign.origo_align = 1;
-#endif
-}
-
-/**
- * Realign the object based on the last `lv_obj_align` parameters.
- * @param obj pointer to an object
- */
-void lv_obj_realign(lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
-#if LV_USE_OBJ_REALIGN
- if(obj->realign.origo_align)
- lv_obj_align_origo(obj, obj->realign.base, obj->realign.align, obj->realign.xofs, obj->realign.yofs);
- else
- lv_obj_align(obj, obj->realign.base, obj->realign.align, obj->realign.xofs, obj->realign.yofs);
-#else
- (void)obj;
- LV_LOG_WARN("lv_obj_realaign: no effect because LV_USE_OBJ_REALIGN = 0");
-#endif
-}
-
-/**
- * Enable the automatic realign of the object when its size has changed based on the last
- * `lv_obj_align` parameters.
- * @param obj pointer to an object
- * @param en true: enable auto realign; false: disable auto realign
- */
-void lv_obj_set_auto_realign(lv_obj_t * obj, bool en)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
-#if LV_USE_OBJ_REALIGN
- obj->realign.auto_realign = en ? 1 : 0;
-#else
- (void)obj;
- (void)en;
- LV_LOG_WARN("lv_obj_set_auto_realign: no effect because LV_USE_OBJ_REALIGN = 0");
-#endif
-}
-
-
-/**
- * Set the size of an extended clickable area
- * If TINY mode is used, only the largest of the horizontal and vertical padding
- * values are considered.
- * @param obj pointer to an object
- * @param left extended clickable are on the left [px]
- * @param right extended clickable are on the right [px]
- * @param top extended clickable are on the top [px]
- * @param bottom extended clickable are on the bottom [px]
- */
-void lv_obj_set_ext_click_area(lv_obj_t * obj, lv_coord_t left, lv_coord_t right, lv_coord_t top, lv_coord_t bottom)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
-#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL
- obj->ext_click_pad.x1 = left;
- obj->ext_click_pad.x2 = right;
- obj->ext_click_pad.y1 = top;
- obj->ext_click_pad.y2 = bottom;
-#elif LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_TINY
- obj->ext_click_pad_hor = LV_MATH_MAX(left, right);
- obj->ext_click_pad_ver = LV_MATH_MAX(top, bottom);
-#else
- (void)obj; /*Unused*/
- (void)left; /*Unused*/
- (void)right; /*Unused*/
- (void)top; /*Unused*/
- (void)bottom; /*Unused*/
-#endif
-}
-
-/*---------------------
- * Appearance set
- *--------------------*/
-
-/**
- * Set a new style for an object
- * @param obj pointer to an object
- * @param style_p pointer to the new style
- */
-void lv_obj_set_style(lv_obj_t * obj, const lv_style_t * style)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
- LV_ASSERT_STYLE(style);
-
- obj->style_p = style;
-
- /*Send a signal about style change to every children with NULL style*/
- refresh_children_style(obj);
-
- /*Notify the object about the style change too*/
- lv_obj_refresh_style(obj);
-}
-
-/**
- * Notify an object about its style is modified
- * @param obj pointer to an object
- */
-void lv_obj_refresh_style(lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- lv_obj_invalidate(obj);
- obj->signal_cb(obj, LV_SIGNAL_STYLE_CHG, NULL);
- lv_obj_invalidate(obj);
-}
-
-/**
- * Notify all object if a style is modified
- * @param style pointer to a style. Only the objects with this style will be notified
- * (NULL to notify all objects)
- */
-void lv_obj_report_style_mod(lv_style_t * style)
-{
- LV_ASSERT_STYLE(style);
-
- lv_disp_t * d = lv_disp_get_next(NULL);
-
- while(d) {
- lv_obj_t * i;
- LV_LL_READ(d->scr_ll, i)
- {
- if(i->style_p == style || style == NULL) {
- lv_obj_refresh_style(i);
- }
-
- report_style_mod_core(style, i);
- }
- d = lv_disp_get_next(d);
- }
-}
-
-/*-----------------
- * Attribute set
- *----------------*/
-
-/**
- * Hide an object. It won't be visible and clickable.
- * @param obj pointer to an object
- * @param en true: hide the object
- */
-void lv_obj_set_hidden(lv_obj_t * obj, bool en)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- if(!obj->hidden) lv_obj_invalidate(obj); /*Invalidate when not hidden (hidden objects are ignored) */
-
- obj->hidden = en == false ? 0 : 1;
-
- if(!obj->hidden) lv_obj_invalidate(obj); /*Invalidate when not hidden (hidden objects are ignored) */
-
- lv_obj_t * par = lv_obj_get_parent(obj);
- par->signal_cb(par, LV_SIGNAL_CHILD_CHG, obj);
-}
-
-/**
- * Enable or disable the clicking of an object
- * @param obj pointer to an object
- * @param en true: make the object clickable
- */
-void lv_obj_set_click(lv_obj_t * obj, bool en)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- obj->click = (en == true ? 1 : 0);
-}
-
-/**
- * Enable to bring this object to the foreground if it
- * or any of its children is clicked
- * @param obj pointer to an object
- * @param en true: enable the auto top feature
- */
-void lv_obj_set_top(lv_obj_t * obj, bool en)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- obj->top = (en == true ? 1 : 0);
-}
-
-/**
- * Enable the dragging of an object
- * @param obj pointer to an object
- * @param en true: make the object dragable
- */
-void lv_obj_set_drag(lv_obj_t * obj, bool en)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- if(en == true) lv_obj_set_click(obj, true); /*Drag is useless without enabled clicking*/
- obj->drag = (en == true ? 1 : 0);
-}
-
-/**
- * Set the directions an object can be dragged in
- * @param obj pointer to an object
- * @param drag_dir bitwise OR of allowed directions an object can be dragged in
- */
-void lv_obj_set_drag_dir(lv_obj_t * obj, lv_drag_dir_t drag_dir)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- obj->drag_dir = drag_dir;
-
- if(obj->drag_dir != 0) lv_obj_set_drag(obj, true); /*Drag direction requires drag*/
-}
-
-/**
- * Enable the throwing of an object after is is dragged
- * @param obj pointer to an object
- * @param en true: enable the drag throw
- */
-void lv_obj_set_drag_throw(lv_obj_t * obj, bool en)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- obj->drag_throw = (en == true ? 1 : 0);
-}
-
-/**
- * Enable to use parent for drag related operations.
- * If trying to drag the object the parent will be moved instead
- * @param obj pointer to an object
- * @param en true: enable the 'drag parent' for the object
- */
-void lv_obj_set_drag_parent(lv_obj_t * obj, bool en)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- obj->drag_parent = (en == true ? 1 : 0);
-}
-
-/**
- * Propagate the events to the parent too
- * @param obj pointer to an object
- * @param en true: enable the event propagation
- */
-void lv_obj_set_parent_event(lv_obj_t * obj, bool en)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- obj->parent_event = (en == true ? 1 : 0);
-}
-
-void lv_obj_set_base_dir(lv_obj_t * obj, lv_bidi_dir_t dir)
-{
- if(dir != LV_BIDI_DIR_LTR && dir != LV_BIDI_DIR_RTL &&
- dir != LV_BIDI_DIR_AUTO && dir != LV_BIDI_DIR_INHERIT) {
-
- LV_LOG_WARN("lv_obj_set_base_dir: invalid base dir");
- return;
- }
-
- obj->base_dir = dir;
- lv_signal_send(obj, LV_SIGNAL_BASE_DIR_CHG, NULL);
-
- /* Notify the children about the parent base dir has changed.
- * (The children might have `LV_BIDI_DIR_INHERIT`)*/
- base_dir_refr_children(obj);
-}
-
-/**
- * Set the opa scale enable parameter (required to set opa_scale with `lv_obj_set_opa_scale()`)
- * @param obj pointer to an object
- * @param en true: opa scaling is enabled for this object and all children; false: no opa scaling
- */
-void lv_obj_set_opa_scale_enable(lv_obj_t * obj, bool en)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- obj->opa_scale_en = en ? 1 : 0;
-}
-
-/**
- * Set the opa scale of an object.
- * The opacity of this object and all it's children will be scaled down with this factor.
- * `lv_obj_set_opa_scale_enable(obj, true)` needs to be called to enable it.
- * (not for all children just for the parent where to start the opa scaling)
- * @param obj pointer to an object
- * @param opa_scale a factor to scale down opacity [0..255]
- */
-void lv_obj_set_opa_scale(lv_obj_t * obj, lv_opa_t opa_scale)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- obj->opa_scale = opa_scale;
- lv_obj_invalidate(obj);
-}
-
-/**
- * Set a bit or bits in the protect filed
- * @param obj pointer to an object
- * @param prot 'OR'-ed values from `lv_protect_t`
- */
-void lv_obj_set_protect(lv_obj_t * obj, uint8_t prot)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- obj->protect |= prot;
-}
-
-/**
- * Clear a bit or bits in the protect filed
- * @param obj pointer to an object
- * @param prot 'OR'-ed values from `lv_protect_t`
- */
-void lv_obj_clear_protect(lv_obj_t * obj, uint8_t prot)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- prot = (~prot) & 0xFF;
- obj->protect &= prot;
-}
-
-/**
- * Set a an event handler function for an object.
- * Used by the user to react on event which happens with the object.
- * @param obj pointer to an object
- * @param event_cb the new event function
- */
-void lv_obj_set_event_cb(lv_obj_t * obj, lv_event_cb_t event_cb)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- obj->event_cb = event_cb;
-}
-
-/**
- * Send an event to the object
- * @param obj pointer to an object
- * @param event the type of the event from `lv_event_t`
- * @param data arbitrary data depending on the object type and the event. (Usually `NULL`)
- * @return LV_RES_OK: `obj` was not deleted in the event; LV_RES_INV: `obj` was deleted in the event
- */
-lv_res_t lv_event_send(lv_obj_t * obj, lv_event_t event, const void * data)
-{
- if(obj == NULL) return LV_RES_OK;
-
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- lv_res_t res;
- res = lv_event_send_func(obj->event_cb, obj, event, data);
- return res;
-}
-
-/**
- * Call an event function with an object, event, and data.
- * @param event_xcb an event callback function. If `NULL` `LV_RES_OK` will return without any actions.
- * (the 'x' in the argument name indicates that its not a fully generic function because it not follows
- * the `func_name(object, callback, ...)` convention)
- * @param obj pointer to an object to associate with the event (can be `NULL` to simply call the `event_cb`)
- * @param event an event
- * @param data pointer to a custom data
- * @return LV_RES_OK: `obj` was not deleted in the event; LV_RES_INV: `obj` was deleted in the event
- */
-lv_res_t lv_event_send_func(lv_event_cb_t event_xcb, lv_obj_t * obj, lv_event_t event, const void * data)
-{
- if(obj != NULL) {
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
- }
-
- /* Build a simple linked list from the objects used in the events
- * It's important to know if an this object was deleted by a nested event
- * called from this `even_cb`. */
- lv_event_temp_data_t event_temp_data;
- event_temp_data.obj = obj;
- event_temp_data.deleted = false;
- event_temp_data.prev = NULL;
-
- if(event_temp_data_head) {
- event_temp_data.prev = event_temp_data_head;
- }
- event_temp_data_head = &event_temp_data;
-
- const void * event_act_data_save = event_act_data;
- event_act_data = data;
-
- /*Call the input device's feedback callback if set*/
- lv_indev_t * indev_act = lv_indev_get_act();
- if(indev_act) {
- if(indev_act->driver.feedback_cb) indev_act->driver.feedback_cb(&indev_act->driver, event);
- }
-
- /*Call the event callback itself*/
- if(event_xcb) event_xcb(obj, event);
-
- /*Restore the event data*/
- event_act_data = event_act_data_save;
-
- /*Remove this element from the list*/
- event_temp_data_head = event_temp_data_head->prev;
-
- if(event_temp_data.deleted) {
- return LV_RES_INV;
- }
-
- if(obj) {
- if(obj->parent_event && obj->par) {
- lv_res_t res = lv_event_send(obj->par, event, data);
- if(res != LV_RES_OK) {
- return LV_RES_INV;
- }
- }
- }
-
- return LV_RES_OK;
-}
-
-/**
- * Get the `data` parameter of the current event
- * @return the `data` parameter
- */
-const void * lv_event_get_data(void)
-{
- return event_act_data;
-}
-
-/**
- * Set the a signal function of an object. Used internally by the library.
- * Always call the previous signal function in the new.
- * @param obj pointer to an object
- * @param cb the new signal function
- */
-void lv_obj_set_signal_cb(lv_obj_t * obj, lv_signal_cb_t signal_cb)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- obj->signal_cb = signal_cb;
-}
-
-/**
- * Send an event to the object
- * @param obj pointer to an object
- * @param event the type of the event from `lv_event_t`.
- */
-void lv_signal_send(lv_obj_t * obj, lv_signal_t signal, void * param)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- if(obj->signal_cb) obj->signal_cb(obj, signal, param);
-}
-
-/**
- * Set a new design function for an object
- * @param obj pointer to an object
- * @param design_cb the new design function
- */
-void lv_obj_set_design_cb(lv_obj_t * obj, lv_design_cb_t design_cb)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- obj->design_cb = design_cb;
-}
-
-/*----------------
- * Other set
- *--------------*/
-
-/**
- * Allocate a new ext. data for an object
- * @param obj pointer to an object
- * @param ext_size the size of the new ext. data
- * @return Normal pointer to the allocated ext
- */
-void * lv_obj_allocate_ext_attr(lv_obj_t * obj, uint16_t ext_size)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- obj->ext_attr = lv_mem_realloc(obj->ext_attr, ext_size);
-
- return (void *)obj->ext_attr;
-}
-
-/**
- * Send a 'LV_SIGNAL_REFR_EXT_SIZE' signal to the object
- * @param obj pointer to an object
- */
-void lv_obj_refresh_ext_draw_pad(lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- obj->ext_draw_pad = 0;
- obj->signal_cb(obj, LV_SIGNAL_REFR_EXT_DRAW_PAD, NULL);
-
- lv_obj_invalidate(obj);
-}
-
-/*=======================
- * Getter functions
- *======================*/
-
-/**
- * Return with the screen of an object
- * @param obj pointer to an object
- * @return pointer to a screen
- */
-lv_obj_t * lv_obj_get_screen(const lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- const lv_obj_t * par = obj;
- const lv_obj_t * act_p;
-
- do {
- act_p = par;
- par = lv_obj_get_parent(act_p);
- } while(par != NULL);
-
- return (lv_obj_t *)act_p;
-}
-
-/**
- * Get the display of an object
- * @param scr pointer to an object
- * @return pointer the object's display
- */
-lv_disp_t * lv_obj_get_disp(const lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- const lv_obj_t * scr;
-
- if(obj->par == NULL)
- scr = obj; /*`obj` is a screen*/
- else
- scr = lv_obj_get_screen(obj); /*get the screen of `obj`*/
-
- lv_disp_t * d;
- LV_LL_READ(LV_GC_ROOT(_lv_disp_ll), d)
- {
- lv_obj_t * s;
- LV_LL_READ(d->scr_ll, s)
- {
- if(s == scr) return d;
- }
- }
-
- LV_LOG_WARN("lv_scr_get_disp: screen not found")
- return NULL;
-}
-
-/*---------------------
- * Parent/children get
- *--------------------*/
-
-/**
- * Returns with the parent of an object
- * @param obj pointer to an object
- * @return pointer to the parent of 'obj'
- */
-lv_obj_t * lv_obj_get_parent(const lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- return obj->par;
-}
-
-/**
- * Iterate through the children of an object (start from the "youngest")
- * @param obj pointer to an object
- * @param child NULL at first call to get the next children
- * and the previous return value later
- * @return the child after 'act_child' or NULL if no more child
- */
-lv_obj_t * lv_obj_get_child(const lv_obj_t * obj, const lv_obj_t * child)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- lv_obj_t * result = NULL;
-
- if(child == NULL) {
- result = lv_ll_get_head(&obj->child_ll);
- } else {
- result = lv_ll_get_next(&obj->child_ll, child);
- }
-
- return result;
-}
-
-/**
- * Iterate through the children of an object (start from the "oldest")
- * @param obj pointer to an object
- * @param child NULL at first call to get the next children
- * and the previous return value later
- * @return the child after 'act_child' or NULL if no more child
- */
-lv_obj_t * lv_obj_get_child_back(const lv_obj_t * obj, const lv_obj_t * child)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- lv_obj_t * result = NULL;
-
- if(child == NULL) {
- result = lv_ll_get_tail(&obj->child_ll);
- } else {
- result = lv_ll_get_prev(&obj->child_ll, child);
- }
-
- return result;
-}
-
-/**
- * Count the children of an object (only children directly on 'obj')
- * @param obj pointer to an object
- * @return children number of 'obj'
- */
-uint16_t lv_obj_count_children(const lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- lv_obj_t * i;
- uint16_t cnt = 0;
-
- LV_LL_READ(obj->child_ll, i) cnt++;
-
- return cnt;
-}
-
-/** Recursively count the children of an object
- * @param obj pointer to an object
- * @return children number of 'obj'
- */
-uint16_t lv_obj_count_children_recursive(const lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- lv_obj_t * i;
- uint16_t cnt = 0;
-
- LV_LL_READ(obj->child_ll, i)
- {
- cnt++; /*Count the child*/
- cnt += lv_obj_count_children_recursive(i); /*recursively count children's children*/
- }
-
- return cnt;
-}
-
-/*---------------------
- * Coordinate get
- *--------------------*/
-
-/**
- * Copy the coordinates of an object to an area
- * @param obj pointer to an object
- * @param cords_p pointer to an area to store the coordinates
- */
-void lv_obj_get_coords(const lv_obj_t * obj, lv_area_t * cords_p)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- lv_area_copy(cords_p, &obj->coords);
-}
-
-/**
- * Reduce area retried by `lv_obj_get_coords()` the get graphically usable area of an object.
- * (Without the size of the border or other extra graphical elements)
- * @param coords_p store the result area here
- */
-void lv_obj_get_inner_coords(const lv_obj_t * obj, lv_area_t * coords_p)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- const lv_style_t * style = lv_obj_get_style(obj);
- if(style->body.border.part & LV_BORDER_LEFT) coords_p->x1 += style->body.border.width;
-
- if(style->body.border.part & LV_BORDER_RIGHT) coords_p->x2 -= style->body.border.width;
-
- if(style->body.border.part & LV_BORDER_TOP) coords_p->y1 += style->body.border.width;
-
- if(style->body.border.part & LV_BORDER_BOTTOM) coords_p->y2 -= style->body.border.width;
-}
-
-/**
- * Get the x coordinate of object
- * @param obj pointer to an object
- * @return distance of 'obj' from the left side of its parent
- */
-lv_coord_t lv_obj_get_x(const lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- lv_coord_t rel_x;
- lv_obj_t * parent = lv_obj_get_parent(obj);
- if(parent) {
- rel_x = obj->coords.x1 - parent->coords.x1;
- } else {
- rel_x = obj->coords.x1;
- }
- return rel_x;
-}
-
-/**
- * Get the y coordinate of object
- * @param obj pointer to an object
- * @return distance of 'obj' from the top of its parent
- */
-lv_coord_t lv_obj_get_y(const lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- lv_coord_t rel_y;
- lv_obj_t * parent = lv_obj_get_parent(obj);
- if(parent) {
- rel_y = obj->coords.y1 - parent->coords.y1;
- } else {
- rel_y = obj->coords.y1;
- }
- return rel_y;
-}
-
-/**
- * Get the width of an object
- * @param obj pointer to an object
- * @return the width
- */
-lv_coord_t lv_obj_get_width(const lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- return lv_area_get_width(&obj->coords);
-}
-
-/**
- * Get the height of an object
- * @param obj pointer to an object
- * @return the height
- */
-lv_coord_t lv_obj_get_height(const lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- return lv_area_get_height(&obj->coords);
-}
-
-/**
- * Get that width reduced by the left and right padding.
- * @param obj pointer to an object
- * @return the width which still fits into the container
- */
-lv_coord_t lv_obj_get_width_fit(const lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- const lv_style_t * style = lv_obj_get_style(obj);
-
- return lv_obj_get_width(obj) - style->body.padding.left - style->body.padding.right;
-}
-
-/**
- * Get that height reduced by the top an bottom padding.
- * @param obj pointer to an object
- * @return the height which still fits into the container
- */
-lv_coord_t lv_obj_get_height_fit(const lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- const lv_style_t * style = lv_obj_get_style(obj);
-
- return lv_obj_get_height(obj) - style->body.padding.top - style->body.padding.bottom;
-}
-
-/**
- * Get the automatic realign property of the object.
- * @param obj pointer to an object
- * @return true: auto realign is enabled; false: auto realign is disabled
- */
-bool lv_obj_get_auto_realign(const lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
-#if LV_USE_OBJ_REALIGN
- return obj->realign.auto_realign ? true : false;
-#else
- (void)obj;
- return false;
-#endif
-}
-
-/**
- * Get the left padding of extended clickable area
- * @param obj pointer to an object
- * @return the extended left padding
- */
-lv_coord_t lv_obj_get_ext_click_pad_left(const lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
-#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_TINY
- return obj->ext_click_pad_hor;
-#elif LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL
- return obj->ext_click_pad.x1;
-#else
- (void)obj; /*Unused*/
- return 0;
-#endif
-}
-
-/**
- * Get the right padding of extended clickable area
- * @param obj pointer to an object
- * @return the extended right padding
- */
-lv_coord_t lv_obj_get_ext_click_pad_right(const lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
-#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_TINY
- return obj->ext_click_pad_hor;
-#elif LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL
- return obj->ext_click_pad.x2;
-#else
- (void)obj; /*Unused*/
- return 0;
-#endif
-}
-
-/**
- * Get the top padding of extended clickable area
- * @param obj pointer to an object
- * @return the extended top padding
- */
-lv_coord_t lv_obj_get_ext_click_pad_top(const lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
-#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_TINY
- return obj->ext_click_pad_ver;
-#elif LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL
- return obj->ext_click_pad.y1;
-#else
- (void)obj; /*Unused*/
- return 0;
-#endif
-}
-
-/**
- * Get the bottom padding of extended clickable area
- * @param obj pointer to an object
- * @return the extended bottom padding
- */
-lv_coord_t lv_obj_get_ext_click_pad_bottom(const lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
-#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_TINY
- return obj->ext_click_pad_ver;
-#elif LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL
- return obj->ext_click_pad.y2;
-#else
- (void)obj; /*Unused*/
- return 0;
-#endif
-}
-
-/**
- * Get the extended size attribute of an object
- * @param obj pointer to an object
- * @return the extended size attribute
- */
-lv_coord_t lv_obj_get_ext_draw_pad(const lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- return obj->ext_draw_pad;
-}
-
-/*-----------------
- * Appearance get
- *---------------*/
-
-/**
- * Get the style pointer of an object (if NULL get style of the parent)
- * @param obj pointer to an object
- * @return pointer to a style
- */
-const lv_style_t * lv_obj_get_style(const lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- const lv_style_t * style_act = obj->style_p;
- if(style_act == NULL) {
- lv_obj_t * par = obj->par;
-
- while(par) {
- if(par->style_p) {
- if(par->style_p->glass == 0) {
-#if LV_USE_GROUP == 0
- style_act = par->style_p;
-#else
- /*If a parent is focused then use then focused style*/
- lv_group_t * g = lv_obj_get_group(par);
- if(lv_group_get_focused(g) == par) {
- style_act = lv_group_mod_style(g, par->style_p);
- } else {
- style_act = par->style_p;
- }
-#endif
- break;
- }
- }
- par = par->par;
- }
- }
-#if LV_USE_GROUP
- if(obj->group_p) {
- if(lv_group_get_focused(obj->group_p) == obj) {
- style_act = lv_group_mod_style(obj->group_p, style_act);
- }
- }
-#endif
-
- if(style_act == NULL) style_act = &lv_style_plain;
-
- return style_act;
-}
-
-/*-----------------
- * Attribute get
- *----------------*/
-
-/**
- * Get the hidden attribute of an object
- * @param obj pointer to an object
- * @return true: the object is hidden
- */
-bool lv_obj_get_hidden(const lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- return obj->hidden == 0 ? false : true;
-}
-
-/**
- * Get the click enable attribute of an object
- * @param obj pointer to an object
- * @return true: the object is clickable
- */
-bool lv_obj_get_click(const lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- return obj->click == 0 ? false : true;
-}
-
-/**
- * Get the top enable attribute of an object
- * @param obj pointer to an object
- * @return true: the auto top feture is enabled
- */
-bool lv_obj_get_top(const lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- return obj->top == 0 ? false : true;
-}
-
-/**
- * Get the drag enable attribute of an object
- * @param obj pointer to an object
- * @return true: the object is dragable
- */
-bool lv_obj_get_drag(const lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- return obj->drag == 0 ? false : true;
-}
-
-/**
- * Get the directions an object can be dragged
- * @param obj pointer to an object
- * @return bitwise OR of allowed directions an object can be dragged in
- */
-lv_drag_dir_t lv_obj_get_drag_dir(const lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- return obj->drag_dir;
-}
-
-/**
- * Get the drag throw enable attribute of an object
- * @param obj pointer to an object
- * @return true: drag throw is enabled
- */
-bool lv_obj_get_drag_throw(const lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- return obj->drag_throw == 0 ? false : true;
-}
-
-/**
- * Get the drag parent attribute of an object
- * @param obj pointer to an object
- * @return true: drag parent is enabled
- */
-bool lv_obj_get_drag_parent(const lv_obj_t * obj)
-{
- return obj->drag_parent == 0 ? false : true;
-}
-
-/**
- * Get the drag parent attribute of an object
- * @param obj pointer to an object
- * @return true: drag parent is enabled
- */
-bool lv_obj_get_parent_event(const lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- return obj->parent_event == 0 ? false : true;
-}
-
-
-lv_bidi_dir_t lv_obj_get_base_dir(const lv_obj_t * obj)
-{
-#if LV_USE_BIDI
- const lv_obj_t * parent = obj;
-
- while(parent) {
- if(parent->base_dir != LV_BIDI_DIR_INHERIT) return parent->base_dir;
-
- parent = lv_obj_get_parent(parent);
- }
-
- return LV_BIDI_BASE_DIR_DEF;
-#else
- (void) obj; /*Unused*/
- return LV_BIDI_DIR_LTR;
-#endif
-}
-
-
-/**
- * Get the opa scale enable parameter
- * @param obj pointer to an object
- * @return true: opa scaling is enabled for this object and all children; false: no opa scaling
- */
-lv_opa_t lv_obj_get_opa_scale_enable(const lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- return obj->opa_scale_en == 0 ? false : true;
-}
-
-/**
- * Get the opa scale parameter of an object
- * @param obj pointer to an object
- * @return opa scale [0..255]
- */
-lv_opa_t lv_obj_get_opa_scale(const lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- const lv_obj_t * parent = obj;
-
- while(parent) {
- if(parent->opa_scale_en) return parent->opa_scale;
- parent = lv_obj_get_parent(parent);
- }
-
- return LV_OPA_COVER;
-}
-
-/**
- * Get the protect field of an object
- * @param obj pointer to an object
- * @return protect field ('OR'ed values of `lv_protect_t`)
- */
-uint8_t lv_obj_get_protect(const lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- return obj->protect;
-}
-
-/**
- * Check at least one bit of a given protect bitfield is set
- * @param obj pointer to an object
- * @param prot protect bits to test ('OR'ed values of `lv_protect_t`)
- * @return false: none of the given bits are set, true: at least one bit is set
- */
-bool lv_obj_is_protected(const lv_obj_t * obj, uint8_t prot)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- return (obj->protect & prot) == 0 ? false : true;
-}
-
-/**
- * Get the signal function of an object
- * @param obj pointer to an object
- * @return the signal function
- */
-lv_signal_cb_t lv_obj_get_signal_cb(const lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- return obj->signal_cb;
-}
-
-/**
- * Get the design function of an object
- * @param obj pointer to an object
- * @return the design function
- */
-lv_design_cb_t lv_obj_get_design_cb(const lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- return obj->design_cb;
-}
-
-/**
- * Get the event function of an object
- * @param obj pointer to an object
- * @return the event function
- */
-lv_event_cb_t lv_obj_get_event_cb(const lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- return obj->event_cb;
-}
-
-/*------------------
- * Other get
- *-----------------*/
-
-/**
- * Get the ext pointer
- * @param obj pointer to an object
- * @return the ext pointer but not the dynamic version
- * Use it as ext->data1, and NOT da(ext)->data1
- */
-void * lv_obj_get_ext_attr(const lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- return obj->ext_attr;
-}
-
-/**
- * Get object's and its ancestors type. Put their name in `type_buf` starting with the current type.
- * E.g. buf.type[0]="lv_btn", buf.type[1]="lv_cont", buf.type[2]="lv_obj"
- * @param obj pointer to an object which type should be get
- * @param buf pointer to an `lv_obj_type_t` buffer to store the types
- */
-void lv_obj_get_type(const lv_obj_t * obj, lv_obj_type_t * buf)
-{
- LV_ASSERT_NULL(buf);
- LV_ASSERT_NULL(obj);
-
- lv_obj_type_t tmp;
-
- memset(buf, 0, sizeof(lv_obj_type_t));
- memset(&tmp, 0, sizeof(lv_obj_type_t));
-
- obj->signal_cb((lv_obj_t *)obj, LV_SIGNAL_GET_TYPE, &tmp);
-
- uint8_t cnt;
- for(cnt = 0; cnt < LV_MAX_ANCESTOR_NUM; cnt++) {
- if(tmp.type[cnt] == NULL) break;
- }
-
- /*Swap the order. The real type comes first*/
- uint8_t i;
- for(i = 0; i < cnt; i++) {
- buf->type[i] = tmp.type[cnt - 1 - i];
- }
-}
-
-#if LV_USE_USER_DATA
-
-/**
- * Get the object's user data
- * @param obj pointer to an object
- * @return user data
- */
-lv_obj_user_data_t lv_obj_get_user_data(const lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- return obj->user_data;
-}
-
-/**
- * Get a pointer to the object's user data
- * @param obj pointer to an object
- * @return pointer to the user data
- */
-lv_obj_user_data_t * lv_obj_get_user_data_ptr(const lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- return (lv_obj_user_data_t *)&obj->user_data;
-}
-
-/**
- * Set the object's user data. The data will be copied.
- * @param obj pointer to an object
- * @param data user data
- */
-void lv_obj_set_user_data(lv_obj_t * obj, lv_obj_user_data_t data)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- memcpy(&obj->user_data, &data, sizeof(lv_obj_user_data_t));
-}
-#endif
-
-#if LV_USE_GROUP
-/**
- * Get the group of the object
- * @param obj pointer to an object
- * @return the pointer to group of the object
- */
-void * lv_obj_get_group(const lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- return obj->group_p;
-}
-
-/**
- * Tell whether the object is the focused object of a group or not.
- * @param obj pointer to an object
- * @return true: the object is focused, false: the object is not focused or not in a group
- */
-bool lv_obj_is_focused(const lv_obj_t * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- if(obj->group_p) {
- if(lv_group_get_focused(obj->group_p) == obj) return true;
- }
-
- return false;
-}
-#endif
-
-
-/*-------------------
- * OTHER FUNCTIONS
- *------------------*/
-
-/**
- * Used in the signal callback to handle `LV_SIGNAL_GET_TYPE` signal
- * @param obj pointer to an object
- * @param buf pointer to `lv_obj_type_t`. (`param` in the signal callback)
- * @param name name of the object. E.g. "lv_btn". (Only the pointer is saved)
- * @return LV_RES_OK
- */
-lv_res_t lv_obj_handle_get_type_signal(lv_obj_type_t * buf, const char * name)
-{
- uint8_t i;
- for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/
- if(buf->type[i] == NULL) break;
- }
- buf->type[i] = name;
-
- return LV_RES_OK;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-static void lv_obj_del_async_cb(void * obj)
-{
- LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
-
- lv_obj_del(obj);
-}
-
-/**
- * Handle the drawing related tasks of the base objects.
- * @param obj pointer to an object
- * @param mask the object will be drawn only in this area
- * @param mode LV_DESIGN_COVER_CHK: only check if the object fully covers the 'mask_p' area
- * (return 'true' if yes)
- * LV_DESIGN_DRAW: draw the object (always return 'true')
- * @param return true/false, depends on 'mode'
- */
-static bool lv_obj_design(lv_obj_t * obj, const lv_area_t * mask_p, lv_design_mode_t mode)
-{
- if(mode == LV_DESIGN_COVER_CHK) {
-
- /*Most trivial test. Is the mask fully IN the object? If no it surely doesn't cover it*/
- if(lv_area_is_in(mask_p, &obj->coords) == false) return false;
-
- /*Can cover the area only if fully solid (no opacity)*/
- const lv_style_t * style = lv_obj_get_style(obj);
- if(style->body.opa < LV_OPA_MAX) return false;
-
- /* Because of the radius it is not sure the area is covered
- * Check the areas where there is no radius*/
- lv_coord_t r = style->body.radius;
-
- if(r == LV_RADIUS_CIRCLE) return false;
-
- lv_area_t area_tmp;
-
- /*Check horizontally without radius*/
- lv_obj_get_coords(obj, &area_tmp);
- area_tmp.x1 += r;
- area_tmp.x2 -= r;
- if(lv_area_is_in(mask_p, &area_tmp) == false) return false;
-
- /*Check vertically without radius*/
- lv_obj_get_coords(obj, &area_tmp);
- area_tmp.y1 += r;
- area_tmp.y2 -= r;
- if(lv_area_is_in(mask_p, &area_tmp) == false) return false;
-
- } else if(mode == LV_DESIGN_DRAW_MAIN) {
- const lv_style_t * style = lv_obj_get_style(obj);
- lv_draw_rect(&obj->coords, mask_p, style, lv_obj_get_opa_scale(obj));
- }
-
- return true;
-}
-
-/**
- * Signal function of the basic object
- * @param obj pointer to an object
- * @param sign signal type
- * @param param parameter for the signal (depends on signal type)
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_obj_signal(lv_obj_t * obj, lv_signal_t sign, void * param)
-{
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);
-
- lv_res_t res = LV_RES_OK;
-
- if(sign == LV_SIGNAL_CHILD_CHG) {
- /*Return 'invalid' if the child change signal is not enabled*/
- if(lv_obj_is_protected(obj, LV_PROTECT_CHILD_CHG) != false) res = LV_RES_INV;
- } else if(sign == LV_SIGNAL_REFR_EXT_DRAW_PAD) {
- const lv_style_t * style = lv_obj_get_style(obj);
- if(style->body.shadow.width > obj->ext_draw_pad) obj->ext_draw_pad = style->body.shadow.width;
- } else if(sign == LV_SIGNAL_STYLE_CHG) {
- lv_obj_refresh_ext_draw_pad(obj);
- }
- return res;
-}
-
-/**
- * Reposition the children of an object. (Called recursively)
- * @param obj pointer to an object which children will be repositioned
- * @param x_diff x coordinate shift
- * @param y_diff y coordinate shift
- */
-static void refresh_children_position(lv_obj_t * obj, lv_coord_t x_diff, lv_coord_t y_diff)
-{
- lv_obj_t * i;
- LV_LL_READ(obj->child_ll, i)
- {
- i->coords.x1 += x_diff;
- i->coords.y1 += y_diff;
- i->coords.x2 += x_diff;
- i->coords.y2 += y_diff;
-
- refresh_children_position(i, x_diff, y_diff);
- }
-}
-
-/**
- * Refresh the style of all children of an object. (Called recursively)
- * @param style_p refresh objects only with this style.
- * @param obj pointer to an object
- */
-static void report_style_mod_core(void * style_p, lv_obj_t * obj)
-{
- lv_obj_t * i;
- LV_LL_READ(obj->child_ll, i)
- {
- if(i->style_p == style_p || style_p == NULL) {
- refresh_children_style(i);
- lv_obj_refresh_style(i);
- }
-
- report_style_mod_core(style_p, i);
- }
-}
-
-/**
- * Recursively refresh the style of the children. Go deeper until a not NULL style is found
- * because the NULL styles are inherited from the parent
- * @param obj pointer to an object
- */
-static void refresh_children_style(lv_obj_t * obj)
-{
- lv_obj_t * child = lv_obj_get_child(obj, NULL);
- while(child != NULL) {
- if(child->style_p == NULL) {
- refresh_children_style(child); /*Check children too*/
- lv_obj_refresh_style(child); /*Notify the child about the style change*/
- } else if(child->style_p->glass) {
- /*Children with 'glass' parent might be effected if their style == NULL*/
- refresh_children_style(child);
- }
- child = lv_obj_get_child(obj, child);
- }
-}
-
-/**
- * Called by 'lv_obj_del' to delete the children objects
- * @param obj pointer to an object (all of its children will be deleted)
- */
-static void delete_children(lv_obj_t * obj)
-{
- lv_obj_t * i;
- lv_obj_t * i_next;
- i = lv_ll_get_head(&(obj->child_ll));
-
- /*Remove from the group; remove before transversing children so that
- * the object still has access to all children during the
- * LV_SIGNAL_DEFOCUS call*/
-#if LV_USE_GROUP
- lv_group_t * group = lv_obj_get_group(obj);
- if(group) lv_group_remove_obj(obj);
-#endif
-
- while(i != NULL) {
- /*Get the next object before delete this*/
- i_next = lv_ll_get_next(&(obj->child_ll), i);
-
- /*Call the recursive del to the child too*/
- delete_children(i);
-
- /*Set i to the next node*/
- i = i_next;
- }
-
- /*Let the suer free the resources used in `LV_EVENT_DELETE`*/
- lv_event_send(obj, LV_EVENT_DELETE, NULL);
-
- lv_event_mark_deleted(obj);
-
- /*Remove the animations from this object*/
-#if LV_USE_ANIMATION
- lv_anim_del(obj, NULL);
-#endif
-
- /* Reset the input devices if
- * the object to delete is used*/
- lv_indev_t * indev = lv_indev_get_next(NULL);
- while(indev) {
- if(indev->proc.types.pointer.act_obj == obj || indev->proc.types.pointer.last_obj == obj) {
- lv_indev_reset(indev);
- }
-
- if(indev->proc.types.pointer.last_pressed == obj) {
- indev->proc.types.pointer.last_pressed = NULL;
- }
-#if LV_USE_GROUP
- if(indev->group == group && obj == lv_indev_get_obj_act()) {
- lv_indev_reset(indev);
- }
-#endif
- indev = lv_indev_get_next(indev);
- }
-
- /* Clean up the object specific data*/
- obj->signal_cb(obj, LV_SIGNAL_CLEANUP, NULL);
-
- /*Remove the object from parent's children list*/
- lv_obj_t * par = lv_obj_get_parent(obj);
- lv_ll_rem(&(par->child_ll), obj);
-
- /*Delete the base objects*/
- if(obj->ext_attr != NULL) lv_mem_free(obj->ext_attr);
- lv_mem_free(obj); /*Free the object itself*/
-}
-
-static void base_dir_refr_children(lv_obj_t * obj)
-{
- lv_obj_t * child;
- child = lv_obj_get_child(obj, NULL);
-
- while(child) {
- if(child->base_dir == LV_BIDI_DIR_INHERIT) {
- lv_signal_send(child, LV_SIGNAL_BASE_DIR_CHG, NULL);
- base_dir_refr_children(child);
- }
-
- child = lv_obj_get_child(obj, child);
- }
-}
-
-
-static void lv_event_mark_deleted(lv_obj_t * obj)
-{
- lv_event_temp_data_t * t = event_temp_data_head;
-
- while(t) {
- if(t->obj == obj) t->deleted = true;
- t = t->prev;
- }
-}
diff --git a/src/libs/lvgl/src/lv_core/lv_obj.h b/src/libs/lvgl/src/lv_core/lv_obj.h
deleted file mode 100644
index 24517241..00000000
--- a/src/libs/lvgl/src/lv_core/lv_obj.h
+++ /dev/null
@@ -1,1025 +0,0 @@
-/**
- * @file lv_obj.h
- *
- */
-
-#ifndef LV_OBJ_H
-#define LV_OBJ_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#include <stddef.h>
-#include <stdbool.h>
-#include "lv_style.h"
-#include "../lv_misc/lv_types.h"
-#include "../lv_misc/lv_area.h"
-#include "../lv_misc/lv_mem.h"
-#include "../lv_misc/lv_ll.h"
-#include "../lv_misc/lv_color.h"
-#include "../lv_misc/lv_log.h"
-#include "../lv_misc/lv_bidi.h"
-#include "../lv_hal/lv_hal.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/*Error check of lv_conf.h*/
-#if LV_HOR_RES_MAX == 0 || LV_VER_RES_MAX == 0
-#error "LittlevGL: LV_HOR_RES_MAX and LV_VER_RES_MAX must be greater than 0"
-#endif
-
-#if LV_ANTIALIAS > 1
-#error "LittlevGL: LV_ANTIALIAS can be only 0 or 1"
-#endif
-
-#define LV_MAX_ANCESTOR_NUM 8
-
-#define LV_EXT_CLICK_AREA_OFF 0
-#define LV_EXT_CLICK_AREA_TINY 1
-#define LV_EXT_CLICK_AREA_FULL 2
-
-/**********************
- * TYPEDEFS
- **********************/
-
-struct _lv_obj_t;
-
-
-/** Design modes */
-enum {
- LV_DESIGN_DRAW_MAIN, /**< Draw the main portion of the object */
- LV_DESIGN_DRAW_POST, /**< Draw extras on the object */
- LV_DESIGN_COVER_CHK, /**< Check if the object fully covers the 'mask_p' area */
-};
-typedef uint8_t lv_design_mode_t;
-
-/**
- * The design callback is used to draw the object on the screen.
- * It accepts the object, a mask area, and the mode in which to draw the object.
- */
-typedef bool (*lv_design_cb_t)(struct _lv_obj_t * obj, const lv_area_t * mask_p, lv_design_mode_t mode);
-
-enum {
- LV_EVENT_PRESSED, /**< The object has been pressed*/
- LV_EVENT_PRESSING, /**< The object is being pressed (called continuously while pressing)*/
- LV_EVENT_PRESS_LOST, /**< User is still pressing but slid cursor/finger off of the object */
- LV_EVENT_SHORT_CLICKED, /**< User pressed object for a short period of time, then released it. Not called if dragged. */
- LV_EVENT_LONG_PRESSED, /**< Object has been pressed for at least `LV_INDEV_LONG_PRESS_TIME`. Not called if dragged.*/
- LV_EVENT_LONG_PRESSED_REPEAT, /**< Called after `LV_INDEV_LONG_PRESS_TIME` in every
- `LV_INDEV_LONG_PRESS_REP_TIME` ms. Not called if dragged.*/
- LV_EVENT_CLICKED, /**< Called on release if not dragged (regardless to long press)*/
- LV_EVENT_RELEASED, /**< Called in every cases when the object has been released*/
- LV_EVENT_DRAG_BEGIN,
- LV_EVENT_DRAG_END,
- LV_EVENT_DRAG_THROW_BEGIN,
- LV_EVENT_KEY,
- LV_EVENT_FOCUSED,
- LV_EVENT_DEFOCUSED,
- LV_EVENT_VALUE_CHANGED, /**< The object's value has changed (i.e. slider moved) */
- LV_EVENT_INSERT,
- LV_EVENT_REFRESH,
- LV_EVENT_APPLY, /**< "Ok", "Apply" or similar specific button has clicked*/
- LV_EVENT_CANCEL, /**< "Close", "Cancel" or similar specific button has clicked*/
- LV_EVENT_DELETE, /**< Object is being deleted */
-};
-typedef uint8_t lv_event_t; /**< Type of event being sent to the object. */
-
-/**
- * @brief Event callback.
- * Events are used to notify the user of some action being taken on the object.
- * For details, see ::lv_event_t.
- */
-typedef void (*lv_event_cb_t)(struct _lv_obj_t * obj, lv_event_t event);
-
-/** Signals are for use by the object itself or to extend the object's functionality.
- * Applications should use ::lv_obj_set_event_cb to be notified of events that occur
- * on the object. */
-enum {
- /*General signals*/
- LV_SIGNAL_CLEANUP, /**< Object is being deleted */
- LV_SIGNAL_CHILD_CHG, /**< Child was removed/added */
- LV_SIGNAL_CORD_CHG, /**< Object coordinates/size have changed */
- LV_SIGNAL_PARENT_SIZE_CHG, /**< Parent's size has changed */
- LV_SIGNAL_STYLE_CHG, /**< Object's style has changed */
- LV_SIGNAL_BASE_DIR_CHG, /**<The base dir has changed*/
- LV_SIGNAL_REFR_EXT_DRAW_PAD, /**< Object's extra padding has changed */
- LV_SIGNAL_GET_TYPE, /**< LittlevGL needs to retrieve the object's type */
-
- /*Input device related*/
- LV_SIGNAL_PRESSED, /**< The object has been pressed*/
- LV_SIGNAL_PRESSING, /**< The object is being pressed (called continuously while pressing)*/
- LV_SIGNAL_PRESS_LOST, /**< User is still pressing but slid cursor/finger off of the object */
- LV_SIGNAL_RELEASED, /**< User pressed object for a short period of time, then released it. Not called if dragged. */
- LV_SIGNAL_LONG_PRESS, /**< Object has been pressed for at least `LV_INDEV_LONG_PRESS_TIME`. Not called if dragged.*/
- LV_SIGNAL_LONG_PRESS_REP, /**< Called after `LV_INDEV_LONG_PRESS_TIME` in every `LV_INDEV_LONG_PRESS_REP_TIME` ms. Not called if dragged.*/
- LV_SIGNAL_DRAG_BEGIN,
- LV_SIGNAL_DRAG_END,
-
- /*Group related*/
- LV_SIGNAL_FOCUS,
- LV_SIGNAL_DEFOCUS,
- LV_SIGNAL_CONTROL,
- LV_SIGNAL_GET_EDITABLE,
-};
-typedef uint8_t lv_signal_t;
-
-typedef lv_res_t (*lv_signal_cb_t)(struct _lv_obj_t * obj, lv_signal_t sign, void * param);
-
-/** Object alignment. */
-enum {
- LV_ALIGN_CENTER = 0,
- LV_ALIGN_IN_TOP_LEFT,
- LV_ALIGN_IN_TOP_MID,
- LV_ALIGN_IN_TOP_RIGHT,
- LV_ALIGN_IN_BOTTOM_LEFT,
- LV_ALIGN_IN_BOTTOM_MID,
- LV_ALIGN_IN_BOTTOM_RIGHT,
- LV_ALIGN_IN_LEFT_MID,
- LV_ALIGN_IN_RIGHT_MID,
- LV_ALIGN_OUT_TOP_LEFT,
- LV_ALIGN_OUT_TOP_MID,
- LV_ALIGN_OUT_TOP_RIGHT,
- LV_ALIGN_OUT_BOTTOM_LEFT,
- LV_ALIGN_OUT_BOTTOM_MID,
- LV_ALIGN_OUT_BOTTOM_RIGHT,
- LV_ALIGN_OUT_LEFT_TOP,
- LV_ALIGN_OUT_LEFT_MID,
- LV_ALIGN_OUT_LEFT_BOTTOM,
- LV_ALIGN_OUT_RIGHT_TOP,
- LV_ALIGN_OUT_RIGHT_MID,
- LV_ALIGN_OUT_RIGHT_BOTTOM,
-};
-typedef uint8_t lv_align_t;
-
-#if LV_USE_OBJ_REALIGN
-typedef struct
-{
- const struct _lv_obj_t * base;
- lv_coord_t xofs;
- lv_coord_t yofs;
- lv_align_t align;
- uint8_t auto_realign : 1;
- uint8_t origo_align : 1; /**< 1: the origo (center of the object) was aligned with
- `lv_obj_align_origo`*/
-} lv_reailgn_t;
-#endif
-
-enum {
- LV_DRAG_DIR_HOR = 0x1, /**< Object can be dragged horizontally. */
- LV_DRAG_DIR_VER = 0x2, /**< Object can be dragged vertically. */
- LV_DRAG_DIR_ALL = 0x3, /**< Object can be dragged in all directions. */
-};
-
-typedef uint8_t lv_drag_dir_t;
-
-typedef struct _lv_obj_t
-{
- struct _lv_obj_t * par; /**< Pointer to the parent object*/
- lv_ll_t child_ll; /**< Linked list to store the children objects*/
-
- lv_area_t coords; /**< Coordinates of the object (x1, y1, x2, y2)*/
-
- lv_event_cb_t event_cb; /**< Event callback function */
- lv_signal_cb_t signal_cb; /**< Object type specific signal function*/
- lv_design_cb_t design_cb; /**< Object type specific design function*/
-
- void * ext_attr; /**< Object type specific extended data*/
- const lv_style_t * style_p; /**< Pointer to the object's style*/
-
-#if LV_USE_GROUP != 0
- void * group_p; /**< Pointer to the group of the object*/
-#endif
-
-#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_TINY
- uint8_t ext_click_pad_hor; /**< Extra click padding in horizontal direction */
- uint8_t ext_click_pad_ver; /**< Extra click padding in vertical direction */
-#endif
-
-#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL
- lv_area_t ext_click_pad; /**< Extra click padding area. */
-#endif
-
- /*Attributes and states*/
- uint8_t click : 1; /**< 1: Can be pressed by an input device*/
- uint8_t drag : 1; /**< 1: Enable the dragging*/
- uint8_t drag_throw : 1; /**< 1: Enable throwing with drag*/
- uint8_t drag_parent : 1; /**< 1: Parent will be dragged instead*/
- uint8_t hidden : 1; /**< 1: Object is hidden*/
- uint8_t top : 1; /**< 1: If the object or its children is clicked it goes to the foreground*/
- uint8_t opa_scale_en : 1; /**< 1: opa_scale is set*/
- uint8_t parent_event : 1; /**< 1: Send the object's events to the parent too. */
- lv_drag_dir_t drag_dir : 2; /**< Which directions the object can be dragged in */
- lv_bidi_dir_t base_dir : 2; /**< Base direction of texts related to this object */
- uint8_t reserved : 3; /**< Reserved for future use*/
- uint8_t protect; /**< Automatically happening actions can be prevented. 'OR'ed values from
- `lv_protect_t`*/
- lv_opa_t opa_scale; /**< Scale down the opacity by this factor. Effects all children as well*/
-
- lv_coord_t ext_draw_pad; /**< EXTtend the size in every direction for drawing. */
-
-#if LV_USE_OBJ_REALIGN
- lv_reailgn_t realign; /**< Information about the last call to ::lv_obj_align. */
-#endif
-
-#if LV_USE_USER_DATA
- lv_obj_user_data_t user_data; /**< Custom user data for object. */
-#endif
-
-} lv_obj_t;
-
-/*Protect some attributes (max. 8 bit)*/
-enum {
- LV_PROTECT_NONE = 0x00,
- LV_PROTECT_CHILD_CHG = 0x01, /**< Disable the child change signal. Used by the library*/
- LV_PROTECT_PARENT = 0x02, /**< Prevent automatic parent change (e.g. in lv_page)*/
- LV_PROTECT_POS = 0x04, /**< Prevent automatic positioning (e.g. in lv_cont layout)*/
- LV_PROTECT_FOLLOW = 0x08, /**< Prevent the object be followed in automatic ordering (e.g. in
- lv_cont PRETTY layout)*/
- LV_PROTECT_PRESS_LOST = 0x10, /**< If the `indev` was pressing this object but swiped out while
- pressing do not search other object.*/
- LV_PROTECT_CLICK_FOCUS = 0x20, /**< Prevent focusing the object by clicking on it*/
-};
-typedef uint8_t lv_protect_t;
-
-/** Used by `lv_obj_get_type()`. The object's and its ancestor types are stored here*/
-typedef struct
-{
- const char * type[LV_MAX_ANCESTOR_NUM]; /**< [0]: the actual type, [1]: ancestor, [2] #1's ancestor
- ... [x]: "lv_obj" */
-} lv_obj_type_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Init. the 'lv' library.
- */
-void lv_init(void);
-
-
-/**
- * Deinit the 'lv' library
- * Currently only implemented when not using custorm allocators, or GC is enabled.
- */
-#if LV_ENABLE_GC || !LV_MEM_CUSTOM
-void lv_deinit(void);
-#endif
-
-/*--------------------
- * Create and delete
- *-------------------*/
-
-/**
- * Create a basic object
- * @param parent pointer to a parent object.
- * If NULL then a screen will be created
- * @param copy pointer to a base object, if not NULL then the new object will be copied from it
- * @return pointer to the new object
- */
-lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy);
-
-/**
- * Delete 'obj' and all of its children
- * @param obj pointer to an object to delete
- * @return LV_RES_INV because the object is deleted
- */
-lv_res_t lv_obj_del(lv_obj_t * obj);
-
-/**
- * Helper function for asynchronously deleting objects.
- * Useful for cases where you can't delete an object directly in an `LV_EVENT_DELETE` handler (i.e. parent).
- * @param obj object to delete
- * @see lv_async_call
- */
-void lv_obj_del_async(struct _lv_obj_t *obj);
-
-/**
- * Delete all children of an object
- * @param obj pointer to an object
- */
-void lv_obj_clean(lv_obj_t * obj);
-
-
-/**
- * Mark an area of an object as invalid.
- * This area will be redrawn by 'lv_refr_task'
- * @param obj pointer to an object
- * @param area the area to redraw
- */
-void lv_obj_invalidate_area(const lv_obj_t * obj, const lv_area_t * area);
-
-/**
- * Mark the object as invalid therefore its current position will be redrawn by 'lv_refr_task'
- * @param obj pointer to an object
- */
-void lv_obj_invalidate(const lv_obj_t * obj);
-
-/*=====================
- * Setter functions
- *====================*/
-
-/*--------------------
- * Parent/children set
- *--------------------*/
-
-/**
- * Set a new parent for an object. Its relative position will be the same.
- * @param obj pointer to an object. Can't be a screen.
- * @param parent pointer to the new parent object. (Can't be NULL)
- */
-void lv_obj_set_parent(lv_obj_t * obj, lv_obj_t * parent);
-
-/**
- * Move and object to the foreground
- * @param obj pointer to an object
- */
-void lv_obj_move_foreground(lv_obj_t * obj);
-
-/**
- * Move and object to the background
- * @param obj pointer to an object
- */
-void lv_obj_move_background(lv_obj_t * obj);
-
-/*--------------------
- * Coordinate set
- * ------------------*/
-
-/**
- * Set relative the position of an object (relative to the parent)
- * @param obj pointer to an object
- * @param x new distance from the left side of the parent
- * @param y new distance from the top of the parent
- */
-void lv_obj_set_pos(lv_obj_t * obj, lv_coord_t x, lv_coord_t y);
-
-/**
- * Set the x coordinate of a object
- * @param obj pointer to an object
- * @param x new distance from the left side from the parent
- */
-void lv_obj_set_x(lv_obj_t * obj, lv_coord_t x);
-
-/**
- * Set the y coordinate of a object
- * @param obj pointer to an object
- * @param y new distance from the top of the parent
- */
-void lv_obj_set_y(lv_obj_t * obj, lv_coord_t y);
-
-/**
- * Set the size of an object
- * @param obj pointer to an object
- * @param w new width
- * @param h new height
- */
-void lv_obj_set_size(lv_obj_t * obj, lv_coord_t w, lv_coord_t h);
-
-/**
- * Set the width of an object
- * @param obj pointer to an object
- * @param w new width
- */
-void lv_obj_set_width(lv_obj_t * obj, lv_coord_t w);
-
-/**
- * Set the height of an object
- * @param obj pointer to an object
- * @param h new height
- */
-void lv_obj_set_height(lv_obj_t * obj, lv_coord_t h);
-
-/**
- * Align an object to an other object.
- * @param obj pointer to an object to align
- * @param base pointer to an object (if NULL the parent is used). 'obj' will be aligned to it.
- * @param align type of alignment (see 'lv_align_t' enum)
- * @param x_mod x coordinate shift after alignment
- * @param y_mod y coordinate shift after alignment
- */
-void lv_obj_align(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, lv_coord_t x_mod, lv_coord_t y_mod);
-
-/**
- * Align an object to an other object.
- * @param obj pointer to an object to align
- * @param base pointer to an object (if NULL the parent is used). 'obj' will be aligned to it.
- * @param align type of alignment (see 'lv_align_t' enum)
- * @param x_mod x coordinate shift after alignment
- * @param y_mod y coordinate shift after alignment
- */
-void lv_obj_align_origo(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, lv_coord_t x_mod, lv_coord_t y_mod);
-
-/**
- * Realign the object based on the last `lv_obj_align` parameters.
- * @param obj pointer to an object
- */
-void lv_obj_realign(lv_obj_t * obj);
-
-/**
- * Enable the automatic realign of the object when its size has changed based on the last
- * `lv_obj_align` parameters.
- * @param obj pointer to an object
- * @param en true: enable auto realign; false: disable auto realign
- */
-void lv_obj_set_auto_realign(lv_obj_t * obj, bool en);
-
-/**
- * Set the size of an extended clickable area
- * @param obj pointer to an object
- * @param left extended clickable are on the left [px]
- * @param right extended clickable are on the right [px]
- * @param top extended clickable are on the top [px]
- * @param bottom extended clickable are on the bottom [px]
- */
-void lv_obj_set_ext_click_area(lv_obj_t * obj, lv_coord_t left, lv_coord_t right, lv_coord_t top, lv_coord_t bottom);
-
-/*---------------------
- * Appearance set
- *--------------------*/
-
-/**
- * Set a new style for an object
- * @param obj pointer to an object
- * @param style_p pointer to the new style
- */
-void lv_obj_set_style(lv_obj_t * obj, const lv_style_t * style);
-
-/**
- * Notify an object about its style is modified
- * @param obj pointer to an object
- */
-void lv_obj_refresh_style(lv_obj_t * obj);
-
-/**
- * Notify all object if a style is modified
- * @param style pointer to a style. Only the objects with this style will be notified
- * (NULL to notify all objects)
- */
-void lv_obj_report_style_mod(lv_style_t * style);
-
-/*-----------------
- * Attribute set
- *----------------*/
-
-/**
- * Hide an object. It won't be visible and clickable.
- * @param obj pointer to an object
- * @param en true: hide the object
- */
-void lv_obj_set_hidden(lv_obj_t * obj, bool en);
-
-/**
- * Enable or disable the clicking of an object
- * @param obj pointer to an object
- * @param en true: make the object clickable
- */
-void lv_obj_set_click(lv_obj_t * obj, bool en);
-
-/**
- * Enable to bring this object to the foreground if it
- * or any of its children is clicked
- * @param obj pointer to an object
- * @param en true: enable the auto top feature
- */
-void lv_obj_set_top(lv_obj_t * obj, bool en);
-
-/**
- * Enable the dragging of an object
- * @param obj pointer to an object
- * @param en true: make the object dragable
- */
-void lv_obj_set_drag(lv_obj_t * obj, bool en);
-
-/**
- * Set the directions an object can be dragged in
- * @param obj pointer to an object
- * @param drag_dir bitwise OR of allowed drag directions
- */
-void lv_obj_set_drag_dir(lv_obj_t * obj, lv_drag_dir_t drag_dir);
-
-/**
- * Enable the throwing of an object after is is dragged
- * @param obj pointer to an object
- * @param en true: enable the drag throw
- */
-void lv_obj_set_drag_throw(lv_obj_t * obj, bool en);
-
-/**
- * Enable to use parent for drag related operations.
- * If trying to drag the object the parent will be moved instead
- * @param obj pointer to an object
- * @param en true: enable the 'drag parent' for the object
- */
-void lv_obj_set_drag_parent(lv_obj_t * obj, bool en);
-
-/**
- * Propagate the events to the parent too
- * @param obj pointer to an object
- * @param en true: enable the event propagation
- */
-void lv_obj_set_parent_event(lv_obj_t * obj, bool en);
-
-void lv_obj_set_base_dir(lv_obj_t * obj, lv_bidi_dir_t dir);
-/**
- * Set the opa scale enable parameter (required to set opa_scale with `lv_obj_set_opa_scale()`)
- * @param obj pointer to an object
- * @param en true: opa scaling is enabled for this object and all children; false: no opa scaling
- */
-void lv_obj_set_opa_scale_enable(lv_obj_t * obj, bool en);
-
-/**
- * Set the opa scale of an object.
- * The opacity of this object and all it's children will be scaled down with this factor.
- * `lv_obj_set_opa_scale_enable(obj, true)` needs to be called to enable it.
- * (not for all children just for the parent where to start the opa scaling)
- * @param obj pointer to an object
- * @param opa_scale a factor to scale down opacity [0..255]
- */
-void lv_obj_set_opa_scale(lv_obj_t * obj, lv_opa_t opa_scale);
-
-/**
- * Set a bit or bits in the protect filed
- * @param obj pointer to an object
- * @param prot 'OR'-ed values from `lv_protect_t`
- */
-void lv_obj_set_protect(lv_obj_t * obj, uint8_t prot);
-
-/**
- * Clear a bit or bits in the protect filed
- * @param obj pointer to an object
- * @param prot 'OR'-ed values from `lv_protect_t`
- */
-void lv_obj_clear_protect(lv_obj_t * obj, uint8_t prot);
-
-/**
- * Set a an event handler function for an object.
- * Used by the user to react on event which happens with the object.
- * @param obj pointer to an object
- * @param event_cb the new event function
- */
-void lv_obj_set_event_cb(lv_obj_t * obj, lv_event_cb_t event_cb);
-
-/**
- * Send an event to the object
- * @param obj pointer to an object
- * @param event the type of the event from `lv_event_t`.
- * @param data arbitrary data depending on the object type and the event. (Usually `NULL`)
- * @return LV_RES_OK: `obj` was not deleted in the event; LV_RES_INV: `obj` was deleted in the event
- */
-lv_res_t lv_event_send(lv_obj_t * obj, lv_event_t event, const void * data);
-
-/**
- * Call an event function with an object, event, and data.
- * @param event_xcb an event callback function. If `NULL` `LV_RES_OK` will return without any actions.
- * (the 'x' in the argument name indicates that its not a fully generic function because it not follows
- * the `func_name(object, callback, ...)` convention)
- * @param obj pointer to an object to associate with the event (can be `NULL` to simply call the `event_cb`)
- * @param event an event
- * @param data pointer to a custom data
- * @return LV_RES_OK: `obj` was not deleted in the event; LV_RES_INV: `obj` was deleted in the event
- */
-lv_res_t lv_event_send_func(lv_event_cb_t event_xcb, lv_obj_t * obj, lv_event_t event, const void * data);
-
-/**
- * Get the `data` parameter of the current event
- * @return the `data` parameter
- */
-const void * lv_event_get_data(void);
-
-/**
- * Set the a signal function of an object. Used internally by the library.
- * Always call the previous signal function in the new.
- * @param obj pointer to an object
- * @param signal_cb the new signal function
- */
-void lv_obj_set_signal_cb(lv_obj_t * obj, lv_signal_cb_t signal_cb);
-
-/**
- * Send an event to the object
- * @param obj pointer to an object
- * @param event the type of the event from `lv_event_t`.
- */
-void lv_signal_send(lv_obj_t * obj, lv_signal_t signal, void * param);
-
-/**
- * Set a new design function for an object
- * @param obj pointer to an object
- * @param design_cb the new design function
- */
-void lv_obj_set_design_cb(lv_obj_t * obj, lv_design_cb_t design_cb);
-
-/*----------------
- * Other set
- *--------------*/
-
-/**
- * Allocate a new ext. data for an object
- * @param obj pointer to an object
- * @param ext_size the size of the new ext. data
- * @return pointer to the allocated ext
- */
-void * lv_obj_allocate_ext_attr(lv_obj_t * obj, uint16_t ext_size);
-
-/**
- * Send a 'LV_SIGNAL_REFR_EXT_SIZE' signal to the object
- * @param obj pointer to an object
- */
-void lv_obj_refresh_ext_draw_pad(lv_obj_t * obj);
-
-/*=======================
- * Getter functions
- *======================*/
-
-/**
- * Return with the screen of an object
- * @param obj pointer to an object
- * @return pointer to a screen
- */
-lv_obj_t * lv_obj_get_screen(const lv_obj_t * obj);
-
-/**
- * Get the display of an object
- * @param scr pointer to an object
- * @return pointer the object's display
- */
-lv_disp_t * lv_obj_get_disp(const lv_obj_t * obj);
-
-/*---------------------
- * Parent/children get
- *--------------------*/
-
-/**
- * Returns with the parent of an object
- * @param obj pointer to an object
- * @return pointer to the parent of 'obj'
- */
-lv_obj_t * lv_obj_get_parent(const lv_obj_t * obj);
-
-/**
- * Iterate through the children of an object (start from the "youngest, lastly created")
- * @param obj pointer to an object
- * @param child NULL at first call to get the next children
- * and the previous return value later
- * @return the child after 'act_child' or NULL if no more child
- */
-lv_obj_t * lv_obj_get_child(const lv_obj_t * obj, const lv_obj_t * child);
-
-/**
- * Iterate through the children of an object (start from the "oldest", firstly created)
- * @param obj pointer to an object
- * @param child NULL at first call to get the next children
- * and the previous return value later
- * @return the child after 'act_child' or NULL if no more child
- */
-lv_obj_t * lv_obj_get_child_back(const lv_obj_t * obj, const lv_obj_t * child);
-
-/**
- * Count the children of an object (only children directly on 'obj')
- * @param obj pointer to an object
- * @return children number of 'obj'
- */
-uint16_t lv_obj_count_children(const lv_obj_t * obj);
-
-/** Recursively count the children of an object
- * @param obj pointer to an object
- * @return children number of 'obj'
- */
-uint16_t lv_obj_count_children_recursive(const lv_obj_t * obj);
-
-/*---------------------
- * Coordinate get
- *--------------------*/
-
-/**
- * Copy the coordinates of an object to an area
- * @param obj pointer to an object
- * @param cords_p pointer to an area to store the coordinates
- */
-void lv_obj_get_coords(const lv_obj_t * obj, lv_area_t * cords_p);
-
-/**
- * Reduce area retried by `lv_obj_get_coords()` the get graphically usable area of an object.
- * (Without the size of the border or other extra graphical elements)
- * @param coords_p store the result area here
- */
-void lv_obj_get_inner_coords(const lv_obj_t * obj, lv_area_t * coords_p);
-
-/**
- * Get the x coordinate of object
- * @param obj pointer to an object
- * @return distance of 'obj' from the left side of its parent
- */
-lv_coord_t lv_obj_get_x(const lv_obj_t * obj);
-
-/**
- * Get the y coordinate of object
- * @param obj pointer to an object
- * @return distance of 'obj' from the top of its parent
- */
-lv_coord_t lv_obj_get_y(const lv_obj_t * obj);
-
-/**
- * Get the width of an object
- * @param obj pointer to an object
- * @return the width
- */
-lv_coord_t lv_obj_get_width(const lv_obj_t * obj);
-
-/**
- * Get the height of an object
- * @param obj pointer to an object
- * @return the height
- */
-lv_coord_t lv_obj_get_height(const lv_obj_t * obj);
-
-/**
- * Get that width reduced by the left and right padding.
- * @param obj pointer to an object
- * @return the width which still fits into the container
- */
-lv_coord_t lv_obj_get_width_fit(const lv_obj_t * obj);
-
-/**
- * Get that height reduced by the top an bottom padding.
- * @param obj pointer to an object
- * @return the height which still fits into the container
- */
-lv_coord_t lv_obj_get_height_fit(const lv_obj_t * obj);
-
-/**
- * Get the automatic realign property of the object.
- * @param obj pointer to an object
- * @return true: auto realign is enabled; false: auto realign is disabled
- */
-bool lv_obj_get_auto_realign(const lv_obj_t * obj);
-
-/**
- * Get the left padding of extended clickable area
- * @param obj pointer to an object
- * @return the extended left padding
- */
-lv_coord_t lv_obj_get_ext_click_pad_left(const lv_obj_t * obj);
-
-/**
- * Get the right padding of extended clickable area
- * @param obj pointer to an object
- * @return the extended right padding
- */
-lv_coord_t lv_obj_get_ext_click_pad_right(const lv_obj_t * obj);
-
-/**
- * Get the top padding of extended clickable area
- * @param obj pointer to an object
- * @return the extended top padding
- */
-lv_coord_t lv_obj_get_ext_click_pad_top(const lv_obj_t * obj);
-
-/**
- * Get the bottom padding of extended clickable area
- * @param obj pointer to an object
- * @return the extended bottom padding
- */
-lv_coord_t lv_obj_get_ext_click_pad_bottom(const lv_obj_t * obj);
-
-/**
- * Get the extended size attribute of an object
- * @param obj pointer to an object
- * @return the extended size attribute
- */
-lv_coord_t lv_obj_get_ext_draw_pad(const lv_obj_t * obj);
-
-/*-----------------
- * Appearance get
- *---------------*/
-
-/**
- * Get the style pointer of an object (if NULL get style of the parent)
- * @param obj pointer to an object
- * @return pointer to a style
- */
-const lv_style_t * lv_obj_get_style(const lv_obj_t * obj);
-
-/*-----------------
- * Attribute get
- *----------------*/
-
-/**
- * Get the hidden attribute of an object
- * @param obj pointer to an object
- * @return true: the object is hidden
- */
-bool lv_obj_get_hidden(const lv_obj_t * obj);
-
-/**
- * Get the click enable attribute of an object
- * @param obj pointer to an object
- * @return true: the object is clickable
- */
-bool lv_obj_get_click(const lv_obj_t * obj);
-
-/**
- * Get the top enable attribute of an object
- * @param obj pointer to an object
- * @return true: the auto top feature is enabled
- */
-bool lv_obj_get_top(const lv_obj_t * obj);
-
-/**
- * Get the drag enable attribute of an object
- * @param obj pointer to an object
- * @return true: the object is dragable
- */
-bool lv_obj_get_drag(const lv_obj_t * obj);
-
-/**
- * Get the directions an object can be dragged
- * @param obj pointer to an object
- * @return bitwise OR of allowed directions an object can be dragged in
- */
-lv_drag_dir_t lv_obj_get_drag_dir(const lv_obj_t * obj);
-
-/**
- * Get the drag throw enable attribute of an object
- * @param obj pointer to an object
- * @return true: drag throw is enabled
- */
-bool lv_obj_get_drag_throw(const lv_obj_t * obj);
-
-/**
- * Get the drag parent attribute of an object
- * @param obj pointer to an object
- * @return true: drag parent is enabled
- */
-bool lv_obj_get_drag_parent(const lv_obj_t * obj);
-
-/**
- * Get the drag parent attribute of an object
- * @param obj pointer to an object
- * @return true: drag parent is enabled
- */
-bool lv_obj_get_parent_event(const lv_obj_t * obj);
-
-
-lv_bidi_dir_t lv_obj_get_base_dir(const lv_obj_t * obj);
-
-/**
- * Get the opa scale enable parameter
- * @param obj pointer to an object
- * @return true: opa scaling is enabled for this object and all children; false: no opa scaling
- */
-lv_opa_t lv_obj_get_opa_scale_enable(const lv_obj_t * obj);
-
-/**
- * Get the opa scale parameter of an object
- * @param obj pointer to an object
- * @return opa scale [0..255]
- */
-lv_opa_t lv_obj_get_opa_scale(const lv_obj_t * obj);
-
-/**
- * Get the protect field of an object
- * @param obj pointer to an object
- * @return protect field ('OR'ed values of `lv_protect_t`)
- */
-uint8_t lv_obj_get_protect(const lv_obj_t * obj);
-
-/**
- * Check at least one bit of a given protect bitfield is set
- * @param obj pointer to an object
- * @param prot protect bits to test ('OR'ed values of `lv_protect_t`)
- * @return false: none of the given bits are set, true: at least one bit is set
- */
-bool lv_obj_is_protected(const lv_obj_t * obj, uint8_t prot);
-
-/**
- * Get the signal function of an object
- * @param obj pointer to an object
- * @return the signal function
- */
-lv_signal_cb_t lv_obj_get_signal_cb(const lv_obj_t * obj);
-
-/**
- * Get the design function of an object
- * @param obj pointer to an object
- * @return the design function
- */
-lv_design_cb_t lv_obj_get_design_cb(const lv_obj_t * obj);
-
-/**
- * Get the event function of an object
- * @param obj pointer to an object
- * @return the event function
- */
-lv_event_cb_t lv_obj_get_event_cb(const lv_obj_t * obj);
-
-/*------------------
- * Other get
- *-----------------*/
-
-/**
- * Get the ext pointer
- * @param obj pointer to an object
- * @return the ext pointer but not the dynamic version
- * Use it as ext->data1, and NOT da(ext)->data1
- */
-void * lv_obj_get_ext_attr(const lv_obj_t * obj);
-
-/**
- * Get object's and its ancestors type. Put their name in `type_buf` starting with the current type.
- * E.g. buf.type[0]="lv_btn", buf.type[1]="lv_cont", buf.type[2]="lv_obj"
- * @param obj pointer to an object which type should be get
- * @param buf pointer to an `lv_obj_type_t` buffer to store the types
- */
-void lv_obj_get_type(const lv_obj_t * obj, lv_obj_type_t * buf);
-
-#if LV_USE_USER_DATA
-/**
- * Get the object's user data
- * @param obj pointer to an object
- * @return user data
- */
-lv_obj_user_data_t lv_obj_get_user_data(const lv_obj_t * obj);
-
-/**
- * Get a pointer to the object's user data
- * @param obj pointer to an object
- * @return pointer to the user data
- */
-lv_obj_user_data_t * lv_obj_get_user_data_ptr(const lv_obj_t * obj);
-
-/**
- * Set the object's user data. The data will be copied.
- * @param obj pointer to an object
- * @param data user data
- */
-void lv_obj_set_user_data(lv_obj_t * obj, lv_obj_user_data_t data);
-
-#endif
-
-#if LV_USE_GROUP
-/**
- * Get the group of the object
- * @param obj pointer to an object
- * @return the pointer to group of the object
- */
-void * lv_obj_get_group(const lv_obj_t * obj);
-
-/**
- * Tell whether the object is the focused object of a group or not.
- * @param obj pointer to an object
- * @return true: the object is focused, false: the object is not focused or not in a group
- */
-bool lv_obj_is_focused(const lv_obj_t * obj);
-
-#endif
-
-/*-------------------
- * OTHER FUNCTIONS
- *------------------*/
-
-/**
- * Used in the signal callback to handle `LV_SIGNAL_GET_TYPE` signal
- * @param buf pointer to `lv_obj_type_t`. (`param` in the signal callback)
- * @param name name of the object. E.g. "lv_btn". (Only the pointer is saved)
- * @return LV_RES_OK
- */
-lv_res_t lv_obj_handle_get_type_signal(lv_obj_type_t * buf, const char * name);
-
-/**********************
- * MACROS
- **********************/
-
-/**
- * Helps to quickly declare an event callback function.
- * Will be expanded to: `void <name> (lv_obj_t * obj, lv_event_t e)`
- *
- * Examples:
- * static LV_EVENT_CB_DECLARE(my_event1); //Protoype declaration
- *
- * static LV_EVENT_CB_DECLARE(my_event1)
- * {
- * if(e == LV_EVENT_CLICKED) {
- * lv_obj_set_hidden(obj ,true);
- * }
- * }
- */
-#define LV_EVENT_CB_DECLARE(name) void name(lv_obj_t * obj, lv_event_t e)
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_OBJ_H*/
diff --git a/src/libs/lvgl/src/lv_core/lv_refr.c b/src/libs/lvgl/src/lv_core/lv_refr.c
deleted file mode 100644
index e71e1629..00000000
--- a/src/libs/lvgl/src/lv_core/lv_refr.c
+++ /dev/null
@@ -1,612 +0,0 @@
-/**
- * @file lv_refr.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include <stddef.h>
-#include "lv_refr.h"
-#include "lv_disp.h"
-#include "../lv_hal/lv_hal_tick.h"
-#include "../lv_hal/lv_hal_disp.h"
-#include "../lv_misc/lv_task.h"
-#include "../lv_misc/lv_mem.h"
-#include "../lv_misc/lv_gc.h"
-#include "../lv_draw/lv_draw.h"
-
-#if defined(LV_GC_INCLUDE)
-#include LV_GC_INCLUDE
-#endif /* LV_ENABLE_GC */
-
-/*********************
- * DEFINES
- *********************/
-/* Draw translucent random colored areas on the invalidated (redrawn) areas*/
-#define MASK_AREA_DEBUG 0
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static void lv_refr_join_area(void);
-static void lv_refr_areas(void);
-static void lv_refr_area(const lv_area_t * area_p);
-static void lv_refr_area_part(const lv_area_t * area_p);
-static lv_obj_t * lv_refr_get_top_obj(const lv_area_t * area_p, lv_obj_t * obj);
-static void lv_refr_obj_and_children(lv_obj_t * top_p, const lv_area_t * mask_p);
-static void lv_refr_obj(lv_obj_t * obj, const lv_area_t * mask_ori_p);
-static void lv_refr_vdb_flush(void);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static uint32_t px_num;
-static lv_disp_t * disp_refr; /*Display being refreshed*/
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Initialize the screen refresh subsystem
- */
-void lv_refr_init(void)
-{
- /*Nothing to do*/
-}
-
-/**
- * Redraw the invalidated areas now.
- * Normally the redrawing is periodically executed in `lv_task_handler` but a long blocking process
- * can prevent the call of `lv_task_handler`. In this case if the the GUI is updated in the process
- * (e.g. progress bar) this function can be called when the screen should be updated.
- * @param disp pointer to display to refresh. NULL to refresh all displays.
- */
-void lv_refr_now(lv_disp_t * disp)
-{
- if(disp) {
- lv_disp_refr_task(disp->refr_task);
- } else {
- lv_disp_t * d;
- d = lv_disp_get_next(NULL);
- while(d) {
- lv_disp_refr_task(d->refr_task);
- d = lv_disp_get_next(d);
- }
- }
-}
-
-/**
- * Invalidate an area on display to redraw it
- * @param area_p pointer to area which should be invalidated (NULL: delete the invalidated areas)
- * @param disp pointer to display where the area should be invalidated (NULL can be used if there is
- * only one display)
- */
-void lv_inv_area(lv_disp_t * disp, const lv_area_t * area_p)
-{
- if(!disp) disp = lv_disp_get_default();
- if(!disp) return;
-
- /*Clear the invalidate buffer if the parameter is NULL*/
- if(area_p == NULL) {
- disp->inv_p = 0;
- return;
- }
-
- lv_area_t scr_area;
- scr_area.x1 = 0;
- scr_area.y1 = 0;
- scr_area.x2 = lv_disp_get_hor_res(disp) - 1;
- scr_area.y2 = lv_disp_get_ver_res(disp) - 1;
-
- lv_area_t com_area;
- bool suc;
-
- suc = lv_area_intersect(&com_area, area_p, &scr_area);
-
- /*The area is truncated to the screen*/
- if(suc != false) {
- if(disp->driver.rounder_cb) disp->driver.rounder_cb(&disp->driver, &com_area);
-
- /*Save only if this area is not in one of the saved areas*/
- uint16_t i;
- for(i = 0; i < disp->inv_p; i++) {
- if(lv_area_is_in(&com_area, &disp->inv_areas[i]) != false) return;
- }
-
- /*Save the area*/
- if(disp->inv_p < LV_INV_BUF_SIZE) {
- lv_area_copy(&disp->inv_areas[disp->inv_p], &com_area);
- } else { /*If no place for the area add the screen*/
- disp->inv_p = 0;
- lv_area_copy(&disp->inv_areas[disp->inv_p], &scr_area);
- }
- disp->inv_p++;
- }
-}
-
-/**
- * Get the display which is being refreshed
- * @return the display being refreshed
- */
-lv_disp_t * lv_refr_get_disp_refreshing(void)
-{
- return disp_refr;
-}
-
-/**
- * Set the display which is being refreshed.
- * It shouldn1t be used directly by the user.
- * It can be used to trick the drawing functions about there is an active display.
- * @param the display being refreshed
- */
-void lv_refr_set_disp_refreshing(lv_disp_t * disp)
-{
- disp_refr = disp;
-}
-
-/**
- * Called periodically to handle the refreshing
- * @param task pointer to the task itself
- */
-void lv_disp_refr_task(lv_task_t * task)
-{
- LV_LOG_TRACE("lv_refr_task: started");
-
- uint32_t start = lv_tick_get();
-
- disp_refr = task->user_data;
-
- lv_refr_join_area();
-
- lv_refr_areas();
-
- /*If refresh happened ...*/
- if(disp_refr->inv_p != 0) {
- /*In true double buffered mode copy the refreshed areas to the new VDB to keep it up to
- * date*/
- if(lv_disp_is_true_double_buf(disp_refr)) {
- lv_disp_buf_t * vdb = lv_disp_get_buf(disp_refr);
-
- /*Flush the content of the VDB*/
- lv_refr_vdb_flush();
-
- /* With true double buffering the flushing should be only the address change of the
- * current frame buffer. Wait until the address change is ready and copy the changed
- * content to the other frame buffer (new active VDB) to keep the buffers synchronized*/
- while(vdb->flushing)
- ;
-
- uint8_t * buf_act = (uint8_t *)vdb->buf_act;
- uint8_t * buf_ina = (uint8_t *)vdb->buf_act == vdb->buf1 ? vdb->buf2 : vdb->buf1;
-
- lv_coord_t hres = lv_disp_get_hor_res(disp_refr);
- uint16_t a;
- for(a = 0; a < disp_refr->inv_p; a++) {
- if(disp_refr->inv_area_joined[a] == 0) {
- lv_coord_t y;
- uint32_t start_offs =
- (hres * disp_refr->inv_areas[a].y1 + disp_refr->inv_areas[a].x1) * sizeof(lv_color_t);
- uint32_t line_length = lv_area_get_width(&disp_refr->inv_areas[a]) * sizeof(lv_color_t);
-
- for(y = disp_refr->inv_areas[a].y1; y <= disp_refr->inv_areas[a].y2; y++) {
- memcpy(buf_act + start_offs, buf_ina + start_offs, line_length);
- start_offs += hres * sizeof(lv_color_t);
- }
- }
- }
- } /*End of true double buffer handling*/
-
- /*Clean up*/
- memset(disp_refr->inv_areas, 0, sizeof(disp_refr->inv_areas));
- memset(disp_refr->inv_area_joined, 0, sizeof(disp_refr->inv_area_joined));
- disp_refr->inv_p = 0;
-
- /*Call monitor cb if present*/
- if(disp_refr->driver.monitor_cb) {
- disp_refr->driver.monitor_cb(&disp_refr->driver, lv_tick_elaps(start), px_num);
- }
- }
-
- lv_draw_free_buf();
-
- LV_LOG_TRACE("lv_refr_task: ready");
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Join the areas which has got common parts
- */
-static void lv_refr_join_area(void)
-{
- uint32_t join_from;
- uint32_t join_in;
- lv_area_t joined_area;
- for(join_in = 0; join_in < disp_refr->inv_p; join_in++) {
- if(disp_refr->inv_area_joined[join_in] != 0) continue;
-
- /*Check all areas to join them in 'join_in'*/
- for(join_from = 0; join_from < disp_refr->inv_p; join_from++) {
- /*Handle only unjoined areas and ignore itself*/
- if(disp_refr->inv_area_joined[join_from] != 0 || join_in == join_from) {
- continue;
- }
-
- /*Check if the areas are on each other*/
- if(lv_area_is_on(&disp_refr->inv_areas[join_in], &disp_refr->inv_areas[join_from]) == false) {
- continue;
- }
-
- lv_area_join(&joined_area, &disp_refr->inv_areas[join_in], &disp_refr->inv_areas[join_from]);
-
- /*Join two area only if the joined area size is smaller*/
- if(lv_area_get_size(&joined_area) < (lv_area_get_size(&disp_refr->inv_areas[join_in]) +
- lv_area_get_size(&disp_refr->inv_areas[join_from]))) {
- lv_area_copy(&disp_refr->inv_areas[join_in], &joined_area);
-
- /*Mark 'join_form' is joined into 'join_in'*/
- disp_refr->inv_area_joined[join_from] = 1;
- }
- }
- }
-}
-
-/**
- * Refresh the joined areas
- */
-static void lv_refr_areas(void)
-{
- px_num = 0;
- uint32_t i;
-
- for(i = 0; i < disp_refr->inv_p; i++) {
- /*Refresh the unjoined areas*/
- if(disp_refr->inv_area_joined[i] == 0) {
-
- lv_refr_area(&disp_refr->inv_areas[i]);
-
- if(disp_refr->driver.monitor_cb) px_num += lv_area_get_size(&disp_refr->inv_areas[i]);
- }
- }
-}
-
-/**
- * Refresh an area if there is Virtual Display Buffer
- * @param area_p pointer to an area to refresh
- */
-static void lv_refr_area(const lv_area_t * area_p)
-{
- /*True double buffering: there are two screen sized buffers. Just redraw directly into a
- * buffer*/
- if(lv_disp_is_true_double_buf(disp_refr)) {
- lv_disp_buf_t * vdb = lv_disp_get_buf(disp_refr);
- vdb->area.x1 = 0;
- vdb->area.x2 = lv_disp_get_hor_res(disp_refr) - 1;
- vdb->area.y1 = 0;
- vdb->area.y2 = lv_disp_get_ver_res(disp_refr) - 1;
- lv_refr_area_part(area_p);
- }
- /*The buffer is smaller: refresh the area in parts*/
- else {
- lv_disp_buf_t * vdb = lv_disp_get_buf(disp_refr);
- /*Calculate the max row num*/
- lv_coord_t w = lv_area_get_width(area_p);
- lv_coord_t h = lv_area_get_height(area_p);
- lv_coord_t y2 =
- area_p->y2 >= lv_disp_get_ver_res(disp_refr) ? y2 = lv_disp_get_ver_res(disp_refr) - 1 : area_p->y2;
-
- int32_t max_row = (uint32_t)vdb->size / w;
-
- if(max_row > h) max_row = h;
-
- /*Round down the lines of VDB if rounding is added*/
- if(disp_refr->driver.rounder_cb) {
- lv_area_t tmp;
- tmp.x1 = 0;
- tmp.x2 = 0;
- tmp.y1 = 0;
-
- lv_coord_t h_tmp = max_row;
- do {
- tmp.y2 = h_tmp - 1;
- disp_refr->driver.rounder_cb(&disp_refr->driver, &tmp);
-
- /*If this height fits into `max_row` then fine*/
- if(lv_area_get_height(&tmp) <= max_row) break;
-
- /*Decrement the height of the area until it fits into `max_row` after rounding*/
- h_tmp--;
- } while(h_tmp > 0);
-
- if(h_tmp <= 0) {
- LV_LOG_WARN("Can't set VDB height using the round function. (Wrong round_cb or to "
- "small VDB)");
- return;
- } else {
- max_row = tmp.y2 + 1;
- }
- }
-
- if (disp_refr->render_direction) {
- /*Always use the full row*/
- lv_coord_t row;
- lv_coord_t row_last = y2;
- for(row = area_p->y2; row > max_row - 1 + area_p->y1; row -= max_row) {
- /*Calc. the next y coordinates of VDB*/
- vdb->area.x1 = area_p->x1;
- vdb->area.x2 = area_p->x2;
- vdb->area.y1 = row - max_row + 1;
- vdb->area.y2 = row;
- if(vdb->area.y2 > y2) vdb->area.y2 = y2;
- row_last = vdb->area.y1;
- lv_refr_area_part(area_p);
- }
-
- /*If the last (first) y coordinates are not handled yet ...*/
- if(area_p->y1 != row_last) {
- /*Calc. the next y coordinates of VDB*/
- vdb->area.x1 = area_p->x1;
- vdb->area.x2 = area_p->x2;
- vdb->area.y1 = area_p->y1;
- vdb->area.y2 = row;
-
- /*Refresh this part too*/
- lv_refr_area_part(area_p);
- }
- }
- else {
- /*Always use the full row*/
- lv_coord_t row;
- lv_coord_t row_last = 0;
- for(row = area_p->y1; row + max_row - 1 <= y2; row += max_row) {
- /*Calc. the next y coordinates of VDB*/
- vdb->area.x1 = area_p->x1;
- vdb->area.x2 = area_p->x2;
- vdb->area.y1 = row;
- vdb->area.y2 = row + max_row - 1;
- if(vdb->area.y2 > y2) vdb->area.y2 = y2;
- row_last = vdb->area.y2;
- lv_refr_area_part(area_p);
- }
-
- /*If the last y coordinates are not handled yet ...*/
- if(y2 != row_last) {
- /*Calc. the next y coordinates of VDB*/
- vdb->area.x1 = area_p->x1;
- vdb->area.x2 = area_p->x2;
- vdb->area.y1 = row;
- vdb->area.y2 = y2;
-
- /*Refresh this part too*/
- lv_refr_area_part(area_p);
- }
- }
- }
-}
-
-/**
- * Refresh a part of an area which is on the actual Virtual Display Buffer
- * @param area_p pointer to an area to refresh
- */
-static void lv_refr_area_part(const lv_area_t * area_p)
-{
-
- lv_disp_buf_t * vdb = lv_disp_get_buf(disp_refr);
-
- /*In non double buffered mode, before rendering the next part wait until the previous image is
- * flushed*/
- if(lv_disp_is_double_buf(disp_refr) == false) {
- while(vdb->flushing)
- ;
- }
-
- lv_obj_t * top_p;
-
- /*Get the new mask from the original area and the act. VDB
- It will be a part of 'area_p'*/
- lv_area_t start_mask;
- lv_area_intersect(&start_mask, area_p, &vdb->area);
-
- /*Get the most top object which is not covered by others*/
- top_p = lv_refr_get_top_obj(&start_mask, lv_disp_get_scr_act(disp_refr));
-
- /*Do the refreshing from the top object*/
- lv_refr_obj_and_children(top_p, &start_mask);
-
- /*Also refresh top and sys layer unconditionally*/
- lv_refr_obj_and_children(lv_disp_get_layer_top(disp_refr), &start_mask);
- lv_refr_obj_and_children(lv_disp_get_layer_sys(disp_refr), &start_mask);
-
- /* In true double buffered mode flush only once when all areas were rendered.
- * In normal mode flush after every area */
- if(lv_disp_is_true_double_buf(disp_refr) == false) {
- lv_refr_vdb_flush();
- }
-}
-
-/**
- * Search the most top object which fully covers an area
- * @param area_p pointer to an area
- * @param obj the first object to start the searching (typically a screen)
- * @return
- */
-static lv_obj_t * lv_refr_get_top_obj(const lv_area_t * area_p, lv_obj_t * obj)
-{
- lv_obj_t * found_p = NULL;
-
- /*If this object is fully cover the draw area check the children too */
- if(lv_area_is_in(area_p, &obj->coords) && obj->hidden == 0) {
- lv_obj_t * i;
- LV_LL_READ(obj->child_ll, i)
- {
- found_p = lv_refr_get_top_obj(area_p, i);
-
- /*If a children is ok then break*/
- if(found_p != NULL) {
- break;
- }
- }
-
- /*If no better children check this object*/
- if(found_p == NULL) {
- const lv_style_t * style = lv_obj_get_style(obj);
- if(style->body.opa == LV_OPA_COVER && obj->design_cb(obj, area_p, LV_DESIGN_COVER_CHK) != false &&
- lv_obj_get_opa_scale(obj) == LV_OPA_COVER) {
- found_p = obj;
- }
- }
- }
-
- return found_p;
-}
-
-/**
- * Make the refreshing from an object. Draw all its children and the youngers too.
- * @param top_p pointer to an objects. Start the drawing from it.
- * @param mask_p pointer to an area, the objects will be drawn only here
- */
-static void lv_refr_obj_and_children(lv_obj_t * top_p, const lv_area_t * mask_p)
-{
- /* Normally always will be a top_obj (at least the screen)
- * but in special cases (e.g. if the screen has alpha) it won't.
- * In this case use the screen directly */
- if(top_p == NULL) top_p = lv_disp_get_scr_act(disp_refr);
-
- /*Refresh the top object and its children*/
- lv_refr_obj(top_p, mask_p);
-
- /*Draw the 'younger' sibling objects because they can be on top_obj */
- lv_obj_t * par;
- lv_obj_t * border_p = top_p;
-
- par = lv_obj_get_parent(top_p);
-
- /*Do until not reach the screen*/
- while(par != NULL) {
- /*object before border_p has to be redrawn*/
- lv_obj_t * i = lv_ll_get_prev(&(par->child_ll), border_p);
-
- while(i != NULL) {
- /*Refresh the objects*/
- lv_refr_obj(i, mask_p);
- i = lv_ll_get_prev(&(par->child_ll), i);
- }
-
- /*Call the post draw design function of the parents of the to object*/
- par->design_cb(par, mask_p, LV_DESIGN_DRAW_POST);
-
- /*The new border will be there last parents,
- *so the 'younger' brothers of parent will be refreshed*/
- border_p = par;
- /*Go a level deeper*/
- par = lv_obj_get_parent(par);
- }
-}
-
-/**
- * Refresh an object an all of its children. (Called recursively)
- * @param obj pointer to an object to refresh
- * @param mask_ori_p pointer to an area, the objects will be drawn only here
- */
-static void lv_refr_obj(lv_obj_t * obj, const lv_area_t * mask_ori_p)
-{
- /*Do not refresh hidden objects*/
- if(obj->hidden != 0) return;
-
- bool union_ok; /* Store the return value of area_union */
- /* Truncate the original mask to the coordinates of the parent
- * because the parent and its children are visible only here */
- lv_area_t obj_mask;
- lv_area_t obj_ext_mask;
- lv_area_t obj_area;
- lv_coord_t ext_size = obj->ext_draw_pad;
- lv_obj_get_coords(obj, &obj_area);
- obj_area.x1 -= ext_size;
- obj_area.y1 -= ext_size;
- obj_area.x2 += ext_size;
- obj_area.y2 += ext_size;
- union_ok = lv_area_intersect(&obj_ext_mask, mask_ori_p, &obj_area);
-
- /*Draw the parent and its children only if they ore on 'mask_parent'*/
- if(union_ok != false) {
-
- /* Redraw the object */
- obj->design_cb(obj, &obj_ext_mask, LV_DESIGN_DRAW_MAIN);
-
-#if MASK_AREA_DEBUG
- static lv_color_t debug_color = LV_COLOR_RED;
- lv_draw_fill(&obj_ext_mask, &obj_ext_mask, debug_color, LV_OPA_50);
- debug_color.full *= 17;
- debug_color.full += 0xA1;
-#endif
- /*Create a new 'obj_mask' without 'ext_size' because the children can't be visible there*/
- lv_obj_get_coords(obj, &obj_area);
- union_ok = lv_area_intersect(&obj_mask, mask_ori_p, &obj_area);
- if(union_ok != false) {
- lv_area_t mask_child; /*Mask from obj and its child*/
- lv_obj_t * child_p;
- lv_area_t child_area;
- LV_LL_READ_BACK(obj->child_ll, child_p)
- {
- lv_obj_get_coords(child_p, &child_area);
- ext_size = child_p->ext_draw_pad;
- child_area.x1 -= ext_size;
- child_area.y1 -= ext_size;
- child_area.x2 += ext_size;
- child_area.y2 += ext_size;
- /* Get the union (common parts) of original mask (from obj)
- * and its child */
- union_ok = lv_area_intersect(&mask_child, &obj_mask, &child_area);
-
- /*If the parent and the child has common area then refresh the child */
- if(union_ok) {
- /*Refresh the next children*/
- lv_refr_obj(child_p, &mask_child);
- }
- }
- }
-
- /* If all the children are redrawn make 'post draw' design */
- obj->design_cb(obj, &obj_ext_mask, LV_DESIGN_DRAW_POST);
- }
-}
-
-/**
- * Flush the content of the VDB
- */
-static void lv_refr_vdb_flush(void)
-{
- lv_disp_buf_t * vdb = lv_disp_get_buf(disp_refr);
-
- /*In double buffered mode wait until the other buffer is flushed before flushing the current
- * one*/
- if(lv_disp_is_double_buf(disp_refr)) {
- while(vdb->flushing)
- ;
- }
-
- vdb->flushing = 1;
-
- /*Flush the rendered content to the display*/
- lv_disp_t * disp = lv_refr_get_disp_refreshing();
- if(disp->driver.flush_cb) disp->driver.flush_cb(&disp->driver, &vdb->area, vdb->buf_act);
-
- if(vdb->buf1 && vdb->buf2) {
- if(vdb->buf_act == vdb->buf1)
- vdb->buf_act = vdb->buf2;
- else
- vdb->buf_act = vdb->buf1;
- }
-}
diff --git a/src/libs/lvgl/src/lv_core/lv_refr.h b/src/libs/lvgl/src/lv_core/lv_refr.h
deleted file mode 100644
index 8c0ed03e..00000000
--- a/src/libs/lvgl/src/lv_core/lv_refr.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * @file lv_refr.h
- *
- */
-
-#ifndef LV_REFR_H
-#define LV_REFR_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_obj.h"
-#include <stdbool.h>
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-
-/**********************
- * STATIC VARIABLES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Initialize the screen refresh subsystem
- */
-void lv_refr_init(void);
-
-/**
- * Redraw the invalidated areas now.
- * Normally the redrawing is periodically executed in `lv_task_handler` but a long blocking process
- * can prevent the call of `lv_task_handler`. In this case if the the GUI is updated in the process
- * (e.g. progress bar) this function can be called when the screen should be updated.
- * @param disp pointer to display to refresh. NULL to refresh all displays.
- */
-void lv_refr_now(lv_disp_t * disp);
-
-/**
- * Invalidate an area on display to redraw it
- * @param area_p pointer to area which should be invalidated (NULL: delete the invalidated areas)
- * @param disp pointer to display where the area should be invalidated (NULL can be used if there is
- * only one display)
- */
-void lv_inv_area(lv_disp_t * disp, const lv_area_t * area_p);
-
-/**
- * Get the display which is being refreshed
- * @return the display being refreshed
- */
-lv_disp_t * lv_refr_get_disp_refreshing(void);
-
-/**
- * Set the display which is being refreshed.
- * It shouldn1t be used directly by the user.
- * It can be used to trick the drawing functions about there is an active display.
- * @param the display being refreshed
- */
-void lv_refr_set_disp_refreshing(lv_disp_t * disp);
-
-/**
- * Called periodically to handle the refreshing
- * @param task pointer to the task itself
- */
-void lv_disp_refr_task(lv_task_t * task);
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_REFR_H*/
diff --git a/src/libs/lvgl/src/lv_core/lv_style.c b/src/libs/lvgl/src/lv_core/lv_style.c
deleted file mode 100644
index 718fa6b3..00000000
--- a/src/libs/lvgl/src/lv_core/lv_style.c
+++ /dev/null
@@ -1,353 +0,0 @@
-/**
- * @file lv_style.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_obj.h"
-#include "../lv_core/lv_debug.h"
-#include "../lv_misc/lv_mem.h"
-#include "../lv_misc/lv_anim.h"
-
-/*********************
- * DEFINES
- *********************/
-#define STYLE_MIX_MAX 256
-#define STYLE_MIX_SHIFT 8 /*log2(STYLE_MIX_MAX)*/
-
-#define VAL_PROP(v1, v2, r) v1 + (((v2 - v1) * r) >> STYLE_MIX_SHIFT)
-#define STYLE_ATTR_MIX(attr, r) \
- if(start->attr != end->attr) { \
- res->attr = VAL_PROP(start->attr, end->attr, r); \
- } else { \
- res->attr = start->attr; \
- }
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-#if LV_USE_ANIMATION
-static void style_animator(lv_style_anim_dsc_t * dsc, lv_anim_value_t val);
-static void style_animation_common_end_cb(lv_anim_t * a);
-#endif
-
-/**********************
- * STATIC VARIABLES
- **********************/
-lv_style_t lv_style_scr;
-lv_style_t lv_style_transp;
-lv_style_t lv_style_transp_fit;
-lv_style_t lv_style_transp_tight;
-lv_style_t lv_style_plain;
-lv_style_t lv_style_plain_color;
-lv_style_t lv_style_pretty;
-lv_style_t lv_style_pretty_color;
-lv_style_t lv_style_btn_rel;
-lv_style_t lv_style_btn_pr;
-lv_style_t lv_style_btn_tgl_rel;
-lv_style_t lv_style_btn_tgl_pr;
-lv_style_t lv_style_btn_ina;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Init the basic styles
- */
-void lv_style_init(void)
-{
- /* Not White/Black/Gray colors are created by HSV model with
- * HUE = 210*/
-
- /*Screen style*/
- lv_style_scr.glass = 0;
- lv_style_scr.body.opa = LV_OPA_COVER;
- lv_style_scr.body.main_color = LV_COLOR_WHITE;
- lv_style_scr.body.grad_color = LV_COLOR_WHITE;
- lv_style_scr.body.radius = 0;
- lv_style_scr.body.padding.left = 0;
- lv_style_scr.body.padding.right = 0;
- lv_style_scr.body.padding.top = 0;
- lv_style_scr.body.padding.bottom = 0;
- lv_style_scr.body.padding.inner = LV_DPI / 20;
-
- lv_style_scr.body.border.color = LV_COLOR_BLACK;
- lv_style_scr.body.border.opa = LV_OPA_COVER;
- lv_style_scr.body.border.width = 0;
- lv_style_scr.body.border.part = LV_BORDER_FULL;
-
- lv_style_scr.body.shadow.color = LV_COLOR_GRAY;
- lv_style_scr.body.shadow.type = LV_SHADOW_FULL;
- lv_style_scr.body.shadow.width = 0;
-
- lv_style_scr.text.opa = LV_OPA_COVER;
- lv_style_scr.text.color = lv_color_make(0x30, 0x30, 0x30);
- lv_style_scr.text.sel_color = lv_color_make(0x55, 0x96, 0xd8);
- lv_style_scr.text.font = LV_FONT_DEFAULT;
- lv_style_scr.text.letter_space = 0;
- lv_style_scr.text.line_space = 2;
-
- lv_style_scr.image.opa = LV_OPA_COVER;
- lv_style_scr.image.color = lv_color_make(0x20, 0x20, 0x20);
- lv_style_scr.image.intense = LV_OPA_TRANSP;
-
- lv_style_scr.line.opa = LV_OPA_COVER;
- lv_style_scr.line.color = lv_color_make(0x20, 0x20, 0x20);
- lv_style_scr.line.width = 2;
- lv_style_scr.line.rounded = 0;
-
-#if LV_USE_DEBUG
-#if LV_USE_ASSERT_STYLE
- lv_style_scr.debug_sentinel = LV_STYLE_DEGUG_SENTINEL_VALUE;
-#endif
-#endif
-
- /*Plain style (by default near the same as the screen style)*/
- lv_style_copy(&lv_style_plain, &lv_style_scr);
- lv_style_plain.body.padding.left = LV_DPI / 20;
- lv_style_plain.body.padding.right = LV_DPI / 20;
- lv_style_plain.body.padding.top = LV_DPI / 20;
- lv_style_plain.body.padding.bottom = LV_DPI / 20;
-
- /*Plain color style*/
- lv_style_copy(&lv_style_plain_color, &lv_style_plain);
- lv_style_plain_color.text.color = lv_color_make(0xf0, 0xf0, 0xf0);
- lv_style_plain_color.image.color = lv_color_make(0xf0, 0xf0, 0xf0);
- lv_style_plain_color.line.color = lv_color_make(0xf0, 0xf0, 0xf0);
- lv_style_plain_color.body.main_color = lv_color_make(0x55, 0x96, 0xd8);
- lv_style_plain_color.body.grad_color = lv_style_plain_color.body.main_color;
-
- /*Pretty style */
- lv_style_copy(&lv_style_pretty, &lv_style_plain);
- lv_style_pretty.text.color = lv_color_make(0x20, 0x20, 0x20);
- lv_style_pretty.image.color = lv_color_make(0x20, 0x20, 0x20);
- lv_style_pretty.line.color = lv_color_make(0x20, 0x20, 0x20);
- lv_style_pretty.body.main_color = LV_COLOR_WHITE;
- lv_style_pretty.body.grad_color = LV_COLOR_SILVER;
- lv_style_pretty.body.radius = LV_DPI / 15;
- lv_style_pretty.body.border.color = lv_color_make(0x40, 0x40, 0x40);
- lv_style_pretty.body.border.width = LV_DPI / 50 >= 1 ? LV_DPI / 50 : 1;
- lv_style_pretty.body.border.opa = LV_OPA_30;
-
- /*Pretty color style*/
- lv_style_copy(&lv_style_pretty_color, &lv_style_pretty);
- lv_style_pretty_color.text.color = lv_color_make(0xe0, 0xe0, 0xe0);
- lv_style_pretty_color.image.color = lv_color_make(0xe0, 0xe0, 0xe0);
- lv_style_pretty_color.line.color = lv_color_make(0xc0, 0xc0, 0xc0);
- lv_style_pretty_color.body.main_color = lv_color_make(0x6b, 0x9a, 0xc7);
- lv_style_pretty_color.body.grad_color = lv_color_make(0x2b, 0x59, 0x8b);
- lv_style_pretty_color.body.border.color = lv_color_make(0x15, 0x2c, 0x42);
-
- /*Transparent style*/
- lv_style_copy(&lv_style_transp, &lv_style_plain);
- lv_style_transp.glass = 1;
- lv_style_transp.body.border.width = 0;
- lv_style_transp.body.opa = LV_OPA_TRANSP;
-
- /*Transparent fitting size*/
- lv_style_copy(&lv_style_transp_fit, &lv_style_transp);
- lv_style_transp_fit.body.padding.left = 0;
- lv_style_transp_fit.body.padding.right = 0;
- lv_style_transp_fit.body.padding.top = 0;
- lv_style_transp_fit.body.padding.bottom = 0;
-
- /*Transparent tight style*/
- lv_style_copy(&lv_style_transp_tight, &lv_style_transp_fit);
- lv_style_transp_tight.body.padding.inner = 0;
-
- /*Button released style*/
- lv_style_copy(&lv_style_btn_rel, &lv_style_plain);
- lv_style_btn_rel.body.main_color = lv_color_make(0x76, 0xa2, 0xd0);
- lv_style_btn_rel.body.grad_color = lv_color_make(0x19, 0x3a, 0x5d);
- lv_style_btn_rel.body.radius = LV_DPI / 15;
- lv_style_btn_rel.body.padding.left = LV_DPI / 4;
- lv_style_btn_rel.body.padding.right = LV_DPI / 4;
- lv_style_btn_rel.body.padding.top = LV_DPI / 6;
- lv_style_btn_rel.body.padding.bottom = LV_DPI / 6;
- lv_style_btn_rel.body.padding.inner = LV_DPI / 10;
- lv_style_btn_rel.body.border.color = lv_color_make(0x0b, 0x19, 0x28);
- lv_style_btn_rel.body.border.width = LV_DPI / 50 >= 1 ? LV_DPI / 50 : 1;
- lv_style_btn_rel.body.border.opa = LV_OPA_70;
- lv_style_btn_rel.body.shadow.color = LV_COLOR_GRAY;
- lv_style_btn_rel.body.shadow.width = 0;
- lv_style_btn_rel.text.color = lv_color_make(0xff, 0xff, 0xff);
- lv_style_btn_rel.image.color = lv_color_make(0xff, 0xff, 0xff);
-
- /*Button pressed style*/
- lv_style_copy(&lv_style_btn_pr, &lv_style_btn_rel);
- lv_style_btn_pr.body.main_color = lv_color_make(0x33, 0x62, 0x94);
- lv_style_btn_pr.body.grad_color = lv_color_make(0x10, 0x26, 0x3c);
- lv_style_btn_pr.text.color = lv_color_make(0xa4, 0xb5, 0xc6);
- lv_style_btn_pr.image.color = lv_color_make(0xa4, 0xb5, 0xc6);
- lv_style_btn_pr.line.color = lv_color_make(0xa4, 0xb5, 0xc6);
-
- /*Button toggle released style*/
- lv_style_copy(&lv_style_btn_tgl_rel, &lv_style_btn_rel);
- lv_style_btn_tgl_rel.body.main_color = lv_color_make(0x0a, 0x11, 0x22);
- lv_style_btn_tgl_rel.body.grad_color = lv_color_make(0x37, 0x62, 0x90);
- lv_style_btn_tgl_rel.body.border.color = lv_color_make(0x01, 0x07, 0x0d);
- lv_style_btn_tgl_rel.text.color = lv_color_make(0xc8, 0xdd, 0xf4);
- lv_style_btn_tgl_rel.image.color = lv_color_make(0xc8, 0xdd, 0xf4);
- lv_style_btn_tgl_rel.line.color = lv_color_make(0xc8, 0xdd, 0xf4);
-
- /*Button toggle pressed style*/
- lv_style_copy(&lv_style_btn_tgl_pr, &lv_style_btn_tgl_rel);
- lv_style_btn_tgl_pr.body.main_color = lv_color_make(0x02, 0x14, 0x27);
- lv_style_btn_tgl_pr.body.grad_color = lv_color_make(0x2b, 0x4c, 0x70);
- lv_style_btn_tgl_pr.text.color = lv_color_make(0xa4, 0xb5, 0xc6);
- lv_style_btn_tgl_pr.image.color = lv_color_make(0xa4, 0xb5, 0xc6);
- lv_style_btn_tgl_pr.line.color = lv_color_make(0xa4, 0xb5, 0xc6);
-
- /*Button inactive style*/
- lv_style_copy(&lv_style_btn_ina, &lv_style_btn_rel);
- lv_style_btn_ina.body.main_color = lv_color_make(0xd8, 0xd8, 0xd8);
- lv_style_btn_ina.body.grad_color = lv_color_make(0xd8, 0xd8, 0xd8);
- lv_style_btn_ina.body.border.color = lv_color_make(0x90, 0x90, 0x90);
- lv_style_btn_ina.text.color = lv_color_make(0x70, 0x70, 0x70);
- lv_style_btn_ina.image.color = lv_color_make(0x70, 0x70, 0x70);
- lv_style_btn_ina.line.color = lv_color_make(0x70, 0x70, 0x70);
-}
-
-/**
- * Copy a style to an other
- * @param dest pointer to the destination style
- * @param src pointer to the source style
- */
-void lv_style_copy(lv_style_t * dest, const lv_style_t * src)
-{
- memcpy(dest, src, sizeof(lv_style_t));
-}
-
-/**
- * Mix two styles according to a given ratio
- * @param start start style
- * @param end end style
- * @param res store the result style here
- * @param ratio the ratio of mix [0..256]; 0: `start` style; 256: `end` style
- */
-void lv_style_mix(const lv_style_t * start, const lv_style_t * end, lv_style_t * res, uint16_t ratio)
-{
- STYLE_ATTR_MIX(body.opa, ratio);
- STYLE_ATTR_MIX(body.radius, ratio);
- STYLE_ATTR_MIX(body.border.width, ratio);
- STYLE_ATTR_MIX(body.border.opa, ratio);
- STYLE_ATTR_MIX(body.shadow.width, ratio);
- STYLE_ATTR_MIX(body.padding.left, ratio);
- STYLE_ATTR_MIX(body.padding.right, ratio);
- STYLE_ATTR_MIX(body.padding.top, ratio);
- STYLE_ATTR_MIX(body.padding.bottom, ratio);
- STYLE_ATTR_MIX(body.padding.inner, ratio);
- STYLE_ATTR_MIX(text.line_space, ratio);
- STYLE_ATTR_MIX(text.letter_space, ratio);
- STYLE_ATTR_MIX(text.opa, ratio);
- STYLE_ATTR_MIX(line.width, ratio);
- STYLE_ATTR_MIX(line.opa, ratio);
- STYLE_ATTR_MIX(image.intense, ratio);
- STYLE_ATTR_MIX(image.opa, ratio);
-
- lv_opa_t opa = ratio == STYLE_MIX_MAX ? LV_OPA_COVER : ratio;
-
- res->body.main_color = lv_color_mix(end->body.main_color, start->body.main_color, opa);
- res->body.grad_color = lv_color_mix(end->body.grad_color, start->body.grad_color, opa);
- res->body.border.color = lv_color_mix(end->body.border.color, start->body.border.color, opa);
- res->body.shadow.color = lv_color_mix(end->body.shadow.color, start->body.shadow.color, opa);
- res->text.color = lv_color_mix(end->text.color, start->text.color, opa);
- res->image.color = lv_color_mix(end->image.color, start->image.color, opa);
- res->line.color = lv_color_mix(end->line.color, start->line.color, opa);
-
- if(ratio < (STYLE_MIX_MAX >> 1)) {
- res->body.border.part = start->body.border.part;
- res->glass = start->glass;
- res->text.font = start->text.font;
- res->body.shadow.type = start->body.shadow.type;
- res->line.rounded = start->line.rounded;
- } else {
- res->body.border.part = end->body.border.part;
- res->glass = end->glass;
- res->text.font = end->text.font;
- res->body.shadow.type = end->body.shadow.type;
- res->line.rounded = end->line.rounded;
- }
-}
-
-#if LV_USE_ANIMATION
-
-void lv_style_anim_init(lv_anim_t * a)
-{
- lv_anim_init(a);
- a->start = 0;
- a->end = STYLE_MIX_MAX;
- a->exec_cb = (lv_anim_exec_xcb_t)style_animator;
- a->path_cb = lv_anim_path_linear;
- a->ready_cb = style_animation_common_end_cb;
-
- lv_style_anim_dsc_t * dsc;
- dsc = lv_mem_alloc(sizeof(lv_style_anim_dsc_t));
- LV_ASSERT_MEM(dsc);
- if(dsc == NULL) return;
- dsc->ready_cb = NULL;
- dsc->style_anim = NULL;
- lv_style_copy(&dsc->style_start, &lv_style_plain);
- lv_style_copy(&dsc->style_end, &lv_style_plain);
-
- a->var = (void *)dsc;
-}
-
-void lv_style_anim_set_styles(lv_anim_t * a, lv_style_t * to_anim, const lv_style_t * start, const lv_style_t * end)
-{
-
- lv_style_anim_dsc_t * dsc = a->var;
- dsc->style_anim = to_anim;
- memcpy(&dsc->style_start, start, sizeof(lv_style_t));
- memcpy(&dsc->style_end, end, sizeof(lv_style_t));
- memcpy(dsc->style_anim, start, sizeof(lv_style_t));
-}
-#endif
-/**********************
- * STATIC FUNCTIONS
- **********************/
-#if LV_USE_ANIMATION
-/**
- * Used by the style animations to set the values of a style according to start and end style.
- * @param dsc the 'animated variable' set by lv_style_anim_create()
- * @param val the current state of the animation between 0 and LV_ANIM_RESOLUTION
- */
-static void style_animator(lv_style_anim_dsc_t * dsc, lv_anim_value_t val)
-{
- const lv_style_t * start = &dsc->style_start;
- const lv_style_t * end = &dsc->style_end;
- lv_style_t * act = dsc->style_anim;
-
- lv_style_mix(start, end, act, val);
-
- lv_obj_report_style_mod(dsc->style_anim);
-}
-
-/**
- * Called when a style animation is ready
- * It called the user defined call back and free the allocated memories
- * @param a pointer to the animation
- */
-static void style_animation_common_end_cb(lv_anim_t * a)
-{
-
- (void)a; /*Unused*/
- lv_style_anim_dsc_t * dsc = a->var; /*To avoid casting*/
-
- if(dsc->ready_cb) dsc->ready_cb(a);
-
- lv_mem_free(dsc);
-}
-
-#endif
diff --git a/src/libs/lvgl/src/lv_core/lv_style.h b/src/libs/lvgl/src/lv_core/lv_style.h
deleted file mode 100644
index e002b2ea..00000000
--- a/src/libs/lvgl/src/lv_core/lv_style.h
+++ /dev/null
@@ -1,301 +0,0 @@
-/**
- * @file lv_style.h
- *
- */
-
-#ifndef LV_STYLE_H
-#define LV_STYLE_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#include <stdbool.h>
-#include "../lv_font/lv_font.h"
-#include "../lv_misc/lv_color.h"
-#include "../lv_misc/lv_area.h"
-#include "../lv_misc/lv_anim.h"
-
-/*********************
- * DEFINES
- *********************/
-#define LV_RADIUS_CIRCLE (LV_COORD_MAX) /**< A very big radius to always draw as circle*/
-#define LV_STYLE_DEGUG_SENTINEL_VALUE 0x12345678
-
-LV_EXPORT_CONST_INT(LV_RADIUS_CIRCLE);
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/*Border types (Use 'OR'ed values)*/
-enum {
- LV_BORDER_NONE = 0x00,
- LV_BORDER_BOTTOM = 0x01,
- LV_BORDER_TOP = 0x02,
- LV_BORDER_LEFT = 0x04,
- LV_BORDER_RIGHT = 0x08,
- LV_BORDER_FULL = 0x0F,
- LV_BORDER_INTERNAL = 0x10, /**< FOR matrix-like objects (e.g. Button matrix)*/
-};
-typedef uint8_t lv_border_part_t;
-
-/*Shadow types*/
-enum {
- LV_SHADOW_BOTTOM = 0, /**< Only draw bottom shadow */
- LV_SHADOW_FULL, /**< Draw shadow on all sides */
-};
-typedef uint8_t lv_shadow_type_t;
-
-/**
- * Objects in LittlevGL can be assigned a style - which holds information about
- * how the object should be drawn.
- *
- * This allows for easy customization without having to modify the object's design
- * function.
- */
-typedef struct
-{
- uint8_t glass : 1; /**< 1: Do not inherit this style*/
-
- /** Object background. */
- struct
- {
- lv_color_t main_color; /**< Object's main background color. */
- lv_color_t grad_color; /**< Second color. If not equal to `main_color` a gradient will be drawn for the background. */
- lv_coord_t radius; /**< Object's corner radius. You can use #LV_RADIUS_CIRCLE if you want to draw a circle. */
- lv_opa_t opa; /**< Object's opacity (0-255). */
-
- struct
- {
- lv_color_t color; /**< Border color */
- lv_coord_t width; /**< Border width */
- lv_border_part_t part; /**< Which borders to draw */
- lv_opa_t opa; /**< Border opacity. */
- } border;
-
-
- struct
- {
- lv_color_t color;
- lv_coord_t width;
- lv_shadow_type_t type; /**< Which parts of the shadow to draw */
- } shadow;
-
- struct
- {
- lv_coord_t top;
- lv_coord_t bottom;
- lv_coord_t left;
- lv_coord_t right;
- lv_coord_t inner;
- } padding;
- } body;
-
- /** Style for text drawn by this object. */
- struct
- {
- lv_color_t color; /**< Text color */
- lv_color_t sel_color; /**< Text selection background color. */
- const lv_font_t * font;
- lv_coord_t letter_space; /**< Space between letters */
- lv_coord_t line_space; /**< Space between lines (vertical) */
- lv_opa_t opa; /**< Text opacity */
- } text;
-
- /**< Style of images. */
- struct
- {
- lv_color_t color; /**< Color to recolor the image with */
- lv_opa_t intense; /**< Opacity of recoloring (0 means no recoloring) */
- lv_opa_t opa; /**< Opacity of whole image */
- } image;
-
- /**< Style of lines (not borders). */
- struct
- {
- lv_color_t color;
- lv_coord_t width;
- lv_opa_t opa;
- uint8_t rounded : 1; /**< 1: rounded line endings*/
- } line;
-
-#if LV_USE_DEBUG
-#if LV_USE_ASSERT_STYLE
- uint32_t debug_sentinel; /**<Should `LV_STYLE_DEGUG_SENTINEL_VALUE` to indicate that the style is valid*/
-#endif
-#endif
-
-} lv_style_t;
-
-#if LV_USE_ANIMATION
-/** Data structure for style animations. */
-typedef struct
-{
- lv_style_t style_start; /*Save not only pointers because can be same as 'style_anim' then it
- will be modified too*/
- lv_style_t style_end;
- lv_style_t * style_anim;
- lv_anim_ready_cb_t ready_cb;
-} lv_style_anim_dsc_t;
-#endif
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Init the basic styles
- */
-void lv_style_init(void);
-
-/**
- * Copy a style to an other
- * @param dest pointer to the destination style
- * @param src pointer to the source style
- */
-void lv_style_copy(lv_style_t * dest, const lv_style_t * src);
-
-/**
- * Mix two styles according to a given ratio
- * @param start start style
- * @param end end style
- * @param res store the result style here
- * @param ratio the ratio of mix [0..256]; 0: `start` style; 256: `end` style
- */
-void lv_style_mix(const lv_style_t * start, const lv_style_t * end, lv_style_t * res, uint16_t ratio);
-
-#if LV_USE_ANIMATION
-
-/**
- * Initialize an animation variable.
- * E.g.:
- * lv_anim_t a;
- * lv_style_anim__init(&a);
- * lv_style_anim_set_...(&a);
- * lv_style_anim_create(&a);
- * @param a pointer to an `lv_anim_t` variable to initialize
- */
-void lv_style_anim_init(lv_anim_t * a);
-
-/**
- *
- * @param a pointer to an initialized `lv_anim_t` variable
- * @param to_anim pointer to the style to animate
- * @param start pointer to a style to animate from (start value)
- * @param end pointer to a style to animate to (end value)
- */
-void lv_style_anim_set_styles(lv_anim_t * a, lv_style_t * to_anim, const lv_style_t * start, const lv_style_t * end);
-
-/**
- * Set the duration and delay of an animation
- * @param a pointer to an initialized `lv_anim_t` variable
- * @param duration duration of the animation in milliseconds
- * @param delay delay before the animation in milliseconds
- */
-static inline void lv_style_anim_set_time(lv_anim_t * a, uint16_t duration, int16_t delay)
-{
- lv_anim_set_time(a, duration, delay);
-}
-
-/**
- * Set a function call when the animation is ready
- * @param a pointer to an initialized `lv_anim_t` variable
- * @param ready_cb a function call when the animation is ready
- */
-static inline void lv_style_anim_set_ready_cb(lv_anim_t * a, lv_anim_ready_cb_t ready_cb)
-{
- lv_style_anim_dsc_t * dsc = (lv_style_anim_dsc_t *)a->var;
- dsc->ready_cb = ready_cb;
-}
-
-/**
- * Make the animation to play back to when the forward direction is ready
- * @param a pointer to an initialized `lv_anim_t` variable
- * @param wait_time time in milliseconds to wait before starting the back direction
- */
-static inline void lv_style_anim_set_playback(lv_anim_t * a, uint16_t wait_time)
-{
- lv_anim_set_playback(a, wait_time);
-}
-
-/**
- * Disable playback. (Disabled after `lv_anim_init()`)
- * @param a pointer to an initialized `lv_anim_t` variable
- */
-static inline void lv_style_anim_clear_playback(lv_anim_t * a)
-{
- lv_anim_clear_playback(a);
-}
-
-/**
- * Make the animation to start again when ready.
- * @param a pointer to an initialized `lv_anim_t` variable
- * @param wait_time time in milliseconds to wait before starting the animation again
- */
-static inline void lv_style_anim_set_repeat(lv_anim_t * a, uint16_t wait_time)
-{
- lv_anim_set_repeat(a, wait_time);
-}
-
-/**
- * Disable repeat. (Disabled after `lv_anim_init()`)
- * @param a pointer to an initialized `lv_anim_t` variable
- */
-static inline void lv_style_anim_clear_repeat(lv_anim_t * a)
-{
- lv_anim_clear_repeat(a);
-}
-
-/**
- * Create an animation
- * @param a an initialized 'anim_t' variable. Not required after call.
- */
-static inline void lv_style_anim_create(lv_anim_t * a)
-{
- lv_anim_create(a);
-}
-
-#endif
-
-/*************************
- * GLOBAL VARIABLES
- *************************/
-extern lv_style_t lv_style_scr;
-extern lv_style_t lv_style_transp;
-extern lv_style_t lv_style_transp_fit;
-extern lv_style_t lv_style_transp_tight;
-extern lv_style_t lv_style_plain;
-extern lv_style_t lv_style_plain_color;
-extern lv_style_t lv_style_pretty;
-extern lv_style_t lv_style_pretty_color;
-extern lv_style_t lv_style_btn_rel;
-extern lv_style_t lv_style_btn_pr;
-extern lv_style_t lv_style_btn_tgl_rel;
-extern lv_style_t lv_style_btn_tgl_pr;
-extern lv_style_t lv_style_btn_ina;
-
-/**********************
- * MACROS
- **********************/
-
-/**
- * Create and initialize a `static` style
- * Example:
- * LV_STYLE_CREATE(my_style, &lv_style_plain);
- * is equivalent to
- * static lv_style_t my_style;
- * lv_style_copy(my_style, &lv_style_plain);
- *
- * If the style to copy is `NULL` `lv_style_plain` will be used.
- */
-#define LV_STYLE_CREATE(name, copy_p) static lv_style_t name; lv_style_copy(&name, copy_p == NULL ? &lv_style_plain : copy_p);
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_STYLE_H*/
diff --git a/src/libs/lvgl/src/lv_draw/lv_draw.c b/src/libs/lvgl/src/lv_draw/lv_draw.c
deleted file mode 100644
index 45eaff65..00000000
--- a/src/libs/lvgl/src/lv_draw/lv_draw.c
+++ /dev/null
@@ -1,191 +0,0 @@
-/**
- * @file lv_draw.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-
-#include <stdio.h>
-#include <stdbool.h>
-#include "lv_draw.h"
-#include "../lv_core/lv_debug.h"
-#include "../lv_misc/lv_math.h"
-#include "../lv_misc/lv_log.h"
-#include "../lv_misc/lv_math.h"
-#include "../lv_misc/lv_mem.h"
-#include "../lv_misc/lv_gc.h"
-
-#if defined(LV_GC_INCLUDE)
-#include LV_GC_INCLUDE
-#endif /* LV_ENABLE_GC */
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static uint32_t draw_buf_size = 0;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Give a buffer with the given to use during drawing.
- * Be careful to not use the buffer while other processes are using it.
- * @param size the required size
- */
-void * lv_draw_get_buf(uint32_t size)
-{
- if(size <= draw_buf_size) return LV_GC_ROOT(_lv_draw_buf);
-
- LV_LOG_TRACE("lv_draw_get_buf: allocate");
-
- draw_buf_size = size;
-
- if(LV_GC_ROOT(_lv_draw_buf) == NULL) {
- LV_GC_ROOT(_lv_draw_buf) = lv_mem_alloc(size);
- LV_ASSERT_MEM(LV_GC_ROOT(_lv_draw_buf));
- return LV_GC_ROOT(_lv_draw_buf);
- }
-
- LV_GC_ROOT(_lv_draw_buf) = lv_mem_realloc(LV_GC_ROOT(_lv_draw_buf), size);
- LV_ASSERT_MEM(LV_GC_ROOT(_lv_draw_buf));
- return LV_GC_ROOT(_lv_draw_buf);
-}
-
-/**
- * Free the draw buffer
- */
-void lv_draw_free_buf(void)
-{
- if(LV_GC_ROOT(_lv_draw_buf)) {
- lv_mem_free(LV_GC_ROOT(_lv_draw_buf));
- LV_GC_ROOT(_lv_draw_buf) = NULL;
- draw_buf_size = 0;
- }
-}
-
-#if LV_ANTIALIAS
-
-/**
- * Get the opacity of a pixel based it's position in a line segment
- * @param seg segment length
- * @param px_id position of of a pixel which opacity should be get [0..seg-1]
- * @param base_opa the base opacity
- * @return the opacity of the given pixel
- */
-lv_opa_t lv_draw_aa_get_opa(lv_coord_t seg, lv_coord_t px_id, lv_opa_t base_opa)
-{
- /* How to calculate the opacity of pixels on the edges which makes the anti-aliasing?
- * For example we have a line like this (y = -0.5 * x):
- *
- * | _ _
- * * * |
- *
- * Anti-aliased pixels come to the '*' characters
- * Calculate what percentage of the pixels should be covered if real line (not rasterized) would
- * be drawn:
- * 1. A real line should start on (0;0) and end on (2;1)
- * 2. So the line intersection coordinates on the first pixel: (0;0) (1;0.5) -> 25% covered
- * pixel in average
- * 3. For the second pixel: (1;0.5) (2;1) -> 75% covered pixel in average
- * 4. The equation: (px_id * 2 + 1) / (segment_width * 2)
- * segment_width: the line segment which is being anti-aliased (was 2 in the
- * example) px_id: pixel ID from 0 to (segment_width - 1) result: [0..1] coverage of the pixel
- */
-
- /*Accelerate the common segment sizes to avoid division*/
- static const lv_opa_t seg1[1] = {128};
- static const lv_opa_t seg2[2] = {64, 192};
- static const lv_opa_t seg3[3] = {42, 128, 212};
- static const lv_opa_t seg4[4] = {32, 96, 159, 223};
- static const lv_opa_t seg5[5] = {26, 76, 128, 178, 230};
- static const lv_opa_t seg6[6] = {21, 64, 106, 148, 191, 234};
- static const lv_opa_t seg7[7] = {18, 55, 91, 128, 164, 200, 237};
- static const lv_opa_t seg8[8] = {16, 48, 80, 112, 143, 175, 207, 239};
-
- static const lv_opa_t * seg_map[] = {seg1, seg2, seg3, seg4, seg5, seg6, seg7, seg8};
-
- if(seg == 0)
- return LV_OPA_TRANSP;
- else if(seg < 8)
- return (uint32_t)((uint32_t)seg_map[seg - 1][px_id] * base_opa) >> 8;
- else {
- return ((px_id * 2 + 1) * base_opa) / (2 * seg);
- }
-}
-
-/**
- * Add a vertical anti-aliasing segment (pixels with decreasing opacity)
- * @param x start point x coordinate
- * @param y start point y coordinate
- * @param length length of segment (negative value to start from 0 opacity)
- * @param mask draw only in this area
- * @param color color of pixels
- * @param opa maximum opacity
- */
-void lv_draw_aa_ver_seg(lv_coord_t x, lv_coord_t y, lv_coord_t length, const lv_area_t * mask, lv_color_t color,
- lv_opa_t opa)
-{
- bool aa_inv = false;
- if(length < 0) {
- aa_inv = true;
- length = -length;
- }
-
- lv_coord_t i;
- for(i = 0; i < length; i++) {
- lv_opa_t px_opa = lv_draw_aa_get_opa(length, i, opa);
- if(aa_inv) px_opa = opa - px_opa;
- lv_draw_px(x, y + i, mask, color, px_opa);
- }
-}
-
-/**
- * Add a horizontal anti-aliasing segment (pixels with decreasing opacity)
- * @param x start point x coordinate
- * @param y start point y coordinate
- * @param length length of segment (negative value to start from 0 opacity)
- * @param mask draw only in this area
- * @param color color of pixels
- * @param opa maximum opacity
- */
-void lv_draw_aa_hor_seg(lv_coord_t x, lv_coord_t y, lv_coord_t length, const lv_area_t * mask, lv_color_t color,
- lv_opa_t opa)
-{
- bool aa_inv = false;
- if(length < 0) {
- aa_inv = true;
- length = -length;
- }
-
- lv_coord_t i;
- for(i = 0; i < length; i++) {
- lv_opa_t px_opa = lv_draw_aa_get_opa(length, i, opa);
- if(aa_inv) px_opa = opa - px_opa;
- lv_draw_px(x + i, y, mask, color, px_opa);
- }
-}
-
-#endif
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
diff --git a/src/libs/lvgl/src/lv_draw/lv_draw.h b/src/libs/lvgl/src/lv_draw/lv_draw.h
deleted file mode 100644
index a9fa58d9..00000000
--- a/src/libs/lvgl/src/lv_draw/lv_draw.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/**
- * @file lv_draw.h
- *
- */
-
-#ifndef LV_DRAW_H
-#define LV_DRAW_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#include "../lv_core/lv_style.h"
-#include "../lv_misc/lv_txt.h"
-#include "lv_img_decoder.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Give a buffer with the given to use during drawing.
- * Be careful to not use the buffer while other processes are using it.
- * @param size the required size
- */
-void * lv_draw_get_buf(uint32_t size);
-
-/**
- * Free the draw buffer
- */
-void lv_draw_free_buf(void);
-
-#if LV_ANTIALIAS
-
-/**
- * Get the opacity of a pixel based it's position in a line segment
- * @param seg segment length
- * @param px_id position of of a pixel which opacity should be get [0..seg-1]
- * @param base_opa the base opacity
- * @return the opacity of the given pixel
- */
-lv_opa_t lv_draw_aa_get_opa(lv_coord_t seg, lv_coord_t px_id, lv_opa_t base_opa);
-
-/**
- * Add a vertical anti-aliasing segment (pixels with decreasing opacity)
- * @param x start point x coordinate
- * @param y start point y coordinate
- * @param length length of segment (negative value to start from 0 opacity)
- * @param mask draw only in this area
- * @param color color of pixels
- * @param opa maximum opacity
- */
-void lv_draw_aa_ver_seg(lv_coord_t x, lv_coord_t y, lv_coord_t length, const lv_area_t * mask, lv_color_t color,
- lv_opa_t opa);
-
-/**
- * Add a horizontal anti-aliasing segment (pixels with decreasing opacity)
- * @param x start point x coordinate
- * @param y start point y coordinate
- * @param length length of segment (negative value to start from 0 opacity)
- * @param mask draw only in this area
- * @param color color of pixels
- * @param opa maximum opacity
- */
-void lv_draw_aa_hor_seg(lv_coord_t x, lv_coord_t y, lv_coord_t length, const lv_area_t * mask, lv_color_t color,
- lv_opa_t opa);
-#endif
-
-/**********************
- * GLOBAL VARIABLES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * POST INCLUDES
- *********************/
-#include "lv_draw_basic.h"
-#include "lv_draw_rect.h"
-#include "lv_draw_label.h"
-#include "lv_draw_img.h"
-#include "lv_draw_line.h"
-#include "lv_draw_triangle.h"
-#include "lv_draw_arc.h"
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_DRAW_H*/
diff --git a/src/libs/lvgl/src/lv_draw/lv_draw.mk b/src/libs/lvgl/src/lv_draw/lv_draw.mk
deleted file mode 100644
index c879ebe6..00000000
--- a/src/libs/lvgl/src/lv_draw/lv_draw.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-CSRCS += lv_draw_basic.c
-CSRCS += lv_draw.c
-CSRCS += lv_draw_rect.c
-CSRCS += lv_draw_label.c
-CSRCS += lv_draw_line.c
-CSRCS += lv_draw_img.c
-CSRCS += lv_draw_arc.c
-CSRCS += lv_draw_triangle.c
-CSRCS += lv_img_decoder.c
-CSRCS += lv_img_cache.c
-
-DEPPATH += --dep-path $(LVGL_DIR)/lvgl/src/lv_draw
-VPATH += :$(LVGL_DIR)/lvgl/src/lv_draw
-
-CFLAGS += "-I$(LVGL_DIR)lvgl/src/lv_draw"
diff --git a/src/libs/lvgl/src/lv_draw/lv_draw_arc.c b/src/libs/lvgl/src/lv_draw/lv_draw_arc.c
deleted file mode 100644
index 5b19a127..00000000
--- a/src/libs/lvgl/src/lv_draw/lv_draw_arc.c
+++ /dev/null
@@ -1,251 +0,0 @@
-/**
- * @file lv_draw_arc.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_draw_arc.h"
-#include "../lv_misc/lv_math.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static void ver_line(lv_coord_t x, lv_coord_t y, const lv_area_t * mask, lv_coord_t len, lv_color_t color,
- lv_opa_t opa);
-static void hor_line(lv_coord_t x, lv_coord_t y, const lv_area_t * mask, lv_coord_t len, lv_color_t color,
- lv_opa_t opa);
-static bool deg_test_norm(uint16_t deg, uint16_t start, uint16_t end);
-static bool deg_test_inv(uint16_t deg, uint16_t start, uint16_t end);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Draw an arc. (Can draw pie too with great thickness.)
- * @param center_x the x coordinate of the center of the arc
- * @param center_y the y coordinate of the center of the arc
- * @param radius the radius of the arc
- * @param mask the arc will be drawn only in this mask
- * @param start_angle the start angle of the arc (0 deg on the bottom, 90 deg on the right)
- * @param end_angle the end angle of the arc
- * @param style style of the arc (`body.thickness`, `body.main_color`, `body.opa` is used)
- * @param opa_scale scale down all opacities by the factor
- */
-void lv_draw_arc(lv_coord_t center_x, lv_coord_t center_y, uint16_t radius, const lv_area_t * mask,
- uint16_t start_angle, uint16_t end_angle, const lv_style_t * style, lv_opa_t opa_scale)
-{
- lv_coord_t thickness = style->line.width;
- if(thickness > radius) thickness = radius;
-
-#if LV_ANTIALIAS
- thickness--;
- radius--;
-#endif
-
- lv_coord_t r_out = radius;
- lv_coord_t r_in = r_out - thickness;
- int16_t deg_base;
- int16_t deg;
- lv_coord_t x_start[4];
- lv_coord_t x_end[4];
-
- lv_color_t color = style->line.color;
- lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->body.opa : (uint16_t)((uint16_t)style->body.opa * opa_scale) >> 8;
-
- bool (*deg_test)(uint16_t, uint16_t, uint16_t);
- if(start_angle <= end_angle)
- deg_test = deg_test_norm;
- else
- deg_test = deg_test_inv;
-
- int middle_r_out = r_out;
-#if !LV_ANTIALIAS
- thickness--;
- middle_r_out = r_out - 1;
-#endif
- if(deg_test(270, start_angle, end_angle))
- hor_line(center_x - middle_r_out, center_y, mask, thickness, color, opa); /*Left Middle*/
- if(deg_test(90, start_angle, end_angle))
- hor_line(center_x + r_in, center_y, mask, thickness, color, opa); /*Right Middle*/
- if(deg_test(180, start_angle, end_angle))
- ver_line(center_x, center_y - middle_r_out, mask, thickness, color, opa); /*Top Middle*/
- if(deg_test(0, start_angle, end_angle))
- ver_line(center_x, center_y + r_in, mask, thickness, color, opa); /*Bottom middle*/
-
- uint32_t r_out_sqr = r_out * r_out;
- uint32_t r_in_sqr = r_in * r_in;
-#if LV_ANTIALIAS
- uint32_t r_out_aa_sqr = (r_out + 1) * (r_out + 1);
- uint32_t r_in_aa_sqr = (r_in - 1) * (r_in - 1);
-#endif
- int16_t xi;
- int16_t yi;
- for(yi = -r_out; yi < 0; yi++) {
- x_start[0] = LV_COORD_MIN;
- x_start[1] = LV_COORD_MIN;
- x_start[2] = LV_COORD_MIN;
- x_start[3] = LV_COORD_MIN;
- x_end[0] = LV_COORD_MIN;
- x_end[1] = LV_COORD_MIN;
- x_end[2] = LV_COORD_MIN;
- x_end[3] = LV_COORD_MIN;
- int xe = 0;
- for(xi = -r_out; xi < 0; xi++) {
-
- uint32_t r_act_sqr = xi * xi + yi * yi;
-#if LV_ANTIALIAS
- if(r_act_sqr > r_out_aa_sqr) {
- continue;
- }
-#else
- if(r_act_sqr > r_out_sqr) continue;
-#endif
-
- deg_base = lv_atan2(xi, yi) - 180;
-
-#if LV_ANTIALIAS
- int opa2 = -1;
- if(r_act_sqr > r_out_sqr) {
- opa2 = LV_OPA_100 * (r_out + 1) - lv_sqrt(LV_OPA_100 * LV_OPA_100 * r_act_sqr);
- if(opa2 < LV_OPA_0)
- opa2 = LV_OPA_0;
- else if(opa2 > LV_OPA_100)
- opa2 = LV_OPA_100;
- } else if(r_act_sqr < r_in_sqr) {
- if(xe == 0) xe = xi;
- opa2 = lv_sqrt(LV_OPA_100 * LV_OPA_100 * r_act_sqr) - LV_OPA_100 * (r_in - 1);
- if(opa2 < LV_OPA_0)
- opa2 = LV_OPA_0;
- else if(opa2 > LV_OPA_100)
- opa2 = LV_OPA_100;
- if(r_act_sqr < r_in_aa_sqr)
- break; /*No need to continue the iteration in x once we found the inner edge of the
- arc*/
- }
- if(opa2 != -1) {
- if(deg_test(180 + deg_base, start_angle, end_angle)) {
- lv_draw_px(center_x + xi, center_y + yi, mask, color, opa2);
- }
- if(deg_test(360 - deg_base, start_angle, end_angle)) {
- lv_draw_px(center_x + xi, center_y - yi, mask, color, opa2);
- }
- if(deg_test(180 - deg_base, start_angle, end_angle)) {
- lv_draw_px(center_x - xi, center_y + yi, mask, color, opa2);
- }
- if(deg_test(deg_base, start_angle, end_angle)) {
- lv_draw_px(center_x - xi, center_y - yi, mask, color, opa2);
- }
- continue;
- }
-#endif
-
- deg = 180 + deg_base;
- if(deg_test(deg, start_angle, end_angle)) {
- if(x_start[0] == LV_COORD_MIN) x_start[0] = xi;
- } else if(x_start[0] != LV_COORD_MIN && x_end[0] == LV_COORD_MIN) {
- x_end[0] = xi - 1;
- }
-
- deg = 360 - deg_base;
- if(deg_test(deg, start_angle, end_angle)) {
- if(x_start[1] == LV_COORD_MIN) x_start[1] = xi;
- } else if(x_start[1] != LV_COORD_MIN && x_end[1] == LV_COORD_MIN) {
- x_end[1] = xi - 1;
- }
-
- deg = 180 - deg_base;
- if(deg_test(deg, start_angle, end_angle)) {
- if(x_start[2] == LV_COORD_MIN) x_start[2] = xi;
- } else if(x_start[2] != LV_COORD_MIN && x_end[2] == LV_COORD_MIN) {
- x_end[2] = xi - 1;
- }
-
- deg = deg_base;
- if(deg_test(deg, start_angle, end_angle)) {
- if(x_start[3] == LV_COORD_MIN) x_start[3] = xi;
- } else if(x_start[3] != LV_COORD_MIN && x_end[3] == LV_COORD_MIN) {
- x_end[3] = xi - 1;
- }
-
- if(r_act_sqr < r_in_sqr) {
- xe = xi;
- break; /*No need to continue the iteration in x once we found the inner edge of the
- arc*/
- }
- }
-
- if(x_start[0] != LV_COORD_MIN) {
- if(x_end[0] == LV_COORD_MIN) x_end[0] = xe - 1;
- hor_line(center_x + x_start[0], center_y + yi, mask, x_end[0] - x_start[0], color, opa);
- }
-
- if(x_start[1] != LV_COORD_MIN) {
- if(x_end[1] == LV_COORD_MIN) x_end[1] = xe - 1;
- hor_line(center_x + x_start[1], center_y - yi, mask, x_end[1] - x_start[1], color, opa);
- }
-
- if(x_start[2] != LV_COORD_MIN) {
- if(x_end[2] == LV_COORD_MIN) x_end[2] = xe - 1;
- hor_line(center_x - x_end[2], center_y + yi, mask, LV_MATH_ABS(x_end[2] - x_start[2]), color, opa);
- }
-
- if(x_start[3] != LV_COORD_MIN) {
- if(x_end[3] == LV_COORD_MIN) x_end[3] = xe - 1;
- hor_line(center_x - x_end[3], center_y - yi, mask, LV_MATH_ABS(x_end[3] - x_start[3]), color, opa);
- }
- }
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-static void ver_line(lv_coord_t x, lv_coord_t y, const lv_area_t * mask, lv_coord_t len, lv_color_t color, lv_opa_t opa)
-{
- lv_area_t area;
- lv_area_set(&area, x, y, x, y + len);
-
- lv_draw_fill(&area, mask, color, opa);
-}
-
-static void hor_line(lv_coord_t x, lv_coord_t y, const lv_area_t * mask, lv_coord_t len, lv_color_t color, lv_opa_t opa)
-{
- lv_area_t area;
- lv_area_set(&area, x, y, x + len, y);
-
- lv_draw_fill(&area, mask, color, opa);
-}
-
-static bool deg_test_norm(uint16_t deg, uint16_t start, uint16_t end)
-{
- if(deg >= start && deg <= end)
- return true;
- else
- return false;
-}
-
-static bool deg_test_inv(uint16_t deg, uint16_t start, uint16_t end)
-{
- if(deg >= start || deg <= end) {
- return true;
- } else
- return false;
-}
diff --git a/src/libs/lvgl/src/lv_draw/lv_draw_arc.h b/src/libs/lvgl/src/lv_draw/lv_draw_arc.h
deleted file mode 100644
index 98d0f0bc..00000000
--- a/src/libs/lvgl/src/lv_draw/lv_draw_arc.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * @file lv_draw_arc.h
- *
- */
-
-#ifndef LV_DRAW_ARC_H
-#define LV_DRAW_ARC_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_draw.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Draw an arc. (Can draw pie too with great thickness.)
- * @param center_x the x coordinate of the center of the arc
- * @param center_y the y coordinate of the center of the arc
- * @param radius the radius of the arc
- * @param mask the arc will be drawn only in this mask
- * @param start_angle the start angle of the arc (0 deg on the bottom, 90 deg on the right)
- * @param end_angle the end angle of the arc
- * @param style style of the arc (`body.thickness`, `body.main_color`, `body.opa` is used)
- * @param opa_scale scale down all opacities by the factor
- */
-void lv_draw_arc(lv_coord_t center_x, lv_coord_t center_y, uint16_t radius, const lv_area_t * mask,
- uint16_t start_angle, uint16_t end_angle, const lv_style_t * style, lv_opa_t opa_scale);
-
-/**********************
- * MACROS
- **********************/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_DRAW_ARC*/
diff --git a/src/libs/lvgl/src/lv_draw/lv_draw_basic.c b/src/libs/lvgl/src/lv_draw/lv_draw_basic.c
deleted file mode 100644
index 462e1522..00000000
--- a/src/libs/lvgl/src/lv_draw/lv_draw_basic.c
+++ /dev/null
@@ -1,783 +0,0 @@
-/**
- * @file lv_draw_basic.c
- *
- */
-
-#include "lv_draw_basic.h"
-
-#include <stdbool.h>
-#include <stdint.h>
-#include <string.h>
-
-#include "../lv_core/lv_refr.h"
-#include "../lv_hal/lv_hal.h"
-#include "../lv_font/lv_font.h"
-#include "../lv_misc/lv_area.h"
-#include "../lv_misc/lv_color.h"
-#include "../lv_misc/lv_log.h"
-
-#include <stddef.h>
-#include "lv_draw.h"
-
-/*********************
- * INCLUDES
- *********************/
-
-/*********************
- * DEFINES
- *********************/
-
-/*Always fill < 50 px with 'sw_color_fill' because of the hw. init overhead*/
-#define VFILL_HW_ACC_SIZE_LIMIT 50
-
-#ifndef LV_ATTRIBUTE_MEM_ALIGN
-#define LV_ATTRIBUTE_MEM_ALIGN
-#endif
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static void sw_mem_blend(lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa);
-static void sw_color_fill(lv_color_t * mem, lv_coord_t mem_width, const lv_area_t * fill_area, lv_color_t color,
- lv_opa_t opa);
-
-#if LV_COLOR_DEPTH == 32 && LV_COLOR_SCREEN_TRANSP
-static inline lv_color_t color_mix_2_alpha(lv_color_t bg_color, lv_opa_t bg_opa, lv_color_t fg_color, lv_opa_t fg_opa);
-#endif
-
-/**********************
- * STATIC VARIABLES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Put a pixel in the Virtual Display Buffer
- * @param x pixel x coordinate
- * @param y pixel y coordinate
- * @param mask_p fill only on this mask (truncated to VDB area)
- * @param color pixel color
- * @param opa opacity of the area (0..255)
- */
-void lv_draw_px(lv_coord_t x, lv_coord_t y, const lv_area_t * mask_p, lv_color_t color, lv_opa_t opa)
-{
-
- if(opa < LV_OPA_MIN) return;
- if(opa > LV_OPA_MAX) opa = LV_OPA_COVER;
-
- /*Pixel out of the mask*/
- if(x < mask_p->x1 || x > mask_p->x2 || y < mask_p->y1 || y > mask_p->y2) {
- return;
- }
-
- lv_disp_t * disp = lv_refr_get_disp_refreshing();
- lv_disp_buf_t * vdb = lv_disp_get_buf(disp);
- uint32_t vdb_width = lv_area_get_width(&vdb->area);
-
- /*Make the coordinates relative to VDB*/
- x -= vdb->area.x1;
- y -= vdb->area.y1;
-
- if(disp->driver.set_px_cb) {
- disp->driver.set_px_cb(&disp->driver, (uint8_t *)vdb->buf_act, vdb_width, x, y, color, opa);
- } else {
- bool scr_transp = false;
-#if LV_COLOR_DEPTH == 32 && LV_COLOR_SCREEN_TRANSP
- scr_transp = disp->driver.screen_transp;
-#endif
-
- lv_color_t * vdb_px_p = vdb->buf_act;
- vdb_px_p += y * vdb_width + x;
-
- if(scr_transp == false) {
- if(opa == LV_OPA_COVER) {
- *vdb_px_p = color;
- } else {
- *vdb_px_p = lv_color_mix(color, *vdb_px_p, opa);
- }
- } else {
-#if LV_COLOR_DEPTH == 32 && LV_COLOR_SCREEN_TRANSP
- *vdb_px_p = color_mix_2_alpha(*vdb_px_p, (*vdb_px_p).ch.alpha, color, opa);
-#endif
- }
- }
-}
-
-/**
- * Fill an area in the Virtual Display Buffer
- * @param cords_p coordinates of the area to fill
- * @param mask_p fill only o this mask (truncated to VDB area)
- * @param color fill color
- * @param opa opacity of the area (0..255)
- */
-void lv_draw_fill(const lv_area_t * cords_p, const lv_area_t * mask_p, lv_color_t color, lv_opa_t opa)
-{
- if(opa < LV_OPA_MIN) return;
- if(opa > LV_OPA_MAX) opa = LV_OPA_COVER;
-
- lv_area_t res_a;
- bool union_ok;
-
- /*Get the union of cord and mask*/
- /* The mask is already truncated to the vdb size
- * in 'lv_refr_area_with_vdb' function */
- union_ok = lv_area_intersect(&res_a, cords_p, mask_p);
-
- /*If there are common part of the three area then draw to the vdb*/
- if(union_ok == false) {
- return;
- }
-
- lv_disp_t * disp = lv_refr_get_disp_refreshing();
- lv_disp_buf_t * vdb = lv_disp_get_buf(disp);
-
- lv_area_t vdb_rel_a; /*Stores relative coordinates on vdb*/
- vdb_rel_a.x1 = res_a.x1 - vdb->area.x1;
- vdb_rel_a.y1 = res_a.y1 - vdb->area.y1;
- vdb_rel_a.x2 = res_a.x2 - vdb->area.x1;
- vdb_rel_a.y2 = res_a.y2 - vdb->area.y1;
-
- lv_color_t * vdb_buf_tmp = vdb->buf_act;
- uint32_t vdb_width = lv_area_get_width(&vdb->area);
- /*Move the vdb_tmp to the first row*/
- vdb_buf_tmp += vdb_width * vdb_rel_a.y1;
-
-#if LV_USE_GPU
- static LV_ATTRIBUTE_MEM_ALIGN lv_color_t color_array_tmp[LV_HOR_RES_MAX]; /*Used by 'lv_disp_mem_blend'*/
- static lv_coord_t last_width = -1;
-
- lv_coord_t w = lv_area_get_width(&vdb_rel_a);
- /*Don't use hw. acc. for every small fill (because of the init overhead)*/
- if(w < VFILL_HW_ACC_SIZE_LIMIT) {
- sw_color_fill(vdb->buf_act, vdb_width, &vdb_rel_a, color, opa);
- }
- /*Not opaque fill*/
- else if(opa == LV_OPA_COVER) {
- /*Use hw fill if present*/
- if(disp->driver.gpu_fill_cb) {
- disp->driver.gpu_fill_cb(&disp->driver, vdb->buf_act, vdb_width, &vdb_rel_a, color);
- }
- /*Use hw blend if present and the area is not too small*/
- else if(lv_area_get_height(&vdb_rel_a) > VFILL_HW_ACC_SIZE_LIMIT && disp->driver.gpu_blend_cb) {
- /*Fill a one line sized buffer with a color and blend this later*/
- if(color_array_tmp[0].full != color.full || last_width != w) {
- uint16_t i;
- for(i = 0; i < w; i++) {
- color_array_tmp[i].full = color.full;
- }
- last_width = w;
- }
-
- /*Blend the filled line to every line VDB line-by-line*/
- lv_coord_t row;
- for(row = vdb_rel_a.y1; row <= vdb_rel_a.y2; row++) {
- disp->driver.gpu_blend_cb(&disp->driver, &vdb_buf_tmp[vdb_rel_a.x1], color_array_tmp, w, opa);
- vdb_buf_tmp += vdb_width;
- }
-
- }
- /*Else use sw fill if no better option*/
- else {
- sw_color_fill(vdb->buf_act, vdb_width, &vdb_rel_a, color, opa);
- }
-
- }
- /*Fill with opacity*/
- else {
- /*Use hw blend if present*/
- if(disp->driver.gpu_blend_cb) {
- if(color_array_tmp[0].full != color.full || last_width != w) {
- uint16_t i;
- for(i = 0; i < w; i++) {
- color_array_tmp[i].full = color.full;
- }
-
- last_width = w;
- }
- lv_coord_t row;
- for(row = vdb_rel_a.y1; row <= vdb_rel_a.y2; row++) {
- disp->driver.gpu_blend_cb(&disp->driver, &vdb_buf_tmp[vdb_rel_a.x1], color_array_tmp, w, opa);
- vdb_buf_tmp += vdb_width;
- }
-
- }
- /*Use sw fill with opa if no better option*/
- else {
- sw_color_fill(vdb->buf_act, vdb_width, &vdb_rel_a, color, opa);
- }
- }
-#else
- sw_color_fill(vdb->buf_act, vdb_width, &vdb_rel_a, color, opa);
-#endif
-}
-
-/**
- * Draw a letter in the Virtual Display Buffer
- * @param pos_p left-top coordinate of the latter
- * @param mask_p the letter will be drawn only on this area (truncated to VDB area)
- * @param font_p pointer to font
- * @param letter a letter to draw
- * @param color color of letter
- * @param opa opacity of letter (0..255)
- */
-void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv_font_t * font_p, uint32_t letter,
- lv_color_t color, lv_opa_t opa)
-{
- /*clang-format off*/
- const uint8_t bpp1_opa_table[2] = {0, 255}; /*Opacity mapping with bpp = 1 (Just for compatibility)*/
- const uint8_t bpp2_opa_table[4] = {0, 85, 170, 255}; /*Opacity mapping with bpp = 2*/
- const uint8_t bpp4_opa_table[16] = {0, 17, 34, 51, /*Opacity mapping with bpp = 4*/
- 68, 85, 102, 119, 136, 153, 170, 187, 204, 221, 238, 255};
- /*clang-format on*/
-
- if(opa < LV_OPA_MIN) return;
- if(opa > LV_OPA_MAX) opa = LV_OPA_COVER;
-
- if(font_p == NULL) {
- LV_LOG_WARN("Font: character's bitmap not found");
- return;
- }
-
- lv_font_glyph_dsc_t g;
- bool g_ret = lv_font_get_glyph_dsc(font_p, &g, letter, '\0');
- if(g_ret == false) return;
-
-
- lv_coord_t pos_x = pos_p->x + g.ofs_x;
- lv_coord_t pos_y = pos_p->y + (font_p->line_height - font_p->base_line) - g.box_h - g.ofs_y;
-
- const uint8_t * bpp_opa_table;
- uint8_t bitmask_init;
- uint8_t bitmask;
-
- /*bpp = 3 should be converted to bpp = 4 in lv_font_get_glyph_bitmap */
- if(g.bpp == 3) g.bpp = 4;
-
- switch(g.bpp) {
- case 1:
- bpp_opa_table = bpp1_opa_table;
- bitmask_init = 0x80;
- break;
- case 2:
- bpp_opa_table = bpp2_opa_table;
- bitmask_init = 0xC0;
- break;
- case 4:
- bpp_opa_table = bpp4_opa_table;
- bitmask_init = 0xF0;
- break;
- case 8:
- bpp_opa_table = NULL;
- bitmask_init = 0xFF;
- break; /*No opa table, pixel value will be used directly*/
- default: return; /*Invalid bpp. Can't render the letter*/
- }
-
- const uint8_t * map_p = lv_font_get_glyph_bitmap(font_p, letter);
-
- if(map_p == NULL) return;
-
- /*If the letter is completely out of mask don't draw it */
- if(pos_x + g.box_w < mask_p->x1 || pos_x > mask_p->x2 || pos_y + g.box_h < mask_p->y1 || pos_y > mask_p->y2) return;
-
- lv_disp_t * disp = lv_refr_get_disp_refreshing();
- lv_disp_buf_t * vdb = lv_disp_get_buf(disp);
-
- lv_coord_t vdb_width = lv_area_get_width(&vdb->area);
- lv_color_t * vdb_buf_tmp = vdb->buf_act;
- lv_coord_t col, row;
-
- uint8_t width_byte_scr = g.box_w >> 3; /*Width in bytes (on the screen finally) (e.g. w = 11 -> 2 bytes wide)*/
- if(g.box_w & 0x7) width_byte_scr++;
- uint16_t width_bit = g.box_w * g.bpp; /*Letter width in bits*/
-
- bool subpx = font_p->subpx == LV_FONT_SUBPX_NONE ? false : true;
-
- /* Calculate the col/row start/end on the map*/
- lv_coord_t col_start;
- lv_coord_t col_end;
- lv_coord_t row_start;
- lv_coord_t row_end;
-
- if(subpx == false) {
- col_start = pos_x >= mask_p->x1 ? 0 : mask_p->x1 - pos_x;
- col_end = pos_x + g.box_w <= mask_p->x2 ? g.box_w : mask_p->x2 - pos_x + 1;
- row_start = pos_y >= mask_p->y1 ? 0 : mask_p->y1 - pos_y;
- row_end = pos_y + g.box_h <= mask_p->y2 ? g.box_h : mask_p->y2 - pos_y + 1;
- } else {
- col_start = pos_x >= mask_p->x1 ? 0 : (mask_p->x1 - pos_x) * 3;
- col_end = pos_x + g.box_w / 3 <= mask_p->x2 ? g.box_w : (mask_p->x2 - pos_x + 1) * 3;
- row_start = pos_y >= mask_p->y1 ? 0 : mask_p->y1 - pos_y;
- row_end = pos_y + g.box_h <= mask_p->y2 ? g.box_h : mask_p->y2 - pos_y + 1;
- }
-
- /*Set a pointer on VDB to the first pixel of the letter*/
- vdb_buf_tmp += ((pos_y - vdb->area.y1) * vdb_width) + pos_x - vdb->area.x1;
-
- /*If the letter is partially out of mask the move there on VDB*/
- if(subpx) vdb_buf_tmp += (row_start * vdb_width) + col_start / 3;
- else vdb_buf_tmp += (row_start * vdb_width) + col_start;
-
- /*Move on the map too*/
- uint32_t bit_ofs = (row_start * width_bit) + (col_start * g.bpp);
- map_p += bit_ofs >> 3;
-
- uint8_t letter_px;
- lv_opa_t px_opa = 0;
- uint16_t col_bit;
- col_bit = bit_ofs & 0x7; /* "& 0x7" equals to "% 8" just faster */
-
- bool scr_transp = false;
-#if LV_COLOR_DEPTH == 32 && LV_COLOR_SCREEN_TRANSP
- scr_transp = disp->driver.screen_transp;
-#endif
-
- uint8_t font_rgb[3];
- uint8_t txt_rgb[3] = {LV_COLOR_GET_R(color), LV_COLOR_GET_G(color), LV_COLOR_GET_B(color)};
-
- for(row = row_start; row < row_end; row++) {
- bitmask = bitmask_init >> col_bit;
- uint8_t sub_px_cnt = 0;
- for(col = col_start; col < col_end; col++) {
- letter_px = (*map_p & bitmask) >> (8 - col_bit - g.bpp);
-
- /*subpx == 0*/
- if(subpx == false) {
- if(letter_px != 0) {
- if(opa == LV_OPA_COVER) {
- px_opa = g.bpp == 8 ? letter_px : bpp_opa_table[letter_px];
- } else {
- px_opa = g.bpp == 8 ? (uint16_t)((uint16_t)letter_px * opa) >> 8
- : (uint16_t)((uint16_t)bpp_opa_table[letter_px] * opa) >> 8;
- }
-
- if(disp->driver.set_px_cb) {
- disp->driver.set_px_cb(&disp->driver, (uint8_t *)vdb->buf_act, vdb_width,
- (col + pos_x) - vdb->area.x1, (row + pos_y) - vdb->area.y1, color, px_opa);
- } else if(vdb_buf_tmp->full != color.full) {
- if(px_opa > LV_OPA_MAX) {
- *vdb_buf_tmp = color;
- } else if(px_opa > LV_OPA_MIN) {
- if(scr_transp == false) {
- *vdb_buf_tmp = lv_color_mix(color, *vdb_buf_tmp, px_opa);
- } else {
-#if LV_COLOR_DEPTH == 32 && LV_COLOR_SCREEN_TRANSP
- *vdb_buf_tmp = color_mix_2_alpha(*vdb_buf_tmp, (*vdb_buf_tmp).ch.alpha, color, px_opa);
-#endif
- }
- }
- }
- }
- vdb_buf_tmp++;
- }
- /*Handle subpx drawing*/
- else {
- if(letter_px != 0) {
- if(opa == LV_OPA_COVER) {
- px_opa = g.bpp == 8 ? letter_px : bpp_opa_table[letter_px];
- } else {
- px_opa = g.bpp == 8 ? (uint16_t)((uint16_t)letter_px * opa) >> 8
- : (uint16_t)((uint16_t)bpp_opa_table[letter_px] * opa) >> 8;
- }
-
- font_rgb[sub_px_cnt] = px_opa;
- } else {
- font_rgb[sub_px_cnt] = 0;
- }
- sub_px_cnt ++;
-
- if(sub_px_cnt == 3) {
- lv_color_t res_color;
-
- if(font_rgb[0] == 0 && font_rgb[1] == 0 && font_rgb[2] == 0) {
- res_color = *vdb_buf_tmp;
- } else {
-
- uint8_t bg_rgb[3] = {LV_COLOR_GET_R(*vdb_buf_tmp), LV_COLOR_GET_G(*vdb_buf_tmp), LV_COLOR_GET_B(*vdb_buf_tmp)};
-
-#if LV_FONT_SUBPX_BGR
- LV_COLOR_SET_B(res_color, (uint16_t)((uint16_t)txt_rgb[0] * font_rgb[0] + (bg_rgb[2] * (255 - font_rgb[0]))) >> 8);
- LV_COLOR_SET_R(res_color, (uint16_t)((uint16_t)txt_rgb[2] * font_rgb[2] + (bg_rgb[0] * (255 - font_rgb[2]))) >> 8);
-#else
- LV_COLOR_SET_R(res_color, (uint16_t)((uint16_t)txt_rgb[0] * font_rgb[0] + (bg_rgb[0] * (255 - font_rgb[0]))) >> 8);
- LV_COLOR_SET_B(res_color, (uint16_t)((uint16_t)txt_rgb[2] * font_rgb[2] + (bg_rgb[2] * (255 - font_rgb[2]))) >> 8);
-#endif
- LV_COLOR_SET_G(res_color, (uint16_t)((uint16_t)txt_rgb[1] * font_rgb[1] + (bg_rgb[1] * (255 - font_rgb[1]))) >> 8);
- }
- if(scr_transp == false) {
- vdb_buf_tmp->full = res_color.full;
-#if LV_COLOR_DEPTH == 32 && LV_COLOR_SCREEN_TRANSP
- } else {
- *vdb_buf_tmp = color_mix_2_alpha(*vdb_buf_tmp, (*vdb_buf_tmp).ch.alpha, color, px_opa);
-#endif
- }
- sub_px_cnt = 0;
- vdb_buf_tmp++;
- }
- }
-
-
- if(col_bit < 8 - g.bpp) {
- col_bit += g.bpp;
- bitmask = bitmask >> g.bpp;
- } else {
- col_bit = 0;
- bitmask = bitmask_init;
- map_p++;
- }
- }
-
- col_bit += ((g.box_w - col_end) + col_start) * g.bpp;
-
- map_p += (col_bit >> 3);
- col_bit = col_bit & 0x7;
-
- /*Next row in VDB*/
- if(subpx) vdb_buf_tmp += vdb_width - (col_end - col_start) / 3;
- else vdb_buf_tmp += vdb_width - (col_end - col_start);
- }
-}
-
-/**
- * Draw a color map to the display (image)
- * @param cords_p coordinates the color map
- * @param mask_p the map will drawn only on this area (truncated to VDB area)
- * @param map_p pointer to a lv_color_t array
- * @param opa opacity of the map
- * @param chroma_keyed true: enable transparency of LV_IMG_LV_COLOR_TRANSP color pixels
- * @param alpha_byte true: extra alpha byte is inserted for every pixel
- * @param recolor mix the pixels with this color
- * @param recolor_opa the intense of recoloring
- */
-void lv_draw_map(const lv_area_t * cords_p, const lv_area_t * mask_p, const uint8_t * map_p, lv_opa_t opa,
- bool chroma_key, bool alpha_byte, lv_color_t recolor, lv_opa_t recolor_opa)
-{
-
- if(opa < LV_OPA_MIN) return;
- if(opa > LV_OPA_MAX) opa = LV_OPA_COVER;
-
- lv_area_t masked_a;
- bool union_ok;
-
- /*Get the union of map size and mask*/
- /* The mask is already truncated to the vdb size
- * in 'lv_refr_area_with_vdb' function */
- union_ok = lv_area_intersect(&masked_a, cords_p, mask_p);
-
- /*If there are common part of the three area then draw to the vdb*/
- if(union_ok == false) return;
-
- /*The pixel size in byte is different if an alpha byte is added too*/
- uint8_t px_size_byte = alpha_byte ? LV_IMG_PX_SIZE_ALPHA_BYTE : sizeof(lv_color_t);
-
- /*If the map starts OUT of the masked area then calc. the first pixel*/
- lv_coord_t map_width = lv_area_get_width(cords_p);
- if(cords_p->y1 < masked_a.y1) {
- map_p += (uint32_t)map_width * ((masked_a.y1 - cords_p->y1)) * px_size_byte;
- }
- if(cords_p->x1 < masked_a.x1) {
- map_p += (masked_a.x1 - cords_p->x1) * px_size_byte;
- }
-
- lv_disp_t * disp = lv_refr_get_disp_refreshing();
- lv_disp_buf_t * vdb = lv_disp_get_buf(disp);
-
- /*Stores coordinates relative to the current VDB*/
- masked_a.x1 = masked_a.x1 - vdb->area.x1;
- masked_a.y1 = masked_a.y1 - vdb->area.y1;
- masked_a.x2 = masked_a.x2 - vdb->area.x1;
- masked_a.y2 = masked_a.y2 - vdb->area.y1;
-
- lv_coord_t vdb_width = lv_area_get_width(&vdb->area);
- lv_color_t * vdb_buf_tmp = vdb->buf_act;
- vdb_buf_tmp += (uint32_t)vdb_width * masked_a.y1; /*Move to the first row*/
- vdb_buf_tmp += (uint32_t)masked_a.x1; /*Move to the first col*/
-
- lv_coord_t row;
- lv_coord_t map_useful_w = lv_area_get_width(&masked_a);
-
- bool scr_transp = false;
-#if LV_COLOR_DEPTH == 32 && LV_COLOR_SCREEN_TRANSP
- scr_transp = disp->driver.screen_transp;
-#endif
-
- /*The simplest case just copy the pixels into the VDB*/
- if(chroma_key == false && alpha_byte == false && opa == LV_OPA_COVER && recolor_opa == LV_OPA_TRANSP) {
-
- /*Use the custom VDB write function is exists*/
- if(disp->driver.set_px_cb) {
- lv_coord_t col;
- for(row = masked_a.y1; row <= masked_a.y2; row++) {
- for(col = 0; col < map_useful_w; col++) {
- lv_color_t px_color = *((lv_color_t *)&map_p[(uint32_t)col * px_size_byte]);
- disp->driver.set_px_cb(&disp->driver, (uint8_t *)vdb->buf_act, vdb_width, col + masked_a.x1, row,
- px_color, opa);
- }
- map_p += map_width * px_size_byte; /*Next row on the map*/
- }
- }
- /*Normal native VDB*/
- else {
- for(row = masked_a.y1; row <= masked_a.y2; row++) {
-#if LV_USE_GPU
- if(disp->driver.gpu_blend_cb == false) {
- sw_mem_blend(vdb_buf_tmp, (lv_color_t *)map_p, map_useful_w, opa);
- } else {
- disp->driver.gpu_blend_cb(&disp->driver, vdb_buf_tmp, (lv_color_t *)map_p, map_useful_w, opa);
- }
-#else
- sw_mem_blend(vdb_buf_tmp, (lv_color_t *)map_p, map_useful_w, opa);
-#endif
- map_p += map_width * px_size_byte; /*Next row on the map*/
- vdb_buf_tmp += vdb_width; /*Next row on the VDB*/
- }
- }
- }
-
- /*In the other cases every pixel need to be checked one-by-one*/
- else {
-
- lv_coord_t col;
- lv_color_t last_img_px = LV_COLOR_BLACK;
- lv_color_t recolored_px = lv_color_mix(recolor, last_img_px, recolor_opa);
- for(row = masked_a.y1; row <= masked_a.y2; row++) {
- for(col = 0; col < map_useful_w; col++) {
- lv_opa_t opa_result = opa;
- uint8_t * px_color_p = (uint8_t *)&map_p[(uint32_t)col * px_size_byte];
- lv_color_t px_color;
-
- /*Calculate with the pixel level alpha*/
- if(alpha_byte) {
-#if LV_COLOR_DEPTH == 8 || LV_COLOR_DEPTH == 1
- px_color.full = px_color_p[0];
-#elif LV_COLOR_DEPTH == 16
- /*Because of Alpha byte 16 bit color can start on odd address which can cause
- * crash*/
- px_color.full = px_color_p[0] + (px_color_p[1] << 8);
-#elif LV_COLOR_DEPTH == 32
- px_color = *((lv_color_t *)px_color_p);
-#endif
- lv_opa_t px_opa = *(px_color_p + LV_IMG_PX_SIZE_ALPHA_BYTE - 1);
- if(px_opa == LV_OPA_TRANSP)
- continue;
- else if(px_opa != LV_OPA_COVER)
- opa_result = (uint32_t)((uint32_t)px_opa * opa_result) >> 8;
- } else {
- px_color = *((lv_color_t *)px_color_p);
- }
-
- /*Handle chroma key*/
- if(chroma_key && px_color.full == disp->driver.color_chroma_key.full) continue;
-
- /*Re-color the pixel if required*/
- if(recolor_opa != LV_OPA_TRANSP) {
- if(last_img_px.full != px_color.full) { /*Minor acceleration: calculate only for
- new colors (save the last)*/
- last_img_px = px_color;
- recolored_px = lv_color_mix(recolor, last_img_px, recolor_opa);
- }
- /*Handle custom VDB write is present*/
- if(disp->driver.set_px_cb) {
- disp->driver.set_px_cb(&disp->driver, (uint8_t *)vdb->buf_act, vdb_width, col + masked_a.x1,
- row, recolored_px, opa_result);
- }
- /*Normal native VDB write*/
- else {
- if(opa_result == LV_OPA_COVER)
- vdb_buf_tmp[col].full = recolored_px.full;
- else
- vdb_buf_tmp[col] = lv_color_mix(recolored_px, vdb_buf_tmp[col], opa_result);
- }
- } else {
- /*Handle custom VDB write is present*/
- if(disp->driver.set_px_cb) {
- disp->driver.set_px_cb(&disp->driver, (uint8_t *)vdb->buf_act, vdb_width, col + masked_a.x1,
- row, px_color, opa_result);
- }
- /*Normal native VDB write*/
- else {
-
- if(opa_result == LV_OPA_COVER)
- vdb_buf_tmp[col] = px_color;
- else {
- if(scr_transp == false) {
- vdb_buf_tmp[col] = lv_color_mix(px_color, vdb_buf_tmp[col], opa_result);
- } else {
-#if LV_COLOR_DEPTH == 32 && LV_COLOR_SCREEN_TRANSP
- vdb_buf_tmp[col] = color_mix_2_alpha(vdb_buf_tmp[col], vdb_buf_tmp[col].ch.alpha,
- px_color, opa_result);
-#endif
- }
- }
- }
- }
- }
-
- map_p += map_width * px_size_byte; /*Next row on the map*/
- vdb_buf_tmp += vdb_width; /*Next row on the VDB*/
- }
- }
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Blend pixels to destination memory using opacity
- * @param dest a memory address. Copy 'src' here.
- * @param src pointer to pixel map. Copy it to 'dest'.
- * @param length number of pixels in 'src'
- * @param opa opacity (0, LV_OPA_TRANSP: transparent ... 255, LV_OPA_COVER, fully cover)
- */
-static void sw_mem_blend(lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa)
-{
- if(opa == LV_OPA_COVER) {
- memcpy(dest, src, length * sizeof(lv_color_t));
- } else {
- uint32_t col;
- for(col = 0; col < length; col++) {
- dest[col] = lv_color_mix(src[col], dest[col], opa);
- }
- }
-}
-
-/**
- * Fill an area with a color
- * @param mem a memory address. Considered to a rectangular window according to 'mem_area'
- * @param mem_width width of the 'mem' buffer
- * @param fill_area coordinates of an area to fill. Relative to 'mem_area'.
- * @param color fill color
- * @param opa opacity (0, LV_OPA_TRANSP: transparent ... 255, LV_OPA_COVER, fully cover)
- */
-static void sw_color_fill(lv_color_t * mem, lv_coord_t mem_width, const lv_area_t * fill_area, lv_color_t color,
- lv_opa_t opa)
-{
- /*Set all row in vdb to the given color*/
- lv_coord_t row;
- lv_coord_t col;
-
- lv_disp_t * disp = lv_refr_get_disp_refreshing();
- if(disp->driver.set_px_cb) {
- for(col = fill_area->x1; col <= fill_area->x2; col++) {
- for(row = fill_area->y1; row <= fill_area->y2; row++) {
- disp->driver.set_px_cb(&disp->driver, (uint8_t *)mem, mem_width, col, row, color, opa);
- }
- }
- } else {
- mem += fill_area->y1 * mem_width; /*Go to the first row*/
-
- /*Run simpler function without opacity*/
- if(opa == LV_OPA_COVER) {
-
- /*Fill the first row with 'color'*/
- for(col = fill_area->x1; col <= fill_area->x2; col++) {
- mem[col] = color;
- }
-
- /*Copy the first row to all other rows*/
- lv_color_t * mem_first = &mem[fill_area->x1];
- lv_coord_t copy_size = (fill_area->x2 - fill_area->x1 + 1) * sizeof(lv_color_t);
- mem += mem_width;
-
- for(row = fill_area->y1 + 1; row <= fill_area->y2; row++) {
- memcpy(&mem[fill_area->x1], mem_first, copy_size);
- mem += mem_width;
- }
- }
- /*Calculate with alpha too*/
- else {
- bool scr_transp = false;
-#if LV_COLOR_DEPTH == 32 && LV_COLOR_SCREEN_TRANSP
- scr_transp = disp->driver.screen_transp;
-#endif
-
- lv_color_t bg_tmp = LV_COLOR_BLACK;
- lv_color_t opa_tmp = lv_color_mix(color, bg_tmp, opa);
- for(row = fill_area->y1; row <= fill_area->y2; row++) {
- for(col = fill_area->x1; col <= fill_area->x2; col++) {
- if(scr_transp == false) {
- /*If the bg color changed recalculate the result color*/
- if(mem[col].full != bg_tmp.full) {
- bg_tmp = mem[col];
- opa_tmp = lv_color_mix(color, bg_tmp, opa);
- }
-
- mem[col] = opa_tmp;
-
- } else {
-#if LV_COLOR_DEPTH == 32 && LV_COLOR_SCREEN_TRANSP
- mem[col] = color_mix_2_alpha(mem[col], mem[col].ch.alpha, color, opa);
-#endif
- }
- }
- mem += mem_width;
- }
- }
- }
-}
-
-#if LV_COLOR_DEPTH == 32 && LV_COLOR_SCREEN_TRANSP
-/**
- * Mix two colors. Both color can have alpha value. It requires ARGB888 colors.
- * @param bg_color background color
- * @param bg_opa alpha of the background color
- * @param fg_color foreground color
- * @param fg_opa alpha of the foreground color
- * @return the mixed color. the alpha channel (color.alpha) contains the result alpha
- */
-static inline lv_color_t color_mix_2_alpha(lv_color_t bg_color, lv_opa_t bg_opa, lv_color_t fg_color, lv_opa_t fg_opa)
-{
- /* Pick the foreground if it's fully opaque or the Background is fully transparent*/
- if(fg_opa > LV_OPA_MAX || bg_opa <= LV_OPA_MIN) {
- fg_color.ch.alpha = fg_opa;
- return fg_color;
- }
- /*Transparent foreground: use the Background*/
- else if(fg_opa <= LV_OPA_MIN) {
- return bg_color;
- }
- /*Opaque background: use simple mix*/
- else if(bg_opa >= LV_OPA_MAX) {
- return lv_color_mix(fg_color, bg_color, fg_opa);
- }
- /*Both colors have alpha. Expensive calculation need to be applied*/
- else {
- /*Save the parameters and the result. If they will be asked again don't compute again*/
- static lv_opa_t fg_opa_save = 0;
- static lv_opa_t bg_opa_save = 0;
- static lv_color_t fg_color_save = {{0}};
- static lv_color_t bg_color_save = {{0}};
- static lv_color_t c = {{0}};
-
- if(fg_opa != fg_opa_save || bg_opa != bg_opa_save || fg_color.full != fg_color_save.full ||
- bg_color.full != bg_color_save.full) {
- fg_opa_save = fg_opa;
- bg_opa_save = bg_opa;
- fg_color_save.full = fg_color.full;
- bg_color_save.full = bg_color.full;
- /*Info:
- * https://en.wikipedia.org/wiki/Alpha_compositing#Analytical_derivation_of_the_over_operator*/
- lv_opa_t alpha_res = 255 - ((uint16_t)((uint16_t)(255 - fg_opa) * (255 - bg_opa)) >> 8);
- if(alpha_res == 0) {
- while(1)
- ;
- }
- lv_opa_t ratio = (uint16_t)((uint16_t)fg_opa * 255) / alpha_res;
- c = lv_color_mix(fg_color, bg_color, ratio);
- c.ch.alpha = alpha_res;
- }
- return c;
- }
-}
-#endif
diff --git a/src/libs/lvgl/src/lv_draw/lv_draw_basic.h b/src/libs/lvgl/src/lv_draw/lv_draw_basic.h
deleted file mode 100644
index 266b0c6c..00000000
--- a/src/libs/lvgl/src/lv_draw/lv_draw_basic.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- * @file lv_draw_basic.h
- *
- */
-
-#ifndef LV_DRAW_BASIC_H
-#define LV_DRAW_BASIC_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#include "../lv_font/lv_font.h"
-#include "../lv_misc/lv_color.h"
-#include "../lv_misc/lv_area.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-void lv_draw_px(lv_coord_t x, lv_coord_t y, const lv_area_t * mask_p, lv_color_t color, lv_opa_t opa);
-/**
- * Fill an area in the Virtual Display Buffer
- * @param cords_p coordinates of the area to fill
- * @param mask_p fill only o this mask
- * @param color fill color
- * @param opa opacity of the area (0..255)
- */
-void lv_draw_fill(const lv_area_t * cords_p, const lv_area_t * mask_p, lv_color_t color, lv_opa_t opa);
-
-/**
- * Draw a letter in the Virtual Display Buffer
- * @param pos_p left-top coordinate of the latter
- * @param mask_p the letter will be drawn only on this area
- * @param font_p pointer to font
- * @param letter a letter to draw
- * @param color color of letter
- * @param opa opacity of letter (0..255)
- */
-void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv_font_t * font_p, uint32_t letter,
- lv_color_t color, lv_opa_t opa);
-
-/**
- * Draw a color map to the display (image)
- * @param cords_p coordinates the color map
- * @param mask_p the map will drawn only on this area (truncated to VDB area)
- * @param map_p pointer to a lv_color_t array
- * @param opa opacity of the map
- * @param chroma_keyed true: enable transparency of LV_IMG_LV_COLOR_TRANSP color pixels
- * @param alpha_byte true: extra alpha byte is inserted for every pixel
- * @param recolor mix the pixels with this color
- * @param recolor_opa the intense of recoloring
- */
-void lv_draw_map(const lv_area_t * cords_p, const lv_area_t * mask_p, const uint8_t * map_p, lv_opa_t opa,
- bool chroma_key, bool alpha_byte, lv_color_t recolor, lv_opa_t recolor_opa);
-
-/**********************
- * MACROS
- **********************/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_DRAW_BASIC_H*/
diff --git a/src/libs/lvgl/src/lv_draw/lv_draw_img.c b/src/libs/lvgl/src/lv_draw/lv_draw_img.c
deleted file mode 100644
index e19ba015..00000000
--- a/src/libs/lvgl/src/lv_draw/lv_draw_img.c
+++ /dev/null
@@ -1,601 +0,0 @@
-/**
- * @file lv_draw_img.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_draw_img.h"
-#include "lv_img_cache.h"
-#include "../lv_misc/lv_log.h"
-#include "../lv_misc/lv_mem.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static lv_res_t lv_img_draw_core(const lv_area_t * coords, const lv_area_t * mask, const void * src,
- const lv_style_t * style, lv_opa_t opa_scale);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Draw an image
- * @param coords the coordinates of the image
- * @param mask the image will be drawn only in this area
- * @param src pointer to a lv_color_t array which contains the pixels of the image
- * @param style style of the image
- * @param opa_scale scale down all opacities by the factor
- */
-void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask, const void * src, const lv_style_t * style,
- lv_opa_t opa_scale)
-{
- if(src == NULL) {
- LV_LOG_WARN("Image draw: src is NULL");
- lv_draw_rect(coords, mask, &lv_style_plain, LV_OPA_COVER);
- lv_draw_label(coords, mask, &lv_style_plain, LV_OPA_COVER, "No\ndata", LV_TXT_FLAG_NONE, NULL, NULL, NULL, LV_BIDI_DIR_LTR);
- return;
- }
-
- lv_res_t res;
- res = lv_img_draw_core(coords, mask, src, style, opa_scale);
-
- if(res == LV_RES_INV) {
- LV_LOG_WARN("Image draw error");
- lv_draw_rect(coords, mask, &lv_style_plain, LV_OPA_COVER);
- lv_draw_label(coords, mask, &lv_style_plain, LV_OPA_COVER, "No\ndata", LV_TXT_FLAG_NONE, NULL, NULL, NULL, LV_BIDI_DIR_LTR);
- return;
- }
-}
-
-/**
- * Get the color of an image's pixel
- * @param dsc an image descriptor
- * @param x x coordinate of the point to get
- * @param y x coordinate of the point to get
- * @param style style of the image. In case of `LV_IMG_CF_ALPHA_1/2/4/8` `style->image.color` shows
- * the color. Can be `NULL` but for `ALPHA` images black will be returned. In other cases it is not
- * used.
- * @return color of the point
- */
-lv_color_t lv_img_buf_get_px_color(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, const lv_style_t * style)
-{
- lv_color_t p_color = LV_COLOR_BLACK;
- if(x >= (lv_coord_t)dsc->header.w) {
- x = dsc->header.w - 1;
- LV_LOG_WARN("lv_canvas_get_px: x is too large (out of canvas)");
- } else if(x < 0) {
- x = 0;
- LV_LOG_WARN("lv_canvas_get_px: x is < 0 (out of canvas)");
- }
-
- if(y >= (lv_coord_t)dsc->header.h) {
- y = dsc->header.h - 1;
- LV_LOG_WARN("lv_canvas_get_px: y is too large (out of canvas)");
- } else if(y < 0) {
- y = 0;
- LV_LOG_WARN("lv_canvas_get_px: y is < 0 (out of canvas)");
- }
-
- uint8_t * buf_u8 = (uint8_t *)dsc->data;
-
- if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR || dsc->header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED ||
- dsc->header.cf == LV_IMG_CF_TRUE_COLOR_ALPHA) {
- uint8_t px_size = lv_img_color_format_get_px_size(dsc->header.cf) >> 3;
- uint32_t px = dsc->header.w * y * px_size + x * px_size;
- memcpy(&p_color, &buf_u8[px], sizeof(lv_color_t));
-#if LV_COLOR_SIZE == 32
- p_color.ch.alpha = 0xFF; /*Only the color should be get so use a deafult alpha value*/
-#endif
- } else if(dsc->header.cf == LV_IMG_CF_INDEXED_1BIT) {
- buf_u8 += 4 * 2;
- uint8_t bit = x & 0x7;
- x = x >> 3;
-
- /* Get the current pixel.
- * dsc->header.w + 7 means rounding up to 8 because the lines are byte aligned
- * so the possible real width are 8, 16, 24 ...*/
- uint32_t px = ((dsc->header.w + 7) >> 3) * y + x;
- p_color.full = (buf_u8[px] & (1 << (7 - bit))) >> (7 - bit);
- } else if(dsc->header.cf == LV_IMG_CF_INDEXED_2BIT) {
- buf_u8 += 4 * 4;
- uint8_t bit = (x & 0x3) * 2;
- x = x >> 2;
-
- /* Get the current pixel.
- * dsc->header.w + 3 means rounding up to 4 because the lines are byte aligned
- * so the possible real width are 4, 8, 12 ...*/
- uint32_t px = ((dsc->header.w + 3) >> 2) * y + x;
- p_color.full = (buf_u8[px] & (3 << (6 - bit))) >> (6 - bit);
- } else if(dsc->header.cf == LV_IMG_CF_INDEXED_4BIT) {
- buf_u8 += 4 * 16;
- uint8_t bit = (x & 0x1) * 4;
- x = x >> 1;
-
- /* Get the current pixel.
- * dsc->header.w + 1 means rounding up to 2 because the lines are byte aligned
- * so the possible real width are 2, 4, 6 ...*/
- uint32_t px = ((dsc->header.w + 1) >> 1) * y + x;
- p_color.full = (buf_u8[px] & (0xF << (4 - bit))) >> (4 - bit);
- } else if(dsc->header.cf == LV_IMG_CF_INDEXED_8BIT) {
- buf_u8 += 4 * 256;
- uint32_t px = dsc->header.w * y + x;
- p_color.full = buf_u8[px];
- } else if(dsc->header.cf == LV_IMG_CF_ALPHA_1BIT || dsc->header.cf == LV_IMG_CF_ALPHA_2BIT ||
- dsc->header.cf == LV_IMG_CF_ALPHA_4BIT || dsc->header.cf == LV_IMG_CF_ALPHA_8BIT) {
- if(style)
- p_color = style->image.color;
- else
- p_color = LV_COLOR_BLACK;
- }
- return p_color;
-}
-
-/**
- * Get the alpha value of an image's pixel
- * @param dsc pointer to an image descriptor
- * @param x x coordinate of the point to set
- * @param y x coordinate of the point to set
- * @return alpha value of the point
- */
-lv_opa_t lv_img_buf_get_px_alpha(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y)
-{
- if(x >= (lv_coord_t)dsc->header.w) {
- x = dsc->header.w - 1;
- LV_LOG_WARN("lv_canvas_get_px: x is too large (out of canvas)");
- } else if(x < 0) {
- x = 0;
- LV_LOG_WARN("lv_canvas_get_px: x is < 0 (out of canvas)");
- }
-
- if(y >= (lv_coord_t)dsc->header.h) {
- y = dsc->header.h - 1;
- LV_LOG_WARN("lv_canvas_get_px: y is too large (out of canvas)");
- } else if(y < 0) {
- y = 0;
- LV_LOG_WARN("lv_canvas_get_px: y is < 0 (out of canvas)");
- }
-
- uint8_t * buf_u8 = (uint8_t *)dsc->data;
-
- if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR_ALPHA) {
- uint32_t px = dsc->header.w * y * LV_IMG_PX_SIZE_ALPHA_BYTE + x * LV_IMG_PX_SIZE_ALPHA_BYTE;
- return buf_u8[px + LV_IMG_PX_SIZE_ALPHA_BYTE - 1];
- } else if(dsc->header.cf == LV_IMG_CF_ALPHA_1BIT) {
- uint8_t bit = x & 0x7;
- x = x >> 3;
-
- /* Get the current pixel.
- * dsc->header.w + 7 means rounding up to 8 because the lines are byte aligned
- * so the possible real width are 8 ,16, 24 ...*/
- uint32_t px = ((dsc->header.w + 7) >> 3) * y + x;
- uint8_t px_opa = (buf_u8[px] & (1 << (7 - bit))) >> (7 - bit);
- return px_opa ? LV_OPA_TRANSP : LV_OPA_COVER;
- } else if(dsc->header.cf == LV_IMG_CF_ALPHA_2BIT) {
- const uint8_t opa_table[4] = {0, 85, 170, 255}; /*Opacity mapping with bpp = 2*/
-
- uint8_t bit = (x & 0x3) * 2;
- x = x >> 2;
-
- /* Get the current pixel.
- * dsc->header.w + 4 means rounding up to 8 because the lines are byte aligned
- * so the possible real width are 4 ,8, 12 ...*/
- uint32_t px = ((dsc->header.w + 3) >> 2) * y + x;
- uint8_t px_opa = (buf_u8[px] & (3 << (6 - bit))) >> (6 - bit);
- return opa_table[px_opa];
- } else if(dsc->header.cf == LV_IMG_CF_ALPHA_4BIT) {
- const uint8_t opa_table[16] = {0, 17, 34, 51, /*Opacity mapping with bpp = 4*/
- 68, 85, 102, 119, 136, 153, 170, 187, 204, 221, 238, 255};
-
- uint8_t bit = (x & 0x1) * 4;
- x = x >> 1;
-
- /* Get the current pixel.
- * dsc->header.w + 1 means rounding up to 8 because the lines are byte aligned
- * so the possible real width are 2 ,4, 6 ...*/
- uint32_t px = ((dsc->header.w + 1) >> 1) * y + x;
- uint8_t px_opa = (buf_u8[px] & (0xF << (4 - bit))) >> (4 - bit);
- return opa_table[px_opa];
- } else if(dsc->header.cf == LV_IMG_CF_ALPHA_8BIT) {
- uint32_t px = dsc->header.w * y + x;
- return buf_u8[px];
- }
-
- return LV_OPA_COVER;
-}
-
-/**
- * Set the color of a pixel of an image. The alpha channel won't be affected.
- * @param dsc pointer to an image descriptor
- * @param x x coordinate of the point to set
- * @param y x coordinate of the point to set
- * @param c color of the point
- */
-void lv_img_buf_set_px_color(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_color_t c)
-{
- uint8_t * buf_u8 = (uint8_t *)dsc->data;
-
- if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR || dsc->header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) {
- uint8_t px_size = lv_img_color_format_get_px_size(dsc->header.cf) >> 3;
- uint32_t px = dsc->header.w * y * px_size + x * px_size;
- memcpy(&buf_u8[px], &c, px_size);
- } else if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR_ALPHA) {
- uint8_t px_size = lv_img_color_format_get_px_size(dsc->header.cf) >> 3;
- uint32_t px = dsc->header.w * y * px_size + x * px_size;
- memcpy(&buf_u8[px], &c, px_size - 1); /*-1 to not overwrite the alpha value*/
- } else if(dsc->header.cf == LV_IMG_CF_INDEXED_1BIT) {
- buf_u8 += sizeof(lv_color32_t) * 2; /*Skip the palette*/
-
- uint8_t bit = x & 0x7;
- x = x >> 3;
-
- /* Get the current pixel.
- * dsc->header.w + 7 means rounding up to 8 because the lines are byte aligned
- * so the possible real width are 8 ,16, 24 ...*/
- uint32_t px = ((dsc->header.w + 7) >> 3) * y + x;
- buf_u8[px] = buf_u8[px] & ~(1 << (7 - bit));
- buf_u8[px] = buf_u8[px] | ((c.full & 0x1) << (7 - bit));
- } else if(dsc->header.cf == LV_IMG_CF_INDEXED_2BIT) {
- buf_u8 += sizeof(lv_color32_t) * 4; /*Skip the palette*/
- uint8_t bit = (x & 0x3) * 2;
- x = x >> 2;
-
- /* Get the current pixel.
- * dsc->header.w + 3 means rounding up to 4 because the lines are byte aligned
- * so the possible real width are 4, 8 ,12 ...*/
- uint32_t px = ((dsc->header.w + 3) >> 2) * y + x;
-
- buf_u8[px] = buf_u8[px] & ~(3 << (6 - bit));
- buf_u8[px] = buf_u8[px] | ((c.full & 0x3) << (6 - bit));
- } else if(dsc->header.cf == LV_IMG_CF_INDEXED_4BIT) {
- buf_u8 += sizeof(lv_color32_t) * 16; /*Skip the palette*/
- uint8_t bit = (x & 0x1) * 4;
- x = x >> 1;
-
- /* Get the current pixel.
- * dsc->header.w + 1 means rounding up to 2 because the lines are byte aligned
- * so the possible real width are 2 ,4, 6 ...*/
- uint32_t px = ((dsc->header.w + 1) >> 1) * y + x;
- buf_u8[px] = buf_u8[px] & ~(0xF << (4 - bit));
- buf_u8[px] = buf_u8[px] | ((c.full & 0xF) << (4 - bit));
- } else if(dsc->header.cf == LV_IMG_CF_INDEXED_8BIT) {
- buf_u8 += sizeof(lv_color32_t) * 256; /*Skip the palette*/
- uint32_t px = dsc->header.w * y + x;
- buf_u8[px] = c.full;
- }
-}
-
-/**
- * Set the alpha value of a pixel of an image. The color won't be affected
- * @param dsc pointer to an image descriptor
- * @param x x coordinate of the point to set
- * @param y x coordinate of the point to set
- * @param opa the desired opacity
- */
-void lv_img_buf_set_px_alpha(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_opa_t opa)
-{
- uint8_t * buf_u8 = (uint8_t *)dsc->data;
-
- if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR_ALPHA) {
- uint8_t px_size = lv_img_color_format_get_px_size(dsc->header.cf) >> 3;
- uint32_t px = dsc->header.w * y * px_size + x * px_size;
- buf_u8[px + px_size - 1] = opa;
- } else if(dsc->header.cf == LV_IMG_CF_ALPHA_1BIT) {
- opa = opa >> 7; /*opa -> [0,1]*/
- uint8_t bit = x & 0x7;
- x = x >> 3;
-
- /* Get the current pixel.
- * dsc->header.w + 7 means rounding up to 8 because the lines are byte aligned
- * so the possible real width are 8 ,16, 24 ...*/
- uint32_t px = ((dsc->header.w + 7) >> 3) * y + x;
- buf_u8[px] = buf_u8[px] & ~(1 << (7 - bit));
- buf_u8[px] = buf_u8[px] | ((opa & 0x1) << (7 - bit));
- } else if(dsc->header.cf == LV_IMG_CF_ALPHA_2BIT) {
- opa = opa >> 6; /*opa -> [0,3]*/
- uint8_t bit = (x & 0x3) * 2;
- x = x >> 2;
-
- /* Get the current pixel.
- * dsc->header.w + 4 means rounding up to 8 because the lines are byte aligned
- * so the possible real width are 4 ,8, 12 ...*/
- uint32_t px = ((dsc->header.w + 3) >> 2) * y + x;
- buf_u8[px] = buf_u8[px] & ~(3 << (6 - bit));
- buf_u8[px] = buf_u8[px] | ((opa & 0x3) << (6 - bit));
- } else if(dsc->header.cf == LV_IMG_CF_ALPHA_4BIT) {
- opa = opa >> 4; /*opa -> [0,15]*/
- uint8_t bit = (x & 0x1) * 4;
- x = x >> 1;
-
- /* Get the current pixel.
- * dsc->header.w + 1 means rounding up to 8 because the lines are byte aligned
- * so the possible real width are 2 ,4, 6 ...*/
- uint32_t px = ((dsc->header.w + 1) >> 1) * y + x;
- buf_u8[px] = buf_u8[px] & ~(0xF << (4 - bit));
- buf_u8[px] = buf_u8[px] | ((opa & 0xF) << (4 - bit));
- } else if(dsc->header.cf == LV_IMG_CF_ALPHA_8BIT) {
- uint32_t px = dsc->header.w * y + x;
- buf_u8[px] = opa;
- }
-}
-
-/**
- * Set the palette color of an indexed image. Valid only for `LV_IMG_CF_INDEXED1/2/4/8`
- * @param dsc pointer to an image descriptor
- * @param id the palette color to set:
- * - for `LV_IMG_CF_INDEXED1`: 0..1
- * - for `LV_IMG_CF_INDEXED2`: 0..3
- * - for `LV_IMG_CF_INDEXED4`: 0..15
- * - for `LV_IMG_CF_INDEXED8`: 0..255
- * @param c the color to set
- */
-void lv_img_buf_set_palette(lv_img_dsc_t * dsc, uint8_t id, lv_color_t c)
-{
- if((dsc->header.cf == LV_IMG_CF_ALPHA_1BIT && id > 1) || (dsc->header.cf == LV_IMG_CF_ALPHA_2BIT && id > 3) ||
- (dsc->header.cf == LV_IMG_CF_ALPHA_4BIT && id > 15) || (dsc->header.cf == LV_IMG_CF_ALPHA_8BIT)) {
- LV_LOG_WARN("lv_img_buf_set_px_alpha: invalid 'id'");
- return;
- }
-
- lv_color32_t c32;
- c32.full = lv_color_to32(c);
- uint8_t * buf = (uint8_t *)dsc->data;
- memcpy(&buf[id * sizeof(c32)], &c32, sizeof(c32));
-}
-
-/**
- * Get the pixel size of a color format in bits
- * @param cf a color format (`LV_IMG_CF_...`)
- * @return the pixel size in bits
- */
-uint8_t lv_img_color_format_get_px_size(lv_img_cf_t cf)
-{
- uint8_t px_size = 0;
-
- switch(cf) {
- case LV_IMG_CF_UNKNOWN:
- case LV_IMG_CF_RAW: px_size = 0; break;
- case LV_IMG_CF_TRUE_COLOR:
- case LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED: px_size = LV_COLOR_SIZE; break;
- case LV_IMG_CF_TRUE_COLOR_ALPHA: px_size = LV_IMG_PX_SIZE_ALPHA_BYTE << 3; break;
- case LV_IMG_CF_INDEXED_1BIT:
- case LV_IMG_CF_ALPHA_1BIT: px_size = 1; break;
- case LV_IMG_CF_INDEXED_2BIT:
- case LV_IMG_CF_ALPHA_2BIT: px_size = 2; break;
- case LV_IMG_CF_INDEXED_4BIT:
- case LV_IMG_CF_ALPHA_4BIT: px_size = 4; break;
- case LV_IMG_CF_INDEXED_8BIT:
- case LV_IMG_CF_ALPHA_8BIT: px_size = 8; break;
- default: px_size = 0; break;
- }
-
- return px_size;
-}
-
-/**
- * Check if a color format is chroma keyed or not
- * @param cf a color format (`LV_IMG_CF_...`)
- * @return true: chroma keyed; false: not chroma keyed
- */
-bool lv_img_color_format_is_chroma_keyed(lv_img_cf_t cf)
-{
- bool is_chroma_keyed = false;
-
- switch(cf) {
- case LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED:
- case LV_IMG_CF_RAW_CHROMA_KEYED:
-#if LV_INDEXED_CHROMA
- case LV_IMG_CF_INDEXED_1BIT:
- case LV_IMG_CF_INDEXED_2BIT:
- case LV_IMG_CF_INDEXED_4BIT:
- case LV_IMG_CF_INDEXED_8BIT:
-#endif
- is_chroma_keyed = true; break;
-
- default: is_chroma_keyed = false; break;
- }
-
- return is_chroma_keyed;
-}
-
-/**
- * Check if a color format has alpha channel or not
- * @param cf a color format (`LV_IMG_CF_...`)
- * @return true: has alpha channel; false: doesn't have alpha channel
- */
-bool lv_img_color_format_has_alpha(lv_img_cf_t cf)
-{
- bool has_alpha = false;
-
- switch(cf) {
- case LV_IMG_CF_TRUE_COLOR_ALPHA:
- case LV_IMG_CF_RAW_ALPHA:
- case LV_IMG_CF_INDEXED_1BIT:
- case LV_IMG_CF_INDEXED_2BIT:
- case LV_IMG_CF_INDEXED_4BIT:
- case LV_IMG_CF_INDEXED_8BIT:
- case LV_IMG_CF_ALPHA_1BIT:
- case LV_IMG_CF_ALPHA_2BIT:
- case LV_IMG_CF_ALPHA_4BIT:
- case LV_IMG_CF_ALPHA_8BIT: has_alpha = true; break;
- default: has_alpha = false; break;
- }
-
- return has_alpha;
-}
-
-/**
- * Get the type of an image source
- * @param src pointer to an image source:
- * - pointer to an 'lv_img_t' variable (image stored internally and compiled into the code)
- * - a path to a file (e.g. "S:/folder/image.bin")
- * - or a symbol (e.g. LV_SYMBOL_CLOSE)
- * @return type of the image source LV_IMG_SRC_VARIABLE/FILE/SYMBOL/UNKNOWN
- */
-lv_img_src_t lv_img_src_get_type(const void * src)
-{
- lv_img_src_t img_src_type = LV_IMG_SRC_UNKNOWN;
-
- if(src == NULL) return img_src_type;
- const uint8_t * u8_p = src;
-
- /*The first byte shows the type of the image source*/
- if(u8_p[0] >= 0x20 && u8_p[0] <= 0x7F) {
- img_src_type = LV_IMG_SRC_FILE; /*If it's an ASCII character then it's file name*/
- } else if(u8_p[0] >= 0x80) {
- img_src_type = LV_IMG_SRC_SYMBOL; /*Symbols begins after 0x7F*/
- } else {
- img_src_type = LV_IMG_SRC_VARIABLE; /*`lv_img_dsc_t` is design to the first byte < 0x20*/
- }
-
- if(LV_IMG_SRC_UNKNOWN == img_src_type) {
- LV_LOG_WARN("lv_img_src_get_type: unknown image type");
- }
-
- return img_src_type;
-}
-
-lv_img_dsc_t *lv_img_buf_alloc(lv_coord_t w, lv_coord_t h, lv_img_cf_t cf)
-{
- /* Allocate image descriptor */
- lv_img_dsc_t *dsc = lv_mem_alloc(sizeof(lv_img_dsc_t));
- if(dsc == NULL)
- return NULL;
-
- memset(dsc, 0, sizeof(lv_img_dsc_t));
-
- /* Get image data size */
- dsc->data_size = lv_img_buf_get_img_size(w, h, cf);
- if(dsc->data_size == 0) {
- lv_mem_free(dsc);
- return NULL;
- }
-
- /* Allocate raw buffer */
- dsc->data = lv_mem_alloc(dsc->data_size);
- if(dsc->data == NULL) {
- lv_mem_free(dsc);
- return NULL;
- }
- memset((uint8_t *)dsc->data, 0, dsc->data_size);
-
- /* Fill in header */
- dsc->header.always_zero = 0;
- dsc->header.w = w;
- dsc->header.h = h;
- dsc->header.cf = cf;
- return dsc;
-}
-
-void lv_img_buf_free(lv_img_dsc_t *dsc)
-{
- if(dsc != NULL) {
- if(dsc->data != NULL)
- lv_mem_free(dsc->data);
-
- lv_mem_free(dsc);
- }
-}
-
-uint32_t lv_img_buf_get_img_size(lv_coord_t w, lv_coord_t h, lv_img_cf_t cf)
-{
- switch(cf) {
- case LV_IMG_CF_TRUE_COLOR: return LV_IMG_BUF_SIZE_TRUE_COLOR(w, h);
- case LV_IMG_CF_TRUE_COLOR_ALPHA: return LV_IMG_BUF_SIZE_TRUE_COLOR_ALPHA(w, h);
- case LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED: return LV_IMG_BUF_SIZE_TRUE_COLOR_CHROMA_KEYED(w, h);
- case LV_IMG_CF_ALPHA_1BIT: return LV_IMG_BUF_SIZE_ALPHA_1BIT(w, h);
- case LV_IMG_CF_ALPHA_2BIT: return LV_IMG_BUF_SIZE_ALPHA_2BIT(w, h);
- case LV_IMG_CF_ALPHA_4BIT: return LV_IMG_BUF_SIZE_ALPHA_4BIT(w, h);
- case LV_IMG_CF_ALPHA_8BIT: return LV_IMG_BUF_SIZE_ALPHA_8BIT(w, h);
- case LV_IMG_CF_INDEXED_1BIT: return LV_IMG_BUF_SIZE_INDEXED_1BIT(w, h);
- case LV_IMG_CF_INDEXED_2BIT: return LV_IMG_BUF_SIZE_INDEXED_2BIT(w, h);
- case LV_IMG_CF_INDEXED_4BIT: return LV_IMG_BUF_SIZE_INDEXED_4BIT(w, h);
- case LV_IMG_CF_INDEXED_8BIT: return LV_IMG_BUF_SIZE_INDEXED_8BIT(w, h);
- default: return 0;
- }
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-static lv_res_t lv_img_draw_core(const lv_area_t * coords, const lv_area_t * mask, const void * src,
- const lv_style_t * style, lv_opa_t opa_scale)
-{
-
- lv_area_t mask_com; /*Common area of mask and coords*/
- bool union_ok;
- union_ok = lv_area_intersect(&mask_com, mask, coords);
- if(union_ok == false) {
- return LV_RES_OK; /*Out of mask. There is nothing to draw so the image is drawn
- successfully.*/
- }
-
- lv_opa_t opa =
- opa_scale == LV_OPA_COVER ? style->image.opa : (uint16_t)((uint16_t)style->image.opa * opa_scale) >> 8;
-
- lv_img_cache_entry_t * cdsc = lv_img_cache_open(src, style);
-
- if(cdsc == NULL) return LV_RES_INV;
-
- bool chroma_keyed = lv_img_color_format_is_chroma_keyed(cdsc->dec_dsc.header.cf);
- bool alpha_byte = lv_img_color_format_has_alpha(cdsc->dec_dsc.header.cf);
-
- if(cdsc->dec_dsc.error_msg != NULL) {
- LV_LOG_WARN("Image draw error");
- lv_draw_rect(coords, mask, &lv_style_plain, LV_OPA_COVER);
- lv_draw_label(coords, mask, &lv_style_plain, LV_OPA_COVER, cdsc->dec_dsc.error_msg, LV_TXT_FLAG_NONE, NULL, NULL, NULL, LV_BIDI_DIR_LTR);
- }
- /* The decoder open could open the image and gave the entire uncompressed image.
- * Just draw it!*/
- else if(cdsc->dec_dsc.img_data) {
- lv_draw_map(coords, mask, cdsc->dec_dsc.img_data, opa, chroma_keyed, alpha_byte, style->image.color,
- style->image.intense);
- }
- /* The whole uncompressed image is not available. Try to read it line-by-line*/
- else {
- lv_coord_t width = lv_area_get_width(&mask_com);
-
- uint8_t * buf = lv_draw_get_buf(lv_area_get_width(&mask_com) * LV_IMG_PX_SIZE_ALPHA_BYTE); /*space for the possible alpha byte*/
-
- lv_area_t line;
- lv_area_copy(&line, &mask_com);
- lv_area_set_height(&line, 1);
- lv_coord_t x = mask_com.x1 - coords->x1;
- lv_coord_t y = mask_com.y1 - coords->y1;
- lv_coord_t row;
- lv_res_t read_res;
- for(row = mask_com.y1; row <= mask_com.y2; row++) {
- read_res = lv_img_decoder_read_line(&cdsc->dec_dsc, x, y, width, buf);
- if(read_res != LV_RES_OK) {
- lv_img_decoder_close(&cdsc->dec_dsc);
- LV_LOG_WARN("Image draw can't read the line");
- return LV_RES_INV;
- }
- lv_draw_map(&line, mask, buf, opa, chroma_keyed, alpha_byte, style->image.color, style->image.intense);
- line.y1++;
- line.y2++;
- y++;
- }
- }
-
- return LV_RES_OK;
-}
diff --git a/src/libs/lvgl/src/lv_draw/lv_draw_img.h b/src/libs/lvgl/src/lv_draw/lv_draw_img.h
deleted file mode 100644
index 794dd79e..00000000
--- a/src/libs/lvgl/src/lv_draw/lv_draw_img.h
+++ /dev/null
@@ -1,172 +0,0 @@
-/**
- * @file lv_draw_img.h
- *
- */
-
-#ifndef LV_DRAW_IMG_H
-#define LV_DRAW_IMG_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_draw.h"
-#include "lv_img_decoder.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * MACROS
- **********************/
-
-#define LV_IMG_BUF_SIZE_TRUE_COLOR(w, h) ((LV_COLOR_SIZE / 8) * w * h)
-#define LV_IMG_BUF_SIZE_TRUE_COLOR_CHROMA_KEYED(w, h) ((LV_COLOR_SIZE / 8) * w * h)
-#define LV_IMG_BUF_SIZE_TRUE_COLOR_ALPHA(w, h) (LV_IMG_PX_SIZE_ALPHA_BYTE * w * h)
-
-/*+ 1: to be sure no fractional row*/
-#define LV_IMG_BUF_SIZE_ALPHA_1BIT(w, h) ((((w / 8) + 1) * h))
-#define LV_IMG_BUF_SIZE_ALPHA_2BIT(w, h) ((((w / 4) + 1) * h))
-#define LV_IMG_BUF_SIZE_ALPHA_4BIT(w, h) ((((w / 2) + 1) * h))
-#define LV_IMG_BUF_SIZE_ALPHA_8BIT(w, h) ((w * h))
-
-/*4 * X: for palette*/
-#define LV_IMG_BUF_SIZE_INDEXED_1BIT(w, h) (LV_IMG_BUF_SIZE_ALPHA_1BIT(w, h) + 4 * 2)
-#define LV_IMG_BUF_SIZE_INDEXED_2BIT(w, h) (LV_IMG_BUF_SIZE_ALPHA_2BIT(w, h) + 4 * 4)
-#define LV_IMG_BUF_SIZE_INDEXED_4BIT(w, h) (LV_IMG_BUF_SIZE_ALPHA_4BIT(w, h) + 4 * 16)
-#define LV_IMG_BUF_SIZE_INDEXED_8BIT(w, h) (LV_IMG_BUF_SIZE_ALPHA_8BIT(w, h) + 4 * 256)
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Draw an image
- * @param coords the coordinates of the image
- * @param mask the image will be drawn only in this area
- * @param src pointer to a lv_color_t array which contains the pixels of the image
- * @param style style of the image
- * @param opa_scale scale down all opacities by the factor
- */
-void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask, const void * src, const lv_style_t * style,
- lv_opa_t opa_scale);
-
-/**
- * Get the type of an image source
- * @param src pointer to an image source:
- * - pointer to an 'lv_img_t' variable (image stored internally and compiled into the code)
- * - a path to a file (e.g. "S:/folder/image.bin")
- * - or a symbol (e.g. LV_SYMBOL_CLOSE)
- * @return type of the image source LV_IMG_SRC_VARIABLE/FILE/SYMBOL/UNKNOWN
- */
-lv_img_src_t lv_img_src_get_type(const void * src);
-
-/**
- * Get the color of an image's pixel
- * @param dsc an image descriptor
- * @param x x coordinate of the point to get
- * @param y x coordinate of the point to get
- * @param style style of the image. In case of `LV_IMG_CF_ALPHA_1/2/4/8` `style->image.color` shows
- * the color. Can be `NULL` but for `ALPHA` images black will be returned. In other cases it is not
- * used.
- * @return color of the point
- */
-lv_color_t lv_img_buf_get_px_color(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, const lv_style_t * style);
-/**
- * Get the alpha value of an image's pixel
- * @param dsc pointer to an image descriptor
- * @param x x coordinate of the point to set
- * @param y x coordinate of the point to set
- * @return alpha value of the point
- */
-lv_opa_t lv_img_buf_get_px_alpha(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y);
-
-/**
- * Set the color of a pixel of an image. The alpha channel won't be affected.
- * @param dsc pointer to an image descriptor
- * @param x x coordinate of the point to set
- * @param y x coordinate of the point to set
- * @param c color of the point
- */
-void lv_img_buf_set_px_color(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_color_t c);
-
-/**
- * Set the alpha value of a pixel of an image. The color won't be affected
- * @param dsc pointer to an image descriptor
- * @param x x coordinate of the point to set
- * @param y x coordinate of the point to set
- * @param opa the desired opacity
- */
-void lv_img_buf_set_px_alpha(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_opa_t opa);
-
-/**
- * Set the palette color of an indexed image. Valid only for `LV_IMG_CF_INDEXED1/2/4/8`
- * @param dsc pointer to an image descriptor
- * @param id the palette color to set:
- * - for `LV_IMG_CF_INDEXED1`: 0..1
- * - for `LV_IMG_CF_INDEXED2`: 0..3
- * - for `LV_IMG_CF_INDEXED4`: 0..15
- * - for `LV_IMG_CF_INDEXED8`: 0..255
- * @param c the color to set
- */
-void lv_img_buf_set_palette(lv_img_dsc_t * dsc, uint8_t id, lv_color_t c);
-
-/**
- * Get the pixel size of a color format in bits
- * @param cf a color format (`LV_IMG_CF_...`)
- * @return the pixel size in bits
- */
-uint8_t lv_img_color_format_get_px_size(lv_img_cf_t cf);
-
-/**
- * Check if a color format is chroma keyed or not
- * @param cf a color format (`LV_IMG_CF_...`)
- * @return true: chroma keyed; false: not chroma keyed
- */
-bool lv_img_color_format_is_chroma_keyed(lv_img_cf_t cf);
-
-/**
- * Check if a color format has alpha channel or not
- * @param cf a color format (`LV_IMG_CF_...`)
- * @return true: has alpha channel; false: doesn't have alpha channel
- */
-bool lv_img_color_format_has_alpha(lv_img_cf_t cf);
-
-/**
- * Allocate an image buffer in RAM
- * @param w width of image
- * @param h height of image
- * @param cf a color format (`LV_IMG_CF_...`)
- * @return an allocated image, or NULL on failure
- */
-lv_img_dsc_t *lv_img_buf_alloc(lv_coord_t w, lv_coord_t h, lv_img_cf_t cf);
-
-/**
- * Free an allocated image buffer
- * @param dsc image buffer to free
- */
-void lv_img_buf_free(lv_img_dsc_t *dsc);
-
-/**
- * Get the memory consumption of a raw bitmap, given color format and dimensions.
- * @param w width
- * @param h height
- * @param cf color format
- * @return size in bytes
- */
-uint32_t lv_img_buf_get_img_size(lv_coord_t w, lv_coord_t h, lv_img_cf_t cf);
-
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_TEMPL_H*/
diff --git a/src/libs/lvgl/src/lv_draw/lv_draw_label.c b/src/libs/lvgl/src/lv_draw/lv_draw_label.c
deleted file mode 100644
index bf75411d..00000000
--- a/src/libs/lvgl/src/lv_draw/lv_draw_label.c
+++ /dev/null
@@ -1,319 +0,0 @@
-/**
- * @file lv_draw_label.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_draw_label.h"
-#include "../lv_misc/lv_math.h"
-#include "../lv_misc/lv_bidi.h"
-
-/*********************
- * DEFINES
- *********************/
-#define LABEL_RECOLOR_PAR_LENGTH 6
-#define LV_LABEL_HINT_UPDATE_TH 1024 /*Update the "hint" if the label's y coordinates have changed more then this*/
-
-/**********************
- * TYPEDEFS
- **********************/
-enum {
- CMD_STATE_WAIT,
- CMD_STATE_PAR,
- CMD_STATE_IN,
-};
-typedef uint8_t cmd_state_t;
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static uint8_t hex_char_to_num(char hex);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Write a text
- * @param coords coordinates of the label
- * @param mask the label will be drawn only in this area
- * @param style pointer to a style
- * @param opa_scale scale down all opacities by the factor
- * @param txt 0 terminated text to write
- * @param flag settings for the text from 'txt_flag_t' enum
- * @param offset text offset in x and y direction (NULL if unused)
- * @param sel make the text selected in the range by drawing a background there
- */
-void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale,
- const char * txt, lv_txt_flag_t flag, lv_point_t * offset, lv_draw_label_txt_sel_t * sel,
- lv_draw_label_hint_t * hint, lv_bidi_dir_t bidi_dir)
-{
- const lv_font_t * font = style->text.font;
- lv_coord_t w;
-
- /*No need to waste processor time if string is empty*/
- if (txt[0] == '\0') return;
-
- if((flag & LV_TXT_FLAG_EXPAND) == 0) {
- /*Normally use the label's width as width*/
- w = lv_area_get_width(coords);
- } else {
- /*If EXAPND is enabled then not limit the text's width to the object's width*/
- lv_point_t p;
- lv_txt_get_size(&p, txt, style->text.font, style->text.letter_space, style->text.line_space, LV_COORD_MAX,
- flag);
- w = p.x;
- }
-
- lv_coord_t line_height = lv_font_get_line_height(font) + style->text.line_space;
-
- /*Init variables for the first line*/
- lv_coord_t line_width = 0;
- lv_point_t pos;
- pos.x = coords->x1;
- pos.y = coords->y1;
-
- lv_coord_t x_ofs = 0;
- lv_coord_t y_ofs = 0;
- if(offset != NULL) {
- x_ofs = offset->x;
- y_ofs = offset->y;
- pos.y += y_ofs;
- }
-
- uint32_t line_start = 0;
- int32_t last_line_start = -1;
-
- /*Check the hint to use the cached info*/
- if(hint && y_ofs == 0 && coords->y1 < 0) {
- /*If the label changed too much recalculate the hint.*/
- if(LV_MATH_ABS(hint->coord_y - coords->y1) > LV_LABEL_HINT_UPDATE_TH - 2 * line_height) {
- hint->line_start = -1;
- }
- last_line_start = hint->line_start;
- }
-
- /*Use the hint if it's valid*/
- if(hint && last_line_start >= 0) {
- line_start = last_line_start;
- pos.y += hint->y;
- }
-
-
- uint32_t line_end = line_start + lv_txt_get_next_line(&txt[line_start], font, style->text.letter_space, w, flag);
-
- /*Go the first visible line*/
- while(pos.y + line_height < mask->y1) {
- /*Go to next line*/
- line_start = line_end;
- line_end += lv_txt_get_next_line(&txt[line_start], font, style->text.letter_space, w, flag);
- pos.y += line_height;
-
- /*Save at the threshold coordinate*/
- if(hint && pos.y >= -LV_LABEL_HINT_UPDATE_TH && hint->line_start < 0) {
- hint->line_start = line_start;
- hint->y = pos.y - coords->y1;
- hint->coord_y = coords->y1;
- }
-
- if(txt[line_start] == '\0') return;
- }
-
- /*Align to middle*/
- if(flag & LV_TXT_FLAG_CENTER) {
- line_width = lv_txt_get_width(&txt[line_start], line_end - line_start, font, style->text.letter_space, flag);
-
- pos.x += (lv_area_get_width(coords) - line_width) / 2;
-
- }
- /*Align to the right*/
- else if(flag & LV_TXT_FLAG_RIGHT) {
- line_width = lv_txt_get_width(&txt[line_start], line_end - line_start, font, style->text.letter_space, flag);
- pos.x += lv_area_get_width(coords) - line_width;
- }
-
- lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->text.opa : (uint16_t)((uint16_t)style->text.opa * opa_scale) >> 8;
-
- uint16_t sel_start = 0xFFFF;
- uint16_t sel_end = 0xFFFF;
- if(sel) {
- sel_start = sel->start;
- sel_end = sel->end;
- if(sel_start > sel_end) {
- uint16_t tmp = sel_start;
- sel_start = sel_end;
- sel_end = tmp;
- }
- }
-
- cmd_state_t cmd_state = CMD_STATE_WAIT;
- uint32_t i;
- uint16_t par_start = 0;
- lv_color_t recolor;
- lv_coord_t letter_w;
- lv_style_t sel_style;
- lv_style_copy(&sel_style, &lv_style_plain_color);
- sel_style.body.main_color = sel_style.body.grad_color = style->text.sel_color;
-
- /*Write out all lines*/
- while(txt[line_start] != '\0') {
- if(offset != NULL) {
- pos.x += x_ofs;
- }
- /*Write all letter of a line*/
- cmd_state = CMD_STATE_WAIT;
- i = 0;
- uint32_t letter;
- uint32_t letter_next;
-#if LV_USE_BIDI
- char *bidi_txt = lv_draw_get_buf(line_end - line_start + 1);
- lv_bidi_process_paragraph(txt + line_start, bidi_txt, line_end - line_start, bidi_dir, NULL, 0);
-#else
- (void)bidi_dir;
- const char *bidi_txt = txt + line_start;
-#endif
-
- while(i < line_end - line_start) {
- uint16_t logical_char_pos = 0;
- if(sel_start != 0xFFFF && sel_end != 0xFFFF) {
-#if LV_USE_BIDI
- logical_char_pos = lv_txt_encoded_get_char_id(txt, line_start);
- uint16_t t = lv_txt_encoded_get_char_id(bidi_txt, i);
- logical_char_pos += lv_bidi_get_logical_pos(bidi_txt, NULL, line_end - line_start, bidi_dir, t, NULL);
-#else
- logical_char_pos = lv_txt_encoded_get_char_id(txt, line_start + i);
-#endif
- }
-
- letter = lv_txt_encoded_next(bidi_txt, &i);
- letter_next = lv_txt_encoded_next(&bidi_txt[i], NULL);
-
-
- /*Handle the re-color command*/
- if((flag & LV_TXT_FLAG_RECOLOR) != 0) {
- if(letter == (uint32_t)LV_TXT_COLOR_CMD[0]) {
- if(cmd_state == CMD_STATE_WAIT) { /*Start char*/
- par_start = i;
- cmd_state = CMD_STATE_PAR;
- continue;
- } else if(cmd_state == CMD_STATE_PAR) { /*Other start char in parameter escaped cmd. char */
- cmd_state = CMD_STATE_WAIT;
- } else if(cmd_state == CMD_STATE_IN) { /*Command end */
- cmd_state = CMD_STATE_WAIT;
- continue;
- }
- }
-
- /*Skip the color parameter and wait the space after it*/
- if(cmd_state == CMD_STATE_PAR) {
- if(letter == ' ') {
- /*Get the parameter*/
- if(i - par_start == LABEL_RECOLOR_PAR_LENGTH + 1) {
- char buf[LABEL_RECOLOR_PAR_LENGTH + 1];
- memcpy(buf, &bidi_txt[par_start], LABEL_RECOLOR_PAR_LENGTH);
- buf[LABEL_RECOLOR_PAR_LENGTH] = '\0';
- int r, g, b;
- r = (hex_char_to_num(buf[0]) << 4) + hex_char_to_num(buf[1]);
- g = (hex_char_to_num(buf[2]) << 4) + hex_char_to_num(buf[3]);
- b = (hex_char_to_num(buf[4]) << 4) + hex_char_to_num(buf[5]);
- recolor = lv_color_make(r, g, b);
- } else {
- recolor.full = style->text.color.full;
- }
- cmd_state = CMD_STATE_IN; /*After the parameter the text is in the command*/
- }
- continue;
- }
- }
-
- lv_color_t color = style->text.color;
-
- if(cmd_state == CMD_STATE_IN) color = recolor;
-
- letter_w = lv_font_get_glyph_width(font, letter, letter_next);
-
- if(sel_start != 0xFFFF && sel_end != 0xFFFF) {
- if(logical_char_pos >= sel_start && logical_char_pos < sel_end) {
- lv_area_t sel_coords;
- sel_coords.x1 = pos.x;
- sel_coords.y1 = pos.y;
- sel_coords.x2 = pos.x + letter_w + style->text.letter_space - 1;
- sel_coords.y2 = pos.y + line_height - 1;
- lv_draw_rect(&sel_coords, mask, &sel_style, opa);
- }
- }
-
- lv_draw_letter(&pos, mask, font, letter, color, opa);
-
- if(letter_w > 0) {
- pos.x += letter_w + style->text.letter_space;
- }
- }
- /*Go to next line*/
- line_start = line_end;
- line_end += lv_txt_get_next_line(&txt[line_start], font, style->text.letter_space, w, flag);
-
- pos.x = coords->x1;
- /*Align to middle*/
- if(flag & LV_TXT_FLAG_CENTER) {
- line_width =
- lv_txt_get_width(&txt[line_start], line_end - line_start, font, style->text.letter_space, flag);
-
- pos.x += (lv_area_get_width(coords) - line_width) / 2;
-
- }
- /*Align to the right*/
- else if(flag & LV_TXT_FLAG_RIGHT) {
- line_width =
- lv_txt_get_width(&txt[line_start], line_end - line_start, font, style->text.letter_space, flag);
- pos.x += lv_area_get_width(coords) - line_width;
- }
-
- /*Go the next line position*/
- pos.y += line_height;
-
- if(pos.y > mask->y2) return;
- }
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Convert a hexadecimal characters to a number (0..15)
- * @param hex Pointer to a hexadecimal character (0..9, A..F)
- * @return the numerical value of `hex` or 0 on error
- */
-static uint8_t hex_char_to_num(char hex)
-{
- uint8_t result = 0;
-
- if(hex >= '0' && hex <= '9') {
- result = hex - '0';
- } else {
- if(hex >= 'a') hex -= 'a' - 'A'; /*Convert to upper case*/
-
- switch(hex) {
- case 'A': result = 10; break;
- case 'B': result = 11; break;
- case 'C': result = 12; break;
- case 'D': result = 13; break;
- case 'E': result = 14; break;
- case 'F': result = 15; break;
- default: result = 0; break;
- }
- }
-
- return result;
-}
diff --git a/src/libs/lvgl/src/lv_draw/lv_draw_label.h b/src/libs/lvgl/src/lv_draw/lv_draw_label.h
deleted file mode 100644
index 6dc4d646..00000000
--- a/src/libs/lvgl/src/lv_draw/lv_draw_label.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * @file lv_draw_label.h
- *
- */
-
-#ifndef LV_DRAW_LABEL_H
-#define LV_DRAW_LABEL_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_draw.h"
-#include "../lv_misc/lv_bidi.h"
-
-/*********************
- * DEFINES
- *********************/
-#define LV_DRAW_LABEL_NO_TXT_SEL (0xFFFF)
-
-/**********************
- * TYPEDEFS
- **********************/
-
-typedef struct
-{
- uint16_t start;
- uint16_t end;
-}lv_draw_label_txt_sel_t;
-
-
-/** Store some info to speed up drawing of very large texts
- * It takes a lot of time to get the first visible character because
- * all the previous characters needs to be checked to calculate the positions.
- * This structure stores an earlier (e.g. at -1000 px) coordinate and the index of that line.
- * Therefore the calculations can start from here.*/
-typedef struct {
- /** Index of the line at `y` coordinate*/
- int32_t line_start;
-
- /** Give the `y` coordinate of the first letter at `line start` index. Relative to the label's coordinates*/
- int32_t y;
-
- /** The 'y1' coordinate of the label when the hint was saved.
- * Used to invalidate the hint if the label has moved too much. */
- int32_t coord_y;
-}lv_draw_label_hint_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Write a text
- * @param coords coordinates of the label
- * @param mask the label will be drawn only in this area
- * @param style pointer to a style
- * @param opa_scale scale down all opacities by the factor
- * @param txt 0 terminated text to write
- * @param flag settings for the text from 'txt_flag_t' enum
- * @param offset text offset in x and y direction (NULL if unused)
- * @param sel_start start index of selected area (`LV_LABEL_TXT_SEL_OFF` if none)
- * @param bidi_dir base direction of the text
- */
-void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale,
- const char * txt, lv_txt_flag_t flag, lv_point_t * offset, lv_draw_label_txt_sel_t * sel,
- lv_draw_label_hint_t * hint, lv_bidi_dir_t bidi_dir);
-
-/**********************
- * MACROS
- **********************/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_DRAW_LABEL_H*/
diff --git a/src/libs/lvgl/src/lv_draw/lv_draw_line.c b/src/libs/lvgl/src/lv_draw/lv_draw_line.c
deleted file mode 100644
index a522a4b5..00000000
--- a/src/libs/lvgl/src/lv_draw/lv_draw_line.c
+++ /dev/null
@@ -1,637 +0,0 @@
-/**
- * @file lv_draw_line.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include <stdio.h>
-#include <stdbool.h>
-#include "lv_draw.h"
-#include "../lv_core/lv_refr.h"
-#include "../lv_misc/lv_math.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-typedef struct
-{
- lv_point_t p1;
- lv_point_t p2;
- lv_point_t p_act;
- lv_coord_t dx;
- lv_coord_t sx; /*-1: x1 < x2; 1: x2 >= x1*/
- lv_coord_t dy;
- lv_coord_t sy; /*-1: y1 < y2; 1: y2 >= y1*/
- lv_coord_t err;
- lv_coord_t e2;
- bool hor; /*Rather horizontal or vertical*/
-} line_draw_t;
-
-typedef struct
-{
- lv_coord_t width;
- lv_coord_t width_1;
- lv_coord_t width_half;
-} line_width_t;
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static void line_draw_hor(line_draw_t * main_line, const lv_area_t * mask, const lv_style_t * style,
- lv_opa_t opa_scale);
-static void line_draw_ver(line_draw_t * main_line, const lv_area_t * mask, const lv_style_t * style,
- lv_opa_t opa_scale);
-static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_t * mask, const lv_style_t * style,
- lv_opa_t opa_scale);
-static void line_init(line_draw_t * line, const lv_point_t * p1, const lv_point_t * p2);
-static bool line_next(line_draw_t * line);
-static bool line_next_y(line_draw_t * line);
-static bool line_next_x(line_draw_t * line);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Draw a line
- * @param point1 first point of the line
- * @param point2 second point of the line
- * @param mask the line will be drawn only on this area
- * @param style pointer to a line's style
- * @param opa_scale scale down all opacities by the factor
- */
-void lv_draw_line(const lv_point_t * point1, const lv_point_t * point2, const lv_area_t * mask,
- const lv_style_t * style, lv_opa_t opa_scale)
-{
-
- if(style->line.width == 0) return;
- if(point1->x == point2->x && point1->y == point2->y) return;
-
- /*Return if the points are out of the mask*/
- if(point1->x < mask->x1 - style->line.width && point2->x < mask->x1 - style->line.width) return;
- if(point1->x > mask->x2 + style->line.width && point2->x > mask->x2 + style->line.width) return;
- if(point1->y < mask->y1 - style->line.width && point2->y < mask->y1 - style->line.width) return;
- if(point1->y > mask->y2 + style->line.width && point2->y > mask->y2 + style->line.width) return;
-
- line_draw_t main_line;
- lv_point_t p1;
- lv_point_t p2;
-
- /*If the line if rather vertical then be sure y1 < y2 else x1 < x2*/
-
- if(LV_MATH_ABS(point1->x - point2->x) > LV_MATH_ABS(point1->y - point2->y)) {
-
- /*Steps less in y then x -> rather horizontal*/
- if(point1->x < point2->x) {
- p1.x = point1->x;
- p1.y = point1->y;
- p2.x = point2->x;
- p2.y = point2->y;
- } else {
- p1.x = point2->x;
- p1.y = point2->y;
- p2.x = point1->x;
- p2.y = point1->y;
- }
- } else {
- /*Steps less in x then y -> rather vertical*/
- if(point1->y < point2->y) {
- p1.x = point1->x;
- p1.y = point1->y;
- p2.x = point2->x;
- p2.y = point2->y;
- } else {
- p1.x = point2->x;
- p1.y = point2->y;
- p2.x = point1->x;
- p2.y = point1->y;
- }
- }
-
- line_init(&main_line, &p1, &p2);
-
- /*Special case draw a horizontal line*/
- if(main_line.p1.y == main_line.p2.y) {
- line_draw_hor(&main_line, mask, style, opa_scale);
- }
- /*Special case draw a vertical line*/
- else if(main_line.p1.x == main_line.p2.x) {
- line_draw_ver(&main_line, mask, style, opa_scale);
- }
- /*Arbitrary skew line*/
- else {
- bool dir_ori = false;
-#if LV_ANTIALIAS
- bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing());
- if(aa) {
- lv_point_t p_tmp;
-
- if(main_line.hor) {
- if(main_line.p1.y < main_line.p2.y) {
- dir_ori = true;
- p_tmp.x = main_line.p2.x;
- p_tmp.y = main_line.p2.y - 1;
- line_init(&main_line, &p1, &p_tmp);
- main_line.sy = LV_MATH_ABS(main_line.sy); /*The sign can change if the line becomes horizontal*/
- } else if(main_line.p1.y > main_line.p2.y) {
- dir_ori = false;
- p_tmp.x = main_line.p2.x;
- p_tmp.y = main_line.p2.y + 1;
- line_init(&main_line, &p1, &p_tmp);
- main_line.sy = -LV_MATH_ABS(main_line.sy); /*The sign can change if the line becomes horizontal*/
- }
- } else {
- if(main_line.p1.x < main_line.p2.x) {
- dir_ori = true;
- p_tmp.x = main_line.p2.x - 1;
- p_tmp.y = main_line.p2.y;
- line_init(&main_line, &p1, &p_tmp);
- main_line.sx = LV_MATH_ABS(main_line.sx); /*The sign can change if the line becomes vertical*/
- } else if(main_line.p1.x > main_line.p2.x) {
- dir_ori = false;
- p_tmp.x = main_line.p2.x + 1;
- p_tmp.y = main_line.p2.y;
- line_init(&main_line, &p1, &p_tmp);
- main_line.sx = -LV_MATH_ABS(main_line.sx); /*The sign can change if the line becomes vertical*/
- }
- }
- }
-#endif
- line_draw_skew(&main_line, dir_ori, mask, style, opa_scale);
- }
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-static void line_draw_hor(line_draw_t * main_line, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale)
-{
- lv_coord_t width = style->line.width - 1;
- lv_coord_t width_half = width >> 1;
- lv_coord_t width_1 = width & 0x1;
- lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->line.opa : (uint16_t)((uint16_t)style->line.opa * opa_scale) >> 8;
-
- lv_area_t act_area;
- act_area.x1 = main_line->p1.x;
- act_area.x2 = main_line->p2.x;
- act_area.y1 = main_line->p1.y - width_half - width_1;
- act_area.y2 = main_line->p2.y + width_half;
-
- lv_area_t draw_area;
- draw_area.x1 = LV_MATH_MIN(act_area.x1, act_area.x2);
- draw_area.x2 = LV_MATH_MAX(act_area.x1, act_area.x2);
- draw_area.y1 = LV_MATH_MIN(act_area.y1, act_area.y2);
- draw_area.y2 = LV_MATH_MAX(act_area.y1, act_area.y2);
- lv_draw_fill(&draw_area, mask, style->line.color, opa);
-}
-
-static void line_draw_ver(line_draw_t * main_line, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale)
-{
- lv_coord_t width = style->line.width - 1;
- lv_coord_t width_half = width >> 1;
- lv_coord_t width_1 = width & 0x1;
- lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->line.opa : (uint16_t)((uint16_t)style->line.opa * opa_scale) >> 8;
-
- lv_area_t act_area;
- act_area.x1 = main_line->p1.x - width_half;
- act_area.x2 = main_line->p2.x + width_half + width_1;
- act_area.y1 = main_line->p1.y;
- act_area.y2 = main_line->p2.y;
-
- lv_area_t draw_area;
- draw_area.x1 = LV_MATH_MIN(act_area.x1, act_area.x2);
- draw_area.x2 = LV_MATH_MAX(act_area.x1, act_area.x2);
- draw_area.y1 = LV_MATH_MIN(act_area.y1, act_area.y2);
- draw_area.y2 = LV_MATH_MAX(act_area.y1, act_area.y2);
- lv_draw_fill(&draw_area, mask, style->line.color, opa);
-}
-
-static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_t * mask, const lv_style_t * style,
- lv_opa_t opa_scale)
-{
-
- lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->line.opa : (uint16_t)((uint16_t)style->line.opa * opa_scale) >> 8;
-#if LV_ANTIALIAS
- bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing());
-#endif
- lv_point_t vect_main, vect_norm;
- vect_main.x = main_line->p2.x - main_line->p1.x;
- vect_main.y = main_line->p2.y - main_line->p1.y;
-
- if(main_line->hor) {
- if(main_line->p1.y < main_line->p2.y + dir_ori) {
- vect_norm.x = -vect_main.y;
- vect_norm.y = vect_main.x;
- } else {
- vect_norm.x = vect_main.y;
- vect_norm.y = -vect_main.x;
- }
- } else {
- if(main_line->p1.x < main_line->p2.x + dir_ori) {
- vect_norm.x = vect_main.y;
- vect_norm.y = -vect_main.x;
- } else {
- vect_norm.x = -vect_main.y;
- vect_norm.y = vect_main.x;
- }
- }
-
- /* In case of a short but tick line the perpendicular ending is longer then the real line.
- * it would break the calculations so make the normal vector larger*/
- vect_norm.x = vect_norm.x << 4;
- vect_norm.y = vect_norm.y << 4;
-
- lv_coord_t width;
- width = style->line.width;
-
- /* The pattern stores the points of the line ending. It has the good direction and length.
- * The worth case is the 45° line where pattern can have 1.41 x `width` points*/
-
- lv_coord_t pattern_size = width * 2;
- lv_point_t * pattern = lv_draw_get_buf(pattern_size * sizeof(lv_point_t));
- lv_coord_t i = 0;
-
- /*Create a perpendicular pattern (a small line)*/
- if(width != 0) {
- line_draw_t pattern_line;
- lv_point_t p0 = {0, 0};
- line_init(&pattern_line, &p0, &vect_norm);
-
- uint32_t width_sqr = width * width;
- /* Run for a lot of times. Meanwhile the real width will be determined as well */
- for(i = 0; i < (lv_coord_t)pattern_size - 1; i++) {
- pattern[i].x = pattern_line.p_act.x;
- pattern[i].y = pattern_line.p_act.y;
-
- /*Finish the pattern line if it's length equal to the desired width (Use Pythagoras
- * theorem)*/
- uint32_t sqr = pattern_line.p_act.x * pattern_line.p_act.x + pattern_line.p_act.y * pattern_line.p_act.y;
- if(sqr >= width_sqr) {
- width = i;
-#if LV_ANTIALIAS
- if(aa) width--;
-#endif
- break;
- }
-
- line_next(&pattern_line);
- }
- }
-
-#if LV_ANTIALIAS
- lv_coord_t aa_last_corner;
- lv_coord_t width_safe = width;
- if(aa) {
- if(width == 0) width_safe = 1;
-
- aa_last_corner = 0;
- }
-#endif
-
- lv_coord_t x_center_ofs = 0;
- lv_coord_t y_center_ofs = 0;
-
- if(width != 0) {
- x_center_ofs = pattern[width - 1].x / 2;
- y_center_ofs = pattern[width - 1].y / 2;
- } else {
- if(main_line->hor && main_line->p1.y >= main_line->p2.y + dir_ori) pattern[0].y--;
- if(!main_line->hor && main_line->p1.x >= main_line->p2.x + dir_ori) pattern[0].x--;
- }
-
- /* Make the coordinates relative to the center */
- for(i = 0; i < width; i++) {
- pattern[i].x -= x_center_ofs;
- pattern[i].y -= y_center_ofs;
-#if LV_ANTIALIAS
- if(aa) {
- if(i != 0) {
- if(main_line->hor) {
- if(pattern[i - 1].x != pattern[i].x) {
- lv_coord_t seg_w = pattern[i].y - pattern[aa_last_corner].y;
- if(main_line->sy < 0) {
- lv_draw_aa_ver_seg(main_line->p1.x + pattern[aa_last_corner].x - 1,
- main_line->p1.y + pattern[aa_last_corner].y + seg_w + 1, seg_w, mask,
- style->line.color, opa);
-
- lv_draw_aa_ver_seg(main_line->p2.x + pattern[aa_last_corner].x + 1,
- main_line->p2.y + pattern[aa_last_corner].y + seg_w + 1, -seg_w, mask,
- style->line.color, opa);
- } else {
- lv_draw_aa_ver_seg(main_line->p1.x + pattern[aa_last_corner].x - 1,
- main_line->p1.y + pattern[aa_last_corner].y, seg_w, mask,
- style->line.color, opa);
-
- lv_draw_aa_ver_seg(main_line->p2.x + pattern[aa_last_corner].x + 1,
- main_line->p2.y + pattern[aa_last_corner].y, -seg_w, mask,
- style->line.color, opa);
- }
- aa_last_corner = i;
- }
- } else {
- if(pattern[i - 1].y != pattern[i].y) {
- lv_coord_t seg_w = pattern[i].x - pattern[aa_last_corner].x;
- if(main_line->sx < 0) {
- lv_draw_aa_hor_seg(main_line->p1.x + pattern[aa_last_corner].x + seg_w + 1,
- main_line->p1.y + pattern[aa_last_corner].y - 1, seg_w, mask,
- style->line.color, opa);
-
- lv_draw_aa_hor_seg(main_line->p2.x + pattern[aa_last_corner].x + seg_w + 1,
- main_line->p2.y + pattern[aa_last_corner].y + 1, -seg_w, mask,
- style->line.color, opa);
- } else {
- lv_draw_aa_hor_seg(main_line->p1.x + pattern[aa_last_corner].x,
- main_line->p1.y + pattern[aa_last_corner].y - 1, seg_w, mask,
- style->line.color, opa);
-
- lv_draw_aa_hor_seg(main_line->p2.x + pattern[aa_last_corner].x,
- main_line->p2.y + pattern[aa_last_corner].y + 1, -seg_w, mask,
- style->line.color, opa);
- }
- aa_last_corner = i;
- }
- }
- }
- }
-#endif
- }
-
-#if LV_ANTIALIAS
- /*Add the last part of anti-aliasing for the perpendicular ending*/
- if(width != 0 && aa) { /*Due to rounding error with very thin lines it looks ugly*/
- if(main_line->hor) {
- lv_coord_t seg_w = pattern[width_safe - 1].y - pattern[aa_last_corner].y;
- if(main_line->sy < 0) {
- lv_draw_aa_ver_seg(main_line->p1.x + pattern[aa_last_corner].x - 1,
- main_line->p1.y + pattern[aa_last_corner].y + seg_w, seg_w + main_line->sy, mask,
- style->line.color, opa);
-
- lv_draw_aa_ver_seg(main_line->p2.x + pattern[aa_last_corner].x + 1,
- main_line->p2.y + pattern[aa_last_corner].y + seg_w, -(seg_w + main_line->sy), mask,
- style->line.color, opa);
-
- } else {
- lv_draw_aa_ver_seg(main_line->p1.x + pattern[aa_last_corner].x - 1,
- main_line->p1.y + pattern[aa_last_corner].y, seg_w + main_line->sy, mask,
- style->line.color, opa);
-
- lv_draw_aa_ver_seg(main_line->p2.x + pattern[aa_last_corner].x + 1,
- main_line->p2.y + pattern[aa_last_corner].y, -(seg_w + main_line->sy), mask,
- style->line.color, opa);
- }
- } else {
- lv_coord_t seg_w = pattern[width_safe - 1].x - pattern[aa_last_corner].x;
- if(main_line->sx < 0) {
- lv_draw_aa_hor_seg(main_line->p1.x + pattern[aa_last_corner].x + seg_w,
- main_line->p1.y + pattern[aa_last_corner].y - 1, seg_w + main_line->sx, mask,
- style->line.color, opa);
-
- lv_draw_aa_hor_seg(main_line->p2.x + pattern[aa_last_corner].x + seg_w,
- main_line->p2.y + pattern[aa_last_corner].y + 1, -(seg_w + main_line->sx), mask,
- style->line.color, opa);
-
- } else {
- lv_draw_aa_hor_seg(main_line->p1.x + pattern[aa_last_corner].x,
- main_line->p1.y + pattern[aa_last_corner].y - 1, seg_w + main_line->sx, mask,
- style->line.color, opa);
-
- lv_draw_aa_hor_seg(main_line->p2.x + pattern[aa_last_corner].x,
- main_line->p2.y + pattern[aa_last_corner].y + 1, -(seg_w + main_line->sx), mask,
- style->line.color, opa);
- }
- }
- }
-#endif
-
-#if LV_ANTIALIAS
-
- /*Shift the anti aliasing on the edges (-1, 1 or 0 (zero only in case width == 0))*/
- lv_coord_t aa_shift1 = 0;
- lv_coord_t aa_shift2 = 0;
- if(aa) {
- if(main_line->hor == false) {
- if(main_line->sx < 0) {
- aa_shift1 = -1;
- aa_shift2 = width == 0 ? 0 : aa_shift1;
- } else {
- aa_shift2 = 1;
- aa_shift1 = width == 0 ? 0 : aa_shift2;
- }
- } else {
- if(main_line->sy < 0) {
- aa_shift1 = -1;
- aa_shift2 = width == 0 ? 0 : aa_shift1;
- } else {
- aa_shift2 = 1;
- aa_shift1 = width == 0 ? 0 : aa_shift2;
- }
- }
- }
-#endif
-
- volatile lv_point_t prev_p;
- prev_p.x = main_line->p1.x;
- prev_p.y = main_line->p1.y;
- lv_area_t draw_area;
- bool first_run = true;
-
- if(main_line->hor) {
- while(line_next_y(main_line)) {
- for(i = 0; i < width; i++) {
- draw_area.x1 = prev_p.x + pattern[i].x;
- draw_area.y1 = prev_p.y + pattern[i].y;
- draw_area.x2 = draw_area.x1 + main_line->p_act.x - prev_p.x - 1;
- draw_area.y2 = draw_area.y1;
- lv_draw_fill(&draw_area, mask, style->line.color, opa);
-
- /* Fill the gaps
- * When stepping in y one pixel remains empty on every corner (don't do this on the
- * first segment ) */
- if(i != 0 && pattern[i].x != pattern[i - 1].x && !first_run) {
- lv_draw_px(draw_area.x1, draw_area.y1 - main_line->sy, mask, style->line.color, opa);
- }
- }
-
-#if LV_ANTIALIAS
- if(aa) {
- lv_draw_aa_hor_seg(prev_p.x + pattern[0].x, prev_p.y + pattern[0].y - aa_shift1,
- -(main_line->p_act.x - prev_p.x), mask, style->line.color, opa);
- lv_draw_aa_hor_seg(prev_p.x + pattern[width_safe - 1].x,
- prev_p.y + pattern[width_safe - 1].y + aa_shift2, main_line->p_act.x - prev_p.x,
- mask, style->line.color, opa);
- }
-#endif
-
- first_run = false;
-
- prev_p.x = main_line->p_act.x;
- prev_p.y = main_line->p_act.y;
- }
-
- for(i = 0; i < width; i++) {
- draw_area.x1 = prev_p.x + pattern[i].x;
- draw_area.y1 = prev_p.y + pattern[i].y;
- draw_area.x2 = draw_area.x1 + main_line->p_act.x - prev_p.x;
- draw_area.y2 = draw_area.y1;
- lv_draw_fill(&draw_area, mask, style->line.color, opa);
-
- /* Fill the gaps
- * When stepping in y one pixel remains empty on every corner */
- if(i != 0 && pattern[i].x != pattern[i - 1].x && !first_run) {
- lv_draw_px(draw_area.x1, draw_area.y1 - main_line->sy, mask, style->line.color, opa);
- }
- }
-
-#if LV_ANTIALIAS
- if(aa) {
- lv_draw_aa_hor_seg(prev_p.x + pattern[0].x, prev_p.y + pattern[0].y - aa_shift1,
- -(main_line->p_act.x - prev_p.x + 1), mask, style->line.color, opa);
- lv_draw_aa_hor_seg(prev_p.x + pattern[width_safe - 1].x, prev_p.y + pattern[width_safe - 1].y + aa_shift2,
- main_line->p_act.x - prev_p.x + 1, mask, style->line.color, opa);
- }
-#endif
- }
- /*Rather a vertical line*/
- else {
-
- while(line_next_x(main_line)) {
- for(i = 0; i < width; i++) {
- draw_area.x1 = prev_p.x + pattern[i].x;
- draw_area.y1 = prev_p.y + pattern[i].y;
- draw_area.x2 = draw_area.x1;
- draw_area.y2 = draw_area.y1 + main_line->p_act.y - prev_p.y - 1;
-
- lv_draw_fill(&draw_area, mask, style->line.color, opa);
-
- /* Fill the gaps
- * When stepping in x one pixel remains empty on every corner (don't do this on the
- * first segment ) */
- if(i != 0 && pattern[i].y != pattern[i - 1].y && !first_run) {
- lv_draw_px(draw_area.x1 - main_line->sx, draw_area.y1, mask, style->line.color, opa);
- }
- }
-
-#if LV_ANTIALIAS
- if(aa) {
- lv_draw_aa_ver_seg(prev_p.x + pattern[0].x - aa_shift1, prev_p.y + pattern[0].y,
- -(main_line->p_act.y - prev_p.y), mask, style->line.color, opa);
- lv_draw_aa_ver_seg(prev_p.x + pattern[width_safe - 1].x + aa_shift2,
- prev_p.y + pattern[width_safe - 1].y, main_line->p_act.y - prev_p.y, mask,
- style->line.color, opa);
- }
-#endif
-
- first_run = false;
-
- prev_p.x = main_line->p_act.x;
- prev_p.y = main_line->p_act.y;
- }
-
- /*Draw the last part*/
- for(i = 0; i < width; i++) {
- draw_area.x1 = prev_p.x + pattern[i].x;
- draw_area.y1 = prev_p.y + pattern[i].y;
- draw_area.x2 = draw_area.x1;
- draw_area.y2 = draw_area.y1 + main_line->p_act.y - prev_p.y;
-
- lv_draw_fill(&draw_area, mask, style->line.color, opa);
-
- /* Fill the gaps
- * When stepping in x one pixel remains empty on every corner */
- if(i != 0 && pattern[i].y != pattern[i - 1].y && !first_run) {
- lv_draw_px(draw_area.x1 - main_line->sx, draw_area.y1, mask, style->line.color, opa);
- }
- }
-
-#if LV_ANTIALIAS
- if(aa) {
- lv_draw_aa_ver_seg(prev_p.x + pattern[0].x - aa_shift1, prev_p.y + pattern[0].y,
- -(main_line->p_act.y - prev_p.y + 1), mask, style->line.color, opa);
- lv_draw_aa_ver_seg(prev_p.x + pattern[width_safe - 1].x + aa_shift2, prev_p.y + pattern[width_safe - 1].y,
- main_line->p_act.y - prev_p.y + 1, mask, style->line.color, opa);
- }
-#endif
- }
-}
-
-static void line_init(line_draw_t * line, const lv_point_t * p1, const lv_point_t * p2)
-{
- line->p1.x = p1->x;
- line->p1.y = p1->y;
- line->p2.x = p2->x;
- line->p2.y = p2->y;
-
- line->dx = LV_MATH_ABS(line->p2.x - line->p1.x);
- line->sx = line->p1.x < line->p2.x ? 1 : -1;
- line->dy = LV_MATH_ABS(line->p2.y - line->p1.y);
- line->sy = line->p1.y < line->p2.y ? 1 : -1;
- line->err = (line->dx > line->dy ? line->dx : -line->dy) / 2;
- line->e2 = 0;
- line->hor = line->dx > line->dy ? true : false; /*Rather horizontal or vertical*/
-
- line->p_act.x = line->p1.x;
- line->p_act.y = line->p1.y;
-}
-
-static bool line_next(line_draw_t * line)
-{
- if(line->p_act.x == line->p2.x && line->p_act.y == line->p2.y) return false;
- line->e2 = line->err;
- if(line->e2 > -line->dx) {
- line->err -= line->dy;
- line->p_act.x += line->sx;
- }
- if(line->e2 < line->dy) {
- line->err += line->dx;
- line->p_act.y += line->sy;
- }
- return true;
-}
-
-/**
- * Iterate until step one in y direction.
- * @param line
- * @return
- */
-static bool line_next_y(line_draw_t * line)
-{
- lv_coord_t last_y = line->p_act.y;
-
- do {
- if(!line_next(line)) return false;
- } while(last_y == line->p_act.y);
-
- return true;
-}
-
-/**
- * Iterate until step one in x direction.
- * @param line
- * @return
- */
-static bool line_next_x(line_draw_t * line)
-{
- lv_coord_t last_x = line->p_act.x;
-
- do {
- if(!line_next(line)) return false;
- } while(last_x == line->p_act.x);
-
- return true;
-}
diff --git a/src/libs/lvgl/src/lv_draw/lv_draw_line.h b/src/libs/lvgl/src/lv_draw/lv_draw_line.h
deleted file mode 100644
index 208bd051..00000000
--- a/src/libs/lvgl/src/lv_draw/lv_draw_line.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * @file lv_draw_line.h
- *
- */
-
-#ifndef LV_DRAW_LINE_H
-#define LV_DRAW_LINE_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Draw a line
- * @param point1 first point of the line
- * @param point2 second point of the line
- * @param mask the line will be drawn only on this area
- * @param style pointer to a line's style
- * @param opa_scale scale down all opacities by the factor
- */
-void lv_draw_line(const lv_point_t * point1, const lv_point_t * point2, const lv_area_t * mask,
- const lv_style_t * style, lv_opa_t opa_scale);
-
-/**********************
- * MACROS
- **********************/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_DRAW_LINE_H*/
diff --git a/src/libs/lvgl/src/lv_draw/lv_draw_rect.c b/src/libs/lvgl/src/lv_draw/lv_draw_rect.c
deleted file mode 100644
index 0964a46a..00000000
--- a/src/libs/lvgl/src/lv_draw/lv_draw_rect.c
+++ /dev/null
@@ -1,1521 +0,0 @@
-/**
- * @file lv_draw_rect.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_draw_rect.h"
-#include "../lv_misc/lv_circ.h"
-#include "../lv_misc/lv_math.h"
-#include "../lv_core/lv_refr.h"
-
-/*********************
- * DEFINES
- *********************/
-/*Circle segment greater then this value will be anti-aliased by a non-linear (cos) opacity
- * mapping*/
-#define CIRCLE_AA_NON_LINEAR_OPA_THRESHOLD 1
-
-/*Calculate with 2^x bigger shadow opacity values to avoid rounding errors*/
-#define SHADOW_OPA_EXTRA_PRECISION 8
-
-/*Add extra radius with LV_SHADOW_BOTTOM to cover anti-aliased corners*/
-#define SHADOW_BOTTOM_AA_EXTRA_RADIUS 3
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static void lv_draw_rect_main_mid(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style,
- lv_opa_t opa_scale);
-static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style,
- lv_opa_t opa_scale);
-static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style,
- lv_opa_t opa_scale);
-static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style,
- lv_opa_t opa_scale);
-
-#if LV_USE_SHADOW
-static void lv_draw_shadow(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style,
- lv_opa_t opa_scale);
-static void lv_draw_shadow_full(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style,
- lv_opa_t opa_scale);
-static void lv_draw_shadow_bottom(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style,
- lv_opa_t opa_scale);
-static void lv_draw_shadow_full_straight(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style,
- const lv_opa_t * map);
-#endif
-
-static uint16_t lv_draw_cont_radius_corr(uint16_t r, lv_coord_t w, lv_coord_t h);
-
-#if LV_ANTIALIAS
-static lv_opa_t antialias_get_opa_circ(lv_coord_t seg, lv_coord_t px_id, lv_opa_t opa);
-#endif
-
-/**********************
- * STATIC VARIABLES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Draw a rectangle
- * @param coords the coordinates of the rectangle
- * @param mask the rectangle will be drawn only in this mask
- * @param style pointer to a style
- * @param opa_scale scale down all opacities by the factor
- */
-void lv_draw_rect(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale)
-{
- if(lv_area_get_height(coords) < 1 || lv_area_get_width(coords) < 1) return;
-
-#if LV_USE_SHADOW
- if(style->body.shadow.width != 0) {
- lv_draw_shadow(coords, mask, style, opa_scale);
- }
-#endif
-
- /* If the object is out of the mask there is nothing to draw.
- * Draw shadow before it because the shadow is out of `coords`*/
- if(lv_area_is_on(coords, mask) == false) return;
-
- if(style->body.opa > LV_OPA_MIN) {
- lv_draw_rect_main_mid(coords, mask, style, opa_scale);
-
- if(style->body.radius != 0) {
- lv_draw_rect_main_corner(coords, mask, style, opa_scale);
- }
- }
-
- if(style->body.border.width != 0 && style->body.border.part != LV_BORDER_NONE &&
- style->body.border.opa >= LV_OPA_MIN) {
- lv_draw_rect_border_straight(coords, mask, style, opa_scale);
-
- if(style->body.radius != 0) {
- lv_draw_rect_border_corner(coords, mask, style, opa_scale);
- }
- }
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Draw the middle part (rectangular) of a rectangle
- * @param coords the coordinates of the original rectangle
- * @param mask the rectangle will be drawn only on this area
- * @param rects_p pointer to a rectangle style
- * @param opa_scale scale down all opacities by the factor
- */
-static void lv_draw_rect_main_mid(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style,
- lv_opa_t opa_scale)
-{
- uint16_t radius = style->body.radius;
- bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing());
-
- lv_color_t mcolor = style->body.main_color;
- lv_color_t gcolor = style->body.grad_color;
- uint8_t mix;
- lv_coord_t height = lv_area_get_height(coords);
- lv_coord_t width = lv_area_get_width(coords);
- lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->body.opa : (uint16_t)((uint16_t)style->body.opa * opa_scale) >> 8;
-
- radius = lv_draw_cont_radius_corr(radius, width, height);
-
- /*If the radius is too big then there is no body*/
- if(radius > height / 2) return;
-
- lv_area_t work_area;
- work_area.x1 = coords->x1;
- work_area.x2 = coords->x2;
-
- if(mcolor.full == gcolor.full) {
- work_area.y1 = coords->y1 + radius;
- work_area.y2 = coords->y2 - radius;
-
- if(style->body.radius != 0) {
-
- if(aa) {
- work_area.y1 += 2;
- work_area.y2 -= 2;
- } else {
- work_area.y1 += 1;
- work_area.y2 -= 1;
- }
- }
-
- lv_draw_fill(&work_area, mask, mcolor, opa);
- } else {
- lv_coord_t row;
- lv_coord_t row_start = coords->y1 + radius;
- lv_coord_t row_end = coords->y2 - radius;
- lv_color_t act_color;
-
- if(style->body.radius != 0) {
- if(aa) {
- row_start += 2;
- row_end -= 2;
- } else {
- row_start += 1;
- row_end -= 1;
- }
- }
- if(row_start < 0) row_start = 0;
-
- for(row = row_start; row <= row_end; row++) {
- work_area.y1 = row;
- work_area.y2 = row;
- mix = (uint32_t)((uint32_t)(coords->y2 - work_area.y1) * 255) / height;
- act_color = lv_color_mix(mcolor, gcolor, mix);
-
- lv_draw_fill(&work_area, mask, act_color, opa);
- }
- }
-}
-/**
- * Draw the top and bottom parts (corners) of a rectangle
- * @param coords the coordinates of the original rectangle
- * @param mask the rectangle will be drawn only on this area
- * @param rects_p pointer to a rectangle style
- * @param opa_scale scale down all opacities by the factor
- */
-static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style,
- lv_opa_t opa_scale)
-{
- uint16_t radius = style->body.radius;
- bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing());
-
- lv_color_t mcolor = style->body.main_color;
- lv_color_t gcolor = style->body.grad_color;
- lv_color_t act_color;
- lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->body.opa : (uint16_t)((uint16_t)style->body.opa * opa_scale) >> 8;
- uint8_t mix;
- lv_coord_t height = lv_area_get_height(coords);
- lv_coord_t width = lv_area_get_width(coords);
-
- radius = lv_draw_cont_radius_corr(radius, width, height);
-
- lv_point_t lt_origo; /*Left Top origo*/
- lv_point_t lb_origo; /*Left Bottom origo*/
- lv_point_t rt_origo; /*Right Top origo*/
- lv_point_t rb_origo; /*Left Bottom origo*/
-
- lt_origo.x = coords->x1 + radius + aa;
- lt_origo.y = coords->y1 + radius + aa;
-
- lb_origo.x = coords->x1 + radius + aa;
- lb_origo.y = coords->y2 - radius - aa;
-
- rt_origo.x = coords->x2 - radius - aa;
- rt_origo.y = coords->y1 + radius + aa;
-
- rb_origo.x = coords->x2 - radius - aa;
- rb_origo.y = coords->y2 - radius - aa;
-
- lv_area_t edge_top_area;
- lv_area_t mid_top_area;
- lv_area_t mid_bot_area;
- lv_area_t edge_bot_area;
-
- lv_point_t cir;
- lv_coord_t cir_tmp;
- lv_circ_init(&cir, &cir_tmp, radius);
-
- /*Init the areas*/
- lv_area_set(&mid_bot_area, lb_origo.x + LV_CIRC_OCT4_X(cir), lb_origo.y + LV_CIRC_OCT4_Y(cir),
- rb_origo.x + LV_CIRC_OCT1_X(cir), rb_origo.y + LV_CIRC_OCT1_Y(cir));
-
- lv_area_set(&edge_bot_area, lb_origo.x + LV_CIRC_OCT3_X(cir), lb_origo.y + LV_CIRC_OCT3_Y(cir),
- rb_origo.x + LV_CIRC_OCT2_X(cir), rb_origo.y + LV_CIRC_OCT2_Y(cir));
-
- lv_area_set(&mid_top_area, lt_origo.x + LV_CIRC_OCT5_X(cir), lt_origo.y + LV_CIRC_OCT5_Y(cir),
- rt_origo.x + LV_CIRC_OCT8_X(cir), rt_origo.y + LV_CIRC_OCT8_Y(cir));
-
- lv_area_set(&edge_top_area, lt_origo.x + LV_CIRC_OCT6_X(cir), lt_origo.y + LV_CIRC_OCT6_Y(cir),
- rt_origo.x + LV_CIRC_OCT7_X(cir), rt_origo.y + LV_CIRC_OCT7_Y(cir));
-#if LV_ANTIALIAS
- /*Store some internal states for anti-aliasing*/
- lv_coord_t out_y_seg_start = 0;
- lv_coord_t out_y_seg_end = 0;
- lv_coord_t out_x_last = radius;
-
- lv_color_t aa_color_hor_top;
- lv_color_t aa_color_hor_bottom;
- lv_color_t aa_color_ver;
-#endif
-
- while(lv_circ_cont(&cir)) {
-#if LV_ANTIALIAS
- if(aa) {
- /*New step in y on the outter circle*/
- if(out_x_last != cir.x) {
- out_y_seg_end = cir.y;
- lv_coord_t seg_size = out_y_seg_end - out_y_seg_start;
- lv_point_t aa_p;
-
- aa_p.x = out_x_last;
- aa_p.y = out_y_seg_start;
-
- mix = (uint32_t)((uint32_t)(radius - out_x_last) * 255) / height;
- aa_color_hor_top = lv_color_mix(gcolor, mcolor, mix);
- aa_color_hor_bottom = lv_color_mix(mcolor, gcolor, mix);
-
- lv_coord_t i;
- for(i = 0; i < seg_size; i++) {
- lv_opa_t aa_opa;
- if(seg_size > CIRCLE_AA_NON_LINEAR_OPA_THRESHOLD) { /*Use non-linear opa mapping
- on the first segment*/
- aa_opa = antialias_get_opa_circ(seg_size, i, opa);
- } else {
- aa_opa = opa - lv_draw_aa_get_opa(seg_size, i, opa);
- }
-
- lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) + 1, mask,
- aa_color_hor_bottom, aa_opa);
- lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) + 1, mask,
- aa_color_hor_bottom, aa_opa);
- lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) - 1, mask,
- aa_color_hor_top, aa_opa);
- lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) - 1, mask,
- aa_color_hor_top, aa_opa);
-
- mix = (uint32_t)((uint32_t)(radius - out_y_seg_start + i) * 255) / height;
- aa_color_ver = lv_color_mix(mcolor, gcolor, mix);
- lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) + 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask,
- aa_color_ver, aa_opa);
- lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) - 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask,
- aa_color_ver, aa_opa);
-
- aa_color_ver = lv_color_mix(gcolor, mcolor, mix);
- lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) - 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask,
- aa_color_ver, aa_opa);
- lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) + 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask,
- aa_color_ver, aa_opa);
- }
-
- out_x_last = cir.x;
- out_y_seg_start = out_y_seg_end;
- }
- }
-#endif
- uint8_t edge_top_refr = 0;
- uint8_t mid_top_refr = 0;
- uint8_t mid_bot_refr = 0;
- uint8_t edge_bot_refr = 0;
-
- /* If a new row coming draw the previous
- * The y coordinate can remain the same so wait for a new*/
- if(mid_bot_area.y1 != LV_CIRC_OCT4_Y(cir) + lb_origo.y) mid_bot_refr = 1;
-
- if(edge_bot_area.y1 != LV_CIRC_OCT2_Y(cir) + lb_origo.y) edge_bot_refr = 1;
-
- if(mid_top_area.y1 != LV_CIRC_OCT8_Y(cir) + lt_origo.y) mid_top_refr = 1;
-
- if(edge_top_area.y1 != LV_CIRC_OCT7_Y(cir) + lt_origo.y) edge_top_refr = 1;
-
- /*Draw the areas which are not disabled*/
- if(edge_top_refr != 0) {
- if(mcolor.full == gcolor.full)
- act_color = mcolor;
- else {
- mix = (uint32_t)((uint32_t)(coords->y2 - edge_top_area.y1) * 255) / height;
- act_color = lv_color_mix(mcolor, gcolor, mix);
- }
- lv_draw_fill(&edge_top_area, mask, act_color, opa);
- }
-
- if(mid_top_refr != 0) {
- if(mcolor.full == gcolor.full)
- act_color = mcolor;
- else {
- mix = (uint32_t)((uint32_t)(coords->y2 - mid_top_area.y1) * 255) / height;
- act_color = lv_color_mix(mcolor, gcolor, mix);
- }
- lv_draw_fill(&mid_top_area, mask, act_color, opa);
- }
-
- if(mid_bot_refr != 0) {
- if(mcolor.full == gcolor.full)
- act_color = mcolor;
- else {
- mix = (uint32_t)((uint32_t)(coords->y2 - mid_bot_area.y1) * 255) / height;
- act_color = lv_color_mix(mcolor, gcolor, mix);
- }
- lv_draw_fill(&mid_bot_area, mask, act_color, opa);
- }
-
- if(edge_bot_refr != 0) {
-
- if(mcolor.full == gcolor.full)
- act_color = mcolor;
- else {
- mix = (uint32_t)((uint32_t)(coords->y2 - edge_bot_area.y1) * 255) / height;
- act_color = lv_color_mix(mcolor, gcolor, mix);
- }
- lv_draw_fill(&edge_bot_area, mask, act_color, opa);
- }
-
- /*Save the current coordinates*/
- lv_area_set(&mid_bot_area, lb_origo.x + LV_CIRC_OCT4_X(cir), lb_origo.y + LV_CIRC_OCT4_Y(cir),
- rb_origo.x + LV_CIRC_OCT1_X(cir), rb_origo.y + LV_CIRC_OCT1_Y(cir));
-
- lv_area_set(&edge_bot_area, lb_origo.x + LV_CIRC_OCT3_X(cir), lb_origo.y + LV_CIRC_OCT3_Y(cir),
- rb_origo.x + LV_CIRC_OCT2_X(cir), rb_origo.y + LV_CIRC_OCT2_Y(cir));
-
- lv_area_set(&mid_top_area, lt_origo.x + LV_CIRC_OCT5_X(cir), lt_origo.y + LV_CIRC_OCT5_Y(cir),
- rt_origo.x + LV_CIRC_OCT8_X(cir), rt_origo.y + LV_CIRC_OCT8_Y(cir));
-
- lv_area_set(&edge_top_area, lt_origo.x + LV_CIRC_OCT6_X(cir), lt_origo.y + LV_CIRC_OCT6_Y(cir),
- rt_origo.x + LV_CIRC_OCT7_X(cir), rt_origo.y + LV_CIRC_OCT7_Y(cir));
-
- lv_circ_next(&cir, &cir_tmp);
- }
-
- if(mcolor.full == gcolor.full)
- act_color = mcolor;
- else {
- mix = (uint32_t)((uint32_t)(coords->y2 - edge_top_area.y1) * 255) / height;
- act_color = lv_color_mix(mcolor, gcolor, mix);
- }
- lv_draw_fill(&edge_top_area, mask, act_color, opa);
-
- if(edge_top_area.y1 != mid_top_area.y1) {
-
- if(mcolor.full == gcolor.full)
- act_color = mcolor;
- else {
- mix = (uint32_t)((uint32_t)(coords->y2 - mid_top_area.y1) * 255) / height;
- act_color = lv_color_mix(mcolor, gcolor, mix);
- }
- lv_draw_fill(&mid_top_area, mask, act_color, opa);
- }
-
- if(mcolor.full == gcolor.full)
- act_color = mcolor;
- else {
- mix = (uint32_t)((uint32_t)(coords->y2 - mid_bot_area.y1) * 255) / height;
- act_color = lv_color_mix(mcolor, gcolor, mix);
- }
- lv_draw_fill(&mid_bot_area, mask, act_color, opa);
-
- if(edge_bot_area.y1 != mid_bot_area.y1) {
-
- if(mcolor.full == gcolor.full)
- act_color = mcolor;
- else {
- mix = (uint32_t)((uint32_t)(coords->y2 - edge_bot_area.y1) * 255) / height;
- act_color = lv_color_mix(mcolor, gcolor, mix);
- }
- lv_draw_fill(&edge_bot_area, mask, act_color, opa);
- }
-
-#if LV_ANTIALIAS
- if(aa) {
- /*The first and the last line is not drawn*/
- edge_top_area.x1 = coords->x1 + radius + 2;
- edge_top_area.x2 = coords->x2 - radius - 2;
- edge_top_area.y1 = coords->y1;
- edge_top_area.y2 = coords->y1;
- lv_draw_fill(&edge_top_area, mask, style->body.main_color, opa);
-
- edge_top_area.y1 = coords->y2;
- edge_top_area.y2 = coords->y2;
- lv_draw_fill(&edge_top_area, mask, style->body.grad_color, opa);
-
- /*Last parts of the anti-alias*/
- out_y_seg_end = cir.y;
- lv_coord_t seg_size = out_y_seg_end - out_y_seg_start;
- lv_point_t aa_p;
-
- aa_p.x = out_x_last;
- aa_p.y = out_y_seg_start;
-
- mix = (uint32_t)((uint32_t)(radius - out_x_last) * 255) / height;
- aa_color_hor_bottom = lv_color_mix(gcolor, mcolor, mix);
- aa_color_hor_top = lv_color_mix(mcolor, gcolor, mix);
-
- lv_coord_t i;
- for(i = 0; i < seg_size; i++) {
- lv_opa_t aa_opa = opa - lv_draw_aa_get_opa(seg_size, i, opa);
- lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) + 1, mask,
- aa_color_hor_top, aa_opa);
- lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) + 1, mask,
- aa_color_hor_top, aa_opa);
- lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) - 1, mask,
- aa_color_hor_bottom, aa_opa);
- lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) - 1, mask,
- aa_color_hor_bottom, aa_opa);
-
- mix = (uint32_t)((uint32_t)(radius - out_y_seg_start + i) * 255) / height;
- aa_color_ver = lv_color_mix(mcolor, gcolor, mix);
- lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) + 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, aa_color_ver,
- aa_opa);
- lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) - 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, aa_color_ver,
- aa_opa);
-
- aa_color_ver = lv_color_mix(gcolor, mcolor, mix);
- lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) - 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, aa_color_ver,
- aa_opa);
- lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) + 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, aa_color_ver,
- aa_opa);
- }
-
- /*In some cases the last pixel is not drawn*/
- if(LV_MATH_ABS(aa_p.x - aa_p.y) == seg_size) {
- aa_p.x = out_x_last;
- aa_p.y = out_x_last;
-
- mix = (uint32_t)((uint32_t)(out_x_last)*255) / height;
- aa_color_hor_top = lv_color_mix(gcolor, mcolor, mix);
- aa_color_hor_bottom = lv_color_mix(mcolor, gcolor, mix);
-
- lv_opa_t aa_opa = opa >> 1;
- lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p), rb_origo.y + LV_CIRC_OCT2_Y(aa_p), mask, aa_color_hor_bottom,
- aa_opa);
- lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p), lb_origo.y + LV_CIRC_OCT4_Y(aa_p), mask, aa_color_hor_bottom,
- aa_opa);
- lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p), lt_origo.y + LV_CIRC_OCT6_Y(aa_p), mask, aa_color_hor_top,
- aa_opa);
- lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p), rt_origo.y + LV_CIRC_OCT8_Y(aa_p), mask, aa_color_hor_top,
- aa_opa);
- }
- }
-#endif
-}
-
-/**
- * Draw the straight parts of a rectangle border
- * @param coords the coordinates of the original rectangle
- * @param mask_ the rectangle will be drawn only on this area
- * @param rstyle pointer to a rectangle style
- * @param opa_scale scale down all opacities by the factor
- */
-static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style,
- lv_opa_t opa_scale)
-{
- uint16_t radius = style->body.radius;
- bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing());
-
- lv_coord_t width = lv_area_get_width(coords);
- lv_coord_t height = lv_area_get_height(coords);
- lv_coord_t bwidth = style->body.border.width;
- lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->body.border.opa
- : (uint16_t)((uint16_t)style->body.border.opa * opa_scale) >> 8;
- lv_border_part_t part = style->body.border.part;
- lv_color_t color = style->body.border.color;
- lv_area_t work_area;
- lv_coord_t length_corr = 0;
- lv_coord_t corner_size = 0;
-
- /*the 0 px border width drawn as 1 px, so decrement the b_width*/
- bwidth--;
-
- radius = lv_draw_cont_radius_corr(radius, width, height);
-
- if(radius < bwidth) {
- length_corr = bwidth - radius - aa;
- corner_size = bwidth;
- } else {
- corner_size = radius + aa;
- }
-
- /*If radius == 0 is a special case*/
- if(style->body.radius == 0) {
- /*Left top corner*/
- if(part & LV_BORDER_TOP) {
- work_area.x1 = coords->x1;
- work_area.x2 = coords->x2;
- work_area.y1 = coords->y1;
- work_area.y2 = coords->y1 + bwidth;
- lv_draw_fill(&work_area, mask, color, opa);
- }
-
- /*Right top corner*/
- if(part & LV_BORDER_RIGHT) {
- work_area.x1 = coords->x2 - bwidth;
- work_area.x2 = coords->x2;
- work_area.y1 = coords->y1 + (part & LV_BORDER_TOP ? bwidth + 1 : 0);
- work_area.y2 = coords->y2 - (part & LV_BORDER_BOTTOM ? bwidth + 1 : 0);
- lv_draw_fill(&work_area, mask, color, opa);
- }
-
- /*Left bottom corner*/
- if(part & LV_BORDER_LEFT) {
- work_area.x1 = coords->x1;
- work_area.x2 = coords->x1 + bwidth;
- work_area.y1 = coords->y1 + (part & LV_BORDER_TOP ? bwidth + 1 : 0);
- work_area.y2 = coords->y2 - (part & LV_BORDER_BOTTOM ? bwidth + 1 : 0);
- lv_draw_fill(&work_area, mask, color, opa);
- }
-
- /*Right bottom corner*/
- if(part & LV_BORDER_BOTTOM) {
- work_area.x1 = coords->x1;
- work_area.x2 = coords->x2;
- work_area.y1 = coords->y2 - bwidth;
- work_area.y2 = coords->y2;
- lv_draw_fill(&work_area, mask, color, opa);
- }
- return;
- }
-
- /* Modify the corner_size if corner is drawn */
- corner_size++;
-
- /*Depending one which part's are drawn modify the area lengths */
- if(part & LV_BORDER_TOP)
- work_area.y1 = coords->y1 + corner_size;
- else
- work_area.y1 = coords->y1 + radius;
-
- if(part & LV_BORDER_BOTTOM)
- work_area.y2 = coords->y2 - corner_size;
- else
- work_area.y2 = coords->y2 - radius;
-
- /*Left border*/
- if(part & LV_BORDER_LEFT) {
- work_area.x1 = coords->x1;
- work_area.x2 = work_area.x1 + bwidth;
- lv_draw_fill(&work_area, mask, color, opa);
- }
-
- /*Right border*/
- if(part & LV_BORDER_RIGHT) {
- work_area.x2 = coords->x2;
- work_area.x1 = work_area.x2 - bwidth;
- lv_draw_fill(&work_area, mask, color, opa);
- }
-
- work_area.x1 = coords->x1 + corner_size - length_corr;
- work_area.x2 = coords->x2 - corner_size + length_corr;
-
- /*Upper border*/
- if(part & LV_BORDER_TOP) {
- work_area.y1 = coords->y1;
- work_area.y2 = coords->y1 + bwidth;
- lv_draw_fill(&work_area, mask, color, opa);
- }
-
- /*Lower border*/
- if(part & LV_BORDER_BOTTOM) {
- work_area.y2 = coords->y2;
- work_area.y1 = work_area.y2 - bwidth;
- lv_draw_fill(&work_area, mask, color, opa);
- }
-
- /*Draw the a remaining rectangles if the radius is smaller then bwidth */
- if(length_corr != 0) {
- /*Left top correction*/
- if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) {
- work_area.x1 = coords->x1;
- work_area.x2 = coords->x1 + radius + aa;
- work_area.y1 = coords->y1 + radius + 1 + aa;
- work_area.y2 = coords->y1 + bwidth;
- lv_draw_fill(&work_area, mask, color, opa);
- }
-
- /*Right top correction*/
- if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) {
- work_area.x1 = coords->x2 - radius - aa;
- work_area.x2 = coords->x2;
- work_area.y1 = coords->y1 + radius + 1 + aa;
- work_area.y2 = coords->y1 + bwidth;
- lv_draw_fill(&work_area, mask, color, opa);
- }
-
- /*Left bottom correction*/
- if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) {
- work_area.x1 = coords->x1;
- work_area.x2 = coords->x1 + radius + aa;
- work_area.y1 = coords->y2 - bwidth;
- work_area.y2 = coords->y2 - radius - 1 - aa;
- lv_draw_fill(&work_area, mask, color, opa);
- }
-
- /*Right bottom correction*/
- if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) {
- work_area.x1 = coords->x2 - radius - aa;
- work_area.x2 = coords->x2;
- work_area.y1 = coords->y2 - bwidth;
- work_area.y2 = coords->y2 - radius - 1 - aa;
- lv_draw_fill(&work_area, mask, color, opa);
- }
- }
-
- /*If radius == 0 one px on the corners are not drawn by main drawer*/
- if(style->body.radius == 0) {
- /*Left top corner*/
- if(part & (LV_BORDER_TOP | LV_BORDER_LEFT)) {
- work_area.x1 = coords->x1;
- work_area.x2 = coords->x1 + aa;
- work_area.y1 = coords->y1;
- work_area.y2 = coords->y1 + aa;
- lv_draw_fill(&work_area, mask, color, opa);
- }
-
- /*Right top corner*/
- if(part & (LV_BORDER_TOP | LV_BORDER_RIGHT)) {
- work_area.x1 = coords->x2 - aa;
- work_area.x2 = coords->x2;
- work_area.y1 = coords->y1;
- work_area.y2 = coords->y1 + aa;
- lv_draw_fill(&work_area, mask, color, opa);
- }
-
- /*Left bottom corner*/
- if(part & (LV_BORDER_BOTTOM | LV_BORDER_LEFT)) {
- work_area.x1 = coords->x1;
- work_area.x2 = coords->x1 + aa;
- work_area.y1 = coords->y2 - aa;
- work_area.y2 = coords->y2;
- lv_draw_fill(&work_area, mask, color, opa);
- }
-
- /*Right bottom corner*/
- if(part & (LV_BORDER_BOTTOM | LV_BORDER_RIGHT)) {
- work_area.x1 = coords->x2 - aa;
- work_area.x2 = coords->x2;
- work_area.y1 = coords->y2 - aa;
- work_area.y2 = coords->y2;
- lv_draw_fill(&work_area, mask, color, opa);
- }
- }
-}
-
-/**
- * Draw the corners of a rectangle border
- * @param coords the coordinates of the original rectangle
- * @param mask the rectangle will be drawn only on this area
- * @param style pointer to a style
- * @param opa_scale scale down all opacities by the factor
- */
-static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style,
- lv_opa_t opa_scale)
-{
- uint16_t radius = style->body.radius;
- bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing());
- lv_coord_t bwidth = style->body.border.width;
- lv_color_t color = style->body.border.color;
- lv_border_part_t part = style->body.border.part;
- lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->body.border.opa
- : (uint16_t)((uint16_t)style->body.border.opa * opa_scale) >> 8;
- /*0 px border width drawn as 1 px, so decrement the bwidth*/
- bwidth--;
-
-#if LV_ANTIALIAS
- if(aa) bwidth--; /*Because of anti-aliasing the border seems one pixel ticker*/
-#endif
-
- lv_coord_t width = lv_area_get_width(coords);
- lv_coord_t height = lv_area_get_height(coords);
-
- radius = lv_draw_cont_radius_corr(radius, width, height);
-
- lv_point_t lt_origo; /*Left Top origo*/
- lv_point_t lb_origo; /*Left Bottom origo*/
- lv_point_t rt_origo; /*Right Top origo*/
- lv_point_t rb_origo; /*Left Bottom origo*/
-
- lt_origo.x = coords->x1 + radius + aa;
- lt_origo.y = coords->y1 + radius + aa;
-
- lb_origo.x = coords->x1 + radius + aa;
- lb_origo.y = coords->y2 - radius - aa;
-
- rt_origo.x = coords->x2 - radius - aa;
- rt_origo.y = coords->y1 + radius + aa;
-
- rb_origo.x = coords->x2 - radius - aa;
- rb_origo.y = coords->y2 - radius - aa;
-
- lv_point_t cir_out;
- lv_coord_t tmp_out;
- lv_circ_init(&cir_out, &tmp_out, radius);
-
- lv_point_t cir_in;
- lv_coord_t tmp_in;
- lv_coord_t radius_in = radius - bwidth;
-
- if(radius_in < 0) {
- radius_in = 0;
- }
-
- lv_circ_init(&cir_in, &tmp_in, radius_in);
-
- lv_area_t circ_area;
- lv_coord_t act_w1;
- lv_coord_t act_w2;
-
-#if LV_ANTIALIAS
- /*Store some internal states for anti-aliasing*/
- lv_coord_t out_y_seg_start = 0;
- lv_coord_t out_y_seg_end = 0;
- lv_coord_t out_x_last = radius;
-
- lv_coord_t in_y_seg_start = 0;
- lv_coord_t in_y_seg_end = 0;
- lv_coord_t in_x_last = radius - bwidth;
-#endif
-
- while(cir_out.y <= cir_out.x) {
-
- /*Calculate the actual width to avoid overwriting pixels*/
- if(cir_in.y < cir_in.x) {
- act_w1 = cir_out.x - cir_in.x;
- act_w2 = act_w1;
- } else {
- act_w1 = cir_out.x - cir_out.y;
- act_w2 = act_w1 - 1;
- }
-
-#if LV_ANTIALIAS
- if(aa) {
- /*New step in y on the outter circle*/
- if(out_x_last != cir_out.x) {
- out_y_seg_end = cir_out.y;
- lv_coord_t seg_size = out_y_seg_end - out_y_seg_start;
- lv_point_t aa_p;
-
- aa_p.x = out_x_last;
- aa_p.y = out_y_seg_start;
-
- lv_coord_t i;
- for(i = 0; i < seg_size; i++) {
- lv_opa_t aa_opa;
-
- if(seg_size > CIRCLE_AA_NON_LINEAR_OPA_THRESHOLD) { /*Use non-linear opa mapping
- on the first segment*/
- aa_opa = antialias_get_opa_circ(seg_size, i, opa);
- } else {
- aa_opa = opa - lv_draw_aa_get_opa(seg_size, i, opa);
- }
-
- if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) {
- lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) + 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask,
- style->body.border.color, aa_opa);
- lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) + 1, mask,
- style->body.border.color, aa_opa);
- }
-
- if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) {
- lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) + 1, mask,
- style->body.border.color, aa_opa);
- lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) - 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask,
- style->body.border.color, aa_opa);
- }
-
- if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) {
- lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) - 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask,
- style->body.border.color, aa_opa);
- lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) - 1, mask,
- style->body.border.color, aa_opa);
- }
-
- if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) {
- lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) - 1, mask,
- style->body.border.color, aa_opa);
- lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) + 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask,
- style->body.border.color, aa_opa);
- }
- }
-
- out_x_last = cir_out.x;
- out_y_seg_start = out_y_seg_end;
- }
-
- /*New step in y on the inner circle*/
- if(in_x_last != cir_in.x) {
- in_y_seg_end = cir_out.y;
- lv_coord_t seg_size = in_y_seg_end - in_y_seg_start;
- lv_point_t aa_p;
-
- aa_p.x = in_x_last;
- aa_p.y = in_y_seg_start;
-
- lv_coord_t i;
- for(i = 0; i < seg_size; i++) {
- lv_opa_t aa_opa;
-
- if(seg_size > CIRCLE_AA_NON_LINEAR_OPA_THRESHOLD) { /*Use non-linear opa mapping
- on the first segment*/
- aa_opa = opa - antialias_get_opa_circ(seg_size, i, opa);
- } else {
- aa_opa = lv_draw_aa_get_opa(seg_size, i, opa);
- }
-
- if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) {
- lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) - 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask,
- style->body.border.color, aa_opa);
- }
-
- if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) {
- lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) - 1, mask,
- style->body.border.color, aa_opa);
- }
-
- if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) {
- lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) + 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask,
- style->body.border.color, aa_opa);
- }
-
- if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) {
- lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) + 1, mask,
- style->body.border.color, aa_opa);
- }
-
- /*Be sure the pixels on the middle are not drawn twice*/
- if(LV_CIRC_OCT1_X(aa_p) - 1 != LV_CIRC_OCT2_X(aa_p) + i) {
- if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) {
- lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) - 1,
- mask, style->body.border.color, aa_opa);
- }
-
- if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) {
- lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) + 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i,
- mask, style->body.border.color, aa_opa);
- }
-
- if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) {
- lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) + 1,
- mask, style->body.border.color, aa_opa);
- }
-
- if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) {
- lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) - 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i,
- mask, style->body.border.color, aa_opa);
- }
- }
- }
-
- in_x_last = cir_in.x;
- in_y_seg_start = in_y_seg_end;
- }
- }
-#endif
-
- /*Draw the octets to the right bottom corner*/
- if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) {
- circ_area.x1 = rb_origo.x + LV_CIRC_OCT1_X(cir_out) - act_w2;
- circ_area.x2 = rb_origo.x + LV_CIRC_OCT1_X(cir_out);
- circ_area.y1 = rb_origo.y + LV_CIRC_OCT1_Y(cir_out);
- circ_area.y2 = rb_origo.y + LV_CIRC_OCT1_Y(cir_out);
- lv_draw_fill(&circ_area, mask, color, opa);
-
- circ_area.x1 = rb_origo.x + LV_CIRC_OCT2_X(cir_out);
- circ_area.x2 = rb_origo.x + LV_CIRC_OCT2_X(cir_out);
- circ_area.y1 = rb_origo.y + LV_CIRC_OCT2_Y(cir_out) - act_w1;
- circ_area.y2 = rb_origo.y + LV_CIRC_OCT2_Y(cir_out);
- lv_draw_fill(&circ_area, mask, color, opa);
- }
-
- /*Draw the octets to the left bottom corner*/
- if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) {
- circ_area.x1 = lb_origo.x + LV_CIRC_OCT3_X(cir_out);
- circ_area.x2 = lb_origo.x + LV_CIRC_OCT3_X(cir_out);
- circ_area.y1 = lb_origo.y + LV_CIRC_OCT3_Y(cir_out) - act_w2;
- circ_area.y2 = lb_origo.y + LV_CIRC_OCT3_Y(cir_out);
- lv_draw_fill(&circ_area, mask, color, opa);
-
- circ_area.x1 = lb_origo.x + LV_CIRC_OCT4_X(cir_out);
- circ_area.x2 = lb_origo.x + LV_CIRC_OCT4_X(cir_out) + act_w1;
- circ_area.y1 = lb_origo.y + LV_CIRC_OCT4_Y(cir_out);
- circ_area.y2 = lb_origo.y + LV_CIRC_OCT4_Y(cir_out);
- lv_draw_fill(&circ_area, mask, color, opa);
- }
-
- /*Draw the octets to the left top corner*/
- if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) {
- if(lb_origo.y + LV_CIRC_OCT4_Y(cir_out) > lt_origo.y + LV_CIRC_OCT5_Y(cir_out)) {
- /*Don't draw if the lines are common in the middle*/
- circ_area.x1 = lt_origo.x + LV_CIRC_OCT5_X(cir_out);
- circ_area.x2 = lt_origo.x + LV_CIRC_OCT5_X(cir_out) + act_w2;
- circ_area.y1 = lt_origo.y + LV_CIRC_OCT5_Y(cir_out);
- circ_area.y2 = lt_origo.y + LV_CIRC_OCT5_Y(cir_out);
- lv_draw_fill(&circ_area, mask, color, opa);
- }
-
- circ_area.x1 = lt_origo.x + LV_CIRC_OCT6_X(cir_out);
- circ_area.x2 = lt_origo.x + LV_CIRC_OCT6_X(cir_out);
- circ_area.y1 = lt_origo.y + LV_CIRC_OCT6_Y(cir_out);
- circ_area.y2 = lt_origo.y + LV_CIRC_OCT6_Y(cir_out) + act_w1;
- lv_draw_fill(&circ_area, mask, color, opa);
- }
-
- /*Draw the octets to the right top corner*/
- if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) {
- circ_area.x1 = rt_origo.x + LV_CIRC_OCT7_X(cir_out);
- circ_area.x2 = rt_origo.x + LV_CIRC_OCT7_X(cir_out);
- circ_area.y1 = rt_origo.y + LV_CIRC_OCT7_Y(cir_out);
- circ_area.y2 = rt_origo.y + LV_CIRC_OCT7_Y(cir_out) + act_w2;
- lv_draw_fill(&circ_area, mask, color, opa);
-
- /*Don't draw if the lines are common in the middle*/
- if(rb_origo.y + LV_CIRC_OCT1_Y(cir_out) > rt_origo.y + LV_CIRC_OCT8_Y(cir_out)) {
- circ_area.x1 = rt_origo.x + LV_CIRC_OCT8_X(cir_out) - act_w1;
- circ_area.x2 = rt_origo.x + LV_CIRC_OCT8_X(cir_out);
- circ_area.y1 = rt_origo.y + LV_CIRC_OCT8_Y(cir_out);
- circ_area.y2 = rt_origo.y + LV_CIRC_OCT8_Y(cir_out);
- lv_draw_fill(&circ_area, mask, color, opa);
- }
- }
- lv_circ_next(&cir_out, &tmp_out);
-
- /*The internal circle will be ready faster
- * so check it! */
- if(cir_in.y < cir_in.x) {
- lv_circ_next(&cir_in, &tmp_in);
- }
- }
-
-#if LV_ANTIALIAS
- if(aa) {
- /*Last parts of the outer anti-alias*/
- out_y_seg_end = cir_out.y;
- lv_coord_t seg_size = out_y_seg_end - out_y_seg_start;
- lv_point_t aa_p;
-
- aa_p.x = out_x_last;
- aa_p.y = out_y_seg_start;
-
- lv_coord_t i;
- for(i = 0; i < seg_size; i++) {
- lv_opa_t aa_opa = opa - lv_draw_aa_get_opa(seg_size, i, opa);
- if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) {
- lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) + 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask,
- style->body.border.color, aa_opa);
- lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) + 1, mask,
- style->body.border.color, aa_opa);
- }
-
- if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) {
- lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) + 1, mask,
- style->body.border.color, aa_opa);
- lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) - 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask,
- style->body.border.color, aa_opa);
- }
-
- if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) {
- lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) - 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask,
- style->body.border.color, aa_opa);
- lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) - 1, mask,
- style->body.border.color, aa_opa);
- }
-
- if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) {
- lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) - 1, mask,
- style->body.border.color, aa_opa);
- lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) + 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask,
- style->body.border.color, aa_opa);
- }
- }
-
- /*In some cases the last pixel in the outer middle is not drawn*/
- if(LV_MATH_ABS(aa_p.x - aa_p.y) == seg_size) {
- aa_p.x = out_x_last;
- aa_p.y = out_x_last;
-
- lv_opa_t aa_opa = opa >> 1;
-
- if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) {
- lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p), rb_origo.y + LV_CIRC_OCT2_Y(aa_p), mask,
- style->body.border.color, aa_opa);
- }
-
- if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) {
- lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p), lb_origo.y + LV_CIRC_OCT4_Y(aa_p), mask,
- style->body.border.color, aa_opa);
- }
-
- if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) {
- lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p), lt_origo.y + LV_CIRC_OCT6_Y(aa_p), mask,
- style->body.border.color, aa_opa);
- }
-
- if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) {
- lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p), rt_origo.y + LV_CIRC_OCT8_Y(aa_p), mask,
- style->body.border.color, aa_opa);
- }
- }
-
- /*Last parts of the inner anti-alias*/
- in_y_seg_end = cir_in.y;
- aa_p.x = in_x_last;
- aa_p.y = in_y_seg_start;
- seg_size = in_y_seg_end - in_y_seg_start;
-
- for(i = 0; i < seg_size; i++) {
- lv_opa_t aa_opa = lv_draw_aa_get_opa(seg_size, i, opa);
- if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) {
- lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) - 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask,
- style->body.border.color, aa_opa);
- }
-
- if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) {
- lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) - 1, mask,
- style->body.border.color, aa_opa);
- }
-
- if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) {
- lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) + 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask,
- style->body.border.color, aa_opa);
- }
-
- if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) {
- lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) + 1, mask,
- style->body.border.color, aa_opa);
- }
-
- if(LV_CIRC_OCT1_X(aa_p) - 1 != LV_CIRC_OCT2_X(aa_p) + i) {
- if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) {
- lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) - 1, mask,
- style->body.border.color, aa_opa);
- }
-
- if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) {
- lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) + 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask,
- style->body.border.color, aa_opa);
- }
-
- if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) {
- lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) + 1, mask,
- style->body.border.color, aa_opa);
- }
-
- if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) {
- lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) - 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask,
- style->body.border.color, aa_opa);
- }
- }
- }
- }
-#endif
-}
-
-#if LV_USE_SHADOW
-
-/**
- * Draw a shadow
- * @param rect pointer to rectangle object
- * @param mask pointer to a mask area (from the design functions)
- * @param opa_scale scale down all opacities by the factor
- */
-static void lv_draw_shadow(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style,
- lv_opa_t opa_scale)
-{
- /* If mask is in the middle of cords do not draw shadow*/
- lv_coord_t radius = style->body.radius;
- lv_coord_t width = lv_area_get_width(coords);
- lv_coord_t height = lv_area_get_height(coords);
- radius = lv_draw_cont_radius_corr(radius, width, height);
- lv_area_t area_tmp;
-
- /*Check horizontally without radius*/
- lv_area_copy(&area_tmp, coords);
- area_tmp.x1 += radius;
- area_tmp.x2 -= radius;
- if(lv_area_is_in(mask, &area_tmp) != false) return;
-
- /*Check vertically without radius*/
- lv_area_copy(&area_tmp, coords);
- area_tmp.y1 += radius;
- area_tmp.y2 -= radius;
- if(lv_area_is_in(mask, &area_tmp) != false) return;
-
- if(style->body.shadow.type == LV_SHADOW_FULL) {
- lv_draw_shadow_full(coords, mask, style, opa_scale);
- } else if(style->body.shadow.type == LV_SHADOW_BOTTOM) {
- lv_draw_shadow_bottom(coords, mask, style, opa_scale);
- }
-}
-
-static void lv_draw_shadow_full(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style,
- lv_opa_t opa_scale)
-{
-
- /* KNOWN ISSUE
- * The algorithm calculates the shadow only above the middle point of the radius (speaking about
- * the left top corner). It causes an error because it doesn't consider how long the straight
- * edge is which effects the value of bottom of the corner shadow. In addition the straight
- * shadow is drawn from the middles point of the radius however the ends of the straight parts
- * still should be effected by the corner shadow. It also causes an issue in opacity. A smaller
- * radius means smaller average shadow opacity. The solution should be to start `line` from `-
- * swidth` and handle if the straight part is short (or zero) and the value is taken from the
- * other corner. `col` also should start from `- swidth`
- */
-
- bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing());
-
- lv_coord_t radius = style->body.radius;
- lv_coord_t swidth = style->body.shadow.width;
-
- lv_coord_t width = lv_area_get_width(coords);
- lv_coord_t height = lv_area_get_height(coords);
-
- radius = lv_draw_cont_radius_corr(radius, width, height);
-
- radius += aa;
-
- /*Allocate a draw buffer the buffer required to draw the shadow*/
- int16_t filter_width = 2 * swidth + 1;
- uint32_t curve_x_size = ((radius + swidth + 1) + 3) & ~0x3; /*Round to 4*/
- curve_x_size *= sizeof(lv_coord_t);
- uint32_t line_1d_blur_size = (filter_width + 3) & ~0x3; /*Round to 4*/
- line_1d_blur_size *= sizeof(uint32_t);
- uint32_t line_2d_blur_size = ((radius + swidth + 1) + 3) & ~0x3; /*Round to 4*/
- line_2d_blur_size *= sizeof(lv_opa_t);
-
- uint8_t * draw_buf = lv_draw_get_buf(curve_x_size + line_1d_blur_size + line_2d_blur_size);
-
- /*Divide the draw buffer*/
- lv_coord_t * curve_x = (lv_coord_t *)&draw_buf[0]; /*Stores the 'x' coordinates of a quarter circle.*/
- uint32_t * line_1d_blur = (uint32_t *)&draw_buf[curve_x_size];
- lv_opa_t * line_2d_blur = (lv_opa_t *)&draw_buf[curve_x_size + line_1d_blur_size];
-
- memset(curve_x, 0, curve_x_size);
- lv_point_t circ;
- lv_coord_t circ_tmp;
- lv_circ_init(&circ, &circ_tmp, radius);
- while(lv_circ_cont(&circ)) {
- curve_x[LV_CIRC_OCT1_Y(circ)] = LV_CIRC_OCT1_X(circ);
- curve_x[LV_CIRC_OCT2_Y(circ)] = LV_CIRC_OCT2_X(circ);
- lv_circ_next(&circ, &circ_tmp);
- }
- int16_t line;
- /*1D Blur horizontally*/
- lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->body.opa : (uint16_t)((uint16_t)style->body.opa * opa_scale) >> 8;
- for(line = 0; line < filter_width; line++) {
- line_1d_blur[line] = (uint32_t)((uint32_t)(filter_width - line) * (opa * 2) << SHADOW_OPA_EXTRA_PRECISION) /
- (filter_width * filter_width);
- }
-
- uint16_t col;
-
- lv_point_t point_rt;
- lv_point_t point_rb;
- lv_point_t point_lt;
- lv_point_t point_lb;
- lv_point_t ofs_rb;
- lv_point_t ofs_rt;
- lv_point_t ofs_lb;
- lv_point_t ofs_lt;
- ofs_rb.x = coords->x2 - radius - aa;
- ofs_rb.y = coords->y2 - radius - aa;
-
- ofs_rt.x = coords->x2 - radius - aa;
- ofs_rt.y = coords->y1 + radius + aa;
-
- ofs_lb.x = coords->x1 + radius + aa;
- ofs_lb.y = coords->y2 - radius - aa;
-
- ofs_lt.x = coords->x1 + radius + aa;
- ofs_lt.y = coords->y1 + radius + aa;
- bool line_ready;
- for(line = 0; line <= radius + swidth; line++) { /*Check all rows and make the 1D blur to 2D*/
- line_ready = false;
- for(col = 0; col <= radius + swidth; col++) { /*Check all pixels in a 1D blur line (from the origo to last
- shadow pixel (radius + swidth))*/
-
- /*Sum the opacities from the lines above and below this 'row'*/
- int16_t line_rel;
- uint32_t px_opa_sum = 0;
- for(line_rel = -swidth; line_rel <= swidth; line_rel++) {
- /*Get the relative x position of the 'line_rel' to 'line'*/
- int16_t col_rel;
- if(line + line_rel < 0) { /*Below the radius, here is the blur of the edge */
- col_rel = radius - curve_x[line] - col;
- } else if(line + line_rel > radius) { /*Above the radius, here won't be more 1D blur*/
- break;
- } else { /*Blur from the curve*/
- col_rel = curve_x[line + line_rel] - curve_x[line] - col;
- }
-
- /*Add the value of the 1D blur on 'col_rel' position*/
- if(col_rel < -swidth) { /*Outside of the blurred area. */
- if(line_rel == -swidth)
- line_ready = true; /*If no data even on the very first line then it wont't
- be anything else in this line*/
- break; /*Break anyway because only smaller 'col_rel' values will come */
- } else if(col_rel > swidth)
- px_opa_sum += line_1d_blur[0]; /*Inside the not blurred area*/
- else
- px_opa_sum += line_1d_blur[swidth - col_rel]; /*On the 1D blur (+ swidth to align to the center)*/
- }
-
- line_2d_blur[col] = px_opa_sum >> SHADOW_OPA_EXTRA_PRECISION;
- if(line_ready) {
- col++; /*To make this line to the last one ( drawing will go to '< col')*/
- break;
- }
- }
-
- /*Flush the line*/
- point_rt.x = curve_x[line] + ofs_rt.x + 1;
- point_rt.y = ofs_rt.y - line;
-
- point_rb.x = curve_x[line] + ofs_rb.x + 1;
- point_rb.y = ofs_rb.y + line;
-
- point_lt.x = ofs_lt.x - curve_x[line] - 1;
- point_lt.y = ofs_lt.y - line;
-
- point_lb.x = ofs_lb.x - curve_x[line] - 1;
- point_lb.y = ofs_lb.y + line;
-
- uint16_t d;
- for(d = 1; d < col; d++) {
-
- if(point_lt.x < ofs_lt.x && point_lt.y < ofs_lt.y) {
- lv_draw_px(point_lt.x, point_lt.y, mask, style->body.shadow.color, line_2d_blur[d]);
- }
-
- if(point_lb.x < ofs_lb.x && point_lb.y > ofs_lb.y) {
- lv_draw_px(point_lb.x, point_lb.y, mask, style->body.shadow.color, line_2d_blur[d]);
- }
-
- if(point_rt.x > ofs_rt.x && point_rt.y < ofs_rt.y) {
- lv_draw_px(point_rt.x, point_rt.y, mask, style->body.shadow.color, line_2d_blur[d]);
- }
-
- if(point_rb.x > ofs_rb.x && point_rb.y > ofs_rb.y) {
- lv_draw_px(point_rb.x, point_rb.y, mask, style->body.shadow.color, line_2d_blur[d]);
- }
-
- point_rb.x++;
- point_lb.x--;
-
- point_rt.x++;
- point_lt.x--;
- }
-
- /* Put the first line to the edges too.
- * It is not correct because blur should be done below the corner too
- * but is is simple, fast and gives a good enough result*/
- if(line == 0) lv_draw_shadow_full_straight(coords, mask, style, line_2d_blur);
- }
-}
-
-static void lv_draw_shadow_bottom(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style,
- lv_opa_t opa_scale)
-{
- bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing());
- lv_coord_t radius = style->body.radius;
- lv_coord_t swidth = style->body.shadow.width;
- lv_coord_t width = lv_area_get_width(coords);
- lv_coord_t height = lv_area_get_height(coords);
-
- radius = lv_draw_cont_radius_corr(radius, width, height);
- radius += aa * SHADOW_BOTTOM_AA_EXTRA_RADIUS;
- swidth += aa;
-
- uint32_t curve_x_size = ((radius + 1) + 3) & ~0x3; /*Round to 4*/
- curve_x_size *= sizeof(lv_coord_t);
- lv_opa_t line_1d_blur_size = (swidth + 3) & ~0x3; /*Round to 4*/
- line_1d_blur_size *= sizeof(lv_opa_t);
-
- uint8_t * draw_buf = lv_draw_get_buf(curve_x_size + line_1d_blur_size);
-
- /*Divide the draw buffer*/
- lv_coord_t * curve_x = (lv_coord_t *)&draw_buf[0]; /*Stores the 'x' coordinates of a quarter circle.*/
- lv_opa_t * line_1d_blur = (lv_opa_t *)&draw_buf[curve_x_size];
-
- lv_point_t circ;
- lv_coord_t circ_tmp;
- lv_circ_init(&circ, &circ_tmp, radius);
- while(lv_circ_cont(&circ)) {
- curve_x[LV_CIRC_OCT1_Y(circ)] = LV_CIRC_OCT1_X(circ);
- curve_x[LV_CIRC_OCT2_Y(circ)] = LV_CIRC_OCT2_X(circ);
- lv_circ_next(&circ, &circ_tmp);
- }
-
- int16_t col;
-
- lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->body.opa : (uint16_t)((uint16_t)style->body.opa * opa_scale) >> 8;
- for(col = 0; col < swidth; col++) {
- line_1d_blur[col] = (uint32_t)((uint32_t)(swidth - col) * opa / 2) / (swidth);
- }
-
- lv_point_t point_l;
- lv_point_t point_r;
- lv_area_t area_mid;
- lv_point_t ofs_l;
- lv_point_t ofs_r;
-
- ofs_l.x = coords->x1 + radius;
- ofs_l.y = coords->y2 - radius + 1 - aa;
-
- ofs_r.x = coords->x2 - radius;
- ofs_r.y = coords->y2 - radius + 1 - aa;
-
- for(col = 0; col <= radius; col++) {
- point_l.x = ofs_l.x - col;
- point_l.y = ofs_l.y + curve_x[col];
-
- point_r.x = ofs_r.x + col;
- point_r.y = ofs_r.y + curve_x[col];
-
- lv_opa_t px_opa;
- int16_t diff = col == 0 ? 0 : curve_x[col - 1] - curve_x[col];
- uint16_t d;
- for(d = 0; d < swidth; d++) {
- /*When stepping a pixel in y calculate the average with the pixel from the prev. column
- * to make a blur */
- if(diff == 0) {
- px_opa = line_1d_blur[d];
- } else {
- px_opa = (uint16_t)((uint16_t)line_1d_blur[d] + line_1d_blur[d - diff]) >> 1;
- }
- lv_draw_px(point_l.x, point_l.y, mask, style->body.shadow.color, px_opa);
- point_l.y++;
-
- /*Don't overdraw the pixel on the middle*/
- if(point_r.x > ofs_l.x) {
- lv_draw_px(point_r.x, point_r.y, mask, style->body.shadow.color, px_opa);
- }
- point_r.y++;
- }
- }
-
- area_mid.x1 = ofs_l.x + 1;
- area_mid.y1 = ofs_l.y + radius;
- area_mid.x2 = ofs_r.x - 1;
- area_mid.y2 = area_mid.y1;
-
- uint16_t d;
- for(d = 0; d < swidth; d++) {
- lv_draw_fill(&area_mid, mask, style->body.shadow.color, line_1d_blur[d]);
- area_mid.y1++;
- area_mid.y2++;
- }
-}
-
-static void lv_draw_shadow_full_straight(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style,
- const lv_opa_t * map)
-{
- bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing());
- lv_coord_t radius = style->body.radius;
- lv_coord_t swidth = style->body.shadow.width;
- lv_coord_t width = lv_area_get_width(coords);
- lv_coord_t height = lv_area_get_height(coords);
-
- radius = lv_draw_cont_radius_corr(radius, width, height);
- radius += aa;
-
- lv_area_t right_area;
- right_area.x1 = coords->x2 + 1 - aa;
- right_area.y1 = coords->y1 + radius + aa;
- right_area.x2 = right_area.x1;
- right_area.y2 = coords->y2 - radius - aa;
-
- lv_area_t left_area;
- left_area.x1 = coords->x1 - 1 + aa;
- left_area.y1 = coords->y1 + radius + aa;
- left_area.x2 = left_area.x1;
- left_area.y2 = coords->y2 - radius - aa;
-
- lv_area_t top_area;
- top_area.x1 = coords->x1 + radius + aa;
- top_area.y1 = coords->y1 - 1 + aa;
- top_area.x2 = coords->x2 - radius - aa;
- top_area.y2 = top_area.y1;
-
- lv_area_t bottom_area;
- bottom_area.x1 = coords->x1 + radius + aa;
- bottom_area.y1 = coords->y2 + 1 - aa;
- bottom_area.x2 = coords->x2 - radius - aa;
- bottom_area.y2 = bottom_area.y1;
-
- lv_opa_t opa_act;
- int16_t d;
- for(d = 1 /*+ LV_ANTIALIAS*/; d <= swidth /* - LV_ANTIALIAS*/; d++) {
- opa_act = map[d];
-
- lv_draw_fill(&right_area, mask, style->body.shadow.color, opa_act);
- right_area.x1++;
- right_area.x2++;
-
- lv_draw_fill(&left_area, mask, style->body.shadow.color, opa_act);
- left_area.x1--;
- left_area.x2--;
-
- lv_draw_fill(&top_area, mask, style->body.shadow.color, opa_act);
- top_area.y1--;
- top_area.y2--;
-
- lv_draw_fill(&bottom_area, mask, style->body.shadow.color, opa_act);
- bottom_area.y1++;
- bottom_area.y2++;
- }
-}
-
-#endif
-
-static uint16_t lv_draw_cont_radius_corr(uint16_t r, lv_coord_t w, lv_coord_t h)
-{
- bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing());
-
- if(r >= (w >> 1)) {
- r = (w >> 1);
- if(r != 0) r--;
- }
- if(r >= (h >> 1)) {
- r = (h >> 1);
- if(r != 0) r--;
- }
-
- if(r > 0) r -= aa;
-
- return r;
-}
-
-#if LV_ANTIALIAS
-
-/**
- * Approximate the opacity for anti-aliasing.
- * Used the first segment of a circle which is the longest and have the most non-linearity (cos)
- * @param seg length of the line segment
- * @param px_id index of pixel on the line segment
- * @param line_opa opacity of the lien (it will be the max opacity)
- * @return the desired opacity of the pixel
- */
-static lv_opa_t antialias_get_opa_circ(lv_coord_t seg, lv_coord_t px_id, lv_opa_t opa)
-{
- /*Empirical non-linear values anti-aliasing values*/
- static const lv_opa_t opa_map2[2] = {210, 80};
- static const lv_opa_t opa_map3[3] = {230, 150, 60};
- static const lv_opa_t opa_map4[4] = {235, 185, 125, 50};
- static const lv_opa_t opa_map8[8] = {250, 242, 219, 191, 158, 117, 76, 40};
-
-#if CIRCLE_AA_NON_LINEAR_OPA_THRESHOLD < 1
- if(seg == 1) return 170;
-#endif
-
-#if CIRCLE_AA_NON_LINEAR_OPA_THRESHOLD < 2
- if(seg == 2) return (opa_map2[px_id] * opa) >> 8;
-#endif
-
-#if CIRCLE_AA_NON_LINEAR_OPA_THRESHOLD < 3
- if(seg == 3) return (opa_map3[px_id] * opa) >> 8;
-#endif
-
-#if CIRCLE_AA_NON_LINEAR_OPA_THRESHOLD < 4
- if(seg == 4) return (opa_map4[px_id] * opa) >> 8;
-#endif
-
- uint8_t id = (uint32_t)((uint32_t)px_id * (sizeof(opa_map8) - 1)) / (seg - 1);
- return (uint32_t)((uint32_t)opa_map8[id] * opa) >> 8;
-}
-
-#endif
diff --git a/src/libs/lvgl/src/lv_draw/lv_draw_rect.h b/src/libs/lvgl/src/lv_draw/lv_draw_rect.h
deleted file mode 100644
index 852b7291..00000000
--- a/src/libs/lvgl/src/lv_draw/lv_draw_rect.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * @file lv_draw_rect.h
- *
- */
-
-#ifndef LV_DRAW_RECT_H
-#define LV_DRAW_RECT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_draw.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Draw a rectangle
- * @param coords the coordinates of the rectangle
- * @param mask the rectangle will be drawn only in this mask
- * @param style pointer to a style
- * @param opa_scale scale down all opacities by the factor
- */
-void lv_draw_rect(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale);
-
-/**********************
- * MACROS
- **********************/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_DRAW_RECT_H*/
diff --git a/src/libs/lvgl/src/lv_draw/lv_draw_triangle.c b/src/libs/lvgl/src/lv_draw/lv_draw_triangle.c
deleted file mode 100644
index 1c8939ad..00000000
--- a/src/libs/lvgl/src/lv_draw/lv_draw_triangle.c
+++ /dev/null
@@ -1,343 +0,0 @@
-/**
- * @file lv_draw_triangle.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_draw_triangle.h"
-#include "../lv_misc/lv_math.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-void tri_draw_flat(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa);
-void tri_draw_tall(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa);
-static void point_swap(lv_point_t * p1, lv_point_t * p2);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- *
- * @param points pointer to an array with 3 points
- * @param mask the triangle will be drawn only in this mask
- * @param style style for of the triangle
- * @param opa_scale scale down all opacities by the factor (0..255)
- */
-void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale)
-{
- /*Return if the triangle is degenerated*/
- if(points[0].x == points[1].x && points[0].y == points[1].y) return;
- if(points[1].x == points[2].x && points[1].y == points[2].y) return;
- if(points[0].x == points[2].x && points[0].y == points[2].y) return;
-
- if(points[0].x == points[1].x && points[1].x == points[2].x) return;
- if(points[0].y == points[1].y && points[1].y == points[2].y) return;
-
- lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->body.opa : (uint16_t)((uint16_t)style->body.opa * opa_scale) >> 8;
-
- /*Is the triangle flat or tall?*/
- lv_coord_t x_min = LV_MATH_MIN(LV_MATH_MIN(points[0].x, points[1].x), points[2].x);
- lv_coord_t x_max = LV_MATH_MAX(LV_MATH_MAX(points[0].x, points[1].x), points[2].x);
- lv_coord_t y_min = LV_MATH_MIN(LV_MATH_MIN(points[0].y, points[1].y), points[2].y);
- lv_coord_t y_max = LV_MATH_MAX(LV_MATH_MAX(points[0].y, points[1].y), points[2].y);
-
- /* Draw the tall rectangles from vertical lines
- * and from the flat triangles from horizontal lines
- * to minimize the number of lines.
- * Some pixels are overdrawn on the common edges of the triangles
- * so use it only if the triangle has no opacity*/
-
- /* Draw from horizontal lines*/
- if(x_max - x_min < y_max - y_min) {
- tri_draw_tall(points, mask, style, opa);
- }
- /*Else flat so draw from vertical lines*/
- else {
- tri_draw_flat(points, mask, style, opa);
- }
-}
-
-/**
- * Draw a polygon from triangles. Only convex polygons are supported
- * @param points an array of points
- * @param point_cnt number of points
- * @param mask polygon will be drawn only in this mask
- * @param style style of the polygon
- * @param opa_scale scale down all opacities by the factor (0..255)
- */
-void lv_draw_polygon(const lv_point_t * points, uint32_t point_cnt, const lv_area_t * mask, const lv_style_t * style,
- lv_opa_t opa_scale)
-{
- if(point_cnt < 3) return;
- if(points == NULL) return;
-
- uint32_t i;
- lv_point_t tri[3];
- tri[0].x = points[0].x;
- tri[0].y = points[0].y;
- for(i = 0; i < point_cnt - 1; i++) {
- tri[1].x = points[i].x;
- tri[1].y = points[i].y;
- tri[2].x = points[i + 1].x;
- tri[2].y = points[i + 1].y;
- lv_draw_triangle(tri, mask, style, opa_scale);
- }
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-void tri_draw_flat(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa)
-{
- /*Return if the points are out of the mask*/
- if(points[0].x < mask->x1 && points[1].x < mask->x1 && points[2].x < mask->x1) {
- return;
- }
-
- if(points[0].x > mask->x2 && points[1].x > mask->x2 && points[2].x > mask->x2) {
- return;
- }
-
- if(points[0].y < mask->y1 && points[1].y < mask->y1 && points[2].y < mask->y1) {
- return;
- }
-
- if(points[0].y > mask->y2 && points[1].y > mask->y2 && points[2].y > mask->y2) {
- return;
- }
-
- lv_point_t tri[3];
-
- memcpy(tri, points, sizeof(tri));
-
- /*Sort the vertices according to their y coordinate (0: y max, 1: y mid, 2:y min)*/
- if(tri[1].y < tri[0].y) point_swap(&tri[1], &tri[0]);
- if(tri[2].y < tri[1].y) point_swap(&tri[2], &tri[1]);
- if(tri[1].y < tri[0].y) point_swap(&tri[1], &tri[0]);
-
- /*Draw the triangle*/
- lv_point_t edge1;
- lv_coord_t dx1 = LV_MATH_ABS(tri[0].x - tri[1].x);
- lv_coord_t sx1 = tri[0].x < tri[1].x ? 1 : -1;
- lv_coord_t dy1 = LV_MATH_ABS(tri[0].y - tri[1].y);
- lv_coord_t sy1 = tri[0].y < tri[1].y ? 1 : -1;
- lv_coord_t err1 = (dx1 > dy1 ? dx1 : -dy1) / 2;
- lv_coord_t err_tmp1;
-
- lv_point_t edge2;
- lv_coord_t dx2 = LV_MATH_ABS(tri[0].x - tri[2].x);
- lv_coord_t sx2 = tri[0].x < tri[2].x ? 1 : -1;
- lv_coord_t dy2 = LV_MATH_ABS(tri[0].y - tri[2].y);
- lv_coord_t sy2 = tri[0].y < tri[2].y ? 1 : -1;
- lv_coord_t err2 = (dx1 > dy2 ? dx2 : -dy2) / 2;
- lv_coord_t err_tmp2;
-
- lv_coord_t y1_tmp;
- lv_coord_t y2_tmp;
-
- edge1.x = tri[0].x;
- edge1.y = tri[0].y;
- edge2.x = tri[0].x;
- edge2.y = tri[0].y;
- lv_area_t act_area;
- lv_area_t draw_area;
-
- while(1) {
- act_area.x1 = edge1.x;
- act_area.x2 = edge2.x;
- act_area.y1 = edge1.y;
- act_area.y2 = edge2.y;
-
- /* Get the area of a line.
- * Adjust it a little bit to perfectly match (no redrawn pixels) with the adjacent triangles*/
- draw_area.x1 = LV_MATH_MIN(act_area.x1, act_area.x2) + 1;
- draw_area.x2 = LV_MATH_MAX(act_area.x1, act_area.x2);
- draw_area.y1 = LV_MATH_MIN(act_area.y1, act_area.y2) - 1;
- draw_area.y2 = LV_MATH_MAX(act_area.y1, act_area.y2) - 1;
-
- lv_draw_fill(&draw_area, mask, style->body.main_color, opa);
-
- /*Calc. the next point of edge1*/
- y1_tmp = edge1.y;
- do {
- if(edge1.x == tri[1].x && edge1.y == tri[1].y) {
-
- dx1 = LV_MATH_ABS(tri[1].x - tri[2].x);
- sx1 = tri[1].x < tri[2].x ? 1 : -1;
- dy1 = LV_MATH_ABS(tri[1].y - tri[2].y);
- sy1 = tri[1].y < tri[2].y ? 1 : -1;
- err1 = (dx1 > dy1 ? dx1 : -dy1) / 2;
- } else if(edge1.x == tri[2].x && edge1.y == tri[2].y) {
- return;
- }
- err_tmp1 = err1;
- if(err_tmp1 > -dx1) {
- err1 -= dy1;
- edge1.x += sx1;
- }
- if(err_tmp1 < dy1) {
- err1 += dx1;
- edge1.y += sy1;
- }
- } while(edge1.y == y1_tmp);
-
- /*Calc. the next point of edge2*/
- y2_tmp = edge2.y;
- do {
- if(edge2.x == tri[2].x && edge2.y == tri[2].y) return;
- err_tmp2 = err2;
- if(err_tmp2 > -dx2) {
- err2 -= dy2;
- edge2.x += sx2;
- }
- if(err_tmp2 < dy2) {
- err2 += dx2;
- edge2.y += sy2;
- }
- } while(edge2.y == y2_tmp);
- }
-}
-
-void tri_draw_tall(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa)
-{
- /*
- * Better to draw from vertical lines
- * |\
- * | |
- * | |
- * | \
- * | |
- * |___|
- */
-
- lv_point_t tri[3];
-
- memcpy(tri, points, sizeof(tri));
-
- /*Sort the vertices according to their x coordinate (0: x max, 1: x mid, 2:x min)*/
- if(tri[1].x < tri[0].x) point_swap(&tri[1], &tri[0]);
- if(tri[2].x < tri[1].x) point_swap(&tri[2], &tri[1]);
- if(tri[1].x < tri[0].x) point_swap(&tri[1], &tri[0]);
-
- /*Draw the triangle*/
- lv_point_t edge1;
- lv_coord_t dx1 = LV_MATH_ABS(tri[0].x - tri[1].x);
- lv_coord_t sx1 = tri[0].x < tri[1].x ? 1 : -1;
- lv_coord_t dy1 = LV_MATH_ABS(tri[0].y - tri[1].y);
- lv_coord_t sy1 = tri[0].y < tri[1].y ? 1 : -1;
- lv_coord_t err1 = (dx1 > dy1 ? dx1 : -dy1) / 2;
- lv_coord_t err_tmp1;
-
- lv_point_t edge2;
- lv_coord_t dx2 = LV_MATH_ABS(tri[0].x - tri[2].x);
- lv_coord_t sx2 = tri[0].x < tri[2].x ? 1 : -1;
- lv_coord_t dy2 = LV_MATH_ABS(tri[0].y - tri[2].y);
- lv_coord_t sy2 = tri[0].y < tri[2].y ? 1 : -1;
- lv_coord_t err2 = (dx1 > dy2 ? dx2 : -dy2) / 2;
- lv_coord_t err_tmp2;
-
- lv_coord_t x1_tmp;
- lv_coord_t x2_tmp;
-
- edge1.x = tri[0].x;
- edge1.y = tri[0].y;
- edge2.x = tri[0].x;
- edge2.y = tri[0].y;
- lv_area_t act_area;
- lv_area_t draw_area;
-
- while(1) {
- act_area.x1 = edge1.x;
- act_area.x2 = edge2.x;
- act_area.y1 = edge1.y;
- act_area.y2 = edge2.y;
-
- draw_area.x1 = LV_MATH_MIN(act_area.x1, act_area.x2);
- draw_area.x2 = LV_MATH_MAX(act_area.x1, act_area.x2);
- draw_area.y1 = LV_MATH_MIN(act_area.y1, act_area.y2);
- draw_area.y2 = LV_MATH_MAX(act_area.y1, act_area.y2) - 1;
-
- lv_draw_fill(&draw_area, mask, style->body.main_color, opa);
-
- /*Calc. the next point of edge1*/
- x1_tmp = edge1.x;
- do {
- if(edge1.y == tri[1].y && edge1.x == tri[1].x) {
-
- dx1 = LV_MATH_ABS(tri[1].x - tri[2].x);
- sx1 = tri[1].x < tri[2].x ? 1 : -1;
- dy1 = LV_MATH_ABS(tri[1].y - tri[2].y);
- sy1 = tri[1].y < tri[2].y ? 1 : -1;
- err1 = (dx1 > dy1 ? dx1 : -dy1) / 2;
- } else if(edge1.y == tri[2].y && edge1.x == tri[2].x) {
- return;
- }
- err_tmp1 = err1;
- if(err_tmp1 > -dx1) {
- err1 -= dy1;
- edge1.x += sx1;
- }
- if(err_tmp1 < dy1) {
- err1 += dx1;
- edge1.y += sy1;
- }
- } while(edge1.x == x1_tmp);
-
- /*Calc. the next point of edge2*/
- x2_tmp = edge2.x;
- do {
- if(edge2.y == tri[2].y && edge2.x == tri[2].x) {
- return;
- }
-
- err_tmp2 = err2;
- if(err_tmp2 > -dx2) {
- err2 -= dy2;
- edge2.x += sx2;
- }
- if(err_tmp2 < dy2) {
- err2 += dx2;
- edge2.y += sy2;
- }
- } while(edge2.x == x2_tmp);
- }
-}
-
-/**
- * Swap two points
- * p1 pointer to the first point
- * p2 pointer to the second point
- */
-static void point_swap(lv_point_t * p1, lv_point_t * p2)
-{
- lv_point_t tmp;
- tmp.x = p1->x;
- tmp.y = p1->y;
-
- p1->x = p2->x;
- p1->y = p2->y;
-
- p2->x = tmp.x;
- p2->y = tmp.y;
-}
diff --git a/src/libs/lvgl/src/lv_draw/lv_draw_triangle.h b/src/libs/lvgl/src/lv_draw/lv_draw_triangle.h
deleted file mode 100644
index b6b230d9..00000000
--- a/src/libs/lvgl/src/lv_draw/lv_draw_triangle.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * @file lv_draw_triangle.h
- *
- */
-
-#ifndef LV_DRAW_TRIANGLE_H
-#define LV_DRAW_TRIANGLE_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_draw.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- *
- * @param points pointer to an array with 3 points
- * @param mask the triangle will be drawn only in this mask
- * @param style style for of the triangle
- * @param opa_scale scale down all opacities by the factor (0..255)
- */
-void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale);
-
-/**
- * Draw a polygon from triangles. Only convex polygons are supported
- * @param points an array of points
- * @param point_cnt number of points
- * @param mask polygon will be drawn only in this mask
- * @param style style of the polygon
- * @param opa_scale scale down all opacities by the factor (0..255)
- */
-void lv_draw_polygon(const lv_point_t * points, uint32_t point_cnt, const lv_area_t * mask, const lv_style_t * style,
- lv_opa_t opa_scale);
-
-/**********************
- * MACROS
- **********************/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_DRAW_TRIANGLE_H*/
diff --git a/src/libs/lvgl/src/lv_draw/lv_img_cache.c b/src/libs/lvgl/src/lv_draw/lv_img_cache.c
deleted file mode 100644
index 841e1169..00000000
--- a/src/libs/lvgl/src/lv_draw/lv_img_cache.c
+++ /dev/null
@@ -1,206 +0,0 @@
-/**
- * @file lv_img_cache.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "../lv_core/lv_debug.h"
-#include "lv_img_cache.h"
-#include "lv_img_decoder.h"
-#include "lv_draw_img.h"
-#include "../lv_hal/lv_hal_tick.h"
-#include "../lv_misc/lv_gc.h"
-
-#if defined(LV_GC_INCLUDE)
-#include LV_GC_INCLUDE
-#endif /* LV_ENABLE_GC */
-/*********************
- * DEFINES
- *********************/
-/*Decrement life with this value in every open*/
-#define LV_IMG_CACHE_AGING 1
-
-/*Boost life by this factor (multiply time_to_open with this value)*/
-#define LV_IMG_CACHE_LIFE_GAIN 1
-
-/*Don't let life to be greater than this limit because it would require a lot of time to
- * "die" from very high values */
-#define LV_IMG_CACHE_LIFE_LIMIT 1000
-
-#if LV_IMG_CACHE_DEF_SIZE < 1
-#error "LV_IMG_CACHE_DEF_SIZE must be >= 1. See lv_conf.h"
-#endif
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static uint16_t entry_cnt;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Open an image using the image decoder interface and cache it.
- * The image will be left open meaning if the image decoder open callback allocated memory then it will remain.
- * The image is closed if a new image is opened and the new image takes its place in the cache.
- * @param src source of the image. Path to file or pointer to an `lv_img_dsc_t` variable
- * @param style style of the image
- * @return pointer to the cache entry or NULL if can open the image
- */
-lv_img_cache_entry_t * lv_img_cache_open(const void * src, const lv_style_t * style)
-{
- if(entry_cnt == 0) {
- LV_LOG_WARN("lv_img_cache_open: the cache size is 0");
- return NULL;
- }
-
- lv_img_cache_entry_t * cache = LV_GC_ROOT(_lv_img_cache_array);
-
- /*Decrement all lifes. Make the entries older*/
- uint16_t i;
- for(i = 0; i < entry_cnt; i++) {
- if(cache[i].life > INT32_MIN + LV_IMG_CACHE_AGING) {
- cache[i].life -= LV_IMG_CACHE_AGING;
- }
- }
-
- /*Is the image cached?*/
- lv_img_cache_entry_t * cached_src = NULL;
- for(i = 0; i < entry_cnt; i++) {
- bool match = false;
- lv_img_src_t src_type = lv_img_src_get_type(cache[i].dec_dsc.src);
- if(src_type == LV_IMG_SRC_VARIABLE) {
- if(cache[i].dec_dsc.src == src && cache[i].dec_dsc.style == style) match = true;
- } else if(src_type == LV_IMG_SRC_FILE) {
- if(strcmp(cache[i].dec_dsc.src, src) == 0) match = true;
- }
-
- if(match) {
- /* If opened increment its life.
- * Image difficult to open should live longer to keep avoid frequent their recaching.
- * Therefore increase `life` with `time_to_open`*/
- cached_src = &cache[i];
- cached_src->life += cached_src->dec_dsc.time_to_open * LV_IMG_CACHE_LIFE_GAIN;
- if(cached_src->life > LV_IMG_CACHE_LIFE_LIMIT) cached_src->life = LV_IMG_CACHE_LIFE_LIMIT;
- LV_LOG_TRACE("image draw: image found in the cache");
- break;
- }
- }
-
- /*The image is not cached then cache it now*/
- if(cached_src == NULL) {
- /*Find an entry to reuse. Select the entry with the least life*/
- cached_src = &cache[0];
- for(i = 1; i < entry_cnt; i++) {
- if(cache[i].life < cached_src->life) {
- cached_src = &cache[i];
- }
- }
-
- /*Close the decoder to reuse if it was opened (has a valid source)*/
- if(cached_src->dec_dsc.src) {
- lv_img_decoder_close(&cached_src->dec_dsc);
- LV_LOG_INFO("image draw: cache miss, close and reuse an entry");
- } else {
- LV_LOG_INFO("image draw: cache miss, cached to an empty entry");
- }
-
- /*Open the image and measure the time to open*/
- uint32_t t_start;
- t_start = lv_tick_get();
- cached_src->dec_dsc.time_to_open = 0;
- lv_res_t open_res = lv_img_decoder_open(&cached_src->dec_dsc, src, style);
- if(open_res == LV_RES_INV) {
- LV_LOG_WARN("Image draw cannot open the image resource");
- lv_img_decoder_close(&cached_src->dec_dsc);
- memset(&cached_src->dec_dsc, 0, sizeof(lv_img_decoder_dsc_t));
- memset(cached_src, 0, sizeof(lv_img_cache_entry_t));
- cached_src->life = INT32_MIN; /*Make the empty entry very "weak" to force its use */
- return NULL;
- }
-
- cached_src->life = 0;
-
- /*If `time_to_open` was not set in the open function set it here*/
- if(cached_src->dec_dsc.time_to_open == 0) {
- cached_src->dec_dsc.time_to_open = lv_tick_elaps(t_start);
- }
-
- if(cached_src->dec_dsc.time_to_open == 0) cached_src->dec_dsc.time_to_open = 1;
- }
-
- return cached_src;
-}
-
-/**
- * Set the number of images to be cached.
- * More cached images mean more opened image at same time which might mean more memory usage.
- * E.g. if 20 PNG or JPG images are open in the RAM they consume memory while opened in the cache.
- * @param new_entry_cnt number of image to cache
- */
-void lv_img_cache_set_size(uint16_t new_entry_cnt)
-{
- if(LV_GC_ROOT(_lv_img_cache_array) != NULL) {
- /*Clean the cache before free it*/
- lv_img_cache_invalidate_src(NULL);
- lv_mem_free(LV_GC_ROOT(_lv_img_cache_array));
- }
-
- /*Reallocate the cache*/
- LV_GC_ROOT(_lv_img_cache_array) = lv_mem_alloc(sizeof(lv_img_cache_entry_t) * new_entry_cnt);
- LV_ASSERT_MEM(LV_GC_ROOT(_lv_img_cache_array));
- if(LV_GC_ROOT(_lv_img_cache_array) == NULL) {
- entry_cnt = 0;
- return;
- }
- entry_cnt = new_entry_cnt;
-
- /*Clean the cache*/
- uint16_t i;
- for(i = 0; i < entry_cnt; i++) {
- memset(&LV_GC_ROOT(_lv_img_cache_array)[i].dec_dsc, 0, sizeof(lv_img_decoder_dsc_t));
- memset(&LV_GC_ROOT(_lv_img_cache_array)[i], 0, sizeof(lv_img_cache_entry_t));
- }
-}
-
-/**
- * Invalidate an image source in the cache.
- * Useful if the image source is updated therefore it needs to be cached again.
- * @param src an image source path to a file or pointer to an `lv_img_dsc_t` variable.
- */
-void lv_img_cache_invalidate_src(const void * src)
-{
-
- lv_img_cache_entry_t * cache = LV_GC_ROOT(_lv_img_cache_array);
-
- uint16_t i;
- for(i = 0; i < entry_cnt; i++) {
- if(cache[i].dec_dsc.src == src || src == NULL) {
- if(cache[i].dec_dsc.src != NULL) {
- lv_img_decoder_close(&cache[i].dec_dsc);
- }
-
- memset(&cache[i].dec_dsc, 0, sizeof(lv_img_decoder_dsc_t));
- memset(&cache[i], 0, sizeof(lv_img_cache_entry_t));
- }
- }
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
diff --git a/src/libs/lvgl/src/lv_draw/lv_img_cache.h b/src/libs/lvgl/src/lv_draw/lv_img_cache.h
deleted file mode 100644
index 859b4b8d..00000000
--- a/src/libs/lvgl/src/lv_draw/lv_img_cache.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * @file lv_img_cache.h
- *
- */
-
-#ifndef LV_IMG_CACHE_H
-#define LV_IMG_CACHE_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_img_decoder.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**
- * When loading images from the network it can take a long time to download and decode the image.
- *
- * To avoid repeating this heavy load images can be cached.
- */
-typedef struct
-{
- lv_img_decoder_dsc_t dec_dsc; /**< Image information */
-
- /** Count the cache entries's life. Add `time_tio_open` to `life` when the entry is used.
- * Decrement all lifes by one every in every ::lv_img_cache_open.
- * If life == 0 the entry can be reused */
- int32_t life;
-} lv_img_cache_entry_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Open an image using the image decoder interface and cache it.
- * The image will be left open meaning if the image decoder open callback allocated memory then it will remain.
- * The image is closed if a new image is opened and the new image takes its place in the cache.
- * @param src source of the image. Path to file or pointer to an `lv_img_dsc_t` variable
- * @param style style of the image
- * @return pointer to the cache entry or NULL if can open the image
- */
-lv_img_cache_entry_t * lv_img_cache_open(const void * src, const lv_style_t * style);
-
-/**
- * Set the number of images to be cached.
- * More cached images mean more opened image at same time which might mean more memory usage.
- * E.g. if 20 PNG or JPG images are open in the RAM they consume memory while opened in the cache.
- * @param new_entry_cnt number of image to cache
- */
-void lv_img_cache_set_size(uint16_t new_slot_num);
-
-/**
- * Invalidate an image source in the cache.
- * Useful if the image source is updated therefore it needs to be cached again.
- * @param src an image source path to a file or pointer to an `lv_img_dsc_t` variable.
- */
-void lv_img_cache_invalidate_src(const void * src);
-
-/**********************
- * MACROS
- **********************/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_IMG_CACHE_H*/
diff --git a/src/libs/lvgl/src/lv_draw/lv_img_decoder.c b/src/libs/lvgl/src/lv_draw/lv_img_decoder.c
deleted file mode 100644
index b3c9d9c8..00000000
--- a/src/libs/lvgl/src/lv_draw/lv_img_decoder.c
+++ /dev/null
@@ -1,756 +0,0 @@
-/**
- * @file lv_img_decoder.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_img_decoder.h"
-#include "../lv_core/lv_debug.h"
-#include "../lv_draw/lv_draw_img.h"
-#include "../lv_misc/lv_ll.h"
-#include "../lv_misc/lv_color.h"
-#include "../lv_misc/lv_gc.h"
-
-#if defined(LV_GC_INCLUDE)
-#include LV_GC_INCLUDE
-#endif /* LV_ENABLE_GC */
-
-/*********************
- * DEFINES
- *********************/
-#define CF_BUILT_IN_FIRST LV_IMG_CF_TRUE_COLOR
-#define CF_BUILT_IN_LAST LV_IMG_CF_ALPHA_8BIT
-
-/**********************
- * TYPEDEFS
- **********************/
-typedef struct
-{
-#if LV_USE_FILESYSTEM
- lv_fs_file_t * f;
-#endif
- lv_color_t * palette;
- lv_opa_t * opa;
-} lv_img_decoder_built_in_data_t;
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static lv_res_t lv_img_decoder_built_in_line_true_color(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y,
- lv_coord_t len, uint8_t * buf);
-static lv_res_t lv_img_decoder_built_in_line_alpha(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y,
- lv_coord_t len, uint8_t * buf);
-static lv_res_t lv_img_decoder_built_in_line_indexed(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y,
- lv_coord_t len, uint8_t * buf);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Initialize the image decoder module
- * */
-void lv_img_decoder_init(void)
-{
- lv_ll_init(&LV_GC_ROOT(_lv_img_defoder_ll), sizeof(lv_img_decoder_t));
-
- lv_img_decoder_t * decoder;
-
- /*Create a decoder for the built in color format*/
- decoder = lv_img_decoder_create();
- if(decoder == NULL) {
- LV_LOG_WARN("lv_img_decoder_init: out of memory");
- LV_ASSERT_MEM(decoder);
- return;
- }
-
- lv_img_decoder_set_info_cb(decoder, lv_img_decoder_built_in_info);
- lv_img_decoder_set_open_cb(decoder, lv_img_decoder_built_in_open);
- lv_img_decoder_set_read_line_cb(decoder, lv_img_decoder_built_in_read_line);
- lv_img_decoder_set_close_cb(decoder, lv_img_decoder_built_in_close);
-}
-
-/**
- * Get information about an image.
- * Try the created image decoder one by one. Once one is able to get info that info will be used.
- * @param src the image source. E.g. file name or variable.
- * @param header the image info will be stored here
- * @return LV_RES_OK: success; LV_RES_INV: wasn't able to get info about the image
- */
-lv_res_t lv_img_decoder_get_info(const char * src, lv_img_header_t * header)
-{
- header->always_zero = 0;
-
- lv_res_t res = LV_RES_INV;
- lv_img_decoder_t * d;
- LV_LL_READ(LV_GC_ROOT(_lv_img_defoder_ll), d)
- {
- res = LV_RES_INV;
- if(d->info_cb) {
- res = d->info_cb(d, src, header);
- if(res == LV_RES_OK) break;
- }
- }
-
- return res;
-}
-
-/**
- * Open an image.
- * Try the created image decoder one by one. Once one is able to open the image that decoder is save in `dsc`
- * @param dsc describe a decoding session. Simply a pointer to an `lv_img_decoder_dsc_t` variable.
- * @param src the image source. Can be
- * 1) File name: E.g. "S:folder/img1.png" (The drivers needs to registered via `lv_fs_add_drv()`)
- * 2) Variable: Pointer to an `lv_img_dsc_t` variable
- * 3) Symbol: E.g. `LV_SYMBOL_OK`
- * @param style the style of the image
- * @return LV_RES_OK: opened the image. `dsc->img_data` and `dsc->header` are set.
- * LV_RES_INV: none of the registered image decoders were able to open the image.
- */
-lv_res_t lv_img_decoder_open(lv_img_decoder_dsc_t * dsc, const void * src, const lv_style_t * style)
-{
- dsc->style = style;
- dsc->src_type = lv_img_src_get_type(src);
- dsc->user_data = NULL;
-
- if(dsc->src_type == LV_IMG_SRC_FILE) {
- size_t fnlen = strlen(src);
- dsc->src = lv_mem_alloc(fnlen + 1);
- strcpy((char *)dsc->src, src);
- } else {
- dsc->src = src;
- }
-
- lv_res_t res = LV_RES_INV;
-
- lv_img_decoder_t * d;
- LV_LL_READ(LV_GC_ROOT(_lv_img_defoder_ll), d)
- {
- /*Info an Open callbacks are required*/
- if(d->info_cb == NULL || d->open_cb == NULL) continue;
-
- res = d->info_cb(d, src, &dsc->header);
- if(res != LV_RES_OK) continue;
-
- dsc->error_msg = NULL;
- dsc->img_data = NULL;
- dsc->decoder = d;
-
- res = d->open_cb(d, dsc);
-
- /*Opened successfully. It is a good decoder to for this image source*/
- if(res == LV_RES_OK) break;
- }
-
- if(res == LV_RES_INV) {
- memset(dsc, 0, sizeof(lv_img_decoder_dsc_t));
- }
-
- return res;
-}
-
-/**
- * Read a line from an opened image
- * @param dsc pointer to `lv_img_decoder_dsc_t` used in `lv_img_decoder_open`
- * @param x start X coordinate (from left)
- * @param y start Y coordinate (from top)
- * @param len number of pixels to read
- * @param buf store the data here
- * @return LV_RES_OK: success; LV_RES_INV: an error occurred
- */
-lv_res_t lv_img_decoder_read_line(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf)
-{
- lv_res_t res = LV_RES_INV;
- if(dsc->decoder->read_line_cb) res = dsc->decoder->read_line_cb(dsc->decoder, dsc, x, y, len, buf);
-
- return res;
-}
-
-/**
- * Close a decoding session
- * @param dsc pointer to `lv_img_decoder_dsc_t` used in `lv_img_decoder_open`
- */
-void lv_img_decoder_close(lv_img_decoder_dsc_t * dsc)
-{
- if(dsc->decoder) {
- if(dsc->decoder->close_cb) dsc->decoder->close_cb(dsc->decoder, dsc);
-
- if(dsc->src_type == LV_IMG_SRC_FILE) {
- lv_mem_free(dsc->src);
- dsc->src = NULL;
- }
- }
-}
-
-/**
- * Create a new image decoder
- * @return pointer to the new image decoder
- */
-lv_img_decoder_t * lv_img_decoder_create(void)
-{
- lv_img_decoder_t * decoder;
- decoder = lv_ll_ins_head(&LV_GC_ROOT(_lv_img_defoder_ll));
- LV_ASSERT_MEM(decoder);
- if(decoder == NULL) return NULL;
-
- memset(decoder, 0, sizeof(lv_img_decoder_t));
-
- return decoder;
-}
-
-/**
- * Delete an image decoder
- * @param decoder pointer to an image decoder
- */
-void lv_img_decoder_delete(lv_img_decoder_t * decoder)
-{
- lv_ll_rem(&LV_GC_ROOT(_lv_img_defoder_ll), decoder);
- lv_mem_free(decoder);
-}
-
-/**
- * Set a callback to get information about the image
- * @param decoder pointer to an image decoder
- * @param info_cb a function to collect info about an image (fill an `lv_img_header_t` struct)
- */
-void lv_img_decoder_set_info_cb(lv_img_decoder_t * decoder, lv_img_decoder_info_f_t info_cb)
-{
- decoder->info_cb = info_cb;
-}
-
-/**
- * Set a callback to open an image
- * @param decoder pointer to an image decoder
- * @param open_cb a function to open an image
- */
-void lv_img_decoder_set_open_cb(lv_img_decoder_t * decoder, lv_img_decoder_open_f_t open_cb)
-{
- decoder->open_cb = open_cb;
-}
-
-/**
- * Set a callback to a decoded line of an image
- * @param decoder pointer to an image decoder
- * @param read_line_cb a function to read a line of an image
- */
-void lv_img_decoder_set_read_line_cb(lv_img_decoder_t * decoder, lv_img_decoder_read_line_f_t read_line_cb)
-{
- decoder->read_line_cb = read_line_cb;
-}
-
-/**
- * Set a callback to close a decoding session. E.g. close files and free other resources.
- * @param decoder pointer to an image decoder
- * @param close_cb a function to close a decoding session
- */
-void lv_img_decoder_set_close_cb(lv_img_decoder_t * decoder, lv_img_decoder_close_f_t close_cb)
-{
- decoder->close_cb = close_cb;
-}
-
-/**
- * Get info about a built-in image
- * @param decoder the decoder where this function belongs
- * @param src the image source: pointer to an `lv_img_dsc_t` variable, a file path or a symbol
- * @param header store the image data here
- * @return LV_RES_OK: the info is successfully stored in `header`; LV_RES_INV: unknown format or other error.
- */
-lv_res_t lv_img_decoder_built_in_info(lv_img_decoder_t * decoder, const void * src, lv_img_header_t * header)
-{
- (void)decoder; /*Unused*/
-
- lv_img_src_t src_type = lv_img_src_get_type(src);
- if(src_type == LV_IMG_SRC_VARIABLE) {
- lv_img_cf_t cf = ((lv_img_dsc_t *)src)->header.cf;
- if(cf < CF_BUILT_IN_FIRST || cf > CF_BUILT_IN_LAST) return LV_RES_INV;
-
- header->w = ((lv_img_dsc_t *)src)->header.w;
- header->h = ((lv_img_dsc_t *)src)->header.h;
- header->cf = ((lv_img_dsc_t *)src)->header.cf;
- }
-#if LV_USE_FILESYSTEM
- else if(src_type == LV_IMG_SRC_FILE) {
- lv_fs_file_t file;
- lv_fs_res_t res;
- uint32_t rn;
- res = lv_fs_open(&file, src, LV_FS_MODE_RD);
- if(res == LV_FS_RES_OK) {
- res = lv_fs_read(&file, header, sizeof(lv_img_header_t), &rn);
- lv_fs_close(&file);
- }
-
- if(header->cf < CF_BUILT_IN_FIRST || header->cf > CF_BUILT_IN_LAST) return LV_RES_INV;
-
- }
-#endif
- else if(src_type == LV_IMG_SRC_SYMBOL) {
- /*The size depend on the font but it is unknown here. It should be handled outside of the
- * function*/
- header->w = 1;
- header->h = 1;
- /* Symbols always have transparent parts. Important because of cover check in the design
- * function. The actual value doesn't matter because lv_draw_label will draw it*/
- header->cf = LV_IMG_CF_ALPHA_1BIT;
- } else {
- LV_LOG_WARN("Image get info found unknown src type");
- return LV_RES_INV;
- }
- return LV_RES_OK;
-}
-
-/**
- * Open a built in image
- * @param decoder the decoder where this function belongs
- * @param dsc pointer to decoder descriptor. `src`, `style` are already initialized in it.
- * @return LV_RES_OK: the info is successfully stored in `header`; LV_RES_INV: unknown format or other error.
- */
-lv_res_t lv_img_decoder_built_in_open(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc)
-{
- /*Open the file if it's a file*/
- if(dsc->src_type == LV_IMG_SRC_FILE) {
-#if LV_USE_FILESYSTEM
-
- /*Support only "*.bin" files*/
- if(strcmp(lv_fs_get_ext(dsc->src), "bin")) return LV_RES_INV;
-
- lv_fs_file_t f;
- lv_fs_res_t res = lv_fs_open(&f, dsc->src, LV_FS_MODE_RD);
- if(res != LV_FS_RES_OK) {
- LV_LOG_WARN("Built-in image decoder can't open the file");
- return LV_RES_INV;
- }
-
- /*If the file was open successfully save the file descriptor*/
- if(dsc->user_data == NULL) {
- dsc->user_data = lv_mem_alloc(sizeof(lv_img_decoder_built_in_data_t));
- if(dsc->user_data == NULL) {
- LV_LOG_ERROR("img_decoder_built_in_open: out of memory");
- LV_ASSERT_MEM(dsc->user_data);
- }
- memset(dsc->user_data, 0, sizeof(lv_img_decoder_built_in_data_t));
- }
-
- lv_img_decoder_built_in_data_t * user_data = dsc->user_data;
- user_data->f = lv_mem_alloc(sizeof(f));
- if(user_data->f == NULL) {
- LV_LOG_ERROR("img_decoder_built_in_open: out of memory");
- LV_ASSERT_MEM(user_data->f);
- }
-
- memcpy(user_data->f, &f, sizeof(f));
-
-#else
- LV_LOG_WARN("Image built-in decoder cannot read file because LV_USE_FILESYSTEM = 0");
- return LV_RES_INV;
-#endif
- }
-
- lv_img_cf_t cf = dsc->header.cf;
- /*Process true color formats*/
- if(cf == LV_IMG_CF_TRUE_COLOR || cf == LV_IMG_CF_TRUE_COLOR_ALPHA || cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) {
- if(dsc->src_type == LV_IMG_SRC_VARIABLE) {
- /* In case of uncompressed formats the image stored in the ROM/RAM.
- * So simply give its pointer*/
- dsc->img_data = ((lv_img_dsc_t *)dsc->src)->data;
- return LV_RES_OK;
- } else {
- /*If it's a file it need to be read line by line later*/
- dsc->img_data = NULL;
- return LV_RES_OK;
- }
- }
- /*Process indexed images. Build a palette*/
- else if(cf == LV_IMG_CF_INDEXED_1BIT || cf == LV_IMG_CF_INDEXED_2BIT || cf == LV_IMG_CF_INDEXED_4BIT ||
- cf == LV_IMG_CF_INDEXED_8BIT) {
-
-#if LV_IMG_CF_INDEXED
- uint8_t px_size = lv_img_color_format_get_px_size(cf);
- uint32_t palette_size = 1 << px_size;
-
- /*Allocate the palette*/
- if(dsc->user_data == NULL) {
- dsc->user_data = lv_mem_alloc(sizeof(lv_img_decoder_built_in_data_t));
- if(dsc->user_data == NULL) {
- LV_LOG_ERROR("img_decoder_built_in_open: out of memory");
- LV_ASSERT_MEM(dsc->user_data);
- }
- memset(dsc->user_data, 0, sizeof(lv_img_decoder_built_in_data_t));
- }
-
- lv_img_decoder_built_in_data_t * user_data = dsc->user_data;
- user_data->palette = lv_mem_alloc(palette_size * sizeof(lv_color_t));
- user_data->opa = lv_mem_alloc(palette_size * sizeof(lv_opa_t));
- if(user_data->palette == NULL || user_data->opa == NULL) {
- LV_LOG_ERROR("img_decoder_built_in_open: out of memory");
-#if LV_USE_FILESYSTEM
- LV_ASSERT_MEM(user_data->f);
-#endif
- }
-
- if(dsc->src_type == LV_IMG_SRC_FILE) {
- /*Read the palette from file*/
-#if LV_USE_FILESYSTEM
- lv_fs_seek(user_data->f, 4); /*Skip the header*/
- lv_color32_t cur_color;
- uint32_t i;
- for(i = 0; i < palette_size; i++) {
- lv_fs_read(user_data->f, &cur_color, sizeof(lv_color32_t), NULL);
- user_data->palette[i] = lv_color_make(cur_color.ch.red, cur_color.ch.green, cur_color.ch.blue);
- user_data->opa[i] = cur_color.ch.alpha;
- }
-#else
- LV_LOG_WARN("Image built-in decoder can read the palette because LV_USE_FILESYSTEM = 0");
- return LV_RES_INV;
-#endif
- } else {
- /*The palette begins in the beginning of the image data. Just point to it.*/
- lv_color32_t * palette_p = (lv_color32_t *)((lv_img_dsc_t *)dsc->src)->data;
-
- uint32_t i;
- for(i = 0; i < palette_size; i++) {
- user_data->palette[i] = lv_color_make(palette_p[i].ch.red, palette_p[i].ch.green, palette_p[i].ch.blue);
- user_data->opa[i] = palette_p[i].ch.alpha;
- }
- }
-
- dsc->img_data = NULL;
- return LV_RES_OK;
-#else
- LV_LOG_WARN("Indexed (palette) images are not enabled in lv_conf.h. See LV_IMG_CF_INDEXED");
- return LV_RES_INV;
-#endif
- }
- /*Alpha indexed images. */
- else if(cf == LV_IMG_CF_ALPHA_1BIT || cf == LV_IMG_CF_ALPHA_2BIT || cf == LV_IMG_CF_ALPHA_4BIT ||
- cf == LV_IMG_CF_ALPHA_8BIT) {
-#if LV_IMG_CF_ALPHA
- dsc->img_data = NULL;
- return LV_RES_OK; /*Nothing to process*/
-#else
- LV_LOG_WARN("Alpha indexed images are not enabled in lv_conf.h. See LV_IMG_CF_ALPHA");
- return LV_RES_INV;
-#endif
- }
- /*Unknown format. Can't decode it.*/
- else {
- /*Free the potentially allocated memories*/
- lv_img_decoder_built_in_close(decoder, dsc);
-
- LV_LOG_WARN("Image decoder open: unknown color format")
- return LV_RES_INV;
- }
-}
-
-/**
- * Decode `len` pixels starting from the given `x`, `y` coordinates and store them in `buf`.
- * Required only if the "open" function can't return with the whole decoded pixel array.
- * @param decoder pointer to the decoder the function associated with
- * @param dsc pointer to decoder descriptor
- * @param x start x coordinate
- * @param y start y coordinate
- * @param len number of pixels to decode
- * @param buf a buffer to store the decoded pixels
- * @return LV_RES_OK: ok; LV_RES_INV: failed
- */
-lv_res_t lv_img_decoder_built_in_read_line(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc, lv_coord_t x,
- lv_coord_t y, lv_coord_t len, uint8_t * buf)
-{
- (void)decoder; /*Unused*/
-
- lv_res_t res = LV_RES_INV;
-
- if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR || dsc->header.cf == LV_IMG_CF_TRUE_COLOR_ALPHA ||
- dsc->header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) {
- /* For TRUE_COLOR images read line required only for files.
- * For variables the image data was returned in `open`*/
- if(dsc->src_type == LV_IMG_SRC_FILE) {
- res = lv_img_decoder_built_in_line_true_color(dsc, x, y, len, buf);
- }
- } else if(dsc->header.cf == LV_IMG_CF_ALPHA_1BIT || dsc->header.cf == LV_IMG_CF_ALPHA_2BIT ||
- dsc->header.cf == LV_IMG_CF_ALPHA_4BIT || dsc->header.cf == LV_IMG_CF_ALPHA_8BIT) {
-
- res = lv_img_decoder_built_in_line_alpha(dsc, x, y, len, buf);
- } else if(dsc->header.cf == LV_IMG_CF_INDEXED_1BIT || dsc->header.cf == LV_IMG_CF_INDEXED_2BIT ||
- dsc->header.cf == LV_IMG_CF_INDEXED_4BIT || dsc->header.cf == LV_IMG_CF_INDEXED_8BIT) {
- res = lv_img_decoder_built_in_line_indexed(dsc, x, y, len, buf);
- } else {
- LV_LOG_WARN("Built-in image decoder read not supports the color format");
- return LV_RES_INV;
- }
-
- return res;
-}
-
-/**
- * Close the pending decoding. Free resources etc.
- * @param decoder pointer to the decoder the function associated with
- * @param dsc pointer to decoder descriptor
- */
-void lv_img_decoder_built_in_close(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc)
-{
- (void)decoder; /*Unused*/
-
- lv_img_decoder_built_in_data_t * user_data = dsc->user_data;
- if(user_data) {
-#if LV_USE_FILESYSTEM
- if(user_data->f) {
- lv_fs_close(user_data->f);
- lv_mem_free(user_data->f);
- }
-#endif
- if(user_data->palette) lv_mem_free(user_data->palette);
- if(user_data->opa) lv_mem_free(user_data->opa);
-
- lv_mem_free(user_data);
-
- dsc->user_data = NULL;
- }
-}
-
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-static lv_res_t lv_img_decoder_built_in_line_true_color(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y,
- lv_coord_t len, uint8_t * buf)
-{
-#if LV_USE_FILESYSTEM
- lv_img_decoder_built_in_data_t * user_data = dsc->user_data;
- lv_fs_res_t res;
- uint8_t px_size = lv_img_color_format_get_px_size(dsc->header.cf);
-
- uint32_t pos = ((y * dsc->header.w + x) * px_size) >> 3;
- pos += 4; /*Skip the header*/
- res = lv_fs_seek(user_data->f, pos);
- if(res != LV_FS_RES_OK) {
- LV_LOG_WARN("Built-in image decoder seek failed");
- return LV_RES_INV;
- }
- uint32_t btr = len * (px_size >> 3);
- uint32_t br = 0;
- lv_fs_read(user_data->f, buf, btr, &br);
- if(res != LV_FS_RES_OK || btr != br) {
- LV_LOG_WARN("Built-in image decoder read failed");
- return LV_RES_INV;
- }
-
- return LV_RES_OK;
-#else
- LV_LOG_WARN("Image built-in decoder cannot read file because LV_USE_FILESYSTEM = 0");
- return LV_RES_INV;
-#endif
-}
-
-static lv_res_t lv_img_decoder_built_in_line_alpha(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y,
- lv_coord_t len, uint8_t * buf)
-{
-
-#if LV_IMG_CF_ALPHA
- const lv_opa_t alpha1_opa_table[2] = {0, 255}; /*Opacity mapping with bpp = 1 (Just for compatibility)*/
- const lv_opa_t alpha2_opa_table[4] = {0, 85, 170, 255}; /*Opacity mapping with bpp = 2*/
- const lv_opa_t alpha4_opa_table[16] = {0, 17, 34, 51, /*Opacity mapping with bpp = 4*/
- 68, 85, 102, 119, 136, 153, 170, 187, 204, 221, 238, 255};
-
- /*Simply fill the buffer with the color. Later only the alpha value will be modified.*/
- lv_color_t bg_color = dsc->style->image.color;
- lv_coord_t i;
- for(i = 0; i < len; i++) {
-#if LV_COLOR_DEPTH == 8 || LV_COLOR_DEPTH == 1
- buf[i * LV_IMG_PX_SIZE_ALPHA_BYTE] = bg_color.full;
-#elif LV_COLOR_DEPTH == 16
- /*Because of Alpha byte 16 bit color can start on odd address which can cause crash*/
- buf[i * LV_IMG_PX_SIZE_ALPHA_BYTE] = bg_color.full & 0xFF;
- buf[i * LV_IMG_PX_SIZE_ALPHA_BYTE + 1] = (bg_color.full >> 8) & 0xFF;
-#elif LV_COLOR_DEPTH == 32
- *((uint32_t *)&buf[i * LV_IMG_PX_SIZE_ALPHA_BYTE]) = bg_color.full;
-#else
-#error "Invalid LV_COLOR_DEPTH. Check it in lv_conf.h"
-#endif
- }
-
- const lv_opa_t * opa_table = NULL;
- uint8_t px_size = lv_img_color_format_get_px_size(dsc->header.cf);
- uint16_t mask = (1 << px_size) - 1; /*E.g. px_size = 2; mask = 0x03*/
-
- lv_coord_t w = 0;
- uint32_t ofs = 0;
- int8_t pos = 0;
- switch(dsc->header.cf) {
- case LV_IMG_CF_ALPHA_1BIT:
- w = (dsc->header.w >> 3); /*E.g. w = 20 -> w = 2 + 1*/
- if(dsc->header.w & 0x7) w++;
- ofs += w * y + (x >> 3); /*First pixel*/
- pos = 7 - (x & 0x7);
- opa_table = alpha1_opa_table;
- break;
- case LV_IMG_CF_ALPHA_2BIT:
- w = (dsc->header.w >> 2); /*E.g. w = 13 -> w = 3 + 1 (bytes)*/
- if(dsc->header.w & 0x3) w++;
- ofs += w * y + (x >> 2); /*First pixel*/
- pos = 6 - ((x & 0x3) * 2);
- opa_table = alpha2_opa_table;
- break;
- case LV_IMG_CF_ALPHA_4BIT:
- w = (dsc->header.w >> 1); /*E.g. w = 13 -> w = 6 + 1 (bytes)*/
- if(dsc->header.w & 0x1) w++;
- ofs += w * y + (x >> 1); /*First pixel*/
- pos = 4 - ((x & 0x1) * 4);
- opa_table = alpha4_opa_table;
- break;
- case LV_IMG_CF_ALPHA_8BIT:
- w = dsc->header.w; /*E.g. x = 7 -> w = 7 (bytes)*/
- ofs += w * y + x; /*First pixel*/
- pos = 0;
- break;
- }
-
-#if LV_USE_FILESYSTEM
- lv_img_decoder_built_in_data_t * user_data = dsc->user_data;
- uint8_t fs_buf[LV_HOR_RES_MAX];
-#endif
-
- const uint8_t * data_tmp = NULL;
- if(dsc->src_type == LV_IMG_SRC_VARIABLE) {
- const lv_img_dsc_t * img_dsc = dsc->src;
-
- data_tmp = img_dsc->data + ofs;
- } else {
-#if LV_USE_FILESYSTEM
- lv_fs_seek(user_data->f, ofs + 4); /*+4 to skip the header*/
- lv_fs_read(user_data->f, fs_buf, w, NULL);
- data_tmp = fs_buf;
-#else
- LV_LOG_WARN("Image built-in alpha line reader can't read file because LV_USE_FILESYSTEM = 0");
- data_tmp = NULL; /*To avoid warnings*/
- return LV_RES_INV;
-#endif
- }
-
- uint8_t byte_act = 0;
- uint8_t val_act;
- for(i = 0; i < len; i++) {
- val_act = (data_tmp[byte_act] & (mask << pos)) >> pos;
-
- buf[i * LV_IMG_PX_SIZE_ALPHA_BYTE + LV_IMG_PX_SIZE_ALPHA_BYTE - 1] =
- dsc->header.cf == LV_IMG_CF_ALPHA_8BIT ? val_act : opa_table[val_act];
-
- pos -= px_size;
- if(pos < 0) {
- pos = 8 - px_size;
- data_tmp++;
- }
- }
-
- return LV_RES_OK;
-
-#else
- LV_LOG_WARN("Image built-in alpha line reader failed because LV_IMG_CF_ALPHA is 0 in lv_conf.h");
- return LV_RES_INV;
-#endif
-}
-
-static lv_res_t lv_img_decoder_built_in_line_indexed(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y,
- lv_coord_t len, uint8_t * buf)
-{
-
-#if LV_IMG_CF_INDEXED
- uint8_t px_size = lv_img_color_format_get_px_size(dsc->header.cf);
- uint16_t mask = (1 << px_size) - 1; /*E.g. px_size = 2; mask = 0x03*/
-
- lv_coord_t w = 0;
- int8_t pos = 0;
- uint32_t ofs = 0;
- switch(dsc->header.cf) {
- case LV_IMG_CF_INDEXED_1BIT:
- w = (dsc->header.w >> 3); /*E.g. w = 20 -> w = 2 + 1*/
- if(dsc->header.w & 0x7) w++;
- ofs += w * y + (x >> 3); /*First pixel*/
- ofs += 8; /*Skip the palette*/
- pos = 7 - (x & 0x7);
- break;
- case LV_IMG_CF_INDEXED_2BIT:
- w = (dsc->header.w >> 2); /*E.g. w = 13 -> w = 3 + 1 (bytes)*/
- if(dsc->header.w & 0x3) w++;
- ofs += w * y + (x >> 2); /*First pixel*/
- ofs += 16; /*Skip the palette*/
- pos = 6 - ((x & 0x3) * 2);
- break;
- case LV_IMG_CF_INDEXED_4BIT:
- w = (dsc->header.w >> 1); /*E.g. w = 13 -> w = 6 + 1 (bytes)*/
- if(dsc->header.w & 0x1) w++;
- ofs += w * y + (x >> 1); /*First pixel*/
- ofs += 64; /*Skip the palette*/
- pos = 4 - ((x & 0x1) * 4);
- break;
- case LV_IMG_CF_INDEXED_8BIT:
- w = dsc->header.w; /*E.g. x = 7 -> w = 7 (bytes)*/
- ofs += w * y + x; /*First pixel*/
- ofs += 1024; /*Skip the palette*/
- pos = 0;
- break;
- }
-
- lv_img_decoder_built_in_data_t * user_data = dsc->user_data;
-
-#if LV_USE_FILESYSTEM
- uint8_t fs_buf[LV_HOR_RES_MAX];
-#endif
- const uint8_t * data_tmp = NULL;
- if(dsc->src_type == LV_IMG_SRC_VARIABLE) {
- const lv_img_dsc_t * img_dsc = dsc->src;
- data_tmp = img_dsc->data + ofs;
- } else {
-#if LV_USE_FILESYSTEM
- lv_fs_seek(user_data->f, ofs + 4); /*+4 to skip the header*/
- lv_fs_read(user_data->f, fs_buf, w, NULL);
- data_tmp = fs_buf;
-#else
- LV_LOG_WARN("Image built-in indexed line reader can't read file because LV_USE_FILESYSTEM = 0");
- data_tmp = NULL; /*To avoid warnings*/
- return LV_RES_INV;
-#endif
- }
-
- uint8_t val_act;
- lv_coord_t i;
- for(i = 0; i < len; i++) {
- val_act = (*data_tmp & (mask << pos)) >> pos;
-
- lv_color_t color = user_data->palette[val_act];
-#if LV_COLOR_DEPTH == 8 || LV_COLOR_DEPTH == 1
- buf[i * LV_IMG_PX_SIZE_ALPHA_BYTE] = color.full;
-#elif LV_COLOR_DEPTH == 16
- /*Because of Alpha byte 16 bit color can start on odd address which can cause crash*/
- buf[i * LV_IMG_PX_SIZE_ALPHA_BYTE] = color.full & 0xFF;
- buf[i * LV_IMG_PX_SIZE_ALPHA_BYTE + 1] = (color.full >> 8) & 0xFF;
-#elif LV_COLOR_DEPTH == 32
- *((uint32_t *)&buf[i * LV_IMG_PX_SIZE_ALPHA_BYTE]) = color.full;
-#else
-#error "Invalid LV_COLOR_DEPTH. Check it in lv_conf.h"
-#endif
- buf[i * LV_IMG_PX_SIZE_ALPHA_BYTE + LV_IMG_PX_SIZE_ALPHA_BYTE - 1] = user_data->opa[val_act];
-
- pos -= px_size;
- if(pos < 0) {
- pos = 8 - px_size;
- data_tmp++;
- }
- }
-
- return LV_RES_OK;
-#else
- LV_LOG_WARN("Image built-in indexed line reader failed because LV_IMG_CF_INDEXED is 0 in lv_conf.h");
- return LV_RES_INV;
-#endif
-}
diff --git a/src/libs/lvgl/src/lv_draw/lv_img_decoder.h b/src/libs/lvgl/src/lv_draw/lv_img_decoder.h
deleted file mode 100644
index fb7af832..00000000
--- a/src/libs/lvgl/src/lv_draw/lv_img_decoder.h
+++ /dev/null
@@ -1,357 +0,0 @@
-/**
- * @file lv_img_decoder.h
- *
- */
-
-#ifndef LV_IMG_DEOCER_H
-#define LV_IMG_DEOCER_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#include <stdint.h>
-#include "../lv_misc/lv_fs.h"
-#include "../lv_misc/lv_types.h"
-#include "../lv_misc/lv_area.h"
-#include "../lv_core/lv_style.h"
-
-/*********************
- * DEFINES
- *********************/
-/*If image pixels contains alpha we need to know how much byte is a pixel*/
-#if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8
-#define LV_IMG_PX_SIZE_ALPHA_BYTE 2
-#elif LV_COLOR_DEPTH == 16
-#define LV_IMG_PX_SIZE_ALPHA_BYTE 3
-#elif LV_COLOR_DEPTH == 32
-#define LV_IMG_PX_SIZE_ALPHA_BYTE 4
-#endif
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**
- * Source of image. */
-enum {
- LV_IMG_SRC_VARIABLE, /** Binary/C variable */
- LV_IMG_SRC_FILE, /** File in filesystem */
- LV_IMG_SRC_SYMBOL, /** Symbol (@ref lv_symbol_def.h) */
- LV_IMG_SRC_UNKNOWN, /** Unknown source */
-};
-
-typedef uint8_t lv_img_src_t;
-/**
- * LittlevGL image header
- */
-typedef struct
-{
-
- /* The first 8 bit is very important to distinguish the different source types.
- * For more info see `lv_img_get_src_type()` in lv_img.c */
- uint32_t cf : 5; /* Color format: See `lv_img_color_format_t`*/
- uint32_t always_zero : 3; /*It the upper bits of the first byte. Always zero to look like a
- non-printable character*/
-
- uint32_t reserved : 2; /*Reserved to be used later*/
-
- uint32_t w : 11; /*Width of the image map*/
- uint32_t h : 11; /*Height of the image map*/
-} lv_img_header_t;
-
-/*Image color format*/
-enum {
- LV_IMG_CF_UNKNOWN = 0,
-
- LV_IMG_CF_RAW, /**< Contains the file as it is. Needs custom decoder function*/
- LV_IMG_CF_RAW_ALPHA, /**< Contains the file as it is. The image has alpha. Needs custom decoder
- function*/
- LV_IMG_CF_RAW_CHROMA_KEYED, /**< Contains the file as it is. The image is chroma keyed. Needs
- custom decoder function*/
-
- LV_IMG_CF_TRUE_COLOR, /**< Color format and depth should match with LV_COLOR settings*/
- LV_IMG_CF_TRUE_COLOR_ALPHA, /**< Same as `LV_IMG_CF_TRUE_COLOR` but every pixel has an alpha byte*/
- LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED, /**< Same as `LV_IMG_CF_TRUE_COLOR` but LV_COLOR_TRANSP pixels
- will be transparent*/
-
- LV_IMG_CF_INDEXED_1BIT, /**< Can have 2 different colors in a palette (always chroma keyed)*/
- LV_IMG_CF_INDEXED_2BIT, /**< Can have 4 different colors in a palette (always chroma keyed)*/
- LV_IMG_CF_INDEXED_4BIT, /**< Can have 16 different colors in a palette (always chroma keyed)*/
- LV_IMG_CF_INDEXED_8BIT, /**< Can have 256 different colors in a palette (always chroma keyed)*/
-
- LV_IMG_CF_ALPHA_1BIT, /**< Can have one color and it can be drawn or not*/
- LV_IMG_CF_ALPHA_2BIT, /**< Can have one color but 4 different alpha value*/
- LV_IMG_CF_ALPHA_4BIT, /**< Can have one color but 16 different alpha value*/
- LV_IMG_CF_ALPHA_8BIT, /**< Can have one color but 256 different alpha value*/
-
- LV_IMG_CF_RESERVED_15, /**< Reserved for further use. */
- LV_IMG_CF_RESERVED_16, /**< Reserved for further use. */
- LV_IMG_CF_RESERVED_17, /**< Reserved for further use. */
- LV_IMG_CF_RESERVED_18, /**< Reserved for further use. */
- LV_IMG_CF_RESERVED_19, /**< Reserved for further use. */
- LV_IMG_CF_RESERVED_20, /**< Reserved for further use. */
- LV_IMG_CF_RESERVED_21, /**< Reserved for further use. */
- LV_IMG_CF_RESERVED_22, /**< Reserved for further use. */
- LV_IMG_CF_RESERVED_23, /**< Reserved for further use. */
-
- LV_IMG_CF_USER_ENCODED_0, /**< User holder encoding format. */
- LV_IMG_CF_USER_ENCODED_1, /**< User holder encoding format. */
- LV_IMG_CF_USER_ENCODED_2, /**< User holder encoding format. */
- LV_IMG_CF_USER_ENCODED_3, /**< User holder encoding format. */
- LV_IMG_CF_USER_ENCODED_4, /**< User holder encoding format. */
- LV_IMG_CF_USER_ENCODED_5, /**< User holder encoding format. */
- LV_IMG_CF_USER_ENCODED_6, /**< User holder encoding format. */
- LV_IMG_CF_USER_ENCODED_7, /**< User holder encoding format. */
-};
-typedef uint8_t lv_img_cf_t;
-
-/** Image header it is compatible with
- * the result from image converter utility*/
-typedef struct
-{
- lv_img_header_t header;
- uint32_t data_size;
- const uint8_t * data;
-} lv_img_dsc_t;
-
-/* Decoder function definitions */
-
-struct _lv_img_decoder;
-struct _lv_img_decoder_dsc;
-
-/**
- * Get info from an image and store in the `header`
- * @param src the image source. Can be a pointer to a C array or a file name (Use
- * `lv_img_src_get_type` to determine the type)
- * @param header store the info here
- * @return LV_RES_OK: info written correctly; LV_RES_INV: failed
- */
-typedef lv_res_t (*lv_img_decoder_info_f_t)(struct _lv_img_decoder * decoder, const void * src,
- lv_img_header_t * header);
-
-/**
- * Open an image for decoding. Prepare it as it is required to read it later
- * @param decoder pointer to the decoder the function associated with
- * @param dsc pointer to decoder descriptor. `src`, `style` are already initialized in it.
- */
-typedef lv_res_t (*lv_img_decoder_open_f_t)(struct _lv_img_decoder * decoder, struct _lv_img_decoder_dsc * dsc);
-
-/**
- * Decode `len` pixels starting from the given `x`, `y` coordinates and store them in `buf`.
- * Required only if the "open" function can't return with the whole decoded pixel array.
- * @param decoder pointer to the decoder the function associated with
- * @param dsc pointer to decoder descriptor
- * @param x start x coordinate
- * @param y start y coordinate
- * @param len number of pixels to decode
- * @param buf a buffer to store the decoded pixels
- * @return LV_RES_OK: ok; LV_RES_INV: failed
- */
-typedef lv_res_t (*lv_img_decoder_read_line_f_t)(struct _lv_img_decoder * decoder, struct _lv_img_decoder_dsc * dsc,
- lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf);
-
-/**
- * Close the pending decoding. Free resources etc.
- * @param decoder pointer to the decoder the function associated with
- * @param dsc pointer to decoder descriptor
- */
-typedef void (*lv_img_decoder_close_f_t)(struct _lv_img_decoder * decoder, struct _lv_img_decoder_dsc * dsc);
-
-typedef struct _lv_img_decoder
-{
- lv_img_decoder_info_f_t info_cb;
- lv_img_decoder_open_f_t open_cb;
- lv_img_decoder_read_line_f_t read_line_cb;
- lv_img_decoder_close_f_t close_cb;
-
-#if LV_USE_USER_DATA
- lv_img_decoder_user_data_t user_data;
-#endif
-} lv_img_decoder_t;
-
-/**Describe an image decoding session. Stores data about the decoding*/
-typedef struct _lv_img_decoder_dsc
-{
- /**The decoder which was able to open the image source*/
- lv_img_decoder_t * decoder;
-
- /**The image source. A file path like "S:my_img.png" or pointer to an `lv_img_dsc_t` variable*/
- const void * src;
-
- /**Style to draw the image.*/
- const lv_style_t * style;
-
- /**Type of the source: file or variable. Can be set in `open` function if required*/
- lv_img_src_t src_type;
-
- /**Info about the opened image: color format, size, etc. MUST be set in `open` function*/
- lv_img_header_t header;
-
- /** Pointer to a buffer where the image's data (pixels) are stored in a decoded, plain format.
- * MUST be set in `open` function*/
- const uint8_t * img_data;
-
- /** How much time did it take to open the image. [ms]
- * If not set `lv_img_cache` will measure and set the time to open*/
- uint32_t time_to_open;
-
- /**A text to display instead of the image when the image can't be opened.
- * Can be set in `open` function or set NULL. */
- const char * error_msg;
-
- /**Store any custom data here is required*/
- void * user_data;
-} lv_img_decoder_dsc_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Initialize the image decoder module
- */
-void lv_img_decoder_init(void);
-
-/**
- * Get information about an image.
- * Try the created image decoder one by one. Once one is able to get info that info will be used.
- * @param src the image source. Can be
- * 1) File name: E.g. "S:folder/img1.png" (The drivers needs to registered via `lv_fs_add_drv()`)
- * 2) Variable: Pointer to an `lv_img_dsc_t` variable
- * 3) Symbol: E.g. `LV_SYMBOL_OK`
- * @param header the image info will be stored here
- * @return LV_RES_OK: success; LV_RES_INV: wasn't able to get info about the image
- */
-lv_res_t lv_img_decoder_get_info(const char * src, lv_img_header_t * header);
-
-/**
- * Open an image.
- * Try the created image decoder one by one. Once one is able to open the image that decoder is save in `dsc`
- * @param dsc describe a decoding session. Simply a pointer to an `lv_img_decoder_dsc_t` variable.
- * @param src the image source. Can be
- * 1) File name: E.g. "S:folder/img1.png" (The drivers needs to registered via `lv_fs_add_drv()`)
- * 2) Variable: Pointer to an `lv_img_dsc_t` variable
- * 3) Symbol: E.g. `LV_SYMBOL_OK`
- * @param style the style of the image
- * @return LV_RES_OK: opened the image. `dsc->img_data` and `dsc->header` are set.
- * LV_RES_INV: none of the registered image decoders were able to open the image.
- */
-lv_res_t lv_img_decoder_open(lv_img_decoder_dsc_t * dsc, const void * src, const lv_style_t * style);
-
-/**
- * Read a line from an opened image
- * @param dsc pointer to `lv_img_decoder_dsc_t` used in `lv_img_decoder_open`
- * @param x start X coordinate (from left)
- * @param y start Y coordinate (from top)
- * @param len number of pixels to read
- * @param buf store the data here
- * @return LV_RES_OK: success; LV_RES_INV: an error occurred
- */
-lv_res_t lv_img_decoder_read_line(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_coord_t len,
- uint8_t * buf);
-
-/**
- * Close a decoding session
- * @param dsc pointer to `lv_img_decoder_dsc_t` used in `lv_img_decoder_open`
- */
-void lv_img_decoder_close(lv_img_decoder_dsc_t * dsc);
-
-/**
- * Create a new image decoder
- * @return pointer to the new image decoder
- */
-lv_img_decoder_t * lv_img_decoder_create(void);
-
-/**
- * Delete an image decoder
- * @param decoder pointer to an image decoder
- */
-void lv_img_decoder_delete(lv_img_decoder_t * decoder);
-
-/**
- * Set a callback to get information about the image
- * @param decoder pointer to an image decoder
- * @param info_cb a function to collect info about an image (fill an `lv_img_header_t` struct)
- */
-void lv_img_decoder_set_info_cb(lv_img_decoder_t * decoder, lv_img_decoder_info_f_t info_cb);
-
-/**
- * Set a callback to open an image
- * @param decoder pointer to an image decoder
- * @param open_cb a function to open an image
- */
-void lv_img_decoder_set_open_cb(lv_img_decoder_t * decoder, lv_img_decoder_open_f_t open_cb);
-
-/**
- * Set a callback to a decoded line of an image
- * @param decoder pointer to an image decoder
- * @param read_line_cb a function to read a line of an image
- */
-void lv_img_decoder_set_read_line_cb(lv_img_decoder_t * decoder, lv_img_decoder_read_line_f_t read_line_cb);
-
-/**
- * Set a callback to close a decoding session. E.g. close files and free other resources.
- * @param decoder pointer to an image decoder
- * @param close_cb a function to close a decoding session
- */
-void lv_img_decoder_set_close_cb(lv_img_decoder_t * decoder, lv_img_decoder_close_f_t close_cb);
-
-
-
-/**
- * Get info about a built-in image
- * @param decoder the decoder where this function belongs
- * @param src the image source: pointer to an `lv_img_dsc_t` variable, a file path or a symbol
- * @param header store the image data here
- * @return LV_RES_OK: the info is successfully stored in `header`; LV_RES_INV: unknown format or other error.
- */
-lv_res_t lv_img_decoder_built_in_info(lv_img_decoder_t * decoder, const void * src, lv_img_header_t * header);
-
-/**
- * Open a built in image
- * @param decoder the decoder where this function belongs
- * @param dsc pointer to decoder descriptor. `src`, `style` are already initialized in it.
- * @return LV_RES_OK: the info is successfully stored in `header`; LV_RES_INV: unknown format or other error.
- */
-lv_res_t lv_img_decoder_built_in_open(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc);
-
-/**
- * Decode `len` pixels starting from the given `x`, `y` coordinates and store them in `buf`.
- * Required only if the "open" function can't return with the whole decoded pixel array.
- * @param decoder pointer to the decoder the function associated with
- * @param dsc pointer to decoder descriptor
- * @param x start x coordinate
- * @param y start y coordinate
- * @param len number of pixels to decode
- * @param buf a buffer to store the decoded pixels
- * @return LV_RES_OK: ok; LV_RES_INV: failed
- */
-lv_res_t lv_img_decoder_built_in_read_line(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc, lv_coord_t x,
- lv_coord_t y, lv_coord_t len, uint8_t * buf);
-
-/**
- * Close the pending decoding. Free resources etc.
- * @param decoder pointer to the decoder the function associated with
- * @param dsc pointer to decoder descriptor
- */
-void lv_img_decoder_built_in_close(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc);
-
-/**********************
- * MACROS
- **********************/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_TEMPL_H*/
diff --git a/src/libs/lvgl/src/lv_font/lv_font.c b/src/libs/lvgl/src/lv_font/lv_font.c
deleted file mode 100644
index c2d6eac8..00000000
--- a/src/libs/lvgl/src/lv_font/lv_font.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * @file lv_font.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-
-#include "lv_font.h"
-#include "../lv_misc/lv_utils.h"
-#include "../lv_misc/lv_log.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-
-/**********************
- * STATIC VARIABLES
- **********************/
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Return with the bitmap of a font.
- * @param font_p pointer to a font
- * @param letter an UNICODE character code
- * @return pointer to the bitmap of the letter
- */
-const uint8_t * lv_font_get_glyph_bitmap(const lv_font_t * font_p, uint32_t letter)
-{
- return font_p->get_glyph_bitmap(font_p, letter);
-}
-
-/**
- * Get the descriptor of a glyph
- * @param font_p pointer to font
- * @param dsc_out store the result descriptor here
- * @param letter an UNICODE letter code
- * @return true: descriptor is successfully loaded into `dsc_out`.
- * false: the letter was not found, no data is loaded to `dsc_out`
- */
-bool lv_font_get_glyph_dsc(const lv_font_t * font_p, lv_font_glyph_dsc_t * dsc_out, uint32_t letter, uint32_t letter_next)
-{
- return font_p->get_glyph_dsc(font_p, dsc_out, letter, letter_next);
-}
-
-/**
- * Get the width of a glyph with kerning
- * @param font pointer to a font
- * @param letter an UNICODE letter
- * @param letter_next the next letter after `letter`. Used for kerning
- * @return the width of the glyph
- */
-uint16_t lv_font_get_glyph_width(const lv_font_t * font, uint32_t letter, uint32_t letter_next)
-{
- lv_font_glyph_dsc_t g;
- bool ret;
- ret = lv_font_get_glyph_dsc(font, &g, letter, letter_next);
- if(ret) return g.adv_w;
- else return 0;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
diff --git a/src/libs/lvgl/src/lv_font/lv_font.h b/src/libs/lvgl/src/lv_font/lv_font.h
deleted file mode 100644
index ee3300b8..00000000
--- a/src/libs/lvgl/src/lv_font/lv_font.h
+++ /dev/null
@@ -1,164 +0,0 @@
-/**
- * @file lv_font.h
- *
- */
-
-#ifndef LV_FONT_H
-#define LV_FONT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#include <stdint.h>
-#include <stddef.h>
-#include <stdbool.h>
-
-#include "lv_symbol_def.h"
-
-/*********************
- * DEFINES
- *********************/
-/*Number of fractional digits in the advanced width (`adv_w`) field of `lv_font_glyph_dsc_t`*/
-#define LV_FONT_WIDTH_FRACT_DIGIT 4
-
-#define LV_FONT_KERN_POSITIVE 0
-#define LV_FONT_KERN_NEGATIVE 1
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/*------------------
- * General types
- *-----------------*/
-
-/** Describes the properties of a glyph. */
-typedef struct
-{
- uint16_t adv_w; /**< The glyph needs this space. Draw the next glyph after this width. 8 bit integer, 4 bit fractional */
- uint8_t box_w; /**< Width of the glyph's bounding box*/
- uint8_t box_h; /**< Height of the glyph's bounding box*/
- int8_t ofs_x; /**< x offset of the bounding box*/
- int8_t ofs_y; /**< y offset of the bounding box*/
- uint8_t bpp; /**< Bit-per-pixel: 1, 2, 4, 8*/
-}lv_font_glyph_dsc_t;
-
-
-/** The bitmaps might be upscaled by 3 to achieve subpixel rendering. */
-enum {
- LV_FONT_SUBPX_NONE,
- LV_FONT_SUBPX_HOR,
- LV_FONT_SUBPX_VER,
- LV_FONT_SUBPX_BOTH,
-};
-
-typedef uint8_t lv_font_subpx_t;
-
-/** Describe the properties of a font*/
-typedef struct _lv_font_struct
-{
- /** Get a glyph's descriptor from a font*/
- bool (*get_glyph_dsc)(const struct _lv_font_struct *, lv_font_glyph_dsc_t *, uint32_t letter, uint32_t letter_next);
-
- /** Get a glyph's bitmap from a font*/
- const uint8_t * (*get_glyph_bitmap)(const struct _lv_font_struct *, uint32_t);
-
- /*Pointer to the font in a font pack (must have the same line height)*/
- uint8_t line_height; /**< The real line height where any text fits*/
- int8_t base_line; /**< Base line measured from the top of the line_height*/
- uint8_t subpx :2; /**< An element of `lv_font_subpx_t`*/
- void * dsc; /**< Store implementation specific or run_time data or caching here*/
-#if LV_USE_USER_DATA
- lv_font_user_data_t user_data; /**< Custom user data for font. */
-#endif
-
-
-} lv_font_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Return with the bitmap of a font.
- * @param font_p pointer to a font
- * @param letter an UNICODE character code
- * @return pointer to the bitmap of the letter
- */
-const uint8_t * lv_font_get_glyph_bitmap(const lv_font_t * font_p, uint32_t letter);
-
-/**
- * Get the descriptor of a glyph
- * @param font_p pointer to font
- * @param dsc_out store the result descriptor here
- * @param letter an UNICODE letter code
- * @return true: descriptor is successfully loaded into `dsc_out`.
- * false: the letter was not found, no data is loaded to `dsc_out`
- */
-bool lv_font_get_glyph_dsc(const lv_font_t * font_p, lv_font_glyph_dsc_t * dsc_out, uint32_t letter, uint32_t letter_next);
-
-/**
- * Get the width of a glyph with kerning
- * @param font pointer to a font
- * @param letter an UNICODE letter
- * @param letter_next the next letter after `letter`. Used for kerning
- * @return the width of the glyph
- */
-uint16_t lv_font_get_glyph_width(const lv_font_t * font, uint32_t letter, uint32_t letter_next);
-
-/**
- * Get the line height of a font. All characters fit into this height
- * @param font_p pointer to a font
- * @return the height of a font
- */
-static inline uint8_t lv_font_get_line_height(const lv_font_t * font_p)
-{
- return font_p->line_height;
-}
-
-/**********************
- * MACROS
- **********************/
-
-#define LV_FONT_DECLARE(font_name) extern lv_font_t font_name;
-
-#if LV_FONT_ROBOTO_12
-LV_FONT_DECLARE(lv_font_roboto_12)
-#endif
-
-#if LV_FONT_ROBOTO_16
-LV_FONT_DECLARE(lv_font_roboto_16)
-#endif
-
-#if LV_FONT_ROBOTO_22
-LV_FONT_DECLARE(lv_font_roboto_22)
-#endif
-
-#if LV_FONT_ROBOTO_28
-LV_FONT_DECLARE(lv_font_roboto_28)
-#endif
-
-#if LV_FONT_UNSCII_8
-LV_FONT_DECLARE(lv_font_unscii_8)
-#endif
-
-/*Declare the custom (user defined) fonts*/
-#ifdef LV_FONT_CUSTOM_DECLARE
-LV_FONT_CUSTOM_DECLARE
-#endif
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*USE_FONT*/
diff --git a/src/libs/lvgl/src/lv_font/lv_font.mk b/src/libs/lvgl/src/lv_font/lv_font.mk
deleted file mode 100644
index 836d86a6..00000000
--- a/src/libs/lvgl/src/lv_font/lv_font.mk
+++ /dev/null
@@ -1,12 +0,0 @@
-CSRCS += lv_font.c
-CSRCS += lv_font_fmt_txt.c
-CSRCS += lv_font_roboto_12.c
-CSRCS += lv_font_roboto_16.c
-CSRCS += lv_font_roboto_22.c
-CSRCS += lv_font_roboto_28.c
-CSRCS += lv_font_unscii_8.c
-
-DEPPATH += --dep-path $(LVGL_DIR)/lvgl/src/lv_font
-VPATH += :$(LVGL_DIR)/lvgl/src/lv_font
-
-CFLAGS += "-I$(LVGL_DIR)/lvgl/src/lv_font"
diff --git a/src/libs/lvgl/src/lv_font/lv_font_fmt_txt.c b/src/libs/lvgl/src/lv_font/lv_font_fmt_txt.c
deleted file mode 100644
index 78fcccdd..00000000
--- a/src/libs/lvgl/src/lv_font/lv_font_fmt_txt.c
+++ /dev/null
@@ -1,479 +0,0 @@
-/**
- * @file lv_font.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_font.h"
-#include "lv_font_fmt_txt.h"
-#include "../lv_core/lv_debug.h"
-#include "../lv_draw/lv_draw.h"
-#include "../lv_misc/lv_types.h"
-#include "../lv_misc/lv_log.h"
-#include "../lv_misc/lv_utils.h"
-#include "../lv_misc/lv_mem.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-typedef enum {
- RLE_STATE_SINGLE = 0,
- RLE_STATE_REPEATE,
- RLE_STATE_COUNTER,
-}rle_state_t;
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static uint32_t get_glyph_dsc_id(const lv_font_t * font, uint32_t letter);
-static int8_t get_kern_value(const lv_font_t * font, uint32_t gid_left, uint32_t gid_right);
-static int32_t unicode_list_compare(const void * ref, const void * element);
-static int32_t kern_pair_8_compare(const void * ref, const void * element);
-static int32_t kern_pair_16_compare(const void * ref, const void * element);
-
-static void decompress(const uint8_t * in, uint8_t * out, lv_coord_t w, lv_coord_t h, uint8_t bpp);
-static void decompress_line(uint8_t * out, lv_coord_t w);
-static uint8_t get_bits(const uint8_t * in, uint32_t bit_pos, uint8_t len);
-static void bits_write(uint8_t * out, uint32_t bit_pos, uint8_t val, uint8_t len);
-static void rle_init(const uint8_t * in, uint8_t bpp);
-static uint8_t rle_next(void);
-
-
-/**********************
- * STATIC VARIABLES
- **********************/
-
-static uint32_t rle_rdp;
-static const uint8_t * rle_in;
-static uint8_t rle_bpp;
-static uint8_t rle_prev_v;
-static uint8_t rle_cnt;
-static rle_state_t rle_state;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Used as `get_glyph_bitmap` callback in LittelvGL's native font format if the font is uncompressed.
- * @param font pointer to font
- * @param unicode_letter an unicode letter which bitmap should be get
- * @return pointer to the bitmap or NULL if not found
- */
-const uint8_t * lv_font_get_bitmap_fmt_txt(const lv_font_t * font, uint32_t unicode_letter)
-{
- lv_font_fmt_txt_dsc_t * fdsc = (lv_font_fmt_txt_dsc_t *) font->dsc;
- uint32_t gid = get_glyph_dsc_id(font, unicode_letter);
- if(!gid) return NULL;
-
- const lv_font_fmt_txt_glyph_dsc_t * gdsc = &fdsc->glyph_dsc[gid];
-
- if(fdsc->bitmap_format == LV_FONT_FMT_TXT_PLAIN) {
- if(gdsc) return &fdsc->glyph_bitmap[gdsc->bitmap_index];
- }
- /*Handle compressed bitmap*/
- else
- {
- static uint8_t * buf = NULL;
-
- uint32_t gsize = gdsc->box_w * gdsc->box_h;
- if(gsize == 0) return NULL;
-
- uint32_t buf_size = gsize;
- switch(fdsc->bpp) {
- case 1: buf_size = gsize >> 3; break;
- case 2: buf_size = gsize >> 2; break;
- case 3: buf_size = gsize >> 1; break;
- case 4: buf_size = gsize >> 1; break;
- }
-
- if(lv_mem_get_size(buf) < buf_size) {
- buf = lv_mem_realloc(buf, buf_size);
- LV_ASSERT_MEM(buf);
- if(buf == NULL) return NULL;
- }
-
- decompress(&fdsc->glyph_bitmap[gdsc->bitmap_index], buf, gdsc->box_w , gdsc->box_h, (uint8_t)fdsc->bpp);
- return buf;
- }
-
- /*If not returned earlier then the letter is not found in this font*/
- return NULL;
-}
-
-/**
- * Used as `get_glyph_dsc` callback in LittelvGL's native font format if the font is uncompressed.
- * @param font_p pointer to font
- * @param dsc_out store the result descriptor here
- * @param letter an UNICODE letter code
- * @return true: descriptor is successfully loaded into `dsc_out`.
- * false: the letter was not found, no data is loaded to `dsc_out`
- */
-bool lv_font_get_glyph_dsc_fmt_txt(const lv_font_t * font, lv_font_glyph_dsc_t * dsc_out, uint32_t unicode_letter, uint32_t unicode_letter_next)
-{
- lv_font_fmt_txt_dsc_t * fdsc = (lv_font_fmt_txt_dsc_t *) font->dsc;
- uint32_t gid = get_glyph_dsc_id(font, unicode_letter);
- if(!gid) return false;
-
- int8_t kvalue = 0;
- if(fdsc->kern_dsc) {
- uint32_t gid_next = get_glyph_dsc_id(font, unicode_letter_next);
- if(gid_next) {
- kvalue = get_kern_value(font, gid, gid_next);
- }
- }
-
- /*Put together a glyph dsc*/
- const lv_font_fmt_txt_glyph_dsc_t * gdsc = &fdsc->glyph_dsc[gid];
-
- int32_t kv = ((int32_t)((int32_t)kvalue * fdsc->kern_scale) >> 4);
-
- uint32_t adv_w = gdsc->adv_w + kv;
- adv_w = (adv_w + (1 << 3)) >> 4;
-
- dsc_out->adv_w = adv_w;
- dsc_out->box_h = gdsc->box_h;
- dsc_out->box_w = gdsc->box_w;
- dsc_out->ofs_x = gdsc->ofs_x;
- dsc_out->ofs_y = gdsc->ofs_y;
- dsc_out->bpp = (uint8_t)fdsc->bpp;
-
- return true;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-static uint32_t get_glyph_dsc_id(const lv_font_t * font, uint32_t letter)
-{
- if(letter == '\0') return 0;
-
- lv_font_fmt_txt_dsc_t * fdsc = (lv_font_fmt_txt_dsc_t *) font->dsc;
-
- /*Check the cache first*/
- if(letter == fdsc->last_letter) return fdsc->last_glyph_id;
-
- uint16_t i;
- for(i = 0; i < fdsc->cmap_num; i++) {
-
- /*Relative code point*/
- uint32_t rcp = letter - fdsc->cmaps[i].range_start;
- if(rcp > fdsc->cmaps[i].range_length) continue;
- uint32_t glyph_id = 0;
- if(fdsc->cmaps[i].type == LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY) {
- glyph_id = fdsc->cmaps[i].glyph_id_start + rcp;
- }
- else if(fdsc->cmaps[i].type == LV_FONT_FMT_TXT_CMAP_FORMAT0_FULL) {
- const uint8_t * gid_ofs_8 = fdsc->cmaps[i].glyph_id_ofs_list;
- glyph_id = fdsc->cmaps[i].glyph_id_start + gid_ofs_8[rcp];
- }
- else if(fdsc->cmaps[i].type == LV_FONT_FMT_TXT_CMAP_SPARSE_TINY) {
- uint8_t * p = lv_utils_bsearch(&rcp, fdsc->cmaps[i].unicode_list, fdsc->cmaps[i].list_length, sizeof(fdsc->cmaps[i].unicode_list[0]), unicode_list_compare);
-
- if(p) {
- lv_uintptr_t ofs = (lv_uintptr_t)(p - (uint8_t *) fdsc->cmaps[i].unicode_list);
- ofs = ofs >> 1; /*The list stores `uint16_t` so the get the index divide by 2*/
- glyph_id = fdsc->cmaps[i].glyph_id_start + ofs;
- }
- }
- else if(fdsc->cmaps[i].type == LV_FONT_FMT_TXT_CMAP_SPARSE_FULL) {
- uint8_t * p = lv_utils_bsearch(&rcp, fdsc->cmaps[i].unicode_list, fdsc->cmaps[i].list_length, sizeof(fdsc->cmaps[i].unicode_list[0]), unicode_list_compare);
-
- if(p) {
- lv_uintptr_t ofs = (lv_uintptr_t)(p - (uint8_t*) fdsc->cmaps[i].unicode_list);
- ofs = ofs >> 1; /*The list stores `uint16_t` so the get the index divide by 2*/
- const uint8_t * gid_ofs_16 = fdsc->cmaps[i].glyph_id_ofs_list;
- glyph_id = fdsc->cmaps[i].glyph_id_start + gid_ofs_16[ofs];
- }
- }
-
- /*Update the cache*/
- fdsc->last_letter = letter;
- fdsc->last_glyph_id = glyph_id;
- return glyph_id;
- }
-
- fdsc->last_letter = letter;
- fdsc->last_glyph_id = 0;
- return 0;
-
-}
-
-static int8_t get_kern_value(const lv_font_t * font, uint32_t gid_left, uint32_t gid_right)
-{
- lv_font_fmt_txt_dsc_t * fdsc = (lv_font_fmt_txt_dsc_t *) font->dsc;
-
- int8_t value = 0;
-
- if(fdsc->kern_classes == 0) {
- /*Kern pairs*/
- const lv_font_fmt_txt_kern_pair_t * kdsc = fdsc->kern_dsc;
- if(kdsc->glyph_ids_size == 0) {
- /* Use binary search to find the kern value.
- * The pairs are ordered left_id first, then right_id secondly. */
- const uint8_t * g_ids = kdsc->glyph_ids;
- uint16_t g_id_both = (gid_right << 8) + gid_left; /*Create one number from the ids*/
- uint8_t * kid_p = lv_utils_bsearch(&g_id_both, g_ids, kdsc->pair_cnt, 2, kern_pair_8_compare);
-
- /*If the `g_id_both` were found get its index from the pointer*/
- if(kid_p) {
- lv_uintptr_t ofs = (lv_uintptr_t)(kid_p - g_ids);
- ofs = ofs >> 1; /*ofs is for pair, divide by 2 to refer as a single value*/
- value = kdsc->values[ofs];
- }
- } else if(kdsc->glyph_ids_size == 1) {
- /* Use binary search to find the kern value.
- * The pairs are ordered left_id first, then right_id secondly. */
- const uint16_t * g_ids = kdsc->glyph_ids;
- lv_uintptr_t g_id_both = (uint32_t)((uint32_t)gid_right << 8) + gid_left; /*Create one number from the ids*/
- uint8_t * kid_p = lv_utils_bsearch(&g_id_both, g_ids, kdsc->pair_cnt, 4, kern_pair_16_compare);
-
- /*If the `g_id_both` were found get its index from the pointer*/
- if(kid_p) {
- lv_uintptr_t ofs = (lv_uintptr_t) (kid_p - (const uint8_t *)g_ids);
- ofs = ofs >> 4; /*ofs is 4 byte pairs, divide by 4 to refer as a single value*/
- value = kdsc->values[ofs];
- }
-
- } else {
- /*Invalid value*/
- }
- } else {
- /*Kern classes*/
- const lv_font_fmt_txt_kern_classes_t * kdsc = fdsc->kern_dsc;
- uint8_t left_class = kdsc->left_class_mapping[gid_left];
- uint8_t right_class = kdsc->right_class_mapping[gid_right];
-
- /* If class = 0, kerning not exist for that glyph
- * else got the value form `class_pair_values` 2D array*/
- if(left_class > 0 && right_class > 0) {
- value = kdsc->class_pair_values[(left_class-1)* kdsc->right_class_cnt + (right_class-1)];
- }
-
- }
- return value;
-}
-
-static int32_t kern_pair_8_compare(const void * ref, const void * element)
-{
- const uint8_t * ref8_p = ref;
- const uint8_t * element8_p = element;
-
- /*If the MSB is different it will matter. If not return the diff. of the LSB*/
- if(ref8_p[0] != element8_p[0]) return (int32_t)ref8_p[0] - element8_p[0];
- else return (int32_t) ref8_p[1] - element8_p[1];
-
-}
-
-static int32_t kern_pair_16_compare(const void * ref, const void * element)
-{
- const uint16_t * ref16_p = ref;
- const uint16_t * element16_p = element;
-
- /*If the MSB is different it will matter. If not return the diff. of the LSB*/
- if(ref16_p[0] != element16_p[0]) return (int32_t)ref16_p[0] - element16_p[0];
- else return (int32_t) ref16_p[1] - element16_p[1];
-}
-
-/**
- * The compress a glyph's bitmap
- * @param in the compressed bitmap
- * @param out buffer to store the result
- * @param px_num number of pixels in the glyph (width * height)
- * @param bpp bit per pixel (bpp = 3 will be converted to bpp = 4)
- */
-static void decompress(const uint8_t * in, uint8_t * out, lv_coord_t w, lv_coord_t h, uint8_t bpp)
-{
- uint32_t wrp = 0;
- uint8_t wr_size = bpp;
- if(bpp == 3) wr_size = 4;
-
- rle_init(in, bpp);
-
- uint8_t * line_buf = lv_draw_get_buf(w * 2);
- uint8_t * line_buf1 = line_buf;
- uint8_t * line_buf2 = line_buf + w;
-
- decompress_line(line_buf1, w);
-
- lv_coord_t y;
- lv_coord_t x;
- for(x = 0; x < w; x++) {
- bits_write(out,wrp, line_buf1[x], bpp);
- wrp += wr_size;
- }
-
- for(y = 1; y < h; y++) {
- decompress_line(line_buf2, w);
-
- for(x = 0; x < w; x++) {
- line_buf1[x] = line_buf2[x] ^ line_buf1[x];
- bits_write(out,wrp, line_buf1[x], bpp);
- wrp += wr_size;
- }
- }
-}
-
-/**
- * Decompress one line. Store one pixel per byte
- * @param out output buffer
- * @param w width of the line in pixel count
- */
-static void decompress_line(uint8_t * out, lv_coord_t w)
-{
- lv_coord_t i;
- for(i = 0; i < w; i++) {
- out[i] = rle_next();
- }
-}
-
-/**
- * Read bits from an input buffer. The read can cross byte boundary.
- * @param in the input buffer to read from.
- * @param bit_pos index of teh first bit to read.
- * @param len number of bits to read (must be <= 8).
- * @return the read bits
- */
-static uint8_t get_bits(const uint8_t * in, uint32_t bit_pos, uint8_t len)
-{
- uint8_t res = 0;
- uint32_t byte_pos = bit_pos >> 3;
- bit_pos = bit_pos & 0x7;
- uint8_t bit_mask = (uint16_t)((uint16_t) 1 << len) - 1;
- uint16_t in16 = (in[byte_pos] << 8) + in[byte_pos + 1];
-
- res = (in16 >> (16 - bit_pos - len)) & bit_mask;
- return res;
-}
-
-/**
- * Write `val` data to `bit_pos` position of `out`. The write can NOT cross byte boundary.
- * @param out buffer where to write
- * @param bit_pos bit index to write
- * @param val value to write
- * @param len length of bits to write from `val`. (Counted from the LSB).
- * @note `len == 3` will be converted to `len = 4` and `val` will be upscaled too
- */
-static void bits_write(uint8_t * out, uint32_t bit_pos, uint8_t val, uint8_t len)
-{
- if(len == 3) {
- len = 4;
- switch(val) {
- case 0: val = 0; break;
- case 1: val = 2; break;
- case 2: val = 4; break;
- case 3: val = 6; break;
- case 4: val = 9; break;
- case 5: val = 11; break;
- case 6: val = 13; break;
- case 7: val = 15; break;
- }
- }
-
- uint16_t byte_pos = bit_pos >> 3;
- bit_pos = bit_pos & 0x7;
- bit_pos = 8 - bit_pos - len;
-
- uint8_t bit_mask = (uint16_t)((uint16_t) 1 << len) - 1;
- out[byte_pos] &= ((~bit_mask) << bit_pos);
- out[byte_pos] |= (val << bit_pos);
-}
-
-static void rle_init(const uint8_t * in, uint8_t bpp)
-{
- rle_in = in;
- rle_bpp = bpp;
- rle_state = RLE_STATE_SINGLE;
- rle_rdp = 0;
- rle_prev_v = 0;
- rle_cnt = 0;
-}
-
-static uint8_t rle_next(void)
-{
- uint8_t v = 0;
- uint8_t ret = 0;
-
- if(rle_state == RLE_STATE_SINGLE) {
- ret = get_bits(rle_in, rle_rdp, rle_bpp);
- if(rle_rdp != 0 && rle_prev_v == ret) {
- rle_cnt = 0;
- rle_state = RLE_STATE_REPEATE;
- }
-
- rle_prev_v = ret;
- rle_rdp += rle_bpp;
- }
- else if(rle_state == RLE_STATE_REPEATE) {
- v = get_bits(rle_in, rle_rdp, 1);
- rle_cnt++;
- rle_rdp += 1;
- if(v == 1) {
- ret = rle_prev_v;
- if(rle_cnt == 11) {
- rle_cnt = get_bits(rle_in, rle_rdp, 6);
- rle_rdp += 6;
- if(rle_cnt != 0) {
- rle_state = RLE_STATE_COUNTER;
- } else {
- ret = get_bits(rle_in, rle_rdp, rle_bpp);
- rle_prev_v = ret;
- rle_rdp += rle_bpp;
- rle_state = RLE_STATE_SINGLE;
- }
- }
- } else {
- ret = get_bits(rle_in, rle_rdp, rle_bpp);
- rle_prev_v = ret;
- rle_rdp += rle_bpp;
- rle_state = RLE_STATE_SINGLE;
- }
-
-
- }
- else if(rle_state == RLE_STATE_COUNTER) {
- ret = rle_prev_v;
- rle_cnt--;
- if(rle_cnt == 0) {
- ret = get_bits(rle_in, rle_rdp, rle_bpp);
- rle_prev_v = ret;
- rle_rdp += rle_bpp;
- rle_state = RLE_STATE_SINGLE;
- }
- }
-
- return ret;
-}
-
-/** Code Comparator.
- *
- * Compares the value of both input arguments.
- *
- * @param[in] pRef Pointer to the reference.
- * @param[in] pElement Pointer to the element to compare.
- *
- * @return Result of comparison.
- * @retval < 0 Reference is greater than element.
- * @retval = 0 Reference is equal to element.
- * @retval > 0 Reference is less than element.
- *
- */
-static int32_t unicode_list_compare(const void * ref, const void * element)
-{
- return ((int32_t)(*(uint16_t *)ref)) - ((int32_t)(*(uint16_t *)element));
-}
diff --git a/src/libs/lvgl/src/lv_font/lv_font_fmt_txt.h b/src/libs/lvgl/src/lv_font/lv_font_fmt_txt.h
deleted file mode 100644
index 58c8b592..00000000
--- a/src/libs/lvgl/src/lv_font/lv_font_fmt_txt.h
+++ /dev/null
@@ -1,235 +0,0 @@
-/**
- * @file lv_font.h
- *
- */
-
-#ifndef LV_FONT_FMT_TXT_H
-#define LV_FONT_FMT_TXT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#include <stdint.h>
-#include <stddef.h>
-#include <stdbool.h>
-#include "lv_font.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/** This describes a glyph. */
-typedef struct
-{
-#if LV_FONT_FMT_TXT_LARGE == 0
- uint32_t bitmap_index : 20; /**< Start index of the bitmap. A font can be max 1 MB. */
- uint32_t adv_w :12; /**< Draw the next glyph after this width. 8.4 format (real_value * 16 is stored). */
-#else
- uint32_t bitmap_index; /**< Start index of the bitmap. A font can be max 4 GB. */
- uint32_t adv_w; /**< Draw the next glyph after this width. 28.4 format (real_value * 16 is stored). */
-#endif
- uint8_t box_w; /**< Width of the glyph's bounding box*/
- uint8_t box_h; /**< Height of the glyph's bounding box*/
- int8_t ofs_x; /**< x offset of the bounding box*/
- int8_t ofs_y; /**< y offset of the bounding box. Measured from the top of the line*/
-}lv_font_fmt_txt_glyph_dsc_t;
-
-
-/** Format of font character map. */
-enum {
- LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY,
- LV_FONT_FMT_TXT_CMAP_FORMAT0_FULL,
- LV_FONT_FMT_TXT_CMAP_SPARSE_TINY,
- LV_FONT_FMT_TXT_CMAP_SPARSE_FULL,
-};
-
-typedef uint8_t lv_font_fmt_txt_cmap_type_t;
-
-
-/* Map codepoints to a `glyph_dsc`s
- * Several formats are supported to optimize memory usage
- * See https://github.com/littlevgl/lv_font_conv/blob/master/doc/font_spec.md
- */
-typedef struct {
- /** First Unicode character for this range */
- uint32_t range_start;
-
- /** Number of Unicode characters related to this range.
- * Last Unicode character = range_start + range_length - 1*/
- uint16_t range_length;
-
- /** First glyph ID (array index of `glyph_dsc`) for this range */
- uint16_t glyph_id_start;
-
- /*
- According the specification there are 4 formats:
- https://github.com/littlevgl/lv_font_conv/blob/master/doc/font_spec.md
-
- For simplicity introduce "relative code point":
- rcp = codepoint - range_start
-
- and a search function:
- search a "value" in an "array" and returns the index of "value".
-
- Format 0 tiny
- unicode_list == NULL && glyph_id_ofs_list == NULL
- glyph_id = glyph_id_start + rcp
-
- Format 0 full
- unicode_list == NULL && glyph_id_ofs_list != NULL
- glyph_id = glyph_id_start + glyph_id_ofs_list[rcp]
-
- Sparse tiny
- unicode_list != NULL && glyph_id_ofs_list == NULL
- glyph_id = glyph_id_start + search(unicode_list, rcp)
-
- Sparse full
- unicode_list != NULL && glyph_id_ofs_list != NULL
- glyph_id = glyph_id_start + glyph_id_ofs_list[search(unicode_list, rcp)]
- */
-
- const uint16_t * unicode_list;
-
- /** if(type == LV_FONT_FMT_TXT_CMAP_FORMAT0_...) it's `uint8_t *`
- * if(type == LV_FONT_FMT_TXT_CMAP_SPARSE_...) it's `uint16_t *`
- */
- const void * glyph_id_ofs_list;
-
- /** Length of `unicode_list` and/or `glyph_id_ofs_list`*/
- uint16_t list_length;
-
- /** Type of this character map*/
- lv_font_fmt_txt_cmap_type_t type;
-}lv_font_fmt_txt_cmap_t;
-
-/** A simple mapping of kern values from pairs*/
-typedef struct {
- /*To get a kern value of two code points:
- 1. Get the `glyph_id_left` and `glyph_id_right` from `lv_font_fmt_txt_cmap_t
- 2 for(i = 0; i < pair_cnt * 2; i+2)
- if(gylph_ids[i] == glyph_id_left &&
- gylph_ids[i+1] == glyph_id_right)
- return values[i / 2];
- */
- const void * glyph_ids;
- const int8_t * values;
- uint32_t pair_cnt :24;
- uint32_t glyph_ids_size :2; /*0: `glyph_ids` is stored as `uint8_t`; 1: as `uint16_t`*/
-}lv_font_fmt_txt_kern_pair_t;
-
-/** More complex but more optimal class based kern value storage*/
-typedef struct {
- /*To get a kern value of two code points:
- 1. Get the `glyph_id_left` and `glyph_id_right` from `lv_font_fmt_txt_cmap_t
- 2 Get the class of the left and right glyphs as `left_class` and `right_class`
- left_class = left_class_mapping[glyph_id_left];
- right_class = right_class_mapping[glyph_id_right];
- 3. value = class_pair_values[(left_class-1)*right_class_cnt + (righ_class-1)]
- */
-
- const int8_t * class_pair_values; /*left_class_num * right_class_num value*/
- const uint8_t * left_class_mapping; /*Map the glyph_ids to classes: index -> glyph_id -> class_id*/
- const uint8_t * right_class_mapping; /*Map the glyph_ids to classes: index -> glyph_id -> class_id*/
- uint8_t left_class_cnt;
- uint8_t right_class_cnt;
-}lv_font_fmt_txt_kern_classes_t;
-
-
-/** Bitmap formats*/
-typedef enum {
- LV_FONT_FMT_TXT_PLAIN = 0,
- LV_FONT_FMT_TXT_COMPRESSED = 1,
-}lv_font_fmt_txt_bitmap_format_t;
-
-
-/*Describe store additional data for fonts */
-typedef struct {
- /*The bitmaps os all glyphs*/
- const uint8_t * glyph_bitmap;
-
- /*Describe the glyphs*/
- const lv_font_fmt_txt_glyph_dsc_t * glyph_dsc;
-
- /* Map the glyphs to Unicode characters.
- * Array of `lv_font_cmap_fmt_txt_t` variables*/
- const lv_font_fmt_txt_cmap_t * cmaps;
-
- /* Store kerning values.
- * Can be `lv_font_fmt_txt_kern_pair_t * or `lv_font_kern_classes_fmt_txt_t *`
- * depending on `kern_classes`
- */
- const void * kern_dsc;
-
- /*Scale kern values in 12.4 format*/
- uint16_t kern_scale;
-
- /*Number of cmap tables*/
- uint16_t cmap_num :10;
-
- /*Bit per pixel: 1, 2, 3, 4*/
- uint16_t bpp :3;
-
- /*Type of `kern_dsc`*/
- uint16_t kern_classes :1;
-
- /*
- * storage format of the bitmap
- * from `lv_font_fmt_txt_bitmap_format_t`
- */
- uint16_t bitmap_format :2;
-
- /*Cache the last letter and is glyph id*/
- uint32_t last_letter;
- uint32_t last_glyph_id;
-
-}lv_font_fmt_txt_dsc_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Used as `get_glyph_bitmap` callback in LittelvGL's native font format if the font is uncompressed.
- * @param font pointer to font
- * @param unicode_letter an unicode letter which bitmap should be get
- * @return pointer to the bitmap or NULL if not found
- */
-const uint8_t * lv_font_get_bitmap_fmt_txt(const lv_font_t * font, uint32_t letter);
-
-/**
- * Used as `get_glyph_dsc` callback in LittelvGL's native font format if the font is uncompressed.
- * @param font_p pointer to font
- * @param dsc_out store the result descriptor here
- * @param letter an UNICODE letter code
- * @return true: descriptor is successfully loaded into `dsc_out`.
- * false: the letter was not found, no data is loaded to `dsc_out`
- */
-bool lv_font_get_glyph_dsc_fmt_txt(const lv_font_t * font, lv_font_glyph_dsc_t * dsc_out, uint32_t unicode_letter, uint32_t unicode_letter_next);
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * ADD BUILT IN FONTS
- **********************/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_FONT_FMT_TXT_H*/
diff --git a/src/libs/lvgl/src/lv_font/lv_font_roboto_12.c b/src/libs/lvgl/src/lv_font/lv_font_roboto_12.c
deleted file mode 100644
index 3da8e899..00000000
--- a/src/libs/lvgl/src/lv_font/lv_font_roboto_12.c
+++ /dev/null
@@ -1,1628 +0,0 @@
-#include "../../lvgl.h"
-
-/*******************************************************************************
- * Size: 12 px
- * Bpp: 4
- * Opts: --no-compress --no-prefilter --bpp 4 --size 12 --font Roboto-Regular.woff -r 0x20-0x7F --font FontAwesome5-Solid+Brands+Regular.woff -r 61441,61448,61451,61452,61452,61453,61457,61459,61461,61465,61468,61473,61478,61479,61480,61502,61512,61515,61516,61517,61521,61522,61523,61524,61543,61544,61550,61552,61553,61556,61559,61560,61561,61563,61587,61589,61636,61637,61639,61671,61674,61683,61724,61732,61787,61931,62016,62017,62018,62019,62020,62087,62099,62212,62189,62810,63426,63650 --format lvgl -o lv_font_roboto_12.c --force-fast-kern-format
- ******************************************************************************/
-
-#ifndef LV_FONT_ROBOTO_12
-#define LV_FONT_ROBOTO_12 1
-#endif
-
-#if LV_FONT_ROBOTO_12
-
-/*-----------------
- * BITMAPS
- *----------------*/
-
-/*Store the image of the glyphs*/
-static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = {
- /* U+20 " " */
-
- /* U+21 "!" */
- 0xf, 0x10, 0xf1, 0xf, 0x10, 0xf1, 0xf, 0x0,
- 0xf0, 0x9, 0x0, 0x30, 0xe, 0x10,
-
- /* U+22 "\"" */
- 0x39, 0x93, 0x39, 0x92, 0x38, 0x91, 0x1, 0x10,
-
- /* U+23 "#" */
- 0x0, 0x1b, 0xb, 0x10, 0x5, 0x70, 0xd0, 0x1e,
- 0xfe, 0xef, 0xd0, 0xb, 0x15, 0x70, 0x0, 0xd0,
- 0x84, 0x8, 0xef, 0xef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,
- 0xf8, 0xf, 0xff, 0xf8, 0xff, 0xff, 0x80, 0xff,
- 0xff, 0x8f, 0xff, 0xf7, 0xf, 0xff, 0xf7, 0x48,
- 0x98, 0x10, 0x48, 0x98, 0x10,
-
- /* U+F04D "" */
- 0x48, 0x88, 0x88, 0x88, 0x88, 0x1f, 0xff, 0xff,
- 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0x8f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff, 0xff,
- 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0x8f, 0xff,
- 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0x8f, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xaf,
- 0xff, 0xff, 0xff, 0xfe, 0x30,
-
- /* U+F051 "" */
- 0x26, 0x0, 0x0, 0x58, 0x7f, 0xa0, 0x0, 0xbf,
- 0x8f, 0xfb, 0x0, 0xbf, 0x8f, 0xff, 0xc1, 0xbf,
- 0x8f, 0xff, 0xfd, 0xcf, 0x8f, 0xff, 0xff, 0xff,
- 0x8f, 0xff, 0xff, 0xef, 0x8f, 0xff, 0xf4, 0xbf,
- 0x8f, 0xff, 0x40, 0xbf, 0x8f, 0xe3, 0x0, 0xbf,
- 0x5d, 0x20, 0x0, 0xae, 0x0, 0x0, 0x0, 0x0,
-
- /* U+F052 "" */
- 0x0, 0x0, 0x3, 0x70, 0x0, 0x0, 0x0, 0x0,
- 0x3f, 0xfa, 0x0, 0x0, 0x0, 0x2, 0xef, 0xff,
- 0x90, 0x0, 0x0, 0x1e, 0xff, 0xff, 0xf8, 0x0,
- 0x1, 0xdf, 0xff, 0xff, 0xff, 0x70, 0xc, 0xff,
- 0xff, 0xff, 0xff, 0xf4, 0xd, 0xff, 0xff, 0xff,
- 0xff, 0xf5, 0x1, 0x34, 0x44, 0x44, 0x44, 0x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0x0, 0x0, 0x0, 0x0, 0x0, 0x26,
- 0x0, 0x0, 0x0,
-
- /* U+F15B "" */
- 0x9b, 0xbb, 0xb2, 0x70, 0xf, 0xff, 0xff, 0x4f,
- 0x90, 0xff, 0xff, 0xf4, 0xff, 0x9f, 0xff, 0xff,
- 0x54, 0x44, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x34, 0x44,
- 0x44, 0x44, 0x30,
-
- /* U+F1EB "" */
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x5, 0x9b, 0xcb, 0x95, 0x0, 0x0, 0x0,
- 0x8f, 0xff, 0xff, 0xff, 0xff, 0x80, 0x3, 0xef,
- 0xfa, 0x53, 0x23, 0x5a, 0xff, 0xe3, 0xdf, 0xa1,
- 0x0, 0x0, 0x0, 0x1, 0xaf, 0xd2, 0x60, 0x5,
- 0xbe, 0xfe, 0xb5, 0x0, 0x52, 0x0, 0x1c, 0xff,
- 0xfe, 0xff, 0xfc, 0x10, 0x0, 0x2, 0xec, 0x40,
- 0x0, 0x4c, 0xe2, 0x0, 0x0, 0x1, 0x0, 0x1,
- 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0xa, 0xfa,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xf0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x6, 0xd6, 0x0,
- 0x0, 0x0,
-
- /* U+F240 "" */
- 0x37, 0x77, 0x77, 0x77, 0x77, 0x77, 0x75, 0xf,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf3, 0xf8,
- 0x34, 0x44, 0x44, 0x44, 0x44, 0x4f, 0xdf, 0x8c,
- 0xff, 0xff, 0xff, 0xff, 0xf2, 0xcf, 0xf8, 0xcf,
- 0xff, 0xff, 0xff, 0xff, 0x8, 0xff, 0x89, 0xcc,
- 0xcc, 0xcc, 0xcc, 0xc3, 0xff, 0xfb, 0x77, 0x77,
- 0x77, 0x77, 0x77, 0x9f, 0x9c, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xe1, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0,
-
- /* U+F241 "" */
- 0x37, 0x77, 0x77, 0x77, 0x77, 0x77, 0x75, 0xf,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf3, 0xf8,
- 0x34, 0x44, 0x44, 0x43, 0x0, 0x4f, 0xdf, 0x8c,
- 0xff, 0xff, 0xff, 0xc0, 0x2, 0xcf, 0xf8, 0xcf,
- 0xff, 0xff, 0xfc, 0x0, 0x8, 0xff, 0x89, 0xcc,
- 0xcc, 0xcc, 0x90, 0x3, 0xff, 0xfb, 0x77, 0x77,
- 0x77, 0x77, 0x77, 0x9f, 0x9c, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xe1, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0,
-
- /* U+F242 "" */
- 0x37, 0x77, 0x77, 0x77, 0x77, 0x77, 0x75, 0xf,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf3, 0xf8,
- 0x34, 0x44, 0x42, 0x0, 0x0, 0x4f, 0xdf, 0x8c,
- 0xff, 0xff, 0x80, 0x0, 0x2, 0xcf, 0xf8, 0xcf,
- 0xff, 0xf8, 0x0, 0x0, 0x8, 0xff, 0x89, 0xcc,
- 0xcc, 0x60, 0x0, 0x3, 0xff, 0xfb, 0x77, 0x77,
- 0x77, 0x77, 0x77, 0x9f, 0x9c, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xe1, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0,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xff, 0xb0, 0x6, 0x88, 0x88, 0x88, 0x72, 0x0,
-
- /* U+F304 "" */
- 0x0, 0x0, 0x0, 0x0, 0x1, 0x71, 0x0, 0x0,
- 0x0, 0x0, 0x2, 0xef, 0xd1, 0x0, 0x0, 0x0,
- 0x1, 0x5f, 0xff, 0xc0, 0x0, 0x0, 0x2, 0xea,
- 0x5f, 0xfd, 0x0, 0x0, 0x2, 0xef, 0xfa, 0x5d,
- 0x20, 0x0, 0x2, 0xef, 0xff, 0xf8, 0x0, 0x0,
- 0x2, 0xef, 0xff, 0xfe, 0x20, 0x0, 0x2, 0xef,
- 0xff, 0xfe, 0x20, 0x0, 0x2, 0xef, 0xff, 0xfe,
- 0x20, 0x0, 0x0, 0xbf, 0xff, 0xfe, 0x20, 0x0,
- 0x0, 0xd, 0xff, 0xfe, 0x20, 0x0, 0x0, 0x0,
- 0xff, 0xfe, 0x20, 0x0, 0x0, 0x0, 0x6, 0x64,
- 0x10, 0x0, 0x0, 0x0, 0x0,
-
- /* U+F55A "" */
- 0x0, 0x5, 0xef, 0xff, 0xff, 0xff, 0xff, 0x80,
- 0x5, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x5,
- 0xff, 0xff, 0x91, 0xdd, 0x19, 0xff, 0xf5, 0xff,
- 0xff, 0xfd, 0x11, 0x11, 0xdf, 0xff, 0xef, 0xff,
- 0xff, 0xfb, 0x0, 0xbf, 0xff, 0xf5, 0xff, 0xff,
- 0xfd, 0x11, 0x11, 0xdf, 0xff, 0x5, 0xff, 0xff,
- 0x91, 0xdd, 0x19, 0xff, 0xf0, 0x5, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0x0, 0x4, 0xef, 0xff,
- 0xff, 0xff, 0xff, 0x80,
-
- /* U+F7C2 "" */
- 0x0, 0x17, 0x88, 0x87, 0x20, 0x2d, 0xff, 0xff,
- 0xfd, 0x2e, 0xa0, 0xb3, 0x78, 0xfe, 0xfa, 0xb,
- 0x37, 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xfc, 0xff, 0xff, 0xff, 0xfc, 0x4, 0x44,
- 0x44, 0x44, 0x0,
-
- /* U+F8A2 "" */
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x4, 0xf0, 0x0, 0x69, 0x0,
- 0x0, 0x0, 0xdf, 0x0, 0x7f, 0xc0, 0x0, 0x0,
- 0xd, 0xf0, 0x8f, 0xff, 0xdd, 0xdd, 0xdd, 0xff,
- 0xb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xb,
- 0xfc, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0xc0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0
-};
-
-
-/*---------------------
- * GLYPH DESCRIPTION
- *--------------------*/
-
-static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
- {.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
- {.bitmap_index = 0, .adv_w = 48, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 0, .adv_w = 49, .box_w = 3, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 14, .adv_w = 61, .box_w = 4, .box_h = 4, .ofs_x = 0, .ofs_y = 6},
- {.bitmap_index = 22, .adv_w = 120, .box_w = 7, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 54, .adv_w = 108, .box_w = 7, .box_h = 12, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 96, .adv_w = 141, .box_w = 9, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 137, .adv_w = 119, .box_w = 8, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 173, .adv_w = 33, .box_w = 2, .box_h = 4, .ofs_x = 0, .ofs_y = 6},
- {.bitmap_index = 177, .adv_w = 66, .box_w = 4, .box_h = 14, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 205, .adv_w = 67, .box_w = 4, .box_h = 14, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 233, .adv_w = 83, .box_w = 5, .box_h = 6, .ofs_x = 0, .ofs_y = 3},
- {.bitmap_index = 248, .adv_w = 109, .box_w = 7, .box_h = 7, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 273, .adv_w = 38, .box_w = 2, .box_h = 4, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 277, .adv_w = 53, .box_w = 4, .box_h = 1, .ofs_x = 0, .ofs_y = 3},
- {.bitmap_index = 279, .adv_w = 51, .box_w = 3, .box_h = 2, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 282, .adv_w = 79, .box_w = 5, .box_h = 10, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 307, .adv_w = 108, .box_w = 7, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 339, .adv_w = 108, .box_w = 4, .box_h = 9, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 357, .adv_w = 108, .box_w = 7, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 389, .adv_w = 108, .box_w = 6, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 416, .adv_w = 108, .box_w = 7, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 448, .adv_w = 108, .box_w = 7, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 480, .adv_w = 108, .box_w = 7, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 512, .adv_w = 108, .box_w = 7, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 544, .adv_w = 108, .box_w = 7, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 576, .adv_w = 108, .box_w = 6, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 603, .adv_w = 47, .box_w = 3, .box_h = 7, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 614, .adv_w = 41, .box_w = 2, .box_h = 9, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 623, .adv_w = 98, .box_w = 6, .box_h = 6, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 641, .adv_w = 105, .box_w = 6, .box_h = 5, .ofs_x = 0, .ofs_y = 2},
- {.bitmap_index = 656, .adv_w = 100, .box_w = 6, .box_h = 6, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 674, .adv_w = 91, .box_w = 6, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 701, .adv_w = 172, .box_w = 11, .box_h = 12, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 767, .adv_w = 125, .box_w = 8, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 803, .adv_w = 120, .box_w = 7, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 835, .adv_w = 125, .box_w = 8, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 871, .adv_w = 126, .box_w = 8, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 907, .adv_w = 109, .box_w = 7, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 939, .adv_w = 106, .box_w = 7, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 971, .adv_w = 131, .box_w = 8, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1007, .adv_w = 137, .box_w = 8, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1043, .adv_w = 52, .box_w = 2, .box_h = 9, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1052, .adv_w = 106, .box_w = 6, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1079, .adv_w = 120, .box_w = 8, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1115, .adv_w = 103, .box_w = 7, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1147, .adv_w = 168, .box_w = 10, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1192, .adv_w = 137, .box_w = 8, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1228, .adv_w = 132, .box_w = 8, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1264, .adv_w = 121, .box_w = 8, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1300, .adv_w = 132, .box_w = 8, .box_h = 11, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 1344, .adv_w = 118, .box_w = 8, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1380, .adv_w = 114, .box_w = 7, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1412, .adv_w = 115, .box_w = 7, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1444, .adv_w = 125, .box_w = 7, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1476, .adv_w = 122, .box_w = 8, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1512, .adv_w = 170, .box_w = 11, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1562, .adv_w = 120, .box_w = 8, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1598, .adv_w = 115, .box_w = 8, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1634, .adv_w = 115, .box_w = 7, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1666, .adv_w = 51, .box_w = 4, .box_h = 13, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 1692, .adv_w = 79, .box_w = 5, .box_h = 10, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1717, .adv_w = 51, .box_w = 3, .box_h = 13, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 1737, .adv_w = 80, .box_w = 5, .box_h = 5, .ofs_x = 0, .ofs_y = 5},
- {.bitmap_index = 1750, .adv_w = 87, .box_w = 6, .box_h = 1, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 1753, .adv_w = 59, .box_w = 3, .box_h = 2, .ofs_x = 0, .ofs_y = 8},
- {.bitmap_index = 1756, .adv_w = 104, .box_w = 6, .box_h = 7, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1777, .adv_w = 108, .box_w = 7, .box_h = 10, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1812, .adv_w = 101, .box_w = 6, .box_h = 7, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1833, .adv_w = 108, .box_w = 6, .box_h = 10, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1863, .adv_w = 102, .box_w = 6, .box_h = 7, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1884, .adv_w = 67, .box_w = 5, .box_h = 10, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1909, .adv_w = 108, .box_w = 6, .box_h = 10, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 1939, .adv_w = 106, .box_w = 6, .box_h = 10, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1969, .adv_w = 47, .box_w = 3, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1983, .adv_w = 46, .box_w = 4, .box_h = 12, .ofs_x = -1, .ofs_y = -3},
- {.bitmap_index = 2007, .adv_w = 97, .box_w = 7, .box_h = 10, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2042, .adv_w = 47, .box_w = 2, .box_h = 10, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2052, .adv_w = 168, .box_w = 10, .box_h = 7, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2087, .adv_w = 106, .box_w = 6, .box_h = 7, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2108, .adv_w = 110, .box_w = 7, .box_h = 7, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2133, .adv_w = 108, .box_w = 7, .box_h = 10, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 2168, .adv_w = 109, .box_w = 6, .box_h = 10, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 2198, .adv_w = 65, .box_w = 4, .box_h = 7, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2212, .adv_w = 99, .box_w = 6, .box_h = 7, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2233, .adv_w = 63, .box_w = 4, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2251, .adv_w = 106, .box_w = 6, .box_h = 7, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2272, .adv_w = 93, .box_w = 6, .box_h = 7, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2293, .adv_w = 144, .box_w = 9, .box_h = 7, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2325, .adv_w = 95, .box_w = 6, .box_h = 7, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2346, .adv_w = 91, .box_w = 6, .box_h = 10, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 2376, .adv_w = 95, .box_w = 6, .box_h = 7, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2397, .adv_w = 65, .box_w = 4, .box_h = 13, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 2423, .adv_w = 47, .box_w = 1, .box_h = 11, .ofs_x = 1, .ofs_y = -2},
- {.bitmap_index = 2429, .adv_w = 65, .box_w = 4, .box_h = 13, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 2455, .adv_w = 131, .box_w = 8, .box_h = 4, .ofs_x = 0, .ofs_y = 2},
- {.bitmap_index = 2471, .adv_w = 192, .box_w = 12, .box_h = 13, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 2549, .adv_w = 192, .box_w = 12, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2603, .adv_w = 192, .box_w = 12, .box_h = 11, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 2669, .adv_w = 192, .box_w = 12, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2723, .adv_w = 132, .box_w = 9, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2764, .adv_w = 192, .box_w = 12, .box_h = 13, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 2842, .adv_w = 192, .box_w = 12, .box_h = 13, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 2920, .adv_w = 216, .box_w = 14, .box_h = 11, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 2997, .adv_w = 192, .box_w = 12, .box_h = 13, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 3075, .adv_w = 216, .box_w = 14, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 3138, .adv_w = 192, .box_w = 12, .box_h = 13, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 3216, .adv_w = 96, .box_w = 6, .box_h = 10, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 3246, .adv_w = 144, .box_w = 9, .box_h = 10, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 3291, .adv_w = 216, .box_w = 14, .box_h = 13, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 3382, .adv_w = 192, .box_w = 12, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 3436, .adv_w = 168, .box_w = 8, .box_h = 12, .ofs_x = 1, .ofs_y = -2},
- {.bitmap_index = 3484, .adv_w = 168, .box_w = 11, .box_h = 13, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 3556, .adv_w = 168, .box_w = 11, .box_h = 11, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 3617, .adv_w = 168, .box_w = 11, .box_h = 11, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 3678, .adv_w = 168, .box_w = 8, .box_h = 12, .ofs_x = 1, .ofs_y = -2},
- {.bitmap_index = 3726, .adv_w = 168, .box_w = 12, .box_h = 11, .ofs_x = -1, .ofs_y = -1},
- {.bitmap_index = 3792, .adv_w = 120, .box_w = 7, .box_h = 11, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 3831, .adv_w = 120, .box_w = 7, .box_h = 11, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 3870, .adv_w = 168, .box_w = 11, .box_h = 11, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 3931, .adv_w = 168, .box_w = 11, .box_h = 3, .ofs_x = 0, .ofs_y = 3},
- {.bitmap_index = 3948, .adv_w = 216, .box_w = 14, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 4011, .adv_w = 240, .box_w = 16, .box_h = 13, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 4115, .adv_w = 216, .box_w = 15, .box_h = 13, .ofs_x = -1, .ofs_y = -2},
- {.bitmap_index = 4213, .adv_w = 192, .box_w = 12, .box_h = 11, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 4279, .adv_w = 168, .box_w = 11, .box_h = 7, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 4318, .adv_w = 168, .box_w = 11, .box_h = 7, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 4357, .adv_w = 240, .box_w = 16, .box_h = 10, .ofs_x = -1, .ofs_y = 0},
- {.bitmap_index = 4437, .adv_w = 192, .box_w = 12, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 4491, .adv_w = 192, .box_w = 12, .box_h = 13, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 4569, .adv_w = 192, .box_w = 13, .box_h = 13, .ofs_x = -1, .ofs_y = -2},
- {.bitmap_index = 4654, .adv_w = 168, .box_w = 11, .box_h = 11, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 4715, .adv_w = 168, .box_w = 11, .box_h = 13, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 4787, .adv_w = 168, .box_w = 11, .box_h = 11, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 4848, .adv_w = 120, .box_w = 9, .box_h = 13, .ofs_x = -1, .ofs_y = -2},
- {.bitmap_index = 4907, .adv_w = 168, .box_w = 11, .box_h = 13, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 4979, .adv_w = 168, .box_w = 11, .box_h = 13, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 5051, .adv_w = 216, .box_w = 14, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 5114, .adv_w = 192, .box_w = 14, .box_h = 13, .ofs_x = -1, .ofs_y = -2},
- {.bitmap_index = 5205, .adv_w = 144, .box_w = 9, .box_h = 13, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 5264, .adv_w = 240, .box_w = 15, .box_h = 12, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 5354, .adv_w = 240, .box_w = 15, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 5422, .adv_w = 240, .box_w = 15, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 5490, .adv_w = 240, .box_w = 15, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 5558, .adv_w = 240, .box_w = 15, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 5626, .adv_w = 240, .box_w = 15, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 5694, .adv_w = 240, .box_w = 16, .box_h = 11, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 5782, .adv_w = 168, .box_w = 10, .box_h = 13, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 5847, .adv_w = 168, .box_w = 11, .box_h = 13, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 5919, .adv_w = 192, .box_w = 13, .box_h = 13, .ofs_x = -1, .ofs_y = -2},
- {.bitmap_index = 6004, .adv_w = 240, .box_w = 15, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 6072, .adv_w = 144, .box_w = 9, .box_h = 13, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 6131, .adv_w = 193, .box_w = 13, .box_h = 9, .ofs_x = 0, .ofs_y = 0}
-};
-
-/*---------------------
- * CHARACTER MAPPING
- *--------------------*/
-
-static const uint16_t unicode_list_1[] = {
- 0x0, 0x7, 0xa, 0xb, 0xc, 0x10, 0x12, 0x14,
- 0x18, 0x1b, 0x20, 0x25, 0x26, 0x27, 0x3d, 0x47,
- 0x4a, 0x4b, 0x4c, 0x50, 0x51, 0x52, 0x53, 0x66,
- 0x67, 0x6d, 0x6f, 0x70, 0x73, 0x76, 0x77, 0x78,
- 0x7a, 0x92, 0x94, 0xc3, 0xc4, 0xc6, 0xe6, 0xe9,
- 0xf2, 0x11b, 0x123, 0x15a, 0x1ea, 0x23f, 0x240, 0x241,
- 0x242, 0x243, 0x286, 0x292, 0x2ec, 0x303, 0x559, 0x7c1,
- 0x8a1
-};
-
-/*Collect the unicode lists and glyph_id offsets*/
-static const lv_font_fmt_txt_cmap_t cmaps[] =
-{
- {
- .range_start = 32, .range_length = 95, .glyph_id_start = 1,
- .unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY
- },
- {
- .range_start = 61441, .range_length = 2210, .glyph_id_start = 96,
- .unicode_list = unicode_list_1, .glyph_id_ofs_list = NULL, .list_length = 57, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
- }
-};
-
-/*-----------------
- * KERNING
- *----------------*/
-
-
-/*Map glyph_ids to kern left classes*/
-static const uint8_t kern_left_class_mapping[] =
-{
- 0, 1, 0, 2, 0, 0, 0, 0,
- 2, 3, 0, 0, 0, 4, 0, 4,
- 5, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 6, 7, 8, 9, 10, 11,
- 0, 12, 12, 13, 14, 15, 12, 12,
- 9, 16, 17, 18, 0, 19, 13, 20,
- 21, 22, 23, 24, 25, 0, 0, 0,
- 0, 0, 26, 27, 28, 0, 29, 30,
- 0, 31, 0, 0, 32, 0, 31, 31,
- 33, 27, 0, 34, 0, 35, 0, 36,
- 37, 38, 36, 39, 40, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0
-};
-
-/*Map glyph_ids to kern right classes*/
-static const uint8_t kern_right_class_mapping[] =
-{
- 0, 1, 0, 2, 0, 0, 0, 3,
- 2, 0, 4, 5, 0, 6, 7, 6,
- 8, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 9, 0, 10, 0, 11, 0, 0, 0,
- 11, 0, 0, 12, 0, 0, 0, 0,
- 11, 0, 11, 0, 13, 14, 15, 16,
- 17, 18, 19, 20, 0,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2, 0, 0, 0,
- -12, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- -4, -2, 1, 0, -2, 0, 0, 5,
- 0, 2, 2, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, -2,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 1, 0, 0, 0, -10, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, -1, -1,
- 1, 0, -1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, -12, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, -2, 0, 0,
- -2, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- -1, 0, 0, -1, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- -2, 0, 0, -2, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0
-};
-
-
-/*Collect the kern class' data in one place*/
-static const lv_font_fmt_txt_kern_classes_t kern_classes =
-{
- .class_pair_values = kern_class_values,
- .left_class_mapping = kern_left_class_mapping,
- .right_class_mapping = kern_right_class_mapping,
- .left_class_cnt = 40,
- .right_class_cnt = 35,
-};
-
-/*--------------------
- * ALL CUSTOM DATA
- *--------------------*/
-
-/*Store all the custom data of the font*/
-static lv_font_fmt_txt_dsc_t font_dsc = {
- .glyph_bitmap = gylph_bitmap,
- .glyph_dsc = glyph_dsc,
- .cmaps = cmaps,
- .kern_dsc = &kern_classes,
- .kern_scale = 16,
- .cmap_num = 2,
- .bpp = 4,
- .kern_classes = 1,
- .bitmap_format = 0
-};
-
-
-/*-----------------
- * PUBLIC FONT
- *----------------*/
-
-/*Initialize a public general font descriptor*/
-lv_font_t lv_font_roboto_12 = {
- .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/
- .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/
- .line_height = 14, /*The maximum line height required by the font*/
- .base_line = 3, /*Baseline measured from the bottom of the line*/
- .subpx = LV_FONT_SUBPX_NONE,
- .dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
-};
-
-#endif /*#if LV_FONT_ROBOTO_12*/
-
diff --git a/src/libs/lvgl/src/lv_font/lv_font_roboto_12_subpx.c b/src/libs/lvgl/src/lv_font/lv_font_roboto_12_subpx.c
deleted file mode 100644
index 4565b99c..00000000
--- a/src/libs/lvgl/src/lv_font/lv_font_roboto_12_subpx.c
+++ /dev/null
@@ -1,3419 +0,0 @@
-#include "../../lvgl.h"
-
-/*******************************************************************************
- * Size: 12 px
- * Bpp: 4
- * Opts: --no-compress --no-prefilter --bpp 4 --size 12 --font Roboto-Regular.woff -r 0x20-0x7F --font FontAwesome5-Solid+Brands+Regular.woff -r 61441,61448,61451,61452,61452,61453,61457,61459,61461,61465,61468,61473,61478,61479,61480,61502,61512,61515,61516,61517,61521,61522,61523,61524,61543,61544,61550,61552,61553,61556,61559,61560,61561,61563,61587,61589,61636,61637,61639,61671,61674,61683,61724,61732,61787,61931,62016,62017,62018,62019,62020,62087,62099,62212,62189,62810,63426,63650 --format lvgl -o lv_font_roboto_12_subpx.c --force-fast-kern-format --lcd
- ******************************************************************************/
-
-#ifndef LV_FONT_ROBOTO_12_SUBPX
-#define LV_FONT_ROBOTO_12_SUBPX 1
-#endif
-
-#if LV_FONT_ROBOTO_12_SUBPX
-
-/*-----------------
- * BITMAPS
- *----------------*/
-
-/*Store the image of the glyphs*/
-static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = {
- /* U+20 " " */
-
- /* U+21 "!" */
- 0x0, 0x5a, 0xfc, 0x61, 0x0, 0x5, 0xaf, 0xc6,
- 0x10, 0x0, 0x5a, 0xfb, 0x61, 0x0, 0x4, 0xaf,
- 0xb6, 0x10, 0x0, 0x4a, 0xfb, 0x60, 0x0, 0x4,
- 0x9f, 0xb5, 0x0, 0x0, 0x26, 0x97, 0x30, 0x0,
- 0x0, 0x23, 0x21, 0x0, 0x0, 0x49, 0xeb, 0x61,
- 0x0,
-
- /* U+22 "\"" */
- 0x3, 0x8d, 0x94, 0x49, 0xc8, 0x30, 0x3, 0x8c,
- 0x93, 0x49, 0xc7, 0x20, 0x3, 0x8b, 0x82, 0x49,
- 0xb6, 0x10, 0x0, 0x11, 0x10, 0x1, 0x10, 0x0,
-
- /* U+23 "#" */
- 0x0, 0x0, 0x0, 0x1, 0x7c, 0xb6, 0x0, 0x16,
- 0xbc, 0x71, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5,
- 0xac, 0x72, 0x0, 0x4a, 0xd8, 0x30, 0x0, 0x0,
- 0x1, 0x6b, 0xee, 0xef, 0xff, 0xee, 0xee, 0xff,
- 0xfe, 0xed, 0x83, 0x0, 0x0, 0x0, 0x1, 0x6b,
- 0xc6, 0x10, 0x5, 0xbc, 0x72, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x4, 0x9d, 0x93, 0x0, 0x38, 0xd9,
- 0x40, 0x0, 0x0, 0x0, 0x38, 0xce, 0xee, 0xff,
- 0xee, 0xee, 0xef, 0xfe, 0xee, 0xb7, 0x20, 0x0,
- 0x0, 0x0, 0x49, 0xd9, 0x30, 0x3, 0x8d, 0xa4,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x6c, 0xb6,
- 0x10,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0xcf, 0xb5, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x1, 0x6b, 0xfc, 0x61, 0x1,
- 0x7c, 0xa5, 0x0, 0x0, 0x5a, 0xeb, 0x88, 0x9b,
- 0xef, 0xb7, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,
- 0x23, 0x7c, 0xfe, 0xb8, 0x88, 0xbe, 0xa5, 0x0,
- 0x0, 0x49, 0xb9, 0x54, 0x59, 0xdf, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd,
- 0x95, 0x45, 0x9b, 0x93, 0x0,
-
- /* U+F00B "" */
- 0x0, 0x38, 0xdf, 0xff, 0xff, 0xfe, 0xb6, 0x25,
- 0x9e, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xfd, 0x83, 0x0, 0x0, 0x5a, 0xff,
- 0xff, 0xff, 0xff, 0xd8, 0x46, 0xcf, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xa5, 0x0, 0x0, 0x49, 0xef, 0xff, 0xff, 0xff,
- 0xc6, 0x25, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xfe, 0x94, 0x0, 0x0,
- 0x0, 0x12, 0x33, 0x33, 0x22, 0x10, 0x0, 0x1,
- 0x23, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33,
- 0x33, 0x21, 0x0, 0x0, 0x0, 0x4a, 0xff, 0xff,
- 0xff, 0xff, 0xc7, 0x26, 0xbf, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa4,
- 0x0, 0x0, 0x5a, 0xff, 0xff, 0xff, 0xff, 0xd8,
- 0x46, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xa5, 0x0, 0x0, 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, 0xff, 0xda,
- 0x63, 0x11, 0x46, 0x53, 0x0, 0x0, 0x0, 0x49,
- 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x94, 0x0,
- 0x16, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd,
- 0xba, 0xab, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xfc, 0x61, 0x1, 0x37, 0xbe, 0xff, 0xff, 0xff,
- 0xc7, 0x20, 0x0, 0x0, 0x2, 0x7c, 0xff, 0xff,
- 0xff, 0xeb, 0x73, 0x10, 0x0, 0x2, 0x7c, 0xff,
- 0xff, 0xfd, 0x82, 0x0, 0x0, 0x0, 0x0, 0x28,
- 0xdf, 0xff, 0xff, 0xd7, 0x20, 0x0, 0x1, 0x37,
- 0xbe, 0xff, 0xff, 0xff, 0xc7, 0x20, 0x0, 0x0,
- 0x2, 0x7c, 0xff, 0xff, 0xff, 0xeb, 0x73, 0x10,
- 0x16, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd,
- 0xba, 0xab, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xfc, 0x61, 0x0, 0x49, 0xef, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xfe, 0x94, 0x0, 0x0, 0x0, 0x35, 0x64,
- 0x11, 0x25, 0x9c, 0xff, 0xff, 0xff, 0xff, 0xc9,
- 0x52, 0x11, 0x36, 0x53, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x27, 0xdf, 0xff, 0xff,
- 0xfd, 0x72, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x23,
- 0x44, 0x44, 0x32, 0x10, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0,
-
- /* U+F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,
- 0x0, 0x0, 0x1, 0x49, 0xdf, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xfd, 0x94, 0x10, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x14, 0x9d, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xd9, 0x41, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x1, 0x23, 0x33, 0x33, 0x33, 0x33, 0x22,
- 0x59, 0xdf, 0xff, 0xfd, 0x95, 0x22, 0x33, 0x33,
- 0x33, 0x33, 0x32, 0x10, 0x0, 0x0, 0x4a, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xfe, 0xa5, 0x34, 0x77,
- 0x43, 0x5a, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xa4, 0x0, 0x0, 0x5a, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xec, 0xaa, 0xce, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xa5, 0x0, 0x0,
- 0x5a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xe9, 0x56, 0xbc, 0x75,
- 0x8d, 0xff, 0xa5, 0x0, 0x0, 0x25, 0x9a, 0xaa,
- 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
- 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xa8, 0x52,
- 0x0,
-
- /* U+F01C "" */
- 0x0, 0x0, 0x0, 0x0, 0x1, 0x49, 0xdf, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xfe, 0xb7, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x15, 0xae, 0xff, 0xda, 0x88, 0x88,
- 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x9b, 0xef,
- 0xfc, 0x83, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1,
- 0x5a, 0xef, 0xfc, 0x72, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x14, 0xae, 0xff,
- 0xd7, 0x30, 0x0, 0x0, 0x0, 0x15, 0xae, 0xff,
- 0xc7, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x1, 0x4a, 0xef, 0xfc,
- 0x82, 0x0, 0x0, 0x38, 0xef, 0xff, 0xda, 0x88,
- 0x88, 0x88, 0x63, 0x10, 0x0, 0x0, 0x0, 0x0,
- 0x25, 0x78, 0x88, 0x88, 0x9b, 0xef, 0xff, 0xb6,
- 0x10, 0x5, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xd8, 0x30, 0x0, 0x0, 0x1, 0x5b, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0x82, 0x0,
- 0x5a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xd8, 0x20, 0x5, 0xaf,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xfd, 0x72, 0x0, 0x26, 0xbe, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xfd, 0x84, 0x0,
-
- /* U+F021 "" */
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x11, 0x11, 0x10, 0x0, 0x0, 0x0, 0x0,
- 0x2, 0x58, 0x99, 0x62, 0x0, 0x0, 0x0, 0x0,
- 0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5,
- 0x0, 0x0, 0x5a, 0xff, 0xff, 0xea, 0x62, 0x0,
- 0x15, 0x9b, 0xa6, 0x20, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x2, 0x8d, 0xff, 0xa5, 0x0, 0x0, 0x5a,
- 0xff, 0xe9, 0x30, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x8d,
- 0xff, 0xa5, 0x0, 0x0, 0x5a, 0xff, 0xec, 0x98,
- 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
- 0x88, 0x88, 0x88, 0x89, 0xce, 0xff, 0xa5, 0x0,
- 0x0, 0x26, 0xbe, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xeb, 0x62, 0x0,
-
- /* U+F048 "" */
- 0x25, 0x78, 0x86, 0x30, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x13, 0x67, 0x52, 0x0, 0x4, 0x9f, 0xff,
- 0xc6, 0x10, 0x0, 0x0, 0x0, 0x15, 0x9d, 0xff,
- 0xfe, 0x83, 0x0, 0x49, 0xff, 0xfc, 0x61, 0x0,
- 0x0, 0x26, 0xae, 0xff, 0xff, 0xff, 0xe9, 0x30,
- 0x4, 0x9f, 0xff, 0xc6, 0x10, 0x37, 0xbe, 0xff,
- 0xff, 0xff, 0xff, 0xfe, 0x93, 0x0, 0x49, 0xff,
- 0xfd, 0xa9, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xe9, 0x30, 0x4, 0x9f, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x93,
- 0x0, 0x49, 0xff, 0xfe, 0xee, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xe9, 0x30, 0x4, 0x9f,
- 0xff, 0xc6, 0x24, 0x9d, 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 0x0, 0x5a,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xdb, 0x73, 0x10,
- 0x0, 0x5a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xfd, 0xb8, 0x42, 0x0,
- 0x0, 0x0, 0x0, 0x5a, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xdb, 0x74, 0x20, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x5a, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xfd, 0xa7, 0x41, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x49,
- 0xff, 0xff, 0xff, 0xda, 0x74, 0x10, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x1, 0x36, 0x76, 0x31, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0,
-
- /* U+F04C "" */
- 0x0, 0x15, 0xad, 0xef, 0xff, 0xff, 0xfe, 0xc8,
- 0x30, 0x0, 0x15, 0xad, 0xef, 0xff, 0xff, 0xfe,
- 0xc8, 0x30, 0x0, 0x5a, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xfd, 0x72, 0x0, 0x5a, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xfd, 0x72, 0x0, 0x5a, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xfd, 0x82, 0x0, 0x5a, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xfd, 0x82, 0x0, 0x5a,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0x82, 0x0,
- 0x5a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0x82,
- 0x0, 0x5a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd,
- 0x82, 0x0, 0x5a, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xfd, 0x82, 0x0, 0x5a, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xfd, 0x82, 0x0, 0x5a, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xfd, 0x82, 0x0, 0x5a, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xfd, 0x82, 0x0, 0x5a, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xfd, 0x82, 0x0, 0x5a,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0x82, 0x0,
- 0x5a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0x82,
- 0x0, 0x5a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd,
- 0x82, 0x0, 0x5a, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xfd, 0x82, 0x0, 0x4a, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xfc, 0x72, 0x0, 0x4a, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xfc, 0x72, 0x0, 0x2, 0x47, 0x88,
- 0x99, 0x99, 0x88, 0x63, 0x10, 0x0, 0x2, 0x47,
- 0x88, 0x99, 0x99, 0x88, 0x63, 0x10,
-
- /* U+F04D "" */
- 0x0, 0x2, 0x47, 0x88, 0x88, 0x88, 0x88, 0x88,
- 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
- 0x63, 0x10, 0x0, 0x4a, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xfc, 0x72, 0x0, 0x5a, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xfd, 0x82, 0x0, 0x5a,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0x82,
- 0x0, 0x5a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xfd, 0x82, 0x0, 0x5a, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xfd, 0x82, 0x0, 0x5a, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xfd, 0x82, 0x0, 0x5a,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0x82,
- 0x0, 0x5a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xfd, 0x82, 0x0, 0x5a, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xfd, 0x72, 0x0, 0x15, 0xad, 0xef,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xfe, 0xc8, 0x30,
-
- /* U+F051 "" */
- 0x2, 0x57, 0x64, 0x10, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x25, 0x88, 0x85, 0x20, 0x2, 0x7d, 0xff,
- 0xfd, 0xa5, 0x20, 0x0, 0x0, 0x0, 0x5, 0xbf,
- 0xff, 0xa5, 0x0, 0x28, 0xdf, 0xff, 0xff, 0xfe,
- 0xb7, 0x30, 0x0, 0x0, 0x5b, 0xff, 0xfa, 0x50,
- 0x2, 0x8d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc8,
- 0x31, 0x5, 0xbf, 0xff, 0xa5, 0x0, 0x28, 0xdf,
- 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d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xfe, 0xb7, 0x20, 0x0,
- 0x0, 0x0, 0x2, 0x6c, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xfe, 0x94, 0x0, 0x0, 0x0, 0x27, 0xdf,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xfa, 0x50, 0x0,
- 0x0, 0x0, 0x1, 0x23, 0x34, 0x44, 0x44, 0x44,
- 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x43,
- 0x31, 0x0, 0x0, 0x0, 0x0, 0x38, 0xdf, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xfb, 0x51, 0x0, 0x0,
- 0x5, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xd8, 0x20, 0x0, 0x0, 0x27, 0xce, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xea, 0x51, 0x0, 0x0,
-
- /* U+F053 "" */
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1,
- 0x34, 0x31, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x25, 0xae, 0xff, 0xfb, 0x61, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x2, 0x5a, 0xef, 0xff,
- 0xfd, 0x94, 0x10, 0x0, 0x0, 0x0, 0x0, 0x25,
- 0xae, 0xff, 0xff, 0xd9, 0x41, 0x0, 0x0, 0x0,
- 0x0, 0x2, 0x5a, 0xef, 0xff, 0xfd, 0x94, 0x10,
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a, 0xff, 0xff,
- 0xfd, 0x83, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x1, 0x4a, 0xef, 0xff, 0xff,
- 0xfd, 0x72, 0x0, 0x5, 0xaf, 0xff, 0xff, 0xff,
- 0xc7, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x3, 0x9d, 0xff, 0xff, 0xff, 0xff, 0xd7,
- 0x20, 0x0, 0x5a, 0xff, 0xff, 0xff, 0xff, 0xfb,
- 0x61, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x27,
- 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xda, 0x87,
- 0x8b, 0xef, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xa4,
- 0x10, 0x0, 0x0, 0x0, 0x1, 0x6b, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xc7, 0x20, 0x0, 0x4a,
- 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd9, 0x30,
- 0x0, 0x0, 0x15, 0xae, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xfd, 0x95, 0x21, 0x37, 0xcf, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0x72, 0x0,
- 0x4, 0x9f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xfc, 0x61, 0x0, 0x1,
- 0x46, 0x77, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
- 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
- 0x88, 0x87, 0x75, 0x20, 0x0,
-
- /* U+F074 "" */
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x46,
- 0x63, 0x10, 0x0, 0x0, 0x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 0xeb,
- 0x98, 0x88, 0x88, 0x88, 0x88, 0x88, 0x77, 0x64,
- 0x10, 0x0, 0x0, 0x5a, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xa4, 0x0, 0x0,
- 0x5a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xa5, 0x0, 0x0, 0x5a, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa5,
- 0x0, 0x0, 0x5a, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xa5, 0x0, 0x0, 0x5a,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xa5, 0x0, 0x0, 0x5a, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa5, 0x0,
- 0x0, 0x26, 0xbe, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xeb, 0x62, 0x0,
-
- /* U+F093 "" */
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x2, 0x44, 0x20, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x37, 0xce, 0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x23, 0x44,
- 0x32, 0x15, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xa5, 0x49, 0xef, 0xfe, 0xc7, 0x20, 0x0, 0x4a,
- 0xff, 0xff, 0xe9, 0x45, 0xbf, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xec, 0x98, 0x88, 0x88, 0x85, 0x20,
- 0x0, 0x5a, 0xff, 0xff, 0xe9, 0x45, 0xbf, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xfa, 0x50, 0x0, 0x5a, 0xff, 0xff, 0xe9, 0x45,
- 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xfa, 0x50, 0x0, 0x5a, 0xff, 0xff,
- 0xe9, 0x45, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xfa, 0x50, 0x0, 0x5a,
- 0xff, 0xff, 0xe9, 0x45, 0xbf, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfa, 0x50,
- 0x0, 0x5a, 0xff, 0xff, 0xe9, 0x45, 0xbf, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xfa, 0x50, 0x0, 0x5a, 0xff, 0xff, 0xe9, 0x45,
- 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xfa, 0x40, 0x0, 0x5a, 0xff, 0xff,
- 0xfd, 0x95, 0x33, 0x34, 0x44, 0x44, 0x44, 0x44,
- 0x44, 0x44, 0x44, 0x43, 0x21, 0x0, 0x0, 0x5a,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xa5, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x14, 0x67, 0x88, 0x88, 0x88, 0x88, 0x88,
- 0x88, 0x88, 0x88, 0x76, 0x31, 0x0, 0x0, 0x0,
- 0x0, 0x0,
-
- /* U+F0C7 "" */
- 0x0, 0x2, 0x47, 0x88, 0x88, 0x88, 0x88, 0x88,
- 0x88, 0x88, 0x88, 0x88, 0x87, 0x52, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x4a, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
- 0xb6, 0x20, 0x0, 0x0, 0x0, 0x5a, 0xff, 0xd8,
- 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1,
- 0x6b, 0xff, 0xff, 0xeb, 0x62, 0x0, 0x0, 0x5a,
- 0xff, 0xd8, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x6b, 0xff, 0xff, 0xff, 0xe9, 0x30,
- 0x0, 0x5a, 0xff, 0xeb, 0x97, 0x77, 0x77, 0x77,
- 0x77, 0x77, 0x77, 0x77, 0xad, 0xff, 0xff, 0xff,
- 0xf9, 0x40, 0x0, 0x5a, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xf9, 0x40, 0x0, 0x5a, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xd9, 0x42, 0x12, 0x5a, 0xdf,
- 0xff, 0xff, 0xff, 0xff, 0xf9, 0x40, 0x0, 0x5a,
- 0xff, 0xff, 0xff, 0xff, 0xfc, 0x72, 0x0, 0x0,
- 0x3, 0x8d, 0xff, 0xff, 0xff, 0xff, 0xf9, 0x40,
- 0x0, 0x5a, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x94,
- 0x0, 0x0, 0x5, 0xaf, 0xff, 0xff, 0xff, 0xff,
- 0xf9, 0x40, 0x0, 0x5a, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xfe, 0xca, 0x9a, 0xce, 0xff, 0xff, 0xff,
- 0xff, 0xff, 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, 0x23,
- 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
-
- /* U+F0EA "" */
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x25, 0x8a, 0xa8,
- 0x52, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x38, 0xef, 0xff, 0xff, 0xff,
- 0xb8, 0x8c, 0xff, 0xff, 0xff, 0xfc, 0x72, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x5a, 0xff, 0xff,
- 0xff, 0xff, 0xb8, 0x8c, 0xff, 0xff, 0xff, 0xff,
- 0x94, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5a,
- 0xff, 0xff, 0xff, 0xff, 0xfe, 0xdc, 0xbb, 0xbb,
- 0xbb, 0xba, 0x73, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x5a, 0xff, 0xff, 0xff, 0xfc, 0x74, 0x58,
- 0x99, 0x99, 0x99, 0x99, 0x52, 0x25, 0x64, 0x10,
- 0x0, 0x0, 0x0, 0x5a, 0xff, 0xff, 0xff, 0xfa,
- 0x55, 0xbf, 0xff, 0xff, 0xff, 0xff, 0x94, 0x4a,
- 0xff, 0xda, 0x52, 0x0, 0x0, 0x5a, 0xff, 0xff,
- 0xff, 0xfa, 0x55, 0xbf, 0xff, 0xff, 0xff, 0xff,
- 0xa5, 0x23, 0x56, 0x66, 0x53, 0x10, 0x0, 0x5a,
- 0xff, 0xff, 0xff, 0xfa, 0x55, 0xbf, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe9, 0x40,
- 0x0, 0x5a, 0xff, 0xff, 0xff, 0xfa, 0x55, 0xbf,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xf9, 0x40, 0x0, 0x49, 0xef, 0xff, 0xff, 0xfa,
- 0x55, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 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, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xa5, 0x0, 0x0,
- 0x0, 0x2, 0x6b, 0xef, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd,
- 0x93, 0x0, 0x0, 0x39, 0xef, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xfb, 0x61, 0x0, 0x1, 0x23, 0x34,
- 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44,
- 0x44, 0x44, 0x44, 0x43, 0x21, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x2, 0x7c, 0xff, 0xff,
- 0xfe, 0x94, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1,
- 0x46, 0x76, 0x52, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0,
-
- /* U+F11C "" */
- 0x0, 0x26, 0xbe, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xfd, 0x84, 0x0, 0x5,
- 0xaf, 0xfe, 0xc9, 0x88, 0xad, 0xeb, 0x88, 0x8b,
- 0xed, 0xa8, 0x8b, 0xee, 0xb8, 0x88, 0x8b, 0xee,
- 0xb8, 0x8a, 0xdf, 0xfd, 0x72, 0x0, 0x5a, 0xff,
- 0xd8, 0x30, 0x5, 0xbc, 0x71, 0x1, 0x7c, 0xb5,
- 0x1, 0x6b, 0xb6, 0x0, 0x0, 0x6b, 0xb6, 0x10,
- 0x5b, 0xff, 0xd8, 0x20, 0x5, 0xaf, 0xff, 0xff,
- 0xfe, 0xdc, 0xcd, 0xef, 0xed, 0xcc, 0xde, 0xed,
- 0xcc, 0x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,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x46, 0x64,
- 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0,
-
- /* U+F15B "" */
- 0x0, 0x26, 0x9b, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb,
- 0xba, 0x62, 0x36, 0x74, 0x10, 0x0, 0x0, 0x0,
- 0x0, 0x5, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xe9, 0x45, 0xaf, 0xfd, 0x94, 0x10, 0x0,
- 0x0, 0x0, 0x5a, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xfe, 0x94, 0x5a, 0xff, 0xff, 0xfd, 0x94,
- 0x10, 0x0, 0x5, 0xaf, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xfa, 0x52, 0x34, 0x44, 0x44, 0x44,
- 0x31, 0x0, 0x0, 0x5a, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xfa, 0x50, 0x0, 0x5, 0xaf, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xa5, 0x0, 0x0, 0x5a, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xfa, 0x50, 0x0, 0x5, 0xaf, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xa5, 0x0, 0x0, 0x5a, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xfa, 0x50, 0x0, 0x5, 0xaf, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xa5, 0x0, 0x0, 0x5a, 0xff,
- 0xff,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0x4, 0x9f, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd,
- 0x83, 0x0, 0x0, 0x0, 0x5a, 0xff, 0xd8, 0x32,
- 0x34, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44,
- 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x21, 0x49,
- 0xef, 0xff, 0xd8, 0x30, 0x0, 0x5, 0xaf, 0xfd,
- 0x84, 0x6c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfa,
- 0x52, 0x59, 0xce, 0xff, 0xa5, 0x0, 0x0, 0x5a,
- 0xff, 0xd8, 0x46, 0xcf, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xa5, 0x0, 0x28, 0xdf, 0xfa, 0x50, 0x0,
- 0x5, 0xaf, 0xfd, 0x83, 0x59, 0xcc, 0xcc, 0xcc,
- 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc,
- 0xcc, 0xcc, 0xc8, 0x43, 0x8e, 0xff, 0xff, 0xa5,
- 0x0, 0x0, 0x5a, 0xff, 0xeb, 0x87, 0x77, 0x77,
- 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77,
- 0x77, 0x77, 0x77, 0x77, 0x77, 0x9c, 0xff, 0xfc,
- 0x94, 0x10, 0x0, 0x2, 0x6c, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xea, 0x51, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
-
- /* U+F241 "" */
- 0x0, 0x1, 0x35, 0x67, 0x77, 0x77, 0x77, 0x77,
- 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77,
- 0x77, 0x77, 0x77, 0x77, 0x77, 0x65, 0x20, 0x0,
- 0x0, 0x0, 0x4, 0x9f, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd,
- 0x83, 0x0, 0x0, 0x0, 0x5a, 0xff, 0xd8, 0x32,
- 0x34, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44,
- 0x44, 0x44, 0x43, 0x21, 0x0, 0x0, 0x0, 0x49,
- 0xef, 0xff, 0xd8, 0x30, 0x0, 0x5, 0xaf, 0xfd,
- 0x84, 0x6c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xc6, 0x10, 0x0, 0x0,
- 0x2, 0x59, 0xce, 0xff, 0xa5, 0x0, 0x0, 0x5a,
- 0xff, 0xd8, 0x46, 0xcf, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x61, 0x0,
- 0x0, 0x0, 0x0, 0x28, 0xdf, 0xfa, 0x50, 0x0,
- 0x5, 0xaf, 0xfd, 0x83, 0x59, 0xcc, 0xcc, 0xcc,
- 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x95,
- 0x0, 0x0, 0x0, 0x3, 0x8e, 0xff, 0xff, 0xa5,
- 0x0, 0x0, 0x5a, 0xff, 0xeb, 0x87, 0x77, 0x77,
- 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77,
- 0x77, 0x77, 0x77, 0x77, 0x77, 0x9c, 0xff, 0xfc,
- 0x94, 0x10, 0x0, 0x2, 0x6c, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xea, 0x51, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
-
- /* U+F242 "" */
- 0x0, 0x1, 0x35, 0x67, 0x77, 0x77, 0x77, 0x77,
- 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77,
- 0x77, 0x77, 0x77, 0x77, 0x77, 0x65, 0x20, 0x0,
- 0x0, 0x0, 0x4, 0x9f, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd,
- 0x83, 0x0, 0x0, 0x0, 0x5a, 0xff, 0xd8, 0x32,
- 0x34, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x32,
- 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x49,
- 0xef, 0xff, 0xd8, 0x30, 0x0, 0x5, 0xaf, 0xfd,
- 0x84, 0x6c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xfd, 0x82, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x2, 0x59, 0xce, 0xff, 0xa5, 0x0, 0x0, 0x5a,
- 0xff, 0xd8, 0x46, 0xcf, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xd8, 0x20, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x28, 0xdf, 0xfa, 0x50, 0x0,
- 0x5, 0xaf, 0xfd, 0x83, 0x59, 0xcc, 0xcc, 0xcc,
- 0xcc, 0xcc, 0xcc, 0xca, 0x62, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x3, 0x8e, 0xff, 0xff, 0xa5,
- 0x0, 0x0, 0x5a, 0xff, 0xeb, 0x87, 0x77, 0x77,
- 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77,
- 0x77, 0x77, 0x77, 0x77, 0x77, 0x9c, 0xff, 0xfc,
- 0x94, 0x10, 0x0, 0x2, 0x6c, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xea, 0x51, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
-
- /* U+F243 "" */
- 0x0, 0x1, 0x35, 0x67, 0x77, 0x77, 0x77, 0x77,
- 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77,
- 0x77, 0x77, 0x77, 0x77, 0x77, 0x65, 0x20, 0x0,
- 0x0, 0x0, 0x4, 0x9f, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd,
- 0x83, 0x0, 0x0, 0x0, 0x5a, 0xff, 0xd8, 0x32,
- 0x34, 0x44, 0x44, 0x43, 0x21, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x49,
- 0xef, 0xff, 0xd8, 0x30, 0x0, 0x5, 0xaf, 0xfd,
- 0x84, 0x6c, 0xff, 0xff, 0xff, 0xe9, 0x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, 0x0,
- 0x0, 0x0, 0x0, 0x28, 0xdf, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xea, 0x52, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x4a, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xa5, 0x20,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x13, 0x67, 0x76,
- 0x55, 0x44, 0x21, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0,
-
- /* U+F55A "" */
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x15, 0x9c,
- 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xec, 0x84,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x15, 0xad,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xa4, 0x0, 0x0, 0x0, 0x0, 0x15, 0xad,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0x94, 0x1,
- 0x49, 0xdf, 0xfd, 0x94, 0x10, 0x39, 0xdf, 0xff,
- 0xff, 0xff, 0xfa, 0x50, 0x0, 0x0, 0x15, 0xad,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd,
- 0x94, 0x10, 0x1, 0x22, 0x10, 0x1, 0x49, 0xdf,
- 0xff, 0xff, 0xff, 0xff, 0xa5, 0x0, 0x0, 0x39,
- 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xfb, 0x61, 0x0, 0x0, 0x15, 0xbf,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xfa, 0x50, 0x0,
- 0x0, 0x15, 0xad, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xfd, 0x94, 0x10, 0x1, 0x33, 0x10,
- 0x1, 0x49, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xa5,
- 0x0, 0x0, 0x0, 0x0, 0x15, 0xad, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xfd, 0x94, 0x11, 0x49, 0xdf,
- 0xfd, 0x94, 0x10, 0x49, 0xdf, 0xff, 0xff, 0xff,
- 0xfa, 0x50, 0x0, 0x0, 0x0, 0x0, 0x0, 0x15,
- 0x9d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xa4, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x14, 0x9c, 0xef, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xec, 0x84, 0x0, 0x0,
-
- /* U+F7C2 "" */
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x14, 0x67, 0x88,
- 0x88, 0x88, 0x88, 0x88, 0x77, 0x64, 0x20, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x25, 0xad, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0x83,
- 0x0, 0x0, 0x0, 0x26, 0xbe, 0xff, 0xa4, 0x0,
- 0x5b, 0xb6, 0x3, 0x9b, 0x72, 0x28, 0xdf, 0xfa,
- 0x50, 0x0, 0x4, 0x9e, 0xff, 0xff, 0xfa, 0x40,
- 0x5, 0xbb, 0x60, 0x39, 0xb7, 0x22, 0x8d, 0xff,
- 0xa5, 0x0, 0x0, 0x5a, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xfa, 0x50, 0x0, 0x5, 0xaf, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xa5, 0x0, 0x0, 0x5a, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xfa, 0x50, 0x0, 0x5, 0xaf, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xa5, 0x0, 0x0, 0x5a, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xfa, 0x50, 0x0, 0x5, 0xaf, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xa5, 0x0, 0x0, 0x5a, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xfa, 0x50, 0x0, 0x2, 0x6c,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xfc, 0x62, 0x0, 0x0, 0x0,
- 0x1, 0x34, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44,
- 0x44, 0x44, 0x44, 0x31, 0x0, 0x0, 0x0,
-
- /* U+F8A2 "" */
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x12, 0x21, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x48, 0xdf,
- 0xb6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x6a,
- 0xc9, 0x51, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x27, 0xdf, 0xff, 0xb6, 0x0, 0x0,
- 0x0, 0x0, 0x37, 0xce, 0xff, 0xfc, 0x72, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x28,
- 0xdf, 0xff, 0xb6, 0x0, 0x0, 0x3, 0x8c, 0xff,
- 0xff, 0xff, 0xff, 0xed, 0xdd, 0xdd, 0xdd, 0xdd,
- 0xdd, 0xdd, 0xdd, 0xdd, 0xde, 0xff, 0xff, 0xb6,
- 0x0, 0x0, 0x16, 0xbe, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xa4, 0x0, 0x0, 0x0,
- 0x2, 0x6b, 0xef, 0xff, 0xfc, 0x72, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x15,
- 0xad, 0xfc, 0x61, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0
-};
-
-
-/*---------------------
- * GLYPH DESCRIPTION
- *--------------------*/
-
-static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
- {.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
- {.bitmap_index = 0, .adv_w = 48, .box_w = 6, .box_h = 0, .ofs_x = -1, .ofs_y = 0},
- {.bitmap_index = 0, .adv_w = 49, .box_w = 9, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 41, .adv_w = 61, .box_w = 12, .box_h = 4, .ofs_x = 0, .ofs_y = 6},
- {.bitmap_index = 65, .adv_w = 120, .box_w = 24, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 173, .adv_w = 108, .box_w = 21, .box_h = 12, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 299, .adv_w = 141, .box_w = 27, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 421, .adv_w = 119, .box_w = 24, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 529, .adv_w = 33, .box_w = 6, .box_h = 4, .ofs_x = 0, .ofs_y = 6},
- {.bitmap_index = 541, .adv_w = 66, .box_w = 15, .box_h = 14, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 646, .adv_w = 67, .box_w = 15, .box_h = 14, .ofs_x = -1, .ofs_y = -3},
- {.bitmap_index = 751, .adv_w = 83, .box_w = 21, .box_h = 6, .ofs_x = -1, .ofs_y = 3},
- {.bitmap_index = 814, .adv_w = 109, .box_w = 21, .box_h = 7, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 888, .adv_w = 38, .box_w = 12, .box_h = 4, .ofs_x = -1, .ofs_y = -3},
- {.bitmap_index = 912, .adv_w = 53, .box_w = 15, .box_h = 1, .ofs_x = -1, .ofs_y = 3},
- {.bitmap_index = 920, .adv_w = 51, .box_w = 9, .box_h = 2, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 929, .adv_w = 79, .box_w = 18, .box_h = 10, .ofs_x = -1, .ofs_y = -1},
- {.bitmap_index = 1019, .adv_w = 108, .box_w = 21, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1114, .adv_w = 108, .box_w = 15, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1182, .adv_w = 108, .box_w = 21, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1277, .adv_w = 108, .box_w = 21, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1372, .adv_w = 108, .box_w = 24, .box_h = 9, .ofs_x = -1, .ofs_y = 0},
- {.bitmap_index = 1480, .adv_w = 108, .box_w = 21, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1575, .adv_w = 108, .box_w = 21, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1670, .adv_w = 108, .box_w = 21, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1765, .adv_w = 108, .box_w = 21, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1860, .adv_w = 108, .box_w = 21, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1955, .adv_w = 47, .box_w = 9, .box_h = 7, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1987, .adv_w = 41, .box_w = 12, .box_h = 9, .ofs_x = -1, .ofs_y = -2},
- {.bitmap_index = 2041, .adv_w = 98, .box_w = 18, .box_h = 6, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 2095, .adv_w = 105, .box_w = 21, .box_h = 5, .ofs_x = 0, .ofs_y = 2},
- {.bitmap_index = 2148, .adv_w = 100, .box_w = 21, .box_h = 6, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 2211, .adv_w = 91, .box_w = 18, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2292, .adv_w = 172, .box_w = 33, .box_h = 12, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 2490, .adv_w = 125, .box_w = 27, .box_h = 9, .ofs_x = -1, .ofs_y = 0},
- {.bitmap_index = 2612, .adv_w = 120, .box_w = 24, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2720, .adv_w = 125, .box_w = 24, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2828, .adv_w = 126, .box_w = 24, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2936, .adv_w = 109, .box_w = 21, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 3031, .adv_w = 106, .box_w = 21, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 3126, .adv_w = 131, .box_w = 24, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 3234, .adv_w = 137, .box_w = 24, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 3342, .adv_w = 52, .box_w = 9, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 3383, .adv_w = 106, .box_w = 24, .box_h = 9, .ofs_x = -1, .ofs_y = 0},
- {.bitmap_index = 3491, .adv_w = 120, .box_w = 24, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 3599, .adv_w = 103, .box_w = 21, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 3694, .adv_w = 168, .box_w = 30, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 3829, .adv_w = 137, .box_w = 24, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 3937, .adv_w = 132, .box_w = 24, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 4045, .adv_w = 121, .box_w = 24, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 4153, .adv_w = 132, .box_w = 24, .box_h = 11, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 4285, .adv_w = 118, .box_w = 24, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 4393, .adv_w = 114, .box_w = 21, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 4488, .adv_w = 115, .box_w = 27, .box_h = 9, .ofs_x = -1, .ofs_y = 0},
- {.bitmap_index = 4610, .adv_w = 125, .box_w = 24, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 4718, .adv_w = 122, .box_w = 27, .box_h = 9, .ofs_x = -1, .ofs_y = 0},
- {.bitmap_index = 4840, .adv_w = 170, .box_w = 33, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 4989, .adv_w = 120, .box_w = 24, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 5097, .adv_w = 115, .box_w = 27, .box_h = 9, .ofs_x = -1, .ofs_y = 0},
- {.bitmap_index = 5219, .adv_w = 115, .box_w = 24, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 5327, .adv_w = 51, .box_w = 12, .box_h = 13, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 5405, .adv_w = 79, .box_w = 21, .box_h = 10, .ofs_x = -1, .ofs_y = -1},
- {.bitmap_index = 5510, .adv_w = 51, .box_w = 12, .box_h = 13, .ofs_x = -1, .ofs_y = -2},
- {.bitmap_index = 5588, .adv_w = 80, .box_w = 15, .box_h = 5, .ofs_x = 0, .ofs_y = 5},
- {.bitmap_index = 5626, .adv_w = 87, .box_w = 21, .box_h = 1, .ofs_x = -1, .ofs_y = -1},
- {.bitmap_index = 5637, .adv_w = 59, .box_w = 12, .box_h = 2, .ofs_x = 0, .ofs_y = 8},
- {.bitmap_index = 5649, .adv_w = 104, .box_w = 21, .box_h = 7, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 5723, .adv_w = 108, .box_w = 21, .box_h = 10, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 5828, .adv_w = 101, .box_w = 21, .box_h = 7, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 5902, .adv_w = 108, .box_w = 21, .box_h = 10, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 6007, .adv_w = 102, .box_w = 21, .box_h = 7, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 6081, .adv_w = 67, .box_w = 15, .box_h = 10, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 6156, .adv_w = 108, .box_w = 21, .box_h = 10, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 6261, .adv_w = 106, .box_w = 21, .box_h = 10, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 6366, .adv_w = 47, .box_w = 9, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 6407, .adv_w = 46, .box_w = 12, .box_h = 12, .ofs_x = -1, .ofs_y = -3},
- {.bitmap_index = 6479, .adv_w = 97, .box_w = 21, .box_h = 10, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 6584, .adv_w = 47, .box_w = 9, .box_h = 10, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 6629, .adv_w = 168, .box_w = 33, .box_h = 7, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 6745, .adv_w = 106, .box_w = 21, .box_h = 7, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 6819, .adv_w = 110, .box_w = 21, .box_h = 7, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 6893, .adv_w = 108, .box_w = 21, .box_h = 10, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 6998, .adv_w = 109, .box_w = 21, .box_h = 10, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 7103, .adv_w = 65, .box_w = 15, .box_h = 7, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 7156, .adv_w = 99, .box_w = 18, .box_h = 7, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 7219, .adv_w = 63, .box_w = 15, .box_h = 9, .ofs_x = -1, .ofs_y = 0},
- {.bitmap_index = 7287, .adv_w = 106, .box_w = 21, .box_h = 7, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 7361, .adv_w = 93, .box_w = 21, .box_h = 7, .ofs_x = -1, .ofs_y = 0},
- {.bitmap_index = 7435, .adv_w = 144, .box_w = 33, .box_h = 7, .ofs_x = -1, .ofs_y = 0},
- {.bitmap_index = 7551, .adv_w = 95, .box_w = 24, .box_h = 7, .ofs_x = -1, .ofs_y = 0},
- {.bitmap_index = 7635, .adv_w = 91, .box_w = 21, .box_h = 10, .ofs_x = -1, .ofs_y = -3},
- {.bitmap_index = 7740, .adv_w = 95, .box_w = 18, .box_h = 7, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 7803, .adv_w = 65, .box_w = 15, .box_h = 13, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 7901, .adv_w = 47, .box_w = 9, .box_h = 11, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 7951, .adv_w = 65, .box_w = 15, .box_h = 13, .ofs_x = -1, .ofs_y = -3},
- {.bitmap_index = 8049, .adv_w = 131, .box_w = 24, .box_h = 4, .ofs_x = 0, .ofs_y = 2},
- {.bitmap_index = 8097, .adv_w = 192, .box_w = 42, .box_h = 13, .ofs_x = -1, .ofs_y = -2},
- {.bitmap_index = 8370, .adv_w = 192, .box_w = 42, .box_h = 9, .ofs_x = -1, .ofs_y = 0},
- {.bitmap_index = 8559, .adv_w = 192, .box_w = 42, .box_h = 11, .ofs_x = -1, .ofs_y = -1},
- {.bitmap_index = 8790, .adv_w = 192, .box_w = 42, .box_h = 9, .ofs_x = -1, .ofs_y = 0},
- {.bitmap_index = 8979, .adv_w = 132, .box_w = 30, .box_h = 9, .ofs_x = -1, .ofs_y = 0},
- {.bitmap_index = 9114, .adv_w = 192, .box_w = 42, .box_h = 13, .ofs_x = -1, .ofs_y = -2},
- {.bitmap_index = 9387, .adv_w = 192, .box_w = 36, .box_h = 13, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 9621, .adv_w = 216, .box_w = 45, .box_h = 11, .ofs_x = -1, .ofs_y = -1},
- {.bitmap_index = 9869, .adv_w = 192, .box_w = 42, .box_h = 13, .ofs_x = -1, .ofs_y = -2},
- {.bitmap_index = 10142, .adv_w = 216, .box_w = 45, .box_h = 9, .ofs_x = -1, .ofs_y = 0},
- {.bitmap_index = 10345, .adv_w = 192, .box_w = 42, .box_h = 13, .ofs_x = -1, .ofs_y = -2},
- {.bitmap_index = 10618, .adv_w = 96, .box_w = 24, .box_h = 10, .ofs_x = -1, .ofs_y = -1},
- {.bitmap_index = 10738, .adv_w = 144, .box_w = 33, .box_h = 10, .ofs_x = -1, .ofs_y = -1},
- {.bitmap_index = 10903, .adv_w = 216, .box_w = 45, .box_h = 13, .ofs_x = -1, .ofs_y = -2},
- {.bitmap_index = 11196, .adv_w = 192, .box_w = 42, .box_h = 9, .ofs_x = -1, .ofs_y = 0},
- {.bitmap_index = 11385, .adv_w = 168, .box_w = 27, .box_h = 12, .ofs_x = 1, .ofs_y = -2},
- {.bitmap_index = 11547, .adv_w = 168, .box_w = 36, .box_h = 13, .ofs_x = -1, .ofs_y = -2},
- {.bitmap_index = 11781, .adv_w = 168, .box_w = 36, .box_h = 11, .ofs_x = -1, .ofs_y = -1},
- {.bitmap_index = 11979, .adv_w = 168, .box_w = 36, .box_h = 11, .ofs_x = -1, .ofs_y = -1},
- {.bitmap_index = 12177, .adv_w = 168, .box_w = 27, .box_h = 12, .ofs_x = 1, .ofs_y = -2},
- {.bitmap_index = 12339, .adv_w = 168, .box_w = 39, .box_h = 11, .ofs_x = -1, .ofs_y = -1},
- {.bitmap_index = 12554, .adv_w = 120, .box_w = 24, .box_h = 11, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 12686, .adv_w = 120, .box_w = 24, .box_h = 11, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 12818, .adv_w = 168, .box_w = 36, .box_h = 11, .ofs_x = -1, .ofs_y = -1},
- {.bitmap_index = 13016, .adv_w = 168, .box_w = 36, .box_h = 3, .ofs_x = -1, .ofs_y = 3},
- {.bitmap_index = 13070, .adv_w = 216, .box_w = 45, .box_h = 9, .ofs_x = -1, .ofs_y = 0},
- {.bitmap_index = 13273, .adv_w = 240, .box_w = 51, .box_h = 13, .ofs_x = -1, .ofs_y = -2},
- {.bitmap_index = 13605, .adv_w = 216, .box_w = 45, .box_h = 13, .ofs_x = -1, .ofs_y = -2},
- {.bitmap_index = 13898, .adv_w = 192, .box_w = 42, .box_h = 11, .ofs_x = -1, .ofs_y = -1},
- {.bitmap_index = 14129, .adv_w = 168, .box_w = 36, .box_h = 7, .ofs_x = -1, .ofs_y = 1},
- {.bitmap_index = 14255, .adv_w = 168, .box_w = 36, .box_h = 7, .ofs_x = -1, .ofs_y = 1},
- {.bitmap_index = 14381, .adv_w = 240, .box_w = 51, .box_h = 10, .ofs_x = -1, .ofs_y = 0},
- {.bitmap_index = 14636, .adv_w = 192, .box_w = 42, .box_h = 9, .ofs_x = -1, .ofs_y = 0},
- {.bitmap_index = 14825, .adv_w = 192, .box_w = 42, .box_h = 13, .ofs_x = -1, .ofs_y = -2},
- {.bitmap_index = 15098, .adv_w = 192, .box_w = 42, .box_h = 13, .ofs_x = -1, .ofs_y = -2},
- {.bitmap_index = 15371, .adv_w = 168, .box_w = 36, .box_h = 11, .ofs_x = -1, .ofs_y = -1},
- {.bitmap_index = 15569, .adv_w = 168, .box_w = 36, .box_h = 13, .ofs_x = -1, .ofs_y = -2},
- {.bitmap_index = 15803, .adv_w = 168, .box_w = 36, .box_h = 11, .ofs_x = -1, .ofs_y = -1},
- {.bitmap_index = 16001, .adv_w = 120, .box_w = 27, .box_h = 13, .ofs_x = -1, .ofs_y = -2},
- {.bitmap_index = 16177, .adv_w = 168, .box_w = 36, .box_h = 13, .ofs_x = -1, .ofs_y = -2},
- {.bitmap_index = 16411, .adv_w = 168, .box_w = 36, .box_h = 13, .ofs_x = -1, .ofs_y = -2},
- {.bitmap_index = 16645, .adv_w = 216, .box_w = 45, .box_h = 9, .ofs_x = -1, .ofs_y = 0},
- {.bitmap_index = 16848, .adv_w = 192, .box_w = 42, .box_h = 13, .ofs_x = -1, .ofs_y = -2},
- {.bitmap_index = 17121, .adv_w = 144, .box_w = 33, .box_h = 13, .ofs_x = -1, .ofs_y = -2},
- {.bitmap_index = 17336, .adv_w = 240, .box_w = 51, .box_h = 12, .ofs_x = -1, .ofs_y = -1},
- {.bitmap_index = 17642, .adv_w = 240, .box_w = 51, .box_h = 9, .ofs_x = -1, .ofs_y = 0},
- {.bitmap_index = 17872, .adv_w = 240, .box_w = 51, .box_h = 9, .ofs_x = -1, .ofs_y = 0},
- {.bitmap_index = 18102, .adv_w = 240, .box_w = 51, .box_h = 9, .ofs_x = -1, .ofs_y = 0},
- {.bitmap_index = 18332, .adv_w = 240, .box_w = 51, .box_h = 9, .ofs_x = -1, .ofs_y = 0},
- {.bitmap_index = 18562, .adv_w = 240, .box_w = 51, .box_h = 9, .ofs_x = -1, .ofs_y = 0},
- {.bitmap_index = 18792, .adv_w = 240, .box_w = 51, .box_h = 11, .ofs_x = -1, .ofs_y = -1},
- {.bitmap_index = 19073, .adv_w = 168, .box_w = 33, .box_h = 13, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 19288, .adv_w = 168, .box_w = 36, .box_h = 13, .ofs_x = -1, .ofs_y = -2},
- {.bitmap_index = 19522, .adv_w = 192, .box_w = 42, .box_h = 13, .ofs_x = -1, .ofs_y = -2},
- {.bitmap_index = 19795, .adv_w = 240, .box_w = 51, .box_h = 9, .ofs_x = -1, .ofs_y = 0},
- {.bitmap_index = 20025, .adv_w = 144, .box_w = 33, .box_h = 13, .ofs_x = -1, .ofs_y = -2},
- {.bitmap_index = 20240, .adv_w = 193, .box_w = 42, .box_h = 9, .ofs_x = -1, .ofs_y = 0}
-};
-
-/*---------------------
- * CHARACTER MAPPING
- *--------------------*/
-
-static const uint16_t unicode_list_1[] = {
- 0x0, 0x7, 0xa, 0xb, 0xc, 0x10, 0x12, 0x14,
- 0x18, 0x1b, 0x20, 0x25, 0x26, 0x27, 0x3d, 0x47,
- 0x4a, 0x4b, 0x4c, 0x50, 0x51, 0x52, 0x53, 0x66,
- 0x67, 0x6d, 0x6f, 0x70, 0x73, 0x76, 0x77, 0x78,
- 0x7a, 0x92, 0x94, 0xc3, 0xc4, 0xc6, 0xe6, 0xe9,
- 0xf2, 0x11b, 0x123, 0x15a, 0x1ea, 0x23f, 0x240, 0x241,
- 0x242, 0x243, 0x286, 0x292, 0x2ec, 0x303, 0x559, 0x7c1,
- 0x8a1
-};
-
-/*Collect the unicode lists and glyph_id offsets*/
-static const lv_font_fmt_txt_cmap_t cmaps[] =
-{
- {
- .range_start = 32, .range_length = 95, .glyph_id_start = 1,
- .unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY
- },
- {
- .range_start = 61441, .range_length = 2210, .glyph_id_start = 96,
- .unicode_list = unicode_list_1, .glyph_id_ofs_list = NULL, .list_length = 57, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
- }
-};
-
-/*-----------------
- * KERNING
- *----------------*/
-
-
-/*Map glyph_ids to kern left classes*/
-static const uint8_t kern_left_class_mapping[] =
-{
- 0, 1, 0, 2, 0, 0, 0, 0,
- 2, 3, 0, 0, 0, 4, 0, 4,
- 5, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 6, 7, 8, 9, 10, 11,
- 0, 12, 12, 13, 14, 15, 12, 12,
- 9, 16, 17, 18, 0, 19, 13, 20,
- 21, 22, 23, 24, 25, 0, 0, 0,
- 0, 0, 26, 27, 28, 0, 29, 30,
- 0, 31, 0, 0, 32, 0, 31, 31,
- 33, 27, 0, 34, 0, 35, 0, 36,
- 37, 38, 36, 39, 40, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0
-};
-
-/*Map glyph_ids to kern right classes*/
-static const uint8_t kern_right_class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
-static const lv_font_fmt_txt_kern_classes_t kern_classes =
-{
- .class_pair_values = kern_class_values,
- .left_class_mapping = kern_left_class_mapping,
- .right_class_mapping = kern_right_class_mapping,
- .left_class_cnt = 40,
- .right_class_cnt = 35,
-};
-
-/*--------------------
- * ALL CUSTOM DATA
- *--------------------*/
-
-/*Store all the custom data of the font*/
-static lv_font_fmt_txt_dsc_t font_dsc = {
- .glyph_bitmap = gylph_bitmap,
- .glyph_dsc = glyph_dsc,
- .cmaps = cmaps,
- .kern_dsc = &kern_classes,
- .kern_scale = 16,
- .cmap_num = 2,
- .bpp = 4,
- .kern_classes = 1,
- .bitmap_format = 0
-};
-
-
-/*-----------------
- * PUBLIC FONT
- *----------------*/
-
-/*Initialize a public general font descriptor*/
-lv_font_t lv_font_roboto_12_subpx = {
- .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/
- .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/
- .line_height = 14, /*The maximum line height required by the font*/
- .base_line = 3, /*Baseline measured from the bottom of the line*/
- .subpx = LV_FONT_SUBPX_HOR,
- .dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
-};
-
-#endif /*#if LV_FONT_ROBOTO_12_SUBPX*/
-
diff --git a/src/libs/lvgl/src/lv_font/lv_font_roboto_16.c b/src/libs/lvgl/src/lv_font/lv_font_roboto_16.c
deleted file mode 100644
index a52b2c0d..00000000
--- a/src/libs/lvgl/src/lv_font/lv_font_roboto_16.c
+++ /dev/null
@@ -1,2116 +0,0 @@
-#include "../../lvgl.h"
-
-/*******************************************************************************
- * Size: 16 px
- * Bpp: 4
- * Opts: --no-compress --no-prefilter --bpp 4 --size 16 --font Roboto-Regular.woff -r 0x20-0x7F --font FontAwesome5-Solid+Brands+Regular.woff -r 61441,61448,61451,61452,61452,61453,61457,61459,61461,61465,61468,61473,61478,61479,61480,61502,61512,61515,61516,61517,61521,61522,61523,61524,61543,61544,61550,61552,61553,61556,61559,61560,61561,61563,61587,61589,61636,61637,61639,61671,61674,61683,61724,61732,61787,61931,62016,62017,62018,62019,62020,62087,62099,62212,62189,62810,63426,63650 --format lvgl -o lv_font_roboto_16.c --force-fast-kern-format
- ******************************************************************************/
-
-#ifndef LV_FONT_ROBOTO_16
-#define LV_FONT_ROBOTO_16 1
-#endif
-
-#if LV_FONT_ROBOTO_16
-
-/*-----------------
- * BITMAPS
- *----------------*/
-
-/*Store the image of the glyphs*/
-static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = {
- /* U+20 " " */
-
- /* U+21 "!" */
- 0xad, 0xac, 0xac, 0xac, 0xac, 0xac, 0x9b, 0x9b,
- 0x56, 0x0, 0x57, 0x8c,
-
- /* U+22 "\"" */
- 0xe2, 0xd4, 0xe2, 0xd3, 0xe0, 0xd2, 0xe0, 0xd1,
- 0x0, 0x0,
-
- /* U+23 "#" */
- 0x0, 0x1, 0xf0, 0xe, 0x30, 0x0, 0x4, 0xc0,
- 0x2f, 0x0, 0x0, 0x8, 0x90, 0x5c, 0x0, 0xd,
- 0xff, 0xff, 0xff, 0xf4, 0x1, 0x2e, 0x42, 0xc7,
- 0x20, 0x0, 0x1f, 0x0, 0xe3, 0x0, 0x0, 0x4d,
- 0x1, 0xf0, 0x0, 0x7f, 0xff, 0xff, 0xff, 0xa0,
- 0x12, 0xb8, 0x28, 0xb2, 0x10, 0x0, 0xc4, 0xa,
- 0x70, 0x0, 0x0, 0xf2, 0xc, 0x50, 0x0, 0x1,
- 0xf0, 0xf, 0x20, 0x0,
-
- /* U+24 "$" */
- 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0xe, 0x40,
- 0x0, 0x0, 0x2, 0xe6, 0x0, 0x0, 0xa, 0xff,
- 0xfc, 0x10, 0x6, 0xf5, 0x4, 0xfa, 0x0, 0xac,
- 0x0, 0x8, 0xe0, 0x9, 0xe0, 0x0, 0x26, 0x0,
- 0x3f, 0xb3, 0x0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f, 0xff, 0xfd,
- 0xff, 0xff, 0xff, 0xc2, 0x2c, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xe0, 0xff,
- 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd,
-
- /* U+F01C "" */
- 0x0, 0x4, 0xef, 0xff, 0xff, 0xff, 0xfe, 0x40,
- 0x0, 0x0, 0x1e, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xe1, 0x0, 0x0, 0xaf, 0xb0, 0x0, 0x0, 0x0,
- 0xb, 0xfa, 0x0, 0x5, 0xff, 0x10, 0x0, 0x0,
- 0x0, 0x1, 0xff, 0x50, 0x1e, 0xf6, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x6f, 0xe1, 0xaf, 0xb0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0xb, 0xfa, 0xff, 0xff,
- 0xff, 0x80, 0x0, 0x8, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xf1, 0x0, 0x1f, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xf8,
-
- /* U+F021 "" */
- 0x0, 0x0, 0x6, 0xbd, 0xda, 0x50, 0x2, 0xff,
- 0x0, 0x5, 0xef, 0xff, 0xff, 0xfe, 0x42, 0xff,
- 0x0, 0x7f, 0xff, 0xa7, 0x7b, 0xff, 0xf9, 0xff,
- 0x5, 0xff, 0xc1, 0x0, 0x0, 0x2c, 0xff, 0xff,
- 0xe, 0xfc, 0x0, 0x0, 0x2, 0x22, 0xdf, 0xff,
- 0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x6, 0x10, 0x0,
-
- /* U+F03E "" */
- 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8,
- 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0x20, 0x2f, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xfc, 0x0, 0xc, 0xff, 0xff, 0xee, 0xff, 0xff,
- 0xff, 0x20, 0x2f, 0xff, 0xfe, 0x22, 0xef, 0xff,
- 0xff, 0xfc, 0xff, 0xff, 0xe2, 0x0, 0x2e, 0xff,
- 0xff, 0xfe, 0x4e, 0xfe, 0x20, 0x0, 0x2, 0xff,
- 0xff, 0xe2, 0x2, 0xc2, 0x0, 0x0, 0x0, 0xff,
- 0xff, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff,
- 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8,
-
- /* U+F048 "" */
- 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x30, 0x0,
- 0x1, 0xcc, 0xff, 0x40, 0x0, 0x2d, 0xff, 0xff,
- 0x40, 0x3, 0xef, 0xff, 0xff, 0x40, 0x3f, 0xff,
- 0xff, 0xff, 0x44, 0xff, 0xff, 0xff, 0xff, 0x9f,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xaf, 0xff,
- 0xff, 0xff, 0xff, 0x45, 0xff, 0xff, 0xff, 0xff,
- 0x40, 0x4f, 0xff, 0xff, 0xff, 0x40, 0x3, 0xef,
- 0xff, 0xff, 0x40, 0x0, 0x2e, 0xff, 0xff, 0x30,
- 0x0, 0x1, 0xcc, 0x0, 0x0, 0x0, 0x0, 0x0,
-
- /* U+F04B "" */
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8f,
- 0x91, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff,
- 0x70, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xfd,
- 0x40, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfa,
- 0x10, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xf7,
- 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd5,
- 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb2,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xb2, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xd5, 0x0, 0xff, 0xff, 0xff, 0xff,
- 0xf7, 0x0, 0x0, 0xff, 0xff, 0xff, 0xfa, 0x10,
- 0x0, 0x0, 0xff, 0xff, 0xfd, 0x40, 0x0, 0x0,
- 0x0, 0xff, 0xff, 0x70, 0x0, 0x0, 0x0, 0x0,
- 0x8e, 0xa1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
-
- /* U+F04C "" */
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8f,
- 0xff, 0xf8, 0x0, 0x8f, 0xff, 0xf8, 0xff, 0xff,
- 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0x0, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0x0, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0xff,
- 0xff, 0xff, 0x7f, 0xff, 0xf7, 0x0, 0x7f, 0xff,
- 0xf7,
-
- /* U+F04D "" */
- 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xf8,
-
- /* U+F051 "" */
- 0x0, 0x0, 0x0, 0x0, 0x0, 0xcc, 0x10, 0x0,
- 0x3, 0xff, 0xff, 0xd2, 0x0, 0x4, 0xff, 0xff,
- 0xfe, 0x30, 0x4, 0xff, 0xff, 0xff, 0xf4, 0x4,
- 0xff, 0xff, 0xff, 0xff, 0x54, 0xff, 0xff, 0xff,
- 0xff, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xf9, 0x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, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8,
-
- /* U+F093 "" */
- 0x0, 0x0, 0x0, 0xb, 0xb0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0xbf, 0xfb, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0xb, 0xff, 0xff, 0xb0, 0x0, 0x0,
- 0x0, 0x0, 0xbf, 0xff, 0xff, 0xfb, 0x0, 0x0,
- 0x0, 0xb, 0xff, 0xff, 0xff, 0xff, 0xb0, 0x0,
- 0x0, 0x4f, 0xff, 0xff, 0xff, 0xff, 0xf4, 0x0,
- 0x0, 0x0, 0x0, 0xff, 0xff, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0xff, 0xff, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0xff, 0xff, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0xff, 0xff, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0xff, 0xff, 0x0, 0x0, 0x0,
- 0xdf, 0xff, 0xf0, 0xdf, 0xfd, 0xf, 0xff, 0xfd,
- 0xff, 0xff, 0xf9, 0x0, 0x0, 0x9f, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xe0, 0xff,
- 0xdf, 0xff,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- 0xff, 0x6e, 0xff, 0xf3, 0x0, 0x0, 0x8e, 0xff,
- 0xff, 0xff, 0xf3, 0x0, 0x0, 0x0, 0x2, 0xef,
- 0xff, 0xf3, 0x0, 0x0, 0x0, 0x0, 0x2e, 0xff,
- 0xff, 0x30, 0x0, 0x0, 0x8, 0xef, 0xff, 0xff,
- 0xff, 0x30, 0x0, 0x8, 0xff, 0xff, 0xf6, 0xef,
- 0xff, 0x30, 0x0, 0xef, 0x33, 0xfe, 0x2, 0xef,
- 0xff, 0x30, 0xe, 0xf3, 0x3f, 0xe0, 0x2, 0xef,
- 0xff, 0x30, 0x8f, 0xff, 0xf8, 0x0, 0x2, 0xdf,
- 0xfd, 0x0, 0x8e, 0xe8, 0x0, 0x0, 0x0, 0x66,
- 0x10,
-
- /* U+F0C5 "" */
- 0x0, 0x0, 0xdf, 0xff, 0xff, 0xd, 0x20, 0x0,
- 0x0, 0xff, 0xff, 0xff, 0xf, 0xe2, 0x0, 0x0,
- 0xff, 0xff, 0xff, 0xf, 0xfd, 0xdf, 0xf0, 0xff,
- 0xff, 0xff, 0x20, 0x0, 0xff, 0xf0, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xdf, 0xff,
- 0xff, 0xff, 0xfd, 0xff, 0xf9, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0,
- 0x0, 0xdf, 0xff, 0xff, 0xff, 0xfd, 0x0, 0x0,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0, 0x0, 0xdf, 0x10,
- 0x0, 0x0, 0x0, 0x0, 0xd7, 0x0, 0x0, 0x0,
-
- /* U+F0EA "" */
- 0x0, 0x4, 0xee, 0x40, 0x0, 0x0, 0x0, 0xdf,
- 0xff, 0x99, 0xff, 0xfd, 0x0, 0x0, 0xff, 0xff,
- 0x99, 0xff, 0xff, 0x0, 0x0, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0x0, 0x0, 0xff, 0xff, 0x90, 0x0,
- 0x0, 0x0, 0x0, 0xff, 0xff, 0xd, 0xff, 0xff,
- 0xd, 0x20, 0xff, 0xff, 0xf, 0xff, 0xff, 0xf,
- 0xe2, 0xff, 0xff, 0xf, 0xff, 0xff, 0xf, 0xfd,
- 0xff, 0xff, 0xf, 0xff, 0xff, 0x20, 0x0, 0xff,
- 0xff, 0xf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf,
- 0xff, 0xff, 0xff, 0xff, 0xdf, 0xff, 0xf, 0xff,
- 0xff, 0xff, 0xff, 0x0, 0x0, 0xf, 0xff, 0xff,
- 0xff, 0xff, 0x0, 0x0, 0xf, 0xff, 0xff, 0xff,
- 0xff, 0x0, 0x0, 0xd, 0xff, 0xff, 0xff, 0xfd,
-
- /* U+F0F3 "" */
- 0x0, 0x0, 0x0, 0xcc, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x2, 0xff, 0x30, 0x0, 0x0, 0x0, 0x1,
- 0xbf, 0xff, 0xfc, 0x20, 0x0, 0x0, 0x1e, 0xff,
- 0xff, 0xff, 0xe1, 0x0, 0x0, 0x9f, 0xff, 0xff,
- 0xff, 0xf8, 0x0, 0x0, 0xef, 0xff, 0xff, 0xff,
- 0xfd, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0x0, 0x1, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0,
- 0x3, 0xff, 0xff, 0xff, 0xff, 0xff, 0x30, 0x8,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x1e, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xe1, 0xcf, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xfc, 0xcf, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xfc, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0xe, 0xff, 0xe0, 0x0,
- 0x0, 0x0, 0x0, 0x4, 0xee, 0x40, 0x0, 0x0,
-
- /* U+F11C "" */
- 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0x0, 0xf0, 0xf, 0x0, 0xf0,
- 0xf, 0x0, 0xff, 0xff, 0x0, 0xf0, 0xf, 0x0,
- 0xf0, 0xf, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x8,
- 0x80, 0x88, 0x8, 0x80, 0x8f, 0xff, 0xff, 0xf8,
- 0x8, 0x80, 0x88, 0x8, 0x80, 0x8f, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0x0, 0xf0, 0x0, 0x0, 0x0, 0xf, 0x0,
- 0xff, 0xff, 0x0, 0xf0, 0x0, 0x0, 0x0, 0xf,
- 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xf8,
-
- /* U+F124 "" */
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3,
- 0xaf, 0x70, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4,
- 0xcf, 0xff, 0xf0, 0x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, 0x0,
- 0x4e, 0xe4, 0x0, 0x0, 0x0, 0x0,
-
- /* U+F240 "" */
- 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xf0, 0xff, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0xf, 0xfd, 0xff, 0xf,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf, 0xff,
- 0xff, 0xf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0x0, 0xff, 0xff, 0xf, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0x0, 0xff, 0xff, 0xf, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xf, 0xff, 0xff, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xfd,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xf0, 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0x80,
-
- /* U+F241 "" */
- 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xf0, 0xff, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0xf, 0xfd, 0xff, 0xf,
- 0xff, 0xff, 0xff, 0xff, 0xf0, 0x0, 0xf, 0xff,
- 0xff, 0xf, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x0,
- 0x0, 0xff, 0xff, 0xf, 0xff, 0xff, 0xff, 0xff,
- 0xf0, 0x0, 0x0, 0xff, 0xff, 0xf, 0xff, 0xff,
- 0xff, 0xff, 0xf0, 0x0, 0xf, 0xff, 0xff, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xfd,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xf0, 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0x80,
-
- /* U+F242 "" */
- 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xf0, 0xff, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0xf, 0xfd, 0xff, 0xf,
- 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0xf, 0xff,
- 0xff, 0xf, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0,
- 0x0, 0xff, 0xff, 0xf, 0xff, 0xff, 0xff, 0x0,
- 0x0, 0x0, 0x0, 0xff, 0xff, 0xf, 0xff, 0xff,
- 0xff, 0x0, 0x0, 0x0, 0xf, 0xff, 0xff, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xfd,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xf0, 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0x80,
-
- /* U+F243 "" */
- 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xf0, 0xff, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0xf, 0xfd, 0xff, 0xf,
- 0xff, 0xf0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xff,
- 0xff, 0xf, 0xff, 0xf0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0xff, 0xff, 0xf, 0xff, 0xf0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0xff, 0xff, 0xf, 0xff, 0xf0,
- 0x0, 0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0xfa, 0xef,
- 0xfe, 0xaf, 0xff, 0xff, 0x0, 0x1, 0xdf, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x0, 0x0,
- 0x1b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe4,
-
- /* U+F7C2 "" */
- 0x0, 0x8, 0xff, 0xff, 0xff, 0xe4, 0x0, 0x8f,
- 0xff, 0xff, 0xff, 0xfe, 0x8, 0xf8, 0xf, 0xb,
- 0x40, 0xff, 0x8f, 0xf8, 0xf, 0xb, 0x40, 0xff,
- 0xff, 0xf8, 0xf, 0xb, 0x40, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xef, 0xff, 0xff, 0xff,
- 0xff, 0xfe, 0x4e, 0xff, 0xff, 0xff, 0xff, 0xe4,
-
- /* U+F8A2 "" */
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3,
- 0xe0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x2,
- 0xef, 0x10, 0x0, 0xbf, 0x0, 0x0, 0x0, 0x0,
- 0x7f, 0xf1, 0x0, 0xcf, 0xf1, 0x0, 0x0, 0x0,
- 0x7, 0xff, 0x11, 0xcf, 0xff, 0x77, 0x77, 0x77,
- 0x77, 0xbf, 0xf1, 0xcf, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0x17, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xe0, 0x7, 0xff, 0xf1, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x6, 0xff, 0x10,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5, 0xa0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0
-};
-
-
-/*---------------------
- * GLYPH DESCRIPTION
- *--------------------*/
-
-static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
- {.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
- {.bitmap_index = 0, .adv_w = 63, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 0, .adv_w = 66, .box_w = 2, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 12, .adv_w = 82, .box_w = 4, .box_h = 5, .ofs_x = 1, .ofs_y = 7},
- {.bitmap_index = 22, .adv_w = 159, .box_w = 10, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 82, .adv_w = 144, .box_w = 9, .box_h = 16, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 154, .adv_w = 188, .box_w = 12, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 226, .adv_w = 159, .box_w = 10, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 286, .adv_w = 45, .box_w = 2, .box_h = 4, .ofs_x = 0, .ofs_y = 8},
- {.bitmap_index = 290, .adv_w = 88, .box_w = 5, .box_h = 18, .ofs_x = 1, .ofs_y = -4},
- {.bitmap_index = 335, .adv_w = 89, .box_w = 5, .box_h = 18, .ofs_x = 0, .ofs_y = -4},
- {.bitmap_index = 380, .adv_w = 110, .box_w = 7, .box_h = 7, .ofs_x = 0, .ofs_y = 5},
- {.bitmap_index = 405, .adv_w = 145, .box_w = 9, .box_h = 9, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 446, .adv_w = 50, .box_w = 3, .box_h = 5, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 454, .adv_w = 71, .box_w = 5, .box_h = 3, .ofs_x = 0, .ofs_y = 4},
- {.bitmap_index = 462, .adv_w = 67, .box_w = 2, .box_h = 2, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 464, .adv_w = 106, .box_w = 7, .box_h = 13, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 510, .adv_w = 144, .box_w = 9, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 564, .adv_w = 144, .box_w = 5, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 594, .adv_w = 144, .box_w = 9, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 648, .adv_w = 144, .box_w = 8, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 696, .adv_w = 144, .box_w = 9, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 750, .adv_w = 144, .box_w = 8, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 798, .adv_w = 144, .box_w = 8, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 846, .adv_w = 144, .box_w = 9, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 900, .adv_w = 144, .box_w = 9, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 954, .adv_w = 144, .box_w = 8, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1002, .adv_w = 62, .box_w = 2, .box_h = 9, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1011, .adv_w = 54, .box_w = 3, .box_h = 12, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 1029, .adv_w = 130, .box_w = 7, .box_h = 8, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 1057, .adv_w = 141, .box_w = 7, .box_h = 6, .ofs_x = 1, .ofs_y = 3},
- {.bitmap_index = 1078, .adv_w = 134, .box_w = 7, .box_h = 8, .ofs_x = 1, .ofs_y = 1},
- {.bitmap_index = 1106, .adv_w = 121, .box_w = 7, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1148, .adv_w = 230, .box_w = 14, .box_h = 15, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 1253, .adv_w = 167, .box_w = 11, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1319, .adv_w = 159, .box_w = 9, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1373, .adv_w = 167, .box_w = 10, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1433, .adv_w = 168, .box_w = 9, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1487, .adv_w = 146, .box_w = 8, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1535, .adv_w = 142, .box_w = 8, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1583, .adv_w = 174, .box_w = 10, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1643, .adv_w = 183, .box_w = 10, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1703, .adv_w = 70, .box_w = 2, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1715, .adv_w = 141, .box_w = 8, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1763, .adv_w = 161, .box_w = 10, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1823, .adv_w = 138, .box_w = 8, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1871, .adv_w = 224, .box_w = 12, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1943, .adv_w = 183, .box_w = 10, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2003, .adv_w = 176, .box_w = 11, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2069, .adv_w = 162, .box_w = 9, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2123, .adv_w = 176, .box_w = 11, .box_h = 14, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 2200, .adv_w = 158, .box_w = 9, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2254, .adv_w = 152, .box_w = 9, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2308, .adv_w = 153, .box_w = 10, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2368, .adv_w = 166, .box_w = 9, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2422, .adv_w = 163, .box_w = 10, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2482, .adv_w = 227, .box_w = 14, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2566, .adv_w = 161, .box_w = 10, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2626, .adv_w = 154, .box_w = 10, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2686, .adv_w = 153, .box_w = 9, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2740, .adv_w = 68, .box_w = 4, .box_h = 18, .ofs_x = 1, .ofs_y = -3},
- {.bitmap_index = 2776, .adv_w = 105, .box_w = 7, .box_h = 13, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 2822, .adv_w = 68, .box_w = 4, .box_h = 18, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 2858, .adv_w = 107, .box_w = 7, .box_h = 6, .ofs_x = 0, .ofs_y = 6},
- {.bitmap_index = 2879, .adv_w = 116, .box_w = 8, .box_h = 3, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 2891, .adv_w = 79, .box_w = 4, .box_h = 3, .ofs_x = 0, .ofs_y = 10},
- {.bitmap_index = 2897, .adv_w = 139, .box_w = 8, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2933, .adv_w = 144, .box_w = 8, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2981, .adv_w = 134, .box_w = 8, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 3017, .adv_w = 144, .box_w = 8, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 3065, .adv_w = 136, .box_w = 8, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 3101, .adv_w = 89, .box_w = 6, .box_h = 14, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 3143, .adv_w = 144, .box_w = 8, .box_h = 12, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 3191, .adv_w = 141, .box_w = 7, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 3233, .adv_w = 62, .box_w = 2, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 3245, .adv_w = 61, .box_w = 4, .box_h = 15, .ofs_x = -1, .ofs_y = -3},
- {.bitmap_index = 3275, .adv_w = 130, .box_w = 8, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 3323, .adv_w = 62, .box_w = 2, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 3335, .adv_w = 224, .box_w = 12, .box_h = 9, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 3389, .adv_w = 141, .box_w = 7, .box_h = 9, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 3421, .adv_w = 146, .box_w = 9, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 3462, .adv_w = 144, .box_w = 8, .box_h = 12, .ofs_x = 1, .ofs_y = -3},
- {.bitmap_index = 3510, .adv_w = 146, .box_w = 8, .box_h = 12, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 3558, .adv_w = 87, .box_w = 5, .box_h = 9, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 3581, .adv_w = 132, .box_w = 8, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 3617, .adv_w = 84, .box_w = 5, .box_h = 11, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 3645, .adv_w = 141, .box_w = 7, .box_h = 9, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 3677, .adv_w = 124, .box_w = 8, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 3713, .adv_w = 192, .box_w = 12, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 3767, .adv_w = 127, .box_w = 8, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 3803, .adv_w = 121, .box_w = 8, .box_h = 12, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 3851, .adv_w = 127, .box_w = 8, .box_h = 9, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 3887, .adv_w = 87, .box_w = 6, .box_h = 17, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 3938, .adv_w = 62, .box_w = 2, .box_h = 14, .ofs_x = 1, .ofs_y = -2},
- {.bitmap_index = 3952, .adv_w = 87, .box_w = 5, .box_h = 17, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 3995, .adv_w = 174, .box_w = 9, .box_h = 5, .ofs_x = 1, .ofs_y = 3},
- {.bitmap_index = 4018, .adv_w = 256, .box_w = 16, .box_h = 17, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 4154, .adv_w = 256, .box_w = 16, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 4250, .adv_w = 256, .box_w = 16, .box_h = 14, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 4362, .adv_w = 256, .box_w = 16, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 4458, .adv_w = 176, .box_w = 11, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 4524, .adv_w = 256, .box_w = 16, .box_h = 16, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 4652, .adv_w = 256, .box_w = 16, .box_h = 16, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 4780, .adv_w = 288, .box_w = 18, .box_h = 14, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 4906, .adv_w = 256, .box_w = 16, .box_h = 16, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 5034, .adv_w = 288, .box_w = 18, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 5142, .adv_w = 256, .box_w = 16, .box_h = 16, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 5270, .adv_w = 128, .box_w = 8, .box_h = 14, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 5326, .adv_w = 192, .box_w = 12, .box_h = 14, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 5410, .adv_w = 288, .box_w = 18, .box_h = 16, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 5554, .adv_w = 256, .box_w = 16, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 5650, .adv_w = 224, .box_w = 10, .box_h = 16, .ofs_x = 2, .ofs_y = -2},
- {.bitmap_index = 5730, .adv_w = 224, .box_w = 14, .box_h = 18, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 5856, .adv_w = 224, .box_w = 14, .box_h = 15, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 5961, .adv_w = 224, .box_w = 14, .box_h = 14, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 6059, .adv_w = 224, .box_w = 10, .box_h = 16, .ofs_x = 2, .ofs_y = -2},
- {.bitmap_index = 6139, .adv_w = 224, .box_w = 16, .box_h = 14, .ofs_x = -1, .ofs_y = -1},
- {.bitmap_index = 6251, .adv_w = 160, .box_w = 10, .box_h = 14, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 6321, .adv_w = 160, .box_w = 10, .box_h = 14, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 6391, .adv_w = 224, .box_w = 14, .box_h = 14, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 6489, .adv_w = 224, .box_w = 14, .box_h = 4, .ofs_x = 0, .ofs_y = 4},
- {.bitmap_index = 6517, .adv_w = 288, .box_w = 18, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 6625, .adv_w = 320, .box_w = 20, .box_h = 16, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 6785, .adv_w = 288, .box_w = 20, .box_h = 16, .ofs_x = -1, .ofs_y = -2},
- {.bitmap_index = 6945, .adv_w = 256, .box_w = 16, .box_h = 16, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 7073, .adv_w = 224, .box_w = 14, .box_h = 10, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 7143, .adv_w = 224, .box_w = 14, .box_h = 10, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 7213, .adv_w = 320, .box_w = 20, .box_h = 14, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 7353, .adv_w = 256, .box_w = 16, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 7449, .adv_w = 256, .box_w = 16, .box_h = 16, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 7577, .adv_w = 256, .box_w = 17, .box_h = 17, .ofs_x = -1, .ofs_y = -2},
- {.bitmap_index = 7722, .adv_w = 224, .box_w = 15, .box_h = 14, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 7827, .adv_w = 224, .box_w = 14, .box_h = 16, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 7939, .adv_w = 224, .box_w = 14, .box_h = 14, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 8037, .adv_w = 160, .box_w = 12, .box_h = 16, .ofs_x = -1, .ofs_y = -2},
- {.bitmap_index = 8133, .adv_w = 224, .box_w = 14, .box_h = 16, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 8245, .adv_w = 224, .box_w = 14, .box_h = 16, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 8357, .adv_w = 288, .box_w = 18, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 8465, .adv_w = 256, .box_w = 18, .box_h = 18, .ofs_x = -1, .ofs_y = -3},
- {.bitmap_index = 8627, .adv_w = 192, .box_w = 12, .box_h = 16, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 8723, .adv_w = 320, .box_w = 20, .box_h = 15, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 8873, .adv_w = 320, .box_w = 20, .box_h = 10, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 8973, .adv_w = 320, .box_w = 20, .box_h = 10, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 9073, .adv_w = 320, .box_w = 20, .box_h = 10, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 9173, .adv_w = 320, .box_w = 20, .box_h = 10, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 9273, .adv_w = 320, .box_w = 20, .box_h = 10, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 9373, .adv_w = 320, .box_w = 21, .box_h = 14, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 9520, .adv_w = 224, .box_w = 12, .box_h = 16, .ofs_x = 1, .ofs_y = -2},
- {.bitmap_index = 9616, .adv_w = 224, .box_w = 14, .box_h = 16, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 9728, .adv_w = 256, .box_w = 17, .box_h = 17, .ofs_x = -1, .ofs_y = -3},
- {.bitmap_index = 9873, .adv_w = 320, .box_w = 20, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 9993, .adv_w = 192, .box_w = 12, .box_h = 16, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 10089, .adv_w = 258, .box_w = 17, .box_h = 11, .ofs_x = 0, .ofs_y = 1}
-};
-
-/*---------------------
- * CHARACTER MAPPING
- *--------------------*/
-
-static const uint16_t unicode_list_1[] = {
- 0x0, 0x7, 0xa, 0xb, 0xc, 0x10, 0x12, 0x14,
- 0x18, 0x1b, 0x20, 0x25, 0x26, 0x27, 0x3d, 0x47,
- 0x4a, 0x4b, 0x4c, 0x50, 0x51, 0x52, 0x53, 0x66,
- 0x67, 0x6d, 0x6f, 0x70, 0x73, 0x76, 0x77, 0x78,
- 0x7a, 0x92, 0x94, 0xc3, 0xc4, 0xc6, 0xe6, 0xe9,
- 0xf2, 0x11b, 0x123, 0x15a, 0x1ea, 0x23f, 0x240, 0x241,
- 0x242, 0x243, 0x286, 0x292, 0x2ec, 0x303, 0x559, 0x7c1,
- 0x8a1
-};
-
-/*Collect the unicode lists and glyph_id offsets*/
-static const lv_font_fmt_txt_cmap_t cmaps[] =
-{
- {
- .range_start = 32, .range_length = 95, .glyph_id_start = 1,
- .unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY
- },
- {
- .range_start = 61441, .range_length = 2210, .glyph_id_start = 96,
- .unicode_list = unicode_list_1, .glyph_id_ofs_list = NULL, .list_length = 57, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
- }
-};
-
-/*-----------------
- * KERNING
- *----------------*/
-
-
-/*Map glyph_ids to kern left classes*/
-static const uint8_t kern_left_class_mapping[] =
-{
- 0, 1, 0, 2, 0, 0, 0, 0,
- 2, 3, 0, 0, 0, 4, 0, 4,
- 5, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 6, 7, 8, 9, 10, 11,
- 0, 12, 12, 13, 14, 15, 12, 12,
- 9, 16, 17, 18, 0, 19, 13, 20,
- 21, 22, 23, 24, 25, 0, 0, 0,
- 0, 0, 26, 27, 28, 0, 29, 30,
- 0, 31, 0, 0, 32, 0, 31, 31,
- 33, 27, 0, 34, 0, 35, 0, 36,
- 37, 38, 36, 39, 40, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0
-};
-
-/*Map glyph_ids to kern right classes*/
-static const uint8_t kern_right_class_mapping[] =
-{
- 0, 1, 0, 2, 0, 0, 0, 3,
- 2, 0, 4, 5, 0, 6, 7, 6,
- 8, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 9, 0, 10, 0, 11, 0, 0, 0,
- 11, 0, 0, 12, 0, 0, 0, 0,
- 11, 0, 11, 0, 13, 14, 15, 16,
- 17, 18, 19, 20, 0, 0, 21, 0,
- 0, 0, 22, 0, 23, 23, 23, 24,
- 23, 0, 0, 0, 0, 0, 25, 25,
- 26, 25, 23, 27, 28, 29, 30, 31,
- 32, 33, 31, 34, 0, 0, 35, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0
-};
-
-/*Kern values between classes*/
-static const int8_t kern_class_values[] =
-{
- 0, 0, 0, 0, 0, 0, 0, 0,
-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, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, -2, 0, 0,
- -2, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- -2, 0, 0, -2, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- -2, 0, 0, -2, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0
-};
-
-
-/*Collect the kern class' data in one place*/
-static const lv_font_fmt_txt_kern_classes_t kern_classes =
-{
- .class_pair_values = kern_class_values,
- .left_class_mapping = kern_left_class_mapping,
- .right_class_mapping = kern_right_class_mapping,
- .left_class_cnt = 40,
- .right_class_cnt = 35,
-};
-
-/*--------------------
- * ALL CUSTOM DATA
- *--------------------*/
-
-/*Store all the custom data of the font*/
-static lv_font_fmt_txt_dsc_t font_dsc = {
- .glyph_bitmap = gylph_bitmap,
- .glyph_dsc = glyph_dsc,
- .cmaps = cmaps,
- .kern_dsc = &kern_classes,
- .kern_scale = 16,
- .cmap_num = 2,
- .bpp = 4,
- .kern_classes = 1,
- .bitmap_format = 0
-};
-
-
-/*-----------------
- * PUBLIC FONT
- *----------------*/
-
-/*Initialize a public general font descriptor*/
-lv_font_t lv_font_roboto_16 = {
- .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/
- .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/
- .line_height = 19, /*The maximum line height required by the font*/
- .base_line = 4, /*Baseline measured from the bottom of the line*/
- .subpx = LV_FONT_SUBPX_NONE,
- .dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
-};
-
-#endif /*#if LV_FONT_ROBOTO_16*/
-
diff --git a/src/libs/lvgl/src/lv_font/lv_font_roboto_22.c b/src/libs/lvgl/src/lv_font/lv_font_roboto_22.c
deleted file mode 100644
index f7bdac05..00000000
--- a/src/libs/lvgl/src/lv_font/lv_font_roboto_22.c
+++ /dev/null
@@ -1,3224 +0,0 @@
-#include "../../lvgl.h"
-
-/*******************************************************************************
- * Size: 22 px
- * Bpp: 4
- * Opts: --no-compress --no-prefilter --bpp 4 --size 22 --font Roboto-Regular.woff -r 0x20-0x7F --font FontAwesome5-Solid+Brands+Regular.woff -r 61441,61448,61451,61452,61452,61453,61457,61459,61461,61465,61468,61473,61478,61479,61480,61502,61512,61515,61516,61517,61521,61522,61523,61524,61543,61544,61550,61552,61553,61556,61559,61560,61561,61563,61587,61589,61636,61637,61639,61671,61674,61683,61724,61732,61787,61931,62016,62017,62018,62019,62020,62087,62099,62212,62189,62810,63426,63650 --format lvgl -o lv_font_roboto_22.c --force-fast-kern-format
- ******************************************************************************/
-
-#ifndef LV_FONT_ROBOTO_22
-#define LV_FONT_ROBOTO_22 1
-#endif
-
-#if LV_FONT_ROBOTO_22
-
-/*-----------------
- * BITMAPS
- *----------------*/
-
-/*Store the image of the glyphs*/
-static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = {
- /* U+20 " " */
-
- /* U+21 "!" */
- 0x3f, 0xd0, 0x2f, 0xd0, 0x2f, 0xd0, 0x2f, 0xd0,
- 0x2f, 0xd0, 0x2f, 0xc0, 0x2f, 0xc0, 0x1f, 0xc0,
- 0x1f, 0xc0, 0x1f, 0xc0, 0x1f, 0xb0, 0x6, 0x40,
- 0x0, 0x0, 0x3, 0x20, 0x2f, 0xf0, 0x1e, 0xc0,
-
- /* U+22 "\"" */
- 0x8f, 0xa, 0xe8, 0xf0, 0xad, 0x8e, 0xa, 0xc8,
-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, 0x0, 0x0,
- 0x0, 0x3, 0xff, 0xff, 0xff, 0xfa, 0x66, 0xff,
- 0x74, 0x44, 0x44, 0x44, 0x47, 0xff, 0x66, 0xaf,
- 0xf6, 0x0, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xfe, 0x0, 0x6f, 0xf6, 0x0, 0xef, 0xdc, 0xcc,
- 0xcc, 0xcc, 0xcd, 0xfe, 0x0, 0x6f, 0xff, 0xee,
- 0xff, 0x30, 0x0, 0x0, 0x0, 0x3, 0xff, 0xee,
- 0xff, 0xfc, 0x88, 0xff, 0x30, 0x0, 0x0, 0x0,
- 0x3, 0xff, 0x88, 0xcf, 0xf6, 0x0, 0xef, 0x30,
- 0x0, 0x0, 0x0, 0x3, 0xfe, 0x0, 0x6f, 0xf6,
- 0x0, 0xef, 0x30, 0x0, 0x0, 0x0, 0x3, 0xfe,
- 0x0, 0x6f, 0xfe, 0xcc, 0xff, 0x41, 0x11, 0x11,
- 0x11, 0x14, 0xff, 0xcc, 0xef, 0xfd, 0xaa, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xaa, 0xdf,
- 0xc6, 0x0, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xfe, 0x0, 0x6c,
-
- /* U+F00B "" */
- 0xbf, 0xff, 0xfe, 0x31, 0xdf, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0x63, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0x63, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0x63, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x63,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x58,
- 0x88, 0x87, 0x0, 0x78, 0x88, 0x88, 0x88, 0x88,
- 0x88, 0x85, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0xcf, 0xff, 0xff,
- 0x31, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc,
- 0xff, 0xff, 0xff, 0x63, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x63, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0x63, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0x53, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0x47, 0x88, 0x87, 0x0,
- 0x68, 0x88, 0x88, 0x88, 0x88, 0x88, 0x74, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0xcf, 0xff, 0xff, 0x31, 0xef, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff,
- 0x63, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0x63, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x63, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0x52, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0x37, 0x77, 0x76, 0x0, 0x57, 0x77, 0x77,
- 0x77, 0x77, 0x77, 0x74,
-
- /* U+F00C "" */
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x16, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x2, 0xef, 0xb0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2e, 0xff,
- 0xfb, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 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, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0xcf, 0xff, 0xfc, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x3, 0xee, 0xee, 0xff,
- 0xff, 0xff, 0xee, 0xee, 0x20, 0x0, 0x0, 0x2,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x20,
- 0x0, 0x0, 0x0, 0x3f, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xf3, 0x0, 0x0, 0x0, 0x0, 0x3, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0x30, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x3f, 0xff, 0xff, 0xff, 0xf3, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0xff, 0xff,
- 0xff, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x4f, 0xff, 0xf4, 0x0, 0x0, 0x0, 0x0,
- 0xcf, 0xff, 0xff, 0xfc, 0x4, 0xff, 0x40, 0xcf,
- 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xc0,
- 0x23, 0xc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xfc, 0x44, 0xcf, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xf1, 0x6e, 0xb, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, 0xaf,
- 0x5d, 0xff, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xfb,
-
- /* U+F01C "" */
- 0x0, 0x0, 0x4, 0xab, 0xbb, 0xbb, 0xbb, 0xbb,
- 0xbb, 0xa2, 0x0, 0x0, 0x0, 0x0, 0x4, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe1, 0x0,
- 0x0, 0x0, 0x0, 0xef, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xb0, 0x0, 0x0, 0x0, 0x9f,
- 0xfa, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1d, 0xff,
- 0x50, 0x0, 0x0, 0x4f, 0xfe, 0x10, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x4f, 0xfe, 0x10, 0x0, 0xd,
- 0xff, 0x60, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0xaf, 0xfa, 0x0, 0x9, 0xff, 0xb0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x1, 0xef, 0xf5, 0x3,
- 0xff, 0xf2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x5, 0xff, 0xe1, 0xdf, 0xfa, 0x44, 0x44,
- 0x20, 0x0, 0x0, 0x0, 0x34, 0x44, 0x4d, 0xff,
- 0x8f, 0xff, 0xff, 0xff, 0xfe, 0x0, 0x0, 0x0,
- 0x3f, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff,
- 0xff, 0xf7, 0x0, 0x0, 0xb, 0xff, 0xff, 0xff,
- 0xff, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xe8, 0x88,
- 0x88, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xbd, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9,
- 0x4e, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,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0x10, 0x0, 0x0, 0x0,
- 0x5f, 0xff, 0x70, 0xff, 0xff, 0xff, 0x70, 0x0,
- 0x0, 0x0, 0x7, 0xff, 0xfd, 0x0, 0xff, 0xff,
- 0xff, 0xfd, 0x61, 0x0, 0x5, 0xcf, 0xff, 0xf2,
- 0x0, 0xff, 0xe3, 0xef, 0xff, 0xff, 0xee, 0xff,
- 0xff, 0xfe, 0x30, 0x0, 0xff, 0xf0, 0x19, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xb1, 0x0, 0x0, 0xff,
- 0xf0, 0x0, 0x28, 0xdf, 0xff, 0xfe, 0xa3, 0x0,
- 0x0, 0x0, 0xab, 0xa0, 0x0, 0x0, 0x1, 0x33,
- 0x10, 0x0, 0x0, 0x0, 0x0,
-
- /* U+F026 "" */
- 0x0, 0x0, 0x0, 0x0, 0x3, 0x30, 0x0, 0x0,
- 0x0, 0x6, 0xff, 0x0, 0x0, 0x0, 0x6, 0xff,
- 0xf0, 0x0, 0x0, 0x6, 0xff, 0xff, 0x24, 0x44,
- 0x47, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xf0,
- 0x0, 0x0, 0x2e, 0xff, 0xff, 0x0, 0x0, 0x0,
- 0x2e, 0xff, 0xf0, 0x0, 0x0, 0x0, 0x2e, 0xff,
- 0x0, 0x0, 0x0, 0x0, 0x2e, 0xc0, 0x0, 0x0,
- 0x0, 0x0, 0x0,
-
- /* U+F027 "" */
- 0x0, 0x0, 0x0, 0x0, 0x3, 0x30, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x6,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0, 0x0, 0x0, 0x5f, 0xff, 0x92, 0xff,
- 0xe0, 0x0, 0x0, 0x0, 0x4f, 0xf5, 0x4, 0x43,
- 0x0, 0x0, 0x0, 0x0, 0x13, 0x0,
-
- /* U+F04B "" */
- 0x2, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x8f, 0xfb, 0x20, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xf8, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff,
- 0xff, 0xe5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0xff, 0xff, 0xff, 0xff, 0xc2, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x91,
- 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xfe, 0x60, 0x0, 0x0, 0x0, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xfc, 0x30, 0x0, 0x0,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9,
- 0x10, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xf7, 0x0, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf3,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xfe, 0x40, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0x80, 0x0, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xb2, 0x0, 0x0,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd4, 0x0,
- 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7,
- 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff,
- 0xfa, 0x10, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff,
- 0xff, 0xfd, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0xff, 0xff, 0xff, 0x70, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0xcf, 0xff, 0x91, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x2a, 0xa3, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
-
- /* U+F04C "" */
- 0x3d, 0xff, 0xff, 0xe6, 0x0, 0x3, 0xdf, 0xff,
- 0xfe, 0x60, 0xdf, 0xff, 0xff, 0xff, 0x10, 0xd,
- 0xff, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xff, 0xff,
- 0x30, 0xf, 0xff, 0xff, 0xff, 0xf3, 0xff, 0xff,
- 0xff, 0xff, 0x40, 0xf, 0xff, 0xff, 0xff, 0xf4,
- 0xff, 0xff, 0xff, 0xff, 0x40, 0xf, 0xff, 0xff,
- 0xff, 0xf4, 0xff, 0xff, 0xff, 0xff, 0x40, 0xf,
- 0xff, 0xff, 0xff, 0xf4, 0xff, 0xff, 0xff, 0xff,
- 0x40, 0xf, 0xff, 0xff, 0xff, 0xf4, 0xff, 0xff,
- 0xff, 0xff, 0x40, 0xf, 0xff, 0xff, 0xff, 0xf4,
- 0xff, 0xff, 0xff, 0xff, 0x40, 0xf, 0xff, 0xff,
- 0xff, 0xf4, 0xff, 0xff, 0xff, 0xff, 0x40, 0xf,
- 0xff, 0xff, 0xff, 0xf4, 0xff, 0xff, 0xff, 0xff,
- 0x40, 0xf, 0xff, 0xff, 0xff, 0xf4, 0xff, 0xff,
- 0xff, 0xff, 0x40, 0xf, 0xff, 0xff, 0xff, 0xf4,
- 0xff, 0xff, 0xff, 0xff, 0x40, 0xf, 0xff, 0xff,
- 0xff, 0xf4, 0xff, 0xff, 0xff, 0xff, 0x40, 0xf,
- 0xff, 0xff, 0xff, 0xf4, 0xff, 0xff, 0xff, 0xff,
- 0x40, 0xf, 0xff, 0xff, 0xff, 0xf4, 0xff, 0xff,
- 0xff, 0xff, 0x40, 0xf, 0xff, 0xff, 0xff, 0xf4,
- 0xff, 0xff, 0xff, 0xff, 0x40, 0xf, 0xff, 0xff,
- 0xff, 0xf4, 0xff, 0xff, 0xff, 0xff, 0x30, 0xf,
- 0xff, 0xff, 0xff, 0xf3, 0x8f, 0xff, 0xff, 0xfb,
- 0x0, 0x8, 0xff, 0xff, 0xff, 0xb0, 0x2, 0x44,
- 0x44, 0x30, 0x0, 0x0, 0x24, 0x44, 0x43, 0x0,
-
- /* U+F04D "" */
- 0x3d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xfe, 0x60, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xf1, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xf3, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xf4, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xf4, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xf4, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xf3, 0x8f, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xb0, 0x2, 0x44,
- 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x43, 0x0,
-
- /* U+F051 "" */
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2,
- 0xdc, 0x10, 0x0, 0x0, 0x0, 0xbf, 0xf3, 0x7f,
- 0xfd, 0x20, 0x0, 0x0, 0xd, 0xff, 0x47, 0xff,
- 0xfe, 0x30, 0x0, 0x0, 0xdf, 0xf4, 0x7f, 0xff,
- 0xff, 0x40, 0x0, 0xd, 0xff, 0x47, 0xff, 0xff,
- 0xff, 0x50, 0x0, 0xdf, 0xf4, 0x7f, 0xff, 0xff,
- 0xff, 0x60, 0xd, 0xff, 0x47, 0xff, 0xff, 0xff,
- 0xff, 0x70, 0xdf, 0xf4, 0x7f, 0xff, 0xff, 0xff,
- 0xff, 0x8d, 0xff, 0x47, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xf4, 0x7f, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0x47, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xf4, 0x7f, 0x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 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd,
- 0x4e, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xe4,
-
- /* U+F093 "" */
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3,
- 0xfc, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x3f, 0xff, 0xc1, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x3, 0xff, 0xff, 0xfc,
- 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f,
- 0xff, 0xff, 0xff, 0xc1, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x3, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x10,
- 0x0, 0x0, 0x0, 0x0, 0x3f, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xc1, 0x0, 0x0, 0x0, 0x3, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x0, 0x0,
- 0x0, 0x6, 0xff, 0xff, 0xff, 0xff, 0xff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0, 0xef, 0xe1, 0xc, 0xff,
- 0x20, 0x2e, 0xff, 0xff, 0xc1, 0x0, 0xff, 0xd0,
- 0xa, 0xff, 0x30, 0x2, 0xef, 0xff, 0xfc, 0x10,
- 0xbf, 0xfc, 0xbf, 0xff, 0x0, 0x0, 0x1d, 0xff,
- 0xff, 0xc0, 0x3f, 0xff, 0xff, 0xf7, 0x0, 0x0,
- 0x1, 0xcf, 0xff, 0xd1, 0x3, 0xdf, 0xfe, 0x60,
- 0x0, 0x0, 0x0, 0x4, 0x75, 0x0, 0x0, 0x1,
- 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
-
- /* U+F0C5 "" */
- 0x0, 0x0, 0x0, 0x12, 0x22, 0x22, 0x22, 0x1,
- 0x0, 0x0, 0x0, 0x0, 0x3, 0xff, 0xff, 0xff,
- 0xfe, 0xe, 0x70, 0x0, 0x0, 0x0, 0x5, 0xff,
- 0xff, 0xff, 0xfe, 0xe, 0xf7, 0x0, 0x0, 0x0,
- 0x5, 0xff, 0xff, 0xff, 0xfe, 0xe, 0xff, 0x70,
- 0x1, 0x22, 0x5, 0xff, 0xff, 0xff, 0xfe, 0xe,
- 0xff, 0xf2, 0xdf, 0xff, 0x25, 0xff, 0xff, 0xff,
- 0xff, 0x10, 0x0, 0x0, 0xff, 0xff, 0x25, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xf3, 0xff, 0xff,
- 0x25, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf3,
- 0xff, 0xff, 0x25, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xf3, 0xff, 0xff, 0x25, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xf3, 0xff, 0xff, 0x25, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xf3, 0xff, 0xff,
- 0x25, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf3,
- 0xff, 0xff, 0x25, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xf3, 0xff, 0xff, 0x25, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xf3, 0xff, 0xff, 0x25, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xf3, 0xff, 0xff,
- 0x25, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf3,
- 0xff, 0xff, 0x25, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xf3, 0xff, 0xff, 0x24, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xf2, 0xff, 0xff, 0x50, 0x56,
- 0x66, 0x66, 0x66, 0x66, 0x66, 0x50, 0xff, 0xff,
- 0xe4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x0,
- 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xfe, 0x0, 0x0, 0x0, 0x8b, 0xcc, 0xcc, 0xcc,
- 0xcc, 0xcc, 0xb7, 0x0, 0x0, 0x0,
-
- /* U+F0C7 "" */
- 0x2a, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x91,
- 0x0, 0x0, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xfd, 0x10, 0x0, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xd1, 0x0, 0xff, 0xc0,
- 0x0, 0x0, 0x0, 0x0, 0x3, 0xff, 0xfd, 0x10,
- 0xff, 0xc0, 0x0, 0x0, 0x0, 0x0, 0x1, 0xff,
- 0xff, 0xd0, 0xff, 0xc0, 0x0, 0x0, 0x0, 0x0,
- 0x1, 0xff, 0xff, 0xf5, 0xff, 0xc0, 0x0, 0x0,
- 0x0, 0x0, 0x1, 0xff, 0xff, 0xf6, 0xff, 0xc0,
- 0x0, 0x0, 0x0, 0x0, 0x1, 0xff, 0xff, 0xf6,
- 0xff, 0xfb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbc, 0xff,
- 0xff, 0xf6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xf6, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, 0xff, 0xff,
- 0xff, 0xfe, 0x51, 0x3b, 0xff, 0xff, 0xff, 0xf6,
- 0xff, 0xff, 0xff, 0xf3, 0x0, 0x0, 0xcf, 0xff,
- 0xff, 0xf6, 0xff, 0xff, 0xff, 0xe0, 0x0, 0x0,
- 0x8f, 0xff, 0xff, 0xf6, 0xff, 0xff, 0xff, 0xf0,
- 0x0, 0x0, 0x9f, 0xff, 0xff, 0xf6, 0xff, 0xff,
- 0xff, 0xf9, 0x0, 0x4, 0xff, 0xff, 0xff, 0xf6,
- 0xff, 0xff, 0xff, 0xff, 0xda, 0xbf, 0xff, 0xff,
- 0xff, 0xf6, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xf5, 0x6f, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xb0, 0x0, 0x22,
- 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x21, 0x0,
-
- /* U+F0E7 "" */
- 0x0, 0x3, 0x44, 0x44, 0x43, 0x0, 0x0, 0x0,
- 0x8, 0xff, 0xff, 0xff, 0xf8, 0x0, 0x0, 0x0,
- 0xbf, 0xff, 0xff, 0xff, 0x60, 0x0, 0x0, 0xd,
- 0xff, 0xff, 0xff, 0xf1, 0x0, 0x0, 0x0, 0xff,
- 0xff, 0xff, 0xfc, 0x0, 0x0, 0x0, 0x2f, 0xff,
- 0xff, 0xff, 0x70, 0x0, 0x0, 0x4, 0xff, 0xff,
- 0xff, 0xf2, 0x0, 0x0, 0x0, 0x6f, 0xff, 0xff,
- 0xfe, 0x66, 0x66, 0x51, 0x8, 0xff, 0xff, 0xff,
- 0xff, 0xff, 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 0x0, 0x0, 0xf, 0xff, 0xff, 0xff, 0xff,
- 0xe3, 0x22, 0x22, 0x21, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0x8f, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x8f, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x8f,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xf7, 0xbf, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xfe, 0x40,
-
- /* U+F1EB "" */
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x26, 0x9c, 0xde, 0xdc, 0xb8, 0x50,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x8d,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb5, 0x0,
- 0x0, 0x0, 0x0, 0x1, 0xaf, 0xff, 0xff, 0xff,
- 0x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0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0xb9, 0x75,
- 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0,
-
- /* U+F55A "" */
- 0x0, 0x0, 0x0, 0x2, 0x68, 0x88, 0x88, 0x88,
- 0x88, 0x88, 0x88, 0x88, 0x75, 0x0, 0x0, 0x0,
- 0x0, 0x5f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xc0, 0x0, 0x0, 0x5, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xf5, 0x0, 0x0, 0x5f, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7,
- 0x0, 0x5, 0xff, 0xff, 0xff, 0xff, 0x80, 0xcf,
- 0xff, 0xc0, 0x8f, 0xff, 0xff, 0xf8, 0x0, 0x5f,
- 0xff, 0xff, 0xff, 0xfc, 0x0, 0xc, 0xfc, 0x0,
- 0xc, 0xff, 0xff, 0xf8, 0x5, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0x50, 0x0, 0x90, 0x0, 0x5f, 0xff,
- 0xff, 0xf8, 0x5f, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xf5, 0x0, 0x0, 0x5, 0xff, 0xff, 0xff, 0xf8,
- 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x40,
- 0x0, 0x4f, 0xff, 0xff, 0xff, 0xf8, 0xbf, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xfc, 0x0, 0x0, 0xc,
- 0xff, 0xff, 0xff, 0xf8, 0xc, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xc0, 0x0, 0x10, 0x0, 0xcf, 0xff,
- 0xff, 0xf8, 0x0, 0xcf, 0xff, 0xff, 0xff, 0xfd,
- 0x0, 0x5, 0xf5, 0x0, 0xd, 0xff, 0xff, 0xf8,
- 0x0, 0xc, 0xff, 0xff, 0xff, 0xfe, 0x20, 0x5f,
- 0xff, 0x50, 0x2e, 0xff, 0xff, 0xf8, 0x0, 0x0,
- 0xcf, 0xff, 0xff, 0xff, 0xe8, 0xff, 0xff, 0xf8,
- 0xef, 0xff, 0xff, 0xf8, 0x0, 0x0, 0xc, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xf7, 0x0, 0x0, 0x0, 0xcf, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf2,
- 0x0, 0x0, 0x0, 0x9, 0xef, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xfd, 0x50,
-
- /* U+F7C2 "" */
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x2, 0xef, 0xff, 0xff, 0xff, 0xfe,
- 0x70, 0x0, 0x2, 0xef, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0x50, 0x2, 0xef, 0xbb, 0xfc, 0xbf, 0xdb,
- 0xbf, 0xf9, 0x2, 0xef, 0xd0, 0x2f, 0x40, 0xe7,
- 0x1, 0xff, 0xa2, 0xef, 0xfd, 0x2, 0xf4, 0xe,
- 0x70, 0x1f, 0xfa, 0xef, 0xff, 0xd0, 0x2f, 0x40,
- 0xe7, 0x1, 0xff, 0xaf, 0xff, 0xfd, 0x24, 0xf6,
- 0x2e, 0x82, 0x3f, 0xfa, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xaf, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xfa, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xaf, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xfa, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xaf, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfa, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xaf,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfa,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xfa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xfa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0x99, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xf4, 0x9, 0xef, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xd5, 0x0,
-
- /* U+F8A2 "" */
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x2c, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x2e, 0xf1, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x1e, 0xff, 0x10, 0x0, 0x3, 0xed, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x5, 0xff, 0xf1, 0x0, 0x4,
- 0xff, 0xf0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f,
- 0xff, 0x10, 0x5, 0xff, 0xff, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x5, 0xff, 0xf1, 0x6, 0xff, 0xff,
- 0xf6, 0x66, 0x66, 0x66, 0x66, 0x66, 0x9f, 0xff,
- 0x17, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xf1, 0xdf, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x13,
- 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xd0, 0x2, 0xef, 0xff, 0xf1, 0x11,
- 0x11, 0x11, 0x11, 0x11, 0x11, 0x10, 0x0, 0x2,
- 0xdf, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x1, 0xdf, 0xf0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1,
- 0xb8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0
-};
-
-
-/*---------------------
- * GLYPH DESCRIPTION
- *--------------------*/
-
-static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
- {.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
- {.bitmap_index = 0, .adv_w = 87, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 0, .adv_w = 91, .box_w = 4, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 32, .adv_w = 113, .box_w = 5, .box_h = 6, .ofs_x = 1, .ofs_y = 10},
- {.bitmap_index = 47, .adv_w = 219, .box_w = 13, .box_h = 16, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 151, .adv_w = 198, .box_w = 11, .box_h = 21, .ofs_x = 1, .ofs_y = -2},
- {.bitmap_index = 267, .adv_w = 258, .box_w = 15, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 387, .adv_w = 219, .box_w = 13, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 491, .adv_w = 61, .box_w = 2, .box_h = 6, .ofs_x = 1, .ofs_y = 10},
- {.bitmap_index = 497, .adv_w = 120, .box_w = 7, .box_h = 24, .ofs_x = 1, .ofs_y = -6},
- {.bitmap_index = 581, .adv_w = 122, .box_w = 7, .box_h = 24, .ofs_x = 0, .ofs_y = -6},
- {.bitmap_index = 665, .adv_w = 152, .box_w = 10, .box_h = 10, .ofs_x = 0, .ofs_y = 6},
- {.bitmap_index = 715, .adv_w = 200, .box_w = 12, .box_h = 12, .ofs_x = 0, .ofs_y = 2},
- {.bitmap_index = 787, .adv_w = 69, .box_w = 4, .box_h = 6, .ofs_x = 0, .ofs_y = -4},
- {.bitmap_index = 799, .adv_w = 97, .box_w = 6, .box_h = 2, .ofs_x = 0, .ofs_y = 6},
- {.bitmap_index = 805, .adv_w = 93, .box_w = 4, .box_h = 3, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 811, .adv_w = 145, .box_w = 9, .box_h = 17, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 888, .adv_w = 198, .box_w = 11, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 976, .adv_w = 198, .box_w = 7, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1032, .adv_w = 198, .box_w = 11, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1120, .adv_w = 198, .box_w = 10, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1200, .adv_w = 198, .box_w = 12, .box_h = 16, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1296, .adv_w = 198, .box_w = 11, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1384, .adv_w = 197, .box_w = 11, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1472, .adv_w = 198, .box_w = 12, .box_h = 16, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1568, .adv_w = 198, .box_w = 11, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1656, .adv_w = 198, .box_w = 10, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1736, .adv_w = 85, .box_w = 3, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1754, .adv_w = 74, .box_w = 4, .box_h = 15, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 1784, .adv_w = 179, .box_w = 10, .box_h = 10, .ofs_x = 0, .ofs_y = 2},
- {.bitmap_index = 1834, .adv_w = 193, .box_w = 10, .box_h = 6, .ofs_x = 1, .ofs_y = 4},
- {.bitmap_index = 1864, .adv_w = 184, .box_w = 10, .box_h = 10, .ofs_x = 1, .ofs_y = 2},
- {.bitmap_index = 1914, .adv_w = 166, .box_w = 10, .box_h = 16, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1994, .adv_w = 316, .box_w = 18, .box_h = 21, .ofs_x = 1, .ofs_y = -5},
- {.bitmap_index = 2183, .adv_w = 230, .box_w = 15, .box_h = 16, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2303, .adv_w = 219, .box_w = 12, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2399, .adv_w = 229, .box_w = 13, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2503, .adv_w = 231, .box_w = 13, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2607, .adv_w = 200, .box_w = 11, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2695, .adv_w = 195, .box_w = 11, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2783, .adv_w = 240, .box_w = 13, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2887, .adv_w = 251, .box_w = 13, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2991, .adv_w = 96, .box_w = 4, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 3023, .adv_w = 194, .box_w = 11, .box_h = 16, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 3111, .adv_w = 221, .box_w = 13, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 3215, .adv_w = 189, .box_w = 11, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 3303, .adv_w = 307, .box_w = 17, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 3439, .adv_w = 251, .box_w = 13, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 3543, .adv_w = 242, .box_w = 13, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 3647, .adv_w = 222, .box_w = 13, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 3751, .adv_w = 242, .box_w = 13, .box_h = 19, .ofs_x = 1, .ofs_y = -3},
- {.bitmap_index = 3875, .adv_w = 217, .box_w = 13, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 3979, .adv_w = 209, .box_w = 13, .box_h = 16, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 4083, .adv_w = 210, .box_w = 13, .box_h = 16, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 4187, .adv_w = 228, .box_w = 12, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 4283, .adv_w = 224, .box_w = 14, .box_h = 16, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 4395, .adv_w = 312, .box_w = 20, .box_h = 16, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 4555, .adv_w = 221, .box_w = 14, .box_h = 16, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 4667, .adv_w = 211, .box_w = 14, .box_h = 16, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 4779, .adv_w = 211, .box_w = 13, .box_h = 16, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 4883, .adv_w = 93, .box_w = 5, .box_h = 22, .ofs_x = 1, .ofs_y = -3},
- {.bitmap_index = 4938, .adv_w = 144, .box_w = 9, .box_h = 17, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 5015, .adv_w = 93, .box_w = 5, .box_h = 22, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 5070, .adv_w = 147, .box_w = 9, .box_h = 8, .ofs_x = 0, .ofs_y = 8},
- {.bitmap_index = 5106, .adv_w = 159, .box_w = 10, .box_h = 2, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 5116, .adv_w = 109, .box_w = 6, .box_h = 3, .ofs_x = 0, .ofs_y = 14},
- {.bitmap_index = 5125, .adv_w = 191, .box_w = 10, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 5185, .adv_w = 197, .box_w = 11, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 5273, .adv_w = 184, .box_w = 11, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 5339, .adv_w = 199, .box_w = 10, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 5419, .adv_w = 186, .box_w = 10, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 5479, .adv_w = 122, .box_w = 8, .box_h = 17, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 5547, .adv_w = 197, .box_w = 10, .box_h = 17, .ofs_x = 1, .ofs_y = -5},
- {.bitmap_index = 5632, .adv_w = 194, .box_w = 10, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 5712, .adv_w = 85, .box_w = 3, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 5736, .adv_w = 84, .box_w = 5, .box_h = 21, .ofs_x = -1, .ofs_y = -5},
- {.bitmap_index = 5789, .adv_w = 178, .box_w = 11, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 5877, .adv_w = 85, .box_w = 3, .box_h = 16, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 5901, .adv_w = 309, .box_w = 17, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 6003, .adv_w = 194, .box_w = 10, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 6063, .adv_w = 201, .box_w = 12, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 6135, .adv_w = 197, .box_w = 11, .box_h = 17, .ofs_x = 1, .ofs_y = -5},
- {.bitmap_index = 6229, .adv_w = 200, .box_w = 10, .box_h = 17, .ofs_x = 1, .ofs_y = -5},
- {.bitmap_index = 6314, .adv_w = 119, .box_w = 7, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 6356, .adv_w = 182, .box_w = 10, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 6416, .adv_w = 115, .box_w = 7, .box_h = 15, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 6469, .adv_w = 194, .box_w = 10, .box_h = 12, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 6529, .adv_w = 171, .box_w = 11, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 6595, .adv_w = 265, .box_w = 17, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 6697, .adv_w = 174, .box_w = 11, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 6763, .adv_w = 167, .box_w = 11, .box_h = 17, .ofs_x = 0, .ofs_y = -5},
- {.bitmap_index = 6857, .adv_w = 174, .box_w = 11, .box_h = 12, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 6923, .adv_w = 119, .box_w = 8, .box_h = 22, .ofs_x = 0, .ofs_y = -4},
- {.bitmap_index = 7011, .adv_w = 86, .box_w = 3, .box_h = 19, .ofs_x = 1, .ofs_y = -3},
- {.bitmap_index = 7040, .adv_w = 119, .box_w = 7, .box_h = 22, .ofs_x = 0, .ofs_y = -4},
- {.bitmap_index = 7117, .adv_w = 239, .box_w = 13, .box_h = 4, .ofs_x = 1, .ofs_y = 4},
- {.bitmap_index = 7143, .adv_w = 352, .box_w = 23, .box_h = 23, .ofs_x = -1, .ofs_y = -3},
- {.bitmap_index = 7408, .adv_w = 352, .box_w = 22, .box_h = 17, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 7595, .adv_w = 352, .box_w = 22, .box_h = 20, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 7815, .adv_w = 352, .box_w = 22, .box_h = 17, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 8002, .adv_w = 242, .box_w = 16, .box_h = 16, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 8130, .adv_w = 352, .box_w = 22, .box_h = 23, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 8383, .adv_w = 352, .box_w = 22, .box_h = 23, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 8636, .adv_w = 396, .box_w = 25, .box_h = 20, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 8886, .adv_w = 352, .box_w = 22, .box_h = 23, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 9139, .adv_w = 396, .box_w = 25, .box_h = 17, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 9352, .adv_w = 352, .box_w = 22, .box_h = 23, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 9605, .adv_w = 176, .box_w = 11, .box_h = 18, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 9704, .adv_w = 264, .box_w = 17, .box_h = 18, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 9857, .adv_w = 396, .box_w = 25, .box_h = 22, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 10132, .adv_w = 352, .box_w = 22, .box_h = 17, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 10319, .adv_w = 308, .box_w = 15, .box_h = 21, .ofs_x = 2, .ofs_y = -2},
- {.bitmap_index = 10477, .adv_w = 308, .box_w = 20, .box_h = 24, .ofs_x = 0, .ofs_y = -4},
- {.bitmap_index = 10717, .adv_w = 308, .box_w = 20, .box_h = 20, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 10917, .adv_w = 308, .box_w = 20, .box_h = 20, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 11117, .adv_w = 308, .box_w = 15, .box_h = 21, .ofs_x = 2, .ofs_y = -2},
- {.bitmap_index = 11275, .adv_w = 308, .box_w = 21, .box_h = 20, .ofs_x = -1, .ofs_y = -2},
- {.bitmap_index = 11485, .adv_w = 220, .box_w = 12, .box_h = 20, .ofs_x = 1, .ofs_y = -2},
- {.bitmap_index = 11605, .adv_w = 220, .box_w = 12, .box_h = 20, .ofs_x = 1, .ofs_y = -2},
- {.bitmap_index = 11725, .adv_w = 308, .box_w = 20, .box_h = 20, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 11925, .adv_w = 308, .box_w = 20, .box_h = 5, .ofs_x = 0, .ofs_y = 6},
- {.bitmap_index = 11975, .adv_w = 396, .box_w = 25, .box_h = 17, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 12188, .adv_w = 440, .box_w = 28, .box_h = 23, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 12510, .adv_w = 396, .box_w = 27, .box_h = 23, .ofs_x = -1, .ofs_y = -3},
- {.bitmap_index = 12821, .adv_w = 352, .box_w = 22, .box_h = 21, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 13052, .adv_w = 308, .box_w = 19, .box_h = 12, .ofs_x = 0, .ofs_y = 2},
- {.bitmap_index = 13166, .adv_w = 308, .box_w = 19, .box_h = 12, .ofs_x = 0, .ofs_y = 2},
- {.bitmap_index = 13280, .adv_w = 440, .box_w = 28, .box_h = 18, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 13532, .adv_w = 352, .box_w = 22, .box_h = 17, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 13719, .adv_w = 352, .box_w = 22, .box_h = 23, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 13972, .adv_w = 352, .box_w = 23, .box_h = 23, .ofs_x = -1, .ofs_y = -3},
- {.bitmap_index = 14237, .adv_w = 308, .box_w = 20, .box_h = 20, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 14437, .adv_w = 308, .box_w = 20, .box_h = 23, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 14667, .adv_w = 308, .box_w = 20, .box_h = 20, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 14867, .adv_w = 220, .box_w = 15, .box_h = 23, .ofs_x = -1, .ofs_y = -3},
- {.bitmap_index = 15040, .adv_w = 308, .box_w = 20, .box_h = 23, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 15270, .adv_w = 308, .box_w = 20, .box_h = 23, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 15500, .adv_w = 396, .box_w = 25, .box_h = 17, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 15713, .adv_w = 352, .box_w = 24, .box_h = 23, .ofs_x = -1, .ofs_y = -3},
- {.bitmap_index = 15989, .adv_w = 264, .box_w = 17, .box_h = 23, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 16185, .adv_w = 440, .box_w = 28, .box_h = 21, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 16479, .adv_w = 440, .box_w = 28, .box_h = 15, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 16689, .adv_w = 440, .box_w = 28, .box_h = 15, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 16899, .adv_w = 440, .box_w = 28, .box_h = 15, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 17109, .adv_w = 440, .box_w = 28, .box_h = 15, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 17319, .adv_w = 440, .box_w = 28, .box_h = 15, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 17529, .adv_w = 440, .box_w = 28, .box_h = 18, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 17781, .adv_w = 308, .box_w = 17, .box_h = 23, .ofs_x = 1, .ofs_y = -3},
- {.bitmap_index = 17977, .adv_w = 308, .box_w = 20, .box_h = 23, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 18207, .adv_w = 352, .box_w = 23, .box_h = 23, .ofs_x = -1, .ofs_y = -3},
- {.bitmap_index = 18472, .adv_w = 440, .box_w = 28, .box_h = 17, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 18710, .adv_w = 264, .box_w = 17, .box_h = 23, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 18906, .adv_w = 354, .box_w = 23, .box_h = 14, .ofs_x = 0, .ofs_y = 1}
-};
-
-/*---------------------
- * CHARACTER MAPPING
- *--------------------*/
-
-static const uint16_t unicode_list_1[] = {
- 0x0, 0x7, 0xa, 0xb, 0xc, 0x10, 0x12, 0x14,
- 0x18, 0x1b, 0x20, 0x25, 0x26, 0x27, 0x3d, 0x47,
- 0x4a, 0x4b, 0x4c, 0x50, 0x51, 0x52, 0x53, 0x66,
- 0x67, 0x6d, 0x6f, 0x70, 0x73, 0x76, 0x77, 0x78,
- 0x7a, 0x92, 0x94, 0xc3, 0xc4, 0xc6, 0xe6, 0xe9,
- 0xf2, 0x11b, 0x123, 0x15a, 0x1ea, 0x23f, 0x240, 0x241,
- 0x242, 0x243, 0x286, 0x292, 0x2ec, 0x303, 0x559, 0x7c1,
- 0x8a1
-};
-
-/*Collect the unicode lists and glyph_id offsets*/
-static const lv_font_fmt_txt_cmap_t cmaps[] =
-{
- {
- .range_start = 32, .range_length = 95, .glyph_id_start = 1,
- .unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY
- },
- {
- .range_start = 61441, .range_length = 2210, .glyph_id_start = 96,
- .unicode_list = unicode_list_1, .glyph_id_ofs_list = NULL, .list_length = 57, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
- }
-};
-
-/*-----------------
- * KERNING
- *----------------*/
-
-
-/*Map glyph_ids to kern left classes*/
-static const uint8_t kern_left_class_mapping[] =
-{
- 0, 1, 0, 2, 0, 0, 0, 0,
- 2, 3, 0, 0, 0, 4, 0, 4,
- 5, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 6, 7, 8, 9, 10, 11,
- 0, 12, 12, 13, 14, 15, 12, 12,
- 9, 16, 17, 18, 0, 19, 13, 20,
- 21, 22, 23, 24, 25, 0, 0, 0,
- 0, 0, 26, 27, 28, 0, 29, 30,
- 0, 31, 0, 0, 32, 0, 31, 31,
- 33, 27, 0, 34, 0, 35, 0, 36,
- 37, 38, 36, 39, 40, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0
-};
-
-/*Map glyph_ids to kern right classes*/
-static const uint8_t kern_right_class_mapping[] =
-{
- 0, 1, 0, 2, 0, 0, 0, 3,
- 2, 0, 4, 5, 0, 6, 7, 6,
- 8, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 9, 0, 10, 0, 11, 0, 0, 0,
- 11, 0, 0, 12, 0, 0, 0, 0,
- 11, 0, 11, 0, 13, 14, 15, 16,
- 17, 18, 19, 20, 0, 0, 21, 0,
- 0, 0, 22, 0, 23, 23, 23, 24,
- 23, 0, 0, 0, 0, 0, 25, 25,
- 26, 25, 23, 27, 28, 29, 30, 31,
- 32, 33, 31, 34, 0, 0, 35, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0,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0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- -14, 0, -3, 0, 0, -8, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, -7, 0,
- 0, 0, 0, -37, -40, 0, 0, -14,
- -5, -41, -3, 3, 0, 3, 3, 0,
- 3, 0, 0, -19, -17, 0, -19, -17,
- -13, -20, 0, -16, -12, -10, -13, -10,
- 0, 0, 0, 0, 3, 0, -39, -6,
- 0, 0, -13, -2, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 3, -8, -8,
- 0, 0, -8, -5, 0, 0, -5, -2,
- 0, 0, 0, 3, 0, 0, 0, 3,
- 0, -21, -10, 0, 0, -7, 0, 0,
- 0, 2, 0, 0, 0, 0, 0, 0,
- 2, -6, -5, 0, 0, -5, -4, 0,
- 0, -3, 0, 0, 0, 0, 2, 0,
- 0, 0, 0, 0, 0, -8, 0, 0,
- 0, -4, 0, 0, 0, 0, 2, 0,
- 0, 0, 0, 0, 0, -4, 0, 0,
- -4, 0, 0, 0, -4, -5, 0, 0,
- 0, 0, 0, 0, -5, 3, -8, -36,
- -9, 0, 0, -16, -5, -16, -3, 3,
- -16, 3, 3, 2, 3, 0, 3, -13,
- -11, -4, -7, -11, -7, -10, -4, -7,
- -3, 0, -4, -5, 3, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 2, -4,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, -4, 0, 0, -4, 0,
- 0, 0, -3, -5, -5, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, -3, 0, 0, -3, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, -12, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, -3, 0, 0, 0, 0, 0, -5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3, 0, 0, 0, -18, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, -3, -2,
- 2, 0, -3, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, -21, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, -3, 0, 0,
- -3, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- -3, 0, 0, -3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- -3, 0, 0, -3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0
-};
-
-
-/*Collect the kern class' data in one place*/
-static const lv_font_fmt_txt_kern_classes_t kern_classes =
-{
- .class_pair_values = kern_class_values,
- .left_class_mapping = kern_left_class_mapping,
- .right_class_mapping = kern_right_class_mapping,
- .left_class_cnt = 40,
- .right_class_cnt = 35,
-};
-
-/*--------------------
- * ALL CUSTOM DATA
- *--------------------*/
-
-/*Store all the custom data of the font*/
-static lv_font_fmt_txt_dsc_t font_dsc = {
- .glyph_bitmap = gylph_bitmap,
- .glyph_dsc = glyph_dsc,
- .cmaps = cmaps,
- .kern_dsc = &kern_classes,
- .kern_scale = 16,
- .cmap_num = 2,
- .bpp = 4,
- .kern_classes = 1,
- .bitmap_format = 0
-};
-
-
-/*-----------------
- * PUBLIC FONT
- *----------------*/
-
-/*Initialize a public general font descriptor*/
-lv_font_t lv_font_roboto_22 = {
- .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/
- .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/
- .line_height = 26, /*The maximum line height required by the font*/
- .base_line = 6, /*Baseline measured from the bottom of the line*/
- .subpx = LV_FONT_SUBPX_NONE,
- .dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
-};
-
-#endif /*#if LV_FONT_ROBOTO_22*/
-
diff --git a/src/libs/lvgl/src/lv_font/lv_font_roboto_28.c b/src/libs/lvgl/src/lv_font/lv_font_roboto_28.c
deleted file mode 100644
index f3e58bb3..00000000
--- a/src/libs/lvgl/src/lv_font/lv_font_roboto_28.c
+++ /dev/null
@@ -1,4609 +0,0 @@
-#include "../../lvgl.h"
-
-/*******************************************************************************
- * Size: 28 px
- * Bpp: 4
- * Opts: --no-compress --no-prefilter --bpp 4 --size 28 --font Roboto-Regular.woff -r 0x20-0x7F --font FontAwesome5-Solid+Brands+Regular.woff -r 61441,61448,61451,61452,61452,61453,61457,61459,61461,61465,61468,61473,61478,61479,61480,61502,61512,61515,61516,61517,61521,61522,61523,61524,61543,61544,61550,61552,61553,61556,61559,61560,61561,61563,61587,61589,61636,61637,61639,61671,61674,61683,61724,61732,61787,61931,62016,62017,62018,62019,62020,62087,62099,62212,62189,62810,63426,63650 --format lvgl -o lv_font_roboto_28.c --force-fast-kern-format
- ******************************************************************************/
-
-#ifndef LV_FONT_ROBOTO_28
-#define LV_FONT_ROBOTO_28 1
-#endif
-
-#if LV_FONT_ROBOTO_28
-
-/*-----------------
- * BITMAPS
- *----------------*/
-
-/*Store the image of the glyphs*/
-static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = {
- /* U+20 " " */
-
- /* U+21 "!" */
- 0xbf, 0xe0, 0xbf, 0xe0, 0xbf, 0xe0, 0xaf, 0xe0,
- 0xaf, 0xe0, 0xaf, 0xd0, 0xaf, 0xd0, 0x9f, 0xd0,
- 0x9f, 0xd0, 0x9f,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xff,
- 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xff, 0xff,
- 0xff, 0xff, 0xfe, 0x44, 0x4e, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xe4, 0x44, 0xef,
- 0xab, 0x0, 0xc, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xb0, 0x0, 0xb9,
-
- /* U+F00B "" */
- 0x9f, 0xff, 0xff, 0xfb, 0x0, 0xaf, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff,
- 0xff, 0xff, 0x21, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0x21, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x21, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0x21, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0x21, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xaf, 0xff, 0xff, 0xfc,
- 0x0, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xfa, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x9f, 0xff,
- 0xff, 0xfb, 0x0, 0xbf, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xff,
- 0x21, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x21, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0x21, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0x21, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0x21, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xaf, 0xff, 0xff, 0xfc, 0x0, 0xbf,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0xaf, 0xff, 0xff, 0xfc,
- 0x0, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xfa, 0xff, 0xff, 0xff, 0xff, 0x21, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0x21, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0x21, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0x21, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x21, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0x9f, 0xff, 0xff, 0xfb, 0x0, 0xaf, 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30,
- 0xbf, 0xff, 0xfa, 0x0, 0x9f, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xe3, 0x4, 0xef, 0xff, 0xf4,
- 0xbf, 0xff, 0x70, 0x1b, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0x50, 0x2d, 0xff, 0xf3,
- 0xd, 0xf4, 0x2, 0xdf, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xf8, 0x0, 0xbf, 0x60,
- 0x1, 0x20, 0xb, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0x30, 0x3, 0x0,
- 0x0, 0x0, 0xc, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0x40, 0x0, 0x0,
- 0x0, 0x0, 0xc, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0x40, 0x0, 0x0,
- 0x0, 0x0, 0xc, 0xff, 0xff, 0xff, 0xf4, 0x0,
- 0x0, 0xcf, 0xff, 0xff, 0xff, 0x40, 0x0, 0x0,
- 0x0, 0x0, 0xc, 0xff, 0xff, 0xff, 0xf2, 0x0,
- 0x0, 0xaf, 0xff, 0xff, 0xff, 0x40, 0x0, 0x0,
- 0x0, 0x0, 0xc, 0xff, 0xff, 0xff, 0xf2, 0x0,
- 0x0, 0xaf, 0xff, 0xff, 0xff, 0x40, 0x0, 0x0,
- 0x0, 0x0, 0xc, 0xff, 0xff, 0xff, 0xf2, 0x0,
- 0x0, 0xaf, 0xff, 0xff, 0xff, 0x40, 0x0, 0x0,
- 0x0, 0x0, 0xc, 0xff, 0xff, 0xff, 0xf2, 0x0,
- 0x0, 0xaf, 0xff, 0xff, 0xff, 0x40, 0x0, 0x0,
- 0x0, 0x0, 0xc, 0xff, 0xff, 0xff, 0xf2, 0x0,
- 0x0, 0xaf, 0xff, 0xff, 0xff, 0x40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0x0, 0x0, 0x4f, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xf4, 0x0, 0x0, 0x0, 0x0,
- 0x9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0x90, 0x0, 0x0, 0x0, 0x0, 0x0, 0x9f,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x9, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0x90, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x8f, 0xff, 0xff, 0xff,
- 0xff, 0xf8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x8, 0xff, 0xff, 0xff, 0xff, 0x80,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x8f, 0xff, 0xff, 0xf8, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x1, 0x11, 0x11, 0x11, 0x10, 0x8,
- 0xff, 0xff, 0x80, 0x1, 0x11, 0x11, 0x11, 0x10,
- 0xbf, 0xff, 0xff, 0xff, 0xfd, 0x10, 0x8f, 0xf8,
- 0x1, 0xdf, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xe2, 0x6, 0x60, 0x2d, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xfe, 0x30, 0x3, 0xef, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xfd, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4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ef, 0xff, 0x20,
- 0x5f, 0xff, 0xd0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f, 0xff, 0xd0,
- 0xdf, 0xff, 0xb8, 0x88, 0x88, 0x70, 0x0, 0x0,
- 0x0, 0x0, 0x48, 0x88, 0x88, 0x8e, 0xff, 0xf5,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0x0, 0x0,
- 0x0, 0x0, 0xef, 0xff, 0xff, 0xff, 0xff, 0xf7,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x0, 0x0,
- 0x0, 0x7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x70, 0x0,
- 0x0, 0xe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7,
- 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf3,
- 0x1b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0x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, 0xff, 0xfd, 0x60, 0x0,
- 0x0, 0x0, 0xff, 0xfd, 0x0, 0x0, 0x2, 0x7c,
- 0xff, 0xff, 0xd9, 0x40, 0x0, 0x0, 0x0, 0x0,
- 0x68, 0x85, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
-
- /* U+F026 "" */
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x3, 0xb6, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x3f, 0xff, 0x0, 0x0, 0x0,
- 0x0, 0x3, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0,
- 0x3f, 0xff, 0xff, 0x0, 0x0, 0x0, 0x3, 0xff,
- 0xff, 0xff, 0x38, 0x88, 0x88, 0x8f, 0xff, 0xff,
- 0xff, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0x9f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0,
- 0x0, 0x0, 0x8, 0xff, 0xff, 0xff, 0x0, 0x0,
- 0x0, 0x0, 0x8f, 0xff, 0xff, 0x0, 0x0, 0x0,
- 0x0, 0x8, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x8f, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x8, 0xfc, 0x0, 0x0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0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb,
- 0x1b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xb1,
-
- /* U+F048 "" */
- 0x48, 0x88, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7,
- 0x70, 0xbf, 0xff, 0x30, 0x0, 0x0, 0x0, 0x0,
- 0xbf, 0xf9, 0xbf, 0xff, 0x30, 0x0, 0x0, 0x0,
- 0x1c, 0xff, 0xfc, 0xbf, 0xff, 0x30, 0x0, 0x0,
- 0x1, 0xdf, 0xff, 0xfc, 0xbf, 0xff, 0x30, 0x0,
- 0x0, 0x2e, 0xff, 0xff, 0xfc, 0xbf, 0xff, 0x30,
- 0x0, 0x3, 0xef, 0xff, 0xff, 0xfc, 0xbf, 0xff,
- 0x30, 0x0, 0x4f, 0xff, 0xff, 0xff, 0xfc, 0xbf,
- 0xff, 0x30, 0x5, 0xff, 0xff, 0xff, 0xff, 0xfc,
- 0xbf, 0xff, 0x30, 0x6f, 0xff, 0xff, 0xff, 0xff,
- 0xfc, 0xbf, 0xff, 0x37, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xfc, 0xbf, 0xff, 0xbf, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xfc, 0xbf, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xfc, 0xbf, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xfc, 0xbf, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xbf, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xbf,
- 0xff, 0x5d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc,
- 0xbf, 0xff, 0x31, 0xcf, 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 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xb2, 0x0, 0x0, 0x0,
- 0xf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xf8, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x50,
- 0x0, 0xf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xb2, 0x0, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xf7, 0xf, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xf7, 0xf, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb2,
- 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xfe, 0x50, 0x0, 0xf, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x0,
- 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xb2, 0x0, 0x0, 0x0, 0xf, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0x40, 0x0,
- 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xf7, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xa1, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff,
- 0xfd, 0x30, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0xf, 0xff, 0xff, 0xff, 0xe6, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0xef, 0xff, 0xff,
- 0x91, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x6, 0xff, 0xfc, 0x30, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x74,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0,
-
- /* U+F04C "" */
- 0x1a, 0xef, 0xff, 0xff, 0xd5, 0x0, 0x0, 0x1a,
- 0xef, 0xff, 0xff, 0xd5, 0xa, 0xff, 0xff, 0xff,
- 0xff, 0xf2, 0x0, 0xa, 0xff, 0xff, 0xff, 0xff,
- 0xf2, 0xff, 0xff, 0xff, 0xff, 0xff, 0x70, 0x0,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff,
- 0xff, 0xff, 0xf8, 0x0, 0xf, 0xff, 0xff, 0xff,
- 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
- 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x8f, 0xff,
- 0xff, 0xff, 0xff, 0xf8, 0x0, 0xf, 0xff, 0xff,
- 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0x80, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x8f,
- 0xff, 0xff, 0xff, 0xff, 0xf8, 0x0, 0xf, 0xff,
- 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0x80, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0x8f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x0, 0xf,
- 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0x80, 0x0, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0x8f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x0,
- 0xf, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0x80, 0x0, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff, 0xff, 0xf8,
- 0x0, 0xf, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0x80, 0x0, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff, 0xff,
- 0xf8, 0x0, 0xf, 0xff, 0xff, 0xff, 0xff, 0xf8,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x0, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff,
- 0xff, 0xf8, 0x0, 0xf, 0xff, 0xff, 0xff, 0xff,
- 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x0,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0x8f, 0xff, 0xff,
- 0xff, 0xff, 0xf8, 0x0, 0xf, 0xff, 0xff, 0xff,
- 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
- 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x8f, 0xff,
- 0xff, 0xff, 0xff, 0xf7, 0x0, 0xf, 0xff, 0xff,
- 0xff, 0xff, 0xf7, 0xef, 0xff, 0xff, 0xff, 0xff,
- 0x60, 0x0, 0xef, 0xff, 0xff, 0xff, 0xff, 0x66,
- 0xff, 0xff, 0xff, 0xff, 0xd0, 0x0, 0x6, 0xff,
- 0xff, 0xff, 0xff, 0xd0, 0x4, 0x89, 0x99, 0x98,
- 0x71, 0x0, 0x0, 0x4, 0x89, 0x99, 0x98, 0x71,
- 0x0,
-
- /* U+F04D "" */
- 0x3, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
- 0x88, 0x88, 0x88, 0x60, 0x6, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xd0, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0x6f, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x8f, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x8f,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0x8f, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x8f, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7a,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xf2, 0x1a, 0xef, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd5,
- 0x0,
-
- /* U+F051 "" */
- 0x5, 0x81, 0x0, 0x0, 0x0, 0x0, 0x0, 0x68,
- 0x87, 0x5f, 0xfe, 0x20, 0x0, 0x0, 0x0, 0x0,
- 0xef, 0xff, 0x7f, 0xff, 0xe3, 0x0, 0x0, 0x0,
- 0x0, 0xff, 0xff, 0x8f, 0xff, 0xff, 0x40, 0x0,
- 0x0, 0x0, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xf5,
- 0x0, 0x0, 0x0, 0xff, 0xff, 0x8f, 0xff, 0xff,
- 0xff, 0x60, 0x0, 0x0, 0xff, 0xff, 0x8f, 0xff,
- 0xff, 0xff, 0xf8, 0x0, 0x0, 0xff, 0xff, 0x8f,
- 0xff, 0xff, 0xff, 0xff, 0x90, 0x0, 0xff, 0xff,
- 0x8f, 0xff, 0xff, 0xff, 0xff, 0xfa, 0x0, 0xff,
- 0xff, 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb0,
- 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xfc, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0x8f, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x8f, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x8f,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xe3, 0xff, 0xff,
- 0x8f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x20, 0xff,
- 0xff, 0x8f, 0xff, 0xff, 0xff, 0xff, 0xd2, 0x0,
- 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff, 0xfd, 0x10,
- 0x0, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff, 0xc1,
- 0x0, 0x0, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xfb,
- 0x0, 0x0, 0x0, 0xff, 0xff, 0x8f, 0xff, 0xff,
- 0xa0, 0x0, 0x0, 0x0, 0xff, 0xff, 0x8f, 0xff,
- 0xf9, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0x7f,
- 0xff, 0x80, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff,
- 0x1c, 0xf6, 0x0, 0x0, 0x0, 0x0, 0x0, 0xcf,
- 0xfd, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0,
-
- /* U+F052 "" */
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x9a, 0x50,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x1e, 0xff, 0xf8, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0xdf,
- 0xff, 0xff, 0x60, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0xc, 0xff, 0xff, 0xff, 0xf5,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0xbf, 0xff, 0xff, 0xff, 0xff, 0x40, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0xa, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xf3, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x9f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
- 0x20, 0x0, 0x0, 0x0, 0x0, 0x8, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xe1, 0x0, 0x0,
- 0x0, 0x0, 0x6f, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xfd, 0x10, 0x0, 0x0, 0x5, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xc0, 0x0, 0x0, 0x4f, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x3,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xa0, 0xc, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xf5, 0xf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xa, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xf3, 0x1, 0xbf, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x60,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x6, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd1, 0xf,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xf7, 0xf, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xf8, 0xf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xf, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xf8, 0xe, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6,
- 0x5, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xb0,
-
- /* U+F053 "" */
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x93, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x4f, 0xff, 0x30,
- 0x0, 0x0, 0x0, 0x0, 0x4, 0xff, 0xff, 0xe0,
- 0x0, 0x0, 0x0, 0x0, 0x4f, 0xff, 0xff, 0xc0,
- 0x0, 0x0, 0x0, 0x4, 0xff, 0xff, 0xfd, 0x10,
- 0x0, 0x0, 0x0, 0x4f, 0xff, 0xff, 0xd1, 0x0,
- 0x0, 0x0, 0x4, 0xff, 0xff, 0xfd, 0x10, 0x0,
- 0x0, 0x0, 0x4f, 0xff, 0xff, 0xd1, 0x0, 0x0,
- 0x0, 0x4, 0xff, 0xff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- 0xe0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x6f, 0xff, 0xfe, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6, 0xff,
- 0xff, 0xe0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x6f, 0xff, 0xfe, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6,
- 0xff, 0xff, 0xe0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x4f, 0xff, 0xfc, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x8d, 0xdc, 0x30, 0x0, 0x0, 0x0, 0x0,
- 0x0,
-
- /* U+F068 "" */
- 0x1, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,
- 0x22, 0x22, 0x22, 0x10, 0x8, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xe1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x77, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xe1, 0x1, 0x22, 0x22, 0x22, 0x22,
- 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x10, 0x0,
-
- /* U+F06E "" */
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x26, 0xad, 0xef,
- 0xfe, 0xc9, 0x50, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0,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0x6f, 0xff, 0xff, 0xff, 0xff, 0xa0,
- 0x0, 0x0, 0x0, 0xb, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0x30, 0x0, 0x0, 0x5, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xf5, 0x1, 0xbf, 0xff, 0xff, 0xff, 0xff,
- 0xfc, 0x0, 0x0, 0x0, 0xdf, 0xff, 0xff, 0xff,
- 0xff, 0xf7, 0x0, 0x0, 0xef, 0xff, 0xff, 0xff,
- 0xff, 0xf6, 0x0, 0x0, 0x7f, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0x40, 0x0, 0xc, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xe0, 0x0, 0x1f, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xf8, 0x0, 0x1, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0x80, 0x9, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xf6, 0x13, 0xcf, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0x10, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xf7, 0xe, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0x60, 0x7f, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x0, 0x48,
- 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99,
- 0x99, 0x99, 0x99, 0x99, 0x98, 0x71, 0x0,
-
- /* U+F074 "" */
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x6, 0xa2, 0x0, 0x0, 0x0, 0x0,
-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
- 0xff, 0xff, 0xfc, 0x10, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xd8, 0x88, 0x88, 0x88, 0x88, 0x87, 0x30,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xf5, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff,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 0xff,
- 0x5f, 0xff, 0xff, 0x40, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xf5, 0xff, 0xff, 0xf4,
- 0xf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0x5f, 0xff, 0xff, 0x40, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xf5, 0xff, 0xff,
- 0xf4, 0xf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0x5f, 0xff, 0xff, 0x40, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf5, 0xff,
- 0xff, 0xf4, 0xf, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0x5f, 0xff, 0xff, 0x40, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf5,
- 0xff, 0xff, 0xf4, 0xf, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0x5f, 0xff, 0xff, 0x40,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xf5, 0xff, 0xff, 0xf4, 0xf, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0x5f, 0xff, 0xff,
- 0x40, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xf5, 0xff, 0xff, 0xf4, 0xf, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x5f, 0xff,
- 0xff, 0x40, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xf5, 0xff, 0xff, 0xf5, 0xa, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x1f,
- 0xff, 0xff, 0xb0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xa2,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0xf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0x80, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x0, 0x0,
- 0x0, 0xe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0x60, 0x0, 0x0, 0x0, 0x37, 0x88,
- 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x60, 0x0,
- 0x0, 0x0, 0x0,
-
- /* U+F0C7 "" */
- 0x4, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
- 0x87, 0x20, 0x0, 0x0, 0x6, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x40, 0x0,
- 0x0, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0x40, 0x0, 0xf, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0x40, 0x0, 0xff, 0xf9, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0xd, 0xff, 0xff, 0x40, 0xf, 0xff,
- 0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xbf,
- 0xff, 0xff, 0x30, 0xff, 0xf8, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0xb, 0xff, 0xff, 0xfe, 0xf,
- 0xff, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0xbf, 0xff, 0xff, 0xf3, 0xff, 0xf8, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0xb, 0xff, 0xff, 0xff,
- 0x4f, 0xff, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0xbf, 0xff, 0xff, 0xf4, 0xff, 0xfd, 0x77,
- 0x77, 0x77, 0x77, 0x77, 0x77, 0x7e, 0xff, 0xff,
- 0xff, 0x4f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0x4f, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0x82, 0x15, 0xef, 0xff,
- 0xff, 0xff, 0xff, 0x4f, 0xff, 0xff, 0xff, 0xff,
- 0x70, 0x0, 0x3, 0xff, 0xff, 0xff, 0xff, 0xf4,
- 0xff, 0xff, 0xff, 0xff, 0xf0, 0x0, 0x0, 0xb,
- 0xff, 0xff, 0xff, 0xff, 0x4f, 0xff, 0xff, 0xff,
- 0xfc, 0x0, 0x0, 0x0, 0x8f, 0xff, 0xff, 0xff,
- 0xf4, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x0, 0x0,
- 0x9, 0xff, 0xff, 0xff, 0xff, 0x4f, 0xff, 0xff,
- 0xff, 0xff, 0x30, 0x0, 0x0, 0xef, 0xff, 0xff,
- 0xff, 0xf4, 0xff, 0xff, 0xff, 0xff, 0xfd, 0x10,
- 0x0, 0x9f, 0xff, 0xff, 0xff, 0xff, 0x4f, 0xff,
- 0xff, 0xff, 0xff, 0xfe, 0xa9, 0xdf, 0xff, 0xff,
- 0xff, 0xff, 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3a,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xe0, 0x1a, 0xef, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc3,
- 0x0,
-
- /* U+F0E7 "" */
- 0x0, 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- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0xf, 0xff, 0xff, 0xff, 0x20, 0xaf, 0xff, 0xff,
- 0xff, 0xa0, 0xd6, 0x0, 0x0, 0xff, 0xff, 0xff,
- 0xf0, 0x1f, 0xff, 0xff, 0xff, 0xfa, 0xe, 0xf6,
- 0x0, 0xf, 0xff, 0xff, 0xff, 0x1, 0xff, 0xff,
- 0xff, 0xff, 0xa0, 0xef, 0xf6, 0x0, 0xff, 0xff,
- 0xff, 0xf0, 0x1f, 0xff, 0xff, 0xff, 0xfa, 0xe,
- 0xff, 0xf6, 0xf, 0xff, 0xff, 0xff, 0x1, 0xff,
- 0xff, 0xff, 0xff, 0xa0, 0xef, 0xff, 0xf3, 0xff,
- 0xff, 0xff, 0xf0, 0x1f, 0xff, 0xff, 0xff, 0xfa,
- 0x4, 0x44, 0x44, 0x1f, 0xff, 0xff, 0xff, 0x1,
- 0xff, 0xff, 0xff, 0xff, 0xe1, 0x0, 0x0, 0x0,
- 0xff, 0xff, 0xff, 0xf0, 0x1f, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0x5f, 0xff, 0xff, 0xff,
- 0x1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xf5, 0xff, 0xff, 0xff, 0xf0, 0x1f, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0x5f, 0xff, 0xff,
- 0xff, 0x1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xf5, 0xff, 0xff, 0xff, 0xf0, 0x1f, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x5f, 0xff,
- 0xff, 0xff, 0x1, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xf5, 0xaf, 0xff, 0xff, 0xf0, 0x1f,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x50,
- 0x0, 0x0, 0x0, 0x1, 0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0xff, 0xff,
- 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0x6, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd0,
- 0x0, 0x0, 0x0, 0x7f, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x8,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xf0, 0x0, 0x0, 0x0, 0x9f, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0x10, 0x0, 0x0,
- 0xc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xf4, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x70, 0x0,
- 0x0, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xfb, 0x0, 0x0, 0x9, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf1,
- 0x0, 0x3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xa0, 0x1, 0xef, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0x70, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3e, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xf7, 0x6f, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0x10,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0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 0x0, 0x0, 0xc, 0xff,
- 0xff, 0xf7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0xb, 0xff, 0xff,
- 0xf0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0xa, 0xff, 0xff, 0x80,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x2, 0xff, 0xfd, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x17, 0x60, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0,
-
- /* U+F15B "" */
- 0x14, 0x44, 0x44, 0x44, 0x44, 0x44, 0x10, 0x30,
- 0x0, 0x0, 0xd, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xf4, 0xf, 0xa0, 0x0, 0x0, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0x40, 0xff, 0xa0, 0x0, 0xf,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4, 0xf, 0xff,
- 0xa0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0x40, 0xff, 0xff, 0xa0, 0xf, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xf4, 0xf, 0xff, 0xff, 0xa0, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0x40, 0xff, 0xff,
- 0xff, 0x9f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4,
- 0xb, 0xbb, 0xbb, 0xbb, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0x80, 0x0, 0x0, 0x0, 0xf, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0x14, 0x44,
- 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44,
- 0x10,
-
- /* U+F1EB "" */
- 0x0, 0x0, 0x0, 0x0, 0x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 0xff, 0xff, 0xff, 0x80, 0xcf, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xf0, 0x28, 0xcf, 0xff, 0xff, 0xf8, 0xc, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0x0, 0x8, 0xff, 0xff, 0xff, 0x80,
- 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xf0, 0x0, 0x8f, 0xff, 0xff,
- 0xf8, 0xc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x8, 0xff,
- 0xff, 0xff, 0x80, 0xcf, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x3f,
- 0xff, 0xff, 0xff, 0xf8, 0xc, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0x4, 0xff, 0xff, 0xff, 0xff, 0x80, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x4f, 0xff, 0xfe, 0xff, 0xfb, 0x77,
- 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77,
- 0x77, 0x77, 0x77, 0x79, 0xff, 0xfa, 0x3f, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x30,
- 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xe0, 0x1, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xd3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0,
-
- /* U+F241 "" */
- 0x2, 0x67, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77,
- 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x74,
- 0x0, 0x5, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xf9, 0x0, 0xdf, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xf1, 0xf, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0x30, 0xff, 0xf8,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x4, 0xff, 0xff, 0x9f,
- 0xff, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4f, 0xff,
- 0xff, 0xff, 0xf8, 0xe, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0x90, 0x0, 0x0, 0x4,
- 0xff, 0xff, 0xff, 0xff, 0x80, 0xef, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0x0, 0x0,
- 0x0, 0x28, 0xcf, 0xff, 0xff, 0xf8, 0xe, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x90,
- 0x0, 0x0, 0x0, 0x8, 0xff, 0xff, 0xff, 0x80,
- 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xf9, 0x0, 0x0, 0x0, 0x0, 0x8f, 0xff, 0xff,
- 0xf8, 0xe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0x90, 0x0, 0x0, 0x0, 0x8, 0xff,
- 0xff, 0xff, 0x80, 0xef, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xf9, 0x0, 0x0, 0x0, 0x3f,
- 0xff, 0xff, 0xff, 0xf8, 0xe, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0x90, 0x0, 0x0,
- 0x4, 0xff, 0xff, 0xff, 0xff, 0x80, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x4f, 0xff, 0xfe, 0xff, 0xfb, 0x77,
- 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77,
- 0x77, 0x77, 0x77, 0x79, 0xff, 0xfa, 0x3f, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x30,
- 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xe0, 0x1, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xd3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0,
-
- /* U+F242 "" */
- 0x2, 0x67, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77,
- 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x74,
- 0x0, 0x5, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xf9, 0x0, 0xdf, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xf1, 0xf, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0x30, 0xff, 0xf8,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x4, 0xff, 0xff, 0x9f,
- 0xff, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4f, 0xff,
- 0xff, 0xff, 0xf8, 0xe, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xf5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4,
- 0xff, 0xff, 0xff, 0xff, 0x80, 0xef, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0x50, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x28, 0xcf, 0xff, 0xff, 0xf8, 0xe, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xf5, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x8, 0xff, 0xff, 0xff, 0x80,
- 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0x50, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x8f, 0xff, 0xff,
- 0xf8, 0xe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf5,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0xff,
- 0xff, 0xff, 0x80, 0xef, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0x50, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f,
- 0xff, 0xff, 0xff, 0xf8, 0xe, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xf5, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x4, 0xff, 0xff, 0xff, 0xff, 0x80, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x4f, 0xff, 0xfe, 0xff, 0xfb, 0x77,
- 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77,
- 0x77, 0x77, 0x77, 0x79, 0xff, 0xfa, 0x3f, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x30,
- 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xe0, 0x1, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xd3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0,
-
- /* U+F243 "" */
- 0x2, 0x67, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77,
- 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x74,
- 0x0, 0x5, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xf9, 0x0, 0xdf, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xf1, 0xf, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0x30, 0xff, 0xf8,
- 0x0, 0x0, 0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0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x30,
- 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xe0, 0x1, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xd3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0,
-
- /* U+F244 "" */
- 0x2, 0x67, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77,
- 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x74,
- 0x0, 0x5, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xf9, 0x0, 0xdf, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xf1, 0xf, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0x30, 0xff, 0xf8,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x4, 0xff, 0xff, 0x9f,
- 0xff, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4f, 0xff,
- 0xff, 0xff, 0xf8, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4,
- 0xff, 0xff, 0xff, 0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x84, 0x0, 0x0, 0x0,
-
- /* U+F2ED "" */
- 0x0, 0x0, 0x0, 0x0, 0x14, 0x44, 0x44, 0x43,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x1f, 0xff, 0xff, 0xff, 0xf9, 0x0, 0x0, 0x0,
- 0x0, 0x58, 0x88, 0x88, 0x8c, 0xff, 0xff, 0xff,
- 0xff, 0xf8, 0x88, 0x88, 0x88, 0x1f, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x8b, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xe4, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x28, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
- 0x88, 0x88, 0x86, 0x0, 0x4, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0,
- 0x0, 0x4f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xfc, 0x0, 0x4, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xc0, 0x0, 0x4f, 0xff, 0xf5, 0x5f, 0xff, 0x92,
- 0xff, 0xfc, 0x1c, 0xff, 0xfc, 0x0, 0x4, 0xff,
- 0xff, 0x22, 0xff, 0xf6, 0xe, 0xff, 0xa0, 0xaf,
- 0xff, 0xc0, 0x0, 0x4f, 0xff, 0xf2, 0x2f, 0xff,
- 0x60, 0xef, 0xfa, 0xa, 0xff, 0xfc, 0x0, 0x4,
- 0xff, 0xff, 0x22, 0xff, 0xf6, 0xe, 0xff, 0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0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0xef, 0xff, 0xff, 0xec, 0x20, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x76,
- 0x42, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0,
-
- /* U+F55A "" */
- 0x0, 0x0, 0x0, 0x0, 0x8, 0xef, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xd5, 0x0, 0x0, 0x0, 0x0, 0xb, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xf5, 0x0, 0x0, 0x0, 0xb, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xd0, 0x0, 0x0, 0xb,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0,
- 0xb, 0xff, 0xff, 0xff, 0xff, 0xff, 0x99, 0xff,
- 0xff, 0xff, 0x99, 0xff, 0xff, 0xff, 0xff, 0xf0,
- 0x0, 0xb, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
- 0x8, 0xff, 0xff, 0x80, 0x7, 0xff, 0xff, 0xff,
- 0xff, 0x0, 0xb, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xe0, 0x0, 0x8, 0xff, 0x80, 0x0, 0xe, 0xff,
- 0xff, 0xff, 0xf0, 0xb, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0x80, 0x0, 0x8, 0x80, 0x0, 0x8,
- 0xff, 0xff, 0xff, 0xff, 0xb, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0x80, 0x0, 0x0, 0x0,
- 0x8, 0xff, 0xff, 0xff, 0xff, 0xfa, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x0,
- 0x0, 0x8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0x40, 0x0, 0x4, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xfa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0x80, 0x0, 0x0, 0x8, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xb, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0x80, 0x0, 0x0, 0x0, 0x8, 0xff,
- 0xff, 0xff, 0xff, 0xf0, 0xb, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0x80, 0x0, 0x8, 0x80, 0x0,
- 0x8, 0xff, 0xff, 0xff, 0xff, 0x0, 0xb, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xe0, 0x0, 0x8, 0xff,
- 0x80, 0x0, 0xe, 0xff, 0xff, 0xff, 0xf0, 0x0,
- 0xb, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x8,
- 0xff, 0xff, 0x80, 0x8, 0xff, 0xff, 0xff, 0xff,
- 0x0, 0x0, 0xb, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0x99, 0xff, 0xff, 0xff, 0x99, 0xff, 0xff, 0xff,
- 0xff, 0xf0, 0x0, 0x0, 0xb, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0xb, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xd0, 0x0, 0x0, 0x0,
- 0xa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xf5, 0x0, 0x0,
- 0x0, 0x0, 0x8, 0xef, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd5, 0x0,
-
- /* U+F7C2 "" */
- 0x0, 0x0, 0x0, 0x17, 0x88, 0x88, 0x88, 0x88,
- 0x87, 0x50, 0x0, 0x0, 0x0, 0x1d, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xc1, 0x0, 0x0, 0x2d,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa0,
- 0x0, 0x2e, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0x0, 0x2e, 0xff, 0x20, 0x1f, 0xa0,
- 0xe, 0xd0, 0x8, 0xff, 0xf0, 0x2e, 0xff, 0xf2,
- 0x1, 0xfa, 0x0, 0xed, 0x0, 0x8f, 0xff, 0x3e,
- 0xff, 0xff, 0x20, 0x1f, 0xa0, 0xe, 0xd0, 0x8,
- 0xff, 0xfe, 0xff, 0xff, 0xf2, 0x1, 0xfa, 0x0,
- 0xed, 0x0, 0x8f, 0xff, 0xff, 0xff, 0xff, 0x20,
- 0x1f, 0xa0, 0xe, 0xd0, 0x8, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xfe, 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0x80, 0xaf, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0x90, 0x0, 0x24,
- 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x20,
- 0x0,
-
- /* U+F8A2 "" */
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x9, 0xf1, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x9, 0xff, 0x10, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0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0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0xa, 0xf9, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0
-};
-
-
-/*---------------------
- * GLYPH DESCRIPTION
- *--------------------*/
-
-static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
- {.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
- {.bitmap_index = 0, .adv_w = 111, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 0, .adv_w = 115, .box_w = 4, .box_h = 20, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 40, .adv_w = 143, .box_w = 7, .box_h = 7, .ofs_x = 1, .ofs_y = 14},
- {.bitmap_index = 65, .adv_w = 279, .box_w = 17, .box_h = 20, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 235, .adv_w = 252, .box_w = 14, .box_h = 26, .ofs_x = 1, .ofs_y = -3},
- {.bitmap_index = 417, .adv_w = 328, .box_w = 19, .box_h = 20, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 607, .adv_w = 278, .box_w = 17, .box_h = 20, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 777, .adv_w = 78, .box_w = 3, .box_h = 7, .ofs_x = 1, .ofs_y = 14},
- {.bitmap_index = 788, .adv_w = 153, .box_w = 9, .box_h = 30, .ofs_x = 1, .ofs_y = -7},
- {.bitmap_index = 923, .adv_w = 156, .box_w = 8, .box_h = 30, .ofs_x = 0, .ofs_y = -7},
- {.bitmap_index = 1043, .adv_w = 193, .box_w = 12, .box_h = 12, .ofs_x = 0, .ofs_y = 8},
- {.bitmap_index = 1115, .adv_w = 254, .box_w = 14, .box_h = 15, .ofs_x = 1, .ofs_y = 2},
- {.bitmap_index = 1220, .adv_w = 88, .box_w = 5, .box_h = 7, .ofs_x = 0, .ofs_y = -4},
- {.bitmap_index = 1238, .adv_w = 124, .box_w = 8, .box_h = 3, .ofs_x = 0, .ofs_y = 7},
- {.bitmap_index = 1250, .adv_w = 118, .box_w = 5, .box_h = 3, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1258, .adv_w = 185, .box_w = 11, .box_h = 22, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 1379, .adv_w = 252, .box_w = 14, .box_h = 20, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1519, .adv_w = 252, .box_w = 8, .box_h = 20, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 1599, .adv_w = 252, .box_w = 14, .box_h = 20, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1739, .adv_w = 252, .box_w = 13, .box_h = 20, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1869, .adv_w = 252, .box_w = 16, .box_h = 20, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2029, .adv_w = 252, .box_w = 13, .box_h = 20, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 2159, .adv_w = 251, .box_w = 14, .box_h = 20, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2299, .adv_w = 252, .box_w = 14, .box_h = 20, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2439, .adv_w = 252, .box_w = 14, .box_h = 20, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2579, .adv_w = 252, .box_w = 13, .box_h = 20, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2709, .adv_w = 109, .box_w = 4, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2739, .adv_w = 95, .box_w = 5, .box_h = 19, .ofs_x = 0, .ofs_y = -4},
- {.bitmap_index = 2787, .adv_w = 228, .box_w = 13, .box_h = 13, .ofs_x = 0, .ofs_y = 2},
- {.bitmap_index = 2872, .adv_w = 246, .box_w = 12, .box_h = 8, .ofs_x = 2, .ofs_y = 5},
- {.bitmap_index = 2920, .adv_w = 234, .box_w = 13, .box_h = 13, .ofs_x = 1, .ofs_y = 2},
- {.bitmap_index = 3005, .adv_w = 212, .box_w = 12, .box_h = 20, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 3125, .adv_w = 402, .box_w = 23, .box_h = 26, .ofs_x = 1, .ofs_y = -6},
- {.bitmap_index = 3424, .adv_w = 292, .box_w = 18, .box_h = 20, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 3604, .adv_w = 279, .box_w = 14, .box_h = 20, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 3744, .adv_w = 292, .box_w = 16, .box_h = 20, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 3904, .adv_w = 294, .box_w = 15, .box_h = 20, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 4054, .adv_w = 255, .box_w = 13, .box_h = 20, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 4184, .adv_w = 248, .box_w = 13, .box_h = 20, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 4314, .adv_w = 305, .box_w = 17, .box_h = 20, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 4484, .adv_w = 319, .box_w = 16, .box_h = 20, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 4644, .adv_w = 122, .box_w = 4, .box_h = 20, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 4684, .adv_w = 247, .box_w = 14, .box_h = 20, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 4824, .adv_w = 281, .box_w = 16, .box_h = 20, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 4984, .adv_w = 241, .box_w = 13, .box_h = 20, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 5114, .adv_w = 391, .box_w = 21, .box_h = 20, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 5324, .adv_w = 319, .box_w = 16, .box_h = 20, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 5484, .adv_w = 308, .box_w = 17, .box_h = 20, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 5654, .adv_w = 283, .box_w = 15, .box_h = 20, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 5804, .adv_w = 308, .box_w = 17, .box_h = 24, .ofs_x = 1, .ofs_y = -4},
- {.bitmap_index = 6008, .adv_w = 276, .box_w = 15, .box_h = 20, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 6158, .adv_w = 266, .box_w = 15, .box_h = 20, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 6308, .adv_w = 267, .box_w = 17, .box_h = 20, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 6478, .adv_w = 291, .box_w = 16, .box_h = 20, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 6638, .adv_w = 285, .box_w = 18, .box_h = 20, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 6818, .adv_w = 397, .box_w = 25, .box_h = 20, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 7068, .adv_w = 281, .box_w = 17, .box_h = 20, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 7238, .adv_w = 269, .box_w = 17, .box_h = 20, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 7408, .adv_w = 268, .box_w = 15, .box_h = 20, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 7558, .adv_w = 119, .box_w = 6, .box_h = 27, .ofs_x = 2, .ofs_y = -4},
- {.bitmap_index = 7639, .adv_w = 184, .box_w = 12, .box_h = 22, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 7771, .adv_w = 119, .box_w = 6, .box_h = 27, .ofs_x = 0, .ofs_y = -4},
- {.bitmap_index = 7852, .adv_w = 187, .box_w = 11, .box_h = 10, .ofs_x = 0, .ofs_y = 10},
- {.bitmap_index = 7907, .adv_w = 202, .box_w = 13, .box_h = 3, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 7927, .adv_w = 138, .box_w = 7, .box_h = 4, .ofs_x = 0, .ofs_y = 17},
- {.bitmap_index = 7941, .adv_w = 244, .box_w = 13, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 8039, .adv_w = 251, .box_w = 14, .box_h = 21, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 8186, .adv_w = 235, .box_w = 13, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 8284, .adv_w = 253, .box_w = 13, .box_h = 21, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 8421, .adv_w = 237, .box_w = 13, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 8519, .adv_w = 156, .box_w = 10, .box_h = 22, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 8629, .adv_w = 251, .box_w = 13, .box_h = 21, .ofs_x = 1, .ofs_y = -6},
- {.bitmap_index = 8766, .adv_w = 247, .box_w = 13, .box_h = 21, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 8903, .adv_w = 109, .box_w = 4, .box_h = 20, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 8943, .adv_w = 107, .box_w = 6, .box_h = 26, .ofs_x = -1, .ofs_y = -6},
- {.bitmap_index = 9021, .adv_w = 227, .box_w = 14, .box_h = 21, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 9168, .adv_w = 109, .box_w = 3, .box_h = 21, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 9200, .adv_w = 393, .box_w = 22, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 9365, .adv_w = 247, .box_w = 13, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 9463, .adv_w = 256, .box_w = 14, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 9568, .adv_w = 251, .box_w = 14, .box_h = 21, .ofs_x = 1, .ofs_y = -6},
- {.bitmap_index = 9715, .adv_w = 255, .box_w = 13, .box_h = 21, .ofs_x = 1, .ofs_y = -6},
- {.bitmap_index = 9852, .adv_w = 152, .box_w = 9, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 9920, .adv_w = 231, .box_w = 13, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 10018, .adv_w = 146, .box_w = 9, .box_h = 19, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 10104, .adv_w = 247, .box_w = 13, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 10202, .adv_w = 217, .box_w = 14, .box_h = 15, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 10307, .adv_w = 337, .box_w = 21, .box_h = 15, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 10465, .adv_w = 222, .box_w = 14, .box_h = 15, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 10570, .adv_w = 212, .box_w = 13, .box_h = 21, .ofs_x = 0, .ofs_y = -6},
- {.bitmap_index = 10707, .adv_w = 222, .box_w = 12, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 10797, .adv_w = 152, .box_w = 10, .box_h = 28, .ofs_x = 0, .ofs_y = -6},
- {.bitmap_index = 10937, .adv_w = 109, .box_w = 3, .box_h = 24, .ofs_x = 2, .ofs_y = -4},
- {.bitmap_index = 10973, .adv_w = 152, .box_w = 9, .box_h = 28, .ofs_x = 0, .ofs_y = -6},
- {.bitmap_index = 11099, .adv_w = 305, .box_w = 17, .box_h = 6, .ofs_x = 1, .ofs_y = 5},
- {.bitmap_index = 11150, .adv_w = 448, .box_w = 28, .box_h = 29, .ofs_x = 0, .ofs_y = -4},
- {.bitmap_index = 11556, .adv_w = 448, .box_w = 28, .box_h = 21, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 11850, .adv_w = 448, .box_w = 28, .box_h = 25, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 12200, .adv_w = 448, .box_w = 28, .box_h = 21, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 12494, .adv_w = 308, .box_w = 20, .box_h = 21, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 12704, .adv_w = 448, .box_w = 28, .box_h = 29, .ofs_x = 0, .ofs_y = -4},
- {.bitmap_index = 13110, .adv_w = 448, .box_w = 27, .box_h = 29, .ofs_x = 1, .ofs_y = -4},
- {.bitmap_index = 13502, .adv_w = 504, .box_w = 32, .box_h = 25, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 13902, .adv_w = 448, .box_w = 28, .box_h = 29, .ofs_x = 0, .ofs_y = -4},
- {.bitmap_index = 14308, .adv_w = 504, .box_w = 32, .box_h = 21, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 14644, .adv_w = 448, .box_w = 28, .box_h = 29, .ofs_x = 0, .ofs_y = -4},
- {.bitmap_index = 15050, .adv_w = 224, .box_w = 14, .box_h = 23, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 15211, .adv_w = 336, .box_w = 21, .box_h = 23, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 15453, .adv_w = 504, .box_w = 32, .box_h = 27, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 15885, .adv_w = 448, .box_w = 28, .box_h = 21, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 16179, .adv_w = 392, .box_w = 18, .box_h = 26, .ofs_x = 3, .ofs_y = -3},
- {.bitmap_index = 16413, .adv_w = 392, .box_w = 25, .box_h = 29, .ofs_x = 0, .ofs_y = -4},
- {.bitmap_index = 16776, .adv_w = 392, .box_w = 25, .box_h = 25, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 17089, .adv_w = 392, .box_w = 25, .box_h = 25, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 17402, .adv_w = 392, .box_w = 18, .box_h = 26, .ofs_x = 3, .ofs_y = -3},
- {.bitmap_index = 17636, .adv_w = 392, .box_w = 26, .box_h = 25, .ofs_x = -1, .ofs_y = -2},
- {.bitmap_index = 17961, .adv_w = 280, .box_w = 16, .box_h = 25, .ofs_x = 1, .ofs_y = -2},
- {.bitmap_index = 18161, .adv_w = 280, .box_w = 16, .box_h = 25, .ofs_x = 1, .ofs_y = -2},
- {.bitmap_index = 18361, .adv_w = 392, .box_w = 25, .box_h = 25, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 18674, .adv_w = 392, .box_w = 25, .box_h = 7, .ofs_x = 0, .ofs_y = 7},
- {.bitmap_index = 18762, .adv_w = 504, .box_w = 32, .box_h = 21, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 19098, .adv_w = 560, .box_w = 35, .box_h = 29, .ofs_x = 0, .ofs_y = -4},
- {.bitmap_index = 19606, .adv_w = 504, .box_w = 33, .box_h = 29, .ofs_x = -1, .ofs_y = -4},
- {.bitmap_index = 20085, .adv_w = 448, .box_w = 28, .box_h = 25, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 20435, .adv_w = 392, .box_w = 25, .box_h = 15, .ofs_x = 0, .ofs_y = 3},
- {.bitmap_index = 20623, .adv_w = 392, .box_w = 25, .box_h = 15, .ofs_x = 0, .ofs_y = 3},
- {.bitmap_index = 20811, .adv_w = 560, .box_w = 35, .box_h = 22, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 21196, .adv_w = 448, .box_w = 28, .box_h = 21, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 21490, .adv_w = 448, .box_w = 28, .box_h = 29, .ofs_x = 0, .ofs_y = -4},
- {.bitmap_index = 21896, .adv_w = 448, .box_w = 29, .box_h = 29, .ofs_x = -1, .ofs_y = -4},
- {.bitmap_index = 22317, .adv_w = 392, .box_w = 25, .box_h = 25, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 22630, .adv_w = 392, .box_w = 25, .box_h = 29, .ofs_x = 0, .ofs_y = -4},
- {.bitmap_index = 22993, .adv_w = 392, .box_w = 25, .box_h = 25, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 23306, .adv_w = 280, .box_w = 19, .box_h = 29, .ofs_x = -1, .ofs_y = -4},
- {.bitmap_index = 23582, .adv_w = 392, .box_w = 25, .box_h = 29, .ofs_x = 0, .ofs_y = -4},
- {.bitmap_index = 23945, .adv_w = 392, .box_w = 25, .box_h = 29, .ofs_x = 0, .ofs_y = -4},
- {.bitmap_index = 24308, .adv_w = 504, .box_w = 32, .box_h = 21, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 24644, .adv_w = 448, .box_w = 30, .box_h = 29, .ofs_x = -1, .ofs_y = -4},
- {.bitmap_index = 25079, .adv_w = 336, .box_w = 21, .box_h = 29, .ofs_x = 0, .ofs_y = -4},
- {.bitmap_index = 25384, .adv_w = 560, .box_w = 35, .box_h = 26, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 25839, .adv_w = 560, .box_w = 35, .box_h = 19, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 26172, .adv_w = 560, .box_w = 35, .box_h = 19, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 26505, .adv_w = 560, .box_w = 35, .box_h = 19, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 26838, .adv_w = 560, .box_w = 35, .box_h = 19, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 27171, .adv_w = 560, .box_w = 35, .box_h = 19, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 27504, .adv_w = 560, .box_w = 36, .box_h = 23, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 27918, .adv_w = 392, .box_w = 22, .box_h = 29, .ofs_x = 1, .ofs_y = -4},
- {.bitmap_index = 28237, .adv_w = 392, .box_w = 25, .box_h = 29, .ofs_x = 0, .ofs_y = -4},
- {.bitmap_index = 28600, .adv_w = 448, .box_w = 29, .box_h = 29, .ofs_x = -1, .ofs_y = -4},
- {.bitmap_index = 29021, .adv_w = 560, .box_w = 35, .box_h = 21, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 29389, .adv_w = 336, .box_w = 21, .box_h = 29, .ofs_x = 0, .ofs_y = -4},
- {.bitmap_index = 29694, .adv_w = 451, .box_w = 29, .box_h = 19, .ofs_x = 0, .ofs_y = 1}
-};
-
-/*---------------------
- * CHARACTER MAPPING
- *--------------------*/
-
-static const uint16_t unicode_list_1[] = {
- 0x0, 0x7, 0xa, 0xb, 0xc, 0x10, 0x12, 0x14,
- 0x18, 0x1b, 0x20, 0x25, 0x26, 0x27, 0x3d, 0x47,
- 0x4a, 0x4b, 0x4c, 0x50, 0x51, 0x52, 0x53, 0x66,
- 0x67, 0x6d, 0x6f, 0x70, 0x73, 0x76, 0x77, 0x78,
- 0x7a, 0x92, 0x94, 0xc3, 0xc4, 0xc6, 0xe6, 0xe9,
- 0xf2, 0x11b, 0x123, 0x15a, 0x1ea, 0x23f, 0x240, 0x241,
- 0x242, 0x243, 0x286, 0x292, 0x2ec, 0x303, 0x559, 0x7c1,
- 0x8a1
-};
-
-/*Collect the unicode lists and glyph_id offsets*/
-static const lv_font_fmt_txt_cmap_t cmaps[] =
-{
- {
- .range_start = 32, .range_length = 95, .glyph_id_start = 1,
- .unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY
- },
- {
- .range_start = 61441, .range_length = 2210, .glyph_id_start = 96,
- .unicode_list = unicode_list_1, .glyph_id_ofs_list = NULL, .list_length = 57, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
- }
-};
-
-/*-----------------
- * KERNING
- *----------------*/
-
-
-/*Map glyph_ids to kern left classes*/
-static const uint8_t kern_left_class_mapping[] =
-{
- 0, 1, 0, 2, 0, 0, 0, 0,
- 2, 3, 0, 0, 0, 4, 0, 4,
- 5, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 6, 7, 8, 9, 10, 11,
- 0, 12, 12, 13, 14, 15, 12, 12,
- 9, 16, 17, 18, 0, 19, 13, 20,
- 21, 22, 23, 24, 25, 0, 0, 0,
- 0, 0, 26, 27, 28, 0, 29, 30,
- 0, 31, 0, 0, 32, 0, 31, 31,
- 33, 27, 0, 34, 0, 35, 0, 36,
- 37, 38, 36, 39, 40, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0
-};
-
-/*Map glyph_ids to kern right classes*/
-static const uint8_t kern_right_class_mapping[] =
-{
- 0, 1, 0, 2, 0, 0, 0, 3,
- 2, 0, 4, 5, 0, 6, 7, 6,
- 8, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 9, 0, 10, 0, 11, 0, 0, 0,
- 11, 0, 0, 12, 0, 0, 0, 0,
- 11, 0, 11, 0, 13, 14, 15, 16,
- 17, 18, 19, 20, 0, 0, 21, 0,
- 0, 0, 22, 0, 23, 23, 23, 24,
- 23, 0, 0, 0, 0, 0, 25, 25,
- 26, 25, 23, 27, 28, 29, 30, 31,
- 32, 33, 31, 34, 0, 0, 35, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0
-};
-
-/*Kern values between classes*/
-static const int8_t kern_class_values[] =
-{
- 0, 0, 0, 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0, 0, -48, -51, 0, 0, -17,
- -6, -52, -3, 4, 0, 4, 3, 0,
- 4, 0, 0, -25, -22, 0, -24, -22,
- -16, -25, 0, -21, -16, -12, -17, -13,
- 0, 0, 0, 0, 4, 0, -49, -8,
- 0, 0, -16, -3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 4, -10, -10,
- 0, 0, -10, -7, 0, 0, -6, -2,
- 0, 0, 0, 4, 0, 0, 0, 3,
- 0, -27, -13, 0, 0, -9, 0, 0,
- 0, 3, 0, 0, 0, 0, 0, 0,
- 3, -7, -7, 0, 0, -7, -5, 0,
- 0, -4, 0, 0, 0, 0, 3, 0,
- 0, 0, 0, 0, 0, -10, 0, 0,
- 0, -5, 0, 0, 0, 0, 3, 0,
- 0, 0, 0, 0, 0, -6, 0, 0,
- -5, 0, 0, 0, -5, -7, 0, 0,
- 0, 0, 0, 0, -7, 4, -11, -46,
- -11, 0, 0, -21, -6, -21, -3, 4,
- -21, 4, 4, 3, 4, 0, 4, -16,
- -14, -5, -9, -14, -9, -13, -5, -9,
- -4, 0, -5, -7, 4, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 3, -6,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, -5, 0, 0, -5, 0,
- 0, 0, -4, -6, -6, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, -4, 0, 0, -4, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, -15, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, -3, 0, 0, 0, 0, 0, -6,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, -2, 0, -3, -3,
- 0, 0, -2, 0, 0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
- 0, -27, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, -4, 0, 0,
- -4, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- -3, 0, 0, -3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- -4, 0, 0, -4, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0
-};
-
-
-/*Collect the kern class' data in one place*/
-static const lv_font_fmt_txt_kern_classes_t kern_classes =
-{
- .class_pair_values = kern_class_values,
- .left_class_mapping = kern_left_class_mapping,
- .right_class_mapping = kern_right_class_mapping,
- .left_class_cnt = 40,
- .right_class_cnt = 35,
-};
-
-/*--------------------
- * ALL CUSTOM DATA
- *--------------------*/
-
-/*Store all the custom data of the font*/
-static lv_font_fmt_txt_dsc_t font_dsc = {
- .glyph_bitmap = gylph_bitmap,
- .glyph_dsc = glyph_dsc,
- .cmaps = cmaps,
- .kern_dsc = &kern_classes,
- .kern_scale = 16,
- .cmap_num = 2,
- .bpp = 4,
- .kern_classes = 1,
- .bitmap_format = 0
-};
-
-
-/*-----------------
- * PUBLIC FONT
- *----------------*/
-
-/*Initialize a public general font descriptor*/
-lv_font_t lv_font_roboto_28 = {
- .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/
- .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/
- .line_height = 32, /*The maximum line height required by the font*/
- .base_line = 7, /*Baseline measured from the bottom of the line*/
- .subpx = LV_FONT_SUBPX_NONE,
- .dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
-};
-
-#endif /*#if LV_FONT_ROBOTO_28*/
-
diff --git a/src/libs/lvgl/src/lv_font/lv_font_roboto_28_compressed.c b/src/libs/lvgl/src/lv_font/lv_font_roboto_28_compressed.c
deleted file mode 100644
index 92e71479..00000000
--- a/src/libs/lvgl/src/lv_font/lv_font_roboto_28_compressed.c
+++ /dev/null
@@ -1,2451 +0,0 @@
-#include "../../lvgl.h"
-
-/*******************************************************************************
- * Size: 28 px
- * Bpp: 3
- * Opts: --bpp 3 --size 28 --font Roboto-Regular.woff -r 0x20-0x7F --font FontAwesome5-Solid+Brands+Regular.woff -r 61441,61448,61451,61452,61452,61453,61457,61459,61461,61465,61468,61473,61478,61479,61480,61502,61512,61515,61516,61517,61521,61522,61523,61524,61543,61544,61550,61552,61553,61556,61559,61560,61561,61563,61587,61589,61636,61637,61639,61671,61674,61683,61724,61732,61787,61931,62016,62017,62018,62019,62020,62087,62099,62212,62189,62810,63426,63650 --format lvgl -o lv_font_roboto_28_compressed.c --force-fast-kern-format
- ******************************************************************************/
-
-#ifndef LV_FONT_ROBOTO_28_COMPRESSED
-#define LV_FONT_ROBOTO_28_COMPRESSED 1
-#endif
-
-#if LV_FONT_ROBOTO_28_COMPRESSED
-
-/*-----------------
- * BITMAPS
- *----------------*/
-
-/*Store the image of the glyphs*/
-static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = {
- /* U+20 " " */
-
- /* U+21 "!" */
- 0xbf, 0x80, 0xff, 0xe3, 0x90, 0x38, 0x81, 0xff,
- 0xcf, 0x9b, 0x80, 0x24, 0x7, 0x2d, 0x4, 0x2c,
- 0xd0, 0x88,
-
- /* U+22 "\"" */
- 0x3f, 0x7, 0xd8, 0x1f, 0xcc, 0xf, 0xf1, 0x0,
- 0x40, 0xf7, 0x2, 0x65, 0x10, 0x51,
-
- /* U+23 "#" */
- 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0x20, 0x8, 0xc, 0x40, 0x10, 0x3e, 0xe0,
- 0x71, 0x4, 0xf, 0xfe, 0x89, 0x4, 0xf, 0xb8,
- 0x18, 0x80, 0x20, 0x64, 0x1, 0x1, 0xb0, 0x40,
- 0x72, 0x18, 0xc, 0x80, 0x30, 0x34, 0x10, 0xc,
- 0xc9, 0x30, 0x23, 0x7, 0x2, 0x38, 0x52, 0x4,
- 0xc5, 0x40, 0x65, 0x90, 0x1c,
-
- /* U+2A "*" */
- 0x3, 0xbf, 0x1, 0xff, 0xd2, 0xa8, 0xf, 0x18,
- 0x1a, 0xbe, 0x0, 0x7b, 0x1b, 0x26, 0x43, 0x1,
- 0x8, 0x44, 0xa6, 0xc2, 0x0, 0xdf, 0x50, 0x13,
- 0x20, 0xb, 0x3, 0xd4, 0x58, 0x38, 0x1d, 0x42,
- 0x46, 0x4a, 0x1, 0xea, 0x3, 0x82, 0x6, 0xb8,
- 0x8, 0xda, 0x0,
-
- /* U+2B "+" */
- 0x3, 0x8b, 0x60, 0x3f, 0xe5, 0x20, 0x81, 0xff,
- 0xf1, 0x4d, 0xee, 0x1, 0x37, 0x95, 0x93, 0x30,
- 0x12, 0x77, 0x3, 0xff, 0x85, 0xff, 0x40, 0x1b,
- 0xfd, 0x40, 0xff, 0xfd, 0x0,
-
- /* U+2C "," */
- 0xb, 0xf1, 0x3, 0xfe, 0x20, 0x8, 0xa1, 0x84,
- 0x44, 0x9, 0x28, 0x0,
-
- /* U+2D "-" */
- 0x3, 0xf4, 0xff, 0xc4, 0xf, 0xc0,
-
- /* U+2E "." */
- 0x13, 0xd0, 0xc, 0x20, 0xc, 0x20,
-
- /* U+2F "/" */
- 0x3, 0xf5, 0xf0, 0xf, 0xc8, 0x50, 0x3e, 0x60,
- 0x90, 0x1f, 0x51, 0x0, 0xf8, 0x90, 0x40, 0x7d,
- 0x43, 0x3, 0xf3, 0x14, 0xf, 0x90, 0x24, 0x7,
- 0xdc, 0x50, 0x3f, 0x20, 0xc0, 0xf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0, 0xfe, 0x60, 0x63, 0x80, 0xff,
- 0xe3, 0x1c, 0x7, 0xff, 0x1f, 0x1, 0xff, 0xe3,
- 0xdf, 0x82, 0xfc, 0xf, 0xe6, 0x7, 0xff, 0xfc,
- 0xf, 0xff, 0xf8, 0x1f, 0xff, 0xf0, 0x3f, 0xff,
- 0xe0, 0x7f, 0xf6, 0xd8, 0x1f, 0xfc, 0x77, 0x10,
- 0x1f, 0xfc, 0x57, 0x5, 0xd6, 0xff, 0xf0, 0xf4,
- 0x0,
-
- /* U+F8A2 "" */
- 0x3, 0xff, 0x9e, 0x80, 0xff, 0xe7, 0xca, 0x7,
- 0xff, 0x3a, 0x30, 0x3f, 0xf9, 0xd1, 0x81, 0xfc,
- 0xb2, 0x3, 0xff, 0x84, 0x58, 0x1f, 0xce, 0x98,
- 0x7, 0xff, 0x9, 0x81, 0xfd, 0x20, 0xf, 0xfe,
- 0x74, 0x60, 0x7f, 0xf3, 0xab, 0x3, 0xff, 0x9d,
- 0x50, 0x1c, 0x7f, 0xff, 0xe1, 0x50, 0x3a, 0xa0,
- 0x3f, 0xf9, 0xec, 0xf, 0xfe, 0x87, 0x3, 0xff,
- 0xa0, 0x79, 0x3, 0xd6, 0xff, 0xf1, 0xb8, 0x16,
- 0x20, 0x62, 0x97, 0xff, 0x18, 0xe, 0xc4, 0xf,
- 0xfe, 0x86, 0x40, 0x7f, 0xf4, 0x2a, 0x8, 0xf,
- 0xfe, 0x75, 0xf0, 0xf, 0xfe, 0x40
-};
-
-
-/*---------------------
- * GLYPH DESCRIPTION
- *--------------------*/
-
-static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
- {.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
- {.bitmap_index = 0, .adv_w = 111, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 0, .adv_w = 115, .box_w = 4, .box_h = 20, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 18, .adv_w = 143, .box_w = 7, .box_h = 7, .ofs_x = 1, .ofs_y = 14},
- {.bitmap_index = 32, .adv_w = 279, .box_w = 17, .box_h = 20, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 128, .adv_w = 252, .box_w = 14, .box_h = 26, .ofs_x = 1, .ofs_y = -3},
- {.bitmap_index = 236, .adv_w = 328, .box_w = 19, .box_h = 20, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 352, .adv_w = 278, .box_w = 17, .box_h = 20, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 463, .adv_w = 78, .box_w = 3, .box_h = 7, .ofs_x = 1, .ofs_y = 14},
- {.bitmap_index = 469, .adv_w = 153, .box_w = 9, .box_h = 30, .ofs_x = 1, .ofs_y = -7},
- {.bitmap_index = 543, .adv_w = 156, .box_w = 8, .box_h = 30, .ofs_x = 0, .ofs_y = -7},
- {.bitmap_index = 612, .adv_w = 193, .box_w = 12, .box_h = 12, .ofs_x = 0, .ofs_y = 8},
- {.bitmap_index = 655, .adv_w = 254, .box_w = 14, .box_h = 15, .ofs_x = 1, .ofs_y = 2},
- {.bitmap_index = 684, .adv_w = 88, .box_w = 5, .box_h = 7, .ofs_x = 0, .ofs_y = -4},
- {.bitmap_index = 696, .adv_w = 124, .box_w = 8, .box_h = 3, .ofs_x = 0, .ofs_y = 7},
- {.bitmap_index = 702, .adv_w = 118, .box_w = 5, .box_h = 3, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 708, .adv_w = 185, .box_w = 11, .box_h = 22, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 772, .adv_w = 252, .box_w = 14, .box_h = 20, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 852, .adv_w = 252, .box_w = 8, .box_h = 20, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 874, .adv_w = 252, .box_w = 14, .box_h = 20, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 953, .adv_w = 252, .box_w = 13, .box_h = 20, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1036, .adv_w = 252, .box_w = 16, .box_h = 20, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 1103, .adv_w = 252, .box_w = 13, .box_h = 20, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 1182, .adv_w = 251, .box_w = 14, .box_h = 20, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1271, .adv_w = 252, .box_w = 14, .box_h = 20, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1339, .adv_w = 252, .box_w = 14, .box_h = 20, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1438, .adv_w = 252, .box_w = 13, .box_h = 20, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1522, .adv_w = 109, .box_w = 4, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1535, .adv_w = 95, .box_w = 5, .box_h = 19, .ofs_x = 0, .ofs_y = -4},
- {.bitmap_index = 1558, .adv_w = 228, .box_w = 13, .box_h = 13, .ofs_x = 0, .ofs_y = 2},
- {.bitmap_index = 1608, .adv_w = 246, .box_w = 12, .box_h = 8, .ofs_x = 2, .ofs_y = 5},
- {.bitmap_index = 1629, .adv_w = 234, .box_w = 13, .box_h = 13, .ofs_x = 1, .ofs_y = 2},
- {.bitmap_index = 1682, .adv_w = 212, .box_w = 12, .box_h = 20, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 1749, .adv_w = 402, .box_w = 23, .box_h = 26, .ofs_x = 1, .ofs_y = -6},
- {.bitmap_index = 1936, .adv_w = 292, .box_w = 18, .box_h = 20, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2041, .adv_w = 279, .box_w = 14, .box_h = 20, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 2116, .adv_w = 292, .box_w = 16, .box_h = 20, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2204, .adv_w = 294, .box_w = 15, .box_h = 20, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 2272, .adv_w = 255, .box_w = 13, .box_h = 20, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 2306, .adv_w = 248, .box_w = 13, .box_h = 20, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 2335, .adv_w = 305, .box_w = 17, .box_h = 20, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2433, .adv_w = 319, .box_w = 16, .box_h = 20, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 2459, .adv_w = 122, .box_w = 4, .box_h = 20, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 2464, .adv_w = 247, .box_w = 14, .box_h = 20, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 2507, .adv_w = 281, .box_w = 16, .box_h = 20, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 2593, .adv_w = 241, .box_w = 13, .box_h = 20, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 2611, .adv_w = 391, .box_w = 21, .box_h = 20, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 2724, .adv_w = 319, .box_w = 16, .box_h = 20, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 2806, .adv_w = 308, .box_w = 17, .box_h = 20, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 2905, .adv_w = 283, .box_w = 15, .box_h = 20, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 2962, .adv_w = 308, .box_w = 17, .box_h = 24, .ofs_x = 1, .ofs_y = -4},
- {.bitmap_index = 3087, .adv_w = 276, .box_w = 15, .box_h = 20, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 3164, .adv_w = 266, .box_w = 15, .box_h = 20, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 3261, .adv_w = 267, .box_w = 17, .box_h = 20, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 3288, .adv_w = 291, .box_w = 16, .box_h = 20, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 3334, .adv_w = 285, .box_w = 18, .box_h = 20, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 3441, .adv_w = 397, .box_w = 25, .box_h = 20, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 3602, .adv_w = 281, .box_w = 17, .box_h = 20, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 3707, .adv_w = 269, .box_w = 17, .box_h = 20, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 3782, .adv_w = 268, .box_w = 15, .box_h = 20, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 3857, .adv_w = 119, .box_w = 6, .box_h = 27, .ofs_x = 2, .ofs_y = -4},
- {.bitmap_index = 3871, .adv_w = 184, .box_w = 12, .box_h = 22, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 3938, .adv_w = 119, .box_w = 6, .box_h = 27, .ofs_x = 0, .ofs_y = -4},
- {.bitmap_index = 3954, .adv_w = 187, .box_w = 11, .box_h = 10, .ofs_x = 0, .ofs_y = 10},
- {.bitmap_index = 3991, .adv_w = 202, .box_w = 13, .box_h = 3, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 4000, .adv_w = 138, .box_w = 7, .box_h = 4, .ofs_x = 0, .ofs_y = 17},
- {.bitmap_index = 4010, .adv_w = 244, .box_w = 13, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 4077, .adv_w = 251, .box_w = 14, .box_h = 21, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 4146, .adv_w = 235, .box_w = 13, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 4207, .adv_w = 253, .box_w = 13, .box_h = 21, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 4273, .adv_w = 237, .box_w = 13, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 4336, .adv_w = 156, .box_w = 10, .box_h = 22, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 4370, .adv_w = 251, .box_w = 13, .box_h = 21, .ofs_x = 1, .ofs_y = -6},
- {.bitmap_index = 4460, .adv_w = 247, .box_w = 13, .box_h = 21, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 4496, .adv_w = 109, .box_w = 4, .box_h = 20, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 4508, .adv_w = 107, .box_w = 6, .box_h = 26, .ofs_x = -1, .ofs_y = -6},
- {.bitmap_index = 4534, .adv_w = 227, .box_w = 14, .box_h = 21, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 4596, .adv_w = 109, .box_w = 3, .box_h = 21, .ofs_x = 2, .ofs_y = 0},
- {.bitmap_index = 4600, .adv_w = 393, .box_w = 22, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 4655, .adv_w = 247, .box_w = 13, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 4688, .adv_w = 256, .box_w = 14, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 4757, .adv_w = 251, .box_w = 14, .box_h = 21, .ofs_x = 1, .ofs_y = -6},
- {.bitmap_index = 4827, .adv_w = 255, .box_w = 13, .box_h = 21, .ofs_x = 1, .ofs_y = -6},
- {.bitmap_index = 4894, .adv_w = 152, .box_w = 9, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 4915, .adv_w = 231, .box_w = 13, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 4985, .adv_w = 146, .box_w = 9, .box_h = 19, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 5017, .adv_w = 247, .box_w = 13, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 5047, .adv_w = 217, .box_w = 14, .box_h = 15, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 5114, .adv_w = 337, .box_w = 21, .box_h = 15, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 5222, .adv_w = 222, .box_w = 14, .box_h = 15, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 5292, .adv_w = 212, .box_w = 13, .box_h = 21, .ofs_x = 0, .ofs_y = -6},
- {.bitmap_index = 5377, .adv_w = 222, .box_w = 12, .box_h = 15, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 5426, .adv_w = 152, .box_w = 10, .box_h = 28, .ofs_x = 0, .ofs_y = -6},
- {.bitmap_index = 5493, .adv_w = 109, .box_w = 3, .box_h = 24, .ofs_x = 2, .ofs_y = -4},
- {.bitmap_index = 5499, .adv_w = 152, .box_w = 9, .box_h = 28, .ofs_x = 0, .ofs_y = -6},
- {.bitmap_index = 5567, .adv_w = 305, .box_w = 17, .box_h = 6, .ofs_x = 1, .ofs_y = 5},
- {.bitmap_index = 5602, .adv_w = 448, .box_w = 28, .box_h = 29, .ofs_x = 0, .ofs_y = -4},
- {.bitmap_index = 5739, .adv_w = 448, .box_w = 28, .box_h = 21, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 5876, .adv_w = 448, .box_w = 28, .box_h = 25, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 5972, .adv_w = 448, .box_w = 28, .box_h = 21, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 6105, .adv_w = 308, .box_w = 20, .box_h = 21, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 6221, .adv_w = 448, .box_w = 28, .box_h = 29, .ofs_x = 0, .ofs_y = -4},
- {.bitmap_index = 6419, .adv_w = 448, .box_w = 27, .box_h = 29, .ofs_x = 1, .ofs_y = -4},
- {.bitmap_index = 6592, .adv_w = 504, .box_w = 32, .box_h = 25, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 6758, .adv_w = 448, .box_w = 28, .box_h = 29, .ofs_x = 0, .ofs_y = -4},
- {.bitmap_index = 6887, .adv_w = 504, .box_w = 32, .box_h = 21, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 7012, .adv_w = 448, .box_w = 28, .box_h = 29, .ofs_x = 0, .ofs_y = -4},
- {.bitmap_index = 7206, .adv_w = 224, .box_w = 14, .box_h = 23, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 7258, .adv_w = 336, .box_w = 21, .box_h = 23, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 7354, .adv_w = 504, .box_w = 32, .box_h = 27, .ofs_x = 0, .ofs_y = -3},
- {.bitmap_index = 7568, .adv_w = 448, .box_w = 28, .box_h = 21, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 7674, .adv_w = 392, .box_w = 18, .box_h = 26, .ofs_x = 3, .ofs_y = -3},
- {.bitmap_index = 7767, .adv_w = 392, .box_w = 25, .box_h = 29, .ofs_x = 0, .ofs_y = -4},
- {.bitmap_index = 7888, .adv_w = 392, .box_w = 25, .box_h = 25, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 7952, .adv_w = 392, .box_w = 25, .box_h = 25, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 7995, .adv_w = 392, .box_w = 18, .box_h = 26, .ofs_x = 3, .ofs_y = -3},
- {.bitmap_index = 8088, .adv_w = 392, .box_w = 26, .box_h = 25, .ofs_x = -1, .ofs_y = -2},
- {.bitmap_index = 8200, .adv_w = 280, .box_w = 16, .box_h = 25, .ofs_x = 1, .ofs_y = -2},
- {.bitmap_index = 8305, .adv_w = 280, .box_w = 16, .box_h = 25, .ofs_x = 1, .ofs_y = -2},
- {.bitmap_index = 8409, .adv_w = 392, .box_w = 25, .box_h = 25, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 8483, .adv_w = 392, .box_w = 25, .box_h = 7, .ofs_x = 0, .ofs_y = 7},
- {.bitmap_index = 8512, .adv_w = 504, .box_w = 32, .box_h = 21, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 8700, .adv_w = 560, .box_w = 35, .box_h = 29, .ofs_x = 0, .ofs_y = -4},
- {.bitmap_index = 8960, .adv_w = 504, .box_w = 33, .box_h = 29, .ofs_x = -1, .ofs_y = -4},
- {.bitmap_index = 9148, .adv_w = 448, .box_w = 28, .box_h = 25, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 9326, .adv_w = 392, .box_w = 25, .box_h = 15, .ofs_x = 0, .ofs_y = 3},
- {.bitmap_index = 9423, .adv_w = 392, .box_w = 25, .box_h = 15, .ofs_x = 0, .ofs_y = 3},
- {.bitmap_index = 9523, .adv_w = 560, .box_w = 35, .box_h = 22, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 9672, .adv_w = 448, .box_w = 28, .box_h = 21, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 9726, .adv_w = 448, .box_w = 28, .box_h = 29, .ofs_x = 0, .ofs_y = -4},
- {.bitmap_index = 9856, .adv_w = 448, .box_w = 29, .box_h = 29, .ofs_x = -1, .ofs_y = -4},
- {.bitmap_index = 10028, .adv_w = 392, .box_w = 25, .box_h = 25, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 10207, .adv_w = 392, .box_w = 25, .box_h = 29, .ofs_x = 0, .ofs_y = -4},
- {.bitmap_index = 10294, .adv_w = 392, .box_w = 25, .box_h = 25, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 10399, .adv_w = 280, .box_w = 19, .box_h = 29, .ofs_x = -1, .ofs_y = -4},
- {.bitmap_index = 10530, .adv_w = 392, .box_w = 25, .box_h = 29, .ofs_x = 0, .ofs_y = -4},
- {.bitmap_index = 10632, .adv_w = 392, .box_w = 25, .box_h = 29, .ofs_x = 0, .ofs_y = -4},
- {.bitmap_index = 10765, .adv_w = 504, .box_w = 32, .box_h = 21, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 10897, .adv_w = 448, .box_w = 30, .box_h = 29, .ofs_x = -1, .ofs_y = -4},
- {.bitmap_index = 11048, .adv_w = 336, .box_w = 21, .box_h = 29, .ofs_x = 0, .ofs_y = -4},
- {.bitmap_index = 11113, .adv_w = 560, .box_w = 35, .box_h = 26, .ofs_x = 0, .ofs_y = -2},
- {.bitmap_index = 11313, .adv_w = 560, .box_w = 35, .box_h = 19, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 11397, .adv_w = 560, .box_w = 35, .box_h = 19, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 11482, .adv_w = 560, .box_w = 35, .box_h = 19, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 11567, .adv_w = 560, .box_w = 35, .box_h = 19, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 11649, .adv_w = 560, .box_w = 35, .box_h = 19, .ofs_x = 0, .ofs_y = 1},
- {.bitmap_index = 11725, .adv_w = 560, .box_w = 36, .box_h = 23, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 11886, .adv_w = 392, .box_w = 22, .box_h = 29, .ofs_x = 1, .ofs_y = -4},
- {.bitmap_index = 12070, .adv_w = 392, .box_w = 25, .box_h = 29, .ofs_x = 0, .ofs_y = -4},
- {.bitmap_index = 12166, .adv_w = 448, .box_w = 29, .box_h = 29, .ofs_x = -1, .ofs_y = -4},
- {.bitmap_index = 12353, .adv_w = 560, .box_w = 35, .box_h = 21, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 12518, .adv_w = 336, .box_w = 21, .box_h = 29, .ofs_x = 0, .ofs_y = -4},
- {.bitmap_index = 12591, .adv_w = 451, .box_w = 29, .box_h = 19, .ofs_x = 0, .ofs_y = 1}
-};
-
-/*---------------------
- * CHARACTER MAPPING
- *--------------------*/
-
-static const uint16_t unicode_list_1[] = {
- 0x0, 0x7, 0xa, 0xb, 0xc, 0x10, 0x12, 0x14,
- 0x18, 0x1b, 0x20, 0x25, 0x26, 0x27, 0x3d, 0x47,
- 0x4a, 0x4b, 0x4c, 0x50, 0x51, 0x52, 0x53, 0x66,
- 0x67, 0x6d, 0x6f, 0x70, 0x73, 0x76, 0x77, 0x78,
- 0x7a, 0x92, 0x94, 0xc3, 0xc4, 0xc6, 0xe6, 0xe9,
- 0xf2, 0x11b, 0x123, 0x15a, 0x1ea, 0x23f, 0x240, 0x241,
- 0x242, 0x243, 0x286, 0x292, 0x2ec, 0x303, 0x559, 0x7c1,
- 0x8a1
-};
-
-/*Collect the unicode lists and glyph_id offsets*/
-static const lv_font_fmt_txt_cmap_t cmaps[] =
-{
- {
- .range_start = 32, .range_length = 95, .glyph_id_start = 1,
- .unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY
- },
- {
- .range_start = 61441, .range_length = 2210, .glyph_id_start = 96,
- .unicode_list = unicode_list_1, .glyph_id_ofs_list = NULL, .list_length = 57, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
- }
-};
-
-/*-----------------
- * KERNING
- *----------------*/
-
-
-/*Map glyph_ids to kern left classes*/
-static const uint8_t kern_left_class_mapping[] =
-{
- 0, 1, 0, 2, 0, 0, 0, 0,
- 2, 3, 0, 0, 0, 4, 0, 4,
- 5, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 6, 7, 8, 9, 10, 11,
- 0, 12, 12, 13, 14, 15, 12, 12,
- 9, 16, 17, 18, 0, 19, 13, 20,
- 21, 22, 23, 24, 25, 0, 0, 0,
- 0, 0, 26, 27, 28, 0, 29, 30,
- 0, 31, 0, 0, 32, 0, 31, 31,
- 33, 27, 0, 34, 0, 35, 0, 36,
- 37, 38, 36, 39, 40, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0
-};
-
-/*Map glyph_ids to kern right classes*/
-static const uint8_t kern_right_class_mapping[] =
-{
- 0, 1, 0, 2, 0, 0, 0, 3,
- 2, 0, 4, 5, 0, 6, 7, 6,
- 8, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 9, 0, 10, 0, 11, 0, 0, 0,
- 11, 0, 0, 12, 0, 0, 0, 0,
- 11, 0, 11, 0, 13, 14, 15, 16,
- 17, 18, 19, 20, 0, 0, 21, 0,
- 0, 0, 22, 0, 23, 23, 23, 24,
- 23, 0, 0, 0, 0, 0, 25, 25,
- 26, 25, 23, 27, 28, 29, 30, 31,
- 32, 33, 31, 34, 0, 0, 35, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0
-};
-
-/*Kern values between classes*/
-static const int8_t kern_class_values[] =
-{
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, -9, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, -23, 0, 0, 0,
- 0, 0, 0, 0, -26, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- -11, -13, 0, -4, -13, 0, -17, 0,
- 0, 0, 2, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 4, 4, 0,
- 5, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, -37, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0,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0, 0, 0, 0,
- 0, 0, 0, 0, 0, -14, 0, 0,
- 0, -7, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, -6, 0, -5,
- -6, 0, 0, 0, -5, -9, -14, 0,
- 0, 0, 0, -73, 0, 0, 0, 0,
- 0, 0, 0, 4, -14, 0, 0, -60,
- -12, -38, -31, 0, -52, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, -10,
- -29, -20, 0, 0, 0, 0, 0, 0,
- 0, 0, -71, 0, 0, 0, -30, 0,
- -44, 0, 0, 0, 0, 0, -7, 0,
- -6, 0, -2, -3, 0, 0, -3, 0,
- 0, 3, 0, 3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, -9, 0, -6,
- -4, 0, -8, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- -17, 0, -4, 0, 0, -10, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, -9, 0,
- 0, 0, 0, -48, -51, 0, 0, -17,
- -6, -52, -3, 4, 0, 4, 3, 0,
- 4, 0, 0, -25, -22, 0, -24, -22,
- -16, -25, 0, -21, -16, -12, -17, -13,
- 0, 0, 0, 0, 4, 0, -49, -8,
- 0, 0, -16, -3, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 4, -10, -10,
- 0, 0, -10, -7, 0, 0, -6, -2,
- 0, 0, 0, 4, 0, 0, 0, 3,
- 0, -27, -13, 0, 0, -9, 0, 0,
- 0, 3, 0, 0, 0, 0, 0, 0,
- 3, -7, -7, 0, 0, -7, -5, 0,
- 0, -4, 0, 0, 0, 0, 3, 0,
- 0, 0, 0, 0, 0, -10, 0, 0,
- 0, -5, 0, 0, 0, 0, 3, 0,
- 0, 0, 0, 0, 0, -6, 0, 0,
- -5, 0, 0, 0, -5, -7, 0, 0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, 0, 0
-};
-
-
-/*Collect the kern class' data in one place*/
-static const lv_font_fmt_txt_kern_classes_t kern_classes =
-{
- .class_pair_values = kern_class_values,
- .left_class_mapping = kern_left_class_mapping,
- .right_class_mapping = kern_right_class_mapping,
- .left_class_cnt = 40,
- .right_class_cnt = 35,
-};
-
-/*--------------------
- * ALL CUSTOM DATA
- *--------------------*/
-
-/*Store all the custom data of the font*/
-static lv_font_fmt_txt_dsc_t font_dsc = {
- .glyph_bitmap = gylph_bitmap,
- .glyph_dsc = glyph_dsc,
- .cmaps = cmaps,
- .kern_dsc = &kern_classes,
- .kern_scale = 16,
- .cmap_num = 2,
- .bpp = 3,
- .kern_classes = 1,
- .bitmap_format = 1
-};
-
-
-/*-----------------
- * PUBLIC FONT
- *----------------*/
-
-/*Initialize a public general font descriptor*/
-lv_font_t lv_font_roboto_28_compressed = {
- .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/
- .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/
- .line_height = 32, /*The maximum line height required by the font*/
- .base_line = 7, /*Baseline measured from the bottom of the line*/
- .subpx = LV_FONT_SUBPX_NONE,
- .dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
-};
-
-#endif /*#if LV_FONT_ROBOTO_28_COMPRESSED*/
-
diff --git a/src/libs/lvgl/src/lv_font/lv_font_unscii_8.c b/src/libs/lvgl/src/lv_font/lv_font_unscii_8.c
deleted file mode 100644
index 1b96823e..00000000
--- a/src/libs/lvgl/src/lv_font/lv_font_unscii_8.c
+++ /dev/null
@@ -1,462 +0,0 @@
-#include "../../lvgl.h"
-
-/*******************************************************************************
- * Size: 8 px
- * Bpp: 1
- * Opts:
- ******************************************************************************/
-
-#ifndef LV_FONT_UNSCII_8
-#define LV_FONT_UNSCII_8 1
-#endif
-
-#if LV_FONT_UNSCII_8
-
-/*-----------------
- * BITMAPS
- *----------------*/
-
-/*Store the image of the glyphs*/
-static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = {
- /* U+20 " " */
-
- /* U+21 "!" */
- 0xf2,
-
- /* U+22 "\"" */
- 0x99, 0x90,
-
- /* U+23 "#" */
- 0x49, 0x2f, 0xd2, 0xfd, 0x24, 0x80,
-
- /* U+24 "$" */
- 0x23, 0xe8, 0xe2, 0xf8, 0x80,
-
- /* U+25 "%" */
- 0xc7, 0x21, 0x8, 0x4e, 0x30,
-
- /* U+26 "&" */
- 0x62, 0x49, 0x18, 0x96, 0x27, 0x40,
-
- /* U+27 "'" */
- 0x2a, 0x0,
-
- /* U+28 "(" */
- 0x2a, 0x48, 0x88,
-
- /* U+29 ")" */
- 0x88, 0x92, 0xa0,
-
- /* U+2A "*" */
- 0x25, 0x5c, 0x47, 0x54, 0x80,
-
- /* U+2B "+" */
- 0x21, 0x3e, 0x42, 0x0,
-
- /* U+2C "," */
- 0x58,
-
- /* U+2D "-" */
- 0xf8,
-
- /* U+2E "." */
- 0x80,
-
- /* U+2F "/" */
- 0x2, 0x8, 0x20, 0x82, 0x8, 0x20, 0x0,
-
- /* U+30 "0" */
- 0x74, 0x67, 0x5c, 0xc5, 0xc0,
-
- /* U+31 "1" */
- 0x23, 0x28, 0x42, 0x13, 0xe0,
-
- /* U+32 "2" */
- 0x74, 0x42, 0x26, 0x43, 0xe0,
-
- /* U+33 "3" */
- 0x74, 0x42, 0x60, 0xc5, 0xc0,
-
- /* U+34 "4" */
- 0x11, 0x95, 0x2f, 0x88, 0x40,
-
- /* U+35 "5" */
- 0xfc, 0x3c, 0x10, 0xc5, 0xc0,
-
- /* U+36 "6" */
- 0x3a, 0x21, 0xe8, 0xc5, 0xc0,
-
- /* U+37 "7" */
- 0xf8, 0x44, 0x44, 0x21, 0x0,
-
- /* U+38 "8" */
- 0x74, 0x62, 0xe8, 0xc5, 0xc0,
-
- /* U+39 "9" */
- 0x74, 0x62, 0xf0, 0x8b, 0x80,
-
- /* U+3A ":" */
- 0x90,
-
- /* U+3B ";" */
- 0x41, 0x60,
-
- /* U+3C "<" */
- 0x12, 0x48, 0x42, 0x10,
-
- /* U+3D "=" */
- 0xf8, 0x3e,
-
- /* U+3E ">" */
- 0x84, 0x21, 0x24, 0x80,
-
- /* U+3F "?" */
- 0x7a, 0x10, 0x84, 0x10, 0x1, 0x0,
-
- /* U+40 "@" */
- 0x7a, 0x19, 0x6b, 0x9a, 0x7, 0x80,
-
- /* U+41 "A" */
- 0x31, 0x28, 0x7f, 0x86, 0x18, 0x40,
-
- /* U+42 "B" */
- 0xfa, 0x18, 0x7e, 0x86, 0x1f, 0x80,
-
- /* U+43 "C" */
- 0x7a, 0x18, 0x20, 0x82, 0x17, 0x80,
-
- /* U+44 "D" */
- 0xf2, 0x28, 0x61, 0x86, 0x2f, 0x0,
-
- /* U+45 "E" */
- 0xfe, 0x8, 0x3c, 0x82, 0xf, 0xc0,
-
- /* U+46 "F" */
- 0xfe, 0x8, 0x3c, 0x82, 0x8, 0x0,
-
- /* U+47 "G" */
- 0x7a, 0x18, 0x27, 0x86, 0x17, 0x80,
-
- /* U+48 "H" */
- 0x86, 0x18, 0x7f, 0x86, 0x18, 0x40,
-
- /* U+49 "I" */
- 0xe9, 0x24, 0xb8,
-
- /* U+4A "J" */
- 0x8, 0x42, 0x10, 0xc5, 0xc0,
-
- /* U+4B "K" */
- 0x86, 0x29, 0x38, 0x92, 0x28, 0x40,
-
- /* U+4C "L" */
- 0x82, 0x8, 0x20, 0x82, 0xf, 0xc0,
-
- /* U+4D "M" */
- 0x87, 0x3b, 0x61, 0x86, 0x18, 0x40,
-
- /* U+4E "N" */
- 0x87, 0x1a, 0x65, 0x8e, 0x18, 0x40,
-
- /* U+4F "O" */
- 0x7a, 0x18, 0x61, 0x86, 0x17, 0x80,
-
- /* U+50 "P" */
- 0xfa, 0x18, 0x7e, 0x82, 0x8, 0x0,
-
- /* U+51 "Q" */
- 0x7a, 0x18, 0x61, 0x96, 0x27, 0x40,
-
- /* U+52 "R" */
- 0xfa, 0x18, 0x7e, 0x92, 0x28, 0x40,
-
- /* U+53 "S" */
- 0x7a, 0x18, 0x1e, 0x6, 0x17, 0x80,
-
- /* U+54 "T" */
- 0xf9, 0x8, 0x42, 0x10, 0x80,
-
- /* U+55 "U" */
- 0x86, 0x18, 0x61, 0x86, 0x17, 0x80,
-
- /* U+56 "V" */
- 0x86, 0x18, 0x61, 0x85, 0x23, 0x0,
-
- /* U+57 "W" */
- 0x86, 0x18, 0x61, 0xb7, 0x38, 0x40,
-
- /* U+58 "X" */
- 0x86, 0x14, 0x8c, 0x4a, 0x18, 0x40,
-
- /* U+59 "Y" */
- 0x8c, 0x62, 0xe2, 0x10, 0x80,
-
- /* U+5A "Z" */
- 0xf8, 0x44, 0x44, 0x43, 0xe0,
-
- /* U+5B "[" */
- 0xf2, 0x49, 0x38,
-
- /* U+5C "\\" */
- 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
-
- /* U+5D "]" */
- 0xe4, 0x92, 0x78,
-
- /* U+5E "^" */
- 0x22, 0xa2,
-
- /* U+5F "_" */
- 0xf8,
-
- /* U+60 "`" */
- 0x88, 0x80,
-
- /* U+61 "a" */
- 0x70, 0x5f, 0x17, 0x80,
-
- /* U+62 "b" */
- 0x84, 0x3d, 0x18, 0xc7, 0xc0,
-
- /* U+63 "c" */
- 0x74, 0x61, 0x17, 0x0,
-
- /* U+64 "d" */
- 0x8, 0x5f, 0x18, 0xc5, 0xe0,
-
- /* U+65 "e" */
- 0x74, 0x7f, 0x7, 0x0,
-
- /* U+66 "f" */
- 0x18, 0x92, 0x3e, 0x20, 0x82, 0x0,
-
- /* U+67 "g" */
- 0x7c, 0x62, 0xf0, 0xb8,
-
- /* U+68 "h" */
- 0x84, 0x3d, 0x18, 0xc6, 0x20,
-
- /* U+69 "i" */
- 0x43, 0x24, 0xb8,
-
- /* U+6A "j" */
- 0x10, 0x31, 0x11, 0x96,
-
- /* U+6B "k" */
- 0x84, 0x23, 0x2e, 0x4a, 0x20,
-
- /* U+6C "l" */
- 0xc9, 0x24, 0xb8,
-
- /* U+6D "m" */
- 0xd5, 0x6b, 0x5a, 0x80,
-
- /* U+6E "n" */
- 0xf4, 0x63, 0x18, 0x80,
-
- /* U+6F "o" */
- 0x74, 0x63, 0x17, 0x0,
-
- /* U+70 "p" */
- 0xf4, 0x63, 0xe8, 0x40,
-
- /* U+71 "q" */
- 0x7c, 0x62, 0xf0, 0x84,
-
- /* U+72 "r" */
- 0xbe, 0x21, 0x8, 0x0,
-
- /* U+73 "s" */
- 0x7c, 0x1c, 0x1f, 0x0,
-
- /* U+74 "t" */
- 0x42, 0x3c, 0x84, 0x24, 0xc0,
-
- /* U+75 "u" */
- 0x8c, 0x63, 0x17, 0x0,
-
- /* U+76 "v" */
- 0x8c, 0x62, 0xa2, 0x0,
-
- /* U+77 "w" */
- 0x8d, 0x6b, 0x55, 0x0,
-
- /* U+78 "x" */
- 0x8a, 0x88, 0xa8, 0x80,
-
- /* U+79 "y" */
- 0x8c, 0x62, 0xf0, 0xb8,
-
- /* U+7A "z" */
- 0xf8, 0x88, 0x8f, 0x80,
-
- /* U+7B "{" */
- 0x34, 0x48, 0x44, 0x30,
-
- /* U+7C "|" */
- 0xff,
-
- /* U+7D "}" */
- 0xc2, 0x21, 0x22, 0xc0,
-
- /* U+7E "~" */
- 0x45, 0x44,
-
- /* U+7F "" */
- 0xc1, 0x42, 0xbd, 0x2c, 0x40, 0x81, 0x0
-};
-
-
-/*---------------------
- * GLYPH DESCRIPTION
- *--------------------*/
-
-static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
- {.bitmap_index = 0, .adv_w = 0, .box_h = 0, .box_w = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
- {.bitmap_index = 0, .adv_w = 128, .box_h = 0, .box_w = 0, .ofs_x = 0, .ofs_y = 0},
- {.bitmap_index = 0, .adv_w = 128, .box_h = 7, .box_w = 1, .ofs_x = 3, .ofs_y = -1},
- {.bitmap_index = 1, .adv_w = 128, .box_h = 3, .box_w = 4, .ofs_x = 2, .ofs_y = 3},
- {.bitmap_index = 3, .adv_w = 128, .box_h = 7, .box_w = 6, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 9, .adv_w = 128, .box_h = 7, .box_w = 5, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 14, .adv_w = 128, .box_h = 6, .box_w = 6, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 19, .adv_w = 128, .box_h = 7, .box_w = 6, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 25, .adv_w = 128, .box_h = 3, .box_w = 3, .ofs_x = 2, .ofs_y = 3},
- {.bitmap_index = 27, .adv_w = 128, .box_h = 7, .box_w = 3, .ofs_x = 2, .ofs_y = -1},
- {.bitmap_index = 30, .adv_w = 128, .box_h = 7, .box_w = 3, .ofs_x = 2, .ofs_y = -1},
- {.bitmap_index = 33, .adv_w = 128, .box_h = 7, .box_w = 5, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 38, .adv_w = 128, .box_h = 5, .box_w = 5, .ofs_x = 1, .ofs_y = 0},
- {.bitmap_index = 42, .adv_w = 128, .box_h = 3, .box_w = 2, .ofs_x = 3, .ofs_y = -2},
- {.bitmap_index = 43, .adv_w = 128, .box_h = 1, .box_w = 5, .ofs_x = 1, .ofs_y = 1},
- {.bitmap_index = 44, .adv_w = 128, .box_h = 1, .box_w = 1, .ofs_x = 3, .ofs_y = -1},
- {.bitmap_index = 45, .adv_w = 128, .box_h = 7, .box_w = 7, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 52, .adv_w = 128, .box_h = 7, .box_w = 5, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 57, .adv_w = 128, .box_h = 7, .box_w = 5, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 62, .adv_w = 128, .box_h = 7, .box_w = 5, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 67, .adv_w = 128, .box_h = 7, .box_w = 5, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 72, .adv_w = 128, .box_h = 7, .box_w = 5, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 77, .adv_w = 128, .box_h = 7, .box_w = 5, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 82, .adv_w = 128, .box_h = 7, .box_w = 5, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 87, .adv_w = 128, .box_h = 7, .box_w = 5, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 92, .adv_w = 128, .box_h = 7, .box_w = 5, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 97, .adv_w = 128, .box_h = 7, .box_w = 5, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 102, .adv_w = 128, .box_h = 4, .box_w = 1, .ofs_x = 3, .ofs_y = 0},
- {.bitmap_index = 103, .adv_w = 128, .box_h = 6, .box_w = 2, .ofs_x = 2, .ofs_y = -2},
- {.bitmap_index = 105, .adv_w = 128, .box_h = 7, .box_w = 4, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 109, .adv_w = 128, .box_h = 3, .box_w = 5, .ofs_x = 1, .ofs_y = 1},
- {.bitmap_index = 111, .adv_w = 128, .box_h = 7, .box_w = 4, .ofs_x = 2, .ofs_y = -1},
- {.bitmap_index = 115, .adv_w = 128, .box_h = 7, .box_w = 6, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 121, .adv_w = 128, .box_h = 7, .box_w = 6, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 127, .adv_w = 128, .box_h = 7, .box_w = 6, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 133, .adv_w = 128, .box_h = 7, .box_w = 6, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 139, .adv_w = 128, .box_h = 7, .box_w = 6, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 145, .adv_w = 128, .box_h = 7, .box_w = 6, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 151, .adv_w = 128, .box_h = 7, .box_w = 6, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 157, .adv_w = 128, .box_h = 7, .box_w = 6, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 163, .adv_w = 128, .box_h = 7, .box_w = 6, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 169, .adv_w = 128, .box_h = 7, .box_w = 6, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 175, .adv_w = 128, .box_h = 7, .box_w = 3, .ofs_x = 2, .ofs_y = -1},
- {.bitmap_index = 178, .adv_w = 128, .box_h = 7, .box_w = 5, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 183, .adv_w = 128, .box_h = 7, .box_w = 6, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 189, .adv_w = 128, .box_h = 7, .box_w = 6, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 195, .adv_w = 128, .box_h = 7, .box_w = 6, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 201, .adv_w = 128, .box_h = 7, .box_w = 6, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 207, .adv_w = 128, .box_h = 7, .box_w = 6, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 213, .adv_w = 128, .box_h = 7, .box_w = 6, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 219, .adv_w = 128, .box_h = 7, .box_w = 6, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 225, .adv_w = 128, .box_h = 7, .box_w = 6, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 231, .adv_w = 128, .box_h = 7, .box_w = 6, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 237, .adv_w = 128, .box_h = 7, .box_w = 5, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 242, .adv_w = 128, .box_h = 7, .box_w = 6, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 248, .adv_w = 128, .box_h = 7, .box_w = 6, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 254, .adv_w = 128, .box_h = 7, .box_w = 6, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 260, .adv_w = 128, .box_h = 7, .box_w = 6, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 266, .adv_w = 128, .box_h = 7, .box_w = 5, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 271, .adv_w = 128, .box_h = 7, .box_w = 5, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 276, .adv_w = 128, .box_h = 7, .box_w = 3, .ofs_x = 2, .ofs_y = -1},
- {.bitmap_index = 279, .adv_w = 128, .box_h = 7, .box_w = 7, .ofs_x = 0, .ofs_y = -1},
- {.bitmap_index = 286, .adv_w = 128, .box_h = 7, .box_w = 3, .ofs_x = 2, .ofs_y = -1},
- {.bitmap_index = 289, .adv_w = 128, .box_h = 3, .box_w = 5, .ofs_x = 1, .ofs_y = 3},
- {.bitmap_index = 291, .adv_w = 128, .box_h = 1, .box_w = 5, .ofs_x = 1, .ofs_y = -2},
- {.bitmap_index = 292, .adv_w = 128, .box_h = 3, .box_w = 3, .ofs_x = 2, .ofs_y = 3},
- {.bitmap_index = 294, .adv_w = 128, .box_h = 5, .box_w = 5, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 298, .adv_w = 128, .box_h = 7, .box_w = 5, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 303, .adv_w = 128, .box_h = 5, .box_w = 5, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 307, .adv_w = 128, .box_h = 7, .box_w = 5, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 312, .adv_w = 128, .box_h = 5, .box_w = 5, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 316, .adv_w = 128, .box_h = 7, .box_w = 6, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 322, .adv_w = 128, .box_h = 6, .box_w = 5, .ofs_x = 1, .ofs_y = -2},
- {.bitmap_index = 326, .adv_w = 128, .box_h = 7, .box_w = 5, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 331, .adv_w = 128, .box_h = 7, .box_w = 3, .ofs_x = 2, .ofs_y = -1},
- {.bitmap_index = 334, .adv_w = 128, .box_h = 8, .box_w = 4, .ofs_x = 2, .ofs_y = -2},
- {.bitmap_index = 338, .adv_w = 128, .box_h = 7, .box_w = 5, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 343, .adv_w = 128, .box_h = 7, .box_w = 3, .ofs_x = 2, .ofs_y = -1},
- {.bitmap_index = 346, .adv_w = 128, .box_h = 5, .box_w = 5, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 350, .adv_w = 128, .box_h = 5, .box_w = 5, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 354, .adv_w = 128, .box_h = 5, .box_w = 5, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 358, .adv_w = 128, .box_h = 6, .box_w = 5, .ofs_x = 1, .ofs_y = -2},
- {.bitmap_index = 362, .adv_w = 128, .box_h = 6, .box_w = 5, .ofs_x = 1, .ofs_y = -2},
- {.bitmap_index = 366, .adv_w = 128, .box_h = 5, .box_w = 5, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 370, .adv_w = 128, .box_h = 5, .box_w = 5, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 374, .adv_w = 128, .box_h = 7, .box_w = 5, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 379, .adv_w = 128, .box_h = 5, .box_w = 5, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 383, .adv_w = 128, .box_h = 5, .box_w = 5, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 387, .adv_w = 128, .box_h = 5, .box_w = 5, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 391, .adv_w = 128, .box_h = 5, .box_w = 5, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 395, .adv_w = 128, .box_h = 6, .box_w = 5, .ofs_x = 1, .ofs_y = -2},
- {.bitmap_index = 399, .adv_w = 128, .box_h = 5, .box_w = 5, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 403, .adv_w = 128, .box_h = 7, .box_w = 4, .ofs_x = 1, .ofs_y = -1},
- {.bitmap_index = 407, .adv_w = 128, .box_h = 8, .box_w = 1, .ofs_x = 3, .ofs_y = -2},
- {.bitmap_index = 408, .adv_w = 128, .box_h = 7, .box_w = 4, .ofs_x = 2, .ofs_y = -1},
- {.bitmap_index = 412, .adv_w = 128, .box_h = 3, .box_w = 5, .ofs_x = 1, .ofs_y = 3},
- {.bitmap_index = 414, .adv_w = 128, .box_h = 7, .box_w = 7, .ofs_x = 0, .ofs_y = -1}
-};
-
-/*---------------------
- * CHARACTER MAPPING
- *--------------------*/
-
-
-
-/*Collect the unicode lists and glyph_id offsets*/
-static const lv_font_fmt_txt_cmap_t cmaps[] =
-{
- {
- .range_start = 32, .range_length = 96, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY,
- .glyph_id_start = 1, .unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0
- }
-};
-
-
-
-/*--------------------
- * ALL CUSTOM DATA
- *--------------------*/
-
-/*Store all the custom data of the font*/
-static lv_font_fmt_txt_dsc_t font_dsc = {
- .glyph_bitmap = gylph_bitmap,
- .glyph_dsc = glyph_dsc,
- .cmaps = cmaps,
- .cmap_num = 1,
- .bpp = 1,
-
- .kern_scale = 0,
- .kern_dsc = NULL,
- .kern_classes = 0,
-};
-
-
-/*-----------------
- * PUBLIC FONT
- *----------------*/
-
-/*Initialize a public general font descriptor*/
-lv_font_t lv_font_unscii_8 = {
- .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
- .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/
- .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/
- .line_height = 8, /*The maximum line height required by the font*/
- .base_line = 2, /*Baseline measured from the bottom of the line*/
-};
-
-#endif /*#if LV_FONT_UNSCII_8*/
diff --git a/src/libs/lvgl/src/lv_font/lv_symbol_def.h b/src/libs/lvgl/src/lv_font/lv_symbol_def.h
deleted file mode 100644
index 026f4a60..00000000
--- a/src/libs/lvgl/src/lv_font/lv_symbol_def.h
+++ /dev/null
@@ -1,159 +0,0 @@
-#ifndef LV_SYMBOL_DEF_H
-#define LV_SYMBOL_DEF_H
-/* clang-format off */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-/* In the font converter use this list as range:
- 61441, 61448, 61451, 61452, 61453, 61457, 61459, 61461, 61465, 61468,
- 61473, 61478, 61479, 61480, 61502, 61512, 61515, 61516, 61517, 61521,
- 61522, 61523, 61524, 61543, 61544, 61550, 61552, 61553, 61556, 61559,
- 61560, 61561, 61563, 61587, 61589, 61636, 61637, 61639, 61671, 61674,
- 61683, 61724, 61732, 61787, 61931, 62016, 62017, 62018, 62019, 62020,
- 62087, 62099, 62212, 62189, 62810, 63426, 63650
-*/
-
-#define LV_SYMBOL_AUDIO "\xef\x80\x81" /*61441, 0xF001*/
-#define LV_SYMBOL_VIDEO "\xef\x80\x88" /*61448, 0xF008*/
-#define LV_SYMBOL_LIST "\xef\x80\x8b" /*61451, 0xF00B*/
-#define LV_SYMBOL_OK "\xef\x80\x8c" /*61452, 0xF00C*/
-#define LV_SYMBOL_CLOSE "\xef\x80\x8d" /*61453, 0xF00D*/
-#define LV_SYMBOL_POWER "\xef\x80\x91" /*61457, 0xF011*/
-#define LV_SYMBOL_SETTINGS "\xef\x80\x93" /*61459, 0xF013*/
-#define LV_SYMBOL_HOME "\xef\x80\x95" /*61461, 0xF015*/
-#define LV_SYMBOL_DOWNLOAD "\xef\x80\x99" /*61465, 0xF019*/
-#define LV_SYMBOL_DRIVE "\xef\x80\x9c" /*61468, 0xF01C*/
-#define LV_SYMBOL_REFRESH "\xef\x80\xa1" /*61473, 0xF021*/
-#define LV_SYMBOL_MUTE "\xef\x80\xa6" /*61478, 0xF026*/
-#define LV_SYMBOL_VOLUME_MID "\xef\x80\xa7" /*61479, 0xF027*/
-#define LV_SYMBOL_VOLUME_MAX "\xef\x80\xa8" /*61480, 0xF028*/
-#define LV_SYMBOL_IMAGE "\xef\x80\xbe" /*61502, 0xF03E*/
-#define LV_SYMBOL_EDIT "\xef\x8C\x84" /*62212, 0xF304*/
-#define LV_SYMBOL_PREV "\xef\x81\x88" /*61512, 0xF048*/
-#define LV_SYMBOL_PLAY "\xef\x81\x8b" /*61515, 0xF04B*/
-#define LV_SYMBOL_PAUSE "\xef\x81\x8c" /*61516, 0xF04C*/
-#define LV_SYMBOL_STOP "\xef\x81\x8d" /*61517, 0xF04D*/
-#define LV_SYMBOL_NEXT "\xef\x81\x91" /*61521, 0xF051*/
-#define LV_SYMBOL_EJECT "\xef\x81\x92" /*61522, 0xF052*/
-#define LV_SYMBOL_LEFT "\xef\x81\x93" /*61523, 0xF053*/
-#define LV_SYMBOL_RIGHT "\xef\x81\x94" /*61524, 0xF054*/
-#define LV_SYMBOL_PLUS "\xef\x81\xa7" /*61543, 0xF067*/
-#define LV_SYMBOL_MINUS "\xef\x81\xa8" /*61544, 0xF068*/
-#define LV_SYMBOL_EYE_OPEN "\xef\x81\xae" /*61550, 0xF06E*/
-#define LV_SYMBOL_EYE_CLOSE "\xef\x81\xb0" /*61552, 0xF070*/
-#define LV_SYMBOL_WARNING "\xef\x81\xb1" /*61553, 0xF071*/
-#define LV_SYMBOL_SHUFFLE "\xef\x81\xb4" /*61556, 0xF074*/
-#define LV_SYMBOL_UP "\xef\x81\xb7" /*61559, 0xF077*/
-#define LV_SYMBOL_DOWN "\xef\x81\xb8" /*61560, 0xF078*/
-#define LV_SYMBOL_LOOP "\xef\x81\xb9" /*61561, 0xF079*/
-#define LV_SYMBOL_DIRECTORY "\xef\x81\xbb" /*61563, 0xF07B*/
-#define LV_SYMBOL_UPLOAD "\xef\x82\x93" /*61587, 0xF093*/
-#define LV_SYMBOL_CALL "\xef\x82\x95" /*61589, 0xF095*/
-#define LV_SYMBOL_CUT "\xef\x83\x84" /*61636, 0xF0C4*/
-#define LV_SYMBOL_COPY "\xef\x83\x85" /*61637, 0xF0C5*/
-#define LV_SYMBOL_SAVE "\xef\x83\x87" /*61639, 0xF0C7*/
-#define LV_SYMBOL_CHARGE "\xef\x83\xa7" /*61671, 0xF0E7*/
-#define LV_SYMBOL_PASTE "\xef\x83\xAA" /*61674, 0xF0EA*/
-#define LV_SYMBOL_BELL "\xef\x83\xb3" /*61683, 0xF0F3*/
-#define LV_SYMBOL_KEYBOARD "\xef\x84\x9c" /*61724, 0xF11C*/
-#define LV_SYMBOL_GPS "\xef\x84\xa4" /*61732, 0xF124*/
-#define LV_SYMBOL_FILE "\xef\x85\x9b" /*61787, 0xF158*/
-#define LV_SYMBOL_WIFI "\xef\x87\xab" /*61931, 0xF1EB*/
-#define LV_SYMBOL_BATTERY_FULL "\xef\x89\x80" /*62016, 0xF240*/
-#define LV_SYMBOL_BATTERY_3 "\xef\x89\x81" /*62017, 0xF241*/
-#define LV_SYMBOL_BATTERY_2 "\xef\x89\x82" /*62018, 0xF242*/
-#define LV_SYMBOL_BATTERY_1 "\xef\x89\x83" /*62019, 0xF243*/
-#define LV_SYMBOL_BATTERY_EMPTY "\xef\x89\x84" /*62020, 0xF244*/
-#define LV_SYMBOL_USB "\xef\x8a\x87" /*62087, 0xF287*/
-#define LV_SYMBOL_BLUETOOTH "\xef\x8a\x93" /*62099, 0xF293*/
-#define LV_SYMBOL_TRASH "\xef\x8B\xAD" /*62189, 0xF2ED*/
-#define LV_SYMBOL_BACKSPACE "\xef\x95\x9A" /*62810, 0xF55A*/
-#define LV_SYMBOL_SD_CARD "\xef\x9F\x82" /*63426, 0xF7C2*/
-#define LV_SYMBOL_NEW_LINE "\xef\xA2\xA2" /*63650, 0xF8A2*/
-
-/** Invalid symbol at (U+F8FF). If written before a string then `lv_img` will show it as a label*/
-#define LV_SYMBOL_DUMMY "\xEF\xA3\xBF"
-
-/*
- * The following list is generated using
- * cat src/lv_misc/lv_symbol_def.h | sed -E -n 's/^#define\s+(LV_SYMBOL_\w+).*"$/ _LV_STR_\1,/p'
- */
-enum {
- _LV_STR_SYMBOL_AUDIO,
- _LV_STR_SYMBOL_VIDEO,
- _LV_STR_SYMBOL_LIST,
- _LV_STR_SYMBOL_OK,
- _LV_STR_SYMBOL_CLOSE,
- _LV_STR_SYMBOL_POWER,
- _LV_STR_SYMBOL_SETTINGS,
- _LV_STR_SYMBOL_HOME,
- _LV_STR_SYMBOL_DOWNLOAD,
- _LV_STR_SYMBOL_DRIVE,
- _LV_STR_SYMBOL_REFRESH,
- _LV_STR_SYMBOL_MUTE,
- _LV_STR_SYMBOL_VOLUME_MID,
- _LV_STR_SYMBOL_VOLUME_MAX,
- _LV_STR_SYMBOL_IMAGE,
- _LV_STR_SYMBOL_EDIT,
- _LV_STR_SYMBOL_PREV,
- _LV_STR_SYMBOL_PLAY,
- _LV_STR_SYMBOL_PAUSE,
- _LV_STR_SYMBOL_STOP,
- _LV_STR_SYMBOL_NEXT,
- _LV_STR_SYMBOL_EJECT,
- _LV_STR_SYMBOL_LEFT,
- _LV_STR_SYMBOL_RIGHT,
- _LV_STR_SYMBOL_PLUS,
- _LV_STR_SYMBOL_MINUS,
- _LV_STR_SYMBOL_EYE_OPEN,
- _LV_STR_SYMBOL_EYE_CLOSE,
- _LV_STR_SYMBOL_WARNING,
- _LV_STR_SYMBOL_SHUFFLE,
- _LV_STR_SYMBOL_UP,
- _LV_STR_SYMBOL_DOWN,
- _LV_STR_SYMBOL_LOOP,
- _LV_STR_SYMBOL_DIRECTORY,
- _LV_STR_SYMBOL_UPLOAD,
- _LV_STR_SYMBOL_CALL,
- _LV_STR_SYMBOL_CUT,
- _LV_STR_SYMBOL_COPY,
- _LV_STR_SYMBOL_SAVE,
- _LV_STR_SYMBOL_CHARGE,
- _LV_STR_SYMBOL_PASTE,
- _LV_STR_SYMBOL_BELL,
- _LV_STR_SYMBOL_KEYBOARD,
- _LV_STR_SYMBOL_GPS,
- _LV_STR_SYMBOL_FILE,
- _LV_STR_SYMBOL_WIFI,
- _LV_STR_SYMBOL_BATTERY_FULL,
- _LV_STR_SYMBOL_BATTERY_3,
- _LV_STR_SYMBOL_BATTERY_2,
- _LV_STR_SYMBOL_BATTERY_1,
- _LV_STR_SYMBOL_BATTERY_EMPTY,
- _LV_STR_SYMBOL_USB,
- _LV_STR_SYMBOL_BLUETOOTH,
- _LV_STR_SYMBOL_TRASH,
- _LV_STR_SYMBOL_BACKSPACE,
- _LV_STR_SYMBOL_SD_CARD,
- _LV_STR_SYMBOL_NEW_LINE,
- _LV_STR_SYMBOL_DUMMY,
-};
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-
-#endif /*LV_SYMBOL_DEF_H*/
-
-
-
-
-
diff --git a/src/libs/lvgl/src/lv_hal/lv_hal.h b/src/libs/lvgl/src/lv_hal/lv_hal.h
deleted file mode 100644
index a5e0a1dd..00000000
--- a/src/libs/lvgl/src/lv_hal/lv_hal.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * @file lv_hal.h
- *
- */
-
-#ifndef LV_HAL_H
-#define LV_HAL_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_hal_disp.h"
-#include "lv_hal_indev.h"
-#include "lv_hal_tick.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif
diff --git a/src/libs/lvgl/src/lv_hal/lv_hal.mk b/src/libs/lvgl/src/lv_hal/lv_hal.mk
deleted file mode 100644
index 05af078c..00000000
--- a/src/libs/lvgl/src/lv_hal/lv_hal.mk
+++ /dev/null
@@ -1,8 +0,0 @@
-CSRCS += lv_hal_disp.c
-CSRCS += lv_hal_indev.c
-CSRCS += lv_hal_tick.c
-
-DEPPATH += --dep-path $(LVGL_DIR)/lvgl/src/lv_hal
-VPATH += :$(LVGL_DIR)/lvgl/src/lv_hal
-
-CFLAGS += "-I$(LVGL_DIR)/lvgl/src/lv_hal"
diff --git a/src/libs/lvgl/src/lv_hal/lv_hal_disp.c b/src/libs/lvgl/src/lv_hal/lv_hal_disp.c
deleted file mode 100644
index e3a275a0..00000000
--- a/src/libs/lvgl/src/lv_hal/lv_hal_disp.c
+++ /dev/null
@@ -1,359 +0,0 @@
-
-/**
- * @file hal_disp.c
- *
- * @description HAL layer for display driver
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include <stdint.h>
-#include <stddef.h>
-#include "lv_hal.h"
-#include "../lv_core/lv_debug.h"
-#include "../lv_misc/lv_mem.h"
-#include "../lv_core/lv_obj.h"
-#include "../lv_core/lv_refr.h"
-#include "../lv_misc/lv_gc.h"
-
-#if defined(LV_GC_INCLUDE)
-#include LV_GC_INCLUDE
-#endif /* LV_ENABLE_GC */
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_disp_t * disp_def;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Initialize a display driver with default values.
- * It is used to surly have known values in the fields ant not memory junk.
- * After it you can set the fields.
- * @param driver pointer to driver variable to initialize
- */
-void lv_disp_drv_init(lv_disp_drv_t * driver)
-{
- memset(driver, 0, sizeof(lv_disp_drv_t));
-
- driver->flush_cb = NULL;
- driver->hor_res = LV_HOR_RES_MAX;
- driver->ver_res = LV_VER_RES_MAX;
- driver->buffer = NULL;
- driver->rotated = 0;
- driver->color_chroma_key = LV_COLOR_TRANSP;
-
-#if LV_ANTIALIAS
- driver->antialiasing = true;
-#endif
-
-#if LV_COLOR_SCREEN_TRANSP
- driver->screen_transp = 1;
-#endif
-
-#if LV_USE_GPU
- driver->gpu_blend_cb = NULL;
- driver->gpu_fill_cb = NULL;
-#endif
-
-#if LV_USE_USER_DATA
- driver->user_data = NULL;
-#endif
-
- driver->set_px_cb = NULL;
-}
-
-/**
- * Initialize a display buffer
- * @param disp_buf pointer `lv_disp_buf_t` variable to initialize
- * @param buf1 A buffer to be used by LittlevGL to draw the image.
- * Always has to specified and can't be NULL.
- * Can be an array allocated by the user. E.g. `static lv_color_t disp_buf1[1024 * 10]`
- * Or a memory address e.g. in external SRAM
- * @param buf2 Optionally specify a second buffer to make image rendering and image flushing
- * (sending to the display) parallel.
- * In the `disp_drv->flush` you should use DMA or similar hardware to send
- * the image to the display in the background.
- * It lets LittlevGL to render next frame into the other buffer while previous is being
- * sent. Set to `NULL` if unused.
- * @param size_in_px_cnt size of the `buf1` and `buf2` in pixel count.
- */
-void lv_disp_buf_init(lv_disp_buf_t * disp_buf, void * buf1, void * buf2, uint32_t size_in_px_cnt)
-{
- memset(disp_buf, 0, sizeof(lv_disp_buf_t));
-
- disp_buf->buf1 = buf1;
- disp_buf->buf2 = buf2;
- disp_buf->buf_act = disp_buf->buf1;
- disp_buf->size = size_in_px_cnt;
-}
-
-/**
- * Register an initialized display driver.
- * Automatically set the first display as active.
- * @param driver pointer to an initialized 'lv_disp_drv_t' variable (can be local variable)
- * @return pointer to the new display or NULL on error
- */
-lv_disp_t * lv_disp_drv_register(lv_disp_drv_t * driver)
-{
- lv_disp_t * disp = lv_ll_ins_head(&LV_GC_ROOT(_lv_disp_ll));
- if(!disp) {
- LV_ASSERT_MEM(disp);
- return NULL;
- }
-
- memcpy(&disp->driver, driver, sizeof(lv_disp_drv_t));
- memset(&disp->inv_area_joined, 0, sizeof(disp->inv_area_joined));
- memset(&disp->inv_areas, 0, sizeof(disp->inv_areas));
- lv_ll_init(&disp->scr_ll, sizeof(lv_obj_t));
- disp->last_activity_time = 0;
-
- if(disp_def == NULL) disp_def = disp;
-
- lv_disp_t * disp_def_tmp = disp_def;
- disp_def = disp; /*Temporarily change the default screen to create the default screens on the
- new display*/
-
- disp->inv_p = 0;
-
- disp->act_scr = lv_obj_create(NULL, NULL); /*Create a default screen on the display*/
- disp->top_layer = lv_obj_create(NULL, NULL); /*Create top layer on the display*/
- disp->sys_layer = lv_obj_create(NULL, NULL); /*Create sys layer on the display*/
- lv_obj_set_style(disp->top_layer, &lv_style_transp);
- lv_obj_set_style(disp->sys_layer, &lv_style_transp);
-
- lv_obj_invalidate(disp->act_scr);
-
- disp_def = disp_def_tmp; /*Revert the default display*/
-
- /*Create a refresh task*/
- disp->refr_task = lv_task_create(lv_disp_refr_task, LV_DISP_DEF_REFR_PERIOD, LV_TASK_PRIO_MID, disp);
- LV_ASSERT_MEM(disp->refr_task);
- if(disp->refr_task == NULL) return NULL;
-
- lv_task_ready(disp->refr_task); /*Be sure the screen will be refreshed immediately on start up*/
-
- return disp;
-}
-
-/**
- * Update the driver in run time.
- * @param disp pointer to a display. (return value of `lv_disp_drv_register`)
- * @param new_drv pointer to the new driver
- */
-void lv_disp_drv_update(lv_disp_t * disp, lv_disp_drv_t * new_drv)
-{
- memcpy(&disp->driver, new_drv, sizeof(lv_disp_drv_t));
-
- lv_obj_t * scr;
- LV_LL_READ(disp->scr_ll, scr)
- {
- lv_obj_set_size(scr, lv_disp_get_hor_res(disp), lv_disp_get_ver_res(disp));
- }
-}
-
-/**
- * Remove a display
- * @param disp pointer to display
- */
-void lv_disp_remove(lv_disp_t * disp)
-{
- bool was_default = false;
- if(disp == lv_disp_get_default()) was_default = true;
-
- /*Detach the input devices */
- lv_indev_t * indev;
- indev = lv_indev_get_next(NULL);
- while(indev) {
- if(indev->driver.disp == disp) {
- indev->driver.disp = NULL;
- }
- indev = lv_indev_get_next(indev);
- }
-
- lv_ll_rem(&LV_GC_ROOT(_lv_disp_ll), disp);
- lv_mem_free(disp);
-
- if(was_default) lv_disp_set_default(lv_ll_get_head(&LV_GC_ROOT(_lv_disp_ll)));
-}
-
-/**
- * Set a default screen. The new screens will be created on it by default.
- * @param disp pointer to a display
- */
-void lv_disp_set_default(lv_disp_t * disp)
-{
- disp_def = disp;
-}
-
-/**
- * Get the default display
- * @return pointer to the default display
- */
-lv_disp_t * lv_disp_get_default(void)
-{
- return disp_def;
-}
-
-/**
- * Get the horizontal resolution of a display
- * @param disp pointer to a display (NULL to use the default display)
- * @return the horizontal resolution of the display
- */
-lv_coord_t lv_disp_get_hor_res(lv_disp_t * disp)
-{
- if(disp == NULL) disp = lv_disp_get_default();
-
- if(disp == NULL)
- return LV_HOR_RES_MAX;
- else
- return disp->driver.rotated == 0 ? disp->driver.hor_res : disp->driver.ver_res;
-}
-
-/**
- * Get the vertical resolution of a display
- * @param disp pointer to a display (NULL to use the default display)
- * @return the vertical resolution of the display
- */
-lv_coord_t lv_disp_get_ver_res(lv_disp_t * disp)
-{
- if(disp == NULL) disp = lv_disp_get_default();
-
- if(disp == NULL)
- return LV_VER_RES_MAX;
- else
- return disp->driver.rotated == 0 ? disp->driver.ver_res : disp->driver.hor_res;
-}
-
-/**
- * Get if anti-aliasing is enabled for a display or not
- * @param disp pointer to a display (NULL to use the default display)
- * @return true: anti-aliasing is enabled; false: disabled
- */
-bool lv_disp_get_antialiasing(lv_disp_t * disp)
-{
-#if LV_ANTIALIAS == 0
- return false;
-#else
- if(disp == NULL) disp = lv_disp_get_default();
- if(disp == NULL) return false;
-
- return disp->driver.antialiasing ? true : false;
-#endif
-}
-
-/**
- * Call in the display driver's `flush_cb` function when the flushing is finished
- * @param disp_drv pointer to display driver in `flush_cb` where this function is called
- */
-LV_ATTRIBUTE_FLUSH_READY void lv_disp_flush_ready(lv_disp_drv_t * disp_drv)
-{
- /*If the screen is transparent initialize it when the flushing is ready*/
-#if LV_COLOR_SCREEN_TRANSP
- if(disp_drv->screen_transp) {
- memset(disp_drv->buffer->buf_act, 0x00, disp_drv->buffer->size * sizeof(lv_color32_t));
- }
-#endif
-
- disp_drv->buffer->flushing = 0;
-}
-
-/**
- * Get the next display.
- * @param disp pointer to the current display. NULL to initialize.
- * @return the next display or NULL if no more. Give the first display when the parameter is NULL
- */
-lv_disp_t * lv_disp_get_next(lv_disp_t * disp)
-{
- if(disp == NULL)
- return lv_ll_get_head(&LV_GC_ROOT(_lv_disp_ll));
- else
- return lv_ll_get_next(&LV_GC_ROOT(_lv_disp_ll), disp);
-}
-
-/**
- * Get the internal buffer of a display
- * @param disp pointer to a display
- * @return pointer to the internal buffers
- */
-lv_disp_buf_t * lv_disp_get_buf(lv_disp_t * disp)
-{
- return disp->driver.buffer;
-}
-
-/**
- * Get the number of areas in the buffer
- * @return number of invalid areas
- */
-uint16_t lv_disp_get_inv_buf_size(lv_disp_t * disp)
-{
- return disp->inv_p;
-}
-
-/**
- * Pop (delete) the last 'num' invalidated areas from the buffer
- * @param num number of areas to delete
- */
-void lv_disp_pop_from_inv_buf(lv_disp_t * disp, uint16_t num)
-{
-
- if(disp->inv_p < num)
- disp->inv_p = 0;
- else
- disp->inv_p -= num;
-}
-
-/**
- * Check the driver configuration if it's double buffered (both `buf1` and `buf2` are set)
- * @param disp pointer to to display to check
- * @return true: double buffered; false: not double buffered
- */
-bool lv_disp_is_double_buf(lv_disp_t * disp)
-{
- if(disp->driver.buffer->buf1 && disp->driver.buffer->buf2)
- return true;
- else
- return false;
-}
-
-/**
- * Check the driver configuration if it's TRUE double buffered (both `buf1` and `buf2` are set and
- * `size` is screen sized)
- * @param disp pointer to to display to check
- * @return true: double buffered; false: not double buffered
- */
-bool lv_disp_is_true_double_buf(lv_disp_t * disp)
-{
- uint32_t scr_size = disp->driver.hor_res * disp->driver.ver_res;
-
- if(lv_disp_is_double_buf(disp) && disp->driver.buffer->size == scr_size) {
- return true;
- } else {
- return false;
- }
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
diff --git a/src/libs/lvgl/src/lv_hal/lv_hal_disp.h b/src/libs/lvgl/src/lv_hal/lv_hal_disp.h
deleted file mode 100644
index eef22d98..00000000
--- a/src/libs/lvgl/src/lv_hal/lv_hal_disp.h
+++ /dev/null
@@ -1,298 +0,0 @@
-/**
- * @file lv_hal_disp.h
- *
- * @description Display Driver HAL interface header file
- *
- */
-
-#ifndef LV_HAL_DISP_H
-#define LV_HAL_DISP_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#include <stdint.h>
-#include <stdbool.h>
-#include "lv_hal.h"
-#include "../lv_misc/lv_color.h"
-#include "../lv_misc/lv_area.h"
-#include "../lv_misc/lv_ll.h"
-#include "../lv_misc/lv_task.h"
-
-/*********************
- * DEFINES
- *********************/
-#ifndef LV_INV_BUF_SIZE
-#define LV_INV_BUF_SIZE 32 /*Buffer size for invalid areas */
-#endif
-
-#ifndef LV_ATTRIBUTE_FLUSH_READY
-#define LV_ATTRIBUTE_FLUSH_READY
-#endif
-
-/**********************
- * TYPEDEFS
- **********************/
-
-struct _disp_t;
-struct _disp_drv_t;
-
-/**
- * Structure for holding display buffer information.
- */
-typedef struct
-{
- void * buf1; /**< First display buffer. */
- void * buf2; /**< Second display buffer. */
-
- /*Internal, used by the library*/
- void * buf_act;
- uint32_t size; /*In pixel count*/
- lv_area_t area;
- volatile uint32_t flushing : 1;
-} lv_disp_buf_t;
-
-/**
- * Display Driver structure to be registered by HAL
- */
-typedef struct _disp_drv_t
-{
-
- lv_coord_t hor_res; /**< Horizontal resolution. */
- lv_coord_t ver_res; /**< Vertical resolution. */
-
- /** Pointer to a buffer initialized with `lv_disp_buf_init()`.
- * LittlevGL will use this buffer(s) to draw the screens contents */
- lv_disp_buf_t * buffer;
-
-#if LV_ANTIALIAS
- uint32_t antialiasing : 1; /**< 1: antialiasing is enabled on this display. */
-#endif
- uint32_t rotated : 1; /**< 1: turn the display by 90 degree. @warning Does not update coordinates for you!*/
-
-#if LV_COLOR_SCREEN_TRANSP
- /**Handle if the the screen doesn't have a solid (opa == LV_OPA_COVER) background.
- * Use only if required because it's slower.*/
- uint32_t screen_transp : 1;
-#endif
-
- /** MANDATORY: Write the internal buffer (VDB) to the display. 'lv_disp_flush_ready()' has to be
- * called when finished */
- void (*flush_cb)(struct _disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p);
-
- /** OPTIONAL: Extend the invalidated areas to match with the display drivers requirements
- * E.g. round `y` to, 8, 16 ..) on a monochrome display*/
- void (*rounder_cb)(struct _disp_drv_t * disp_drv, lv_area_t * area);
-
- /** OPTIONAL: Set a pixel in a buffer according to the special requirements of the display
- * Can be used for color format not supported in LittelvGL. E.g. 2 bit -> 4 gray scales
- * @note Much slower then drawing with supported color formats. */
- void (*set_px_cb)(struct _disp_drv_t * disp_drv, uint8_t * buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y,
- lv_color_t color, lv_opa_t opa);
-
- /** OPTIONAL: Called after every refresh cycle to tell the rendering and flushing time + the
- * number of flushed pixels */
- void (*monitor_cb)(struct _disp_drv_t * disp_drv, uint32_t time, uint32_t px);
-
-#if LV_USE_GPU
- /** OPTIONAL: Blend two memories using opacity (GPU only)*/
- void (*gpu_blend_cb)(struct _disp_drv_t * disp_drv, lv_color_t * dest, const lv_color_t * src, uint32_t length,
- lv_opa_t opa);
-
- /** OPTIONAL: Fill a memory with a color (GPU only)*/
- void (*gpu_fill_cb)(struct _disp_drv_t * disp_drv, lv_color_t * dest_buf, lv_coord_t dest_width,
- const lv_area_t * fill_area, lv_color_t color);
-#endif
-
- /** On CHROMA_KEYED images this color will be transparent.
- * `LV_COLOR_TRANSP` by default. (lv_conf.h)*/
- lv_color_t color_chroma_key;
-
-#if LV_USE_USER_DATA
- lv_disp_drv_user_data_t user_data; /**< Custom display driver user data */
-#endif
-
-} lv_disp_drv_t;
-
-struct _lv_obj_t;
-
-/**
- * Display structure.
- * ::lv_disp_drv_t is the first member of the structure.
- */
-typedef struct _disp_t
-{
- /**< Driver to the display*/
- lv_disp_drv_t driver;
-
- /**< A task which periodically checks the dirty areas and refreshes them*/
- lv_task_t * refr_task;
-
- /** Screens of the display*/
- lv_ll_t scr_ll;
- struct _lv_obj_t * act_scr; /**< Currently active screen on this display */
- struct _lv_obj_t * top_layer; /**< @see lv_disp_get_layer_top */
- struct _lv_obj_t * sys_layer; /**< @see lv_disp_get_layer_sys */
-
- /** Invalidated (marked to redraw) areas*/
- lv_area_t inv_areas[LV_INV_BUF_SIZE];
- uint8_t inv_area_joined[LV_INV_BUF_SIZE];
- uint32_t inv_p : 10;
-
- int render_direction; /**< 0 when rendering down, 1 when rendering up */
- /*Miscellaneous data*/
- uint32_t last_activity_time; /**< Last time there was activity on this display */
-} lv_disp_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Initialize a display driver with default values.
- * It is used to have known values in the fields and not junk in memory.
- * After it you can safely set only the fields you need.
- * @param driver pointer to driver variable to initialize
- */
-void lv_disp_drv_init(lv_disp_drv_t * driver);
-
-/**
- * Initialize a display buffer
- * @param disp_buf pointer `lv_disp_buf_t` variable to initialize
- * @param buf1 A buffer to be used by LittlevGL to draw the image.
- * Always has to specified and can't be NULL.
- * Can be an array allocated by the user. E.g. `static lv_color_t disp_buf1[1024 * 10]`
- * Or a memory address e.g. in external SRAM
- * @param buf2 Optionally specify a second buffer to make image rendering and image flushing
- * (sending to the display) parallel.
- * In the `disp_drv->flush` you should use DMA or similar hardware to send
- * the image to the display in the background.
- * It lets LittlevGL to render next frame into the other buffer while previous is being
- * sent. Set to `NULL` if unused.
- * @param size_in_px_cnt size of the `buf1` and `buf2` in pixel count.
- */
-void lv_disp_buf_init(lv_disp_buf_t * disp_buf, void * buf1, void * buf2, uint32_t size_in_px_cnt);
-
-/**
- * Register an initialized display driver.
- * Automatically set the first display as active.
- * @param driver pointer to an initialized 'lv_disp_drv_t' variable (can be local variable)
- * @return pointer to the new display or NULL on error
- */
-lv_disp_t * lv_disp_drv_register(lv_disp_drv_t * driver);
-
-/**
- * Update the driver in run time.
- * @param disp pointer to a display. (return value of `lv_disp_drv_register`)
- * @param new_drv pointer to the new driver
- */
-void lv_disp_drv_update(lv_disp_t * disp, lv_disp_drv_t * new_drv);
-
-/**
- * Remove a display
- * @param disp pointer to display
- */
-void lv_disp_remove(lv_disp_t * disp);
-
-/**
- * Set a default screen. The new screens will be created on it by default.
- * @param disp pointer to a display
- */
-void lv_disp_set_default(lv_disp_t * disp);
-
-/**
- * Get the default display
- * @return pointer to the default display
- */
-lv_disp_t * lv_disp_get_default(void);
-
-/**
- * Get the horizontal resolution of a display
- * @param disp pointer to a display (NULL to use the default display)
- * @return the horizontal resolution of the display
- */
-lv_coord_t lv_disp_get_hor_res(lv_disp_t * disp);
-
-/**
- * Get the vertical resolution of a display
- * @param disp pointer to a display (NULL to use the default display)
- * @return the vertical resolution of the display
- */
-lv_coord_t lv_disp_get_ver_res(lv_disp_t * disp);
-
-/**
- * Get if anti-aliasing is enabled for a display or not
- * @param disp pointer to a display (NULL to use the default display)
- * @return true: anti-aliasing is enabled; false: disabled
- */
-bool lv_disp_get_antialiasing(lv_disp_t * disp);
-
-static inline void lv_disp_set_direction(lv_disp_t * disp, int direction)
-{
- disp->render_direction = direction;
-}
-
-//! @cond Doxygen_Suppress
-
-/**
- * Call in the display driver's `flush_cb` function when the flushing is finished
- * @param disp_drv pointer to display driver in `flush_cb` where this function is called
- */
-LV_ATTRIBUTE_FLUSH_READY void lv_disp_flush_ready(lv_disp_drv_t * disp_drv);
-
-//! @endcond
-
-/**
- * Get the next display.
- * @param disp pointer to the current display. NULL to initialize.
- * @return the next display or NULL if no more. Give the first display when the parameter is NULL
- */
-lv_disp_t * lv_disp_get_next(lv_disp_t * disp);
-
-/**
- * Get the internal buffer of a display
- * @param disp pointer to a display
- * @return pointer to the internal buffers
- */
-lv_disp_buf_t * lv_disp_get_buf(lv_disp_t * disp);
-
-/**
- * Get the number of areas in the buffer
- * @return number of invalid areas
- */
-uint16_t lv_disp_get_inv_buf_size(lv_disp_t * disp);
-
-/**
- * Pop (delete) the last 'num' invalidated areas from the buffer
- * @param num number of areas to delete
- */
-void lv_disp_pop_from_inv_buf(lv_disp_t * disp, uint16_t num);
-
-/**
- * Check the driver configuration if it's double buffered (both `buf1` and `buf2` are set)
- * @param disp pointer to to display to check
- * @return true: double buffered; false: not double buffered
- */
-bool lv_disp_is_double_buf(lv_disp_t * disp);
-
-/**
- * Check the driver configuration if it's TRUE double buffered (both `buf1` and `buf2` are set and
- * `size` is screen sized)
- * @param disp pointer to to display to check
- * @return true: double buffered; false: not double buffered
- */
-bool lv_disp_is_true_double_buf(lv_disp_t * disp);
-
-/**********************
- * MACROS
- **********************/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif
diff --git a/src/libs/lvgl/src/lv_hal/lv_hal_indev.c b/src/libs/lvgl/src/lv_hal/lv_hal_indev.c
deleted file mode 100644
index 35ff1b31..00000000
--- a/src/libs/lvgl/src/lv_hal/lv_hal_indev.c
+++ /dev/null
@@ -1,158 +0,0 @@
-/**
- * @file hal_indev.c
- *
- * @description Input device HAL interface
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "../lv_core/lv_debug.h"
-#include "../lv_hal/lv_hal_indev.h"
-#include "../lv_core/lv_indev.h"
-#include "../lv_misc/lv_mem.h"
-#include "../lv_misc/lv_gc.h"
-#include "lv_hal_disp.h"
-
-#if defined(LV_GC_INCLUDE)
-#include LV_GC_INCLUDE
-#endif /* LV_ENABLE_GC */
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-
-/**********************
- * STATIC VARIABLES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Initialize an input device driver with default values.
- * It is used to surly have known values in the fields ant not memory junk.
- * After it you can set the fields.
- * @param driver pointer to driver variable to initialize
- */
-void lv_indev_drv_init(lv_indev_drv_t * driver)
-{
- memset(driver, 0, sizeof(lv_indev_drv_t));
-
- driver->type = LV_INDEV_TYPE_NONE;
- driver->drag_limit = LV_INDEV_DEF_DRAG_LIMIT;
- driver->drag_throw = LV_INDEV_DEF_DRAG_THROW;
- driver->long_press_time = LV_INDEV_DEF_LONG_PRESS_TIME;
- driver->long_press_rep_time = LV_INDEV_DEF_LONG_PRESS_REP_TIME;
-}
-
-/**
- * Register an initialized input device driver.
- * @param driver pointer to an initialized 'lv_indev_drv_t' variable (can be local variable)
- * @return pointer to the new input device or NULL on error
- */
-lv_indev_t * lv_indev_drv_register(lv_indev_drv_t * driver)
-{
-
- if(driver->disp == NULL) driver->disp = lv_disp_get_default();
-
- if(driver->disp == NULL) {
- LV_LOG_WARN("lv_indev_drv_register: no display registered hence can't attache the indev to "
- "a display");
- return NULL;
- }
-
- lv_indev_t * indev = lv_ll_ins_head(&LV_GC_ROOT(_lv_indev_ll));
- if(!indev) {
- LV_ASSERT_MEM(indev);
- return NULL;
- }
-
- memset(indev, 0, sizeof(lv_indev_t));
- memcpy(&indev->driver, driver, sizeof(lv_indev_drv_t));
-
- indev->proc.reset_query = 1;
- indev->cursor = NULL;
- indev->group = NULL;
- indev->btn_points = NULL;
-
- indev->driver.read_task = lv_task_create(lv_indev_read_task, LV_INDEV_DEF_READ_PERIOD, LV_TASK_PRIO_MID, indev);
-
- return indev;
-}
-
-/**
- * Update the driver in run time.
- * @param indev pointer to a input device. (return value of `lv_indev_drv_register`)
- * @param new_drv pointer to the new driver
- */
-void lv_indev_drv_update(lv_indev_t * indev, lv_indev_drv_t * new_drv)
-{
- memcpy(&indev->driver, new_drv, sizeof(lv_indev_drv_t));
-}
-
-/**
- * Get the next input device.
- * @param indev pointer to the current input device. NULL to initialize.
- * @return the next input devise or NULL if no more. Give the first input device when the parameter
- * is NULL
- */
-lv_indev_t * lv_indev_get_next(lv_indev_t * indev)
-{
- if(indev == NULL)
- return lv_ll_get_head(&LV_GC_ROOT(_lv_indev_ll));
- else
- return lv_ll_get_next(&LV_GC_ROOT(_lv_indev_ll), indev);
-}
-
-/**
- * Read data from an input device.
- * @param indev pointer to an input device
- * @param data input device will write its data here
- * @return false: no more data; true: there more data to read (buffered)
- */
-bool lv_indev_read(lv_indev_t * indev, lv_indev_data_t * data)
-{
- bool cont = false;
-
- memset(data, 0, sizeof(lv_indev_data_t));
-
- /* For touchpad sometimes users don't the last pressed coordinate on release.
- * So be sure a coordinates are initialized to the last point */
- if(indev->driver.type == LV_INDEV_TYPE_POINTER) {
- data->point.x = indev->proc.types.pointer.act_point.x;
- data->point.y = indev->proc.types.pointer.act_point.y;
- }
- /*Similarly set at least the last key in case of the the user doesn't set it on release*/
- else if(indev->driver.type == LV_INDEV_TYPE_KEYPAD) {
- data->key = indev->proc.types.keypad.last_key;
- }
-
- if(indev->driver.read_cb) {
- LV_LOG_TRACE("idnev read started");
- cont = indev->driver.read_cb(&indev->driver, data);
- LV_LOG_TRACE("idnev read finished");
- } else {
- LV_LOG_WARN("indev function registered");
- }
-
- return cont;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
diff --git a/src/libs/lvgl/src/lv_hal/lv_hal_indev.h b/src/libs/lvgl/src/lv_hal/lv_hal_indev.h
deleted file mode 100644
index ef1a5559..00000000
--- a/src/libs/lvgl/src/lv_hal/lv_hal_indev.h
+++ /dev/null
@@ -1,213 +0,0 @@
-/**
- * @file lv_hal_indev.h
- *
- * @description Input Device HAL interface layer header file
- *
- */
-
-#ifndef LV_HAL_INDEV_H
-#define LV_HAL_INDEV_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "../lv_misc/lv_area.h"
-#include "../lv_misc/lv_task.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-struct _lv_obj_t;
-struct _disp_t;
-struct _lv_indev_t;
-struct _lv_indev_drv_t;
-
-/** Possible input device types*/
-enum {
- LV_INDEV_TYPE_NONE, /**< Uninitialized state*/
- LV_INDEV_TYPE_POINTER, /**< Touch pad, mouse, external button*/
- LV_INDEV_TYPE_KEYPAD, /**< Keypad or keyboard*/
- LV_INDEV_TYPE_BUTTON, /**< External (hardware button) which is assigned to a specific point of the
- screen*/
- LV_INDEV_TYPE_ENCODER, /**< Encoder with only Left, Right turn and a Button*/
-};
-typedef uint8_t lv_indev_type_t;
-
-/** States for input devices*/
-enum { LV_INDEV_STATE_REL = 0, LV_INDEV_STATE_PR };
-typedef uint8_t lv_indev_state_t;
-
-/** Data structure passed to an input driver to fill */
-typedef struct
-{
- lv_point_t point; /**< For LV_INDEV_TYPE_POINTER the currently pressed point*/
- uint32_t key; /**< For LV_INDEV_TYPE_KEYPAD the currently pressed key*/
- uint32_t btn_id; /**< For LV_INDEV_TYPE_BUTTON the currently pressed button*/
- int16_t enc_diff; /**< For LV_INDEV_TYPE_ENCODER number of steps since the previous read*/
-
- lv_indev_state_t state; /**< LV_INDEV_STATE_REL or LV_INDEV_STATE_PR*/
-} lv_indev_data_t;
-
-/** Initialized by the user and registered by 'lv_indev_add()'*/
-typedef struct _lv_indev_drv_t
-{
-
- /**< Input device type*/
- lv_indev_type_t type;
-
- /**< Function pointer to read input device data.
- * Return 'true' if there is more data to be read (buffered).
- * Most drivers can safely return 'false' */
- bool (*read_cb)(struct _lv_indev_drv_t * indev_drv, lv_indev_data_t * data);
-
- /** Called when an action happened on the input device.
- * The second parameter is the event from `lv_event_t`*/
- void (*feedback_cb)(struct _lv_indev_drv_t *, uint8_t);
-
-#if LV_USE_USER_DATA
- lv_indev_drv_user_data_t user_data;
-#endif
-
- /**< Pointer to the assigned display*/
- struct _disp_t * disp;
-
- /**< Task to read the periodically read the input device*/
- lv_task_t * read_task;
-
- /**< Number of pixels to slide before actually drag the object*/
- uint8_t drag_limit;
-
- /**< Drag throw slow-down in [%]. Greater value means faster slow-down */
- uint8_t drag_throw;
-
- /**< Long press time in milliseconds*/
- uint16_t long_press_time;
-
- /**< Repeated trigger period in long press [ms] */
- uint16_t long_press_rep_time;
-} lv_indev_drv_t;
-
-/** Run time data of input devices
- * Internally used by the library, you should not need to touch it.
- */
-typedef struct _lv_indev_proc_t
-{
- lv_indev_state_t state; /**< Current state of the input device. */
- union
- {
- struct
- { /*Pointer and button data*/
- lv_point_t act_point; /**< Current point of input device. */
- lv_point_t last_point; /**< Last point of input device. */
- lv_point_t vect; /**< Difference between `act_point` and `last_point`. */
- lv_point_t drag_sum; /*Count the dragged pixels to check LV_INDEV_DEF_DRAG_LIMIT*/
- lv_point_t drag_throw_vect;
- struct _lv_obj_t * act_obj; /*The object being pressed*/
- struct _lv_obj_t * last_obj; /*The last obejct which was pressed (used by dragthrow and
- other post-release event)*/
- struct _lv_obj_t * last_pressed; /*The lastly pressed object*/
-
- /*Flags*/
- uint8_t drag_limit_out : 1;
- uint8_t drag_in_prog : 1;
- } pointer;
- struct
- { /*Keypad data*/
- lv_indev_state_t last_state;
- uint32_t last_key;
- } keypad;
- } types;
-
- uint32_t pr_timestamp; /**< Pressed time stamp*/
- uint32_t longpr_rep_timestamp; /**< Long press repeat time stamp*/
-
- /*Flags*/
- uint8_t long_pr_sent : 1;
- uint8_t reset_query : 1;
- uint8_t disabled : 1;
- uint8_t wait_until_release : 1;
-} lv_indev_proc_t;
-
-struct _lv_obj_t;
-struct _lv_group_t;
-
-/** The main input device descriptor with driver, runtime data ('proc') and some additional
- * information*/
-typedef struct _lv_indev_t
-{
- lv_indev_drv_t driver;
- lv_indev_proc_t proc;
- struct _lv_obj_t * cursor; /**< Cursor for LV_INPUT_TYPE_POINTER*/
- struct _lv_group_t * group; /**< Keypad destination group*/
- const lv_point_t * btn_points; /**< Array points assigned to the button ()screen will be pressed
- here by the buttons*/
-} lv_indev_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Initialize an input device driver with default values.
- * It is used to surly have known values in the fields ant not memory junk.
- * After it you can set the fields.
- * @param driver pointer to driver variable to initialize
- */
-void lv_indev_drv_init(lv_indev_drv_t * driver);
-
-/**
- * Register an initialized input device driver.
- * @param driver pointer to an initialized 'lv_indev_drv_t' variable (can be local variable)
- * @return pointer to the new input device or NULL on error
- */
-lv_indev_t * lv_indev_drv_register(lv_indev_drv_t * driver);
-
-/**
- * Update the driver in run time.
- * @param indev pointer to a input device. (return value of `lv_indev_drv_register`)
- * @param new_drv pointer to the new driver
- */
-void lv_indev_drv_update(lv_indev_t * indev, lv_indev_drv_t * new_drv);
-
-/**
- * Get the next input device.
- * @param indev pointer to the current input device. NULL to initialize.
- * @return the next input devise or NULL if no more. Give the first input device when the parameter
- * is NULL
- */
-lv_indev_t * lv_indev_get_next(lv_indev_t * indev);
-
-/**
- * Read data from an input device.
- * @param indev pointer to an input device
- * @param data input device will write its data here
- * @return false: no more data; true: there more data to read (buffered)
- */
-bool lv_indev_read(lv_indev_t * indev, lv_indev_data_t * data);
-
-/**********************
- * MACROS
- **********************/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif
diff --git a/src/libs/lvgl/src/lv_hal/lv_hal_tick.c b/src/libs/lvgl/src/lv_hal/lv_hal_tick.c
deleted file mode 100644
index cdfec32c..00000000
--- a/src/libs/lvgl/src/lv_hal/lv_hal_tick.c
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- * @file systick.c
- * Provide access to the system tick with 1 millisecond resolution
- */
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#include "lv_hal_tick.h"
-#include <stddef.h>
-
-#if LV_TICK_CUSTOM == 1
-#include LV_TICK_CUSTOM_INCLUDE
-#endif
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static uint32_t sys_time = 0;
-static volatile uint8_t tick_irq_flag;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * You have to call this function periodically
- * @param tick_period the call period of this function in milliseconds
- */
-LV_ATTRIBUTE_TICK_INC void lv_tick_inc(uint32_t tick_period)
-{
- tick_irq_flag = 0;
- sys_time += tick_period;
-}
-
-/**
- * Get the elapsed milliseconds since start up
- * @return the elapsed milliseconds
- */
-uint32_t lv_tick_get(void)
-{
-#if LV_TICK_CUSTOM == 0
- uint32_t result;
- do {
- tick_irq_flag = 1;
- result = sys_time;
- } while(!tick_irq_flag); /*'lv_tick_inc()' clears this flag which can be in an interrupt.
- Continue until make a non interrupted cycle */
-
- return result;
-#else
- return LV_TICK_CUSTOM_SYS_TIME_EXPR;
-#endif
-}
-
-/**
- * Get the elapsed milliseconds since a previous time stamp
- * @param prev_tick a previous time stamp (return value of systick_get() )
- * @return the elapsed milliseconds since 'prev_tick'
- */
-uint32_t lv_tick_elaps(uint32_t prev_tick)
-{
- uint32_t act_time = lv_tick_get();
-
- /*If there is no overflow in sys_time simple subtract*/
- if(act_time >= prev_tick) {
- prev_tick = act_time - prev_tick;
- } else {
- prev_tick = UINT32_MAX - prev_tick + 1;
- prev_tick += act_time;
- }
-
- return prev_tick;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
diff --git a/src/libs/lvgl/src/lv_hal/lv_hal_tick.h b/src/libs/lvgl/src/lv_hal/lv_hal_tick.h
deleted file mode 100644
index a4de881f..00000000
--- a/src/libs/lvgl/src/lv_hal/lv_hal_tick.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * @file lv_hal_tick.h
- * Provide access to the system tick with 1 millisecond resolution
- */
-
-#ifndef LV_HAL_TICK_H
-#define LV_HAL_TICK_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-#include <stdint.h>
-#include <stdbool.h>
-
-/*********************
- * DEFINES
- *********************/
-#ifndef LV_ATTRIBUTE_TICK_INC
-#define LV_ATTRIBUTE_TICK_INC
-#endif
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-//! @cond Doxygen_Suppress
-
-/**
- * You have to call this function periodically
- * @param tick_period the call period of this function in milliseconds
- */
-LV_ATTRIBUTE_TICK_INC void lv_tick_inc(uint32_t tick_period);
-
-//! @endcond
-
-/**
- * Get the elapsed milliseconds since start up
- * @return the elapsed milliseconds
- */
-uint32_t lv_tick_get(void);
-
-/**
- * Get the elapsed milliseconds since a previous time stamp
- * @param prev_tick a previous time stamp (return value of systick_get() )
- * @return the elapsed milliseconds since 'prev_tick'
- */
-uint32_t lv_tick_elaps(uint32_t prev_tick);
-
-/**********************
- * MACROS
- **********************/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_HAL_TICK_H*/
diff --git a/src/libs/lvgl/src/lv_misc/lv_anim.c b/src/libs/lvgl/src/lv_misc/lv_anim.c
deleted file mode 100644
index 77bd87b9..00000000
--- a/src/libs/lvgl/src/lv_misc/lv_anim.c
+++ /dev/null
@@ -1,474 +0,0 @@
-/**
- * @file anim.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_anim.h"
-
-#if LV_USE_ANIMATION
-#include <stddef.h>
-#include <string.h>
-#include "../lv_core/lv_debug.h"
-#include "../lv_hal/lv_hal_tick.h"
-#include "lv_task.h"
-#include "lv_math.h"
-#include "lv_gc.h"
-
-#if defined(LV_GC_INCLUDE)
-#include LV_GC_INCLUDE
-#endif /* LV_ENABLE_GC */
-
-/*********************
- * DEFINES
- *********************/
-#define LV_ANIM_RESOLUTION 1024
-#define LV_ANIM_RES_SHIFT 10
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static void anim_task(lv_task_t * param);
-static bool anim_ready_handler(lv_anim_t * a);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static uint32_t last_task_run;
-static bool anim_list_changed;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Init. the animation module
- */
-void lv_anim_core_init(void)
-{
- lv_ll_init(&LV_GC_ROOT(_lv_anim_ll), sizeof(lv_anim_t));
- last_task_run = lv_tick_get();
- lv_task_create(anim_task, LV_DISP_DEF_REFR_PERIOD, LV_TASK_PRIO_MID, NULL);
-}
-
-/**
- * Initialize an animation variable.
- * E.g.:
- * lv_anim_t a;
- * lv_anim_init(&a);
- * lv_anim_set_...(&a);
- * lv_anim_craete(&a);
- * @param a pointer to an `lv_anim_t` variable to initialize
- */
-void lv_anim_init(lv_anim_t * a)
-{
- memset(a, 0, sizeof(lv_anim_t));
- a->time = 500;
- a->start = 0;
- a->end = 100;
- a->path_cb = lv_anim_path_linear;
-}
-/**
- * Create an animation
- * @param a an initialized 'anim_t' variable. Not required after call.
- */
-void lv_anim_create(lv_anim_t * a)
-{
- LV_LOG_TRACE("animation create started")
- /* Do not let two animations for the same 'var' with the same 'fp'*/
- if(a->exec_cb != NULL) lv_anim_del(a->var, a->exec_cb); /*fp == NULL would delete all animations of var*/
-
- /*Add the new animation to the animation linked list*/
- lv_anim_t * new_anim = lv_ll_ins_head(&LV_GC_ROOT(_lv_anim_ll));
- LV_ASSERT_MEM(new_anim);
- if(new_anim == NULL) return;
-
- /*Initialize the animation descriptor*/
- a->playback_now = 0;
- memcpy(new_anim, a, sizeof(lv_anim_t));
-
- /*Set the start value*/
- if(new_anim->exec_cb) new_anim->exec_cb(new_anim->var, new_anim->start);
-
- /* Creating an animation changed the linked list.
- * It's important if it happens in a ready callback. (see `anim_task`)*/
- anim_list_changed = true;
-
- LV_LOG_TRACE("animation created")
-}
-
-/**
- * Delete an animation of a variable with a given animator function
- * @param var pointer to variable
- * @param exec_cb a function pointer which is animating 'var',
- * or NULL to delete all the animations of 'var'
- * @return true: at least 1 animation is deleted, false: no animation is deleted
- */
-bool lv_anim_del(void * var, lv_anim_exec_xcb_t exec_cb)
-{
- lv_anim_t * a;
- lv_anim_t * a_next;
- bool del = false;
- a = lv_ll_get_head(&LV_GC_ROOT(_lv_anim_ll));
- while(a != NULL) {
- /*'a' might be deleted, so get the next object while 'a' is valid*/
- a_next = lv_ll_get_next(&LV_GC_ROOT(_lv_anim_ll), a);
-
- if(a->var == var && (a->exec_cb == exec_cb || exec_cb == NULL)) {
- lv_ll_rem(&LV_GC_ROOT(_lv_anim_ll), a);
- lv_mem_free(a);
- anim_list_changed = true; /*Read by `anim_task`. It need to know if a delete occurred in
- the linked list*/
- del = true;
- }
-
- a = a_next;
- }
-
- return del;
-}
-
-/**
- * Get the number of currently running animations
- * @return the number of running animations
- */
-uint16_t lv_anim_count_running(void)
-{
- uint16_t cnt = 0;
- lv_anim_t * a;
- LV_LL_READ(LV_GC_ROOT(_lv_anim_ll), a) cnt++;
-
- return cnt++;
-}
-
-/**
- * Calculate the time of an animation with a given speed and the start and end values
- * @param speed speed of animation in unit/sec
- * @param start start value of the animation
- * @param end end value of the animation
- * @return the required time [ms] for the animation with the given parameters
- */
-uint32_t lv_anim_speed_to_time(uint16_t speed, lv_anim_value_t start, lv_anim_value_t end)
-{
- int32_t d = LV_MATH_ABS((int32_t)start - end);
- uint32_t time = (int32_t)((int32_t)(d * 1000) / speed);
-
- if(time > UINT32_MAX) time = UINT32_MAX;
-
- if(time == 0) {
- time++;
- }
-
- return time;
-}
-
-/**
- * Calculate the current value of an animation applying linear characteristic
- * @param a pointer to an animation
- * @return the current value to set
- */
-lv_anim_value_t lv_anim_path_linear(const lv_anim_t * a)
-{
- /*Calculate the current step*/
- uint32_t step;
- if(a->time == a->act_time) {
- step = LV_ANIM_RESOLUTION; /*Use the last value if the time fully elapsed*/
- } else {
- step = ((int32_t)a->act_time * LV_ANIM_RESOLUTION) / a->time;
- }
-
- /* Get the new value which will be proportional to `step`
- * and the `start` and `end` values*/
- int32_t new_value;
- new_value = (int32_t)step * (a->end - a->start);
- new_value = new_value >> LV_ANIM_RES_SHIFT;
- new_value += a->start;
-
- return (lv_anim_value_t)new_value;
-}
-
-/**
- * Calculate the current value of an animation slowing down the start phase
- * @param a pointer to an animation
- * @return the current value to set
- */
-lv_anim_value_t lv_anim_path_ease_in(const lv_anim_t * a)
-{
- /*Calculate the current step*/
- uint32_t t;
- if(a->time == a->act_time)
- t = 1024;
- else
- t = (uint32_t)((uint32_t)a->act_time * 1024) / a->time;
-
- int32_t step = lv_bezier3(t, 0, 1, 1, 1024);
-
- int32_t new_value;
- new_value = (int32_t)step * (a->end - a->start);
- new_value = new_value >> 10;
- new_value += a->start;
-
- return (lv_anim_value_t)new_value;
-}
-
-/**
- * Calculate the current value of an animation slowing down the end phase
- * @param a pointer to an animation
- * @return the current value to set
- */
-lv_anim_value_t lv_anim_path_ease_out(const lv_anim_t * a)
-{
- /*Calculate the current step*/
-
- uint32_t t;
- if(a->time == a->act_time)
- t = 1024;
- else
- t = (uint32_t)((uint32_t)a->act_time * 1024) / a->time;
-
- int32_t step = lv_bezier3(t, 0, 1023, 1023, 1024);
-
- int32_t new_value;
- new_value = (int32_t)step * (a->end - a->start);
- new_value = new_value >> 10;
- new_value += a->start;
-
- return (lv_anim_value_t)new_value;
-}
-
-/**
- * Calculate the current value of an animation applying an "S" characteristic (cosine)
- * @param a pointer to an animation
- * @return the current value to set
- */
-lv_anim_value_t lv_anim_path_ease_in_out(const lv_anim_t * a)
-{
- /*Calculate the current step*/
-
- uint32_t t;
- if(a->time == a->act_time)
- t = 1024;
- else
- t = (uint32_t)((uint32_t)a->act_time * 1024) / a->time;
-
- int32_t step = lv_bezier3(t, 0, 100, 924, 1024);
-
- int32_t new_value;
- new_value = (int32_t)step * (a->end - a->start);
- new_value = new_value >> 10;
- new_value += a->start;
-
- return (lv_anim_value_t)new_value;
-}
-
-/**
- * Calculate the current value of an animation with overshoot at the end
- * @param a pointer to an animation
- * @return the current value to set
- */
-lv_anim_value_t lv_anim_path_overshoot(const lv_anim_t * a)
-{
- /*Calculate the current step*/
-
- uint32_t t;
- if(a->time == a->act_time)
- t = 1024;
- else
- t = (uint32_t)((uint32_t)a->act_time * 1024) / a->time;
-
- int32_t step = lv_bezier3(t, 0, 600, 1300, 1024);
-
- int32_t new_value;
- new_value = (int32_t)step * (a->end - a->start);
- new_value = new_value >> 10;
- new_value += a->start;
-
- return (lv_anim_value_t)new_value;
-}
-
-/**
- * Calculate the current value of an animation with 3 bounces
- * @param a pointer to an animation
- * @return the current value to set
- */
-lv_anim_value_t lv_anim_path_bounce(const lv_anim_t * a)
-{
- /*Calculate the current step*/
- uint32_t t;
- if(a->time == a->act_time)
- t = 1024;
- else
- t = (uint32_t)((uint32_t)a->act_time * 1024) / a->time;
-
- int32_t diff = (a->end - a->start);
-
- /*3 bounces has 5 parts: 3 down and 2 up. One part is t / 5 long*/
-
- if(t < 408) {
- /*Go down*/
- t = (t * 2500) >> 10; /*[0..1024] range*/
- } else if(t >= 408 && t < 614) {
- /*First bounce back*/
- t -= 408;
- t = t * 5; /*to [0..1024] range*/
- t = 1024 - t;
- diff = diff / 6;
- } else if(t >= 614 && t < 819) {
- /*Fall back*/
- t -= 614;
- t = t * 5; /*to [0..1024] range*/
- diff = diff / 6;
- } else if(t >= 819 && t < 921) {
- /*Second bounce back*/
- t -= 819;
- t = t * 10; /*to [0..1024] range*/
- t = 1024 - t;
- diff = diff / 16;
- } else if(t >= 921 && t <= 1024) {
- /*Fall back*/
- t -= 921;
- t = t * 10; /*to [0..1024] range*/
- diff = diff / 16;
- }
-
- if(t > 1024) t = 1024;
-
- int32_t step = lv_bezier3(t, 1024, 1024, 800, 0);
-
- int32_t new_value;
- new_value = (int32_t)step * diff;
- new_value = new_value >> 10;
- new_value = a->end - new_value;
-
- return (lv_anim_value_t)new_value;
-}
-
-/**
- * Calculate the current value of an animation applying step characteristic.
- * (Set end value on the end of the animation)
- * @param a pointer to an animation
- * @return the current value to set
- */
-lv_anim_value_t lv_anim_path_step(const lv_anim_t * a)
-{
- if(a->act_time >= a->time)
- return a->end;
- else
- return a->start;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Periodically handle the animations.
- * @param param unused
- */
-static void anim_task(lv_task_t * param)
-{
- (void)param;
-
- lv_anim_t * a;
- LV_LL_READ(LV_GC_ROOT(_lv_anim_ll), a)
- {
- a->has_run = 0;
- }
-
- uint32_t elaps = lv_tick_elaps(last_task_run);
-
- a = lv_ll_get_head(&LV_GC_ROOT(_lv_anim_ll));
-
- while(a != NULL) {
- /*It can be set by `lv_anim_del()` typically in `end_cb`. If set then an animation delete
- * happened in `anim_ready_handler` which could make this linked list reading corrupt
- * because the list is changed meanwhile
- */
- anim_list_changed = false;
-
- if(!a->has_run) {
- a->has_run = 1; /*The list readying might be reseted so need to know which anim has run already*/
- a->act_time += elaps;
- if(a->act_time >= 0) {
- if(a->act_time > a->time) a->act_time = a->time;
-
- int32_t new_value;
- new_value = a->path_cb(a);
-
- /*Apply the calculated value*/
- if(a->exec_cb) a->exec_cb(a->var, new_value);
-
- /*If the time is elapsed the animation is ready*/
- if(a->act_time >= a->time) {
- anim_ready_handler(a);
- }
- }
- }
-
- /* If the linked list changed due to anim. delete then it's not safe to continue
- * the reading of the list from here -> start from the head*/
- if(anim_list_changed)
- a = lv_ll_get_head(&LV_GC_ROOT(_lv_anim_ll));
- else
- a = lv_ll_get_next(&LV_GC_ROOT(_lv_anim_ll), a);
- }
-
- last_task_run = lv_tick_get();
-}
-
-/**
- * Called when an animation is ready to do the necessary thinks
- * e.g. repeat, play back, delete etc.
- * @param a pointer to an animation descriptor
- * @return true: animation delete occurred nnd the `LV_GC_ROOT(_lv_anim_ll)` has changed
- * */
-static bool anim_ready_handler(lv_anim_t * a)
-{
-
- /*Delete the animation if
- * - no repeat and no play back (simple one shot animation)
- * - no repeat, play back is enabled and play back is ready */
- if((a->repeat == 0 && a->playback == 0) || (a->repeat == 0 && a->playback == 1 && a->playback_now == 1)) {
-
- /*Create copy from the animation and delete the animation from the list.
- * This way the `ready_cb` will see the animations like it's animation is ready deleted*/
- lv_anim_t a_tmp;
- memcpy(&a_tmp, a, sizeof(lv_anim_t));
- lv_ll_rem(&LV_GC_ROOT(_lv_anim_ll), a);
- lv_mem_free(a);
- anim_list_changed = true;
-
- /* Call the callback function at the end*/
- if(a_tmp.ready_cb != NULL) a_tmp.ready_cb(&a_tmp);
- }
- /*If the animation is not deleted then restart it*/
- else {
- a->act_time = -a->repeat_pause; /*Restart the animation*/
- /*Swap the start and end values in play back mode*/
- if(a->playback != 0) {
- /*If now turning back use the 'playback_pause*/
- if(a->playback_now == 0) a->act_time = -a->playback_pause;
-
- /*Toggle the play back state*/
- a->playback_now = a->playback_now == 0 ? 1 : 0;
- /*Swap the start and end values*/
- int32_t tmp;
- tmp = a->start;
- a->start = a->end;
- a->end = tmp;
- }
- }
-
- return anim_list_changed;
-}
-#endif
diff --git a/src/libs/lvgl/src/lv_misc/lv_anim.h b/src/libs/lvgl/src/lv_misc/lv_anim.h
deleted file mode 100644
index b43035aa..00000000
--- a/src/libs/lvgl/src/lv_misc/lv_anim.h
+++ /dev/null
@@ -1,331 +0,0 @@
-/**
- * @file anim.h
- *
- */
-
-#ifndef ANIM_H
-#define ANIM_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#include <stdint.h>
-#include <stdbool.h>
-#include <string.h>
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/** Can be used to indicate if animations are enabled or disabled in a case*/
-enum {
- LV_ANIM_OFF,
- LV_ANIM_ON,
-};
-
-typedef uint8_t lv_anim_enable_t;
-
-/** Type of the animated value*/
-typedef lv_coord_t lv_anim_value_t;
-
-#if LV_USE_ANIMATION
-
-struct _lv_anim_t;
-
-/** Generic prototype of "animator" functions.
- * First parameter is the variable to animate.
- * Second parameter is the value to set.
- * Compatible with `lv_xxx_set_yyy(obj, value)` functions
- * The `x` in `_xcb_t` means its not a fully generic prototype because
- * it doesn't receive `lv_anim_t *` as its first argument*/
-typedef void (*lv_anim_exec_xcb_t)(void *, lv_anim_value_t);
-
-/** Same as `lv_anim_exec_xcb_t` but receives `lv_anim_t *` as the first parameter.
- * It's more consistent but less convenient. Might be used by binding generator functions.*/
-typedef void (*lv_anim_custom_exec_cb_t)(struct _lv_anim_t *, lv_anim_value_t);
-
-/** Get the current value during an animation*/
-typedef lv_anim_value_t (*lv_anim_path_cb_t)(const struct _lv_anim_t *);
-
-/** Callback to call when the animation is ready*/
-typedef void (*lv_anim_ready_cb_t)(struct _lv_anim_t *);
-
-/** Describes an animation*/
-typedef struct _lv_anim_t
-{
- void * var; /**<Variable to animate*/
- lv_anim_exec_xcb_t exec_cb; /**< Function to execute to animate*/
- lv_anim_path_cb_t path_cb; /**< Function to get the steps of animations*/
- lv_anim_ready_cb_t ready_cb; /**< Call it when the animation is ready*/
- int32_t start; /**< Start value*/
- int32_t end; /**< End value*/
- uint32_t time; /**< Animation time in ms*/
- int32_t act_time; /**< Current time in animation. Set to negative to make delay.*/
- uint16_t playback_pause; /**< Wait before play back*/
- uint16_t repeat_pause; /**< Wait before repeat*/
-#if LV_USE_USER_DATA
- lv_anim_user_data_t user_data; /**< Custom user data*/
-#endif
-
- uint8_t playback : 1; /**< When the animation is ready play it back*/
- uint8_t repeat : 1; /**< Repeat the animation infinitely*/
- /*Animation system use these - user shouldn't set*/
- uint8_t playback_now : 1; /**< Play back is in progress*/
- uint32_t has_run : 1; /**< Indicates the animation has run in this round*/
-} lv_anim_t;
-
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Init. the animation module
- */
-void lv_anim_core_init(void);
-
-/**
- * Initialize an animation variable.
- * E.g.:
- * lv_anim_t a;
- * lv_anim_init(&a);
- * lv_anim_set_...(&a);
- * lv_anim_create(&a);
- * @param a pointer to an `lv_anim_t` variable to initialize
- */
-void lv_anim_init(lv_anim_t * a);
-
-/**
- * Set a variable to animate function to execute on `var`
- * @param a pointer to an initialized `lv_anim_t` variable
- * @param var pointer to a variable to animate
- * @param exec_cb a function to execute.
- * LittelvGL's built-in functions can be used.
- * E.g. lv_obj_set_x
- */
-static inline void lv_anim_set_exec_cb(lv_anim_t * a, void * var, lv_anim_exec_xcb_t exec_cb)
-{
- a->var = var;
- a->exec_cb = exec_cb;
-}
-
-/**
- * Set the duration and delay of an animation
- * @param a pointer to an initialized `lv_anim_t` variable
- * @param duration duration of the animation in milliseconds
- * @param delay delay before the animation in milliseconds
- */
-static inline void lv_anim_set_time(lv_anim_t * a, uint16_t duration, int16_t delay)
-{
- a->time = duration;
- a->act_time = (int16_t)(-delay);
-}
-
-/**
- * Set the start and end values of an animation
- * @param a pointer to an initialized `lv_anim_t` variable
- * @param start the start value
- * @param end the end value
- */
-static inline void lv_anim_set_values(lv_anim_t * a, lv_anim_value_t start, lv_anim_value_t end)
-{
- a->start = start;
- a->end = end;
-}
-
-/**
- * Similar to `lv_anim_set_var_and_cb` but `lv_anim_custom_exec_cb_t` receives
- * `lv_anim_t * ` as its first parameter instead of `void *`.
- * This function might be used when LittlevGL is binded to other languages because
- * it's more consistent to have `lv_anim_t *` as first parameter.
- * @param a pointer to an initialized `lv_anim_t` variable
- * @param exec_cb a function to execute.
- */
-static inline void lv_anim_set_custom_exec_cb(lv_anim_t * a, lv_anim_custom_exec_cb_t exec_cb)
-{
- a->var = a;
- a->exec_cb = (lv_anim_exec_xcb_t)exec_cb;
-}
-
-/**
- * Set the path (curve) of the animation.
- * @param a pointer to an initialized `lv_anim_t` variable
- * @param path_cb a function the get the current value of the animation.
- * The built in functions starts with `lv_anim_path_...`
- */
-static inline void lv_anim_set_path_cb(lv_anim_t * a, lv_anim_path_cb_t path_cb)
-{
- a->path_cb = path_cb;
-}
-
-/**
- * Set a function call when the animation is ready
- * @param a pointer to an initialized `lv_anim_t` variable
- * @param ready_cb a function call when the animation is ready
- */
-static inline void lv_anim_set_ready_cb(lv_anim_t * a, lv_anim_ready_cb_t ready_cb)
-{
- a->ready_cb = ready_cb;
-}
-
-/**
- * Make the animation to play back to when the forward direction is ready
- * @param a pointer to an initialized `lv_anim_t` variable
- * @param wait_time time in milliseconds to wait before starting the back direction
- */
-static inline void lv_anim_set_playback(lv_anim_t * a, uint16_t wait_time)
-{
- a->playback = 1;
- a->playback_pause = wait_time;
-}
-
-/**
- * Disable playback. (Disabled after `lv_anim_init()`)
- * @param a pointer to an initialized `lv_anim_t` variable
- */
-static inline void lv_anim_clear_playback(lv_anim_t * a)
-{
- a->playback = 0;
-}
-
-/**
- * Make the animation to start again when ready.
- * @param a pointer to an initialized `lv_anim_t` variable
- * @param wait_time time in milliseconds to wait before starting the animation again
- */
-static inline void lv_anim_set_repeat(lv_anim_t * a, uint16_t wait_time)
-{
- a->repeat = 1;
- a->repeat_pause = wait_time;
-}
-
-/**
- * Disable repeat. (Disabled after `lv_anim_init()`)
- * @param a pointer to an initialized `lv_anim_t` variable
- */
-static inline void lv_anim_clear_repeat(lv_anim_t * a)
-{
- a->repeat = 0;
-}
-
-/**
- * Create an animation
- * @param a an initialized 'anim_t' variable. Not required after call.
- */
-void lv_anim_create(lv_anim_t * a);
-
-/**
- * Delete an animation of a variable with a given animator function
- * @param var pointer to variable
- * @param exec_cb a function pointer which is animating 'var',
- * or NULL to ignore it and delete all the animations of 'var
- * @return true: at least 1 animation is deleted, false: no animation is deleted
- */
-bool lv_anim_del(void * var, lv_anim_exec_xcb_t exec_cb);
-
-/**
- * Delete an aniamation by getting the animated variable from `a`.
- * Only animations with `exec_cb` will be deleted.
- * This function exist becasue it's logical that all anim functions receives an
- * `lv_anim_t` as their first parameter. It's not practical in C but might makes
- * the API more conequent and makes easier to genrate bindings.
- * @param a pointer to an animation.
- * @param exec_cb a function pointer which is animating 'var',
- * or NULL to ignore it and delete all the animations of 'var
- * @return true: at least 1 animation is deleted, false: no animation is deleted
- */
-static inline bool lv_anim_custom_del(lv_anim_t * a, lv_anim_custom_exec_cb_t exec_cb)
-{
- return lv_anim_del(a->var, (lv_anim_exec_xcb_t)exec_cb);
-}
-
-/**
- * Get the number of currently running animations
- * @return the number of running animations
- */
-uint16_t lv_anim_count_running(void);
-
-/**
- * Calculate the time of an animation with a given speed and the start and end values
- * @param speed speed of animation in unit/sec
- * @param start start value of the animation
- * @param end end value of the animation
- * @return the required time [ms] for the animation with the given parameters
- */
-uint32_t lv_anim_speed_to_time(uint16_t speed, lv_anim_value_t start, lv_anim_value_t end);
-
-/**
- * Calculate the current value of an animation applying linear characteristic
- * @param a pointer to an animation
- * @return the current value to set
- */
-lv_anim_value_t lv_anim_path_linear(const lv_anim_t * a);
-
-/**
- * Calculate the current value of an animation slowing down the start phase
- * @param a pointer to an animation
- * @return the current value to set
- */
-lv_anim_value_t lv_anim_path_ease_in(const lv_anim_t * a);
-
-/**
- * Calculate the current value of an animation slowing down the end phase
- * @param a pointer to an animation
- * @return the current value to set
- */
-lv_anim_value_t lv_anim_path_ease_out(const lv_anim_t * a);
-
-/**
- * Calculate the current value of an animation applying an "S" characteristic (cosine)
- * @param a pointer to an animation
- * @return the current value to set
- */
-lv_anim_value_t lv_anim_path_ease_in_out(const lv_anim_t * a);
-
-/**
- * Calculate the current value of an animation with overshoot at the end
- * @param a pointer to an animation
- * @return the current value to set
- */
-lv_anim_value_t lv_anim_path_overshoot(const lv_anim_t * a);
-
-/**
- * Calculate the current value of an animation with 3 bounces
- * @param a pointer to an animation
- * @return the current value to set
- */
-lv_anim_value_t lv_anim_path_bounce(const lv_anim_t * a);
-
-/**
- * Calculate the current value of an animation applying step characteristic.
- * (Set end value on the end of the animation)
- * @param a pointer to an animation
- * @return the current value to set
- */
-lv_anim_value_t lv_anim_path_step(const lv_anim_t * a);
-
-/**********************
- * MACROS
- **********************/
-
-#endif /*LV_USE_ANIMATION == 0*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_ANIM_H*/
diff --git a/src/libs/lvgl/src/lv_misc/lv_area.c b/src/libs/lvgl/src/lv_misc/lv_area.c
deleted file mode 100644
index de649c5b..00000000
--- a/src/libs/lvgl/src/lv_misc/lv_area.c
+++ /dev/null
@@ -1,210 +0,0 @@
-/**
- * @file lv_area.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#include "lv_area.h"
-#include "lv_math.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-
-/**********************
- * STATIC VARIABLES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Initialize an area
- * @param area_p pointer to an area
- * @param x1 left coordinate of the area
- * @param y1 top coordinate of the area
- * @param x2 right coordinate of the area
- * @param y2 bottom coordinate of the area
- */
-void lv_area_set(lv_area_t * area_p, lv_coord_t x1, lv_coord_t y1, lv_coord_t x2, lv_coord_t y2)
-{
- area_p->x1 = x1;
- area_p->y1 = y1;
- area_p->x2 = x2;
- area_p->y2 = y2;
-}
-
-/**
- * Set the width of an area
- * @param area_p pointer to an area
- * @param w the new width of the area (w == 1 makes x1 == x2)
- */
-void lv_area_set_width(lv_area_t * area_p, lv_coord_t w)
-{
- area_p->x2 = area_p->x1 + w - 1;
-}
-
-/**
- * Set the height of an area
- * @param area_p pointer to an area
- * @param h the new height of the area (h == 1 makes y1 == y2)
- */
-void lv_area_set_height(lv_area_t * area_p, lv_coord_t h)
-{
- area_p->y2 = area_p->y1 + h - 1;
-}
-
-/**
- * Set the position of an area (width and height will be kept)
- * @param area_p pointer to an area
- * @param x the new x coordinate of the area
- * @param y the new y coordinate of the area
- */
-void lv_area_set_pos(lv_area_t * area_p, lv_coord_t x, lv_coord_t y)
-{
- lv_coord_t w = lv_area_get_width(area_p);
- lv_coord_t h = lv_area_get_height(area_p);
- area_p->x1 = x;
- area_p->y1 = y;
- lv_area_set_width(area_p, w);
- lv_area_set_height(area_p, h);
-}
-
-/**
- * Return with area of an area (x * y)
- * @param area_p pointer to an area
- * @return size of area
- */
-uint32_t lv_area_get_size(const lv_area_t * area_p)
-{
- uint32_t size;
-
- size = (uint32_t)(area_p->x2 - area_p->x1 + 1) * (area_p->y2 - area_p->y1 + 1);
-
- return size;
-}
-
-/**
- * Get the common parts of two areas
- * @param res_p pointer to an area, the result will be stored here
- * @param a1_p pointer to the first area
- * @param a2_p pointer to the second area
- * @return false: the two area has NO common parts, res_p is invalid
- */
-bool lv_area_intersect(lv_area_t * res_p, const lv_area_t * a1_p, const lv_area_t * a2_p)
-{
- /* Get the smaller area from 'a1_p' and 'a2_p' */
- res_p->x1 = LV_MATH_MAX(a1_p->x1, a2_p->x1);
- res_p->y1 = LV_MATH_MAX(a1_p->y1, a2_p->y1);
- res_p->x2 = LV_MATH_MIN(a1_p->x2, a2_p->x2);
- res_p->y2 = LV_MATH_MIN(a1_p->y2, a2_p->y2);
-
- /*If x1 or y1 greater then x2 or y2 then the areas union is empty*/
- bool union_ok = true;
- if((res_p->x1 > res_p->x2) || (res_p->y1 > res_p->y2)) {
- union_ok = false;
- }
-
- return union_ok;
-}
-/**
- * Join two areas into a third which involves the other two
- * @param res_p pointer to an area, the result will be stored here
- * @param a1_p pointer to the first area
- * @param a2_p pointer to the second area
- */
-void lv_area_join(lv_area_t * a_res_p, const lv_area_t * a1_p, const lv_area_t * a2_p)
-{
- a_res_p->x1 = LV_MATH_MIN(a1_p->x1, a2_p->x1);
- a_res_p->y1 = LV_MATH_MIN(a1_p->y1, a2_p->y1);
- a_res_p->x2 = LV_MATH_MAX(a1_p->x2, a2_p->x2);
- a_res_p->y2 = LV_MATH_MAX(a1_p->y2, a2_p->y2);
-}
-
-/**
- * Check if a point is on an area
- * @param a_p pointer to an area
- * @param p_p pointer to a point
- * @return false:the point is out of the area
- */
-bool lv_area_is_point_on(const lv_area_t * a_p, const lv_point_t * p_p)
-{
- bool is_on = false;
-
- if((p_p->x >= a_p->x1 && p_p->x <= a_p->x2) && ((p_p->y >= a_p->y1 && p_p->y <= a_p->y2))) {
- is_on = true;
- }
-
- return is_on;
-}
-
-/**
- * Check if two area has common parts
- * @param a1_p pointer to an area.
- * @param a2_p pointer to an other area
- * @return false: a1_p and a2_p has no common parts
- */
-bool lv_area_is_on(const lv_area_t * a1_p, const lv_area_t * a2_p)
-{
- if((a1_p->x1 <= a2_p->x2) && (a1_p->x2 >= a2_p->x1) && (a1_p->y1 <= a2_p->y2) && (a1_p->y2 >= a2_p->y1)) {
- return true;
- } else {
- return false;
- }
-}
-
-/**
- * Check if an area is fully on an other
- * @param ain_p pointer to an area which could be in 'aholder_p'
- * @param aholder pointer to an area which could involve 'ain_p'
- * @return
- */
-bool lv_area_is_in(const lv_area_t * ain_p, const lv_area_t * aholder_p)
-{
- bool is_in = false;
-
- if(ain_p->x1 >= aholder_p->x1 && ain_p->y1 >= aholder_p->y1 && ain_p->x2 <= aholder_p->x2 &&
- ain_p->y2 <= aholder_p->y2) {
- is_in = true;
- }
-
- return is_in;
-}
-
-/**
- * Increment or decrement an area's size by a single amount
- * @param a_p pointer to an area to grow
- * @param amount amount to increment the area, or negative to decrement
- */
-void lv_area_increment(lv_area_t * a_p, const lv_coord_t amount)
-{
- a_p->x1 -= amount;
- a_p->y1 -= amount;
- a_p->x2 += amount;
- a_p->y2 += amount;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
diff --git a/src/libs/lvgl/src/lv_misc/lv_area.h b/src/libs/lvgl/src/lv_misc/lv_area.h
deleted file mode 100644
index 211bebd8..00000000
--- a/src/libs/lvgl/src/lv_misc/lv_area.h
+++ /dev/null
@@ -1,186 +0,0 @@
-/**
- * @file lv_area.h
- *
- */
-
-#ifndef LV_AREA_H
-#define LV_AREA_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#include <string.h>
-#include <stdbool.h>
-#include <stdint.h>
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-/*********************
- * DEFINES
- *********************/
-/*To avoid overflow don't let the max ranges (reduce with 1000) */
-#define LV_COORD_MAX ((lv_coord_t)((uint32_t)((uint32_t)1 << (8 * sizeof(lv_coord_t) - 1)) - 1000))
-#define LV_COORD_MIN (-LV_COORD_MAX)
-
-LV_EXPORT_CONST_INT(LV_COORD_MAX);
-LV_EXPORT_CONST_INT(LV_COORD_MIN);
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**
- * Represents a point on the screen.
- */
-typedef struct
-{
- lv_coord_t x;
- lv_coord_t y;
-} lv_point_t;
-
-/** Represents an area of the screen. */
-typedef struct
-{
- lv_coord_t x1;
- lv_coord_t y1;
- lv_coord_t x2;
- lv_coord_t y2;
-} lv_area_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Initialize an area
- * @param area_p pointer to an area
- * @param x1 left coordinate of the area
- * @param y1 top coordinate of the area
- * @param x2 right coordinate of the area
- * @param y2 bottom coordinate of the area
- */
-void lv_area_set(lv_area_t * area_p, lv_coord_t x1, lv_coord_t y1, lv_coord_t x2, lv_coord_t y2);
-
-/**
- * Copy an area
- * @param dest pointer to the destination area
- * @param src pointer to the source area
- */
-inline static void lv_area_copy(lv_area_t * dest, const lv_area_t * src)
-{
- memcpy(dest, src, sizeof(lv_area_t));
-}
-
-/**
- * Get the width of an area
- * @param area_p pointer to an area
- * @return the width of the area (if x1 == x2 -> width = 1)
- */
-static inline lv_coord_t lv_area_get_width(const lv_area_t * area_p)
-{
- return (lv_coord_t)(area_p->x2 - area_p->x1 + 1);
-}
-
-/**
- * Get the height of an area
- * @param area_p pointer to an area
- * @return the height of the area (if y1 == y2 -> height = 1)
- */
-static inline lv_coord_t lv_area_get_height(const lv_area_t * area_p)
-{
- return (lv_coord_t)(area_p->y2 - area_p->y1 + 1);
-}
-
-/**
- * Set the width of an area
- * @param area_p pointer to an area
- * @param w the new width of the area (w == 1 makes x1 == x2)
- */
-void lv_area_set_width(lv_area_t * area_p, lv_coord_t w);
-
-/**
- * Set the height of an area
- * @param area_p pointer to an area
- * @param h the new height of the area (h == 1 makes y1 == y2)
- */
-void lv_area_set_height(lv_area_t * area_p, lv_coord_t h);
-
-/**
- * Set the position of an area (width and height will be kept)
- * @param area_p pointer to an area
- * @param x the new x coordinate of the area
- * @param y the new y coordinate of the area
- */
-void lv_area_set_pos(lv_area_t * area_p, lv_coord_t x, lv_coord_t y);
-
-/**
- * Return with area of an area (x * y)
- * @param area_p pointer to an area
- * @return size of area
- */
-uint32_t lv_area_get_size(const lv_area_t * area_p);
-
-/**
- * Get the common parts of two areas
- * @param res_p pointer to an area, the result will be stored her
- * @param a1_p pointer to the first area
- * @param a2_p pointer to the second area
- * @return false: the two area has NO common parts, res_p is invalid
- */
-bool lv_area_intersect(lv_area_t * res_p, const lv_area_t * a1_p, const lv_area_t * a2_p);
-
-/**
- * Join two areas into a third which involves the other two
- * @param res_p pointer to an area, the result will be stored here
- * @param a1_p pointer to the first area
- * @param a2_p pointer to the second area
- */
-void lv_area_join(lv_area_t * a_res_p, const lv_area_t * a1_p, const lv_area_t * a2_p);
-
-/**
- * Check if a point is on an area
- * @param a_p pointer to an area
- * @param p_p pointer to a point
- * @return false:the point is out of the area
- */
-bool lv_area_is_point_on(const lv_area_t * a_p, const lv_point_t * p_p);
-
-/**
- * Check if two area has common parts
- * @param a1_p pointer to an area.
- * @param a2_p pointer to an other area
- * @return false: a1_p and a2_p has no common parts
- */
-bool lv_area_is_on(const lv_area_t * a1_p, const lv_area_t * a2_p);
-
-/**
- * Check if an area is fully on an other
- * @param ain_p pointer to an area which could be on aholder_p
- * @param aholder pointer to an area which could involve ain_p
- * @return
- */
-bool lv_area_is_in(const lv_area_t * ain_p, const lv_area_t * aholder_p);
-
-/**
- * Increment or decrement an area's size by a single amount
- * @param a_p pointer to an area to grow
- * @param amount amount to increment the area, or negative to decrement
- */
-void lv_area_increment(lv_area_t * a_p, const lv_coord_t amount);
-
-/**********************
- * MACROS
- **********************/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif
diff --git a/src/libs/lvgl/src/lv_misc/lv_async.c b/src/libs/lvgl/src/lv_misc/lv_async.c
deleted file mode 100644
index 2a836432..00000000
--- a/src/libs/lvgl/src/lv_misc/lv_async.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * @file lv_async.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-
-#include "lv_async.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-
-static void lv_async_task_cb(lv_task_t *task);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-lv_res_t lv_async_call(lv_async_cb_t async_xcb, void * user_data)
-{
- /*Allocate an info structure */
- lv_async_info_t *info = lv_mem_alloc(sizeof(lv_async_info_t));
-
- if(info == NULL)
- return LV_RES_INV;
-
- /* Create a new task */
- /* Use highest priority so that it will run before a refresh */
- lv_task_t *task = lv_task_create(lv_async_task_cb, 0, LV_TASK_PRIO_HIGHEST, info);
-
- if(task == NULL) {
- lv_mem_free(info);
- return LV_RES_INV;
- }
-
- info->cb = async_xcb;
- info->user_data = user_data;
-
- /* Set the task's user data */
- task->user_data = info;
- lv_task_once(task);
- return LV_RES_OK;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-static void lv_async_task_cb(lv_task_t *task)
-{
- lv_async_info_t *info = (lv_async_info_t *)task->user_data;
-
- info->cb(info->user_data);
-
- lv_mem_free(info);
-}
diff --git a/src/libs/lvgl/src/lv_misc/lv_async.h b/src/libs/lvgl/src/lv_misc/lv_async.h
deleted file mode 100644
index 9423cd8e..00000000
--- a/src/libs/lvgl/src/lv_misc/lv_async.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * @file lv_async.h
- *
- */
-
-#ifndef LV_ASYNC_H
-#define LV_ASYNC_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-
-#include "lv_task.h"
-#include "lv_types.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**
- * Type for async callback.
- */
-typedef void (*lv_async_cb_t)(void *);
-
-typedef struct _lv_async_info_t {
- lv_async_cb_t cb;
- void *user_data;
-} lv_async_info_t;
-
-struct _lv_obj_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Call an asynchronous function the next time lv_task_handler() is run. This function is likely to return
- * **before** the call actually happens!
- * @param task_xcb a callback which is the task itself.
- * (the 'x' in the argument name indicates that its not a fully generic function because it not follows
- * the `func_name(object, callback, ...)` convention)
- * @param user_data custom parameter
- */
-lv_res_t lv_async_call(lv_async_cb_t async_xcb, void * user_data);
-
-/**********************
- * MACROS
- **********************/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_TEMPL_H*/
diff --git a/src/libs/lvgl/src/lv_misc/lv_bidi.c b/src/libs/lvgl/src/lv_misc/lv_bidi.c
deleted file mode 100644
index 6e50d926..00000000
--- a/src/libs/lvgl/src/lv_misc/lv_bidi.c
+++ /dev/null
@@ -1,544 +0,0 @@
-/**
- * @file lv_bidi.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include <stddef.h>
-#include "lv_bidi.h"
-#include "lv_txt.h"
-#include "../lv_draw/lv_draw.h"
-
-#if LV_USE_BIDI
-
-/*********************
- * DEFINES
- *********************/
-#define LV_BIDI_BRACKLET_DEPTH 4
-
-// Highest bit of the 16-bit pos_conv value specifies whether this pos is RTL or not
-#define GET_POS(x) ((x) & 0x7FFF)
-#define IS_RTL_POS(x) (((x) & 0x8000) != 0)
-#define SET_RTL_POS(x, is_rtl) (GET_POS(x) | ((is_rtl)? 0x8000: 0))
-
-/**********************
- * TYPEDEFS
- **********************/
-typedef struct
-{
- uint32_t bracklet_pos;
- lv_bidi_dir_t dir;
-}bracket_stack_t;
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static lv_bidi_dir_t get_next_run(const char * txt, lv_bidi_dir_t base_dir, uint32_t max_len, uint32_t * len, uint16_t * pos_conv_len);
-static void rtl_reverse(char * dest, const char * src, uint32_t len, uint16_t *pos_conv_out, uint16_t pos_conv_rd_base, uint16_t pos_conv_len);
-static uint32_t char_change_to_pair(uint32_t letter);
-static lv_bidi_dir_t bracket_process(const char * txt, uint32_t next_pos, uint32_t len, uint32_t letter, lv_bidi_dir_t base_dir);
-static void fill_pos_conv(uint16_t * out, uint16_t len, uint16_t index);
-static uint32_t get_txt_len(const char * txt, uint32_t max_len);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static const uint8_t bracket_left[] = {"<({["};
-static const uint8_t bracket_right[] = {">)}]"};
-static bracket_stack_t br_stack[LV_BIDI_BRACKLET_DEPTH];
-static uint8_t br_stack_p;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-void lv_bidi_process(const char * str_in, char * str_out, lv_bidi_dir_t base_dir)
-{
- if(base_dir == LV_BIDI_DIR_AUTO) base_dir = lv_bidi_detect_base_dir(str_in);
-
- uint32_t par_start = 0;
- uint32_t par_len;
-
- while(str_in[par_start] == '\n' || str_in[par_start] == '\r') {
- str_out[par_start] = str_in[par_start];
- par_start ++;
- }
-
- while(str_in[par_start] != '\0') {
- par_len = lv_bidi_get_next_paragraph(&str_in[par_start]);
- lv_bidi_process_paragraph(&str_in[par_start], &str_out[par_start], par_len, base_dir, NULL, 0);
- par_start += par_len;
-
- while(str_in[par_start] == '\n' || str_in[par_start] == '\r') {
- str_out[par_start] = str_in[par_start];
- par_start ++;
- }
- }
-
- str_out[par_start] = '\0';
-}
-
-lv_bidi_dir_t lv_bidi_detect_base_dir(const char * txt)
-{
- uint32_t i = 0;
- uint32_t letter;
- while(txt[i] != '\0') {
- letter = lv_txt_encoded_next(txt, &i);
-
- lv_bidi_dir_t dir;
- dir = lv_bidi_get_letter_dir(letter);
- if(dir == LV_BIDI_DIR_RTL || dir == LV_BIDI_DIR_LTR) return dir;
- }
-
- /*If there were no strong char earlier return with the default base dir */
- if(LV_BIDI_BASE_DIR_DEF == LV_BIDI_DIR_AUTO) return LV_BIDI_DIR_LTR;
- else return LV_BIDI_BASE_DIR_DEF;
-}
-
-lv_bidi_dir_t lv_bidi_get_letter_dir(uint32_t letter)
-{
- if(lv_bidi_letter_is_rtl(letter)) return LV_BIDI_DIR_RTL;
- if(lv_bidi_letter_is_neutral(letter)) return LV_BIDI_DIR_NEUTRAL;
- if(lv_bidi_letter_is_weak(letter)) return LV_BIDI_DIR_WEAK;
-
- return LV_BIDI_DIR_LTR;
-}
-
-bool lv_bidi_letter_is_weak(uint32_t letter)
-{
- uint32_t i = 0;
- static const char weaks[] = "0123456789";
-
- do {
- uint32_t x = lv_txt_encoded_next(weaks, &i);
- if(letter == x) {
- return true;
- }
- } while(weaks[i] != '\0');
-
- return false;
-}
-
-bool lv_bidi_letter_is_rtl(uint32_t letter)
-{
- if(letter >= 0x5d0 && letter <= 0x5ea) return true;
- if(letter == 0x202E) return true; /*Unicode of LV_BIDI_RLO*/
-// if(letter >= 'a' && letter <= 'z') return true;
-
- return false;
-}
-
-bool lv_bidi_letter_is_neutral(uint32_t letter)
-{
- uint16_t i;
- static const char neutrals[] = " \t\n\r.,:;'\"`!?%/\\-=()[]{}<>@#&$|";
- for(i = 0; neutrals[i] != '\0'; i++) {
- if(letter == (uint32_t)neutrals[i]) return true;
- }
-
- return false;
-}
-
-uint16_t lv_bidi_get_logical_pos(const char * str_in, char **bidi_txt, uint32_t len, lv_bidi_dir_t base_dir, uint32_t visual_pos, bool *is_rtl)
-{
- uint32_t pos_conv_len = get_txt_len(str_in, len);
- uint32_t txt_buf_size = len + 1;
- txt_buf_size = (txt_buf_size + 3) & (~0x3);
- void *buf = lv_draw_get_buf(txt_buf_size + pos_conv_len * sizeof(uint16_t));
- if (bidi_txt) *bidi_txt = buf;
- uint16_t *pos_conv_buf = (uint16_t*) ((char*)buf + txt_buf_size);
- lv_bidi_process_paragraph(str_in, bidi_txt? *bidi_txt: NULL, len, base_dir, pos_conv_buf, pos_conv_len);
- if (is_rtl) *is_rtl = IS_RTL_POS(pos_conv_buf[visual_pos]);
- return GET_POS(pos_conv_buf[visual_pos]);
-}
-
-uint16_t lv_bidi_get_visual_pos(const char * str_in, char **bidi_txt, uint16_t len, lv_bidi_dir_t base_dir, uint32_t logical_pos, bool *is_rtl)
-{
- uint32_t pos_conv_len = get_txt_len(str_in, len);
- uint32_t txt_buf_size = len + 1;
- txt_buf_size = (txt_buf_size + 3) & (~0x3);
- void *buf = lv_draw_get_buf(txt_buf_size + pos_conv_len * sizeof(uint16_t));
- if (bidi_txt) *bidi_txt = buf;
- uint16_t *pos_conv_buf = (uint16_t*) ((char*)buf + txt_buf_size);
- lv_bidi_process_paragraph(str_in, bidi_txt? *bidi_txt: NULL, len, base_dir, pos_conv_buf, pos_conv_len);
- for (uint16_t i = 0; i < pos_conv_len; i++){
- if (GET_POS(pos_conv_buf[i]) == logical_pos){
- if (is_rtl) *is_rtl = IS_RTL_POS(pos_conv_buf[i]);
- return i;
- }
- }
- return (uint16_t) -1;
-}
-
-void lv_bidi_process_paragraph(const char * str_in, char * str_out, uint32_t len, lv_bidi_dir_t base_dir, uint16_t *pos_conv_out, uint16_t pos_conv_len)
-{
- uint32_t run_len = 0;
- lv_bidi_dir_t run_dir;
- uint32_t rd = 0;
- uint32_t wr;
- uint16_t pos_conv_run_len = 0;
- uint16_t pos_conv_rd = 0;
- uint16_t pos_conv_wr;
-
- if(base_dir == LV_BIDI_DIR_AUTO) base_dir = lv_bidi_detect_base_dir(str_in);
- if(base_dir == LV_BIDI_DIR_RTL) {
- wr = len;
- pos_conv_wr = pos_conv_len;
- }
- else {
- wr = 0;
- pos_conv_wr = 0;
- }
-
- if (str_out) str_out[len] = '\0';
-
- lv_bidi_dir_t dir = base_dir;
-
- /*Empty the bracket stack*/
- br_stack_p = 0;
-
- /*Process neutral chars in the beginning*/
- while(rd < len) {
- uint32_t letter = lv_txt_encoded_next(str_in, &rd);
- pos_conv_rd++;
- dir = lv_bidi_get_letter_dir(letter);
- if(dir == LV_BIDI_DIR_NEUTRAL) dir = bracket_process(str_in, rd, len, letter, base_dir);
- if(dir != LV_BIDI_DIR_NEUTRAL && dir != LV_BIDI_DIR_WEAK) break;
- }
-
- if(rd && str_in[rd] != '\0') {
- lv_txt_encoded_prev(str_in, &rd);
- pos_conv_rd--;
- }
-
- if(rd) {
- if(base_dir == LV_BIDI_DIR_LTR) {
- if (str_out) {
- memcpy(&str_out[wr], str_in, rd);
- wr += rd;
- }
- if (pos_conv_out) {
- fill_pos_conv(&pos_conv_out[pos_conv_wr], pos_conv_rd, 0);
- pos_conv_wr += pos_conv_rd;
- }
- } else {
- wr -= rd;
- pos_conv_wr -= pos_conv_rd;
- rtl_reverse(str_out? &str_out[wr]: NULL, str_in, rd, pos_conv_out? &pos_conv_out[pos_conv_wr]: NULL, 0, pos_conv_rd);
- }
- }
-
- /*Get and process the runs*/
-
- while(rd < len && str_in[rd]) {
- run_dir = get_next_run(&str_in[rd], base_dir, len - rd, &run_len, &pos_conv_run_len);
-
- if(base_dir == LV_BIDI_DIR_LTR) {
- if(run_dir == LV_BIDI_DIR_LTR) {
- if (str_out) memcpy(&str_out[wr], &str_in[rd], run_len);
- if (pos_conv_out) fill_pos_conv(&pos_conv_out[pos_conv_wr], pos_conv_run_len, pos_conv_rd);
- }
- else rtl_reverse(str_out? &str_out[wr]: NULL, &str_in[rd], run_len, pos_conv_out? &pos_conv_out[pos_conv_wr] : NULL, pos_conv_rd, pos_conv_run_len);
- wr += run_len;
- pos_conv_wr += pos_conv_run_len;
- } else {
- wr -= run_len;
- pos_conv_wr -= pos_conv_run_len;
- if(run_dir == LV_BIDI_DIR_LTR) {
- if (str_out) memcpy(&str_out[wr], &str_in[rd], run_len);
- if (pos_conv_out) fill_pos_conv(&pos_conv_out[pos_conv_wr], pos_conv_run_len, pos_conv_rd);
- }
- else rtl_reverse(str_out? &str_out[wr]: NULL, &str_in[rd], run_len, pos_conv_out? &pos_conv_out[pos_conv_wr] : NULL, pos_conv_rd, pos_conv_run_len);
- }
-
- rd += run_len;
- pos_conv_rd += pos_conv_run_len;
- }
-}
-
-uint32_t lv_bidi_get_next_paragraph(const char * txt)
-{
- uint32_t i = 0;
-
- lv_txt_encoded_next(txt, &i);
-
- while(txt[i] != '\0' && txt[i] != '\n' && txt[i] != '\r') {
- lv_txt_encoded_next(txt, &i);
- }
-
- return i;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-static uint32_t get_txt_len(const char * txt, uint32_t max_len)
-{
- uint32_t len = 0;
- uint32_t i = 0;
-
- while(i < max_len && txt[i] != '\0') {
- lv_txt_encoded_next(txt, &i);
- len++;
- }
-
- return len;
-}
-
-static void fill_pos_conv(uint16_t * out, uint16_t len, uint16_t index)
-{
- for (uint16_t i = 0; i < len; i++)
- {
- out[i] = SET_RTL_POS(index, false);
- index++;
- }
-}
-
-static lv_bidi_dir_t get_next_run(const char * txt, lv_bidi_dir_t base_dir, uint32_t max_len, uint32_t * len, uint16_t * pos_conv_len)
-{
- uint32_t i = 0;
- uint32_t letter;
-
- uint16_t pos_conv_i = 0;
-
- letter = lv_txt_encoded_next(txt, NULL);
- lv_bidi_dir_t dir = lv_bidi_get_letter_dir(letter);
- if(dir == LV_BIDI_DIR_NEUTRAL) dir = bracket_process(txt, 0, max_len, letter, base_dir);
-
- /*Find the first strong char. Skip the neutrals*/
- while(dir == LV_BIDI_DIR_NEUTRAL || dir == LV_BIDI_DIR_WEAK) {
- letter = lv_txt_encoded_next(txt, &i);
- pos_conv_i++;
- dir = lv_bidi_get_letter_dir(letter);
- if(dir == LV_BIDI_DIR_NEUTRAL) dir = bracket_process(txt, i, max_len, letter, base_dir);
-
- if(i >= max_len || txt[i] == '\0' || txt[i] == '\n' || txt[i] == '\r') {
- *len = i;
- *pos_conv_len = pos_conv_i;
- return base_dir;
- }
- }
-
- lv_bidi_dir_t run_dir = dir;
-
- uint32_t i_prev = i;
- uint32_t i_last_strong = i;
- uint16_t pos_conv_i_prev = pos_conv_i;
- uint16_t pos_conv_i_last_strong = pos_conv_i;
-
- /*Find the next char which has different direction*/
- lv_bidi_dir_t next_dir = base_dir;
- while(i_prev < max_len && txt[i] != '\0' && txt[i] != '\n' && txt[i] != '\r') {
- letter = lv_txt_encoded_next(txt, &i);
- pos_conv_i++;
- next_dir = lv_bidi_get_letter_dir(letter);
- if(next_dir == LV_BIDI_DIR_NEUTRAL) next_dir = bracket_process(txt, i, max_len, letter, base_dir);
-
- /*New dir found?*/
- if((next_dir == LV_BIDI_DIR_RTL || next_dir == LV_BIDI_DIR_LTR) && next_dir != run_dir) {
- /*Include neutrals if `run_dir == base_dir` */
- if(run_dir == base_dir) {
- *len = i_prev;
- *pos_conv_len = pos_conv_i_prev;
- }
- /*Exclude neutrals if `run_dir != base_dir` */
- else {
- *len = i_last_strong;
- *pos_conv_len = pos_conv_i_last_strong;
- }
-
- return run_dir;
- }
-
- if(next_dir != LV_BIDI_DIR_NEUTRAL) {
- i_last_strong = i;
- pos_conv_i_last_strong = pos_conv_i;
- }
-
- i_prev = i;
- pos_conv_i_prev = pos_conv_i;
- }
-
- /*Handle end of of string. Apply `base_dir` on trailing neutrals*/
-
- /*Include neutrals if `run_dir == base_dir` */
- if(run_dir == base_dir) {
- *len = i_prev;
- *pos_conv_len = pos_conv_i_prev;
- }
- /*Exclude neutrals if `run_dir != base_dir` */
- else {
- *len = i_last_strong;
- *pos_conv_len = pos_conv_i_last_strong;
- }
-
- return run_dir;
-}
-
-static void rtl_reverse(char * dest, const char * src, uint32_t len, uint16_t *pos_conv_out, uint16_t pos_conv_rd_base, uint16_t pos_conv_len)
-{
- uint32_t i = len;
- uint32_t wr = 0;
- uint16_t pos_conv_i = pos_conv_len;
- uint16_t pos_conv_wr = 0;
-
- while(i) {
- uint32_t letter = lv_txt_encoded_prev(src, &i);
- uint16_t pos_conv_letter = --pos_conv_i;
-
- /*Keep weak letters (numbers) as LTR*/
- if(lv_bidi_letter_is_weak(letter)) {
- uint32_t last_weak = i;
- uint32_t first_weak = i;
- uint16_t pos_conv_last_weak = pos_conv_i;
- uint16_t pos_conv_first_weak = pos_conv_i;
- while(i) {
- letter = lv_txt_encoded_prev(src, &i);
- pos_conv_letter = --pos_conv_i;
-
- /*No need to call `char_change_to_pair` because there not such chars here*/
-
- /*Finish on non-weak char */
- /*but treat number and currency related chars as weak*/
- if (lv_bidi_letter_is_weak(letter) == false && letter != '.' && letter != ',' && letter != '$' && letter != '%') {
- lv_txt_encoded_next(src, &i); /*Rewind one letter*/
- pos_conv_i++;
- first_weak = i;
- pos_conv_first_weak = pos_conv_i;
- break;
- }
- }
- if(i == 0) {
- first_weak = 0;
- pos_conv_first_weak = 0;
- }
-
- if (dest) memcpy(&dest[wr], &src[first_weak], last_weak - first_weak + 1);
- if (pos_conv_out) fill_pos_conv(&pos_conv_out[pos_conv_wr], pos_conv_last_weak - pos_conv_first_weak + 1, pos_conv_rd_base + pos_conv_first_weak);
- wr += last_weak - first_weak + 1;
- pos_conv_wr += pos_conv_last_weak - pos_conv_first_weak + 1;
- }
-
- /*Simply store in reversed order*/
- else {
- uint32_t letter_size = lv_txt_encoded_size((const char *)&src[i]);
- /*Swap arithmetical symbols*/
- if(letter_size == 1) {
- uint32_t new_letter = letter = char_change_to_pair(letter);
- if (dest) dest[wr] = (uint8_t)new_letter;
- if (pos_conv_out) pos_conv_out[pos_conv_wr] = SET_RTL_POS(pos_conv_rd_base + pos_conv_letter, true);
- wr++;
- pos_conv_wr++;
- }
- /*Just store the letter*/
- else {
- if (dest) memcpy(&dest[wr], &src[i], letter_size);
- if (pos_conv_out) pos_conv_out[pos_conv_wr] = SET_RTL_POS(pos_conv_rd_base + pos_conv_i, true);
- wr += letter_size;
- pos_conv_wr++;
- }
- }
- }
-}
-
-static uint32_t char_change_to_pair(uint32_t letter)
-{
-
- uint8_t i;
- for(i = 0; bracket_left[i] != '\0'; i++) {
- if(letter == bracket_left[i]) return bracket_right[i];
- }
-
- for(i = 0; bracket_right[i] != '\0'; i++) {
- if(letter == bracket_right[i]) return bracket_left[i];
- }
-
- return letter;
-}
-
-static lv_bidi_dir_t bracket_process(const char * txt, uint32_t next_pos, uint32_t len, uint32_t letter, lv_bidi_dir_t base_dir)
-{
- lv_bidi_dir_t bracket_dir = LV_BIDI_DIR_NEUTRAL;
-
- uint8_t i;
- /*Is the letter an opening bracket?*/
- for(i = 0; bracket_left[i] != '\0'; i++) {
- if(bracket_left[i] == letter) {
- /* If so find it's matching closing bracket.
- * If a char with base dir. direction is found then the brackets will have `base_dir` direction*/
- uint32_t txt_i = next_pos;
- while(txt_i < len) {
- uint32_t letter_next = lv_txt_encoded_next(txt, &txt_i);
- if(letter_next == bracket_right[i]) {
- /*Closing bracket found*/
- break;
- } else {
- /*Save the dir*/
- lv_bidi_dir_t letter_dir = lv_bidi_get_letter_dir(letter_next);
- if(letter_dir == base_dir) {
- bracket_dir = base_dir;
- }
- }
- }
-
- /*There were no matching closing bracket*/
- if(txt_i > len) return LV_BIDI_DIR_NEUTRAL;
-
- /*There where a strong char with base dir in the bracket so the dir is found.*/
- if(bracket_dir != LV_BIDI_DIR_NEUTRAL && bracket_dir != LV_BIDI_DIR_WEAK) break;
-
- /*If there were no matching strong chars in the brackets then check the previous chars*/
- txt_i = next_pos;
- if(txt_i) lv_txt_encoded_prev(txt, &txt_i);
- while(txt_i > 0) {
- uint32_t letter_next = lv_txt_encoded_prev(txt, &txt_i);
- lv_bidi_dir_t letter_dir = lv_bidi_get_letter_dir(letter_next);
- if(letter_dir == LV_BIDI_DIR_LTR || letter_dir == LV_BIDI_DIR_RTL) {
- bracket_dir = letter_dir;
- break;
- }
- }
-
-
- /*There where a previous strong char which can be used*/
- if(bracket_dir != LV_BIDI_DIR_NEUTRAL) break;
-
- /*There were no strong chars before the bracket, so use the base dir.*/
- if(txt_i == 0) bracket_dir = base_dir;
-
- break;
- }
- }
-
-
- /*The letter was an opening bracket*/
- if(bracket_left[i] != '\0') {
-
- if(bracket_dir == LV_BIDI_DIR_NEUTRAL || br_stack_p == LV_BIDI_BRACKLET_DEPTH) return LV_BIDI_DIR_NEUTRAL;
-
- br_stack[br_stack_p].bracklet_pos = i;
- br_stack[br_stack_p].dir = bracket_dir;
-
- br_stack_p++;
- return bracket_dir;
- } else if(br_stack_p > 0) {
- /*Is the letter a closing bracket of the last opening?*/
- if(letter == bracket_right[br_stack[br_stack_p - 1].bracklet_pos]) {
- bracket_dir = br_stack[br_stack_p - 1].dir;
- br_stack_p--;
- return bracket_dir;
- }
- }
-
- return LV_BIDI_DIR_NEUTRAL;
-}
-
-
-#endif /*LV_USE_BIDI*/
diff --git a/src/libs/lvgl/src/lv_misc/lv_bidi.h b/src/libs/lvgl/src/lv_misc/lv_bidi.h
deleted file mode 100644
index 215727aa..00000000
--- a/src/libs/lvgl/src/lv_misc/lv_bidi.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * @file lv_bifi.h
- *
- */
-
-#ifndef LV_BIDI_H
-#define LV_BIDI_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#include <stdbool.h>
-#include <stdint.h>
-
-/*********************
- * DEFINES
- *********************/
-/* Special non printable strong characters.
- * They can be inserted to texts to affect the run's direction*/
-#define LV_BIDI_LRO "\xE2\x80\xAD" /*U+202D*/
-#define LV_BIDI_RLO "\xE2\x80\xAE" /*U+202E*/
-
-/**********************
- * TYPEDEFS
- **********************/
-enum
-{
- /*The first 4 values are stored in `lv_obj_t` on 2 bits*/
- LV_BIDI_DIR_LTR = 0x00,
- LV_BIDI_DIR_RTL = 0x01,
- LV_BIDI_DIR_AUTO = 0x02,
- LV_BIDI_DIR_INHERIT = 0x03,
-
- LV_BIDI_DIR_NEUTRAL = 0x20,
- LV_BIDI_DIR_WEAK = 0x21,
-};
-
-typedef uint8_t lv_bidi_dir_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-#if LV_USE_BIDI
-
-void lv_bidi_process(const char * str_in, char * str_out, lv_bidi_dir_t base_dir);
-void lv_bidi_process_paragraph(const char * str_in, char * str_out, uint32_t len, lv_bidi_dir_t base_dir, uint16_t *pos_conv_out, uint16_t pos_conv_len);
-uint32_t lv_bidi_get_next_paragraph(const char * txt);
-lv_bidi_dir_t lv_bidi_detect_base_dir(const char * txt);
-lv_bidi_dir_t lv_bidi_get_letter_dir(uint32_t letter);
-bool lv_bidi_letter_is_weak(uint32_t letter);
-bool lv_bidi_letter_is_rtl(uint32_t letter);
-bool lv_bidi_letter_is_neutral(uint32_t letter);
-uint16_t lv_bidi_get_logical_pos(const char * str_in, char **bidi_txt, uint32_t len, lv_bidi_dir_t base_dir, uint32_t visual_pos, bool *is_rtl);
-uint16_t lv_bidi_get_visual_pos(const char * str_in, char **bidi_txt, uint16_t len, lv_bidi_dir_t base_dir, uint32_t logical_pos, bool *is_rtl);
-
-/**********************
- * MACROS
- **********************/
-
-#endif /*LV_USE_BIDI*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_BIDI_H*/
diff --git a/src/libs/lvgl/src/lv_misc/lv_circ.c b/src/libs/lvgl/src/lv_misc/lv_circ.c
deleted file mode 100644
index fc0e3e20..00000000
--- a/src/libs/lvgl/src/lv_misc/lv_circ.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * @file lv_circ.c
- * Circle drawing algorithm (with Bresenham)
- * Only a 1/8 circle is calculated. Use CIRC_OCT1_X, CIRC_OCT1_Y macros to get
- * the other octets.
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_circ.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-
-/**********************
- * STATIC VARIABLES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Initialize the circle drawing
- * @param c pointer to a point. The coordinates will be calculated here
- * @param tmp point to a variable. It will store temporary data
- * @param radius radius of the circle
- */
-void lv_circ_init(lv_point_t * c, lv_coord_t * tmp, lv_coord_t radius)
-{
- c->x = radius;
- c->y = 0;
- *tmp = 1 - radius;
-}
-
-/**
- * Test the circle drawing is ready or not
- * @param c same as in circ_init
- * @return true if the circle is not ready yet
- */
-bool lv_circ_cont(lv_point_t * c)
-{
- return c->y <= c->x ? true : false;
-}
-
-/**
- * Get the next point from the circle
- * @param c same as in circ_init. The next point stored here.
- * @param tmp same as in circ_init.
- */
-void lv_circ_next(lv_point_t * c, lv_coord_t * tmp)
-{
- c->y++;
-
- if(*tmp <= 0) {
- (*tmp) += 2 * c->y + 1; /*Change in decision criterion for y -> y+1*/
- } else {
- c->x--;
- (*tmp) += 2 * (c->y - c->x) + 1; /*Change for y -> y+1, x -> x-1*/
- }
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
diff --git a/src/libs/lvgl/src/lv_misc/lv_circ.h b/src/libs/lvgl/src/lv_misc/lv_circ.h
deleted file mode 100644
index 405a4b6c..00000000
--- a/src/libs/lvgl/src/lv_misc/lv_circ.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * @file lv_circ.h
- *
- */
-
-#ifndef LV_CIRC_H
-#define LV_CIRC_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#include <stddef.h>
-#include "lv_area.h"
-
-/*********************
- * DEFINES
- *********************/
-#define LV_CIRC_OCT1_X(p) (p.x)
-#define LV_CIRC_OCT1_Y(p) (p.y)
-#define LV_CIRC_OCT2_X(p) (p.y)
-#define LV_CIRC_OCT2_Y(p) (p.x)
-#define LV_CIRC_OCT3_X(p) (-p.y)
-#define LV_CIRC_OCT3_Y(p) (p.x)
-#define LV_CIRC_OCT4_X(p) (-p.x)
-#define LV_CIRC_OCT4_Y(p) (p.y)
-#define LV_CIRC_OCT5_X(p) (-p.x)
-#define LV_CIRC_OCT5_Y(p) (-p.y)
-#define LV_CIRC_OCT6_X(p) (-p.y)
-#define LV_CIRC_OCT6_Y(p) (-p.x)
-#define LV_CIRC_OCT7_X(p) (p.y)
-#define LV_CIRC_OCT7_Y(p) (-p.x)
-#define LV_CIRC_OCT8_X(p) (p.x)
-#define LV_CIRC_OCT8_Y(p) (-p.y)
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Initialize the circle drawing
- * @param c pointer to a point. The coordinates will be calculated here
- * @param tmp point to a variable. It will store temporary data
- * @param radius radius of the circle
- */
-void lv_circ_init(lv_point_t * c, lv_coord_t * tmp, lv_coord_t radius);
-
-/**
- * Test the circle drawing is ready or not
- * @param c same as in circ_init
- * @return true if the circle is not ready yet
- */
-bool lv_circ_cont(lv_point_t * c);
-
-/**
- * Get the next point from the circle
- * @param c same as in circ_init. The next point stored here.
- * @param tmp same as in circ_init.
- */
-void lv_circ_next(lv_point_t * c, lv_coord_t * tmp);
-
-/**********************
- * MACROS
- **********************/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif
diff --git a/src/libs/lvgl/src/lv_misc/lv_color.c b/src/libs/lvgl/src/lv_misc/lv_color.c
deleted file mode 100644
index cd4825df..00000000
--- a/src/libs/lvgl/src/lv_misc/lv_color.c
+++ /dev/null
@@ -1,171 +0,0 @@
-/**
- * @file lv_color.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_color.h"
-#include "lv_math.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-
-/**********************
- * STATIC VARIABLES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Convert a HSV color to RGB
- * @param h hue [0..359]
- * @param s saturation [0..100]
- * @param v value [0..100]
- * @return the given RGB color in RGB (with LV_COLOR_DEPTH depth)
- */
-lv_color_t lv_color_hsv_to_rgb(uint16_t h, uint8_t s, uint8_t v)
-{
- h = (uint32_t)((uint32_t)h * 255) / 360;
- s = (uint16_t)((uint16_t)s * 255) / 100;
- v = (uint16_t)((uint16_t)v * 255) / 100;
-
- uint8_t r, g, b;
-
- uint8_t region, remainder, p, q, t;
-
- if(s == 0) {
- r = v;
- g = v;
- b = v;
- return lv_color_make(v, v, v);
- }
-
- region = h / 43;
- remainder = (h - (region * 43)) * 6;
-
- p = (v * (255 - s)) >> 8;
- q = (v * (255 - ((s * remainder) >> 8))) >> 8;
- t = (v * (255 - ((s * (255 - remainder)) >> 8))) >> 8;
-
- switch(region) {
- case 0:
- r = v;
- g = t;
- b = p;
- break;
- case 1:
- r = q;
- g = v;
- b = p;
- break;
- case 2:
- r = p;
- g = v;
- b = t;
- break;
- case 3:
- r = p;
- g = q;
- b = v;
- break;
- case 4:
- r = t;
- g = p;
- b = v;
- break;
- default:
- r = v;
- g = p;
- b = q;
- break;
- }
-
- lv_color_t result = lv_color_make(r, g, b);
- return result;
-}
-
-/**
- * Convert a 32-bit RGB color to HSV
- * @param r8 8-bit red
- * @param g8 8-bit green
- * @param b8 8-bit blue
- * @return the given RGB color in HSV
- */
-lv_color_hsv_t lv_color_rgb_to_hsv(uint8_t r8, uint8_t g8, uint8_t b8)
-{
- uint16_t r = ((uint32_t)r8 << 10) / 255;
- uint16_t g = ((uint32_t)g8 << 10) / 255;
- uint16_t b = ((uint32_t)b8 << 10) / 255;
-
- uint16_t rgbMin = r < g ? (r < b ? r : b) : (g < b ? g : b);
- uint16_t rgbMax = r > g ? (r > b ? r : b) : (g > b ? g : b);
-
- lv_color_hsv_t hsv;
-
- // https://en.wikipedia.org/wiki/HSL_and_HSV#Lightness
- hsv.v = (100 * rgbMax) >> 10;
-
- int32_t delta = rgbMax - rgbMin;
- if (LV_MATH_ABS(delta) < 3) {
- hsv.h = 0;
- hsv.s = 0;
- return hsv;
- }
-
- // https://en.wikipedia.org/wiki/HSL_and_HSV#Saturation
- hsv.s = 100 * delta / rgbMax;
- if(hsv.s < 3) {
- hsv.h = 0;
- return hsv;
- }
-
- // https://en.wikipedia.org/wiki/HSL_and_HSV#Hue_and_chroma
- int32_t h;
- if(rgbMax == r)
- h = (((g - b) << 10) / delta) + (g < b ? (6 << 10) : 0); // between yellow & magenta
- else if(rgbMax == g)
- h = (((b - r) << 10) / delta) + (2 << 10); // between cyan & yellow
- else if(rgbMax == b)
- h = (((r - g) << 10) / delta) + (4 << 10); // between magenta & cyan
- else
- h = 0;
- h *= 60;
- h >>= 10;
- if (h < 0) h += 360;
-
- hsv.h = h;
- return hsv;
-}
-
-/**
- * Convert a color to HSV
- * @param color color
- * @return the given color in HSV
- */
-lv_color_hsv_t lv_color_to_hsv(lv_color_t color)
-{
- lv_color32_t color32;
- color32.full = lv_color_to32(color);
- return lv_color_rgb_to_hsv(color32.ch.red, color32.ch.green, color32.ch.blue);
-}
diff --git a/src/libs/lvgl/src/lv_misc/lv_color.h b/src/libs/lvgl/src/lv_misc/lv_color.h
deleted file mode 100644
index 1febbdce..00000000
--- a/src/libs/lvgl/src/lv_misc/lv_color.h
+++ /dev/null
@@ -1,526 +0,0 @@
-/**
- * @file lv_color.h
- *
- */
-
-#ifndef LV_COLOR_H
-#define LV_COLOR_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-/*Error checking*/
-#if LV_COLOR_DEPTH == 24
-#error "LV_COLOR_DEPTH 24 is deprecated. Use LV_COLOR_DEPTH 32 instead (lv_conf.h)"
-#endif
-
-#if LV_COLOR_DEPTH != 32 && LV_COLOR_SCREEN_TRANSP != 0
-#error "LV_COLOR_SCREEN_TRANSP requires LV_COLOR_DEPTH == 32. Set it in lv_conf.h"
-#endif
-
-#if LV_COLOR_DEPTH != 16 && LV_COLOR_16_SWAP != 0
-#error "LV_COLOR_16_SWAP requires LV_COLOR_DEPTH == 16. Set it in lv_conf.h"
-#endif
-
-#include <stdint.h>
-
-/*********************
- * DEFINES
- *********************/
-#define LV_COLOR_WHITE LV_COLOR_MAKE(0xFF, 0xFF, 0xFF)
-#define LV_COLOR_SILVER LV_COLOR_MAKE(0xC0, 0xC0, 0xC0)
-#define LV_COLOR_GRAY LV_COLOR_MAKE(0x80, 0x80, 0x80)
-#define LV_COLOR_BLACK LV_COLOR_MAKE(0x00, 0x00, 0x00)
-#define LV_COLOR_RED LV_COLOR_MAKE(0xFF, 0x00, 0x00)
-#define LV_COLOR_MAROON LV_COLOR_MAKE(0x80, 0x00, 0x00)
-#define LV_COLOR_YELLOW LV_COLOR_MAKE(0xFF, 0xFF, 0x00)
-#define LV_COLOR_OLIVE LV_COLOR_MAKE(0x80, 0x80, 0x00)
-#define LV_COLOR_LIME LV_COLOR_MAKE(0x00, 0xFF, 0x00)
-#define LV_COLOR_GREEN LV_COLOR_MAKE(0x00, 0x80, 0x00)
-#define LV_COLOR_CYAN LV_COLOR_MAKE(0x00, 0xFF, 0xFF)
-#define LV_COLOR_AQUA LV_COLOR_CYAN
-#define LV_COLOR_TEAL LV_COLOR_MAKE(0x00, 0x80, 0x80)
-#define LV_COLOR_BLUE LV_COLOR_MAKE(0x00, 0x00, 0xFF)
-#define LV_COLOR_NAVY LV_COLOR_MAKE(0x00, 0x00, 0x80)
-#define LV_COLOR_MAGENTA LV_COLOR_MAKE(0xFF, 0x00, 0xFF)
-#define LV_COLOR_PURPLE LV_COLOR_MAKE(0x80, 0x00, 0x80)
-#define LV_COLOR_ORANGE LV_COLOR_MAKE(0xFF, 0xA5, 0x00)
-
-/**
- * Opacity percentages.
- */
-enum {
- LV_OPA_TRANSP = 0,
- LV_OPA_0 = 0,
- LV_OPA_10 = 25,
- LV_OPA_20 = 51,
- LV_OPA_30 = 76,
- LV_OPA_40 = 102,
- LV_OPA_50 = 127,
- LV_OPA_60 = 153,
- LV_OPA_70 = 178,
- LV_OPA_80 = 204,
- LV_OPA_90 = 229,
- LV_OPA_100 = 255,
- LV_OPA_COVER = 255,
-};
-
-#define LV_OPA_MIN 16 /*Opacities below this will be transparent*/
-#define LV_OPA_MAX 251 /*Opacities above this will fully cover*/
-
-#if LV_COLOR_DEPTH == 1
-#define LV_COLOR_SIZE 8
-#elif LV_COLOR_DEPTH == 8
-#define LV_COLOR_SIZE 8
-#elif LV_COLOR_DEPTH == 16
-#define LV_COLOR_SIZE 16
-#elif LV_COLOR_DEPTH == 32
-#define LV_COLOR_SIZE 32
-#else
-#error "Invalid LV_COLOR_DEPTH in lv_conf.h! Set it to 1, 8, 16 or 32!"
-#endif
-
-/*---------------------------------------
- * Macros for all existing color depths
- * to set/get values of the color channels
- *------------------------------------------*/
-# define LV_COLOR_SET_R1(c, v) (c).ch.red = (uint8_t)((v) & 0x1);
-# define LV_COLOR_SET_G1(c, v) (c).ch.green = (uint8_t)((v) & 0x1);
-# define LV_COLOR_SET_B1(c, v) (c).ch.blue = (uint8_t)((v) & 0x1);
-# define LV_COLOR_SET_A1(c, v)
-
-# define LV_COLOR_GET_R1(c) (c).ch.red
-# define LV_COLOR_GET_G1(c) (c).ch.green
-# define LV_COLOR_GET_B1(c) (c).ch.blue
-# define LV_COLOR_GET_A1(c) 1
-
-# define LV_COLOR_SET_R8(c, v) (c).ch.red = (uint8_t)(v) & 0x7U;
-# define LV_COLOR_SET_G8(c, v) (c).ch.green = (uint8_t)(v) & 0x7U;
-# define LV_COLOR_SET_B8(c, v) (c).ch.blue = (uint8_t)(v) & 0x3U;
-# define LV_COLOR_SET_A8(c, v) do {} while(0)
-
-# define LV_COLOR_GET_R8(c) (c).ch.red
-# define LV_COLOR_GET_G8(c) (c).ch.green
-# define LV_COLOR_GET_B8(c) (c).ch.blue
-# define LV_COLOR_GET_A8(c) 0xFF
-
-# define LV_COLOR_SET_R16(c, v) (c).ch.red = (uint8_t)(v) & 0x1FU;
-# define LV_COLOR_SET_G16(c, v) (c).ch.green = (uint8_t)(v) & 0x3FU;
-# define LV_COLOR_SET_G16_SWAP(c, v) {(c).ch.green_h = (uint8_t)(((v) >> 3) & 0x7); (c).ch.green_l = (uint8_t)((v) & 0x7);}
-# define LV_COLOR_SET_B16(c, v) (c).ch.blue = (uint8_t)(v) & 0x1FU;
-# define LV_COLOR_SET_A16(c, v) do {} while(0)
-
-# define LV_COLOR_GET_R16(c) (c).ch.red
-# define LV_COLOR_GET_G16(c) (c).ch.green
-# define LV_COLOR_GET_G16_SWAP(c) (((c).ch.green_h << 3) + (c).ch.green_l)
-# define LV_COLOR_GET_B16(c) (c).ch.blue
-# define LV_COLOR_GET_A16(c) 0xFF
-
-# define LV_COLOR_SET_R32(c, v) (c).ch.red = (uint32_t)((v) & 0xFF);
-# define LV_COLOR_SET_G32(c, v) (c).ch.green = (uint32_t)((v) & 0xFF);
-# define LV_COLOR_SET_B32(c, v) (c).ch.blue = (uint32_t)((v) & 0xFF);
-# define LV_COLOR_SET_A32(c, v) (c).ch.alpha = (uint32_t)((v) & 0xFF);
-
-# define LV_COLOR_GET_R32(c) (c).ch.red
-# define LV_COLOR_GET_G32(c) (c).ch.green
-# define LV_COLOR_GET_B32(c) (c).ch.blue
-# define LV_COLOR_GET_A32(c) (c).ch.alpha
-
-
-/*---------------------------------------
- * Macros for the current color depth
- * to set/get values of the color channels
- *------------------------------------------*/
-#if LV_COLOR_DEPTH == 1
-# define LV_COLOR_SET_R(c, v) LV_COLOR_SET_R1(c,v)
-# define LV_COLOR_SET_G(c, v) LV_COLOR_SET_G1(c,v)
-# define LV_COLOR_SET_B(c, v) LV_COLOR_SET_B1(c,v)
-# define LV_COLOR_SET_A(c, v) LV_COLOR_SET_A1(c,v)
-
-# define LV_COLOR_GET_R(c) LV_COLOR_GET_R1(c)
-# define LV_COLOR_GET_G(c) LV_COLOR_GET_G1(c)
-# define LV_COLOR_GET_B(c) LV_COLOR_GET_B1(c)
-# define LV_COLOR_GET_A(c) LV_COLOR_GET_A1(c)
-
-#elif LV_COLOR_DEPTH == 8
-# define LV_COLOR_SET_R(c, v) LV_COLOR_SET_R8(c,v)
-# define LV_COLOR_SET_G(c, v) LV_COLOR_SET_G8(c,v)
-# define LV_COLOR_SET_B(c, v) LV_COLOR_SET_B8(c,v)
-# define LV_COLOR_SET_A(c, v) LV_COLOR_SET_A8(c,v)
-
-# define LV_COLOR_GET_R(c) LV_COLOR_GET_R8(c)
-# define LV_COLOR_GET_G(c) LV_COLOR_GET_G8(c)
-# define LV_COLOR_GET_B(c) LV_COLOR_GET_B8(c)
-# define LV_COLOR_GET_A(c) LV_COLOR_GET_A8(c)
-
-#elif LV_COLOR_DEPTH == 16
-# define LV_COLOR_SET_R(c, v) LV_COLOR_SET_R16(c,v)
-# if LV_COLOR_16_SWAP == 0
-# define LV_COLOR_SET_G(c, v) LV_COLOR_SET_G16(c,v)
-# else
-# define LV_COLOR_SET_G(c, v) LV_COLOR_SET_G16_SWAP(c,v)
-# endif
-# define LV_COLOR_SET_B(c, v) LV_COLOR_SET_B16(c,v)
-# define LV_COLOR_SET_A(c, v) LV_COLOR_SET_A16(c,v)
-
-# define LV_COLOR_GET_R(c) LV_COLOR_GET_R16(c)
-# if LV_COLOR_16_SWAP == 0
-# define LV_COLOR_GET_G(c) LV_COLOR_GET_G16(c)
-# else
-# define LV_COLOR_GET_G(c) LV_COLOR_GET_G16_SWAP(c)
-# endif
-# define LV_COLOR_GET_B(c) LV_COLOR_GET_B16(c)
-# define LV_COLOR_GET_A(c) LV_COLOR_GET_A16(c)
-
-#elif LV_COLOR_DEPTH == 32
-# define LV_COLOR_SET_R(c, v) LV_COLOR_SET_R32(c,v)
-# define LV_COLOR_SET_G(c, v) LV_COLOR_SET_G32(c,v)
-# define LV_COLOR_SET_B(c, v) LV_COLOR_SET_B32(c,v)
-# define LV_COLOR_SET_A(c, v) LV_COLOR_SET_A32(c,v)
-
-# define LV_COLOR_GET_R(c) LV_COLOR_GET_R32(c)
-# define LV_COLOR_GET_G(c) LV_COLOR_GET_G32(c)
-# define LV_COLOR_GET_B(c) LV_COLOR_GET_B32(c)
-# define LV_COLOR_GET_A(c) LV_COLOR_GET_A32(c)
-#endif
-
-/**********************
- * TYPEDEFS
- **********************/
-
-typedef union
-{
- struct
- {
- uint8_t blue : 1;
- uint8_t green : 1;
- uint8_t red : 1;
- } ch;
- uint8_t full;
-} lv_color1_t;
-
-typedef union
-{
- struct
- {
- uint8_t blue : 2;
- uint8_t green : 3;
- uint8_t red : 3;
- } ch;
- uint8_t full;
-} lv_color8_t;
-
-typedef union
-{
- struct
- {
-#if LV_COLOR_16_SWAP == 0
- uint16_t blue : 5;
- uint16_t green : 6;
- uint16_t red : 5;
-#else
- uint16_t green_h : 3;
- uint16_t red : 5;
- uint16_t blue : 5;
- uint16_t green_l : 3;
-#endif
- } ch;
- uint16_t full;
-} lv_color16_t;
-
-typedef union
-{
- struct
- {
- uint8_t blue;
- uint8_t green;
- uint8_t red;
- uint8_t alpha;
- } ch;
- uint32_t full;
-} lv_color32_t;
-
-#if LV_COLOR_DEPTH == 1
-typedef uint8_t lv_color_int_t;
-typedef lv_color1_t lv_color_t;
-#elif LV_COLOR_DEPTH == 8
-typedef uint8_t lv_color_int_t;
-typedef lv_color8_t lv_color_t;
-#elif LV_COLOR_DEPTH == 16
-typedef uint16_t lv_color_int_t;
-typedef lv_color16_t lv_color_t;
-#elif LV_COLOR_DEPTH == 32
-typedef uint32_t lv_color_int_t;
-typedef lv_color32_t lv_color_t;
-#else
-#error "Invalid LV_COLOR_DEPTH in lv_conf.h! Set it to 1, 8, 16 or 32!"
-#endif
-
-typedef uint8_t lv_opa_t;
-
-typedef struct
-{
- uint16_t h;
- uint8_t s;
- uint8_t v;
-} lv_color_hsv_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/*In color conversations:
- * - When converting to bigger color type the LSB weight of 1 LSB is calculated
- * E.g. 16 bit Red has 5 bits
- * 8 bit Red has 2 bits
- * ----------------------
- * 8 bit red LSB = (2^5 - 1) / (2^2 - 1) = 31 / 3 = 10
- *
- * - When calculating to smaller color type simply shift out the LSBs
- * E.g. 8 bit Red has 2 bits
- * 16 bit Red has 5 bits
- * ----------------------
- * Shift right with 5 - 3 = 2
- */
-
-static inline uint8_t lv_color_to1(lv_color_t color)
-{
-#if LV_COLOR_DEPTH == 1
- return color.full;
-#elif LV_COLOR_DEPTH == 8
- if((LV_COLOR_GET_R(color) & 0x4) || (LV_COLOR_GET_G(color) & 0x4) || (LV_COLOR_GET_B(color) & 0x2)) {
- return 1;
- } else {
- return 0;
- }
-#elif LV_COLOR_DEPTH == 16
- if((LV_COLOR_GET_R(color) & 0x10) || (LV_COLOR_GET_G(color) & 0x20) || (LV_COLOR_GET_B(color) & 0x10)) {
- return 1;
- } else {
- return 0;
- }
-#elif LV_COLOR_DEPTH == 32
- if((LV_COLOR_GET_R(color) & 0x80) || (LV_COLOR_GET_G(color) & 0x80) || (LV_COLOR_GET_B(color) & 0x80)) {
- return 1;
- } else {
- return 0;
- }
-#endif
-}
-
-static inline uint8_t lv_color_to8(lv_color_t color)
-{
-#if LV_COLOR_DEPTH == 1
- if(color.full == 0)
- return 0;
- else
- return 0xFF;
-#elif LV_COLOR_DEPTH == 8
- return color.full;
-#elif LV_COLOR_DEPTH == 16
- lv_color8_t ret;
- LV_COLOR_SET_R8(ret, LV_COLOR_GET_R(color) >> 2); /* 5 - 3 = 2*/
- LV_COLOR_SET_G8(ret, LV_COLOR_GET_G(color) >> 3); /* 6 - 3 = 3*/
- LV_COLOR_SET_B8(ret, LV_COLOR_GET_B(color) >> 3); /* 5 - 2 = 3*/
- return ret.full;
-#elif LV_COLOR_DEPTH == 32
- lv_color8_t ret;
- LV_COLOR_SET_R8(ret, LV_COLOR_GET_R(color) >> 5); /* 8 - 3 = 5*/
- LV_COLOR_SET_G8(ret, LV_COLOR_GET_G(color) >> 5); /* 8 - 3 = 5*/
- LV_COLOR_SET_B8(ret, LV_COLOR_GET_B(color) >> 6); /* 8 - 2 = 6*/
- return ret.full;
-#endif
-}
-
-static inline uint16_t lv_color_to16(lv_color_t color)
-{
-#if LV_COLOR_DEPTH == 1
- if(color.full == 0)
- return 0;
- else
- return 0xFFFF;
-#elif LV_COLOR_DEPTH == 8
- lv_color16_t ret;
- LV_COLOR_SET_R16(ret, LV_COLOR_GET_R(color) * 4); /*(2^5 - 1)/(2^3 - 1) = 31/7 = 4*/
-#if LV_COLOR_16_SWAP == 0
- LV_COLOR_SET_G16(ret, LV_COLOR_GET_G(color) * 9); /*(2^6 - 1)/(2^3 - 1) = 63/7 = 9*/
-#else
- LV_COLOR_SET_G16_SWAP(ret, (LV_COLOR_GET_G(color) * 9)); /*(2^6 - 1)/(2^3 - 1) = 63/7 = 9*/
-#endif
- LV_COLOR_SET_B16(ret, LV_COLOR_GET_B(color) * 10); /*(2^5 - 1)/(2^2 - 1) = 31/3 = 10*/
- return ret.full;
-#elif LV_COLOR_DEPTH == 16
- return color.full;
-#elif LV_COLOR_DEPTH == 32
- lv_color16_t ret;
- LV_COLOR_SET_R16(ret, LV_COLOR_GET_R(color) >> 3); /* 8 - 5 = 3*/
-
-#if LV_COLOR_16_SWAP == 0
- LV_COLOR_SET_G16(ret, LV_COLOR_GET_G(color) >> 2); /* 8 - 6 = 2*/
-#else
- LV_COLOR_SET_G16_SWAP(ret, ret.ch.green_h = (LV_COLOR_GET_G(color) >> 2); /*(2^6 - 1)/(2^3 - 1) = 63/7 = 9*/
-#endif
- LV_COLOR_SET_B16(ret, LV_COLOR_GET_B(color) >> 3); /* 8 - 5 = 3*/
- return ret.full;
-#endif
-}
-
-static inline uint32_t lv_color_to32(lv_color_t color)
-{
-#if LV_COLOR_DEPTH == 1
- if(color.full == 0)
- return 0;
- else
- return 0xFFFFFFFF;
-#elif LV_COLOR_DEPTH == 8
- lv_color32_t ret;
- LV_COLOR_SET_R32(ret, LV_COLOR_GET_R(color) * 36); /*(2^8 - 1)/(2^3 - 1) = 255/7 = 36*/
- LV_COLOR_SET_G32(ret, LV_COLOR_GET_G(color) * 36); /*(2^8 - 1)/(2^3 - 1) = 255/7 = 36*/
- LV_COLOR_SET_B32(ret, LV_COLOR_GET_B(color) * 85); /*(2^8 - 1)/(2^2 - 1) = 255/3 = 85*/
- LV_COLOR_SET_A32(ret, 0xFF);
- return ret.full;
-#elif LV_COLOR_DEPTH == 16
- /**
- * The floating point math for conversion is:
- * valueto = valuefrom * ( (2^bitsto - 1) / (float)(2^bitsfrom - 1) )
- * The faster integer math for conversion is:
- * valueto = ( valuefrom * multiplier + adder ) >> divisor
- * multiplier = FLOOR( ( (2^bitsto - 1) << divisor ) / (float)(2^bitsfrom - 1) )
- *
- * Find the first divisor where ( adder >> divisor ) <= 0
- *
- * 5-bit to 8-bit: ( 31 * multiplier + adder ) >> divisor = 255
- * divisor multiplier adder min (0) max (31)
- * 0 8 7 7 255
- * 1 16 14 7 255
- * 2 32 28 7 255
- * 3 65 25 3 255
- * 4 131 19 1 255
- * 5 263 7 0 255
- *
- * 6-bit to 8-bit: 255 = ( 63 * multiplier + adder ) >> divisor
- * divisor multiplier adder min (0) max (63)
- * 0 4 3 3 255
- * 1 8 6 3 255
- * 2 16 12 3 255
- * 3 32 24 3 255
- * 4 64 48 3 255
- * 5 129 33 1 255
- * 6 259 3 0 255
- */
- lv_color32_t ret;
- LV_COLOR_SET_R32(ret, (LV_COLOR_GET_R(color) * 263 + 7 ) >> 5);
- LV_COLOR_SET_G32(ret, (LV_COLOR_GET_G(color) * 259 + 3 ) >> 6);
- LV_COLOR_SET_B32(ret, (LV_COLOR_GET_B(color) * 263 + 7 ) >> 5);
- LV_COLOR_SET_A32(ret, 0xFF);
- return ret.full;
-#elif LV_COLOR_DEPTH == 32
- return color.full;
-#endif
-}
-
-static inline lv_color_t lv_color_mix(lv_color_t c1, lv_color_t c2, uint8_t mix)
-{
- lv_color_t ret;
-#if LV_COLOR_DEPTH != 1
- /*LV_COLOR_DEPTH == 8, 16 or 32*/
- LV_COLOR_SET_R(ret, (uint16_t)((uint16_t) LV_COLOR_GET_R(c1) * mix + LV_COLOR_GET_R(c2) * (255 - mix)) >> 8);
- LV_COLOR_SET_G(ret, (uint16_t)((uint16_t) LV_COLOR_GET_G(c1) * mix + LV_COLOR_GET_G(c2) * (255 - mix)) >> 8);
- LV_COLOR_SET_B(ret, (uint16_t)((uint16_t) LV_COLOR_GET_B(c1) * mix + LV_COLOR_GET_B(c2) * (255 - mix)) >> 8);
- LV_COLOR_SET_A(ret, 0xFF);
-#else
- /*LV_COLOR_DEPTH == 1*/
- ret.full = mix > LV_OPA_50 ? c1.full : c2.full;
-#endif
-
- return ret;
-}
-
-/**
- * Get the brightness of a color
- * @param color a color
- * @return the brightness [0..255]
- */
-static inline uint8_t lv_color_brightness(lv_color_t color)
-{
- lv_color32_t c32;
- c32.full = lv_color_to32(color);
- uint16_t bright = (uint16_t)(3u * LV_COLOR_GET_R32(c32) + LV_COLOR_GET_B32(c32) + 4u * LV_COLOR_GET_G32(c32));
- return (uint8_t)(bright >> 3);
-}
-
-/* The most simple macro to create a color from R,G and B values */
-#if LV_COLOR_DEPTH == 1
-#define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){.full = (uint8_t)((b8 >> 7) | (g8 >> 7) | (r8 >> 7))})
-#elif LV_COLOR_DEPTH == 8
-#define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){{(uint8_t)((b8 >> 6) & 0x3U), (uint8_t)((g8 >> 5) & 0x7U), (uint8_t)((r8 >> 5) & 0x7U)}})
-#elif LV_COLOR_DEPTH == 16
-#if LV_COLOR_16_SWAP == 0
-#define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){{(uint16_t)((b8 >> 3) & 0x1FU), (uint16_t)((g8 >> 2) & 0x3FU), (uint16_t)((r8 >> 3) & 0x1FU)}})
-#else
-#define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){{(uint16_t)((g8 >> 5) & 0x7U), (uint16_t)((r8 >> 3) & 0x1FU), (uint16_t)((b8 >> 3) & 0x1FU), (uint16_t)((g8 >> 2) & 0x7U)}})
-#endif
-#elif LV_COLOR_DEPTH == 32
-#define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){{b8, g8, r8, 0xff}}) /*Fix 0xff alpha*/
-#endif
-
-static inline lv_color_t lv_color_make(uint8_t r, uint8_t g, uint8_t b)
-{
- return LV_COLOR_MAKE(r, g, b);
-}
-
-static inline lv_color_t lv_color_hex(uint32_t c)
-{
- return lv_color_make((uint8_t)((c >> 16) & 0xFF), (uint8_t)((c >> 8) & 0xFF), (uint8_t)(c & 0xFF));
-}
-
-static inline lv_color_t lv_color_hex3(uint32_t c)
-{
- return lv_color_make((uint8_t)(((c >> 4) & 0xF0) | ((c >> 8) & 0xF)), (uint8_t)((c & 0xF0) | ((c & 0xF0) >> 4)),
- (uint8_t)((c & 0xF) | ((c & 0xF) << 4)));
-}
-
-/**
- * Convert a HSV color to RGB
- * @param h hue [0..359]
- * @param s saturation [0..100]
- * @param v value [0..100]
- * @return the given RGB color in RGB (with LV_COLOR_DEPTH depth)
- */
-lv_color_t lv_color_hsv_to_rgb(uint16_t h, uint8_t s, uint8_t v);
-
-/**
- * Convert a 32-bit RGB color to HSV
- * @param r8 8-bit red
- * @param g8 8-bit green
- * @param b8 8-bit blue
- * @return the given RGB color in HSV
- */
-lv_color_hsv_t lv_color_rgb_to_hsv(uint8_t r8, uint8_t g8, uint8_t b8);
-
-/**
- * Convert a color to HSV
- * @param color color
- * @return the given color in HSV
- */
-lv_color_hsv_t lv_color_to_hsv(lv_color_t color);
-
-/**********************
- * MACROS
- **********************/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*USE_COLOR*/
diff --git a/src/libs/lvgl/src/lv_misc/lv_fs.c b/src/libs/lvgl/src/lv_misc/lv_fs.c
deleted file mode 100644
index a23081ce..00000000
--- a/src/libs/lvgl/src/lv_misc/lv_fs.c
+++ /dev/null
@@ -1,642 +0,0 @@
-/**
- * @file lv_fs.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_fs.h"
-#if LV_USE_FILESYSTEM
-
-#include "../lv_core/lv_debug.h"
-#include "lv_ll.h"
-#include <string.h>
-#include "lv_gc.h"
-
-#if defined(LV_GC_INCLUDE)
-#include LV_GC_INCLUDE
-#endif /* LV_ENABLE_GC */
-
-/*********************
- * DEFINES
- *********************/
-
-/* "free" is used as a function pointer (in lv_fs_drv_t).
- * We must make sure "free" was not defined to a platform specific
- * free function, otherwise compilation would fail.
- */
-#ifdef free
-#undef free
-#endif
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static const char * lv_fs_get_real_path(const char * path);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Initialize the File system interface
- */
-void lv_fs_init(void)
-{
- lv_ll_init(&LV_GC_ROOT(_lv_drv_ll), sizeof(lv_fs_drv_t));
-}
-
-/**
- * Test if a drive is rady or not. If the `ready` function was not initialized `true` will be
- * returned.
- * @param letter letter of the drive
- * @return true: drive is ready; false: drive is not ready
- */
-bool lv_fs_is_ready(char letter)
-{
- lv_fs_drv_t * drv = lv_fs_get_drv(letter);
-
- if(drv == NULL) return false; /*An unknown driver in not ready*/
-
- if(drv->ready_cb == NULL) return true; /*Assume the driver is always ready if no handler provided*/
-
- return drv->ready_cb(drv);
-}
-
-/**
- * Open a file
- * @param file_p pointer to a lv_fs_file_t variable
- * @param path path to the file beginning with the driver letter (e.g. S:/folder/file.txt)
- * @param mode read: FS_MODE_RD, write: FS_MODE_WR, both: FS_MODE_RD | FS_MODE_WR
- * @return LV_FS_RES_OK or any error from lv_fs_res_t enum
- */
-lv_fs_res_t lv_fs_open(lv_fs_file_t * file_p, const char * path, lv_fs_mode_t mode)
-{
- file_p->drv = NULL;
- file_p->file_d = NULL;
-
- if(path == NULL) return LV_FS_RES_INV_PARAM;
-
- char letter = path[0];
-
- file_p->drv = lv_fs_get_drv(letter);
-
- if(file_p->drv == NULL) {
- file_p->file_d = NULL;
- return LV_FS_RES_NOT_EX;
- }
-
- if(file_p->drv->ready_cb != NULL) {
- if(file_p->drv->ready_cb(file_p->drv) == false) {
- file_p->drv = NULL;
- file_p->file_d = NULL;
- return LV_FS_RES_HW_ERR;
- }
- }
-
- file_p->file_d = lv_mem_alloc(file_p->drv->file_size);
- LV_ASSERT_MEM(file_p->file_d);
- if(file_p->file_d == NULL) {
- file_p->drv = NULL;
- return LV_FS_RES_OUT_OF_MEM; /* Out of memory */
- }
-
- if(file_p->drv->open_cb == NULL) {
- return LV_FS_RES_NOT_IMP;
- }
-
- const char * real_path = lv_fs_get_real_path(path);
- lv_fs_res_t res = file_p->drv->open_cb(file_p->drv, file_p->file_d, real_path, mode);
-
- if(res != LV_FS_RES_OK) {
- lv_mem_free(file_p->file_d);
- file_p->file_d = NULL;
- file_p->drv = NULL;
- }
-
- return res;
-}
-
-/**
- * Close an already opened file
- * @param file_p pointer to a lv_fs_file_t variable
- * @return LV_FS_RES_OK or any error from lv_fs_res_t enum
- */
-lv_fs_res_t lv_fs_close(lv_fs_file_t * file_p)
-{
- if(file_p->drv == NULL) {
- return LV_FS_RES_INV_PARAM;
- }
-
- if(file_p->drv->close_cb == NULL) {
- return LV_FS_RES_NOT_IMP;
- }
-
- lv_fs_res_t res = file_p->drv->close_cb(file_p->drv, file_p->file_d);
-
- lv_mem_free(file_p->file_d); /*Clean up*/
- file_p->file_d = NULL;
- file_p->drv = NULL;
- file_p->file_d = NULL;
-
- return res;
-}
-
-/**
- * Delete a file
- * @param path path of the file to delete
- * @return LV_FS_RES_OK or any error from lv_fs_res_t enum
- */
-lv_fs_res_t lv_fs_remove(const char * path)
-{
- if(path == NULL) return LV_FS_RES_INV_PARAM;
- lv_fs_drv_t * drv = NULL;
-
- char letter = path[0];
-
- drv = lv_fs_get_drv(letter);
- if(drv == NULL) return LV_FS_RES_NOT_EX;
- if(drv->ready_cb != NULL) {
- if(drv->ready_cb(drv) == false) return LV_FS_RES_HW_ERR;
- }
-
- if(drv->remove_cb == NULL) return LV_FS_RES_NOT_IMP;
-
- const char * real_path = lv_fs_get_real_path(path);
- lv_fs_res_t res = drv->remove_cb(drv, real_path);
-
- return res;
-}
-
-/**
- * Read from a file
- * @param file_p pointer to a lv_fs_file_t variable
- * @param buf pointer to a buffer where the read bytes are stored
- * @param btr Bytes To Read
- * @param br the number of real read bytes (Bytes Read). NULL if unused.
- * @return LV_FS_RES_OK or any error from lv_fs_res_t enum
- */
-lv_fs_res_t lv_fs_read(lv_fs_file_t * file_p, void * buf, uint32_t btr, uint32_t * br)
-{
- if(br != NULL) *br = 0;
- if(file_p->drv == NULL) return LV_FS_RES_INV_PARAM;
- if(file_p->drv->read_cb == NULL) return LV_FS_RES_NOT_IMP;
-
- uint32_t br_tmp = 0;
- lv_fs_res_t res = file_p->drv->read_cb(file_p->drv, file_p->file_d, buf, btr, &br_tmp);
- if(br != NULL) *br = br_tmp;
-
- return res;
-}
-
-/**
- * Write into a file
- * @param file_p pointer to a lv_fs_file_t variable
- * @param buf pointer to a buffer with the bytes to write
- * @param btr Bytes To Write
- * @param br the number of real written bytes (Bytes Written). NULL if unused.
- * @return LV_FS_RES_OK or any error from lv_fs_res_t enum
- */
-lv_fs_res_t lv_fs_write(lv_fs_file_t * file_p, const void * buf, uint32_t btw, uint32_t * bw)
-{
- if(bw != NULL) *bw = 0;
-
- if(file_p->drv == NULL) {
- return LV_FS_RES_INV_PARAM;
- }
-
- if(file_p->drv->write_cb == NULL) {
- return LV_FS_RES_NOT_IMP;
- }
-
- uint32_t bw_tmp = 0;
- lv_fs_res_t res = file_p->drv->write_cb(file_p->drv, file_p->file_d, buf, btw, &bw_tmp);
- if(bw != NULL) *bw = bw_tmp;
-
- return res;
-}
-
-/**
- * Set the position of the 'cursor' (read write pointer) in a file
- * @param file_p pointer to a lv_fs_file_t variable
- * @param pos the new position expressed in bytes index (0: start of file)
- * @return LV_FS_RES_OK or any error from lv_fs_res_t enum
- */
-lv_fs_res_t lv_fs_seek(lv_fs_file_t * file_p, uint32_t pos)
-{
- if(file_p->drv == NULL) {
- return LV_FS_RES_INV_PARAM;
- }
-
- if(file_p->drv->seek_cb == NULL) {
- return LV_FS_RES_NOT_IMP;
- }
-
- lv_fs_res_t res = file_p->drv->seek_cb(file_p->drv, file_p->file_d, pos);
-
- return res;
-}
-
-/**
- * Give the position of the read write pointer
- * @param file_p pointer to a lv_fs_file_t variable
- * @param pos_p pointer to store the position of the read write pointer
- * @return LV_FS_RES_OK or any error from 'fs_res_t'
- */
-lv_fs_res_t lv_fs_tell(lv_fs_file_t * file_p, uint32_t * pos)
-{
- if(file_p->drv == NULL) {
- pos = 0;
- return LV_FS_RES_INV_PARAM;
- }
-
- if(file_p->drv->tell_cb == NULL) {
- pos = 0;
- return LV_FS_RES_NOT_IMP;
- }
-
- lv_fs_res_t res = file_p->drv->tell_cb(file_p->drv, file_p->file_d, pos);
-
- return res;
-}
-
-/**
- * Truncate the file size to the current position of the read write pointer
- * @param file_p pointer to an 'ufs_file_t' variable. (opened with lv_fs_open )
- * @return LV_FS_RES_OK: no error, the file is read
- * any error from lv_fs_res_t enum
- */
-lv_fs_res_t lv_fs_trunc(lv_fs_file_t * file_p)
-{
- if(file_p->drv == NULL) {
- return LV_FS_RES_INV_PARAM;
- }
-
- if(file_p->drv->tell_cb == NULL) {
- return LV_FS_RES_NOT_IMP;
- }
-
- lv_fs_res_t res = file_p->drv->trunc_cb(file_p->drv, file_p->file_d);
-
- return res;
-}
-/**
- * Give the size of a file bytes
- * @param file_p pointer to a lv_fs_file_t variable
- * @param size pointer to a variable to store the size
- * @return LV_FS_RES_OK or any error from lv_fs_res_t enum
- */
-lv_fs_res_t lv_fs_size(lv_fs_file_t * file_p, uint32_t * size)
-{
- if(file_p->drv == NULL) {
- return LV_FS_RES_INV_PARAM;
- }
-
- if(file_p->drv->size_cb == NULL) return LV_FS_RES_NOT_IMP;
-
- if(size == NULL) return LV_FS_RES_INV_PARAM;
-
- lv_fs_res_t res = file_p->drv->size_cb(file_p->drv, file_p->file_d, size);
-
- return res;
-}
-
-/**
- * Rename a file
- * @param oldname path to the file
- * @param newname path with the new name
- * @return LV_FS_RES_OK or any error from 'fs_res_t'
- */
-lv_fs_res_t lv_fs_rename(const char * oldname, const char * newname)
-{
- if(!oldname || !newname) return LV_FS_RES_INV_PARAM;
-
- char letter = oldname[0];
-
- lv_fs_drv_t * drv = lv_fs_get_drv(letter);
-
- if(!drv) {
- return LV_FS_RES_NOT_EX;
- }
-
- if(drv->ready_cb != NULL) {
- if(drv->ready_cb(drv) == false) {
- return LV_FS_RES_HW_ERR;
- }
- }
-
- if(drv->rename_cb == NULL) return LV_FS_RES_NOT_IMP;
-
- const char * old_real = lv_fs_get_real_path(oldname);
- const char * new_real = lv_fs_get_real_path(newname);
-
- lv_fs_res_t res = drv->rename_cb(drv, old_real, new_real);
-
- return res;
-}
-
-/**
- * Initialize a 'fs_read_dir_t' variable for directory reading
- * @param rddir_p pointer to a 'fs_read_dir_t' variable
- * @param path path to a directory
- * @return LV_FS_RES_OK or any error from lv_fs_res_t enum
- */
-lv_fs_res_t lv_fs_dir_open(lv_fs_dir_t * rddir_p, const char * path)
-{
- if(path == NULL) return LV_FS_RES_INV_PARAM;
-
- char letter = path[0];
-
- rddir_p->drv = lv_fs_get_drv(letter);
-
- if(rddir_p->drv == NULL) {
- rddir_p->dir_d = NULL;
- return LV_FS_RES_NOT_EX;
- }
-
- rddir_p->dir_d = lv_mem_alloc(rddir_p->drv->rddir_size);
- LV_ASSERT_MEM(rddir_p->dir_d);
- if(rddir_p->dir_d == NULL) {
- rddir_p->dir_d = NULL;
- return LV_FS_RES_OUT_OF_MEM; /* Out of memory */
- }
-
- if(rddir_p->drv->dir_open_cb == NULL) {
- return LV_FS_RES_NOT_IMP;
- }
-
- const char * real_path = lv_fs_get_real_path(path);
-
- lv_fs_res_t res = rddir_p->drv->dir_open_cb(rddir_p->drv, rddir_p->dir_d, real_path);
-
- return res;
-}
-
-/**
- * Read the next filename form a directory.
- * The name of the directories will begin with '/'
- * @param rddir_p pointer to an initialized 'fs_read_dir_t' variable
- * @param fn pointer to a buffer to store the filename
- * @return LV_FS_RES_OK or any error from lv_fs_res_t enum
- */
-lv_fs_res_t lv_fs_dir_read(lv_fs_dir_t * rddir_p, char * fn)
-{
- if(rddir_p->drv == NULL || rddir_p->dir_d == NULL) {
- fn[0] = '\0';
- return LV_FS_RES_INV_PARAM;
- }
-
- if(rddir_p->drv->dir_read_cb == NULL) {
- return LV_FS_RES_NOT_IMP;
- }
-
- lv_fs_res_t res = rddir_p->drv->dir_read_cb(rddir_p->drv, rddir_p->dir_d, fn);
-
- return res;
-}
-
-/**
- * Close the directory reading
- * @param rddir_p pointer to an initialized 'fs_read_dir_t' variable
- * @return LV_FS_RES_OK or any error from lv_fs_res_t enum
- */
-lv_fs_res_t lv_fs_dir_close(lv_fs_dir_t * rddir_p)
-{
- if(rddir_p->drv == NULL || rddir_p->dir_d == NULL) {
- return LV_FS_RES_INV_PARAM;
- }
-
- lv_fs_res_t res;
-
- if(rddir_p->drv->dir_close_cb == NULL) {
- res = LV_FS_RES_NOT_IMP;
- } else {
- res = rddir_p->drv->dir_close_cb(rddir_p->drv, rddir_p->dir_d);
- }
-
- lv_mem_free(rddir_p->dir_d); /*Clean up*/
- rddir_p->dir_d = NULL;
- rddir_p->drv = NULL;
- rddir_p->dir_d = NULL;
-
- return res;
-}
-
-/**
- * Get the free and total size of a driver in kB
- * @param letter the driver letter
- * @param total_p pointer to store the total size [kB]
- * @param free_p pointer to store the free size_cb [kB]
- * @return LV_FS_RES_OK or any error from lv_fs_res_t enum
- */
-lv_fs_res_t lv_fs_free_space(char letter, uint32_t * total_p, uint32_t * free_p)
-{
- lv_fs_drv_t * drv = lv_fs_get_drv(letter);
-
- if(drv == NULL) {
- return LV_FS_RES_INV_PARAM;
- }
-
- lv_fs_res_t res;
-
- if(drv->free_space_cb == NULL) {
- res = LV_FS_RES_NOT_IMP;
- } else {
- uint32_t total_tmp = 0;
- uint32_t free_tmp = 0;
- res = drv->free_space_cb(drv, &total_tmp, &free_tmp);
-
- if(total_p != NULL) *total_p = total_tmp;
- if(free_p != NULL) *free_p = free_tmp;
- }
-
- return res;
-}
-
-/**
- * Initialize a file system driver with default values.
- * It is used to surly have known values in the fields ant not memory junk.
- * After it you can set the fields.
- * @param drv pointer to driver variable to initialize
- */
-void lv_fs_drv_init(lv_fs_drv_t * drv)
-{
- memset(drv, 0, sizeof(lv_fs_drv_t));
-}
-
-/**
- * Add a new drive
- * @param drv_p pointer to an lv_fs_drv_t structure which is inited with the
- * corresponding function pointers. The data will be copied so the variable can be local.
- */
-void lv_fs_drv_register(lv_fs_drv_t * drv_p)
-{
- /*Save the new driver*/
- lv_fs_drv_t * new_drv;
- new_drv = lv_ll_ins_head(&LV_GC_ROOT(_lv_drv_ll));
- LV_ASSERT_MEM(new_drv);
- if(new_drv == NULL) return;
-
- memcpy(new_drv, drv_p, sizeof(lv_fs_drv_t));
-}
-
-/**
- * Give a pointer to a driver from its letter
- * @param letter the driver letter
- * @return pointer to a driver or NULL if not found
- */
-lv_fs_drv_t * lv_fs_get_drv(char letter)
-{
- lv_fs_drv_t * drv;
-
- LV_LL_READ(LV_GC_ROOT(_lv_drv_ll), drv)
- {
- if(drv->letter == letter) {
- return drv;
- }
- }
-
- return NULL;
-}
-/**
- * Fill a buffer with the letters of existing drivers
- * @param buf buffer to store the letters ('\0' added after the last letter)
- * @return the buffer
- */
-char * lv_fs_get_letters(char * buf)
-{
- lv_fs_drv_t * drv;
- uint8_t i = 0;
-
- LV_LL_READ(LV_GC_ROOT(_lv_drv_ll), drv)
- {
- buf[i] = drv->letter;
- i++;
- }
-
- buf[i] = '\0';
-
- return buf;
-}
-
-/**
- * Return with the extension of the filename
- * @param fn string with a filename
- * @return pointer to the beginning extension or empty string if no extension
- */
-const char * lv_fs_get_ext(const char * fn)
-{
- size_t i;
- for(i = strlen(fn); i > 0; i--) {
- if(fn[i] == '.') {
- return &fn[i + 1];
- } else if(fn[i] == '/' || fn[i] == '\\') {
- return ""; /*No extension if a '\' or '/' found*/
- }
- }
-
- return ""; /*Empty string if no '.' in the file name. */
-}
-
-/**
- * Step up one level
- * @param path pointer to a file name
- * @return the truncated file name
- */
-char * lv_fs_up(char * path)
-{
- size_t len = strlen(path);
- if(len == 0) return path;
-
- len--; /*Go before the trailing '\0'*/
-
- /*Ignore trailing '/' or '\'*/
- while(path[len] == '/' || path[len] == '\\') {
- path[len] = '\0';
- if(len > 0)
- len--;
- else
- return path;
- }
-
- size_t i;
- for(i = len; i > 0; i--) {
- if(path[i] == '/' || path[i] == '\\') break;
- }
-
- if(i > 0) path[i] = '\0';
-
- return path;
-}
-
-/**
- * Get the last element of a path (e.g. U:/folder/file -> file)
- * @param path a character sting with the path to search in
- * @return pointer to the beginning of the last element in the path
- */
-const char * lv_fs_get_last(const char * path)
-{
- size_t len = strlen(path);
- if(len == 0) return path;
-
- len--; /*Go before the trailing '\0'*/
-
- /*Ignore trailing '/' or '\'*/
- while(path[len] == '/' || path[len] == '\\') {
- if(len > 0)
- len--;
- else
- return path;
- }
-
- size_t i;
- for(i = len; i > 0; i--) {
- if(path[i] == '/' || path[i] == '\\') break;
- }
-
- /*No '/' or '\' in the path so return with path itself*/
- if(i == 0) return path;
-
- return &path[i + 1];
-}
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Leave the driver letters and / or \ letters from beginning of the path
- * @param path path string (E.g. S:/folder/file.txt)
- * @return pointer to the beginning of the real path (E.g. folder/file.txt)
- */
-static const char * lv_fs_get_real_path(const char * path)
-{
- /* Example path: "S:/folder/file.txt"
- * Leave the letter and the : / \ characters*/
-
- path++; /*Ignore the driver letter*/
-
- while(*path != '\0') {
- if(*path == ':' || *path == '\\' || *path == '/') {
- path++;
- } else {
- break;
- }
- }
-
- return path;
-}
-
-#endif /*LV_USE_FILESYSTEM*/
diff --git a/src/libs/lvgl/src/lv_misc/lv_fs.h b/src/libs/lvgl/src/lv_misc/lv_fs.h
deleted file mode 100644
index f1824282..00000000
--- a/src/libs/lvgl/src/lv_misc/lv_fs.h
+++ /dev/null
@@ -1,299 +0,0 @@
-/**
- * @file lv_fs.h
- *
- */
-
-#ifndef LV_FS_H
-#define LV_FS_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_FILESYSTEM
-
-#include <stdint.h>
-#include <stdbool.h>
-#include "lv_mem.h"
-
-/*********************
- * DEFINES
- *********************/
-#define LV_FS_MAX_FN_LENGTH 64
-#define LV_FS_MAX_PATH_LENGTH 256
-
-/**********************
- * TYPEDEFS
- **********************/
-/**
- * Errors in the filesystem module.
- */
-enum {
- LV_FS_RES_OK = 0,
- LV_FS_RES_HW_ERR, /*Low level hardware error*/
- LV_FS_RES_FS_ERR, /*Error in the file system structure */
- LV_FS_RES_NOT_EX, /*Driver, file or directory is not exists*/
- LV_FS_RES_FULL, /*Disk full*/
- LV_FS_RES_LOCKED, /*The file is already opened*/
- LV_FS_RES_DENIED, /*Access denied. Check 'fs_open' modes and write protect*/
- LV_FS_RES_BUSY, /*The file system now can't handle it, try later*/
- LV_FS_RES_TOUT, /*Process time outed*/
- LV_FS_RES_NOT_IMP, /*Requested function is not implemented*/
- LV_FS_RES_OUT_OF_MEM, /*Not enough memory for an internal operation*/
- LV_FS_RES_INV_PARAM, /*Invalid parameter among arguments*/
- LV_FS_RES_UNKNOWN, /*Other unknown error*/
-};
-typedef uint8_t lv_fs_res_t;
-
-/**
- * Filesystem mode.
- */
-enum {
- LV_FS_MODE_WR = 0x01,
- LV_FS_MODE_RD = 0x02,
-};
-typedef uint8_t lv_fs_mode_t;
-
-typedef struct _lv_fs_drv_t
-{
- char letter;
- uint16_t file_size;
- uint16_t rddir_size;
- bool (*ready_cb)(struct _lv_fs_drv_t * drv);
-
- lv_fs_res_t (*open_cb)(struct _lv_fs_drv_t * drv, void * file_p, const char * path, lv_fs_mode_t mode);
- lv_fs_res_t (*close_cb)(struct _lv_fs_drv_t * drv, void * file_p);
- lv_fs_res_t (*remove_cb)(struct _lv_fs_drv_t * drv, const char * fn);
- lv_fs_res_t (*read_cb)(struct _lv_fs_drv_t * drv, void * file_p, void * buf, uint32_t btr, uint32_t * br);
- lv_fs_res_t (*write_cb)(struct _lv_fs_drv_t * drv, void * file_p, const void * buf, uint32_t btw, uint32_t * bw);
- lv_fs_res_t (*seek_cb)(struct _lv_fs_drv_t * drv, void * file_p, uint32_t pos);
- lv_fs_res_t (*tell_cb)(struct _lv_fs_drv_t * drv, void * file_p, uint32_t * pos_p);
- lv_fs_res_t (*trunc_cb)(struct _lv_fs_drv_t * drv, void * file_p);
- lv_fs_res_t (*size_cb)(struct _lv_fs_drv_t * drv, void * file_p, uint32_t * size_p);
- lv_fs_res_t (*rename_cb)(struct _lv_fs_drv_t * drv, const char * oldname, const char * newname);
- lv_fs_res_t (*free_space_cb)(struct _lv_fs_drv_t * drv, uint32_t * total_p, uint32_t * free_p);
-
- lv_fs_res_t (*dir_open_cb)(struct _lv_fs_drv_t * drv, void * rddir_p, const char * path);
- lv_fs_res_t (*dir_read_cb)(struct _lv_fs_drv_t * drv, void * rddir_p, char * fn);
- lv_fs_res_t (*dir_close_cb)(struct _lv_fs_drv_t * drv, void * rddir_p);
-
-#if LV_USE_USER_DATA
- lv_fs_drv_user_data_t user_data; /**< Custom file user data */
-#endif
-} lv_fs_drv_t;
-
-typedef struct
-{
- void * file_d;
- lv_fs_drv_t * drv;
-} lv_fs_file_t;
-
-typedef struct
-{
- void * dir_d;
- lv_fs_drv_t * drv;
-} lv_fs_dir_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Initialize the File system interface
- */
-void lv_fs_init(void);
-
-/**
- * Initialize a file system driver with default values.
- * It is used to surly have known values in the fields ant not memory junk.
- * After it you can set the fields.
- * @param drv pointer to driver variable to initialize
- */
-void lv_fs_drv_init(lv_fs_drv_t * drv);
-
-/**
- * Add a new drive
- * @param drv_p pointer to an lv_fs_drv_t structure which is inited with the
- * corresponding function pointers. The data will be copied so the variable can be local.
- */
-void lv_fs_drv_register(lv_fs_drv_t * drv_p);
-
-/**
- * Give a pointer to a driver from its letter
- * @param letter the driver letter
- * @return pointer to a driver or NULL if not found
- */
-lv_fs_drv_t * lv_fs_get_drv(char letter);
-
-/**
- * Test if a drive is rady or not. If the `ready` function was not initialized `true` will be
- * returned.
- * @param letter letter of the drive
- * @return true: drive is ready; false: drive is not ready
- */
-bool lv_fs_is_ready(char letter);
-
-/**
- * Open a file
- * @param file_p pointer to a lv_fs_file_t variable
- * @param path path to the file beginning with the driver letter (e.g. S:/folder/file.txt)
- * @param mode read: FS_MODE_RD, write: FS_MODE_WR, both: FS_MODE_RD | FS_MODE_WR
- * @return LV_FS_RES_OK or any error from lv_fs_res_t enum
- */
-lv_fs_res_t lv_fs_open(lv_fs_file_t * file_p, const char * path, lv_fs_mode_t mode);
-
-/**
- * Close an already opened file
- * @param file_p pointer to a lv_fs_file_t variable
- * @return LV_FS_RES_OK or any error from lv_fs_res_t enum
- */
-lv_fs_res_t lv_fs_close(lv_fs_file_t * file_p);
-
-/**
- * Delete a file
- * @param path path of the file to delete
- * @return LV_FS_RES_OK or any error from lv_fs_res_t enum
- */
-lv_fs_res_t lv_fs_remove(const char * path);
-
-/**
- * Read from a file
- * @param file_p pointer to a lv_fs_file_t variable
- * @param buf pointer to a buffer where the read bytes are stored
- * @param btr Bytes To Read
- * @param br the number of real read bytes (Bytes Read). NULL if unused.
- * @return LV_FS_RES_OK or any error from lv_fs_res_t enum
- */
-lv_fs_res_t lv_fs_read(lv_fs_file_t * file_p, void * buf, uint32_t btr, uint32_t * br);
-
-/**
- * Write into a file
- * @param file_p pointer to a lv_fs_file_t variable
- * @param buf pointer to a buffer with the bytes to write
- * @param btr Bytes To Write
- * @param br the number of real written bytes (Bytes Written). NULL if unused.
- * @return LV_FS_RES_OK or any error from lv_fs_res_t enum
- */
-lv_fs_res_t lv_fs_write(lv_fs_file_t * file_p, const void * buf, uint32_t btw, uint32_t * bw);
-
-/**
- * Set the position of the 'cursor' (read write pointer) in a file
- * @param file_p pointer to a lv_fs_file_t variable
- * @param pos the new position expressed in bytes index (0: start of file)
- * @return LV_FS_RES_OK or any error from lv_fs_res_t enum
- */
-lv_fs_res_t lv_fs_seek(lv_fs_file_t * file_p, uint32_t pos);
-
-/**
- * Give the position of the read write pointer
- * @param file_p pointer to a lv_fs_file_t variable
- * @param pos_p pointer to store the position of the read write pointer
- * @return LV_FS_RES_OK or any error from 'fs_res_t'
- */
-lv_fs_res_t lv_fs_tell(lv_fs_file_t * file_p, uint32_t * pos);
-
-/**
- * Truncate the file size to the current position of the read write pointer
- * @param file_p pointer to an 'ufs_file_t' variable. (opened with lv_fs_open )
- * @return LV_FS_RES_OK: no error, the file is read
- * any error from lv_fs_res_t enum
- */
-lv_fs_res_t lv_fs_trunc(lv_fs_file_t * file_p);
-
-/**
- * Give the size of a file bytes
- * @param file_p pointer to a lv_fs_file_t variable
- * @param size pointer to a variable to store the size
- * @return LV_FS_RES_OK or any error from lv_fs_res_t enum
- */
-lv_fs_res_t lv_fs_size(lv_fs_file_t * file_p, uint32_t * size);
-
-/**
- * Rename a file
- * @param oldname path to the file
- * @param newname path with the new name
- * @return LV_FS_RES_OK or any error from 'fs_res_t'
- */
-lv_fs_res_t lv_fs_rename(const char * oldname, const char * newname);
-
-/**
- * Initialize a 'fs_dir_t' variable for directory reading
- * @param rddir_p pointer to a 'fs_read_dir_t' variable
- * @param path path to a directory
- * @return LV_FS_RES_OK or any error from lv_fs_res_t enum
- */
-lv_fs_res_t lv_fs_dir_open(lv_fs_dir_t * rddir_p, const char * path);
-
-/**
- * Read the next filename form a directory.
- * The name of the directories will begin with '/'
- * @param rddir_p pointer to an initialized 'fs_rdir_t' variable
- * @param fn pointer to a buffer to store the filename
- * @return LV_FS_RES_OK or any error from lv_fs_res_t enum
- */
-lv_fs_res_t lv_fs_dir_read(lv_fs_dir_t * rddir_p, char * fn);
-
-/**
- * Close the directory reading
- * @param rddir_p pointer to an initialized 'fs_dir_t' variable
- * @return LV_FS_RES_OK or any error from lv_fs_res_t enum
- */
-lv_fs_res_t lv_fs_dir_close(lv_fs_dir_t * rddir_p);
-
-/**
- * Get the free and total size of a driver in kB
- * @param letter the driver letter
- * @param total_p pointer to store the total size [kB]
- * @param free_p pointer to store the free size [kB]
- * @return LV_FS_RES_OK or any error from lv_fs_res_t enum
- */
-lv_fs_res_t lv_fs_free_space(char letter, uint32_t * total_p, uint32_t * free_p);
-
-/**
- * Fill a buffer with the letters of existing drivers
- * @param buf buffer to store the letters ('\0' added after the last letter)
- * @return the buffer
- */
-char * lv_fs_get_letters(char * buf);
-
-/**
- * Return with the extension of the filename
- * @param fn string with a filename
- * @return pointer to the beginning extension or empty string if no extension
- */
-const char * lv_fs_get_ext(const char * fn);
-
-/**
- * Step up one level
- * @param path pointer to a file name
- * @return the truncated file name
- */
-char * lv_fs_up(char * path);
-
-/**
- * Get the last element of a path (e.g. U:/folder/file -> file)
- * @param buf buffer to store the letters ('\0' added after the last letter)
- * @return pointer to the beginning of the last element in the path
- */
-const char * lv_fs_get_last(const char * path);
-
-/**********************
- * MACROS
- **********************/
-
-#endif /*LV_USE_FILESYSTEM*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_FS_H*/
diff --git a/src/libs/lvgl/src/lv_misc/lv_gc.c b/src/libs/lvgl/src/lv_misc/lv_gc.c
deleted file mode 100644
index 94bf532a..00000000
--- a/src/libs/lvgl/src/lv_misc/lv_gc.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * @file lv_gc.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-
-#include "lv_gc.h"
-#include "string.h"
-
-#if defined(LV_GC_INCLUDE)
-#include LV_GC_INCLUDE
-#endif /* LV_ENABLE_GC */
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-
-/**********************
- * STATIC VARIABLES
- **********************/
-#if(!defined(LV_ENABLE_GC)) || LV_ENABLE_GC == 0
-LV_ROOTS
-#endif /* LV_ENABLE_GC */
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-void lv_gc_clear_roots(void)
-{
-#define LV_CLEAR_ROOT(root_type, root_name) memset(&LV_GC_ROOT(root_name), 0, sizeof(LV_GC_ROOT(root_name)));
- LV_ITERATE_ROOTS(LV_CLEAR_ROOT)
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
diff --git a/src/libs/lvgl/src/lv_misc/lv_gc.h b/src/libs/lvgl/src/lv_misc/lv_gc.h
deleted file mode 100644
index afd4d600..00000000
--- a/src/libs/lvgl/src/lv_misc/lv_gc.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * @file lv_gc.h
- *
- */
-
-#ifndef LV_GC_H
-#define LV_GC_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#include <stdint.h>
-#include <stdbool.h>
-#include "lv_mem.h"
-#include "lv_ll.h"
-#include "../lv_draw/lv_img_cache.h"
-
-/*********************
- * DEFINES
- *********************/
-
-#define LV_ITERATE_ROOTS(f) \
- f(lv_ll_t, _lv_task_ll) /*Linked list to store the lv_tasks*/ \
- f(lv_ll_t, _lv_disp_ll) /*Linked list of screens*/ \
- f(lv_ll_t, _lv_indev_ll) /*Linked list of screens*/ \
- f(lv_ll_t, _lv_drv_ll) \
- f(lv_ll_t, _lv_file_ll) \
- f(lv_ll_t, _lv_anim_ll) \
- f(lv_ll_t, _lv_group_ll) \
- f(lv_ll_t, _lv_img_defoder_ll) \
- f(lv_img_cache_entry_t*, _lv_img_cache_array) \
- f(void*, _lv_task_act) \
- f(void*, _lv_draw_buf)
-
-#define LV_DEFINE_ROOT(root_type, root_name) root_type root_name;
-#define LV_ROOTS LV_ITERATE_ROOTS(LV_DEFINE_ROOT)
-
-#if LV_ENABLE_GC == 1
-#if LV_MEM_CUSTOM != 1
-#error "GC requires CUSTOM_MEM"
-#endif /* LV_MEM_CUSTOM */
-#else /* LV_ENABLE_GC */
-#define LV_GC_ROOT(x) x
-#define LV_EXTERN_ROOT(root_type, root_name) extern root_type root_name;
-LV_ITERATE_ROOTS(LV_EXTERN_ROOT)
-#endif /* LV_ENABLE_GC */
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-void lv_gc_clear_roots(void);
-
-/**********************
- * MACROS
- **********************/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_GC_H*/
diff --git a/src/libs/lvgl/src/lv_misc/lv_ll.c b/src/libs/lvgl/src/lv_misc/lv_ll.c
deleted file mode 100644
index 99526659..00000000
--- a/src/libs/lvgl/src/lv_misc/lv_ll.c
+++ /dev/null
@@ -1,422 +0,0 @@
-/**
- * @file lv_ll.c
- * Handle linked lists.
- * The nodes are dynamically allocated by the 'lv_mem' module,
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include <stdint.h>
-#include <string.h>
-
-#include "lv_ll.h"
-#include "lv_mem.h"
-
-/*********************
- * DEFINES
- *********************/
-#define LL_NODE_META_SIZE (sizeof(lv_ll_node_t *) + sizeof(lv_ll_node_t *))
-#define LL_PREV_P_OFFSET(ll_p) (ll_p->n_size)
-#define LL_NEXT_P_OFFSET(ll_p) (ll_p->n_size + sizeof(lv_ll_node_t *))
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static void node_set_prev(lv_ll_t * ll_p, lv_ll_node_t * act, lv_ll_node_t * prev);
-static void node_set_next(lv_ll_t * ll_p, lv_ll_node_t * act, lv_ll_node_t * next);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Initialize linked list
- * @param ll_dsc pointer to ll_dsc variable
- * @param node_size the size of 1 node in bytes
- */
-void lv_ll_init(lv_ll_t * ll_p, uint32_t node_size)
-{
- ll_p->head = NULL;
- ll_p->tail = NULL;
-#ifdef LV_MEM_ENV64
- /*Round the size up to 8*/
- if(node_size & 0x7) {
- node_size = node_size & (~0x7);
- node_size += 8;
- }
-#else
- /*Round the size up to 4*/
- if(node_size & 0x3) {
- node_size = node_size & (~0x3);
- node_size += 4;
- }
-#endif
-
- ll_p->n_size = node_size;
-}
-
-/**
- * Add a new head to a linked list
- * @param ll_p pointer to linked list
- * @return pointer to the new head
- */
-void * lv_ll_ins_head(lv_ll_t * ll_p)
-{
- lv_ll_node_t * n_new;
-
- n_new = lv_mem_alloc(ll_p->n_size + LL_NODE_META_SIZE);
-
- if(n_new != NULL) {
- node_set_prev(ll_p, n_new, NULL); /*No prev. before the new head*/
- node_set_next(ll_p, n_new, ll_p->head); /*After new comes the old head*/
-
- if(ll_p->head != NULL) { /*If there is old head then before it goes the new*/
- node_set_prev(ll_p, ll_p->head, n_new);
- }
-
- ll_p->head = n_new; /*Set the new head in the dsc.*/
- if(ll_p->tail == NULL) { /*If there is no tail (1. node) set the tail too*/
- ll_p->tail = n_new;
- }
- }
-
- return n_new;
-}
-
-/**
- * Insert a new node in front of the n_act node
- * @param ll_p pointer to linked list
- * @param n_act pointer a node
- * @return pointer to the new head
- */
-void * lv_ll_ins_prev(lv_ll_t * ll_p, void * n_act)
-{
- lv_ll_node_t * n_new;
- lv_ll_node_t * n_prev;
-
- if(NULL == ll_p || NULL == n_act) return NULL;
-
- if(lv_ll_get_head(ll_p) == n_act) {
- n_new = lv_ll_ins_head(ll_p);
- if(n_new == NULL) return NULL;
- } else {
- n_new = lv_mem_alloc(ll_p->n_size + LL_NODE_META_SIZE);
- if(n_new == NULL) return NULL;
-
- n_prev = lv_ll_get_prev(ll_p, n_act);
- node_set_next(ll_p, n_prev, n_new);
- node_set_prev(ll_p, n_new, n_prev);
- node_set_prev(ll_p, n_act, n_new);
- node_set_next(ll_p, n_new, n_act);
- }
-
- return n_new;
-}
-
-/**
- * Add a new tail to a linked list
- * @param ll_p pointer to linked list
- * @return pointer to the new tail
- */
-void * lv_ll_ins_tail(lv_ll_t * ll_p)
-{
- lv_ll_node_t * n_new;
-
- n_new = lv_mem_alloc(ll_p->n_size + LL_NODE_META_SIZE);
- if(n_new == NULL) return NULL;
-
- if(n_new != NULL) {
- node_set_next(ll_p, n_new, NULL); /*No next after the new tail*/
- node_set_prev(ll_p, n_new, ll_p->tail); /*The prev. before new is tho old tail*/
- if(ll_p->tail != NULL) { /*If there is old tail then the new comes after it*/
- node_set_next(ll_p, ll_p->tail, n_new);
- }
-
- ll_p->tail = n_new; /*Set the new tail in the dsc.*/
- if(ll_p->head == NULL) { /*If there is no head (1. node) set the head too*/
- ll_p->head = n_new;
- }
- }
-
- return n_new;
-}
-
-/**
- * Remove the node 'node_p' from 'll_p' linked list.
- * It does not free the the memory of node.
- * @param ll_p pointer to the linked list of 'node_p'
- * @param node_p pointer to node in 'll_p' linked list
- */
-void lv_ll_rem(lv_ll_t * ll_p, void * node_p)
-{
- if(lv_ll_get_head(ll_p) == node_p) {
- /*The new head will be the node after 'n_act'*/
- ll_p->head = lv_ll_get_next(ll_p, node_p);
- if(ll_p->head == NULL) {
- ll_p->tail = NULL;
- } else {
- node_set_prev(ll_p, ll_p->head, NULL);
- }
- } else if(lv_ll_get_tail(ll_p) == node_p) {
- /*The new tail will be the node before 'n_act'*/
- ll_p->tail = lv_ll_get_prev(ll_p, node_p);
- if(ll_p->tail == NULL) {
- ll_p->head = NULL;
- } else {
- node_set_next(ll_p, ll_p->tail, NULL);
- }
- } else {
- lv_ll_node_t * n_prev = lv_ll_get_prev(ll_p, node_p);
- lv_ll_node_t * n_next = lv_ll_get_next(ll_p, node_p);
-
- node_set_next(ll_p, n_prev, n_next);
- node_set_prev(ll_p, n_next, n_prev);
- }
-}
-
-/**
- * Remove and free all elements from a linked list. The list remain valid but become empty.
- * @param ll_p pointer to linked list
- */
-void lv_ll_clear(lv_ll_t * ll_p)
-{
- void * i;
- void * i_next;
-
- i = lv_ll_get_head(ll_p);
- i_next = NULL;
-
- while(i != NULL) {
- i_next = lv_ll_get_next(ll_p, i);
-
- lv_ll_rem(ll_p, i);
- lv_mem_free(i);
-
- i = i_next;
- }
-}
-
-/**
- * Move a node to a new linked list
- * @param ll_ori_p pointer to the original (old) linked list
- * @param ll_new_p pointer to the new linked list
- * @param node pointer to a node
- * @param head true: be the head in the new list
- * false be the head in the new list
- */
-void lv_ll_chg_list(lv_ll_t * ll_ori_p, lv_ll_t * ll_new_p, void * node, bool head)
-{
- lv_ll_rem(ll_ori_p, node);
-
- if(head) {
- /*Set node as head*/
- node_set_prev(ll_new_p, node, NULL);
- node_set_next(ll_new_p, node, ll_new_p->head);
-
- if(ll_new_p->head != NULL) { /*If there is old head then before it goes the new*/
- node_set_prev(ll_new_p, ll_new_p->head, node);
- }
-
- ll_new_p->head = node; /*Set the new head in the dsc.*/
- if(ll_new_p->tail == NULL) { /*If there is no tail (first node) set the tail too*/
- ll_new_p->tail = node;
- }
- } else {
- /*Set node as tail*/
- node_set_prev(ll_new_p, node, ll_new_p->tail);
- node_set_next(ll_new_p, node, NULL);
-
- if(ll_new_p->tail != NULL) { /*If there is old tail then after it goes the new*/
- node_set_next(ll_new_p, ll_new_p->tail, node);
- }
-
- ll_new_p->tail = node; /*Set the new tail in the dsc.*/
- if(ll_new_p->head == NULL) { /*If there is no head (first node) set the head too*/
- ll_new_p->head = node;
- }
- }
-}
-
-/**
- * Return with head node of the linked list
- * @param ll_p pointer to linked list
- * @return pointer to the head of 'll_p'
- */
-void * lv_ll_get_head(const lv_ll_t * ll_p)
-{
- void * head = NULL;
-
- if(ll_p != NULL) {
- head = ll_p->head;
- }
-
- return head;
-}
-
-/**
- * Return with tail node of the linked list
- * @param ll_p pointer to linked list
- * @return pointer to the head of 'll_p'
- */
-void * lv_ll_get_tail(const lv_ll_t * ll_p)
-{
- void * tail = NULL;
-
- if(ll_p != NULL) {
- tail = ll_p->tail;
- }
-
- return tail;
-}
-
-/**
- * Return with the pointer of the next node after 'n_act'
- * @param ll_p pointer to linked list
- * @param n_act pointer a node
- * @return pointer to the next node
- */
-void * lv_ll_get_next(const lv_ll_t * ll_p, const void * n_act)
-{
- void * next = NULL;
-
- if(ll_p != NULL) {
- const lv_ll_node_t * n_act_d = n_act;
- memcpy(&next, n_act_d + LL_NEXT_P_OFFSET(ll_p), sizeof(void *));
- }
-
- return next;
-}
-
-/**
- * Return with the pointer of the previous node after 'n_act'
- * @param ll_p pointer to linked list
- * @param n_act pointer a node
- * @return pointer to the previous node
- */
-void * lv_ll_get_prev(const lv_ll_t * ll_p, const void * n_act)
-{
- void * prev = NULL;
-
- if(ll_p != NULL) {
- const lv_ll_node_t * n_act_d = n_act;
- memcpy(&prev, n_act_d + LL_PREV_P_OFFSET(ll_p), sizeof(void *));
- }
-
- return prev;
-}
-
-/**
- * Return the length of the linked list.
- * @param ll_p pointer to linked list
- * @return length of the linked list
- */
-uint32_t lv_ll_get_len(const lv_ll_t * ll_p)
-{
- uint32_t len = 0;
- void * node;
-
- for(node = lv_ll_get_head(ll_p); node != NULL; node = lv_ll_get_next(ll_p, node)) {
- len++;
- }
-
- return len;
-}
-
-/**
- * Move a nodw before an other node in the same linked list
- * @param ll_p pointer to a linked list
- * @param n_act pointer to node to move
- * @param n_after pointer to a node which should be after `n_act`
- */
-void lv_ll_move_before(lv_ll_t * ll_p, void * n_act, void * n_after)
-{
- if(n_act == n_after) return; /*Can't move before itself*/
-
- void * n_before;
- if(n_after != NULL)
- n_before = lv_ll_get_prev(ll_p, n_after);
- else
- n_before = lv_ll_get_tail(ll_p); /*if `n_after` is NULL `n_act` should be the new tail*/
-
- if(n_act == n_before) return; /*Already before `n_after`*/
-
- /*It's much easier to remove from the list and add again*/
- lv_ll_rem(ll_p, n_act);
-
- /*Add again by setting the prev. and next nodes*/
- node_set_next(ll_p, n_before, n_act);
- node_set_prev(ll_p, n_act, n_before);
- node_set_prev(ll_p, n_after, n_act);
- node_set_next(ll_p, n_act, n_after);
-
- /*If `n_act` was moved before NULL then it become the new tail*/
- if(n_after == NULL) ll_p->tail = n_act;
-
- /*If `n_act` was moved before `NULL` then it's the new head*/
- if(n_before == NULL) ll_p->head = n_act;
-}
-
-/**
- * Check if a linked list is empty
- * @param ll_p pointer to a linked list
- * @return true: the linked list is empty; false: not empty
- */
-bool lv_ll_is_empty(lv_ll_t * ll_p)
-{
- if(ll_p == NULL) return true;
-
- if(ll_p->head == NULL && ll_p->tail == NULL) return true;
-
- return false;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Set the 'pervious node pointer' of a node
- * @param ll_p pointer to linked list
- * @param act pointer to a node which prev. node pointer should be set
- * @param prev pointer to a node which should be the previous node before 'act'
- */
-static void node_set_prev(lv_ll_t * ll_p, lv_ll_node_t * act, lv_ll_node_t * prev)
-{
- if(act == NULL) return; /*Can't set the prev node of `NULL`*/
-
- uint32_t node_p_size = sizeof(lv_ll_node_t *);
- if(prev)
- memcpy(act + LL_PREV_P_OFFSET(ll_p), &prev, node_p_size);
- else
- memset(act + LL_PREV_P_OFFSET(ll_p), 0, node_p_size);
-}
-
-/**
- * Set the 'next node pointer' of a node
- * @param ll_p pointer to linked list
- * @param act pointer to a node which next node pointer should be set
- * @param next pointer to a node which should be the next node before 'act'
- */
-static void node_set_next(lv_ll_t * ll_p, lv_ll_node_t * act, lv_ll_node_t * next)
-{
- if(act == NULL) return; /*Can't set the next node of `NULL`*/
-
- uint32_t node_p_size = sizeof(lv_ll_node_t *);
- if(next)
- memcpy(act + LL_NEXT_P_OFFSET(ll_p), &next, node_p_size);
- else
- memset(act + LL_NEXT_P_OFFSET(ll_p), 0, node_p_size);
-}
diff --git a/src/libs/lvgl/src/lv_misc/lv_ll.h b/src/libs/lvgl/src/lv_misc/lv_ll.h
deleted file mode 100644
index 2c02eb48..00000000
--- a/src/libs/lvgl/src/lv_misc/lv_ll.h
+++ /dev/null
@@ -1,160 +0,0 @@
-/**
- * @file lv_ll.c
- * Handle linked lists. The nodes are dynamically allocated by the 'lv_mem' module.
- */
-
-#ifndef LV_LL_H
-#define LV_LL_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_mem.h"
-#include <stdint.h>
-#include <stddef.h>
-#include <stdbool.h>
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/** Dummy type to make handling easier*/
-typedef uint8_t lv_ll_node_t;
-
-/** Description of a linked list*/
-typedef struct
-{
- uint32_t n_size;
- lv_ll_node_t * head;
- lv_ll_node_t * tail;
-} lv_ll_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Initialize linked list
- * @param ll_dsc pointer to ll_dsc variable
- * @param node_size the size of 1 node in bytes
- */
-void lv_ll_init(lv_ll_t * ll_p, uint32_t node_size);
-
-/**
- * Add a new head to a linked list
- * @param ll_p pointer to linked list
- * @return pointer to the new head
- */
-void * lv_ll_ins_head(lv_ll_t * ll_p);
-
-/**
- * Insert a new node in front of the n_act node
- * @param ll_p pointer to linked list
- * @param n_act pointer a node
- * @return pointer to the new head
- */
-void * lv_ll_ins_prev(lv_ll_t * ll_p, void * n_act);
-
-/**
- * Add a new tail to a linked list
- * @param ll_p pointer to linked list
- * @return pointer to the new tail
- */
-void * lv_ll_ins_tail(lv_ll_t * ll_p);
-
-/**
- * Remove the node 'node_p' from 'll_p' linked list.
- * It does not free the the memory of node.
- * @param ll_p pointer to the linked list of 'node_p'
- * @param node_p pointer to node in 'll_p' linked list
- */
-void lv_ll_rem(lv_ll_t * ll_p, void * node_p);
-
-/**
- * Remove and free all elements from a linked list. The list remain valid but become empty.
- * @param ll_p pointer to linked list
- */
-void lv_ll_clear(lv_ll_t * ll_p);
-
-/**
- * Move a node to a new linked list
- * @param ll_ori_p pointer to the original (old) linked list
- * @param ll_new_p pointer to the new linked list
- * @param node pointer to a node
- * @param head true: be the head in the new list
- * false be the head in the new list
- */
-void lv_ll_chg_list(lv_ll_t * ll_ori_p, lv_ll_t * ll_new_p, void * node, bool head);
-
-/**
- * Return with head node of the linked list
- * @param ll_p pointer to linked list
- * @return pointer to the head of 'll_p'
- */
-void * lv_ll_get_head(const lv_ll_t * ll_p);
-
-/**
- * Return with tail node of the linked list
- * @param ll_p pointer to linked list
- * @return pointer to the head of 'll_p'
- */
-void * lv_ll_get_tail(const lv_ll_t * ll_p);
-
-/**
- * Return with the pointer of the next node after 'n_act'
- * @param ll_p pointer to linked list
- * @param n_act pointer a node
- * @return pointer to the next node
- */
-void * lv_ll_get_next(const lv_ll_t * ll_p, const void * n_act);
-
-/**
- * Return with the pointer of the previous node after 'n_act'
- * @param ll_p pointer to linked list
- * @param n_act pointer a node
- * @return pointer to the previous node
- */
-void * lv_ll_get_prev(const lv_ll_t * ll_p, const void * n_act);
-
-/**
- * Return the length of the linked list.
- * @param ll_p pointer to linked list
- * @return length of the linked list
- */
-uint32_t lv_ll_get_len(const lv_ll_t * ll_p);
-
-/**
- * Move a nodw before an other node in the same linked list
- * @param ll_p pointer to a linked list
- * @param n_act pointer to node to move
- * @param n_after pointer to a node which should be after `n_act`
- */
-void lv_ll_move_before(lv_ll_t * ll_p, void * n_act, void * n_after);
-
-/**
- * Check if a linked list is empty
- * @param ll_p pointer to a linked list
- * @return true: the linked list is empty; false: not empty
- */
-bool lv_ll_is_empty(lv_ll_t * ll_p);
-/**********************
- * MACROS
- **********************/
-
-#define LV_LL_READ(list, i) for(i = lv_ll_get_head(&list); i != NULL; i = lv_ll_get_next(&list, i))
-
-#define LV_LL_READ_BACK(list, i) for(i = lv_ll_get_tail(&list); i != NULL; i = lv_ll_get_prev(&list, i))
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif
diff --git a/src/libs/lvgl/src/lv_misc/lv_log.c b/src/libs/lvgl/src/lv_misc/lv_log.c
deleted file mode 100644
index acbdfb73..00000000
--- a/src/libs/lvgl/src/lv_misc/lv_log.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * @file lv_log.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_log.h"
-#if LV_USE_LOG
-
-#if LV_LOG_PRINTF
-#include <stdio.h>
-#endif
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_log_print_g_cb_t custom_print_cb;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Register custom print/write function to call when a log is added.
- * It can format its "File path", "Line number" and "Description" as required
- * and send the formatted log message to a consol or serial port.
- * @param print_cb a function pointer to print a log
- */
-void lv_log_register_print_cb(lv_log_print_g_cb_t print_cb)
-{
- custom_print_cb = print_cb;
-}
-
-/**
- * Add a log
- * @param level the level of log. (From `lv_log_level_t` enum)
- * @param file name of the file when the log added
- * @param line line number in the source code where the log added
- * @param dsc description of the log
- */
-void lv_log_add(lv_log_level_t level, const char * file, int line, const char * dsc)
-{
- if(level >= _LV_LOG_LEVEL_NUM) return; /*Invalid level*/
-
- if(level >= LV_LOG_LEVEL) {
-
-#if LV_LOG_PRINTF
- static const char * lvl_prefix[] = {"Trace", "Info", "Warn", "Error"};
- printf("%s: %s \t(%s #%d)\n", lvl_prefix[level], dsc, file, line);
-#else
- if(custom_print_cb) custom_print_cb(level, file, line, dsc);
-#endif
- }
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-#endif /*LV_USE_LOG*/
diff --git a/src/libs/lvgl/src/lv_misc/lv_log.h b/src/libs/lvgl/src/lv_misc/lv_log.h
deleted file mode 100644
index 62c613b4..00000000
--- a/src/libs/lvgl/src/lv_misc/lv_log.h
+++ /dev/null
@@ -1,144 +0,0 @@
-/**
- * @file lv_log.h
- *
- */
-
-#ifndef LV_LOG_H
-#define LV_LOG_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-#include <stdint.h>
-
-/*********************
- * DEFINES
- *********************/
-
-/*Possible log level. For compatibility declare it independently from `LV_USE_LOG`*/
-
-#define LV_LOG_LEVEL_TRACE 0 /**< A lot of logs to give detailed information*/
-#define LV_LOG_LEVEL_INFO 1 /**< Log important events*/
-#define LV_LOG_LEVEL_WARN 2 /**< Log if something unwanted happened but didn't caused problem*/
-#define LV_LOG_LEVEL_ERROR 3 /**< Only critical issue, when the system may fail*/
-#define LV_LOG_LEVEL_NONE 4 /**< Do not log anything*/
-#define _LV_LOG_LEVEL_NUM 5 /**< Number of log levels */
-
-LV_EXPORT_CONST_INT(LV_LOG_LEVEL_TRACE);
-LV_EXPORT_CONST_INT(LV_LOG_LEVEL_INFO);
-LV_EXPORT_CONST_INT(LV_LOG_LEVEL_WARN);
-LV_EXPORT_CONST_INT(LV_LOG_LEVEL_ERROR);
-LV_EXPORT_CONST_INT(LV_LOG_LEVEL_NONE);
-
-typedef int8_t lv_log_level_t;
-
-#if LV_USE_LOG
-/**********************
- * TYPEDEFS
- **********************/
-
-/**
- * Log print function. Receives "Log Level", "File path", "Line number" and "Description".
- */
-typedef void (*lv_log_print_g_cb_t)(lv_log_level_t level, const char *, uint32_t, const char *);
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Register custom print/write function to call when a log is added.
- * It can format its "File path", "Line number" and "Description" as required
- * and send the formatted log message to a consol or serial port.
- * @param print_cb a function pointer to print a log
- */
-void lv_log_register_print_cb(lv_log_print_g_cb_t print_cb);
-
-/**
- * Add a log
- * @param level the level of log. (From `lv_log_level_t` enum)
- * @param file name of the file when the log added
- * @param line line number in the source code where the log added
- * @param dsc description of the log
- */
-void lv_log_add(lv_log_level_t level, const char * file, int line, const char * dsc);
-
-/**********************
- * MACROS
- **********************/
-
-#if LV_LOG_LEVEL <= LV_LOG_LEVEL_TRACE
-#define LV_LOG_TRACE(dsc) lv_log_add(LV_LOG_LEVEL_TRACE, __FILE__, __LINE__, dsc);
-#else
-#define LV_LOG_TRACE(dsc) \
- { \
- ; \
- }
-#endif
-
-#if LV_LOG_LEVEL <= LV_LOG_LEVEL_INFO
-#define LV_LOG_INFO(dsc) lv_log_add(LV_LOG_LEVEL_INFO, __FILE__, __LINE__, dsc);
-#else
-#define LV_LOG_INFO(dsc) \
- { \
- ; \
- }
-#endif
-
-#if LV_LOG_LEVEL <= LV_LOG_LEVEL_WARN
-#define LV_LOG_WARN(dsc) lv_log_add(LV_LOG_LEVEL_WARN, __FILE__, __LINE__, dsc);
-#else
-#define LV_LOG_WARN(dsc) \
- { \
- ; \
- }
-#endif
-
-#if LV_LOG_LEVEL <= LV_LOG_LEVEL_ERROR
-#define LV_LOG_ERROR(dsc) lv_log_add(LV_LOG_LEVEL_ERROR, __FILE__, __LINE__, dsc);
-#else
-#define LV_LOG_ERROR(dsc) \
- { \
- ; \
- }
-#endif
-
-#else /*LV_USE_LOG*/
-
-/*Do nothing if `LV_USE_LOG 0`*/
-#define lv_log_add(level, file, line, dsc) \
- { \
- ; \
- }
-#define LV_LOG_TRACE(dsc) \
- { \
- ; \
- }
-#define LV_LOG_INFO(dsc) \
- { \
- ; \
- }
-#define LV_LOG_WARN(dsc) \
- { \
- ; \
- }
-#define LV_LOG_ERROR(dsc) \
- { \
- ; \
- }
-#endif /*LV_USE_LOG*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_LOG_H*/
diff --git a/src/libs/lvgl/src/lv_misc/lv_math.c b/src/libs/lvgl/src/lv_misc/lv_math.c
deleted file mode 100644
index f015456e..00000000
--- a/src/libs/lvgl/src/lv_misc/lv_math.c
+++ /dev/null
@@ -1,203 +0,0 @@
-/**
- * @file lv_math.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_math.h"
-#include <stdbool.h>
-#include <stdlib.h>
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static const int16_t sin0_90_table[] = {
- 0, 572, 1144, 1715, 2286, 2856, 3425, 3993, 4560, 5126, 5690, 6252, 6813, 7371, 7927, 8481,
- 9032, 9580, 10126, 10668, 11207, 11743, 12275, 12803, 13328, 13848, 14364, 14876, 15383, 15886, 16383, 16876,
- 17364, 17846, 18323, 18794, 19260, 19720, 20173, 20621, 21062, 21497, 21925, 22347, 22762, 23170, 23571, 23964,
- 24351, 24730, 25101, 25465, 25821, 26169, 26509, 26841, 27165, 27481, 27788, 28087, 28377, 28659, 28932, 29196,
- 29451, 29697, 29934, 30162, 30381, 30591, 30791, 30982, 31163, 31335, 31498, 31650, 31794, 31927, 32051, 32165,
- 32269, 32364, 32448, 32523, 32587, 32642, 32687, 32722, 32747, 32762, 32767};
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Return with sinus of an angle
- * @param angle
- * @return sinus of 'angle'. sin(-90) = -32767, sin(90) = 32767
- */
-int16_t lv_trigo_sin(int16_t angle)
-{
- int16_t ret = 0;
- angle = angle % 360;
-
- if(angle < 0) angle = 360 + angle;
-
- if(angle < 90) {
- ret = sin0_90_table[angle];
- } else if(angle >= 90 && angle < 180) {
- angle = 180 - angle;
- ret = sin0_90_table[angle];
- } else if(angle >= 180 && angle < 270) {
- angle = angle - 180;
- ret = -sin0_90_table[angle];
- } else { /*angle >=270*/
- angle = 360 - angle;
- ret = -sin0_90_table[angle];
- }
-
- return ret;
-}
-
-/**
- * Calculate a value of a Cubic Bezier function.
- * @param t time in range of [0..LV_BEZIER_VAL_MAX]
- * @param u0 start values in range of [0..LV_BEZIER_VAL_MAX]
- * @param u1 control value 1 values in range of [0..LV_BEZIER_VAL_MAX]
- * @param u2 control value 2 in range of [0..LV_BEZIER_VAL_MAX]
- * @param u3 end values in range of [0..LV_BEZIER_VAL_MAX]
- * @return the value calculated from the given parameters in range of [0..LV_BEZIER_VAL_MAX]
- */
-int32_t lv_bezier3(uint32_t t, int32_t u0, int32_t u1, int32_t u2, int32_t u3)
-{
- uint32_t t_rem = 1024 - t;
- uint32_t t_rem2 = (t_rem * t_rem) >> 10;
- uint32_t t_rem3 = (t_rem2 * t_rem) >> 10;
- uint32_t t2 = (t * t) >> 10;
- uint32_t t3 = (t2 * t) >> 10;
-
- uint32_t v1 = ((uint32_t)t_rem3 * u0) >> 10;
- uint32_t v2 = ((uint32_t)3 * t_rem2 * t * u1) >> 20;
- uint32_t v3 = ((uint32_t)3 * t_rem * t2 * u2) >> 20;
- uint32_t v4 = ((uint32_t)t3 * u3) >> 10;
-
- return v1 + v2 + v3 + v4;
-}
-
-/**
- * Calculate the atan2 of a vector.
- * @param x
- * @param y
- * @return the angle in degree calculated from the given parameters in range of [0..360]
- */
-uint16_t lv_atan2(int x, int y)
-{
- // Fast XY vector to integer degree algorithm - Jan 2011 www.RomanBlack.com
- // Converts any XY values including 0 to a degree value that should be
- // within +/- 1 degree of the accurate value without needing
- // large slow trig functions like ArcTan() or ArcCos().
- // NOTE! at least one of the X or Y values must be non-zero!
- // This is the full version, for all 4 quadrants and will generate
- // the angle in integer degrees from 0-360.
- // Any values of X and Y are usable including negative values provided
- // they are between -1456 and 1456 so the 16bit multiply does not overflow.
-
- unsigned char negflag;
- unsigned char tempdegree;
- unsigned char comp;
- unsigned int degree; // this will hold the result
- //signed int x; // these hold the XY vector at the start
- //signed int y; // (and they will be destroyed)
- unsigned int ux;
- unsigned int uy;
-
- // Save the sign flags then remove signs and get XY as unsigned ints
- negflag = 0;
- if(x < 0) {
- negflag += 0x01; // x flag bit
- x = (0 - x); // is now +
- }
- ux = x; // copy to unsigned var before multiply
- if(y < 0) {
- negflag += 0x02; // y flag bit
- y = (0 - y); // is now +
- }
- uy = y; // copy to unsigned var before multiply
-
- // 1. Calc the scaled "degrees"
- if(ux > uy) {
- degree = (uy * 45) / ux; // degree result will be 0-45 range
- negflag += 0x10; // octant flag bit
- } else {
- degree = (ux * 45) / uy; // degree result will be 0-45 range
- }
-
- // 2. Compensate for the 4 degree error curve
- comp = 0;
- tempdegree = degree; // use an unsigned char for speed!
- if(tempdegree > 22) { // if top half of range
- if(tempdegree <= 44) comp++;
- if(tempdegree <= 41) comp++;
- if(tempdegree <= 37) comp++;
- if(tempdegree <= 32) comp++; // max is 4 degrees compensated
- } else { // else is lower half of range
- if(tempdegree >= 2) comp++;
- if(tempdegree >= 6) comp++;
- if(tempdegree >= 10) comp++;
- if(tempdegree >= 15) comp++; // max is 4 degrees compensated
- }
- degree += comp; // degree is now accurate to +/- 1 degree!
-
- // Invert degree if it was X>Y octant, makes 0-45 into 90-45
- if(negflag & 0x10) degree = (90 - degree);
-
- // 3. Degree is now 0-90 range for this quadrant,
- // need to invert it for whichever quadrant it was in
- if(negflag & 0x02) { // if -Y
- if(negflag & 0x01) // if -Y -X
- degree = (180 + degree);
- else // else is -Y +X
- degree = (180 - degree);
- } else { // else is +Y
- if(negflag & 0x01) // if +Y -X
- degree = (360 - degree);
- }
- return degree;
-}
-
-/**
- * Calculate the integer square root of a number.
- * @param num
- * @return square root of 'num'
- */
-uint32_t lv_sqrt(uint32_t num)
-{
- // http://www.codecodex.com/wiki/Calculate_an_integer_square_root#C
- uint32_t root = 0;
- uint32_t place = 0x40000000;
-
- while(place > num) place >>= 2;
- while(place) {
- if(num >= root + place) {
- num -= root + place;
- root += (place << 1);
- }
- root >>= 1;
- place >>= 2;
- }
- return root;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
diff --git a/src/libs/lvgl/src/lv_misc/lv_math.h b/src/libs/lvgl/src/lv_misc/lv_math.h
deleted file mode 100644
index 0f93a7c6..00000000
--- a/src/libs/lvgl/src/lv_misc/lv_math.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/**
- * @file math_base.h
- *
- */
-
-#ifndef LV_MATH_H
-#define LV_MATH_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#include <stdint.h>
-
-/*********************
- * DEFINES
- *********************/
-#define LV_MATH_MIN(a, b) ((a) < (b) ? (a) : (b))
-#define LV_MATH_MAX(a, b) ((a) > (b) ? (a) : (b))
-#define LV_MATH_ABS(x) ((x) > 0 ? (x) : (-(x)))
-
-#define LV_IS_SIGNED(t) (((t)(-1)) < ((t) 0))
-#define LV_UMAX_OF(t) (((0x1ULL << ((sizeof(t) * 8ULL) - 1ULL)) - 1ULL) | (0xFULL << ((sizeof(t) * 8ULL) - 4ULL)))
-#define LV_SMAX_OF(t) (((0x1ULL << ((sizeof(t) * 8ULL) - 1ULL)) - 1ULL) | (0x7ULL << ((sizeof(t) * 8ULL) - 4ULL)))
-#define LV_MAX_OF(t) ((unsigned long) (LV_IS_SIGNED(t) ? LV_SMAX_OF(t) : LV_UMAX_OF(t)))
-
-#define LV_TRIGO_SIN_MAX 32767
-#define LV_TRIGO_SHIFT 15 /**< >> LV_TRIGO_SHIFT to normalize*/
-
-#define LV_BEZIER_VAL_MAX 1024 /**< Max time in Bezier functions (not [0..1] to use integers) */
-#define LV_BEZIER_VAL_SHIFT 10 /**< log2(LV_BEZIER_VAL_MAX): used to normalize up scaled values*/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Return with sinus of an angle
- * @param angle
- * @return sinus of 'angle'. sin(-90) = -32767, sin(90) = 32767
- */
-int16_t lv_trigo_sin(int16_t angle);
-
-/**
- * Calculate a value of a Cubic Bezier function.
- * @param t time in range of [0..LV_BEZIER_VAL_MAX]
- * @param u0 start values in range of [0..LV_BEZIER_VAL_MAX]
- * @param u1 control value 1 values in range of [0..LV_BEZIER_VAL_MAX]
- * @param u2 control value 2 in range of [0..LV_BEZIER_VAL_MAX]
- * @param u3 end values in range of [0..LV_BEZIER_VAL_MAX]
- * @return the value calculated from the given parameters in range of [0..LV_BEZIER_VAL_MAX]
- */
-int32_t lv_bezier3(uint32_t t, int32_t u0, int32_t u1, int32_t u2, int32_t u3);
-
-/**
- * Calculate the atan2 of a vector.
- * @param x
- * @param y
- * @return the angle in degree calculated from the given parameters in range of [0..360]
- */
-uint16_t lv_atan2(int x, int y);
-
-/**
- * Calculate the integer square root of a number.
- * @param num
- * @return square root of 'num'
- */
-uint32_t lv_sqrt(uint32_t num);
-
-/**********************
- * MACROS
- **********************/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif
diff --git a/src/libs/lvgl/src/lv_misc/lv_mem.c b/src/libs/lvgl/src/lv_misc/lv_mem.c
deleted file mode 100644
index 9e18310f..00000000
--- a/src/libs/lvgl/src/lv_misc/lv_mem.c
+++ /dev/null
@@ -1,481 +0,0 @@
-/**
- * @file lv_mem.c
- * General and portable implementation of malloc and free.
- * The dynamic memory monitoring is also supported.
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_mem.h"
-#include "lv_math.h"
-#include <string.h>
-
-#if LV_MEM_CUSTOM != 0
-#include LV_MEM_CUSTOM_INCLUDE
-#endif
-
-/*********************
- * DEFINES
- *********************/
-/*Add memory junk on alloc (0xaa) and free(0xbb) (just for testing purposes)*/
-#ifndef LV_MEM_ADD_JUNK
-#define LV_MEM_ADD_JUNK 0
-#endif
-
-#ifdef LV_ARCH_64
-#define MEM_UNIT uint64_t
-#else
-#define MEM_UNIT uint32_t
-#endif
-
-/**********************
- * TYPEDEFS
- **********************/
-
-#if LV_ENABLE_GC == 0 /*gc custom allocations must not include header*/
-
-/*The size of this union must be 4 bytes (uint32_t)*/
-typedef union
-{
- struct
- {
- MEM_UNIT used : 1; /* 1: if the entry is used*/
- MEM_UNIT d_size : 31; /* Size off the data (1 means 4 bytes)*/
- } s;
- MEM_UNIT header; /* The header (used + d_size)*/
-} lv_mem_header_t;
-
-typedef struct
-{
- lv_mem_header_t header;
- uint8_t first_data; /*First data byte in the allocated data (Just for easily create a pointer)*/
-} lv_mem_ent_t;
-
-#endif /* LV_ENABLE_GC */
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-#if LV_MEM_CUSTOM == 0
-static lv_mem_ent_t * ent_get_next(lv_mem_ent_t * act_e);
-static void * ent_alloc(lv_mem_ent_t * e, size_t size);
-static void ent_trunc(lv_mem_ent_t * e, size_t size);
-#endif
-
-/**********************
- * STATIC VARIABLES
- **********************/
-#if LV_MEM_CUSTOM == 0
-static uint8_t * work_mem;
-#endif
-
-static uint32_t zero_mem; /*Give the address of this variable if 0 byte should be allocated*/
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Initiaiize the dyn_mem module (work memory and other variables)
- */
-void lv_mem_init(void)
-{
-#if LV_MEM_CUSTOM == 0
-
-#if LV_MEM_ADR == 0
- /*Allocate a large array to store the dynamically allocated data*/
- static LV_MEM_ATTR MEM_UNIT work_mem_int[LV_MEM_SIZE / sizeof(MEM_UNIT)];
- work_mem = (uint8_t *)work_mem_int;
-#else
- work_mem = (uint8_t *)LV_MEM_ADR;
-#endif
-
- lv_mem_ent_t * full = (lv_mem_ent_t *)work_mem;
- full->header.s.used = 0;
- /*The total mem size id reduced by the first header and the close patterns */
- full->header.s.d_size = LV_MEM_SIZE - sizeof(lv_mem_header_t);
-#endif
-}
-
-/**
- * Clean up the memory buffer which frees all the allocated memories.
- * @note It work only if `LV_MEM_CUSTOM == 0`
- */
-void lv_mem_deinit(void)
-{
-#if LV_MEM_CUSTOM == 0
- memset(work_mem, 0x00, (LV_MEM_SIZE / sizeof(MEM_UNIT)) * sizeof(MEM_UNIT));
- lv_mem_ent_t * full = (lv_mem_ent_t *)work_mem;
- full->header.s.used = 0;
- /*The total mem size id reduced by the first header and the close patterns */
- full->header.s.d_size = LV_MEM_SIZE - sizeof(lv_mem_header_t);
-#endif
-}
-
-/**
- * Allocate a memory dynamically
- * @param size size of the memory to allocate in bytes
- * @return pointer to the allocated memory
- */
-void * lv_mem_alloc(size_t size)
-{
- if(size == 0) {
- return &zero_mem;
- }
-
-#ifdef LV_ARCH_64
- /*Round the size up to 8*/
- if(size & 0x7) {
- size = size & (~0x7);
- size += 8;
- }
-#else
- /*Round the size up to 4*/
- if(size & 0x3) {
- size = size & (~0x3);
- size += 4;
- }
-#endif
- void * alloc = NULL;
-
-#if LV_MEM_CUSTOM == 0
- /*Use the built-in allocators*/
- lv_mem_ent_t * e = NULL;
-
- /* Search for a appropriate entry*/
- do {
- /* Get the next entry*/
- e = ent_get_next(e);
-
- /*If there is next entry then try to allocate there*/
- if(e != NULL) {
- alloc = ent_alloc(e, size);
- }
- /* End if there is not next entry OR the alloc. is successful*/
- } while(e != NULL && alloc == NULL);
-
-#else
-/*Use custom, user defined malloc function*/
-#if LV_ENABLE_GC == 1 /*gc must not include header*/
- alloc = LV_MEM_CUSTOM_ALLOC(size);
-#else /* LV_ENABLE_GC */
- /*Allocate a header too to store the size*/
- alloc = LV_MEM_CUSTOM_ALLOC(size + sizeof(lv_mem_header_t));
- if(alloc != NULL) {
- ((lv_mem_ent_t *)alloc)->header.s.d_size = size;
- ((lv_mem_ent_t *)alloc)->header.s.used = 1;
-
- alloc = &((lv_mem_ent_t *)alloc)->first_data;
- }
-#endif /* LV_ENABLE_GC */
-#endif /* LV_MEM_CUSTOM */
-
-#if LV_MEM_ADD_JUNK
- if(alloc != NULL) memset(alloc, 0xaa, size);
-#endif
-
- if(alloc == NULL) LV_LOG_WARN("Couldn't allocate memory");
-
- return alloc;
-}
-
-/**
- * Free an allocated data
- * @param data pointer to an allocated memory
- */
-void lv_mem_free(const void * data)
-{
- if(data == &zero_mem) return;
- if(data == NULL) return;
-
-#if LV_MEM_ADD_JUNK
- memset((void *)data, 0xbb, lv_mem_get_size(data));
-#endif
-
-#if LV_ENABLE_GC == 0
- /*e points to the header*/
- lv_mem_ent_t * e = (lv_mem_ent_t *)((uint8_t *)data - sizeof(lv_mem_header_t));
- e->header.s.used = 0;
-#endif
-
-#if LV_MEM_CUSTOM == 0
-#if LV_MEM_AUTO_DEFRAG
- /* Make a simple defrag.
- * Join the following free entries after this*/
- lv_mem_ent_t * e_next;
- e_next = ent_get_next(e);
- while(e_next != NULL) {
- if(e_next->header.s.used == 0) {
- e->header.s.d_size += e_next->header.s.d_size + sizeof(e->header);
- } else {
- break;
- }
- e_next = ent_get_next(e_next);
- }
-#endif
-#else /*Use custom, user defined free function*/
-#if LV_ENABLE_GC == 0
- LV_MEM_CUSTOM_FREE(e);
-#else
- LV_MEM_CUSTOM_FREE((void *)data);
-#endif /*LV_ENABLE_GC*/
-#endif
-}
-
-/**
- * Reallocate a memory with a new size. The old content will be kept.
- * @param data pointer to an allocated memory.
- * Its content will be copied to the new memory block and freed
- * @param new_size the desired new size in byte
- * @return pointer to the new memory
- */
-
-#if LV_ENABLE_GC == 0
-
-void * lv_mem_realloc(void * data_p, size_t new_size)
-{
- /*data_p could be previously freed pointer (in this case it is invalid)*/
- if(data_p != NULL) {
- lv_mem_ent_t * e = (lv_mem_ent_t *)((uint8_t *)data_p - sizeof(lv_mem_header_t));
- if(e->header.s.used == 0) {
- data_p = NULL;
- }
- }
-
- uint32_t old_size = lv_mem_get_size(data_p);
- if(old_size == new_size) return data_p; /*Also avoid reallocating the same memory*/
-
-#if LV_MEM_CUSTOM == 0
- /* Truncate the memory if the new size is smaller. */
- if(new_size < old_size) {
- lv_mem_ent_t * e = (lv_mem_ent_t *)((uint8_t *)data_p - sizeof(lv_mem_header_t));
- ent_trunc(e, new_size);
- return &e->first_data;
- }
-#endif
-
- void * new_p;
- new_p = lv_mem_alloc(new_size);
-
- if(new_p != NULL && data_p != NULL) {
- /*Copy the old data to the new. Use the smaller size*/
- if(old_size != 0) {
- memcpy(new_p, data_p, LV_MATH_MIN(new_size, old_size));
- lv_mem_free(data_p);
- }
- }
-
- if(new_p == NULL) LV_LOG_WARN("Couldn't allocate memory");
-
- return new_p;
-}
-
-#else /* LV_ENABLE_GC */
-
-void * lv_mem_realloc(void * data_p, size_t new_size)
-{
- void * new_p = LV_MEM_CUSTOM_REALLOC(data_p, new_size);
- if(new_p == NULL) LV_LOG_WARN("Couldn't allocate memory");
- return new_p;
-}
-
-#endif /* lv_enable_gc */
-
-/**
- * Join the adjacent free memory blocks
- */
-void lv_mem_defrag(void)
-{
-#if LV_MEM_CUSTOM == 0
- lv_mem_ent_t * e_free;
- lv_mem_ent_t * e_next;
- e_free = ent_get_next(NULL);
-
- while(1) {
- /*Search the next free entry*/
- while(e_free != NULL) {
- if(e_free->header.s.used != 0) {
- e_free = ent_get_next(e_free);
- } else {
- break;
- }
- }
-
- if(e_free == NULL) return;
-
- /*Joint the following free entries to the free*/
- e_next = ent_get_next(e_free);
- while(e_next != NULL) {
- if(e_next->header.s.used == 0) {
- e_free->header.s.d_size += e_next->header.s.d_size + sizeof(e_next->header);
- } else {
- break;
- }
-
- e_next = ent_get_next(e_next);
- }
-
- if(e_next == NULL) return;
-
- /*Continue from the lastly checked entry*/
- e_free = e_next;
- }
-#endif
-}
-
-/**
- * Give information about the work memory of dynamic allocation
- * @param mon_p pointer to a dm_mon_p variable,
- * the result of the analysis will be stored here
- */
-void lv_mem_monitor(lv_mem_monitor_t * mon_p)
-{
- /*Init the data*/
- memset(mon_p, 0, sizeof(lv_mem_monitor_t));
-#if LV_MEM_CUSTOM == 0
- lv_mem_ent_t * e;
- e = NULL;
-
- e = ent_get_next(e);
-
- while(e != NULL) {
- if(e->header.s.used == 0) {
- mon_p->free_cnt++;
- mon_p->free_size += e->header.s.d_size;
- if(e->header.s.d_size > mon_p->free_biggest_size) {
- mon_p->free_biggest_size = e->header.s.d_size;
- }
- } else {
- mon_p->used_cnt++;
- }
-
- e = ent_get_next(e);
- }
- mon_p->total_size = LV_MEM_SIZE;
- mon_p->used_pct = 100 - (100U * mon_p->free_size) / mon_p->total_size;
- mon_p->frag_pct = (uint32_t)mon_p->free_biggest_size * 100U / mon_p->free_size;
- mon_p->frag_pct = 100 - mon_p->frag_pct;
-#endif
-}
-
-/**
- * Give the size of an allocated memory
- * @param data pointer to an allocated memory
- * @return the size of data memory in bytes
- */
-
-#if LV_ENABLE_GC == 0
-
-uint32_t lv_mem_get_size(const void * data)
-{
- if(data == NULL) return 0;
- if(data == &zero_mem) return 0;
-
- lv_mem_ent_t * e = (lv_mem_ent_t *)((uint8_t *)data - sizeof(lv_mem_header_t));
-
- return e->header.s.d_size;
-}
-
-#else /* LV_ENABLE_GC */
-
-uint32_t lv_mem_get_size(const void * data)
-{
- return LV_MEM_CUSTOM_GET_SIZE(data);
-}
-
-#endif /*LV_ENABLE_GC*/
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-#if LV_MEM_CUSTOM == 0
-/**
- * Give the next entry after 'act_e'
- * @param act_e pointer to an entry
- * @return pointer to an entry after 'act_e'
- */
-static lv_mem_ent_t * ent_get_next(lv_mem_ent_t * act_e)
-{
- lv_mem_ent_t * next_e = NULL;
-
- if(act_e == NULL) { /*NULL means: get the first entry*/
- next_e = (lv_mem_ent_t *)work_mem;
- } else { /*Get the next entry */
- uint8_t * data = &act_e->first_data;
- next_e = (lv_mem_ent_t *)&data[act_e->header.s.d_size];
-
- if(&next_e->first_data >= &work_mem[LV_MEM_SIZE]) next_e = NULL;
- }
-
- return next_e;
-}
-
-/**
- * Try to do the real allocation with a given size
- * @param e try to allocate to this entry
- * @param size size of the new memory in bytes
- * @return pointer to the allocated memory or NULL if not enough memory in the entry
- */
-static void * ent_alloc(lv_mem_ent_t * e, size_t size)
-{
- void * alloc = NULL;
-
- /*If the memory is free and big enough then use it */
- if(e->header.s.used == 0 && e->header.s.d_size >= size) {
- /*Truncate the entry to the desired size */
- ent_trunc(e, size),
-
- e->header.s.used = 1;
-
- /*Save the allocated data*/
- alloc = &e->first_data;
- }
-
- return alloc;
-}
-
-/**
- * Truncate the data of entry to the given size
- * @param e Pointer to an entry
- * @param size new size in bytes
- */
-static void ent_trunc(lv_mem_ent_t * e, size_t size)
-{
-#ifdef LV_ARCH_64
- /*Round the size up to 8*/
- if(size & 0x7) {
- size = size & (~0x7);
- size += 8;
- }
-#else
- /*Round the size up to 4*/
- if(size & 0x3) {
- size = size & (~0x3);
- size += 4;
- }
-#endif
-
- /*Don't let empty space only for a header without data*/
- if(e->header.s.d_size == size + sizeof(lv_mem_header_t)) {
- size = e->header.s.d_size;
- }
-
- /* Create the new entry after the current if there is space for it */
- if(e->header.s.d_size != size) {
- uint8_t * e_data = &e->first_data;
- lv_mem_ent_t * after_new_e = (lv_mem_ent_t *)&e_data[size];
- after_new_e->header.s.used = 0;
- after_new_e->header.s.d_size = (uint32_t)e->header.s.d_size - size - sizeof(lv_mem_header_t);
- }
-
- /* Set the new size for the original entry */
- e->header.s.d_size = (uint32_t)size;
-}
-
-#endif
diff --git a/src/libs/lvgl/src/lv_misc/lv_mem.h b/src/libs/lvgl/src/lv_misc/lv_mem.h
deleted file mode 100644
index f7240742..00000000
--- a/src/libs/lvgl/src/lv_misc/lv_mem.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/**
- * @file lv_mem.h
- *
- */
-
-#ifndef LV_MEM_H
-#define LV_MEM_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#include <stdint.h>
-#include <stddef.h>
-#include "lv_log.h"
-#include "lv_types.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**
- * Heap information structure.
- */
-typedef struct
-{
- uint32_t total_size; /**< Total heap size */
- uint32_t free_cnt;
- uint32_t free_size; /**< Size of available memory */
- uint32_t free_biggest_size;
- uint32_t used_cnt;
- uint8_t used_pct; /**< Percentage used */
- uint8_t frag_pct; /**< Amount of fragmentation */
-} lv_mem_monitor_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Initiaize the dyn_mem module (work memory and other variables)
- */
-void lv_mem_init(void);
-
-/**
- * Clean up the memory buffer which frees all the allocated memories.
- * @note It work only if `LV_MEM_CUSTOM == 0`
- */
-void lv_mem_deinit(void);
-
-/**
- * Allocate a memory dynamically
- * @param size size of the memory to allocate in bytes
- * @return pointer to the allocated memory
- */
-void * lv_mem_alloc(size_t size);
-
-/**
- * Free an allocated data
- * @param data pointer to an allocated memory
- */
-void lv_mem_free(const void * data);
-
-/**
- * Reallocate a memory with a new size. The old content will be kept.
- * @param data pointer to an allocated memory.
- * Its content will be copied to the new memory block and freed
- * @param new_size the desired new size in byte
- * @return pointer to the new memory
- */
-void * lv_mem_realloc(void * data_p, size_t new_size);
-
-/**
- * Join the adjacent free memory blocks
- */
-void lv_mem_defrag(void);
-
-/**
- * Give information about the work memory of dynamic allocation
- * @param mon_p pointer to a dm_mon_p variable,
- * the result of the analysis will be stored here
- */
-void lv_mem_monitor(lv_mem_monitor_t * mon_p);
-
-/**
- * Give the size of an allocated memory
- * @param data pointer to an allocated memory
- * @return the size of data memory in bytes
- */
-uint32_t lv_mem_get_size(const void * data);
-
-/**********************
- * MACROS
- **********************/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_MEM_H*/
diff --git a/src/libs/lvgl/src/lv_misc/lv_misc.mk b/src/libs/lvgl/src/lv_misc/lv_misc.mk
deleted file mode 100644
index 67f496ba..00000000
--- a/src/libs/lvgl/src/lv_misc/lv_misc.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-CSRCS += lv_circ.c
-CSRCS += lv_area.c
-CSRCS += lv_task.c
-CSRCS += lv_fs.c
-CSRCS += lv_anim.c
-CSRCS += lv_mem.c
-CSRCS += lv_ll.c
-CSRCS += lv_color.c
-CSRCS += lv_txt.c
-CSRCS += lv_math.c
-CSRCS += lv_log.c
-CSRCS += lv_gc.c
-CSRCS += lv_utils.c
-CSRCS += lv_async.c
-CSRCS += lv_printf.c
-CSRCS += lv_bidi.c
-
-
-DEPPATH += --dep-path $(LVGL_DIR)/lvgl/src/lv_misc
-VPATH += :$(LVGL_DIR)/lvgl/src/lv_misc
-
-CFLAGS += "-I$(LVGL_DIR)/lvgl/src/lv_misc"
diff --git a/src/libs/lvgl/src/lv_misc/lv_printf.c b/src/libs/lvgl/src/lv_misc/lv_printf.c
deleted file mode 100644
index e05f35be..00000000
--- a/src/libs/lvgl/src/lv_misc/lv_printf.c
+++ /dev/null
@@ -1,852 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// \author (c) Marco Paland (info@paland.com)
-// 2014-2019, PALANDesign Hannover, Germany
-//
-// \license The MIT License (MIT)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-//
-// \brief Tiny printf, sprintf and (v)snprintf implementation, optimized for speed on
-// embedded systems with a very limited resources. These routines are thread
-// safe and reentrant!
-// Use this instead of the bloated standard/newlib printf cause these use
-// malloc for printf (and may not be thread safe).
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "lv_printf.h"
-
-#if LV_SPRINTF_CUSTOM == 0
-
-#include <stdbool.h>
-#include <stdint.h>
-
-
-// 'ntoa' conversion buffer size, this must be big enough to hold one converted
-// numeric number including padded zeros (dynamically created on stack)
-// default: 32 byte
-#ifndef PRINTF_NTOA_BUFFER_SIZE
-#define PRINTF_NTOA_BUFFER_SIZE 32U
-#endif
-
-// 'ftoa' conversion buffer size, this must be big enough to hold one converted
-// float number including padded zeros (dynamically created on stack)
-// default: 32 byte
-#ifndef PRINTF_FTOA_BUFFER_SIZE
-#define PRINTF_FTOA_BUFFER_SIZE 32U
-#endif
-
-// support for the floating point type (%f)
-// default: activated
-#ifndef PRINTF_DISABLE_SUPPORT_FLOAT
-#define PRINTF_SUPPORT_FLOAT
-#endif
-
-// support for exponential floating point notation (%e/%g)
-// default: activated
-#ifndef PRINTF_DISABLE_SUPPORT_EXPONENTIAL
-#define PRINTF_SUPPORT_EXPONENTIAL
-#endif
-
-// define the default floating point precision
-// default: 6 digits
-#ifndef PRINTF_DEFAULT_FLOAT_PRECISION
-#define PRINTF_DEFAULT_FLOAT_PRECISION 6U
-#endif
-
-// define the largest float suitable to print with %f
-// default: 1e9
-#ifndef PRINTF_MAX_FLOAT
-#define PRINTF_MAX_FLOAT 1e9
-#endif
-
-// support for the long long types (%llu or %p)
-// default: activated
-#ifndef PRINTF_DISABLE_SUPPORT_LONG_LONG
-#define PRINTF_SUPPORT_LONG_LONG
-#endif
-
-// support for the ptrdiff_t type (%t)
-// ptrdiff_t is normally defined in <stddef.h> as long or long long type
-// default: activated
-#ifndef PRINTF_DISABLE_SUPPORT_PTRDIFF_T
-#define PRINTF_SUPPORT_PTRDIFF_T
-#endif
-
-///////////////////////////////////////////////////////////////////////////////
-
-// internal flag definitions
-#define FLAGS_ZEROPAD (1U << 0U)
-#define FLAGS_LEFT (1U << 1U)
-#define FLAGS_PLUS (1U << 2U)
-#define FLAGS_SPACE (1U << 3U)
-#define FLAGS_HASH (1U << 4U)
-#define FLAGS_UPPERCASE (1U << 5U)
-#define FLAGS_CHAR (1U << 6U)
-#define FLAGS_SHORT (1U << 7U)
-#define FLAGS_LONG (1U << 8U)
-#define FLAGS_LONG_LONG (1U << 9U)
-#define FLAGS_PRECISION (1U << 10U)
-#define FLAGS_ADAPT_EXP (1U << 11U)
-
-
-// import float.h for DBL_MAX
-#if defined(PRINTF_SUPPORT_FLOAT)
-#include <float.h>
-#endif
-
-
-// output function type
-typedef void (*out_fct_type)(char character, void* buffer, size_t idx, size_t maxlen);
-
-
-// wrapper (used as buffer) for output function type
-typedef struct {
- void (*fct)(char character, void* arg);
- void* arg;
-} out_fct_wrap_type;
-
-
-// internal buffer output
-static inline void _out_buffer(char character, void* buffer, size_t idx, size_t maxlen)
-{
- if (idx < maxlen) {
- ((char*)buffer)[idx] = character;
- }
-}
-
-
-// internal null output
-static inline void _out_null(char character, void* buffer, size_t idx, size_t maxlen)
-{
- (void)character; (void)buffer; (void)idx; (void)maxlen;
-}
-
-
-
-// internal secure strlen
-// \return The length of the string (excluding the terminating 0) limited by 'maxsize'
-static inline unsigned int _strnlen_s(const char* str, size_t maxsize)
-{
- const char* s;
- for (s = str; *s && maxsize--; ++s);
- return (unsigned int)(s - str);
-}
-
-
-// internal test if char is a digit (0-9)
-// \return true if char is a digit
-static inline bool _is_digit(char ch)
-{
- return (ch >= '0') && (ch <= '9');
-}
-
-
-// internal ASCII string to unsigned int conversion
-static unsigned int _atoi(const char** str)
-{
- unsigned int i = 0U;
- while (_is_digit(**str)) {
- i = i * 10U + (unsigned int)(*((*str)++) - '0');
- }
- return i;
-}
-
-
-// output the specified string in reverse, taking care of any zero-padding
-static size_t _out_rev(out_fct_type out, char* buffer, size_t idx, size_t maxlen, const char* buf, size_t len, unsigned int width, unsigned int flags)
-{
- const size_t start_idx = idx;
-
- // pad spaces up to given width
- if (!(flags & FLAGS_LEFT) && !(flags & FLAGS_ZEROPAD)) {
- size_t i;
- for (i = len; i < width; i++) {
- out(' ', buffer, idx++, maxlen);
- }
- }
-
- // reverse string
- while (len) {
- out(buf[--len], buffer, idx++, maxlen);
- }
-
- // append pad spaces up to given width
- if (flags & FLAGS_LEFT) {
- while (idx - start_idx < width) {
- out(' ', buffer, idx++, maxlen);
- }
- }
-
- return idx;
-}
-
-
-// internal itoa format
-static size_t _ntoa_format(out_fct_type out, char* buffer, size_t idx, size_t maxlen, char* buf, size_t len, bool negative, unsigned int base, unsigned int prec, unsigned int width, unsigned int flags)
-{
- // pad leading zeros
- if (!(flags & FLAGS_LEFT)) {
- if (width && (flags & FLAGS_ZEROPAD) && (negative || (flags & (FLAGS_PLUS | FLAGS_SPACE)))) {
- width--;
- }
- while ((len < prec) && (len < PRINTF_NTOA_BUFFER_SIZE)) {
- buf[len++] = '0';
- }
- while ((flags & FLAGS_ZEROPAD) && (len < width) && (len < PRINTF_NTOA_BUFFER_SIZE)) {
- buf[len++] = '0';
- }
- }
-
- // handle hash
- if (flags & FLAGS_HASH) {
- if (!(flags & FLAGS_PRECISION) && len && ((len == prec) || (len == width))) {
- len--;
- if (len && (base == 16U)) {
- len--;
- }
- }
- if ((base == 16U) && !(flags & FLAGS_UPPERCASE) && (len < PRINTF_NTOA_BUFFER_SIZE)) {
- buf[len++] = 'x';
- }
- else if ((base == 16U) && (flags & FLAGS_UPPERCASE) && (len < PRINTF_NTOA_BUFFER_SIZE)) {
- buf[len++] = 'X';
- }
- else if ((base == 2U) && (len < PRINTF_NTOA_BUFFER_SIZE)) {
- buf[len++] = 'b';
- }
- if (len < PRINTF_NTOA_BUFFER_SIZE) {
- buf[len++] = '0';
- }
- }
-
- if (len < PRINTF_NTOA_BUFFER_SIZE) {
- if (negative) {
- buf[len++] = '-';
- }
- else if (flags & FLAGS_PLUS) {
- buf[len++] = '+'; // ignore the space if the '+' exists
- }
- else if (flags & FLAGS_SPACE) {
- buf[len++] = ' ';
- }
- }
-
- return _out_rev(out, buffer, idx, maxlen, buf, len, width, flags);
-}
-
-
-// internal itoa for 'long' type
-static size_t _ntoa_long(out_fct_type out, char* buffer, size_t idx, size_t maxlen, unsigned long value, bool negative, unsigned long base, unsigned int prec, unsigned int width, unsigned int flags)
-{
- char buf[PRINTF_NTOA_BUFFER_SIZE];
- size_t len = 0U;
-
- // no hash for 0 values
- if (!value) {
- flags &= ~FLAGS_HASH;
- }
-
- // write if precision != 0 and value is != 0
- if (!(flags & FLAGS_PRECISION) || value) {
- do {
- const char digit = (char)(value % base);
- buf[len++] = digit < 10 ? '0' + digit : (flags & FLAGS_UPPERCASE ? 'A' : 'a') + digit - 10;
- value /= base;
- } while (value && (len < PRINTF_NTOA_BUFFER_SIZE));
- }
-
- return _ntoa_format(out, buffer, idx, maxlen, buf, len, negative, (unsigned int)base, prec, width, flags);
-}
-
-
-// internal itoa for 'long long' type
-#if defined(PRINTF_SUPPORT_LONG_LONG)
-static size_t _ntoa_long_long(out_fct_type out, char* buffer, size_t idx, size_t maxlen, unsigned long long value, bool negative, unsigned long long base, unsigned int prec, unsigned int width, unsigned int flags)
-{
- char buf[PRINTF_NTOA_BUFFER_SIZE];
- size_t len = 0U;
-
- // no hash for 0 values
- if (!value) {
- flags &= ~FLAGS_HASH;
- }
-
- // write if precision != 0 and value is != 0
- if (!(flags & FLAGS_PRECISION) || value) {
- do {
- const char digit = (char)(value % base);
- buf[len++] = digit < 10 ? '0' + digit : (flags & FLAGS_UPPERCASE ? 'A' : 'a') + digit - 10;
- value /= base;
- } while (value && (len < PRINTF_NTOA_BUFFER_SIZE));
- }
-
- return _ntoa_format(out, buffer, idx, maxlen, buf, len, negative, (unsigned int)base, prec, width, flags);
-}
-#endif // PRINTF_SUPPORT_LONG_LONG
-
-
-#if defined(PRINTF_SUPPORT_FLOAT)
-
-#if defined(PRINTF_SUPPORT_EXPONENTIAL)
-// forward declaration so that _ftoa can switch to exp notation for values > PRINTF_MAX_FLOAT
-static size_t _etoa(out_fct_type out, char* buffer, size_t idx, size_t maxlen, double value, unsigned int prec, unsigned int width, unsigned int flags);
-#endif
-
-
-// internal ftoa for fixed decimal floating point
-static size_t _ftoa(out_fct_type out, char* buffer, size_t idx, size_t maxlen, double value, unsigned int prec, unsigned int width, unsigned int flags)
-{
- char buf[PRINTF_FTOA_BUFFER_SIZE];
- size_t len = 0U;
- double diff = 0.0;
-
- // powers of 10
- static const double pow10[] = { 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000 };
-
- // test for special values
- if (value != value)
- return _out_rev(out, buffer, idx, maxlen, "nan", 3, width, flags);
- if (value < -DBL_MAX)
- return _out_rev(out, buffer, idx, maxlen, "fni-", 4, width, flags);
- if (value > DBL_MAX)
- return _out_rev(out, buffer, idx, maxlen, (flags & FLAGS_PLUS) ? "fni+" : "fni", (flags & FLAGS_PLUS) ? 4U : 3U, width, flags);
-
- // test for very large values
- // standard printf behavior is to print EVERY whole number digit -- which could be 100s of characters overflowing your buffers == bad
- if ((value > PRINTF_MAX_FLOAT) || (value < -PRINTF_MAX_FLOAT)) {
-#if defined(PRINTF_SUPPORT_EXPONENTIAL)
- return _etoa(out, buffer, idx, maxlen, value, prec, width, flags);
-#else
- return 0U;
-#endif
- }
-
- // test for negative
- bool negative = false;
- if (value < 0) {
- negative = true;
- value = 0 - value;
- }
-
- // set default precision, if not set explicitly
- if (!(flags & FLAGS_PRECISION)) {
- prec = PRINTF_DEFAULT_FLOAT_PRECISION;
- }
- // limit precision to 9, cause a prec >= 10 can lead to overflow errors
- while ((len < PRINTF_FTOA_BUFFER_SIZE) && (prec > 9U)) {
- buf[len++] = '0';
- prec--;
- }
-
- int whole = (int)value;
- double tmp = (value - whole) * pow10[prec];
- unsigned long frac = (unsigned long)tmp;
- diff = tmp - frac;
-
- if (diff > 0.5) {
- ++frac;
- // handle rollover, e.g. case 0.99 with prec 1 is 1.0
- if (frac >= pow10[prec]) {
- frac = 0;
- ++whole;
- }
- }
- else if (diff < 0.5) {
- }
- else if ((frac == 0U) || (frac & 1U)) {
- // if halfway, round up if odd OR if last digit is 0
- ++frac;
- }
-
- if (prec == 0U) {
- diff = value - (double)whole;
- if ((!(diff < 0.5) || (diff > 0.5)) && (whole & 1)) {
- // exactly 0.5 and ODD, then round up
- // 1.5 -> 2, but 2.5 -> 2
- ++whole;
- }
- }
- else {
- unsigned int count = prec;
- // now do fractional part, as an unsigned number
- while (len < PRINTF_FTOA_BUFFER_SIZE) {
- --count;
- buf[len++] = (char)(48U + (frac % 10U));
- if (!(frac /= 10U)) {
- break;
- }
- }
- // add extra 0s
- while ((len < PRINTF_FTOA_BUFFER_SIZE) && (count-- > 0U)) {
- buf[len++] = '0';
- }
- if (len < PRINTF_FTOA_BUFFER_SIZE) {
- // add decimal
- buf[len++] = '.';
- }
- }
-
- // do whole part, number is reversed
- while (len < PRINTF_FTOA_BUFFER_SIZE) {
- buf[len++] = (char)(48 + (whole % 10));
- if (!(whole /= 10)) {
- break;
- }
- }
-
- // pad leading zeros
- if (!(flags & FLAGS_LEFT) && (flags & FLAGS_ZEROPAD)) {
- if (width && (negative || (flags & (FLAGS_PLUS | FLAGS_SPACE)))) {
- width--;
- }
- while ((len < width) && (len < PRINTF_FTOA_BUFFER_SIZE)) {
- buf[len++] = '0';
- }
- }
-
- if (len < PRINTF_FTOA_BUFFER_SIZE) {
- if (negative) {
- buf[len++] = '-';
- }
- else if (flags & FLAGS_PLUS) {
- buf[len++] = '+'; // ignore the space if the '+' exists
- }
- else if (flags & FLAGS_SPACE) {
- buf[len++] = ' ';
- }
- }
-
- return _out_rev(out, buffer, idx, maxlen, buf, len, width, flags);
-}
-
-
-#if defined(PRINTF_SUPPORT_EXPONENTIAL)
-// internal ftoa variant for exponential floating-point type, contributed by Martijn Jasperse <m.jasperse@gmail.com>
-static size_t _etoa(out_fct_type out, char* buffer, size_t idx, size_t maxlen, double value, unsigned int prec, unsigned int width, unsigned int flags)
-{
- // check for NaN and special values
- if ((value != value) || (value > DBL_MAX) || (value < -DBL_MAX)) {
- return _ftoa(out, buffer, idx, maxlen, value, prec, width, flags);
- }
-
- // determine the sign
- const bool negative = value < 0;
- if (negative) {
- value = -value;
- }
-
- // default precision
- if (!(flags & FLAGS_PRECISION)) {
- prec = PRINTF_DEFAULT_FLOAT_PRECISION;
- }
-
- // determine the decimal exponent
- // based on the algorithm by David Gay (https://www.ampl.com/netlib/fp/dtoa.c)
- union {
- uint64_t U;
- double F;
- } conv;
-
- conv.F = value;
- int exp2 = (int)((conv.U >> 52U) & 0x07FFU) - 1023; // effectively log2
- conv.U = (conv.U & ((1ULL << 52U) - 1U)) | (1023ULL << 52U); // drop the exponent so conv.F is now in [1,2)
- // now approximate log10 from the log2 integer part and an expansion of ln around 1.5
- int expval = (int)(0.1760912590558 + exp2 * 0.301029995663981 + (conv.F - 1.5) * 0.289529654602168);
- // now we want to compute 10^expval but we want to be sure it won't overflow
- exp2 = (int)(expval * 3.321928094887362 + 0.5);
- const double z = expval * 2.302585092994046 - exp2 * 0.6931471805599453;
- const double z2 = z * z;
- conv.U = (uint64_t)(exp2 + 1023) << 52U;
- // compute exp(z) using continued fractions, see https://en.wikipedia.org/wiki/Exponential_function#Continued_fractions_for_ex
- conv.F *= 1 + 2 * z / (2 - z + (z2 / (6 + (z2 / (10 + z2 / 14)))));
- // correct for rounding errors
- if (value < conv.F) {
- expval--;
- conv.F /= 10;
- }
-
- // the exponent format is "%+03d" and largest value is "307", so set aside 4-5 characters
- unsigned int minwidth = ((expval < 100) && (expval > -100)) ? 4U : 5U;
-
- // in "%g" mode, "prec" is the number of *significant figures* not decimals
- if (flags & FLAGS_ADAPT_EXP) {
- // do we want to fall-back to "%f" mode?
- if ((value >= 1e-4) && (value < 1e6)) {
- if ((int)prec > expval) {
- prec = (unsigned)((int)prec - expval - 1);
- }
- else {
- prec = 0;
- }
- flags |= FLAGS_PRECISION; // make sure _ftoa respects precision
- // no characters in exponent
- minwidth = 0U;
- expval = 0;
- }
- else {
- // we use one sigfig for the whole part
- if ((prec > 0) && (flags & FLAGS_PRECISION)) {
- --prec;
- }
- }
- }
-
- // will everything fit?
- unsigned int fwidth = width;
- if (width > minwidth) {
- // we didn't fall-back so subtract the characters required for the exponent
- fwidth -= minwidth;
- } else {
- // not enough characters, so go back to default sizing
- fwidth = 0U;
- }
- if ((flags & FLAGS_LEFT) && minwidth) {
- // if we're padding on the right, DON'T pad the floating part
- fwidth = 0U;
- }
-
- // rescale the float value
- if (expval) {
- value /= conv.F;
- }
-
- // output the floating part
- const size_t start_idx = idx;
- idx = _ftoa(out, buffer, idx, maxlen, negative ? -value : value, prec, fwidth, flags & ~FLAGS_ADAPT_EXP);
-
- // output the exponent part
- if (minwidth) {
- // output the exponential symbol
- out((flags & FLAGS_UPPERCASE) ? 'E' : 'e', buffer, idx++, maxlen);
- // output the exponent value
- idx = _ntoa_long(out, buffer, idx, maxlen, (expval < 0) ? -expval : expval, expval < 0, 10, 0, minwidth-1, FLAGS_ZEROPAD | FLAGS_PLUS);
- // might need to right-pad spaces
- if (flags & FLAGS_LEFT) {
- while (idx - start_idx < width) out(' ', buffer, idx++, maxlen);
- }
- }
- return idx;
-}
-#endif // PRINTF_SUPPORT_EXPONENTIAL
-#endif // PRINTF_SUPPORT_FLOAT
-
-
-// internal vsnprintf
-static int _vsnprintf(out_fct_type out, char* buffer, const size_t maxlen, const char* format, va_list va)
-{
- unsigned int flags, width, precision, n;
- size_t idx = 0U;
-
- if (!buffer) {
- // use null output function
- out = _out_null;
- }
-
- while (*format)
- {
- // format specifier? %[flags][width][.precision][length]
- if (*format != '%') {
- // no
- out(*format, buffer, idx++, maxlen);
- format++;
- continue;
- }
- else {
- // yes, evaluate it
- format++;
- }
-
- // evaluate flags
- flags = 0U;
- do {
- switch (*format) {
- case '0': flags |= FLAGS_ZEROPAD; format++; n = 1U; break;
- case '-': flags |= FLAGS_LEFT; format++; n = 1U; break;
- case '+': flags |= FLAGS_PLUS; format++; n = 1U; break;
- case ' ': flags |= FLAGS_SPACE; format++; n = 1U; break;
- case '#': flags |= FLAGS_HASH; format++; n = 1U; break;
- default : n = 0U; break;
- }
- } while (n);
-
- // evaluate width field
- width = 0U;
- if (_is_digit(*format)) {
- width = _atoi(&format);
- }
- else if (*format == '*') {
- const int w = va_arg(va, int);
- if (w < 0) {
- flags |= FLAGS_LEFT; // reverse padding
- width = (unsigned int)-w;
- }
- else {
- width = (unsigned int)w;
- }
- format++;
- }
-
- // evaluate precision field
- precision = 0U;
- if (*format == '.') {
- flags |= FLAGS_PRECISION;
- format++;
- if (_is_digit(*format)) {
- precision = _atoi(&format);
- }
- else if (*format == '*') {
- const int prec = (int)va_arg(va, int);
- precision = prec > 0 ? (unsigned int)prec : 0U;
- format++;
- }
- }
-
- // evaluate length field
- switch (*format) {
- case 'l' :
- flags |= FLAGS_LONG;
- format++;
- if (*format == 'l') {
- flags |= FLAGS_LONG_LONG;
- format++;
- }
- break;
- case 'h' :
- flags |= FLAGS_SHORT;
- format++;
- if (*format == 'h') {
- flags |= FLAGS_CHAR;
- format++;
- }
- break;
-#if defined(PRINTF_SUPPORT_PTRDIFF_T)
- case 't' :
- flags |= (sizeof(ptrdiff_t) == sizeof(long) ? FLAGS_LONG : FLAGS_LONG_LONG);
- format++;
- break;
-#endif
- case 'j' :
- flags |= (sizeof(intmax_t) == sizeof(long) ? FLAGS_LONG : FLAGS_LONG_LONG);
- format++;
- break;
- case 'z' :
- flags |= (sizeof(size_t) == sizeof(long) ? FLAGS_LONG : FLAGS_LONG_LONG);
- format++;
- break;
- default :
- break;
- }
-
- // evaluate specifier
- switch (*format) {
- case 'd' :
- case 'i' :
- case 'u' :
- case 'x' :
- case 'X' :
- case 'o' :
- case 'b' : {
- // set the base
- unsigned int base;
- if (*format == 'x' || *format == 'X') {
- base = 16U;
- }
- else if (*format == 'o') {
- base = 8U;
- }
- else if (*format == 'b') {
- base = 2U;
- }
- else {
- base = 10U;
- flags &= ~FLAGS_HASH; // no hash for dec format
- }
- // uppercase
- if (*format == 'X') {
- flags |= FLAGS_UPPERCASE;
- }
-
- // no plus or space flag for u, x, X, o, b
- if ((*format != 'i') && (*format != 'd')) {
- flags &= ~(FLAGS_PLUS | FLAGS_SPACE);
- }
-
- // ignore '0' flag when precision is given
- if (flags & FLAGS_PRECISION) {
- flags &= ~FLAGS_ZEROPAD;
- }
-
- // convert the integer
- if ((*format == 'i') || (*format == 'd')) {
- // signed
- if (flags & FLAGS_LONG_LONG) {
-#if defined(PRINTF_SUPPORT_LONG_LONG)
- const long long value = va_arg(va, long long);
- idx = _ntoa_long_long(out, buffer, idx, maxlen, (unsigned long long)(value > 0 ? value : 0 - value), value < 0, base, precision, width, flags);
-#endif
- }
- else if (flags & FLAGS_LONG) {
- const long value = va_arg(va, long);
- idx = _ntoa_long(out, buffer, idx, maxlen, (unsigned long)(value > 0 ? value : 0 - value), value < 0, base, precision, width, flags);
- }
- else {
- const int value = (flags & FLAGS_CHAR) ? (char)va_arg(va, int) : (flags & FLAGS_SHORT) ? (short int)va_arg(va, int) : va_arg(va, int);
- idx = _ntoa_long(out, buffer, idx, maxlen, (unsigned int)(value > 0 ? value : 0 - value), value < 0, base, precision, width, flags);
- }
- }
- else {
- // unsigned
- if (flags & FLAGS_LONG_LONG) {
-#if defined(PRINTF_SUPPORT_LONG_LONG)
- idx = _ntoa_long_long(out, buffer, idx, maxlen, va_arg(va, unsigned long long), false, base, precision, width, flags);
-#endif
- }
- else if (flags & FLAGS_LONG) {
- idx = _ntoa_long(out, buffer, idx, maxlen, va_arg(va, unsigned long), false, base, precision, width, flags);
- }
- else {
- const unsigned int value = (flags & FLAGS_CHAR) ? (unsigned char)va_arg(va, unsigned int) : (flags & FLAGS_SHORT) ? (unsigned short int)va_arg(va, unsigned int) : va_arg(va, unsigned int);
- idx = _ntoa_long(out, buffer, idx, maxlen, value, false, base, precision, width, flags);
- }
- }
- format++;
- break;
- }
-#if defined(PRINTF_SUPPORT_FLOAT)
- case 'f' :
- case 'F' :
- if (*format == 'F') flags |= FLAGS_UPPERCASE;
- idx = _ftoa(out, buffer, idx, maxlen, va_arg(va, double), precision, width, flags);
- format++;
- break;
-#if defined(PRINTF_SUPPORT_EXPONENTIAL)
- case 'e':
- case 'E':
- case 'g':
- case 'G':
- if ((*format == 'g')||(*format == 'G')) flags |= FLAGS_ADAPT_EXP;
- if ((*format == 'E')||(*format == 'G')) flags |= FLAGS_UPPERCASE;
- idx = _etoa(out, buffer, idx, maxlen, va_arg(va, double), precision, width, flags);
- format++;
- break;
-#endif // PRINTF_SUPPORT_EXPONENTIAL
-#endif // PRINTF_SUPPORT_FLOAT
- case 'c' : {
- unsigned int l = 1U;
- // pre padding
- if (!(flags & FLAGS_LEFT)) {
- while (l++ < width) {
- out(' ', buffer, idx++, maxlen);
- }
- }
- // char output
- out((char)va_arg(va, int), buffer, idx++, maxlen);
- // post padding
- if (flags & FLAGS_LEFT) {
- while (l++ < width) {
- out(' ', buffer, idx++, maxlen);
- }
- }
- format++;
- break;
- }
-
- case 's' : {
- const char* p = va_arg(va, char*);
- unsigned int l = _strnlen_s(p, precision ? precision : (size_t)-1);
- // pre padding
- if (flags & FLAGS_PRECISION) {
- l = (l < precision ? l : precision);
- }
- if (!(flags & FLAGS_LEFT)) {
- while (l++ < width) {
- out(' ', buffer, idx++, maxlen);
- }
- }
- // string output
- while ((*p != 0) && (!(flags & FLAGS_PRECISION) || precision--)) {
- out(*(p++), buffer, idx++, maxlen);
- }
- // post padding
- if (flags & FLAGS_LEFT) {
- while (l++ < width) {
- out(' ', buffer, idx++, maxlen);
- }
- }
- format++;
- break;
- }
-
- case 'p' : {
- width = sizeof(void*) * 2U;
- flags |= FLAGS_ZEROPAD | FLAGS_UPPERCASE;
-#if defined(PRINTF_SUPPORT_LONG_LONG)
- const bool is_ll = sizeof(uintptr_t) == sizeof(long long);
- if (is_ll) {
- idx = _ntoa_long_long(out, buffer, idx, maxlen, (uintptr_t)va_arg(va, void*), false, 16U, precision, width, flags);
- }
- else {
-#endif
- idx = _ntoa_long(out, buffer, idx, maxlen, (unsigned long)((uintptr_t)va_arg(va, void*)), false, 16U, precision, width, flags);
-#if defined(PRINTF_SUPPORT_LONG_LONG)
- }
-#endif
- format++;
- break;
- }
-
- case '%' :
- out('%', buffer, idx++, maxlen);
- format++;
- break;
-
- default :
- out(*format, buffer, idx++, maxlen);
- format++;
- break;
- }
- }
-
- // termination
- out((char)0, buffer, idx < maxlen ? idx : maxlen - 1U, maxlen);
-
- // return written chars without terminating \0
- return (int)idx;
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-
-int lv_snprintf(char* buffer, size_t count, const char* format, ...)
-{
- va_list va;
- va_start(va, format);
- const int ret = _vsnprintf(_out_buffer, buffer, count, format, va);
- va_end(va);
- return ret;
-}
-
-int lv_vsnprintf(char* buffer, size_t count, const char* format, va_list va)
-{
- return _vsnprintf(_out_buffer, buffer, count, format, va);
-}
-
-#endif /*LV_SPRINTF_CUSTOM*/
-
diff --git a/src/libs/lvgl/src/lv_misc/lv_printf.h b/src/libs/lvgl/src/lv_misc/lv_printf.h
deleted file mode 100644
index b3b8598d..00000000
--- a/src/libs/lvgl/src/lv_misc/lv_printf.h
+++ /dev/null
@@ -1,75 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// \author (c) Marco Paland (info@paland.com)
-// 2014-2019, PALANDesign Hannover, Germany
-//
-// \license The MIT License (MIT)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-//
-// \brief Tiny printf, sprintf and snprintf implementation, optimized for speed on
-// embedded systems with a very limited resources.
-// Use this instead of bloated standard/newlib printf.
-// These routines are thread safe and reentrant.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _LV_PRINTF_H_
-#define _LV_PRINTF_H_
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_SPRINTF_CUSTOM == 0
-
-#include <stdarg.h>
-#include <stddef.h>
-
-/**
- * Tiny snprintf/vsnprintf implementation
- * \param buffer A pointer to the buffer where to store the formatted string
- * \param count The maximum number of characters to store in the buffer, including a terminating null character
- * \param format A string that specifies the format of the output
- * \param va A value identifying a variable arguments list
- * \return The number of characters that COULD have been written into the buffer, not counting the terminating
- * null character. A value equal or larger than count indicates truncation. Only when the returned value
- * is non-negative and less than count, the string has been completely written.
- */
-int lv_snprintf(char* buffer, size_t count, const char* format, ...);
-int lv_vsnprintf(char* buffer, size_t count, const char* format, va_list va);
-
-#else
-#include LV_SPRINTF_INCLUDE
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif // _PRINTF_H_
diff --git a/src/libs/lvgl/src/lv_misc/lv_task.c b/src/libs/lvgl/src/lv_misc/lv_task.c
deleted file mode 100644
index 5ac36edb..00000000
--- a/src/libs/lvgl/src/lv_misc/lv_task.c
+++ /dev/null
@@ -1,382 +0,0 @@
-/**
- * @file lv_task.c
- * An 'lv_task' is a void (*fp) (void* param) type function which will be called periodically.
- * A priority (5 levels + disable) can be assigned to lv_tasks.
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include <stddef.h>
-#include "lv_task.h"
-#include "../lv_core/lv_debug.h"
-#include "../lv_hal/lv_hal_tick.h"
-#include "lv_gc.h"
-
-#if defined(LV_GC_INCLUDE)
-#include LV_GC_INCLUDE
-#endif /* LV_ENABLE_GC */
-
-/*********************
- * DEFINES
- *********************/
-#define IDLE_MEAS_PERIOD 500 /*[ms]*/
-#define DEF_PRIO LV_TASK_PRIO_MID
-#define DEF_PERIOD 500
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static bool lv_task_exec(lv_task_t * task);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static bool lv_task_run = false;
-static uint8_t idle_last = 0;
-static bool task_deleted;
-static bool task_created;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Init the lv_task module
- */
-void lv_task_core_init(void)
-{
- lv_ll_init(&LV_GC_ROOT(_lv_task_ll), sizeof(lv_task_t));
-
- /*Initially enable the lv_task handling*/
- lv_task_enable(true);
-}
-
-/**
- * Call it periodically to handle lv_tasks.
- */
-LV_ATTRIBUTE_TASK_HANDLER void lv_task_handler(void)
-{
- LV_LOG_TRACE("lv_task_handler started");
-
- /*Avoid concurrent running of the task handler*/
- static bool already_running = false;
- if(already_running) return;
- already_running = true;
-
- static uint32_t idle_period_start = 0;
- static uint32_t handler_start = 0;
- static uint32_t busy_time = 0;
-
- if(lv_task_run == false) {
- already_running = false; /*Release mutex*/
- return;
- }
-
- handler_start = lv_tick_get();
-
- /* Run all task from the highest to the lowest priority
- * If a lower priority task is executed check task again from the highest priority
- * but on the priority of executed tasks don't run tasks before the executed*/
- lv_task_t * task_interrupter = NULL;
- lv_task_t * next;
- bool end_flag;
- do {
- end_flag = true;
- task_deleted = false;
- task_created = false;
- LV_GC_ROOT(_lv_task_act) = lv_ll_get_head(&LV_GC_ROOT(_lv_task_ll));
- while(LV_GC_ROOT(_lv_task_act)) {
- /* The task might be deleted if it runs only once ('once = 1')
- * So get next element until the current is surely valid*/
- next = lv_ll_get_next(&LV_GC_ROOT(_lv_task_ll), LV_GC_ROOT(_lv_task_act));
-
- /*We reach priority of the turned off task. There is nothing more to do.*/
- if(((lv_task_t *)LV_GC_ROOT(_lv_task_act))->prio == LV_TASK_PRIO_OFF) {
- break;
- }
-
- /*Here is the interrupter task. Don't execute it again.*/
- if(LV_GC_ROOT(_lv_task_act) == task_interrupter) {
- task_interrupter = NULL; /*From this point only task after the interrupter comes, so
- the interrupter is not interesting anymore*/
- LV_GC_ROOT(_lv_task_act) = next;
- continue; /*Load the next task*/
- }
-
- /*Just try to run the tasks with highest priority.*/
- if(((lv_task_t *)LV_GC_ROOT(_lv_task_act))->prio == LV_TASK_PRIO_HIGHEST) {
- lv_task_exec(LV_GC_ROOT(_lv_task_act));
- }
- /*Tasks with higher priority than the interrupted shall be run in every case*/
- else if(task_interrupter) {
- if(((lv_task_t *)LV_GC_ROOT(_lv_task_act))->prio > task_interrupter->prio) {
- if(lv_task_exec(LV_GC_ROOT(_lv_task_act))) {
- if(!task_created && !task_deleted) {
- /*Check all tasks again from the highest priority */
- task_interrupter = LV_GC_ROOT(_lv_task_act);
- end_flag = false;
- break;
- }
- }
- }
- }
- /* It is no interrupter task or we already reached it earlier.
- * Just run the remaining tasks*/
- else {
- if(lv_task_exec(LV_GC_ROOT(_lv_task_act))) {
- if(!task_created && !task_deleted) {
- task_interrupter = LV_GC_ROOT(_lv_task_act); /*Check all tasks again from the highest priority */
- end_flag = false;
- break;
- }
- }
- }
-
- /*If a task was created or deleted then this or the next item might be corrupted*/
- if(task_created || task_deleted) {
- task_interrupter = NULL;
- break;
- }
-
- LV_GC_ROOT(_lv_task_act) = next; /*Load the next task*/
- }
- } while(!end_flag);
-
- busy_time += lv_tick_elaps(handler_start);
- uint32_t idle_period_time = lv_tick_elaps(idle_period_start);
- if(idle_period_time >= IDLE_MEAS_PERIOD) {
-
- idle_last = (uint32_t)((uint32_t)busy_time * 100) / IDLE_MEAS_PERIOD; /*Calculate the busy percentage*/
- idle_last = idle_last > 100 ? 0 : 100 - idle_last; /*But we need idle time*/
- busy_time = 0;
- idle_period_start = lv_tick_get();
- }
-
- already_running = false; /*Release the mutex*/
-
- LV_LOG_TRACE("lv_task_handler ready");
-}
-/**
- * Create an "empty" task. It needs to initialzed with at least
- * `lv_task_set_cb` and `lv_task_set_period`
- * @return pointer to the craeted task
- */
-lv_task_t * lv_task_create_basic(void)
-{
- lv_task_t * new_task = NULL;
- lv_task_t * tmp;
-
- /*Create task lists in order of priority from high to low*/
- tmp = lv_ll_get_head(&LV_GC_ROOT(_lv_task_ll));
-
- /*It's the first task*/
- if(NULL == tmp) {
- new_task = lv_ll_ins_head(&LV_GC_ROOT(_lv_task_ll));
- LV_ASSERT_MEM(new_task);
- if(new_task == NULL) return NULL;
- }
- /*Insert the new task to proper place according to its priority*/
- else {
- do {
- if(tmp->prio <= DEF_PRIO) {
- new_task = lv_ll_ins_prev(&LV_GC_ROOT(_lv_task_ll), tmp);
- LV_ASSERT_MEM(new_task);
- if(new_task == NULL) return NULL;
- break;
- }
- tmp = lv_ll_get_next(&LV_GC_ROOT(_lv_task_ll), tmp);
- } while(tmp != NULL);
-
- /*Only too high priority tasks were found. Add the task to the end*/
- if(tmp == NULL) {
- new_task = lv_ll_ins_tail(&LV_GC_ROOT(_lv_task_ll));
- LV_ASSERT_MEM(new_task);
- if(new_task == NULL) return NULL;
- }
- }
-
- new_task->period = DEF_PERIOD;
- new_task->task_cb = NULL;
- new_task->prio = DEF_PRIO;
-
- new_task->once = 0;
- new_task->last_run = lv_tick_get();
-
- new_task->user_data = NULL;
-
- task_created = true;
-
- return new_task;
-}
-
-/**
- * Create a new lv_task
- * @param task_xcb a callback which is the task itself. It will be called periodically.
- * (the 'x' in the argument name indicates that its not a fully generic function because it not follows
- * the `func_name(object, callback, ...)` convention)
- * @param period call period in ms unit
- * @param prio priority of the task (LV_TASK_PRIO_OFF means the task is stopped)
- * @param user_data custom parameter
- * @return pointer to the new task
- */
-lv_task_t * lv_task_create(lv_task_cb_t task_cb, uint32_t period, lv_task_prio_t prio, void * user_data)
-{
- lv_task_t * new_task = lv_task_create_basic();
- LV_ASSERT_MEM(new_task);
- if(new_task == NULL) return NULL;
-
- lv_task_set_cb(new_task, task_cb);
- lv_task_set_period(new_task, period);
- lv_task_set_prio(new_task, prio);
- new_task->user_data = user_data;
-
- return new_task;
-}
-
-/**
- * Set the callback the task (the function to call periodically)
- * @param task pointer to a task
- * @param task_cb teh function to call periodically
- */
-void lv_task_set_cb(lv_task_t * task, lv_task_cb_t task_cb)
-{
- task->task_cb = task_cb;
-}
-
-/**
- * Delete a lv_task
- * @param task pointer to task created by task
- */
-void lv_task_del(lv_task_t * task)
-{
- lv_ll_rem(&LV_GC_ROOT(_lv_task_ll), task);
-
- lv_mem_free(task);
-
- if(LV_GC_ROOT(_lv_task_act) == task) task_deleted = true; /*The active task was deleted*/
-}
-
-/**
- * Set new priority for a lv_task
- * @param task pointer to a lv_task
- * @param prio the new priority
- */
-void lv_task_set_prio(lv_task_t * task, lv_task_prio_t prio)
-{
- if(task->prio == prio) return;
-
- /*Find the tasks with new priority*/
- lv_task_t * i;
- LV_LL_READ(LV_GC_ROOT(_lv_task_ll), i)
- {
- if(i->prio <= prio) {
- if(i != task) lv_ll_move_before(&LV_GC_ROOT(_lv_task_ll), task, i);
- break;
- }
- }
-
- /*There was no such a low priority so far then add the node to the tail*/
- if(i == NULL) {
- lv_ll_move_before(&LV_GC_ROOT(_lv_task_ll), task, NULL);
- }
-
- task->prio = prio;
-}
-
-/**
- * Set new period for a lv_task
- * @param task pointer to a lv_task
- * @param period the new period
- */
-void lv_task_set_period(lv_task_t * task, uint32_t period)
-{
- task->period = period;
-}
-
-/**
- * Make a lv_task ready. It will not wait its period.
- * @param task pointer to a lv_task.
- */
-void lv_task_ready(lv_task_t * task)
-{
- task->last_run = lv_tick_get() - task->period - 1;
-}
-
-/**
- * Delete the lv_task after one call
- * @param task pointer to a lv_task.
- */
-void lv_task_once(lv_task_t * task)
-{
- task->once = 1;
-}
-
-/**
- * Reset a lv_task.
- * It will be called the previously set period milliseconds later.
- * @param task pointer to a lv_task.
- */
-void lv_task_reset(lv_task_t * task)
-{
- task->last_run = lv_tick_get();
-}
-
-/**
- * Enable or disable the whole lv_task handling
- * @param en: true: lv_task handling is running, false: lv_task handling is suspended
- */
-void lv_task_enable(bool en)
-{
- lv_task_run = en;
-}
-
-/**
- * Get idle percentage
- * @return the lv_task idle in percentage
- */
-uint8_t lv_task_get_idle(void)
-{
- return idle_last;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Execute task if its the priority is appropriate
- * @param task pointer to lv_task
- * @return true: execute, false: not executed
- */
-static bool lv_task_exec(lv_task_t * task)
-{
- bool exec = false;
-
- /*Execute if at least 'period' time elapsed*/
- uint32_t elp = lv_tick_elaps(task->last_run);
- if(elp >= task->period) {
- task->last_run = lv_tick_get();
- task_deleted = false;
- task_created = false;
- if(task->task_cb) task->task_cb(task);
-
- /*Delete if it was a one shot lv_task*/
- if(task_deleted == false) { /*The task might be deleted by itself as well*/
- if(task->once != 0) {
- lv_task_del(task);
- }
- }
- exec = true;
- }
-
- return exec;
-}
diff --git a/src/libs/lvgl/src/lv_misc/lv_task.h b/src/libs/lvgl/src/lv_misc/lv_task.h
deleted file mode 100644
index 05ff02b6..00000000
--- a/src/libs/lvgl/src/lv_misc/lv_task.h
+++ /dev/null
@@ -1,177 +0,0 @@
-/**
- * @file lv_task.c
- * An 'lv_task' is a void (*fp) (void* param) type function which will be called periodically.
- * A priority (5 levels + disable) can be assigned to lv_tasks.
- */
-
-#ifndef LV_TASK_H
-#define LV_TASK_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#include <stdint.h>
-#include <stdbool.h>
-#include "lv_mem.h"
-#include "lv_ll.h"
-
-/*********************
- * DEFINES
- *********************/
-#ifndef LV_ATTRIBUTE_TASK_HANDLER
-#define LV_ATTRIBUTE_TASK_HANDLER
-#endif
-/**********************
- * TYPEDEFS
- **********************/
-
-struct _lv_task_t;
-
-/**
- * Tasks execute this type type of functions.
- */
-typedef void (*lv_task_cb_t)(struct _lv_task_t *);
-
-/**
- * Possible priorities for lv_tasks
- */
-enum {
- LV_TASK_PRIO_OFF = 0,
- LV_TASK_PRIO_LOWEST,
- LV_TASK_PRIO_LOW,
- LV_TASK_PRIO_MID,
- LV_TASK_PRIO_HIGH,
- LV_TASK_PRIO_HIGHEST,
- _LV_TASK_PRIO_NUM,
-};
-typedef uint8_t lv_task_prio_t;
-
-/**
- * Descriptor of a lv_task
- */
-typedef struct _lv_task_t
-{
- uint32_t period; /**< How often the task should run */
- uint32_t last_run; /**< Last time the task ran */
- lv_task_cb_t task_cb; /**< Task function */
-
- void * user_data; /**< Custom user data */
-
- uint8_t prio : 3; /**< Task priority */
- uint8_t once : 1; /**< 1: one shot task */
-} lv_task_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Init the lv_task module
- */
-void lv_task_core_init(void);
-
-//! @cond Doxygen_Suppress
-
-/**
- * Call it periodically to handle lv_tasks.
- */
-LV_ATTRIBUTE_TASK_HANDLER void lv_task_handler(void);
-
-//! @endcond
-
-/**
- * Create an "empty" task. It needs to initialzed with at least
- * `lv_task_set_cb` and `lv_task_set_period`
- * @return pointer to the craeted task
- */
-lv_task_t * lv_task_create_basic(void);
-
-/**
- * Create a new lv_task
- * @param task_xcb a callback which is the task itself. It will be called periodically.
- * (the 'x' in the argument name indicates that its not a fully generic function because it not follows
- * the `func_name(object, callback, ...)` convention)
- * @param period call period in ms unit
- * @param prio priority of the task (LV_TASK_PRIO_OFF means the task is stopped)
- * @param user_data custom parameter
- * @return pointer to the new task
- */
-lv_task_t * lv_task_create(lv_task_cb_t task_xcb, uint32_t period, lv_task_prio_t prio, void * user_data);
-
-/**
- * Delete a lv_task
- * @param task pointer to task_cb created by task
- */
-void lv_task_del(lv_task_t * task);
-
-/**
- * Set the callback the task (the function to call periodically)
- * @param task pointer to a task
- * @param task_cb the function to call periodically
- */
-void lv_task_set_cb(lv_task_t * task, lv_task_cb_t task_cb);
-
-/**
- * Set new priority for a lv_task
- * @param task pointer to a lv_task
- * @param prio the new priority
- */
-void lv_task_set_prio(lv_task_t * task, lv_task_prio_t prio);
-
-/**
- * Set new period for a lv_task
- * @param task pointer to a lv_task
- * @param period the new period
- */
-void lv_task_set_period(lv_task_t * task, uint32_t period);
-
-/**
- * Make a lv_task ready. It will not wait its period.
- * @param task pointer to a lv_task.
- */
-void lv_task_ready(lv_task_t * task);
-
-/**
- * Delete the lv_task after one call
- * @param task pointer to a lv_task.
- */
-void lv_task_once(lv_task_t * task);
-
-/**
- * Reset a lv_task.
- * It will be called the previously set period milliseconds later.
- * @param task pointer to a lv_task.
- */
-void lv_task_reset(lv_task_t * task);
-
-/**
- * Enable or disable the whole lv_task handling
- * @param en: true: lv_task handling is running, false: lv_task handling is suspended
- */
-void lv_task_enable(bool en);
-
-/**
- * Get idle percentage
- * @return the lv_task idle in percentage
- */
-uint8_t lv_task_get_idle(void);
-
-/**********************
- * MACROS
- **********************/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif
diff --git a/src/libs/lvgl/src/lv_misc/lv_templ.c b/src/libs/lvgl/src/lv_misc/lv_templ.c
deleted file mode 100644
index c5bb68c0..00000000
--- a/src/libs/lvgl/src/lv_misc/lv_templ.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * @file lv_templ.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/* This typedef exists purely to keep -Wpedantic happy when the file is empty. */
-/* It can be removed. */
-typedef int keep_pedantic_happy;
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-
-/**********************
- * STATIC VARIABLES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
diff --git a/src/libs/lvgl/src/lv_misc/lv_templ.h b/src/libs/lvgl/src/lv_misc/lv_templ.h
deleted file mode 100644
index 1f1b92d6..00000000
--- a/src/libs/lvgl/src/lv_misc/lv_templ.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * @file lv_templ.h
- *
- */
-
-#ifndef LV_TEMPL_H
-#define LV_TEMPL_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_TEMPL_H*/
diff --git a/src/libs/lvgl/src/lv_misc/lv_txt.c b/src/libs/lvgl/src/lv_misc/lv_txt.c
deleted file mode 100644
index 9de132e9..00000000
--- a/src/libs/lvgl/src/lv_misc/lv_txt.c
+++ /dev/null
@@ -1,845 +0,0 @@
-/**
- * @file lv_text.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_txt.h"
-#include "lv_math.h"
-#include "lv_log.h"
-
-/*********************
- * DEFINES
- *********************/
-#define NO_BREAK_FOUND UINT32_MAX
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static inline bool is_break_char(uint32_t letter);
-
-#if LV_TXT_ENC == LV_TXT_ENC_UTF8
-static uint8_t lv_txt_utf8_size(const char * str);
-static uint32_t lv_txt_unicode_to_utf8(uint32_t letter_uni);
-static uint32_t lv_txt_utf8_conv_wc(uint32_t c);
-static uint32_t lv_txt_utf8_next(const char * txt, uint32_t * i);
-static uint32_t lv_txt_utf8_prev(const char * txt, uint32_t * i_start);
-static uint32_t lv_txt_utf8_get_byte_id(const char * txt, uint32_t utf8_id);
-static uint32_t lv_txt_utf8_get_char_id(const char * txt, uint32_t byte_id);
-static uint32_t lv_txt_utf8_get_length(const char * txt);
-#elif LV_TXT_ENC == LV_TXT_ENC_ASCII
-static uint8_t lv_txt_iso8859_1_size(const char * str);
-static uint32_t lv_txt_unicode_to_iso8859_1(uint32_t letter_uni);
-static uint32_t lv_txt_iso8859_1_conv_wc(uint32_t c);
-static uint32_t lv_txt_iso8859_1_next(const char * txt, uint32_t * i);
-static uint32_t lv_txt_iso8859_1_prev(const char * txt, uint32_t * i_start);
-static uint32_t lv_txt_iso8859_1_get_byte_id(const char * txt, uint32_t utf8_id);
-static uint32_t lv_txt_iso8859_1_get_char_id(const char * txt, uint32_t byte_id);
-static uint32_t lv_txt_iso8859_1_get_length(const char * txt);
-#endif
-/**********************
- * STATIC VARIABLES
- **********************/
-
-/**********************
- * GLOBAL VARIABLES
- **********************/
-#if LV_TXT_ENC == LV_TXT_ENC_UTF8
-uint8_t (*lv_txt_encoded_size)(const char *) = lv_txt_utf8_size;
-uint32_t (*lv_txt_unicode_to_encoded)(uint32_t) = lv_txt_unicode_to_utf8;
-uint32_t (*lv_txt_encoded_conv_wc)(uint32_t) = lv_txt_utf8_conv_wc;
-uint32_t (*lv_txt_encoded_next)(const char *, uint32_t *) = lv_txt_utf8_next;
-uint32_t (*lv_txt_encoded_prev)(const char *, uint32_t *) = lv_txt_utf8_prev;
-uint32_t (*lv_txt_encoded_get_byte_id)(const char *, uint32_t) = lv_txt_utf8_get_byte_id;
-uint32_t (*lv_txt_encoded_get_char_id)(const char *, uint32_t) = lv_txt_utf8_get_char_id;
-uint32_t (*lv_txt_get_encoded_length)(const char *) = lv_txt_utf8_get_length;
-#elif LV_TXT_ENC == LV_TXT_ENC_ASCII
-uint8_t (*lv_txt_encoded_size)(const char *) = lv_txt_iso8859_1_size;
-uint32_t (*lv_txt_unicode_to_encoded)(uint32_t) = lv_txt_unicode_to_iso8859_1;
-uint32_t (*lv_txt_encoded_conv_wc)(uint32_t) = lv_txt_iso8859_1_conv_wc;
-uint32_t (*lv_txt_encoded_next)(const char *, uint32_t *) = lv_txt_iso8859_1_next;
-uint32_t (*lv_txt_encoded_prev)(const char *, uint32_t *) = lv_txt_iso8859_1_prev;
-uint32_t (*lv_txt_encoded_get_byte_id)(const char *, uint32_t) = lv_txt_iso8859_1_get_byte_id;
-uint32_t (*lv_txt_encoded_get_char_id)(const char *, uint32_t) = lv_txt_iso8859_1_get_char_id;
-uint32_t (*lv_txt_get_encoded_length)(const char *) = lv_txt_iso8859_1_get_length;
-
-#endif
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Get size of a text
- * @param size_res pointer to a 'point_t' variable to store the result
- * @param text pointer to a text
- * @param font pinter to font of the text
- * @param letter_space letter space of the text
- * @param txt.line_space line space of the text
- * @param flags settings for the text from 'txt_flag_t' enum
- * @param max_width max with of the text (break the lines to fit this size) Set CORD_MAX to avoid
- * line breaks
- */
-void lv_txt_get_size(lv_point_t * size_res, const char * text, const lv_font_t * font, lv_coord_t letter_space,
- lv_coord_t line_space, lv_coord_t max_width, lv_txt_flag_t flag)
-{
- size_res->x = 0;
- size_res->y = 0;
-
- if(text == NULL) return;
- if(font == NULL) return;
-
- if(flag & LV_TXT_FLAG_EXPAND) max_width = LV_COORD_MAX;
-
- uint32_t line_start = 0;
- uint32_t new_line_start = 0;
- lv_coord_t act_line_length;
- uint8_t letter_height = lv_font_get_line_height(font);
-
- /*Calc. the height and longest line*/
- while(text[line_start] != '\0') {
- new_line_start += lv_txt_get_next_line(&text[line_start], font, letter_space, max_width, flag);
-
- if ((unsigned long)size_res->y + (unsigned long)letter_height + (unsigned long)line_space > LV_MAX_OF(lv_coord_t)) {
- LV_LOG_WARN("lv_txt_get_size: integer overflow while calculating text height");
- return;
- } else {
- size_res->y += letter_height;
- size_res->y += line_space;
- }
-
- /*Calculate the the longest line*/
- act_line_length = lv_txt_get_width(&text[line_start], new_line_start - line_start, font, letter_space, flag);
-
- size_res->x = LV_MATH_MAX(act_line_length, size_res->x);
- line_start = new_line_start;
- }
-
- /*Make the text one line taller if the last character is '\n' or '\r'*/
- if((line_start != 0) && (text[line_start - 1] == '\n' || text[line_start - 1] == '\r')) {
- size_res->y += letter_height + line_space;
- }
-
- /*Correction with the last line space or set the height manually if the text is empty*/
- if(size_res->y == 0)
- size_res->y = letter_height;
- else
- size_res->y -= line_space;
-}
-
-/**
- * Get the next word of text. A word is delimited by break characters.
- *
- * If the word cannot fit in the max_width space, obey LV_TXT_LINE_BREAK_LONG_* rules.
- *
- * If the next word cannot fit anything, return 0.
- *
- * If the first character is a break character, returns the next index.
- *
- * Example calls from lv_txt_get_next_line() assuming sufficent max_width and
- * txt = "Test text\n"
- * 0123456789
- *
- * Calls would be as follows:
- * 1. Return i=4, pointing at breakchar ' ', for the string "Test"
- * 2. Return i=5, since i=4 was a breakchar.
- * 3. Return i=9, pointing at breakchar '\n'
- * 4. Parenting lv_txt_get_next_line() would detect subsequent '\0'
- *
- * TODO: Returned word_w_ptr may overestimate the returned word's width when
- * max_width is reached. In current usage, this has no impact.
- *
- * @param txt a '\0' terminated string
- * @param font pointer to a font
- * @param letter_space letter space
- * @param max_width max with of the text (break the lines to fit this size) Set CORD_MAX to avoid line breaks
- * @param flags settings for the text from 'txt_flag_type' enum
- * @param[out] word_w_ptr width (in pixels) of the parsed word. May be NULL.
- * @param force Force return the fraction of the word that can fit in the provided space.
- * @return the index of the first char of the next word (in byte index not letter index. With UTF-8 they are different)
- */
-static uint16_t lv_txt_get_next_word(const char * txt, const lv_font_t * font,
- lv_coord_t letter_space, lv_coord_t max_width,
- lv_txt_flag_t flag, uint32_t *word_w_ptr, lv_txt_cmd_state_t * cmd_state, bool force)
-{
- if(txt == NULL || txt[0] == '\0') return 0;
- if(font == NULL) return 0;
-
- if(flag & LV_TXT_FLAG_EXPAND) max_width = LV_COORD_MAX;
-
- uint32_t i = 0, i_next = 0, i_next_next = 0; /* Iterating index into txt */
- uint32_t letter = 0; /* Letter at i */
- uint32_t letter_next = 0; /* Letter at i_next */
- lv_coord_t letter_w;
- lv_coord_t cur_w = 0; /* Pixel Width of transversed string */
- uint32_t word_len = 0; /* Number of characters in the transversed word */
- uint32_t break_index = NO_BREAK_FOUND; /* only used for "long" words */
- uint32_t break_letter_count = 0; /* Number of characters up to the long word break point */
-
- letter = lv_txt_encoded_next(txt, &i_next);
- i_next_next = i_next;
-
- /* Obtain the full word, regardless if it fits or not in max_width */
- while(txt[i] != '\0') {
- letter_next = lv_txt_encoded_next(txt, &i_next_next);
- word_len++;
-
- /*Handle the recolor command*/
- if((flag & LV_TXT_FLAG_RECOLOR) != 0) {
- if(lv_txt_is_cmd(cmd_state, letter) != false) {
- i = i_next;
- i_next = i_next_next;
- letter = letter_next;
- continue; /*Skip the letter is it is part of a command*/
- }
- }
-
- letter_w = lv_font_get_glyph_width(font, letter, letter_next);
- cur_w += letter_w;
-
- if(letter_w > 0) {
- cur_w += letter_space;
- }
-
- /* Test if this character fits within max_width */
- if(break_index == NO_BREAK_FOUND && (cur_w - letter_space) > max_width) {
- break_index = i;
- break_letter_count = word_len - 1;
- /* break_index is now pointing at the character that doesn't fit */
- }
-
- /*Check for new line chars and breakchars*/
- if(letter == '\n' || letter == '\r' || is_break_char(letter)) {
- /* Update the output width on the first character if it fits.
- * Must do this here incase first letter is a break character. */
- if(i == 0 && break_index == NO_BREAK_FOUND && word_w_ptr != NULL) *word_w_ptr = cur_w;
- word_len--;
- break;
- }
-
- /* Update the output width */
- if( word_w_ptr != NULL && break_index == NO_BREAK_FOUND ) *word_w_ptr = cur_w;
-
-
- i = i_next;
- i_next = i_next_next;
- letter = letter_next;
- }
-
- /* Entire Word fits in the provided space */
- if( break_index == NO_BREAK_FOUND ) {
- if( word_len == 0 || (letter == '\r' && letter_next == '\n') ) i = i_next;
- return i;
- }
-
-#if LV_TXT_LINE_BREAK_LONG_LEN > 0
- /* Word doesn't fit in provided space, but isn't "long" */
- if(word_len < LV_TXT_LINE_BREAK_LONG_LEN) {
- if( force ) return break_index;
- if(word_w_ptr != NULL) *word_w_ptr = 0; /* Return no word */
- return 0;
- }
-
- /* Word is "long," but insufficient amounts can fit in provided space */
- if(break_letter_count < LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN) {
- if( force ) return break_index;
- if(word_w_ptr != NULL) *word_w_ptr = 0;
- return 0;
- }
-
- /* Word is a "long", but letters may need to be better distributed */
- {
- i = break_index;
- int32_t n_move = LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN - (word_len - break_letter_count);
- /* Move pointer "i" backwards */
- for(;n_move>0; n_move--){
- lv_txt_encoded_prev(txt, &i);
- // TODO: it would be appropriate to update the returned word width here
- // However, in current usage, this doesn't impact anything.
- }
- }
- return i;
-#else
- if( force ) return break_index;
- if(word_w_ptr != NULL) *word_w_ptr = 0; /* Return no word */
- (void) break_letter_count;
- return 0;
-#endif
-}
-
-/**
- * Get the next line of text. Check line length and break chars too.
- *
- * A line of txt includes the \n character.
- *
- * @param txt a '\0' terminated string
- * @param font pointer to a font
- * @param letter_space letter space
- * @param max_width max with of the text (break the lines to fit this size) Set CORD_MAX to avoid line breaks
- * @param flags settings for the text from 'txt_flag_type' enum
- * @return the index of the first char of the new line (in byte index not letter index. With UTF-8 they are different)
- */
-uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font,
- lv_coord_t letter_space, lv_coord_t max_width, lv_txt_flag_t flag)
-{
- if(txt == NULL) return 0;
- if(font == NULL) return 0;
-
- if(flag & LV_TXT_FLAG_EXPAND) max_width = LV_COORD_MAX;
- lv_txt_cmd_state_t cmd_state = LV_TXT_CMD_STATE_WAIT;
- uint32_t i = 0; /* Iterating index into txt */
-
- while(txt[i] != '\0' && max_width > 0) {
- uint32_t word_w = 0;
- uint32_t advance = lv_txt_get_next_word(&txt[i], font, letter_space, max_width, flag, &word_w, &cmd_state, i==0);
- max_width -= word_w;
-
- if( advance == 0 ){
- if(i == 0) lv_txt_encoded_next(txt, &i); // prevent inf loops
- break;
- }
-
- i += advance;
-
- if(txt[0] == '\n' || txt[0] == '\r') break;
-
- if(txt[i] == '\n' || txt[i] == '\r'){
- i++; /* Include the following newline in the current line */
- break;
- }
-
- }
-
- /* Always step at least one to avoid infinite loops */
- if(i == 0) {
- lv_txt_encoded_next(txt, &i);
- }
-
- return i;
-}
-
-/**
- * Give the length of a text with a given font
- * @param txt a '\0' terminate string
- * @param length length of 'txt' in byte count and not characters (Á is 1 character but 2 bytes in
- * UTF-8)
- * @param font pointer to a font
- * @param letter_space letter space
- * @param flags settings for the text from 'txt_flag_t' enum
- * @return length of a char_num long text
- */
-lv_coord_t lv_txt_get_width(const char * txt, uint16_t length, const lv_font_t * font, lv_coord_t letter_space,
- lv_txt_flag_t flag)
-{
- if(txt == NULL) return 0;
- if(font == NULL) return 0;
-
- uint32_t i = 0;
- lv_coord_t width = 0;
- lv_txt_cmd_state_t cmd_state = LV_TXT_CMD_STATE_WAIT;
- uint32_t letter;
- uint32_t letter_next;
-
- if(length != 0) {
- while(i < length) {
- letter = lv_txt_encoded_next(txt, &i);
- letter_next = lv_txt_encoded_next(&txt[i], NULL);
- if((flag & LV_TXT_FLAG_RECOLOR) != 0) {
- if(lv_txt_is_cmd(&cmd_state, letter) != false) {
- continue;
- }
- }
-
- lv_coord_t char_width = lv_font_get_glyph_width(font, letter, letter_next);
- if(char_width > 0) {
- width += char_width;
- width += letter_space;
- }
- }
-
- if(width > 0) {
- width -= letter_space; /*Trim the last letter space. Important if the text is center
- aligned */
- }
- }
-
- return width;
-}
-
-/**
- * Check next character in a string and decide if the character is part of the command or not
- * @param state pointer to a txt_cmd_state_t variable which stores the current state of command
- * processing (Initied. to TXT_CMD_STATE_WAIT )
- * @param c the current character
- * @return true: the character is part of a command and should not be written,
- * false: the character should be written
- */
-bool lv_txt_is_cmd(lv_txt_cmd_state_t * state, uint32_t c)
-{
- bool ret = false;
-
- if(c == (uint32_t)LV_TXT_COLOR_CMD[0]) {
- if(*state == LV_TXT_CMD_STATE_WAIT) { /*Start char*/
- *state = LV_TXT_CMD_STATE_PAR;
- ret = true;
- }
- /*Other start char in parameter is escaped cmd. char */
- else if(*state == LV_TXT_CMD_STATE_PAR) {
- *state = LV_TXT_CMD_STATE_WAIT;
- }
- /*Command end */
- else if(*state == LV_TXT_CMD_STATE_IN) {
- *state = LV_TXT_CMD_STATE_WAIT;
- ret = true;
- }
- }
-
- /*Skip the color parameter and wait the space after it*/
- if(*state == LV_TXT_CMD_STATE_PAR) {
- if(c == ' ') {
- *state = LV_TXT_CMD_STATE_IN; /*After the parameter the text is in the command*/
- }
- ret = true;
- }
-
- return ret;
-}
-
-/**
- * Insert a string into an other
- * @param txt_buf the original text (must be big enough for the result text)
- * @param pos position to insert. Expressed in character index and not byte index (Different in
- * UTF-8) 0: before the original text, 1: after the first char etc.
- * @param ins_txt text to insert
- */
-void lv_txt_ins(char * txt_buf, uint32_t pos, const char * ins_txt)
-{
- size_t old_len = strlen(txt_buf);
- size_t ins_len = strlen(ins_txt);
- size_t new_len = ins_len + old_len;
- pos = lv_txt_encoded_get_byte_id(txt_buf, pos); /*Convert to byte index instead of letter index*/
-
- /*Copy the second part into the end to make place to text to insert*/
- size_t i;
- for(i = new_len; i >= pos + ins_len; i--) {
- txt_buf[i] = txt_buf[i - ins_len];
- }
-
- /* Copy the text into the new space*/
- memcpy(txt_buf + pos, ins_txt, ins_len);
-}
-
-/**
- * Delete a part of a string
- * @param txt string to modify
- * @param pos position where to start the deleting (0: before the first char, 1: after the first
- * char etc.)
- * @param len number of characters to delete
- */
-void lv_txt_cut(char * txt, uint32_t pos, uint32_t len)
-{
-
- size_t old_len = strlen(txt);
-
- pos = lv_txt_encoded_get_byte_id(txt, pos); /*Convert to byte index instead of letter index*/
- len = lv_txt_encoded_get_byte_id(&txt[pos], len);
-
- /*Copy the second part into the end to make place to text to insert*/
- uint32_t i;
- for(i = pos; i <= old_len - len; i++) {
- txt[i] = txt[i + len];
- }
-}
-
-#if LV_TXT_ENC == LV_TXT_ENC_UTF8
-/*******************************
- * UTF-8 ENCODER/DECOER
- ******************************/
-
-/**
- * Give the size of an UTF-8 coded character
- * @param str pointer to a character in a string
- * @return length of the UTF-8 character (1,2,3 or 4). O on invalid code
- */
-static uint8_t lv_txt_utf8_size(const char * str)
-{
- if((str[0] & 0x80) == 0)
- return 1;
- else if((str[0] & 0xE0) == 0xC0)
- return 2;
- else if((str[0] & 0xF0) == 0xE0)
- return 3;
- else if((str[0] & 0xF8) == 0xF0)
- return 4;
- return 0; /*If the char was invalid tell it's 1 byte long*/
-}
-
-/**
- * Convert an Unicode letter to UTF-8.
- * @param letter_uni an Unicode letter
- * @return UTF-8 coded character in Little Endian to be compatible with C chars (e.g. 'Á', 'Ű')
- */
-static uint32_t lv_txt_unicode_to_utf8(uint32_t letter_uni)
-{
- if(letter_uni < 128) return letter_uni;
- uint8_t bytes[4];
-
- if(letter_uni < 0x0800) {
- bytes[0] = ((letter_uni >> 6) & 0x1F) | 0xC0;
- bytes[1] = ((letter_uni >> 0) & 0x3F) | 0x80;
- bytes[2] = 0;
- bytes[3] = 0;
- } else if(letter_uni < 0x010000) {
- bytes[0] = ((letter_uni >> 12) & 0x0F) | 0xE0;
- bytes[1] = ((letter_uni >> 6) & 0x3F) | 0x80;
- bytes[2] = ((letter_uni >> 0) & 0x3F) | 0x80;
- bytes[3] = 0;
- } else if(letter_uni < 0x110000) {
- bytes[0] = ((letter_uni >> 18) & 0x07) | 0xF0;
- bytes[1] = ((letter_uni >> 12) & 0x3F) | 0x80;
- bytes[2] = ((letter_uni >> 6) & 0x3F) | 0x80;
- bytes[3] = ((letter_uni >> 0) & 0x3F) | 0x80;
- }
-
- uint32_t * res_p = (uint32_t *)bytes;
- return *res_p;
-}
-
-/**
- * Convert a wide character, e.g. 'Á' little endian to be UTF-8 compatible
- * @param c a wide character or a Little endian number
- * @return `c` in big endian
- */
-static uint32_t lv_txt_utf8_conv_wc(uint32_t c)
-{
- /*Swap the bytes (UTF-8 is big endian, but the MCUs are little endian)*/
- if((c & 0x80) != 0) {
- uint32_t swapped;
- uint8_t c8[4];
- memcpy(c8, &c, 4);
- swapped = (c8[0] << 24) + (c8[1] << 16) + (c8[2] << 8) + (c8[3]);
- uint8_t i;
- for(i = 0; i < 4; i++) {
- if((swapped & 0xFF) == 0)
- swapped = (swapped >> 8); /*Ignore leading zeros (they were in the end originally)*/
- }
- c = swapped;
- }
-
- return c;
-}
-
-/**
- * Decode an UTF-8 character from a string.
- * @param txt pointer to '\0' terminated string
- * @param i start byte index in 'txt' where to start.
- * After call it will point to the next UTF-8 char in 'txt'.
- * NULL to use txt[0] as index
- * @return the decoded Unicode character or 0 on invalid UTF-8 code
- */
-static uint32_t lv_txt_utf8_next(const char * txt, uint32_t * i)
-{
- /* Unicode to UTF-8
- * 00000000 00000000 00000000 0xxxxxxx -> 0xxxxxxx
- * 00000000 00000000 00000yyy yyxxxxxx -> 110yyyyy 10xxxxxx
- * 00000000 00000000 zzzzyyyy yyxxxxxx -> 1110zzzz 10yyyyyy 10xxxxxx
- * 00000000 000wwwzz zzzzyyyy yyxxxxxx -> 11110www 10zzzzzz 10yyyyyy 10xxxxxx
- * */
-
- uint32_t result = 0;
-
- /*Dummy 'i' pointer is required*/
- uint32_t i_tmp = 0;
- if(i == NULL) i = &i_tmp;
-
- /*Normal ASCII*/
- if((txt[*i] & 0x80) == 0) {
- result = txt[*i];
- (*i)++;
- }
- /*Real UTF-8 decode*/
- else {
- /*2 bytes UTF-8 code*/
- if((txt[*i] & 0xE0) == 0xC0) {
- result = (uint32_t)(txt[*i] & 0x1F) << 6;
- (*i)++;
- if((txt[*i] & 0xC0) != 0x80) return 0; /*Invalid UTF-8 code*/
- result += (txt[*i] & 0x3F);
- (*i)++;
- }
- /*3 bytes UTF-8 code*/
- else if((txt[*i] & 0xF0) == 0xE0) {
- result = (uint32_t)(txt[*i] & 0x0F) << 12;
- (*i)++;
-
- if((txt[*i] & 0xC0) != 0x80) return 0; /*Invalid UTF-8 code*/
- result += (uint32_t)(txt[*i] & 0x3F) << 6;
- (*i)++;
-
- if((txt[*i] & 0xC0) != 0x80) return 0; /*Invalid UTF-8 code*/
- result += (txt[*i] & 0x3F);
- (*i)++;
- }
- /*4 bytes UTF-8 code*/
- else if((txt[*i] & 0xF8) == 0xF0) {
- result = (uint32_t)(txt[*i] & 0x07) << 18;
- (*i)++;
-
- if((txt[*i] & 0xC0) != 0x80) return 0; /*Invalid UTF-8 code*/
- result += (uint32_t)(txt[*i] & 0x3F) << 12;
- (*i)++;
-
- if((txt[*i] & 0xC0) != 0x80) return 0; /*Invalid UTF-8 code*/
- result += (uint32_t)(txt[*i] & 0x3F) << 6;
- (*i)++;
-
- if((txt[*i] & 0xC0) != 0x80) return 0; /*Invalid UTF-8 code*/
- result += txt[*i] & 0x3F;
- (*i)++;
- } else {
- (*i)++; /*Not UTF-8 char. Go the next.*/
- }
- }
- return result;
-}
-
-/**
- * Get previous UTF-8 character form a string.
- * @param txt pointer to '\0' terminated string
- * @param i start byte index in 'txt' where to start. After the call it will point to the previous
- * UTF-8 char in 'txt'.
- * @return the decoded Unicode character or 0 on invalid UTF-8 code
- */
-static uint32_t lv_txt_utf8_prev(const char * txt, uint32_t * i)
-{
- uint8_t c_size;
- uint8_t cnt = 0;
-
- /*Try to find a !0 long UTF-8 char by stepping one character back*/
- (*i)--;
- do {
- if(cnt >= 4) return 0; /*No UTF-8 char found before the initial*/
-
- c_size = lv_txt_encoded_size(&txt[*i]);
- if(c_size == 0) {
- if(*i != 0)
- (*i)--;
- else
- return 0;
- }
- cnt++;
- } while(c_size == 0);
-
- uint32_t i_tmp = *i;
- uint32_t letter = lv_txt_encoded_next(txt, &i_tmp); /*Character found, get it*/
-
- return letter;
-}
-
-/**
- * Convert a character index (in an UTF-8 text) to byte index.
- * E.g. in "AÁRT" index of 'R' is 2th char but start at byte 3 because 'Á' is 2 bytes long
- * @param txt a '\0' terminated UTF-8 string
- * @param utf8_id character index
- * @return byte index of the 'utf8_id'th letter
- */
-static uint32_t lv_txt_utf8_get_byte_id(const char * txt, uint32_t utf8_id)
-{
- uint32_t i;
- uint32_t byte_cnt = 0;
- for(i = 0; i < utf8_id; i++) {
- uint8_t c_size = lv_txt_encoded_size(&txt[byte_cnt]);
- byte_cnt += c_size > 0 ? c_size : 1;
- }
-
- return byte_cnt;
-}
-
-/**
- * Convert a byte index (in an UTF-8 text) to character index.
- * E.g. in "AÁRT" index of 'R' is 2th char but start at byte 3 because 'Á' is 2 bytes long
- * @param txt a '\0' terminated UTF-8 string
- * @param byte_id byte index
- * @return character index of the letter at 'byte_id'th position
- */
-static uint32_t lv_txt_utf8_get_char_id(const char * txt, uint32_t byte_id)
-{
- uint32_t i = 0;
- uint32_t char_cnt = 0;
-
- while(i < byte_id) {
- lv_txt_encoded_next(txt, &i); /*'i' points to the next letter so use the prev. value*/
- char_cnt++;
- }
-
- return char_cnt;
-}
-
-/**
- * Get the number of characters (and NOT bytes) in a string. Decode it with UTF-8 if enabled.
- * E.g.: "ÁBC" is 3 characters (but 4 bytes)
- * @param txt a '\0' terminated char string
- * @return number of characters
- */
-static uint32_t lv_txt_utf8_get_length(const char * txt)
-{
- uint32_t len = 0;
- uint32_t i = 0;
-
- while(txt[i] != '\0') {
- lv_txt_encoded_next(txt, &i);
- len++;
- }
-
- return len;
-}
-
-#elif LV_TXT_ENC == LV_TXT_ENC_ASCII
-/*******************************
- * ASCII ENCODER/DECOER
- ******************************/
-
-/**
- * Give the size of an ISO8859-1 coded character
- * @param str pointer to a character in a string
- * @return length of the UTF-8 character (1,2,3 or 4). O on invalid code
- */
-static uint8_t lv_txt_iso8859_1_size(const char * str)
-{
- (void)str; /*Unused*/
- return 1;
-}
-
-/**
- * Convert an Unicode letter to ISO8859-1.
- * @param letter_uni an Unicode letter
- * @return ISO8859-1 coded character in Little Endian to be compatible with C chars (e.g. 'Á', 'Ű')
- */
-static uint32_t lv_txt_unicode_to_iso8859_1(uint32_t letter_uni)
-{
- if(letter_uni < 128)
- return letter_uni;
- else
- return ' ';
-}
-
-/**
- * Convert wide characters to ASCII, however wide characters in ASCII range (e.g. 'A') are ASCII compatible by default.
- * So this function does nothing just returns with `c`.
- * @param c a character, e.g. 'A'
- * @return same as `c`
- */
-static uint32_t lv_txt_iso8859_1_conv_wc(uint32_t c)
-{
- return c;
-}
-
-/**
- * Decode an ISO8859-1 character from a string.
- * @param txt pointer to '\0' terminated string
- * @param i start byte index in 'txt' where to start.
- * After call it will point to the next UTF-8 char in 'txt'.
- * NULL to use txt[0] as index
- * @return the decoded Unicode character or 0 on invalid UTF-8 code
- */
-static uint32_t lv_txt_iso8859_1_next(const char * txt, uint32_t * i)
-{
- if(i == NULL) return txt[1]; /*Get the next char */
-
- uint8_t letter = txt[*i];
- (*i)++;
- return letter;
-}
-
-/**
- * Get previous ISO8859-1 character form a string.
- * @param txt pointer to '\0' terminated string
- * @param i start byte index in 'txt' where to start. After the call it will point to the previous UTF-8 char in 'txt'.
- * @return the decoded Unicode character or 0 on invalid UTF-8 code
- */
-static uint32_t lv_txt_iso8859_1_prev(const char * txt, uint32_t * i)
-{
- if(i == NULL) return *(txt - 1); /*Get the prev. char */
-
- (*i)--;
- uint8_t letter = txt[*i];
-
- return letter;
-}
-
-/**
- * Convert a character index (in an ISO8859-1 text) to byte index.
- * E.g. in "AÁRT" index of 'R' is 2th char but start at byte 3 because 'Á' is 2 bytes long
- * @param txt a '\0' terminated UTF-8 string
- * @param utf8_id character index
- * @return byte index of the 'utf8_id'th letter
- */
-static uint32_t lv_txt_iso8859_1_get_byte_id(const char * txt, uint32_t utf8_id)
-{
- (void)txt; /*Unused*/
- return utf8_id; /*In Non encoded no difference*/
-}
-
-/**
- * Convert a byte index (in an ISO8859-1 text) to character index.
- * E.g. in "AÁRT" index of 'R' is 2th char but start at byte 3 because 'Á' is 2 bytes long
- * @param txt a '\0' terminated UTF-8 string
- * @param byte_id byte index
- * @return character index of the letter at 'byte_id'th position
- */
-static uint32_t lv_txt_iso8859_1_get_char_id(const char * txt, uint32_t byte_id)
-{
- (void)txt; /*Unused*/
- return byte_id; /*In Non encoded no difference*/
-}
-
-/**
- * Get the number of characters (and NOT bytes) in a string. Decode it with UTF-8 if enabled.
- * E.g.: "ÁBC" is 3 characters (but 4 bytes)
- * @param txt a '\0' terminated char string
- * @return number of characters
- */
-static uint32_t lv_txt_iso8859_1_get_length(const char * txt)
-{
- return strlen(txt);
-}
-#else
-
-#error "Invalid character encoding. See `LV_TXT_ENC` in `lv_conf.h`"
-
-#endif
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Test if char is break char or not (a text can broken here or not)
- * @param letter a letter
- * @return false: 'letter' is not break char
- */
-static inline bool is_break_char(uint32_t letter)
-{
- uint8_t i;
- bool ret = false;
-
- /*Compare the letter to TXT_BREAK_CHARS*/
- for(i = 0; LV_TXT_BREAK_CHARS[i] != '\0'; i++) {
- if(letter == (uint32_t)LV_TXT_BREAK_CHARS[i]) {
- ret = true; /*If match then it is break char*/
- break;
- }
- }
-
- return ret;
-}
diff --git a/src/libs/lvgl/src/lv_misc/lv_txt.h b/src/libs/lvgl/src/lv_misc/lv_txt.h
deleted file mode 100644
index 6dbce5d4..00000000
--- a/src/libs/lvgl/src/lv_misc/lv_txt.h
+++ /dev/null
@@ -1,211 +0,0 @@
-/**
- * @file lv_text.h
- *
- */
-
-#ifndef LV_TXT_H
-#define LV_TXT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#include <stdbool.h>
-#include "lv_area.h"
-#include "lv_area.h"
-#include "../lv_font/lv_font.h"
-
-/*********************
- * DEFINES
- *********************/
-#ifndef LV_TXT_COLOR_CMD
-#define LV_TXT_COLOR_CMD "#"
-#endif
-
-#define LV_TXT_ENC_UTF8 1
-#define LV_TXT_ENC_ASCII 2
-
-/**********************
- * TYPEDEFS
- **********************/
-/**
- * Options for text rendering.
- */
-enum {
- LV_TXT_FLAG_NONE = 0x00,
- LV_TXT_FLAG_RECOLOR = 0x01, /**< Enable parsing of recolor command*/
- LV_TXT_FLAG_EXPAND = 0x02, /**< Ignore width to avoid automatic word wrapping*/
- LV_TXT_FLAG_CENTER = 0x04, /**< Align the text to the middle*/
- LV_TXT_FLAG_RIGHT = 0x08, /**< Align the text to the right*/
-};
-typedef uint8_t lv_txt_flag_t;
-
-/**
- * State machine for text renderer. */
-enum {
- LV_TXT_CMD_STATE_WAIT, /**< Waiting for command*/
- LV_TXT_CMD_STATE_PAR, /**< Processing the parameter*/
- LV_TXT_CMD_STATE_IN, /**< Processing the command*/
-};
-typedef uint8_t lv_txt_cmd_state_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Get size of a text
- * @param size_res pointer to a 'point_t' variable to store the result
- * @param text pointer to a text
- * @param font pinter to font of the text
- * @param letter_space letter space of the text
- * @param line_space line space of the text
- * @param flags settings for the text from 'txt_flag_t' enum
- * @param max_width max with of the text (break the lines to fit this size) Set CORD_MAX to avoid
- * line breaks
- */
-void lv_txt_get_size(lv_point_t * size_res, const char * text, const lv_font_t * font, lv_coord_t letter_space,
- lv_coord_t line_space, lv_coord_t max_width, lv_txt_flag_t flag);
-
-/**
- * Get the next line of text. Check line length and break chars too.
- * @param txt a '\0' terminated string
- * @param font pointer to a font
- * @param letter_space letter space
- * @param max_width max with of the text (break the lines to fit this size) Set CORD_MAX to avoid
- * line breaks
- * @param flags settings for the text from 'txt_flag_type' enum
- * @return the index of the first char of the new line (in byte index not letter index. With UTF-8
- * they are different)
- */
-uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font, lv_coord_t letter_space, lv_coord_t max_width,
- lv_txt_flag_t flag);
-
-/**
- * Give the length of a text with a given font
- * @param txt a '\0' terminate string
- * @param length length of 'txt' in byte count and not characters (Á is 1 character but 2 bytes in
- * UTF-8)
- * @param font pointer to a font
- * @param letter_space letter space
- * @param flags settings for the text from 'txt_flag_t' enum
- * @return length of a char_num long text
- */
-lv_coord_t lv_txt_get_width(const char * txt, uint16_t length, const lv_font_t * font, lv_coord_t letter_space,
- lv_txt_flag_t flag);
-
-/**
- * Check next character in a string and decide if te character is part of the command or not
- * @param state pointer to a txt_cmd_state_t variable which stores the current state of command
- * processing
- * @param c the current character
- * @return true: the character is part of a command and should not be written,
- * false: the character should be written
- */
-bool lv_txt_is_cmd(lv_txt_cmd_state_t * state, uint32_t c);
-
-/**
- * Insert a string into an other
- * @param txt_buf the original text (must be big enough for the result text)
- * @param pos position to insert (0: before the original text, 1: after the first char etc.)
- * @param ins_txt text to insert
- */
-void lv_txt_ins(char * txt_buf, uint32_t pos, const char * ins_txt);
-
-/**
- * Delete a part of a string
- * @param txt string to modify
- * @param pos position where to start the deleting (0: before the first char, 1: after the first
- * char etc.)
- * @param len number of characters to delete
- */
-void lv_txt_cut(char * txt, uint32_t pos, uint32_t len);
-
-/***************************************************************
- * GLOBAL FUNCTION POINTERS FOR CAHRACTER ENCODING INTERFACE
- ***************************************************************/
-
-/**
- * Give the size of an encoded character
- * @param str pointer to a character in a string
- * @return length of the encoded character (1,2,3 ...). O in invalid
- */
-extern uint8_t (*lv_txt_encoded_size)(const char *);
-
-/**
- * Convert an Unicode letter to encoded
- * @param letter_uni an Unicode letter
- * @return Encoded character in Little Endian to be compatible with C chars (e.g. 'Á', 'Ü')
- */
-extern uint32_t (*lv_txt_unicode_to_encoded)(uint32_t);
-
-/**
- * Convert a wide character, e.g. 'Á' little endian to be compatible with the encoded format.
- * @param c a wide character
- * @return `c` in the encoded format
- */
-extern uint32_t (*lv_txt_encoded_conv_wc)(uint32_t c);
-
-/**
- * Decode the next encoded character from a string.
- * @param txt pointer to '\0' terminated string
- * @param i start index in 'txt' where to start.
- * After the call it will point to the next encoded char in 'txt'.
- * NULL to use txt[0] as index
- * @return the decoded Unicode character or 0 on invalid data code
- */
-extern uint32_t (*lv_txt_encoded_next)(const char *, uint32_t *);
-
-/**
- * Get the previous encoded character form a string.
- * @param txt pointer to '\0' terminated string
- * @param i_start index in 'txt' where to start. After the call it will point to the previous
- * encoded char in 'txt'.
- * @return the decoded Unicode character or 0 on invalid data
- */
-extern uint32_t (*lv_txt_encoded_prev)(const char *, uint32_t *);
-
-/**
- * Convert a letter index (in an the encoded text) to byte index.
- * E.g. in UTF-8 "AÁRT" index of 'R' is 2 but start at byte 3 because 'Á' is 2 bytes long
- * @param txt a '\0' terminated UTF-8 string
- * @param enc_id letter index
- * @return byte index of the 'enc_id'th letter
- */
-extern uint32_t (*lv_txt_encoded_get_byte_id)(const char *, uint32_t);
-
-/**
- * Convert a byte index (in an encoded text) to character index.
- * E.g. in UTF-8 "AÁRT" index of 'R' is 2 but start at byte 3 because 'Á' is 2 bytes long
- * @param txt a '\0' terminated UTF-8 string
- * @param byte_id byte index
- * @return character index of the letter at 'byte_id'th position
- */
-extern uint32_t (*lv_txt_encoded_get_char_id)(const char *, uint32_t);
-
-/**
- * Get the number of characters (and NOT bytes) in a string.
- * E.g. in UTF-8 "ÁBC" is 3 characters (but 4 bytes)
- * @param txt a '\0' terminated char string
- * @return number of characters
- */
-extern uint32_t (*lv_txt_get_encoded_length)(const char *);
-
-/**********************
- * MACROS
- **********************/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*USE_TXT*/
diff --git a/src/libs/lvgl/src/lv_misc/lv_types.h b/src/libs/lvgl/src/lv_misc/lv_types.h
deleted file mode 100644
index 2c28bca1..00000000
--- a/src/libs/lvgl/src/lv_misc/lv_types.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * @file lv_types.h
- *
- */
-
-#ifndef LV_TYPES_H
-#define LV_TYPES_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-
-/*********************
- * DEFINES
- *********************/
-// Check windows
-#ifdef _WIN64
-#define LV_ARCH_64
-#endif
-
-// Check GCC
-#ifdef __GNUC__
-#if defined(__x86_64__) || defined(__ppc64__)
-#define LV_ARCH_64
-#endif
-#endif
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**
- * LittlevGL error codes.
- */
-enum {
- LV_RES_INV = 0, /*Typically indicates that the object is deleted (become invalid) in the action
- function or an operation was failed*/
- LV_RES_OK, /*The object is valid (no deleted) after the action*/
-};
-typedef uint8_t lv_res_t;
-
-#ifdef LV_ARCH_64
-typedef uint64_t lv_uintptr_t;
-#else
-typedef uint32_t lv_uintptr_t;
-#endif
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_TYPES_H*/
diff --git a/src/libs/lvgl/src/lv_misc/lv_utils.c b/src/libs/lvgl/src/lv_misc/lv_utils.c
deleted file mode 100644
index 3f189560..00000000
--- a/src/libs/lvgl/src/lv_misc/lv_utils.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * @file lv_utils.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include <stdbool.h>
-
-#include "lv_utils.h"
-#include "lv_math.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-
-/**********************
- * STATIC VARIABLES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Convert a number to string
- * @param num a number
- * @param buf pointer to a `char` buffer. The result will be stored here (max 10 elements)
- * @return same as `buf` (just for convenience)
- */
-char * lv_utils_num_to_str(int32_t num, char * buf)
-{
- if(num == 0) {
- buf[0] = '0';
- buf[1] = '\0';
- return buf;
- }
- int8_t digitCount = 0;
- int8_t i = 0;
- if(num < 0) {
- buf[digitCount++] = '-';
- num = LV_MATH_ABS(num);
- ++i;
- }
- while(num) {
- char digit = num % 10;
- buf[digitCount++] = digit + 48;
- num /= 10;
- }
- buf[digitCount] = '\0';
- digitCount--;
- while(digitCount > i) {
- char temp = buf[i];
- buf[i] = buf[digitCount];
- buf[digitCount] = temp;
- digitCount--;
- i++;
- }
- return buf;
-}
-
-/** Searches base[0] to base[n - 1] for an item that matches *key.
- *
- * @note The function cmp must return negative if its first
- * argument (the search key) is less that its second (a table entry),
- * zero if equal, and positive if greater.
- *
- * @note Items in the array must be in ascending order.
- *
- * @param key Pointer to item being searched for
- * @param base Pointer to first element to search
- * @param n Number of elements
- * @param size Size of each element
- * @param cmp Pointer to comparison function (see #lv_font_codeCompare as a comparison function
- * example)
- *
- * @return a pointer to a matching item, or NULL if none exists.
- */
-void * lv_utils_bsearch(const void * key, const void * base, uint32_t n, uint32_t size,
- int32_t (*cmp)(const void * pRef, const void * pElement))
-{
- const char * middle;
- int32_t c;
-
- for(middle = base; n != 0;) {
- middle += (n / 2) * size;
- if((c = (*cmp)(key, middle)) > 0) {
- n = (n / 2) - ((n & 1) == 0);
- base = (middle += size);
- } else if(c < 0) {
- n /= 2;
- middle = base;
- } else {
- return (char *)middle;
- }
- }
- return NULL;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
diff --git a/src/libs/lvgl/src/lv_misc/lv_utils.h b/src/libs/lvgl/src/lv_misc/lv_utils.h
deleted file mode 100644
index 6eed7950..00000000
--- a/src/libs/lvgl/src/lv_misc/lv_utils.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * @file lv_utils.h
- *
- */
-
-#ifndef LV_UTILS_H
-#define LV_UTILS_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#include <stdint.h>
-#include <stddef.h>
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-/**
- * Convert a number to string
- * @param num a number
- * @param buf pointer to a `char` buffer. The result will be stored here (max 10 elements)
- * @return same as `buf` (just for convenience)
- */
-char * lv_utils_num_to_str(int32_t num, char * buf);
-
-/** Searches base[0] to base[n - 1] for an item that matches *key.
- *
- * @note The function cmp must return negative if its first
- * argument (the search key) is less that its second (a table entry),
- * zero if equal, and positive if greater.
- *
- * @note Items in the array must be in ascending order.
- *
- * @param key Pointer to item being searched for
- * @param base Pointer to first element to search
- * @param n Number of elements
- * @param size Size of each element
- * @param cmp Pointer to comparison function (see #lv_font_codeCompare as a comparison function
- * example)
- *
- * @return a pointer to a matching item, or NULL if none exists.
- */
-void * lv_utils_bsearch(const void * key, const void * base, uint32_t n, uint32_t size,
- int32_t (*cmp)(const void * pRef, const void * pElement));
-
-/**********************
- * MACROS
- **********************/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif
diff --git a/src/libs/lvgl/src/lv_objx/lv_arc.c b/src/libs/lvgl/src/lv_objx/lv_arc.c
deleted file mode 100644
index e2146a84..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_arc.c
+++ /dev/null
@@ -1,305 +0,0 @@
-/**
- * @file lv_arc.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_arc.h"
-#if LV_USE_ARC != 0
-
-#include "../lv_core/lv_debug.h"
-#include "../lv_misc/lv_math.h"
-#include "../lv_draw/lv_draw_arc.h"
-#include "../lv_themes/lv_theme.h"
-
-/*********************
- * DEFINES
- *********************/
-#define LV_OBJX_NAME "lv_arc"
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static bool lv_arc_design(lv_obj_t * arc, const lv_area_t * mask, lv_design_mode_t mode);
-static lv_res_t lv_arc_signal(lv_obj_t * arc, lv_signal_t sign, void * param);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_signal_cb_t ancestor_signal;
-static lv_design_cb_t ancestor_design;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Create a arc object
- * @param par pointer to an object, it will be the parent of the new arc
- * @param copy pointer to a arc object, if not NULL then the new object will be copied from it
- * @return pointer to the created arc
- */
-lv_obj_t * lv_arc_create(lv_obj_t * par, const lv_obj_t * copy)
-{
-
- LV_LOG_TRACE("arc create started");
-
- /*Create the ancestor of arc*/
- lv_obj_t * new_arc = lv_obj_create(par, copy);
- LV_ASSERT_MEM(new_arc);
- if(new_arc == NULL) return NULL;
-
- /*Allocate the arc type specific extended data*/
- lv_arc_ext_t * ext = lv_obj_allocate_ext_attr(new_arc, sizeof(lv_arc_ext_t));
- LV_ASSERT_MEM(ext);
- if(ext == NULL) return NULL;
-
- if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_arc);
- if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_cb(new_arc);
-
- /*Initialize the allocated 'ext' */
- ext->angle_start = 45;
- ext->angle_end = 315;
-
- /*The signal and design functions are not copied so set them here*/
- lv_obj_set_signal_cb(new_arc, lv_arc_signal);
- lv_obj_set_design_cb(new_arc, lv_arc_design);
-
- /*Init the new arc arc*/
- if(copy == NULL) {
- /*Set the default styles*/
- lv_theme_t * th = lv_theme_get_current();
- if(th) {
- lv_arc_set_style(new_arc, LV_ARC_STYLE_MAIN, th->style.arc);
- } else {
- lv_arc_set_style(new_arc, LV_ARC_STYLE_MAIN, &lv_style_plain_color);
- }
-
- }
- /*Copy an existing arc*/
- else {
- lv_arc_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
- ext->angle_start = copy_ext->angle_start;
- ext->angle_end = copy_ext->angle_end;
-
- /*Refresh the style with new signal function*/
- lv_obj_refresh_style(new_arc);
- }
-
- LV_LOG_INFO("arc created");
-
- return new_arc;
-}
-
-/*======================
- * Add/remove functions
- *=====================*/
-
-/*
- * New object specific "add" or "remove" functions come here
- */
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set the start and end angles of an arc. 0 deg: bottom, 90 deg: right etc.
- * @param arc pointer to an arc object
- * @param start the start angle [0..360]
- * @param end the end angle [0..360]
- */
-void lv_arc_set_angles(lv_obj_t * arc, uint16_t start, uint16_t end)
-{
- LV_ASSERT_OBJ(arc, LV_OBJX_NAME);
-
- lv_arc_ext_t * ext = lv_obj_get_ext_attr(arc);
-
- if(start > 360) start = 360;
- if(end > 360) end = 360;
-
- ext->angle_start = start;
- ext->angle_end = end;
-
- lv_obj_invalidate(arc);
-}
-
-/**
- * Set a style of a arc.
- * @param arc pointer to arc object
- * @param type which style should be set
- * @param style pointer to a style
- * */
-void lv_arc_set_style(lv_obj_t * arc, lv_arc_style_t type, const lv_style_t * style)
-{
- LV_ASSERT_OBJ(arc, LV_OBJX_NAME);
-
- switch(type) {
- case LV_ARC_STYLE_MAIN: lv_obj_set_style(arc, style); break;
- }
-}
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the start angle of an arc.
- * @param arc pointer to an arc object
- * @return the start angle [0..360]
- */
-uint16_t lv_arc_get_angle_start(lv_obj_t * arc)
-{
- LV_ASSERT_OBJ(arc, LV_OBJX_NAME);
-
- lv_arc_ext_t * ext = lv_obj_get_ext_attr(arc);
-
- return ext->angle_start;
-}
-
-/**
- * Get the end angle of an arc.
- * @param arc pointer to an arc object
- * @return the end angle [0..360]
- */
-uint16_t lv_arc_get_angle_end(lv_obj_t * arc)
-{
- LV_ASSERT_OBJ(arc, LV_OBJX_NAME);
-
- lv_arc_ext_t * ext = lv_obj_get_ext_attr(arc);
-
- return ext->angle_end;
-}
-
-/**
- * Get style of a arc.
- * @param arc pointer to arc object
- * @param type which style should be get
- * @return style pointer to the style
- * */
-const lv_style_t * lv_arc_get_style(const lv_obj_t * arc, lv_arc_style_t type)
-{
- LV_ASSERT_OBJ(arc, LV_OBJX_NAME);
-
- const lv_style_t * style = NULL;
-
- switch(type) {
- case LV_ARC_STYLE_MAIN: style = lv_obj_get_style(arc); break;
- default: style = NULL; break;
- }
-
- return style;
-}
-
-/*=====================
- * Other functions
- *====================*/
-
-/*
- * New object specific "other" functions come here
- */
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Handle the drawing related tasks of the arcs
- * @param arc pointer to an object
- * @param mask the object will be drawn only in this area
- * @param mode LV_DESIGN_COVER_CHK: only check if the object fully covers the 'mask_p' area
- * (return 'true' if yes)
- * LV_DESIGN_DRAW: draw the object (always return 'true')
- * LV_DESIGN_DRAW_POST: drawing after every children are drawn
- * @param return true/false, depends on 'mode'
- */
-static bool lv_arc_design(lv_obj_t * arc, const lv_area_t * mask, lv_design_mode_t mode)
-{
- /*Return false if the object is not covers the mask_p area*/
- if(mode == LV_DESIGN_COVER_CHK) {
- return false;
- }
- /*Draw the object*/
- else if(mode == LV_DESIGN_DRAW_MAIN) {
- lv_arc_ext_t * ext = lv_obj_get_ext_attr(arc);
- const lv_style_t * style = lv_arc_get_style(arc, LV_ARC_STYLE_MAIN);
-
- lv_coord_t r = (LV_MATH_MIN(lv_obj_get_width(arc), lv_obj_get_height(arc))) / 2;
- lv_coord_t x = arc->coords.x1 + lv_obj_get_width(arc) / 2;
- lv_coord_t y = arc->coords.y1 + lv_obj_get_height(arc) / 2;
- lv_opa_t opa_scale = lv_obj_get_opa_scale(arc);
- lv_draw_arc(x, y, r, mask, ext->angle_start, ext->angle_end, style, opa_scale);
-
- /*Draw circle on the ends if enabled */
- if(style->line.rounded) {
- lv_coord_t thick_half = style->line.width / 2;
- lv_coord_t cir_x = ((r - thick_half) * lv_trigo_sin(ext->angle_start) >> LV_TRIGO_SHIFT);
- lv_coord_t cir_y = ((r - thick_half) * lv_trigo_sin(ext->angle_start + 90) >> LV_TRIGO_SHIFT);
-
- lv_style_t cir_style;
- lv_style_copy(&cir_style, &lv_style_plain);
- cir_style.body.grad_color = style->line.color;
- cir_style.body.main_color = cir_style.body.grad_color;
- cir_style.body.radius = LV_RADIUS_CIRCLE;
- lv_area_t cir_area;
- cir_area.x1 = cir_x + x - thick_half;
- cir_area.y1 = cir_y + y - thick_half;
- cir_area.x2 = cir_x + x + thick_half;
- cir_area.y2 = cir_y + y + thick_half;
-
- lv_draw_rect(&cir_area, mask, &cir_style, opa_scale);
-
- cir_x = ((r - thick_half) * lv_trigo_sin(ext->angle_end) >> LV_TRIGO_SHIFT);
- cir_y = ((r - thick_half) * lv_trigo_sin(ext->angle_end + 90) >> LV_TRIGO_SHIFT);
-
- cir_area.x1 = cir_x + x - thick_half;
- cir_area.y1 = cir_y + y - thick_half;
- cir_area.x2 = cir_x + x + thick_half;
- cir_area.y2 = cir_y + y + thick_half;
-
- lv_draw_rect(&cir_area, mask, &cir_style, opa_scale);
- }
-
- }
- /*Post draw when the children are drawn*/
- else if(mode == LV_DESIGN_DRAW_POST) {
- }
-
- return true;
-}
-
-/**
- * Signal function of the arc
- * @param arc pointer to a arc object
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_arc_signal(lv_obj_t * arc, lv_signal_t sign, void * param)
-{
- lv_res_t res;
-
- /* Include the ancient signal function */
- res = ancestor_signal(arc, sign, param);
- if(res != LV_RES_OK) return res;
-
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);
-
- if(sign == LV_SIGNAL_CLEANUP) {
- /*Nothing to cleanup. (No dynamically allocated memory in 'ext')*/
- }
-
- return res;
-}
-
-#endif
diff --git a/src/libs/lvgl/src/lv_objx/lv_arc.h b/src/libs/lvgl/src/lv_objx/lv_arc.h
deleted file mode 100644
index 8cc34d5f..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_arc.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/**
- * @file lv_arc.h
- *
- */
-
-#ifndef LV_ARC_H
-#define LV_ARC_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_ARC != 0
-
-#include "../lv_core/lv_obj.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-/*Data of arc*/
-typedef struct
-{
- /*New data for this type */
- lv_coord_t angle_start;
- lv_coord_t angle_end;
-} lv_arc_ext_t;
-
-/*Styles*/
-enum {
- LV_ARC_STYLE_MAIN,
-};
-typedef uint8_t lv_arc_style_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Create a arc objects
- * @param par pointer to an object, it will be the parent of the new arc
- * @param copy pointer to a arc object, if not NULL then the new object will be copied from it
- * @return pointer to the created arc
- */
-lv_obj_t * lv_arc_create(lv_obj_t * par, const lv_obj_t * copy);
-
-/*======================
- * Add/remove functions
- *=====================*/
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set the start and end angles of an arc. 0 deg: bottom, 90 deg: right etc.
- * @param arc pointer to an arc object
- * @param start the start angle [0..360]
- * @param end the end angle [0..360]
- */
-void lv_arc_set_angles(lv_obj_t * arc, uint16_t start, uint16_t end);
-
-/**
- * Set a style of a arc.
- * @param arc pointer to arc object
- * @param type which style should be set
- * @param style pointer to a style
- * */
-void lv_arc_set_style(lv_obj_t * arc, lv_arc_style_t type, const lv_style_t * style);
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the start angle of an arc.
- * @param arc pointer to an arc object
- * @return the start angle [0..360]
- */
-uint16_t lv_arc_get_angle_start(lv_obj_t * arc);
-
-/**
- * Get the end angle of an arc.
- * @param arc pointer to an arc object
- * @return the end angle [0..360]
- */
-uint16_t lv_arc_get_angle_end(lv_obj_t * arc);
-
-/**
- * Get style of a arc.
- * @param arc pointer to arc object
- * @param type which style should be get
- * @return style pointer to the style
- * */
-const lv_style_t * lv_arc_get_style(const lv_obj_t * arc, lv_arc_style_t type);
-
-/*=====================
- * Other functions
- *====================*/
-
-/**********************
- * MACROS
- **********************/
-
-#endif /*LV_USE_ARC*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_ARC_H*/
diff --git a/src/libs/lvgl/src/lv_objx/lv_bar.c b/src/libs/lvgl/src/lv_objx/lv_bar.c
deleted file mode 100644
index 5faab91e..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_bar.c
+++ /dev/null
@@ -1,548 +0,0 @@
-
-
-/**
- * @file lv_bar.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_bar.h"
-#if LV_USE_BAR != 0
-
-#include "../lv_core/lv_debug.h"
-#include "../lv_draw/lv_draw.h"
-#include "../lv_themes/lv_theme.h"
-#include "../lv_misc/lv_anim.h"
-#include <stdio.h>
-
-/*********************
- * DEFINES
- *********************/
-#define LV_OBJX_NAME "lv_bar"
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static bool lv_bar_design(lv_obj_t * bar, const lv_area_t * mask, lv_design_mode_t mode);
-static lv_res_t lv_bar_signal(lv_obj_t * bar, lv_signal_t sign, void * param);
-
-#if LV_USE_ANIMATION
-static void lv_bar_anim(void * bar, lv_anim_value_t value);
-static void lv_bar_anim_ready(lv_anim_t * a);
-#endif
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_design_cb_t ancestor_design_f;
-static lv_signal_cb_t ancestor_signal;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Create a bar objects
- * @param par pointer to an object, it will be the parent of the new bar
- * @param copy pointer to a bar object, if not NULL then the new object will be copied from it
- * @return pointer to the created bar
- */
-lv_obj_t * lv_bar_create(lv_obj_t * par, const lv_obj_t * copy)
-{
- LV_LOG_TRACE("lv_bar create started");
-
- /*Create the ancestor basic object*/
- lv_obj_t * new_bar = lv_obj_create(par, copy);
- LV_ASSERT_MEM(new_bar);
- if(new_bar == NULL) return NULL;
-
- if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_bar);
- if(ancestor_design_f == NULL) ancestor_design_f = lv_obj_get_design_cb(new_bar);
-
- /*Allocate the object type specific extended data*/
- lv_bar_ext_t * ext = lv_obj_allocate_ext_attr(new_bar, sizeof(lv_bar_ext_t));
- LV_ASSERT_MEM(ext);
- if(ext == NULL) return NULL;
-
- ext->min_value = 0;
- ext->max_value = 100;
- ext->cur_value = 0;
-#if LV_USE_ANIMATION
- ext->anim_time = 200;
- ext->anim_start = 0;
- ext->anim_end = 0;
- ext->anim_state = LV_BAR_ANIM_STATE_INV;
-#endif
- ext->sym = 0;
- ext->style_indic = &lv_style_pretty_color;
-
- lv_obj_set_signal_cb(new_bar, lv_bar_signal);
- lv_obj_set_design_cb(new_bar, lv_bar_design);
-
- /*Init the new bar object*/
- if(copy == NULL) {
- lv_obj_set_click(new_bar, false);
- lv_obj_set_size(new_bar, LV_DPI * 2, LV_DPI / 3);
- lv_bar_set_value(new_bar, ext->cur_value, false);
-
- lv_theme_t * th = lv_theme_get_current();
- if(th) {
- lv_bar_set_style(new_bar, LV_BAR_STYLE_BG, th->style.bar.bg);
- lv_bar_set_style(new_bar, LV_BAR_STYLE_INDIC, th->style.bar.indic);
- } else {
- lv_obj_set_style(new_bar, &lv_style_pretty);
- }
- } else {
- lv_bar_ext_t * ext_copy = lv_obj_get_ext_attr(copy);
- ext->min_value = ext_copy->min_value;
- ext->max_value = ext_copy->max_value;
- ext->cur_value = ext_copy->cur_value;
- ext->style_indic = ext_copy->style_indic;
- ext->sym = ext_copy->sym;
- /*Refresh the style with new signal function*/
- lv_obj_refresh_style(new_bar);
-
- lv_bar_set_value(new_bar, ext->cur_value, false);
- }
-
- LV_LOG_INFO("bar created");
-
- return new_bar;
-}
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set a new value on the bar
- * @param bar pointer to a bar object
- * @param value new value
- * @param anim LV_ANIM_ON: set the value with an animation; LV_ANIM_OFF: change the value immediatelly
- */
-void lv_bar_set_value(lv_obj_t * bar, int16_t value, lv_anim_enable_t anim)
-{
- LV_ASSERT_OBJ(bar, LV_OBJX_NAME);
-
-#if LV_USE_ANIMATION == 0
- anim = false;
-#endif
- lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar);
- if(ext->cur_value == value) return;
-
- int16_t new_value;
- new_value = value > ext->max_value ? ext->max_value : value;
- new_value = new_value < ext->min_value ? ext->min_value : new_value;
-
- if(ext->cur_value == new_value) return;
-
- if(anim == LV_ANIM_OFF) {
- ext->cur_value = new_value;
- lv_obj_invalidate(bar);
- } else {
-#if LV_USE_ANIMATION
- /*No animation in progress -> simply set the values*/
- if(ext->anim_state == LV_BAR_ANIM_STATE_INV) {
- ext->anim_start = ext->cur_value;
- ext->anim_end = new_value;
- }
- /*Animation in progress. Start from the animation end value*/
- else {
- ext->anim_start = ext->anim_end;
- ext->anim_end = new_value;
- }
-
- lv_anim_t a;
- a.var = bar;
- a.start = LV_BAR_ANIM_STATE_START;
- a.end = LV_BAR_ANIM_STATE_END;
- a.exec_cb = (lv_anim_exec_xcb_t)lv_bar_anim;
- a.path_cb = lv_anim_path_linear;
- a.ready_cb = lv_bar_anim_ready;
- a.act_time = 0;
- a.time = ext->anim_time;
- a.playback = 0;
- a.playback_pause = 0;
- a.repeat = 0;
- a.repeat_pause = 0;
-
- lv_anim_create(&a);
-#endif
- }
-}
-
-/**
- * Set minimum and the maximum values of a bar
- * @param bar pointer to the bar object
- * @param min minimum value
- * @param max maximum value
- */
-void lv_bar_set_range(lv_obj_t * bar, int16_t min, int16_t max)
-{
- LV_ASSERT_OBJ(bar, LV_OBJX_NAME);
-
- lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar);
- if(ext->min_value == min && ext->max_value == max) return;
-
- ext->max_value = max;
- ext->min_value = min;
- if(ext->cur_value > max) {
- ext->cur_value = max;
- lv_bar_set_value(bar, ext->cur_value, false);
- }
- if(ext->cur_value < min) {
- ext->cur_value = min;
- lv_bar_set_value(bar, ext->cur_value, false);
- }
- lv_obj_invalidate(bar);
-}
-
-/**
- * Make the bar symmetric to zero. The indicator will grow from zero instead of the minimum
- * position.
- * @param bar pointer to a bar object
- * @param en true: enable disable symmetric behavior; false: disable
- */
-void lv_bar_set_sym(lv_obj_t * bar, bool en)
-{
- LV_ASSERT_OBJ(bar, LV_OBJX_NAME);
-
- lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar);
- ext->sym = en ? 1 : 0;
-}
-
-/**
- * Set the animation time of the bar
- * @param bar pointer to a bar object
- * @param anim_time the animation time in milliseconds.
- */
-void lv_bar_set_anim_time(lv_obj_t * bar, uint16_t anim_time)
-{
- LV_ASSERT_OBJ(bar, LV_OBJX_NAME);
-
-#if LV_USE_ANIMATION
- lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar);
- ext->anim_time = anim_time;
-#else
- (void)bar; /*Unused*/
- (void)anim_time; /*Unused*/
-#endif
-}
-
-/**
- * Set a style of a bar
- * @param bar pointer to a bar object
- * @param type which style should be set
- * @param style pointer to a style
- */
-void lv_bar_set_style(lv_obj_t * bar, lv_bar_style_t type, const lv_style_t * style)
-{
- LV_ASSERT_OBJ(bar, LV_OBJX_NAME);
-
- lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar);
-
- switch(type) {
- case LV_BAR_STYLE_BG: lv_obj_set_style(bar, style); break;
- case LV_BAR_STYLE_INDIC:
- ext->style_indic = style;
- lv_obj_refresh_ext_draw_pad(bar);
- break;
- }
-}
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the value of a bar
- * @param bar pointer to a bar object
- * @return the value of the bar
- */
-int16_t lv_bar_get_value(const lv_obj_t * bar)
-{
- LV_ASSERT_OBJ(bar, LV_OBJX_NAME);
-
- lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar);
- /*If animated tell that it's already at the end value*/
-#if LV_USE_ANIMATION
- if(ext->anim_state != LV_BAR_ANIM_STATE_INV) return ext->anim_end;
-#endif
- /*No animation, simple return the current value*/
- return ext->cur_value;
-}
-
-/**
- * Get the minimum value of a bar
- * @param bar pointer to a bar object
- * @return the minimum value of the bar
- */
-int16_t lv_bar_get_min_value(const lv_obj_t * bar)
-{
- LV_ASSERT_OBJ(bar, LV_OBJX_NAME);
-
- lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar);
- return ext->min_value;
-}
-
-/**
- * Get the maximum value of a bar
- * @param bar pointer to a bar object
- * @return the maximum value of the bar
- */
-int16_t lv_bar_get_max_value(const lv_obj_t * bar)
-{
- LV_ASSERT_OBJ(bar, LV_OBJX_NAME);
-
- lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar);
- return ext->max_value;
-}
-
-/**
- * Get whether the bar is symmetric or not.
- * @param bar pointer to a bar object
- * @return true: symmetric is enabled; false: disable
- */
-bool lv_bar_get_sym(lv_obj_t * bar)
-{
- LV_ASSERT_OBJ(bar, LV_OBJX_NAME);
-
- lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar);
- return ext->sym ? true : false;
-}
-
-/**
- * Get the animation time of the bar
- * @param bar pointer to a bar object
- * @return the animation time in milliseconds.
- */
-uint16_t lv_bar_get_anim_time(lv_obj_t * bar)
-{
- LV_ASSERT_OBJ(bar, LV_OBJX_NAME);
-
-#if LV_USE_ANIMATION
- lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar);
- return ext->anim_time;
-#else
- (void)bar; /*Unused*/
- return 0;
-#endif
-}
-
-/**
- * Get a style of a bar
- * @param bar pointer to a bar object
- * @param type which style should be get
- * @return style pointer to a style
- */
-const lv_style_t * lv_bar_get_style(const lv_obj_t * bar, lv_bar_style_t type)
-{
- LV_ASSERT_OBJ(bar, LV_OBJX_NAME);
-
- const lv_style_t * style = NULL;
- lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar);
-
- switch(type) {
- case LV_BAR_STYLE_BG: style = lv_obj_get_style(bar); break;
- case LV_BAR_STYLE_INDIC: style = ext->style_indic; break;
- default: style = NULL; break;
- }
-
- return style;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Handle the drawing related tasks of the bars
- * @param bar pointer to an object
- * @param mask the object will be drawn only in this area
- * @param mode LV_DESIGN_COVER_CHK: only check if the object fully covers the 'mask_p' area
- * (return 'true' if yes)
- * LV_DESIGN_DRAW: draw the object (always return 'true')
- * LV_DESIGN_DRAW_POST: drawing after every children are drawn
- * @param return true/false, depends on 'mode'
- */
-static bool lv_bar_design(lv_obj_t * bar, const lv_area_t * mask, lv_design_mode_t mode)
-{
- if(mode == LV_DESIGN_COVER_CHK) {
- /*Return false if the object is not covers the mask area*/
- return ancestor_design_f(bar, mask, mode);
- } else if(mode == LV_DESIGN_DRAW_MAIN) {
- lv_opa_t opa_scale = lv_obj_get_opa_scale(bar);
-
-#if LV_USE_GROUP == 0
- ancestor_design_f(bar, mask, mode);
-#else
- /* Draw the borders later if the bar is focused.
- * At value = 100% the indicator can cover to whole background and the focused style won't
- * be visible*/
- if(lv_obj_is_focused(bar)) {
- const lv_style_t * style_bg = lv_bar_get_style(bar, LV_BAR_STYLE_BG);
- lv_style_t style_tmp;
- lv_style_copy(&style_tmp, style_bg);
- style_tmp.body.border.width = 0;
- lv_draw_rect(&bar->coords, mask, &style_tmp, opa_scale);
- } else {
- ancestor_design_f(bar, mask, mode);
- }
-#endif
- lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar);
-
- if(ext->cur_value != ext->min_value || ext->sym
-#if LV_USE_ANIMATION
- || ext->anim_start != LV_BAR_ANIM_STATE_INV
-#endif
- ) {
- const lv_style_t * style_indic = lv_bar_get_style(bar, LV_BAR_STYLE_INDIC);
- lv_area_t indic_area;
- lv_area_copy(&indic_area, &bar->coords);
- indic_area.x1 += style_indic->body.padding.left;
- indic_area.x2 -= style_indic->body.padding.right;
- indic_area.y1 += style_indic->body.padding.top;
- indic_area.y2 -= style_indic->body.padding.bottom;
-
- lv_coord_t w = lv_area_get_width(&indic_area);
- lv_coord_t h = lv_area_get_height(&indic_area);
-
- if(w >= h) {
- /*Horizontal*/
-#if LV_USE_ANIMATION
- if(ext->anim_state != LV_BAR_ANIM_STATE_INV) {
- /*Calculate the coordinates of anim. start and end*/
- lv_coord_t anim_start_x =
- (int32_t)((int32_t)w * (ext->anim_start - ext->min_value)) / (ext->max_value - ext->min_value);
- lv_coord_t anim_end_x =
- (int32_t)((int32_t)w * (ext->anim_end - ext->min_value)) / (ext->max_value - ext->min_value);
-
- /*Calculate the real position based on `anim_state` (between `anim_start` and
- * `anim_end`)*/
- indic_area.x2 =
- anim_start_x + (((anim_end_x - anim_start_x) * ext->anim_state) >> LV_BAR_ANIM_STATE_NORM);
- } else
-#endif
- {
- indic_area.x2 =
- (int32_t)((int32_t)w * (ext->cur_value - ext->min_value)) / (ext->max_value - ext->min_value);
- }
-
- indic_area.x2 = indic_area.x1 + indic_area.x2 - 1;
- if(ext->sym && ext->min_value < 0 && ext->max_value > 0) {
- /*Calculate the coordinate of the zero point*/
- lv_coord_t zero;
- zero = indic_area.x1 + (-ext->min_value * w) / (ext->max_value - ext->min_value);
- if(indic_area.x2 > zero)
- indic_area.x1 = zero;
- else {
- indic_area.x1 = indic_area.x2;
- indic_area.x2 = zero;
- }
- }
- } else {
-#if LV_USE_ANIMATION
- if(ext->anim_state != LV_BAR_ANIM_STATE_INV) {
- /*Calculate the coordinates of anim. start and end*/
- lv_coord_t anim_start_y =
- (int32_t)((int32_t)h * (ext->anim_start - ext->min_value)) / (ext->max_value - ext->min_value);
- lv_coord_t anim_end_y =
- (int32_t)((int32_t)h * (ext->anim_end - ext->min_value)) / (ext->max_value - ext->min_value);
-
- /*Calculate the real position based on `anim_state` (between `anim_start` and
- * `anim_end`)*/
- indic_area.y1 =
- anim_start_y + (((anim_end_y - anim_start_y) * ext->anim_state) >> LV_BAR_ANIM_STATE_NORM);
- } else
-#endif
- {
- indic_area.y1 =
- (int32_t)((int32_t)h * (ext->cur_value - ext->min_value)) / (ext->max_value - ext->min_value);
- }
-
- indic_area.y1 = indic_area.y2 - indic_area.y1 + 1;
-
- if(ext->sym && ext->min_value < 0 && ext->max_value > 0) {
- /*Calculate the coordinate of the zero point*/
- lv_coord_t zero;
- zero = indic_area.y2 - (-ext->min_value * h) / (ext->max_value - ext->min_value);
- if(indic_area.y1 < zero)
- indic_area.y2 = zero;
- else {
- indic_area.y2 = indic_area.y1;
- indic_area.y1 = zero;
- }
- }
- }
-
- /*Draw the indicator*/
- lv_draw_rect(&indic_area, mask, style_indic, opa_scale);
- }
- } else if(mode == LV_DESIGN_DRAW_POST) {
-#if LV_USE_GROUP
- /*Draw the border*/
- if(lv_obj_is_focused(bar)) {
- lv_opa_t opa_scale = lv_obj_get_opa_scale(bar);
- const lv_style_t * style_bg = lv_bar_get_style(bar, LV_BAR_STYLE_BG);
- lv_style_t style_tmp;
- lv_style_copy(&style_tmp, style_bg);
- style_tmp.body.opa = LV_OPA_TRANSP;
- style_tmp.body.shadow.width = 0;
- lv_draw_rect(&bar->coords, mask, &style_tmp, opa_scale);
- }
-#endif
- }
- return true;
-}
-
-/**
- * Signal function of the bar
- * @param bar pointer to a bar object
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_bar_signal(lv_obj_t * bar, lv_signal_t sign, void * param)
-{
- lv_res_t res;
-
- /* Include the ancient signal function */
- res = ancestor_signal(bar, sign, param);
- if(res != LV_RES_OK) return res;
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);
-
- if(sign == LV_SIGNAL_REFR_EXT_DRAW_PAD) {
- const lv_style_t * style_indic = lv_bar_get_style(bar, LV_BAR_STYLE_INDIC);
- if(style_indic->body.shadow.width > bar->ext_draw_pad) bar->ext_draw_pad = style_indic->body.shadow.width;
- }
-
- return res;
-}
-
-#if LV_USE_ANIMATION
-static void lv_bar_anim(void * bar, lv_anim_value_t value)
-{
- lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar);
- ext->anim_state = value;
- lv_obj_invalidate(bar);
-}
-
-static void lv_bar_anim_ready(lv_anim_t * a)
-{
- lv_bar_ext_t * ext = lv_obj_get_ext_attr(a->var);
- ext->anim_state = LV_BAR_ANIM_STATE_INV;
- lv_bar_set_value(a->var, ext->anim_end, false);
-}
-#endif
-
-#endif
diff --git a/src/libs/lvgl/src/lv_objx/lv_bar.h b/src/libs/lvgl/src/lv_objx/lv_bar.h
deleted file mode 100644
index 9ffdbdd6..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_bar.h
+++ /dev/null
@@ -1,193 +0,0 @@
-/**
- * @file lv_bar.h
- *
- */
-
-#ifndef LV_BAR_H
-#define LV_BAR_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_BAR != 0
-
-#include "../lv_core/lv_obj.h"
-#include "../lv_misc/lv_anim.h"
-#include "lv_cont.h"
-#include "lv_btn.h"
-#include "lv_label.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/** Bar animation start value. (Not the real value of the Bar just indicates process animation)*/
-#define LV_BAR_ANIM_STATE_START 0
-
-/** Bar animation end value. (Not the real value of the Bar just indicates process animation)*/
-#define LV_BAR_ANIM_STATE_END 256
-
-/** Mark no animation is in progress */
-#define LV_BAR_ANIM_STATE_INV -1
-
-/** log2(LV_BAR_ANIM_STATE_END) used to normalize data*/
-#define LV_BAR_ANIM_STATE_NORM 8
-
-LV_EXPORT_CONST_INT(LV_BAR_ANIM_STATE_START);
-LV_EXPORT_CONST_INT(LV_BAR_ANIM_STATE_END);
-LV_EXPORT_CONST_INT(LV_BAR_ANIM_STATE_INV);
-LV_EXPORT_CONST_INT(LV_BAR_ANIM_STATE_NORM);
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/** Data of bar*/
-typedef struct
-{
- /*No inherited ext, derived from the base object */
-
- /*New data for this type */
- int16_t cur_value; /*Current value of the bar*/
- int16_t min_value; /*Minimum value of the bar*/
- int16_t max_value; /*Maximum value of the bar*/
-#if LV_USE_ANIMATION
- lv_anim_value_t anim_start;
- lv_anim_value_t anim_end;
- lv_anim_value_t anim_state;
- lv_anim_value_t anim_time;
-#endif
- uint8_t sym : 1; /*Symmetric: means the center is around zero value*/
- const lv_style_t * style_indic; /*Style of the indicator*/
-} lv_bar_ext_t;
-
-/** Bar styles. */
-enum {
- LV_BAR_STYLE_BG, /** Bar background style. */
- LV_BAR_STYLE_INDIC, /** Bar fill area style. */
-};
-typedef uint8_t lv_bar_style_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Create a bar objects
- * @param par pointer to an object, it will be the parent of the new bar
- * @param copy pointer to a bar object, if not NULL then the new object will be copied from it
- * @return pointer to the created bar
- */
-lv_obj_t * lv_bar_create(lv_obj_t * par, const lv_obj_t * copy);
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set a new value on the bar
- * @param bar pointer to a bar object
- * @param value new value
- * @param anim LV_ANIM_ON: set the value with an animation; LV_ANIM_OFF: change the value immediately
- */
-void lv_bar_set_value(lv_obj_t * bar, int16_t value, lv_anim_enable_t anim);
-
-/**
- * Set minimum and the maximum values of a bar
- * @param bar pointer to the bar object
- * @param min minimum value
- * @param max maximum value
- */
-void lv_bar_set_range(lv_obj_t * bar, int16_t min, int16_t max);
-
-/**
- * Make the bar symmetric to zero. The indicator will grow from zero instead of the minimum
- * position.
- * @param bar pointer to a bar object
- * @param en true: enable disable symmetric behavior; false: disable
- */
-void lv_bar_set_sym(lv_obj_t * bar, bool en);
-
-/**
- * Set the animation time of the bar
- * @param bar pointer to a bar object
- * @param anim_time the animation time in milliseconds.
- */
-void lv_bar_set_anim_time(lv_obj_t * bar, uint16_t anim_time);
-
-/**
- * Set a style of a bar
- * @param bar pointer to a bar object
- * @param type which style should be set
- * @param style pointer to a style
- */
-void lv_bar_set_style(lv_obj_t * bar, lv_bar_style_t type, const lv_style_t * style);
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the value of a bar
- * @param bar pointer to a bar object
- * @return the value of the bar
- */
-int16_t lv_bar_get_value(const lv_obj_t * bar);
-
-/**
- * Get the minimum value of a bar
- * @param bar pointer to a bar object
- * @return the minimum value of the bar
- */
-int16_t lv_bar_get_min_value(const lv_obj_t * bar);
-
-/**
- * Get the maximum value of a bar
- * @param bar pointer to a bar object
- * @return the maximum value of the bar
- */
-int16_t lv_bar_get_max_value(const lv_obj_t * bar);
-
-/**
- * Get whether the bar is symmetric or not.
- * @param bar pointer to a bar object
- * @return true: symmetric is enabled; false: disable
- */
-bool lv_bar_get_sym(lv_obj_t * bar);
-
-/**
- * Get the animation time of the bar
- * @param bar pointer to a bar object
- * @return the animation time in milliseconds.
- */
-uint16_t lv_bar_get_anim_time(lv_obj_t * bar);
-
-/**
- * Get a style of a bar
- * @param bar pointer to a bar object
- * @param type which style should be get
- * @return style pointer to a style
- */
-const lv_style_t * lv_bar_get_style(const lv_obj_t * bar, lv_bar_style_t type);
-
-/**********************
- * MACROS
- **********************/
-
-#endif /*LV_USE_BAR*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_BAR_H*/
diff --git a/src/libs/lvgl/src/lv_objx/lv_btn.c b/src/libs/lvgl/src/lv_objx/lv_btn.c
deleted file mode 100644
index 4cfe9527..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_btn.c
+++ /dev/null
@@ -1,723 +0,0 @@
-/**
- * @file lv_btn.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-
-#include "lv_btn.h"
-#if LV_USE_BTN != 0
-
-#include <string.h>
-#include "../lv_core/lv_group.h"
-#include "../lv_core/lv_debug.h"
-#include "../lv_draw/lv_draw.h"
-#include "../lv_themes/lv_theme.h"
-#include "../lv_misc/lv_area.h"
-#include "../lv_misc/lv_color.h"
-#include "../lv_misc/lv_math.h"
-
-/*********************
- * DEFINES
- *********************/
-#define LV_OBJX_NAME "lv_btn"
-#define LV_BTN_INK_VALUE_MAX 256
-#define LV_BTN_INK_VALUE_MAX_SHIFT 8
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static bool lv_btn_design(lv_obj_t * btn, const lv_area_t * mask, lv_design_mode_t mode);
-static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param);
-
-#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT
-static void lv_btn_ink_effect_anim(lv_obj_t * btn, lv_anim_value_t val);
-static void lv_btn_ink_effect_anim_ready(lv_anim_t * a);
-#endif
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_signal_cb_t ancestor_signal;
-static lv_design_cb_t ancestor_design;
-
-#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT
-static lv_coord_t ink_act_value;
-static lv_obj_t * ink_obj;
-static lv_btn_state_t ink_bg_state;
-static lv_btn_state_t ink_top_state;
-static bool ink_ready;
-static bool ink_playback;
-static lv_point_t ink_point;
-#endif
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Create a button object
- * @param par pointer to an object, it will be the parent of the new button
- * @param copy pointer to a button object, if not NULL then the new object will be copied from it
- * @return pointer to the created button
- */
-lv_obj_t * lv_btn_create(lv_obj_t * par, const lv_obj_t * copy)
-{
- LV_LOG_TRACE("button create started");
-
- lv_obj_t * new_btn;
-
- new_btn = lv_cont_create(par, copy);
- LV_ASSERT_MEM(new_btn);
- if(new_btn == NULL) return NULL;
-
- if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_btn);
- if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_cb(new_btn);
-
- /*Allocate the extended data*/
- lv_btn_ext_t * ext = lv_obj_allocate_ext_attr(new_btn, sizeof(lv_btn_ext_t));
- LV_ASSERT_MEM(ext);
- if(ext == NULL) return NULL;
-
- ext->state = LV_BTN_STATE_REL;
-
- ext->styles[LV_BTN_STATE_REL] = &lv_style_btn_rel;
- ext->styles[LV_BTN_STATE_PR] = &lv_style_btn_pr;
- ext->styles[LV_BTN_STATE_TGL_REL] = &lv_style_btn_tgl_rel;
- ext->styles[LV_BTN_STATE_TGL_PR] = &lv_style_btn_tgl_pr;
- ext->styles[LV_BTN_STATE_INA] = &lv_style_btn_ina;
-
- ext->toggle = 0;
-#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT
- ext->ink_in_time = 0;
- ext->ink_wait_time = 0;
- ext->ink_out_time = 0;
-#endif
-
- lv_obj_set_signal_cb(new_btn, lv_btn_signal);
- lv_obj_set_design_cb(new_btn, lv_btn_design);
-
- /*If no copy do the basic initialization*/
- if(copy == NULL) {
- /*Set layout if the button is not a screen*/
- if(par != NULL) {
- lv_btn_set_layout(new_btn, LV_LAYOUT_CENTER);
- }
-
- lv_obj_set_click(new_btn, true); /*Be sure the button is clickable*/
-
- /*Set the default styles*/
- lv_theme_t * th = lv_theme_get_current();
- if(th) {
- lv_btn_set_style(new_btn, LV_BTN_STYLE_REL, th->style.btn.rel);
- lv_btn_set_style(new_btn, LV_BTN_STYLE_PR, th->style.btn.pr);
- lv_btn_set_style(new_btn, LV_BTN_STYLE_TGL_REL, th->style.btn.tgl_rel);
- lv_btn_set_style(new_btn, LV_BTN_STYLE_TGL_PR, th->style.btn.tgl_pr);
- lv_btn_set_style(new_btn, LV_BTN_STYLE_INA, th->style.btn.ina);
- } else {
- lv_obj_set_style(new_btn, ext->styles[LV_BTN_STATE_REL]);
- }
- }
- /*Copy 'copy'*/
- else {
- lv_btn_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
- ext->state = copy_ext->state;
- ext->toggle = copy_ext->toggle;
-#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT
- ext->ink_in_time = copy_ext->ink_in_time;
- ext->ink_wait_time = copy_ext->ink_wait_time;
- ext->ink_out_time = copy_ext->ink_out_time;
-#endif
- memcpy((void*) ext->styles, copy_ext->styles, sizeof(ext->styles));
-
- /*Refresh the style with new signal function*/
- lv_obj_refresh_style(new_btn);
- }
-
- LV_LOG_INFO("button created");
-
- return new_btn;
-}
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Enable the toggled states
- * @param btn pointer to a button object
- * @param tgl true: enable toggled states, false: disable
- */
-void lv_btn_set_toggle(lv_obj_t * btn, bool tgl)
-{
- LV_ASSERT_OBJ(btn, LV_OBJX_NAME);
-
- lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn);
-
- ext->toggle = tgl != false ? 1 : 0;
-}
-
-/**
- * Set the state of the button
- * @param btn pointer to a button object
- * @param state the new state of the button (from lv_btn_state_t enum)
- */
-void lv_btn_set_state(lv_obj_t * btn, lv_btn_state_t state)
-{
- LV_ASSERT_OBJ(btn, LV_OBJX_NAME);
-
- lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn);
- if(ext->state != state) {
- ext->state = state;
- lv_obj_set_style(btn, ext->styles[state]);
- }
-}
-
-/**
- * Toggle the state of the button (ON->OFF, OFF->ON)
- * @param btn pointer to a button object
- */
-void lv_btn_toggle(lv_obj_t * btn)
-{
- LV_ASSERT_OBJ(btn, LV_OBJX_NAME);
-
- lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn);
- switch(ext->state) {
- case LV_BTN_STATE_REL: lv_btn_set_state(btn, LV_BTN_STATE_TGL_REL); break;
- case LV_BTN_STATE_PR: lv_btn_set_state(btn, LV_BTN_STATE_TGL_PR); break;
- case LV_BTN_STATE_TGL_REL: lv_btn_set_state(btn, LV_BTN_STATE_REL); break;
- case LV_BTN_STATE_TGL_PR: lv_btn_set_state(btn, LV_BTN_STATE_PR); break;
- default: break;
- }
-}
-
-/**
- * Set time of the ink effect (draw a circle on click to animate in the new state)
- * @param btn pointer to a button object
- * @param time the time of the ink animation
- */
-void lv_btn_set_ink_in_time(lv_obj_t * btn, uint16_t time)
-{
- LV_ASSERT_OBJ(btn, LV_OBJX_NAME);
-
-#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT
- lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn);
- ext->ink_in_time = time;
-#else
- (void)btn; /*Unused*/
- (void)time; /*Unused*/
- LV_LOG_WARN("`lv_btn_set_ink_ink_time` has no effect if LV_BTN_INK_EFEFCT or LV_USE_ANIMATION "
- "is disabled")
-#endif
-}
-
-/**
- * Set the wait time before the ink disappears
- * @param btn pointer to a button object
- * @param time the time of the ink animation
- */
-void lv_btn_set_ink_wait_time(lv_obj_t * btn, uint16_t time)
-{
- LV_ASSERT_OBJ(btn, LV_OBJX_NAME);
-
-
-#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT
- lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn);
- ext->ink_wait_time = time;
-#else
- (void)btn; /*Unused*/
- (void)time; /*Unused*/
- LV_LOG_WARN("`lv_btn_set_ink_wait_time` has no effect if LV_BTN_INK_EFEFCT or LV_USE_ANIMATION "
- "is disabled")
-#endif
-}
-
-/**
- * Set time of the ink out effect (animate to the released state)
- * @param btn pointer to a button object
- * @param time the time of the ink animation
- */
-void lv_btn_set_ink_out_time(lv_obj_t * btn, uint16_t time)
-{
- LV_ASSERT_OBJ(btn, LV_OBJX_NAME);
-
-#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT
- lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn);
- ext->ink_out_time = time;
-#else
- (void)btn; /*Unused*/
- (void)time; /*Unused*/
- LV_LOG_WARN("`lv_btn_set_ink_out_time` has no effect if LV_BTN_INK_EFEFCT or LV_USE_ANIMATION "
- "is disabled")
-#endif
-}
-
-/**
- * Set a style of a button
- * @param btn pointer to a button object
- * @param type which style should be set
- * @param style pointer to a style
- */
-void lv_btn_set_style(lv_obj_t * btn, lv_btn_style_t type, const lv_style_t * style)
-{
- LV_ASSERT_OBJ(btn, LV_OBJX_NAME);
-
- lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn);
-
- switch(type) {
- case LV_BTN_STYLE_REL: ext->styles[LV_BTN_STATE_REL] = style; break;
- case LV_BTN_STYLE_PR: ext->styles[LV_BTN_STATE_PR] = style; break;
- case LV_BTN_STYLE_TGL_REL: ext->styles[LV_BTN_STATE_TGL_REL] = style; break;
- case LV_BTN_STYLE_TGL_PR: ext->styles[LV_BTN_STATE_TGL_PR] = style; break;
- case LV_BTN_STYLE_INA: ext->styles[LV_BTN_STATE_INA] = style; break;
- }
-
- /*Refresh the object with the new style*/
- lv_obj_set_style(btn, ext->styles[ext->state]);
-}
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the current state of the button
- * @param btn pointer to a button object
- * @return the state of the button (from lv_btn_state_t enum)
- */
-lv_btn_state_t lv_btn_get_state(const lv_obj_t * btn)
-{
- LV_ASSERT_OBJ(btn, LV_OBJX_NAME);
-
- lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn);
- return ext->state;
-}
-
-/**
- * Get the toggle enable attribute of the button
- * @param btn pointer to a button object
- * @return true: toggle enabled, false: disabled
- */
-bool lv_btn_get_toggle(const lv_obj_t * btn)
-{
- LV_ASSERT_OBJ(btn, LV_OBJX_NAME);
-
- lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn);
-
- return ext->toggle != 0 ? true : false;
-}
-
-/**
- * Get time of the ink in effect (draw a circle on click to animate in the new state)
- * @param btn pointer to a button object
- * @return the time of the ink animation
- */
-uint16_t lv_btn_get_ink_in_time(const lv_obj_t * btn)
-{
- LV_ASSERT_OBJ(btn, LV_OBJX_NAME);
-
-#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT
- lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn);
- return ext->ink_in_time;
-#else
- (void)btn; /*Unused*/
- return 0;
-#endif
-}
-
-/**
- * Get the wait time before the ink disappears
- * @param btn pointer to a button object
- * @return the time of the ink animation
- */
-uint16_t lv_btn_get_ink_wait_time(const lv_obj_t * btn)
-{
- LV_ASSERT_OBJ(btn, LV_OBJX_NAME);
-
-#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT
- lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn);
- return ext->ink_wait_time;
-#else
- (void)btn; /*Unused*/
- return 0;
-#endif
-}
-/**
- * Get time of the ink out effect (animate to the releases state)
- * @param btn pointer to a button object
- * @return the time of the ink animation
- */
-uint16_t lv_btn_get_ink_out_time(const lv_obj_t * btn)
-{
- LV_ASSERT_OBJ(btn, LV_OBJX_NAME);
-
-#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT
- lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn);
- return ext->ink_out_time;
-#else
- (void)btn; /*Unused*/
- return 0;
-#endif
-}
-
-/**
- * Get a style of a button
- * @param btn pointer to a button object
- * @param type which style should be get
- * @return style pointer to a style
- */
-const lv_style_t * lv_btn_get_style(const lv_obj_t * btn, lv_btn_style_t type)
-{
- LV_ASSERT_OBJ(btn, LV_OBJX_NAME);
-
- const lv_style_t * style = NULL;
- lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn);
- lv_btn_state_t state = lv_btn_get_state(btn);
-
- /* If the style of the current state is asked then return object style.
- * If the button is focused then this style is updated by the group's
- * `style_mod_cb` function */
- if((type == LV_BTN_STYLE_REL && state == LV_BTN_STATE_REL) ||
- (type == LV_BTN_STYLE_PR && state == LV_BTN_STATE_PR) ||
- (type == LV_BTN_STYLE_TGL_REL && state == LV_BTN_STATE_TGL_REL) ||
- (type == LV_BTN_STYLE_TGL_PR && state == LV_BTN_STATE_TGL_PR) ||
- (type == LV_BTN_STYLE_INA && state == LV_BTN_STATE_INA)) {
-
- style = lv_obj_get_style(btn);
- } else {
- switch(type) {
- case LV_BTN_STYLE_REL: style = ext->styles[LV_BTN_STATE_REL]; break;
- case LV_BTN_STYLE_PR: style = ext->styles[LV_BTN_STATE_PR]; break;
- case LV_BTN_STYLE_TGL_REL: style = ext->styles[LV_BTN_STATE_TGL_REL]; break;
- case LV_BTN_STYLE_TGL_PR: style = ext->styles[LV_BTN_STATE_TGL_PR]; break;
- case LV_BTN_STYLE_INA: style = ext->styles[LV_BTN_STATE_INA]; break;
- default: style = NULL; break;
- }
- }
-
- return style;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Handle the drawing related tasks of the drop down lists
- * @param btn pointer to an object
- * @param mask the object will be drawn only in this area
- * @param mode LV_DESIGN_COVER_CHK: only check if the object fully covers the 'mask_p' area
- * (return 'true' if yes)
- * LV_DESIGN_DRAW: draw the object (always return 'true')
- * LV_DESIGN_DRAW_POST: drawing after every children are drawn
- * @param return true/false, depends on 'mode'
- */
-static bool lv_btn_design(lv_obj_t * btn, const lv_area_t * mask, lv_design_mode_t mode)
-{
- if(mode == LV_DESIGN_COVER_CHK) {
- return false;
- } else if(mode == LV_DESIGN_DRAW_MAIN) {
-
-#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT
- if(btn != ink_obj) {
- ancestor_design(btn, mask, mode);
- } else {
- lv_opa_t opa_scale = lv_obj_get_opa_scale(btn);
- lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn);
-
- /*Draw the normal button*/
- if(ink_playback == false) {
- lv_style_t style_tmp;
- lv_style_copy(&style_tmp, ext->styles[ink_bg_state]);
- style_tmp.body.shadow.width = ext->styles[ink_top_state]->body.shadow.width;
- lv_draw_rect(&btn->coords, mask, &style_tmp, opa_scale);
-
- lv_coord_t w = lv_obj_get_width(btn);
- lv_coord_t h = lv_obj_get_height(btn);
- lv_coord_t r_max = LV_MATH_MIN(w, h) / 2;
-
- /*In the first part of the animation increase the size of the circle (ink effect) */
- lv_area_t cir_area;
-
- lv_coord_t coord_state =
- ink_act_value < LV_BTN_INK_VALUE_MAX / 2 ? ink_act_value : LV_BTN_INK_VALUE_MAX / 2;
- lv_point_t p_act;
- p_act.x = ink_point.x;
- p_act.y = ink_point.y;
- lv_coord_t x_err = (btn->coords.x1 + w / 2) - p_act.x;
- lv_coord_t y_err = (btn->coords.y1 + h / 2) - p_act.y;
-
- p_act.x += (x_err * coord_state) >> (LV_BTN_INK_VALUE_MAX_SHIFT - 1);
- p_act.y += (y_err * coord_state) >> (LV_BTN_INK_VALUE_MAX_SHIFT - 1);
-
- lv_coord_t half_side = LV_MATH_MAX(w, h) / 2;
- cir_area.x1 = p_act.x - ((half_side * coord_state) >> (LV_BTN_INK_VALUE_MAX_SHIFT - 1));
- cir_area.y1 = p_act.y - ((half_side * coord_state) >> (LV_BTN_INK_VALUE_MAX_SHIFT - 1));
- cir_area.x2 = p_act.x + ((half_side * coord_state) >> (LV_BTN_INK_VALUE_MAX_SHIFT - 1));
- cir_area.y2 = p_act.y + ((half_side * coord_state) >> (LV_BTN_INK_VALUE_MAX_SHIFT - 1));
-
- lv_area_intersect(&cir_area, &btn->coords,
- &cir_area); /*Limit the area. (It might be too big on the smaller side)*/
-
- /*In the second part animate the radius. Circle -> body.radius*/
- lv_coord_t r_state =
- ink_act_value > LV_BTN_INK_VALUE_MAX / 2 ? ink_act_value - LV_BTN_INK_VALUE_MAX / 2 : 0;
-
- lv_style_copy(&style_tmp, ext->styles[ink_top_state]);
- style_tmp.body.radius = r_max + (((ext->styles[ink_bg_state]->body.radius - r_max) * r_state) >>
- (LV_BTN_INK_VALUE_MAX_SHIFT - 1));
- style_tmp.body.border.width = 0;
-
- /*Draw the circle*/
- lv_draw_rect(&cir_area, mask, &style_tmp, opa_scale);
- } else {
- lv_style_t res;
- lv_style_copy(&res, ext->styles[ink_bg_state]);
- lv_style_mix(ext->styles[ink_bg_state], ext->styles[ink_top_state], &res, ink_act_value);
- lv_draw_rect(&btn->coords, mask, &res, opa_scale);
- }
- }
-#else
- ancestor_design(btn, mask, mode);
-#endif
- } else if(mode == LV_DESIGN_DRAW_POST) {
- ancestor_design(btn, mask, mode);
- }
-
- return true;
-}
-
-/**
- * Signal function of the button
- * @param btn pointer to a button object
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param)
-{
- lv_res_t res;
-
- /* Include the ancient signal function */
- res = ancestor_signal(btn, sign, param);
- if(res != LV_RES_OK) return res;
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);
-
- lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn);
- bool tgl = lv_btn_get_toggle(btn);
-
- if(sign == LV_SIGNAL_PRESSED) {
- /*Refresh the state*/
- if(ext->state == LV_BTN_STATE_REL) {
- lv_btn_set_state(btn, LV_BTN_STATE_PR);
-#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT
- ink_bg_state = LV_BTN_STATE_REL;
- ink_top_state = LV_BTN_STATE_PR;
-#endif
- } else if(ext->state == LV_BTN_STATE_TGL_REL) {
- lv_btn_set_state(btn, LV_BTN_STATE_TGL_PR);
-#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT
- ink_bg_state = LV_BTN_STATE_TGL_REL;
- ink_top_state = LV_BTN_STATE_TGL_PR;
-#endif
- }
-
-#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT
- /*Forget the old inked button*/
- if(ink_obj != NULL && ink_obj != btn) {
- lv_anim_del(ink_obj, (lv_anim_exec_xcb_t)lv_btn_ink_effect_anim);
- lv_obj_invalidate(ink_obj);
- ink_obj = NULL;
- }
- /*Save the new data for inking and start it's animation if enabled*/
- if(ext->ink_in_time > 0) {
- ink_obj = btn;
- ink_playback = false;
- ink_ready = false;
- lv_indev_get_point(lv_indev_get_act(), &ink_point);
-
- lv_anim_t a;
- a.var = btn;
- a.start = 0;
- a.end = LV_BTN_INK_VALUE_MAX;
- a.exec_cb = (lv_anim_exec_xcb_t)lv_btn_ink_effect_anim;
- a.path_cb = lv_anim_path_linear;
- a.ready_cb = lv_btn_ink_effect_anim_ready;
- a.act_time = 0;
- a.time = ext->ink_in_time;
- a.playback = 0;
- a.playback_pause = 0;
- a.repeat = 0;
- a.repeat_pause = 0;
- lv_anim_create(&a);
- }
-#endif
- } else if(sign == LV_SIGNAL_PRESS_LOST) {
- /*Refresh the state*/
- if(ext->state == LV_BTN_STATE_PR)
- lv_btn_set_state(btn, LV_BTN_STATE_REL);
- else if(ext->state == LV_BTN_STATE_TGL_PR)
- lv_btn_set_state(btn, LV_BTN_STATE_TGL_REL);
- } else if(sign == LV_SIGNAL_PRESSING) {
- /*When the button begins to drag revert pressed states to released*/
- if(lv_indev_is_dragging(param) != false) {
- if(ext->state == LV_BTN_STATE_PR)
- lv_btn_set_state(btn, LV_BTN_STATE_REL);
- else if(ext->state == LV_BTN_STATE_TGL_PR)
- lv_btn_set_state(btn, LV_BTN_STATE_TGL_REL);
- }
- } else if(sign == LV_SIGNAL_RELEASED) {
- /*If not dragged and it was not long press action then
- *change state and run the action*/
- if(lv_indev_is_dragging(param) == false) {
- uint32_t toggled = 0;
- if(ext->state == LV_BTN_STATE_PR && tgl == false) {
- lv_btn_set_state(btn, LV_BTN_STATE_REL);
- toggled = 0;
- } else if(ext->state == LV_BTN_STATE_TGL_PR && tgl == false) {
- lv_btn_set_state(btn, LV_BTN_STATE_TGL_REL);
- toggled = 1;
- } else if(ext->state == LV_BTN_STATE_PR && tgl == true) {
- lv_btn_set_state(btn, LV_BTN_STATE_TGL_REL);
- toggled = 1;
- } else if(ext->state == LV_BTN_STATE_TGL_PR && tgl == true) {
- lv_btn_set_state(btn, LV_BTN_STATE_REL);
- toggled = 0;
- }
-
- if(tgl) {
- res = lv_event_send(btn, LV_EVENT_VALUE_CHANGED, &toggled);
- if(res != LV_RES_OK) return res;
- }
-
- } else { /*If dragged change back the state*/
- if(ext->state == LV_BTN_STATE_PR) {
- lv_btn_set_state(btn, LV_BTN_STATE_REL);
- } else if(ext->state == LV_BTN_STATE_TGL_PR) {
- lv_btn_set_state(btn, LV_BTN_STATE_TGL_REL);
- }
- }
-
-#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT
- /*Draw the toggled state in the inking instead*/
- if(ext->toggle) {
- ink_top_state = ext->state;
- }
- /*If not a toggle button and the "IN" inking is ready then start an "OUT" inking*/
- else if(ink_ready && ext->ink_out_time > 0) {
- ink_obj = btn;
- ink_playback = true; /*It is the playback. If not set `lv_btn_ink_effect_anim_ready`
- will start its own playback*/
- lv_indev_get_point(lv_indev_get_act(), &ink_point);
-
- lv_anim_t a;
- a.var = ink_obj;
- a.start = LV_BTN_INK_VALUE_MAX;
- a.end = 0;
- a.exec_cb = (lv_anim_exec_xcb_t)lv_btn_ink_effect_anim;
- a.path_cb = lv_anim_path_linear;
- a.ready_cb = lv_btn_ink_effect_anim_ready;
- a.act_time = 0;
- a.time = ext->ink_out_time;
- a.playback = 0;
- a.playback_pause = 0;
- a.repeat = 0;
- a.repeat_pause = 0;
- lv_anim_create(&a);
- }
-#endif
- } else if(sign == LV_SIGNAL_CONTROL) {
- char c = *((char *)param);
- if(c == LV_KEY_RIGHT || c == LV_KEY_UP) {
- if(lv_btn_get_toggle(btn)) {
- lv_btn_set_state(btn, LV_BTN_STATE_TGL_REL);
-
- uint32_t state = 1;
- res = lv_event_send(btn, LV_EVENT_VALUE_CHANGED, &state);
- if(res != LV_RES_OK) return res;
- }
-
- } else if(c == LV_KEY_LEFT || c == LV_KEY_DOWN) {
- if(lv_btn_get_toggle(btn)) {
- lv_btn_set_state(btn, LV_BTN_STATE_REL);
-
- uint32_t state = 0;
- res = lv_event_send(btn, LV_EVENT_VALUE_CHANGED, &state);
- if(res != LV_RES_OK) return res;
- }
- }
- } else if(sign == LV_SIGNAL_CLEANUP) {
-#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT
- if(btn == ink_obj) {
- lv_anim_del(ink_obj, (lv_anim_exec_xcb_t)lv_btn_ink_effect_anim);
- ink_obj = NULL;
- }
-#endif
- }
-
- return res;
-}
-
-#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT
-
-/**
- * The animator function of inking. CAlled to increase the radius of ink
- * @param btn pointer to the animated button
- * @param val the new radius
- */
-static void lv_btn_ink_effect_anim(lv_obj_t * btn, lv_anim_value_t val)
-{
- if(btn) {
- ink_act_value = val;
- lv_obj_invalidate(btn);
- }
-}
-
-/**
- * Called to clean up when the ink animation is ready
- * @param a unused
- */
-static void lv_btn_ink_effect_anim_ready(lv_anim_t * a)
-{
- (void)a; /*Unused*/
-
- lv_btn_ext_t * ext = lv_obj_get_ext_attr(ink_obj);
- lv_btn_state_t state = lv_btn_get_state(ink_obj);
-
- lv_obj_invalidate(ink_obj);
- ink_ready = true;
-
- if((state == LV_BTN_STATE_REL || state == LV_BTN_STATE_TGL_REL) && ext->toggle == 0 && ink_playback == false) {
- lv_anim_t new_a;
- new_a.var = ink_obj;
- new_a.start = LV_BTN_INK_VALUE_MAX;
- new_a.end = 0;
- new_a.exec_cb = (lv_anim_exec_xcb_t)lv_btn_ink_effect_anim;
- new_a.path_cb = lv_anim_path_linear;
- new_a.ready_cb = lv_btn_ink_effect_anim_ready;
- new_a.act_time = -ext->ink_wait_time;
- new_a.time = ext->ink_out_time;
- new_a.playback = 0;
- new_a.playback_pause = 0;
- new_a.repeat = 0;
- new_a.repeat_pause = 0;
- lv_anim_create(&new_a);
-
- ink_playback = true;
- } else {
- ink_obj = NULL;
- }
-}
-#endif /*LV_USE_ANIMATION*/
-
-#endif
diff --git a/src/libs/lvgl/src/lv_objx/lv_btn.h b/src/libs/lvgl/src/lv_objx/lv_btn.h
deleted file mode 100644
index f7bd85fa..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_btn.h
+++ /dev/null
@@ -1,329 +0,0 @@
-/**
- * @file lv_btn.h
- *
- */
-
-#ifndef LV_BTN_H
-#define LV_BTN_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_BTN != 0
-
-/*Testing of dependencies*/
-#if LV_USE_CONT == 0
-#error "lv_btn: lv_cont is required. Enable it in lv_conf.h (LV_USE_CONT 1) "
-#endif
-
-#include "lv_cont.h"
-#include "../lv_core/lv_indev.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/** Possible states of a button.
- * It can be used not only by buttons but other button-like objects too*/
-enum {
- /**Released*/
- LV_BTN_STATE_REL,
-
- /**Pressed*/
- LV_BTN_STATE_PR,
-
- /**Toggled released*/
- LV_BTN_STATE_TGL_REL,
-
- /**Toggled pressed*/
- LV_BTN_STATE_TGL_PR,
-
- /**Inactive*/
- LV_BTN_STATE_INA,
-
- /**Number of states*/
- _LV_BTN_STATE_NUM,
-};
-typedef uint8_t lv_btn_state_t;
-
-/** Extended data of button*/
-typedef struct
-{
- /** Ext. of ancestor*/
- lv_cont_ext_t cont;
-
- /*New data for this type */
-
- /**Styles in each state*/
- const lv_style_t * styles[_LV_BTN_STATE_NUM];
-#if LV_BTN_INK_EFFECT
- /** [ms] Time of ink fill effect (0: disable ink effect)*/
- uint16_t ink_in_time;
-
- /** [ms] Wait before the ink disappears */
- uint16_t ink_wait_time;
-
- /** [ms] Time of ink disappearing*/
- uint16_t ink_out_time;
-#endif
-
- /** Current state of the button from 'lv_btn_state_t' enum*/
- lv_btn_state_t state : 3;
-
- /** 1: Toggle enabled*/
- uint8_t toggle : 1;
-} lv_btn_ext_t;
-
-/**Styles*/
-enum {
- /** Release style */
- LV_BTN_STYLE_REL,
-
- /**Pressed style*/
- LV_BTN_STYLE_PR,
-
- /** Toggle released style*/
- LV_BTN_STYLE_TGL_REL,
-
- /** Toggle pressed style */
- LV_BTN_STYLE_TGL_PR,
-
- /** Inactive style*/
- LV_BTN_STYLE_INA,
-};
-typedef uint8_t lv_btn_style_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Create a button object
- * @param par pointer to an object, it will be the parent of the new button
- * @param copy pointer to a button object, if not NULL then the new object will be copied from it
- * @return pointer to the created button
- */
-lv_obj_t * lv_btn_create(lv_obj_t * par, const lv_obj_t * copy);
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Enable the toggled states. On release the button will change from/to toggled state.
- * @param btn pointer to a button object
- * @param tgl true: enable toggled states, false: disable
- */
-void lv_btn_set_toggle(lv_obj_t * btn, bool tgl);
-
-/**
- * Set the state of the button
- * @param btn pointer to a button object
- * @param state the new state of the button (from lv_btn_state_t enum)
- */
-void lv_btn_set_state(lv_obj_t * btn, lv_btn_state_t state);
-
-/**
- * Toggle the state of the button (ON->OFF, OFF->ON)
- * @param btn pointer to a button object
- */
-void lv_btn_toggle(lv_obj_t * btn);
-
-/**
- * Set the layout on a button
- * @param btn pointer to a button object
- * @param layout a layout from 'lv_cont_layout_t'
- */
-static inline void lv_btn_set_layout(lv_obj_t * btn, lv_layout_t layout)
-{
- lv_cont_set_layout(btn, layout);
-}
-
-/**
- * Set the fit policy in all 4 directions separately.
- * It tells how to change the button size automatically.
- * @param btn pointer to a button object
- * @param left left fit policy from `lv_fit_t`
- * @param right right fit policy from `lv_fit_t`
- * @param top top fit policy from `lv_fit_t`
- * @param bottom bottom fit policy from `lv_fit_t`
- */
-static inline void lv_btn_set_fit4(lv_obj_t * btn, lv_fit_t left, lv_fit_t right, lv_fit_t top, lv_fit_t bottom)
-{
- lv_cont_set_fit4(btn, left, right, top, bottom);
-}
-
-/**
- * Set the fit policy horizontally and vertically separately.
- * It tells how to change the button size automatically.
- * @param btn pointer to a button object
- * @param hor horizontal fit policy from `lv_fit_t`
- * @param ver vertical fit policy from `lv_fit_t`
- */
-static inline void lv_btn_set_fit2(lv_obj_t * btn, lv_fit_t hor, lv_fit_t ver)
-{
- lv_cont_set_fit2(btn, hor, ver);
-}
-
-/**
- * Set the fit policy in all 4 direction at once.
- * It tells how to change the button size automatically.
- * @param btn pointer to a button object
- * @param fit fit policy from `lv_fit_t`
- */
-static inline void lv_btn_set_fit(lv_obj_t * btn, lv_fit_t fit)
-{
- lv_cont_set_fit(btn, fit);
-}
-
-/**
- * Set time of the ink effect (draw a circle on click to animate in the new state)
- * @param btn pointer to a button object
- * @param time the time of the ink animation
- */
-void lv_btn_set_ink_in_time(lv_obj_t * btn, uint16_t time);
-
-/**
- * Set the wait time before the ink disappears
- * @param btn pointer to a button object
- * @param time the time of the ink animation
- */
-void lv_btn_set_ink_wait_time(lv_obj_t * btn, uint16_t time);
-
-/**
- * Set time of the ink out effect (animate to the released state)
- * @param btn pointer to a button object
- * @param time the time of the ink animation
- */
-void lv_btn_set_ink_out_time(lv_obj_t * btn, uint16_t time);
-
-/**
- * Set a style of a button.
- * @param btn pointer to button object
- * @param type which style should be set
- * @param style pointer to a style
- * */
-void lv_btn_set_style(lv_obj_t * btn, lv_btn_style_t type, const lv_style_t * style);
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the current state of the button
- * @param btn pointer to a button object
- * @return the state of the button (from lv_btn_state_t enum)
- */
-lv_btn_state_t lv_btn_get_state(const lv_obj_t * btn);
-
-/**
- * Get the toggle enable attribute of the button
- * @param btn pointer to a button object
- * @return true: toggle enabled, false: disabled
- */
-bool lv_btn_get_toggle(const lv_obj_t * btn);
-
-/**
- * Get the layout of a button
- * @param btn pointer to button object
- * @return the layout from 'lv_cont_layout_t'
- */
-static inline lv_layout_t lv_btn_get_layout(const lv_obj_t * btn)
-{
- return lv_cont_get_layout(btn);
-}
-
-/**
- * Get the left fit mode
- * @param btn pointer to a button object
- * @return an element of `lv_fit_t`
- */
-static inline lv_fit_t lv_btn_get_fit_left(const lv_obj_t * btn)
-{
- return lv_cont_get_fit_left(btn);
-}
-
-/**
- * Get the right fit mode
- * @param btn pointer to a button object
- * @return an element of `lv_fit_t`
- */
-static inline lv_fit_t lv_btn_get_fit_right(const lv_obj_t * btn)
-{
- return lv_cont_get_fit_right(btn);
-}
-
-/**
- * Get the top fit mode
- * @param btn pointer to a button object
- * @return an element of `lv_fit_t`
- */
-static inline lv_fit_t lv_btn_get_fit_top(const lv_obj_t * btn)
-{
- return lv_cont_get_fit_top(btn);
-}
-
-/**
- * Get the bottom fit mode
- * @param btn pointer to a button object
- * @return an element of `lv_fit_t`
- */
-static inline lv_fit_t lv_btn_get_fit_bottom(const lv_obj_t * btn)
-{
- return lv_cont_get_fit_bottom(btn);
-}
-
-/**
- * Get time of the ink in effect (draw a circle on click to animate in the new state)
- * @param btn pointer to a button object
- * @return the time of the ink animation
- */
-uint16_t lv_btn_get_ink_in_time(const lv_obj_t * btn);
-
-/**
- * Get the wait time before the ink disappears
- * @param btn pointer to a button object
- * @return the time of the ink animation
- */
-uint16_t lv_btn_get_ink_wait_time(const lv_obj_t * btn);
-
-/**
- * Get time of the ink out effect (animate to the releases state)
- * @param btn pointer to a button object
- * @return the time of the ink animation
- */
-uint16_t lv_btn_get_ink_out_time(const lv_obj_t * btn);
-
-/**
- * Get style of a button.
- * @param btn pointer to button object
- * @param type which style should be get
- * @return style pointer to the style
- * */
-const lv_style_t * lv_btn_get_style(const lv_obj_t * btn, lv_btn_style_t type);
-
-/**********************
- * MACROS
- **********************/
-
-#endif /*LV_USE_BUTTON*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_BTN_H*/
diff --git a/src/libs/lvgl/src/lv_objx/lv_btnm.c b/src/libs/lvgl/src/lv_objx/lv_btnm.c
deleted file mode 100644
index d8d5f700..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_btnm.c
+++ /dev/null
@@ -1,1125 +0,0 @@
-/**
- * @file lv_btnm.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_btnm.h"
-#if LV_USE_BTNM != 0
-
-#include "../lv_core/lv_debug.h"
-#include "../lv_core/lv_group.h"
-#include "../lv_draw/lv_draw.h"
-#include "../lv_core/lv_refr.h"
-#include "../lv_themes/lv_theme.h"
-#include "../lv_misc/lv_txt.h"
-
-/*********************
- * DEFINES
- *********************/
-#define LV_OBJX_NAME "lv_btnm"
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param);
-static bool lv_btnm_design(lv_obj_t * btnm, const lv_area_t * mask, lv_design_mode_t mode);
-static uint8_t get_button_width(lv_btnm_ctrl_t ctrl_bits);
-static bool button_is_hidden(lv_btnm_ctrl_t ctrl_bits);
-static bool button_is_repeat_disabled(lv_btnm_ctrl_t ctrl_bits);
-static bool button_is_inactive(lv_btnm_ctrl_t ctrl_bits);
-static bool button_is_click_trig(lv_btnm_ctrl_t ctrl_bits);
-static bool button_is_tgl_enabled(lv_btnm_ctrl_t ctrl_bits);
-static bool button_get_tgl_state(lv_btnm_ctrl_t ctrl_bits);
-static uint16_t get_button_from_point(lv_obj_t * btnm, lv_point_t * p);
-static void allocate_btn_areas_and_controls(const lv_obj_t * btnm, const char ** map);
-static void invalidate_button_area(const lv_obj_t * btnm, uint16_t btn_idx);
-static bool maps_are_identical(const char ** map1, const char ** map2);
-static void make_one_button_toggled(lv_obj_t * btnm, uint16_t btn_idx);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static const char * lv_btnm_def_map[] = {"Btn1", "Btn2", "Btn3", "\n", "Btn4", "Btn5", ""};
-
-static lv_design_cb_t ancestor_design_f;
-static lv_signal_cb_t ancestor_signal;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Create a button matrix objects
- * @param par pointer to an object, it will be the parent of the new button matrix
- * @param copy pointer to a button matrix object, if not NULL then the new object will be copied
- * from it
- * @return pointer to the created button matrix
- */
-lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy)
-{
- LV_LOG_TRACE("button matrix create started");
-
- /*Create the ancestor object*/
- lv_obj_t * new_btnm = lv_obj_create(par, copy);
- LV_ASSERT_MEM(new_btnm);
- if(new_btnm == NULL) return NULL;
-
- if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_btnm);
-
- /*Allocate the object type specific extended data*/
- lv_btnm_ext_t * ext = lv_obj_allocate_ext_attr(new_btnm, sizeof(lv_btnm_ext_t));
- LV_ASSERT_MEM(ext);
- if(ext == NULL) return NULL;
-
- ext->btn_cnt = 0;
- ext->btn_id_pr = LV_BTNM_BTN_NONE;
- ext->btn_id_act = LV_BTNM_BTN_NONE;
- ext->button_areas = NULL;
- ext->ctrl_bits = NULL;
- ext->map_p = NULL;
- ext->recolor = 0;
- ext->one_toggle = 0;
- ext->styles_btn[LV_BTN_STATE_REL] = &lv_style_btn_rel;
- ext->styles_btn[LV_BTN_STATE_PR] = &lv_style_btn_pr;
- ext->styles_btn[LV_BTN_STATE_TGL_REL] = &lv_style_btn_tgl_rel;
- ext->styles_btn[LV_BTN_STATE_TGL_PR] = &lv_style_btn_tgl_pr;
- ext->styles_btn[LV_BTN_STATE_INA] = &lv_style_btn_ina;
-
- if(ancestor_design_f == NULL) ancestor_design_f = lv_obj_get_design_cb(new_btnm);
-
- lv_obj_set_signal_cb(new_btnm, lv_btnm_signal);
- lv_obj_set_design_cb(new_btnm, lv_btnm_design);
-
- /*Init the new button matrix object*/
- if(copy == NULL) {
- lv_btnm_set_map(new_btnm, lv_btnm_def_map);
- lv_obj_set_size(new_btnm, LV_DPI * 3, LV_DPI * 2);
-
- /*Set the default styles*/
- lv_theme_t * th = lv_theme_get_current();
- if(th) {
- lv_btnm_set_style(new_btnm, LV_BTNM_STYLE_BG, th->style.btnm.bg);
- lv_btnm_set_style(new_btnm, LV_BTNM_STYLE_BTN_REL, th->style.btnm.btn.rel);
- lv_btnm_set_style(new_btnm, LV_BTNM_STYLE_BTN_PR, th->style.btnm.btn.pr);
- lv_btnm_set_style(new_btnm, LV_BTNM_STYLE_BTN_TGL_REL, th->style.btnm.btn.tgl_rel);
- lv_btnm_set_style(new_btnm, LV_BTNM_STYLE_BTN_TGL_PR, th->style.btnm.btn.tgl_pr);
- lv_btnm_set_style(new_btnm, LV_BTNM_STYLE_BTN_INA, th->style.btnm.btn.ina);
- } else {
- lv_obj_set_style(new_btnm, &lv_style_pretty);
- }
- }
- /*Copy an existing object*/
- else {
- lv_btnm_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
- memcpy((void*)ext->styles_btn, copy_ext->styles_btn, sizeof(ext->styles_btn));
- lv_btnm_set_map(new_btnm, lv_btnm_get_map_array(copy));
- }
-
- LV_LOG_INFO("button matrix created");
-
- return new_btnm;
-}
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set a new map. Buttons will be created/deleted according to the map. The
- * button matrix keeps a reference to the map and so the string array must not
- * be deallocated during the life of the matrix.
- * @param btnm pointer to a button matrix object
- * @param map pointer a string array. The last string has to be: "". Use "\n" to make a line break.
- */
-void lv_btnm_set_map(const lv_obj_t * btnm, const char * map[])
-{
- LV_ASSERT_OBJ(btnm, LV_OBJX_NAME);
- LV_ASSERT_NULL(map);
-
- /*
- * lv_btnm_set_map is called on receipt of signals such as
- * LV_SIGNAL_CORD_CHG regardless of whether the map has changed (e.g.
- * calling lv_obj_align on the map will trigger this).
- *
- * We check if the map has changed here to avoid overwriting changes made
- * to hidden/longpress/disabled states after the map was originally set.
- *
- * TODO: separate all map set/allocation from layout code below and skip
- * set/allocation when map hasn't changed.
- */
- lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm);
- if(!maps_are_identical(ext->map_p, map)) {
-
- /*Analyze the map and create the required number of buttons*/
- allocate_btn_areas_and_controls(btnm, map);
- }
- ext->map_p = map;
-
- /*Set size and positions of the buttons*/
- const lv_style_t * style_bg = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BG);
- lv_coord_t max_w = lv_obj_get_width(btnm) - style_bg->body.padding.left - style_bg->body.padding.right;
- lv_coord_t max_h = lv_obj_get_height(btnm) - style_bg->body.padding.top - style_bg->body.padding.bottom;
- lv_coord_t act_y = style_bg->body.padding.top;
-
- /*Count the lines to calculate button height*/
- uint8_t line_cnt = 1;
- uint8_t li;
- for(li = 0; strlen(map[li]) != 0; li++) {
- if(strcmp(map[li], "\n") == 0) line_cnt++;
- }
-
- lv_coord_t btn_h = max_h - ((line_cnt - 1) * style_bg->body.padding.inner);
- btn_h = btn_h / line_cnt;
- btn_h--; /*-1 because e.g. height = 100 means 101 pixels (0..100)*/
-
- /* Count the units and the buttons in a line
- * (A button can be 1,2,3... unit wide)*/
- uint16_t unit_cnt; /*Number of units in a row*/
- uint16_t unit_act_cnt; /*Number of units currently put in a row*/
- uint16_t btn_cnt; /*Number of buttons in a row*/
- uint16_t i_tot = 0; /*Act. index in the str map*/
- uint16_t btn_i = 0; /*Act. index of button areas*/
- const char ** map_p_tmp = map;
-
- /*Count the units and the buttons in a line*/
- while(1) {
- unit_cnt = 0;
- btn_cnt = 0;
- /*Count the buttons in a line*/
- while(strcmp(map_p_tmp[btn_cnt], "\n") != 0 && strlen(map_p_tmp[btn_cnt]) != 0) { /*Check a line*/
- unit_cnt += get_button_width(ext->ctrl_bits[btn_i + btn_cnt]);
- btn_cnt++;
- }
-
- /*Make sure the last row is at the bottom of 'btnm'*/
- if(map_p_tmp[btn_cnt][0] == '\0') { /*Last row?*/
- btn_h = lv_obj_get_height(btnm)- act_y - style_bg->body.padding.bottom - 1;
- }
-
- lv_bidi_dir_t base_dir = lv_obj_get_base_dir(btnm);
-
- /*Only deal with the non empty lines*/
- if(btn_cnt != 0) {
- /*Calculate the width of all units*/
- lv_coord_t all_unit_w = max_w - ((btn_cnt - 1) * style_bg->body.padding.inner);
-
- /*Set the button size and positions and set the texts*/
- uint16_t i;
- lv_coord_t act_x;
-
- lv_coord_t act_unit_w;
- unit_act_cnt = 0;
- for(i = 0; i < btn_cnt; i++) {
- /* one_unit_w = all_unit_w / unit_cnt
- * act_unit_w = one_unit_w * button_width
- * do this two operations but the multiply first to divide a greater number */
- act_unit_w = (all_unit_w * get_button_width(ext->ctrl_bits[btn_i])) / unit_cnt;
- act_unit_w--; /*-1 because e.g. width = 100 means 101 pixels (0..100)*/
-
- /*Always recalculate act_x because of rounding errors */
- if(base_dir == LV_BIDI_DIR_RTL) {
- act_x = (unit_act_cnt * all_unit_w) / unit_cnt + i * style_bg->body.padding.inner;
- act_x = lv_obj_get_width(btnm) - style_bg->body.padding.right - act_x - act_unit_w - 1;
- } else {
- act_x = (unit_act_cnt * all_unit_w) / unit_cnt + i * style_bg->body.padding.inner +
- style_bg->body.padding.left;
- }
- /* Set the button's area.
- * If inner padding is zero then use the prev. button x2 as x1 to avoid rounding
- * errors*/
- if(style_bg->body.padding.inner == 0 && act_x != style_bg->body.padding.left) {
- lv_area_set(&ext->button_areas[btn_i], ext->button_areas[btn_i - 1].x2, act_y, act_x + act_unit_w,
- act_y + btn_h);
- } else {
- lv_area_set(&ext->button_areas[btn_i], act_x, act_y, act_x + act_unit_w, act_y + btn_h);
- }
-
- unit_act_cnt += get_button_width(ext->ctrl_bits[btn_i]);
-
- i_tot++;
- btn_i++;
- }
- }
- act_y += btn_h + style_bg->body.padding.inner + 1;
-
- if(strlen(map_p_tmp[btn_cnt]) == 0) break; /*Break on end of map*/
- map_p_tmp = &map_p_tmp[btn_cnt + 1]; /*Set the map to the next line*/
- i_tot++; /*Skip the '\n'*/
- }
-
- lv_obj_invalidate(btnm);
-}
-
-/**
- * Set the button control map (hidden, disabled etc.) for a button matrix. The
- * control map array will be copied and so may be deallocated after this
- * function returns.
- * @param btnm pointer to a button matrix object
- * @param ctrl_map pointer to an array of `lv_btn_ctrl_t` control bytes. The
- * length of the array and position of the elements must match
- * the number and order of the individual buttons (i.e. excludes
- * newline entries).
- * An element of the map should look like e.g.:
- * `ctrl_map[0] = width | LV_BTNM_CTRL_NO_REPEAT | LV_BTNM_CTRL_TGL_ENABLE`
- */
-void lv_btnm_set_ctrl_map(const lv_obj_t * btnm, const lv_btnm_ctrl_t ctrl_map[])
-{
- LV_ASSERT_OBJ(btnm, LV_OBJX_NAME);
-
- lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm);
- memcpy(ext->ctrl_bits, ctrl_map, sizeof(lv_btnm_ctrl_t) * ext->btn_cnt);
-
- lv_btnm_set_map(btnm, ext->map_p);
-}
-
-/**
- * Set the pressed button i.e. visually highlight it.
- * Mainly used a when the btnm is in a group to show the selected button
- * @param btnm pointer to button matrix object
- * @param id index of the currently pressed button (`LV_BTNM_BTN_NONE` to unpress)
- */
-void lv_btnm_set_pressed(const lv_obj_t * btnm, uint16_t id)
-{
- LV_ASSERT_OBJ(btnm, LV_OBJX_NAME);
-
- lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm);
-
- if(id >= ext->btn_cnt && id != LV_BTNM_BTN_NONE) return;
-
- if(id == ext->btn_id_pr) return;
-
- ext->btn_id_pr = id;
- lv_obj_invalidate(btnm);
-}
-
-/**
- * Set a style of a button matrix
- * @param btnm pointer to a button matrix object
- * @param type which style should be set
- * @param style pointer to a style
- */
-void lv_btnm_set_style(lv_obj_t * btnm, lv_btnm_style_t type, const lv_style_t * style)
-{
- LV_ASSERT_OBJ(btnm, LV_OBJX_NAME);
-
- lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm);
-
- switch(type) {
- case LV_BTNM_STYLE_BG: lv_obj_set_style(btnm, style); break;
- case LV_BTNM_STYLE_BTN_REL:
- ext->styles_btn[LV_BTN_STATE_REL] = style;
- lv_obj_invalidate(btnm);
- break;
- case LV_BTNM_STYLE_BTN_PR:
- ext->styles_btn[LV_BTN_STATE_PR] = style;
- lv_obj_invalidate(btnm);
- break;
- case LV_BTNM_STYLE_BTN_TGL_REL:
- ext->styles_btn[LV_BTN_STATE_TGL_REL] = style;
- lv_obj_invalidate(btnm);
- break;
- case LV_BTNM_STYLE_BTN_TGL_PR:
- ext->styles_btn[LV_BTN_STATE_TGL_PR] = style;
- lv_obj_invalidate(btnm);
- break;
- case LV_BTNM_STYLE_BTN_INA:
- ext->styles_btn[LV_BTN_STATE_INA] = style;
- lv_obj_invalidate(btnm);
- break;
- }
-}
-
-/**
- * Enable recoloring of button's texts
- * @param btnm pointer to button matrix object
- * @param en true: enable recoloring; false: disable
- */
-void lv_btnm_set_recolor(const lv_obj_t * btnm, bool en)
-{
- LV_ASSERT_OBJ(btnm, LV_OBJX_NAME);
-
- lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm);
-
- ext->recolor = en;
- lv_obj_invalidate(btnm);
-}
-
-/**
- * Set the attributes of a button of the button matrix
- * @param btnm pointer to button matrix object
- * @param btn_id 0 based index of the button to modify. (Not counting new lines)
- */
-void lv_btnm_set_btn_ctrl(const lv_obj_t * btnm, uint16_t btn_id, lv_btnm_ctrl_t ctrl)
-{
- LV_ASSERT_OBJ(btnm, LV_OBJX_NAME);
-
- lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm);
-
- if(btn_id >= ext->btn_cnt) return;
-
- ext->ctrl_bits[btn_id] |= ctrl;
- invalidate_button_area(btnm, btn_id);
-}
-
-/**
- * Clear the attributes of a button of the button matrix
- * @param btnm pointer to button matrix object
- * @param btn_id 0 based index of the button to modify. (Not counting new lines)
- */
-void lv_btnm_clear_btn_ctrl(const lv_obj_t * btnm, uint16_t btn_id, lv_btnm_ctrl_t ctrl)
-{
- LV_ASSERT_OBJ(btnm, LV_OBJX_NAME);
-
- lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm);
-
- if(btn_id >= ext->btn_cnt) return;
-
- ext->ctrl_bits[btn_id] &= (~ctrl);
- invalidate_button_area(btnm, btn_id);
-}
-
-/**
- * Set the attributes of all buttons of a button matrix
- * @param btnm pointer to a button matrix object
- * @param ctrl attribute(s) to set from `lv_btnm_ctrl_t`. Values can be ORed.
- */
-void lv_btnm_set_btn_ctrl_all(lv_obj_t * btnm, lv_btnm_ctrl_t ctrl)
-{
- LV_ASSERT_OBJ(btnm, LV_OBJX_NAME);
-
- lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm);
- uint16_t i;
- for(i = 0; i < ext->btn_cnt; i++) {
- lv_btnm_set_btn_ctrl(btnm, i, ctrl);
- }
-}
-
-/**
- * Clear the attributes of all buttons of a button matrix
- * @param btnm pointer to a button matrix object
- * @param ctrl attribute(s) to set from `lv_btnm_ctrl_t`. Values can be ORed.
- * @param en true: set the attributes; false: clear the attributes
- */
-void lv_btnm_clear_btn_ctrl_all(lv_obj_t * btnm, lv_btnm_ctrl_t ctrl)
-{
- LV_ASSERT_OBJ(btnm, LV_OBJX_NAME);
-
- lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm);
- uint16_t i;
- for(i = 0; i < ext->btn_cnt; i++) {
- lv_btnm_clear_btn_ctrl(btnm, i, ctrl);
- }
-}
-
-/**
- * Set a single buttons relative width.
- * This method will cause the matrix be regenerated and is a relatively
- * expensive operation. It is recommended that initial width be specified using
- * `lv_btnm_set_ctrl_map` and this method only be used for dynamic changes.
- * @param btnm pointer to button matrix object
- * @param btn_id 0 based index of the button to modify.
- * @param width Relative width compared to the buttons in the same row. [1..7]
- */
-void lv_btnm_set_btn_width(const lv_obj_t * btnm, uint16_t btn_id, uint8_t width)
-{
- LV_ASSERT_OBJ(btnm, LV_OBJX_NAME);
-
-
- lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm);
- if(btn_id >= ext->btn_cnt) return;
- ext->ctrl_bits[btn_id] &= (~LV_BTNM_WIDTH_MASK);
- ext->ctrl_bits[btn_id] |= (LV_BTNM_WIDTH_MASK & width);
-
- lv_btnm_set_map(btnm, ext->map_p);
-}
-
-/**
- * Make the button matrix like a selector widget (only one button may be toggled at a time).
- *
- * Toggling must be enabled on the buttons you want to be selected with `lv_btnm_set_ctrl` or
- * `lv_btnm_set_btn_ctrl_all`.
- *
- * @param btnm Button matrix object
- * @param one_toggle Whether "one toggle" mode is enabled
- */
-void lv_btnm_set_one_toggle(lv_obj_t * btnm, bool one_toggle)
-{
- LV_ASSERT_OBJ(btnm, LV_OBJX_NAME);
-
- lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm);
- ext->one_toggle = one_toggle;
-
- /*If more than one button is toggled only the first one should be*/
- make_one_button_toggled(btnm, 0);
-}
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the current map of a button matrix
- * @param btnm pointer to a button matrix object
- * @return the current map
- */
-const char ** lv_btnm_get_map_array(const lv_obj_t * btnm)
-{
- LV_ASSERT_OBJ(btnm, LV_OBJX_NAME);
-
- lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm);
- return ext->map_p;
-}
-
-/**
- * Check whether the button's text can use recolor or not
- * @param btnm pointer to button matrix object
- * @return true: text recolor enable; false: disabled
- */
-bool lv_btnm_get_recolor(const lv_obj_t * btnm)
-{
- LV_ASSERT_OBJ(btnm, LV_OBJX_NAME);
-
- lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm);
-
- return ext->recolor;
-}
-
-/**
- * Get the index of the lastly "activated" button by the user (pressed, released etc)
- * Useful in the the `event_cb` to get the text of the button, check if hidden etc.
- * @param btnm pointer to button matrix object
- * @return index of the last released button (LV_BTNM_BTN_NONE: if unset)
- */
-uint16_t lv_btnm_get_active_btn(const lv_obj_t * btnm)
-{
- LV_ASSERT_OBJ(btnm, LV_OBJX_NAME);
-
- lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm);
- return ext->btn_id_act;
-}
-
-/**
- * Get the text of the lastly "activated" button by the user (pressed, released etc)
- * Useful in the the `event_cb`
- * @param btnm pointer to button matrix object
- * @return text of the last released button (NULL: if unset)
- */
-const char * lv_btnm_get_active_btn_text(const lv_obj_t * btnm)
-{
- LV_ASSERT_OBJ(btnm, LV_OBJX_NAME);
-
- lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm);
- if(ext->btn_id_act != LV_BTNM_BTN_NONE) {
- return lv_btnm_get_btn_text(btnm, ext->btn_id_act);
- } else {
- return NULL;
- }
-}
-
-/**
- * Get the pressed button's index.
- * The button be really pressed by the user or manually set to pressed with `lv_btnm_set_pressed`
- * @param btnm pointer to button matrix object
- * @return index of the pressed button (LV_BTNM_BTN_NONE: if unset)
- */
-uint16_t lv_btnm_get_pressed_btn(const lv_obj_t * btnm)
-{
- LV_ASSERT_OBJ(btnm, LV_OBJX_NAME);
-
- lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm);
- return ext->btn_id_pr;
-}
-
-/**
- * Get the button's text
- * @param btnm pointer to button matrix object
- * @param btn_id the index a button not counting new line characters. (The return value of
- * lv_btnm_get_pressed/released)
- * @return text of btn_index` button
- */
-const char * lv_btnm_get_btn_text(const lv_obj_t * btnm, uint16_t btn_id)
-{
- LV_ASSERT_OBJ(btnm, LV_OBJX_NAME);
-
- lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm);
- if(btn_id > ext->btn_cnt) return NULL;
-
- uint16_t txt_i = 0;
- uint16_t btn_i = 0;
-
- /* Search the text of ext->btn_pr the buttons text in the map
- * Skip "\n"-s*/
- while(btn_i != btn_id) {
- btn_i++;
- txt_i++;
- if(strcmp(ext->map_p[txt_i], "\n") == 0) txt_i++;
- }
-
- if(btn_i == ext->btn_cnt) return NULL;
-
- return ext->map_p[txt_i];
-}
-
-/**
- * Get the whether a control value is enabled or disabled for button of a button matrix
- * @param btnm pointer to a button matrix object
- * @param btn_id the index a button not counting new line characters. (E.g. the return value of
- * lv_btnm_get_pressed/released)
- * @param ctrl control values to check (ORed value can be used)
- * @return true: long press repeat is disabled; false: long press repeat enabled
- */
-bool lv_btnm_get_btn_ctrl(lv_obj_t * btnm, uint16_t btn_id, lv_btnm_ctrl_t ctrl)
-{
- LV_ASSERT_OBJ(btnm, LV_OBJX_NAME);
-
- lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm);
- if(btn_id >= ext->btn_cnt) return false;
-
- return ext->ctrl_bits[btn_id] & ctrl ? true : false;
-}
-
-/**
- * Get a style of a button matrix
- * @param btnm pointer to a button matrix object
- * @param type which style should be get
- * @return style pointer to a style
- */
-const lv_style_t * lv_btnm_get_style(const lv_obj_t * btnm, lv_btnm_style_t type)
-{
- LV_ASSERT_OBJ(btnm, LV_OBJX_NAME);
-
- const lv_style_t * style = NULL;
- lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm);
-
- switch(type) {
- case LV_BTNM_STYLE_BG: style = lv_obj_get_style(btnm); break;
- case LV_BTNM_STYLE_BTN_REL: style = ext->styles_btn[LV_BTN_STATE_REL]; break;
- case LV_BTNM_STYLE_BTN_PR: style = ext->styles_btn[LV_BTN_STATE_PR]; break;
- case LV_BTNM_STYLE_BTN_TGL_REL: style = ext->styles_btn[LV_BTN_STATE_TGL_REL]; break;
- case LV_BTNM_STYLE_BTN_TGL_PR: style = ext->styles_btn[LV_BTN_STATE_TGL_PR]; break;
- case LV_BTNM_STYLE_BTN_INA: style = ext->styles_btn[LV_BTN_STATE_INA]; break;
- default: style = NULL; break;
- }
-
- return style;
-}
-
-/**
- * Find whether "one toggle" mode is enabled.
- * @param btnm Button matrix object
- * @return whether "one toggle" mode is enabled
- */
-bool lv_btnm_get_one_toggle(const lv_obj_t * btnm)
-{
- LV_ASSERT_OBJ(btnm, LV_OBJX_NAME);
-
- lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm);
-
- return ext->one_toggle;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Handle the drawing related tasks of the button matrixs
- * @param btnm pointer to a button matrix object
- * @param mask the object will be drawn only in this area
- * @param mode LV_DESIGN_COVER_CHK: only check if the object fully covers the 'mask_p' area
- * (return 'true' if yes)
- * LV_DESIGN_DRAW: draw the object (always return 'true')
- * LV_DESIGN_DRAW_POST: drawing after every children are drawn
- * @param return true/false, depends on 'mode'
- */
-static bool lv_btnm_design(lv_obj_t * btnm, const lv_area_t * mask, lv_design_mode_t mode)
-{
- if(mode == LV_DESIGN_COVER_CHK) {
- return ancestor_design_f(btnm, mask, mode);
- /*Return false if the object is not covers the mask_p area*/
- }
- /*Draw the object*/
- else if(mode == LV_DESIGN_DRAW_MAIN) {
- ancestor_design_f(btnm, mask, mode);
-
- lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm);
- const lv_style_t * bg_style = lv_obj_get_style(btnm);
- const lv_style_t * btn_style;
- lv_opa_t opa_scale = lv_obj_get_opa_scale(btnm);
-
- lv_area_t area_btnm;
- lv_obj_get_coords(btnm, &area_btnm);
-
- lv_area_t area_tmp;
- lv_coord_t btn_w;
- lv_coord_t btn_h;
-
- uint16_t btn_i = 0;
- uint16_t txt_i = 0;
- lv_style_t style_tmp;
- lv_txt_flag_t txt_flag = LV_TXT_FLAG_NONE;
-
- if(ext->recolor) txt_flag = LV_TXT_FLAG_RECOLOR;
- for(btn_i = 0; btn_i < ext->btn_cnt; btn_i++, txt_i++) {
- /*Search the next valid text in the map*/
- while(strcmp(ext->map_p[txt_i], "\n") == 0) {
- txt_i++;
- }
-
- /*Skip hidden buttons*/
- if(button_is_hidden(ext->ctrl_bits[btn_i])) continue;
-
- lv_area_copy(&area_tmp, &ext->button_areas[btn_i]);
- area_tmp.x1 += area_btnm.x1;
- area_tmp.y1 += area_btnm.y1;
- area_tmp.x2 += area_btnm.x1;
- area_tmp.y2 += area_btnm.y1;
-
- btn_w = lv_area_get_width(&area_tmp);
- btn_h = lv_area_get_height(&area_tmp);
-
- /*Load the style*/
- bool tgl_state = button_get_tgl_state(ext->ctrl_bits[btn_i]);
- if(button_is_inactive(ext->ctrl_bits[btn_i]))
- btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_INA);
- else if(btn_i != ext->btn_id_pr && tgl_state == false)
- btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_REL);
- else if(btn_i == ext->btn_id_pr && tgl_state == false)
- btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_PR);
- else if(btn_i != ext->btn_id_pr && tgl_state == true)
- btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_TGL_REL);
- else if(btn_i == ext->btn_id_pr && tgl_state == true)
- btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_TGL_PR);
- else
- btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_REL); /*Not possible option, just to be sure*/
-
- lv_style_copy(&style_tmp, btn_style);
-
- /*Remove borders on the edges if `LV_BORDER_INTERNAL`*/
- if(style_tmp.body.border.part & LV_BORDER_INTERNAL) {
- if(area_tmp.y1 == btnm->coords.y1 + bg_style->body.padding.top) {
- style_tmp.body.border.part &= ~LV_BORDER_TOP;
- }
- if(area_tmp.y2 == btnm->coords.y2 - bg_style->body.padding.bottom) {
- style_tmp.body.border.part &= ~LV_BORDER_BOTTOM;
- }
-
- if(txt_i == 0) {
- style_tmp.body.border.part &= ~LV_BORDER_LEFT;
- } else if(strcmp(ext->map_p[txt_i - 1], "\n") == 0) {
- style_tmp.body.border.part &= ~LV_BORDER_LEFT;
- }
-
- if(ext->map_p[txt_i + 1][0] == '\0' || strcmp(ext->map_p[txt_i + 1], "\n") == 0) {
- style_tmp.body.border.part &= ~LV_BORDER_RIGHT;
- }
- }
- lv_draw_rect(&area_tmp, mask, &style_tmp, opa_scale);
-
- /*Calculate the size of the text*/
- if(btn_style->glass) btn_style = bg_style;
- const lv_font_t * font = btn_style->text.font;
- lv_point_t txt_size;
- lv_txt_get_size(&txt_size, ext->map_p[txt_i], font, btn_style->text.letter_space,
- btn_style->text.line_space, lv_area_get_width(&area_btnm), txt_flag);
-
- area_tmp.x1 += (btn_w - txt_size.x) / 2;
- area_tmp.y1 += (btn_h - txt_size.y) / 2;
- area_tmp.x2 = area_tmp.x1 + txt_size.x;
- area_tmp.y2 = area_tmp.y1 + txt_size.y;
-
- lv_draw_label(&area_tmp, mask, btn_style, opa_scale, ext->map_p[txt_i], txt_flag, NULL, NULL, NULL, lv_obj_get_base_dir(btnm));
- }
- }
-
- return true;
-}
-
-/**
- * Signal function of the button matrix
- * @param btnm pointer to a button matrix object
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param)
-{
- lv_res_t res;
-
- /* Include the ancient signal function */
- res = ancestor_signal(btnm, sign, param);
- if(res != LV_RES_OK) return res;
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);
-
- lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm);
- lv_point_t p;
- if(sign == LV_SIGNAL_CLEANUP) {
- lv_mem_free(ext->button_areas);
- lv_mem_free(ext->ctrl_bits);
- } else if(sign == LV_SIGNAL_STYLE_CHG || sign == LV_SIGNAL_CORD_CHG) {
- lv_btnm_set_map(btnm, ext->map_p);
- } else if(sign == LV_SIGNAL_PRESSED) {
- lv_indev_t * indev = lv_indev_get_act();
- if(lv_indev_get_type(indev) == LV_INDEV_TYPE_POINTER || lv_indev_get_type(indev) == LV_INDEV_TYPE_BUTTON) {
- uint16_t btn_pr;
- /*Search the pressed area*/
- lv_indev_get_point(param, &p);
- btn_pr = get_button_from_point(btnm, &p);
-
- invalidate_button_area(btnm, ext->btn_id_pr) /*Invalidate the old area*/;
- ext->btn_id_pr = btn_pr;
- ext->btn_id_act = btn_pr;
- invalidate_button_area(btnm, ext->btn_id_pr); /*Invalidate the new area*/
- }
- if(ext->btn_id_act != LV_BTNM_BTN_NONE) {
- if(button_is_click_trig(ext->ctrl_bits[ext->btn_id_act]) == false &&
- button_is_inactive(ext->ctrl_bits[ext->btn_id_act]) == false &&
- button_is_hidden(ext->ctrl_bits[ext->btn_id_act]) == false) {
- uint32_t b = ext->btn_id_act;
- res = lv_event_send(btnm, LV_EVENT_VALUE_CHANGED, &b);
- }
- }
- } else if(sign == LV_SIGNAL_PRESSING) {
- uint16_t btn_pr;
- /*Search the pressed area*/
- lv_indev_get_point(param, &p);
- btn_pr = get_button_from_point(btnm, &p);
- /*Invalidate to old and the new areas*/;
- if(btn_pr != ext->btn_id_pr) {
- lv_indev_reset_long_press(param); /*Start the log press time again on the new button*/
- if(ext->btn_id_pr != LV_BTNM_BTN_NONE) {
- invalidate_button_area(btnm, ext->btn_id_pr);
- }
- if(btn_pr != LV_BTNM_BTN_NONE) {
- uint32_t b = ext->btn_id_act;
- res = lv_event_send(btnm, LV_EVENT_VALUE_CHANGED, &b);
- if(res == LV_RES_OK) {
- invalidate_button_area(btnm, btn_pr);
- }
- }
- }
-
- ext->btn_id_pr = btn_pr;
- ext->btn_id_act = btn_pr;
- } else if(sign == LV_SIGNAL_RELEASED) {
- if(ext->btn_id_pr != LV_BTNM_BTN_NONE) {
- /*Toggle the button if enabled*/
- if(button_is_tgl_enabled(ext->ctrl_bits[ext->btn_id_pr]) &&
- !button_is_inactive(ext->ctrl_bits[ext->btn_id_pr])) {
- if(button_get_tgl_state(ext->ctrl_bits[ext->btn_id_pr])) {
- ext->ctrl_bits[ext->btn_id_pr] &= (~LV_BTNM_CTRL_TGL_STATE);
- } else {
- ext->ctrl_bits[ext->btn_id_pr] |= LV_BTNM_CTRL_TGL_STATE;
- }
- if(ext->one_toggle) make_one_button_toggled(btnm, ext->btn_id_pr);
- }
-
- /*Invalidate to old pressed area*/;
- invalidate_button_area(btnm, ext->btn_id_pr);
-
-#if LV_USE_GROUP
- /*Leave the clicked button when releases if this not the focused object in a group*/
- lv_group_t * g = lv_obj_get_group(btnm);
- if(lv_group_get_focused(g) != btnm) {
- ext->btn_id_pr = LV_BTNM_BTN_NONE;
- }
-#else
- ext->btn_id_pr = LV_BTNM_BTN_NONE;
-#endif
-
- if(button_is_click_trig(ext->ctrl_bits[ext->btn_id_act]) == true &&
- button_is_inactive(ext->ctrl_bits[ext->btn_id_act]) == false &&
- button_is_hidden(ext->ctrl_bits[ext->btn_id_act]) == false) {
- uint32_t b = ext->btn_id_act;
- res = lv_event_send(btnm, LV_EVENT_VALUE_CHANGED, &b);
- }
- }
- } else if(sign == LV_SIGNAL_LONG_PRESS_REP) {
- if(ext->btn_id_act != LV_BTNM_BTN_NONE) {
- if(button_is_repeat_disabled(ext->ctrl_bits[ext->btn_id_act]) == false &&
- button_is_inactive(ext->ctrl_bits[ext->btn_id_act]) == false &&
- button_is_hidden(ext->ctrl_bits[ext->btn_id_act]) == false) {
- uint32_t b = ext->btn_id_act;
- res = lv_event_send(btnm, LV_EVENT_VALUE_CHANGED, &b);
- }
- }
- } else if(sign == LV_SIGNAL_PRESS_LOST || sign == LV_SIGNAL_DEFOCUS) {
- ext->btn_id_pr = LV_BTNM_BTN_NONE;
- ext->btn_id_act = LV_BTNM_BTN_NONE;
- lv_obj_invalidate(btnm);
- } else if(sign == LV_SIGNAL_FOCUS) {
-#if LV_USE_GROUP
- lv_indev_t * indev = lv_indev_get_act();
- lv_indev_type_t indev_type = lv_indev_get_type(indev);
-
- /*If not focused by an input device assume the last input device*/
- if(indev == NULL) {
- indev = lv_indev_get_next(NULL);
- indev_type = lv_indev_get_type(indev);
- }
-
- if(indev_type == LV_INDEV_TYPE_POINTER) {
- /*Select the clicked button*/
- lv_point_t p1;
- lv_indev_get_point(indev, &p1);
- uint16_t btn_i = get_button_from_point(btnm, &p1);
- ext->btn_id_pr = btn_i;
-
- } else if(indev_type == LV_INDEV_TYPE_ENCODER) {
- /*In navigation mode don't select any button but in edit mode select the fist*/
- if(lv_group_get_editing(lv_obj_get_group(btnm)))
- ext->btn_id_pr = 0;
- else
- ext->btn_id_pr = LV_BTNM_BTN_NONE;
- } else {
- ext->btn_id_pr = 0;
- }
-#else
- ext->btn_id_pr = 0;
-#endif
-
- ext->btn_id_act = ext->btn_id_pr;
- lv_obj_invalidate(btnm);
- } else if(sign == LV_SIGNAL_CONTROL) {
- char c = *((char *)param);
- if(c == LV_KEY_RIGHT) {
- if(ext->btn_id_pr == LV_BTNM_BTN_NONE)
- ext->btn_id_pr = 0;
- else
- ext->btn_id_pr++;
- if(ext->btn_id_pr >= ext->btn_cnt - 1) ext->btn_id_pr = ext->btn_cnt - 1;
- ext->btn_id_act = ext->btn_id_pr;
- lv_obj_invalidate(btnm);
- } else if(c == LV_KEY_LEFT) {
- if(ext->btn_id_pr == LV_BTNM_BTN_NONE) ext->btn_id_pr = 0;
- if(ext->btn_id_pr > 0) ext->btn_id_pr--;
- ext->btn_id_act = ext->btn_id_pr;
- lv_obj_invalidate(btnm);
- } else if(c == LV_KEY_DOWN) {
- const lv_style_t * style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BG);
- /*Find the area below the the current*/
- if(ext->btn_id_pr == LV_BTNM_BTN_NONE) {
- ext->btn_id_pr = 0;
- } else {
- uint16_t area_below;
- lv_coord_t pr_center =
- ext->button_areas[ext->btn_id_pr].x1 + (lv_area_get_width(&ext->button_areas[ext->btn_id_pr]) >> 1);
-
- for(area_below = ext->btn_id_pr; area_below < ext->btn_cnt; area_below++) {
- if(ext->button_areas[area_below].y1 > ext->button_areas[ext->btn_id_pr].y1 &&
- pr_center >= ext->button_areas[area_below].x1 &&
- pr_center <= ext->button_areas[area_below].x2 + style->body.padding.inner) {
- break;
- }
- }
-
- if(area_below < ext->btn_cnt) ext->btn_id_pr = area_below;
- }
- ext->btn_id_act = ext->btn_id_pr;
- lv_obj_invalidate(btnm);
- } else if(c == LV_KEY_UP) {
- const lv_style_t * style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BG);
- /*Find the area below the the current*/
- if(ext->btn_id_pr == LV_BTNM_BTN_NONE) {
- ext->btn_id_pr = 0;
- } else {
- int16_t area_above;
- lv_coord_t pr_center =
- ext->button_areas[ext->btn_id_pr].x1 + (lv_area_get_width(&ext->button_areas[ext->btn_id_pr]) >> 1);
-
- for(area_above = ext->btn_id_pr; area_above >= 0; area_above--) {
- if(ext->button_areas[area_above].y1 < ext->button_areas[ext->btn_id_pr].y1 &&
- pr_center >= ext->button_areas[area_above].x1 - style->body.padding.inner &&
- pr_center <= ext->button_areas[area_above].x2) {
- break;
- }
- }
- if(area_above >= 0) ext->btn_id_pr = area_above;
- }
- ext->btn_id_act = ext->btn_id_pr;
- lv_obj_invalidate(btnm);
- }
- } else if(sign == LV_SIGNAL_GET_EDITABLE) {
- bool * editable = (bool *)param;
- *editable = true;
- }
- return res;
-}
-
-/**
- * Create the required number of buttons and control bytes according to a map
- * @param btnm pointer to button matrix object
- * @param map_p pointer to a string array
- */
-static void allocate_btn_areas_and_controls(const lv_obj_t * btnm, const char ** map)
-{
- /*Count the buttons in the map*/
- uint16_t btn_cnt = 0;
- uint16_t i = 0;
- while(strlen(map[i]) != 0) {
- if(strcmp(map[i], "\n") != 0) { /*Do not count line breaks*/
- btn_cnt++;
- }
- i++;
- }
-
- lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm);
-
- if(ext->button_areas != NULL) {
- lv_mem_free(ext->button_areas);
- ext->button_areas = NULL;
- }
- if(ext->ctrl_bits != NULL) {
- lv_mem_free(ext->ctrl_bits);
- ext->ctrl_bits = NULL;
- }
-
- ext->button_areas = lv_mem_alloc(sizeof(lv_area_t) * btn_cnt);
- LV_ASSERT_MEM(ext->button_areas);
- ext->ctrl_bits = lv_mem_alloc(sizeof(lv_btnm_ctrl_t) * btn_cnt);
- LV_ASSERT_MEM(ext->ctrl_bits);
- if(ext->button_areas == NULL || ext->ctrl_bits == NULL) btn_cnt = 0;
-
- memset(ext->ctrl_bits, 0, sizeof(lv_btnm_ctrl_t) * btn_cnt);
-
- ext->btn_cnt = btn_cnt;
-}
-
-/**
- * Get the width of a button in units (default is 1).
- * @param ctrl_bits least significant 3 bits used (1..7 valid values)
- * @return the width of the button in units
- */
-static uint8_t get_button_width(lv_btnm_ctrl_t ctrl_bits)
-{
- uint8_t w = ctrl_bits & LV_BTNM_WIDTH_MASK;
- return w != 0 ? w : 1;
-}
-
-static bool button_is_hidden(lv_btnm_ctrl_t ctrl_bits)
-{
- return ctrl_bits & LV_BTNM_CTRL_HIDDEN ? true : false;
-}
-
-static bool button_is_repeat_disabled(lv_btnm_ctrl_t ctrl_bits)
-{
- return ctrl_bits & LV_BTNM_CTRL_NO_REPEAT ? true : false;
-}
-
-static bool button_is_inactive(lv_btnm_ctrl_t ctrl_bits)
-{
- return ctrl_bits & LV_BTNM_CTRL_INACTIVE ? true : false;
-}
-
-static bool button_is_click_trig(lv_btnm_ctrl_t ctrl_bits)
-{
- return ctrl_bits & LV_BTNM_CTRL_CLICK_TRIG ? true : false;
-}
-
-static bool button_is_tgl_enabled(lv_btnm_ctrl_t ctrl_bits)
-{
- return ctrl_bits & LV_BTNM_CTRL_TGL_ENABLE ? true : false;
-}
-
-static bool button_get_tgl_state(lv_btnm_ctrl_t ctrl_bits)
-{
- return ctrl_bits & LV_BTNM_CTRL_TGL_STATE ? true : false;
-}
-
-/**
- * Gives the button id of a button under a given point
- * @param btnm pointer to a button matrix object
- * @param p a point with absolute coordinates
- * @return the id of the button or LV_BTNM_BTN_NONE.
- */
-static uint16_t get_button_from_point(lv_obj_t * btnm, lv_point_t * p)
-{
- lv_area_t btnm_cords;
- lv_area_t btn_area;
- lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm);
- uint16_t i;
- lv_obj_get_coords(btnm, &btnm_cords);
-
- for(i = 0; i < ext->btn_cnt; i++) {
- lv_area_copy(&btn_area, &ext->button_areas[i]);
- btn_area.x1 += btnm_cords.x1;
- btn_area.y1 += btnm_cords.y1;
- btn_area.x2 += btnm_cords.x1;
- btn_area.y2 += btnm_cords.y1;
- if(lv_area_is_point_on(&btn_area, p) != false) {
- break;
- }
- }
-
- if(i == ext->btn_cnt) i = LV_BTNM_BTN_NONE;
-
- return i;
-}
-
-static void invalidate_button_area(const lv_obj_t * btnm, uint16_t btn_idx)
-{
- if(btn_idx == LV_BTNM_BTN_NONE) return;
-
- lv_area_t btn_area;
- lv_area_t btnm_area;
-
- lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm);
- lv_area_copy(&btn_area, &ext->button_areas[btn_idx]);
- lv_obj_get_coords(btnm, &btnm_area);
-
- /* Convert relative coordinates to absolute */
- btn_area.x1 += btnm_area.x1;
- btn_area.y1 += btnm_area.y1;
- btn_area.x2 += btnm_area.x1;
- btn_area.y2 += btnm_area.y1;
-
- lv_obj_invalidate_area(btnm, &btn_area);
-}
-
-/**
- * Compares two button matrix maps for equality
- * @param map1 map to compare
- * @param map2 map to compare
- * @return true if maps are identical in length and content
- */
-static bool maps_are_identical(const char ** map1, const char ** map2)
-{
- if(map1 == map2) return true;
- if(map1 == NULL || map2 == NULL) return map1 == map2;
-
- uint16_t i = 0;
- while(map1[i][0] != '\0' && map2[i][0] != '\0') {
- if(strcmp(map1[i], map2[i]) != 0) return false;
- i++;
- }
- return map1[i][0] == '\0' && map2[i][0] == '\0';
-}
-
-/**
- * Enforces a single button being toggled on the button matrix.
- * It simply clears the toggle flag on other buttons.
- * @param btnm Button matrix object
- * @param btn_idx Button that should remain toggled
- */
-static void make_one_button_toggled(lv_obj_t * btnm, uint16_t btn_idx)
-{
- /*Save whether the button was toggled*/
- bool was_toggled = lv_btnm_get_btn_ctrl(btnm, btn_idx, LV_BTNM_CTRL_TGL_STATE);
-
- lv_btnm_clear_btn_ctrl_all(btnm, LV_BTNM_CTRL_TGL_STATE);
-
- if(was_toggled) lv_btnm_set_btn_ctrl(btnm, btn_idx, LV_BTNM_CTRL_TGL_STATE);
-}
-
-#endif
diff --git a/src/libs/lvgl/src/lv_objx/lv_btnm.h b/src/libs/lvgl/src/lv_objx/lv_btnm.h
deleted file mode 100644
index 44bc4efb..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_btnm.h
+++ /dev/null
@@ -1,276 +0,0 @@
-/**
- * @file lv_btnm.h
- *
- */
-
-#ifndef LV_BTNM_H
-#define LV_BTNM_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_BTNM != 0
-
-#include "../lv_core/lv_obj.h"
-#include "lv_label.h"
-#include "lv_btn.h"
-
-/*********************
- * DEFINES
- *********************/
-#define LV_BTNM_WIDTH_MASK 0x0007
-#define LV_BTNM_BTN_NONE 0xFFFF
-
-LV_EXPORT_CONST_INT(LV_BTNM_BTN_NONE);
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/** Type to store button control bits (disabled, hidden etc.) */
-enum {
- LV_BTNM_CTRL_HIDDEN = 0x0008, /**< Button hidden */
- LV_BTNM_CTRL_NO_REPEAT = 0x0010, /**< Do not repeat press this button. */
- LV_BTNM_CTRL_INACTIVE = 0x0020, /**< Disable this button. */
- LV_BTNM_CTRL_TGL_ENABLE = 0x0040, /**< Button *can* be toggled. */
- LV_BTNM_CTRL_TGL_STATE = 0x0080, /**< Button is currently toggled (e.g. checked). */
- LV_BTNM_CTRL_CLICK_TRIG = 0x0100, /**< 1: Send LV_EVENT_SELECTED on CLICK, 0: Send LV_EVENT_SELECTED on PRESS*/
-};
-typedef uint16_t lv_btnm_ctrl_t;
-
-/*Data of button matrix*/
-typedef struct
-{
- /*No inherited ext.*/ /*Ext. of ancestor*/
- /*New data for this type */
- const char ** map_p; /*Pointer to the current map*/
- lv_area_t * button_areas; /*Array of areas of buttons*/
- lv_btnm_ctrl_t * ctrl_bits; /*Array of control bytes*/
- const lv_style_t * styles_btn[_LV_BTN_STATE_NUM]; /*Styles of buttons in each state*/
- uint16_t btn_cnt; /*Number of button in 'map_p'(Handled by the library)*/
- uint16_t btn_id_pr; /*Index of the currently pressed button or LV_BTNM_BTN_NONE*/
- uint16_t btn_id_act; /*Index of the active button (being pressed/released etc) or LV_BTNM_BTN_NONE */
- uint8_t recolor : 1; /*Enable button recoloring*/
- uint8_t one_toggle : 1; /*Single button toggled at once*/
-} lv_btnm_ext_t;
-
-enum {
- LV_BTNM_STYLE_BG,
- LV_BTNM_STYLE_BTN_REL,
- LV_BTNM_STYLE_BTN_PR,
- LV_BTNM_STYLE_BTN_TGL_REL,
- LV_BTNM_STYLE_BTN_TGL_PR,
- LV_BTNM_STYLE_BTN_INA,
-};
-typedef uint8_t lv_btnm_style_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Create a button matrix objects
- * @param par pointer to an object, it will be the parent of the new button matrix
- * @param copy pointer to a button matrix object, if not NULL then the new object will be copied
- * from it
- * @return pointer to the created button matrix
- */
-lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy);
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set a new map. Buttons will be created/deleted according to the map. The
- * button matrix keeps a reference to the map and so the string array must not
- * be deallocated during the life of the matrix.
- * @param btnm pointer to a button matrix object
- * @param map pointer a string array. The last string has to be: "". Use "\n" to make a line break.
- */
-void lv_btnm_set_map(const lv_obj_t * btnm, const char * map[]);
-
-/**
- * Set the button control map (hidden, disabled etc.) for a button matrix. The
- * control map array will be copied and so may be deallocated after this
- * function returns.
- * @param btnm pointer to a button matrix object
- * @param ctrl_map pointer to an array of `lv_btn_ctrl_t` control bytes. The
- * length of the array and position of the elements must match
- * the number and order of the individual buttons (i.e. excludes
- * newline entries).
- * An element of the map should look like e.g.:
- * `ctrl_map[0] = width | LV_BTNM_CTRL_NO_REPEAT | LV_BTNM_CTRL_TGL_ENABLE`
- */
-void lv_btnm_set_ctrl_map(const lv_obj_t * btnm, const lv_btnm_ctrl_t ctrl_map[]);
-
-/**
- * Set the pressed button i.e. visually highlight it.
- * Mainly used a when the btnm is in a group to show the selected button
- * @param btnm pointer to button matrix object
- * @param id index of the currently pressed button (`LV_BTNM_BTN_NONE` to unpress)
- */
-void lv_btnm_set_pressed(const lv_obj_t * btnm, uint16_t id);
-
-/**
- * Set a style of a button matrix
- * @param btnm pointer to a button matrix object
- * @param type which style should be set
- * @param style pointer to a style
- */
-void lv_btnm_set_style(lv_obj_t * btnm, lv_btnm_style_t type, const lv_style_t * style);
-
-/**
- * Enable recoloring of button's texts
- * @param btnm pointer to button matrix object
- * @param en true: enable recoloring; false: disable
- */
-void lv_btnm_set_recolor(const lv_obj_t * btnm, bool en);
-
-/**
- * Set the attributes of a button of the button matrix
- * @param btnm pointer to button matrix object
- * @param btn_id 0 based index of the button to modify. (Not counting new lines)
- */
-void lv_btnm_set_btn_ctrl(const lv_obj_t * btnm, uint16_t btn_id, lv_btnm_ctrl_t ctrl);
-
-/**
- * Clear the attributes of a button of the button matrix
- * @param btnm pointer to button matrix object
- * @param btn_id 0 based index of the button to modify. (Not counting new lines)
- */
-void lv_btnm_clear_btn_ctrl(const lv_obj_t * btnm, uint16_t btn_id, lv_btnm_ctrl_t ctrl);
-
-/**
- * Set the attributes of all buttons of a button matrix
- * @param btnm pointer to a button matrix object
- * @param ctrl attribute(s) to set from `lv_btnm_ctrl_t`. Values can be ORed.
- */
-void lv_btnm_set_btn_ctrl_all(lv_obj_t * btnm, lv_btnm_ctrl_t ctrl);
-
-/**
- * Clear the attributes of all buttons of a button matrix
- * @param btnm pointer to a button matrix object
- * @param ctrl attribute(s) to set from `lv_btnm_ctrl_t`. Values can be ORed.
- * @param en true: set the attributes; false: clear the attributes
- */
-void lv_btnm_clear_btn_ctrl_all(lv_obj_t * btnm, lv_btnm_ctrl_t ctrl);
-
-/**
- * Set a single buttons relative width.
- * This method will cause the matrix be regenerated and is a relatively
- * expensive operation. It is recommended that initial width be specified using
- * `lv_btnm_set_ctrl_map` and this method only be used for dynamic changes.
- * @param btnm pointer to button matrix object
- * @param btn_id 0 based index of the button to modify.
- * @param width Relative width compared to the buttons in the same row. [1..7]
- */
-void lv_btnm_set_btn_width(const lv_obj_t * btnm, uint16_t btn_id, uint8_t width);
-
-/**
- * Make the button matrix like a selector widget (only one button may be toggled at a time).
- *
- * Toggling must be enabled on the buttons you want to be selected with `lv_btnm_set_ctrl` or
- * `lv_btnm_set_btn_ctrl_all`.
- *
- * @param btnm Button matrix object
- * @param one_toggle Whether "one toggle" mode is enabled
- */
-void lv_btnm_set_one_toggle(lv_obj_t * btnm, bool one_toggle);
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the current map of a button matrix
- * @param btnm pointer to a button matrix object
- * @return the current map
- */
-const char ** lv_btnm_get_map_array(const lv_obj_t * btnm);
-
-/**
- * Check whether the button's text can use recolor or not
- * @param btnm pointer to button matrix object
- * @return true: text recolor enable; false: disabled
- */
-bool lv_btnm_get_recolor(const lv_obj_t * btnm);
-
-/**
- * Get the index of the lastly "activated" button by the user (pressed, released etc)
- * Useful in the the `event_cb` to get the text of the button, check if hidden etc.
- * @param btnm pointer to button matrix object
- * @return index of the last released button (LV_BTNM_BTN_NONE: if unset)
- */
-uint16_t lv_btnm_get_active_btn(const lv_obj_t * btnm);
-
-/**
- * Get the text of the lastly "activated" button by the user (pressed, released etc)
- * Useful in the the `event_cb`
- * @param btnm pointer to button matrix object
- * @return text of the last released button (NULL: if unset)
- */
-const char * lv_btnm_get_active_btn_text(const lv_obj_t * btnm);
-
-/**
- * Get the pressed button's index.
- * The button be really pressed by the user or manually set to pressed with `lv_btnm_set_pressed`
- * @param btnm pointer to button matrix object
- * @return index of the pressed button (LV_BTNM_BTN_NONE: if unset)
- */
-uint16_t lv_btnm_get_pressed_btn(const lv_obj_t * btnm);
-
-/**
- * Get the button's text
- * @param btnm pointer to button matrix object
- * @param btn_id the index a button not counting new line characters. (The return value of
- * lv_btnm_get_pressed/released)
- * @return text of btn_index` button
- */
-const char * lv_btnm_get_btn_text(const lv_obj_t * btnm, uint16_t btn_id);
-
-/**
- * Get the whether a control value is enabled or disabled for button of a button matrix
- * @param btnm pointer to a button matrix object
- * @param btn_id the index a button not counting new line characters. (E.g. the return value of
- * lv_btnm_get_pressed/released)
- * @param ctrl control values to check (ORed value can be used)
- * @return true: long press repeat is disabled; false: long press repeat enabled
- */
-bool lv_btnm_get_btn_ctrl(lv_obj_t * btnm, uint16_t btn_id, lv_btnm_ctrl_t ctrl);
-
-/**
- * Get a style of a button matrix
- * @param btnm pointer to a button matrix object
- * @param type which style should be get
- * @return style pointer to a style
- */
-const lv_style_t * lv_btnm_get_style(const lv_obj_t * btnm, lv_btnm_style_t type);
-
-/**
- * Find whether "one toggle" mode is enabled.
- * @param btnm Button matrix object
- * @return whether "one toggle" mode is enabled
- */
-bool lv_btnm_get_one_toggle(const lv_obj_t * btnm);
-/**********************
- * MACROS
- **********************/
-
-#endif /*LV_USE_BTNM*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_BTNM_H*/
diff --git a/src/libs/lvgl/src/lv_objx/lv_calendar.c b/src/libs/lvgl/src/lv_objx/lv_calendar.c
deleted file mode 100644
index 53f32a22..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_calendar.c
+++ /dev/null
@@ -1,983 +0,0 @@
-/**
- * @file lv_calendar.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_calendar.h"
-#if LV_USE_CALENDAR != 0
-
-#include "../lv_core/lv_debug.h"
-#include "../lv_draw/lv_draw.h"
-#include "../lv_hal/lv_hal_indev.h"
-#include "../lv_misc/lv_utils.h"
-#include "../lv_core/lv_indev.h"
-#include "../lv_themes/lv_theme.h"
-#include <string.h>
-
-/*********************
- * DEFINES
- *********************/
-#define LV_OBJX_NAME "lv_calendar"
-
-/**********************
- * TYPEDEFS
- **********************/
-enum {
- DAY_DRAW_PREV_MONTH,
- DAY_DRAW_ACT_MONTH,
- DAY_DRAW_NEXT_MONTH,
-};
-typedef uint8_t day_draw_state_t;
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static bool lv_calendar_design(lv_obj_t * calendar, const lv_area_t * mask, lv_design_mode_t mode);
-static lv_res_t lv_calendar_signal(lv_obj_t * calendar, lv_signal_t sign, void * param);
-static bool calculate_touched_day(lv_obj_t * calendar, const lv_point_t * touched_point);
-static lv_coord_t get_header_height(lv_obj_t * calendar);
-static lv_coord_t get_day_names_height(lv_obj_t * calendar);
-static void draw_header(lv_obj_t * calendar, const lv_area_t * mask);
-static void draw_day_names(lv_obj_t * calendar, const lv_area_t * mask);
-static void draw_days(lv_obj_t * calendar, const lv_area_t * mask);
-static uint8_t get_day_of_week(uint32_t year, uint32_t month, uint32_t day);
-static bool is_highlighted(lv_obj_t * calendar, int32_t year, int32_t month, int32_t day);
-static const char * get_day_name(lv_obj_t * calendar, uint8_t day);
-static const char * get_month_name(lv_obj_t * calendar, int32_t month);
-static uint8_t get_month_length(int32_t year, int32_t month);
-static uint8_t is_leap_year(uint32_t year);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_signal_cb_t ancestor_signal;
-static lv_design_cb_t ancestor_design;
-static const char * day_name[7] = {"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"};
-static const char * month_name[12] = {"January", "February", "March", "April", "May", "June",
- "July", "August", "September", "October", "November", "December"};
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Create a calendar object
- * @param par pointer to an object, it will be the parent of the new calendar
- * @param copy pointer to a calendar object, if not NULL then the new object will be copied from it
- * @return pointer to the created calendar
- */
-lv_obj_t * lv_calendar_create(lv_obj_t * par, const lv_obj_t * copy)
-{
- LV_LOG_TRACE("calendar create started");
-
- /*Create the ancestor of calendar*/
- lv_obj_t * new_calendar = lv_obj_create(par, copy);
- LV_ASSERT_MEM(new_calendar);
- if(new_calendar == NULL) return NULL;
-
- /*Allocate the calendar type specific extended data*/
- lv_calendar_ext_t * ext = lv_obj_allocate_ext_attr(new_calendar, sizeof(lv_calendar_ext_t));
- LV_ASSERT_MEM(ext);
- if(ext == NULL) return NULL;
- if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_calendar);
- if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_cb(new_calendar);
-
- /*Initialize the allocated 'ext' */
- ext->today.year = 2018;
- ext->today.month = 1;
- ext->today.day = 1;
-
- ext->showed_date.year = 2018;
- ext->showed_date.month = 1;
- ext->showed_date.day = 1;
-
- ext->pressed_date.year = 0;
- ext->pressed_date.month = 0;
- ext->pressed_date.day = 0;
-
- ext->highlighted_dates = NULL;
- ext->highlighted_dates_num = 0;
- ext->day_names = NULL;
- ext->month_names = NULL;
- ext->style_header = &lv_style_plain_color;
- ext->style_header_pr = &lv_style_pretty_color;
- ext->style_highlighted_days = &lv_style_plain_color;
- ext->style_inactive_days = &lv_style_btn_ina;
- ext->style_week_box = &lv_style_plain_color;
- ext->style_today_box = &lv_style_pretty_color;
- ext->style_day_names = &lv_style_pretty;
-
- /*The signal and design functions are not copied so set them here*/
- lv_obj_set_signal_cb(new_calendar, lv_calendar_signal);
- lv_obj_set_design_cb(new_calendar, lv_calendar_design);
-
- /*Init the new calendar calendar*/
- if(copy == NULL) {
- lv_obj_set_size(new_calendar, LV_DPI * 2, LV_DPI * 2);
- lv_obj_set_style(new_calendar, &lv_style_pretty);
-
- lv_theme_t * th = lv_theme_get_current();
- if(th) {
- lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_BG, th->style.calendar.bg);
- lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_HEADER, th->style.calendar.header);
- lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_HEADER_PR, th->style.calendar.header_pr);
- lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_DAY_NAMES, th->style.calendar.day_names);
- lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_WEEK_BOX, th->style.calendar.week_box);
- lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_TODAY_BOX, th->style.calendar.today_box);
- lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_HIGHLIGHTED_DAYS,
- th->style.calendar.highlighted_days);
- lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_INACTIVE_DAYS, th->style.calendar.inactive_days);
- } else {
- lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_BG, &lv_style_pretty);
- lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_HEADER, ext->style_header);
- lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_HEADER_PR, ext->style_header_pr);
- lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_DAY_NAMES, ext->style_day_names);
- lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_WEEK_BOX, ext->style_week_box);
- lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_TODAY_BOX, ext->style_today_box);
- lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_HIGHLIGHTED_DAYS, ext->style_highlighted_days);
- lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_INACTIVE_DAYS, ext->style_inactive_days);
- }
- }
- /*Copy an existing calendar*/
- else {
- lv_calendar_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
- ext->today.year = copy_ext->today.year;
- ext->today.month = copy_ext->today.month;
- ext->today.day = copy_ext->today.day;
-
- ext->showed_date.year = copy_ext->showed_date.year;
- ext->showed_date.month = copy_ext->showed_date.month;
- ext->showed_date.day = copy_ext->showed_date.day;
-
- ext->highlighted_dates = copy_ext->highlighted_dates;
- ext->highlighted_dates_num = copy_ext->highlighted_dates_num;
- ext->day_names = copy_ext->day_names;
-
- ext->month_names = copy_ext->month_names;
- ext->style_header = copy_ext->style_header;
- ext->style_header_pr = copy_ext->style_header_pr;
- ext->style_highlighted_days = copy_ext->style_highlighted_days;
- ext->style_inactive_days = copy_ext->style_inactive_days;
- ext->style_week_box = copy_ext->style_week_box;
- ext->style_today_box = copy_ext->style_today_box;
- ext->style_day_names = copy_ext->style_day_names;
- /*Refresh the style with new signal function*/
- lv_obj_refresh_style(new_calendar);
- }
-
- LV_LOG_INFO("calendar created");
-
- return new_calendar;
-}
-
-/*======================
- * Add/remove functions
- *=====================*/
-
-/*
- * New object specific "add" or "remove" functions come here
- */
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set the today's date
- * @param calendar pointer to a calendar object
- * @param today pointer to an `lv_calendar_date_t` variable containing the date of today. The value
- * will be saved it can be local variable too.
- */
-void lv_calendar_set_today_date(lv_obj_t * calendar, lv_calendar_date_t * today)
-{
- LV_ASSERT_OBJ(calendar, LV_OBJX_NAME);
- LV_ASSERT_NULL(today);
-
- lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar);
- ext->today.year = today->year;
- ext->today.month = today->month;
- ext->today.day = today->day;
-
- lv_obj_invalidate(calendar);
-}
-
-/**
- * Set the currently showed
- * @param calendar pointer to a calendar object
- * @param showed pointer to an `lv_calendar_date_t` variable containing the date to show. The value
- * will be saved it can be local variable too.
- */
-void lv_calendar_set_showed_date(lv_obj_t * calendar, lv_calendar_date_t * showed)
-{
- LV_ASSERT_OBJ(calendar, LV_OBJX_NAME);
- LV_ASSERT_NULL(showed);
-
- lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar);
- ext->showed_date.year = showed->year;
- ext->showed_date.month = showed->month;
- ext->showed_date.day = showed->day;
-
- lv_obj_invalidate(calendar);
-}
-
-/**
- * Set the the highlighted dates
- * @param calendar pointer to a calendar object
- * @param highlighted pointer to an `lv_calendar_date_t` array containing the dates. ONLY A POINTER
- * WILL BE SAVED! CAN'T BE LOCAL ARRAY.
- * @param date_num number of dates in the array
- */
-void lv_calendar_set_highlighted_dates(lv_obj_t * calendar, lv_calendar_date_t highlighted[], uint16_t date_num)
-{
- LV_ASSERT_OBJ(calendar, LV_OBJX_NAME);
- LV_ASSERT_NULL(highlighted);
-
- lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar);
- ext->highlighted_dates = highlighted;
- ext->highlighted_dates_num = date_num;
-
- lv_obj_invalidate(calendar);
-}
-
-/**
- * Set the name of the days
- * @param calendar pointer to a calendar object
- * @param day_names pointer to an array with the names. E.g. `const char * days[7] = {"Sun", "Mon",
- * ...}` Only the pointer will be saved so this variable can't be local which will be destroyed
- * later.
- */
-void lv_calendar_set_day_names(lv_obj_t * calendar, const char ** day_names)
-{
- LV_ASSERT_OBJ(calendar, LV_OBJX_NAME);
- LV_ASSERT_NULL(day_names);
-
- lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar);
- ext->day_names = day_names;
- lv_obj_invalidate(calendar);
-}
-
-/**
- * Set the name of the month
- * @param calendar pointer to a calendar object
- * @param month_names pointer to an array with the names. E.g. `const char * days[12] = {"Jan", "Feb",
- * ...}` Only the pointer will be saved so this variable can't be local which will be destroyed
- * later.
- */
-void lv_calendar_set_month_names(lv_obj_t * calendar, const char ** month_names)
-{
- LV_ASSERT_OBJ(calendar, LV_OBJX_NAME);
- LV_ASSERT_NULL(month_names);
-
- lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar);
- ext->month_names = month_names;
- lv_obj_invalidate(calendar);
-}
-
-/**
- * Set a style of a calendar.
- * @param calendar pointer to calendar object
- * @param type which style should be set
- * @param style pointer to a style
- * */
-void lv_calendar_set_style(lv_obj_t * calendar, lv_calendar_style_t type, const lv_style_t * style)
-{
- LV_ASSERT_OBJ(calendar, LV_OBJX_NAME);
-
- lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar);
-
- switch(type) {
- case LV_CALENDAR_STYLE_BG: lv_obj_set_style(calendar, style); break;
- case LV_CALENDAR_STYLE_DAY_NAMES: ext->style_day_names = style; break;
- case LV_CALENDAR_STYLE_HEADER: ext->style_header = style; break;
- case LV_CALENDAR_STYLE_HEADER_PR: ext->style_header_pr = style; break;
- case LV_CALENDAR_STYLE_HIGHLIGHTED_DAYS: ext->style_highlighted_days = style; break;
- case LV_CALENDAR_STYLE_INACTIVE_DAYS: ext->style_inactive_days = style; break;
- case LV_CALENDAR_STYLE_TODAY_BOX: ext->style_today_box = style; break;
- case LV_CALENDAR_STYLE_WEEK_BOX: ext->style_week_box = style; break;
- }
-
- lv_obj_invalidate(calendar);
-}
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the today's date
- * @param calendar pointer to a calendar object
- * @return return pointer to an `lv_calendar_date_t` variable containing the date of today.
- */
-lv_calendar_date_t * lv_calendar_get_today_date(const lv_obj_t * calendar)
-{
- LV_ASSERT_OBJ(calendar, LV_OBJX_NAME);
-
- lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar);
- return &ext->today;
-}
-
-/**
- * Get the currently showed
- * @param calendar pointer to a calendar object
- * @return pointer to an `lv_calendar_date_t` variable containing the date is being shown.
- */
-lv_calendar_date_t * lv_calendar_get_showed_date(const lv_obj_t * calendar)
-{
- LV_ASSERT_OBJ(calendar, LV_OBJX_NAME);
-
- lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar);
- return &ext->showed_date;
-}
-
-/**
- * Get the the pressed date.
- * @param calendar pointer to a calendar object
- * @return pointer to an `lv_calendar_date_t` variable containing the pressed date.
- * `NULL` if not date pressed (e.g. the header)
- */
-lv_calendar_date_t * lv_calendar_get_pressed_date(const lv_obj_t * calendar)
-{
- LV_ASSERT_OBJ(calendar, LV_OBJX_NAME);
-
- lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar);
- return ext->pressed_date.year != 0 ? &ext->pressed_date : NULL;
-}
-
-/**
- * Get the the highlighted dates
- * @param calendar pointer to a calendar object
- * @return pointer to an `lv_calendar_date_t` array containing the dates.
- */
-lv_calendar_date_t * lv_calendar_get_highlighted_dates(const lv_obj_t * calendar)
-{
- LV_ASSERT_OBJ(calendar, LV_OBJX_NAME);
-
- lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar);
- return ext->highlighted_dates;
-}
-
-/**
- * Get the number of the highlighted dates
- * @param calendar pointer to a calendar object
- * @return number of highlighted days
- */
-uint16_t lv_calendar_get_highlighted_dates_num(const lv_obj_t * calendar)
-{
- LV_ASSERT_OBJ(calendar, LV_OBJX_NAME);
-
- lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar);
- return ext->highlighted_dates_num;
-}
-
-/**
- * Get the name of the days
- * @param calendar pointer to a calendar object
- * @return pointer to the array of day names
- */
-const char ** lv_calendar_get_day_names(const lv_obj_t * calendar)
-{
- LV_ASSERT_OBJ(calendar, LV_OBJX_NAME);
-
- lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar);
- return ext->day_names;
-}
-
-/**
- * Get the name of the month
- * @param calendar pointer to a calendar object
- * @return pointer to the array of month names
- */
-const char ** lv_calendar_get_month_names(const lv_obj_t * calendar)
-{
- LV_ASSERT_OBJ(calendar, LV_OBJX_NAME);
-
- lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar);
- return ext->month_names;
-}
-
-/**
- * Get style of a calendar.
- * @param calendar pointer to calendar object
- * @param type which style should be get
- * @return style pointer to the style
- * */
-const lv_style_t * lv_calendar_get_style(const lv_obj_t * calendar, lv_calendar_style_t type)
-{
- LV_ASSERT_OBJ(calendar, LV_OBJX_NAME);
-
- const lv_style_t * style = NULL;
- lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar);
-
- switch(type) {
- case LV_CALENDAR_STYLE_BG: style = lv_obj_get_style(calendar); break;
- case LV_CALENDAR_STYLE_HEADER: style = ext->style_header; break;
- case LV_CALENDAR_STYLE_HEADER_PR: style = ext->style_header_pr; break;
- case LV_CALENDAR_STYLE_DAY_NAMES: style = ext->style_day_names; break;
- case LV_CALENDAR_STYLE_HIGHLIGHTED_DAYS: style = ext->style_highlighted_days; break;
- case LV_CALENDAR_STYLE_INACTIVE_DAYS: style = ext->style_inactive_days; break;
- case LV_CALENDAR_STYLE_WEEK_BOX: style = ext->style_week_box; break;
- case LV_CALENDAR_STYLE_TODAY_BOX: style = ext->style_today_box; break;
- default: style = NULL; break;
- }
-
- return style;
-}
-
-/*=====================
- * Other functions
- *====================*/
-
-/*
- * New object specific "other" functions come here
- */
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Handle the drawing related tasks of the calendars
- * @param calendar pointer to an object
- * @param mask the object will be drawn only in this area
- * @param mode LV_DESIGN_COVER_CHK: only check if the object fully covers the 'mask_p' area
- * (return 'true' if yes)
- * LV_DESIGN_DRAW: draw the object (always return 'true')
- * LV_DESIGN_DRAW_POST: drawing after every children are drawn
- * @param return true/false, depends on 'mode'
- */
-static bool lv_calendar_design(lv_obj_t * calendar, const lv_area_t * mask, lv_design_mode_t mode)
-{
- /*Return false if the object is not covers the mask_p area*/
- if(mode == LV_DESIGN_COVER_CHK) {
- return ancestor_design(calendar, mask, mode);
- }
- /*Draw the object*/
- else if(mode == LV_DESIGN_DRAW_MAIN) {
- lv_opa_t opa_scale = lv_obj_get_opa_scale(calendar);
- lv_draw_rect(&calendar->coords, mask, lv_calendar_get_style(calendar, LV_CALENDAR_STYLE_BG), opa_scale);
-
- draw_header(calendar, mask);
- draw_day_names(calendar, mask);
- draw_days(calendar, mask);
-
- }
- /*Post draw when the children are drawn*/
- else if(mode == LV_DESIGN_DRAW_POST) {
- }
-
- return true;
-}
-
-/**
- * Signal function of the calendar
- * @param calendar pointer to a calendar object
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_calendar_signal(lv_obj_t * calendar, lv_signal_t sign, void * param)
-{
- lv_res_t res;
-
- /* Include the ancient signal function */
- res = ancestor_signal(calendar, sign, param);
- if(res != LV_RES_OK) return res;
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);
-
- if(sign == LV_SIGNAL_CLEANUP) {
- /*Nothing to cleanup. (No dynamically allocated memory in 'ext')*/
- } else if(sign == LV_SIGNAL_PRESSING) {
- lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar);
- lv_area_t header_area;
- lv_area_copy(&header_area, &calendar->coords);
- header_area.y2 = header_area.y1 + get_header_height(calendar);
-
- lv_indev_t * indev = lv_indev_get_act();
- lv_point_t p;
- lv_indev_get_point(indev, &p);
-
- /*If the header is pressed mark an arrow as pressed*/
- if(lv_area_is_point_on(&header_area, &p)) {
- if(p.x < header_area.x1 + lv_area_get_width(&header_area) / 2) {
- if(ext->btn_pressing != -1) lv_obj_invalidate(calendar);
- ext->btn_pressing = -1;
- } else {
- if(ext->btn_pressing != 1) lv_obj_invalidate(calendar);
- ext->btn_pressing = 1;
- }
-
- ext->pressed_date.year = 0;
- ext->pressed_date.month = 0;
- ext->pressed_date.day = 0;
- }
- /*If a day is pressed save it*/
- else if(calculate_touched_day(calendar, &p)) {
- if(ext->btn_pressing != 0) lv_obj_invalidate(calendar);
- ext->btn_pressing = 0;
- }
- /*ELse set a deafault state*/
- else {
- if(ext->btn_pressing != 0) lv_obj_invalidate(calendar);
- ext->btn_pressing = 0;
- ext->pressed_date.year = 0;
- ext->pressed_date.month = 0;
- ext->pressed_date.day = 0;
- }
- } else if(sign == LV_SIGNAL_PRESS_LOST) {
- lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar);
- ext->btn_pressing = 0;
- lv_obj_invalidate(calendar);
-
- } else if(sign == LV_SIGNAL_RELEASED) {
- lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar);
- if(ext->btn_pressing < 0) {
- if(ext->showed_date.month <= 1) {
- ext->showed_date.month = 12;
- ext->showed_date.year--;
- } else {
- ext->showed_date.month--;
- }
- } else if(ext->btn_pressing > 0) {
- if(ext->showed_date.month >= 12) {
- ext->showed_date.month = 1;
- ext->showed_date.year++;
- } else {
- ext->showed_date.month++;
- }
- } else if(ext->pressed_date.year != 0) {
- res = lv_event_send(calendar, LV_EVENT_VALUE_CHANGED, NULL);
- if(res != LV_RES_OK) return res;
- }
-
- ext->btn_pressing = 0;
- lv_obj_invalidate(calendar);
- } else if(sign == LV_SIGNAL_CONTROL) {
- uint8_t c = *((uint8_t *)param);
- lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar);
- if(c == LV_KEY_RIGHT || c == LV_KEY_UP) {
- if(ext->showed_date.month >= 12) {
- ext->showed_date.month = 1;
- ext->showed_date.year++;
- } else {
- ext->showed_date.month++;
- }
- lv_obj_invalidate(calendar);
- } else if(c == LV_KEY_LEFT || c == LV_KEY_DOWN) {
- if(ext->showed_date.month <= 1) {
- ext->showed_date.month = 12;
- ext->showed_date.year--;
- } else {
- ext->showed_date.month--;
- }
- lv_obj_invalidate(calendar);
- }
- }
-
- return res;
-}
-
-/**
- * It will check if the days part of calendar is touched
- * and if it is, it will calculate the day and put it in pressed_date of calendar object.
- * @param calendar pointer to a calendar object
- * @param pointer to a point
- * @return true: days part of calendar is touched and its related date is put in pressed date
- * false: the point is out of days part area.
- */
-static bool calculate_touched_day(lv_obj_t * calendar, const lv_point_t * touched_point)
-{
- lv_area_t days_area;
- lv_area_copy(&days_area, &calendar->coords);
- const lv_style_t * style_bg = lv_calendar_get_style(calendar, LV_CALENDAR_STYLE_BG);
- days_area.x1 += style_bg->body.padding.left;
- days_area.x2 -= style_bg->body.padding.right;
- days_area.y1 =
- calendar->coords.y1 + get_header_height(calendar) + get_day_names_height(calendar) - style_bg->body.padding.top;
-
- if(lv_area_is_point_on(&days_area, touched_point)) {
- lv_coord_t w = (days_area.x2 - days_area.x1 + 1) / 7;
- lv_coord_t h = (days_area.y2 - days_area.y1 + 1) / 6;
- uint8_t x_pos = 0;
- x_pos = (touched_point->x - days_area.x1) / w;
- if(x_pos > 6) x_pos = 6;
- uint8_t y_pos = 0;
- y_pos = (touched_point->y - days_area.y1) / h;
- if(y_pos > 5) y_pos = 5;
-
- uint8_t i_pos = 0;
- i_pos = (y_pos * 7) + x_pos;
- lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar);
- if(i_pos < get_day_of_week(ext->showed_date.year, ext->showed_date.month, 1)) {
- ext->pressed_date.year = ext->showed_date.year - (ext->showed_date.month == 1 ? 1 : 0);
- ext->pressed_date.month = ext->showed_date.month == 1 ? 12 : (ext->showed_date.month - 1);
- ext->pressed_date.day = get_month_length(ext->pressed_date.year, ext->pressed_date.month) -
- get_day_of_week(ext->showed_date.year, ext->showed_date.month, 1) + 1 + i_pos;
- } else if(i_pos < (get_day_of_week(ext->showed_date.year, ext->showed_date.month, 1) +
- get_month_length(ext->showed_date.year, ext->showed_date.month))) {
- ext->pressed_date.year = ext->showed_date.year;
- ext->pressed_date.month = ext->showed_date.month;
- ext->pressed_date.day = i_pos + 1 - get_day_of_week(ext->showed_date.year, ext->showed_date.month, 1);
- } else if(i_pos < 42) {
- ext->pressed_date.year = ext->showed_date.year + (ext->showed_date.month == 12 ? 1 : 0);
- ext->pressed_date.month = ext->showed_date.month == 12 ? 1 : (ext->showed_date.month + 1);
- ext->pressed_date.day = i_pos + 1 - get_day_of_week(ext->showed_date.year, ext->showed_date.month, 1) -
- get_month_length(ext->showed_date.year, ext->showed_date.month);
- }
- return true;
- } else {
- return false;
- }
-}
-
-/**
- * Get the height of a calendar's header based on it's style
- * @param calendar point to a calendar
- * @return the header's height
- */
-static lv_coord_t get_header_height(lv_obj_t * calendar)
-{
- lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar);
-
- return lv_font_get_line_height(ext->style_header->text.font) + ext->style_header->body.padding.top +
- ext->style_header->body.padding.bottom;
-}
-
-/**
- * Get the height of a calendar's day_names based on it's style
- * @param calendar point to a calendar
- * @return the day_names's height
- */
-static lv_coord_t get_day_names_height(lv_obj_t * calendar)
-{
- lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar);
-
- return lv_font_get_line_height(ext->style_day_names->text.font) + ext->style_day_names->body.padding.top +
- ext->style_day_names->body.padding.bottom;
-}
-
-/**
- * Draw the calendar header with month name and arrows
- * @param calendar point to a calendar
- * @param mask a mask for drawing
- */
-static void draw_header(lv_obj_t * calendar, const lv_area_t * mask)
-{
- lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar);
-
- lv_bidi_dir_t bidi_dir = lv_obj_get_base_dir(calendar);
-
- lv_opa_t opa_scale = lv_obj_get_opa_scale(calendar);
-
- lv_area_t header_area;
- header_area.x1 = calendar->coords.x1;
- header_area.x2 = calendar->coords.x2;
- header_area.y1 = calendar->coords.y1;
- header_area.y2 = calendar->coords.y1 + get_header_height(calendar);
-
- lv_draw_rect(&header_area, mask, ext->style_header, opa_scale);
-
- /*Add the year + month name*/
- char txt_buf[64];
- lv_utils_num_to_str(ext->showed_date.year, txt_buf);
- txt_buf[4] = ' ';
- txt_buf[5] = '\0';
- strcpy(&txt_buf[5], get_month_name(calendar, ext->showed_date.month));
- header_area.y1 += ext->style_header->body.padding.top;
- lv_draw_label(&header_area, mask, ext->style_header, opa_scale, txt_buf, LV_TXT_FLAG_CENTER, NULL, NULL, NULL, bidi_dir);
-
- /*Add the left arrow*/
- const lv_style_t * arrow_style = ext->btn_pressing < 0 ? ext->style_header_pr : ext->style_header;
- header_area.x1 += ext->style_header->body.padding.left;
- lv_draw_label(&header_area, mask, arrow_style, opa_scale, LV_SYMBOL_LEFT, LV_TXT_FLAG_NONE, NULL, NULL, NULL, bidi_dir);
-
- /*Add the right arrow*/
- arrow_style = ext->btn_pressing > 0 ? ext->style_header_pr : ext->style_header;
- header_area.x1 = header_area.x2 - ext->style_header->body.padding.right -
- lv_txt_get_width(LV_SYMBOL_RIGHT, (uint16_t)strlen(LV_SYMBOL_RIGHT), arrow_style->text.font,
- arrow_style->text.line_space, LV_TXT_FLAG_NONE);
- lv_draw_label(&header_area, mask, arrow_style, opa_scale, LV_SYMBOL_RIGHT, LV_TXT_FLAG_NONE, NULL, NULL, NULL, bidi_dir);
-}
-
-/**
- * Draw the day's name below the header
- * @param calendar point to a calendar
- * @param mask a mask for drawing
- */
-static void draw_day_names(lv_obj_t * calendar, const lv_area_t * mask)
-{
- lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar);
- lv_bidi_dir_t bidi_dir = lv_obj_get_base_dir(calendar);
- lv_opa_t opa_scale = lv_obj_get_opa_scale(calendar);
-
- lv_coord_t l_pad = ext->style_day_names->body.padding.left;
- lv_coord_t w =
- lv_obj_get_width(calendar) - ext->style_day_names->body.padding.left - ext->style_day_names->body.padding.right;
- lv_coord_t box_w = w / 7;
- lv_area_t label_area;
- label_area.y1 = calendar->coords.y1 + get_header_height(calendar) + ext->style_day_names->body.padding.top;
- label_area.y2 = label_area.y1 + lv_font_get_line_height(ext->style_day_names->text.font);
- uint32_t i;
- for(i = 0; i < 7; i++) {
- label_area.x1 = calendar->coords.x1 + (w * i) / 7 + l_pad;
- label_area.x2 = label_area.x1 + box_w - 1;
- lv_draw_label(&label_area, mask, ext->style_day_names, opa_scale, get_day_name(calendar, i), LV_TXT_FLAG_CENTER,
- NULL, NULL, NULL, bidi_dir);
- }
-}
-
-/**
- * Draw the date numbers in a matrix
- * @param calendar point to a calendar
- * @param mask a mask for drawing
- */
-static void draw_days(lv_obj_t * calendar, const lv_area_t * mask)
-{
- lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar);
- lv_bidi_dir_t bidi_dir = lv_obj_get_base_dir(calendar);
- const lv_style_t * style_bg = lv_calendar_get_style(calendar, LV_CALENDAR_STYLE_BG);
- lv_area_t label_area;
- lv_opa_t opa_scale = lv_obj_get_opa_scale(calendar);
- label_area.y1 = calendar->coords.y1 + get_header_height(calendar) + ext->style_day_names->body.padding.top +
- lv_font_get_line_height(ext->style_day_names->text.font) +
- ext->style_day_names->body.padding.bottom;
- label_area.y2 = label_area.y1 + lv_font_get_line_height(style_bg->text.font);
-
- lv_coord_t w = lv_obj_get_width(calendar) - style_bg->body.padding.left - style_bg->body.padding.right;
- lv_coord_t h = calendar->coords.y2 - label_area.y1 - style_bg->body.padding.bottom;
- lv_coord_t box_w = w / 7;
- lv_coord_t vert_space = (h - (6 * lv_font_get_line_height(style_bg->text.font))) / 5;
-
- uint32_t week;
- uint8_t day_cnt;
- uint8_t month_start_day = get_day_of_week(ext->showed_date.year, ext->showed_date.month, 1);
- day_draw_state_t draw_state; /*true: Not the prev. or next month is drawn*/
- const lv_style_t * act_style;
-
- /*If starting with the first day of the week then the previous month is not visible*/
- if(month_start_day == 0) {
- day_cnt = 1;
- draw_state = DAY_DRAW_ACT_MONTH;
- act_style = style_bg;
- } else {
- draw_state = DAY_DRAW_PREV_MONTH;
- day_cnt = get_month_length(ext->showed_date.year, ext->showed_date.month - 1); /*Length of the previous month*/
- day_cnt -= month_start_day - 1; /*First visible number of the previous month*/
- act_style = ext->style_inactive_days;
- }
-
- bool month_of_today_shown = false;
- if(ext->showed_date.year == ext->today.year && ext->showed_date.month == ext->today.month) {
- month_of_today_shown = true;
- }
-
- char buf[3];
- bool in_week_box = false;
-
- /*Draw 6 weeks*/
- for(week = 0; week < 6; week++) {
-
- /*Draw the "week box"*/
- if(month_of_today_shown &&
- ((draw_state == DAY_DRAW_ACT_MONTH && ext->today.day >= day_cnt && ext->today.day < day_cnt + 7) ||
- (draw_state == DAY_DRAW_PREV_MONTH && ext->today.day <= 7 - month_start_day && week == 0))) {
- lv_area_t week_box_area;
- lv_area_copy(&week_box_area, &label_area); /*'label_area' is already set for this row*/
- week_box_area.x1 =
- calendar->coords.x1 + style_bg->body.padding.left - ext->style_week_box->body.padding.left;
- week_box_area.x2 =
- calendar->coords.x2 - style_bg->body.padding.right + ext->style_week_box->body.padding.right;
-
- week_box_area.y1 -= ext->style_week_box->body.padding.top;
- week_box_area.y2 += ext->style_week_box->body.padding.bottom;
- lv_draw_rect(&week_box_area, mask, ext->style_week_box, opa_scale);
-
- in_week_box = true;
- } else {
- in_week_box = false;
- }
-
- /*Draw the 7 days of a week*/
- uint32_t day;
- for(day = 0; day < 7; day++) {
- /*The previous month is over*/
- if(draw_state == DAY_DRAW_PREV_MONTH && day == month_start_day) {
- draw_state = DAY_DRAW_ACT_MONTH;
- day_cnt = 1;
- act_style = style_bg;
- }
- /*The current month is over*/
- if(draw_state == DAY_DRAW_ACT_MONTH &&
- day_cnt > get_month_length(ext->showed_date.year, ext->showed_date.month)) {
- draw_state = DAY_DRAW_NEXT_MONTH;
- day_cnt = 1;
- act_style = ext->style_inactive_days;
- }
-
- label_area.x1 =
- calendar->coords.x1 + (w * day) / 7 + style_bg->body.padding.left;
- label_area.x2 = label_area.x1 + box_w - 1;
-
- /*Draw the "today box"*/
- if(draw_state == DAY_DRAW_ACT_MONTH && month_of_today_shown && ext->today.day == day_cnt) {
- lv_area_t today_box_area;
- lv_area_copy(&today_box_area, &label_area);
- today_box_area.x1 = label_area.x1;
- today_box_area.x2 = label_area.x2;
-
- today_box_area.y1 = label_area.y1 - ext->style_today_box->body.padding.top;
- today_box_area.y2 = label_area.y2 + ext->style_today_box->body.padding.bottom;
- lv_draw_rect(&today_box_area, mask, ext->style_today_box, opa_scale);
- }
-
- /*Get the final style : highlighted/week box/today box/normal*/
- const lv_style_t * final_style;
- if(draw_state == DAY_DRAW_PREV_MONTH &&
- is_highlighted(calendar, ext->showed_date.year - (ext->showed_date.month == 1 ? 1 : 0),
- ext->showed_date.month == 1 ? 12 : ext->showed_date.month - 1, day_cnt)) {
- final_style = ext->style_highlighted_days;
- } else if(draw_state == DAY_DRAW_ACT_MONTH &&
- is_highlighted(calendar, ext->showed_date.year, ext->showed_date.month, day_cnt)) {
- final_style = ext->style_highlighted_days;
- } else if(draw_state == DAY_DRAW_NEXT_MONTH &&
- is_highlighted(calendar, ext->showed_date.year + (ext->showed_date.month == 12 ? 1 : 0),
- ext->showed_date.month == 12 ? 1 : ext->showed_date.month + 1, day_cnt)) {
- final_style = ext->style_highlighted_days;
- } else if(month_of_today_shown && day_cnt == ext->today.day && draw_state == DAY_DRAW_ACT_MONTH)
- final_style = ext->style_today_box;
- else if(in_week_box && draw_state == DAY_DRAW_ACT_MONTH)
- final_style = ext->style_week_box;
- else
- final_style = act_style;
-
- /*Write the day's number*/
- lv_utils_num_to_str(day_cnt, buf);
- lv_draw_label(&label_area, mask, final_style, opa_scale, buf, LV_TXT_FLAG_CENTER, NULL, NULL, NULL, bidi_dir);
-
- /*Go to the next day*/
- day_cnt++;
- }
-
- /*Got to the next weeks row*/
- label_area.y1 += vert_space + lv_font_get_line_height(style_bg->text.font);
- label_area.y2 += vert_space + lv_font_get_line_height(style_bg->text.font);
- }
-}
-
-/**
- * Check weather a date is highlighted or not
- * @param calendar pointer to a calendar object
- * @param year a year
- * @param month a month [1..12]
- * @param day a day [1..31]
- * @return true: highlighted
- */
-static bool is_highlighted(lv_obj_t * calendar, int32_t year, int32_t month, int32_t day)
-{
- lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar);
-
- if(ext->highlighted_dates == NULL || ext->highlighted_dates_num == 0) return false;
-
- uint32_t i;
- for(i = 0; i < ext->highlighted_dates_num; i++) {
- if(ext->highlighted_dates[i].year == year && ext->highlighted_dates[i].month == month &&
- ext->highlighted_dates[i].day == day) {
- return true;
- }
- }
-
- return false;
-}
-
-/**
- * Get the day name
- * @param calendar pointer to a calendar object
- * @param day a day in [0..6]
- * @return
- */
-static const char * get_day_name(lv_obj_t * calendar, uint8_t day)
-{
-
- lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar);
- if(ext->day_names)
- return ext->day_names[day];
- else
- return day_name[day];
-}
-
-/**
- * Get the month name
- * @param calendar pointer to a calendar object
- * @param month a month. The range is basically [1..12] but [-11..1] is also supported to handle
- * previous year
- * @return
- */
-static const char * get_month_name(lv_obj_t * calendar, int32_t month)
-{
- month--; /*Range of months id [1..12] but range of indexes is [0..11]*/
- if(month < 0) month = 12 + month;
-
- lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar);
- if(ext->month_names)
- return ext->month_names[month];
- else
- return month_name[month];
-}
-
-/**
- * Get the number of days in a month
- * @param year a year
- * @param month a month. The range is basically [1..12] but [-11..1] is also supported to handle
- * previous year
- * @return [28..31]
- */
-static uint8_t get_month_length(int32_t year, int32_t month)
-{
- month--; /*Range of months id [1..12] but range of indexes is [0..11]*/
- if(month < 0) {
- year--; /*Already in the previous year (won't be less then -12 to skip a whole year)*/
- month = 12 + month; /*`month` is negative, the result will be < 12*/
- }
- if(month >= 12) {
- year++;
- month -= 12;
- }
-
- /*month == 1 is february*/
- return (month == 1) ? (28 + is_leap_year(year)) : 31 - month % 7 % 2;
-}
-
-/**
- * Tells whether a year is leap year or not
- * @param year a year
- * @return 0: not leap year; 1: leap year
- */
-static uint8_t is_leap_year(uint32_t year)
-{
- return (year % 4) || ((year % 100 == 0) && (year % 400)) ? 0 : 1;
-}
-
-/**
- * Get the day of the week
- * @param year a year
- * @param month a month
- * @param day a day
- * @return [0..6] which means [Sun..Sat]
- */
-static uint8_t get_day_of_week(uint32_t year, uint32_t month, uint32_t day)
-{
- uint32_t a = month < 3 ? 1 : 0;
- uint32_t b = year - a;
-
- uint32_t day_of_week = (day + (31 * (month - 2 + 12 * a) / 12) + b + (b / 4) - (b / 100) + (b / 400)) % 7;
-
- return day_of_week;
-}
-
-#endif
diff --git a/src/libs/lvgl/src/lv_objx/lv_calendar.h b/src/libs/lvgl/src/lv_objx/lv_calendar.h
deleted file mode 100644
index 21317bbd..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_calendar.h
+++ /dev/null
@@ -1,229 +0,0 @@
-/**
- * @file lv_calendar.h
- *
- */
-
-#ifndef LV_CALENDAR_H
-#define LV_CALENDAR_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_CALENDAR != 0
-
-#include "../lv_core/lv_obj.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**
- * Represents a date on the calendar object (platform-agnostic).
- */
-typedef struct
-{
- uint16_t year;
- int8_t month;
- int8_t day;
-} lv_calendar_date_t;
-
-/*Data of calendar*/
-typedef struct
-{
- /*None*/ /*Ext. of ancestor*/
- /*New data for this type */
- lv_calendar_date_t today; /*Date of today*/
- lv_calendar_date_t showed_date; /*Currently visible month (day is ignored)*/
- lv_calendar_date_t * highlighted_dates; /*Apply different style on these days (pointer to an
- array defined by the user)*/
- int8_t btn_pressing; /*-1: prev month pressing, +1 next month pressing on the header*/
- uint16_t highlighted_dates_num; /*Number of elements in `highlighted_days`*/
- lv_calendar_date_t pressed_date;
- const char ** day_names; /*Pointer to an array with the name of the days (NULL: use default names)*/
- const char ** month_names; /*Pointer to an array with the name of the month (NULL. use default names)*/
-
- /*Styles*/
- const lv_style_t * style_header;
- const lv_style_t * style_header_pr;
- const lv_style_t * style_day_names;
- const lv_style_t * style_highlighted_days;
- const lv_style_t * style_inactive_days;
- const lv_style_t * style_week_box;
- const lv_style_t * style_today_box;
-} lv_calendar_ext_t;
-
-/** Calendar styles*/
-enum {
- LV_CALENDAR_STYLE_BG, /**< Background and "normal" date numbers style */
- LV_CALENDAR_STYLE_HEADER, /** Calendar header style */
- LV_CALENDAR_STYLE_HEADER_PR, /** Calendar header style (when pressed) */
- LV_CALENDAR_STYLE_DAY_NAMES, /** Day name style */
- LV_CALENDAR_STYLE_HIGHLIGHTED_DAYS, /** Highlighted day style */
- LV_CALENDAR_STYLE_INACTIVE_DAYS, /** Inactive day style */
- LV_CALENDAR_STYLE_WEEK_BOX, /** Week highlight style */
- LV_CALENDAR_STYLE_TODAY_BOX, /** Today highlight style */
-};
-typedef uint8_t lv_calendar_style_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Create a calendar objects
- * @param par pointer to an object, it will be the parent of the new calendar
- * @param copy pointer to a calendar object, if not NULL then the new object will be copied from it
- * @return pointer to the created calendar
- */
-lv_obj_t * lv_calendar_create(lv_obj_t * par, const lv_obj_t * copy);
-
-/*======================
- * Add/remove functions
- *=====================*/
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set the today's date
- * @param calendar pointer to a calendar object
- * @param today pointer to an `lv_calendar_date_t` variable containing the date of today. The value
- * will be saved it can be local variable too.
- */
-void lv_calendar_set_today_date(lv_obj_t * calendar, lv_calendar_date_t * today);
-
-/**
- * Set the currently showed
- * @param calendar pointer to a calendar object
- * @param showed pointer to an `lv_calendar_date_t` variable containing the date to show. The value
- * will be saved it can be local variable too.
- */
-void lv_calendar_set_showed_date(lv_obj_t * calendar, lv_calendar_date_t * showed);
-
-/**
- * Set the the highlighted dates
- * @param calendar pointer to a calendar object
- * @param highlighted pointer to an `lv_calendar_date_t` array containing the dates. ONLY A POINTER
- * WILL BE SAVED! CAN'T BE LOCAL ARRAY.
- * @param date_num number of dates in the array
- */
-void lv_calendar_set_highlighted_dates(lv_obj_t * calendar, lv_calendar_date_t highlighted[], uint16_t date_num);
-
-/**
- * Set the name of the days
- * @param calendar pointer to a calendar object
- * @param day_names pointer to an array with the names. E.g. `const char * days[7] = {"Sun", "Mon",
- * ...}` Only the pointer will be saved so this variable can't be local which will be destroyed
- * later.
- */
-void lv_calendar_set_day_names(lv_obj_t * calendar, const char ** day_names);
-
-/**
- * Set the name of the month
- * @param calendar pointer to a calendar object
- * @param month_names pointer to an array with the names. E.g. `const char * days[12] = {"Jan", "Feb",
- * ...}` Only the pointer will be saved so this variable can't be local which will be destroyed
- * later.
- */
-void lv_calendar_set_month_names(lv_obj_t * calendar, const char ** month_names);
-
-/**
- * Set a style of a calendar.
- * @param calendar pointer to calendar object
- * @param type which style should be set
- * @param style pointer to a style
- * */
-void lv_calendar_set_style(lv_obj_t * calendar, lv_calendar_style_t type, const lv_style_t * style);
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the today's date
- * @param calendar pointer to a calendar object
- * @return return pointer to an `lv_calendar_date_t` variable containing the date of today.
- */
-lv_calendar_date_t * lv_calendar_get_today_date(const lv_obj_t * calendar);
-
-/**
- * Get the currently showed
- * @param calendar pointer to a calendar object
- * @return pointer to an `lv_calendar_date_t` variable containing the date is being shown.
- */
-lv_calendar_date_t * lv_calendar_get_showed_date(const lv_obj_t * calendar);
-
-/**
- * Get the the pressed date.
- * @param calendar pointer to a calendar object
- * @return pointer to an `lv_calendar_date_t` variable containing the pressed date.
- * `NULL` if not date pressed (e.g. the header)
- */
-lv_calendar_date_t * lv_calendar_get_pressed_date(const lv_obj_t * calendar);
-
-/**
- * Get the the highlighted dates
- * @param calendar pointer to a calendar object
- * @return pointer to an `lv_calendar_date_t` array containing the dates.
- */
-lv_calendar_date_t * lv_calendar_get_highlighted_dates(const lv_obj_t * calendar);
-
-/**
- * Get the number of the highlighted dates
- * @param calendar pointer to a calendar object
- * @return number of highlighted days
- */
-uint16_t lv_calendar_get_highlighted_dates_num(const lv_obj_t * calendar);
-
-/**
- * Get the name of the days
- * @param calendar pointer to a calendar object
- * @return pointer to the array of day names
- */
-const char ** lv_calendar_get_day_names(const lv_obj_t * calendar);
-
-/**
- * Get the name of the month
- * @param calendar pointer to a calendar object
- * @return pointer to the array of month names
- */
-const char ** lv_calendar_get_month_names(const lv_obj_t * calendar);
-
-/**
- * Get style of a calendar.
- * @param calendar pointer to calendar object
- * @param type which style should be get
- * @return style pointer to the style
- * */
-const lv_style_t * lv_calendar_get_style(const lv_obj_t * calendar, lv_calendar_style_t type);
-
-/*=====================
- * Other functions
- *====================*/
-
-/**********************
- * MACROS
- **********************/
-
-#endif /*LV_USE_CALENDAR*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_CALENDAR_H*/
diff --git a/src/libs/lvgl/src/lv_objx/lv_canvas.c b/src/libs/lvgl/src/lv_objx/lv_canvas.c
deleted file mode 100644
index 8d2275aa..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_canvas.c
+++ /dev/null
@@ -1,870 +0,0 @@
-/**
- * @file lv_canvas.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include <stdlib.h>
-#include "lv_canvas.h"
-#include "../lv_core/lv_debug.h"
-#include "../lv_misc/lv_math.h"
-#include "../lv_draw/lv_draw.h"
-#include "../lv_core/lv_refr.h"
-
-#if LV_USE_CANVAS != 0
-
-/*********************
- * DEFINES
- *********************/
-#define LV_OBJX_NAME "lv_canvas"
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static lv_res_t lv_canvas_signal(lv_obj_t * canvas, lv_signal_t sign, void * param);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_signal_cb_t ancestor_signal;
-static lv_design_cb_t ancestor_design;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Create a canvas object
- * @param par pointer to an object, it will be the parent of the new canvas
- * @param copy pointer to a canvas object, if not NULL then the new object will be copied from it
- * @return pointer to the created canvas
- */
-lv_obj_t * lv_canvas_create(lv_obj_t * par, const lv_obj_t * copy)
-{
- LV_LOG_TRACE("canvas create started");
-
- /*Create the ancestor of canvas*/
- lv_obj_t * new_canvas = lv_img_create(par, copy);
- LV_ASSERT_MEM(new_canvas);
- if(new_canvas == NULL) return NULL;
-
- /*Allocate the canvas type specific extended data*/
- lv_canvas_ext_t * ext = lv_obj_allocate_ext_attr(new_canvas, sizeof(lv_canvas_ext_t));
- LV_ASSERT_MEM(ext);
- if(ext == NULL) return NULL;
- if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_canvas);
- if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_cb(new_canvas);
-
- /*Initialize the allocated 'ext' */
- ext->dsc.header.always_zero = 0;
- ext->dsc.header.cf = LV_IMG_CF_TRUE_COLOR;
- ext->dsc.header.h = 0;
- ext->dsc.header.w = 0;
- ext->dsc.data_size = 0;
- ext->dsc.data = NULL;
-
- lv_img_set_src(new_canvas, &ext->dsc);
-
- /*The signal and design functions are not copied so set them here*/
- lv_obj_set_signal_cb(new_canvas, lv_canvas_signal);
-
- /*Init the new canvas canvas*/
- if(copy == NULL) {
-
- }
- /*Copy an existing canvas*/
- else {
- /*Refresh the style with new signal function*/
- lv_obj_refresh_style(new_canvas);
- }
-
- LV_LOG_INFO("canvas created");
-
- return new_canvas;
-}
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set a buffer for the canvas.
- * @param buf a buffer where the content of the canvas will be.
- * The required size is (lv_img_color_format_get_px_size(cf) * w * h) / 8)
- * It can be allocated with `lv_mem_alloc()` or
- * it can be statically allocated array (e.g. static lv_color_t buf[100*50]) or
- * it can be an address in RAM or external SRAM
- * @param canvas pointer to a canvas object
- * @param w width of the canvas
- * @param h height of the canvas
- * @param cf color format. The following formats are supported:
- * LV_IMG_CF_TRUE_COLOR, LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED, LV_IMG_CF_INDEXES_1/2/4/8BIT
- *
- */
-void lv_canvas_set_buffer(lv_obj_t * canvas, void * buf, lv_coord_t w, lv_coord_t h, lv_img_cf_t cf)
-{
- LV_ASSERT_OBJ(canvas, LV_OBJX_NAME);
- LV_ASSERT_NULL(buf);
-
- lv_canvas_ext_t * ext = lv_obj_get_ext_attr(canvas);
-
- ext->dsc.header.cf = cf;
- ext->dsc.header.w = w;
- ext->dsc.header.h = h;
- ext->dsc.data = buf;
- ext->dsc.data_size = (lv_img_color_format_get_px_size(cf) * w * h) / 8;
-
- lv_img_set_src(canvas, &ext->dsc);
-}
-
-/**
- * Set the color of a pixel on the canvas
- * @param canvas pointer to canvas object
- * @param x x coordinate of the point to set
- * @param y x coordinate of the point to set
- * @param c color of the point
- */
-void lv_canvas_set_px(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_color_t c)
-{
- LV_ASSERT_OBJ(canvas, LV_OBJX_NAME);
-
- lv_canvas_ext_t * ext = lv_obj_get_ext_attr(canvas);
-
- lv_img_buf_set_px_color(&ext->dsc, x, y, c);
- lv_obj_invalidate(canvas);
-}
-
-/**
- * Set the palette color of a canvas with index format. Valid only for `LV_IMG_CF_INDEXED1/2/4/8`
- * @param canvas pointer to canvas object
- * @param id the palette color to set:
- * - for `LV_IMG_CF_INDEXED1`: 0..1
- * - for `LV_IMG_CF_INDEXED2`: 0..3
- * - for `LV_IMG_CF_INDEXED4`: 0..15
- * - for `LV_IMG_CF_INDEXED8`: 0..255
- * @param c the color to set
- */
-void lv_canvas_set_palette(lv_obj_t * canvas, uint8_t id, lv_color_t c)
-{
- LV_ASSERT_OBJ(canvas, LV_OBJX_NAME);
-
- lv_canvas_ext_t * ext = lv_obj_get_ext_attr(canvas);
-
- lv_img_buf_set_palette(&ext->dsc, id, c);
- lv_obj_invalidate(canvas);
-}
-
-/**
- * Set a style of a canvas.
- * @param canvas pointer to canvas object
- * @param type which style should be set
- * @param style pointer to a style
- */
-void lv_canvas_set_style(lv_obj_t * canvas, lv_canvas_style_t type, const lv_style_t * style)
-{
- LV_ASSERT_OBJ(canvas, LV_OBJX_NAME);
-
- switch(type) {
- case LV_CANVAS_STYLE_MAIN: lv_img_set_style(canvas, LV_IMG_STYLE_MAIN, style); break;
- }
-}
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the color of a pixel on the canvas
- * @param canvas
- * @param x x coordinate of the point to set
- * @param y x coordinate of the point to set
- * @return color of the point
- */
-lv_color_t lv_canvas_get_px(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y)
-{
- LV_ASSERT_OBJ(canvas, LV_OBJX_NAME);
-
- lv_canvas_ext_t * ext = lv_obj_get_ext_attr(canvas);
- const lv_style_t * style = lv_canvas_get_style(canvas, LV_CANVAS_STYLE_MAIN);
-
- return lv_img_buf_get_px_color(&ext->dsc, x, y, style);
-}
-
-/**
- * Get the image of the canvas as a pointer to an `lv_img_dsc_t` variable.
- * @param canvas pointer to a canvas object
- * @return pointer to the image descriptor.
- */
-lv_img_dsc_t * lv_canvas_get_img(lv_obj_t * canvas)
-{
- LV_ASSERT_OBJ(canvas, LV_OBJX_NAME);
-
- lv_canvas_ext_t * ext = lv_obj_get_ext_attr(canvas);
-
- return &ext->dsc;
-}
-
-/**
- * Get style of a canvas.
- * @param canvas pointer to canvas object
- * @param type which style should be get
- * @return style pointer to the style
- */
-const lv_style_t * lv_canvas_get_style(const lv_obj_t * canvas, lv_canvas_style_t type)
-{
- LV_ASSERT_OBJ(canvas, LV_OBJX_NAME);
-
- const lv_style_t * style = NULL;
-
- switch(type) {
- case LV_CANVAS_STYLE_MAIN: style = lv_img_get_style(canvas, LV_IMG_STYLE_MAIN); break;
- default: style = NULL;
- }
-
- return style;
-}
-
-/*=====================
- * Other functions
- *====================*/
-
-/**
- * Copy a buffer to the canvas
- * @param canvas pointer to a canvas object
- * @param to_copy buffer to copy. The color format has to match with the canvas's buffer color
- * format
- * @param w width of the buffer to copy
- * @param h height of the buffer to copy
- * @param x left side of the destination position
- * @param y top side of the destination position
- */
-void lv_canvas_copy_buf(lv_obj_t * canvas, const void * to_copy, lv_coord_t x, lv_coord_t y, lv_coord_t w, lv_coord_t h)
-{
- LV_ASSERT_OBJ(canvas, LV_OBJX_NAME);
- LV_ASSERT_NULL(to_copy);
-
- lv_canvas_ext_t * ext = lv_obj_get_ext_attr(canvas);
- if(x + w >= (lv_coord_t)ext->dsc.header.w || y + h >= (lv_coord_t)ext->dsc.header.h) {
- LV_LOG_WARN("lv_canvas_copy_buf: x or y out of the canvas");
- return;
- }
-
- uint32_t px_size = lv_img_color_format_get_px_size(ext->dsc.header.cf) >> 3;
- uint32_t px = ext->dsc.header.w * y * px_size + x * px_size;
- uint8_t * to_copy8 = (uint8_t *)to_copy;
- lv_coord_t i;
- for(i = 0; i < h; i++) {
- memcpy((void *)&ext->dsc.data[px], to_copy8, w * px_size);
- px += ext->dsc.header.w * px_size;
- to_copy8 += w * px_size;
- }
-}
-
-/**
- * Rotate and image and store the result on a canvas.
- * @param canvas pointer to a canvas object
- * @param img pointer to an image descriptor.
- * Can be the image descriptor of an other canvas too (`lv_canvas_get_img()`).
- * @param angle the angle of rotation (0..360);
- * @param offset_x offset X to tell where to put the result data on destination canvas
- * @param offset_y offset X to tell where to put the result data on destination canvas
- * @param pivot_x pivot X of rotation. Relative to the source canvas
- * Set to `source width / 2` to rotate around the center
- * @param pivot_y pivot Y of rotation. Relative to the source canvas
- * Set to `source height / 2` to rotate around the center
- */
-void lv_canvas_rotate(lv_obj_t * canvas, lv_img_dsc_t * img, int16_t angle, lv_coord_t offset_x, lv_coord_t offset_y,
- int32_t pivot_x, int32_t pivot_y)
-{
- LV_ASSERT_OBJ(canvas, LV_OBJX_NAME);
- LV_ASSERT_NULL(img);
-
- lv_canvas_ext_t * ext_dst = lv_obj_get_ext_attr(canvas);
- const lv_style_t * style = lv_canvas_get_style(canvas, LV_CANVAS_STYLE_MAIN);
- int32_t sinma = lv_trigo_sin(-angle);
- int32_t cosma = lv_trigo_sin(-angle + 90); /* cos */
-
- int32_t img_width = img->header.w;
- int32_t img_height = img->header.h;
- int32_t dest_width = ext_dst->dsc.header.w;
- int32_t dest_height = ext_dst->dsc.header.h;
-
- int32_t x;
- int32_t y;
- for(x = -offset_x; x < dest_width - offset_x; x++) {
- for(y = -offset_y; y < dest_height - offset_y; y++) {
- /*Get the target point relative coordinates to the pivot*/
- int32_t xt = x - pivot_x;
- int32_t yt = y - pivot_y;
-
- /*Get the source pixel from the upscaled image*/
- int32_t xs = ((cosma * xt - sinma * yt) >> (LV_TRIGO_SHIFT - 8)) + pivot_x * 256;
- int32_t ys = ((sinma * xt + cosma * yt) >> (LV_TRIGO_SHIFT - 8)) + pivot_y * 256;
-
- /*Get the integer part of the source pixel*/
- int xs_int = xs >> 8;
- int ys_int = ys >> 8;
-
- if(xs_int >= img_width)
- continue;
- else if(xs_int < 0)
- continue;
-
- if(ys_int >= img_height)
- continue;
- else if(ys_int < 0)
- continue;
-
- /*Get the fractional part of the source pixel*/
- int xs_fract = xs & 0xff;
- int ys_fract = ys & 0xff;
-
- /* If the fractional < 0x70 mix the source pixel with the left/top pixel
- * If the fractional > 0x90 mix the source pixel with the right/bottom pixel
- * In the 0x70..0x90 range use the unchanged source pixel */
-
- int xn; /*x neightboor*/
- lv_opa_t xr; /*x mix ratio*/
- if(xs_fract < 0x70) {
- xn = xs_int - 1;
- xr = xs_fract * 2;
- } else if(xs_fract > 0x90) {
- xn = xs_int + 1;
- xr = (0xFF - xs_fract) * 2;
- } else {
- xn = xs_int;
- xr = 0xFF;
- }
-
- /*Handle under/overflow*/
- if(xn >= img_width)
- continue;
- else if(xn < 0)
- continue;
-
- int yn; /*y neightboor*/
- lv_opa_t yr; /*y mix ratio*/
- if(ys_fract < 0x70) {
- yn = ys_int - 1;
- yr = ys_fract * 2;
- } else if(ys_fract > 0x90) {
- yn = ys_int + 1;
- yr = (0xFF - ys_fract) * 2;
- } else {
- yn = ys_int;
- yr = 0xFF;
- }
-
- /*Handle under/overflow*/
- if(yn >= img_height)
- continue;
- else if(yn < 0)
- continue;
-
- /*Get the mixture of the original source and the neightboor pixels in both directions*/
- lv_color_t c_dest_int = lv_img_buf_get_px_color(img, xs_int, ys_int, style);
-
- if(lv_img_color_format_is_chroma_keyed(img->header.cf)) {
- lv_color_t ct = LV_COLOR_TRANSP;
- if(c_dest_int.full == ct.full) continue;
- }
-
- lv_color_t c_dest_xn = lv_img_buf_get_px_color(img, xn, ys_int, style);
- lv_color_t c_dest_yn = lv_img_buf_get_px_color(img, xs_int, yn, style);
- lv_color_t x_dest = lv_color_mix(c_dest_int, c_dest_xn, xr);
- lv_color_t y_dest = lv_color_mix(c_dest_int, c_dest_yn, yr);
- lv_color_t color_res = lv_color_mix(x_dest, y_dest, LV_OPA_50);
-
- if(x + offset_x >= 0 && x + offset_x < dest_width && y + offset_y >= 0 && y + offset_y < dest_height) {
- /*If the image has no alpha channel just simple set the result color on the canvas*/
- if(lv_img_color_format_has_alpha(img->header.cf) == false) {
- lv_img_buf_set_px_color(&ext_dst->dsc, x + offset_x, y + offset_y, color_res);
- } else {
- /*Get result pixel opacity*/
- lv_opa_t opa_int = lv_img_buf_get_px_alpha(img, xs_int, ys_int);
- lv_opa_t opa_xn = lv_img_buf_get_px_alpha(img, xn, ys_int);
- lv_opa_t opa_yn = lv_img_buf_get_px_alpha(img, xs_int, yn);
- lv_opa_t opa_x = (opa_int * xr + (opa_xn * (255 - xr))) >> 8;
- lv_opa_t opa_y = (opa_int * yr + (opa_yn * (255 - yr))) >> 8;
- lv_opa_t opa_res = (opa_x + opa_y) / 2;
- if(opa_res <= LV_OPA_MIN) continue;
-
- lv_color_t bg_color = lv_img_buf_get_px_color(&ext_dst->dsc, x + offset_x, y + offset_y, style);
-
- /*If the canvas has no alpha but the image has mix the image's color with
- * canvas*/
- if(lv_img_color_format_has_alpha(ext_dst->dsc.header.cf) == false) {
- if(opa_res < LV_OPA_MAX) color_res = lv_color_mix(color_res, bg_color, opa_res);
- lv_img_buf_set_px_color(&ext_dst->dsc, x + offset_x, y + offset_y, color_res);
- }
- /*Both the image and canvas has alpha channel. Some extra calculation is
- required*/
- else {
- lv_opa_t bg_opa = lv_img_buf_get_px_alpha(&ext_dst->dsc, x + offset_x, y + offset_y);
- /* Pick the foreground if it's fully opaque or the Background is fully
- * transparent*/
- if(opa_res >= LV_OPA_MAX || bg_opa <= LV_OPA_MIN) {
- lv_img_buf_set_px_color(&ext_dst->dsc, x + offset_x, y + offset_y, color_res);
- lv_img_buf_set_px_alpha(&ext_dst->dsc, x + offset_x, y + offset_y, opa_res);
- }
- /*Opaque background: use simple mix*/
- else if(bg_opa >= LV_OPA_MAX) {
- lv_img_buf_set_px_color(&ext_dst->dsc, x + offset_x, y + offset_y,
- lv_color_mix(color_res, bg_color, opa_res));
- }
- /*Both colors have alpha. Expensive calculation need to be applied*/
- else {
-
- /*Info:
- * https://en.wikipedia.org/wiki/Alpha_compositing#Analytical_derivation_of_the_over_operator*/
- lv_opa_t opa_res_2 = 255 - ((uint16_t)((uint16_t)(255 - opa_res) * (255 - bg_opa)) >> 8);
- if(opa_res_2 == 0) {
- opa_res_2 = 1; /*never happens, just to be sure*/
- }
- lv_opa_t ratio = (uint16_t)((uint16_t)opa_res * 255) / opa_res_2;
-
- lv_img_buf_set_px_color(&ext_dst->dsc, x + offset_x, y + offset_y,
- lv_color_mix(color_res, bg_color, ratio));
- lv_img_buf_set_px_alpha(&ext_dst->dsc, x + offset_x, y + offset_y, opa_res_2);
- }
- }
- }
- }
- }
- }
-
- lv_obj_invalidate(canvas);
-}
-
-/**
- * Fill the canvas with color
- * @param canvas pointer to a canvas
- * @param color the background color
- */
-void lv_canvas_fill_bg(lv_obj_t * canvas, lv_color_t color)
-{
- LV_ASSERT_OBJ(canvas, LV_OBJX_NAME);
-
- lv_img_dsc_t * dsc = lv_canvas_get_img(canvas);
-
- uint32_t x = dsc->header.w * dsc->header.h;
- uint32_t y;
- for(y = 0; y < dsc->header.h; y++) {
- for(x = 0; x < dsc->header.w; x++) {
- lv_img_buf_set_px_color(dsc, x, y, color);
- }
- }
-}
-
-/**
- * Draw a rectangle on the canvas
- * @param canvas pointer to a canvas object
- * @param x left coordinate of the rectangle
- * @param y top coordinate of the rectangle
- * @param w width of the rectangle
- * @param h height of the rectangle
- * @param style style of the rectangle (`body` properties are used except `padding`)
- */
-void lv_canvas_draw_rect(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord_t w, lv_coord_t h,
- const lv_style_t * style)
-{
- LV_ASSERT_OBJ(canvas, LV_OBJX_NAME);
- LV_ASSERT_NULL(style);
-
- lv_img_dsc_t * dsc = lv_canvas_get_img(canvas);
-
- /* Create a dummy display to fool the lv_draw function.
- * It will think it draws to real screen. */
- lv_area_t mask;
- mask.x1 = 0;
- mask.x2 = dsc->header.w - 1;
- mask.y1 = 0;
- mask.y2 = dsc->header.h - 1;
-
- lv_area_t coords;
- coords.x1 = x;
- coords.y1 = y;
- coords.x2 = x + w - 1;
- coords.y2 = y + h - 1;
-
- lv_disp_t disp;
- memset(&disp, 0, sizeof(lv_disp_t));
-
- lv_disp_buf_t disp_buf;
- lv_disp_buf_init(&disp_buf, (void *)dsc->data, NULL, dsc->header.w * dsc->header.h);
- lv_area_copy(&disp_buf.area, &mask);
-
- lv_disp_drv_init(&disp.driver);
-
- disp.driver.buffer = &disp_buf;
- disp.driver.hor_res = dsc->header.w;
- disp.driver.ver_res = dsc->header.h;
-
-#if LV_ANTIALIAS
- /*Disable anti-aliasing if drawing with transparent color to chroma keyed canvas*/
- lv_color_t ctransp = LV_COLOR_TRANSP;
- if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED &&
- style->body.main_color.full == ctransp.full &&
- style->body.grad_color.full == ctransp.full)
- {
- disp.driver.antialiasing = 0;
- }
-#endif
-
- lv_disp_t * refr_ori = lv_refr_get_disp_refreshing();
- lv_refr_set_disp_refreshing(&disp);
-
- lv_draw_rect(&coords, &mask, style, LV_OPA_COVER);
-
- lv_refr_set_disp_refreshing(refr_ori);
-}
-
-/**
- * Draw a text on the canvas.
- * @param canvas pointer to a canvas object
- * @param x left coordinate of the text
- * @param y top coordinate of the text
- * @param max_w max width of the text. The text will be wrapped to fit into this size
- * @param style style of the text (`text` properties are used)
- * @param txt text to display
- * @param align align of the text (`LV_LABEL_ALIGN_LEFT/RIGHT/CENTER`)
- */
-void lv_canvas_draw_text(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord_t max_w, const lv_style_t * style,
- const char * txt, lv_label_align_t align)
-{
- LV_ASSERT_OBJ(canvas, LV_OBJX_NAME);
- LV_ASSERT_NULL(style);
-
- lv_img_dsc_t * dsc = lv_canvas_get_img(canvas);
-
- /* Create a dummy display to fool the lv_draw function.
- * It will think it draws to real screen. */
- lv_area_t mask;
- mask.x1 = 0;
- mask.x2 = dsc->header.w - 1;
- mask.y1 = 0;
- mask.y2 = dsc->header.h - 1;
-
- lv_area_t coords;
- coords.x1 = x;
- coords.y1 = y;
- coords.x2 = x + max_w - 1;
- coords.y2 = dsc->header.h - 1;
-
- lv_disp_t disp;
- memset(&disp, 0, sizeof(lv_disp_t));
-
- lv_disp_buf_t disp_buf;
- lv_disp_buf_init(&disp_buf, (void *)dsc->data, NULL, dsc->header.w * dsc->header.h);
- lv_area_copy(&disp_buf.area, &mask);
-
- lv_disp_drv_init(&disp.driver);
-
- disp.driver.buffer = &disp_buf;
- disp.driver.hor_res = dsc->header.w;
- disp.driver.ver_res = dsc->header.h;
-
- lv_disp_t * refr_ori = lv_refr_get_disp_refreshing();
- lv_refr_set_disp_refreshing(&disp);
-
- lv_txt_flag_t flag;
- switch(align) {
- case LV_LABEL_ALIGN_LEFT: flag = LV_TXT_FLAG_NONE; break;
- case LV_LABEL_ALIGN_RIGHT: flag = LV_TXT_FLAG_RIGHT; break;
- case LV_LABEL_ALIGN_CENTER: flag = LV_TXT_FLAG_CENTER; break;
- default: flag = LV_TXT_FLAG_NONE; break;
- }
-
- lv_draw_label(&coords, &mask, style, LV_OPA_COVER, txt, flag, NULL, NULL, NULL, lv_obj_get_base_dir(canvas));
-
- lv_refr_set_disp_refreshing(refr_ori);
-}
-
-/**
- * Draw an image on the canvas
- * @param canvas pointer to a canvas object
- * @param src image source. Can be a pointer an `lv_img_dsc_t` variable or a path an image.
- * @param style style of the image (`image` properties are used)
- */
-void lv_canvas_draw_img(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, const void * src, const lv_style_t * style)
-{
- LV_ASSERT_OBJ(canvas, LV_OBJX_NAME);
- LV_ASSERT_NULL(style);
-
- lv_img_dsc_t * dsc = lv_canvas_get_img(canvas);
-
- /* Create a dummy display to fool the lv_draw function.
- * It will think it draws to real screen. */
- lv_area_t mask;
- mask.x1 = 0;
- mask.x2 = dsc->header.w - 1;
- mask.y1 = 0;
- mask.y2 = dsc->header.h - 1;
-
- lv_img_header_t header;
- lv_res_t res = lv_img_decoder_get_info(src, &header);
- if(res != LV_RES_OK) {
- LV_LOG_WARN("lv_canvas_draw_img: Couldn't get the image data.");
- return;
- }
-
- lv_area_t coords;
- coords.x1 = x;
- coords.y1 = y;
- coords.x2 = x + header.w - 1;
- coords.y2 = y + header.h - 1;
-
- lv_disp_t disp;
- memset(&disp, 0, sizeof(lv_disp_t));
-
- lv_disp_buf_t disp_buf;
- lv_disp_buf_init(&disp_buf, (void *)dsc->data, NULL, dsc->header.w * dsc->header.h);
- lv_area_copy(&disp_buf.area, &mask);
-
- lv_disp_drv_init(&disp.driver);
-
- disp.driver.buffer = &disp_buf;
- disp.driver.hor_res = dsc->header.w;
- disp.driver.ver_res = dsc->header.h;
-
- lv_disp_t * refr_ori = lv_refr_get_disp_refreshing();
- lv_refr_set_disp_refreshing(&disp);
-
- lv_draw_img(&coords, &mask, src, style, LV_OPA_COVER);
-
- lv_refr_set_disp_refreshing(refr_ori);
-}
-
-/**
- * Draw a line on the canvas
- * @param canvas pointer to a canvas object
- * @param points point of the line
- * @param point_cnt number of points
- * @param style style of the line (`line` properties are used)
- */
-void lv_canvas_draw_line(lv_obj_t * canvas, const lv_point_t * points, uint32_t point_cnt, const lv_style_t * style)
-{
- LV_ASSERT_OBJ(canvas, LV_OBJX_NAME);
- LV_ASSERT_NULL(style);
-
- lv_img_dsc_t * dsc = lv_canvas_get_img(canvas);
-
- /* Create a dummy display to fool the lv_draw function.
- * It will think it draws to real screen. */
- lv_area_t mask;
- mask.x1 = 0;
- mask.x2 = dsc->header.w - 1;
- mask.y1 = 0;
- mask.y2 = dsc->header.h - 1;
-
- lv_disp_t disp;
- memset(&disp, 0, sizeof(lv_disp_t));
-
- lv_disp_buf_t disp_buf;
- lv_disp_buf_init(&disp_buf, (void *)dsc->data, NULL, dsc->header.w * dsc->header.h);
- lv_area_copy(&disp_buf.area, &mask);
-
- lv_disp_drv_init(&disp.driver);
-
- disp.driver.buffer = &disp_buf;
- disp.driver.hor_res = dsc->header.w;
- disp.driver.ver_res = dsc->header.h;
-
-#if LV_ANTIALIAS
- /*Disable anti-aliasing if drawing with transparent color to chroma keyed canvas*/
- lv_color_t ctransp = LV_COLOR_TRANSP;
- if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED &&
- style->body.main_color.full == ctransp.full &&
- style->body.grad_color.full == ctransp.full)
- {
- disp.driver.antialiasing = 0;
- }
-#endif
-
- lv_disp_t * refr_ori = lv_refr_get_disp_refreshing();
- lv_refr_set_disp_refreshing(&disp);
-
- lv_style_t circle_style_tmp; /*If rounded...*/
- if(style->line.rounded) {
- lv_style_copy(&circle_style_tmp, style);
- circle_style_tmp.body.radius = LV_RADIUS_CIRCLE;
- circle_style_tmp.body.main_color = style->line.color;
- circle_style_tmp.body.grad_color = style->line.color;
- circle_style_tmp.body.opa = style->line.opa;
- }
- lv_area_t circle_area;
- uint32_t i;
- for(i = 0; i < point_cnt - 1; i++) {
- lv_draw_line(&points[i], &points[i + 1], &mask, style, LV_OPA_COVER);
-
- /*Draw circle on the joints if enabled*/
- if(style->line.rounded) {
- circle_area.x1 = points[i].x - ((style->line.width - 1) >> 1) - ((style->line.width - 1) & 0x1);
- circle_area.y1 = points[i].y - ((style->line.width - 1) >> 1) - ((style->line.width - 1) & 0x1);
- circle_area.x2 = points[i].x + ((style->line.width - 1) >> 1);
- circle_area.y2 = points[i].y + ((style->line.width - 1) >> 1);
- lv_draw_rect(&circle_area, &mask, &circle_style_tmp, LV_OPA_COVER);
- }
- }
- /*Draw circle on the last point too if enabled*/
- if(style->line.rounded) {
- circle_area.x1 = points[i].x - ((style->line.width - 1) >> 1) - ((style->line.width - 1) & 0x1);
- circle_area.y1 = points[i].y - ((style->line.width - 1) >> 1) - ((style->line.width - 1) & 0x1);
- circle_area.x2 = points[i].x + ((style->line.width - 1) >> 1);
- circle_area.y2 = points[i].y + ((style->line.width - 1) >> 1);
- lv_draw_rect(&circle_area, &mask, &circle_style_tmp, LV_OPA_COVER);
- }
-
- lv_refr_set_disp_refreshing(refr_ori);
-}
-
-/**
- * Draw a polygon on the canvas
- * @param canvas pointer to a canvas object
- * @param points point of the polygon
- * @param point_cnt number of points
- * @param style style of the polygon (`body.main_color` and `body.opa` is used)
- */
-void lv_canvas_draw_polygon(lv_obj_t * canvas, const lv_point_t * points, uint32_t point_cnt, const lv_style_t * style)
-{
- LV_ASSERT_OBJ(canvas, LV_OBJX_NAME);
- LV_ASSERT_NULL(style);
-
- lv_img_dsc_t * dsc = lv_canvas_get_img(canvas);
-
- /* Create a dummy display to fool the lv_draw function.
- * It will think it draws to real screen. */
- lv_area_t mask;
- mask.x1 = 0;
- mask.x2 = dsc->header.w - 1;
- mask.y1 = 0;
- mask.y2 = dsc->header.h - 1;
-
- lv_disp_t disp;
- memset(&disp, 0, sizeof(lv_disp_t));
-
- lv_disp_buf_t disp_buf;
- lv_disp_buf_init(&disp_buf, (void *)dsc->data, NULL, dsc->header.w * dsc->header.h);
- lv_area_copy(&disp_buf.area, &mask);
-
- lv_disp_drv_init(&disp.driver);
-
- disp.driver.buffer = &disp_buf;
- disp.driver.hor_res = dsc->header.w;
- disp.driver.ver_res = dsc->header.h;
-
-#if LV_ANTIALIAS
- /*Disable anti-aliasing if drawing with transparent color to chroma keyed canvas*/
- lv_color_t ctransp = LV_COLOR_TRANSP;
- if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED &&
- style->body.main_color.full == ctransp.full &&
- style->body.grad_color.full == ctransp.full)
- {
- disp.driver.antialiasing = 0;
- }
-#endif
-
- lv_disp_t * refr_ori = lv_refr_get_disp_refreshing();
- lv_refr_set_disp_refreshing(&disp);
-
- lv_draw_polygon(points, point_cnt, &mask, style, LV_OPA_COVER);
-
- lv_refr_set_disp_refreshing(refr_ori);
-}
-
-/**
- * Draw an arc on the canvas
- * @param canvas pointer to a canvas object
- * @param x origo x of the arc
- * @param y origo y of the arc
- * @param r radius of the arc
- * @param start_angle start angle in degrees
- * @param end_angle end angle in degrees
- * @param style style of the polygon (`body.main_color` and `body.opa` is used)
- */
-void lv_canvas_draw_arc(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord_t r, int32_t start_angle,
- int32_t end_angle, const lv_style_t * style)
-{
- LV_ASSERT_OBJ(canvas, LV_OBJX_NAME);
- LV_ASSERT_NULL(style);
-
- lv_img_dsc_t * dsc = lv_canvas_get_img(canvas);
-
- /* Create a dummy display to fool the lv_draw function.
- * It will think it draws to real screen. */
- lv_area_t mask;
- mask.x1 = 0;
- mask.x2 = dsc->header.w - 1;
- mask.y1 = 0;
- mask.y2 = dsc->header.h - 1;
-
- lv_disp_t disp;
- memset(&disp, 0, sizeof(lv_disp_t));
-
- lv_disp_buf_t disp_buf;
- lv_disp_buf_init(&disp_buf, (void *)dsc->data, NULL, dsc->header.w * dsc->header.h);
- lv_area_copy(&disp_buf.area, &mask);
-
- lv_disp_drv_init(&disp.driver);
-
- disp.driver.buffer = &disp_buf;
- disp.driver.hor_res = dsc->header.w;
- disp.driver.ver_res = dsc->header.h;
-
-#if LV_ANTIALIAS
- /*Disable anti-aliasing if drawing with transparent color to chroma keyed canvas*/
- lv_color_t ctransp = LV_COLOR_TRANSP;
- if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED &&
- style->body.main_color.full == ctransp.full &&
- style->body.grad_color.full == ctransp.full)
- {
- disp.driver.antialiasing = 0;
- }
-#endif
-
- lv_disp_t * refr_ori = lv_refr_get_disp_refreshing();
- lv_refr_set_disp_refreshing(&disp);
-
- lv_draw_arc(x, y, r, &mask, start_angle, end_angle, style, LV_OPA_COVER);
-
- lv_refr_set_disp_refreshing(refr_ori);
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Signal function of the canvas
- * @param canvas pointer to a canvas object
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_canvas_signal(lv_obj_t * canvas, lv_signal_t sign, void * param)
-{
- lv_res_t res;
-
- /* Include the ancient signal function */
- res = ancestor_signal(canvas, sign, param);
- if(res != LV_RES_OK) return res;
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);
-
- if(sign == LV_SIGNAL_CLEANUP) {
- /*Nothing to cleanup. (No dynamically allocated memory in 'ext')*/
- }
-
- return res;
-}
-
-#endif
diff --git a/src/libs/lvgl/src/lv_objx/lv_canvas.h b/src/libs/lvgl/src/lv_objx/lv_canvas.h
deleted file mode 100644
index 9f9cf03e..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_canvas.h
+++ /dev/null
@@ -1,265 +0,0 @@
-/**
- * @file lv_canvas.h
- *
- */
-
-#ifndef LV_CANVAS_H
-#define LV_CANVAS_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_CANVAS != 0
-
-#include "../lv_core/lv_obj.h"
-#include "../lv_objx/lv_img.h"
-#include "../lv_draw/lv_draw_img.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-/*Data of canvas*/
-typedef struct
-{
- lv_img_ext_t img; /*Ext. of ancestor*/
- /*New data for this type */
- lv_img_dsc_t dsc;
-} lv_canvas_ext_t;
-
-/*Styles*/
-enum {
- LV_CANVAS_STYLE_MAIN,
-};
-typedef uint8_t lv_canvas_style_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Create a canvas object
- * @param par pointer to an object, it will be the parent of the new canvas
- * @param copy pointer to a canvas object, if not NULL then the new object will be copied from it
- * @return pointer to the created canvas
- */
-lv_obj_t * lv_canvas_create(lv_obj_t * par, const lv_obj_t * copy);
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set a buffer for the canvas.
- * @param buf a buffer where the content of the canvas will be.
- * The required size is (lv_img_color_format_get_px_size(cf) * w * h) / 8)
- * It can be allocated with `lv_mem_alloc()` or
- * it can be statically allocated array (e.g. static lv_color_t buf[100*50]) or
- * it can be an address in RAM or external SRAM
- * @param canvas pointer to a canvas object
- * @param w width of the canvas
- * @param h height of the canvas
- * @param cf color format. `LV_IMG_CF_...`
- */
-void lv_canvas_set_buffer(lv_obj_t * canvas, void * buf, lv_coord_t w, lv_coord_t h, lv_img_cf_t cf);
-
-/**
- * Set the color of a pixel on the canvas
- * @param canvas
- * @param x x coordinate of the point to set
- * @param y x coordinate of the point to set
- * @param c color of the point
- */
-void lv_canvas_set_px(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_color_t c);
-
-/**
- * Set the palette color of a canvas with index format. Valid only for `LV_IMG_CF_INDEXED1/2/4/8`
- * @param canvas pointer to canvas object
- * @param id the palette color to set:
- * - for `LV_IMG_CF_INDEXED1`: 0..1
- * - for `LV_IMG_CF_INDEXED2`: 0..3
- * - for `LV_IMG_CF_INDEXED4`: 0..15
- * - for `LV_IMG_CF_INDEXED8`: 0..255
- * @param c the color to set
- */
-void lv_canvas_set_palette(lv_obj_t * canvas, uint8_t id, lv_color_t c);
-
-/**
- * Set a style of a canvas.
- * @param canvas pointer to canvas object
- * @param type which style should be set
- * @param style pointer to a style
- */
-void lv_canvas_set_style(lv_obj_t * canvas, lv_canvas_style_t type, const lv_style_t * style);
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the color of a pixel on the canvas
- * @param canvas
- * @param x x coordinate of the point to set
- * @param y x coordinate of the point to set
- * @return color of the point
- */
-lv_color_t lv_canvas_get_px(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y);
-
-/**
- * Get the image of the canvas as a pointer to an `lv_img_dsc_t` variable.
- * @param canvas pointer to a canvas object
- * @return pointer to the image descriptor.
- */
-lv_img_dsc_t * lv_canvas_get_img(lv_obj_t * canvas);
-
-/**
- * Get style of a canvas.
- * @param canvas pointer to canvas object
- * @param type which style should be get
- * @return style pointer to the style
- */
-const lv_style_t * lv_canvas_get_style(const lv_obj_t * canvas, lv_canvas_style_t type);
-
-/*=====================
- * Other functions
- *====================*/
-
-/**
- * Copy a buffer to the canvas
- * @param canvas pointer to a canvas object
- * @param to_copy buffer to copy. The color format has to match with the canvas's buffer color
- * format
- * @param x left side of the destination position
- * @param y top side of the destination position
- * @param w width of the buffer to copy
- * @param h height of the buffer to copy
- */
-void lv_canvas_copy_buf(lv_obj_t * canvas, const void * to_copy, lv_coord_t x, lv_coord_t y, lv_coord_t w,
- lv_coord_t h);
-
-/**
- * Rotate and image and store the result on a canvas.
- * @param canvas pointer to a canvas object
- * @param img pointer to an image descriptor.
- * Can be the image descriptor of an other canvas too (`lv_canvas_get_img()`).
- * @param angle the angle of rotation (0..360);
- * @param offset_x offset X to tell where to put the result data on destination canvas
- * @param offset_y offset X to tell where to put the result data on destination canvas
- * @param pivot_x pivot X of rotation. Relative to the source canvas
- * Set to `source width / 2` to rotate around the center
- * @param pivot_y pivot Y of rotation. Relative to the source canvas
- * Set to `source height / 2` to rotate around the center
- */
-void lv_canvas_rotate(lv_obj_t * canvas, lv_img_dsc_t * img, int16_t angle, lv_coord_t offset_x, lv_coord_t offset_y,
- int32_t pivot_x, int32_t pivot_y);
-
-/**
- * Fill the canvas with color
- * @param canvas pointer to a canvas
- * @param color the background color
- */
-void lv_canvas_fill_bg(lv_obj_t * canvas, lv_color_t color);
-
-/**
- * Draw a rectangle on the canvas
- * @param canvas pointer to a canvas object
- * @param x left coordinate of the rectangle
- * @param y top coordinate of the rectangle
- * @param w width of the rectangle
- * @param h height of the rectangle
- * @param style style of the rectangle (`body` properties are used except `padding`)
- */
-void lv_canvas_draw_rect(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord_t w, lv_coord_t h,
- const lv_style_t * style);
-
-/**
- * Draw a text on the canvas.
- * @param canvas pointer to a canvas object
- * @param x left coordinate of the text
- * @param y top coordinate of the text
- * @param max_w max width of the text. The text will be wrapped to fit into this size
- * @param style style of the text (`text` properties are used)
- * @param txt text to display
- * @param align align of the text (`LV_LABEL_ALIGN_LEFT/RIGHT/CENTER`)
- */
-void lv_canvas_draw_text(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord_t max_w, const lv_style_t * style,
- const char * txt, lv_label_align_t align);
-
-/**
- * Draw an image on the canvas
- * @param canvas pointer to a canvas object
- * @param src image source. Can be a pointer an `lv_img_dsc_t` variable or a path an image.
- * @param style style of the image (`image` properties are used)
- */
-void lv_canvas_draw_img(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, const void * src, const lv_style_t * style);
-
-/**
- * Draw a line on the canvas
- * @param canvas pointer to a canvas object
- * @param points point of the line
- * @param point_cnt number of points
- * @param style style of the line (`line` properties are used)
- */
-void lv_canvas_draw_line(lv_obj_t * canvas, const lv_point_t * points, uint32_t point_cnt, const lv_style_t * style);
-
-/**
- * Draw a polygon on the canvas
- * @param canvas pointer to a canvas object
- * @param points point of the polygon
- * @param point_cnt number of points
- * @param style style of the polygon (`body.main_color` and `body.opa` is used)
- */
-void lv_canvas_draw_polygon(lv_obj_t * canvas, const lv_point_t * points, uint32_t point_cnt, const lv_style_t * style);
-
-/**
- * Draw an arc on the canvas
- * @param canvas pointer to a canvas object
- * @param x origo x of the arc
- * @param y origo y of the arc
- * @param r radius of the arc
- * @param start_angle start angle in degrees
- * @param end_angle end angle in degrees
- * @param style style of the polygon (`body.main_color` and `body.opa` is used)
- */
-void lv_canvas_draw_arc(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord_t r, int32_t start_angle,
- int32_t end_angle, const lv_style_t * style);
-
-/**********************
- * MACROS
- **********************/
-#define LV_CANVAS_BUF_SIZE_TRUE_COLOR(w, h) LV_IMG_BUF_SIZE_TRUE_COLOR(w, h)
-#define LV_CANVAS_BUF_SIZE_TRUE_COLOR_CHROMA_KEYED(w, h) LV_IMG_BUF_SIZE_TRUE_COLOR_CHROMA_KEYED(w, h)
-#define LV_CANVAS_BUF_SIZE_TRUE_COLOR_ALPHA(w, h) LV_IMG_BUF_SIZE_TRUE_COLOR_ALPHA(w, h)
-
-/*+ 1: to be sure no fractional row*/
-#define LV_CANVAS_BUF_SIZE_ALPHA_1BIT(w, h) LV_IMG_BUF_SIZE_ALPHA_1BIT(w, h)
-#define LV_CANVAS_BUF_SIZE_ALPHA_2BIT(w, h) LV_IMG_BUF_SIZE_ALPHA_2BIT(w, h)
-#define LV_CANVAS_BUF_SIZE_ALPHA_4BIT(w, h) LV_IMG_BUF_SIZE_ALPHA_4BIT(w, h)
-#define LV_CANVAS_BUF_SIZE_ALPHA_8BIT(w, h) LV_IMG_BUF_SIZE_ALPHA_8BIT(w, h)
-
-/*4 * X: for palette*/
-#define LV_CANVAS_BUF_SIZE_INDEXED_1BIT(w, h) LV_IMG_BUF_SIZE_INDEXED_1BIT(w, h)
-#define LV_CANVAS_BUF_SIZE_INDEXED_2BIT(w, h) LV_IMG_BUF_SIZE_INDEXED_2BIT(w, h)
-#define LV_CANVAS_BUF_SIZE_INDEXED_4BIT(w, h) LV_IMG_BUF_SIZE_INDEXED_4BIT(w, h)
-#define LV_CANVAS_BUF_SIZE_INDEXED_8BIT(w, h) LV_IMG_BUF_SIZE_INDEXED_8BIT(w, h)
-
-#endif /*LV_USE_CANVAS*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_CANVAS_H*/
diff --git a/src/libs/lvgl/src/lv_objx/lv_cb.c b/src/libs/lvgl/src/lv_objx/lv_cb.c
deleted file mode 100644
index c54adf40..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_cb.c
+++ /dev/null
@@ -1,338 +0,0 @@
-/**
- * @file lv_cb.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_cb.h"
-#if LV_USE_CB != 0
-
-#include "../lv_core/lv_debug.h"
-#include "../lv_core/lv_group.h"
-#include "../lv_themes/lv_theme.h"
-
-/*********************
- * DEFINES
- *********************/
-#define LV_OBJX_NAME "lv_cb"
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static bool lv_cb_design(lv_obj_t * cb, const lv_area_t * mask, lv_design_mode_t mode);
-static bool lv_bullet_design(lv_obj_t * bullet, const lv_area_t * mask, lv_design_mode_t mode);
-static lv_res_t lv_cb_signal(lv_obj_t * cb, lv_signal_t sign, void * param);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_design_cb_t ancestor_bg_design;
-static lv_design_cb_t ancestor_bullet_design;
-static lv_signal_cb_t ancestor_signal;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Create a check box objects
- * @param par pointer to an object, it will be the parent of the new check box
- * @param copy pointer to a check box object, if not NULL then the new object will be copied from it
- * @return pointer to the created check box
- */
-lv_obj_t * lv_cb_create(lv_obj_t * par, const lv_obj_t * copy)
-{
-
- LV_LOG_TRACE("check box create started");
-
- /*Create the ancestor basic object*/
- lv_obj_t * new_cb = lv_btn_create(par, copy);
- LV_ASSERT_MEM(new_cb);
- if(new_cb == NULL) return NULL;
-
- if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_cb);
- if(ancestor_bg_design == NULL) ancestor_bg_design = lv_obj_get_design_cb(new_cb);
-
- lv_cb_ext_t * ext = lv_obj_allocate_ext_attr(new_cb, sizeof(lv_cb_ext_t));
- LV_ASSERT_MEM(ext);
- if(ext == NULL) return NULL;
-
- ext->bullet = NULL;
- ext->label = NULL;
-
- lv_obj_set_signal_cb(new_cb, lv_cb_signal);
- lv_obj_set_design_cb(new_cb, lv_cb_design);
-
- /*Init the new checkbox object*/
- if(copy == NULL) {
- ext->bullet = lv_btn_create(new_cb, NULL);
- if(ancestor_bullet_design == NULL) ancestor_bullet_design = lv_obj_get_design_cb(ext->bullet);
- lv_obj_set_click(ext->bullet, false);
-
- ext->label = lv_label_create(new_cb, NULL);
-
- lv_cb_set_text(new_cb, "Check box");
- lv_btn_set_layout(new_cb, LV_LAYOUT_ROW_M);
- lv_btn_set_fit(new_cb, LV_FIT_TIGHT);
- lv_btn_set_toggle(new_cb, true);
- lv_obj_set_protect(new_cb, LV_PROTECT_PRESS_LOST);
-
- /*Set the default styles*/
- lv_theme_t * th = lv_theme_get_current();
- if(th) {
- lv_cb_set_style(new_cb, LV_CB_STYLE_BG, th->style.cb.bg);
- lv_cb_set_style(new_cb, LV_CB_STYLE_BOX_REL, th->style.cb.box.rel);
- lv_cb_set_style(new_cb, LV_CB_STYLE_BOX_PR, th->style.cb.box.pr);
- lv_cb_set_style(new_cb, LV_CB_STYLE_BOX_TGL_REL, th->style.cb.box.tgl_rel);
- lv_cb_set_style(new_cb, LV_CB_STYLE_BOX_TGL_PR, th->style.cb.box.tgl_pr);
- lv_cb_set_style(new_cb, LV_CB_STYLE_BOX_INA, th->style.cb.box.ina);
- } else {
- lv_cb_set_style(new_cb, LV_CB_STYLE_BG, &lv_style_transp);
- lv_cb_set_style(new_cb, LV_CB_STYLE_BOX_REL, &lv_style_pretty);
- }
- } else {
- lv_cb_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
- ext->bullet = lv_btn_create(new_cb, copy_ext->bullet);
- ext->label = lv_label_create(new_cb, copy_ext->label);
-
- /*Refresh the style with new signal function*/
- lv_obj_refresh_style(new_cb);
- }
-
- lv_obj_set_design_cb(ext->bullet, lv_bullet_design);
-
- LV_LOG_INFO("check box created");
-
- return new_cb;
-}
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set the text of a check box. `txt` will be copied and may be deallocated
- * after this function returns.
- * @param cb pointer to a check box
- * @param txt the text of the check box. NULL to refresh with the current text.
- */
-void lv_cb_set_text(lv_obj_t * cb, const char * txt)
-{
- LV_ASSERT_OBJ(cb, LV_OBJX_NAME);
-
- lv_cb_ext_t * ext = lv_obj_get_ext_attr(cb);
- lv_label_set_text(ext->label, txt);
-}
-
-/**
- * Set the text of a check box. `txt` must not be deallocated during the life
- * of this checkbox.
- * @param cb pointer to a check box
- * @param txt the text of the check box. NULL to refresh with the current text.
- */
-void lv_cb_set_static_text(lv_obj_t * cb, const char * txt)
-{
- LV_ASSERT_OBJ(cb, LV_OBJX_NAME);
-
- lv_cb_ext_t * ext = lv_obj_get_ext_attr(cb);
- lv_label_set_static_text(ext->label, txt);
-}
-
-/**
- * Set a style of a check box
- * @param cb pointer to check box object
- * @param type which style should be set
- * @param style pointer to a style
- * */
-void lv_cb_set_style(lv_obj_t * cb, lv_cb_style_t type, const lv_style_t * style)
-{
- LV_ASSERT_OBJ(cb, LV_OBJX_NAME);
-
- lv_cb_ext_t * ext = lv_obj_get_ext_attr(cb);
-
- switch(type) {
- case LV_CB_STYLE_BG:
- lv_btn_set_style(cb, LV_BTN_STYLE_REL, style);
- lv_btn_set_style(cb, LV_BTN_STYLE_PR, style);
- lv_btn_set_style(cb, LV_BTN_STYLE_TGL_REL, style);
- lv_btn_set_style(cb, LV_BTN_STYLE_TGL_PR, style);
- lv_btn_set_style(cb, LV_BTN_STYLE_INA, style);
- break;
- case LV_CB_STYLE_BOX_REL: lv_btn_set_style(ext->bullet, LV_BTN_STYLE_REL, style); break;
- case LV_CB_STYLE_BOX_PR: lv_btn_set_style(ext->bullet, LV_BTN_STYLE_PR, style); break;
- case LV_CB_STYLE_BOX_TGL_REL: lv_btn_set_style(ext->bullet, LV_BTN_STYLE_TGL_REL, style); break;
- case LV_CB_STYLE_BOX_TGL_PR: lv_btn_set_style(ext->bullet, LV_BTN_STYLE_TGL_PR, style); break;
- case LV_CB_STYLE_BOX_INA: lv_btn_set_style(ext->bullet, LV_BTN_STYLE_INA, style); break;
- }
-}
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the text of a check box
- * @param cb pointer to check box object
- * @return pointer to the text of the check box
- */
-const char * lv_cb_get_text(const lv_obj_t * cb)
-{
- LV_ASSERT_OBJ(cb, LV_OBJX_NAME);
-
- lv_cb_ext_t * ext = lv_obj_get_ext_attr(cb);
- return lv_label_get_text(ext->label);
-}
-
-/**
- * Get a style of a button
- * @param cb pointer to check box object
- * @param type which style should be get
- * @return style pointer to the style
- * */
-const lv_style_t * lv_cb_get_style(const lv_obj_t * cb, lv_cb_style_t type)
-{
- LV_ASSERT_OBJ(cb, LV_OBJX_NAME);
-
- const lv_style_t * style = NULL;
- lv_cb_ext_t * ext = lv_obj_get_ext_attr(cb);
-
- switch(type) {
- case LV_CB_STYLE_BG: style = lv_btn_get_style(cb, LV_BTN_STYLE_REL); break;
- case LV_CB_STYLE_BOX_REL: style = lv_btn_get_style(ext->bullet, LV_BTN_STYLE_REL); break;
- case LV_CB_STYLE_BOX_PR: style = lv_btn_get_style(ext->bullet, LV_BTN_STYLE_PR); break;
- case LV_CB_STYLE_BOX_TGL_REL: style = lv_btn_get_style(ext->bullet, LV_BTN_STYLE_TGL_REL); break;
- case LV_CB_STYLE_BOX_TGL_PR: style = lv_btn_get_style(ext->bullet, LV_BTN_STYLE_TGL_PR); break;
- case LV_CB_STYLE_BOX_INA: style = lv_btn_get_style(ext->bullet, LV_BTN_STYLE_INA); break;
- default: style = NULL; break;
- }
-
- return style;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Handle the drawing related tasks of the check boxes
- * @param cb pointer to an object
- * @param mask the object will be drawn only in this area
- * @param mode LV_DESIGN_COVER_CHK: only check if the object fully covers the 'mask_p' area
- * (return 'true' if yes)
- * LV_DESIGN_DRAW: draw the object (always return 'true')
- * LV_DESIGN_DRAW_POST: drawing after every children are drawn
- * @param return true/false, depends on 'mode'
- */
-static bool lv_cb_design(lv_obj_t * cb, const lv_area_t * mask, lv_design_mode_t mode)
-{
- bool result = true;
-
- if(mode == LV_DESIGN_COVER_CHK) {
- /*Return false if the object is not covers the mask_p area*/
- result = ancestor_bg_design(cb, mask, mode);
- } else if(mode == LV_DESIGN_DRAW_MAIN || mode == LV_DESIGN_DRAW_POST) {
- lv_cb_ext_t * cb_ext = lv_obj_get_ext_attr(cb);
- lv_btn_ext_t * bullet_ext = lv_obj_get_ext_attr(cb_ext->bullet);
-
- /*Be sure the state of the bullet is the same as the parent button*/
- bullet_ext->state = cb_ext->bg_btn.state;
-
- result = ancestor_bg_design(cb, mask, mode);
-
- } else {
- result = ancestor_bg_design(cb, mask, mode);
- }
-
- return result;
-}
-
-/**
- * Handle the drawing related tasks of the check boxes
- * @param bullet pointer to an object
- * @param mask the object will be drawn only in this area
- * @param mode LV_DESIGN_COVER_CHK: only check if the object fully covers the 'mask_p' area
- * (return 'true' if yes)
- * LV_DESIGN_DRAW: draw the object (always return 'true')
- * LV_DESIGN_DRAW_POST: drawing after every children are drawn
- * @param return true/false, depends on 'mode'
- */
-static bool lv_bullet_design(lv_obj_t * bullet, const lv_area_t * mask, lv_design_mode_t mode)
-{
- if(mode == LV_DESIGN_COVER_CHK) {
- return ancestor_bullet_design(bullet, mask, mode);
- } else if(mode == LV_DESIGN_DRAW_MAIN) {
-#if LV_USE_GROUP
- /* If the check box is the active in a group and
- * the background is not visible (transparent)
- * then activate the style of the bullet*/
- const lv_style_t * style_ori = lv_obj_get_style(bullet);
- lv_obj_t * bg = lv_obj_get_parent(bullet);
- const lv_style_t * style_page = lv_obj_get_style(bg);
- lv_group_t * g = lv_obj_get_group(bg);
- if(style_page->body.opa == LV_OPA_TRANSP) { /*Is the Background visible?*/
- if(lv_group_get_focused(g) == bg) {
- lv_style_t * style_mod;
- style_mod = lv_group_mod_style(g, style_ori);
- bullet->style_p = style_mod; /*Temporally change the style to the activated */
- }
- }
-#endif
- ancestor_bullet_design(bullet, mask, mode);
-
-#if LV_USE_GROUP
- bullet->style_p = style_ori; /*Revert the style*/
-#endif
- } else if(mode == LV_DESIGN_DRAW_POST) {
- ancestor_bullet_design(bullet, mask, mode);
- }
-
- return true;
-}
-
-/**
- * Signal function of the check box
- * @param cb pointer to a check box object
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_cb_signal(lv_obj_t * cb, lv_signal_t sign, void * param)
-{
- lv_res_t res;
-
- /* Include the ancient signal function */
- res = ancestor_signal(cb, sign, param);
- if(res != LV_RES_OK) return res;
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);
-
- lv_cb_ext_t * ext = lv_obj_get_ext_attr(cb);
-
- if(sign == LV_SIGNAL_STYLE_CHG) {
- const lv_style_t * label_style = lv_label_get_style(ext->label, LV_LABEL_STYLE_MAIN);
- lv_obj_set_size(ext->bullet, lv_font_get_line_height(label_style->text.font),
- lv_font_get_line_height(label_style->text.font));
- lv_btn_set_state(ext->bullet, lv_btn_get_state(cb));
- } else if(sign == LV_SIGNAL_PRESSED || sign == LV_SIGNAL_RELEASED || sign == LV_SIGNAL_PRESS_LOST) {
- lv_btn_set_state(ext->bullet, lv_btn_get_state(cb));
- } else if(sign == LV_SIGNAL_CONTROL) {
- char c = *((char *)param);
- if(c == LV_KEY_RIGHT || c == LV_KEY_DOWN || c == LV_KEY_LEFT || c == LV_KEY_UP) {
- /*Follow the backgrounds state with the bullet*/
- lv_btn_set_state(ext->bullet, lv_btn_get_state(cb));
- }
- }
-
- return res;
-}
-
-#endif
diff --git a/src/libs/lvgl/src/lv_objx/lv_cb.h b/src/libs/lvgl/src/lv_objx/lv_cb.h
deleted file mode 100644
index a6b1e74a..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_cb.h
+++ /dev/null
@@ -1,173 +0,0 @@
-/**
- * @file lv_cb.h
- *
- */
-
-#ifndef LV_CB_H
-#define LV_CB_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_CB != 0
-
-/*Testing of dependencies*/
-#if LV_USE_BTN == 0
-#error "lv_cb: lv_btn is required. Enable it in lv_conf.h (LV_USE_BTN 1) "
-#endif
-
-#if LV_USE_LABEL == 0
-#error "lv_cb: lv_label is required. Enable it in lv_conf.h (LV_USE_LABEL 1) "
-#endif
-
-#include "../lv_core/lv_obj.h"
-#include "lv_btn.h"
-#include "lv_label.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/*Data of check box*/
-typedef struct
-{
- lv_btn_ext_t bg_btn; /*Ext. of ancestor*/
- /*New data for this type */
- lv_obj_t * bullet; /*Pointer to button*/
- lv_obj_t * label; /*Pointer to label*/
-} lv_cb_ext_t;
-
-/** Checkbox styles. */
-enum {
- LV_CB_STYLE_BG, /**< Style of object background. */
- LV_CB_STYLE_BOX_REL, /**< Style of box (released). */
- LV_CB_STYLE_BOX_PR, /**< Style of box (pressed). */
- LV_CB_STYLE_BOX_TGL_REL, /**< Style of box (released but checked). */
- LV_CB_STYLE_BOX_TGL_PR, /**< Style of box (pressed and checked). */
- LV_CB_STYLE_BOX_INA, /**< Style of disabled box */
-};
-typedef uint8_t lv_cb_style_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Create a check box objects
- * @param par pointer to an object, it will be the parent of the new check box
- * @param copy pointer to a check box object, if not NULL then the new object will be copied from it
- * @return pointer to the created check box
- */
-lv_obj_t * lv_cb_create(lv_obj_t * par, const lv_obj_t * copy);
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set the text of a check box. `txt` will be copied and may be deallocated
- * after this function returns.
- * @param cb pointer to a check box
- * @param txt the text of the check box. NULL to refresh with the current text.
- */
-void lv_cb_set_text(lv_obj_t * cb, const char * txt);
-
-/**
- * Set the text of a check box. `txt` must not be deallocated during the life
- * of this checkbox.
- * @param cb pointer to a check box
- * @param txt the text of the check box. NULL to refresh with the current text.
- */
-void lv_cb_set_static_text(lv_obj_t * cb, const char * txt);
-
-/**
- * Set the state of the check box
- * @param cb pointer to a check box object
- * @param checked true: make the check box checked; false: make it unchecked
- */
-static inline void lv_cb_set_checked(lv_obj_t * cb, bool checked)
-{
- lv_btn_set_state(cb, checked ? LV_BTN_STATE_TGL_REL : LV_BTN_STATE_REL);
-}
-
-/**
- * Make the check box inactive (disabled)
- * @param cb pointer to a check box object
- */
-static inline void lv_cb_set_inactive(lv_obj_t * cb)
-{
- lv_btn_set_state(cb, LV_BTN_STATE_INA);
-}
-
-/**
- * Set a style of a check box
- * @param cb pointer to check box object
- * @param type which style should be set
- * @param style pointer to a style
- * */
-void lv_cb_set_style(lv_obj_t * cb, lv_cb_style_t type, const lv_style_t * style);
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the text of a check box
- * @param cb pointer to check box object
- * @return pointer to the text of the check box
- */
-const char * lv_cb_get_text(const lv_obj_t * cb);
-
-/**
- * Get the current state of the check box
- * @param cb pointer to a check box object
- * @return true: checked; false: not checked
- */
-static inline bool lv_cb_is_checked(const lv_obj_t * cb)
-{
- return lv_btn_get_state(cb) == LV_BTN_STATE_REL ? false : true;
-}
-
-/**
- * Get whether the check box is inactive or not.
- * @param cb pointer to a check box object
- * @return true: inactive; false: not inactive
- */
-static inline bool lv_cb_is_inactive(const lv_obj_t * cb)
-{
- return lv_btn_get_state(cb) == LV_BTN_STATE_INA ? true :false;
-}
-
-/**
- * Get a style of a button
- * @param cb pointer to check box object
- * @param type which style should be get
- * @return style pointer to the style
- * */
-const lv_style_t * lv_cb_get_style(const lv_obj_t * cb, lv_cb_style_t type);
-
-/**********************
- * MACROS
- **********************/
-
-#endif /*LV_USE_CB*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_CB_H*/
diff --git a/src/libs/lvgl/src/lv_objx/lv_chart.c b/src/libs/lvgl/src/lv_objx/lv_chart.c
deleted file mode 100644
index 2dfdef0e..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_chart.c
+++ /dev/null
@@ -1,1557 +0,0 @@
-/**
- * @file lv_chart.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_chart.h"
-#if LV_USE_CHART != 0
-
-#include "../lv_core/lv_debug.h"
-#include "../lv_core/lv_refr.h"
-#include "../lv_draw/lv_draw.h"
-#include "../lv_themes/lv_theme.h"
-
-/*********************
- * DEFINES
- *********************/
-#define LV_OBJX_NAME "lv_chart"
-
-#define LV_CHART_YMIN_DEF 0
-#define LV_CHART_YMAX_DEF 100
-#define LV_CHART_HDIV_DEF 3
-#define LV_CHART_VDIV_DEF 5
-#define LV_CHART_PNUM_DEF 10
-#define LV_CHART_AXIS_TO_LABEL_DISTANCE 4
-#define LV_CHART_AXIS_MAJOR_TICK_LEN_COE 1 / 15
-#define LV_CHART_AXIS_MINOR_TICK_LEN_COE 2 / 3
-#define LV_CHART_AXIS_PRIMARY_Y 1
-#define LV_CHART_AXIS_SECONDARY_Y 0
-#define LV_CHART_LABEL_ITERATOR_FORWARD 1
-#define LV_CHART_LABEL_ITERATOR_REVERSE 0
-
-/**********************
- * TYPEDEFS
- **********************/
-
-typedef struct {
- const char * list_start;
- const char * current_pos;
- uint8_t items_left;
- uint8_t is_reverse_iter;
-} lv_chart_label_iterator_t;
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static bool lv_chart_design(lv_obj_t * chart, const lv_area_t * mask, lv_design_mode_t mode);
-static lv_res_t lv_chart_signal(lv_obj_t * chart, lv_signal_t sign, void * param);
-static void lv_chart_draw_div(lv_obj_t * chart, const lv_area_t * mask);
-static void lv_chart_draw_lines(lv_obj_t * chart, const lv_area_t * mask);
-static void lv_chart_draw_points(lv_obj_t * chart, const lv_area_t * mask);
-static void lv_chart_draw_cols(lv_obj_t * chart, const lv_area_t * mask);
-static void lv_chart_draw_vertical_lines(lv_obj_t * chart, const lv_area_t * mask);
-static void lv_chart_draw_areas(lv_obj_t * chart, const lv_area_t * mask);
-static void lv_chart_draw_axes(lv_obj_t * chart, const lv_area_t * mask);
-static void lv_chart_inv_lines(lv_obj_t * chart, uint16_t i);
-static void lv_chart_inv_points(lv_obj_t * chart, uint16_t i);
-static void lv_chart_inv_cols(lv_obj_t * chart, uint16_t i);
-static void lv_chart_get_next_label(lv_chart_label_iterator_t * iterator, char * buf);
-static inline bool lv_chart_is_tick_with_label(uint8_t tick_num, lv_chart_axis_cfg_t * axis);
-static lv_chart_label_iterator_t lv_chart_create_label_iter(const char * list, uint8_t iterator_dir);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_design_cb_t ancestor_design_f;
-static lv_signal_cb_t ancestor_signal;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Create a chart background objects
- * @param par pointer to an object, it will be the parent of the new chart background
- * @param copy pointer to a chart background object, if not NULL then the new object will be copied
- * from it
- * @return pointer to the created chart background
- */
-lv_obj_t * lv_chart_create(lv_obj_t * par, const lv_obj_t * copy)
-{
- LV_LOG_TRACE("chart create started");
-
- /*Create the ancestor basic object*/
- lv_obj_t * new_chart = lv_obj_create(par, copy);
- LV_ASSERT_MEM(new_chart);
- if(new_chart == NULL) return NULL;
-
- /*Allocate the object type specific extended data*/
- lv_chart_ext_t * ext = lv_obj_allocate_ext_attr(new_chart, sizeof(lv_chart_ext_t));
- LV_ASSERT_MEM(ext);
- if(ext == NULL) return NULL;
-
- lv_ll_init(&ext->series_ll, sizeof(lv_chart_series_t));
-
- ext->series.num = 0;
- ext->ymin = LV_CHART_YMIN_DEF;
- ext->ymax = LV_CHART_YMAX_DEF;
- ext->hdiv_cnt = LV_CHART_HDIV_DEF;
- ext->vdiv_cnt = LV_CHART_VDIV_DEF;
- ext->point_cnt = LV_CHART_PNUM_DEF;
- ext->type = LV_CHART_TYPE_LINE;
- ext->update_mode = LV_CHART_UPDATE_MODE_SHIFT;
- ext->series.opa = LV_OPA_COVER;
- ext->series.dark = LV_OPA_50;
- ext->series.width = 2;
- ext->margin = 0;
- memset(&ext->x_axis, 0, sizeof(ext->x_axis));
- memset(&ext->y_axis, 0, sizeof(ext->y_axis));
- memset(&ext->secondary_y_axis, 0, sizeof(ext->secondary_y_axis));
- ext->x_axis.major_tick_len = LV_CHART_TICK_LENGTH_AUTO;
- ext->x_axis.minor_tick_len = LV_CHART_TICK_LENGTH_AUTO;
- ext->y_axis.major_tick_len = LV_CHART_TICK_LENGTH_AUTO;
- ext->y_axis.minor_tick_len = LV_CHART_TICK_LENGTH_AUTO;
- ext->secondary_y_axis.major_tick_len = LV_CHART_TICK_LENGTH_AUTO;
- ext->secondary_y_axis.minor_tick_len = LV_CHART_TICK_LENGTH_AUTO;
-
- if(ancestor_design_f == NULL) ancestor_design_f = lv_obj_get_design_cb(new_chart);
- if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_chart);
-
- lv_obj_set_signal_cb(new_chart, lv_chart_signal);
- lv_obj_set_design_cb(new_chart, lv_chart_design);
-
- /*Init the new chart background object*/
- if(copy == NULL) {
- lv_obj_set_size(new_chart, LV_DPI * 3, LV_DPI * 2);
-
- /*Set the default styles*/
- lv_theme_t * th = lv_theme_get_current();
- if(th) {
- lv_chart_set_style(new_chart, LV_CHART_STYLE_MAIN, th->style.chart);
- } else {
- lv_chart_set_style(new_chart, LV_CHART_STYLE_MAIN, &lv_style_pretty);
- }
-
- } else {
- lv_chart_ext_t * ext_copy = lv_obj_get_ext_attr(copy);
-
- ext->type = ext_copy->type;
- ext->ymin = ext_copy->ymin;
- ext->ymax = ext_copy->ymax;
- ext->hdiv_cnt = ext_copy->hdiv_cnt;
- ext->vdiv_cnt = ext_copy->vdiv_cnt;
- ext->point_cnt = ext_copy->point_cnt;
- ext->series.opa = ext_copy->series.opa;
- ext->margin = ext_copy->margin;
- memcpy(&ext->x_axis, &ext_copy->x_axis, sizeof(lv_chart_axis_cfg_t));
- memcpy(&ext->y_axis, &ext_copy->y_axis, sizeof(lv_chart_axis_cfg_t));
- memcpy(&ext->secondary_y_axis, &ext_copy->secondary_y_axis, sizeof(lv_chart_axis_cfg_t));
-
- /*Refresh the style with new signal function*/
- lv_obj_refresh_style(new_chart);
- }
-
- LV_LOG_INFO("chart created");
-
- return new_chart;
-}
-
-/*======================
- * Add/remove functions
- *=====================*/
-
-/**
- * Allocate and add a data series to the chart
- * @param chart pointer to a chart object
- * @param color color of the data series
- * @return pointer to the allocated data series
- */
-lv_chart_series_t * lv_chart_add_series(lv_obj_t * chart, lv_color_t color)
-{
- LV_ASSERT_OBJ(chart, LV_OBJX_NAME);
-
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
- lv_chart_series_t * ser = lv_ll_ins_head(&ext->series_ll);
- LV_ASSERT_MEM(ser);
- if(ser == NULL) return NULL;
-
- lv_coord_t def = LV_CHART_POINT_DEF;
-
- if(ser == NULL) return NULL;
-
- ser->color = color;
- ser->points = lv_mem_alloc(sizeof(lv_coord_t) * ext->point_cnt);
- LV_ASSERT_MEM(ser->points);
- if(ser->points == NULL) {
- lv_ll_rem(&ext->series_ll, ser);
- lv_mem_free(ser);
- return NULL;
- }
-
- ser->start_point = 0;
-
- uint16_t i;
- lv_coord_t * p_tmp = ser->points;
- for(i = 0; i < ext->point_cnt; i++) {
- *p_tmp = def;
- p_tmp++;
- }
-
- ext->series.num++;
-
- return ser;
-}
-
-/**
- * Clear the point of a serie
- * @param chart pointer to a chart object
- * @param serie pointer to the chart's serie to clear
- */
-void lv_chart_clear_serie(lv_obj_t * chart, lv_chart_series_t * serie)
-{
- LV_ASSERT_OBJ(chart, LV_OBJX_NAME);
- LV_ASSERT_NULL(serie);
-
- if(chart == NULL || serie == NULL) return;
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
- if(ext == NULL) return;
-
- uint32_t i;
- for(i = 0; i < ext->point_cnt; i++) {
- serie->points[i] = LV_CHART_POINT_DEF;
- }
-
- serie->start_point = 0;
-}
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set the number of horizontal and vertical division lines
- * @param chart pointer to a graph background object
- * @param hdiv number of horizontal division lines
- * @param vdiv number of vertical division lines
- */
-void lv_chart_set_div_line_count(lv_obj_t * chart, uint8_t hdiv, uint8_t vdiv)
-{
- LV_ASSERT_OBJ(chart, LV_OBJX_NAME);
-
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
- if(ext->hdiv_cnt == hdiv && ext->vdiv_cnt == vdiv) return;
-
- ext->hdiv_cnt = hdiv;
- ext->vdiv_cnt = vdiv;
-
- lv_obj_invalidate(chart);
-}
-
-/**
- * Set the minimal and maximal y values
- * @param chart pointer to a graph background object
- * @param ymin y minimum value
- * @param ymax y maximum value
- */
-void lv_chart_set_range(lv_obj_t * chart, lv_coord_t ymin, lv_coord_t ymax)
-{
- LV_ASSERT_OBJ(chart, LV_OBJX_NAME);
-
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
- if(ext->ymin == ymin && ext->ymax == ymax) return;
-
- ext->ymin = ymin;
- ext->ymax = ymax;
-
- lv_chart_refresh(chart);
-}
-
-/**
- * Set a new type for a chart
- * @param chart pointer to a chart object
- * @param type new type of the chart (from 'lv_chart_type_t' enum)
- */
-void lv_chart_set_type(lv_obj_t * chart, lv_chart_type_t type)
-{
- LV_ASSERT_OBJ(chart, LV_OBJX_NAME);
-
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
- if(ext->type == type) return;
-
- ext->type = type;
-
- lv_chart_refresh(chart);
-}
-
-/**
- * Set the number of points on a data line on a chart
- * @param chart pointer r to chart object
- * @param point_cnt new number of points on the data lines
- */
-void lv_chart_set_point_count(lv_obj_t * chart, uint16_t point_cnt)
-{
- LV_ASSERT_OBJ(chart, LV_OBJX_NAME);
-
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
- if(ext->point_cnt == point_cnt) return;
-
- lv_chart_series_t * ser;
- uint16_t point_cnt_old = ext->point_cnt;
- uint16_t i;
- lv_coord_t def = LV_CHART_POINT_DEF;
-
- if(point_cnt < 1) point_cnt = 1;
-
- LV_LL_READ_BACK(ext->series_ll, ser)
- {
- if(ser->start_point != 0) {
- lv_coord_t * new_points = lv_mem_alloc(sizeof(lv_coord_t) * point_cnt);
- LV_ASSERT_MEM(new_points);
- if(new_points == NULL) return;
-
- if(point_cnt >= point_cnt_old) {
- for(i = 0; i < point_cnt_old; i++) {
- new_points[i] =
- ser->points[(i + ser->start_point) % point_cnt_old]; /*Copy old contents to new array*/
- }
- for(i = point_cnt_old; i < point_cnt; i++) {
- new_points[i] = def; /*Fill up the rest with default value*/
- }
- } else {
- for(i = 0; i < point_cnt; i++) {
- new_points[i] =
- ser->points[(i + ser->start_point) % point_cnt_old]; /*Copy old contents to new array*/
- }
- }
-
- /*Switch over pointer from old to new*/
- lv_mem_free(ser->points);
- ser->points = new_points;
- } else {
- ser->points = lv_mem_realloc(ser->points, sizeof(lv_coord_t) * point_cnt);
- LV_ASSERT_MEM(ser->points);
- if(ser->points == NULL) return;
- /*Initialize the new points*/
- if(point_cnt > point_cnt_old) {
- for(i = point_cnt_old - 1; i < point_cnt; i++) {
- ser->points[i] = def;
- }
- }
- }
-
- ser->start_point = 0;
- }
-
- ext->point_cnt = point_cnt;
-
- lv_chart_refresh(chart);
-}
-
-/**
- * Set the opacity of the data series
- * @param chart pointer to a chart object
- * @param opa opacity of the data series
- */
-void lv_chart_set_series_opa(lv_obj_t * chart, lv_opa_t opa)
-{
- LV_ASSERT_OBJ(chart, LV_OBJX_NAME);
-
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
- if(ext->series.opa == opa) return;
-
- ext->series.opa = opa;
- lv_obj_invalidate(chart);
-}
-
-/**
- * Set the line width or point radius of the data series
- * @param chart pointer to a chart object
- * @param width the new width
- */
-void lv_chart_set_series_width(lv_obj_t * chart, lv_coord_t width)
-{
- LV_ASSERT_OBJ(chart, LV_OBJX_NAME);
-
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
- if(ext->series.width == width) return;
-
- ext->series.width = width;
- lv_obj_invalidate(chart);
-}
-/**
- * Set the dark effect on the bottom of the points or columns
- * @param chart pointer to a chart object
- * @param dark_eff dark effect level (LV_OPA_TRANSP to turn off)
- */
-void lv_chart_set_series_darking(lv_obj_t * chart, lv_opa_t dark_eff)
-{
- LV_ASSERT_OBJ(chart, LV_OBJX_NAME);
-
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
- if(ext->series.dark == dark_eff) return;
-
- ext->series.dark = dark_eff;
- lv_obj_invalidate(chart);
-}
-
-/**
- * Initialize all data points with a value
- * @param chart pointer to chart object
- * @param ser pointer to a data series on 'chart'
- * @param y the new value for all points
- */
-void lv_chart_init_points(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t y)
-{
- LV_ASSERT_OBJ(chart, LV_OBJX_NAME);
- LV_ASSERT_NULL(ser);
-
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
- uint16_t i;
- for(i = 0; i < ext->point_cnt; i++) {
- ser->points[i] = y;
- }
- ser->start_point = 0;
- lv_chart_refresh(chart);
-}
-
-/**
- * Set the value of points from an array
- * @param chart pointer to chart object
- * @param ser pointer to a data series on 'chart'
- * @param y_array array of 'lv_coord_t' points (with 'points count' elements )
- */
-void lv_chart_set_points(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t y_array[])
-{
- LV_ASSERT_OBJ(chart, LV_OBJX_NAME);
- LV_ASSERT_NULL(ser);
-
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
- memcpy(ser->points, y_array, ext->point_cnt * (sizeof(lv_coord_t)));
- ser->start_point = 0;
- lv_chart_refresh(chart);
-}
-
-/**
- * Shift all data left and set the rightmost data on a data line
- * @param chart pointer to chart object
- * @param ser pointer to a data series on 'chart'
- * @param y the new value of the rightmost data
- */
-void lv_chart_set_next(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t y)
-{
- LV_ASSERT_OBJ(chart, LV_OBJX_NAME);
- LV_ASSERT_NULL(ser);
-
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
- if(ext->update_mode == LV_CHART_UPDATE_MODE_SHIFT) {
- ser->points[ser->start_point] =
- y; /*This was the place of the former left most value, after shifting it is the rightmost*/
- ser->start_point = (ser->start_point + 1) % ext->point_cnt;
- lv_chart_refresh(chart);
- } else if(ext->update_mode == LV_CHART_UPDATE_MODE_CIRCULAR) {
- ser->points[ser->start_point] = y;
-
- if(ext->type & LV_CHART_TYPE_LINE) lv_chart_inv_lines(chart, ser->start_point);
- if(ext->type & LV_CHART_TYPE_COLUMN) lv_chart_inv_cols(chart, ser->start_point);
- if(ext->type & LV_CHART_TYPE_POINT) lv_chart_inv_points(chart, ser->start_point);
- if(ext->type & LV_CHART_TYPE_VERTICAL_LINE) lv_chart_inv_lines(chart, ser->start_point);
- if(ext->type & LV_CHART_TYPE_AREA) lv_chart_inv_lines(chart, ser->start_point);
-
- ser->start_point = (ser->start_point + 1) % ext->point_cnt; /*update the x for next incoming y*/
- }
-}
-
-/**
- * Set update mode of the chart object.
- * @param chart pointer to a chart object
- * @param update mode
- */
-void lv_chart_set_update_mode(lv_obj_t * chart, lv_chart_update_mode_t update_mode)
-{
- LV_ASSERT_OBJ(chart, LV_OBJX_NAME);
-
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
- if(ext->update_mode == update_mode) return;
-
- ext->update_mode = update_mode;
- lv_obj_invalidate(chart);
-}
-
-/**
- * Set the length of the tick marks on the x axis
- * @param chart pointer to the chart
- * @param major_tick_len the length of the major tick or `LV_CHART_TICK_LENGTH_AUTO` to set automatically
- * (where labels are added)
- * @param minor_tick_len the length of the minor tick, `LV_CHART_TICK_LENGTH_AUTO` to set automatically
- * (where no labels are added)
- */
-void lv_chart_set_x_tick_length(lv_obj_t * chart, uint8_t major_tick_len, uint8_t minor_tick_len)
-{
- LV_ASSERT_OBJ(chart, LV_OBJX_NAME);
-
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
- ext->x_axis.major_tick_len = major_tick_len;
- ext->x_axis.minor_tick_len = minor_tick_len;
-}
-
-/**
- * Set the length of the tick marks on the y axis
- * @param chart pointer to the chart
- * @param major_tick_len the length of the major tick or `LV_CHART_TICK_LENGTH_AUTO` to set automatically
- * (where labels are added)
- * @param minor_tick_len the length of the minor tick, `LV_CHART_TICK_LENGTH_AUTO` to set automatically
- * (where no labels are added)
- */
-void lv_chart_set_y_tick_length(lv_obj_t * chart, uint8_t major_tick_len, uint8_t minor_tick_len)
-{
- LV_ASSERT_OBJ(chart, LV_OBJX_NAME);
-
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
- ext->y_axis.major_tick_len = major_tick_len;
- ext->y_axis.minor_tick_len = minor_tick_len;
-}
-
-/**
- * Set the length of the tick marks on the secondary y axis
- * @param chart pointer to the chart
- * @param major_tick_len the length of the major tick or `LV_CHART_TICK_LENGTH_AUTO` to set automatically
- * (where labels are added)
- * @param minor_tick_len the length of the minor tick, `LV_CHART_TICK_LENGTH_AUTO` to set automatically
- * (where no labels are added)
- */
-void lv_chart_set_secondary_y_tick_length(lv_obj_t * chart, uint8_t major_tick_len, uint8_t minor_tick_len)
-{
- LV_ASSERT_OBJ(chart, LV_OBJX_NAME);
-
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
- ext->secondary_y_axis.major_tick_len = major_tick_len;
- ext->secondary_y_axis.minor_tick_len = minor_tick_len;
-}
-
-/**
- * Set the x-axis tick count and labels of a chart
- * @param chart pointer to a chart object
- * @param list_of_values list of string values, terminated with \n, except the last
- * @param num_tick_marks if list_of_values is NULL: total number of ticks per axis
- * else number of ticks between two value labels
- * @param options extra options
- */
-void lv_chart_set_x_tick_texts(lv_obj_t * chart, const char * list_of_values, uint8_t num_tick_marks,
- lv_chart_axis_options_t options)
-{
- LV_ASSERT_OBJ(chart, LV_OBJX_NAME);
- LV_ASSERT_NULL(list_of_values);
-
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
- ext->x_axis.num_tick_marks = num_tick_marks;
- ext->x_axis.list_of_values = list_of_values;
- ext->x_axis.options = options;
-}
-
-/**
- * Set the y-axis tick count and labels of a chart
- * @param chart pointer to a chart object
- * @param list_of_values list of string values, terminated with \n, except the last
- * @param num_tick_marks if list_of_values is NULL: total number of ticks per axis
- * else number of ticks between two value labels
- * @param options extra options
- */
-void lv_chart_set_y_tick_texts(lv_obj_t * chart, const char * list_of_values, uint8_t num_tick_marks,
- lv_chart_axis_options_t options)
-{
- LV_ASSERT_OBJ(chart, LV_OBJX_NAME);
- LV_ASSERT_NULL(list_of_values);
-
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
- ext->y_axis.num_tick_marks = num_tick_marks;
- ext->y_axis.list_of_values = list_of_values;
- ext->y_axis.options = options;
-}
-
-/**
- * Set the secondary y-axis tick count and labels of a chart
- * @param chart pointer to a chart object
- * @param list_of_values list of string values, terminated with \n, except the last
- * @param num_tick_marks if list_of_values is NULL: total number of ticks per axis
- * else number of ticks between two value labels
- * @param options extra options
- */
-void lv_chart_set_secondary_y_tick_texts(lv_obj_t * chart, const char * list_of_values, uint8_t num_tick_marks,
- lv_chart_axis_options_t options)
-{
- LV_ASSERT_OBJ(chart, LV_OBJX_NAME);
- LV_ASSERT_NULL(list_of_values);
-
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
- ext->secondary_y_axis.num_tick_marks = num_tick_marks;
- ext->secondary_y_axis.list_of_values = list_of_values;
- ext->secondary_y_axis.options = options;
-}
-
-/**
- * Set the margin around the chart, used for axes value and ticks
- * @param chart pointer to an chart object
- * @param margin value of the margin [px]
- */
-void lv_chart_set_margin(lv_obj_t * chart, uint16_t margin)
-{
- LV_ASSERT_OBJ(chart, LV_OBJX_NAME);
-
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
- ext->margin = margin;
- lv_obj_refresh_ext_draw_pad(chart);
-}
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the type of a chart
- * @param chart pointer to chart object
- * @return type of the chart (from 'lv_chart_t' enum)
- */
-lv_chart_type_t lv_chart_get_type(const lv_obj_t * chart)
-{
- LV_ASSERT_OBJ(chart, LV_OBJX_NAME);
-
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
- return ext->type;
-}
-
-/**
- * Get the data point number per data line on chart
- * @param chart pointer to chart object
- * @return point number on each data line
- */
-uint16_t lv_chart_get_point_cnt(const lv_obj_t * chart)
-{
- LV_ASSERT_OBJ(chart, LV_OBJX_NAME);
-
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
- return ext->point_cnt;
-}
-
-/**
- * Get the opacity of the data series
- * @param chart pointer to chart object
- * @return the opacity of the data series
- */
-lv_opa_t lv_chart_get_series_opa(const lv_obj_t * chart)
-{
- LV_ASSERT_OBJ(chart, LV_OBJX_NAME);
-
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
- return ext->series.opa;
-}
-
-/**
- * Get the data series width
- * @param chart pointer to chart object
- * @return the width the data series (lines or points)
- */
-lv_coord_t lv_chart_get_series_width(const lv_obj_t * chart)
-{
- LV_ASSERT_OBJ(chart, LV_OBJX_NAME);
-
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
- return ext->series.width;
-}
-
-/**
- * Get the dark effect level on the bottom of the points or columns
- * @param chart pointer to chart object
- * @return dark effect level (LV_OPA_TRANSP to turn off)
- */
-lv_opa_t lv_chart_get_series_darking(const lv_obj_t * chart)
-{
- LV_ASSERT_OBJ(chart, LV_OBJX_NAME);
-
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
- return ext->series.dark;
-}
-
-/*=====================
- * Other functions
- *====================*/
-
-/**
- * Refresh a chart if its data line has changed
- * @param chart pointer to chart object
- */
-void lv_chart_refresh(lv_obj_t * chart)
-{
- LV_ASSERT_OBJ(chart, LV_OBJX_NAME);
-
- lv_obj_invalidate(chart);
-}
-
-/**
- * Get the margin around the chart, used for axes value and labels
- * @param chart pointer to an chart object
- * @param return value of the margin
- */
-uint16_t lv_chart_get_margin(lv_obj_t * chart)
-{
- LV_ASSERT_OBJ(chart, LV_OBJX_NAME);
-
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
- return ext->margin;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Handle the drawing related tasks of the chart backgrounds
- * @param chart pointer to an object
- * @param mask the object will be drawn only in this area
- * @param mode LV_DESIGN_COVER_CHK: only check if the object fully covers the 'mask_p' area
- * (return 'true' if yes)
- * LV_DESIGN_DRAW: draw the object (always return 'true')
- * LV_DESIGN_DRAW_POST: drawing after every children are drawn
- * @param return true/false, depends on 'mode'
- */
-static bool lv_chart_design(lv_obj_t * chart, const lv_area_t * mask, lv_design_mode_t mode)
-{
- if(mode == LV_DESIGN_COVER_CHK) {
- /*Return false if the object is not covers the mask_p area*/
- return ancestor_design_f(chart, mask, mode);
- } else if(mode == LV_DESIGN_DRAW_MAIN) {
- /*Draw the background*/
- lv_draw_rect(&chart->coords, mask, lv_obj_get_style(chart), lv_obj_get_opa_scale(chart));
-
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
-
- lv_chart_draw_div(chart, mask);
-
- /* Adjust the mask to remove the margin (clips chart contents to be within background) */
-
- lv_area_t mask_tmp, adjusted_mask;
- lv_obj_get_coords(chart, &mask_tmp);
-
- bool union_ok = lv_area_intersect(&adjusted_mask, mask, &mask_tmp);
-
- if(union_ok) {
- if(ext->type & LV_CHART_TYPE_LINE) lv_chart_draw_lines(chart, &adjusted_mask);
- if(ext->type & LV_CHART_TYPE_COLUMN) lv_chart_draw_cols(chart, &adjusted_mask);
- if(ext->type & LV_CHART_TYPE_POINT) lv_chart_draw_points(chart, &adjusted_mask);
- if(ext->type & LV_CHART_TYPE_VERTICAL_LINE) lv_chart_draw_vertical_lines(chart, &adjusted_mask);
- if(ext->type & LV_CHART_TYPE_AREA) lv_chart_draw_areas(chart, &adjusted_mask);
- }
-
- lv_chart_draw_axes(chart, mask);
- }
- return true;
-}
-
-/**
- * Signal function of the chart background
- * @param chart pointer to a chart background object
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- */
-static lv_res_t lv_chart_signal(lv_obj_t * chart, lv_signal_t sign, void * param)
-{
- /* Include the ancient signal function */
- lv_res_t res;
- res = ancestor_signal(chart, sign, param);
- if(res != LV_RES_OK) return res;
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);
-
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
-
- if(sign == LV_SIGNAL_CLEANUP) {
- lv_coord_t ** datal;
- LV_LL_READ(ext->series_ll, datal)
- {
- lv_mem_free(*datal);
- }
- lv_ll_clear(&ext->series_ll);
- } else if(sign == LV_SIGNAL_REFR_EXT_DRAW_PAD) {
- /*Provide extra px draw area around the chart*/
- chart->ext_draw_pad = ext->margin;
- }
-
- return res;
-}
-
-/**
- * Draw the division lines on chart background
- * @param chart pointer to chart object
- * @param mask mask, inherited from the design function
- */
-static void lv_chart_draw_div(lv_obj_t * chart, const lv_area_t * mask)
-{
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
- const lv_style_t * style = lv_obj_get_style(chart);
- lv_opa_t opa_scale = lv_obj_get_opa_scale(chart);
-
- uint8_t div_i;
- uint8_t div_i_end;
- uint8_t div_i_start;
- lv_point_t p1;
- lv_point_t p2;
- lv_coord_t w = lv_obj_get_width(chart);
- lv_coord_t h = lv_obj_get_height(chart);
- lv_coord_t x_ofs = chart->coords.x1;
- lv_coord_t y_ofs = chart->coords.y1;
-
- if(ext->hdiv_cnt != 0) {
- /*Draw side lines if no border*/
- if(style->body.border.width != 0) {
- div_i_start = 1;
- div_i_end = ext->hdiv_cnt;
- } else {
- div_i_start = 0;
- div_i_end = ext->hdiv_cnt + 1;
- }
-
- p1.x = 0 + x_ofs;
- p2.x = w - 1 + x_ofs;
- for(div_i = div_i_start; div_i <= div_i_end; div_i++) {
- p1.y = (int32_t)((int32_t)(h - style->line.width) * div_i) / (ext->hdiv_cnt + 1);
- p1.y += y_ofs;
- p2.y = p1.y;
- lv_draw_line(&p1, &p2, mask, style, opa_scale);
- }
- }
-
- if(ext->vdiv_cnt != 0) {
- /*Draw side lines if no border*/
- if(style->body.border.width != 0) {
- div_i_start = 1;
- div_i_end = ext->vdiv_cnt;
- } else {
- div_i_start = 0;
- div_i_end = ext->vdiv_cnt + 1;
- }
-
- p1.y = 0 + y_ofs;
- p2.y = h + y_ofs - 1;
- for(div_i = div_i_start; div_i <= div_i_end; div_i++) {
- p1.x = (int32_t)((int32_t)(w - style->line.width) * div_i) / (ext->vdiv_cnt + 1);
- p1.x += x_ofs;
- p2.x = p1.x;
- lv_draw_line(&p1, &p2, mask, style, opa_scale);
- }
- }
-}
-
-/**
- * Draw the data lines as lines on a chart
- * @param obj pointer to chart object
- */
-static void lv_chart_draw_lines(lv_obj_t * chart, const lv_area_t * mask)
-{
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
-
- uint16_t i;
- lv_point_t p1;
- lv_point_t p2;
- lv_coord_t w = lv_obj_get_width(chart);
- lv_coord_t h = lv_obj_get_height(chart);
- lv_coord_t x_ofs = chart->coords.x1;
- lv_coord_t y_ofs = chart->coords.y1;
- int32_t y_tmp;
- lv_coord_t p_prev;
- lv_coord_t p_act;
- lv_chart_series_t * ser;
- lv_opa_t opa_scale = lv_obj_get_opa_scale(chart);
- lv_style_t style;
- lv_style_copy(&style, &lv_style_plain);
- style.line.opa = ext->series.opa;
- style.line.width = ext->series.width;
-
- /*Go through all data lines*/
- LV_LL_READ_BACK(ext->series_ll, ser)
- {
- style.line.color = ser->color;
-
- lv_coord_t start_point = ext->update_mode == LV_CHART_UPDATE_MODE_SHIFT ? ser->start_point : 0;
-
- p1.x = 0 + x_ofs;
- p2.x = 0 + x_ofs;
-
- p_prev = start_point;
- y_tmp = (int32_t)((int32_t)ser->points[p_prev] - ext->ymin) * h;
- y_tmp = y_tmp / (ext->ymax - ext->ymin);
- p2.y = h - y_tmp + y_ofs;
-
- for(i = 1; i < ext->point_cnt; i++) {
- p1.x = p2.x;
- p1.y = p2.y;
-
- p2.x = ((w * i) / (ext->point_cnt - 1)) + x_ofs;
-
- p_act = (start_point + i) % ext->point_cnt;
-
- y_tmp = (int32_t)((int32_t)ser->points[p_act] - ext->ymin) * h;
- y_tmp = y_tmp / (ext->ymax - ext->ymin);
- p2.y = h - y_tmp + y_ofs;
-
- if(ser->points[p_prev] != LV_CHART_POINT_DEF && ser->points[p_act] != LV_CHART_POINT_DEF)
- lv_draw_line(&p1, &p2, mask, &style, opa_scale);
-
- p_prev = p_act;
- }
- }
-}
-
-/**
- * Draw the data lines as points on a chart
- * @param chart pointer to chart object
- * @param mask mask, inherited from the design function
- */
-static void lv_chart_draw_points(lv_obj_t * chart, const lv_area_t * mask)
-{
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
-
- uint16_t i;
- lv_area_t cir_a;
- lv_coord_t w = lv_obj_get_width(chart);
- lv_coord_t h = lv_obj_get_height(chart);
- lv_coord_t x_ofs = chart->coords.x1;
- lv_coord_t y_ofs = chart->coords.y1;
- int32_t y_tmp;
- lv_coord_t p_act;
- lv_chart_series_t * ser;
- uint8_t series_cnt = 0;
- lv_style_t style_point;
- lv_style_copy(&style_point, &lv_style_plain);
-
- style_point.body.border.width = 0;
- style_point.body.radius = LV_RADIUS_CIRCLE;
- style_point.body.opa = ext->series.opa;
- style_point.body.radius = ext->series.width;
-
- /*Go through all data lines*/
-
- LV_LL_READ_BACK(ext->series_ll, ser)
- {
- lv_coord_t start_point = ext->update_mode == LV_CHART_UPDATE_MODE_SHIFT ? ser->start_point : 0;
-
- style_point.body.main_color = ser->color;
- style_point.body.grad_color = lv_color_mix(LV_COLOR_BLACK, ser->color, ext->series.dark);
-
- for(i = 0; i < ext->point_cnt; i++) {
- cir_a.x1 = ((w * i) / (ext->point_cnt - 1)) + x_ofs;
- cir_a.x2 = cir_a.x1 + style_point.body.radius;
- cir_a.x1 -= style_point.body.radius;
-
- p_act = (start_point + i) % ext->point_cnt;
- y_tmp = (int32_t)((int32_t)ser->points[p_act] - ext->ymin) * h;
- y_tmp = y_tmp / (ext->ymax - ext->ymin);
-
- cir_a.y1 = h - y_tmp + y_ofs - 1;
- cir_a.y2 = cir_a.y1 + style_point.body.radius;
- cir_a.y1 -= style_point.body.radius;
-
- if(ser->points[p_act] != LV_CHART_POINT_DEF)
- lv_draw_rect(&cir_a, mask, &style_point, lv_obj_get_opa_scale(chart));
- }
- series_cnt++;
- }
-}
-
-/**
- * Draw the data lines as columns on a chart
- * @param chart pointer to chart object
- * @param mask mask, inherited from the design function
- */
-static void lv_chart_draw_cols(lv_obj_t * chart, const lv_area_t * mask)
-{
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
-
- uint16_t i;
- lv_area_t col_a;
- lv_area_t col_mask;
- bool mask_ret;
- lv_coord_t w = lv_obj_get_width(chart);
- lv_coord_t h = lv_obj_get_height(chart);
- int32_t y_tmp;
- lv_chart_series_t * ser;
- lv_style_t rects;
- lv_coord_t col_w = w / ((ext->series.num + 1) * ext->point_cnt); /* Suppose + 1 series as separator*/
- lv_coord_t x_ofs = col_w / 2; /*Shift with a half col.*/
-
- lv_style_copy(&rects, &lv_style_plain);
- rects.body.border.width = 0;
- rects.body.radius = 0;
- rects.body.opa = ext->series.opa;
-
- col_a.y2 = chart->coords.y2;
-
- lv_coord_t x_act;
-
- /*Go through all points*/
- for(i = 0; i < ext->point_cnt; i++) {
- x_act = (int32_t)((int32_t)w * i) / ext->point_cnt;
- x_act += chart->coords.x1 + x_ofs;
-
- /*Draw the current point of all data line*/
- LV_LL_READ_BACK(ext->series_ll, ser)
- {
- lv_coord_t start_point = ext->update_mode == LV_CHART_UPDATE_MODE_SHIFT ? ser->start_point : 0;
-
- col_a.x1 = x_act;
- col_a.x2 = col_a.x1 + col_w;
- x_act += col_w;
-
- if(col_a.x2 < mask->x1) continue;
- if(col_a.x1 > mask->x2) break;
-
- rects.body.main_color = ser->color;
- rects.body.grad_color = lv_color_mix(LV_COLOR_BLACK, ser->color, ext->series.dark);
-
- lv_coord_t p_act = (start_point + i) % ext->point_cnt;
- y_tmp = (int32_t)((int32_t)ser->points[p_act] - ext->ymin) * h;
- y_tmp = y_tmp / (ext->ymax - ext->ymin);
- col_a.y1 = h - y_tmp + chart->coords.y1;
-
- mask_ret = lv_area_intersect(&col_mask, mask, &col_a);
- if(mask_ret != false && ser->points[p_act] != LV_CHART_POINT_DEF) {
- lv_draw_rect(&chart->coords, &col_mask, &rects, lv_obj_get_opa_scale(chart));
- }
- }
- }
-}
-
-/**
- * Draw the data lines as vertical lines on a chart if there is only 1px between point
- * @param obj pointer to chart object
- */
-static void lv_chart_draw_vertical_lines(lv_obj_t * chart, const lv_area_t * mask)
-{
-
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
- lv_coord_t w = lv_obj_get_width(chart);
- /*Vertical lines works only if the width == point count. Else use the normal line type*/
- if(ext->point_cnt != w) {
- lv_chart_draw_lines(chart, mask);
- return;
- }
-
- uint16_t i;
- lv_point_t p1;
- lv_point_t p2;
- lv_coord_t p_act;
- lv_coord_t h = lv_obj_get_height(chart);
- lv_coord_t x_ofs = chart->coords.x1;
- lv_coord_t y_ofs = chart->coords.y1;
- int32_t y_tmp;
- lv_chart_series_t * ser;
- lv_opa_t opa_scale = lv_obj_get_opa_scale(chart);
- lv_style_t style;
- lv_style_copy(&style, &lv_style_plain);
- style.line.opa = ext->series.opa;
- style.line.width = ext->series.width;
-
- /*Go through all data lines*/
- LV_LL_READ_BACK(ext->series_ll, ser)
- {
- lv_coord_t start_point = ext->update_mode == LV_CHART_UPDATE_MODE_SHIFT ? ser->start_point : 0;
- style.line.color = ser->color;
-
- p1.x = 0 + x_ofs;
- p2.x = 0 + x_ofs;
- y_tmp = (int32_t)((int32_t)ser->points[0] - ext->ymin) * h;
- y_tmp = y_tmp / (ext->ymax - ext->ymin);
- p2.y = h - y_tmp + y_ofs;
- p1.y = p2.y;
-
- for(i = 0; i < ext->point_cnt; i++) {
- p_act = (start_point + i) % ext->point_cnt;
-
- y_tmp = (int32_t)((int32_t)ser->points[p_act] - ext->ymin) * h;
- y_tmp = y_tmp / (ext->ymax - ext->ymin);
- p2.y = h - y_tmp + y_ofs;
-
- if(p1.y == p2.y) {
- p2.x++;
- }
-
- if(ser->points[p_act] != LV_CHART_POINT_DEF) {
- lv_draw_line(&p1, &p2, mask, &style, opa_scale);
- }
-
- p2.x = ((w * p_act) / (ext->point_cnt - 1)) + x_ofs;
- p1.x = p2.x;
- p1.y = p2.y;
- }
- }
-}
-
-/**
- * Draw the data lines as areas on a chart
- * @param obj pointer to chart object
- */
-static void lv_chart_draw_areas(lv_obj_t * chart, const lv_area_t * mask)
-{
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
-
- uint16_t i;
- lv_point_t p1;
- lv_point_t p2;
- lv_coord_t w = lv_obj_get_width(chart);
- lv_coord_t h = lv_obj_get_height(chart);
- lv_coord_t x_ofs = chart->coords.x1;
- lv_coord_t y_ofs = chart->coords.y1;
- int32_t y_tmp;
- lv_coord_t p_prev;
- lv_coord_t p_act;
- lv_chart_series_t * ser;
- lv_opa_t opa_scale = lv_obj_get_opa_scale(chart);
- lv_style_t style;
- lv_style_copy(&style, &lv_style_plain);
-
- /*Go through all data lines*/
- LV_LL_READ_BACK(ext->series_ll, ser)
- {
- lv_coord_t start_point = ext->update_mode == LV_CHART_UPDATE_MODE_SHIFT ? ser->start_point : 0;
- style.body.main_color = ser->color;
- style.body.opa = ext->series.opa;
-
- p2.x = 0 + x_ofs;
-
- p_prev = start_point;
- y_tmp = (int32_t)((int32_t)ser->points[p_prev] - ext->ymin) * h;
- y_tmp = y_tmp / (ext->ymax - ext->ymin);
- p2.y = h - y_tmp + y_ofs;
-
- for(i = 1; i < ext->point_cnt; i++) {
- p1.x = p2.x;
- p1.y = p2.y;
-
- p_act = (start_point + i) % ext->point_cnt;
- p2.x = ((w * i) / (ext->point_cnt - 1)) + x_ofs;
-
- y_tmp = (int32_t)((int32_t)ser->points[p_act] - ext->ymin) * h;
- y_tmp = y_tmp / (ext->ymax - ext->ymin);
- p2.y = h - y_tmp + y_ofs;
-
- if(ser->points[p_prev] != LV_CHART_POINT_DEF && ser->points[p_act] != LV_CHART_POINT_DEF) {
- lv_point_t triangle_points[3];
- triangle_points[0] = p1;
- triangle_points[1] = p2;
- triangle_points[2].x = p1.x;
- triangle_points[2].y = chart->coords.y2;
- lv_draw_triangle(triangle_points, mask, &style, opa_scale);
- triangle_points[2].x = p2.x;
- triangle_points[0].y = chart->coords.y2;
- lv_draw_triangle(triangle_points, mask, &style, opa_scale);
- }
- p_prev = p_act;
- }
- }
-}
-
-/**
- * Create iterator for newline-separated list
- * @param list pointer to newline-separated labels list
- * @param iterator_dir LV_CHART_ITERATOR_FORWARD or LV_CHART_LABEL_ITERATOR_REVERSE
- * @return lv_chart_label_iterator_t
- */
-static lv_chart_label_iterator_t lv_chart_create_label_iter(const char * list, uint8_t iterator_dir)
-{
- lv_chart_label_iterator_t iterator = {0};
- uint8_t j;
-
- iterator.list_start = list;
-
- /* count number of list items */
- for(j = 0; list[j] != '\0'; j++) {
- if(list[j] == '\n')
- iterator.items_left++;
- }
-
- if(iterator_dir == LV_CHART_LABEL_ITERATOR_FORWARD) {
- iterator.is_reverse_iter = 0;
- iterator.current_pos = list;
- } else {
- iterator.is_reverse_iter = 1;
- // -1 to skip '\0' at the end of the string
- iterator.current_pos = list + j - 1;
- }
- iterator.items_left++;
- return iterator;
-}
-
-/**
- * Get next label from iterator created by lv_chart_create_label_iter()
- * @param iterator iterator to get label from
- * @param[out] buf buffer to point next label to
- */
-static void lv_chart_get_next_label(lv_chart_label_iterator_t * iterator, char * buf)
-{
- uint8_t label_len = 0;
- if (iterator->is_reverse_iter) {
- const char * label_start;
- /* count the length of the current label*/
- while ((*iterator->current_pos != '\n') &&
- (iterator->current_pos != iterator->list_start)) {
- iterator->current_pos--;
- label_len++;
- }
-
- label_start = iterator->current_pos;
-
- if (*iterator->current_pos == '\n') {
- /* do not copy \n symbol, +1 to skip it*/
- label_start++;
- /* skip newline*/
- iterator->current_pos--;
- } else {
- /* it is last label in list (first one from the beginning )*/
- label_len++;
- }
-
- /* do not allow output buffer overflow */
- if (label_len > LV_CHART_AXIS_TICK_LABEL_MAX_LEN) {
- label_len = LV_CHART_AXIS_TICK_LABEL_MAX_LEN;
- }
-
- strncpy(buf, label_start, label_len);
- } else {
- /* search for tick string */
- while(iterator->current_pos[label_len] != '\n' &&
- iterator->current_pos[label_len] != '\0') {
- /* do not overflow the buffer, but move to the end of the current label */
- if(label_len < LV_CHART_AXIS_TICK_LABEL_MAX_LEN) {
- buf[label_len] = iterator->current_pos[label_len];
- label_len++;
- } else {
- label_len++;
- }
- }
-
- iterator->current_pos += label_len;
-
- /* do not allow output buffer overflow */
- if (label_len > LV_CHART_AXIS_TICK_LABEL_MAX_LEN) {
- label_len = LV_CHART_AXIS_TICK_LABEL_MAX_LEN;
- }
-
- if(*iterator->current_pos == '\n') iterator->current_pos++;
- }
-
- /* terminate the string */
- buf[label_len] = '\0';
-}
-
-/**
- * Check whether there should be a label next to tick with given
- * number
- * @param tick_num number of the tick to check
- * @param axis pointer to struct containing info on the axis
- * @return true if label should be located next to current tick
- */
-static inline bool lv_chart_is_tick_with_label(uint8_t tick_num, lv_chart_axis_cfg_t * axis)
-{
- return ((tick_num == 0) || ((tick_num % axis->num_tick_marks) == 0));
-}
-
-static void lv_chart_draw_y_ticks(lv_obj_t * chart, const lv_area_t * mask, uint8_t which_axis)
-{
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
- lv_chart_axis_cfg_t * y_axis = (which_axis == LV_CHART_AXIS_PRIMARY_Y) ?
- &ext->y_axis : &ext->secondary_y_axis;
-
- if(y_axis->list_of_values != NULL || y_axis->num_tick_marks != 0) {
-
- const lv_style_t * style = lv_obj_get_style(chart);
- lv_opa_t opa_scale = lv_obj_get_opa_scale(chart);
-
- uint8_t i;
- uint8_t num_of_labels;
- uint8_t num_scale_ticks;
- int8_t major_tick_len, minor_tick_len;
- uint8_t iter_dir;
-
- lv_point_t p1;
- lv_point_t p2;
- lv_coord_t x_ofs;
- lv_chart_label_iterator_t iter;
- lv_coord_t y_ofs = chart->coords.y1;
- lv_coord_t h = lv_obj_get_height(chart);
- lv_coord_t w = lv_obj_get_width(chart);
- char buf[LV_CHART_AXIS_TICK_LABEL_MAX_LEN + 1]; /* up to N symbols per label + null terminator */
-
- /* chose correct side of the chart */
- if(which_axis == LV_CHART_AXIS_PRIMARY_Y)
- x_ofs = chart->coords.x1;
- else
- x_ofs = chart->coords.x2;
-
- /* calculate the size of tick marks */
- if(y_axis->major_tick_len == LV_CHART_TICK_LENGTH_AUTO)
- major_tick_len = (int32_t)w * LV_CHART_AXIS_MAJOR_TICK_LEN_COE;
- else
- major_tick_len = y_axis->major_tick_len;
-
- if(y_axis->minor_tick_len == LV_CHART_TICK_LENGTH_AUTO)
- minor_tick_len = major_tick_len * LV_CHART_AXIS_MINOR_TICK_LEN_COE;
- else
- minor_tick_len = y_axis->minor_tick_len;
-
- /* tick lines on secondary y axis are drawn in other direction*/
- if(which_axis == LV_CHART_AXIS_SECONDARY_Y) {
- major_tick_len *= -1;
- minor_tick_len *= -1;
- }
-
- iter_dir = (y_axis->options & LV_CHART_AXIS_INVERSE_LABELS_ORDER) ? LV_CHART_LABEL_ITERATOR_REVERSE : LV_CHART_LABEL_ITERATOR_FORWARD;
- iter = lv_chart_create_label_iter(y_axis->list_of_values, iter_dir);
-
- /*determine the number of options */
- num_of_labels = iter.items_left;
-
- /* we can't have string labels without ticks step, set to 1 if not specified */
- if(y_axis->num_tick_marks == 0) y_axis->num_tick_marks = 1;
-
- /* calculate total number of ticks */
- if(num_of_labels < 2)
- num_scale_ticks = y_axis->num_tick_marks;
- else
- num_scale_ticks = (y_axis->num_tick_marks * (num_of_labels - 1));
-
- for(i = 0; i < (num_scale_ticks + 1); i++) { /* one extra loop - it may not exist in the list, empty label */
- /* first point of the tick */
- p1.x = x_ofs;
-
- /* move extra pixel out of chart boundary */
- if (which_axis == LV_CHART_AXIS_PRIMARY_Y)
- p1.x--;
- else
- p1.x++;
-
- /* second point of the tick */
- if((num_of_labels != 0) && (i == 0 || i % y_axis->num_tick_marks == 0))
- p2.x = p1.x - major_tick_len; /* major tick */
- else
- p2.x = p1.x - minor_tick_len; /* minor tick */
-
- /* draw a line at moving y position */
- p2.y = p1.y =
- y_ofs + (int32_t)((int32_t)(h - style->line.width) * i) / num_scale_ticks;
-
- if(y_axis->options & LV_CHART_AXIS_INVERSE_LABELS_ORDER) {
- /*if label order is inversed last tick have number 0*/
- if(i != 0)
- lv_draw_line(&p1, &p2, mask, style, opa_scale);
- else if((y_axis->options & LV_CHART_AXIS_DRAW_LAST_TICK) != 0)
- lv_draw_line(&p1, &p2, mask, style, opa_scale);
- } else {
- if(i != num_scale_ticks)
- lv_draw_line(&p1, &p2, mask, style, opa_scale);
- else if((y_axis->options & LV_CHART_AXIS_DRAW_LAST_TICK) != 0)
- lv_draw_line(&p1, &p2, mask, style, opa_scale);
- }
-
- /* draw values if available */
- if(num_of_labels != 0) {
- /* add text only to major tick */
- if(lv_chart_is_tick_with_label(i, y_axis)) {
-
- lv_chart_get_next_label(&iter, buf);
-
- /* reserve appropriate area */
- lv_point_t size;
- lv_txt_get_size(&size, buf, style->text.font, style->text.letter_space, style->text.line_space,
- LV_COORD_MAX, LV_TXT_FLAG_CENTER);
-
- /* set the area at some distance of the major tick len left of the tick */
- lv_area_t a = {.y1 = p2.y - size.y / 2, .y2 = p2.y + size.y / 2};
-
- if(which_axis == LV_CHART_AXIS_PRIMARY_Y) {
- a.x1 = p2.x - size.x - LV_CHART_AXIS_TO_LABEL_DISTANCE;
- a.x2 = p2.x - LV_CHART_AXIS_TO_LABEL_DISTANCE;
- } else {
- a.x1 = p2.x + LV_CHART_AXIS_TO_LABEL_DISTANCE;
- a.x2 = p2.x + size.x + LV_CHART_AXIS_TO_LABEL_DISTANCE;
- }
-
- lv_draw_label(&a, mask, style, opa_scale, buf, LV_TXT_FLAG_CENTER, NULL, NULL, NULL, lv_obj_get_base_dir(chart));
- }
- }
-
- }
- }
-}
-
-static void lv_chart_draw_x_ticks(lv_obj_t * chart, const lv_area_t * mask)
-{
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
-
- if(ext->x_axis.list_of_values != NULL || ext->x_axis.num_tick_marks != 0) {
-
- const lv_style_t * style = lv_obj_get_style(chart);
- lv_opa_t opa_scale = lv_obj_get_opa_scale(chart);
-
- uint8_t i;
- uint8_t num_of_labels;
- uint8_t num_scale_ticks;
- uint8_t major_tick_len, minor_tick_len;
- lv_chart_label_iterator_t iter;
- lv_point_t p1;
- lv_point_t p2;
- lv_coord_t x_ofs = chart->coords.x1;
- lv_coord_t y_ofs = chart->coords.y1;
- lv_coord_t h = lv_obj_get_height(chart);
- lv_coord_t w = lv_obj_get_width(chart);
- char buf[LV_CHART_AXIS_TICK_LABEL_MAX_LEN + 1]; /* up to N symbols per label + null terminator */
-
- /* calculate the size of tick marks */
- if(ext->x_axis.major_tick_len == LV_CHART_TICK_LENGTH_AUTO)
- major_tick_len = (int32_t)w * LV_CHART_AXIS_MAJOR_TICK_LEN_COE;
- else
- major_tick_len = ext->x_axis.major_tick_len;
-
- if(ext->x_axis.minor_tick_len == LV_CHART_TICK_LENGTH_AUTO)
- minor_tick_len = major_tick_len * LV_CHART_AXIS_MINOR_TICK_LEN_COE;
- else
- minor_tick_len = ext->x_axis.minor_tick_len;
-
- /*determine the number of options */
- iter = lv_chart_create_label_iter(ext->x_axis.list_of_values, LV_CHART_LABEL_ITERATOR_FORWARD);
- num_of_labels = iter.items_left;
-
- /* we can't have string labels without ticks step, set to 1 if not specified */
- if(ext->x_axis.num_tick_marks == 0) ext->x_axis.num_tick_marks = 1;
-
- /* calculate total number of marks */
- if(num_of_labels < 2)
- num_scale_ticks = ext->x_axis.num_tick_marks;
- else
- num_scale_ticks = (ext->x_axis.num_tick_marks * (num_of_labels - 1));
-
- for(i = 0; i < (num_scale_ticks + 1); i++) { /* one extra loop - it may not exist in the list, empty label */
- /* first point of the tick */
- p1.y = h + y_ofs;
-
- /* second point of the tick */
- if((num_of_labels != 0) && (i == 0 || i % ext->x_axis.num_tick_marks == 0))
- p2.y = p1.y + major_tick_len; /* major tick */
- else
- p2.y = p1.y + minor_tick_len; /* minor tick */
-
- /* draw a line at moving x position */
- p2.x = p1.x = x_ofs + (int32_t)((int32_t)(w - style->line.width) * i) / num_scale_ticks;
-
- if(i != num_scale_ticks)
- lv_draw_line(&p1, &p2, mask, style, opa_scale);
- else if((ext->x_axis.options & LV_CHART_AXIS_DRAW_LAST_TICK) != 0)
- lv_draw_line(&p1, &p2, mask, style, opa_scale);
-
- /* draw values if available */
- if(num_of_labels != 0) {
- /* add text only to major tick */
- if(lv_chart_is_tick_with_label(i, &(ext->x_axis))) {
- lv_chart_get_next_label(&iter, buf);
-
- /* reserve appropriate area */
- lv_point_t size;
- lv_txt_get_size(&size, buf, style->text.font, style->text.letter_space, style->text.line_space,
- LV_COORD_MAX, LV_TXT_FLAG_CENTER);
-
- /* set the area at some distance of the major tick len under of the tick */
- lv_area_t a = {(p2.x - size.x / 2), (p2.y + LV_CHART_AXIS_TO_LABEL_DISTANCE), (p2.x + size.x / 2),
- (p2.y + size.y + LV_CHART_AXIS_TO_LABEL_DISTANCE)};
- lv_draw_label(&a, mask, style, opa_scale, buf, LV_TXT_FLAG_CENTER, NULL, NULL, NULL, lv_obj_get_base_dir(chart));
- }
- }
- }
- }
-}
-
-static void lv_chart_draw_axes(lv_obj_t * chart, const lv_area_t * mask)
-{
- lv_chart_draw_y_ticks(chart, mask, LV_CHART_AXIS_PRIMARY_Y);
- lv_chart_draw_y_ticks(chart, mask, LV_CHART_AXIS_SECONDARY_Y);
- lv_chart_draw_x_ticks(chart, mask);
-}
-
-/**
- * invalid area of the new line data lines on a chart
- * @param obj pointer to chart object
- */
-static void lv_chart_inv_lines(lv_obj_t * chart, uint16_t i)
-{
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
-
- lv_coord_t w = lv_obj_get_width(chart);
- lv_coord_t x_ofs = chart->coords.x1;
-
- if(i < ext->point_cnt) {
- lv_area_t coords;
- lv_obj_get_coords(chart, &coords);
- if(i < ext->point_cnt - 1) {
- coords.x1 = ((w * i) / (ext->point_cnt - 1)) + x_ofs - ext->series.width;
- coords.x2 = ((w * (i + 1)) / (ext->point_cnt - 1)) + x_ofs + ext->series.width;
- lv_obj_invalidate_area(chart, &coords);
- }
-
- if(i > 0) {
- coords.x1 = ((w * (i - 1)) / (ext->point_cnt - 1)) + x_ofs - ext->series.width;
- coords.x2 = ((w * i) / (ext->point_cnt - 1)) + x_ofs + ext->series.width;
- lv_obj_invalidate_area(chart, &coords);
- }
- }
-}
-
-/**
- * invalid area of the new point data lines on a chart
- * @param chart pointer to chart object
- * @param mask mask, inherited from the design function
- */
-static void lv_chart_inv_points(lv_obj_t * chart, uint16_t i)
-{
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
-
- lv_area_t cir_a;
- lv_coord_t w = lv_obj_get_width(chart);
- lv_coord_t x_ofs = chart->coords.x1;
-
- lv_obj_get_coords(chart, &cir_a);
- cir_a.x1 = ((w * i) / (ext->point_cnt - 1)) + x_ofs;
- cir_a.x2 = cir_a.x1 + ext->series.width;
- cir_a.x1 -= ext->series.width;
-
- lv_inv_area(lv_obj_get_disp(chart), &cir_a);
-}
-
-/**
- * invalid area of the new column data lines on a chart
- * @param chart pointer to chart object
- * @param mask mask, inherited from the design function
- */
-static void lv_chart_inv_cols(lv_obj_t * chart, uint16_t i)
-{
- lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart);
-
- lv_area_t col_a;
- lv_coord_t w = lv_obj_get_width(chart);
- lv_coord_t col_w = w / ((ext->series.num + 1) * ext->point_cnt); /* Suppose + 1 series as separator*/
- lv_coord_t x_ofs = col_w / 2; /*Shift with a half col.*/
-
- lv_coord_t x_act;
-
- x_act = (int32_t)((int32_t)w * i) / ext->point_cnt;
- x_act += chart->coords.x1 + x_ofs;
-
- lv_obj_get_coords(chart, &col_a);
- col_a.x1 = x_act;
- col_a.x2 = col_a.x1 + col_w;
-
- lv_inv_area(lv_obj_get_disp(chart), &col_a);
-}
-
-#endif
diff --git a/src/libs/lvgl/src/lv_objx/lv_chart.h b/src/libs/lvgl/src/lv_objx/lv_chart.h
deleted file mode 100644
index 55fb9299..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_chart.h
+++ /dev/null
@@ -1,395 +0,0 @@
-/**
- * @file lv_chart.h
- *
- */
-
-#ifndef LV_CHART_H
-#define LV_CHART_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_CHART != 0
-
-#include "../lv_core/lv_obj.h"
-#include "lv_line.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**Default value of points. Can be used to not draw a point*/
-#define LV_CHART_POINT_DEF (LV_COORD_MIN)
-
-/**Automatically calculate the tick length*/
-#define LV_CHART_TICK_LENGTH_AUTO 255
-
-LV_EXPORT_CONST_INT(LV_CHART_POINT_DEF);
-LV_EXPORT_CONST_INT(LV_CHART_TICK_LENGTH_AUTO);
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/** Chart types*/
-enum {
- LV_CHART_TYPE_NONE = 0x00, /**< Don't draw the series*/
- LV_CHART_TYPE_LINE = 0x01, /**< Connect the points with lines*/
- LV_CHART_TYPE_COLUMN = 0x02, /**< Draw columns*/
- LV_CHART_TYPE_POINT = 0x04, /**< Draw circles on the points*/
- LV_CHART_TYPE_VERTICAL_LINE = 0x08, /**< Draw vertical lines on points (useful when chart width == point count)*/
- LV_CHART_TYPE_AREA = 0x10, /**< Draw area chart*/
-};
-typedef uint8_t lv_chart_type_t;
-
-/** Chart update mode for `lv_chart_set_next`*/
-enum {
- LV_CHART_UPDATE_MODE_SHIFT, /**< Shift old data to the left and add the new one o the right*/
- LV_CHART_UPDATE_MODE_CIRCULAR, /**< Add the new data in a circular way*/
-};
-typedef uint8_t lv_chart_update_mode_t;
-
-typedef struct
-{
- lv_coord_t * points;
- lv_color_t color;
- uint16_t start_point;
-} lv_chart_series_t;
-
-/** Data of axis */
-enum {
- LV_CHART_AXIS_SKIP_LAST_TICK = 0x00, /**< don't draw the last tick */
- LV_CHART_AXIS_DRAW_LAST_TICK = 0x01, /**< draw the last tick */
- LV_CHART_AXIS_INVERSE_LABELS_ORDER = 0x02 /**< draw tick labels in an inversed order*/
-};
-typedef uint8_t lv_chart_axis_options_t;
-
-typedef struct
-{
- const char * list_of_values;
- lv_chart_axis_options_t options;
- uint8_t num_tick_marks;
- uint8_t major_tick_len;
- uint8_t minor_tick_len;
-} lv_chart_axis_cfg_t;
-
-/*Data of chart */
-typedef struct
-{
- /*No inherited ext*/ /*Ext. of ancestor*/
- /*New data for this type */
- lv_ll_t series_ll; /*Linked list for the data line pointers (stores lv_chart_dl_t)*/
- lv_coord_t ymin; /*y min value (used to scale the data)*/
- lv_coord_t ymax; /*y max value (used to scale the data)*/
- uint8_t hdiv_cnt; /*Number of horizontal division lines*/
- uint8_t vdiv_cnt; /*Number of vertical division lines*/
- uint16_t point_cnt; /*Point number in a data line*/
- lv_chart_type_t type; /*Line, column or point chart (from 'lv_chart_type_t')*/
- lv_chart_axis_cfg_t y_axis;
- lv_chart_axis_cfg_t x_axis;
- lv_chart_axis_cfg_t secondary_y_axis;
- uint16_t margin;
- uint8_t update_mode : 1;
- struct
- {
- lv_coord_t width; /*Line width or point radius*/
- uint8_t num; /*Number of data lines in dl_ll*/
- lv_opa_t opa; /*Opacity of data lines*/
- lv_opa_t dark; /*Dark level of the point/column bottoms*/
- } series;
-} lv_chart_ext_t;
-
-enum {
- LV_CHART_STYLE_MAIN,
-};
-typedef uint8_t lv_chart_style_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Create a chart background objects
- * @param par pointer to an object, it will be the parent of the new chart background
- * @param copy pointer to a chart background object, if not NULL then the new object will be copied
- * from it
- * @return pointer to the created chart background
- */
-lv_obj_t * lv_chart_create(lv_obj_t * par, const lv_obj_t * copy);
-
-/*======================
- * Add/remove functions
- *=====================*/
-
-/**
- * Allocate and add a data series to the chart
- * @param chart pointer to a chart object
- * @param color color of the data series
- * @return pointer to the allocated data series
- */
-lv_chart_series_t * lv_chart_add_series(lv_obj_t * chart, lv_color_t color);
-
-/**
- * Clear the point of a serie
- * @param chart pointer to a chart object
- * @param serie pointer to the chart's serie to clear
- */
-void lv_chart_clear_serie(lv_obj_t * chart, lv_chart_series_t * serie);
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set the number of horizontal and vertical division lines
- * @param chart pointer to a graph background object
- * @param hdiv number of horizontal division lines
- * @param vdiv number of vertical division lines
- */
-void lv_chart_set_div_line_count(lv_obj_t * chart, uint8_t hdiv, uint8_t vdiv);
-
-/**
- * Set the minimal and maximal y values
- * @param chart pointer to a graph background object
- * @param ymin y minimum value
- * @param ymax y maximum value
- */
-void lv_chart_set_range(lv_obj_t * chart, lv_coord_t ymin, lv_coord_t ymax);
-
-/**
- * Set a new type for a chart
- * @param chart pointer to a chart object
- * @param type new type of the chart (from 'lv_chart_type_t' enum)
- */
-void lv_chart_set_type(lv_obj_t * chart, lv_chart_type_t type);
-
-/**
- * Set the number of points on a data line on a chart
- * @param chart pointer r to chart object
- * @param point_cnt new number of points on the data lines
- */
-void lv_chart_set_point_count(lv_obj_t * chart, uint16_t point_cnt);
-
-/**
- * Set the opacity of the data series
- * @param chart pointer to a chart object
- * @param opa opacity of the data series
- */
-void lv_chart_set_series_opa(lv_obj_t * chart, lv_opa_t opa);
-
-/**
- * Set the line width or point radius of the data series
- * @param chart pointer to a chart object
- * @param width the new width
- */
-void lv_chart_set_series_width(lv_obj_t * chart, lv_coord_t width);
-
-/**
- * Set the dark effect on the bottom of the points or columns
- * @param chart pointer to a chart object
- * @param dark_eff dark effect level (LV_OPA_TRANSP to turn off)
- */
-void lv_chart_set_series_darking(lv_obj_t * chart, lv_opa_t dark_eff);
-
-/**
- * Initialize all data points with a value
- * @param chart pointer to chart object
- * @param ser pointer to a data series on 'chart'
- * @param y the new value for all points
- */
-void lv_chart_init_points(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t y);
-
-/**
- * Set the value of points from an array
- * @param chart pointer to chart object
- * @param ser pointer to a data series on 'chart'
- * @param y_array array of 'lv_coord_t' points (with 'points count' elements )
- */
-void lv_chart_set_points(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t y_array[]);
-
-/**
- * Shift all data right and set the most right data on a data line
- * @param chart pointer to chart object
- * @param ser pointer to a data series on 'chart'
- * @param y the new value of the most right data
- */
-void lv_chart_set_next(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t y);
-
-/**
- * Set update mode of the chart object.
- * @param chart pointer to a chart object
- * @param update mode
- */
-void lv_chart_set_update_mode(lv_obj_t * chart, lv_chart_update_mode_t update_mode);
-
-/**
- * Set the style of a chart
- * @param chart pointer to a chart object
- * @param type which style should be set (can be only `LV_CHART_STYLE_MAIN`)
- * @param style pointer to a style
- */
-static inline void lv_chart_set_style(lv_obj_t * chart, lv_chart_style_t type, const lv_style_t * style)
-{
- (void)type; /*Unused*/
- lv_obj_set_style(chart, style);
-}
-
-/**
- * Set the length of the tick marks on the x axis
- * @param chart pointer to the chart
- * @param major_tick_len the length of the major tick or `LV_CHART_TICK_LENGTH_AUTO` to set automatically
- * (where labels are added)
- * @param minor_tick_len the length of the minor tick, `LV_CHART_TICK_LENGTH_AUTO` to set automatically
- * (where no labels are added)
- */
-void lv_chart_set_x_tick_length(lv_obj_t * chart, uint8_t major_tick_len, uint8_t minor_tick_len);
-
-/**
- * Set the length of the tick marks on the y axis
- * @param chart pointer to the chart
- * @param major_tick_len the length of the major tick or `LV_CHART_TICK_LENGTH_AUTO` to set automatically
- * (where labels are added)
- * @param minor_tick_len the length of the minor tick, `LV_CHART_TICK_LENGTH_AUTO` to set automatically
- * (where no labels are added)
- */
-void lv_chart_set_y_tick_length(lv_obj_t * chart, uint8_t major_tick_len, uint8_t minor_tick_len);
-
-/**
- * Set the length of the tick marks on the secondary y axis
- * @param chart pointer to the chart
- * @param major_tick_len the length of the major tick or `LV_CHART_TICK_LENGTH_AUTO` to set automatically
- * (where labels are added)
- * @param minor_tick_len the length of the minor tick, `LV_CHART_TICK_LENGTH_AUTO` to set automatically
- * (where no labels are added)
- */
-void lv_chart_set_secondary_y_tick_length(lv_obj_t * chart, uint8_t major_tick_len, uint8_t minor_tick_len);
-
-/**
- * Set the x-axis tick count and labels of a chart
- * @param chart pointer to a chart object
- * @param list_of_values list of string values, terminated with \n, except the last
- * @param num_tick_marks if list_of_values is NULL: total number of ticks per axis
- * else number of ticks between two value labels
- * @param options extra options
- */
-void lv_chart_set_x_tick_texts(lv_obj_t * chart, const char * list_of_values, uint8_t num_tick_marks,
- lv_chart_axis_options_t options);
-
-/**
- * Set the secondary y-axis tick count and labels of a chart
- * @param chart pointer to a chart object
- * @param list_of_values list of string values, terminated with \n, except the last
- * @param num_tick_marks if list_of_values is NULL: total number of ticks per axis
- * else number of ticks between two value labels
- * @param options extra options
- */
-void lv_chart_set_secondary_y_tick_texts(lv_obj_t * chart, const char * list_of_values, uint8_t num_tick_marks,
- lv_chart_axis_options_t options);
-
-/**
- * Set the y-axis tick count and labels of a chart
- * @param chart pointer to a chart object
- * @param list_of_values list of string values, terminated with \n, except the last
- * @param num_tick_marks if list_of_values is NULL: total number of ticks per axis
- * else number of ticks between two value labels
- * @param options extra options
- */
-void lv_chart_set_y_tick_texts(lv_obj_t * chart, const char * list_of_values, uint8_t num_tick_marks,
- lv_chart_axis_options_t options);
-
-/**
- * Set the margin around the chart, used for axes value and ticks
- * @param chart pointer to an chart object
- * @param margin value of the margin [px]
- */
-void lv_chart_set_margin(lv_obj_t * chart, uint16_t margin);
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the type of a chart
- * @param chart pointer to chart object
- * @return type of the chart (from 'lv_chart_t' enum)
- */
-lv_chart_type_t lv_chart_get_type(const lv_obj_t * chart);
-
-/**
- * Get the data point number per data line on chart
- * @param chart pointer to chart object
- * @return point number on each data line
- */
-uint16_t lv_chart_get_point_cnt(const lv_obj_t * chart);
-
-/**
- * Get the opacity of the data series
- * @param chart pointer to chart object
- * @return the opacity of the data series
- */
-lv_opa_t lv_chart_get_series_opa(const lv_obj_t * chart);
-
-/**
- * Get the data series width
- * @param chart pointer to chart object
- * @return the width the data series (lines or points)
- */
-lv_coord_t lv_chart_get_series_width(const lv_obj_t * chart);
-
-/**
- * Get the dark effect level on the bottom of the points or columns
- * @param chart pointer to chart object
- * @return dark effect level (LV_OPA_TRANSP to turn off)
- */
-lv_opa_t lv_chart_get_series_darking(const lv_obj_t * chart);
-
-/**
- * Get the style of an chart object
- * @param chart pointer to an chart object
- * @param type which style should be get (can be only `LV_CHART_STYLE_MAIN`)
- * @return pointer to the chart's style
- */
-static inline const lv_style_t * lv_chart_get_style(const lv_obj_t * chart, lv_chart_style_t type)
-{
- (void)type; /*Unused*/
- return lv_obj_get_style(chart);
-}
-
-/**
- * Get the margin around the chart, used for axes value and labels
- * @param chart pointer to an chart object
- * @param return value of the margin
- */
-uint16_t lv_chart_get_margin(lv_obj_t * chart);
-
-/*=====================
- * Other functions
- *====================*/
-
-/**
- * Refresh a chart if its data line has changed
- * @param chart pointer to chart object
- */
-void lv_chart_refresh(lv_obj_t * chart);
-
-/**********************
- * MACROS
- **********************/
-
-#endif /*LV_USE_CHART*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_CHART_H*/
diff --git a/src/libs/lvgl/src/lv_objx/lv_cont.c b/src/libs/lvgl/src/lv_objx/lv_cont.c
deleted file mode 100644
index 22e9f514..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_cont.c
+++ /dev/null
@@ -1,710 +0,0 @@
-/**
- * @file lv_cont.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-
-#include "lv_cont.h"
-#if LV_USE_CONT != 0
-
-#include <stdbool.h>
-#include <stdint.h>
-#include <string.h>
-
-#include "../lv_core/lv_debug.h"
-#include "../lv_draw/lv_draw.h"
-#include "../lv_draw/lv_draw_basic.h"
-#include "../lv_themes/lv_theme.h"
-#include "../lv_misc/lv_area.h"
-#include "../lv_misc/lv_color.h"
-#include "../lv_misc/lv_math.h"
-#include "../lv_misc/lv_bidi.h"
-
-/*********************
- * DEFINES
- *********************/
-#define LV_OBJX_NAME "lv_cont"
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static lv_res_t lv_cont_signal(lv_obj_t * cont, lv_signal_t sign, void * param);
-static void lv_cont_refr_layout(lv_obj_t * cont);
-static void lv_cont_layout_col(lv_obj_t * cont);
-static void lv_cont_layout_row(lv_obj_t * cont);
-static void lv_cont_layout_center(lv_obj_t * cont);
-static void lv_cont_layout_pretty(lv_obj_t * cont);
-static void lv_cont_layout_grid(lv_obj_t * cont);
-static void lv_cont_refr_autofit(lv_obj_t * cont);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_signal_cb_t ancestor_signal;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Create a container objects
- * @param par pointer to an object, it will be the parent of the new container
- * @param copy pointer to a container object, if not NULL then the new object will be copied from it
- * @return pointer to the created container
- */
-lv_obj_t * lv_cont_create(lv_obj_t * par, const lv_obj_t * copy)
-{
-
- LV_LOG_TRACE("container create started");
-
- /*Create a basic object*/
- lv_obj_t * new_cont = lv_obj_create(par, copy);
- LV_ASSERT_MEM(new_cont);
- if(new_cont == NULL) return NULL;
-
- if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_cont);
-
- lv_obj_allocate_ext_attr(new_cont, sizeof(lv_cont_ext_t));
- lv_cont_ext_t * ext = lv_obj_get_ext_attr(new_cont);
- if(ext == NULL) return NULL;
-
- LV_ASSERT_MEM(ext);
- ext->fit_left = LV_FIT_NONE;
- ext->fit_right = LV_FIT_NONE;
- ext->fit_top = LV_FIT_NONE;
- ext->fit_bottom = LV_FIT_NONE;
- ext->layout = LV_LAYOUT_OFF;
-
- lv_obj_set_signal_cb(new_cont, lv_cont_signal);
-
- /*Init the new container*/
- if(copy == NULL) {
- /*Set the default styles if it's not screen*/
- if(par != NULL) {
- lv_theme_t * th = lv_theme_get_current();
- if(th) {
- lv_cont_set_style(new_cont, LV_CONT_STYLE_MAIN, th->style.cont);
- } else {
- lv_cont_set_style(new_cont, LV_CONT_STYLE_MAIN, &lv_style_pretty);
- }
- }
- }
- /*Copy an existing object*/
- else {
- lv_cont_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
- ext->fit_left = copy_ext->fit_left;
- ext->fit_right = copy_ext->fit_right;
- ext->fit_top = copy_ext->fit_top;
- ext->fit_bottom = copy_ext->fit_bottom;
- ext->layout = copy_ext->layout;
-
- /*Refresh the style with new signal function*/
- lv_obj_refresh_style(new_cont);
- }
-
- LV_LOG_INFO("container created");
-
- return new_cont;
-}
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set a layout on a container
- * @param cont pointer to a container object
- * @param layout a layout from 'lv_cont_layout_t'
- */
-void lv_cont_set_layout(lv_obj_t * cont, lv_layout_t layout)
-{
- LV_ASSERT_OBJ(cont, LV_OBJX_NAME);
-
- lv_cont_ext_t * ext = lv_obj_get_ext_attr(cont);
- if(ext->layout == layout) return;
-
- ext->layout = layout;
-
- /*Send a signal to refresh the layout*/
- cont->signal_cb(cont, LV_SIGNAL_CHILD_CHG, NULL);
-}
-
-/**
- * Set the fit policy in all 4 directions separately.
- * It tell how to change the container's size automatically.
- * @param cont pointer to a container object
- * @param left left fit policy from `lv_fit_t`
- * @param right right fit policy from `lv_fit_t`
- * @param top bottom fit policy from `lv_fit_t`
- * @param bottom bottom fit policy from `lv_fit_t`
- */
-void lv_cont_set_fit4(lv_obj_t * cont, lv_fit_t left, lv_fit_t right, lv_fit_t top, lv_fit_t bottom)
-{
- LV_ASSERT_OBJ(cont, LV_OBJX_NAME);
-
- lv_obj_invalidate(cont);
- lv_cont_ext_t * ext = lv_obj_get_ext_attr(cont);
- if(ext->fit_left == left && ext->fit_right == right && ext->fit_top == top && ext->fit_bottom == bottom) {
- return;
- }
-
- ext->fit_left = left;
- ext->fit_right = right;
- ext->fit_top = top;
- ext->fit_bottom = bottom;
-
- /*Send a signal to refresh the layout*/
- cont->signal_cb(cont, LV_SIGNAL_CHILD_CHG, NULL);
-}
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the layout of a container
- * @param cont pointer to container object
- * @return the layout from 'lv_cont_layout_t'
- */
-lv_layout_t lv_cont_get_layout(const lv_obj_t * cont)
-{
- LV_ASSERT_OBJ(cont, LV_OBJX_NAME);
-
- lv_cont_ext_t * ext = lv_obj_get_ext_attr(cont);
- return ext->layout;
-}
-
-/**
- * Get left fit mode of a container
- * @param cont pointer to a container object
- * @return an element of `lv_fit_t`
- */
-lv_fit_t lv_cont_get_fit_left(const lv_obj_t * cont)
-{
- LV_ASSERT_OBJ(cont, LV_OBJX_NAME);
-
- lv_cont_ext_t * ext = lv_obj_get_ext_attr(cont);
- return ext->fit_left;
-}
-
-/**
- * Get right fit mode of a container
- * @param cont pointer to a container object
- * @return an element of `lv_fit_t`
- */
-lv_fit_t lv_cont_get_fit_right(const lv_obj_t * cont)
-{
- LV_ASSERT_OBJ(cont, LV_OBJX_NAME);
-
- lv_cont_ext_t * ext = lv_obj_get_ext_attr(cont);
- return ext->fit_right;
-}
-
-/**
- * Get top fit mode of a container
- * @param cont pointer to a container object
- * @return an element of `lv_fit_t`
- */
-lv_fit_t lv_cont_get_fit_top(const lv_obj_t * cont)
-{
- LV_ASSERT_OBJ(cont, LV_OBJX_NAME);
-
- lv_cont_ext_t * ext = lv_obj_get_ext_attr(cont);
- return ext->fit_top;
-}
-
-/**
- * Get bottom fit mode of a container
- * @param cont pointer to a container object
- * @return an element of `lv_fit_t`
- */
-lv_fit_t lv_cont_get_fit_bottom(const lv_obj_t * cont)
-{
- LV_ASSERT_OBJ(cont, LV_OBJX_NAME);
-
- lv_cont_ext_t * ext = lv_obj_get_ext_attr(cont);
- return ext->fit_bottom;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Signal function of the container
- * @param cont pointer to a container object
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_cont_signal(lv_obj_t * cont, lv_signal_t sign, void * param)
-{
- lv_res_t res;
-
- /* Include the ancient signal function */
- res = ancestor_signal(cont, sign, param);
- if(res != LV_RES_OK) return res;
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);
-
- if(sign == LV_SIGNAL_STYLE_CHG) { /*Recalculate the padding if the style changed*/
- lv_cont_refr_layout(cont);
- lv_cont_refr_autofit(cont);
- } else if(sign == LV_SIGNAL_CHILD_CHG) {
- lv_cont_refr_layout(cont);
- lv_cont_refr_autofit(cont);
- } else if(sign == LV_SIGNAL_CORD_CHG) {
- if(lv_obj_get_width(cont) != lv_area_get_width(param) || lv_obj_get_height(cont) != lv_area_get_height(param)) {
- lv_cont_refr_layout(cont);
- lv_cont_refr_autofit(cont);
- }
- } else if(sign == LV_SIGNAL_PARENT_SIZE_CHG) {
- /*FLOOD and FILL fit needs to be refreshed if the parent size has changed*/
- lv_cont_refr_autofit(cont);
-
- }
-
- return res;
-}
-
-/**
- * Refresh the layout of a container
- * @param cont pointer to an object which layout should be refreshed
- */
-static void lv_cont_refr_layout(lv_obj_t * cont)
-{
- lv_layout_t type = lv_cont_get_layout(cont);
-
- /*'cont' has to be at least 1 child*/
- if(lv_obj_get_child(cont, NULL) == NULL) return;
-
- if(type == LV_LAYOUT_OFF) return;
-
- if(type == LV_LAYOUT_CENTER) {
- lv_cont_layout_center(cont);
- } else if(type == LV_LAYOUT_COL_L || type == LV_LAYOUT_COL_M || type == LV_LAYOUT_COL_R) {
- lv_cont_layout_col(cont);
- } else if(type == LV_LAYOUT_ROW_T || type == LV_LAYOUT_ROW_M || type == LV_LAYOUT_ROW_B) {
- lv_cont_layout_row(cont);
- } else if(type == LV_LAYOUT_PRETTY) {
- lv_cont_layout_pretty(cont);
- } else if(type == LV_LAYOUT_GRID) {
- lv_cont_layout_grid(cont);
- }
-}
-
-/**
- * Handle column type layouts
- * @param cont pointer to an object which layout should be handled
- */
-static void lv_cont_layout_col(lv_obj_t * cont)
-{
- lv_layout_t type = lv_cont_get_layout(cont);
- lv_obj_t * child;
-
- /*Adjust margin and get the alignment type*/
- lv_align_t align;
- const lv_style_t * style = lv_obj_get_style(cont);
- lv_coord_t hpad_corr;
-
- switch(type) {
- case LV_LAYOUT_COL_L:
- hpad_corr = style->body.padding.left;
- align = LV_ALIGN_IN_TOP_LEFT;
- break;
- case LV_LAYOUT_COL_M:
- hpad_corr = 0;
- align = LV_ALIGN_IN_TOP_MID;
- break;
- case LV_LAYOUT_COL_R:
- hpad_corr = -style->body.padding.right;
- align = LV_ALIGN_IN_TOP_RIGHT;
- break;
- default:
- hpad_corr = 0;
- align = LV_ALIGN_IN_TOP_LEFT;
- break;
- }
-
- /* Disable child change action because the children will be moved a lot
- * an unnecessary child change signals could be sent*/
- lv_obj_set_protect(cont, LV_PROTECT_CHILD_CHG);
- /* Align the children */
- lv_coord_t last_cord = style->body.padding.top;
- LV_LL_READ_BACK(cont->child_ll, child)
- {
- if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) continue;
-
- lv_obj_align(child, cont, align, hpad_corr, last_cord);
- last_cord += lv_obj_get_height(child) + style->body.padding.inner;
- }
-
- lv_obj_clear_protect(cont, LV_PROTECT_CHILD_CHG);
-}
-
-/**
- * Handle row type layouts
- * @param cont pointer to an object which layout should be handled
- */
-static void lv_cont_layout_row(lv_obj_t * cont)
-{
- lv_layout_t type = lv_cont_get_layout(cont);
- lv_obj_t * child;
-
- /*Adjust margin and get the alignment type*/
- lv_align_t align;
- const lv_style_t * style = lv_obj_get_style(cont);
- lv_coord_t vpad_corr;
- lv_bidi_dir_t base_dir = lv_obj_get_base_dir(cont);
- switch(type) {
- case LV_LAYOUT_ROW_T:
- vpad_corr = style->body.padding.top;
- align = base_dir == LV_BIDI_DIR_RTL ? LV_ALIGN_IN_TOP_RIGHT : LV_ALIGN_IN_TOP_LEFT;
- break;
- case LV_LAYOUT_ROW_M:
- vpad_corr = 0;
- align = base_dir == LV_BIDI_DIR_RTL ? LV_ALIGN_IN_RIGHT_MID: LV_ALIGN_IN_LEFT_MID;
- break;
- case LV_LAYOUT_ROW_B:
- vpad_corr = -style->body.padding.bottom;
- align = base_dir == LV_BIDI_DIR_RTL ? LV_ALIGN_IN_BOTTOM_RIGHT: LV_ALIGN_IN_BOTTOM_LEFT;
- break;
- default:
- vpad_corr = 0;
- align = base_dir == LV_BIDI_DIR_RTL ? LV_ALIGN_IN_TOP_RIGHT : LV_ALIGN_IN_TOP_LEFT;
- break;
- }
-
- /* Disable child change action because the children will be moved a lot
- * an unnecessary child change signals could be sent*/
- lv_obj_set_protect(cont, LV_PROTECT_CHILD_CHG);
-
- /* Align the children */
- lv_coord_t last_cord;
- if(base_dir == LV_BIDI_DIR_RTL) last_cord = style->body.padding.right;
- else last_cord = style->body.padding.left;
-
- LV_LL_READ_BACK(cont->child_ll, child)
- {
- if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) continue;
-
-// last_cord -= lv_obj_get_width(child);
-
- if(base_dir == LV_BIDI_DIR_RTL) lv_obj_align(child, cont, align, -last_cord, vpad_corr);
- else lv_obj_align(child, cont, align, last_cord, vpad_corr);
-
- last_cord += lv_obj_get_width(child) + style->body.padding.inner;
- }
-
- lv_obj_clear_protect(cont, LV_PROTECT_CHILD_CHG);
-}
-
-/**
- * Handle the center layout
- * @param cont pointer to an object which layout should be handled
- */
-static void lv_cont_layout_center(lv_obj_t * cont)
-{
- lv_obj_t * child;
- const lv_style_t * style = lv_obj_get_style(cont);
- uint32_t obj_num = 0;
- lv_coord_t h_tot = 0;
-
- LV_LL_READ(cont->child_ll, child)
- {
- if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) continue;
- h_tot += lv_obj_get_height(child) + style->body.padding.inner;
- obj_num++;
- }
-
- if(obj_num == 0) return;
-
- h_tot -= style->body.padding.inner;
-
- /* Disable child change action because the children will be moved a lot
- * an unnecessary child change signals could be sent*/
- lv_obj_set_protect(cont, LV_PROTECT_CHILD_CHG);
-
- /* Align the children */
- lv_coord_t last_cord = -(h_tot / 2);
- LV_LL_READ_BACK(cont->child_ll, child)
- {
- if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) continue;
-
- lv_obj_align(child, cont, LV_ALIGN_CENTER, 0, last_cord + lv_obj_get_height(child) / 2);
- last_cord += lv_obj_get_height(child) + style->body.padding.inner;
- }
-
- lv_obj_clear_protect(cont, LV_PROTECT_CHILD_CHG);
-}
-
-/**
- * Handle the pretty layout. Put as many object as possible in row
- * then begin a new row
- * @param cont pointer to an object which layout should be handled
- */
-static void lv_cont_layout_pretty(lv_obj_t * cont)
-{
- lv_obj_t * child_rs; /* Row starter child */
- lv_obj_t * child_rc; /* Row closer child */
- lv_obj_t * child_tmp; /* Temporary child */
- const lv_style_t * style = lv_obj_get_style(cont);
- lv_coord_t w_obj = lv_obj_get_width(cont);
- lv_coord_t act_y = style->body.padding.top;
- /* Disable child change action because the children will be moved a lot
- * an unnecessary child change signals could be sent*/
-
- child_rs = lv_ll_get_tail(&cont->child_ll); /*Set the row starter child*/
- if(child_rs == NULL) return; /*Return if no child*/
-
- lv_obj_set_protect(cont, LV_PROTECT_CHILD_CHG);
-
- child_rc = child_rs; /*Initially the the row starter and closer is the same*/
- while(child_rs != NULL) {
- lv_coord_t h_row = 0;
- lv_coord_t w_row =
- style->body.padding.left + style->body.padding.right; /*The width is at least the left+right hpad*/
- uint32_t obj_num = 0;
-
- /*Find the row closer object and collect some data*/
- do {
- if(lv_obj_get_hidden(child_rc) == false && lv_obj_is_protected(child_rc, LV_PROTECT_POS) == false) {
- /*If this object is already not fit then break*/
- if(w_row + lv_obj_get_width(child_rc) > w_obj) {
- /*Step back one child because the last already not fit, so the previous is the
- * closer*/
- if(child_rc != NULL && obj_num != 0) {
- child_rc = lv_ll_get_next(&cont->child_ll, child_rc);
- }
- break;
- }
- w_row += lv_obj_get_width(child_rc) + style->body.padding.inner; /*Add the object width + opad*/
- h_row = LV_MATH_MAX(h_row, lv_obj_get_height(child_rc)); /*Search the highest object*/
- obj_num++;
- if(lv_obj_is_protected(child_rc, LV_PROTECT_FOLLOW))
- break; /*If can not be followed by an other object then break here*/
- }
- child_rc = lv_ll_get_prev(&cont->child_ll, child_rc); /*Load the next object*/
- if(obj_num == 0)
- child_rs = child_rc; /*If the first object was hidden (or too long) then set the
- next as first */
- } while(child_rc != NULL);
-
- /*If the object is too long then align it to the middle*/
- if(obj_num == 0) {
- if(child_rc != NULL) {
- lv_obj_align(child_rc, cont, LV_ALIGN_IN_TOP_MID, 0, act_y);
- h_row = lv_obj_get_height(child_rc); /*Not set previously because of the early break*/
- }
- }
- /*If there is only one object in the row then align it to the middle*/
- else if(obj_num == 1) {
- lv_obj_align(child_rs, cont, LV_ALIGN_IN_TOP_MID, 0, act_y);
- }
- /*If there are two object in the row then align them proportionally*/
- else if(obj_num == 2) {
- lv_obj_t * obj1 = child_rs;
- lv_obj_t * obj2 = lv_ll_get_prev(&cont->child_ll, child_rs);
- w_row = lv_obj_get_width(obj1) + lv_obj_get_width(obj2);
- lv_coord_t pad = (w_obj - w_row) / 3;
- lv_obj_align(obj1, cont, LV_ALIGN_IN_TOP_LEFT, pad, act_y + (h_row - lv_obj_get_height(obj1)) / 2);
- lv_obj_align(obj2, cont, LV_ALIGN_IN_TOP_RIGHT, -pad, act_y + (h_row - lv_obj_get_height(obj2)) / 2);
- }
- /* Align the children (from child_rs to child_rc)*/
- else {
- w_row -= style->body.padding.inner * obj_num;
- lv_coord_t new_opad = (w_obj - w_row) / (obj_num - 1);
- lv_coord_t act_x = style->body.padding.left; /*x init*/
- child_tmp = child_rs;
- while(child_tmp != NULL) {
- if(lv_obj_get_hidden(child_tmp) == false && lv_obj_is_protected(child_tmp, LV_PROTECT_POS) == false) {
- lv_obj_align(child_tmp, cont, LV_ALIGN_IN_TOP_LEFT, act_x,
- act_y + (h_row - lv_obj_get_height(child_tmp)) / 2);
- act_x += lv_obj_get_width(child_tmp) + new_opad;
- }
- if(child_tmp == child_rc) break;
- child_tmp = lv_ll_get_prev(&cont->child_ll, child_tmp);
- }
- }
-
- if(child_rc == NULL) break;
- act_y += style->body.padding.inner + h_row; /*y increment*/
- child_rs = lv_ll_get_prev(&cont->child_ll, child_rc); /*Go to the next object*/
- child_rc = child_rs;
- }
- lv_obj_clear_protect(cont, LV_PROTECT_CHILD_CHG);
-}
-
-/**
- * Handle the grid layout. Align same-sized objects in a grid
- * @param cont pointer to an object which layout should be handled
- */
-static void lv_cont_layout_grid(lv_obj_t * cont)
-{
- lv_obj_t * child;
- const lv_style_t * style = lv_obj_get_style(cont);
- lv_coord_t w_tot = lv_obj_get_width(cont);
- lv_coord_t w_obj = lv_obj_get_width(lv_obj_get_child(cont, NULL));
- lv_coord_t w_fit = lv_obj_get_width_fit(cont);
- lv_coord_t h_obj = lv_obj_get_height(lv_obj_get_child(cont, NULL));
- uint16_t obj_row = (w_fit) / (w_obj + style->body.padding.inner); /*Obj. num. in a row*/
- lv_coord_t x_ofs;
- if(obj_row > 1) {
- x_ofs = w_obj + (w_fit - (obj_row * w_obj)) / (obj_row - 1);
- } else {
- x_ofs = w_tot / 2 - w_obj / 2;
- }
- lv_coord_t y_ofs = h_obj + style->body.padding.inner;
-
- /* Disable child change action because the children will be moved a lot
- * an unnecessary child change signals could be sent*/
- lv_obj_set_protect(cont, LV_PROTECT_CHILD_CHG);
-
- /* Align the children */
- lv_coord_t act_x = style->body.padding.left;
- lv_coord_t act_y = style->body.padding.top;
- uint16_t obj_cnt = 0;
- LV_LL_READ_BACK(cont->child_ll, child)
- {
- if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) continue;
-
- if(obj_row > 1) {
- lv_obj_set_pos(child, act_x, act_y);
- act_x += x_ofs;
- } else {
- lv_obj_set_pos(child, x_ofs, act_y);
- }
- obj_cnt++;
-
- if(obj_cnt >= obj_row) {
- obj_cnt = 0;
- act_x = style->body.padding.left;
- act_y += y_ofs;
- }
- }
-
- lv_obj_clear_protect(cont, LV_PROTECT_CHILD_CHG);
-}
-
-/**
- * Handle auto fit. Set the size of the object to involve all children.
- * @param cont pointer to an object which size will be modified
- */
-static void lv_cont_refr_autofit(lv_obj_t * cont)
-{
- lv_cont_ext_t * ext = lv_obj_get_ext_attr(cont);
-
- if(ext->fit_left == LV_FIT_NONE && ext->fit_right == LV_FIT_NONE && ext->fit_top == LV_FIT_NONE &&
- ext->fit_bottom == LV_FIT_NONE) {
- return;
- }
-
- lv_area_t tight_area;
- lv_area_t ori;
- const lv_style_t * style = lv_obj_get_style(cont);
- lv_obj_t * child_i;
-
- lv_obj_t * par = lv_obj_get_parent(cont);
- const lv_style_t * par_style = lv_obj_get_style(par);
- lv_area_t flood_area;
- lv_area_copy(&flood_area, &par->coords);
- flood_area.x1 += par_style->body.padding.left;
- flood_area.x2 -= par_style->body.padding.right;
- flood_area.y1 += par_style->body.padding.top;
- flood_area.y2 -= par_style->body.padding.bottom;
-
- /*Search the side coordinates of the children*/
- lv_obj_get_coords(cont, &ori);
- lv_obj_get_coords(cont, &tight_area);
-
- bool has_children = lv_ll_is_empty(&cont->child_ll) ? false : true;
-
- if(has_children) {
- tight_area.x1 = LV_COORD_MAX;
- tight_area.y1 = LV_COORD_MAX;
- tight_area.x2 = LV_COORD_MIN;
- tight_area.y2 = LV_COORD_MIN;
-
- LV_LL_READ(cont->child_ll, child_i)
- {
- if(lv_obj_get_hidden(child_i) != false) continue;
- tight_area.x1 = LV_MATH_MIN(tight_area.x1, child_i->coords.x1);
- tight_area.y1 = LV_MATH_MIN(tight_area.y1, child_i->coords.y1);
- tight_area.x2 = LV_MATH_MAX(tight_area.x2, child_i->coords.x2);
- tight_area.y2 = LV_MATH_MAX(tight_area.y2, child_i->coords.y2);
- }
-
- tight_area.x1 -= style->body.padding.left;
- tight_area.x2 += style->body.padding.right;
- tight_area.y1 -= style->body.padding.top;
- tight_area.y2 += style->body.padding.bottom;
- }
-
- lv_area_t new_area;
- lv_area_copy(&new_area, &ori);
-
- switch(ext->fit_left) {
- case LV_FIT_TIGHT: new_area.x1 = tight_area.x1; break;
- case LV_FIT_FLOOD: new_area.x1 = flood_area.x1; break;
- case LV_FIT_FILL: new_area.x1 = has_children ? LV_MATH_MIN(tight_area.x1, flood_area.x1) : flood_area.x1; break;
- default: break;
- }
-
- switch(ext->fit_right) {
- case LV_FIT_TIGHT: new_area.x2 = tight_area.x2; break;
- case LV_FIT_FLOOD: new_area.x2 = flood_area.x2; break;
- case LV_FIT_FILL: new_area.x2 = has_children ? LV_MATH_MAX(tight_area.x2, flood_area.x2) : flood_area.x2; break;
- default: break;
- }
-
- switch(ext->fit_top) {
- case LV_FIT_TIGHT: new_area.y1 = tight_area.y1; break;
- case LV_FIT_FLOOD: new_area.y1 = flood_area.y1; break;
- case LV_FIT_FILL: new_area.y1 = has_children ? LV_MATH_MIN(tight_area.y1, flood_area.y1) : flood_area.y1; break;
- default: break;
- }
-
- switch(ext->fit_bottom) {
- case LV_FIT_TIGHT: new_area.y2 = tight_area.y2; break;
- case LV_FIT_FLOOD: new_area.y2 = flood_area.y2; break;
- case LV_FIT_FILL: new_area.y2 = has_children ? LV_MATH_MAX(tight_area.y2, flood_area.y2) : flood_area.y2; break;
- default: break;
- }
-
- /*Do nothing if the coordinates are not changed*/
- if(cont->coords.x1 != new_area.x1 || cont->coords.y1 != new_area.y1 || cont->coords.x2 != new_area.x2 ||
- cont->coords.y2 != new_area.y2) {
-
- lv_obj_invalidate(cont);
- lv_area_copy(&cont->coords, &new_area);
- lv_obj_invalidate(cont);
-
- /*Notify the object about its new coordinates*/
- cont->signal_cb(cont, LV_SIGNAL_CORD_CHG, &ori);
-
- /*Inform the parent about the new coordinates*/
- par->signal_cb(par, LV_SIGNAL_CHILD_CHG, cont);
-
- if(lv_obj_get_auto_realign(cont)) {
- lv_obj_realign(cont);
- }
-
- /*Tell the children the parent's size has changed*/
- LV_LL_READ(cont->child_ll, child_i)
- {
- child_i->signal_cb(child_i, LV_SIGNAL_PARENT_SIZE_CHG, NULL);
- }
- }
-}
-
-#endif
diff --git a/src/libs/lvgl/src/lv_objx/lv_cont.h b/src/libs/lvgl/src/lv_objx/lv_cont.h
deleted file mode 100644
index d4ed19fe..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_cont.h
+++ /dev/null
@@ -1,210 +0,0 @@
-/**
- * @file lv_cont.h
- *
- */
-
-#ifndef LV_CONT_H
-#define LV_CONT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_CONT != 0
-
-#include "../lv_core/lv_obj.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/** Container layout options*/
-enum {
- LV_LAYOUT_OFF = 0, /**< No layout */
- LV_LAYOUT_CENTER, /**< Center objects */
- LV_LAYOUT_COL_L, /**< Column left align*/
- LV_LAYOUT_COL_M, /**< Column middle align*/
- LV_LAYOUT_COL_R, /**< Column right align*/
- LV_LAYOUT_ROW_T, /**< Row top align*/
- LV_LAYOUT_ROW_M, /**< Row middle align*/
- LV_LAYOUT_ROW_B, /**< Row bottom align*/
- LV_LAYOUT_PRETTY, /**< Put as many object as possible in row and begin a new row*/
- LV_LAYOUT_GRID, /**< Align same-sized object into a grid*/
- _LV_LAYOUT_NUM
-};
-typedef uint8_t lv_layout_t;
-
-/**
- * How to resize the container around the children.
- */
-enum {
- LV_FIT_NONE, /**< Do not change the size automatically*/
- LV_FIT_TIGHT, /**< Shrink wrap around the children */
- LV_FIT_FLOOD, /**< Align the size to the parent's edge*/
- LV_FIT_FILL, /**< Align the size to the parent's edge first but if there is an object out of it
- then get larger */
- _LV_FIT_NUM
-};
-typedef uint8_t lv_fit_t;
-
-typedef struct
-{
- /*Inherited from 'base_obj' so no inherited ext. */ /*Ext. of ancestor*/
- /*New data for this type */
- uint8_t layout : 4; /*A layout from 'lv_layout_t' enum*/
- uint8_t fit_left : 2; /*A fit type from `lv_fit_t` enum */
- uint8_t fit_right : 2; /*A fit type from `lv_fit_t` enum */
- uint8_t fit_top : 2; /*A fit type from `lv_fit_t` enum */
- uint8_t fit_bottom : 2; /*A fit type from `lv_fit_t` enum */
-} lv_cont_ext_t;
-
-/*Styles*/
-enum {
- LV_CONT_STYLE_MAIN,
-};
-typedef uint8_t lv_cont_style_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Create a container objects
- * @param par pointer to an object, it will be the parent of the new container
- * @param copy pointer to a container object, if not NULL then the new object will be copied from it
- * @return pointer to the created container
- */
-lv_obj_t * lv_cont_create(lv_obj_t * par, const lv_obj_t * copy);
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set a layout on a container
- * @param cont pointer to a container object
- * @param layout a layout from 'lv_cont_layout_t'
- */
-void lv_cont_set_layout(lv_obj_t * cont, lv_layout_t layout);
-
-/**
- * Set the fit policy in all 4 directions separately.
- * It tell how to change the container's size automatically.
- * @param cont pointer to a container object
- * @param left left fit policy from `lv_fit_t`
- * @param right right fit policy from `lv_fit_t`
- * @param top top fit policy from `lv_fit_t`
- * @param bottom bottom fit policy from `lv_fit_t`
- */
-void lv_cont_set_fit4(lv_obj_t * cont, lv_fit_t left, lv_fit_t right, lv_fit_t top, lv_fit_t bottom);
-
-/**
- * Set the fit policy horizontally and vertically separately.
- * It tells how to change the container's size automatically.
- * @param cont pointer to a container object
- * @param hor horizontal fit policy from `lv_fit_t`
- * @param ver vertical fit policy from `lv_fit_t`
- */
-static inline void lv_cont_set_fit2(lv_obj_t * cont, lv_fit_t hor, lv_fit_t ver)
-{
- lv_cont_set_fit4(cont, hor, hor, ver, ver);
-}
-
-/**
- * Set the fit policy in all 4 direction at once.
- * It tells how to change the container's size automatically.
- * @param cont pointer to a container object
- * @param fit fit policy from `lv_fit_t`
- */
-static inline void lv_cont_set_fit(lv_obj_t * cont, lv_fit_t fit)
-{
- lv_cont_set_fit4(cont, fit, fit, fit, fit);
-}
-
-/**
- * Set the style of a container
- * @param cont pointer to a container object
- * @param type which style should be set (can be only `LV_CONT_STYLE_MAIN`)
- * @param style pointer to the new style
- */
-static inline void lv_cont_set_style(lv_obj_t * cont, lv_cont_style_t type, const lv_style_t * style)
-{
- (void)type; /*Unused*/
- lv_obj_set_style(cont, style);
-}
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the layout of a container
- * @param cont pointer to container object
- * @return the layout from 'lv_cont_layout_t'
- */
-lv_layout_t lv_cont_get_layout(const lv_obj_t * cont);
-
-/**
- * Get left fit mode of a container
- * @param cont pointer to a container object
- * @return an element of `lv_fit_t`
- */
-lv_fit_t lv_cont_get_fit_left(const lv_obj_t * cont);
-
-/**
- * Get right fit mode of a container
- * @param cont pointer to a container object
- * @return an element of `lv_fit_t`
- */
-lv_fit_t lv_cont_get_fit_right(const lv_obj_t * cont);
-
-/**
- * Get top fit mode of a container
- * @param cont pointer to a container object
- * @return an element of `lv_fit_t`
- */
-lv_fit_t lv_cont_get_fit_top(const lv_obj_t * cont);
-
-/**
- * Get bottom fit mode of a container
- * @param cont pointer to a container object
- * @return an element of `lv_fit_t`
- */
-lv_fit_t lv_cont_get_fit_bottom(const lv_obj_t * cont);
-
-/**
- * Get the style of a container
- * @param cont pointer to a container object
- * @param type which style should be get (can be only `LV_CONT_STYLE_MAIN`)
- * @return pointer to the container's style
- */
-static inline const lv_style_t * lv_cont_get_style(const lv_obj_t * cont, lv_cont_style_t type)
-{
- (void)type; /*Unused*/
- return lv_obj_get_style(cont);
-}
-
-/**********************
- * MACROS
- **********************/
-
-#endif /*LV_USE_CONT*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_CONT_H*/
diff --git a/src/libs/lvgl/src/lv_objx/lv_cpicker.c b/src/libs/lvgl/src/lv_objx/lv_cpicker.c
deleted file mode 100644
index 65826673..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_cpicker.c
+++ /dev/null
@@ -1,1068 +0,0 @@
-/**
- * @file lv_cpicker.c
- *
- * From @AloyseTech and @paulpv.
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_cpicker.h"
-#if LV_USE_CPICKER != 0
-
-#include "../lv_core/lv_debug.h"
-#include "../lv_draw/lv_draw_arc.h"
-#include "../lv_themes/lv_theme.h"
-#include "../lv_core/lv_indev.h"
-#include "../lv_core/lv_refr.h"
-#include "../lv_misc/lv_math.h"
-
-/*********************
- * DEFINES
- *********************/
-#define LV_OBJX_NAME "lv_cpicker"
-
-#ifndef LV_CPICKER_DEF_TYPE
-#define LV_CPICKER_DEF_TYPE LV_CPICKER_TYPE_DISC
-#endif
-
-#ifndef LV_CPICKER_DEF_HUE
-#define LV_CPICKER_DEF_HUE 0
-#endif
-
-#ifndef LV_CPICKER_DEF_SATURATION
-#define LV_CPICKER_DEF_SATURATION 100
-#endif
-
-#ifndef LV_CPICKER_DEF_VALUE
-#define LV_CPICKER_DEF_VALUE 100
-#endif
-
-#ifndef LV_CPICKER_DEF_HSV
-#define LV_CPICKER_DEF_HSV ((lv_color_hsv_t){LV_CPICKER_DEF_HUE, LV_CPICKER_DEF_SATURATION, LV_CPICKER_DEF_VALUE})
-#endif
-
-#ifndef LV_CPICKER_DEF_QF /*quantization factor*/
-#define LV_CPICKER_DEF_QF 3
-#endif
-
-#define TRI_OFFSET 2
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static bool lv_cpicker_design(lv_obj_t * cpicker, const lv_area_t * mask, lv_design_mode_t mode);
-static lv_res_t lv_cpicker_signal(lv_obj_t * cpicker, lv_signal_t sign, void * param);
-
-static void draw_rect_grad(lv_obj_t * cpicker, const lv_area_t * mask, lv_opa_t opa_scale);
-static void draw_disc_grad(lv_obj_t * cpicker, const lv_area_t * mask, lv_opa_t opa_scale);
-static void draw_indic(lv_obj_t * cpicker, const lv_area_t * mask, lv_opa_t opa_scale);
-static void invalidate_indic(lv_obj_t * cpicker);
-static lv_area_t get_indic_area(lv_obj_t * cpicker);
-
-static void next_color_mode(lv_obj_t * cpicker);
-static lv_res_t double_click_reset(lv_obj_t * cpicker);
-static void refr_indic_pos(lv_obj_t * cpicker);
-static lv_color_t angle_to_mode_color(lv_obj_t * cpicker, uint16_t angle);
-static uint16_t get_angle(lv_obj_t * cpicker);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_signal_cb_t ancestor_signal;
-static lv_design_cb_t ancestor_design;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Create a color_picker object
- * @param par pointer to an object, it will be the parent of the new color_picker
- * @param copy pointer to a color_picker object, if not NULL then the new object will be copied from it
- * @return pointer to the created color_picker
- */
-lv_obj_t * lv_cpicker_create(lv_obj_t * par, const lv_obj_t * copy)
-{
- LV_LOG_TRACE("color_picker create started");
-
- lv_obj_t * new_cpicker = lv_obj_create(par, copy);
- LV_ASSERT_MEM(new_cpicker);
- if(new_cpicker == NULL) return NULL;
-
- if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_cpicker);
- if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_cb(new_cpicker);
-
- /*Allocate the extended data*/
- lv_cpicker_ext_t * ext = lv_obj_allocate_ext_attr(new_cpicker, sizeof(lv_cpicker_ext_t));
- LV_ASSERT_MEM(ext);
- if(ext == NULL) return NULL;
-
- /*Initialize the allocated 'ext' */
- ext->type = LV_CPICKER_DEF_TYPE;
- ext->hsv = LV_CPICKER_DEF_HSV;
- ext->indic.style = &lv_style_plain;
- ext->indic.colored = 0;
- ext->color_mode = LV_CPICKER_COLOR_MODE_HUE;
- ext->color_mode_fixed = 0;
- ext->preview = 0;
- ext->last_click_time = 0;
- ext->last_change_time = 0;
-
- /*The signal and design functions are not copied so set them here*/
- lv_obj_set_signal_cb(new_cpicker, lv_cpicker_signal);
- lv_obj_set_design_cb(new_cpicker, lv_cpicker_design);
-
- /*If no copy do the basic initialization*/
- if(copy == NULL) {
- lv_obj_set_size(new_cpicker, LV_DPI * 2, LV_DPI * 2);
- lv_obj_set_protect(new_cpicker, LV_PROTECT_PRESS_LOST);
- lv_theme_t * th = lv_theme_get_current();
- if(th) {
- lv_cpicker_set_style(new_cpicker, LV_CPICKER_STYLE_MAIN, th->style.bg);
- } else {
- lv_cpicker_set_style(new_cpicker, LV_CPICKER_STYLE_MAIN, &lv_style_plain);
- }
- }
- /*Copy 'copy'*/
- else {
- lv_cpicker_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
- ext->type = copy_ext->type;
- ext->color_mode = copy_ext->color_mode;
- ext->color_mode_fixed = copy_ext->color_mode_fixed;
- ext->preview = copy_ext->preview;
- ext->hsv = copy_ext->hsv;
- ext->indic.colored = copy_ext->indic.colored;
- ext->indic.style = copy_ext->indic.style;
-
- /*Refresh the style with new signal function*/
- lv_obj_refresh_style(new_cpicker);
- }
- refr_indic_pos(new_cpicker);
-
- LV_LOG_INFO("color_picker created");
-
- return new_cpicker;
-}
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set a new type for a cpicker
- * @param cpicker pointer to a cpicker object
- * @param type new type of the cpicker (from 'lv_cpicker_type_t' enum)
- */
-void lv_cpicker_set_type(lv_obj_t * cpicker, lv_cpicker_type_t type)
-{
- LV_ASSERT_OBJ(cpicker, LV_OBJX_NAME);
-
- lv_cpicker_ext_t * ext = lv_obj_get_ext_attr(cpicker);
- if(ext->type == type) return;
-
- ext->type = type;
- lv_obj_refresh_ext_draw_pad(cpicker);
- refr_indic_pos(cpicker);
-
- lv_obj_invalidate(cpicker);
-}
-
-/**
- * Set a style of a colorpicker.
- * @param cpicker pointer to colorpicker object
- * @param type which style should be set
- * @param style pointer to a style
- */
-void lv_cpicker_set_style(lv_obj_t * cpicker, lv_cpicker_style_t type, lv_style_t * style)
-{
- LV_ASSERT_OBJ(cpicker, LV_OBJX_NAME);
-
- lv_cpicker_ext_t * ext = lv_obj_get_ext_attr(cpicker);
-
- switch(type) {
- case LV_CPICKER_STYLE_MAIN:
- lv_obj_set_style(cpicker, style);
- break;
- case LV_CPICKER_STYLE_INDICATOR:
- ext->indic.style = style;
- lv_obj_invalidate(cpicker);
- break;
- }
-}
-
-/**
- * Set the current hue of a colorpicker.
- * @param cpicker pointer to colorpicker object
- * @param hue current selected hue [0..360]
- * @return true if changed, otherwise false
- */
-bool lv_cpicker_set_hue(lv_obj_t * cpicker, uint16_t hue)
-{
- lv_color_hsv_t hsv = lv_cpicker_get_hsv(cpicker);
- hsv.h = hue;
- return lv_cpicker_set_hsv(cpicker, hsv);
-}
-
-/**
- * Set the current saturation of a colorpicker.
- * @param cpicker pointer to colorpicker object
- * @param saturation current selected saturation [0..100]
- * @return true if changed, otherwise false
- */
-bool lv_cpicker_set_saturation(lv_obj_t * cpicker, uint8_t saturation)
-{
- lv_color_hsv_t hsv = lv_cpicker_get_hsv(cpicker);
- hsv.s = saturation;
- return lv_cpicker_set_hsv(cpicker, hsv);
-}
-
-/**
- * Set the current value of a colorpicker.
- * @param cpicker pointer to colorpicker object
- * @param val current selected value [0..100]
- * @return true if changed, otherwise false
- */
-bool lv_cpicker_set_value(lv_obj_t * cpicker, uint8_t val)
-{
- lv_color_hsv_t hsv = lv_cpicker_get_hsv(cpicker);
- hsv.v = val;
- return lv_cpicker_set_hsv(cpicker, hsv);
-}
-
-/**
- * Set the current hsv of a colorpicker.
- * @param cpicker pointer to colorpicker object
- * @param color current selected hsv
- * @return true if changed, otherwise false
- */
-bool lv_cpicker_set_hsv(lv_obj_t * cpicker, lv_color_hsv_t hsv)
-{
- LV_ASSERT_OBJ(cpicker, LV_OBJX_NAME);
-
- if (hsv.h > 360) hsv.h %= 360;
- if (hsv.s > 100) hsv.s = 100;
- if (hsv.v > 100) hsv.v = 100;
-
- lv_cpicker_ext_t * ext = lv_obj_get_ext_attr(cpicker);
-
- if (ext->hsv.h == hsv.h && ext->hsv.s == hsv.s && ext->hsv.v == hsv.v) return false;
-
- ext->hsv = hsv;
-
- refr_indic_pos(cpicker);
-
- if (ext->preview && ext->type == LV_CPICKER_TYPE_DISC) {
- lv_obj_invalidate(cpicker);
- }
-
- return true;
-}
-
-/**
- * Set the current color of a colorpicker.
- * @param cpicker pointer to colorpicker object
- * @param color current selected color
- * @return true if changed, otherwise false
- */
-bool lv_cpicker_set_color(lv_obj_t * cpicker, lv_color_t color)
-{
- lv_color32_t c32;
- c32.full = lv_color_to32(color);
-
- return lv_cpicker_set_hsv(cpicker,
- lv_color_rgb_to_hsv(c32.ch.red, c32.ch.green, c32.ch.blue));
-}
-
-/**
- * Set the current color mode.
- * @param cpicker pointer to colorpicker object
- * @param mode color mode (hue/sat/val)
- */
-void lv_cpicker_set_color_mode(lv_obj_t * cpicker, lv_cpicker_color_mode_t mode)
-{
- LV_ASSERT_OBJ(cpicker, LV_OBJX_NAME);
-
- lv_cpicker_ext_t * ext = lv_obj_get_ext_attr(cpicker);
-
- ext->color_mode = mode;
- refr_indic_pos(cpicker);
- lv_obj_invalidate(cpicker);
-}
-
-/**
- * Set if the color mode is changed on long press on center
- * @param cpicker pointer to colorpicker object
- * @param fixed color mode cannot be changed on long press
- */
-void lv_cpicker_set_color_mode_fixed(lv_obj_t * cpicker, bool fixed)
-{
- LV_ASSERT_OBJ(cpicker, LV_OBJX_NAME);
-
- lv_cpicker_ext_t * ext = lv_obj_get_ext_attr(cpicker);
-
- ext->color_mode_fixed = fixed;
-}
-
-/**
- * Make the indicator to be colored to the current color
- * @param cpicker pointer to colorpicker object
- * @param en true: color the indicator; false: not color the indicator
- */
-void lv_cpicker_set_indic_colored(lv_obj_t * cpicker, bool en)
-{
- LV_ASSERT_OBJ(cpicker, LV_OBJX_NAME);
-
- lv_cpicker_ext_t * ext = lv_obj_get_ext_attr(cpicker);
- ext->indic.colored = en ? 1 : 0;
- invalidate_indic(cpicker);
-}
-
-/**
- * Add a color preview in the middle of the DISC type color picker
- * @param cpicker pointer to colorpicker object
- * @param en true: enable preview; false: disable preview
- */
-void lv_cpicker_set_preview(lv_obj_t * cpicker, bool en)
-{
- LV_ASSERT_OBJ(cpicker, LV_OBJX_NAME);
-
- lv_cpicker_ext_t * ext = lv_obj_get_ext_attr(cpicker);
- ext->preview = en ? 1 : 0;
- lv_obj_invalidate(cpicker);
-}
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the current color mode.
- * @param cpicker pointer to colorpicker object
- * @return color mode (hue/sat/val)
- */
-lv_cpicker_color_mode_t lv_cpicker_get_color_mode(lv_obj_t * cpicker)
-{
- LV_ASSERT_OBJ(cpicker, LV_OBJX_NAME);
-
- lv_cpicker_ext_t * ext = lv_obj_get_ext_attr(cpicker);
-
- return ext->color_mode;
-}
-
-/**
- * Get if the color mode is changed on long press on center
- * @param cpicker pointer to colorpicker object
- * @return mode cannot be changed on long press
- */
-bool lv_cpicker_get_color_mode_fixed(lv_obj_t * cpicker)
-{
- LV_ASSERT_OBJ(cpicker, LV_OBJX_NAME);
-
- lv_cpicker_ext_t * ext = lv_obj_get_ext_attr(cpicker);
-
- return ext->color_mode_fixed;
-}
-
-/**
- * Get style of a color_picker.
- * @param cpicker pointer to color_picker object
- * @param type which style should be get
- * @return style pointer to the style
- */
-const lv_style_t * lv_cpicker_get_style(const lv_obj_t * cpicker, lv_cpicker_style_t type)
-{
- LV_ASSERT_OBJ(cpicker, LV_OBJX_NAME);
-
- lv_cpicker_ext_t * ext = lv_obj_get_ext_attr(cpicker);
-
- switch(type) {
- case LV_CPICKER_STYLE_MAIN:
- return lv_obj_get_style(cpicker);
- case LV_CPICKER_STYLE_INDICATOR:
- return ext->indic.style;
- default:
- return NULL;
- }
-
- /*To avoid warning*/
- return NULL;
-}
-
-/**
- * Get the current selected hue of a colorpicker.
- * @param cpicker pointer to colorpicker object
- * @return hue current selected hue
- */
-uint16_t lv_cpicker_get_hue(lv_obj_t * cpicker)
-{
- LV_ASSERT_OBJ(cpicker, LV_OBJX_NAME);
-
- lv_cpicker_ext_t * ext = lv_obj_get_ext_attr(cpicker);
-
- return ext->hsv.h;
-}
-
-/**
- * Get the current selected saturation of a colorpicker.
- * @param cpicker pointer to colorpicker object
- * @return current selected saturation
- */
-uint8_t lv_cpicker_get_saturation(lv_obj_t * cpicker)
-{
- LV_ASSERT_OBJ(cpicker, LV_OBJX_NAME);
-
- lv_cpicker_ext_t * ext = lv_obj_get_ext_attr(cpicker);
-
- return ext->hsv.s;
-}
-
-/**
- * Get the current selected hue of a colorpicker.
- * @param cpicker pointer to colorpicker object
- * @return current selected value
- */
-uint8_t lv_cpicker_get_value(lv_obj_t * cpicker)
-{
- LV_ASSERT_OBJ(cpicker, LV_OBJX_NAME);
-
- lv_cpicker_ext_t * ext = lv_obj_get_ext_attr(cpicker);
-
- return ext->hsv.v;
-}
-
-/**
- * Get the current selected hsv of a colorpicker.
- * @param cpicker pointer to colorpicker object
- * @return current selected hsv
- */
-lv_color_hsv_t lv_cpicker_get_hsv(lv_obj_t * cpicker)
-{
- LV_ASSERT_OBJ(cpicker, LV_OBJX_NAME);
-
- lv_cpicker_ext_t * ext = lv_obj_get_ext_attr(cpicker);
-
- return ext->hsv;
-}
-
-/**
- * Get the current selected color of a colorpicker.
- * @param cpicker pointer to colorpicker object
- * @return color current selected color
- */
-lv_color_t lv_cpicker_get_color(lv_obj_t * cpicker)
-{
- LV_ASSERT_OBJ(cpicker, LV_OBJX_NAME);
-
- lv_cpicker_ext_t * ext = lv_obj_get_ext_attr(cpicker);
-
- return lv_color_hsv_to_rgb(ext->hsv.h, ext->hsv.s, ext->hsv.v);
-}
-
-/**
- * Whether the indicator is colored to the current color or not
- * @param cpicker pointer to colorpicker object
- * @return true: color the indicator; false: not color the indicator
- */
-bool lv_cpicker_get_indic_colored(lv_obj_t * cpicker)
-{
- LV_ASSERT_OBJ(cpicker, LV_OBJX_NAME);
-
- lv_cpicker_ext_t * ext = lv_obj_get_ext_attr(cpicker);
-
- return ext->indic.colored ? true : false;
-}
-
-/**
- * Whether the preview is enabled or not
- * @param cpicker pointer to colorpicker object
- * @return en true: preview is enabled; false: preview is disabled
- */
-bool lv_cpicker_get_preview(lv_obj_t * cpicker)
-{
- LV_ASSERT_OBJ(cpicker, LV_OBJX_NAME);
-
- lv_cpicker_ext_t * ext = lv_obj_get_ext_attr(cpicker);
-
- return ext->preview ? true : false;
-}
-
-
-/*=====================
- * Other functions
- *====================*/
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-
-/**
- * Handle the drawing related tasks of the color_picker
- * @param cpicker pointer to an object
- * @param mask the object will be drawn only in this area
- * @param mode LV_DESIGN_COVER_CHK: only check if the object fully covers the 'mask_p' area
- * (return 'true' if yes)
- * LV_DESIGN_DRAW: draw the object (always return 'true')
- * LV_DESIGN_DRAW_POST: drawing after every children are drawn
- * @return true/false, depends on 'mode'
- */
-static bool lv_cpicker_design(lv_obj_t * cpicker, const lv_area_t * mask, lv_design_mode_t mode)
-{
- /*Return false if the object is not covers the mask_p area*/
- if(mode == LV_DESIGN_COVER_CHK) {
- return false;
- }
- /*Draw the object*/
- else if(mode == LV_DESIGN_DRAW_MAIN) {
- lv_cpicker_ext_t * ext = lv_obj_get_ext_attr(cpicker);
- lv_opa_t opa_scale = lv_obj_get_opa_scale(cpicker);
-
- if(ext->type == LV_CPICKER_TYPE_DISC) {
- draw_disc_grad(cpicker, mask, opa_scale);
- } else if(ext->type == LV_CPICKER_TYPE_RECT) {
- draw_rect_grad(cpicker, mask, opa_scale);
- }
-
- draw_indic(cpicker, mask, opa_scale);
- }
- /*Post draw when the children are drawn*/
- else if(mode == LV_DESIGN_DRAW_POST) {
- }
-
- return true;
-}
-
-static void draw_disc_grad(lv_obj_t * cpicker, const lv_area_t * mask, lv_opa_t opa_scale)
-{
- lv_cpicker_ext_t * ext = lv_obj_get_ext_attr(cpicker);
- int16_t start_angle = 0; /*Default*/
- int16_t end_angle = 360 - LV_CPICKER_DEF_QF; /*Default*/
-
- lv_coord_t w = lv_obj_get_width(cpicker);
- lv_coord_t h = lv_obj_get_height(cpicker);
- lv_coord_t cx = cpicker->coords.x1 + w / 2;
- lv_coord_t cy = cpicker->coords.y1 + h / 2;
- lv_coord_t r = w / 2;
-
- /*if the mask does not include the center of the object
- * redrawing all the wheel is not necessary;
- * only a given angular range
- */
- lv_point_t center = {cx, cy};
- if(!lv_area_is_point_on(mask, &center))
- {
- /*get angle from center of object to each corners of the area*/
- int16_t dr, ur, ul, dl;
- dr = lv_atan2(mask->x2 - cx, mask->y2 - cy);
- ur = lv_atan2(mask->x2 - cx, mask->y1 - cy);
- ul = lv_atan2(mask->x1 - cx, mask->y1 - cy);
- dl = lv_atan2(mask->x1 - cx, mask->y2 - cy);
-
- /*check area position from object axis*/
- bool left = (mask->x2 < cx && mask->x1 < cx) ? true : false;
- bool onYaxis = (mask->x2 > cx && mask->x1 < cx) ? true : false;
- bool right = (mask->x2 > cx && mask->x1 > cx) ? true : false;
- bool top = (mask->y2 < cy && mask->y1 < cy) ? true : false;
- bool onXaxis = (mask->y2 > cy && mask->y1 < cy) ? true : false;
- bool bottom = (mask->y2 > cy && mask->y1 > cy) ? true : false;
-
- /*store angular range*/
- if(right && bottom) {
- start_angle = dl;
- end_angle = ur;
- } else if(right && onXaxis) {
- start_angle = dl;
- end_angle = ul;
- } else if(right && top) {
- start_angle = dr;
- end_angle = ul;
- } else if(onYaxis && top) {
- start_angle = dr;
- end_angle = dl;
- } else if(left && top) {
- start_angle = ur;
- end_angle = dl;
- } else if(left && onXaxis) {
- start_angle = ur;
- end_angle = dr;
- } else if(left && bottom) {
- start_angle = ul;
- end_angle = dr;
- } else if(onYaxis && bottom) {
- start_angle = ul;
- end_angle = ur;
- }
-
- /*rollover angle*/
- if(start_angle > end_angle) end_angle += 360;
-
- /*round to QF factor*/
- start_angle = (start_angle/LV_CPICKER_DEF_QF) * LV_CPICKER_DEF_QF;
- end_angle = (end_angle / LV_CPICKER_DEF_QF) * LV_CPICKER_DEF_QF;
-
- /*shift angle if necessary before adding offset*/
- if((start_angle - LV_CPICKER_DEF_QF) < 0) {
- start_angle += 360;
- end_angle += 360;
- }
-
- /*ensure overlapping by adding offset*/
- start_angle -= LV_CPICKER_DEF_QF;
- end_angle += LV_CPICKER_DEF_QF;
- }
-
- lv_point_t triangle_points[3];
- lv_style_t style;
- lv_style_copy(&style, &lv_style_plain);
- uint16_t i;
- for(i = start_angle; i <= end_angle; i+= LV_CPICKER_DEF_QF) {
- style.body.main_color = angle_to_mode_color(cpicker, i);
- style.body.grad_color = style.body.main_color;
-
- triangle_points[0].x = cx;
- triangle_points[0].y = cy;
-
- triangle_points[1].x = cx + (r * lv_trigo_sin(i) >> LV_TRIGO_SHIFT);
- triangle_points[1].y = cy + (r * lv_trigo_sin(i + 90) >> LV_TRIGO_SHIFT);
-
- if(i == end_angle || i == (360 - LV_CPICKER_DEF_QF)) {
- /*the last triangle is drawn without additional overlapping pixels*/
- triangle_points[2].x = cx + (r * lv_trigo_sin(i + LV_CPICKER_DEF_QF) >> LV_TRIGO_SHIFT);
- triangle_points[2].y = cy + (r * lv_trigo_sin(i + LV_CPICKER_DEF_QF + 90) >> LV_TRIGO_SHIFT);
- } else {
- triangle_points[2].x = cx + (r * lv_trigo_sin(i + LV_CPICKER_DEF_QF + TRI_OFFSET) >> LV_TRIGO_SHIFT);
- triangle_points[2].y = cy + (r * lv_trigo_sin(i + LV_CPICKER_DEF_QF + TRI_OFFSET + 90) >> LV_TRIGO_SHIFT);
- }
-
- lv_draw_triangle(triangle_points, mask, &style, LV_OPA_COVER);
- }
-
- /*Mask out the center area*/
- const lv_style_t * style_main = lv_cpicker_get_style(cpicker, LV_CPICKER_STYLE_MAIN);
- lv_style_copy(&style, style_main);
- style.body.radius = LV_RADIUS_CIRCLE;
- lv_area_t area_mid;
- lv_area_copy(&area_mid, &cpicker->coords);
- lv_area_increment(&area_mid, -style_main->line.width);
-
- lv_draw_rect(&area_mid, mask, &style, opa_scale);
-
- if(ext->preview) {
- lv_color_t color = lv_cpicker_get_color(cpicker);
- style.body.main_color = color;
- style.body.grad_color = color;
- lv_area_increment(&area_mid, -style_main->line.width / 2);
-
- lv_draw_rect(&area_mid, mask, &style, opa_scale);
- }
-}
-
-static void draw_rect_grad(lv_obj_t * cpicker, const lv_area_t * mask, lv_opa_t opa_scale)
-{
- lv_style_t style;
- lv_style_copy(&style, lv_cpicker_get_style(cpicker, LV_CPICKER_STYLE_MAIN));
-
- lv_area_t grad_area;
- lv_obj_get_coords(cpicker, &grad_area);
-
- if(style.body.radius) {
- lv_coord_t h = lv_obj_get_height(cpicker);
- lv_coord_t r = style.body.radius;
- if(r > h / 2) r = h / 2;
- /*Make the gradient area smaller with a half circle on both ends*/
- grad_area.x1 += r;
- grad_area.x2 -= r;
-
- /*Draw the left rounded end*/
- lv_area_t rounded_edge_area;
- lv_obj_get_coords(cpicker, &rounded_edge_area);
- rounded_edge_area.x2 = rounded_edge_area.x1 + 2 * r;
-
- style.body.main_color = angle_to_mode_color(cpicker, 0);
- style.body.grad_color = style.body.main_color;
-
- lv_draw_rect(&rounded_edge_area, mask, &style, opa_scale);
-
- /*Draw the right rounded end*/
- lv_obj_get_coords(cpicker, &rounded_edge_area);
- rounded_edge_area.x1 = rounded_edge_area.x2 - 2 * r;
-
- style.body.main_color = angle_to_mode_color(cpicker, 359);
- style.body.grad_color = style.body.main_color;
-
- lv_draw_rect(&rounded_edge_area, mask, &style, opa_scale);
- }
-
- lv_coord_t grad_w = lv_area_get_width(&grad_area);
- uint16_t i_step = LV_MATH_MAX(LV_CPICKER_DEF_QF, 360 / grad_w);
- style.body.radius = 0;
- style.body.border.width = 0;
- style.body.shadow.width = 0;
- style.body.opa = LV_OPA_COVER;
-
- uint16_t i;
- for(i = 0; i < 360; i += i_step) {
- style.body.main_color = angle_to_mode_color(cpicker, i);
- style.body.grad_color = style.body.main_color;
-
- /*the following attribute might need changing between index to add border, shadow, radius etc*/
- lv_area_t rect_area;
-
- /*scale angle (hue/sat/val) to linear coordinate*/
- lv_coord_t xi = (i * grad_w) / 360;
-
- rect_area.x1 = LV_MATH_MIN(grad_area.x1 + xi, grad_area.x1 + grad_w - i_step);
- rect_area.y1 = grad_area.y1;
- rect_area.x2 = rect_area.x1 + i_step;
- rect_area.y2 = grad_area.y2;
-
- lv_draw_rect(&rect_area, mask, &style, opa_scale);
- }
-}
-
-static void draw_indic(lv_obj_t * cpicker, const lv_area_t * mask, lv_opa_t opa_scale)
-{
- lv_cpicker_ext_t * ext = lv_obj_get_ext_attr(cpicker);
-
- lv_style_t style_cir;
- lv_style_copy(&style_cir, ext->indic.style);
- style_cir.body.radius = LV_RADIUS_CIRCLE;
-
- if(ext->indic.colored) {
- style_cir.body.main_color = lv_cpicker_get_color(cpicker);
- style_cir.body.grad_color = style_cir.body.main_color;
- }
-
- lv_area_t indic_area = get_indic_area(cpicker);
-
- lv_draw_rect(&indic_area, mask, &style_cir, opa_scale);
-}
-
-static void invalidate_indic(lv_obj_t * cpicker)
-{
- lv_area_t indic_area = get_indic_area(cpicker);
-
- lv_obj_invalidate_area(cpicker, &indic_area);
-}
-
-static lv_area_t get_indic_area(lv_obj_t * cpicker)
-{
- lv_cpicker_ext_t * ext = lv_obj_get_ext_attr(cpicker);
- const lv_style_t * style_main = lv_cpicker_get_style(cpicker, LV_CPICKER_STYLE_MAIN);
- const lv_style_t * style_indic = lv_cpicker_get_style(cpicker, LV_CPICKER_STYLE_INDICATOR);
-
- uint16_t r = 0;
- if(ext->type == LV_CPICKER_TYPE_DISC) r = style_main->line.width / 2;
- else if(ext->type == LV_CPICKER_TYPE_RECT) {
- lv_coord_t h = lv_obj_get_height(cpicker);
- r = h / 2;
- }
-
- lv_area_t indic_area;
- indic_area.x1 = cpicker->coords.x1 + ext->indic.pos.x - r - style_indic->body.padding.left;
- indic_area.y1 = cpicker->coords.y1 + ext->indic.pos.y - r - style_indic->body.padding.right;
- indic_area.x2 = cpicker->coords.x1 + ext->indic.pos.x + r + style_indic->body.padding.top;
- indic_area.y2 = cpicker->coords.y1 + ext->indic.pos.y + r + style_indic->body.padding.bottom;
-
- return indic_area;
-}
-
-/**
- * Signal function of the color_picker
- * @param cpicker pointer to a color_picker object
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_cpicker_signal(lv_obj_t * cpicker, lv_signal_t sign, void * param)
-{
- /* Include the ancient signal function */
- lv_res_t res = ancestor_signal(cpicker, sign, param);
- if(res != LV_RES_OK) return res;
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);
-
- lv_cpicker_ext_t * ext = lv_obj_get_ext_attr(cpicker);
-
- if(sign == LV_SIGNAL_CLEANUP) {
- /*Nothing to cleanup. (No dynamically allocated memory in 'ext')*/
- } else if(sign == LV_SIGNAL_REFR_EXT_DRAW_PAD) {
- const lv_style_t * style_indic = lv_cpicker_get_style(cpicker, LV_CPICKER_STYLE_INDICATOR);
- lv_coord_t indic_pad = LV_MATH_MAX(style_indic->body.padding.left, style_indic->body.padding.right);
- indic_pad = LV_MATH_MAX(indic_pad, style_indic->body.padding.top);
- indic_pad = LV_MATH_MAX(indic_pad, style_indic->body.padding.bottom);
-
- if(ext->type == LV_CPICKER_TYPE_RECT) indic_pad += LV_MATH_MAX(indic_pad, lv_obj_get_height(cpicker) / 2);
-
- cpicker->ext_draw_pad = LV_MATH_MAX(cpicker->ext_draw_pad, indic_pad);
- } else if(sign == LV_SIGNAL_CORD_CHG) {
- /*Refresh extended draw area to make knob visible*/
- if(lv_obj_get_width(cpicker) != lv_area_get_width(param) ||
- lv_obj_get_height(cpicker) != lv_area_get_height(param)) {
- lv_obj_refresh_ext_draw_pad(cpicker);
- refr_indic_pos(cpicker);
- }
- } else if(sign == LV_SIGNAL_STYLE_CHG) {
- /*Refresh extended draw area to make knob visible*/
- lv_obj_refresh_ext_draw_pad(cpicker);
- refr_indic_pos(cpicker);
- }
- else if(sign == LV_SIGNAL_CONTROL) {
- uint32_t c = *((uint32_t *)param); /*uint32_t because can be UTF-8*/
- if(c == LV_KEY_RIGHT || c == LV_KEY_UP) {
- lv_color_hsv_t hsv_cur;
- hsv_cur = ext->hsv;
-
- switch(ext->color_mode) {
- case LV_CPICKER_COLOR_MODE_HUE:
- hsv_cur.h = (ext->hsv.h + 1) % 360;
- break;
- case LV_CPICKER_COLOR_MODE_SATURATION:
- hsv_cur.s = (ext->hsv.s + 1) % 100;
- break;
- case LV_CPICKER_COLOR_MODE_VALUE:
- hsv_cur.v = (ext->hsv.v + 1) % 100;
- break;
- }
-
- if (lv_cpicker_set_hsv(cpicker, hsv_cur)) {
- res = lv_event_send(cpicker, LV_EVENT_VALUE_CHANGED, NULL);
- if(res != LV_RES_OK) return res;
- }
- }
- else if(c == LV_KEY_LEFT || c == LV_KEY_DOWN) {
- lv_color_hsv_t hsv_cur;
- hsv_cur = ext->hsv;
-
- switch(ext->color_mode) {
- case LV_CPICKER_COLOR_MODE_HUE:
- hsv_cur.h = ext->hsv.h > 0?(ext->hsv.h - 1) : 360;
- break;
- case LV_CPICKER_COLOR_MODE_SATURATION:
- hsv_cur.s = ext->hsv.s > 0?(ext->hsv.s - 1) : 100;
- break;
- case LV_CPICKER_COLOR_MODE_VALUE:
- hsv_cur.v = ext->hsv.v > 0?(ext->hsv.v - 1) : 100;
- break;
- }
-
- if (lv_cpicker_set_hsv(cpicker, hsv_cur)) {
- res = lv_event_send(cpicker, LV_EVENT_VALUE_CHANGED, NULL);
- if(res != LV_RES_OK) return res;
- }
- }
- }
- else if(sign == LV_SIGNAL_PRESSED) {
- ext->last_change_time = lv_tick_get();
- lv_indev_get_point(lv_indev_get_act(), &ext->last_press_point);
- res = double_click_reset(cpicker);
- if(res != LV_RES_OK) return res;
- } else if(sign == LV_SIGNAL_PRESSING) {
- lv_indev_t * indev = lv_indev_get_act();
- if(indev == NULL) return res;
-
- lv_point_t p;
- lv_indev_get_point(indev, &p);
-
- if((LV_MATH_ABS(p.x - ext->last_press_point.x) > indev->driver.drag_limit / 2) ||
- (LV_MATH_ABS(p.y - ext->last_press_point.y) > indev->driver.drag_limit / 2)) {
- ext->last_change_time = lv_tick_get();
- ext->last_press_point.x = p.x;
- ext->last_press_point.y = p.y;
- }
-
- p.x -= cpicker->coords.x1;
- p.y -= cpicker->coords.y1;
-
- /*Ignore pressing in the inner area*/
- uint16_t w = lv_obj_get_width(cpicker);
-
- int16_t angle = 0;
-
- if(ext->type == LV_CPICKER_TYPE_RECT) {
- /*If pressed long enough without change go to next color mode*/
- uint32_t diff = lv_tick_elaps(ext->last_change_time);
- if(diff > (uint32_t)indev->driver.long_press_time * 2 && !ext->color_mode_fixed) {
- next_color_mode(cpicker);
- lv_indev_wait_release(lv_indev_get_act());
- return res;
- }
-
- angle = (p.x * 360) / w;
- if(angle < 0) angle = 0;
- if(angle >= 360) angle = 359;
-
- } else if(ext->type == LV_CPICKER_TYPE_DISC) {
- const lv_style_t * style_main = lv_cpicker_get_style(cpicker, LV_CPICKER_STYLE_MAIN);
- lv_coord_t r_in = w / 2;
- p.x -= r_in;
- p.y -= r_in;
- r_in -= style_main->line.width;
-
- if(r_in > LV_DPI / 2) {
- r_in -= style_main->line.width; /* to let some sensitive space inside*/
-
- if(r_in < LV_DPI / 2) r_in = LV_DPI / 2;
- }
-
- /*If the inner area is being pressed, go to the next color mode on long press*/
- if(p.x * p.x + p.y * p.y < r_in * r_in) {
- uint32_t diff = lv_tick_elaps(ext->last_change_time);
- if(diff > indev->driver.long_press_time && !ext->color_mode_fixed) {
- next_color_mode(cpicker);
- lv_indev_wait_release(lv_indev_get_act());
- }
- return res;
- }
-
- angle = lv_atan2(p.x, p.y) % 360;
- }
-
- lv_color_hsv_t hsv_cur;
- hsv_cur = ext->hsv;
-
- switch(ext->color_mode) {
- case LV_CPICKER_COLOR_MODE_HUE:
- hsv_cur.h = angle;
- break;
- case LV_CPICKER_COLOR_MODE_SATURATION:
- hsv_cur.s = (angle * 100) / 360;
- break;
- case LV_CPICKER_COLOR_MODE_VALUE:
- hsv_cur.v = (angle * 100) / 360;
- break;
- }
-
- if (lv_cpicker_set_hsv(cpicker, hsv_cur)) {
- res = lv_event_send(cpicker, LV_EVENT_VALUE_CHANGED, NULL);
- if(res != LV_RES_OK) return res;
- }
- }
-
- return res;
-}
-
-static void next_color_mode(lv_obj_t * cpicker)
-{
- lv_cpicker_ext_t * ext = lv_obj_get_ext_attr(cpicker);
- ext->color_mode = (ext->color_mode + 1) % 3;
- refr_indic_pos(cpicker);
- lv_obj_invalidate(cpicker);
-}
-
-static void refr_indic_pos(lv_obj_t * cpicker)
-{
- invalidate_indic(cpicker);
-
- lv_cpicker_ext_t * ext = lv_obj_get_ext_attr(cpicker);
- lv_coord_t w = lv_obj_get_width(cpicker);
- lv_coord_t h = lv_obj_get_height(cpicker);
-
- if(ext->type == LV_CPICKER_TYPE_RECT) {
- lv_coord_t ind_pos = 0;
- switch(ext->color_mode) {
- case LV_CPICKER_COLOR_MODE_HUE:
- ind_pos += (ext->hsv.h * w) / 360;
- break;
- case LV_CPICKER_COLOR_MODE_SATURATION:
- ind_pos += (ext->hsv.s * w) / 100;
- break;
- case LV_CPICKER_COLOR_MODE_VALUE:
- ind_pos += (ext->hsv.v * w) / 100;
- break;
- }
-
- ext->indic.pos.x = ind_pos;
- ext->indic.pos.y = h / 2;
- } else if(ext->type == LV_CPICKER_TYPE_DISC) {
- const lv_style_t * style_main = lv_cpicker_get_style(cpicker, LV_CPICKER_STYLE_MAIN);
- lv_coord_t r = w / 2 - style_main->line.width / 2;
- uint16_t angle = get_angle(cpicker);
- ext->indic.pos.x = (((int32_t)r * lv_trigo_sin(angle)) >> LV_TRIGO_SHIFT);
- ext->indic.pos.y = (((int32_t)r * lv_trigo_sin(angle + 90)) >> LV_TRIGO_SHIFT);
- ext->indic.pos.x = ext->indic.pos.x + w / 2;
- ext->indic.pos.y = ext->indic.pos.y + h / 2;
- }
-
- invalidate_indic(cpicker);
-}
-
-static lv_res_t double_click_reset(lv_obj_t * cpicker)
-{
- lv_cpicker_ext_t * ext = lv_obj_get_ext_attr(cpicker);
- lv_indev_t * indev = lv_indev_get_act();
- /*Double clicked? Use long press time as double click time out*/
- if(lv_tick_elaps(ext->last_click_time) < indev->driver.long_press_time) {
- lv_color_hsv_t hsv_cur;
- hsv_cur = ext->hsv;
-
- switch(ext->color_mode) {
- case LV_CPICKER_COLOR_MODE_HUE:
- hsv_cur.h = LV_CPICKER_DEF_HUE;
- break;
- case LV_CPICKER_COLOR_MODE_SATURATION:
- hsv_cur.s = LV_CPICKER_DEF_SATURATION;
- break;
- case LV_CPICKER_COLOR_MODE_VALUE:
- hsv_cur.v = LV_CPICKER_DEF_VALUE;
- break;
- }
-
- if (lv_cpicker_set_hsv(cpicker, hsv_cur)) {
- lv_res_t res = lv_event_send(cpicker, LV_EVENT_VALUE_CHANGED, NULL);
- if(res != LV_RES_OK) return res;
- }
- }
- ext->last_click_time = lv_tick_get();
-
- return LV_RES_OK;
-}
-
-static lv_color_t angle_to_mode_color(lv_obj_t * cpicker, uint16_t angle)
-{
- lv_cpicker_ext_t * ext = lv_obj_get_ext_attr(cpicker);
- lv_color_t color;
- switch(ext->color_mode)
- {
- default:
- case LV_CPICKER_COLOR_MODE_HUE:
- color = lv_color_hsv_to_rgb(angle % 360, ext->hsv.s, ext->hsv.v);
- break;
- case LV_CPICKER_COLOR_MODE_SATURATION:
- color = lv_color_hsv_to_rgb(ext->hsv.h, ((angle % 360) * 100) / 360, ext->hsv.v);
- break;
- case LV_CPICKER_COLOR_MODE_VALUE:
- color = lv_color_hsv_to_rgb(ext->hsv.h, ext->hsv.s, ((angle % 360) * 100) / 360);
- break;
- }
- return color;
-}
-
-static uint16_t get_angle(lv_obj_t * cpicker)
-{
- lv_cpicker_ext_t * ext = lv_obj_get_ext_attr(cpicker);
- uint16_t angle;
- switch(ext->color_mode)
- {
- default:
- case LV_CPICKER_COLOR_MODE_HUE:
- angle = ext->hsv.h;
- break;
- case LV_CPICKER_COLOR_MODE_SATURATION:
- angle = (ext->hsv.s * 360) / 100;
- break;
- case LV_CPICKER_COLOR_MODE_VALUE:
- angle = (ext->hsv.v * 360) / 100 ;
- break;
- }
- return angle;
-}
-
-#endif /* LV_USE_CPICKER != 0 */
diff --git a/src/libs/lvgl/src/lv_objx/lv_cpicker.h b/src/libs/lvgl/src/lv_objx/lv_cpicker.h
deleted file mode 100644
index a9feee5a..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_cpicker.h
+++ /dev/null
@@ -1,263 +0,0 @@
-/**
- * @file lv_cpicker.h
- *
- */
-
-#ifndef LV_CPICKER_H
-#define LV_CPICKER_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_CPICKER != 0
-
-#include "../lv_core/lv_obj.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-enum {
- LV_CPICKER_TYPE_RECT,
- LV_CPICKER_TYPE_DISC,
-};
-typedef uint8_t lv_cpicker_type_t;
-
-enum {
- LV_CPICKER_COLOR_MODE_HUE,
- LV_CPICKER_COLOR_MODE_SATURATION,
- LV_CPICKER_COLOR_MODE_VALUE
-};
-typedef uint8_t lv_cpicker_color_mode_t;
-
-
-
-/*Data of colorpicker*/
-typedef struct {
- lv_color_hsv_t hsv;
- struct {
- lv_style_t * style;
- lv_point_t pos;
- uint8_t colored :1;
-
- } indic;
- uint32_t last_click_time;
- uint32_t last_change_time;
- lv_point_t last_press_point;
- lv_cpicker_color_mode_t color_mode :2;
- uint8_t color_mode_fixed :1;
- lv_cpicker_type_t type :1;
- uint8_t preview :1;
-} lv_cpicker_ext_t;
-
-/*Styles*/
-enum {
- LV_CPICKER_STYLE_MAIN,
- LV_CPICKER_STYLE_INDICATOR,
-};
-typedef uint8_t lv_cpicker_style_t;
-
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Create a colorpicker objects
- * @param par pointer to an object, it will be the parent of the new colorpicker
- * @param copy pointer to a colorpicker object, if not NULL then the new object will be copied from it
- * @return pointer to the created colorpicker
- */
-lv_obj_t * lv_cpicker_create(lv_obj_t * par, const lv_obj_t * copy);
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set a new type for a colorpicker
- * @param cpicker pointer to a colorpicker object
- * @param type new type of the colorpicker (from 'lv_cpicker_type_t' enum)
- */
-void lv_cpicker_set_type(lv_obj_t * cpicker, lv_cpicker_type_t type);
-
-/**
- * Set a style of a colorpicker.
- * @param cpicker pointer to colorpicker object
- * @param type which style should be set
- * @param style pointer to a style
- */
-void lv_cpicker_set_style(lv_obj_t * cpicker, lv_cpicker_style_t type, lv_style_t *style);
-
-/**
- * Set the current hue of a colorpicker.
- * @param cpicker pointer to colorpicker object
- * @param hue current selected hue [0..360]
- * @return true if changed, otherwise false
- */
-bool lv_cpicker_set_hue(lv_obj_t * cpicker, uint16_t hue);
-
-/**
- * Set the current saturation of a colorpicker.
- * @param cpicker pointer to colorpicker object
- * @param saturation current selected saturation [0..100]
- * @return true if changed, otherwise false
- */
-bool lv_cpicker_set_saturation(lv_obj_t * cpicker, uint8_t saturation);
-
-/**
- * Set the current value of a colorpicker.
- * @param cpicker pointer to colorpicker object
- * @param val current selected value [0..100]
- * @return true if changed, otherwise false
- */
-bool lv_cpicker_set_value(lv_obj_t * cpicker, uint8_t val);
-
-/**
- * Set the current hsv of a colorpicker.
- * @param cpicker pointer to colorpicker object
- * @param hsv current selected hsv
- * @return true if changed, otherwise false
- */
-bool lv_cpicker_set_hsv(lv_obj_t * cpicker, lv_color_hsv_t hsv);
-
-/**
- * Set the current color of a colorpicker.
- * @param cpicker pointer to colorpicker object
- * @param color current selected color
- * @return true if changed, otherwise false
- */
-bool lv_cpicker_set_color(lv_obj_t * cpicker, lv_color_t color);
-
-/**
- * Set the current color mode.
- * @param cpicker pointer to colorpicker object
- * @param mode color mode (hue/sat/val)
- */
-void lv_cpicker_set_color_mode(lv_obj_t * cpicker, lv_cpicker_color_mode_t mode);
-
-/**
- * Set if the color mode is changed on long press on center
- * @param cpicker pointer to colorpicker object
- * @param fixed color mode cannot be changed on long press
- */
-void lv_cpicker_set_color_mode_fixed(lv_obj_t * cpicker, bool fixed);
-
-/**
- * Make the indicator to be colored to the current color
- * @param cpicker pointer to colorpicker object
- * @param en true: color the indicator; false: not color the indicator
- */
-void lv_cpicker_set_indic_colored(lv_obj_t * cpicker, bool en);
-
-/**
- * Add a color preview in the middle of the DISC type color picker
- * @param cpicker pointer to colorpicker object
- * @param en true: enable preview; false: disable preview
- */
-void lv_cpicker_set_preview(lv_obj_t * cpicker, bool en);
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the current color mode.
- * @param cpicker pointer to colorpicker object
- * @return color mode (hue/sat/val)
- */
-lv_cpicker_color_mode_t lv_cpicker_get_color_mode(lv_obj_t * cpicker);
-
-/**
- * Get if the color mode is changed on long press on center
- * @param cpicker pointer to colorpicker object
- * @return mode cannot be changed on long press
- */
-bool lv_cpicker_get_color_mode_fixed(lv_obj_t * cpicker);
-
-/**
- * Get style of a colorpicker.
- * @param cpicker pointer to colorpicker object
- * @param type which style should be get
- * @return pointer to the style
- */
-const lv_style_t * lv_cpicker_get_style(const lv_obj_t * cpicker, lv_cpicker_style_t type);
-
-/**
- * Get the current hue of a colorpicker.
- * @param cpicker pointer to colorpicker object
- * @return current selected hue
- */
-uint16_t lv_cpicker_get_hue(lv_obj_t * cpicker);
-
-/**
- * Get the current saturation of a colorpicker.
- * @param cpicker pointer to colorpicker object
- * @return current selected saturation
- */
-uint8_t lv_cpicker_get_saturation(lv_obj_t * cpicker);
-
-/**
- * Get the current hue of a colorpicker.
- * @param cpicker pointer to colorpicker object
- * @return current selected value
- */
-uint8_t lv_cpicker_get_value(lv_obj_t * cpicker);
-
-/**
- * Get the current selected hsv of a colorpicker.
- * @param cpicker pointer to colorpicker object
- * @return current selected hsv
- */
-lv_color_hsv_t lv_cpicker_get_hsv(lv_obj_t * cpicker);
-
-/**
- * Get the current selected color of a colorpicker.
- * @param cpicker pointer to colorpicker object
- * @return current selected color
- */
-lv_color_t lv_cpicker_get_color(lv_obj_t * cpicker);
-
-/**
- * Whether the indicator is colored to the current color or not
- * @param cpicker pointer to colorpicker object
- * @return true: color the indicator; false: not color the indicator
- */
-bool lv_cpicker_get_indic_colored(lv_obj_t * cpicker);
-
-/**
- * Whether the preview is enabled or not
- * @param cpicker pointer to colorpicker object
- * @return en true: preview is enabled; false: preview is disabled
- */
-bool lv_cpicker_get_preview(lv_obj_t * cpicker);
-
-/*=====================
- * Other functions
- *====================*/
-
-/**********************
- * MACROS
- **********************/
-
-#endif /*LV_USE_CPICKER*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_CPICKER_H*/
diff --git a/src/libs/lvgl/src/lv_objx/lv_ddlist.c b/src/libs/lvgl/src/lv_objx/lv_ddlist.c
deleted file mode 100644
index fb57cd2f..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_ddlist.c
+++ /dev/null
@@ -1,1032 +0,0 @@
-/**
- * @file lv_ddlist.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_ddlist.h"
-#if LV_USE_DDLIST != 0
-
-#include "../lv_core/lv_debug.h"
-#include "../lv_draw/lv_draw.h"
-#include "../lv_core/lv_group.h"
-#include "../lv_core/lv_indev.h"
-#include "../lv_themes/lv_theme.h"
-#include "../lv_font/lv_symbol_def.h"
-#include "../lv_misc/lv_anim.h"
-#include "../lv_misc/lv_math.h"
-#include <string.h>
-
-/*********************
- * DEFINES
- *********************/
-#define LV_OBJX_NAME "lv_ddlist"
-
-#if LV_USE_ANIMATION == 0
-#undef LV_DDLIST_DEF_ANIM_TIME
-#define LV_DDLIST_DEF_ANIM_TIME 0 /*No animation*/
-#endif
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static bool lv_ddlist_design(lv_obj_t * ddlist, const lv_area_t * mask, lv_design_mode_t mode);
-static lv_res_t lv_ddlist_signal(lv_obj_t * ddlist, lv_signal_t sign, void * param);
-static lv_res_t lv_ddlist_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void * param);
-static lv_res_t release_handler(lv_obj_t * ddlist);
-static void lv_ddlist_refr_size(lv_obj_t * ddlist, lv_anim_enable_t anim);
-static void lv_ddlist_pos_current_option(lv_obj_t * ddlist);
-static void lv_ddlist_refr_width(lv_obj_t * ddlist);
-#if LV_USE_ANIMATION
-static void lv_ddlist_anim_ready_cb(lv_anim_t * a);
-static void lv_ddlist_anim_finish(lv_obj_t * ddlist);
-static void lv_ddlist_adjust_height(lv_obj_t * ddlist, lv_anim_value_t height);
-#endif
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_signal_cb_t ancestor_signal;
-static lv_signal_cb_t ancestor_scrl_signal;
-static lv_design_cb_t ancestor_design;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Create a drop down list objects
- * @param par pointer to an object, it will be the parent of the new drop down list
- * @param copy pointer to a drop down list object, if not NULL then the new object will be copied
- * from it
- * @return pointer to the created drop down list
- */
-lv_obj_t * lv_ddlist_create(lv_obj_t * par, const lv_obj_t * copy)
-{
- LV_LOG_TRACE("drop down list create started");
-
- /*Create the ancestor drop down list*/
- lv_obj_t * new_ddlist = lv_page_create(par, copy);
- LV_ASSERT_MEM(new_ddlist);
- if(new_ddlist == NULL) return NULL;
-
- if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_ddlist);
- if(ancestor_scrl_signal == NULL) ancestor_scrl_signal = lv_obj_get_signal_cb(lv_page_get_scrl(new_ddlist));
- if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_cb(new_ddlist);
-
- /*Allocate the drop down list type specific extended data*/
- lv_ddlist_ext_t * ext = lv_obj_allocate_ext_attr(new_ddlist, sizeof(lv_ddlist_ext_t));
- LV_ASSERT_MEM(ext);
- if(ext == NULL) return NULL;
-
- /*Initialize the allocated 'ext' */
- ext->label = NULL;
- ext->opened = 0;
- ext->fix_height = 0;
- ext->sel_opt_id = 0;
- ext->sel_opt_id_ori = 0;
- ext->option_cnt = 0;
- ext->sel_style = &lv_style_plain_color;
- ext->draw_arrow = 0; /*Do not draw arrow by default*/
- ext->stay_open = 0;
-
- /*The signal and design functions are not copied so set them here*/
- lv_obj_set_signal_cb(new_ddlist, lv_ddlist_signal);
- lv_obj_set_signal_cb(lv_page_get_scrl(new_ddlist), lv_ddlist_scrl_signal);
- lv_obj_set_design_cb(new_ddlist, lv_ddlist_design);
-
- /*Init the new drop down list drop down list*/
- if(copy == NULL) {
- lv_page_set_anim_time(new_ddlist, LV_DDLIST_DEF_ANIM_TIME);
-
- lv_obj_t * scrl = lv_page_get_scrl(new_ddlist);
- lv_obj_set_drag(scrl, false);
- lv_page_set_scrl_fit2(new_ddlist, LV_FIT_FILL, LV_FIT_TIGHT);
-
- /*Save (a later restore) the original X coordinate because it changes as the FITs applies*/
- lv_coord_t x;
- if(lv_obj_get_base_dir(new_ddlist) == LV_BIDI_DIR_RTL) x = lv_obj_get_x(new_ddlist) + lv_obj_get_width(new_ddlist);
- else x = lv_obj_get_x(new_ddlist);
-
- ext->label = lv_label_create(new_ddlist, NULL);
- lv_cont_set_fit2(new_ddlist, LV_FIT_TIGHT, LV_FIT_NONE);
- lv_page_set_sb_mode(new_ddlist, LV_SB_MODE_HIDE);
- lv_page_set_style(new_ddlist, LV_PAGE_STYLE_SCRL, &lv_style_transp_tight);
-
- lv_ddlist_set_options(new_ddlist, "Option 1\nOption 2\nOption 3");
-
- /*Restore the original X coordinate*/
- if(lv_obj_get_base_dir(new_ddlist) == LV_BIDI_DIR_RTL) lv_obj_set_x(new_ddlist, x - lv_obj_get_width(new_ddlist));
- else lv_obj_set_x(new_ddlist, x);
-
- /*Set the default styles*/
- lv_theme_t * th = lv_theme_get_current();
- if(th) {
- lv_ddlist_set_style(new_ddlist, LV_DDLIST_STYLE_BG, th->style.ddlist.bg);
- lv_ddlist_set_style(new_ddlist, LV_DDLIST_STYLE_SEL, th->style.ddlist.sel);
- lv_ddlist_set_style(new_ddlist, LV_DDLIST_STYLE_SB, th->style.ddlist.sb);
- } else {
- lv_ddlist_set_style(new_ddlist, LV_DDLIST_STYLE_BG, &lv_style_pretty);
- lv_ddlist_set_style(new_ddlist, LV_DDLIST_STYLE_SEL, &lv_style_plain_color);
- lv_ddlist_set_style(new_ddlist, LV_DDLIST_STYLE_SB, &lv_style_pretty_color);
- }
-
-
- }
- /*Copy an existing drop down list*/
- else {
- lv_ddlist_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
- ext->label = lv_label_create(new_ddlist, copy_ext->label);
- lv_label_set_text(ext->label, lv_label_get_text(copy_ext->label));
- ext->sel_opt_id = copy_ext->sel_opt_id;
- ext->sel_opt_id_ori = copy_ext->sel_opt_id;
- ext->fix_height = copy_ext->fix_height;
- ext->option_cnt = copy_ext->option_cnt;
- ext->sel_style = copy_ext->sel_style;
- ext->draw_arrow = copy_ext->draw_arrow;
- ext->stay_open = copy_ext->stay_open;
-
- lv_ddlist_set_style(new_ddlist, LV_DDLIST_STYLE_BG, lv_ddlist_get_style(copy, LV_DDLIST_STYLE_BG));
- lv_ddlist_set_style(new_ddlist, LV_DDLIST_STYLE_SB, lv_ddlist_get_style(copy, LV_DDLIST_STYLE_SB));
- lv_ddlist_set_style(new_ddlist, LV_DDLIST_STYLE_SEL, lv_ddlist_get_style(copy, LV_DDLIST_STYLE_SEL));
-
- }
-
- LV_LOG_INFO("drop down list created");
-
- return new_ddlist;
-}
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set the options in a drop down list from a string
- * @param ddlist pointer to drop down list object
- * @param options a string with '\n' separated options. E.g. "One\nTwo\nThree"
- */
-void lv_ddlist_set_options(lv_obj_t * ddlist, const char * options)
-{
- LV_ASSERT_OBJ(ddlist, LV_OBJX_NAME);
- LV_ASSERT_STR(options);
-
- lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist);
-
- /*Count the '\n'-s to determine the number of options*/
- ext->option_cnt = 0;
- uint16_t i;
- for(i = 0; options[i] != '\0'; i++) {
- if(options[i] == '\n') ext->option_cnt++;
- }
- ext->option_cnt++; /*Last option has no `\n`*/
- ext->sel_opt_id = 0;
- ext->sel_opt_id_ori = 0;
-
- lv_label_set_text(ext->label, options);
-
- lv_ddlist_refr_width(ddlist);
-
- lv_label_align_t align = lv_label_get_align(ext->label);
- switch(align) {
- case LV_LABEL_ALIGN_LEFT: lv_obj_align(ext->label, NULL, LV_ALIGN_IN_LEFT_MID, 0, 0); break;
- case LV_LABEL_ALIGN_CENTER: lv_obj_align(ext->label, NULL, LV_ALIGN_CENTER, 0, 0); break;
- case LV_LABEL_ALIGN_RIGHT: lv_obj_align(ext->label, NULL, LV_ALIGN_IN_RIGHT_MID, 0, 0); break;
- }
-
- lv_ddlist_refr_size(ddlist, false);
-}
-
-/**
- * Set the selected option
- * @param ddlist pointer to drop down list object
- * @param sel_opt id of the selected option (0 ... number of option - 1);
- */
-void lv_ddlist_set_selected(lv_obj_t * ddlist, uint16_t sel_opt)
-{
- LV_ASSERT_OBJ(ddlist, LV_OBJX_NAME);
-
- lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist);
- if(ext->sel_opt_id == sel_opt) return;
-
- ext->sel_opt_id = sel_opt < ext->option_cnt ? sel_opt : ext->option_cnt - 1;
- ext->sel_opt_id_ori = ext->sel_opt_id;
- /*Move the list to show the current option*/
- if(ext->opened == 0) {
- lv_ddlist_pos_current_option(ddlist);
- } else {
- lv_obj_invalidate(ddlist);
- }
-}
-
-/**
- * Set a fix height for the drop down list
- * If 0 then the opened ddlist will be auto. sized else the set height will be applied.
- * @param ddlist pointer to a drop down list
- * @param h the height when the list is opened (0: auto size)
- */
-void lv_ddlist_set_fix_height(lv_obj_t * ddlist, lv_coord_t h)
-{
- LV_ASSERT_OBJ(ddlist, LV_OBJX_NAME);
-
- lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist);
- if(ext->fix_height == h) return;
-
- ext->fix_height = h;
-
- lv_ddlist_refr_size(ddlist, false);
-}
-
-/**
- * Set a fix width for the drop down list
- * @param ddlist pointer to a drop down list
- * @param w the width when the list is opened (0: auto size)
- */
-void lv_ddlist_set_fix_width(lv_obj_t * ddlist, lv_coord_t w)
-{
- LV_ASSERT_OBJ(ddlist, LV_OBJX_NAME);
-
- lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist);
- if(w == 0) {
- lv_cont_set_fit2(ddlist, LV_FIT_TIGHT, lv_cont_get_fit_bottom(ddlist));
- } else {
- lv_cont_set_fit2(ddlist, LV_FIT_NONE, lv_cont_get_fit_bottom(ddlist));
- lv_obj_set_width(ddlist, w);
- }
-
- switch(lv_label_get_align(ext->label)) {
- case LV_LABEL_ALIGN_LEFT: lv_obj_align(ext->label, NULL, LV_ALIGN_IN_LEFT_MID, 0, 0); break;
- case LV_LABEL_ALIGN_CENTER: lv_obj_align(ext->label, NULL, LV_ALIGN_CENTER, 0, 0); break;
- case LV_LABEL_ALIGN_RIGHT: lv_obj_align(ext->label, NULL, LV_ALIGN_IN_RIGHT_MID, 0, 0); break;
- }
-
- lv_ddlist_refr_size(ddlist, false);
-}
-
-/**
- * Set arrow draw in a drop down list
- * @param ddlist pointer to drop down list object
- * @param en enable/disable a arrow draw. E.g. "true" for draw.
- */
-void lv_ddlist_set_draw_arrow(lv_obj_t * ddlist, bool en)
-{
- LV_ASSERT_OBJ(ddlist, LV_OBJX_NAME);
-
- lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist);
-
- /*Set the flag*/
- ext->draw_arrow = en ? 1 : 0;
-}
-
-/**
- * Leave the list opened when a new value is selected
- * @param ddlist pointer to drop down list object
- * @param en enable/disable "stay open" feature
- */
-void lv_ddlist_set_stay_open(lv_obj_t * ddlist, bool en)
-{
- LV_ASSERT_OBJ(ddlist, LV_OBJX_NAME);
-
- lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist);
-
- /*Set the flag*/
- ext->stay_open = en ? 1 : 0;
-}
-
-/**
- * Set a style of a drop down list
- * @param ddlist pointer to a drop down list object
- * @param type which style should be set
- * @param style pointer to a style
- */
-void lv_ddlist_set_style(lv_obj_t * ddlist, lv_ddlist_style_t type, const lv_style_t * style)
-{
- LV_ASSERT_OBJ(ddlist, LV_OBJX_NAME);
-
- lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist);
-
- switch(type) {
- case LV_DDLIST_STYLE_BG:
- lv_page_set_style(ddlist, LV_PAGE_STYLE_BG, style);
- lv_ddlist_refr_width(ddlist);
- break;
- case LV_DDLIST_STYLE_SB: lv_page_set_style(ddlist, LV_PAGE_STYLE_SB, style); break;
- case LV_DDLIST_STYLE_SEL:
- ext->sel_style = style;
- lv_obj_t * scrl = lv_page_get_scrl(ddlist);
- lv_obj_refresh_ext_draw_pad(scrl); /*Because of the wider selected rectangle*/
- break;
- }
-}
-
-void lv_ddlist_set_align(lv_obj_t * ddlist, lv_label_align_t align)
-{
- LV_ASSERT_OBJ(ddlist, LV_OBJX_NAME);
-
- lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist);
-
- lv_label_set_align(ext->label, align);
- switch(align) {
- case LV_LABEL_ALIGN_LEFT: lv_obj_align(ext->label, NULL, LV_ALIGN_IN_LEFT_MID, 0, 0); break;
- case LV_LABEL_ALIGN_CENTER: lv_obj_align(ext->label, NULL, LV_ALIGN_CENTER, 0, 0); break;
- case LV_LABEL_ALIGN_RIGHT: lv_obj_align(ext->label, NULL, LV_ALIGN_IN_RIGHT_MID, 0, 0); break;
- }
-}
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the options of a drop down list
- * @param ddlist pointer to drop down list object
- * @return the options separated by '\n'-s (E.g. "Option1\nOption2\nOption3")
- */
-const char * lv_ddlist_get_options(const lv_obj_t * ddlist)
-{
- LV_ASSERT_OBJ(ddlist, LV_OBJX_NAME);
-
- lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist);
- return lv_label_get_text(ext->label);
-}
-
-/**
- * Get the selected option
- * @param ddlist pointer to drop down list object
- * @return id of the selected option (0 ... number of option - 1);
- */
-uint16_t lv_ddlist_get_selected(const lv_obj_t * ddlist)
-{
- LV_ASSERT_OBJ(ddlist, LV_OBJX_NAME);
-
- lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist);
-
- return ext->sel_opt_id;
-}
-
-/**
- * Get the current selected option as a string
- * @param ddlist pointer to ddlist object
- * @param buf pointer to an array to store the string
- * @param buf_size size of `buf` in bytes. 0: to ignore it.
- */
-void lv_ddlist_get_selected_str(const lv_obj_t * ddlist, char * buf, uint16_t buf_size)
-{
- LV_ASSERT_OBJ(ddlist, LV_OBJX_NAME);
-
- lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist);
-
- uint16_t i;
- uint16_t line = 0;
- const char * opt_txt = lv_label_get_text(ext->label);
- size_t txt_len = strlen(opt_txt);
-
- for(i = 0; i < txt_len && line != ext->sel_opt_id; i++) {
- if(opt_txt[i] == '\n') line++;
- }
-
- uint16_t c;
- for(c = 0; opt_txt[i] != '\n' && i < txt_len; c++, i++) {
- if(buf_size && c >= buf_size - 1) {
- LV_LOG_WARN("lv_ddlist_get_selected_str: the buffer was too small")
- break;
- }
- buf[c] = opt_txt[i];
- }
-
- buf[c] = '\0';
-}
-
-/**
- * Get the fix height value.
- * @param ddlist pointer to a drop down list object
- * @return the height if the ddlist is opened (0: auto size)
- */
-lv_coord_t lv_ddlist_get_fix_height(const lv_obj_t * ddlist)
-{
- LV_ASSERT_OBJ(ddlist, LV_OBJX_NAME);
-
- lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist);
- return ext->fix_height;
-}
-
-/**
- * Get arrow draw in a drop down list
- * @param ddlist pointer to drop down list object
- */
-bool lv_ddlist_get_draw_arrow(lv_obj_t * ddlist)
-{
- LV_ASSERT_OBJ(ddlist, LV_OBJX_NAME);
-
- lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist);
-
- return ext->draw_arrow ? true : false;
-}
-
-/**
- * Get whether the drop down list stay open after selecting a value or not
- * @param ddlist pointer to drop down list object
- */
-bool lv_ddlist_get_stay_open(lv_obj_t * ddlist)
-{
- LV_ASSERT_OBJ(ddlist, LV_OBJX_NAME);
-
- lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist);
-
- return ext->stay_open ? true : false;
-}
-
-/**
- * Get a style of a drop down list
- * @param ddlist pointer to a drop down list object
- * @param type which style should be get
- * @return style pointer to a style
- */
-const lv_style_t * lv_ddlist_get_style(const lv_obj_t * ddlist, lv_ddlist_style_t type)
-{
- LV_ASSERT_OBJ(ddlist, LV_OBJX_NAME);
-
- lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist);
-
- switch(type) {
- case LV_DDLIST_STYLE_BG: return lv_page_get_style(ddlist, LV_PAGE_STYLE_BG);
- case LV_DDLIST_STYLE_SB: return lv_page_get_style(ddlist, LV_PAGE_STYLE_SB);
- case LV_DDLIST_STYLE_SEL: return ext->sel_style;
- default: return NULL;
- }
-
- /*To avoid warning*/
- return NULL;
-}
-
-lv_label_align_t lv_ddlist_get_align(const lv_obj_t * ddlist)
-{
- lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist);
-
- return lv_label_get_align(ext->label);
-}
-
-/*=====================
- * Other functions
- *====================*/
-
-/**
- * Open the drop down list with or without animation
- * @param ddlist pointer to drop down list object
- * @param anim_en LV_ANIM_EN: use animation; LV_ANIM_OFF: not use animations
- */
-void lv_ddlist_open(lv_obj_t * ddlist, lv_anim_enable_t anim)
-{
-#if LV_USE_ANIMATION == 0
- anim = false;
-#endif
- lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist);
- ext->opened = 1;
- lv_obj_set_drag(lv_page_get_scrl(ddlist), true);
- lv_ddlist_refr_size(ddlist, anim);
-}
-
-/**
- * Close (Collapse) the drop down list
- * @param ddlist pointer to drop down list object
- * @param anim_en LV_ANIM_ON: use animation; LV_ANIM_OFF: not use animations
- */
-void lv_ddlist_close(lv_obj_t * ddlist, lv_anim_enable_t anim)
-{
-#if LV_USE_ANIMATION == 0
- anim = false;
-#endif
- lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist);
- ext->opened = 0;
- lv_obj_set_drag(lv_page_get_scrl(ddlist), false);
- lv_ddlist_refr_size(ddlist, anim);
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Get the text alignment flag for a drop down list.
- * @param ddlist drop down list
- * @return text alignment flag
- */
-static lv_txt_flag_t lv_ddlist_get_txt_flag(const lv_obj_t * ddlist)
-{
- lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist);
-
- /*The label might be already deleted so just return with some value*/
- if(!ext->label) return LV_TXT_FLAG_CENTER;
-
- lv_label_align_t align = lv_label_get_align(ext->label);
-
- switch(align) {
- default:
- case LV_LABEL_ALIGN_LEFT: return LV_TXT_FLAG_NONE;
- case LV_LABEL_ALIGN_CENTER: return LV_TXT_FLAG_CENTER;
- case LV_LABEL_ALIGN_RIGHT: return LV_TXT_FLAG_RIGHT;
- }
-}
-
-/**
- * Handle the drawing related tasks of the drop down lists
- * @param ddlist pointer to an object
- * @param mask the object will be drawn only in this area
- * @param mode LV_DESIGN_COVER_CHK: only check if the object fully covers the 'mask_p' area
- * (return 'true' if yes)
- * LV_DESIGN_DRAW: draw the object (always return 'true')
- * LV_DESIGN_DRAW_POST: drawing after every children are drawn
- * @param return true/false, depends on 'mode'
- */
-static bool lv_ddlist_design(lv_obj_t * ddlist, const lv_area_t * mask, lv_design_mode_t mode)
-{
- /*Return false if the object is not covers the mask_p area*/
- if(mode == LV_DESIGN_COVER_CHK) {
- return ancestor_design(ddlist, mask, mode);
- }
- /*Draw the object*/
- else if(mode == LV_DESIGN_DRAW_MAIN) {
- ancestor_design(ddlist, mask, mode);
-
- lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist);
- lv_opa_t opa_scale = lv_obj_get_opa_scale(ddlist);
- /*If the list is opened draw a rectangle under the selected item*/
- if(ext->opened != 0 || ext->force_sel) {
- const lv_style_t * style = lv_ddlist_get_style(ddlist, LV_DDLIST_STYLE_BG);
- const lv_font_t * font = style->text.font;
- lv_coord_t font_h = lv_font_get_line_height(font);
-
- /*Draw the selected*/
- lv_area_t rect_area;
- rect_area.y1 = ext->label->coords.y1;
- rect_area.y1 += ext->sel_opt_id * (font_h + style->text.line_space);
- rect_area.y1 -= style->text.line_space / 2;
-
- rect_area.y2 = rect_area.y1 + font_h + style->text.line_space - 1;
- rect_area.x1 = ddlist->coords.x1;
- rect_area.x2 = ddlist->coords.x2;
-
- lv_draw_rect(&rect_area, mask, ext->sel_style, opa_scale);
- }
- }
- /*Post draw when the children are drawn*/
- else if(mode == LV_DESIGN_DRAW_POST) {
- /*Redraw the text on the selected area with a different color*/
- lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist);
- lv_opa_t opa_scale = lv_obj_get_opa_scale(ddlist);
-
- /*Redraw only in opened state*/
- if(ext->opened || ext->force_sel) {
- const lv_style_t * style = lv_ddlist_get_style(ddlist, LV_DDLIST_STYLE_BG);
- const lv_font_t * font = style->text.font;
- lv_coord_t font_h = lv_font_get_line_height(font);
-
- lv_area_t area_sel;
- area_sel.y1 = ext->label->coords.y1;
- area_sel.y1 += ext->sel_opt_id * (font_h + style->text.line_space);
- area_sel.y1 -= style->text.line_space / 2;
-
- area_sel.y2 = area_sel.y1 + font_h + style->text.line_space - 1;
- area_sel.x1 = ddlist->coords.x1;
- area_sel.x2 = ddlist->coords.x2;
- lv_area_t mask_sel;
- bool area_ok;
- area_ok = lv_area_intersect(&mask_sel, mask, &area_sel);
- if(area_ok) {
- const lv_style_t * sel_style = lv_ddlist_get_style(ddlist, LV_DDLIST_STYLE_SEL);
- lv_style_t new_style;
- lv_style_copy(&new_style, style);
- new_style.text.color = sel_style->text.color;
- new_style.text.opa = sel_style->text.opa;
- lv_txt_flag_t flag = lv_ddlist_get_txt_flag(ddlist);
- lv_draw_label(&ext->label->coords, &mask_sel, &new_style, opa_scale, lv_label_get_text(ext->label),
- flag, NULL, NULL, NULL, lv_obj_get_base_dir(ddlist));
- }
- }
-
- /*Add a down symbol in ddlist when closed*/
- else {
- /*Draw a arrow in ddlist if enabled*/
- if(ext->draw_arrow) {
- const lv_style_t * style = lv_ddlist_get_style(ddlist, LV_DDLIST_STYLE_BG);
- const lv_font_t * font = style->text.font;
- const lv_style_t * sel_style = lv_ddlist_get_style(ddlist, LV_DDLIST_STYLE_BG);
- lv_coord_t font_h = lv_font_get_line_height(font);
- lv_style_t new_style;
- lv_style_copy(&new_style, style);
- new_style.text.color = sel_style->text.color;
- new_style.text.opa = sel_style->text.opa;
- lv_area_t area_arrow;
- lv_coord_t arrow_width = lv_txt_get_width(LV_SYMBOL_DOWN, (uint16_t)strlen(LV_SYMBOL_DOWN), sel_style->text.font, 0, 0);
- if(lv_label_get_align(ext->label) != LV_LABEL_ALIGN_RIGHT) {
- area_arrow.x2 = ddlist->coords.x2 - style->body.padding.right;
- area_arrow.x1 = area_arrow.x2 - arrow_width;
- } else {
- area_arrow.x1 = ddlist->coords.x1 + style->body.padding.left;
- area_arrow.x2 = area_arrow.x1 + arrow_width;
- }
-
- area_arrow.y1 = ddlist->coords.y1 + style->text.line_space;
- area_arrow.y2 = area_arrow.y1 + font_h;
-
- lv_area_t mask_arrow;
- bool area_ok;
- area_ok = lv_area_intersect(&mask_arrow, mask, &area_arrow);
- if(area_ok) {
- /*Use a down arrow in ddlist, you can replace it with yourcustom symbol*/
- lv_draw_label(&area_arrow, &mask_arrow, &new_style, opa_scale, LV_SYMBOL_DOWN, LV_TXT_FLAG_NONE,
- NULL, NULL, NULL, lv_obj_get_base_dir(ddlist));
- }
- }
- }
- /*Draw the scrollbar in the ancestor page design function*/
- ancestor_design(ddlist, mask, mode);
- }
-
- return true;
-}
-
-/**
- * Signal function of the drop down list
- * @param ddlist pointer to a drop down list object
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_ddlist_signal(lv_obj_t * ddlist, lv_signal_t sign, void * param)
-{
- lv_res_t res;
- /* Include the ancient signal function */
- res = ancestor_signal(ddlist, sign, param);
- if(res != LV_RES_OK) return res;
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);
-
- lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist);
-
- if(sign == LV_SIGNAL_STYLE_CHG) {
- lv_ddlist_refr_size(ddlist, 0);
- } else if(sign == LV_SIGNAL_BASE_DIR_CHG) {
- lv_label_align_t align = lv_label_get_align(ext->label);
- switch(align) {
- case LV_LABEL_ALIGN_LEFT: lv_obj_align(ext->label, NULL, LV_ALIGN_IN_LEFT_MID, 0, 0); break;
- case LV_LABEL_ALIGN_CENTER: lv_obj_align(ext->label, NULL, LV_ALIGN_CENTER, 0, 0); break;
- case LV_LABEL_ALIGN_RIGHT: lv_obj_align(ext->label, NULL, LV_ALIGN_IN_RIGHT_MID, 0, 0); break;
- }
-
- lv_ddlist_refr_size(ddlist, 0);
- } else if(sign == LV_SIGNAL_CLEANUP) {
- ext->label = NULL;
- } else if(sign == LV_SIGNAL_FOCUS) {
-#if LV_USE_GROUP
- lv_group_t * g = lv_obj_get_group(ddlist);
- bool editing = lv_group_get_editing(g);
- lv_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act());
-
- /*Encoders need special handling*/
- if(indev_type == LV_INDEV_TYPE_ENCODER) {
- /*Open the list if editing*/
- if(editing) {
- ext->opened = true;
- ext->sel_opt_id_ori = ext->sel_opt_id;
- lv_ddlist_refr_size(ddlist, true);
- }
- /*Close the lift if navigating*/
- else {
- ext->opened = false;
- ext->sel_opt_id = ext->sel_opt_id_ori;
- lv_ddlist_refr_size(ddlist, true);
- }
- } else {
- /*Open the list if closed*/
- if(!ext->opened) {
- ext->opened = true;
- ext->sel_opt_id_ori = ext->sel_opt_id; /*Save the current value. Used to revert this
- state if ENER wont't be pressed*/
- lv_ddlist_refr_size(ddlist, true);
- }
- }
-#endif
- } else if(sign == LV_SIGNAL_RELEASED) {
- release_handler(ddlist);
- } else if(sign == LV_SIGNAL_DEFOCUS) {
- if(ext->opened) {
- ext->opened = false;
- ext->sel_opt_id = ext->sel_opt_id_ori;
- lv_ddlist_refr_size(ddlist, true);
- }
- } else if(sign == LV_SIGNAL_CONTROL) {
- char c = *((char *)param);
- if(c == LV_KEY_RIGHT || c == LV_KEY_DOWN) {
- if(!ext->opened) {
- ext->opened = 1;
- lv_ddlist_refr_size(ddlist, true);
- }
-
- if(ext->sel_opt_id + 1 < ext->option_cnt) {
- ext->sel_opt_id++;
- lv_ddlist_pos_current_option(ddlist);
- lv_obj_invalidate(ddlist);
- }
- } else if(c == LV_KEY_LEFT || c == LV_KEY_UP) {
- if(!ext->opened) {
- ext->opened = 1;
- lv_ddlist_refr_size(ddlist, true);
- }
- if(ext->sel_opt_id > 0) {
- ext->sel_opt_id--;
- lv_ddlist_pos_current_option(ddlist);
- lv_obj_invalidate(ddlist);
- }
- } else if(c == LV_KEY_ESC) {
- if(ext->opened) {
- ext->opened = 0;
- ext->sel_opt_id = ext->sel_opt_id_ori;
- lv_ddlist_refr_size(ddlist, true);
- }
- }
- } else if(sign == LV_SIGNAL_GET_EDITABLE) {
- bool * editable = (bool *)param;
- *editable = true;
- }
-
- return res;
-}
-
-/**
- * Signal function of the drop down list's scrollable part
- * @param scrl pointer to a drop down list's scrollable part
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_ddlist_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void * param)
-{
- lv_res_t res;
-
- /* Include the ancient signal function */
- res = ancestor_scrl_signal(scrl, sign, param);
- if(res != LV_RES_OK) return res;
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, "");
-
- lv_obj_t * ddlist = lv_obj_get_parent(scrl);
-
- if(sign == LV_SIGNAL_REFR_EXT_DRAW_PAD) {
- /*TODO review this*/
- /* Because of the wider selected rectangle ext. size
- * In this way by dragging the scrollable part the wider rectangle area can be redrawn too*/
- const lv_style_t * style = lv_ddlist_get_style(ddlist, LV_DDLIST_STYLE_BG);
- lv_coord_t hpad = LV_MATH_MAX(style->body.padding.left, style->body.padding.right);
- if(scrl->ext_draw_pad < hpad) scrl->ext_draw_pad = hpad;
- } else if(sign == LV_SIGNAL_RELEASED) {
- if(lv_indev_is_dragging(lv_indev_get_act()) == false) {
- release_handler(ddlist);
- }
- } else if(sign == LV_SIGNAL_CLEANUP) {
- lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist);
- ext->label = NULL; /*The label is already deleted*/
- }
-
- return res;
-}
-
-/**
- * Called when a drop down list is released to open it or set new option
- * @param ddlist pointer to a drop down list object
- * @return LV_ACTION_RES_INV if the ddlist it deleted in the user callback else LV_ACTION_RES_OK
- */
-static lv_res_t release_handler(lv_obj_t * ddlist)
-{
- lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist);
-
- /*Only deal with clickable drop down lists*/
- if(!lv_obj_get_click(ddlist))
- return LV_RES_OK;
-
- if(ext->opened == 0) { /*Open the list*/
- ext->opened = 1;
- lv_obj_set_drag(lv_page_get_scrl(ddlist), true);
- lv_ddlist_refr_size(ddlist, true);
- } else {
-
- lv_indev_t * indev = lv_indev_get_act();
-#if LV_USE_GROUP
- /*Leave edit mode once a new item is selected*/
- if(lv_indev_get_type(indev) == LV_INDEV_TYPE_ENCODER) {
- ext->sel_opt_id_ori = ext->sel_opt_id;
- lv_group_t * g = lv_obj_get_group(ddlist);
- if(lv_group_get_editing(g)) {
- lv_group_set_editing(g, false);
- }
- }
-#endif
-
- /*Search the clicked option (For KEYPAD and ENCODER the new value should be already set)*/
- if(lv_indev_get_type(indev) == LV_INDEV_TYPE_POINTER || lv_indev_get_type(indev) == LV_INDEV_TYPE_BUTTON) {
- lv_point_t p;
- lv_indev_get_point(indev, &p);
- p.y -= ext->label->coords.y1;
- p.x -= ext->label->coords.x1;
- uint16_t letter_i;
- letter_i = lv_label_get_letter_on(ext->label, &p);
-
- uint16_t new_opt = 0;
- const char * txt = lv_label_get_text(ext->label);
- uint32_t i = 0;
- uint32_t i_prev = 0;
-
- uint32_t letter_cnt = 0;
- uint32_t letter;
- for(letter_cnt = 0; letter_cnt < letter_i; letter_cnt++) {
- letter = lv_txt_encoded_next(txt, &i);
- /*Count he lines to reach the clicked letter. But ignore the last '\n' because it
- * still belongs to the clicked line*/
- if(letter == '\n' && i_prev != letter_i) new_opt++;
- i_prev = i;
- }
-
- ext->sel_opt_id = new_opt;
- ext->sel_opt_id_ori = ext->sel_opt_id;
- }
-
- uint32_t id = ext->sel_opt_id; /*Just to use uint32_t in event data*/
- lv_res_t res = lv_event_send(ddlist, LV_EVENT_VALUE_CHANGED, &id);
- if(res != LV_RES_OK) return res;
-
- if(ext->stay_open == 0) {
- ext->opened = 0;
- lv_obj_set_drag(lv_page_get_scrl(ddlist), false);
- lv_ddlist_refr_size(ddlist, true);
- } else {
- lv_obj_invalidate(ddlist);
- }
- }
-
- return LV_RES_OK;
-}
-
-/**
- * Refresh the size of drop down list according to its status (open or closed)
- * @param ddlist pointer to a drop down list object
- * @param anim Change the size (open/close) with or without animation (true/false)
- */
-static void lv_ddlist_refr_size(lv_obj_t * ddlist, lv_anim_enable_t anim)
-{
-#if LV_USE_ANIMATION == 0
- anim = false;
-#endif
- lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist);
- const lv_style_t * style = lv_obj_get_style(ddlist);
- lv_coord_t new_height;
-
- /*Open the list*/
- if(ext->opened) {
- if(ext->fix_height == 0) {
- new_height =
- lv_obj_get_height(lv_page_get_scrl(ddlist)) + style->body.padding.top + style->body.padding.bottom;
- } else {
- new_height = ext->fix_height;
- }
-
- }
- /*Close the list*/
- else {
- const lv_font_t * font = style->text.font;
- const lv_style_t * label_style = lv_obj_get_style(ext->label);
- lv_coord_t font_h = lv_font_get_line_height(font);
- new_height = font_h + 2 * label_style->text.line_space;
-
- lv_page_set_sb_mode(ddlist, LV_SB_MODE_HIDE);
- }
-
- if(anim == LV_ANIM_OFF) {
- lv_obj_set_height(ddlist, new_height);
- lv_ddlist_pos_current_option(ddlist);
- if(ext->opened) lv_page_set_sb_mode(ddlist, LV_SB_MODE_UNHIDE);
-#if LV_USE_ANIMATION
- lv_anim_del(ddlist, (lv_anim_exec_xcb_t)lv_ddlist_adjust_height); /*If an animation is in progress then
- it will overwrite this changes*/
-
- /*Force animation complete to fix highlight selection*/
- lv_ddlist_anim_finish(ddlist);
- } else {
- /*Run the animation only if the the size will be different*/
- if(lv_obj_get_height(ddlist) != new_height) {
- lv_anim_t a;
- a.var = ddlist;
- a.start = lv_obj_get_height(ddlist);
- a.end = new_height;
- a.exec_cb = (lv_anim_exec_xcb_t)lv_ddlist_adjust_height;
- a.path_cb = lv_anim_path_linear;
- a.ready_cb = lv_ddlist_anim_ready_cb;
- a.act_time = 0;
- a.time = lv_ddlist_get_anim_time(ddlist);
- a.playback = 0;
- a.playback_pause = 0;
- a.repeat = 0;
- a.repeat_pause = 0;
-
- ext->force_sel = 1; /*Keep the list item selected*/
- lv_anim_create(&a);
- }
-#endif
- }
-}
-
-#if LV_USE_ANIMATION
-/**
- * Position the list and remove the selection highlight if it's closed.
- * Called at end of list animation.
- * @param a pointer to the animation
- */
-static void lv_ddlist_anim_ready_cb(lv_anim_t * a)
-{
- lv_obj_t * ddlist = a->var;
- lv_ddlist_anim_finish(ddlist);
-}
-
-/**
- * Clean up after the open animation
- * @param ddlist
- */
-static void lv_ddlist_anim_finish(lv_obj_t * ddlist)
-{
- lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist);
-
- lv_ddlist_pos_current_option(ddlist);
- ext->force_sel = 0; /*Turn off drawing of selection*/
- if(ext->opened) lv_page_set_sb_mode(ddlist, LV_SB_MODE_UNHIDE);
-}
-
-/**
- * Adjusts the ddlist's height and then positions the option within it's new height.
- * This keeps the option visible during animation.
- * @param ddlist Drop down list object
- * @param height New drop down list height
- */
-static void lv_ddlist_adjust_height(lv_obj_t * ddlist, lv_anim_value_t height)
-{
- lv_obj_set_height(ddlist, height);
- lv_ddlist_pos_current_option(ddlist);
-}
-#endif
-
-/**
- * Set the position of list when it is closed to show the selected item
- * @param ddlist pointer to a drop down list
- */
-static void lv_ddlist_pos_current_option(lv_obj_t * ddlist)
-{
- lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist);
- const lv_style_t * style = lv_obj_get_style(ddlist);
- const lv_font_t * font = style->text.font;
- lv_coord_t font_h = lv_font_get_line_height(font);
- const lv_style_t * label_style = lv_obj_get_style(ext->label);
- lv_obj_t * scrl = lv_page_get_scrl(ddlist);
-
- lv_coord_t h = lv_obj_get_height(ddlist);
- lv_coord_t line_y1 =
- ext->sel_opt_id * (font_h + label_style->text.line_space) + ext->label->coords.y1 - scrl->coords.y1;
-
- lv_obj_set_y(scrl, -line_y1 + (h - font_h) / 2);
- lv_obj_invalidate(ddlist);
-}
-
-/**
- * Be sure the width of the scrollable exactly fits the ddlist
- * @param ddlist pointer to a ddlist
- */
-static void lv_ddlist_refr_width(lv_obj_t * ddlist)
-{
- lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist);
-
- /*Save the current x coordinate because it should be kept after the refrsh*/
- lv_coord_t x;
- if(lv_obj_get_base_dir(ddlist) == LV_BIDI_DIR_RTL) x = lv_obj_get_x(ddlist) + lv_obj_get_width(ddlist);
- else x = lv_obj_get_x(ddlist);
-
- /*Set the TIGHT fit horizontally the set the width to the content*/
- lv_page_set_scrl_fit2(ddlist, LV_FIT_TIGHT, lv_page_get_scrl_fit_bottom(ddlist));
-
- /*Revert FILL fit to fill the parent with the options area. It allows to RIGHT/CENTER align the text*/
- lv_page_set_scrl_fit2(ddlist, LV_FIT_FILL, lv_page_get_scrl_fit_bottom(ddlist));
-
- if(lv_obj_get_base_dir(ddlist) == LV_BIDI_DIR_RTL) lv_obj_set_x(ddlist, x - lv_obj_get_width(ddlist));
- else lv_obj_set_x(ddlist, x);
-
- switch(lv_label_get_align(ext->label)) {
- case LV_LABEL_ALIGN_LEFT: lv_obj_align(ext->label, NULL, LV_ALIGN_IN_LEFT_MID, 0, 0); break;
- case LV_LABEL_ALIGN_CENTER: lv_obj_align(ext->label, NULL, LV_ALIGN_CENTER, 0, 0); break;
- case LV_LABEL_ALIGN_RIGHT: lv_obj_align(ext->label, NULL, LV_ALIGN_IN_RIGHT_MID, 0, 0); break;
- }
-}
-
-#endif
diff --git a/src/libs/lvgl/src/lv_objx/lv_ddlist.h b/src/libs/lvgl/src/lv_objx/lv_ddlist.h
deleted file mode 100644
index ee6c1f70..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_ddlist.h
+++ /dev/null
@@ -1,269 +0,0 @@
-/**
- * @file lv_ddlist.h
- *
- */
-
-#ifndef LV_DDLIST_H
-#define LV_DDLIST_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_DDLIST != 0
-
-/*Testing of dependencies*/
-#if LV_USE_PAGE == 0
-#error "lv_ddlist: lv_page is required. Enable it in lv_conf.h (LV_USE_PAGE 1) "
-#endif
-
-#if LV_USE_LABEL == 0
-#error "lv_ddlist: lv_label is required. Enable it in lv_conf.h (LV_USE_LABEL 1) "
-#endif
-
-#include "../lv_core/lv_obj.h"
-#include "../lv_objx/lv_page.h"
-#include "../lv_objx/lv_label.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-/*Data of drop down list*/
-typedef struct
-{
- lv_page_ext_t page; /*Ext. of ancestor*/
- /*New data for this type */
- lv_obj_t * label; /*Label for the options*/
- const lv_style_t * sel_style; /*Style of the selected option*/
- uint16_t option_cnt; /*Number of options*/
- uint16_t sel_opt_id; /*Index of the current option*/
- uint16_t sel_opt_id_ori; /*Store the original index on focus*/
- uint8_t opened : 1; /*1: The list is opened (handled by the library)*/
- uint8_t force_sel : 1; /*1: Keep the selection highlight even if the list is closed*/
- uint8_t draw_arrow : 1; /*1: Draw arrow*/
- uint8_t stay_open : 1; /*1: Don't close the list when a new item is selected*/
- lv_coord_t fix_height; /*Height of the ddlist when opened. (0: auto-size)*/
-} lv_ddlist_ext_t;
-
-enum {
- LV_DDLIST_STYLE_BG,
- LV_DDLIST_STYLE_SEL,
- LV_DDLIST_STYLE_SB,
-};
-typedef uint8_t lv_ddlist_style_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-/**
- * Create a drop down list objects
- * @param par pointer to an object, it will be the parent of the new drop down list
- * @param copy pointer to a drop down list object, if not NULL then the new object will be copied
- * from it
- * @return pointer to the created drop down list
- */
-lv_obj_t * lv_ddlist_create(lv_obj_t * par, const lv_obj_t * copy);
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set the options in a drop down list from a string
- * @param ddlist pointer to drop down list object
- * @param options a string with '\n' separated options. E.g. "One\nTwo\nThree"
- */
-void lv_ddlist_set_options(lv_obj_t * ddlist, const char * options);
-
-/**
- * Set the selected option
- * @param ddlist pointer to drop down list object
- * @param sel_opt id of the selected option (0 ... number of option - 1);
- */
-void lv_ddlist_set_selected(lv_obj_t * ddlist, uint16_t sel_opt);
-
-/**
- * Set a fix height for the drop down list
- * If 0 then the opened ddlist will be auto. sized else the set height will be applied.
- * @param ddlist pointer to a drop down list
- * @param h the height when the list is opened (0: auto size)
- */
-void lv_ddlist_set_fix_height(lv_obj_t * ddlist, lv_coord_t h);
-
-/**
- * Set a fix width for the drop down list
- * @param ddlist pointer to a drop down list
- * @param w the width when the list is opened (0: auto size)
- */
-void lv_ddlist_set_fix_width(lv_obj_t * ddlist, lv_coord_t w);
-
-/**
- * Set arrow draw in a drop down list
- * @param ddlist pointer to drop down list object
- * @param en enable/disable a arrow draw. E.g. "true" for draw.
- */
-void lv_ddlist_set_draw_arrow(lv_obj_t * ddlist, bool en);
-
-/**
- * Leave the list opened when a new value is selected
- * @param ddlist pointer to drop down list object
- * @param en enable/disable "stay open" feature
- */
-void lv_ddlist_set_stay_open(lv_obj_t * ddlist, bool en);
-
-/**
- * Set the scroll bar mode of a drop down list
- * @param ddlist pointer to a drop down list object
- * @param sb_mode the new mode from 'lv_page_sb_mode_t' enum
- */
-static inline void lv_ddlist_set_sb_mode(lv_obj_t * ddlist, lv_sb_mode_t mode)
-{
- lv_page_set_sb_mode(ddlist, mode);
-}
-/**
- * Set the open/close animation time.
- * @param ddlist pointer to a drop down list
- * @param anim_time: open/close animation time [ms]
- */
-static inline void lv_ddlist_set_anim_time(lv_obj_t * ddlist, uint16_t anim_time)
-{
- lv_page_set_anim_time(ddlist, anim_time);
-}
-
-/**
- * Set a style of a drop down list
- * @param ddlist pointer to a drop down list object
- * @param type which style should be set
- * @param style pointer to a style
- * */
-void lv_ddlist_set_style(lv_obj_t * ddlist, lv_ddlist_style_t type, const lv_style_t * style);
-
-/**
- * Set the alignment of the labels in a drop down list
- * @param ddlist pointer to a drop down list object
- * @param align alignment of labels
- */
-void lv_ddlist_set_align(lv_obj_t * ddlist, lv_label_align_t align);
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the options of a drop down list
- * @param ddlist pointer to drop down list object
- * @return the options separated by '\n'-s (E.g. "Option1\nOption2\nOption3")
- */
-const char * lv_ddlist_get_options(const lv_obj_t * ddlist);
-
-/**
- * Get the selected option
- * @param ddlist pointer to drop down list object
- * @return id of the selected option (0 ... number of option - 1);
- */
-uint16_t lv_ddlist_get_selected(const lv_obj_t * ddlist);
-
-/**
- * Get the current selected option as a string
- * @param ddlist pointer to ddlist object
- * @param buf pointer to an array to store the string
- * @param buf_size size of `buf` in bytes. 0: to ignore it.
- */
-void lv_ddlist_get_selected_str(const lv_obj_t * ddlist, char * buf, uint16_t buf_size);
-
-/**
- * Get the fix height value.
- * @param ddlist pointer to a drop down list object
- * @return the height if the ddlist is opened (0: auto size)
- */
-lv_coord_t lv_ddlist_get_fix_height(const lv_obj_t * ddlist);
-
-/**
- * Get arrow draw in a drop down list
- * @param ddlist pointer to drop down list object
- */
-bool lv_ddlist_get_draw_arrow(lv_obj_t * ddlist);
-
-/**
- * Get whether the drop down list stay open after selecting a value or not
- * @param ddlist pointer to drop down list object
- */
-bool lv_ddlist_get_stay_open(lv_obj_t * ddlist);
-
-/**
- * Get the scroll bar mode of a drop down list
- * @param ddlist pointer to a drop down list object
- * @return scrollbar mode from 'lv_page_sb_mode_t' enum
- */
-static inline lv_sb_mode_t lv_ddlist_get_sb_mode(const lv_obj_t * ddlist)
-{
- return lv_page_get_sb_mode(ddlist);
-}
-
-/**
- * Get the open/close animation time.
- * @param ddlist pointer to a drop down list
- * @return open/close animation time [ms]
- */
-static inline uint16_t lv_ddlist_get_anim_time(const lv_obj_t * ddlist)
-{
- return lv_page_get_anim_time(ddlist);
-}
-
-/**
- * Get a style of a drop down list
- * @param ddlist pointer to a drop down list object
- * @param type which style should be get
- * @return style pointer to a style
- */
-const lv_style_t * lv_ddlist_get_style(const lv_obj_t * ddlist, lv_ddlist_style_t type);
-
-/**
- * Get the alignment of the labels in a drop down list
- * @param ddlist pointer to a drop down list object
- * @return alignment of labels
- */
-lv_label_align_t lv_ddlist_get_align(const lv_obj_t * ddlist);
-
-/*=====================
- * Other functions
- *====================*/
-
-/**
- * Open the drop down list with or without animation
- * @param ddlist pointer to drop down list object
- * @param anim_en LV_ANIM_ON: use animation; LV_ANOM_OFF: not use animations
- */
-void lv_ddlist_open(lv_obj_t * ddlist, lv_anim_enable_t anim);
-
-/**
- * Close (Collapse) the drop down list
- * @param ddlist pointer to drop down list object
- * @param anim_en LV_ANIM_ON: use animation; LV_ANOM_OFF: not use animations
- */
-void lv_ddlist_close(lv_obj_t * ddlist, lv_anim_enable_t anim);
-
-/**********************
- * MACROS
- **********************/
-
-#endif /*LV_USE_DDLIST*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_DDLIST_H*/
diff --git a/src/libs/lvgl/src/lv_objx/lv_gauge.c b/src/libs/lvgl/src/lv_objx/lv_gauge.c
deleted file mode 100644
index 7191d832..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_gauge.c
+++ /dev/null
@@ -1,473 +0,0 @@
-/**
- * @file lv_gauge.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_gauge.h"
-#if LV_USE_GAUGE != 0
-
-#include "../lv_core/lv_debug.h"
-#include "../lv_draw/lv_draw.h"
-#include "../lv_themes/lv_theme.h"
-#include "../lv_misc/lv_txt.h"
-#include "../lv_misc/lv_math.h"
-#include "../lv_misc/lv_utils.h"
-#include <stdio.h>
-#include <string.h>
-
-/*********************
- * DEFINES
- *********************/
-#define LV_OBJX_NAME "lv_gauge"
-
-#define LV_GAUGE_DEF_NEEDLE_COLOR LV_COLOR_RED
-#define LV_GAUGE_DEF_LABEL_COUNT 6
-#define LV_GAUGE_DEF_LINE_COUNT 21 /*Should be: ((label_cnt - 1) * internal_lines) + 1*/
-#define LV_GAUGE_DEF_ANGLE 220
-#define LV_GAUGE_INTERPOLATE_SHIFT 5 /*Interpolate the needle drawing between to degrees*/
-#define LV_GAUGE_INTERPOLATE_MASK 0x1F
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static bool lv_gauge_design(lv_obj_t * gauge, const lv_area_t * mask, lv_design_mode_t mode);
-static lv_res_t lv_gauge_signal(lv_obj_t * gauge, lv_signal_t sign, void * param);
-static void lv_gauge_draw_scale(lv_obj_t * gauge, const lv_area_t * mask);
-static void lv_gauge_draw_needle(lv_obj_t * gauge, const lv_area_t * mask);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_design_cb_t ancestor_design;
-static lv_signal_cb_t ancestor_signal;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Create a gauge objects
- * @param par pointer to an object, it will be the parent of the new gauge
- * @param copy pointer to a gauge object, if not NULL then the new object will be copied from it
- * @return pointer to the created gauge
- */
-lv_obj_t * lv_gauge_create(lv_obj_t * par, const lv_obj_t * copy)
-{
- LV_LOG_TRACE("gauge create started");
-
- /*Create the ancestor gauge*/
- lv_obj_t * new_gauge = lv_lmeter_create(par, copy);
- LV_ASSERT_MEM(new_gauge);
- if(new_gauge == NULL) return NULL;
-
- /*Allocate the gauge type specific extended data*/
- lv_gauge_ext_t * ext = lv_obj_allocate_ext_attr(new_gauge, sizeof(lv_gauge_ext_t));
- LV_ASSERT_MEM(ext);
- if(ext == NULL) return NULL;
-
- /*Initialize the allocated 'ext' */
- ext->needle_count = 0;
- ext->values = NULL;
- ext->needle_colors = NULL;
- ext->label_count = LV_GAUGE_DEF_LABEL_COUNT;
- if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_gauge);
- if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_cb(new_gauge);
-
- /*The signal and design functions are not copied so set them here*/
- lv_obj_set_signal_cb(new_gauge, lv_gauge_signal);
- lv_obj_set_design_cb(new_gauge, lv_gauge_design);
-
- /*Init the new gauge gauge*/
- if(copy == NULL) {
- lv_gauge_set_scale(new_gauge, LV_GAUGE_DEF_ANGLE, LV_GAUGE_DEF_LINE_COUNT, LV_GAUGE_DEF_LABEL_COUNT);
- lv_gauge_set_needle_count(new_gauge, 1, NULL);
- lv_gauge_set_critical_value(new_gauge, 80);
- lv_obj_set_size(new_gauge, 2 * LV_DPI, 2 * LV_DPI);
-
- /*Set the default styles*/
- lv_theme_t * th = lv_theme_get_current();
- if(th) {
- lv_gauge_set_style(new_gauge, LV_GAUGE_STYLE_MAIN, th->style.gauge);
- } else {
- lv_gauge_set_style(new_gauge, LV_GAUGE_STYLE_MAIN, &lv_style_pretty_color);
- }
- }
- /*Copy an existing gauge*/
- else {
- lv_gauge_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
- lv_gauge_set_needle_count(new_gauge, copy_ext->needle_count, copy_ext->needle_colors);
-
- uint8_t i;
- for(i = 0; i < ext->needle_count; i++) {
- ext->values[i] = copy_ext->values[i];
- }
- ext->label_count = copy_ext->label_count;
- /*Refresh the style with new signal function*/
- lv_obj_refresh_style(new_gauge);
- }
-
- LV_LOG_INFO("gauge created");
-
- return new_gauge;
-}
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set the number of needles
- * @param gauge pointer to gauge object
- * @param needle_cnt new count of needles
- * @param colors an array of colors for needles (with 'num' elements)
- */
-void lv_gauge_set_needle_count(lv_obj_t * gauge, uint8_t needle_cnt, const lv_color_t colors[])
-{
- LV_ASSERT_OBJ(gauge, LV_OBJX_NAME);
-
- lv_gauge_ext_t * ext = lv_obj_get_ext_attr(gauge);
-
- if(ext->needle_count != needle_cnt) {
- if(ext->values != NULL) {
- lv_mem_free(ext->values);
- ext->values = NULL;
- }
-
- ext->values = lv_mem_realloc(ext->values, needle_cnt * sizeof(int16_t));
- LV_ASSERT_MEM(ext->values);
- if(ext->values == NULL) return;
-
- int16_t min = lv_gauge_get_min_value(gauge);
- uint8_t n;
- for(n = ext->needle_count; n < needle_cnt; n++) {
- ext->values[n] = min;
- }
-
- ext->needle_count = needle_cnt;
- }
-
- ext->needle_colors = colors;
- lv_obj_invalidate(gauge);
-}
-
-/**
- * Set the value of a needle
- * @param gauge pointer to a gauge
- * @param needle_id the id of the needle
- * @param value the new value
- */
-void lv_gauge_set_value(lv_obj_t * gauge, uint8_t needle_id, int16_t value)
-{
- LV_ASSERT_OBJ(gauge, LV_OBJX_NAME);
-
- lv_gauge_ext_t * ext = lv_obj_get_ext_attr(gauge);
-
- if(needle_id >= ext->needle_count) return;
- if(ext->values[needle_id] == value) return;
-
- int16_t min = lv_gauge_get_min_value(gauge);
- int16_t max = lv_gauge_get_max_value(gauge);
-
- if(value > max)
- value = max;
- else if(value < min)
- value = min;
-
- ext->values[needle_id] = value;
-
- lv_obj_invalidate(gauge);
-}
-
-/**
- * Set the scale settings of a gauge
- * @param gauge pointer to a gauge object
- * @param angle angle of the scale (0..360)
- * @param line_cnt count of scale lines.
- * The get a given "subdivision" lines between label, `line_cnt` = (sub_div + 1) * (label_cnt - 1) +
- * 1
- * @param label_cnt count of scale labels.
- */
-void lv_gauge_set_scale(lv_obj_t * gauge, uint16_t angle, uint8_t line_cnt, uint8_t label_cnt)
-{
- LV_ASSERT_OBJ(gauge, LV_OBJX_NAME);
-
- lv_lmeter_set_scale(gauge, angle, line_cnt);
-
- lv_gauge_ext_t * ext = lv_obj_get_ext_attr(gauge);
- ext->label_count = label_cnt;
- lv_obj_invalidate(gauge);
-}
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the value of a needle
- * @param gauge pointer to gauge object
- * @param needle the id of the needle
- * @return the value of the needle [min,max]
- */
-int16_t lv_gauge_get_value(const lv_obj_t * gauge, uint8_t needle)
-{
- LV_ASSERT_OBJ(gauge, LV_OBJX_NAME);
-
- lv_gauge_ext_t * ext = lv_obj_get_ext_attr(gauge);
- int16_t min = lv_gauge_get_min_value(gauge);
-
- if(needle >= ext->needle_count) return min;
-
- return ext->values[needle];
-}
-
-/**
- * Get the count of needles on a gauge
- * @param gauge pointer to gauge
- * @return count of needles
- */
-uint8_t lv_gauge_get_needle_count(const lv_obj_t * gauge)
-{
- LV_ASSERT_OBJ(gauge, LV_OBJX_NAME);
-
- lv_gauge_ext_t * ext = lv_obj_get_ext_attr(gauge);
- return ext->needle_count;
-}
-
-/**
- * Set the number of labels (and the thicker lines too)
- * @param gauge pointer to a gauge object
- * @return count of labels
- */
-uint8_t lv_gauge_get_label_count(const lv_obj_t * gauge)
-{
- LV_ASSERT_OBJ(gauge, LV_OBJX_NAME);
-
- lv_gauge_ext_t * ext = lv_obj_get_ext_attr(gauge);
- return ext->label_count;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Handle the drawing related tasks of the gauges
- * @param gauge pointer to an object
- * @param mask the object will be drawn only in this area
- * @param mode LV_DESIGN_COVER_CHK: only check if the object fully covers the 'mask_p' area
- * (return 'true' if yes)
- * LV_DESIGN_DRAW: draw the object (always return 'true')
- * LV_DESIGN_DRAW_POST: drawing after every children are drawn
- * @param return true/false, depends on 'mode'
- */
-static bool lv_gauge_design(lv_obj_t * gauge, const lv_area_t * mask, lv_design_mode_t mode)
-{
- /*Return false if the object is not covers the mask_p area*/
- if(mode == LV_DESIGN_COVER_CHK) {
- return false;
- }
- /*Draw the object*/
- else if(mode == LV_DESIGN_DRAW_MAIN) {
-
- /* Store the real pointer because of 'lv_group'
- * If the object is in focus 'lv_obj_get_style()' will give a pointer to tmp style
- * and to the real object style. It is important because of style change tricks below*/
- const lv_style_t * style_ori_p = gauge->style_p;
- const lv_style_t * style = lv_obj_get_style(gauge);
- lv_gauge_ext_t * ext = lv_obj_get_ext_attr(gauge);
-
- lv_gauge_draw_scale(gauge, mask);
-
- /*Draw the ancestor line meter with max value to show the rainbow like line colors*/
- uint16_t line_cnt_tmp = ext->lmeter.line_cnt;
- ancestor_design(gauge, mask, mode); /*To draw lines*/
-
- /*Temporally modify the line meter to draw longer lines where labels are*/
- lv_style_t style_tmp;
- lv_style_copy(&style_tmp, style);
- ext->lmeter.line_cnt = ext->label_count; /*Only to labels*/
- style_tmp.body.padding.left = style_tmp.body.padding.left * 2; /*Longer lines*/
- style_tmp.body.padding.right = style_tmp.body.padding.right * 2; /*Longer lines*/
- gauge->style_p = &style_tmp;
-
- ancestor_design(gauge, mask, mode); /*To draw lines*/
-
- ext->lmeter.line_cnt = line_cnt_tmp; /*Restore the parameters*/
- gauge->style_p = style_ori_p; /*Restore the ORIGINAL style pointer*/
-
- lv_gauge_draw_needle(gauge, mask);
-
- }
- /*Post draw when the children are drawn*/
- else if(mode == LV_DESIGN_DRAW_POST) {
- ancestor_design(gauge, mask, mode);
- }
-
- return true;
-}
-
-/**
- * Signal function of the gauge
- * @param gauge pointer to a gauge object
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_gauge_signal(lv_obj_t * gauge, lv_signal_t sign, void * param)
-{
- lv_res_t res;
-
- /* Include the ancient signal function */
- res = ancestor_signal(gauge, sign, param);
- if(res != LV_RES_OK) return res;
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);
-
- lv_gauge_ext_t * ext = lv_obj_get_ext_attr(gauge);
- if(sign == LV_SIGNAL_CLEANUP) {
- lv_mem_free(ext->values);
- ext->values = NULL;
- }
-
- return res;
-}
-
-/**
- * Draw the scale on a gauge
- * @param gauge pointer to gauge object
- * @param mask mask of drawing
- */
-static void lv_gauge_draw_scale(lv_obj_t * gauge, const lv_area_t * mask)
-{
- char scale_txt[16];
-
- lv_gauge_ext_t * ext = lv_obj_get_ext_attr(gauge);
- const lv_style_t * style = lv_obj_get_style(gauge);
- lv_opa_t opa_scale = lv_obj_get_opa_scale(gauge);
- lv_coord_t r = lv_obj_get_width(gauge) / 2 - (3 * style->body.padding.left) - style->body.padding.inner;
- lv_coord_t x_ofs = lv_obj_get_width(gauge) / 2 + gauge->coords.x1;
- lv_coord_t y_ofs = lv_obj_get_height(gauge) / 2 + gauge->coords.y1;
- int16_t scale_angle = lv_lmeter_get_scale_angle(gauge);
- uint16_t label_num = ext->label_count;
- int16_t angle_ofs = 90 + (360 - scale_angle) / 2;
- int16_t min = lv_gauge_get_min_value(gauge);
- int16_t max = lv_gauge_get_max_value(gauge);
-
- uint8_t i;
- for(i = 0; i < label_num; i++) {
- /*Calculate the position a scale label*/
- int16_t angle = (i * scale_angle) / (label_num - 1) + angle_ofs;
-
- lv_coord_t y = (int32_t)((int32_t)lv_trigo_sin(angle) * r) / LV_TRIGO_SIN_MAX;
- y += y_ofs;
-
- lv_coord_t x = (int32_t)((int32_t)lv_trigo_sin(angle + 90) * r) / LV_TRIGO_SIN_MAX;
- x += x_ofs;
-
- int16_t scale_act = (int32_t)((int32_t)(max - min) * i) / (label_num - 1);
- scale_act += min;
- lv_utils_num_to_str(scale_act, scale_txt);
-
- lv_area_t label_cord;
- lv_point_t label_size;
- lv_txt_get_size(&label_size, scale_txt, style->text.font, style->text.letter_space, style->text.line_space,
- LV_COORD_MAX, LV_TXT_FLAG_NONE);
-
- /*Draw the label*/
- label_cord.x1 = x - label_size.x / 2;
- label_cord.y1 = y - label_size.y / 2;
- label_cord.x2 = label_cord.x1 + label_size.x;
- label_cord.y2 = label_cord.y1 + label_size.y;
-
- lv_draw_label(&label_cord, mask, style, opa_scale, scale_txt, LV_TXT_FLAG_NONE, NULL, NULL, NULL, lv_obj_get_base_dir(gauge));
- }
-}
-/**
- * Draw the needles of a gauge
- * @param gauge pointer to gauge object
- * @param mask mask of drawing
- */
-static void lv_gauge_draw_needle(lv_obj_t * gauge, const lv_area_t * mask)
-{
- lv_style_t style_needle;
- lv_gauge_ext_t * ext = lv_obj_get_ext_attr(gauge);
- const lv_style_t * style = lv_gauge_get_style(gauge, LV_GAUGE_STYLE_MAIN);
- lv_opa_t opa_scale = lv_obj_get_opa_scale(gauge);
-
- lv_coord_t r = lv_obj_get_width(gauge) / 2 - style->body.padding.left;
- lv_coord_t x_ofs = lv_obj_get_width(gauge) / 2 + gauge->coords.x1;
- lv_coord_t y_ofs = lv_obj_get_height(gauge) / 2 + gauge->coords.y1;
- uint16_t angle = lv_lmeter_get_scale_angle(gauge);
- int16_t angle_ofs = 90 + (360 - angle) / 2;
- int16_t min = lv_gauge_get_min_value(gauge);
- int16_t max = lv_gauge_get_max_value(gauge);
- lv_point_t p_mid;
- lv_point_t p_end;
- lv_point_t p_end_low;
- lv_point_t p_end_high;
- uint8_t i;
-
- lv_style_copy(&style_needle, style);
-
- p_mid.x = x_ofs;
- p_mid.y = y_ofs;
- for(i = 0; i < ext->needle_count; i++) {
- /*Calculate the end point of a needle*/
- int16_t needle_angle =
- (ext->values[i] - min) * angle * (1 << LV_GAUGE_INTERPOLATE_SHIFT) / (max - min);
-
- int16_t needle_angle_low = (needle_angle >> LV_GAUGE_INTERPOLATE_SHIFT) + angle_ofs;
- int16_t needle_angle_high = needle_angle_low + 1;
-
- p_end_low.y = (lv_trigo_sin(needle_angle_low) * r) / LV_TRIGO_SIN_MAX + y_ofs;
- p_end_low.x = (lv_trigo_sin(needle_angle_low + 90) * r) / LV_TRIGO_SIN_MAX + x_ofs;
-
- p_end_high.y = (lv_trigo_sin(needle_angle_high) * r) / LV_TRIGO_SIN_MAX + y_ofs;
- p_end_high.x = (lv_trigo_sin(needle_angle_high + 90) * r) / LV_TRIGO_SIN_MAX + x_ofs;
-
- uint16_t rem = needle_angle & ((1 << LV_GAUGE_INTERPOLATE_SHIFT) - 1);
- int16_t x_mod = ((LV_MATH_ABS(p_end_high.x - p_end_low.x)) * rem) >> LV_GAUGE_INTERPOLATE_SHIFT;
- int16_t y_mod = ((LV_MATH_ABS(p_end_high.y - p_end_low.y)) * rem) >> LV_GAUGE_INTERPOLATE_SHIFT;
-
- if(p_end_high.x < p_end_low.x) x_mod = -x_mod;
- if(p_end_high.y < p_end_low.y) y_mod = -y_mod;
-
- p_end.x = p_end_low.x + x_mod;
- p_end.y = p_end_low.y + y_mod;
-
- /*Draw the needle with the corresponding color*/
- if(ext->needle_colors == NULL)
- style_needle.line.color = LV_GAUGE_DEF_NEEDLE_COLOR;
- else
- style_needle.line.color = ext->needle_colors[i];
-
- lv_draw_line(&p_mid, &p_end, mask, &style_needle, opa_scale);
- }
-
- /*Draw the needle middle area*/
- lv_style_t style_neddle_mid;
- lv_style_copy(&style_neddle_mid, &lv_style_plain);
- style_neddle_mid.body.main_color = style->body.border.color;
- style_neddle_mid.body.grad_color = style->body.border.color;
- style_neddle_mid.body.radius = LV_RADIUS_CIRCLE;
-
- lv_area_t nm_cord;
- nm_cord.x1 = x_ofs - style->body.radius;
- nm_cord.y1 = y_ofs - style->body.radius;
- nm_cord.x2 = x_ofs + style->body.radius;
- nm_cord.y2 = y_ofs + style->body.radius;
-
- lv_draw_rect(&nm_cord, mask, &style_neddle_mid, lv_obj_get_opa_scale(gauge));
-}
-
-#endif
diff --git a/src/libs/lvgl/src/lv_objx/lv_gauge.h b/src/libs/lvgl/src/lv_objx/lv_gauge.h
deleted file mode 100644
index 408c1125..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_gauge.h
+++ /dev/null
@@ -1,233 +0,0 @@
-/**
- * @file lv_gauge.h
- *
- */
-
-#ifndef LV_GAUGE_H
-#define LV_GAUGE_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_GAUGE != 0
-
-/*Testing of dependencies*/
-#if LV_USE_LMETER == 0
-#error "lv_gauge: lv_lmeter is required. Enable it in lv_conf.h (LV_USE_LMETER 1) "
-#endif
-
-#include "../lv_core/lv_obj.h"
-#include "lv_lmeter.h"
-#include "lv_label.h"
-#include "lv_line.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/*Data of gauge*/
-typedef struct
-{
- lv_lmeter_ext_t lmeter; /*Ext. of ancestor*/
- /*New data for this type */
- int16_t * values; /*Array of the set values (for needles) */
- const lv_color_t * needle_colors; /*Color of the needles (lv_color_t my_colors[needle_num])*/
- uint8_t needle_count; /*Number of needles*/
- uint8_t label_count; /*Number of labels on the scale*/
-} lv_gauge_ext_t;
-
-/*Styles*/
-enum {
- LV_GAUGE_STYLE_MAIN,
-};
-typedef uint8_t lv_gauge_style_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Create a gauge objects
- * @param par pointer to an object, it will be the parent of the new gauge
- * @param copy pointer to a gauge object, if not NULL then the new object will be copied from it
- * @return pointer to the created gauge
- */
-lv_obj_t * lv_gauge_create(lv_obj_t * par, const lv_obj_t * copy);
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set the number of needles
- * @param gauge pointer to gauge object
- * @param needle_cnt new count of needles
- * @param colors an array of colors for needles (with 'num' elements)
- */
-void lv_gauge_set_needle_count(lv_obj_t * gauge, uint8_t needle_cnt, const lv_color_t colors[]);
-
-/**
- * Set the value of a needle
- * @param gauge pointer to a gauge
- * @param needle_id the id of the needle
- * @param value the new value
- */
-void lv_gauge_set_value(lv_obj_t * gauge, uint8_t needle_id, int16_t value);
-
-/**
- * Set minimum and the maximum values of a gauge
- * @param gauge pointer to he gauge object
- * @param min minimum value
- * @param max maximum value
- */
-static inline void lv_gauge_set_range(lv_obj_t * gauge, int16_t min, int16_t max)
-{
- lv_lmeter_set_range(gauge, min, max);
-}
-
-/**
- * Set a critical value on the scale. After this value 'line.color' scale lines will be drawn
- * @param gauge pointer to a gauge object
- * @param value the critical value
- */
-static inline void lv_gauge_set_critical_value(lv_obj_t * gauge, int16_t value)
-{
- lv_lmeter_set_value(gauge, value);
-}
-
-/**
- * Set the scale settings of a gauge
- * @param gauge pointer to a gauge object
- * @param angle angle of the scale (0..360)
- * @param line_cnt count of scale lines.
- * The get a given "subdivision" lines between label, `line_cnt` = (sub_div + 1) * (label_cnt - 1) +
- * 1
- * @param label_cnt count of scale labels.
- */
-void lv_gauge_set_scale(lv_obj_t * gauge, uint16_t angle, uint8_t line_cnt, uint8_t label_cnt);
-
-/**
- * Set the styles of a gauge
- * @param gauge pointer to a gauge object
- * @param type which style should be set (can be only `LV_GAUGE_STYLE_MAIN`)
- * @param style set the style of the gauge
- * */
-static inline void lv_gauge_set_style(lv_obj_t * gauge, lv_gauge_style_t type, lv_style_t * style)
-{
- (void)type; /*Unused*/
- lv_obj_set_style(gauge, style);
-}
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the value of a needle
- * @param gauge pointer to gauge object
- * @param needle the id of the needle
- * @return the value of the needle [min,max]
- */
-int16_t lv_gauge_get_value(const lv_obj_t * gauge, uint8_t needle);
-
-/**
- * Get the count of needles on a gauge
- * @param gauge pointer to gauge
- * @return count of needles
- */
-uint8_t lv_gauge_get_needle_count(const lv_obj_t * gauge);
-
-/**
- * Get the minimum value of a gauge
- * @param gauge pointer to a gauge object
- * @return the minimum value of the gauge
- */
-static inline int16_t lv_gauge_get_min_value(const lv_obj_t * lmeter)
-{
- return lv_lmeter_get_min_value(lmeter);
-}
-
-/**
- * Get the maximum value of a gauge
- * @param gauge pointer to a gauge object
- * @return the maximum value of the gauge
- */
-static inline int16_t lv_gauge_get_max_value(const lv_obj_t * lmeter)
-{
- return lv_lmeter_get_max_value(lmeter);
-}
-
-/**
- * Get a critical value on the scale.
- * @param gauge pointer to a gauge object
- * @return the critical value
- */
-static inline int16_t lv_gauge_get_critical_value(const lv_obj_t * gauge)
-{
- return lv_lmeter_get_value(gauge);
-}
-
-/**
- * Set the number of labels (and the thicker lines too)
- * @param gauge pointer to a gauge object
- * @return count of labels
- */
-uint8_t lv_gauge_get_label_count(const lv_obj_t * gauge);
-
-/**
- * Get the scale number of a gauge
- * @param gauge pointer to a gauge object
- * @return number of the scale units
- */
-static inline uint16_t lv_gauge_get_line_count(const lv_obj_t * gauge)
-{
- return lv_lmeter_get_line_count(gauge);
-}
-
-/**
- * Get the scale angle of a gauge
- * @param gauge pointer to a gauge object
- * @return angle of the scale
- */
-static inline uint16_t lv_gauge_get_scale_angle(const lv_obj_t * gauge)
-{
- return lv_lmeter_get_scale_angle(gauge);
-}
-
-/**
- * Get the style of a gauge
- * @param gauge pointer to a gauge object
- * @param type which style should be get (can be only `LV_GAUGE_STYLE_MAIN`)
- * @return pointer to the gauge's style
- */
-static inline const lv_style_t * lv_gauge_get_style(const lv_obj_t * gauge, lv_gauge_style_t type)
-{
- (void)type; /*Unused*/
- return lv_obj_get_style(gauge);
-}
-
-/**********************
- * MACROS
- **********************/
-
-#endif /*LV_USE_GAUGE*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_GAUGE_H*/
diff --git a/src/libs/lvgl/src/lv_objx/lv_img.c b/src/libs/lvgl/src/lv_objx/lv_img.c
deleted file mode 100644
index bf0269f9..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_img.c
+++ /dev/null
@@ -1,435 +0,0 @@
-/**
- * @file lv_img.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_img.h"
-#if LV_USE_IMG != 0
-
-/*Testing of dependencies*/
-#if LV_USE_LABEL == 0
-#error "lv_img: lv_label is required. Enable it in lv_conf.h (LV_USE_LABEL 1) "
-#endif
-
-#include "../lv_core/lv_debug.h"
-#include "../lv_themes/lv_theme.h"
-#include "../lv_draw/lv_img_decoder.h"
-#include "../lv_misc/lv_fs.h"
-#include "../lv_misc/lv_txt.h"
-#include "../lv_misc/lv_log.h"
-
-/*********************
- * DEFINES
- *********************/
-#define LV_OBJX_NAME "lv_img"
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static bool lv_img_design(lv_obj_t * img, const lv_area_t * mask, lv_design_mode_t mode);
-static lv_res_t lv_img_signal(lv_obj_t * img, lv_signal_t sign, void * param);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_signal_cb_t ancestor_signal;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Create an image objects
- * @param par pointer to an object, it will be the parent of the new button
- * @param copy pointer to a image object, if not NULL then the new object will be copied from it
- * @return pointer to the created image
- */
-lv_obj_t * lv_img_create(lv_obj_t * par, const lv_obj_t * copy)
-{
- LV_LOG_TRACE("image create started");
-
- lv_obj_t * new_img = NULL;
-
- /*Create a basic object*/
- new_img = lv_obj_create(par, copy);
- LV_ASSERT_MEM(new_img);
- if(new_img == NULL) return NULL;
-
- if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_img);
-
- /*Extend the basic object to image object*/
- lv_img_ext_t * ext = lv_obj_allocate_ext_attr(new_img, sizeof(lv_img_ext_t));
- LV_ASSERT_MEM(ext);
- if(ext == NULL) return NULL;
-
- ext->src = NULL;
- ext->src_type = LV_IMG_SRC_UNKNOWN;
- ext->cf = LV_IMG_CF_UNKNOWN;
- ext->w = lv_obj_get_width(new_img);
- ext->h = lv_obj_get_height(new_img);
- ext->auto_size = 1;
- ext->offset.x = 0;
- ext->offset.y = 0;
-
- /*Init the new object*/
- lv_obj_set_signal_cb(new_img, lv_img_signal);
- lv_obj_set_design_cb(new_img, lv_img_design);
-
- if(copy == NULL) {
- lv_obj_set_click(new_img, false);
- /* Enable auto size for non screens
- * because image screens are wallpapers
- * and must be screen sized*/
- if(par != NULL) {
- ext->auto_size = 1;
- lv_obj_set_style(new_img, NULL); /*Inherit the style by default*/
- } else {
- ext->auto_size = 0;
- lv_obj_set_style(new_img, &lv_style_plain); /*Set a style for screens*/
- }
- } else {
- lv_img_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
- ext->auto_size = copy_ext->auto_size;
- lv_img_set_src(new_img, copy_ext->src);
-
- /*Refresh the style with new signal function*/
- lv_obj_refresh_style(new_img);
- }
-
- LV_LOG_INFO("image created");
-
- return new_img;
-}
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set the pixel map to display by the image
- * @param img pointer to an image object
- * @param data the image data
- */
-void lv_img_set_src(lv_obj_t * img, const void * src_img)
-{
- LV_ASSERT_OBJ(img, LV_OBJX_NAME);
-
- lv_img_src_t src_type = lv_img_src_get_type(src_img);
- lv_img_ext_t * ext = lv_obj_get_ext_attr(img);
-
-#if LV_USE_LOG && LV_LOG_LEVEL >= LV_LOG_LEVEL_INFO
- switch(src_type) {
- case LV_IMG_SRC_FILE: LV_LOG_TRACE("lv_img_set_src: `LV_IMG_SRC_FILE` type found"); break;
- case LV_IMG_SRC_VARIABLE: LV_LOG_TRACE("lv_img_set_src: `LV_IMG_SRC_VARIABLE` type found"); break;
- case LV_IMG_SRC_SYMBOL: LV_LOG_TRACE("lv_img_set_src: `LV_IMG_SRC_SYMBOL` type found"); break;
- default: LV_LOG_WARN("lv_img_set_src: unknown type");
- }
-#endif
-
- /*If the new source type is unknown free the memories of the old source*/
- if(src_type == LV_IMG_SRC_UNKNOWN) {
- LV_LOG_WARN("lv_img_set_src: unknown image type");
- if(ext->src_type == LV_IMG_SRC_SYMBOL || ext->src_type == LV_IMG_SRC_FILE) {
- lv_mem_free(ext->src);
- }
- ext->src = NULL;
- ext->src_type = LV_IMG_SRC_UNKNOWN;
- return;
- }
-
- lv_img_header_t header;
- lv_img_decoder_get_info(src_img, &header);
-
- /*Save the source*/
- if(src_type == LV_IMG_SRC_VARIABLE) {
- LV_LOG_INFO("lv_img_set_src: `LV_IMG_SRC_VARIABLE` type found");
-
- /*If memory was allocated because of the previous `src_type` then free it*/
- if(ext->src_type == LV_IMG_SRC_FILE || ext->src_type == LV_IMG_SRC_SYMBOL) {
- lv_mem_free(ext->src);
- }
- ext->src = src_img;
- } else if(src_type == LV_IMG_SRC_FILE || src_type == LV_IMG_SRC_SYMBOL) {
- /* If the new and the old src are the same then it was only a refresh.*/
- if(ext->src != src_img) {
- const void * old_src = NULL;
- /* If memory was allocated because of the previous `src_type` then save its pointer and free after allocation.
- * It's important to allocate first to be sure the new data will be on a new address.
- * Else `img_cache` wouldn't see the change in source.*/
- if(ext->src_type == LV_IMG_SRC_FILE || ext->src_type == LV_IMG_SRC_SYMBOL) {
- old_src = ext->src;
- }
- char * new_str = lv_mem_alloc(strlen(src_img) + 1);
- LV_ASSERT_MEM(new_str);
- if(new_str == NULL) return;
- strcpy(new_str, src_img);
- ext->src = new_str;
-
- if(old_src) lv_mem_free(old_src);
- }
- }
-
- if(src_type == LV_IMG_SRC_SYMBOL) {
- /*`lv_img_dsc_get_info` couldn't set the with and height of a font so set it here*/
- const lv_style_t * style = lv_img_get_style(img, LV_IMG_STYLE_MAIN);
- lv_point_t size;
- lv_txt_get_size(&size, src_img, style->text.font, style->text.letter_space, style->text.line_space,
- LV_COORD_MAX, LV_TXT_FLAG_NONE);
- header.w = size.x;
- header.h = size.y;
- }
-
- ext->src_type = src_type;
- ext->w = header.w;
- ext->h = header.h;
- ext->cf = header.cf;
-
- if(lv_img_get_auto_size(img) != false) {
- lv_obj_set_size(img, ext->w, ext->h);
- }
-
- lv_obj_invalidate(img);
-}
-
-/**
- * Enable the auto size feature.
- * If enabled the object size will be same as the picture size.
- * @param img pointer to an image
- * @param en true: auto size enable, false: auto size disable
- */
-void lv_img_set_auto_size(lv_obj_t * img, bool en)
-{
- LV_ASSERT_OBJ(img, LV_OBJX_NAME);
-
- lv_img_ext_t * ext = lv_obj_get_ext_attr(img);
-
- ext->auto_size = (en == false ? 0 : 1);
-}
-
-/**
- * Set an offset for the source of an image.
- * so the image will be displayed from the new origin.
- * @param img pointer to an image
- * @param x: the new offset along x axis.
- */
-void lv_img_set_offset_x(lv_obj_t * img, lv_coord_t x)
-{
- LV_ASSERT_OBJ(img, LV_OBJX_NAME);
-
- lv_img_ext_t * ext = lv_obj_get_ext_attr(img);
-
- if(x < ext->w - 1) {
- ext->offset.x = x;
- lv_obj_invalidate(img);
- }
-}
-
-/**
- * Set an offset for the source of an image.
- * so the image will be displayed from the new origin.
- * @param img pointer to an image
- * @param y: the new offset along y axis.
- */
-void lv_img_set_offset_y(lv_obj_t * img, lv_coord_t y)
-{
- LV_ASSERT_OBJ(img, LV_OBJX_NAME);
-
- lv_img_ext_t * ext = lv_obj_get_ext_attr(img);
-
- if(y < ext->h - 1) {
- ext->offset.y = y;
- lv_obj_invalidate(img);
- }
-}
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the source of the image
- * @param img pointer to an image object
- * @return the image source (symbol, file name or C array)
- */
-const void * lv_img_get_src(lv_obj_t * img)
-{
- LV_ASSERT_OBJ(img, LV_OBJX_NAME);
-
- lv_img_ext_t * ext = lv_obj_get_ext_attr(img);
-
- return ext->src;
-}
-
-/**
- * Get the name of the file set for an image
- * @param img pointer to an image
- * @return file name
- */
-const char * lv_img_get_file_name(const lv_obj_t * img)
-{
- LV_ASSERT_OBJ(img, LV_OBJX_NAME);
-
- lv_img_ext_t * ext = lv_obj_get_ext_attr(img);
-
- if(ext->src_type == LV_IMG_SRC_FILE)
- return ext->src;
- else
- return "";
-}
-
-/**
- * Get the auto size enable attribute
- * @param img pointer to an image
- * @return true: auto size is enabled, false: auto size is disabled
- */
-bool lv_img_get_auto_size(const lv_obj_t * img)
-{
- LV_ASSERT_OBJ(img, LV_OBJX_NAME);
-
- lv_img_ext_t * ext = lv_obj_get_ext_attr(img);
-
- return ext->auto_size == 0 ? false : true;
-}
-
-/**
- * Get the offset.x attribute of the img object.
- * @param img pointer to an image
- * @return offset.x value.
- */
-lv_coord_t lv_img_get_offset_x(lv_obj_t * img)
-{
- LV_ASSERT_OBJ(img, LV_OBJX_NAME);
-
- lv_img_ext_t * ext = lv_obj_get_ext_attr(img);
-
- return ext->offset.x;
-}
-
-/**
- * Get the offset.y attribute of the img object.
- * @param img pointer to an image
- * @return offset.y value.
- */
-lv_coord_t lv_img_get_offset_y(lv_obj_t * img)
-{
- LV_ASSERT_OBJ(img, LV_OBJX_NAME);
-
- lv_img_ext_t * ext = lv_obj_get_ext_attr(img);
-
- return ext->offset.y;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Handle the drawing related tasks of the images
- * @param img pointer to an object
- * @param mask the object will be drawn only in this area
- * @param mode LV_DESIGN_COVER_CHK: only check if the object fully covers the 'mask_p' area
- * (return 'true' if yes)
- * LV_DESIGN_DRAW: draw the object (always return 'true')
- * LV_DESIGN_DRAW_POST: drawing after every children are drawn
- * @param return true/false, depends on 'mode'
- */
-static bool lv_img_design(lv_obj_t * img, const lv_area_t * mask, lv_design_mode_t mode)
-{
- const lv_style_t * style = lv_obj_get_style(img);
- lv_img_ext_t * ext = lv_obj_get_ext_attr(img);
-
- if(mode == LV_DESIGN_COVER_CHK) {
- bool cover = false;
- if(ext->src_type == LV_IMG_SRC_UNKNOWN || ext->src_type == LV_IMG_SRC_SYMBOL) return false;
-
- if(ext->cf == LV_IMG_CF_TRUE_COLOR || ext->cf == LV_IMG_CF_RAW) cover = lv_area_is_in(mask, &img->coords);
-
- const lv_style_t * style = lv_img_get_style(img, LV_IMG_STYLE_MAIN);
- if(style->image.opa < LV_OPA_MAX) return false;
-
- return cover;
- } else if(mode == LV_DESIGN_DRAW_MAIN) {
- if(ext->h == 0 || ext->w == 0) return true;
- lv_area_t coords;
- lv_opa_t opa_scale = lv_obj_get_opa_scale(img);
-
- lv_obj_get_coords(img, &coords);
-
- if(ext->src_type == LV_IMG_SRC_FILE || ext->src_type == LV_IMG_SRC_VARIABLE) {
- coords.x1 -= ext->offset.x;
- coords.y1 -= ext->offset.y;
-
- LV_LOG_TRACE("lv_img_design: start to draw image");
- lv_area_t cords_tmp;
- cords_tmp.y1 = coords.y1;
- cords_tmp.y2 = coords.y1 + ext->h - 1;
-
- for(; cords_tmp.y1 <= coords.y2; cords_tmp.y1 += ext->h, cords_tmp.y2 += ext->h) {
- cords_tmp.x1 = coords.x1;
- cords_tmp.x2 = coords.x1 + ext->w - 1;
- for(; cords_tmp.x1 <= coords.x2; cords_tmp.x1 += ext->w, cords_tmp.x2 += ext->w) {
- lv_draw_img(&cords_tmp, mask, ext->src, style, opa_scale);
- }
- }
- } else if(ext->src_type == LV_IMG_SRC_SYMBOL) {
- LV_LOG_TRACE("lv_img_design: start to draw symbol");
- lv_style_t style_mod;
- lv_style_copy(&style_mod, style);
- style_mod.text.color = style->image.color;
- lv_draw_label(&coords, mask, &style_mod, opa_scale, ext->src, LV_TXT_FLAG_NONE, NULL, NULL, NULL, lv_obj_get_base_dir(img));
- } else {
- /*Trigger the error handler of image drawer*/
- LV_LOG_WARN("lv_img_design: image source type is unknown");
- lv_draw_img(&img->coords, mask, NULL, style, opa_scale);
- }
- }
-
- return true;
-}
-
-/**
- * Signal function of the image
- * @param img pointer to an image object
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_img_signal(lv_obj_t * img, lv_signal_t sign, void * param)
-{
- lv_res_t res;
-
- /* Include the ancient signal function */
- res = ancestor_signal(img, sign, param);
- if(res != LV_RES_OK) return res;
-
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);
-
- lv_img_ext_t * ext = lv_obj_get_ext_attr(img);
- if(sign == LV_SIGNAL_CLEANUP) {
- if(ext->src_type == LV_IMG_SRC_FILE || ext->src_type == LV_IMG_SRC_SYMBOL) {
- lv_mem_free(ext->src);
- ext->src = NULL;
- ext->src_type = LV_IMG_SRC_UNKNOWN;
- }
- } else if(sign == LV_SIGNAL_STYLE_CHG) {
- /*Refresh the file name to refresh the symbol text size*/
- if(ext->src_type == LV_IMG_SRC_SYMBOL) {
- lv_img_set_src(img, ext->src);
- }
- }
-
- return res;
-}
-
-#endif
diff --git a/src/libs/lvgl/src/lv_objx/lv_img.h b/src/libs/lvgl/src/lv_objx/lv_img.h
deleted file mode 100644
index d1e14d20..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_img.h
+++ /dev/null
@@ -1,179 +0,0 @@
-/**
- * @file lv_img.h
- *
- */
-
-#ifndef LV_IMG_H
-#define LV_IMG_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_IMG != 0
-
-#include "../lv_core/lv_obj.h"
-#include "../lv_misc/lv_fs.h"
-#include "lv_label.h"
-#include "../lv_draw/lv_draw.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-/*Data of image*/
-typedef struct
-{
- /*No inherited ext. because inherited from the base object*/ /*Ext. of ancestor*/
- /*New data for this type */
- const void * src; /*Image source: Pointer to an array or a file or a symbol*/
- lv_point_t offset;
- lv_coord_t w; /*Width of the image (Handled by the library)*/
- lv_coord_t h; /*Height of the image (Handled by the library)*/
- uint8_t src_type : 2; /*See: lv_img_src_t*/
- uint8_t auto_size : 1; /*1: automatically set the object size to the image size*/
- uint8_t cf : 5; /*Color format from `lv_img_color_format_t`*/
-} lv_img_ext_t;
-
-/*Styles*/
-enum {
- LV_IMG_STYLE_MAIN,
-};
-typedef uint8_t lv_img_style_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Create an image objects
- * @param par pointer to an object, it will be the parent of the new button
- * @param copy pointer to a image object, if not NULL then the new object will be copied from it
- * @return pointer to the created image
- */
-lv_obj_t * lv_img_create(lv_obj_t * par, const lv_obj_t * copy);
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set the pixel map to display by the image
- * @param img pointer to an image object
- * @param data the image data
- */
-void lv_img_set_src(lv_obj_t * img, const void * src_img);
-
-/**
- * Enable the auto size feature.
- * If enabled the object size will be same as the picture size.
- * @param img pointer to an image
- * @param en true: auto size enable, false: auto size disable
- */
-void lv_img_set_auto_size(lv_obj_t * img, bool autosize_en);
-
-/**
- * Set an offset for the source of an image.
- * so the image will be displayed from the new origin.
- * @param img pointer to an image
- * @param x: the new offset along x axis.
- */
-void lv_img_set_offset_x(lv_obj_t * img, lv_coord_t x);
-
-/**
- * Set an offset for the source of an image.
- * so the image will be displayed from the new origin.
- * @param img pointer to an image
- * @param y: the new offset along y axis.
- */
-void lv_img_set_offset_y(lv_obj_t * img, lv_coord_t y);
-
-/**
- * Set the style of an image
- * @param img pointer to an image object
- * @param type which style should be set (can be only `LV_IMG_STYLE_MAIN`)
- * @param style pointer to a style
- */
-static inline void lv_img_set_style(lv_obj_t * img, lv_img_style_t type, const lv_style_t * style)
-{
- (void)type; /*Unused*/
- lv_obj_set_style(img, style);
-}
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the source of the image
- * @param img pointer to an image object
- * @return the image source (symbol, file name or C array)
- */
-const void * lv_img_get_src(lv_obj_t * img);
-
-/**
- * Get the name of the file set for an image
- * @param img pointer to an image
- * @return file name
- */
-const char * lv_img_get_file_name(const lv_obj_t * img);
-
-/**
- * Get the auto size enable attribute
- * @param img pointer to an image
- * @return true: auto size is enabled, false: auto size is disabled
- */
-bool lv_img_get_auto_size(const lv_obj_t * img);
-
-/**
- * Get the offset.x attribute of the img object.
- * @param img pointer to an image
- * @return offset.x value.
- */
-lv_coord_t lv_img_get_offset_x(lv_obj_t * img);
-
-/**
- * Get the offset.y attribute of the img object.
- * @param img pointer to an image
- * @return offset.y value.
- */
-lv_coord_t lv_img_get_offset_y(lv_obj_t * img);
-
-/**
- * Get the style of an image object
- * @param img pointer to an image object
- * @param type which style should be get (can be only `LV_IMG_STYLE_MAIN`)
- * @return pointer to the image's style
- */
-static inline const lv_style_t * lv_img_get_style(const lv_obj_t * img, lv_img_style_t type)
-{
- (void)type; /*Unused*/
- return lv_obj_get_style(img);
-}
-
-/**********************
- * MACROS
- **********************/
-
-/*Use this macro to declare an image in a c file*/
-#define LV_IMG_DECLARE(var_name) extern const lv_img_dsc_t var_name;
-
-#endif /*LV_USE_IMG*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_IMG_H*/
diff --git a/src/libs/lvgl/src/lv_objx/lv_imgbtn.c b/src/libs/lvgl/src/lv_objx/lv_imgbtn.c
deleted file mode 100644
index 522df301..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_imgbtn.c
+++ /dev/null
@@ -1,437 +0,0 @@
-/**
- * @file lv_imgbtn.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-
-#include "../lv_core/lv_debug.h"
-#include "lv_imgbtn.h"
-#include "lv_label.h"
-
-#if LV_USE_IMGBTN != 0
-
-/*********************
- * DEFINES
- *********************/
-#define LV_OBJX_NAME "lv_imgbtn"
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static bool lv_imgbtn_design(lv_obj_t * imgbtn, const lv_area_t * mask, lv_design_mode_t mode);
-static lv_res_t lv_imgbtn_signal(lv_obj_t * imgbtn, lv_signal_t sign, void * param);
-static void refr_img(lv_obj_t * imgbtn);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_signal_cb_t ancestor_signal;
-static lv_design_cb_t ancestor_design;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Create a image button object
- * @param par pointer to an object, it will be the parent of the new image button
- * @param copy pointer to a image button object, if not NULL then the new object will be copied from
- * it
- * @return pointer to the created image button
- */
-lv_obj_t * lv_imgbtn_create(lv_obj_t * par, const lv_obj_t * copy)
-{
- LV_LOG_TRACE("image button create started");
-
- /*Create the ancestor of image button*/
- lv_obj_t * new_imgbtn = lv_btn_create(par, copy);
- LV_ASSERT_MEM(new_imgbtn);
- if(new_imgbtn == NULL) return NULL;
-
- /*Allocate the image button type specific extended data*/
- lv_imgbtn_ext_t * ext = lv_obj_allocate_ext_attr(new_imgbtn, sizeof(lv_imgbtn_ext_t));
- LV_ASSERT_MEM(ext);
- if(ext == NULL) return NULL;
- if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_imgbtn);
- if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_cb(new_imgbtn);
-
- /*Initialize the allocated 'ext' */
-#if LV_IMGBTN_TILED == 0
- memset((void*)ext->img_src, 0, sizeof(ext->img_src));
-#else
- memset(ext->img_src_left, 0, sizeof(ext->img_src_left));
- memset(ext->img_src_mid, 0, sizeof(ext->img_src_mid));
- memset(ext->img_src_right, 0, sizeof(ext->img_src_right));
-#endif
-
- ext->act_cf = LV_IMG_CF_UNKNOWN;
-
- /*The signal and design functions are not copied so set them here*/
- lv_obj_set_signal_cb(new_imgbtn, lv_imgbtn_signal);
- lv_obj_set_design_cb(new_imgbtn, lv_imgbtn_design);
-
- /*Init the new image button image button*/
- if(copy == NULL) {
-
- }
- /*Copy an existing image button*/
- else {
- lv_imgbtn_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
-#if LV_IMGBTN_TILED == 0
- memcpy((void*)ext->img_src, copy_ext->img_src, sizeof(ext->img_src));
-#else
- memcpy((void*)ext->img_src_left, copy_ext->img_src_left, sizeof(ext->img_src_left));
- memcpy((void*)ext->img_src_mid, copy_ext->img_src_mid, sizeof(ext->img_src_mid));
- memcpy((void*)ext->img_src_right, copy_ext->img_src_right, sizeof(ext->img_src_right));
-#endif
- /*Refresh the style with new signal function*/
- lv_obj_refresh_style(new_imgbtn);
- }
-
- LV_LOG_INFO("image button created");
-
- return new_imgbtn;
-}
-
-/*=====================
- * Setter functions
- *====================*/
-
-#if LV_IMGBTN_TILED == 0
-/**
- * Set images for a state of the image button
- * @param imgbtn pointer to an image button object
- * @param state for which state set the new image (from `lv_btn_state_t`) `
- * @param src pointer to an image source (a C array or path to a file)
- */
-void lv_imgbtn_set_src(lv_obj_t * imgbtn, lv_btn_state_t state, const void * src)
-{
- LV_ASSERT_OBJ(imgbtn, LV_OBJX_NAME);
-
- lv_imgbtn_ext_t * ext = lv_obj_get_ext_attr(imgbtn);
-
- ext->img_src[state] = src;
-
- refr_img(imgbtn);
-}
-
-#else
-/**
- * Set images for a state of the image button
- * @param imgbtn pointer to an image button object
- * @param state for which state set the new image (from `lv_btn_state_t`) `
- * @param src_left pointer to an image source for the left side of the button (a C array or path to
- * a file)
- * @param src_mid pointer to an image source for the middle of the button (ideally 1px wide) (a C
- * array or path to a file)
- * @param src_right pointer to an image source for the right side of the button (a C array or path
- * to a file)
- */
-void lv_imgbtn_set_src(lv_obj_t * imgbtn, lv_btn_state_t state, const void * src_left, const void * src_mid,
- const void * src_right)
-{
- LV_ASSERT_OBJ(imgbtn, LV_OBJX_NAME);
-
-
- if(lv_img_src_get_type(src_left) == LV_IMG_SRC_SYMBOL ||
- lv_img_src_get_type(src_mid) == LV_IMG_SRC_SYMBOL ||
- lv_img_src_get_type(src_right) == LV_IMG_SRC_SYMBOL )
- {
- LV_LOG_WARN("lv_imgbtn_set_src: symbols are not supported in tiled mode");
- return;
- }
-
- lv_imgbtn_ext_t * ext = lv_obj_get_ext_attr(imgbtn);
-
- ext->img_src_left[state] = src_left;
- ext->img_src_mid[state] = src_mid;
- ext->img_src_right[state] = src_right;
-
- refr_img(imgbtn);
-}
-
-#endif
-
-/**
- * Set a style of a image button.
- * @param imgbtn pointer to image button object
- * @param type which style should be set
- * @param style pointer to a style
- */
-void lv_imgbtn_set_style(lv_obj_t * imgbtn, lv_imgbtn_style_t type, const lv_style_t * style)
-{
- LV_ASSERT_OBJ(imgbtn, LV_OBJX_NAME);
-
- lv_btn_set_style(imgbtn, type, style);
-}
-
-/*=====================
- * Getter functions
- *====================*/
-
-#if LV_IMGBTN_TILED == 0
-/**
- * Get the images in a given state
- * @param imgbtn pointer to an image button object
- * @param state the state where to get the image (from `lv_btn_state_t`) `
- * @return pointer to an image source (a C array or path to a file)
- */
-const void * lv_imgbtn_get_src(lv_obj_t * imgbtn, lv_btn_state_t state)
-{
- LV_ASSERT_OBJ(imgbtn, LV_OBJX_NAME);
-
- lv_imgbtn_ext_t * ext = lv_obj_get_ext_attr(imgbtn);
-
- return ext->img_src[state];
-}
-#else
-
-/**
- * Get the left image in a given state
- * @param imgbtn pointer to an image button object
- * @param state the state where to get the image (from `lv_btn_state_t`) `
- * @return pointer to the left image source (a C array or path to a file)
- */
-const void * lv_imgbtn_get_src_left(lv_obj_t * imgbtn, lv_btn_state_t state)
-{
- LV_ASSERT_OBJ(imgbtn, LV_OBJX_NAME);
-
- lv_imgbtn_ext_t * ext = lv_obj_get_ext_attr(imgbtn);
-
- return ext->img_src_left[state];
-}
-
-/**
- * Get the middle image in a given state
- * @param imgbtn pointer to an image button object
- * @param state the state where to get the image (from `lv_btn_state_t`) `
- * @return pointer to the middle image source (a C array or path to a file)
- */
-const void * lv_imgbtn_get_src_middle(lv_obj_t * imgbtn, lv_btn_state_t state)
-{
- LV_ASSERT_OBJ(imgbtn, LV_OBJX_NAME);
-
- lv_imgbtn_ext_t * ext = lv_obj_get_ext_attr(imgbtn);
-
- return ext->img_src_mid[state];
-}
-
-/**
- * Get the right image in a given state
- * @param imgbtn pointer to an image button object
- * @param state the state where to get the image (from `lv_btn_state_t`) `
- * @return pointer to the left image source (a C array or path to a file)
- */
-const void * lv_imgbtn_get_src_right(lv_obj_t * imgbtn, lv_btn_state_t state)
-{
- LV_ASSERT_OBJ(imgbtn, LV_OBJX_NAME);
-
- lv_imgbtn_ext_t * ext = lv_obj_get_ext_attr(imgbtn);
-
- return ext->img_src_right[state];
-}
-
-#endif
-
-/**
- * Get style of a image button.
- * @param imgbtn pointer to image button object
- * @param type which style should be get
- * @return style pointer to the style
- */
-const lv_style_t * lv_imgbtn_get_style(const lv_obj_t * imgbtn, lv_imgbtn_style_t type)
-{
- LV_ASSERT_OBJ(imgbtn, LV_OBJX_NAME);
-
- return lv_btn_get_style(imgbtn, type);
-}
-
-/*=====================
- * Other functions
- *====================*/
-
-/*
- * New object specific "other" functions come here
- */
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Handle the drawing related tasks of the image buttons
- * @param imgbtn pointer to an object
- * @param mask the object will be drawn only in this area
- * @param mode LV_DESIGN_COVER_CHK: only check if the object fully covers the 'mask_p' area
- * (return 'true' if yes)
- * LV_DESIGN_DRAW: draw the object (always return 'true')
- * LV_DESIGN_DRAW_POST: drawing after every children are drawn
- * @param return true/false, depends on 'mode'
- */
-static bool lv_imgbtn_design(lv_obj_t * imgbtn, const lv_area_t * mask, lv_design_mode_t mode)
-{
- /*Return false if the object is not covers the mask_p area*/
- if(mode == LV_DESIGN_COVER_CHK) {
- lv_imgbtn_ext_t * ext = lv_obj_get_ext_attr(imgbtn);
- bool cover = false;
- if(ext->act_cf == LV_IMG_CF_TRUE_COLOR || ext->act_cf == LV_IMG_CF_RAW) {
- cover = lv_area_is_in(mask, &imgbtn->coords);
- }
-
- return cover;
- }
- /*Draw the object*/
- else if(mode == LV_DESIGN_DRAW_MAIN) {
- /*Just draw an image*/
- lv_imgbtn_ext_t * ext = lv_obj_get_ext_attr(imgbtn);
- lv_btn_state_t state = lv_imgbtn_get_state(imgbtn);
- const lv_style_t * style = lv_imgbtn_get_style(imgbtn, state);
- lv_opa_t opa_scale = lv_obj_get_opa_scale(imgbtn);
-
-
-
-#if LV_IMGBTN_TILED == 0
- const void * src = ext->img_src[state];
- if(lv_img_src_get_type(src) == LV_IMG_SRC_SYMBOL) {
- lv_draw_label(&imgbtn->coords, mask, style, opa_scale, src, LV_TXT_FLAG_NONE, NULL, NULL, NULL, lv_obj_get_base_dir(imgbtn));
- } else {
- lv_draw_img(&imgbtn->coords, mask, src, style, opa_scale);
- }
-#else
- const void * src;
- src = ext->img_src_left[state];
- if(lv_img_src_get_type(src) == LV_IMG_SRC_SYMBOL) {
- LV_LOG_WARN("lv_imgbtn_design: SYMBOLS are not supported in tiled mode")
- return true;
- }
-
- lv_img_header_t header;
- lv_area_t coords;
- lv_coord_t left_w = 0;
- lv_coord_t right_w = 0;
-
- if(src) {
- lv_img_decoder_get_info(src, &header);
- left_w = header.w;
- coords.x1 = imgbtn->coords.x1;
- coords.y1 = imgbtn->coords.y1;
- coords.x2 = coords.x1 + header.w - 1;
- coords.y2 = coords.y1 + header.h - 1;
- lv_draw_img(&coords, mask, src, style, opa_scale);
- }
-
- src = ext->img_src_right[state];
- if(src) {
- lv_img_decoder_get_info(src, &header);
- right_w = header.w;
- coords.x1 = imgbtn->coords.x2 - header.w + 1;
- coords.y1 = imgbtn->coords.y1;
- coords.x2 = imgbtn->coords.x2;
- coords.y2 = imgbtn->coords.y1 + header.h - 1;
- lv_draw_img(&coords, mask, src, style, opa_scale);
- }
-
- src = ext->img_src_mid[state];
- if(src) {
- lv_coord_t obj_w = lv_obj_get_width(imgbtn);
- lv_coord_t i;
- lv_img_decoder_get_info(src, &header);
-
- coords.x1 = imgbtn->coords.x1 + left_w;
- coords.y1 = imgbtn->coords.y1;
- coords.x2 = coords.x1 + header.w - 1;
- coords.y2 = imgbtn->coords.y1 + header.h - 1;
-
- for(i = 0; i < obj_w - right_w - left_w; i += header.w) {
- lv_draw_img(&coords, mask, src, style, opa_scale);
- coords.x1 = coords.x2 + 1;
- coords.x2 += header.w;
- }
- }
-
-#endif
-
- }
- /*Post draw when the children are drawn*/
- else if(mode == LV_DESIGN_DRAW_POST) {
- }
-
- return true;
-}
-
-/**
- * Signal function of the image button
- * @param imgbtn pointer to a image button object
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_imgbtn_signal(lv_obj_t * imgbtn, lv_signal_t sign, void * param)
-{
- lv_res_t res;
-
- /* Include the ancient signal function */
- res = ancestor_signal(imgbtn, sign, param);
- if(res != LV_RES_OK) return res;
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);
-
- if(sign == LV_SIGNAL_STYLE_CHG) {
- /* If the style changed then the button was clicked, released etc. so probably the state was
- * changed as well Set the new image for the new state.*/
- refr_img(imgbtn);
- } else if(sign == LV_SIGNAL_CLEANUP) {
- /*Nothing to cleanup. (No dynamically allocated memory in 'ext')*/
- }
-
- return res;
-}
-
-static void refr_img(lv_obj_t * imgbtn)
-{
- lv_imgbtn_ext_t * ext = lv_obj_get_ext_attr(imgbtn);
- lv_btn_state_t state = lv_imgbtn_get_state(imgbtn);
- lv_img_header_t header;
-
-#if LV_IMGBTN_TILED == 0
- const void * src = ext->img_src[state];
-#else
- const void * src = ext->img_src_mid[state];
-#endif
-
- lv_res_t info_res = LV_RES_OK;
- if(lv_img_src_get_type(src) == LV_IMG_SRC_SYMBOL) {
- const lv_style_t * style = ext->btn.styles[state];
- header.h = lv_font_get_line_height(style->text.font);
- header.w = lv_txt_get_width(src, (uint16_t)strlen(src), style->text.font, style->text.letter_space, LV_TXT_FLAG_NONE);
- header.always_zero = 0;
- header.cf = LV_IMG_CF_ALPHA_1BIT;
- } else {
- info_res = lv_img_decoder_get_info(src, &header);
- }
-
- if(info_res == LV_RES_OK) {
- ext->act_cf = header.cf;
-#if LV_IMGBTN_TILED == 0
- lv_obj_set_size(imgbtn, header.w, header.h);
-#else
- lv_obj_set_height(imgbtn, header.h);
-#endif
- } else {
- ext->act_cf = LV_IMG_CF_UNKNOWN;
- }
-
- lv_obj_invalidate(imgbtn);
-}
-
-#endif
diff --git a/src/libs/lvgl/src/lv_objx/lv_imgbtn.h b/src/libs/lvgl/src/lv_objx/lv_imgbtn.h
deleted file mode 100644
index b28b74ff..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_imgbtn.h
+++ /dev/null
@@ -1,230 +0,0 @@
-/**
- * @file lv_imgbtn.h
- *
- */
-
-#ifndef LV_IMGBTN_H
-#define LV_IMGBTN_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_IMGBTN != 0
-
-/*Testing of dependencies*/
-#if LV_USE_BTN == 0
-#error "lv_imgbtn: lv_btn is required. Enable it in lv_conf.h (LV_USE_BTN 1) "
-#endif
-
-#include "../lv_core/lv_obj.h"
-#include "lv_btn.h"
-#include "../lv_draw/lv_draw_img.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-/*Data of image button*/
-typedef struct
-{
- lv_btn_ext_t btn; /*Ext. of ancestor*/
- /*New data for this type */
-#if LV_IMGBTN_TILED == 0
- const void * img_src[_LV_BTN_STATE_NUM]; /*Store images to each state*/
-#else
- const void * img_src_left[_LV_BTN_STATE_NUM]; /*Store left side images to each state*/
- const void * img_src_mid[_LV_BTN_STATE_NUM]; /*Store center images to each state*/
- const void * img_src_right[_LV_BTN_STATE_NUM]; /*Store right side images to each state*/
-#endif
- lv_img_cf_t act_cf; /*Color format of the currently active image*/
-} lv_imgbtn_ext_t;
-
-/*Styles*/
-enum {
- LV_IMGBTN_STYLE_REL, /**< Same meaning as ordinary button styles. */
- LV_IMGBTN_STYLE_PR,
- LV_IMGBTN_STYLE_TGL_REL,
- LV_IMGBTN_STYLE_TGL_PR,
- LV_IMGBTN_STYLE_INA,
-};
-typedef uint8_t lv_imgbtn_style_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Create a image button objects
- * @param par pointer to an object, it will be the parent of the new image button
- * @param copy pointer to a image button object, if not NULL then the new object will be copied from
- * it
- * @return pointer to the created image button
- */
-lv_obj_t * lv_imgbtn_create(lv_obj_t * par, const lv_obj_t * copy);
-
-/*======================
- * Add/remove functions
- *=====================*/
-
-/*=====================
- * Setter functions
- *====================*/
-
-#if LV_IMGBTN_TILED == 0
-/**
- * Set images for a state of the image button
- * @param imgbtn pointer to an image button object
- * @param state for which state set the new image (from `lv_btn_state_t`) `
- * @param src pointer to an image source (a C array or path to a file)
- */
-void lv_imgbtn_set_src(lv_obj_t * imgbtn, lv_btn_state_t state, const void * src);
-#else
-/**
- * Set images for a state of the image button
- * @param imgbtn pointer to an image button object
- * @param state for which state set the new image (from `lv_btn_state_t`) `
- * @param src_left pointer to an image source for the left side of the button (a C array or path to
- * a file)
- * @param src_mid pointer to an image source for the middle of the button (ideally 1px wide) (a C
- * array or path to a file)
- * @param src_right pointer to an image source for the right side of the button (a C array or path
- * to a file)
- */
-void lv_imgbtn_set_src(lv_obj_t * imgbtn, lv_btn_state_t state, const void * src_left, const void * src_mid,
- const void * src_right);
-
-#endif
-
-/**
- * Enable the toggled states. On release the button will change from/to toggled state.
- * @param imgbtn pointer to an image button object
- * @param tgl true: enable toggled states, false: disable
- */
-static inline void lv_imgbtn_set_toggle(lv_obj_t * imgbtn, bool tgl)
-{
- lv_btn_set_toggle(imgbtn, tgl);
-}
-
-/**
- * Set the state of the image button
- * @param imgbtn pointer to an image button object
- * @param state the new state of the button (from lv_btn_state_t enum)
- */
-static inline void lv_imgbtn_set_state(lv_obj_t * imgbtn, lv_btn_state_t state)
-{
- lv_btn_set_state(imgbtn, state);
-}
-
-/**
- * Toggle the state of the image button (ON->OFF, OFF->ON)
- * @param imgbtn pointer to a image button object
- */
-static inline void lv_imgbtn_toggle(lv_obj_t * imgbtn)
-{
- lv_btn_toggle(imgbtn);
-}
-
-/**
- * Set a style of a image button.
- * @param imgbtn pointer to image button object
- * @param type which style should be set
- * @param style pointer to a style
- */
-void lv_imgbtn_set_style(lv_obj_t * imgbtn, lv_imgbtn_style_t type, const lv_style_t * style);
-
-/*=====================
- * Getter functions
- *====================*/
-
-#if LV_IMGBTN_TILED == 0
-/**
- * Get the images in a given state
- * @param imgbtn pointer to an image button object
- * @param state the state where to get the image (from `lv_btn_state_t`) `
- * @return pointer to an image source (a C array or path to a file)
- */
-const void * lv_imgbtn_get_src(lv_obj_t * imgbtn, lv_btn_state_t state);
-
-#else
-
-/**
- * Get the left image in a given state
- * @param imgbtn pointer to an image button object
- * @param state the state where to get the image (from `lv_btn_state_t`) `
- * @return pointer to the left image source (a C array or path to a file)
- */
-const void * lv_imgbtn_get_src_left(lv_obj_t * imgbtn, lv_btn_state_t state);
-
-/**
- * Get the middle image in a given state
- * @param imgbtn pointer to an image button object
- * @param state the state where to get the image (from `lv_btn_state_t`) `
- * @return pointer to the middle image source (a C array or path to a file)
- */
-const void * lv_imgbtn_get_src_middle(lv_obj_t * imgbtn, lv_btn_state_t state);
-
-/**
- * Get the right image in a given state
- * @param imgbtn pointer to an image button object
- * @param state the state where to get the image (from `lv_btn_state_t`) `
- * @return pointer to the left image source (a C array or path to a file)
- */
-const void * lv_imgbtn_get_src_right(lv_obj_t * imgbtn, lv_btn_state_t state);
-
-#endif
-/**
- * Get the current state of the image button
- * @param imgbtn pointer to a image button object
- * @return the state of the button (from lv_btn_state_t enum)
- */
-static inline lv_btn_state_t lv_imgbtn_get_state(const lv_obj_t * imgbtn)
-{
- return lv_btn_get_state(imgbtn);
-}
-
-/**
- * Get the toggle enable attribute of the image button
- * @param imgbtn pointer to a image button object
- * @return ture: toggle enabled, false: disabled
- */
-static inline bool lv_imgbtn_get_toggle(const lv_obj_t * imgbtn)
-{
- return lv_btn_get_toggle(imgbtn);
-}
-
-/**
- * Get style of a image button.
- * @param imgbtn pointer to image button object
- * @param type which style should be get
- * @return style pointer to the style
- */
-const lv_style_t * lv_imgbtn_get_style(const lv_obj_t * imgbtn, lv_imgbtn_style_t type);
-
-/*=====================
- * Other functions
- *====================*/
-
-/**********************
- * MACROS
- **********************/
-
-#endif /*LV_USE_IMGBTN*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_IMGBTN_H*/
diff --git a/src/libs/lvgl/src/lv_objx/lv_kb.c b/src/libs/lvgl/src/lv_objx/lv_kb.c
deleted file mode 100644
index 1913316a..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_kb.c
+++ /dev/null
@@ -1,471 +0,0 @@
-
-/**
- * @file lv_kb.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_kb.h"
-#if LV_USE_KB != 0
-
-#include "../lv_core/lv_debug.h"
-#include "../lv_themes/lv_theme.h"
-#include "lv_ta.h"
-
-/*********************
- * DEFINES
- *********************/
-#define LV_OBJX_NAME "lv_kb"
-
-#define LV_KB_CTRL_BTN_FLAGS (LV_BTNM_CTRL_NO_REPEAT | LV_BTNM_CTRL_CLICK_TRIG)
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static lv_res_t lv_kb_signal(lv_obj_t * kb, lv_signal_t sign, void * param);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_signal_cb_t ancestor_signal;
-/* clang-format off */
-static const char * kb_map_lc[] = {"1#", "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", LV_SYMBOL_BACKSPACE, "\n",
- "ABC", "a", "s", "d", "f", "g", "h", "j", "k", "l", LV_SYMBOL_NEW_LINE, "\n",
- "_", "-", "z", "x", "c", "v", "b", "n", "m", ".", ",", ":", "\n",
- LV_SYMBOL_CLOSE, LV_SYMBOL_LEFT, " ", LV_SYMBOL_RIGHT, LV_SYMBOL_OK, ""};
-
-static const lv_btnm_ctrl_t kb_ctrl_lc_map[] = {
- LV_KB_CTRL_BTN_FLAGS | 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7,
- LV_KB_CTRL_BTN_FLAGS | 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- LV_KB_CTRL_BTN_FLAGS | 2, 2, 6, 2, LV_KB_CTRL_BTN_FLAGS | 2};
-
-static const char * kb_map_uc[] = {"1#", "Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", LV_SYMBOL_BACKSPACE, "\n",
- "abc", "A", "S", "D", "F", "G", "H", "J", "K", "L", LV_SYMBOL_NEW_LINE, "\n",
- "_", "-", "Z", "X", "C", "V", "B", "N", "M", ".", ",", ":", "\n",
- LV_SYMBOL_CLOSE, LV_SYMBOL_LEFT, " ", LV_SYMBOL_RIGHT, LV_SYMBOL_OK, ""};
-
-static const lv_btnm_ctrl_t kb_ctrl_uc_map[] = {
- LV_KB_CTRL_BTN_FLAGS | 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7,
- LV_KB_CTRL_BTN_FLAGS | 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- LV_KB_CTRL_BTN_FLAGS | 2, 2, 6, 2, LV_KB_CTRL_BTN_FLAGS | 2};
-
-static const char * kb_map_spec[] = {"0", "1", "2", "3", "4" ,"5", "6", "7", "8", "9", LV_SYMBOL_BACKSPACE, "\n",
- "abc", "+", "-", "/", "*", "=", "%", "!", "?", "#", "<", ">", "\n",
- "\\", "@", "$", "(", ")", "{", "}", "[", "]", ";", "\"", "'", "\n",
- LV_SYMBOL_CLOSE, LV_SYMBOL_LEFT, " ", LV_SYMBOL_RIGHT, LV_SYMBOL_OK, ""};
-
-static const lv_btnm_ctrl_t kb_ctrl_spec_map[] = {
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, LV_KB_CTRL_BTN_FLAGS | 2,
- LV_KB_CTRL_BTN_FLAGS | 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- LV_KB_CTRL_BTN_FLAGS | 2, 2, 6, 2, LV_KB_CTRL_BTN_FLAGS | 2};
-
-static const char * kb_map_num[] = {"1", "2", "3", LV_SYMBOL_CLOSE, "\n",
- "4", "5", "6", LV_SYMBOL_OK, "\n",
- "7", "8", "9", LV_SYMBOL_BACKSPACE, "\n",
- "+/-", "0", ".", LV_SYMBOL_LEFT, LV_SYMBOL_RIGHT, ""};
-
-static const lv_btnm_ctrl_t kb_ctrl_num_map[] = {
- 1, 1, 1, LV_KB_CTRL_BTN_FLAGS | 2,
- 1, 1, 1, LV_KB_CTRL_BTN_FLAGS | 2,
- 1, 1, 1, 2,
- 1, 1, 1, 1, 1};
-/* clang-format on */
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Create a keyboard objects
- * @param par pointer to an object, it will be the parent of the new keyboard
- * @param copy pointer to a keyboard object, if not NULL then the new object will be copied from it
- * @return pointer to the created keyboard
- */
-lv_obj_t * lv_kb_create(lv_obj_t * par, const lv_obj_t * copy)
-{
- LV_LOG_TRACE("keyboard create started");
-
- /*Create the ancestor of keyboard*/
- lv_obj_t * new_kb = lv_btnm_create(par, copy);
- LV_ASSERT_MEM(new_kb);
- if(new_kb == NULL) return NULL;
-
- if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_kb);
-
- /*Allocate the keyboard type specific extended data*/
- lv_kb_ext_t * ext = lv_obj_allocate_ext_attr(new_kb, sizeof(lv_kb_ext_t));
- LV_ASSERT_MEM(ext);
- if(ext == NULL) return NULL;
-
- /*Initialize the allocated 'ext' */
-
- ext->ta = NULL;
- ext->mode = LV_KB_MODE_TEXT;
- ext->cursor_mng = 0;
-
- /*The signal and design functions are not copied so set them here*/
- lv_obj_set_signal_cb(new_kb, lv_kb_signal);
-
- /*Init the new keyboard keyboard*/
- if(copy == NULL) {
- /* Set a size which fits into the parent.
- * Don't use `par` directly because if the window is created on a page it is moved to the
- * scrollable so the parent has changed */
- lv_obj_set_size(new_kb, lv_obj_get_width_fit(lv_obj_get_parent(new_kb)),
- lv_obj_get_height_fit(lv_obj_get_parent(new_kb)) / 2);
-
- lv_obj_align(new_kb, NULL, LV_ALIGN_IN_BOTTOM_MID, 0, 0);
- lv_obj_set_event_cb(new_kb, lv_kb_def_event_cb);
- lv_btnm_set_map(new_kb, kb_map_lc);
- lv_btnm_set_ctrl_map(new_kb, kb_ctrl_lc_map);
- lv_obj_set_base_dir(new_kb, LV_BIDI_DIR_LTR);
-
- /*Set the default styles*/
- lv_theme_t * th = lv_theme_get_current();
- if(th) {
- lv_kb_set_style(new_kb, LV_KB_STYLE_BG, th->style.kb.bg);
- lv_kb_set_style(new_kb, LV_KB_STYLE_BTN_REL, th->style.kb.btn.rel);
- lv_kb_set_style(new_kb, LV_KB_STYLE_BTN_PR, th->style.kb.btn.pr);
- lv_kb_set_style(new_kb, LV_KB_STYLE_BTN_TGL_REL, th->style.kb.btn.tgl_rel);
- lv_kb_set_style(new_kb, LV_KB_STYLE_BTN_TGL_PR, th->style.kb.btn.tgl_pr);
- lv_kb_set_style(new_kb, LV_KB_STYLE_BTN_INA, th->style.kb.btn.ina);
- } else {
- /*Let the button matrix's styles*/
- }
- }
- /*Copy an existing keyboard*/
- else {
- lv_kb_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
- ext->ta = NULL;
- ext->ta = copy_ext->ta;
- ext->mode = copy_ext->mode;
- ext->cursor_mng = copy_ext->cursor_mng;
-
- /*Refresh the style with new signal function*/
- lv_obj_refresh_style(new_kb);
- }
-
- LV_LOG_INFO("keyboard created");
-
- return new_kb;
-}
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Assign a Text Area to the Keyboard. The pressed characters will be put there.
- * @param kb pointer to a Keyboard object
- * @param ta pointer to a Text Area object to write there
- */
-void lv_kb_set_ta(lv_obj_t * kb, lv_obj_t * ta)
-{
- LV_ASSERT_OBJ(kb, LV_OBJX_NAME);
- if(ta) LV_ASSERT_OBJ(ta, "lv_ta");
-
- lv_kb_ext_t * ext = lv_obj_get_ext_attr(kb);
- lv_cursor_type_t cur_type;
-
- /*Hide the cursor of the old Text area if cursor management is enabled*/
- if(ext->ta && ext->cursor_mng) {
- cur_type = lv_ta_get_cursor_type(ext->ta);
- lv_ta_set_cursor_type(ext->ta, cur_type | LV_CURSOR_HIDDEN);
- }
-
- ext->ta = ta;
-
- /*Show the cursor of the new Text area if cursor management is enabled*/
- if(ext->ta && ext->cursor_mng) {
- cur_type = lv_ta_get_cursor_type(ext->ta);
- lv_ta_set_cursor_type(ext->ta, cur_type & (~LV_CURSOR_HIDDEN));
- }
-}
-
-/**
- * Set a new a mode (text or number map)
- * @param kb pointer to a Keyboard object
- * @param mode the mode from 'lv_kb_mode_t'
- */
-void lv_kb_set_mode(lv_obj_t * kb, lv_kb_mode_t mode)
-{
- LV_ASSERT_OBJ(kb, LV_OBJX_NAME);
-
- lv_kb_ext_t * ext = lv_obj_get_ext_attr(kb);
- if(ext->mode == mode) return;
-
- ext->mode = mode;
- if(mode == LV_KB_MODE_TEXT) {
- lv_btnm_set_map(kb, kb_map_lc);
- lv_btnm_set_ctrl_map(kb, kb_ctrl_lc_map);
- } else if(mode == LV_KB_MODE_NUM) {
- lv_btnm_set_map(kb, kb_map_num);
- lv_btnm_set_ctrl_map(kb, kb_ctrl_num_map);
- } else if(mode == LV_KB_MODE_TEXT_UPPER) {
- lv_btnm_set_map(kb, kb_map_uc);
- lv_btnm_set_ctrl_map(kb, kb_ctrl_uc_map);
- }
-}
-
-/**
- * Automatically hide or show the cursor of Text Area
- * @param kb pointer to a Keyboard object
- * @param en true: show cursor on the current text area, false: hide cursor
- */
-void lv_kb_set_cursor_manage(lv_obj_t * kb, bool en)
-{
- LV_ASSERT_OBJ(kb, LV_OBJX_NAME);
-
- lv_kb_ext_t * ext = lv_obj_get_ext_attr(kb);
- if(ext->cursor_mng == en) return;
-
- ext->cursor_mng = en == false ? 0 : 1;
-
- if(ext->ta) {
- lv_cursor_type_t cur_type;
- cur_type = lv_ta_get_cursor_type(ext->ta);
-
- if(ext->cursor_mng) {
- lv_ta_set_cursor_type(ext->ta, cur_type & (~LV_CURSOR_HIDDEN));
- } else {
- lv_ta_set_cursor_type(ext->ta, cur_type | LV_CURSOR_HIDDEN);
- }
- }
-}
-
-/**
- * Set a style of a keyboard
- * @param kb pointer to a keyboard object
- * @param type which style should be set
- * @param style pointer to a style
- */
-void lv_kb_set_style(lv_obj_t * kb, lv_kb_style_t type, const lv_style_t * style)
-{
- LV_ASSERT_OBJ(kb, LV_OBJX_NAME);
-
- switch(type) {
- case LV_KB_STYLE_BG: lv_btnm_set_style(kb, LV_BTNM_STYLE_BG, style); break;
- case LV_KB_STYLE_BTN_REL: lv_btnm_set_style(kb, LV_BTNM_STYLE_BTN_REL, style); break;
- case LV_KB_STYLE_BTN_PR: lv_btnm_set_style(kb, LV_BTNM_STYLE_BTN_PR, style); break;
- case LV_KB_STYLE_BTN_TGL_REL: lv_btnm_set_style(kb, LV_BTNM_STYLE_BTN_TGL_REL, style); break;
- case LV_KB_STYLE_BTN_TGL_PR: lv_btnm_set_style(kb, LV_BTNM_STYLE_BTN_TGL_PR, style); break;
- case LV_KB_STYLE_BTN_INA: lv_btnm_set_style(kb, LV_BTNM_STYLE_BTN_INA, style); break;
- }
-}
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Assign a Text Area to the Keyboard. The pressed characters will be put there.
- * @param kb pointer to a Keyboard object
- * @return pointer to the assigned Text Area object
- */
-lv_obj_t * lv_kb_get_ta(const lv_obj_t * kb)
-{
- LV_ASSERT_OBJ(kb, LV_OBJX_NAME);
-
- lv_kb_ext_t * ext = lv_obj_get_ext_attr(kb);
- return ext->ta;
-}
-
-/**
- * Set a new a mode (text or number map)
- * @param kb pointer to a Keyboard object
- * @return the current mode from 'lv_kb_mode_t'
- */
-lv_kb_mode_t lv_kb_get_mode(const lv_obj_t * kb)
-{
- LV_ASSERT_OBJ(kb, LV_OBJX_NAME);
-
- lv_kb_ext_t * ext = lv_obj_get_ext_attr(kb);
- return ext->mode;
-}
-
-/**
- * Get the current cursor manage mode.
- * @param kb pointer to a Keyboard object
- * @return true: show cursor on the current text area, false: hide cursor
- */
-bool lv_kb_get_cursor_manage(const lv_obj_t * kb)
-{
- LV_ASSERT_OBJ(kb, LV_OBJX_NAME);
-
- lv_kb_ext_t * ext = lv_obj_get_ext_attr(kb);
- return ext->cursor_mng == 0 ? false : true;
-}
-
-/**
- * Get a style of a keyboard
- * @param kb pointer to a keyboard object
- * @param type which style should be get
- * @return style pointer to a style
- */
-const lv_style_t * lv_kb_get_style(const lv_obj_t * kb, lv_kb_style_t type)
-{
- LV_ASSERT_OBJ(kb, LV_OBJX_NAME);
-
- const lv_style_t * style = NULL;
-
- switch(type) {
- case LV_KB_STYLE_BG: style = lv_btnm_get_style(kb, LV_BTNM_STYLE_BG); break;
- case LV_KB_STYLE_BTN_REL: style = lv_btnm_get_style(kb, LV_BTNM_STYLE_BTN_REL); break;
- case LV_KB_STYLE_BTN_PR: style = lv_btnm_get_style(kb, LV_BTNM_STYLE_BTN_PR); break;
- case LV_KB_STYLE_BTN_TGL_REL: style = lv_btnm_get_style(kb, LV_BTNM_STYLE_BTN_TGL_REL); break;
- case LV_KB_STYLE_BTN_TGL_PR: style = lv_btnm_get_style(kb, LV_BTNM_STYLE_BTN_TGL_PR); break;
- case LV_KB_STYLE_BTN_INA: style = lv_btnm_get_style(kb, LV_BTNM_STYLE_BTN_INA); break;
- default: style = NULL; break;
- }
-
- return style;
-}
-
-/*=====================
- * Other functions
- *====================*/
-
-/**
- * Default keyboard event to add characters to the Text area and change the map.
- * If a custom `event_cb` is added to the keyboard this function be called from it to handle the
- * button clicks
- * @param kb pointer to a keyboard
- * @param event the triggering event
- */
-void lv_kb_def_event_cb(lv_obj_t * kb, lv_event_t event)
-{
- LV_ASSERT_OBJ(kb, LV_OBJX_NAME);
-
- if(event != LV_EVENT_VALUE_CHANGED) return;
-
- lv_kb_ext_t * ext = lv_obj_get_ext_attr(kb);
- uint16_t btn_id = lv_btnm_get_active_btn(kb);
- if(btn_id == LV_BTNM_BTN_NONE) return;
- if(lv_btnm_get_btn_ctrl(kb, btn_id, LV_BTNM_CTRL_HIDDEN | LV_BTNM_CTRL_INACTIVE)) return;
- if(lv_btnm_get_btn_ctrl(kb, btn_id, LV_BTNM_CTRL_NO_REPEAT) && event == LV_EVENT_LONG_PRESSED_REPEAT) return;
-
- const char * txt = lv_btnm_get_active_btn_text(kb);
- if(txt == NULL) return;
-
- /*Do the corresponding action according to the text of the button*/
- if(strcmp(txt, "abc") == 0) {
- lv_btnm_set_map(kb, kb_map_lc);
- lv_btnm_set_ctrl_map(kb, kb_ctrl_lc_map);
- return;
- } else if(strcmp(txt, "ABC") == 0) {
- lv_btnm_set_map(kb, kb_map_uc);
- lv_btnm_set_ctrl_map(kb, kb_ctrl_uc_map);
- return;
- } else if(strcmp(txt, "1#") == 0) {
- lv_btnm_set_map(kb, kb_map_spec);
- lv_btnm_set_ctrl_map(kb, kb_ctrl_spec_map);
- return;
- } else if(strcmp(txt, LV_SYMBOL_CLOSE) == 0) {
- if(kb->event_cb != lv_kb_def_event_cb) {
- lv_res_t res = lv_event_send(kb, LV_EVENT_CANCEL, NULL);
- if(res != LV_RES_OK) return;
- } else {
- lv_kb_set_ta(kb, NULL); /*De-assign the text area to hide it cursor if needed*/
- lv_obj_del(kb);
- return;
- }
- return;
- } else if(strcmp(txt, LV_SYMBOL_OK) == 0) {
- if(kb->event_cb != lv_kb_def_event_cb) {
- lv_res_t res = lv_event_send(kb, LV_EVENT_APPLY, NULL);
- if(res != LV_RES_OK) return;
- } else {
- lv_kb_set_ta(kb, NULL); /*De-assign the text area to hide it cursor if needed*/
- }
- return;
- }
-
- /*Add the characters to the text area if set*/
- if(ext->ta == NULL) return;
-
- if(strcmp(txt, "Enter") == 0 || strcmp(txt, LV_SYMBOL_NEW_LINE) == 0)
- lv_ta_add_char(ext->ta, '\n');
- else if(strcmp(txt, LV_SYMBOL_LEFT) == 0)
- lv_ta_cursor_left(ext->ta);
- else if(strcmp(txt, LV_SYMBOL_RIGHT) == 0)
- lv_ta_cursor_right(ext->ta);
- else if(strcmp(txt, LV_SYMBOL_BACKSPACE) == 0)
- lv_ta_del_char(ext->ta);
- else if(strcmp(txt, "+/-") == 0) {
- uint16_t cur = lv_ta_get_cursor_pos(ext->ta);
- const char * ta_txt = lv_ta_get_text(ext->ta);
- if(ta_txt[0] == '-') {
- lv_ta_set_cursor_pos(ext->ta, 1);
- lv_ta_del_char(ext->ta);
- lv_ta_add_char(ext->ta, '+');
- lv_ta_set_cursor_pos(ext->ta, cur);
- } else if(ta_txt[0] == '+') {
- lv_ta_set_cursor_pos(ext->ta, 1);
- lv_ta_del_char(ext->ta);
- lv_ta_add_char(ext->ta, '-');
- lv_ta_set_cursor_pos(ext->ta, cur);
- } else {
- lv_ta_set_cursor_pos(ext->ta, 0);
- lv_ta_add_char(ext->ta, '-');
- lv_ta_set_cursor_pos(ext->ta, cur + 1);
- }
- } else {
- lv_ta_add_text(ext->ta, txt);
- }
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Signal function of the keyboard
- * @param kb pointer to a keyboard object
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_kb_signal(lv_obj_t * kb, lv_signal_t sign, void * param)
-{
- lv_res_t res;
-
- /* Include the ancient signal function */
- res = ancestor_signal(kb, sign, param);
- if(res != LV_RES_OK) return res;
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);
-
- if(sign == LV_SIGNAL_CLEANUP) {
- /*Nothing to cleanup. (No dynamically allocated memory in 'ext')*/
- } else if(sign == LV_SIGNAL_FOCUS) {
- lv_kb_ext_t * ext = lv_obj_get_ext_attr(kb);
- /*Show the cursor of the new Text area if cursor management is enabled*/
- if(ext->ta && ext->cursor_mng) {
- lv_cursor_type_t cur_type = lv_ta_get_cursor_type(ext->ta);
- lv_ta_set_cursor_type(ext->ta, cur_type & (~LV_CURSOR_HIDDEN));
- }
- } else if(sign == LV_SIGNAL_DEFOCUS) {
- lv_kb_ext_t * ext = lv_obj_get_ext_attr(kb);
- /*Show the cursor of the new Text area if cursor management is enabled*/
- if(ext->ta && ext->cursor_mng) {
- lv_cursor_type_t cur_type = lv_ta_get_cursor_type(ext->ta);
- lv_ta_set_cursor_type(ext->ta, cur_type | LV_CURSOR_HIDDEN);
- }
- }
-
- return res;
-}
-
-#endif
diff --git a/src/libs/lvgl/src/lv_objx/lv_kb.h b/src/libs/lvgl/src/lv_objx/lv_kb.h
deleted file mode 100644
index 74d9c1f0..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_kb.h
+++ /dev/null
@@ -1,207 +0,0 @@
-/**
- * @file lv_kb.h
- *
- */
-
-#ifndef LV_KB_H
-#define LV_KB_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_KB != 0
-
-/*Testing of dependencies*/
-#if LV_USE_BTNM == 0
-#error "lv_kb: lv_btnm is required. Enable it in lv_conf.h (LV_USE_BTNM 1) "
-#endif
-
-#if LV_USE_TA == 0
-#error "lv_kb: lv_ta is required. Enable it in lv_conf.h (LV_USE_TA 1) "
-#endif
-
-#include "../lv_core/lv_obj.h"
-#include "lv_btnm.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/** Current keyboard mode. */
-enum {
- LV_KB_MODE_TEXT,
- LV_KB_MODE_NUM,
- LV_KB_MODE_TEXT_UPPER,
-};
-typedef uint8_t lv_kb_mode_t;
-
-/*Data of keyboard*/
-typedef struct
-{
- lv_btnm_ext_t btnm; /*Ext. of ancestor*/
- /*New data for this type */
- lv_obj_t * ta; /*Pointer to the assigned text area*/
- lv_kb_mode_t mode; /*Key map type*/
- uint8_t cursor_mng : 1; /*1: automatically show/hide cursor when a text area is assigned or left*/
-} lv_kb_ext_t;
-
-enum {
- LV_KB_STYLE_BG,
- LV_KB_STYLE_BTN_REL,
- LV_KB_STYLE_BTN_PR,
- LV_KB_STYLE_BTN_TGL_REL,
- LV_KB_STYLE_BTN_TGL_PR,
- LV_KB_STYLE_BTN_INA,
-};
-typedef uint8_t lv_kb_style_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Create a keyboard objects
- * @param par pointer to an object, it will be the parent of the new keyboard
- * @param copy pointer to a keyboard object, if not NULL then the new object will be copied from it
- * @return pointer to the created keyboard
- */
-lv_obj_t * lv_kb_create(lv_obj_t * par, const lv_obj_t * copy);
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Assign a Text Area to the Keyboard. The pressed characters will be put there.
- * @param kb pointer to a Keyboard object
- * @param ta pointer to a Text Area object to write there
- */
-void lv_kb_set_ta(lv_obj_t * kb, lv_obj_t * ta);
-
-/**
- * Set a new a mode (text or number map)
- * @param kb pointer to a Keyboard object
- * @param mode the mode from 'lv_kb_mode_t'
- */
-void lv_kb_set_mode(lv_obj_t * kb, lv_kb_mode_t mode);
-
-/**
- * Automatically hide or show the cursor of the current Text Area
- * @param kb pointer to a Keyboard object
- * @param en true: show cursor on the current text area, false: hide cursor
- */
-void lv_kb_set_cursor_manage(lv_obj_t * kb, bool en);
-
-/**
- * Set a new map for the keyboard
- * @param kb pointer to a Keyboard object
- * @param map pointer to a string array to describe the map.
- * See 'lv_btnm_set_map()' for more info.
- */
-static inline void lv_kb_set_map(lv_obj_t * kb, const char * map[])
-{
- lv_btnm_set_map(kb, map);
-}
-
-/**
- * Set the button control map (hidden, disabled etc.) for the keyboard. The
- * control map array will be copied and so may be deallocated after this
- * function returns.
- * @param kb pointer to a keyboard object
- * @param ctrl_map pointer to an array of `lv_btn_ctrl_t` control bytes.
- * See: `lv_btnm_set_ctrl_map` for more details.
- */
-static inline void lv_kb_set_ctrl_map(lv_obj_t * kb, const lv_btnm_ctrl_t ctrl_map[])
-{
- lv_btnm_set_ctrl_map(kb, ctrl_map);
-}
-
-/**
- * Set a style of a keyboard
- * @param kb pointer to a keyboard object
- * @param type which style should be set
- * @param style pointer to a style
- */
-void lv_kb_set_style(lv_obj_t * kb, lv_kb_style_t type, const lv_style_t * style);
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Assign a Text Area to the Keyboard. The pressed characters will be put there.
- * @param kb pointer to a Keyboard object
- * @return pointer to the assigned Text Area object
- */
-lv_obj_t * lv_kb_get_ta(const lv_obj_t * kb);
-
-/**
- * Set a new a mode (text or number map)
- * @param kb pointer to a Keyboard object
- * @return the current mode from 'lv_kb_mode_t'
- */
-lv_kb_mode_t lv_kb_get_mode(const lv_obj_t * kb);
-
-/**
- * Get the current cursor manage mode.
- * @param kb pointer to a Keyboard object
- * @return true: show cursor on the current text area, false: hide cursor
- */
-bool lv_kb_get_cursor_manage(const lv_obj_t * kb);
-
-/**
- * Get the current map of a keyboard
- * @param kb pointer to a keyboard object
- * @return the current map
- */
-static inline const char ** lv_kb_get_map_array(const lv_obj_t * kb)
-{
- return lv_btnm_get_map_array(kb);
-}
-
-/**
- * Get a style of a keyboard
- * @param kb pointer to a keyboard object
- * @param type which style should be get
- * @return style pointer to a style
- */
-const lv_style_t * lv_kb_get_style(const lv_obj_t * kb, lv_kb_style_t type);
-
-/*=====================
- * Other functions
- *====================*/
-
-/**
- * Default keyboard event to add characters to the Text area and change the map.
- * If a custom `event_cb` is added to the keyboard this function be called from it to handle the
- * button clicks
- * @param kb pointer to a keyboard
- * @param event the triggering event
- */
-void lv_kb_def_event_cb(lv_obj_t * kb, lv_event_t event);
-
-/**********************
- * MACROS
- **********************/
-
-#endif /*LV_USE_KB*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_KB_H*/
diff --git a/src/libs/lvgl/src/lv_objx/lv_label.c b/src/libs/lvgl/src/lv_objx/lv_label.c
deleted file mode 100644
index 5c870d05..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_label.c
+++ /dev/null
@@ -1,1441 +0,0 @@
-/**
- * @file lv_rect.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_label.h"
-#if LV_USE_LABEL != 0
-
-#include "../lv_core/lv_obj.h"
-#include "../lv_core/lv_debug.h"
-#include "../lv_core/lv_group.h"
-#include "../lv_misc/lv_color.h"
-#include "../lv_misc/lv_math.h"
-#include "../lv_misc/lv_bidi.h"
-#include "../lv_misc/lv_printf.h"
-
-/*********************
- * DEFINES
- *********************/
-#define LV_OBJX_NAME "lv_label"
-
-/*Test configurations*/
-#ifndef LV_LABEL_DEF_SCROLL_SPEED
-#define LV_LABEL_DEF_SCROLL_SPEED (25)
-#endif
-
-#define LV_LABEL_DOT_END_INV 0xFFFF
-#define LV_LABEL_HINT_HEIGHT_LIMIT \
- 1024 /*Enable "hint" to buffer info about labels larger than this. (Speed up their drawing)*/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static lv_res_t lv_label_signal(lv_obj_t * label, lv_signal_t sign, void * param);
-static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_mode_t mode);
-static void lv_label_refr_text(lv_obj_t * label);
-static void lv_label_revert_dots(lv_obj_t * label);
-
-#if LV_USE_ANIMATION
-static void lv_label_set_offset_x(lv_obj_t * label, lv_coord_t x);
-static void lv_label_set_offset_y(lv_obj_t * label, lv_coord_t y);
-#endif
-
-static bool lv_label_set_dot_tmp(lv_obj_t * label, char * data, uint16_t len);
-static char * lv_label_get_dot_tmp(lv_obj_t * label);
-static void lv_label_dot_tmp_free(lv_obj_t * label);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_signal_cb_t ancestor_signal;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Create a label objects
- * @param par pointer to an object, it will be the parent of the new label
- * @param copy pointer to a button object, if not NULL then the new object will be copied from it
- * @return pointer to the created button
- */
-lv_obj_t * lv_label_create(lv_obj_t * par, const lv_obj_t * copy)
-{
- LV_LOG_TRACE("label create started");
-
- /*Create a basic object*/
- lv_obj_t * new_label = lv_obj_create(par, copy);
- LV_ASSERT_MEM(new_label);
- if(new_label == NULL) return NULL;
-
- if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_label);
-
- /*Extend the basic object to a label object*/
- lv_obj_allocate_ext_attr(new_label, sizeof(lv_label_ext_t));
-
- lv_label_ext_t * ext = lv_obj_get_ext_attr(new_label);
- LV_ASSERT_MEM(ext);
- if(ext == NULL) return NULL;
-
- ext->text = NULL;
- ext->static_txt = 0;
- ext->recolor = 0;
- ext->body_draw = 0;
- ext->align = LV_LABEL_ALIGN_AUTO;
- ext->dot_end = LV_LABEL_DOT_END_INV;
- ext->long_mode = LV_LABEL_LONG_EXPAND;
-#if LV_USE_ANIMATION
- ext->anim_speed = LV_LABEL_DEF_SCROLL_SPEED;
-#endif
- ext->offset.x = 0;
- ext->offset.y = 0;
-
-#if LV_LABEL_LONG_TXT_HINT
- ext->hint.line_start = -1;
- ext->hint.coord_y = 0;
- ext->hint.y = 0;
-#endif
-
-#if LV_LABEL_TEXT_SEL
- ext->txt_sel_start = LV_DRAW_LABEL_NO_TXT_SEL;
- ext->txt_sel_end = LV_DRAW_LABEL_NO_TXT_SEL;
-#endif
- ext->dot.tmp_ptr = NULL;
- ext->dot_tmp_alloc = 0;
-
- lv_obj_set_design_cb(new_label, lv_label_design);
- lv_obj_set_signal_cb(new_label, lv_label_signal);
-
- /*Init the new label*/
- if(copy == NULL) {
- lv_obj_set_click(new_label, false);
- lv_label_set_long_mode(new_label, LV_LABEL_LONG_EXPAND);
- lv_label_set_text(new_label, "Text");
- lv_label_set_style(new_label, LV_LABEL_STYLE_MAIN, NULL); /*Inherit parent's style*/
- }
- /*Copy 'copy' if not NULL*/
- else {
- lv_label_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
- lv_label_set_long_mode(new_label, lv_label_get_long_mode(copy));
- lv_label_set_recolor(new_label, lv_label_get_recolor(copy));
- lv_label_set_body_draw(new_label, lv_label_get_body_draw(copy));
- lv_label_set_align(new_label, lv_label_get_align(copy));
- if(copy_ext->static_txt == 0)
- lv_label_set_text(new_label, lv_label_get_text(copy));
- else
- lv_label_set_static_text(new_label, lv_label_get_text(copy));
-
- /*In DOT mode save the text byte-to-byte because a '\0' can be in the middle*/
- if(copy_ext->long_mode == LV_LABEL_LONG_DOT) {
- ext->text = lv_mem_realloc(ext->text, lv_mem_get_size(copy_ext->text));
- LV_ASSERT_MEM(ext->text);
- if(ext->text == NULL) return NULL;
- memcpy(ext->text, copy_ext->text, lv_mem_get_size(copy_ext->text));
- }
-
- if(copy_ext->dot_tmp_alloc && copy_ext->dot.tmp_ptr) {
- uint16_t len = (uint16_t )strlen(copy_ext->dot.tmp_ptr);
- lv_label_set_dot_tmp(new_label, ext->dot.tmp_ptr, len);
- } else {
- memcpy(ext->dot.tmp, copy_ext->dot.tmp, sizeof(ext->dot.tmp));
- }
- ext->dot_tmp_alloc = copy_ext->dot_tmp_alloc;
- ext->dot_end = copy_ext->dot_end;
-
- /*Refresh the style with new signal function*/
- lv_obj_refresh_style(new_label);
- }
-
- LV_LOG_INFO("label created");
-
- return new_label;
-}
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set a new text for a label. Memory will be allocated to store the text by the label.
- * @param label pointer to a label object
- * @param text '\0' terminated character string. NULL to refresh with the current text.
- */
-void lv_label_set_text(lv_obj_t * label, const char * text)
-{
- LV_ASSERT_OBJ(label, LV_OBJX_NAME);
-
- lv_obj_invalidate(label);
-
- lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
-
- /*If text is NULL then refresh */
- if(text == NULL) {
- lv_label_refr_text(label);
- return;
- }
-
- LV_ASSERT_STR(text);
-
- if(ext->text == text) {
- /*If set its own text then reallocate it (maybe its size changed)*/
- ext->text = lv_mem_realloc(ext->text, strlen(ext->text) + 1);
- LV_ASSERT_MEM(ext->text);
- if(ext->text == NULL) return;
- } else {
- /*Allocate space for the new text*/
- size_t len = strlen(text) + 1;
- if(ext->text != NULL && ext->static_txt == 0) {
- lv_mem_free(ext->text);
- ext->text = NULL;
- }
-
- ext->text = lv_mem_alloc(len);
- LV_ASSERT_MEM(ext->text);
- if(ext->text == NULL) return;
-
- strcpy(ext->text, text);
-
- /*Now the text is dynamically allocated*/
- ext->static_txt = 0;
- }
-
- lv_label_refr_text(label);
-}
-
-/**
- * Set a new formatted text for a label. Memory will be allocated to store the text by the label.
- * @param label pointer to a label object
- * @param fmt `printf`-like format
- */
-void lv_label_set_text_fmt(lv_obj_t * label, const char * fmt, ...)
-{
- LV_ASSERT_OBJ(label, LV_OBJX_NAME);
- LV_ASSERT_STR(fmt);
-
- lv_obj_invalidate(label);
-
- lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
-
- /*If text is NULL then refresh */
- if(fmt == NULL) {
- lv_label_refr_text(label);
- return;
- }
-
- if(ext->text != NULL && ext->static_txt == 0) {
- lv_mem_free(ext->text);
- ext->text = NULL;
- }
-
- va_list ap, ap2;
- va_start(ap, fmt);
- va_copy(ap2, ap);
-
- /*Allocate space for the new text by using trick from C99 standard section 7.19.6.12 */
- uint32_t len = lv_vsnprintf(NULL, 0, fmt, ap);
-
- va_end(ap);
-
-
- ext->text = lv_mem_alloc(len+1);
- LV_ASSERT_MEM(ext->text);
- if(ext->text == NULL) return;
- ext->text[len-1] = 0; /* Ensure NULL termination */
-
- lv_vsnprintf(ext->text, len+1, fmt, ap2);
-
- va_end(ap2);
- ext->static_txt = 0; /*Now the text is dynamically allocated*/
-
- lv_label_refr_text(label);
-}
-
-/**
- * Set a new text for a label from a character array. The array don't has to be '\0' terminated.
- * Memory will be allocated to store the array by the label.
- * @param label pointer to a label object
- * @param array array of characters or NULL to refresh the label
- * @param size the size of 'array' in bytes
- */
-void lv_label_set_array_text(lv_obj_t * label, const char * array, uint16_t size)
-{
- LV_ASSERT_OBJ(label, LV_OBJX_NAME);
-
- lv_obj_invalidate(label);
-
- lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
-
- /*If trying to set its own text or the array is NULL then refresh */
- if(array == ext->text || array == NULL) {
- lv_label_refr_text(label);
- return;
- }
-
- /*Allocate space for the new text*/
- if(ext->text != NULL && ext->static_txt == 0) {
- lv_mem_free(ext->text);
- ext->text = NULL;
- }
- ext->text = lv_mem_alloc(size + 1);
- LV_ASSERT_MEM(ext->text);
- if(ext->text == NULL) return;
-
- memcpy(ext->text, array, size);
- ext->text[size] = '\0';
- ext->static_txt = 0; /*Now the text is dynamically allocated*/
-
- lv_label_refr_text(label);
-}
-
-/**
- * Set a static text. It will not be saved by the label so the 'text' variable
- * has to be 'alive' while the label exist.
- * @param label pointer to a label object
- * @param text pointer to a text. NULL to refresh with the current text.
- */
-void lv_label_set_static_text(lv_obj_t * label, const char * text)
-{
- LV_ASSERT_OBJ(label, LV_OBJX_NAME);
-
- lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
- if(ext->static_txt == 0 && ext->text != NULL) {
- lv_mem_free(ext->text);
- ext->text = NULL;
- }
-
- if(text != NULL) {
- ext->static_txt = 1;
- ext->text = (char *)text;
- }
-
- lv_label_refr_text(label);
-}
-
-/**
- * Set the behavior of the label with longer text then the object size
- * @param label pointer to a label object
- * @param long_mode the new mode from 'lv_label_long_mode' enum.
- * In LV_LONG_BREAK/LONG/ROLL the size of the label should be set AFTER this
- * function
- */
-void lv_label_set_long_mode(lv_obj_t * label, lv_label_long_mode_t long_mode)
-{
- LV_ASSERT_OBJ(label, LV_OBJX_NAME);
-
- lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
-
-#if LV_USE_ANIMATION
- /*Delete the old animation (if exists)*/
- lv_anim_del(label, (lv_anim_exec_xcb_t)lv_obj_set_x);
- lv_anim_del(label, (lv_anim_exec_xcb_t)lv_obj_set_y);
- lv_anim_del(label, (lv_anim_exec_xcb_t)lv_label_set_offset_x);
- lv_anim_del(label, (lv_anim_exec_xcb_t)lv_label_set_offset_y);
-#endif
- ext->offset.x = 0;
- ext->offset.y = 0;
-
- if(long_mode == LV_LABEL_LONG_SROLL || long_mode == LV_LABEL_LONG_SROLL_CIRC || long_mode == LV_LABEL_LONG_CROP)
- ext->expand = 1;
- else
- ext->expand = 0;
-
- /*Restore the character under the dots*/
- if(ext->long_mode == LV_LABEL_LONG_DOT && ext->dot_end != LV_LABEL_DOT_END_INV) {
- lv_label_revert_dots(label);
- }
-
- ext->long_mode = long_mode;
- lv_label_refr_text(label);
-}
-
-/**
- * Set the align of the label (left or center)
- * @param label pointer to a label object
- * @param align 'LV_LABEL_ALIGN_LEFT' or 'LV_LABEL_ALIGN_LEFT'
- */
-void lv_label_set_align(lv_obj_t * label, lv_label_align_t align)
-{
- LV_ASSERT_OBJ(label, LV_OBJX_NAME);
-
- lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
- if(ext->align == align) return;
-
- ext->align = align;
-
- lv_obj_invalidate(label); /*Enough to invalidate because alignment is only drawing related
- (lv_refr_label_text() not required)*/
-}
-
-/**
- * Enable the recoloring by in-line commands
- * @param label pointer to a label object
- * @param en true: enable recoloring, false: disable
- */
-void lv_label_set_recolor(lv_obj_t * label, bool en)
-{
- LV_ASSERT_OBJ(label, LV_OBJX_NAME);
-
- lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
- if(ext->recolor == en) return;
-
- ext->recolor = en == false ? 0 : 1;
-
- lv_label_refr_text(label); /*Refresh the text because the potential colo codes in text needs to
- be hided or revealed*/
-}
-
-/**
- * Set the label to draw (or not draw) background specified in its style's body
- * @param label pointer to a label object
- * @param en true: draw body; false: don't draw body
- */
-void lv_label_set_body_draw(lv_obj_t * label, bool en)
-{
- LV_ASSERT_OBJ(label, LV_OBJX_NAME);
-
- lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
- if(ext->body_draw == en) return;
-
- ext->body_draw = en == false ? 0 : 1;
-
- lv_obj_refresh_ext_draw_pad(label);
-
- lv_obj_invalidate(label);
-}
-
-/**
- * Set the label's animation speed in LV_LABEL_LONG_SROLL/SCROLL_CIRC modes
- * @param label pointer to a label object
- * @param anim_speed speed of animation in px/sec unit
- */
-void lv_label_set_anim_speed(lv_obj_t * label, uint16_t anim_speed)
-{
- LV_ASSERT_OBJ(label, LV_OBJX_NAME);
-
-#if LV_USE_ANIMATION
- lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
- if(ext->anim_speed == anim_speed) return;
-
- ext->anim_speed = anim_speed;
-
- if(ext->long_mode == LV_LABEL_LONG_SROLL || ext->long_mode == LV_LABEL_LONG_SROLL_CIRC) {
- lv_label_refr_text(label);
- }
-#else
- (void)label; /*Unused*/
- (void)anim_speed; /*Unused*/
-#endif
-}
-
-void lv_label_set_text_sel_start(lv_obj_t * label, uint16_t index)
-{
- LV_ASSERT_OBJ(label, LV_OBJX_NAME);
-
-#if LV_LABEL_TEXT_SEL
- lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
- ext->txt_sel_start = index;
- lv_obj_invalidate(label);
-#else
- (void)label; /*Unused*/
- (void)index; /*Unused*/
-#endif
-}
-
-void lv_label_set_text_sel_end(lv_obj_t * label, uint16_t index)
-{
- LV_ASSERT_OBJ(label, LV_OBJX_NAME);
-
-#if LV_LABEL_TEXT_SEL
- lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
- ext->txt_sel_end = index;
- lv_obj_invalidate(label);
-#else
- (void)label; /*Unused*/
- (void)index; /*Unused*/
-#endif
-}
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the text of a label
- * @param label pointer to a label object
- * @return the text of the label
- */
-char * lv_label_get_text(const lv_obj_t * label)
-{
- LV_ASSERT_OBJ(label, LV_OBJX_NAME);
-
- lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
-
- return ext->text;
-}
-
-/**
- * Get the long mode of a label
- * @param label pointer to a label object
- * @return the long mode
- */
-lv_label_long_mode_t lv_label_get_long_mode(const lv_obj_t * label)
-{
- LV_ASSERT_OBJ(label, LV_OBJX_NAME);
-
- lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
- return ext->long_mode;
-}
-
-/**
- * Get the align attribute
- * @param label pointer to a label object
- * @return LV_LABEL_ALIGN_LEFT or LV_LABEL_ALIGN_CENTER
- */
-lv_label_align_t lv_label_get_align(const lv_obj_t * label)
-{
- LV_ASSERT_OBJ(label, LV_OBJX_NAME);
-
- lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
-
- lv_label_align_t align = ext->align;
-
- if(align == LV_LABEL_ALIGN_AUTO) {
-#if LV_USE_BIDI
- lv_bidi_dir_t base_dir = lv_obj_get_base_dir(label);
- if(base_dir == LV_BIDI_DIR_AUTO) base_dir = lv_bidi_detect_base_dir(ext->text);
-
- if(base_dir == LV_BIDI_DIR_LTR) align = LV_LABEL_ALIGN_LEFT;
- else if (base_dir == LV_BIDI_DIR_RTL) align = LV_LABEL_ALIGN_RIGHT;
-#else
- align = LV_LABEL_ALIGN_LEFT;
-#endif
- }
-
- return align;
-}
-
-/**
- * Get the recoloring attribute
- * @param label pointer to a label object
- * @return true: recoloring is enabled, false: disable
- */
-bool lv_label_get_recolor(const lv_obj_t * label)
-{
- LV_ASSERT_OBJ(label, LV_OBJX_NAME);
-
- lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
- return ext->recolor == 0 ? false : true;
-}
-
-/**
- * Get the body draw attribute
- * @param label pointer to a label object
- * @return true: draw body; false: don't draw body
- */
-bool lv_label_get_body_draw(const lv_obj_t * label)
-{
- LV_ASSERT_OBJ(label, LV_OBJX_NAME);
-
- lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
- return ext->body_draw == 0 ? false : true;
-}
-
-/**
- * Get the label's animation speed in LV_LABEL_LONG_ROLL and SCROLL modes
- * @param label pointer to a label object
- * @return speed of animation in px/sec unit
- */
-uint16_t lv_label_get_anim_speed(const lv_obj_t * label)
-{
- LV_ASSERT_OBJ(label, LV_OBJX_NAME);
-
-#if LV_USE_ANIMATION
- lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
- return ext->anim_speed;
-#else
- (void)label; /*Unused*/
- return 0;
-#endif
-}
-
-/**
- * Get the relative x and y coordinates of a letter
- * @param label pointer to a label object
- * @param index index of the letter [0 ... text length]. Expressed in character index, not byte
- * index (different in UTF-8)
- * @param pos store the result here (E.g. index = 0 gives 0;0 coordinates)
- */
-void lv_label_get_letter_pos(const lv_obj_t * label, uint16_t char_id, lv_point_t * pos)
-{
- LV_ASSERT_OBJ(label, LV_OBJX_NAME);
- LV_ASSERT_NULL(pos);
-
- const char * txt = lv_label_get_text(label);
- lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
- uint32_t line_start = 0;
- uint32_t new_line_start = 0;
- lv_coord_t max_w = lv_obj_get_width(label);
- const lv_style_t * style = lv_obj_get_style(label);
- const lv_font_t * font = style->text.font;
- uint8_t letter_height = lv_font_get_line_height(font);
- lv_coord_t y = 0;
- lv_txt_flag_t flag = LV_TXT_FLAG_NONE;
-
- if(ext->recolor != 0) flag |= LV_TXT_FLAG_RECOLOR;
- if(ext->expand != 0) flag |= LV_TXT_FLAG_EXPAND;
-
- lv_label_align_t align = lv_label_get_align(label);
- if(align == LV_LABEL_ALIGN_CENTER) flag |= LV_TXT_FLAG_CENTER;
- if(align == LV_LABEL_ALIGN_RIGHT) flag |= LV_TXT_FLAG_RIGHT;
-
- /*If the width will be expanded the set the max length to very big */
- if(ext->long_mode == LV_LABEL_LONG_EXPAND) {
- max_w = LV_COORD_MAX;
- }
-
- uint16_t byte_id = lv_txt_encoded_get_byte_id(txt, char_id);
-
- /*Search the line of the index letter */;
- while(txt[new_line_start] != '\0') {
- new_line_start += lv_txt_get_next_line(&txt[line_start], font, style->text.letter_space, max_w, flag);
- if(byte_id < new_line_start || txt[new_line_start] == '\0')
- break; /*The line of 'index' letter begins at 'line_start'*/
-
- y += letter_height + style->text.line_space;
- line_start = new_line_start;
- }
-
- /*If the last character is line break then go to the next line*/
- if(byte_id > 0) {
- if((txt[byte_id - 1] == '\n' || txt[byte_id - 1] == '\r') && txt[byte_id] == '\0') {
- y += letter_height + style->text.line_space;
- line_start = byte_id;
- }
- }
-
- const char *bidi_txt;
- uint16_t visual_byte_pos;
-#if LV_USE_BIDI
- /*Handle Bidi*/
- if(new_line_start == byte_id) {
- visual_byte_pos = byte_id - line_start;
- bidi_txt = &txt[line_start];
- }
- else {
- uint16_t line_char_id = lv_txt_encoded_get_char_id(&txt[line_start], byte_id - line_start);
-
- bool is_rtl;
- char *mutable_bidi_txt;
- uint16_t visual_char_pos = lv_bidi_get_visual_pos(&txt[line_start], &mutable_bidi_txt, new_line_start - line_start, lv_obj_get_base_dir(label), line_char_id, &is_rtl);
- bidi_txt = mutable_bidi_txt;
- if (is_rtl) visual_char_pos++;
- visual_byte_pos = lv_txt_encoded_get_byte_id(bidi_txt, visual_char_pos);
- }
-#else
- bidi_txt = &txt[line_start];
- visual_byte_pos = byte_id - line_start;
-#endif
-
-
- /*Calculate the x coordinate*/
- lv_coord_t x = lv_txt_get_width(bidi_txt, visual_byte_pos, font, style->text.letter_space, flag);
-
- if(char_id != line_start) x += style->text.letter_space;
-
- if(align == LV_LABEL_ALIGN_CENTER) {
- lv_coord_t line_w;
- line_w = lv_txt_get_width(bidi_txt, new_line_start - line_start, font, style->text.letter_space, flag);
- x += lv_obj_get_width(label) / 2 - line_w / 2;
-
- } else if(align == LV_LABEL_ALIGN_RIGHT) {
- lv_coord_t line_w;
- line_w = lv_txt_get_width(bidi_txt, new_line_start - line_start, font, style->text.letter_space, flag);
-
- x += lv_obj_get_width(label) - line_w;
- }
- pos->x = x;
- pos->y = y;
-}
-
-/**
- * Get the index of letter on a relative point of a label
- * @param label pointer to label object
- * @param pos pointer to point with coordinates on a the label
- * @return the index of the letter on the 'pos_p' point (E.g. on 0;0 is the 0. letter)
- * Expressed in character index and not byte index (different in UTF-8)
- */
-uint16_t lv_label_get_letter_on(const lv_obj_t * label, lv_point_t * pos)
-{
- LV_ASSERT_OBJ(label, LV_OBJX_NAME);
- LV_ASSERT_NULL(pos);
-
- const char * txt = lv_label_get_text(label);
- lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
- uint32_t line_start = 0;
- uint32_t new_line_start = 0;
- lv_coord_t max_w = lv_obj_get_width(label);
- const lv_style_t * style = lv_obj_get_style(label);
- const lv_font_t * font = style->text.font;
- uint8_t letter_height = lv_font_get_line_height(font);
- lv_coord_t y = 0;
- lv_txt_flag_t flag = LV_TXT_FLAG_NONE;
- uint16_t logical_pos;
- char *bidi_txt;
-
- if(ext->recolor != 0) flag |= LV_TXT_FLAG_RECOLOR;
- if(ext->expand != 0) flag |= LV_TXT_FLAG_EXPAND;
-
- lv_label_align_t align = lv_label_get_align(label);
- if(align == LV_LABEL_ALIGN_CENTER) flag |= LV_TXT_FLAG_CENTER;
- if(align == LV_LABEL_ALIGN_RIGHT) flag |= LV_TXT_FLAG_RIGHT;
-
- /*If the width will be expanded set the max length to very big */
- if(ext->long_mode == LV_LABEL_LONG_EXPAND) {
- max_w = LV_COORD_MAX;
- }
-
- /*Search the line of the index letter */;
- while(txt[line_start] != '\0') {
- new_line_start += lv_txt_get_next_line(&txt[line_start], font, style->text.letter_space, max_w, flag);
-
- if(pos->y <= y + letter_height) {
- /*The line is found (stored in 'line_start')*/
- /* Include the NULL terminator in the last line */
- uint32_t tmp = new_line_start;
- uint32_t letter;
- letter = lv_txt_encoded_prev(txt, &tmp);
- if(letter != '\n' && txt[new_line_start] == '\0' ) new_line_start++;
- break;
- }
- y += letter_height + style->text.line_space;
-
- line_start = new_line_start;
- }
-
-#if LV_USE_BIDI
- bidi_txt = lv_draw_get_buf(new_line_start - line_start + 1);
- uint16_t txt_len = new_line_start - line_start;
- if(bidi_txt[new_line_start] == '\0') txt_len--;
- lv_bidi_process_paragraph(txt + line_start, bidi_txt, txt_len, lv_obj_get_base_dir(label), NULL, 0);
-#else
- bidi_txt = (char*)txt + line_start;
-#endif
-
- /*Calculate the x coordinate*/
- lv_coord_t x = 0;
- if(align == LV_LABEL_ALIGN_CENTER) {
- lv_coord_t line_w;
- line_w = lv_txt_get_width(bidi_txt, new_line_start - line_start, font, style->text.letter_space, flag);
- x += lv_obj_get_width(label) / 2 - line_w / 2;
- }
- else if(align == LV_LABEL_ALIGN_RIGHT) {
- lv_coord_t line_w;
- line_w = lv_txt_get_width(bidi_txt, new_line_start - line_start, font, style->text.letter_space, flag);
- x += lv_obj_get_width(label) - line_w;
- }
-
- lv_txt_cmd_state_t cmd_state = LV_TXT_CMD_STATE_WAIT;
-
- uint32_t i = 0;
- uint32_t i_act = i;
- uint32_t letter;
- uint32_t letter_next;
-
- if(new_line_start > 0) {
- while(i + line_start < new_line_start) {
- /* Get the current letter.*/
- letter = lv_txt_encoded_next(bidi_txt, &i);
-
- /*Get the next letter too for kerning*/
- letter_next = lv_txt_encoded_next(&bidi_txt[i], NULL);
-
- /*Handle the recolor command*/
- if((flag & LV_TXT_FLAG_RECOLOR) != 0) {
- if(lv_txt_is_cmd(&cmd_state, bidi_txt[i]) != false) {
- continue; /*Skip the letter is it is part of a command*/
- }
- }
-
- x += lv_font_get_glyph_width(font, letter, letter_next);
-
- /*Finish if the x position or the last char of the line is reached*/
- if(pos->x < x || i + line_start == new_line_start) {
- i = i_act;
- break;
- }
- x += style->text.letter_space;
- i_act = i;
- }
- }
-
-#if LV_USE_BIDI
- /*Handle Bidi*/
- bool is_rtl;
- logical_pos = lv_bidi_get_logical_pos(&txt[line_start], NULL, txt_len, lv_obj_get_base_dir(label), lv_txt_encoded_get_char_id(bidi_txt, i), &is_rtl);
- if (is_rtl) logical_pos++;
-#else
- logical_pos = lv_txt_encoded_get_char_id(bidi_txt, i);
-#endif
-
- return logical_pos + lv_txt_encoded_get_char_id(txt, line_start);
-}
-
-/**
- * @brief Get the selection start index.
- * @param label pointer to a label object.
- * @return selection start index. `LV_LABEL_TXT_SEL_OFF` if nothing is selected.
- */
-uint16_t lv_label_get_text_sel_start(const lv_obj_t * label)
-{
- LV_ASSERT_OBJ(label, LV_OBJX_NAME);
-
-#if LV_LABEL_TEXT_SEL
- lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
- return ext->txt_sel_start;
-
-#else
- (void)label; /*Unused*/
- return LV_LABEL_TEXT_SEL_OFF;
-#endif
-}
-
-/**
- * @brief Get the selection end index.
- * @param label pointer to a label object.
- * @return selection end index. `LV_LABEL_TXT_SEL_OFF` if nothing is selected.
- */
-uint16_t lv_label_get_text_sel_end(const lv_obj_t * label)
-{
- LV_ASSERT_OBJ(label, LV_OBJX_NAME);
-
-#if LV_LABEL_TEXT_SEL
- lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
- return ext->txt_sel_end;
-#else
- (void)label; /*Unused*/
- return LV_LABEL_TEXT_SEL_OFF;
-#endif
-}
-
-/**
- * Check if a character is drawn under a point.
- * @param label Label object
- * @param pos Point to check for characte under
- * @return whether a character is drawn under the point
- */
-bool lv_label_is_char_under_pos(const lv_obj_t * label, lv_point_t * pos)
-{
- LV_ASSERT_OBJ(label, LV_OBJX_NAME);
- LV_ASSERT_NULL(pos);
-
- const char * txt = lv_label_get_text(label);
- lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
- uint32_t line_start = 0;
- uint32_t new_line_start = 0;
- lv_coord_t max_w = lv_obj_get_width(label);
- const lv_style_t * style = lv_obj_get_style(label);
- const lv_font_t * font = style->text.font;
- uint8_t letter_height = lv_font_get_line_height(font);
- lv_coord_t y = 0;
- lv_txt_flag_t flag = LV_TXT_FLAG_NONE;
- lv_label_align_t align = lv_label_get_align(label);
-
- if(ext->recolor != 0) flag |= LV_TXT_FLAG_RECOLOR;
- if(ext->expand != 0) flag |= LV_TXT_FLAG_EXPAND;
- if(align == LV_LABEL_ALIGN_CENTER) flag |= LV_TXT_FLAG_CENTER;
-
- /*If the width will be expanded set the max length to very big */
- if(ext->long_mode == LV_LABEL_LONG_EXPAND) {
- max_w = LV_COORD_MAX;
- }
-
- /*Search the line of the index letter */;
- while(txt[line_start] != '\0') {
- new_line_start += lv_txt_get_next_line(&txt[line_start], font, style->text.letter_space, max_w, flag);
-
- if(pos->y <= y + letter_height) break; /*The line is found (stored in 'line_start')*/
- y += letter_height + style->text.line_space;
-
- line_start = new_line_start;
- }
-
- /*Calculate the x coordinate*/
- lv_coord_t x = 0;
- lv_coord_t last_x = 0;
- if(align == LV_LABEL_ALIGN_CENTER) {
- lv_coord_t line_w;
- line_w = lv_txt_get_width(&txt[line_start], new_line_start - line_start, font, style->text.letter_space, flag);
- x += lv_obj_get_width(label) / 2 - line_w / 2;
- }
- else if(align == LV_LABEL_ALIGN_RIGHT) {
- lv_coord_t line_w;
- line_w = lv_txt_get_width(&txt[line_start], new_line_start - line_start, font, style->text.letter_space, flag);
- x += lv_obj_get_width(label) - line_w;
- }
-
- lv_txt_cmd_state_t cmd_state = LV_TXT_CMD_STATE_WAIT;
-
- uint32_t i = line_start;
- uint32_t i_current = i;
- uint32_t letter = '\0';
- uint32_t letter_next = '\0';
-
- if(new_line_start > 0) {
- while(i <= new_line_start - 1) {
- /* Get the current letter
- * Be careful 'i' already points to the next character */
- letter = lv_txt_encoded_next(txt, &i);
-
- /*Get the next letter for kerning*/
- letter_next = lv_txt_encoded_next(&txt[i], NULL);
-
- /*Handle the recolor command*/
- if((flag & LV_TXT_FLAG_RECOLOR) != 0) {
- if(lv_txt_is_cmd(&cmd_state, txt[i]) != false) {
- continue; /*Skip the letter is it is part of a command*/
- }
- }
- last_x = x;
- x += lv_font_get_glyph_width(font, letter, letter_next);
- if(pos->x < x) {
- i = i_current;
- break;
- }
- x += style->text.letter_space;
- i_current = i;
- }
- }
-
- int32_t max_diff = lv_font_get_glyph_width(font, letter, letter_next) + style->text.letter_space + 1;
- return (pos->x >= (last_x - style->text.letter_space) && pos->x <= (last_x + max_diff));
-}
-
-/*=====================
- * Other functions
- *====================*/
-
-/**
- * Insert a text to the label. The label text can not be static.
- * @param label pointer to a label object
- * @param pos character index to insert. Expressed in character index and not byte index (Different
- * in UTF-8) 0: before first char. LV_LABEL_POS_LAST: after last char.
- * @param txt pointer to the text to insert
- */
-void lv_label_ins_text(lv_obj_t * label, uint32_t pos, const char * txt)
-{
- LV_ASSERT_OBJ(label, LV_OBJX_NAME);
- LV_ASSERT_STR(txt);
-
- lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
-
- /*Can not append to static text*/
- if(ext->static_txt != 0) return;
-
- lv_obj_invalidate(label);
-
- /*Allocate space for the new text*/
- size_t old_len = strlen(ext->text);
- size_t ins_len = strlen(txt);
- size_t new_len = ins_len + old_len;
- ext->text = lv_mem_realloc(ext->text, new_len + 1);
- LV_ASSERT_MEM(ext->text);
- if(ext->text == NULL) return;
-
- if(pos == LV_LABEL_POS_LAST) {
- pos = lv_txt_get_encoded_length(ext->text);
- }
-
- lv_txt_ins(ext->text, pos, txt);
- lv_label_refr_text(label);
-}
-
-/**
- * Delete characters from a label. The label text can not be static.
- * @param label pointer to a label object
- * @param pos character index to insert. Expressed in character index and not byte index (Different
- * in UTF-8) 0: before first char.
- * @param cnt number of characters to cut
- */
-void lv_label_cut_text(lv_obj_t * label, uint32_t pos, uint32_t cnt)
-{
- LV_ASSERT_OBJ(label, LV_OBJX_NAME);
-
- lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
-
- /*Can not append to static text*/
- if(ext->static_txt != 0) return;
-
- lv_obj_invalidate(label);
-
- char * label_txt = lv_label_get_text(label);
- /*Delete the characters*/
- lv_txt_cut(label_txt, pos, cnt);
-
- /*Refresh the label*/
- lv_label_refr_text(label);
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Handle the drawing related tasks of the labels
- * @param label pointer to a label object
- * @param mask the object will be drawn only in this area
- * @param mode LV_DESIGN_COVER_CHK: only check if the object fully covers the 'mask_p' area
- * (return 'true' if yes)
- * LV_DESIGN_DRAW: draw the object (always return 'true')
- * LV_DESIGN_DRAW_POST: drawing after every children are drawn
- * @param return true/false, depends on 'mode'
- */
-static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_mode_t mode)
-{
- /* A label never covers an area */
- if(mode == LV_DESIGN_COVER_CHK)
- return false;
- else if(mode == LV_DESIGN_DRAW_MAIN) {
- lv_area_t coords;
- const lv_style_t * style = lv_obj_get_style(label);
- lv_opa_t opa_scale = lv_obj_get_opa_scale(label);
- lv_obj_get_coords(label, &coords);
-
-#if LV_USE_GROUP
- lv_group_t * g = lv_obj_get_group(label);
- if(lv_group_get_focused(g) == label) {
- lv_draw_rect(&coords, mask, style, opa_scale);
- }
-#endif
-
- lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
-
- if(ext->body_draw) {
- lv_area_t bg;
- lv_obj_get_coords(label, &bg);
- bg.x1 -= style->body.padding.left;
- bg.x2 += style->body.padding.right;
- bg.y1 -= style->body.padding.top;
- bg.y2 += style->body.padding.bottom;
-
- lv_draw_rect(&bg, mask, style, lv_obj_get_opa_scale(label));
- }
-
- lv_label_align_t align = lv_label_get_align(label);
-
- lv_txt_flag_t flag = LV_TXT_FLAG_NONE;
- if(ext->recolor != 0) flag |= LV_TXT_FLAG_RECOLOR;
- if(ext->expand != 0) flag |= LV_TXT_FLAG_EXPAND;
- if(align == LV_LABEL_ALIGN_CENTER) flag |= LV_TXT_FLAG_CENTER;
- if(align == LV_LABEL_ALIGN_RIGHT) flag |= LV_TXT_FLAG_RIGHT;
-
- /* In ROLL mode the CENTER and RIGHT are pointless so remove them.
- * (In addition they will result mis-alignment is this case)*/
- if((ext->long_mode == LV_LABEL_LONG_SROLL || ext->long_mode == LV_LABEL_LONG_SROLL_CIRC) &&
- (ext->align == LV_LABEL_ALIGN_CENTER || ext->align == LV_LABEL_ALIGN_RIGHT)) {
- lv_point_t size;
- lv_txt_get_size(&size, ext->text, style->text.font, style->text.letter_space, style->text.line_space,
- LV_COORD_MAX, flag);
- if(size.x > lv_obj_get_width(label)) {
- flag &= ~LV_TXT_FLAG_RIGHT;
- flag &= ~LV_TXT_FLAG_CENTER;
- }
- }
-#if LV_LABEL_LONG_TXT_HINT
- lv_draw_label_hint_t * hint = &ext->hint;
- if(ext->long_mode == LV_LABEL_LONG_SROLL_CIRC || lv_obj_get_height(label) < LV_LABEL_HINT_HEIGHT_LIMIT)
- hint = NULL;
-
-#else
- /*Just for compatibility*/
- lv_draw_label_hint_t * hint = NULL;
-#endif
- lv_draw_label_txt_sel_t sel;
-
- sel.start = lv_label_get_text_sel_start(label);
- sel.end = lv_label_get_text_sel_end(label);
- lv_draw_label(&coords, mask, style, opa_scale, ext->text, flag, &ext->offset, &sel, hint, lv_obj_get_base_dir(label));
-
-
- if(ext->long_mode == LV_LABEL_LONG_SROLL_CIRC) {
- lv_point_t size;
- lv_txt_get_size(&size, ext->text, style->text.font, style->text.letter_space, style->text.line_space,
- LV_COORD_MAX, flag);
-
- lv_point_t ofs;
-
- /*Draw the text again next to the original to make an circular effect */
- if(size.x > lv_obj_get_width(label)) {
- ofs.x = ext->offset.x + size.x +
- lv_font_get_glyph_width(style->text.font, ' ', ' ') * LV_LABEL_WAIT_CHAR_COUNT;
- ofs.y = ext->offset.y;
-
- lv_draw_label(&coords, mask, style, opa_scale, ext->text, flag, &ofs, &sel, NULL, lv_obj_get_base_dir(label));
- }
-
- /*Draw the text again below the original to make an circular effect */
- if(size.y > lv_obj_get_height(label)) {
- ofs.x = ext->offset.x;
- ofs.y = ext->offset.y + size.y + lv_font_get_line_height(style->text.font);
- lv_draw_label(&coords, mask, style, opa_scale, ext->text, flag, &ofs, &sel, NULL, lv_obj_get_base_dir(label));
- }
- }
- }
- return true;
-}
-
-/**
- * Signal function of the label
- * @param label pointer to a label object
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_label_signal(lv_obj_t * label, lv_signal_t sign, void * param)
-{
- lv_res_t res;
-
- /* Include the ancient signal function */
- res = ancestor_signal(label, sign, param);
- if(res != LV_RES_OK) return res;
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);
-
- lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
- if(sign == LV_SIGNAL_CLEANUP) {
- if(ext->static_txt == 0) {
- lv_mem_free(ext->text);
- ext->text = NULL;
- }
- lv_label_dot_tmp_free(label);
- } else if(sign == LV_SIGNAL_STYLE_CHG) {
- /*Revert dots for proper refresh*/
- lv_label_revert_dots(label);
-
- lv_label_refr_text(label);
- } else if(sign == LV_SIGNAL_CORD_CHG) {
- if(lv_area_get_width(&label->coords) != lv_area_get_width(param) ||
- lv_area_get_height(&label->coords) != lv_area_get_height(param)) {
- lv_label_revert_dots(label);
- lv_label_refr_text(label);
- }
- } else if(sign == LV_SIGNAL_REFR_EXT_DRAW_PAD) {
- if(ext->body_draw) {
- const lv_style_t * style = lv_label_get_style(label, LV_LABEL_STYLE_MAIN);
-
- label->ext_draw_pad = LV_MATH_MAX(label->ext_draw_pad, style->body.padding.left);
- label->ext_draw_pad = LV_MATH_MAX(label->ext_draw_pad, style->body.padding.right);
- label->ext_draw_pad = LV_MATH_MAX(label->ext_draw_pad, style->body.padding.top);
- label->ext_draw_pad = LV_MATH_MAX(label->ext_draw_pad, style->body.padding.bottom);
- }
- }
- else if(sign == LV_SIGNAL_BASE_DIR_CHG) {
-#if LV_USE_BIDI
- if(ext->static_txt == 0) lv_label_set_text(label, NULL);
-#endif
- } else if(sign == LV_SIGNAL_GET_TYPE) {
- lv_obj_type_t * buf = param;
- uint8_t i;
- for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/
- if(buf->type[i] == NULL) break;
- }
- buf->type[i] = "lv_label";
- }
-
- return res;
-}
-
-/**
- * Refresh the label with its text stored in its extended data
- * @param label pointer to a label object
- */
-static void lv_label_refr_text(lv_obj_t * label)
-{
- lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
-
- if(ext->text == NULL) return;
-#if LV_LABEL_LONG_TXT_HINT
- ext->hint.line_start = -1; /*The hint is invalid if the text changes*/
-#endif
-
- lv_coord_t max_w = lv_obj_get_width(label);
- const lv_style_t * style = lv_obj_get_style(label);
- const lv_font_t * font = style->text.font;
-
- /*If the width will be expanded set the max length to very big */
- if(ext->long_mode == LV_LABEL_LONG_EXPAND) {
- max_w = LV_COORD_MAX;
- }
-
- /*Calc. the height and longest line*/
- lv_point_t size;
- lv_txt_flag_t flag = LV_TXT_FLAG_NONE;
- if(ext->recolor != 0) flag |= LV_TXT_FLAG_RECOLOR;
- if(ext->expand != 0) flag |= LV_TXT_FLAG_EXPAND;
- lv_txt_get_size(&size, ext->text, font, style->text.letter_space, style->text.line_space, max_w, flag);
-
- /*Set the full size in expand mode*/
- if(ext->long_mode == LV_LABEL_LONG_EXPAND) {
- lv_obj_set_size(label, size.x, size.y);
- }
- /*In roll mode keep the size but start offset animations*/
- else if(ext->long_mode == LV_LABEL_LONG_SROLL) {
-#if LV_USE_ANIMATION
- lv_anim_t anim;
- anim.var = label;
- anim.repeat = 1;
- anim.playback = 1;
- anim.start = 0;
- anim.ready_cb = NULL;
- anim.path_cb = lv_anim_path_linear;
- anim.playback_pause =
- (((lv_font_get_glyph_width(style->text.font, ' ', ' ') + style->text.letter_space) * 1000) /
- ext->anim_speed) *
- LV_LABEL_WAIT_CHAR_COUNT;
- anim.repeat_pause = anim.playback_pause;
- anim.act_time = -anim.playback_pause;
-
- bool hor_anim = false;
- if(size.x > lv_obj_get_width(label)) {
- anim.end = lv_obj_get_width(label) - size.x;
- anim.exec_cb = (lv_anim_exec_xcb_t)lv_label_set_offset_x;
- anim.time = lv_anim_speed_to_time(ext->anim_speed, anim.start, anim.end);
- lv_anim_create(&anim);
- hor_anim = true;
- } else {
- /*Delete the offset animation if not required*/
- lv_anim_del(label, (lv_anim_exec_xcb_t)lv_label_set_offset_x);
- ext->offset.x = 0;
- }
-
- if(size.y > lv_obj_get_height(label) && hor_anim == false) {
- anim.end = lv_obj_get_height(label) - size.y - (lv_font_get_line_height(font));
- anim.exec_cb = (lv_anim_exec_xcb_t)lv_label_set_offset_y;
-
- anim.time = lv_anim_speed_to_time(ext->anim_speed, anim.start, anim.end);
- lv_anim_create(&anim);
- } else {
- /*Delete the offset animation if not required*/
- lv_anim_del(label, (lv_anim_exec_xcb_t)lv_label_set_offset_y);
- ext->offset.y = 0;
- }
-#endif
- }
- /*In roll inf. mode keep the size but start offset animations*/
- else if(ext->long_mode == LV_LABEL_LONG_SROLL_CIRC) {
-#if LV_USE_ANIMATION
- lv_label_align_t align = lv_label_get_align(label);
-
- lv_anim_t anim;
- anim.var = label;
- anim.repeat = 1;
- anim.playback = 0;
- anim.act_time = -(((lv_font_get_glyph_width(style->text.font, ' ', ' ') + style->text.letter_space) * 1000) /
- ext->anim_speed) *
- LV_LABEL_WAIT_CHAR_COUNT;
- anim.ready_cb = NULL;
- anim.path_cb = lv_anim_path_linear;
- anim.playback_pause = 0;
- anim.repeat_pause = 0;
-
- bool hor_anim = false;
- if(size.x > lv_obj_get_width(label)) {
- if(align == LV_LABEL_ALIGN_RIGHT) {
- anim.end = 0;
- anim.start = -size.x - lv_font_get_glyph_width(font, ' ', ' ') * LV_LABEL_WAIT_CHAR_COUNT;
- } else {
- anim.start = 0;
- anim.end = -size.x - lv_font_get_glyph_width(font, ' ', ' ') * LV_LABEL_WAIT_CHAR_COUNT;
- }
-
- anim.exec_cb = (lv_anim_exec_xcb_t)lv_label_set_offset_x;
- anim.time = lv_anim_speed_to_time(ext->anim_speed, anim.start, anim.end);
- lv_anim_create(&anim);
- hor_anim = true;
- } else {
- /*Delete the offset animation if not required*/
- lv_anim_del(label, (lv_anim_exec_xcb_t)lv_label_set_offset_x);
- ext->offset.x = 0;
- }
-
- if(size.y > lv_obj_get_height(label) && hor_anim == false) {
- if(align == LV_LABEL_ALIGN_RIGHT) {
- anim.end = 0;
- anim.start = -size.y - (lv_font_get_line_height(font));
- } else {
- anim.start = 0;
- anim.end = -size.y - (lv_font_get_line_height(font));
- }
-
- anim.exec_cb = (lv_anim_exec_xcb_t)lv_label_set_offset_y;
- anim.time = lv_anim_speed_to_time(ext->anim_speed, anim.start, anim.end);
- lv_anim_create(&anim);
- } else {
- /*Delete the offset animation if not required*/
- lv_anim_del(label, (lv_anim_exec_xcb_t)lv_label_set_offset_y);
- ext->offset.y = 0;
- }
-#endif
- } else if(ext->long_mode == LV_LABEL_LONG_DOT) {
- if(size.y <= lv_obj_get_height(label)) { /*No dots are required, the text is short enough*/
- ext->dot_end = LV_LABEL_DOT_END_INV;
- } else if(lv_txt_get_encoded_length(ext->text) <= LV_LABEL_DOT_NUM) { /*Don't turn to dots all the characters*/
- ext->dot_end = LV_LABEL_DOT_END_INV;
- } else {
- lv_point_t p;
- p.x = lv_obj_get_width(label) -
- (lv_font_get_glyph_width(style->text.font, '.', '.') + style->text.letter_space) *
- LV_LABEL_DOT_NUM; /*Shrink with dots*/
- p.y = lv_obj_get_height(label);
- p.y -= p.y %
- (lv_font_get_line_height(style->text.font) + style->text.line_space); /*Round down to the last line*/
- p.y -= style->text.line_space; /*Trim the last line space*/
- uint32_t letter_id = lv_label_get_letter_on(label, &p);
-
-
- /*Be sure there is space for the dots*/
- size_t txt_len = strlen(ext->text);
- uint32_t byte_id = lv_txt_encoded_get_byte_id(ext->text, letter_id);
- while(byte_id + LV_LABEL_DOT_NUM > txt_len) {
- byte_id -= lv_txt_encoded_size(&ext->text[byte_id]);
- letter_id--;
- }
-
- /*Save letters under the dots and replace them with dots*/
- uint32_t byte_id_ori = byte_id;
- uint32_t i;
- uint8_t len = 0;
- for(i = 0; i <= LV_LABEL_DOT_NUM; i++) {
- len += lv_txt_encoded_size(&ext->text[byte_id]);
- lv_txt_encoded_next(ext->text, &byte_id);
- }
-
- if(lv_label_set_dot_tmp(label, &ext->text[byte_id_ori], len)) {
- for(i = 0; i < LV_LABEL_DOT_NUM; i++) {
- ext->text[byte_id_ori + i] = '.';
- }
- ext->text[byte_id_ori + LV_LABEL_DOT_NUM] = '\0';
- ext->dot_end = letter_id + LV_LABEL_DOT_NUM;
- }
- }
- }
- /*In break mode only the height can change*/
- else if(ext->long_mode == LV_LABEL_LONG_BREAK) {
- lv_obj_set_height(label, size.y);
- }
- /*Do not set the size in Clip mode*/
- else if(ext->long_mode == LV_LABEL_LONG_CROP) {
- /*Do nothing*/
- }
-
- lv_obj_invalidate(label);
-}
-
-static void lv_label_revert_dots(lv_obj_t * label)
-{
- lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
- if(ext->long_mode != LV_LABEL_LONG_DOT) return;
- if(ext->dot_end == LV_LABEL_DOT_END_INV) return;
- uint32_t letter_i = ext->dot_end - LV_LABEL_DOT_NUM;
- uint32_t byte_i = lv_txt_encoded_get_byte_id(ext->text, letter_i);
-
- /*Restore the characters*/
- uint8_t i = 0;
- char * dot_tmp = lv_label_get_dot_tmp(label);
- while(ext->text[byte_i + i] != '\0') {
- ext->text[byte_i + i] = dot_tmp[i];
- i++;
- }
- ext->text[byte_i + i] = dot_tmp[i];
- lv_label_dot_tmp_free(label);
-
- ext->dot_end = LV_LABEL_DOT_END_INV;
-}
-
-#if LV_USE_ANIMATION
-static void lv_label_set_offset_x(lv_obj_t * label, lv_coord_t x)
-{
- lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
- ext->offset.x = x;
- lv_obj_invalidate(label);
-}
-
-static void lv_label_set_offset_y(lv_obj_t * label, lv_coord_t y)
-{
- lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
- ext->offset.y = y;
- lv_obj_invalidate(label);
-}
-#endif
-
-/**
- * Store `len` characters from `data`. Allocates space if necessary.
- *
- * @param label pointer to label object
- * @param len Number of characters to store.
- * @return true on success.
- */
-static bool lv_label_set_dot_tmp(lv_obj_t * label, char * data, uint16_t len)
-{
- lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
- lv_label_dot_tmp_free(label); /* Deallocate any existing space */
- if(len > sizeof(char *)) {
- /* Memory needs to be allocated. Allocates an additional byte
- * for a NULL-terminator so it can be copied. */
- ext->dot.tmp_ptr = lv_mem_alloc(len + 1);
- if(ext->dot.tmp_ptr == NULL) {
- LV_LOG_ERROR("Failed to allocate memory for dot_tmp_ptr");
- return false;
- }
- memcpy(ext->dot.tmp_ptr, data, len);
- ext->dot.tmp_ptr[len] = '\0';
- ext->dot_tmp_alloc = true;
- } else {
- /* Characters can be directly stored in object */
- ext->dot_tmp_alloc = false;
- memcpy(ext->dot.tmp, data, len);
- }
- return true;
-}
-
-/**
- * Get the stored dot_tmp characters
- * @param label pointer to label object
- * @return char pointer to a stored characters. Is *not* necessarily NULL-terminated.
- */
-static char * lv_label_get_dot_tmp(lv_obj_t * label)
-{
- lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
- if(ext->dot_tmp_alloc) {
- return ext->dot.tmp_ptr;
- } else {
- return ext->dot.tmp;
- }
-}
-
-/**
- * Free the dot_tmp_ptr field if it was previously allocated.
- * Always clears the field
- * @param label pointer to label object.
- */
-static void lv_label_dot_tmp_free(lv_obj_t * label)
-{
- lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
- if(ext->dot_tmp_alloc && ext->dot.tmp_ptr) {
- lv_mem_free(ext->dot.tmp_ptr);
- }
- ext->dot_tmp_alloc = false;
- ext->dot.tmp_ptr = NULL;
-}
-
-#endif
diff --git a/src/libs/lvgl/src/lv_objx/lv_label.h b/src/libs/lvgl/src/lv_objx/lv_label.h
deleted file mode 100644
index faa21684..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_label.h
+++ /dev/null
@@ -1,351 +0,0 @@
-/**
- * @file lv_rect.h
- *
- */
-
-#ifndef LV_LABEL_H
-#define LV_LABEL_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_LABEL != 0
-
-#include <stdarg.h>
-#include "../lv_core/lv_obj.h"
-#include "../lv_font/lv_font.h"
-#include "../lv_font/lv_symbol_def.h"
-#include "../lv_misc/lv_txt.h"
-#include "../lv_draw/lv_draw.h"
-
-/*********************
- * DEFINES
- *********************/
-#define LV_LABEL_DOT_NUM 3
-#define LV_LABEL_POS_LAST 0xFFFF
-#define LV_LABEL_TEXT_SEL_OFF LV_DRAW_LABEL_NO_TXT_SEL
-
-LV_EXPORT_CONST_INT(LV_LABEL_DOT_NUM);
-LV_EXPORT_CONST_INT(LV_LABEL_POS_LAST);
-LV_EXPORT_CONST_INT(LV_LABEL_TEXT_SEL_OFF);
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/** Long mode behaviors. Used in 'lv_label_ext_t' */
-enum {
- LV_LABEL_LONG_EXPAND, /**< Expand the object size to the text size*/
- LV_LABEL_LONG_BREAK, /**< Keep the object width, break the too long lines and expand the object
- height*/
- LV_LABEL_LONG_DOT, /**< Keep the size and write dots at the end if the text is too long*/
- LV_LABEL_LONG_SROLL, /**< Keep the size and roll the text back and forth*/
- LV_LABEL_LONG_SROLL_CIRC, /**< Keep the size and roll the text circularly*/
- LV_LABEL_LONG_CROP, /**< Keep the size and crop the text out of it*/
-};
-typedef uint8_t lv_label_long_mode_t;
-
-/** Label align policy*/
-enum {
- LV_LABEL_ALIGN_LEFT, /**< Align text to left */
- LV_LABEL_ALIGN_CENTER, /**< Align text to center */
- LV_LABEL_ALIGN_RIGHT, /**< Align text to right */
- LV_LABEL_ALIGN_AUTO, /**< Use LEFT or RIGHT depending on the direction of the text (LTR/RTL)*/
-};
-typedef uint8_t lv_label_align_t;
-
-/** Data of label*/
-typedef struct
-{
- /*Inherited from 'base_obj' so no inherited ext.*/ /*Ext. of ancestor*/
- /*New data for this type */
- char * text; /*Text of the label*/
-
- union
- {
- char * tmp_ptr; /* Pointer to the allocated memory containing the character which are replaced by dots (Handled
- by the library)*/
- char tmp[LV_LABEL_DOT_NUM + 1]; /* Directly store the characters if <=4 characters */
- } dot;
- uint16_t dot_end; /*The text end position in dot mode (Handled by the library)*/
- lv_point_t offset; /*Text draw position offset*/
-#if LV_LABEL_LONG_TXT_HINT
- lv_draw_label_hint_t hint; /*Used to buffer info about large text*/
-#endif
-
-#if LV_USE_ANIMATION
- uint16_t anim_speed; /*Speed of scroll and roll animation in px/sec unit*/
-#endif
-
-#if LV_LABEL_TEXT_SEL
- uint16_t txt_sel_start; /*Left-most selection character*/
- uint16_t txt_sel_end; /*Right-most selection character*/
-#endif
-
- lv_label_long_mode_t long_mode : 3; /*Determinate what to do with the long texts*/
- uint8_t static_txt : 1; /*Flag to indicate the text is static*/
- uint8_t align : 2; /*Align type from 'lv_label_align_t'*/
- uint8_t recolor : 1; /*Enable in-line letter re-coloring*/
- uint8_t expand : 1; /*Ignore real width (used by the library with LV_LABEL_LONG_ROLL)*/
- uint8_t body_draw : 1; /*Draw background body*/
- uint8_t dot_tmp_alloc : 1; /*True if dot_tmp has been allocated. False if dot_tmp directly holds up to 4 bytes of
- characters */
-} lv_label_ext_t;
-
-/** Label styles*/
-enum {
- LV_LABEL_STYLE_MAIN,
-};
-typedef uint8_t lv_label_style_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Create a label objects
- * @param par pointer to an object, it will be the parent of the new label
- * @param copy pointer to a button object, if not NULL then the new object will be copied from it
- * @return pointer to the created button
- */
-lv_obj_t * lv_label_create(lv_obj_t * par, const lv_obj_t * copy);
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set a new text for a label. Memory will be allocated to store the text by the label.
- * @param label pointer to a label object
- * @param text '\0' terminated character string. NULL to refresh with the current text.
- */
-void lv_label_set_text(lv_obj_t * label, const char * text);
-
-/**
- * Set a new formatted text for a label. Memory will be allocated to store the text by the label.
- * @param label pointer to a label object
- * @param fmt `printf`-like format
- */
-void lv_label_set_text_fmt(lv_obj_t * label, const char * fmt, ...);
-
-/**
- * Set a new text for a label from a character array. The array don't has to be '\0' terminated.
- * Memory will be allocated to store the array by the label.
- * @param label pointer to a label object
- * @param array array of characters or NULL to refresh the label
- * @param size the size of 'array' in bytes
- */
-void lv_label_set_array_text(lv_obj_t * label, const char * array, uint16_t size);
-
-/**
- * Set a static text. It will not be saved by the label so the 'text' variable
- * has to be 'alive' while the label exist.
- * @param label pointer to a label object
- * @param text pointer to a text. NULL to refresh with the current text.
- */
-void lv_label_set_static_text(lv_obj_t * label, const char * text);
-
-/**
- * Set the behavior of the label with longer text then the object size
- * @param label pointer to a label object
- * @param long_mode the new mode from 'lv_label_long_mode' enum.
- * In LV_LONG_BREAK/LONG/ROLL the size of the label should be set AFTER this
- * function
- */
-void lv_label_set_long_mode(lv_obj_t * label, lv_label_long_mode_t long_mode);
-
-/**
- * Set the align of the label (left or center)
- * @param label pointer to a label object
- * @param align 'LV_LABEL_ALIGN_LEFT' or 'LV_LABEL_ALIGN_LEFT'
- */
-void lv_label_set_align(lv_obj_t * label, lv_label_align_t align);
-
-/**
- * Enable the recoloring by in-line commands
- * @param label pointer to a label object
- * @param en true: enable recoloring, false: disable
- */
-void lv_label_set_recolor(lv_obj_t * label, bool en);
-
-/**
- * Set the label to draw (or not draw) background specified in its style's body
- * @param label pointer to a label object
- * @param en true: draw body; false: don't draw body
- */
-void lv_label_set_body_draw(lv_obj_t * label, bool en);
-
-/**
- * Set the label's animation speed in LV_LABEL_LONG_SROLL/SCROLL_CIRC modes
- * @param label pointer to a label object
- * @param anim_speed speed of animation in px/sec unit
- */
-void lv_label_set_anim_speed(lv_obj_t * label, uint16_t anim_speed);
-
-/**
- * Set the style of an label
- * @param label pointer to an label object
- * @param type which style should be get (can be only `LV_LABEL_STYLE_MAIN`)
- * @param style pointer to a style
- */
-static inline void lv_label_set_style(lv_obj_t * label, lv_label_style_t type, const lv_style_t * style)
-{
- (void)type; /*Unused*/
- lv_obj_set_style(label, style);
-}
-
-/**
- * @brief Set the selection start index.
- * @param label pointer to a label object.
- * @param index index to set. `LV_LABEL_TXT_SEL_OFF` to select nothing.
- */
-void lv_label_set_text_sel_start(lv_obj_t * label, uint16_t index);
-
-/**
- * @brief Set the selection end index.
- * @param label pointer to a label object.
- * @param index index to set. `LV_LABEL_TXT_SEL_OFF` to select nothing.
- */
-void lv_label_set_text_sel_end(lv_obj_t * label, uint16_t index);
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the text of a label
- * @param label pointer to a label object
- * @return the text of the label
- */
-char * lv_label_get_text(const lv_obj_t * label);
-
-/**
- * Get the long mode of a label
- * @param label pointer to a label object
- * @return the long mode
- */
-lv_label_long_mode_t lv_label_get_long_mode(const lv_obj_t * label);
-
-/**
- * Get the align attribute
- * @param label pointer to a label object
- * @return LV_LABEL_ALIGN_LEFT or LV_LABEL_ALIGN_CENTER
- */
-lv_label_align_t lv_label_get_align(const lv_obj_t * label);
-
-/**
- * Get the recoloring attribute
- * @param label pointer to a label object
- * @return true: recoloring is enabled, false: disable
- */
-bool lv_label_get_recolor(const lv_obj_t * label);
-
-/**
- * Get the body draw attribute
- * @param label pointer to a label object
- * @return true: draw body; false: don't draw body
- */
-bool lv_label_get_body_draw(const lv_obj_t * label);
-
-/**
- * Get the label's animation speed in LV_LABEL_LONG_ROLL and SCROLL modes
- * @param label pointer to a label object
- * @return speed of animation in px/sec unit
- */
-uint16_t lv_label_get_anim_speed(const lv_obj_t * label);
-
-/**
- * Get the relative x and y coordinates of a letter
- * @param label pointer to a label object
- * @param index index of the letter [0 ... text length]. Expressed in character index, not byte
- * index (different in UTF-8)
- * @param pos store the result here (E.g. index = 0 gives 0;0 coordinates)
- */
-void lv_label_get_letter_pos(const lv_obj_t * label, uint16_t index, lv_point_t * pos);
-
-/**
- * Get the index of letter on a relative point of a label
- * @param label pointer to label object
- * @param pos pointer to point with coordinates on a the label
- * @return the index of the letter on the 'pos_p' point (E.g. on 0;0 is the 0. letter)
- * Expressed in character index and not byte index (different in UTF-8)
- */
-uint16_t lv_label_get_letter_on(const lv_obj_t * label, lv_point_t * pos);
-
-/**
- * Check if a character is drawn under a point.
- * @param label Label object
- * @param pos Point to check for characte under
- * @return whether a character is drawn under the point
- */
-bool lv_label_is_char_under_pos(const lv_obj_t * label, lv_point_t * pos);
-
-/**
- * Get the style of an label object
- * @param label pointer to an label object
- * @param type which style should be get (can be only `LV_LABEL_STYLE_MAIN`)
- * @return pointer to the label's style
- */
-static inline const lv_style_t * lv_label_get_style(const lv_obj_t * label, lv_label_style_t type)
-{
- (void)type; /*Unused*/
- return lv_obj_get_style(label);
-}
-
-/**
- * @brief Get the selection start index.
- * @param label pointer to a label object.
- * @return selection start index. `LV_LABEL_TXT_SEL_OFF` if nothing is selected.
- */
-uint16_t lv_label_get_text_sel_start(const lv_obj_t * label);
-
-/**
- * @brief Get the selection end index.
- * @param label pointer to a label object.
- * @return selection end index. `LV_LABEL_TXT_SEL_OFF` if nothing is selected.
- */
-uint16_t lv_label_get_text_sel_end(const lv_obj_t * label);
-
-/*=====================
- * Other functions
- *====================*/
-
-/**
- * Insert a text to the label. The label text can not be static.
- * @param label pointer to a label object
- * @param pos character index to insert. Expressed in character index and not byte index (Different
- * in UTF-8) 0: before first char. LV_LABEL_POS_LAST: after last char.
- * @param txt pointer to the text to insert
- */
-void lv_label_ins_text(lv_obj_t * label, uint32_t pos, const char * txt);
-
-/**
- * Delete characters from a label. The label text can not be static.
- * @param label pointer to a label object
- * @param pos character index to insert. Expressed in character index and not byte index (Different
- * in UTF-8) 0: before first char.
- * @param cnt number of characters to cut
- */
-void lv_label_cut_text(lv_obj_t * label, uint32_t pos, uint32_t cnt);
-
-/**********************
- * MACROS
- **********************/
-
-#endif /*LV_USE_LABEL*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_LABEL_H*/
diff --git a/src/libs/lvgl/src/lv_objx/lv_led.c b/src/libs/lvgl/src/lv_objx/lv_led.c
deleted file mode 100644
index 133ccc8b..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_led.c
+++ /dev/null
@@ -1,258 +0,0 @@
-/**
- * @file lv_led.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_led.h"
-#if LV_USE_LED != 0
-
-#include "../lv_core/lv_debug.h"
-#include "../lv_themes/lv_theme.h"
-#include "../lv_draw/lv_draw.h"
-
-/*********************
- * DEFINES
- *********************/
-#define LV_OBJX_NAME "lv_led"
-
-#define LV_LED_WIDTH_DEF (LV_DPI / 3)
-#define LV_LED_HEIGHT_DEF (LV_DPI / 3)
-#define LV_LED_BRIGHT_OFF 100
-#define LV_LED_BRIGHT_ON 255
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static bool lv_led_design(lv_obj_t * led, const lv_area_t * mask, lv_design_mode_t mode);
-static lv_res_t lv_led_signal(lv_obj_t * led, lv_signal_t sign, void * param);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_design_cb_t ancestor_design_f;
-static lv_signal_cb_t ancestor_signal;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Create a led objects
- * @param par pointer to an object, it will be the parent of the new led
- * @param copy pointer to a led object, if not NULL then the new object will be copied from it
- * @return pointer to the created led
- */
-lv_obj_t * lv_led_create(lv_obj_t * par, const lv_obj_t * copy)
-{
- LV_LOG_TRACE("led create started");
-
- /*Create the ancestor basic object*/
- lv_obj_t * new_led = lv_obj_create(par, copy);
- LV_ASSERT_MEM(new_led);
- if(new_led == NULL) return NULL;
-
- if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_led);
- if(ancestor_design_f == NULL) ancestor_design_f = lv_obj_get_design_cb(new_led);
-
- /*Allocate the object type specific extended data*/
- lv_led_ext_t * ext = lv_obj_allocate_ext_attr(new_led, sizeof(lv_led_ext_t));
- LV_ASSERT_MEM(ext);
- if(ext == NULL) return NULL;
-
- ext->bright = LV_LED_BRIGHT_ON;
-
- lv_obj_set_signal_cb(new_led, lv_led_signal);
- lv_obj_set_design_cb(new_led, lv_led_design);
-
- /*Init the new led object*/
- if(copy == NULL) {
- lv_obj_set_size(new_led, LV_LED_WIDTH_DEF, LV_LED_HEIGHT_DEF);
-
- /*Set the default styles*/
- lv_theme_t * th = lv_theme_get_current();
- if(th) {
- lv_led_set_style(new_led, LV_LED_STYLE_MAIN, th->style.led);
- } else {
- lv_led_set_style(new_led, LV_LED_STYLE_MAIN, &lv_style_pretty_color);
- }
- }
- /*Copy an existing object*/
- else {
- lv_led_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
- ext->bright = copy_ext->bright;
-
- /*Refresh the style with new signal function*/
- lv_obj_refresh_style(new_led);
- }
-
- LV_LOG_INFO("led created");
-
- return new_led;
-}
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set the brightness of a LED object
- * @param led pointer to a LED object
- * @param bright 0 (max. dark) ... 255 (max. light)
- */
-void lv_led_set_bright(lv_obj_t * led, uint8_t bright)
-{
- LV_ASSERT_OBJ(led, LV_OBJX_NAME);
-
- /*Set the brightness*/
- lv_led_ext_t * ext = lv_obj_get_ext_attr(led);
- if(ext->bright == bright) return;
-
- ext->bright = bright;
-
- /*Invalidate the object there fore it will be redrawn*/
- lv_obj_invalidate(led);
-}
-
-/**
- * Light on a LED
- * @param led pointer to a LED object
- */
-void lv_led_on(lv_obj_t * led)
-{
- LV_ASSERT_OBJ(led, LV_OBJX_NAME);
-
- lv_led_set_bright(led, LV_LED_BRIGHT_ON);
-}
-
-/**
- * Light off a LED
- * @param led pointer to a LED object
- */
-void lv_led_off(lv_obj_t * led)
-{
- LV_ASSERT_OBJ(led, LV_OBJX_NAME);
-
- lv_led_set_bright(led, LV_LED_BRIGHT_OFF);
-}
-
-/**
- * Toggle the state of a LED
- * @param led pointer to a LED object
- */
-void lv_led_toggle(lv_obj_t * led)
-{
- LV_ASSERT_OBJ(led, LV_OBJX_NAME);
-
- uint8_t bright = lv_led_get_bright(led);
- if(bright > (LV_LED_BRIGHT_OFF + LV_LED_BRIGHT_ON) >> 1)
- lv_led_off(led);
- else
- lv_led_on(led);
-}
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the brightness of a LEd object
- * @param led pointer to LED object
- * @return bright 0 (max. dark) ... 255 (max. light)
- */
-uint8_t lv_led_get_bright(const lv_obj_t * led)
-{
- LV_ASSERT_OBJ(led, LV_OBJX_NAME);
-
- lv_led_ext_t * ext = lv_obj_get_ext_attr(led);
- return ext->bright;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Handle the drawing related tasks of the leds
- * @param led pointer to an object
- * @param mask the object will be drawn only in this area
- * @param mode LV_DESIGN_COVER_CHK: only check if the object fully covers the 'mask_p' area
- * (return 'true' if yes)
- * LV_DESIGN_DRAW: draw the object (always return 'true')
- * LV_DESIGN_DRAW_POST: drawing after every children are drawn
- * @param return true/false, depends on 'mode'
- */
-static bool lv_led_design(lv_obj_t * led, const lv_area_t * mask, lv_design_mode_t mode)
-{
- if(mode == LV_DESIGN_COVER_CHK) {
- /*Return false if the object is not covers the mask area*/
- return ancestor_design_f(led, mask, mode);
- } else if(mode == LV_DESIGN_DRAW_MAIN) {
- /*Make darker colors in a temporary style according to the brightness*/
- lv_led_ext_t * ext = lv_obj_get_ext_attr(led);
- const lv_style_t * style = lv_obj_get_style(led);
-
- /* Store the real pointer because of 'lv_group'
- * If the object is in focus 'lv_obj_get_style()' will give a pointer to tmp style
- * and to the real object style. It is important because of style change tricks below*/
- const lv_style_t * style_ori_p = led->style_p;
-
- /*Create a temporal style*/
- lv_style_t leds_tmp;
- memcpy(&leds_tmp, style, sizeof(leds_tmp));
-
- /*Mix. the color with black proportionally with brightness*/
- leds_tmp.body.main_color = lv_color_mix(leds_tmp.body.main_color, LV_COLOR_BLACK, ext->bright);
- leds_tmp.body.grad_color = lv_color_mix(leds_tmp.body.grad_color, LV_COLOR_BLACK, ext->bright);
- leds_tmp.body.border.color = lv_color_mix(leds_tmp.body.border.color, LV_COLOR_BLACK, ext->bright);
-
- /*Set the current swidth according to brightness proportionally between LV_LED_BRIGHT_OFF
- * and LV_LED_BRIGHT_ON*/
- uint16_t bright_tmp = ext->bright;
- leds_tmp.body.shadow.width =
- ((bright_tmp - LV_LED_BRIGHT_OFF) * style->body.shadow.width) / (LV_LED_BRIGHT_ON - LV_LED_BRIGHT_OFF);
-
- led->style_p = &leds_tmp;
- ancestor_design_f(led, mask, mode);
- led->style_p = style_ori_p; /*Restore the ORIGINAL style pointer*/
- }
- return true;
-}
-
-/**
- * Signal function of the led
- * @param led pointer to a led object
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_led_signal(lv_obj_t * led, lv_signal_t sign, void * param)
-{
- lv_res_t res;
-
- /* Include the ancient signal function */
- res = ancestor_signal(led, sign, param);
- if(res != LV_RES_OK) return res;
-
- if(sign == LV_SIGNAL_GET_TYPE) {
- lv_obj_type_t * buf = param;
- uint8_t i;
- for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/
- if(buf->type[i] == NULL) break;
- }
- buf->type[i] = "lv_led";
- }
-
- return res;
-}
-#endif
diff --git a/src/libs/lvgl/src/lv_objx/lv_led.h b/src/libs/lvgl/src/lv_objx/lv_led.h
deleted file mode 100644
index a0c9125e..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_led.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/**
- * @file lv_led.h
- *
- */
-
-#ifndef LV_LED_H
-#define LV_LED_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_LED != 0
-
-#include "../lv_core/lv_obj.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/*Data of led*/
-typedef struct
-{
- /*No inherited ext.*/
- /*New data for this type */
- uint8_t bright; /*Current brightness of the LED (0..255)*/
-} lv_led_ext_t;
-
-/*Styles*/
-enum {
- LV_LED_STYLE_MAIN,
-};
-typedef uint8_t lv_led_style_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Create a led objects
- * @param par pointer to an object, it will be the parent of the new led
- * @param copy pointer to a led object, if not NULL then the new object will be copied from it
- * @return pointer to the created led
- */
-lv_obj_t * lv_led_create(lv_obj_t * par, const lv_obj_t * copy);
-
-/**
- * Set the brightness of a LED object
- * @param led pointer to a LED object
- * @param bright 0 (max. dark) ... 255 (max. light)
- */
-void lv_led_set_bright(lv_obj_t * led, uint8_t bright);
-
-/**
- * Light on a LED
- * @param led pointer to a LED object
- */
-void lv_led_on(lv_obj_t * led);
-
-/**
- * Light off a LED
- * @param led pointer to a LED object
- */
-void lv_led_off(lv_obj_t * led);
-
-/**
- * Toggle the state of a LED
- * @param led pointer to a LED object
- */
-void lv_led_toggle(lv_obj_t * led);
-
-/**
- * Set the style of a led
- * @param led pointer to a led object
- * @param type which style should be set (can be only `LV_LED_STYLE_MAIN`)
- * @param style pointer to a style
- */
-static inline void lv_led_set_style(lv_obj_t * led, lv_led_style_t type, const lv_style_t * style)
-{
- (void)type; /*Unused*/
- lv_obj_set_style(led, style);
-}
-
-/**
- * Get the brightness of a LEd object
- * @param led pointer to LED object
- * @return bright 0 (max. dark) ... 255 (max. light)
- */
-uint8_t lv_led_get_bright(const lv_obj_t * led);
-
-/**
- * Get the style of an led object
- * @param led pointer to an led object
- * @param type which style should be get (can be only `LV_CHART_STYLE_MAIN`)
- * @return pointer to the led's style
- */
-static inline const lv_style_t * lv_led_get_style(const lv_obj_t * led, lv_led_style_t type)
-{
- (void)type; /*Unused*/
- return lv_obj_get_style(led);
-}
-
-/**********************
- * MACROS
- **********************/
-
-#endif /*LV_USE_LED*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_LED_H*/
diff --git a/src/libs/lvgl/src/lv_objx/lv_line.c b/src/libs/lvgl/src/lv_objx/lv_line.c
deleted file mode 100644
index ec9e35da..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_line.c
+++ /dev/null
@@ -1,308 +0,0 @@
-/**
- * @file lv_line.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_line.h"
-
-#if LV_USE_LINE != 0
-#include "../lv_core/lv_debug.h"
-#include "../lv_draw/lv_draw.h"
-#include "../lv_misc/lv_math.h"
-#include <stdbool.h>
-#include <stdint.h>
-#include <string.h>
-
-/*********************
- * DEFINES
- *********************/
-#define LV_OBJX_NAME "lv_line"
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static bool lv_line_design(lv_obj_t * line, const lv_area_t * mask, lv_design_mode_t mode);
-static lv_res_t lv_line_signal(lv_obj_t * line, lv_signal_t sign, void * param);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_signal_cb_t ancestor_signal;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Create a line objects
- * @param par pointer to an object, it will be the parent of the new line
- * @return pointer to the created line
- */
-lv_obj_t * lv_line_create(lv_obj_t * par, const lv_obj_t * copy)
-{
- LV_LOG_TRACE("line create started");
-
- /*Create a basic object*/
- lv_obj_t * new_line = lv_obj_create(par, copy);
- LV_ASSERT_MEM(new_line);
- if(new_line == NULL) return NULL;
-
- if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_line);
-
- /*Extend the basic object to line object*/
- lv_line_ext_t * ext = lv_obj_allocate_ext_attr(new_line, sizeof(lv_line_ext_t));
- LV_ASSERT_MEM(ext);
- if(ext == NULL) return NULL;
-
- ext->point_num = 0;
- ext->point_array = NULL;
- ext->auto_size = 1;
- ext->y_inv = 0;
-
- lv_obj_set_design_cb(new_line, lv_line_design);
- lv_obj_set_signal_cb(new_line, lv_line_signal);
-
- /*Init the new line*/
- if(copy == NULL) {
- lv_obj_set_size(new_line, LV_DPI,
- LV_DPI); /*Auto size is enables, but set default size until no points are added*/
- lv_obj_set_style(new_line, NULL); /*Inherit parent's style*/
- lv_obj_set_click(new_line, false);
- }
- /*Copy an existing object*/
- else {
- lv_line_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
- lv_line_set_auto_size(new_line, lv_line_get_auto_size(copy));
- lv_line_set_y_invert(new_line, lv_line_get_y_invert(copy));
- lv_line_set_auto_size(new_line, lv_line_get_auto_size(copy));
- lv_line_set_points(new_line, copy_ext->point_array, copy_ext->point_num);
- /*Refresh the style with new signal function*/
- lv_obj_refresh_style(new_line);
- }
-
- LV_LOG_INFO("line created");
-
- return new_line;
-}
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set an array of points. The line object will connect these points.
- * @param line pointer to a line object
- * @param point_a an array of points. Only the address is saved,
- * so the array can NOT be a local variable which will be destroyed
- * @param point_num number of points in 'point_a'
- */
-void lv_line_set_points(lv_obj_t * line, const lv_point_t point_a[], uint16_t point_num)
-{
- LV_ASSERT_OBJ(line, LV_OBJX_NAME);
-
- lv_line_ext_t * ext = lv_obj_get_ext_attr(line);
- ext->point_array = point_a;
- ext->point_num = point_num;
-
- if(point_num > 0 && ext->auto_size != 0) {
- uint16_t i;
- lv_coord_t xmax = LV_COORD_MIN;
- lv_coord_t ymax = LV_COORD_MIN;
- for(i = 0; i < point_num; i++) {
- xmax = LV_MATH_MAX(point_a[i].x, xmax);
- ymax = LV_MATH_MAX(point_a[i].y, ymax);
- }
-
- const lv_style_t * style = lv_line_get_style(line, LV_LINE_STYLE_MAIN);
- lv_obj_set_size(line, xmax + style->line.width, ymax + style->line.width);
- }
-
- lv_obj_invalidate(line);
-}
-
-/**
- * Enable (or disable) the auto-size option. The size of the object will fit to its points.
- * (set width to x max and height to y max)
- * @param line pointer to a line object
- * @param en true: auto size is enabled, false: auto size is disabled
- */
-void lv_line_set_auto_size(lv_obj_t * line, bool en)
-{
- LV_ASSERT_OBJ(line, LV_OBJX_NAME);
-
- lv_line_ext_t * ext = lv_obj_get_ext_attr(line);
- if(ext->auto_size == en) return;
-
- ext->auto_size = en == false ? 0 : 1;
-
- /*Refresh the object*/
- if(en) lv_line_set_points(line, ext->point_array, ext->point_num);
-}
-
-/**
- * Enable (or disable) the y coordinate inversion.
- * If enabled then y will be subtracted from the height of the object,
- * therefore the y=0 coordinate will be on the bottom.
- * @param line pointer to a line object
- * @param en true: enable the y inversion, false:disable the y inversion
- */
-void lv_line_set_y_invert(lv_obj_t * line, bool en)
-{
- LV_ASSERT_OBJ(line, LV_OBJX_NAME);
-
- lv_line_ext_t * ext = lv_obj_get_ext_attr(line);
- if(ext->y_inv == en) return;
-
- ext->y_inv = en == false ? 0 : 1;
-
- lv_obj_invalidate(line);
-}
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the auto size attribute
- * @param line pointer to a line object
- * @return true: auto size is enabled, false: disabled
- */
-bool lv_line_get_auto_size(const lv_obj_t * line)
-{
- LV_ASSERT_OBJ(line, LV_OBJX_NAME);
-
- lv_line_ext_t * ext = lv_obj_get_ext_attr(line);
-
- return ext->auto_size == 0 ? false : true;
-}
-
-/**
- * Get the y inversion attribute
- * @param line pointer to a line object
- * @return true: y inversion is enabled, false: disabled
- */
-bool lv_line_get_y_invert(const lv_obj_t * line)
-{
- LV_ASSERT_OBJ(line, LV_OBJX_NAME);
-
- lv_line_ext_t * ext = lv_obj_get_ext_attr(line);
-
- return ext->y_inv == 0 ? false : true;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Handle the drawing related tasks of the lines
- * @param line pointer to an object
- * @param mask the object will be drawn only in this area
- * @param mode LV_DESIGN_COVER_CHK: only check if the object fully covers the 'mask_p' area
- * (return 'true' if yes)
- * LV_DESIGN_DRAW: draw the object (always return 'true')
- * LV_DESIGN_DRAW_POST: drawing after every children are drawn
- * @param return true/false, depends on 'mode'
- */
-static bool lv_line_design(lv_obj_t * line, const lv_area_t * mask, lv_design_mode_t mode)
-{
- /*A line never covers an area*/
- if(mode == LV_DESIGN_COVER_CHK)
- return false;
- else if(mode == LV_DESIGN_DRAW_MAIN) {
- lv_line_ext_t * ext = lv_obj_get_ext_attr(line);
-
- if(ext->point_num == 0 || ext->point_array == NULL) return false;
-
- const lv_style_t * style = lv_obj_get_style(line);
- lv_opa_t opa_scale = lv_obj_get_opa_scale(line);
- lv_area_t area;
- lv_obj_get_coords(line, &area);
- lv_coord_t x_ofs = area.x1;
- lv_coord_t y_ofs = area.y1;
- lv_point_t p1;
- lv_point_t p2;
- lv_coord_t h = lv_obj_get_height(line);
- uint16_t i;
-
- lv_style_t circle_style_tmp; /*If rounded...*/
- if(style->line.rounded) {
- lv_style_copy(&circle_style_tmp, style);
- circle_style_tmp.body.radius = LV_RADIUS_CIRCLE;
- circle_style_tmp.body.main_color = style->line.color;
- circle_style_tmp.body.grad_color = style->line.color;
- circle_style_tmp.body.opa = style->line.opa;
- }
- lv_area_t circle_area;
-
- /*Read all points and draw the lines*/
- for(i = 0; i < ext->point_num - 1; i++) {
-
- p1.x = ext->point_array[i].x + x_ofs;
- p2.x = ext->point_array[i + 1].x + x_ofs;
-
- if(ext->y_inv == 0) {
- p1.y = ext->point_array[i].y + y_ofs;
- p2.y = ext->point_array[i + 1].y + y_ofs;
- } else {
- p1.y = h - ext->point_array[i].y + y_ofs;
- p2.y = h - ext->point_array[i + 1].y + y_ofs;
- }
- lv_draw_line(&p1, &p2, mask, style, opa_scale);
-
- /*Draw circle on the joints if enabled*/
- if(style->line.rounded) {
- circle_area.x1 = p1.x - ((style->line.width - 1) >> 1) - ((style->line.width - 1) & 0x1);
- circle_area.y1 = p1.y - ((style->line.width - 1) >> 1) - ((style->line.width - 1) & 0x1);
- circle_area.x2 = p1.x + ((style->line.width - 1) >> 1);
- circle_area.y2 = p1.y + ((style->line.width - 1) >> 1);
- lv_draw_rect(&circle_area, mask, &circle_style_tmp, opa_scale);
- }
- }
-
- /*Draw circle on the last point too if enabled*/
- if(style->line.rounded) {
- circle_area.x1 = p2.x - ((style->line.width - 1) >> 1) - ((style->line.width - 1) & 0x1);
- circle_area.y1 = p2.y - ((style->line.width - 1) >> 1) - ((style->line.width - 1) & 0x1);
- circle_area.x2 = p2.x + ((style->line.width - 1) >> 1);
- circle_area.y2 = p2.y + ((style->line.width - 1) >> 1);
- lv_draw_rect(&circle_area, mask, &circle_style_tmp, opa_scale);
- }
- }
- return true;
-}
-
-/**
- * Signal function of the line
- * @param line pointer to a line object
- * @param sign a signal type from lv_signal_t enum
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_line_signal(lv_obj_t * line, lv_signal_t sign, void * param)
-{
- lv_res_t res;
-
- /* Include the ancient signal function */
- res = ancestor_signal(line, sign, param);
- if(res != LV_RES_OK) return res;
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);
-
- if(sign == LV_SIGNAL_REFR_EXT_DRAW_PAD) {
- const lv_style_t * style = lv_line_get_style(line, LV_LINE_STYLE_MAIN);
- if(line->ext_draw_pad < style->line.width) line->ext_draw_pad = style->line.width;
- }
-
- return res;
-}
-#endif
diff --git a/src/libs/lvgl/src/lv_objx/lv_line.h b/src/libs/lvgl/src/lv_objx/lv_line.h
deleted file mode 100644
index cfea7368..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_line.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/**
- * @file lv_line.h
- *
- */
-
-#ifndef LV_LINE_H
-#define LV_LINE_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_LINE != 0
-
-#include "../lv_core/lv_obj.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/*Data of line*/
-typedef struct
-{
- /*Inherited from 'base_obj' so no inherited ext.*/ /*Ext. of ancestor*/
- const lv_point_t * point_array; /*Pointer to an array with the points of the line*/
- uint16_t point_num; /*Number of points in 'point_array' */
- uint8_t auto_size : 1; /*1: set obj. width to x max and obj. height to y max */
- uint8_t y_inv : 1; /*1: y == 0 will be on the bottom*/
-} lv_line_ext_t;
-
-/*Styles*/
-enum {
- LV_LINE_STYLE_MAIN,
-};
-typedef uint8_t lv_line_style_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Create a line objects
- * @param par pointer to an object, it will be the parent of the new line
- * @return pointer to the created line
- */
-lv_obj_t * lv_line_create(lv_obj_t * par, const lv_obj_t * copy);
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set an array of points. The line object will connect these points.
- * @param line pointer to a line object
- * @param point_a an array of points. Only the address is saved,
- * so the array can NOT be a local variable which will be destroyed
- * @param point_num number of points in 'point_a'
- */
-void lv_line_set_points(lv_obj_t * line, const lv_point_t point_a[], uint16_t point_num);
-
-/**
- * Enable (or disable) the auto-size option. The size of the object will fit to its points.
- * (set width to x max and height to y max)
- * @param line pointer to a line object
- * @param en true: auto size is enabled, false: auto size is disabled
- */
-void lv_line_set_auto_size(lv_obj_t * line, bool en);
-
-/**
- * Enable (or disable) the y coordinate inversion.
- * If enabled then y will be subtracted from the height of the object,
- * therefore the y=0 coordinate will be on the bottom.
- * @param line pointer to a line object
- * @param en true: enable the y inversion, false:disable the y inversion
- */
-void lv_line_set_y_invert(lv_obj_t * line, bool en);
-
-#define lv_line_set_y_inv \
- lv_line_set_y_invert /*The name was inconsistent. In v.6.0 only `lv_line_set_y_invert`will \
- work */
-
-/**
- * Set the style of a line
- * @param line pointer to a line object
- * @param type which style should be set (can be only `LV_LINE_STYLE_MAIN`)
- * @param style pointer to a style
- */
-static inline void lv_line_set_style(lv_obj_t * line, lv_line_style_t type, const lv_style_t * style)
-{
- (void)type; /*Unused*/
- lv_obj_set_style(line, style);
-}
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the auto size attribute
- * @param line pointer to a line object
- * @return true: auto size is enabled, false: disabled
- */
-bool lv_line_get_auto_size(const lv_obj_t * line);
-
-/**
- * Get the y inversion attribute
- * @param line pointer to a line object
- * @return true: y inversion is enabled, false: disabled
- */
-bool lv_line_get_y_invert(const lv_obj_t * line);
-
-/**
- * Get the style of an line object
- * @param line pointer to an line object
- * @param type which style should be get (can be only `LV_LINE_STYLE_MAIN`)
- * @return pointer to the line's style
- */
-static inline const lv_style_t * lv_line_get_style(const lv_obj_t * line, lv_line_style_t type)
-{
- (void)type; /*Unused*/
- return lv_obj_get_style(line);
-}
-
-/**********************
- * MACROS
- **********************/
-
-#endif /*LV_USE_LINE*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_LINE_H*/
diff --git a/src/libs/lvgl/src/lv_objx/lv_list.c b/src/libs/lvgl/src/lv_objx/lv_list.c
deleted file mode 100644
index 54fe16a2..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_list.c
+++ /dev/null
@@ -1,1067 +0,0 @@
-/**
- * @file lv_list.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_list.h"
-#if LV_USE_LIST != 0
-
-#include "../lv_core/lv_debug.h"
-#include "../lv_core/lv_group.h"
-#include "../lv_themes/lv_theme.h"
-#include "../lv_misc/lv_anim.h"
-#include "../lv_misc/lv_math.h"
-
-/*********************
- * DEFINES
- *********************/
-#define LV_OBJX_NAME "lv_list"
-
-#define LV_LIST_LAYOUT_DEF LV_LAYOUT_COL_M
-
-#if LV_USE_ANIMATION == 0
-#undef LV_LIST_DEF_ANIM_TIME
-#define LV_LIST_DEF_ANIM_TIME 0
-#endif
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param);
-static lv_res_t lv_list_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param);
-static void lv_list_btn_single_select(lv_obj_t * btn);
-static bool lv_list_is_list_btn(lv_obj_t * list_btn);
-static bool lv_list_is_list_img(lv_obj_t * list_btn);
-static bool lv_list_is_list_label(lv_obj_t * list_btn);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-#if LV_USE_IMG
-static lv_signal_cb_t img_signal;
-#endif
-static lv_signal_cb_t label_signal;
-static lv_signal_cb_t ancestor_page_signal;
-static lv_signal_cb_t ancestor_btn_signal;
-
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Create a list objects
- * @param par pointer to an object, it will be the parent of the new list
- * @param copy pointer to a list object, if not NULL then the new object will be copied from it
- * @return pointer to the created list
- */
-lv_obj_t * lv_list_create(lv_obj_t * par, const lv_obj_t * copy)
-{
- LV_LOG_TRACE("list create started");
-
- /*Create the ancestor basic object*/
- lv_obj_t * new_list = lv_page_create(par, copy);
- LV_ASSERT_MEM(new_list);
- if(new_list == NULL) return NULL;
-
- if(ancestor_page_signal == NULL) ancestor_page_signal = lv_obj_get_signal_cb(new_list);
-
- lv_list_ext_t * ext = lv_obj_allocate_ext_attr(new_list, sizeof(lv_list_ext_t));
- LV_ASSERT_MEM(ext);
- if(ext == NULL) return NULL;
-
- ext->style_img = NULL;
- ext->styles_btn[LV_BTN_STATE_REL] = &lv_style_btn_rel;
- ext->styles_btn[LV_BTN_STATE_PR] = &lv_style_btn_pr;
- ext->styles_btn[LV_BTN_STATE_TGL_REL] = &lv_style_btn_tgl_rel;
- ext->styles_btn[LV_BTN_STATE_TGL_PR] = &lv_style_btn_tgl_pr;
- ext->styles_btn[LV_BTN_STATE_INA] = &lv_style_btn_ina;
- ext->single_mode = false;
- ext->size = 0;
-
-#if LV_USE_GROUP
- ext->last_sel = NULL;
- ext->selected_btn = NULL;
- ext->last_clicked_btn = NULL;
-#endif
-
- lv_obj_set_signal_cb(new_list, lv_list_signal);
-
- /*Init the new list object*/
- if(copy == NULL) {
- lv_page_set_anim_time(new_list, LV_LIST_DEF_ANIM_TIME);
- lv_page_set_scrl_fit2(new_list, LV_FIT_FLOOD, LV_FIT_TIGHT);
- lv_obj_set_size(new_list, 2 * LV_DPI, 3 * LV_DPI);
- lv_page_set_scrl_layout(new_list, LV_LIST_LAYOUT_DEF);
- lv_list_set_sb_mode(new_list, LV_SB_MODE_DRAG);
-
- /*Set the default styles*/
- lv_theme_t * th = lv_theme_get_current();
- if(th) {
- lv_list_set_style(new_list, LV_LIST_STYLE_BG, th->style.list.bg);
- lv_list_set_style(new_list, LV_LIST_STYLE_SCRL, th->style.list.scrl);
- lv_list_set_style(new_list, LV_LIST_STYLE_SB, th->style.list.sb);
- lv_list_set_style(new_list, LV_LIST_STYLE_BTN_REL, th->style.list.btn.rel);
- lv_list_set_style(new_list, LV_LIST_STYLE_BTN_PR, th->style.list.btn.pr);
- lv_list_set_style(new_list, LV_LIST_STYLE_BTN_TGL_REL, th->style.list.btn.tgl_rel);
- lv_list_set_style(new_list, LV_LIST_STYLE_BTN_TGL_PR, th->style.list.btn.tgl_pr);
- lv_list_set_style(new_list, LV_LIST_STYLE_BTN_INA, th->style.list.btn.ina);
- } else {
- lv_list_set_style(new_list, LV_LIST_STYLE_BG, &lv_style_transp_fit);
- lv_list_set_style(new_list, LV_LIST_STYLE_SCRL, &lv_style_pretty);
- }
- } else {
- lv_list_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
-
- lv_obj_t * copy_btn = lv_list_get_next_btn(copy, NULL);
- while(copy_btn) {
- const void * img_src = NULL;
-#if LV_USE_IMG
- lv_obj_t * copy_img = lv_list_get_btn_img(copy_btn);
- if(copy_img) img_src = lv_img_get_src(copy_img);
-#endif
- lv_list_add_btn(new_list, img_src, lv_list_get_btn_text(copy_btn));
- copy_btn = lv_list_get_next_btn(copy, copy_btn);
- }
-
- lv_list_set_style(new_list, LV_LIST_STYLE_BTN_REL, copy_ext->styles_btn[LV_BTN_STATE_REL]);
- lv_list_set_style(new_list, LV_LIST_STYLE_BTN_PR, copy_ext->styles_btn[LV_BTN_STATE_PR]);
- lv_list_set_style(new_list, LV_LIST_STYLE_BTN_TGL_REL, copy_ext->styles_btn[LV_BTN_STATE_TGL_REL]);
- lv_list_set_style(new_list, LV_LIST_STYLE_BTN_TGL_PR, copy_ext->styles_btn[LV_BTN_STATE_TGL_REL]);
- lv_list_set_style(new_list, LV_LIST_STYLE_BTN_INA, copy_ext->styles_btn[LV_BTN_STATE_INA]);
-
- /*Refresh the style with new signal function*/
- lv_obj_refresh_style(new_list);
- }
-
- LV_LOG_INFO("list created");
-
- return new_list;
-}
-
-/**
- * Delete all children of the scrl object, without deleting scrl child.
- * @param list pointer to an object
- */
-void lv_list_clean(lv_obj_t * list)
-{
- LV_ASSERT_OBJ(list, LV_OBJX_NAME);
-
- lv_obj_t * scrl = lv_page_get_scrl(list);
- lv_obj_clean(scrl);
- lv_list_ext_t * ext = lv_obj_get_ext_attr(list);
- ext->size = 0;
-}
-
-/*======================
- * Add/remove functions
- *=====================*/
-
-/**
- * Add a list element to the list
- * @param list pointer to list object
- * @param img_fn file name of an image before the text (NULL if unused)
- * @param txt text of the list element (NULL if unused)
- * @return pointer to the new list element which can be customized (a button)
- */
-lv_obj_t * lv_list_add_btn(lv_obj_t * list, const void * img_src, const char * txt)
-{
- LV_ASSERT_OBJ(list, LV_OBJX_NAME);
-
- lv_obj_t * last_btn = lv_list_get_prev_btn(list, NULL);
-
- /*The coordinates may changed due to autofit so revert them at the end*/
- lv_coord_t pos_x_ori = lv_obj_get_x(list);
- lv_coord_t pos_y_ori = lv_obj_get_y(list);
-
-
- lv_list_ext_t * ext = lv_obj_get_ext_attr(list);
- ext->size++;
- /*Create a list element with the image an the text*/
- lv_obj_t * liste;
- liste = lv_btn_create(list, NULL);
-
- /*Save the original signal function because it will be required in `lv_list_btn_signal`*/
- if(ancestor_btn_signal == NULL) ancestor_btn_signal = lv_obj_get_signal_cb(liste);
-
- /*Set the default styles*/
- lv_btn_set_style(liste, LV_BTN_STYLE_REL, ext->styles_btn[LV_BTN_STATE_REL]);
- lv_btn_set_style(liste, LV_BTN_STYLE_PR, ext->styles_btn[LV_BTN_STATE_PR]);
- lv_btn_set_style(liste, LV_BTN_STYLE_TGL_REL, ext->styles_btn[LV_BTN_STATE_TGL_REL]);
- lv_btn_set_style(liste, LV_BTN_STYLE_TGL_PR, ext->styles_btn[LV_BTN_STATE_TGL_PR]);
- lv_btn_set_style(liste, LV_BTN_STYLE_INA, ext->styles_btn[LV_BTN_STATE_INA]);
-
- lv_page_glue_obj(liste, true);
- lv_btn_set_layout(liste, LV_LAYOUT_ROW_M);
-
- lv_layout_t list_layout = lv_list_get_layout(list);
- bool layout_ver = false;
- if(list_layout == LV_LAYOUT_COL_M || list_layout == LV_LAYOUT_COL_L || list_layout == LV_LAYOUT_COL_R) {
- layout_ver = true;
- }
-
- if(layout_ver) {
- lv_btn_set_fit2(liste, LV_FIT_FLOOD, LV_FIT_TIGHT);
- } else {
- lv_coord_t w = last_btn ? lv_obj_get_width(last_btn) : (LV_DPI * 3) / 2;
- lv_btn_set_fit2(liste, LV_FIT_NONE, LV_FIT_TIGHT);
- lv_obj_set_width(liste, w);
- }
-
-
- lv_obj_set_protect(liste, LV_PROTECT_PRESS_LOST);
- lv_obj_set_signal_cb(liste, lv_list_btn_signal);
-
-#if LV_USE_IMG != 0
- lv_obj_t * img = NULL;
- if(img_src) {
- img = lv_img_create(liste, NULL);
- lv_img_set_src(img, img_src);
- lv_obj_set_style(img, ext->style_img);
- lv_obj_set_click(img, false);
- if(img_signal == NULL) img_signal = lv_obj_get_signal_cb(img);
- }
-#endif
- if(txt != NULL) {
- lv_coord_t btn_hor_pad = ext->styles_btn[LV_BTN_STYLE_REL]->body.padding.left -
- ext->styles_btn[LV_BTN_STYLE_REL]->body.padding.right;
- lv_obj_t * label = lv_label_create(liste, NULL);
- lv_label_set_text(label, txt);
- lv_obj_set_click(label, false);
- lv_label_set_long_mode(label, LV_LABEL_LONG_SROLL_CIRC);
- if(lv_obj_get_base_dir(liste) == LV_BIDI_DIR_RTL) lv_obj_set_width(label, label->coords.x2 - liste->coords.x1 - btn_hor_pad);
- else lv_obj_set_width(label, liste->coords.x2 - label->coords.x1 - btn_hor_pad);
- if(label_signal == NULL) label_signal = lv_obj_get_signal_cb(label);
- }
-#if LV_USE_GROUP
- /* If this is the first item to be added to the list and the list is
- * focused, select it */
- {
- lv_group_t * g = lv_obj_get_group(list);
- if(ext->size == 1 && lv_group_get_focused(g) == list) {
- lv_list_set_btn_selected(list, liste);
- }
- }
-#endif
-
- lv_obj_set_pos(list, pos_x_ori, pos_y_ori);
-
- return liste;
-}
-
-/**
- * Remove the index of the button in the list
- * @param list pointer to a list object
- * @param index pointer to a the button's index in the list, index must be 0 <= index <
- * lv_list_ext_t.size
- * @return true: successfully deleted
- */
-bool lv_list_remove(const lv_obj_t * list, uint16_t index)
-{
- LV_ASSERT_OBJ(list, LV_OBJX_NAME);
-
- lv_list_ext_t * ext = lv_obj_get_ext_attr(list);
- if(index >= ext->size) return false;
- uint16_t count = 0;
- lv_obj_t * e = lv_list_get_next_btn(list, NULL);
- while(e != NULL) {
- if(count == index) {
- lv_obj_del(e);
- ext->size--;
- return true;
- }
- e = lv_list_get_next_btn(list, e);
- count++;
- }
- return false;
-}
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set single button selected mode, only one button will be selected if enabled.
- * @param list pointer to the currently pressed list object
- * @param mode, enable(true)/disable(false) single selected mode.
- */
-void lv_list_set_single_mode(lv_obj_t * list, bool mode)
-{
- LV_ASSERT_OBJ(list, LV_OBJX_NAME);
-
- lv_list_ext_t * ext = lv_obj_get_ext_attr(list);
-
- ext->single_mode = mode;
-}
-
-#if LV_USE_GROUP
-
-/**
- * Make a button selected
- * @param list pointer to a list object
- * @param btn pointer to a button to select
- * NULL to not select any buttons
- */
-void lv_list_set_btn_selected(lv_obj_t * list, lv_obj_t * btn)
-{
- LV_ASSERT_OBJ(list, LV_OBJX_NAME);
- if(btn) LV_ASSERT_OBJ(list, "lv_btn");
-
- lv_list_ext_t * ext = lv_obj_get_ext_attr(list);
-
- if(ext->selected_btn) {
- lv_btn_state_t s = lv_btn_get_state(ext->selected_btn);
- if(s == LV_BTN_STATE_PR)
- lv_btn_set_state(ext->selected_btn, LV_BTN_STATE_REL);
- else if(s == LV_BTN_STATE_TGL_PR)
- lv_btn_set_state(ext->selected_btn, LV_BTN_STATE_TGL_REL);
- }
-
- ext->selected_btn = btn;
-
- /*Don't forget which button was selected.
- * It will be restored when the list is focused.*/
- if(btn != NULL) {
- ext->last_sel = btn;
- }
-
- if(ext->selected_btn) {
- lv_btn_state_t s = lv_btn_get_state(ext->selected_btn);
- if(s == LV_BTN_STATE_REL)
- lv_btn_set_state(ext->selected_btn, LV_BTN_STATE_PR);
- else if(s == LV_BTN_STATE_TGL_REL)
- lv_btn_set_state(ext->selected_btn, LV_BTN_STATE_TGL_PR);
-
- lv_page_focus(list, ext->selected_btn, LV_ANIM_ON);
- }
-}
-
-#endif
-
-/**
- * Set a style of a list
- * @param list pointer to a list object
- * @param type which style should be set
- * @param style pointer to a style
- */
-void lv_list_set_style(lv_obj_t * list, lv_list_style_t type, const lv_style_t * style)
-{
- LV_ASSERT_OBJ(list, LV_OBJX_NAME);
-
- lv_list_ext_t * ext = lv_obj_get_ext_attr(list);
- lv_btn_style_t btn_style_refr = LV_BTN_STYLE_REL;
- lv_obj_t * btn;
-
- switch(type) {
- case LV_LIST_STYLE_BG:
- lv_page_set_style(list, LV_PAGE_STYLE_BG, style);
- /*style change signal will call 'refr_btn_width' */
- break;
- case LV_LIST_STYLE_SCRL: lv_page_set_style(list, LV_PAGE_STYLE_SCRL, style); break;
- case LV_LIST_STYLE_SB: lv_page_set_style(list, LV_PAGE_STYLE_SB, style); break;
- case LV_LIST_STYLE_EDGE_FLASH: lv_page_set_style(list, LV_PAGE_STYLE_EDGE_FLASH, style); break;
- case LV_LIST_STYLE_BTN_REL:
- ext->styles_btn[LV_BTN_STATE_REL] = style;
- btn_style_refr = LV_BTN_STYLE_REL;
- break;
- case LV_LIST_STYLE_BTN_PR:
- ext->styles_btn[LV_BTN_STATE_PR] = style;
- btn_style_refr = LV_BTN_STYLE_PR;
- break;
- case LV_LIST_STYLE_BTN_TGL_REL:
- ext->styles_btn[LV_BTN_STATE_TGL_REL] = style;
- btn_style_refr = LV_BTN_STYLE_TGL_REL;
- break;
- case LV_LIST_STYLE_BTN_TGL_PR:
- ext->styles_btn[LV_BTN_STATE_TGL_PR] = style;
- btn_style_refr = LV_BTN_STYLE_TGL_PR;
- break;
- case LV_LIST_STYLE_BTN_INA:
- ext->styles_btn[LV_BTN_STATE_INA] = style;
- btn_style_refr = LV_BTN_STYLE_INA;
- break;
- }
-
- /*Refresh existing buttons' style*/
- if(type == LV_LIST_STYLE_BTN_PR || type == LV_LIST_STYLE_BTN_REL || type == LV_LIST_STYLE_BTN_TGL_REL ||
- type == LV_LIST_STYLE_BTN_TGL_PR || type == LV_LIST_STYLE_BTN_INA) {
- btn = lv_list_get_prev_btn(list, NULL);
- while(btn != NULL) {
- lv_btn_set_style(btn, btn_style_refr, ext->styles_btn[btn_style_refr]);
- btn = lv_list_get_prev_btn(list, btn);
- }
- }
-}
-
-/**
- * Set layout of a list
- * @param list pointer to a list object
- * @param layout which layout should be used
- */
- void lv_list_set_layout(lv_obj_t * list, lv_layout_t layout)
- {
- LV_ASSERT_OBJ(list, LV_OBJX_NAME);
-
- /* Update list layout if necessary */
- if (layout == lv_list_get_layout(list)) return;
-
- /* Get the first button on the list */
- lv_obj_t * btn = lv_list_get_prev_btn(list, NULL);
-
- /* Visit all buttons on the list and update their layout */
- while(btn != NULL) {
- /*If a column layout set the buttons' width to list width*/
- if(layout == LV_LAYOUT_COL_M || layout == LV_LAYOUT_COL_L || layout == LV_LAYOUT_COL_R) {
- lv_btn_set_fit2(btn, LV_FIT_FLOOD, LV_FIT_TIGHT);
- }
- /*If a row layout set the buttons' width according to the content*/
- else if (layout == LV_LAYOUT_ROW_M || layout == LV_LAYOUT_ROW_T || layout == LV_LAYOUT_ROW_B) {
- lv_btn_set_fit(btn, LV_FIT_TIGHT);
- }
-
- btn = lv_list_get_prev_btn(list, btn);
- }
-
- if(layout == LV_LAYOUT_COL_M || layout == LV_LAYOUT_COL_L || layout == LV_LAYOUT_COL_R) {
- lv_page_set_scrl_fit2(list, LV_FIT_FLOOD, LV_FIT_TIGHT);
- } else if (layout == LV_LAYOUT_ROW_M || layout == LV_LAYOUT_ROW_T || layout == LV_LAYOUT_ROW_B) {
- lv_page_set_scrl_fit2(list, LV_FIT_TIGHT, LV_FIT_TIGHT);
- lv_cont_set_fit2(list, LV_FIT_NONE, LV_FIT_TIGHT);
- }
-
- lv_page_set_scrl_layout(list, layout);
- }
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get single button selected mode.
- * @param list pointer to the currently pressed list object.
- */
-bool lv_list_get_single_mode(lv_obj_t * list)
-{
- LV_ASSERT_OBJ(list, LV_OBJX_NAME);
-
- lv_list_ext_t * ext = lv_obj_get_ext_attr(list);
-
- return (ext->single_mode);
-}
-
-/**
- * Get the text of a list element
- * @param btn pointer to list element
- * @return pointer to the text
- */
-const char * lv_list_get_btn_text(const lv_obj_t * btn)
-{
- LV_ASSERT_OBJ(btn, "lv_btn");
-
- lv_obj_t * label = lv_list_get_btn_label(btn);
- if(label == NULL) return "";
- return lv_label_get_text(label);
-}
-
-/**
- * Get the label object from a list element
- * @param btn pointer to a list element (button)
- * @return pointer to the label from the list element or NULL if not found
- */
-lv_obj_t * lv_list_get_btn_label(const lv_obj_t * btn)
-{
- LV_ASSERT_OBJ(btn, "lv_btn");
-
- lv_obj_t * label = lv_obj_get_child(btn, NULL);
- if(label == NULL) return NULL;
-
- while(lv_list_is_list_label(label) == false) {
- label = lv_obj_get_child(btn, label);
- if(label == NULL) break;
- }
-
- return label;
-}
-
-/**
- * Get the image object from a list element
- * @param btn pointer to a list element (button)
- * @return pointer to the image from the list element or NULL if not found
- */
-lv_obj_t * lv_list_get_btn_img(const lv_obj_t * btn)
-{
- LV_ASSERT_OBJ(btn, "lv_btn");
-
-#if LV_USE_IMG != 0
- lv_obj_t * img = lv_obj_get_child(btn, NULL);
- if(img == NULL) return NULL;
-
- while(lv_list_is_list_img(img) == false) {
- img = lv_obj_get_child(btn, img);
- if(img == NULL) break;
- }
-
- return img;
-#else
- return NULL;
-#endif
-}
-
-/**
- * Get the previous button from list. (Starts from the bottom button)
- * @param list pointer to a list object
- * @param prev_btn pointer to button. Search the previous before it.
- * @return pointer to the previous button or NULL when no more buttons
- */
-lv_obj_t * lv_list_get_prev_btn(const lv_obj_t * list, lv_obj_t * prev_btn)
-{
- LV_ASSERT_OBJ(list, LV_OBJX_NAME);
-
- /* Not a good practice but user can add/create objects to the lists manually.
- * When getting the next button try to be sure that it is at least a button */
-
- lv_obj_t * btn;
- lv_obj_t * scrl = lv_page_get_scrl(list);
-
- btn = lv_obj_get_child(scrl, prev_btn);
- if(btn == NULL) return NULL;
-
- while(lv_list_is_list_btn(btn) == false) {
- btn = lv_obj_get_child(scrl, btn);
- if(btn == NULL) break;
- }
-
- return btn;
-}
-
-/**
- * Get the next button from list. (Starts from the top button)
- * @param list pointer to a list object
- * @param prev_btn pointer to button. Search the next after it.
- * @return pointer to the next button or NULL when no more buttons
- */
-lv_obj_t * lv_list_get_next_btn(const lv_obj_t * list, lv_obj_t * prev_btn)
-{
- LV_ASSERT_OBJ(list, LV_OBJX_NAME);
-
- /* Not a good practice but user can add/create objects to the lists manually.
- * When getting the next button try to be sure that it is at least a button */
-
- lv_obj_t * btn;
- lv_obj_t * scrl = lv_page_get_scrl(list);
-
- btn = lv_obj_get_child_back(scrl, prev_btn);
- if(btn == NULL) return NULL;
-
- while(lv_list_is_list_btn(btn) == false) {
- btn = lv_obj_get_child_back(scrl, btn);
- if(btn == NULL) break;
- }
-
- return btn;
-}
-
-/**
- * Get the index of the button in the list
- * @param list pointer to a list object. If NULL, assumes btn is part of a list.
- * @param btn pointer to a list element (button)
- * @return the index of the button in the list, or -1 of the button not in this list
- */
-int32_t lv_list_get_btn_index(const lv_obj_t * list, const lv_obj_t * btn)
-{
- LV_ASSERT_OBJ(list, LV_OBJX_NAME);
- LV_ASSERT_OBJ(btn, "lv_btn");
-
- int index = 0;
- if(list == NULL) {
- /* no list provided, assuming btn is part of a list */
- list = lv_obj_get_parent(lv_obj_get_parent(btn));
- }
- lv_obj_t * e = lv_list_get_next_btn(list, NULL);
- while(e != NULL) {
- if(e == btn) {
- return index;
- }
- index++;
- e = lv_list_get_next_btn(list, e);
- }
- return -1;
-}
-
-/**
- * Get the number of buttons in the list
- * @param list pointer to a list object
- * @return the number of buttons in the list
- */
-uint16_t lv_list_get_size(const lv_obj_t * list)
-{
- LV_ASSERT_OBJ(list, LV_OBJX_NAME);
-
- lv_list_ext_t * ext = lv_obj_get_ext_attr(list);
- return ext->size;
-}
-
-#if LV_USE_GROUP
-/**
- * Get the currently selected button
- * @param list pointer to a list object
- * @return pointer to the selected button
- */
-lv_obj_t * lv_list_get_btn_selected(const lv_obj_t * list)
-{
- LV_ASSERT_OBJ(list, LV_OBJX_NAME);
-
- lv_list_ext_t * ext = lv_obj_get_ext_attr(list);
- return ext->selected_btn;
-}
-#endif
-
-/**
- * Get layout of a list
- * @param list pointer to a list object
- * @return layout of the list object
- */
-lv_layout_t lv_list_get_layout(lv_obj_t * list)
-{
- LV_ASSERT_OBJ(list, LV_OBJX_NAME);
-
- return lv_page_get_scrl_layout(list);
-}
-
-/**
- * Get a style of a list
- * @param list pointer to a list object
- * @param type which style should be get
- * @return style pointer to a style
- */
-const lv_style_t * lv_list_get_style(const lv_obj_t * list, lv_list_style_t type)
-{
- LV_ASSERT_OBJ(list, LV_OBJX_NAME);
-
- const lv_style_t * style = NULL;
- lv_list_ext_t * ext = lv_obj_get_ext_attr(list);
-
- switch(type) {
- case LV_LIST_STYLE_BG: style = lv_page_get_style(list, LV_PAGE_STYLE_BG); break;
- case LV_LIST_STYLE_SCRL: style = lv_page_get_style(list, LV_PAGE_STYLE_SCRL); break;
- case LV_LIST_STYLE_SB: style = lv_page_get_style(list, LV_PAGE_STYLE_SB); break;
- case LV_LIST_STYLE_EDGE_FLASH: style = lv_page_get_style(list, LV_PAGE_STYLE_EDGE_FLASH); break;
- case LV_LIST_STYLE_BTN_REL: style = ext->styles_btn[LV_BTN_STATE_REL]; break;
- case LV_LIST_STYLE_BTN_PR: style = ext->styles_btn[LV_BTN_STATE_PR]; break;
- case LV_LIST_STYLE_BTN_TGL_REL: style = ext->styles_btn[LV_BTN_STATE_TGL_REL]; break;
- case LV_LIST_STYLE_BTN_TGL_PR: style = ext->styles_btn[LV_BTN_STATE_TGL_PR]; break;
- case LV_LIST_STYLE_BTN_INA: style = ext->styles_btn[LV_BTN_STATE_INA]; break;
- default: style = NULL; break;
- }
-
- return style;
-}
-
-/*=====================
- * Other functions
- *====================*/
-
-/**
- * Move the list elements up by one
- * @param list pointer a to list object
- */
-void lv_list_up(const lv_obj_t * list)
-{
- LV_ASSERT_OBJ(list, LV_OBJX_NAME);
-
- /*Search the first list element which 'y' coordinate is below the parent
- * and position the list to show this element on the bottom*/
- lv_obj_t * scrl = lv_page_get_scrl(list);
- lv_obj_t * e;
- lv_obj_t * e_prev = NULL;
-
- e = lv_list_get_prev_btn(list, NULL);
- while(e != NULL) {
- if(e->coords.y2 <= list->coords.y2) {
- if(e_prev != NULL) {
- lv_coord_t new_y = lv_obj_get_height(list) - (lv_obj_get_y(e_prev) + lv_obj_get_height(e_prev));
- if(lv_list_get_anim_time(list) == 0) {
- lv_obj_set_y(scrl, new_y);
- } else {
-#if LV_USE_ANIMATION
- lv_anim_t a;
- a.var = scrl;
- a.start = lv_obj_get_y(scrl);
- a.end = new_y;
- a.exec_cb = (lv_anim_exec_xcb_t)lv_obj_set_y;
- a.path_cb = lv_anim_path_linear;
- a.ready_cb = NULL;
- a.act_time = 0;
- a.time = LV_LIST_DEF_ANIM_TIME;
- a.playback = 0;
- a.playback_pause = 0;
- a.repeat = 0;
- a.repeat_pause = 0;
- lv_anim_create(&a);
-#endif
- }
- }
- break;
- }
- e_prev = e;
- e = lv_list_get_prev_btn(list, e);
- }
-}
-
-/**
- * Move the list elements down by one
- * @param list pointer to a list object
- */
-void lv_list_down(const lv_obj_t * list)
-{
- LV_ASSERT_OBJ(list, LV_OBJX_NAME);
-
- /*Search the first list element which 'y' coordinate is above the parent
- * and position the list to show this element on the top*/
- lv_obj_t * scrl = lv_page_get_scrl(list);
- lv_obj_t * e;
- e = lv_list_get_prev_btn(list, NULL);
- while(e != NULL) {
- if(e->coords.y1 < list->coords.y1) {
- lv_coord_t new_y = -lv_obj_get_y(e);
- if(lv_list_get_anim_time(list) == 0) {
- lv_obj_set_y(scrl, new_y);
- } else {
-#if LV_USE_ANIMATION
- lv_anim_t a;
- a.var = scrl;
- a.start = lv_obj_get_y(scrl);
- a.end = new_y;
- a.exec_cb = (lv_anim_exec_xcb_t)lv_obj_set_y;
- a.path_cb = lv_anim_path_linear;
- a.ready_cb = NULL;
- a.act_time = 0;
- a.time = LV_LIST_DEF_ANIM_TIME;
- a.playback = 0;
- a.playback_pause = 0;
- a.repeat = 0;
- a.repeat_pause = 0;
- lv_anim_create(&a);
-#endif
- }
- break;
- }
- e = lv_list_get_prev_btn(list, e);
- }
-}
-
-/**
- * Focus on a list button. It ensures that the button will be visible on the list.
- * @param btn pointer to a list button to focus
- * @param anim_en LV_ANIM_ON: scroll with animation, LV_ANOM_OFF: without animation
- */
-void lv_list_focus(const lv_obj_t * btn, lv_anim_enable_t anim)
-{
- LV_ASSERT_OBJ(btn, "");
-
-#if LV_USE_ANIMATION == 0
- anim = false;
-#endif
-
- lv_obj_t * list = lv_obj_get_parent(lv_obj_get_parent(btn));
-
- lv_page_focus(list, btn, anim == LV_ANIM_OFF ? 0 : lv_list_get_anim_time(list));
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Signal function of the list
- * @param list pointer to a list object
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param)
-{
- lv_res_t res;
-
- /* Include the ancient signal function */
- res = ancestor_page_signal(list, sign, param);
- if(res != LV_RES_OK) return res;
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);
-
- if(sign == LV_SIGNAL_RELEASED || sign == LV_SIGNAL_PRESSED || sign == LV_SIGNAL_PRESSING ||
- sign == LV_SIGNAL_LONG_PRESS || sign == LV_SIGNAL_LONG_PRESS_REP) {
-#if LV_USE_GROUP
- /*If pressed/released etc by a KEYPAD or ENCODER delegate signal to the button*/
- lv_indev_t * indev = lv_indev_get_act();
- lv_indev_type_t indev_type = lv_indev_get_type(indev);
- if(indev_type == LV_INDEV_TYPE_KEYPAD ||
- (indev_type == LV_INDEV_TYPE_ENCODER && lv_group_get_editing(lv_obj_get_group(list)))) {
- /*Get the 'pressed' button*/
- lv_obj_t * btn = NULL;
- btn = lv_list_get_prev_btn(list, btn);
- while(btn != NULL) {
- if(lv_btn_get_state(btn) == LV_BTN_STATE_PR) break;
- btn = lv_list_get_prev_btn(list, btn);
- }
- lv_list_ext_t * ext = lv_obj_get_ext_attr(list);
-
- /*The page receives the key presses so the events should be propagated to the selected
- * button*/
- if(btn) {
- if(sign == LV_SIGNAL_PRESSED) {
- res = lv_event_send(btn, LV_EVENT_PRESSED, NULL);
- } else if(sign == LV_SIGNAL_PRESSING) {
- res = lv_event_send(btn, LV_EVENT_PRESSING, NULL);
- } else if(sign == LV_SIGNAL_LONG_PRESS) {
- res = lv_event_send(btn, LV_EVENT_LONG_PRESSED, NULL);
- } else if(sign == LV_SIGNAL_LONG_PRESS_REP) {
- res = lv_event_send(btn, LV_EVENT_LONG_PRESSED_REPEAT, NULL);
- } else if(sign == LV_SIGNAL_RELEASED) {
-#if LV_USE_GROUP
- ext->last_sel = btn;
-#endif
- if(indev->proc.long_pr_sent == 0) {
- res = lv_event_send(btn, LV_EVENT_SHORT_CLICKED, NULL);
- }
- if(lv_indev_is_dragging(indev) == false && res == LV_RES_OK) {
- res = lv_event_send(btn, LV_EVENT_CLICKED, NULL);
- }
- if(res == LV_RES_OK) {
- res = lv_event_send(btn, LV_EVENT_RELEASED, NULL);
- }
- }
- }
- }
-#endif
- } else if(sign == LV_SIGNAL_FOCUS) {
-
-#if LV_USE_GROUP
- lv_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act());
- /*With ENCODER select the first button only in edit mode*/
- if(indev_type == LV_INDEV_TYPE_ENCODER) {
- lv_group_t * g = lv_obj_get_group(list);
- if(lv_group_get_editing(g)) {
- lv_list_ext_t * ext = lv_obj_get_ext_attr(list);
- if(ext->last_sel) {
- /* Select the last used button */
- lv_list_set_btn_selected(list, ext->last_sel);
- } else {
- /*Get the first button and mark it as selected*/
- lv_list_set_btn_selected(list, lv_list_get_next_btn(list, NULL));
- }
- } else {
- lv_list_set_btn_selected(list, NULL);
- }
- }
- /*Else select the clicked button*/
- else {
- /*Mark the last clicked button (if any) as selected because it triggered the focus*/
- lv_list_ext_t * ext = lv_obj_get_ext_attr(list);
- if(ext->last_clicked_btn) {
- lv_list_set_btn_selected(list, ext->last_clicked_btn);
- ext->last_clicked_btn = NULL;
-
- } else {
- if(ext->last_sel) {
- /* Select the last used button */
- lv_list_set_btn_selected(list, ext->last_sel);
- } else {
- /*Get the first button and mark it as selected*/
- lv_list_set_btn_selected(list, lv_list_get_next_btn(list, NULL));
- }
- }
- }
-#endif
- } else if(sign == LV_SIGNAL_DEFOCUS) {
-
-#if LV_USE_GROUP
- /*De-select the selected btn*/
- lv_list_set_btn_selected(list, NULL);
- lv_list_ext_t * ext = lv_obj_get_ext_attr(list);
- ext->last_clicked_btn = NULL; /*button click will be set if click happens before focus*/
- ext->selected_btn = NULL;
-#endif
- } else if(sign == LV_SIGNAL_GET_EDITABLE) {
- bool * editable = (bool *)param;
- *editable = true;
- } else if(sign == LV_SIGNAL_CONTROL) {
-
-#if LV_USE_GROUP
- char c = *((char *)param);
- if(c == LV_KEY_RIGHT || c == LV_KEY_DOWN) {
- lv_list_ext_t * ext = lv_obj_get_ext_attr(list);
- /*If there is a valid selected button the make the previous selected*/
- if(ext->selected_btn) {
- lv_obj_t * btn_prev = lv_list_get_next_btn(list, ext->selected_btn);
- if(btn_prev) lv_list_set_btn_selected(list, btn_prev);
- }
- /*If there is no selected button the make the first selected*/
- else {
- lv_obj_t * btn = lv_list_get_next_btn(list, NULL);
- if(btn)
- lv_list_set_btn_selected(list,
- btn); /*If there are no buttons on the list then there is no first button*/
- }
- } else if(c == LV_KEY_LEFT || c == LV_KEY_UP) {
- lv_list_ext_t * ext = lv_obj_get_ext_attr(list);
- /*If there is a valid selected button the make the next selected*/
- if(ext->selected_btn != NULL) {
- lv_obj_t * btn_next = lv_list_get_prev_btn(list, ext->selected_btn);
- if(btn_next) lv_list_set_btn_selected(list, btn_next);
- }
- /*If there is no selected button the make the first selected*/
- else {
- lv_obj_t * btn = lv_list_get_next_btn(list, NULL);
- if(btn) lv_list_set_btn_selected(list, btn);
- }
- }
-#endif
- }
- return res;
-}
-
-/**
- * Signal function of the list buttons
- * @param btn pointer to a button on the list
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_list_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param)
-{
- lv_res_t res;
-
- /* Include the ancient signal function */
- res = ancestor_btn_signal(btn, sign, param);
- if(res != LV_RES_OK) return res;
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, "");
-
- if(sign == LV_SIGNAL_RELEASED) {
- lv_obj_t * list = lv_obj_get_parent(lv_obj_get_parent(btn));
- lv_list_ext_t * ext = lv_obj_get_ext_attr(list);
- ext->page.scroll_prop_ip = 0;
-
-#if LV_USE_GROUP
- lv_group_t * g = lv_obj_get_group(list);
- if(lv_group_get_focused(g) == list && lv_indev_is_dragging(lv_indev_get_act()) == false) {
- /* Is the list is focused then be sure only the button being released
- * has a pressed state to indicate the selected state on the list*/
- lv_obj_t * btn_i = lv_list_get_prev_btn(list, NULL);
- while(btn_i) {
- lv_btn_state_t s = lv_btn_get_state(btn_i);
- if(s == LV_BTN_STATE_PR)
- lv_btn_set_state(btn_i, LV_BTN_STATE_REL);
- else if(s == LV_BTN_STATE_TGL_PR)
- lv_btn_set_state(btn_i, LV_BTN_STATE_TGL_REL);
- btn_i = lv_list_get_prev_btn(list, btn_i);
- }
-
- /*Make the released button "selected"*/
- lv_list_set_btn_selected(list, btn);
- }
-
- /* If `click_focus == 1` then LV_SIGNAL_FOCUS need to know which button triggered the focus
- * to mark it as selected (pressed state)*/
- ext->last_clicked_btn = btn;
-#endif
- if(lv_indev_is_dragging(lv_indev_get_act()) == false && ext->single_mode) {
- lv_list_btn_single_select(btn);
- }
- } else if(sign == LV_SIGNAL_PRESS_LOST) {
- lv_obj_t * list = lv_obj_get_parent(lv_obj_get_parent(btn));
- lv_list_ext_t * ext = lv_obj_get_ext_attr(list);
- ext->page.scroll_prop_ip = 0;
- } else if(sign == LV_SIGNAL_CLEANUP) {
-
-#if LV_USE_GROUP
- lv_obj_t * list = lv_obj_get_parent(lv_obj_get_parent(btn));
- lv_obj_t * sel = lv_list_get_btn_selected(list);
- if(sel == btn) lv_list_set_btn_selected(list, lv_list_get_next_btn(list, btn));
-#endif
- }
-
- return res;
-}
-
-/**
- * Make a single button selected in the list, deselect others.
- * @param btn pointer to the currently pressed list btn object
- */
-static void lv_list_btn_single_select(lv_obj_t * btn)
-{
- lv_obj_t * list = lv_obj_get_parent(lv_obj_get_parent(btn));
-
- lv_obj_t * e = lv_list_get_next_btn(list, NULL);
- do {
- if(e == btn) {
- lv_btn_set_state(e, LV_BTN_STATE_TGL_REL);
- } else {
- lv_btn_set_state(e, LV_BTN_STATE_REL);
- }
- e = lv_list_get_next_btn(list, e);
- } while(e != NULL);
-}
-
-/**
- * Check if this is really a list button or another object.
- * @param list_btn List button
- */
-static bool lv_list_is_list_btn(lv_obj_t * list_btn)
-{
- lv_obj_type_t type;
-
- lv_obj_get_type(list_btn, &type);
- uint8_t cnt;
- for(cnt = 0; cnt < LV_MAX_ANCESTOR_NUM; cnt++) {
- if(type.type[cnt] == NULL) break;
- if(!strcmp(type.type[cnt], "lv_btn")) return true;
- }
- return false;
-}
-
-/**
- * Check if this is really a list label or another object.
- * @param list_label List label
- */
-static bool lv_list_is_list_label(lv_obj_t * list_label)
-{
- lv_obj_type_t type;
-
- lv_obj_get_type(list_label, &type);
- uint8_t cnt;
- for(cnt = 0; cnt < LV_MAX_ANCESTOR_NUM; cnt++) {
- if(type.type[cnt] == NULL) break;
- if(!strcmp(type.type[cnt], "lv_label")) return true;
- }
- return false;
-}
-
-/**
- * Check if this is really a list image or another object.
- * @param list_image List image
- */
-static bool lv_list_is_list_img(lv_obj_t * list_img)
-{
- lv_obj_type_t type;
-
- lv_obj_get_type(list_img, &type);
- uint8_t cnt;
- for(cnt = 0; cnt < LV_MAX_ANCESTOR_NUM; cnt++) {
- if(type.type[cnt] == NULL) break;
- if(!strcmp(type.type[cnt], "lv_img")) return true;
- }
- return false;
-}
-
-#endif
diff --git a/src/libs/lvgl/src/lv_objx/lv_list.h b/src/libs/lvgl/src/lv_objx/lv_list.h
deleted file mode 100644
index e17bc87d..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_list.h
+++ /dev/null
@@ -1,359 +0,0 @@
-/**
- * @file lv_list.h
- *
- */
-
-#ifndef LV_LIST_H
-#define LV_LIST_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_LIST != 0
-
-/*Testing of dependencies*/
-#if LV_USE_PAGE == 0
-#error "lv_list: lv_page is required. Enable it in lv_conf.h (LV_USE_PAGE 1) "
-#endif
-
-#if LV_USE_BTN == 0
-#error "lv_list: lv_btn is required. Enable it in lv_conf.h (LV_USE_BTN 1) "
-#endif
-
-#if LV_USE_LABEL == 0
-#error "lv_list: lv_label is required. Enable it in lv_conf.h (LV_USE_LABEL 1) "
-#endif
-
-#include "../lv_core/lv_obj.h"
-#include "lv_page.h"
-#include "lv_btn.h"
-#include "lv_label.h"
-#include "lv_img.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-/*Data of list*/
-typedef struct
-{
- lv_page_ext_t page; /*Ext. of ancestor*/
- /*New data for this type */
- const lv_style_t * styles_btn[_LV_BTN_STATE_NUM]; /*Styles of the list element buttons*/
- const lv_style_t * style_img; /*Style of the list element images on buttons*/
- uint16_t size; /*the number of items(buttons) in the list*/
-
- uint8_t single_mode : 1; /* whether single selected mode is enabled */
-
-#if LV_USE_GROUP
- lv_obj_t * last_sel; /* The last selected button. It will be reverted when the list is focused again */
- lv_obj_t * selected_btn; /* The button is currently being selected*/
- /*Used to make the last clicked button pressed (selected) when the list become focused and
- * `click_focus == 1`*/
- lv_obj_t * last_clicked_btn;
-#endif
-} lv_list_ext_t;
-
-/** List styles. */
-enum {
- LV_LIST_STYLE_BG, /**< List background style */
- LV_LIST_STYLE_SCRL, /**< List scrollable area style. */
- LV_LIST_STYLE_SB, /**< List scrollbar style. */
- LV_LIST_STYLE_EDGE_FLASH, /**< List edge flash style. */
- LV_LIST_STYLE_BTN_REL, /**< Same meaning as the ordinary button styles. */
- LV_LIST_STYLE_BTN_PR,
- LV_LIST_STYLE_BTN_TGL_REL,
- LV_LIST_STYLE_BTN_TGL_PR,
- LV_LIST_STYLE_BTN_INA,
-};
-typedef uint8_t lv_list_style_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Create a list objects
- * @param par pointer to an object, it will be the parent of the new list
- * @param copy pointer to a list object, if not NULL then the new object will be copied from it
- * @return pointer to the created list
- */
-lv_obj_t * lv_list_create(lv_obj_t * par, const lv_obj_t * copy);
-
-/**
- * Delete all children of the scrl object, without deleting scrl child.
- * @param list pointer to an object
- */
-void lv_list_clean(lv_obj_t * list);
-
-/*======================
- * Add/remove functions
- *=====================*/
-
-/**
- * Add a list element to the list
- * @param list pointer to list object
- * @param img_fn file name of an image before the text (NULL if unused)
- * @param txt text of the list element (NULL if unused)
- * @return pointer to the new list element which can be customized (a button)
- */
-lv_obj_t * lv_list_add_btn(lv_obj_t * list, const void * img_src, const char * txt);
-
-/**
- * Remove the index of the button in the list
- * @param list pointer to a list object
- * @param index pointer to a the button's index in the list, index must be 0 <= index <
- * lv_list_ext_t.size
- * @return true: successfully deleted
- */
-bool lv_list_remove(const lv_obj_t * list, uint16_t index);
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set single button selected mode, only one button will be selected if enabled.
- * @param list pointer to the currently pressed list object
- * @param mode enable(true)/disable(false) single selected mode.
- */
-void lv_list_set_single_mode(lv_obj_t * list, bool mode);
-
-#if LV_USE_GROUP
-
-/**
- * Make a button selected
- * @param list pointer to a list object
- * @param btn pointer to a button to select
- * NULL to not select any buttons
- */
-void lv_list_set_btn_selected(lv_obj_t * list, lv_obj_t * btn);
-#endif
-
-/**
- * Set the scroll bar mode of a list
- * @param list pointer to a list object
- * @param sb_mode the new mode from 'lv_page_sb_mode_t' enum
- */
-static inline void lv_list_set_sb_mode(lv_obj_t * list, lv_sb_mode_t mode)
-{
- lv_page_set_sb_mode(list, mode);
-}
-
-/**
- * Enable the scroll propagation feature. If enabled then the List will move its parent if there is
- * no more space to scroll.
- * @param list pointer to a List
- * @param en true or false to enable/disable scroll propagation
- */
-static inline void lv_list_set_scroll_propagation(lv_obj_t * list, bool en)
-{
- lv_page_set_scroll_propagation(list, en);
-}
-
-/**
- * Enable the edge flash effect. (Show an arc when the an edge is reached)
- * @param list pointer to a List
- * @param en true or false to enable/disable end flash
- */
-static inline void lv_list_set_edge_flash(lv_obj_t * list, bool en)
-{
- lv_page_set_edge_flash(list, en);
-}
-
-/**
- * Set scroll animation duration on 'list_up()' 'list_down()' 'list_focus()'
- * @param list pointer to a list object
- * @param anim_time duration of animation [ms]
- */
-static inline void lv_list_set_anim_time(lv_obj_t * list, uint16_t anim_time)
-{
- lv_page_set_anim_time(list, anim_time);
-}
-
-/**
- * Set a style of a list
- * @param list pointer to a list object
- * @param type which style should be set
- * @param style pointer to a style
- */
-void lv_list_set_style(lv_obj_t * list, lv_list_style_t type, const lv_style_t * style);
-
-/**
- * Set layout of a list
- * @param list pointer to a list object
- * @param layout which layout should be used
- */
-void lv_list_set_layout(lv_obj_t * list, lv_layout_t layout);
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get single button selected mode.
- * @param list pointer to the currently pressed list object.
- */
-bool lv_list_get_single_mode(lv_obj_t * list);
-
-/**
- * Get the text of a list element
- * @param btn pointer to list element
- * @return pointer to the text
- */
-const char * lv_list_get_btn_text(const lv_obj_t * btn);
-/**
- * Get the label object from a list element
- * @param btn pointer to a list element (button)
- * @return pointer to the label from the list element or NULL if not found
- */
-lv_obj_t * lv_list_get_btn_label(const lv_obj_t * btn);
-
-/**
- * Get the image object from a list element
- * @param btn pointer to a list element (button)
- * @return pointer to the image from the list element or NULL if not found
- */
-lv_obj_t * lv_list_get_btn_img(const lv_obj_t * btn);
-
-/**
- * Get the next button from list. (Starts from the bottom button)
- * @param list pointer to a list object
- * @param prev_btn pointer to button. Search the next after it.
- * @return pointer to the next button or NULL when no more buttons
- */
-lv_obj_t * lv_list_get_prev_btn(const lv_obj_t * list, lv_obj_t * prev_btn);
-
-/**
- * Get the previous button from list. (Starts from the top button)
- * @param list pointer to a list object
- * @param prev_btn pointer to button. Search the previous before it.
- * @return pointer to the previous button or NULL when no more buttons
- */
-lv_obj_t * lv_list_get_next_btn(const lv_obj_t * list, lv_obj_t * prev_btn);
-
-/**
- * Get the index of the button in the list
- * @param list pointer to a list object. If NULL, assumes btn is part of a list.
- * @param btn pointer to a list element (button)
- * @return the index of the button in the list, or -1 of the button not in this list
- */
-int32_t lv_list_get_btn_index(const lv_obj_t * list, const lv_obj_t * btn);
-
-/**
- * Get the number of buttons in the list
- * @param list pointer to a list object
- * @return the number of buttons in the list
- */
-uint16_t lv_list_get_size(const lv_obj_t * list);
-
-#if LV_USE_GROUP
-/**
- * Get the currently selected button. Can be used while navigating in the list with a keypad.
- * @param list pointer to a list object
- * @return pointer to the selected button
- */
-lv_obj_t * lv_list_get_btn_selected(const lv_obj_t * list);
-#endif
-
-/**
- * Get layout of a list
- * @param list pointer to a list object
- * @return layout of the list object
- */
-lv_layout_t lv_list_get_layout(lv_obj_t * list);
-
-/**
- * Get the scroll bar mode of a list
- * @param list pointer to a list object
- * @return scrollbar mode from 'lv_page_sb_mode_t' enum
- */
-static inline lv_sb_mode_t lv_list_get_sb_mode(const lv_obj_t * list)
-{
- return lv_page_get_sb_mode(list);
-}
-
-/**
- * Get the scroll propagation property
- * @param list pointer to a List
- * @return true or false
- */
-static inline bool lv_list_get_scroll_propagation(lv_obj_t * list)
-{
- return lv_page_get_scroll_propagation(list);
-}
-
-/**
- * Get the scroll propagation property
- * @param list pointer to a List
- * @return true or false
- */
-static inline bool lv_list_get_edge_flash(lv_obj_t * list)
-{
- return lv_page_get_edge_flash(list);
-}
-
-/**
- * Get scroll animation duration
- * @param list pointer to a list object
- * @return duration of animation [ms]
- */
-static inline uint16_t lv_list_get_anim_time(const lv_obj_t * list)
-{
- return lv_page_get_anim_time(list);
-}
-
-/**
- * Get a style of a list
- * @param list pointer to a list object
- * @param type which style should be get
- * @return style pointer to a style
- * */
-const lv_style_t * lv_list_get_style(const lv_obj_t * list, lv_list_style_t type);
-
-/*=====================
- * Other functions
- *====================*/
-
-/**
- * Move the list elements up by one
- * @param list pointer a to list object
- */
-void lv_list_up(const lv_obj_t * list);
-/**
- * Move the list elements down by one
- * @param list pointer to a list object
- */
-void lv_list_down(const lv_obj_t * list);
-
-/**
- * Focus on a list button. It ensures that the button will be visible on the list.
- * @param btn pointer to a list button to focus
- * @param anim LV_ANOM_ON: scroll with animation, LV_ANIM_OFF: without animation
- */
-void lv_list_focus(const lv_obj_t * btn, lv_anim_enable_t anim);
-
-/**********************
- * MACROS
- **********************/
-
-#endif /*LV_USE_LIST*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_LIST_H*/
diff --git a/src/libs/lvgl/src/lv_objx/lv_lmeter.c b/src/libs/lvgl/src/lv_objx/lv_lmeter.c
deleted file mode 100644
index d1f21014..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_lmeter.c
+++ /dev/null
@@ -1,422 +0,0 @@
-/**
- * @file lv_lmeter.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_lmeter.h"
-#if LV_USE_LMETER != 0
-
-#include "../lv_core/lv_debug.h"
-#include "../lv_draw/lv_draw.h"
-#include "../lv_themes/lv_theme.h"
-#include "../lv_core/lv_group.h"
-#include "../lv_misc/lv_math.h"
-
-/*********************
- * DEFINES
- *********************/
-#define LV_OBJX_NAME "lv_lmeter"
-
-#define LV_LMETER_LINE_UPSCALE 5 /*2^x upscale of line to make rounding*/
-#define LV_LMETER_LINE_UPSCALE_MASK ((1 << LV_LMETER_LINE_UPSCALE) - 1)
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static bool lv_lmeter_design(lv_obj_t * lmeter, const lv_area_t * mask, lv_design_mode_t mode);
-static lv_res_t lv_lmeter_signal(lv_obj_t * lmeter, lv_signal_t sign, void * param);
-static lv_coord_t lv_lmeter_coord_round(int32_t x);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_signal_cb_t ancestor_signal;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Create a line meter objects
- * @param par pointer to an object, it will be the parent of the new line meter
- * @param copy pointer to a line meter object, if not NULL then the new object will be copied from
- * it
- * @return pointer to the created line meter
- */
-lv_obj_t * lv_lmeter_create(lv_obj_t * par, const lv_obj_t * copy)
-{
- LV_LOG_TRACE("line meter create started");
-
- /*Create the ancestor of line meter*/
- lv_obj_t * new_lmeter = lv_obj_create(par, copy);
- LV_ASSERT_MEM(new_lmeter);
- if(new_lmeter == NULL) return NULL;
-
- if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_lmeter);
-
- /*Allocate the line meter type specific extended data*/
- lv_lmeter_ext_t * ext = lv_obj_allocate_ext_attr(new_lmeter, sizeof(lv_lmeter_ext_t));
- LV_ASSERT_MEM(ext);
- if(ext == NULL) return NULL;
-
- /*Initialize the allocated 'ext' */
- ext->min_value = 0;
- ext->max_value = 100;
- ext->cur_value = 0;
- ext->line_cnt = 21; /*Odd scale number looks better*/
- ext->scale_angle = 240; /*(scale_num - 1) * N looks better */
- ext->angle_ofs = 0;
-
- /*The signal and design functions are not copied so set them here*/
- lv_obj_set_signal_cb(new_lmeter, lv_lmeter_signal);
- lv_obj_set_design_cb(new_lmeter, lv_lmeter_design);
-
- /*Init the new line meter line meter*/
- if(copy == NULL) {
- lv_obj_set_size(new_lmeter, LV_DPI, LV_DPI);
-
- /*Set the default styles*/
- lv_theme_t * th = lv_theme_get_current();
- if(th) {
- lv_lmeter_set_style(new_lmeter, LV_LMETER_STYLE_MAIN, th->style.lmeter);
- } else {
- lv_lmeter_set_style(new_lmeter, LV_LMETER_STYLE_MAIN, &lv_style_pretty_color);
- }
- }
- /*Copy an existing line meter*/
- else {
- lv_lmeter_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
- ext->scale_angle = copy_ext->scale_angle;
- ext->line_cnt = copy_ext->line_cnt;
- ext->min_value = copy_ext->min_value;
- ext->max_value = copy_ext->max_value;
- ext->cur_value = copy_ext->cur_value;
-
- /*Refresh the style with new signal function*/
- lv_obj_refresh_style(new_lmeter);
- }
-
- LV_LOG_INFO("line meter created");
-
- return new_lmeter;
-}
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set a new value on the line meter
- * @param lmeter pointer to a line meter object
- * @param value new value
- */
-void lv_lmeter_set_value(lv_obj_t * lmeter, int16_t value)
-{
- LV_ASSERT_OBJ(lmeter, LV_OBJX_NAME);
-
- lv_lmeter_ext_t * ext = lv_obj_get_ext_attr(lmeter);
- if(ext->cur_value == value) return;
-
- ext->cur_value = value > ext->max_value ? ext->max_value : value;
- ext->cur_value = ext->cur_value < ext->min_value ? ext->min_value : ext->cur_value;
- lv_obj_invalidate(lmeter);
-}
-
-/**
- * Set minimum and the maximum values of a line meter
- * @param lmeter pointer to he line meter object
- * @param min minimum value
- * @param max maximum value
- */
-void lv_lmeter_set_range(lv_obj_t * lmeter, int16_t min, int16_t max)
-{
- LV_ASSERT_OBJ(lmeter, LV_OBJX_NAME);
-
- lv_lmeter_ext_t * ext = lv_obj_get_ext_attr(lmeter);
- if(ext->min_value == min && ext->max_value == max) return;
-
- ext->max_value = max;
- ext->min_value = min;
- if(ext->cur_value > max) {
- ext->cur_value = max;
- lv_lmeter_set_value(lmeter, ext->cur_value);
- }
- if(ext->cur_value < min) {
- ext->cur_value = min;
- lv_lmeter_set_value(lmeter, ext->cur_value);
- }
- lv_obj_invalidate(lmeter);
-}
-
-/**
- * Set the scale settings of a line meter
- * @param lmeter pointer to a line meter object
- * @param angle angle of the scale (0..360)
- * @param line_cnt number of lines
- */
-void lv_lmeter_set_scale(lv_obj_t * lmeter, uint16_t angle, uint16_t line_cnt)
-{
- LV_ASSERT_OBJ(lmeter, LV_OBJX_NAME);
-
- lv_lmeter_ext_t * ext = lv_obj_get_ext_attr(lmeter);
- if(ext->scale_angle == angle && ext->line_cnt == line_cnt) return;
-
- ext->scale_angle = angle;
- ext->line_cnt = line_cnt;
-
- lv_obj_invalidate(lmeter);
-}
-
-/**
- * Set the set an offset for the line meter's angles to rotate it.
- * @param lmeter pointer to a line meter object
- * @param angle angle where the meter will be facing (with its center)
- */
-void lv_lmeter_set_angle_offset(lv_obj_t * lmeter, uint16_t angle)
-{
- lv_lmeter_ext_t * ext = lv_obj_get_ext_attr(lmeter);
- if(ext->angle_ofs == angle) return;
-
- ext->angle_ofs = angle;
-
- lv_obj_invalidate(lmeter);
-}
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the value of a line meter
- * @param lmeter pointer to a line meter object
- * @return the value of the line meter
- */
-int16_t lv_lmeter_get_value(const lv_obj_t * lmeter)
-{
- LV_ASSERT_OBJ(lmeter, LV_OBJX_NAME);
-
- lv_lmeter_ext_t * ext = lv_obj_get_ext_attr(lmeter);
- return ext->cur_value;
-}
-
-/**
- * Get the minimum value of a line meter
- * @param lmeter pointer to a line meter object
- * @return the minimum value of the line meter
- */
-int16_t lv_lmeter_get_min_value(const lv_obj_t * lmeter)
-{
- LV_ASSERT_OBJ(lmeter, LV_OBJX_NAME);
-
- lv_lmeter_ext_t * ext = lv_obj_get_ext_attr(lmeter);
- return ext->min_value;
-}
-
-/**
- * Get the maximum value of a line meter
- * @param lmeter pointer to a line meter object
- * @return the maximum value of the line meter
- */
-int16_t lv_lmeter_get_max_value(const lv_obj_t * lmeter)
-{
- LV_ASSERT_OBJ(lmeter, LV_OBJX_NAME);
-
- lv_lmeter_ext_t * ext = lv_obj_get_ext_attr(lmeter);
- return ext->max_value;
-}
-
-/**
- * Get the scale number of a line meter
- * @param lmeter pointer to a line meter object
- * @return number of the scale units
- */
-uint16_t lv_lmeter_get_line_count(const lv_obj_t * lmeter)
-{
- LV_ASSERT_OBJ(lmeter, LV_OBJX_NAME);
-
- lv_lmeter_ext_t * ext = lv_obj_get_ext_attr(lmeter);
- return ext->line_cnt;
-}
-
-/**
- * Get the scale angle of a line meter
- * @param lmeter pointer to a line meter object
- * @return angle_ofs of the scale
- */
-uint16_t lv_lmeter_get_scale_angle(const lv_obj_t * lmeter)
-{
- LV_ASSERT_OBJ(lmeter, LV_OBJX_NAME);
-
- lv_lmeter_ext_t * ext = lv_obj_get_ext_attr(lmeter);
- return ext->scale_angle;
-}
-
-/**
- * get the set an offset for the line meter.
- * @param lmeter pointer to a line meter object
- * @return angle offset (0..360)
- */
-uint16_t lv_lmeter_get_angle_offset(lv_obj_t * lmeter)
-{
- lv_lmeter_ext_t * ext = lv_obj_get_ext_attr(lmeter);
-
- return ext->angle_ofs;
-}
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Handle the drawing related tasks of the line meters
- * @param lmeter pointer to an object
- * @param mask the object will be drawn only in this area
- * @param mode LV_DESIGN_COVER_CHK: only check if the object fully covers the 'mask_p' area
- * (return 'true' if yes)
- * LV_DESIGN_DRAW: draw the object (always return 'true')
- * LV_DESIGN_DRAW_POST: drawing after every children are drawn
- * @param return true/false, depends on 'mode'
- */
-static bool lv_lmeter_design(lv_obj_t * lmeter, const lv_area_t * mask, lv_design_mode_t mode)
-{
- /*Return false if the object is not covers the mask_p area*/
- if(mode == LV_DESIGN_COVER_CHK) {
- return false;
- }
- /*Draw the object*/
- else if(mode == LV_DESIGN_DRAW_MAIN) {
- lv_lmeter_ext_t * ext = lv_obj_get_ext_attr(lmeter);
- const lv_style_t * style = lv_obj_get_style(lmeter);
- lv_opa_t opa_scale = lv_obj_get_opa_scale(lmeter);
- lv_style_t style_tmp;
- lv_style_copy(&style_tmp, style);
-
-#if LV_USE_GROUP
- lv_group_t * g = lv_obj_get_group(lmeter);
- if(lv_group_get_focused(g) == lmeter) {
- style_tmp.line.width += 1;
- }
-#endif
-
- lv_coord_t r_out = lv_obj_get_width(lmeter) / 2;
- lv_coord_t r_in = r_out - style->body.padding.left;
- if(r_in < 1) r_in = 1;
-
- lv_coord_t x_ofs = lv_obj_get_width(lmeter) / 2 + lmeter->coords.x1;
- lv_coord_t y_ofs = lv_obj_get_height(lmeter) / 2 + lmeter->coords.y1;
- int16_t angle_ofs = ext->angle_ofs + 90 + (360 - ext->scale_angle) / 2;
- int16_t level =
- (int32_t)((int32_t)(ext->cur_value - ext->min_value) * ext->line_cnt) / (ext->max_value - ext->min_value);
- uint8_t i;
-
- style_tmp.line.color = style->body.main_color;
-
- /*Calculate every coordinate in a bigger size to make rounding later*/
- r_out = r_out << LV_LMETER_LINE_UPSCALE;
- r_in = r_in << LV_LMETER_LINE_UPSCALE;
-
- for(i = 0; i < ext->line_cnt; i++) {
- /*Calculate the position a scale label*/
- int16_t angle = (i * ext->scale_angle) / (ext->line_cnt - 1) + angle_ofs;
-
- lv_coord_t y_out = (int32_t)((int32_t)lv_trigo_sin(angle) * r_out) >> LV_TRIGO_SHIFT;
- lv_coord_t x_out = (int32_t)((int32_t)lv_trigo_sin(angle + 90) * r_out) >> LV_TRIGO_SHIFT;
- lv_coord_t y_in = (int32_t)((int32_t)lv_trigo_sin(angle) * r_in) >> LV_TRIGO_SHIFT;
- lv_coord_t x_in = (int32_t)((int32_t)lv_trigo_sin(angle + 90) * r_in) >> LV_TRIGO_SHIFT;
-
- /*Rounding*/
- x_out = lv_lmeter_coord_round(x_out);
- x_in = lv_lmeter_coord_round(x_in);
- y_out = lv_lmeter_coord_round(y_out);
- y_in = lv_lmeter_coord_round(y_in);
-
- lv_point_t p1;
- lv_point_t p2;
-
- p2.x = x_in + x_ofs;
- p2.y = y_in + y_ofs;
-
- p1.x = x_out + x_ofs;
- p1.y = y_out + y_ofs;
-
- if(i >= level)
- style_tmp.line.color = style->line.color;
- else {
- style_tmp.line.color =
- lv_color_mix(style->body.grad_color, style->body.main_color, (255 * i) / ext->line_cnt);
- }
-
- lv_draw_line(&p1, &p2, mask, &style_tmp, opa_scale);
- }
-
- }
- /*Post draw when the children are drawn*/
- else if(mode == LV_DESIGN_DRAW_POST) {
- }
-
- return true;
-}
-
-/**
- * Signal function of the line meter
- * @param lmeter pointer to a line meter object
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_lmeter_signal(lv_obj_t * lmeter, lv_signal_t sign, void * param)
-{
- lv_res_t res;
-
- /* Include the ancient signal function */
- res = ancestor_signal(lmeter, sign, param);
- if(res != LV_RES_OK) return res;
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);
-
- if(sign == LV_SIGNAL_CLEANUP) {
- /*Nothing to cleanup. (No dynamically allocated memory in 'ext')*/
- } else if(sign == LV_SIGNAL_STYLE_CHG) {
- lv_obj_refresh_ext_draw_pad(lmeter);
- } else if(sign == LV_SIGNAL_REFR_EXT_DRAW_PAD) {
- const lv_style_t * style = lv_lmeter_get_style(lmeter, LV_LMETER_STYLE_MAIN);
- lmeter->ext_draw_pad = LV_MATH_MAX(lmeter->ext_draw_pad, style->line.width);
- }
-
- return res;
-}
-
-/**
- * Round a coordinate which is upscaled (>=x.5 -> x + 1; <x.5 -> x)
- * @param x a coordinate which is greater then it should be
- * @return the downscaled and rounded coordinate (+-1)
- */
-static lv_coord_t lv_lmeter_coord_round(int32_t x)
-{
-#if LV_LMETER_LINE_UPSCALE > 0
- bool was_negative = false;
- if(x < 0) {
- was_negative = true;
- x = -x;
- }
-
- x = (x >> LV_LMETER_LINE_UPSCALE) + ((x & LV_LMETER_LINE_UPSCALE_MASK) >> (LV_LMETER_LINE_UPSCALE - 1));
-
- if(was_negative) x = -x;
-
- return x;
-#else
- return x;
-#endif
-}
-
-#endif
diff --git a/src/libs/lvgl/src/lv_objx/lv_lmeter.h b/src/libs/lvgl/src/lv_objx/lv_lmeter.h
deleted file mode 100644
index 6deac8ce..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_lmeter.h
+++ /dev/null
@@ -1,179 +0,0 @@
-/**
- * @file lv_lmeter.h
- *
- */
-
-#ifndef LV_LMETER_H
-#define LV_LMETER_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_LMETER != 0
-
-#include "../lv_core/lv_obj.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-/*Data of line meter*/
-typedef struct
-{
- /*No inherited ext.*/ /*Ext. of ancestor*/
- /*New data for this type */
- uint16_t scale_angle; /*Angle of the scale in deg. (0..360)*/
- uint16_t angle_ofs;
- uint16_t line_cnt; /*Count of lines */
- int16_t cur_value;
- int16_t min_value;
- int16_t max_value;
-} lv_lmeter_ext_t;
-
-/*Styles*/
-enum {
- LV_LMETER_STYLE_MAIN,
-};
-typedef uint8_t lv_lmeter_style_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Create a line meter objects
- * @param par pointer to an object, it will be the parent of the new line meter
- * @param copy pointer to a line meter object, if not NULL then the new object will be copied from
- * it
- * @return pointer to the created line meter
- */
-lv_obj_t * lv_lmeter_create(lv_obj_t * par, const lv_obj_t * copy);
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set a new value on the line meter
- * @param lmeter pointer to a line meter object
- * @param value new value
- */
-void lv_lmeter_set_value(lv_obj_t * lmeter, int16_t value);
-
-/**
- * Set minimum and the maximum values of a line meter
- * @param lmeter pointer to he line meter object
- * @param min minimum value
- * @param max maximum value
- */
-void lv_lmeter_set_range(lv_obj_t * lmeter, int16_t min, int16_t max);
-
-/**
- * Set the scale settings of a line meter
- * @param lmeter pointer to a line meter object
- * @param angle angle of the scale (0..360)
- * @param line_cnt number of lines
- */
-void lv_lmeter_set_scale(lv_obj_t * lmeter, uint16_t angle, uint16_t line_cnt);
-
-/**
- * Set the set an offset for the line meter's angles to rotate it.
- * @param lmeter pointer to a line meter object
- * @param angle angle offset (0..360), rotates clockwise
- */
-void lv_lmeter_set_angle_offset(lv_obj_t * lmeter, uint16_t angle);
-
-/**
- * Set the styles of a line meter
- * @param lmeter pointer to a line meter object
- * @param type which style should be set (can be only `LV_LMETER_STYLE_MAIN`)
- * @param style set the style of the line meter
- */
-static inline void lv_lmeter_set_style(lv_obj_t * lmeter, lv_lmeter_style_t type, lv_style_t * style)
-{
- (void)type; /*Unused*/
- lv_obj_set_style(lmeter, style);
-}
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the value of a line meter
- * @param lmeter pointer to a line meter object
- * @return the value of the line meter
- */
-int16_t lv_lmeter_get_value(const lv_obj_t * lmeter);
-
-/**
- * Get the minimum value of a line meter
- * @param lmeter pointer to a line meter object
- * @return the minimum value of the line meter
- */
-int16_t lv_lmeter_get_min_value(const lv_obj_t * lmeter);
-
-/**
- * Get the maximum value of a line meter
- * @param lmeter pointer to a line meter object
- * @return the maximum value of the line meter
- */
-int16_t lv_lmeter_get_max_value(const lv_obj_t * lmeter);
-
-/**
- * Get the scale number of a line meter
- * @param lmeter pointer to a line meter object
- * @return number of the scale units
- */
-uint16_t lv_lmeter_get_line_count(const lv_obj_t * lmeter);
-
-/**
- * Get the scale angle of a line meter
- * @param lmeter pointer to a line meter object
- * @return angle of the scale
- */
-uint16_t lv_lmeter_get_scale_angle(const lv_obj_t * lmeter);
-
-/**
- * get the set an offset for the line meter.
- * @param lmeter pointer to a line meter object
- * @return angle offset (0..360)
- */
-uint16_t lv_lmeter_get_angle_offset(lv_obj_t * lmeter);
-
-/**
- * Get the style of a line meter
- * @param lmeter pointer to a line meter object
- * @param type which style should be get (can be only `LV_LMETER_STYLE_MAIN`)
- * @return pointer to the line meter's style
- */
-static inline const lv_style_t * lv_lmeter_get_style(const lv_obj_t * lmeter, lv_lmeter_style_t type)
-{
- (void)type; /*Unused*/
- return lv_obj_get_style(lmeter);
-}
-
-/**********************
- * MACROS
- **********************/
-
-#endif /*LV_USE_LMETER*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_LMETER_H*/
diff --git a/src/libs/lvgl/src/lv_objx/lv_mbox.c b/src/libs/lvgl/src/lv_objx/lv_mbox.c
deleted file mode 100644
index f56904cb..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_mbox.c
+++ /dev/null
@@ -1,573 +0,0 @@
-/**
- * @file lv_mbox.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_mbox.h"
-#if LV_USE_MBOX != 0
-
-#include "../lv_core/lv_debug.h"
-#include "../lv_core/lv_group.h"
-#include "../lv_themes/lv_theme.h"
-#include "../lv_misc/lv_anim.h"
-#include "../lv_misc/lv_math.h"
-
-/*********************
- * DEFINES
- *********************/
-#define LV_OBJX_NAME "lv_mbos"
-
-#if LV_USE_ANIMATION
-#ifndef LV_MBOX_CLOSE_ANIM_TIME
-#define LV_MBOX_CLOSE_ANIM_TIME 200 /*List close animation time) */
-#endif
-#else
-#undef LV_MBOX_CLOSE_ANIM_TIME
-#define LV_MBOX_CLOSE_ANIM_TIME 0 /*No animations*/
-#endif
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static lv_res_t lv_mbox_signal(lv_obj_t * mbox, lv_signal_t sign, void * param);
-static void mbox_realign(lv_obj_t * mbox);
-#if LV_USE_ANIMATION
-static void lv_mbox_close_ready_cb(lv_anim_t * a);
-#endif
-static void lv_mbox_default_event_cb(lv_obj_t * mbox, lv_event_t event);
-static void lv_mbox_btnm_event_cb(lv_obj_t * btnm, lv_event_t event);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_signal_cb_t ancestor_signal;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Create a message box objects
- * @param par pointer to an object, it will be the parent of the new message box
- * @param copy pointer to a message box object, if not NULL then the new object will be copied from
- * it
- * @return pointer to the created message box
- */
-lv_obj_t * lv_mbox_create(lv_obj_t * par, const lv_obj_t * copy)
-{
- LV_LOG_TRACE("mesasge box create started");
-
- /*Create the ancestor message box*/
- lv_obj_t * new_mbox = lv_cont_create(par, copy);
- LV_ASSERT_MEM(new_mbox);
- if(new_mbox == NULL) return NULL;
-
- if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_mbox);
-
- /*Allocate the message box type specific extended data*/
- lv_mbox_ext_t * ext = lv_obj_allocate_ext_attr(new_mbox, sizeof(lv_mbox_ext_t));
- LV_ASSERT_MEM(ext);
- if(ext == NULL) return NULL;
-
- ext->text = NULL;
- ext->btnm = NULL;
-#if LV_USE_ANIMATION
- ext->anim_time = LV_MBOX_CLOSE_ANIM_TIME;
-#endif
-
- /*The signal and design functions are not copied so set them here*/
- lv_obj_set_signal_cb(new_mbox, lv_mbox_signal);
-
- /*Init the new message box message box*/
- if(copy == NULL) {
- ext->text = lv_label_create(new_mbox, NULL);
- lv_label_set_align(ext->text, LV_LABEL_ALIGN_CENTER);
- lv_label_set_long_mode(ext->text, LV_LABEL_LONG_BREAK);
- lv_label_set_text(ext->text, "Message");
-
- lv_cont_set_layout(new_mbox, LV_LAYOUT_COL_M);
- lv_cont_set_fit2(new_mbox, LV_FIT_NONE, LV_FIT_TIGHT);
- lv_obj_set_width(new_mbox, LV_DPI * 2);
- lv_obj_align(new_mbox, NULL, LV_ALIGN_CENTER, 0, 0);
- lv_obj_set_event_cb(new_mbox, lv_mbox_default_event_cb);
-
- /*Set the default styles*/
- lv_theme_t * th = lv_theme_get_current();
- if(th) {
- lv_mbox_set_style(new_mbox, LV_MBOX_STYLE_BG, th->style.mbox.bg);
- } else {
- lv_mbox_set_style(new_mbox, LV_MBOX_STYLE_BG, &lv_style_pretty);
- }
-
- }
- /*Copy an existing message box*/
- else {
- lv_mbox_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
-
- ext->text = lv_label_create(new_mbox, copy_ext->text);
-
- /*Copy the buttons and the label on them*/
- if(copy_ext->btnm) ext->btnm = lv_btnm_create(new_mbox, copy_ext->btnm);
-
- /*Refresh the style with new signal function*/
- lv_obj_refresh_style(new_mbox);
- }
-
- LV_LOG_INFO("mesasge box created");
-
- return new_mbox;
-}
-
-/*======================
- * Add/remove functions
- *=====================*/
-
-/**
- * Add button to the message box
- * @param mbox pointer to message box object
- * @param btn_map button descriptor (button matrix map).
- * E.g. a const char *txt[] = {"ok", "close", ""} (Can not be local variable)
- */
-void lv_mbox_add_btns(lv_obj_t * mbox, const char * btn_map[])
-{
- LV_ASSERT_OBJ(mbox, LV_OBJX_NAME);
- LV_ASSERT_NULL(btn_map);
-
- lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox);
-
- /*Create a button matrix if not exists yet*/
- if(ext->btnm == NULL) {
- ext->btnm = lv_btnm_create(mbox, NULL);
-
- /*Set the default styles*/
- lv_theme_t * th = lv_theme_get_current();
- if(th) {
- lv_mbox_set_style(mbox, LV_MBOX_STYLE_BTN_BG, th->style.mbox.btn.bg);
- lv_mbox_set_style(mbox, LV_MBOX_STYLE_BTN_REL, th->style.mbox.btn.rel);
- lv_mbox_set_style(mbox, LV_MBOX_STYLE_BTN_PR, th->style.mbox.btn.pr);
- } else {
- lv_btnm_set_style(ext->btnm, LV_BTNM_STYLE_BG, &lv_style_transp_fit);
- }
- }
-
- lv_btnm_set_map(ext->btnm, btn_map);
- lv_btnm_set_btn_ctrl_all(ext->btnm, LV_BTNM_CTRL_CLICK_TRIG | LV_BTNM_CTRL_NO_REPEAT);
- lv_obj_set_event_cb(ext->btnm, lv_mbox_btnm_event_cb);
-
- mbox_realign(mbox);
-}
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set the text of the message box
- * @param mbox pointer to a message box
- * @param txt a '\0' terminated character string which will be the message box text
- */
-void lv_mbox_set_text(lv_obj_t * mbox, const char * txt)
-{
- LV_ASSERT_OBJ(mbox, LV_OBJX_NAME);
- LV_ASSERT_STR(txt);
-
- lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox);
- lv_label_set_text(ext->text, txt);
-
- mbox_realign(mbox);
-}
-
-/**
- * Set animation duration
- * @param mbox pointer to a message box object
- * @param anim_time animation length in milliseconds (0: no animation)
- */
-void lv_mbox_set_anim_time(lv_obj_t * mbox, uint16_t anim_time)
-{
- LV_ASSERT_OBJ(mbox, LV_OBJX_NAME);
-
-#if LV_USE_ANIMATION
- lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox);
- anim_time = 0;
- ext->anim_time = anim_time;
-#else
- (void)mbox;
- (void)anim_time;
-#endif
-}
-
-/**
- * Automatically delete the message box after a given time
- * @param mbox pointer to a message box object
- * @param delay a time (in milliseconds) to wait before delete the message box
- */
-void lv_mbox_start_auto_close(lv_obj_t * mbox, uint16_t delay)
-{
- LV_ASSERT_OBJ(mbox, LV_OBJX_NAME);
-
-#if LV_USE_ANIMATION
- if(lv_mbox_get_anim_time(mbox) != 0) {
- /*Add shrinking animations*/
- lv_anim_t a;
- a.var = mbox;
- a.start = lv_obj_get_height(mbox);
- a.end = 0;
- a.exec_cb = (lv_anim_exec_xcb_t)lv_obj_set_height;
- a.path_cb = lv_anim_path_linear;
- a.ready_cb = NULL;
- a.act_time = -delay;
- a.time = lv_mbox_get_anim_time(mbox);
- a.playback = 0;
- a.playback_pause = 0;
- a.repeat = 0;
- a.repeat_pause = 0;
- lv_anim_create(&a);
-
- a.start = lv_obj_get_width(mbox);
- a.exec_cb = (lv_anim_exec_xcb_t)lv_obj_set_width;
- a.ready_cb = lv_mbox_close_ready_cb;
- lv_anim_create(&a);
-
- /*Disable fit to let shrinking work*/
- lv_cont_set_fit(mbox, LV_FIT_NONE);
- } else {
- /*Create an animation to delete the mbox `delay` ms later*/
- lv_anim_t a;
- a.var = mbox;
- a.start = 0;
- a.end = 1;
- a.exec_cb = (lv_anim_exec_xcb_t)NULL;
- a.path_cb = lv_anim_path_linear;
- a.ready_cb = lv_mbox_close_ready_cb;
- a.act_time = -delay;
- a.time = 0;
- a.playback = 0;
- a.playback_pause = 0;
- a.repeat = 0;
- a.repeat_pause = 0;
- lv_anim_create(&a);
- }
-#else
- (void)delay; /*Unused*/
- lv_obj_del(mbox);
-#endif
-}
-
-/**
- * Stop the auto. closing of message box
- * @param mbox pointer to a message box object
- */
-void lv_mbox_stop_auto_close(lv_obj_t * mbox)
-{
- LV_ASSERT_OBJ(mbox, LV_OBJX_NAME);
-
-#if LV_USE_ANIMATION
- lv_anim_del(mbox, NULL);
-#else
- (void)mbox; /*Unused*/
-#endif
-}
-
-/**
- * Set a style of a message box
- * @param mbox pointer to a message box object
- * @param type which style should be set
- * @param style pointer to a style
- */
-void lv_mbox_set_style(lv_obj_t * mbox, lv_mbox_style_t type, const lv_style_t * style)
-{
- LV_ASSERT_OBJ(mbox, LV_OBJX_NAME);
-
- lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox);
-
- switch(type) {
- case LV_MBOX_STYLE_BG: lv_obj_set_style(mbox, style); break;
- case LV_MBOX_STYLE_BTN_BG: lv_btnm_set_style(ext->btnm, LV_BTNM_STYLE_BG, style); break;
- case LV_MBOX_STYLE_BTN_REL: lv_btnm_set_style(ext->btnm, LV_BTNM_STYLE_BTN_REL, style); break;
- case LV_MBOX_STYLE_BTN_PR: lv_btnm_set_style(ext->btnm, LV_BTNM_STYLE_BTN_PR, style); break;
- case LV_MBOX_STYLE_BTN_TGL_REL: lv_btnm_set_style(ext->btnm, LV_BTNM_STYLE_BTN_TGL_REL, style); break;
- case LV_MBOX_STYLE_BTN_TGL_PR: lv_btnm_set_style(ext->btnm, LV_BTNM_STYLE_BTN_TGL_PR, style); break;
- case LV_MBOX_STYLE_BTN_INA: lv_btnm_set_style(ext->btnm, LV_BTNM_STYLE_BTN_INA, style); break;
- }
-
- mbox_realign(mbox);
-}
-
-/**
- * Set whether recoloring is enabled
- * @param btnm pointer to button matrix object
- * @param en whether recoloring is enabled
- */
-void lv_mbox_set_recolor(lv_obj_t * mbox, bool en)
-{
- LV_ASSERT_OBJ(mbox, LV_OBJX_NAME);
-
- lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox);
-
- if(ext->btnm) lv_btnm_set_recolor(ext->btnm, en);
-}
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the text of the message box
- * @param mbox pointer to a message box object
- * @return pointer to the text of the message box
- */
-const char * lv_mbox_get_text(const lv_obj_t * mbox)
-{
- LV_ASSERT_OBJ(mbox, LV_OBJX_NAME);
-
- lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox);
-
- return lv_label_get_text(ext->text);
-}
-
-/**
- * Get the index of the lastly "activated" button by the user (pressed, released etc)
- * Useful in the the `event_cb`.
- * @param btnm pointer to button matrix object
- * @return index of the last released button (LV_BTNM_BTN_NONE: if unset)
- */
-uint16_t lv_mbox_get_active_btn(lv_obj_t * mbox)
-{
- LV_ASSERT_OBJ(mbox, LV_OBJX_NAME);
-
- lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox);
- if(ext->btnm)
- return lv_btnm_get_active_btn(ext->btnm);
- else
- return LV_BTNM_BTN_NONE;
-}
-
-/**
- * Get the text of the lastly "activated" button by the user (pressed, released etc)
- * Useful in the the `event_cb`.
- * @param btnm pointer to button matrix object
- * @return text of the last released button (NULL: if unset)
- */
-const char * lv_mbox_get_active_btn_text(lv_obj_t * mbox)
-{
- LV_ASSERT_OBJ(mbox, LV_OBJX_NAME);
-
- lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox);
- if(ext->btnm)
- return lv_btnm_get_active_btn_text(ext->btnm);
- else
- return NULL;
-}
-
-/**
- * Get the animation duration (close animation time)
- * @param mbox pointer to a message box object
- * @return animation length in milliseconds (0: no animation)
- */
-uint16_t lv_mbox_get_anim_time(const lv_obj_t * mbox)
-{
- LV_ASSERT_OBJ(mbox, LV_OBJX_NAME);
-
-#if LV_USE_ANIMATION
- lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox);
- return ext->anim_time;
-#else
- (void)mbox;
- return 0;
-#endif
-}
-
-/**
- * Get a style of a message box
- * @param mbox pointer to a message box object
- * @param type which style should be get
- * @return style pointer to a style
- */
-const lv_style_t * lv_mbox_get_style(const lv_obj_t * mbox, lv_mbox_style_t type)
-{
- LV_ASSERT_OBJ(mbox, LV_OBJX_NAME);
-
- const lv_style_t * style = NULL;
- lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox);
-
- switch(type) {
- case LV_MBOX_STYLE_BG: style = lv_obj_get_style(mbox); break;
- case LV_MBOX_STYLE_BTN_BG: style = lv_btnm_get_style(ext->btnm, LV_BTNM_STYLE_BG); break;
- case LV_MBOX_STYLE_BTN_REL: style = lv_btnm_get_style(ext->btnm, LV_BTNM_STYLE_BTN_REL); break;
- case LV_MBOX_STYLE_BTN_PR: style = lv_btnm_get_style(ext->btnm, LV_BTNM_STYLE_BTN_PR); break;
- case LV_MBOX_STYLE_BTN_TGL_REL: style = lv_btnm_get_style(ext->btnm, LV_BTNM_STYLE_BTN_TGL_REL); break;
- case LV_MBOX_STYLE_BTN_TGL_PR: style = lv_btnm_get_style(ext->btnm, LV_BTNM_STYLE_BTN_TGL_PR); break;
- case LV_MBOX_STYLE_BTN_INA: style = lv_btnm_get_style(ext->btnm, LV_BTNM_STYLE_BTN_INA); break;
- default: style = NULL; break;
- }
-
- return style;
-}
-
-/**
- * Get whether recoloring is enabled
- * @param mbox pointer to a message box object
- * @return whether recoloring is enabled
- */
-bool lv_mbox_get_recolor(const lv_obj_t * mbox)
-{
- LV_ASSERT_OBJ(mbox, LV_OBJX_NAME);
-
- lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox);
-
- if(!ext->btnm) return false;
-
- return lv_btnm_get_recolor(ext->btnm);
-}
-
-/**
- * Get message box button matrix
- * @param mbox pointer to a message box object
- * @return pointer to button matrix object
- * @remarks return value will be NULL unless `lv_mbox_add_btns` has been already called
- */
-lv_obj_t * lv_mbox_get_btnm(lv_obj_t * mbox)
-{
- LV_ASSERT_OBJ(mbox, LV_OBJX_NAME);
-
- lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox);
- return ext->btnm;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Signal function of the message box
- * @param mbox pointer to a message box object
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_mbox_signal(lv_obj_t * mbox, lv_signal_t sign, void * param)
-{
- lv_res_t res;
-
- /*Translate LV_KEY_UP/DOWN to LV_KEY_LEFT/RIGHT */
- char c_trans = 0;
- if(sign == LV_SIGNAL_CONTROL) {
- c_trans = *((char *)param);
- if(c_trans == LV_KEY_DOWN) c_trans = LV_KEY_LEFT;
- if(c_trans == LV_KEY_UP) c_trans = LV_KEY_RIGHT;
-
- param = &c_trans;
- }
-
- /* Include the ancient signal function */
- res = ancestor_signal(mbox, sign, param);
- if(res != LV_RES_OK) return res;
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);
-
- lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox);
- if(sign == LV_SIGNAL_CORD_CHG) {
- if(lv_obj_get_width(mbox) != lv_area_get_width(param)) {
- mbox_realign(mbox);
- }
- } else if(sign == LV_SIGNAL_STYLE_CHG) {
- mbox_realign(mbox);
- } else if(sign == LV_SIGNAL_RELEASED) {
- if(ext->btnm) {
- uint32_t btn_id = lv_btnm_get_active_btn(ext->btnm);
- if(btn_id != LV_BTNM_BTN_NONE) lv_event_send(mbox, LV_EVENT_VALUE_CHANGED, &btn_id);
- }
- } else if(sign == LV_SIGNAL_FOCUS || sign == LV_SIGNAL_DEFOCUS || sign == LV_SIGNAL_CONTROL ||
- sign == LV_SIGNAL_GET_EDITABLE) {
- if(ext->btnm) {
- ext->btnm->signal_cb(ext->btnm, sign, param);
- }
-
- /* The button matrix with ENCODER input supposes it's in a group but in this case it isn't
- * (Only the message box's container) So so some actions here instead*/
- if(sign == LV_SIGNAL_FOCUS) {
-#if LV_USE_GROUP
- lv_indev_t * indev = lv_indev_get_act();
- lv_indev_type_t indev_type = lv_indev_get_type(indev);
- if(indev_type == LV_INDEV_TYPE_ENCODER) {
- /*In navigation mode don't select any button but in edit mode select the fist*/
- lv_btnm_ext_t * btnm_ext = lv_obj_get_ext_attr(ext->btnm);
- if(lv_group_get_editing(lv_obj_get_group(mbox)))
- btnm_ext->btn_id_pr = 0;
- else
- btnm_ext->btn_id_pr = LV_BTNM_BTN_NONE;
- }
-#endif
- }
- }
-
- return res;
-}
-
-/**
- * Resize the button holder to fit
- * @param mbox pointer to message box object
- */
-static void mbox_realign(lv_obj_t * mbox)
-{
- lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox);
-
- const lv_style_t * style = lv_mbox_get_style(mbox, LV_MBOX_STYLE_BG);
- lv_coord_t w = lv_obj_get_width(mbox) - style->body.padding.left - style->body.padding.right;
-
- if(ext->text) {
- lv_obj_set_width(ext->text, w);
- }
-
- if(ext->btnm) {
- const lv_style_t * btn_bg_style = lv_mbox_get_style(mbox, LV_MBOX_STYLE_BTN_BG);
- const lv_style_t * btn_rel_style = lv_mbox_get_style(mbox, LV_MBOX_STYLE_BTN_REL);
- lv_coord_t font_h = lv_font_get_line_height(btn_rel_style->text.font);
- lv_obj_set_size(ext->btnm, w,
- font_h + btn_rel_style->body.padding.top + btn_rel_style->body.padding.bottom +
- btn_bg_style->body.padding.top + btn_bg_style->body.padding.bottom);
- }
-}
-
-#if LV_USE_ANIMATION
-static void lv_mbox_close_ready_cb(lv_anim_t * a)
-{
- lv_obj_del(a->var);
-}
-#endif
-
-static void lv_mbox_default_event_cb(lv_obj_t * mbox, lv_event_t event)
-{
- if(event != LV_EVENT_VALUE_CHANGED) return;
-
- uint32_t btn_id = lv_mbox_get_active_btn(mbox);
- if(btn_id == LV_BTNM_BTN_NONE) return;
-
- lv_mbox_start_auto_close(mbox, 0);
-}
-
-static void lv_mbox_btnm_event_cb(lv_obj_t * btnm, lv_event_t event)
-{
- lv_obj_t * mbox = lv_obj_get_parent(btnm);
-
- /*clang-format off*/
- if(event == LV_EVENT_PRESSED || event == LV_EVENT_PRESSING || event == LV_EVENT_PRESS_LOST ||
- event == LV_EVENT_RELEASED || event == LV_EVENT_SHORT_CLICKED || event == LV_EVENT_CLICKED ||
- event == LV_EVENT_LONG_PRESSED || event == LV_EVENT_LONG_PRESSED_REPEAT ||
- event == LV_EVENT_VALUE_CHANGED) {
- lv_event_send(mbox, event, lv_event_get_data());
- }
- /*clang-format on*/
-}
-
-#endif
diff --git a/src/libs/lvgl/src/lv_objx/lv_mbox.h b/src/libs/lvgl/src/lv_objx/lv_mbox.h
deleted file mode 100644
index 2068b373..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_mbox.h
+++ /dev/null
@@ -1,212 +0,0 @@
-/**
- * @file lv_mbox.h
- *
- */
-
-#ifndef LV_MBOX_H
-#define LV_MBOX_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_MBOX != 0
-
-/*Testing of dependencies*/
-#if LV_USE_CONT == 0
-#error "lv_mbox: lv_cont is required. Enable it in lv_conf.h (LV_USE_CONT 1) "
-#endif
-
-#if LV_USE_BTNM == 0
-#error "lv_mbox: lv_btnm is required. Enable it in lv_conf.h (LV_USE_BTNM 1) "
-#endif
-
-#if LV_USE_LABEL == 0
-#error "lv_mbox: lv_label is required. Enable it in lv_conf.h (LV_USE_LABEL 1) "
-#endif
-
-#include "../lv_core/lv_obj.h"
-#include "lv_cont.h"
-#include "lv_btnm.h"
-#include "lv_label.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/*Data of message box*/
-typedef struct
-{
- lv_cont_ext_t bg; /*Ext. of ancestor*/
- /*New data for this type */
- lv_obj_t * text; /*Text of the message box*/
- lv_obj_t * btnm; /*Button matrix for the buttons*/
-#if LV_USE_ANIMATION
- uint16_t anim_time; /*Duration of close animation [ms] (0: no animation)*/
-#endif
-} lv_mbox_ext_t;
-
-/** Message box styles. */
-enum {
- LV_MBOX_STYLE_BG,
- LV_MBOX_STYLE_BTN_BG, /**< Same meaning as ordinary button styles. */
- LV_MBOX_STYLE_BTN_REL,
- LV_MBOX_STYLE_BTN_PR,
- LV_MBOX_STYLE_BTN_TGL_REL,
- LV_MBOX_STYLE_BTN_TGL_PR,
- LV_MBOX_STYLE_BTN_INA,
-};
-typedef uint8_t lv_mbox_style_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Create a message box objects
- * @param par pointer to an object, it will be the parent of the new message box
- * @param copy pointer to a message box object, if not NULL then the new object will be copied from
- * it
- * @return pointer to the created message box
- */
-lv_obj_t * lv_mbox_create(lv_obj_t * par, const lv_obj_t * copy);
-
-/*======================
- * Add/remove functions
- *=====================*/
-
-/**
- * Add button to the message box
- * @param mbox pointer to message box object
- * @param btn_map button descriptor (button matrix map).
- * E.g. a const char *txt[] = {"ok", "close", ""} (Can not be local variable)
- */
-void lv_mbox_add_btns(lv_obj_t * mbox, const char * btn_mapaction[]);
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set the text of the message box
- * @param mbox pointer to a message box
- * @param txt a '\0' terminated character string which will be the message box text
- */
-void lv_mbox_set_text(lv_obj_t * mbox, const char * txt);
-
-/**
- * Set animation duration
- * @param mbox pointer to a message box object
- * @param anim_time animation length in milliseconds (0: no animation)
- */
-void lv_mbox_set_anim_time(lv_obj_t * mbox, uint16_t anim_time);
-
-/**
- * Automatically delete the message box after a given time
- * @param mbox pointer to a message box object
- * @param delay a time (in milliseconds) to wait before delete the message box
- */
-void lv_mbox_start_auto_close(lv_obj_t * mbox, uint16_t delay);
-
-/**
- * Stop the auto. closing of message box
- * @param mbox pointer to a message box object
- */
-void lv_mbox_stop_auto_close(lv_obj_t * mbox);
-
-/**
- * Set a style of a message box
- * @param mbox pointer to a message box object
- * @param type which style should be set
- * @param style pointer to a style
- */
-void lv_mbox_set_style(lv_obj_t * mbox, lv_mbox_style_t type, const lv_style_t * style);
-
-/**
- * Set whether recoloring is enabled. Must be called after `lv_mbox_add_btns`.
- * @param btnm pointer to button matrix object
- * @param en whether recoloring is enabled
- */
-void lv_mbox_set_recolor(lv_obj_t * mbox, bool en);
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the text of the message box
- * @param mbox pointer to a message box object
- * @return pointer to the text of the message box
- */
-const char * lv_mbox_get_text(const lv_obj_t * mbox);
-
-/**
- * Get the index of the lastly "activated" button by the user (pressed, released etc)
- * Useful in the the `event_cb`.
- * @param btnm pointer to button matrix object
- * @return index of the last released button (LV_BTNM_BTN_NONE: if unset)
- */
-uint16_t lv_mbox_get_active_btn(lv_obj_t * mbox);
-
-/**
- * Get the text of the lastly "activated" button by the user (pressed, released etc)
- * Useful in the the `event_cb`.
- * @param btnm pointer to button matrix object
- * @return text of the last released button (NULL: if unset)
- */
-const char * lv_mbox_get_active_btn_text(lv_obj_t * mbox);
-
-/**
- * Get the animation duration (close animation time)
- * @param mbox pointer to a message box object
- * @return animation length in milliseconds (0: no animation)
- */
-uint16_t lv_mbox_get_anim_time(const lv_obj_t * mbox);
-
-/**
- * Get a style of a message box
- * @param mbox pointer to a message box object
- * @param type which style should be get
- * @return style pointer to a style
- */
-const lv_style_t * lv_mbox_get_style(const lv_obj_t * mbox, lv_mbox_style_t type);
-
-/**
- * Get whether recoloring is enabled
- * @param mbox pointer to a message box object
- * @return whether recoloring is enabled
- */
-bool lv_mbox_get_recolor(const lv_obj_t * mbox);
-
-/**
- * Get message box button matrix
- * @param mbox pointer to a message box object
- * @return pointer to button matrix object
- * @remarks return value will be NULL unless `lv_mbox_add_btns` has been already called
- */
-lv_obj_t * lv_mbox_get_btnm(lv_obj_t * mbox);
-
-/**********************
- * MACROS
- **********************/
-
-#endif /*LV_USE_MBOX*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_MBOX_H*/
diff --git a/src/libs/lvgl/src/lv_objx/lv_objx.mk b/src/libs/lvgl/src/lv_objx/lv_objx.mk
deleted file mode 100644
index fde2ac77..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_objx.mk
+++ /dev/null
@@ -1,37 +0,0 @@
-CSRCS += lv_arc.c
-CSRCS += lv_bar.c
-CSRCS += lv_cb.c
-CSRCS += lv_cpicker.c
-CSRCS += lv_ddlist.c
-CSRCS += lv_kb.c
-CSRCS += lv_line.c
-CSRCS += lv_mbox.c
-CSRCS += lv_preload.c
-CSRCS += lv_roller.c
-CSRCS += lv_table.c
-CSRCS += lv_tabview.c
-CSRCS += lv_tileview.c
-CSRCS += lv_btn.c
-CSRCS += lv_calendar.c
-CSRCS += lv_chart.c
-CSRCS += lv_canvas.c
-CSRCS += lv_gauge.c
-CSRCS += lv_label.c
-CSRCS += lv_list.c
-CSRCS += lv_slider.c
-CSRCS += lv_ta.c
-CSRCS += lv_spinbox.c
-CSRCS += lv_btnm.c
-CSRCS += lv_cont.c
-CSRCS += lv_img.c
-CSRCS += lv_imgbtn.c
-CSRCS += lv_led.c
-CSRCS += lv_lmeter.c
-CSRCS += lv_page.c
-CSRCS += lv_sw.c
-CSRCS += lv_win.c
-
-DEPPATH += --dep-path $(LVGL_DIR)/lvgl/src/lv_objx
-VPATH += :$(LVGL_DIR)/lvgl/src/lv_objx
-
-CFLAGS += "-I$(LVGL_DIR)/lvgl/src/lv_objx"
diff --git a/src/libs/lvgl/src/lv_objx/lv_objx_templ.c b/src/libs/lvgl/src/lv_objx/lv_objx_templ.c
deleted file mode 100644
index d23dcb46..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_objx_templ.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/**
- * @file lv_templ.c
- *
- */
-
-/* TODO Remove these instructions
- * Search an replace: template -> object normal name with lower case (e.g. button, label etc.)
- * templ -> object short name with lower case(e.g. btn, label etc)
- * TEMPL -> object short name with upper case (e.g. BTN, LABEL etc.)
- *
- * You can remove the defined() clause from the #if statement below. This exists because
- * LV_USE_TEMPL is not in lv_conf.h or lv_conf_templ.h by default.
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "../lv_core/lv_debug.h"
-//#include "lv_templ.h" /*TODO uncomment this*/
-
-#if defined(LV_USE_TEMPL) && LV_USE_TEMPL != 0
-
-/*********************
- * DEFINES
- *********************/
-#define LV_OBJX_NAME "lv_templ"
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static bool lv_templ_design(lv_obj_t * templ, const lv_area_t * mask, lv_design_mode_t mode);
-static lv_res_t lv_templ_signal(lv_obj_t * templ, lv_signal_t sign, void * param);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_signal_func_t ancestor_signal;
-static lv_design_func_t ancestor_design;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Create a template object
- * @param par pointer to an object, it will be the parent of the new template
- * @param copy pointer to a template object, if not NULL then the new object will be copied from it
- * @return pointer to the created template
- */
-lv_obj_t * lv_templ_create(lv_obj_t * par, const lv_obj_t * copy)
-{
- LV_LOG_TRACE("template create started");
-
- /*Create the ancestor of template*/
- /*TODO modify it to the ancestor create function */
- lv_obj_t * new_templ = lv_ANCESTOR_create(par, copy);
- lv_mem_assert(new_templ);
- if(new_templ == NULL) return NULL;
-
- /*Allocate the template type specific extended data*/
- lv_templ_ext_t * ext = lv_obj_allocate_ext_attr(new_templ, sizeof(lv_templ_ext_t));
- lv_mem_assert(ext);
- if(ext == NULL) return NULL;
- if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_templ);
- if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_func(new_templ);
-
- /*Initialize the allocated 'ext' */
- ext->xyz = 0;
-
- /*The signal and design functions are not copied so set them here*/
- lv_obj_set_signal_func(new_templ, lv_templ_signal);
- lv_obj_set_design_func(new_templ, lv_templ_design);
-
- /*Init the new template template*/
- if(copy == NULL) {
-
- }
- /*Copy an existing template*/
- else {
- lv_templ_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
-
- /*Refresh the style with new signal function*/
- lv_obj_refresh_style(new_templ);
- }
-
- LV_LOG_INFO("template created");
-
- return new_templ;
-}
-
-/*======================
- * Add/remove functions
- *=====================*/
-
-/*
- * New object specific "add" or "remove" functions come here
- */
-
-/*=====================
- * Setter functions
- *====================*/
-
-/*
- * New object specific "set" functions come here
- */
-
-/**
- * Set a style of a template.
- * @param templ pointer to template object
- * @param type which style should be set
- * @param style pointer to a style
- */
-void lv_templ_set_style(lv_obj_t * templ, lv_templ_style_t type, const lv_style_t * style)
-{
- LV_ASSERT_OBJ(templ, LV_OBJX_NAME);
-
- lv_templ_ext_t * ext = lv_obj_get_ext_attr(templ);
-
- switch(type) {
- case LV_TEMPL_STYLE_X: break;
- case LV_TEMPL_STYLE_Y: break;
- }
-}
-
-/*=====================
- * Getter functions
- *====================*/
-
-/*
- * New object specific "get" functions come here
- */
-
-/**
- * Get style of a template.
- * @param templ pointer to template object
- * @param type which style should be get
- * @return style pointer to the style
- */
-lv_style_t * lv_templ_get_style(const lv_obj_t * templ, lv_templ_style_t type)
-{
- LV_ASSERT_OBJ(templ, LV_OBJX_NAME);
-
- lv_templ_ext_t * ext = lv_obj_get_ext_attr(templ);
- lv_style_t * style = NULL;
-
- switch(type) {
- case LV_TEMPL_STYLE_X: style = NULL; /*Replace NULL with a pointer to the style*/
- case LV_TEMPL_STYLE_Y: style = NULL; /*Replace NULL with a pointer to the style*/
- default: style = NULL;
- }
-
- return style;
-}
-
-/*=====================
- * Other functions
- *====================*/
-
-/*
- * New object specific "other" functions come here
- */
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Handle the drawing related tasks of the templates
- * @param templ pointer to an object
- * @param mask the object will be drawn only in this area
- * @param mode LV_DESIGN_COVER_CHK: only check if the object fully covers the 'mask_p' area
- * (return 'true' if yes)
- * LV_DESIGN_DRAW: draw the object (always return 'true')
- * LV_DESIGN_DRAW_POST: drawing after every children are drawn
- * @param return true/false, depends on 'mode'
- */
-static bool lv_templ_design(lv_obj_t * templ, const lv_area_t * mask, lv_design_mode_t mode)
-{
- /*Return false if the object is not covers the mask_p area*/
- if(mode == LV_DESIGN_COVER_CHK) {
- return false;
- }
- /*Draw the object*/
- else if(mode == LV_DESIGN_DRAW_MAIN) {
-
- }
- /*Post draw when the children are drawn*/
- else if(mode == LV_DESIGN_DRAW_POST) {
- }
-
- return true;
-}
-
-/**
- * Signal function of the template
- * @param templ pointer to a template object
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_templ_signal(lv_obj_t * templ, lv_signal_t sign, void * param)
-{
- lv_res_t res;
-
- /* Include the ancient signal function */
- res = ancestor_signal(templ, sign, param);
- if(res != LV_RES_OK) return res;
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);
-
- if(sign == LV_SIGNAL_CLEANUP) {
- /*Nothing to cleanup. (No dynamically allocated memory in 'ext')*/
- }
-
- return res;
-}
-
-#else /* Enable this file at the top */
-
-/* This dummy typedef exists purely to silence -Wpedantic. */
-typedef int keep_pedantic_happy;
-#endif
diff --git a/src/libs/lvgl/src/lv_objx/lv_objx_templ.h b/src/libs/lvgl/src/lv_objx/lv_objx_templ.h
deleted file mode 100644
index 82918253..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_objx_templ.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
- * @file lv_templ.h
- *
- */
-
-/* TODO Remove these instructions
- * Search an replace: template -> object normal name with lower case (e.g. button, label etc.)
- * templ -> object short name with lower case(e.g. btn, label etc)
- * TEMPL -> object short name with upper case (e.g. BTN, LABEL etc.)
- *
- */
-
-#ifndef LV_TEMPL_H
-#define LV_TEMPL_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_TEMPL != 0
-
-#include "../lv_core/lv_obj.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-/*Data of template*/
-typedef struct
-{
- lv_ANCESTOR_ext_t ANCESTOR; /*Ext. of ancestor*/
- /*New data for this type */
-} lv_templ_ext_t;
-
-/*Styles*/
-enum {
- LV_TEMPL_STYLE_X,
- LV_TEMPL_STYLE_Y,
-};
-typedef uint8_t lv_templ_style_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Create a template objects
- * @param par pointer to an object, it will be the parent of the new template
- * @param copy pointer to a template object, if not NULL then the new object will be copied from it
- * @return pointer to the created template
- */
-lv_obj_t * lv_templ_create(lv_obj_t * par, const lv_obj_t * copy);
-
-/*======================
- * Add/remove functions
- *=====================*/
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set a style of a template.
- * @param templ pointer to template object
- * @param type which style should be set
- * @param style pointer to a style
- */
-void lv_templ_set_style(lv_obj_t * templ, lv_templ_style_t type, const lv_style_t * style);
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get style of a template.
- * @param templ pointer to template object
- * @param type which style should be get
- * @return style pointer to the style
- */
-lv_style_t * lv_templ_get_style(const lv_obj_t * templ, lv_templ_style_t type);
-
-/*=====================
- * Other functions
- *====================*/
-
-/**********************
- * MACROS
- **********************/
-
-#endif /*LV_USE_TEMPL*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_TEMPL_H*/
diff --git a/src/libs/lvgl/src/lv_objx/lv_page.c b/src/libs/lvgl/src/lv_objx/lv_page.c
deleted file mode 100644
index b39eab51..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_page.c
+++ /dev/null
@@ -1,1263 +0,0 @@
-/**
- * @file lv_page.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "../lv_objx/lv_page.h"
-#if LV_USE_PAGE != 0
-
-#include "../lv_core/lv_debug.h"
-#include "../lv_core/lv_group.h"
-#include "../lv_draw/lv_draw.h"
-#include "../lv_themes/lv_theme.h"
-#include "../lv_core/lv_refr.h"
-#include "../lv_misc/lv_anim.h"
-#include "../lv_misc/lv_math.h"
-
-/*********************
- * DEFINES
- *********************/
-#define LV_OBJX_NAME "lv_page"
-
-#define LV_PAGE_SB_MIN_SIZE (LV_DPI / 8)
-
-/*[ms] Scroll anim time on `lv_page_scroll_up/down/left/rigth`*/
-#define LV_PAGE_SCROLL_ANIM_TIME 200
-
-#define LV_PAGE_END_FLASH_SIZE (LV_DPI / 4)
-#define LV_PAGE_END_ANIM_TIME 300
-#define LV_PAGE_END_ANIM_WAIT_TIME 300
-
-#if LV_USE_ANIMATION == 0
-#undef LV_PAGE_DEF_ANIM_TIME
-#define LV_PAGE_DEF_ANIM_TIME 0 /*No animation*/
-#endif
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static void lv_page_sb_refresh(lv_obj_t * page);
-static bool lv_page_design(lv_obj_t * page, const lv_area_t * mask, lv_design_mode_t mode);
-static bool lv_scrl_design(lv_obj_t * scrl, const lv_area_t * mask, lv_design_mode_t mode);
-static lv_res_t lv_page_signal(lv_obj_t * page, lv_signal_t sign, void * param);
-static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, void * param);
-static void scrl_def_event_cb(lv_obj_t * scrl, lv_event_t event);
-#if LV_USE_ANIMATION
-static void edge_flash_anim(void * page, lv_anim_value_t v);
-static void edge_flash_anim_end(lv_anim_t * a);
-#endif
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_design_cb_t ancestor_design;
-static lv_signal_cb_t ancestor_signal;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Create a page objects
- * @param par pointer to an object, it will be the parent of the new page
- * @param copy pointer to a page object, if not NULL then the new object will be copied from it
- * @return pointer to the created page
- */
-lv_obj_t * lv_page_create(lv_obj_t * par, const lv_obj_t * copy)
-{
- LV_LOG_TRACE("page create started");
-
- /*Create the ancestor object*/
- lv_obj_t * new_page = lv_cont_create(par, copy);
- LV_ASSERT_MEM(new_page);
- if(new_page == NULL) return NULL;
-
- if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_page);
- if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_cb(new_page);
-
- /*Allocate the object type specific extended data*/
- lv_page_ext_t * ext = lv_obj_allocate_ext_attr(new_page, sizeof(lv_page_ext_t));
- LV_ASSERT_MEM(ext);
- if(ext == NULL) return NULL;
-
- ext->scrl = NULL;
- ext->sb.hor_draw = 0;
- ext->sb.ver_draw = 0;
- ext->sb.style = &lv_style_pretty;
- ext->sb.mode = LV_SB_MODE_AUTO;
-#if LV_USE_ANIMATION
- ext->edge_flash.enabled = 0;
- ext->edge_flash.bottom_ip = 0;
- ext->edge_flash.top_ip = 0;
- ext->edge_flash.left_ip = 0;
- ext->edge_flash.right_ip = 0;
- ext->edge_flash.state = 0;
- ext->edge_flash.style = &lv_style_plain_color;
- ext->anim_time = LV_PAGE_DEF_ANIM_TIME;
-#endif
- ext->scroll_prop = 0;
- ext->scroll_prop_ip = 0;
-
- /*Init the new page object*/
- if(copy == NULL) {
- ext->scrl = lv_cont_create(new_page, NULL);
- lv_obj_set_signal_cb(ext->scrl, lv_page_scrollable_signal);
- lv_obj_set_design_cb(ext->scrl, lv_scrl_design);
- lv_obj_set_drag(ext->scrl, true);
- lv_obj_set_drag_throw(ext->scrl, true);
- lv_obj_set_protect(ext->scrl, LV_PROTECT_PARENT | LV_PROTECT_PRESS_LOST);
- lv_cont_set_fit4(ext->scrl, LV_FIT_FILL, LV_FIT_FILL, LV_FIT_FILL, LV_FIT_FILL);
- lv_obj_set_event_cb(ext->scrl, scrl_def_event_cb); /*Propagate some event to the background
- object by default for convenience */
-
- /* Add the signal function only if 'scrolling' is created
- * because everything has to be ready before any signal is received*/
- lv_obj_set_signal_cb(new_page, lv_page_signal);
- lv_obj_set_design_cb(new_page, lv_page_design);
-
- lv_page_set_sb_mode(new_page, ext->sb.mode);
-
- /*Set the default styles*/
- lv_theme_t * th = lv_theme_get_current();
- if(th) {
- if(par == NULL) { /*Different styles if it is screen*/
- lv_page_set_style(new_page, LV_PAGE_STYLE_BG, th->style.bg);
- lv_page_set_style(new_page, LV_PAGE_STYLE_SCRL, &lv_style_transp);
- } else {
- lv_page_set_style(new_page, LV_PAGE_STYLE_BG, th->style.page.bg);
- lv_page_set_style(new_page, LV_PAGE_STYLE_SCRL, th->style.page.scrl);
- }
- lv_page_set_style(new_page, LV_PAGE_STYLE_SB, th->style.page.sb);
- } else {
- lv_page_set_style(new_page, LV_PAGE_STYLE_BG, &lv_style_pretty_color);
- lv_page_set_style(new_page, LV_PAGE_STYLE_SCRL, &lv_style_pretty);
- lv_page_set_style(new_page, LV_PAGE_STYLE_SB, &lv_style_pretty_color);
- }
-
- } else {
- lv_page_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
- ext->scrl = lv_cont_create(new_page, copy_ext->scrl);
- lv_obj_set_signal_cb(ext->scrl, lv_page_scrollable_signal);
-
- /* Add the signal function only if 'scrolling' is created
- * because everything has to be ready before any signal is received*/
- lv_obj_set_signal_cb(new_page, lv_page_signal);
- lv_obj_set_design_cb(new_page, lv_page_design);
-
- lv_page_set_style(new_page, LV_PAGE_STYLE_BG, lv_page_get_style(copy, LV_PAGE_STYLE_BG));
- lv_page_set_style(new_page, LV_PAGE_STYLE_SCRL, lv_page_get_style(copy, LV_PAGE_STYLE_SCRL));
- lv_page_set_style(new_page, LV_PAGE_STYLE_SB, lv_page_get_style(copy, LV_PAGE_STYLE_SB));
-
- lv_page_set_sb_mode(new_page, copy_ext->sb.mode);
-
- /*Refresh the style with new signal function*/
- lv_obj_refresh_style(new_page);
- }
-
- lv_page_sb_refresh(new_page);
-
- LV_LOG_INFO("page created");
-
- return new_page;
-}
-
-/**
- * Delete all children of the scrl object, without deleting scrl child.
- * @param page pointer to an object
- */
-void lv_page_clean(lv_obj_t * page)
-{
- LV_ASSERT_OBJ(page, LV_OBJX_NAME);
-
- lv_obj_t * scrl = lv_page_get_scrl(page);
- lv_obj_clean(scrl);
-}
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set the scroll bar mode on a page
- * @param page pointer to a page object
- * @param sb_mode the new mode from 'lv_page_sb.mode_t' enum
- */
-void lv_page_set_sb_mode(lv_obj_t * page, lv_sb_mode_t sb_mode)
-{
- LV_ASSERT_OBJ(page, LV_OBJX_NAME);
-
- lv_page_ext_t * ext = lv_obj_get_ext_attr(page);
- if(ext->sb.mode == sb_mode) return;
-
- if(sb_mode == LV_SB_MODE_HIDE)
- ext->sb.mode |= LV_SB_MODE_HIDE; /*Set the hidden flag*/
- else if(sb_mode == LV_SB_MODE_UNHIDE)
- ext->sb.mode &= (~LV_SB_MODE_HIDE); /*Clear the hidden flag*/
- else {
- if(ext->sb.mode & LV_SB_MODE_HIDE) sb_mode |= LV_SB_MODE_HIDE;
- ext->sb.mode = sb_mode;
- }
-
- ext->sb.hor_draw = 0;
- ext->sb.ver_draw = 0;
-
- lv_page_sb_refresh(page);
- lv_obj_invalidate(page);
-}
-
-/**
- * Set the animation time for the page
- * @param page pointer to a page object
- * @param anim_time animation time in milliseconds
- */
-void lv_page_set_anim_time(lv_obj_t * page, uint16_t anim_time)
-{
- LV_ASSERT_OBJ(page, LV_OBJX_NAME);
-
-#if LV_USE_ANIMATION
- lv_page_ext_t * ext = lv_obj_get_ext_attr(page);
- ext->anim_time = anim_time;
-#else
- (void)page; /*Unused*/
- (void)anim_time; /*Unused*/
-#endif
-}
-
-/**
- * Enable the scroll propagation feature. If enabled then the page will move its parent if there is
- * no more space to scroll.
- * @param page pointer to a Page
- * @param en true or false to enable/disable scroll propagation
- */
-void lv_page_set_scroll_propagation(lv_obj_t * page, bool en)
-{
- LV_ASSERT_OBJ(page, LV_OBJX_NAME);
-
- lv_page_ext_t * ext = lv_obj_get_ext_attr(page);
- ext->scroll_prop = en ? 1 : 0;
-}
-
-/**
- * Enable the edge flash effect. (Show an arc when the an edge is reached)
- * @param page pointer to a Page
- * @param en true or false to enable/disable end flash
- */
-void lv_page_set_edge_flash(lv_obj_t * page, bool en)
-{
- LV_ASSERT_OBJ(page, LV_OBJX_NAME);
-
-#if LV_USE_ANIMATION
- lv_page_ext_t * ext = lv_obj_get_ext_attr(page);
- ext->edge_flash.enabled = en ? 1 : 0;
-#else
- (void)page;
- (void)en;
-#endif
-}
-
-/**
- * Set a style of a page
- * @param page pointer to a page object
- * @param type which style should be set
- * @param style pointer to a style
- * */
-void lv_page_set_style(lv_obj_t * page, lv_page_style_t type, const lv_style_t * style)
-{
- LV_ASSERT_OBJ(page, LV_OBJX_NAME);
-
- lv_page_ext_t * ext = lv_obj_get_ext_attr(page);
-
- switch(type) {
- case LV_PAGE_STYLE_BG: lv_obj_set_style(page, style); break;
- case LV_PAGE_STYLE_SCRL: lv_obj_set_style(ext->scrl, style); break;
- case LV_PAGE_STYLE_SB:
- ext->sb.style = style;
- lv_area_set_height(&ext->sb.hor_area, ext->sb.style->body.padding.inner);
- lv_area_set_width(&ext->sb.ver_area, ext->sb.style->body.padding.inner);
- lv_page_sb_refresh(page);
- lv_obj_refresh_ext_draw_pad(page);
- lv_obj_invalidate(page);
- break;
-#if LV_USE_ANIMATION
- case LV_PAGE_STYLE_EDGE_FLASH: ext->edge_flash.style = style; break;
-#endif
- }
-}
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the scrollable object of a page
- * @param page pointer to a page object
- * @return pointer to a container which is the scrollable part of the page
- */
-lv_obj_t * lv_page_get_scrl(const lv_obj_t * page)
-{
- LV_ASSERT_OBJ(page, LV_OBJX_NAME);
-
- lv_page_ext_t * ext = lv_obj_get_ext_attr(page);
-
- return ext->scrl;
-}
-
-/**
- * Get the animation time
- * @param page pointer to a page object
- * @return the animation time in milliseconds
- */
-uint16_t lv_page_get_anim_time(const lv_obj_t * page)
-{
- LV_ASSERT_OBJ(page, LV_OBJX_NAME);
-
-#if LV_USE_ANIMATION
- lv_page_ext_t * ext = lv_obj_get_ext_attr(page);
- return ext->anim_time;
-#else
- (void)page; /*Unused*/
- return 0;
-#endif
-}
-
-/**
- * Set the scroll bar mode on a page
- * @param page pointer to a page object
- * @return the mode from 'lv_page_sb.mode_t' enum
- */
-lv_sb_mode_t lv_page_get_sb_mode(const lv_obj_t * page)
-{
- LV_ASSERT_OBJ(page, LV_OBJX_NAME);
-
- lv_page_ext_t * ext = lv_obj_get_ext_attr(page);
- return ext->sb.mode;
-}
-
-/**
- * Get the scroll propagation property
- * @param page pointer to a Page
- * @return true or false
- */
-bool lv_page_get_scroll_propagation(lv_obj_t * page)
-{
- LV_ASSERT_OBJ(page, LV_OBJX_NAME);
-
- lv_page_ext_t * ext = lv_obj_get_ext_attr(page);
- return ext->scroll_prop == 0 ? false : true;
-}
-
-/**
- * Get the edge flash effect property.
- * @param page pointer to a Page
- * return true or false
- */
-bool lv_page_get_edge_flash(lv_obj_t * page)
-{
- LV_ASSERT_OBJ(page, LV_OBJX_NAME);
-
-#if LV_USE_ANIMATION
- lv_page_ext_t * ext = lv_obj_get_ext_attr(page);
- return ext->edge_flash.enabled == 0 ? false : true;
-#else
- (void)page;
- return false;
-#endif
-}
-
-/**
- * Get that width which can be set to the children to still not cause overflow (show scrollbars)
- * @param page pointer to a page object
- * @return the width which still fits into the page
- */
-lv_coord_t lv_page_get_fit_width(lv_obj_t * page)
-{
- LV_ASSERT_OBJ(page, LV_OBJX_NAME);
-
- const lv_style_t * bg_style = lv_page_get_style(page, LV_PAGE_STYLE_BG);
- const lv_style_t * scrl_style = lv_page_get_style(page, LV_PAGE_STYLE_SCRL);
-
- return lv_obj_get_width(page) - bg_style->body.padding.left - bg_style->body.padding.right -
- scrl_style->body.padding.left - scrl_style->body.padding.right;
-}
-
-/**
- * Get that height which can be set to the children to still not cause overflow (show scrollbars)
- * @param page pointer to a page object
- * @return the height which still fits into the page
- */
-lv_coord_t lv_page_get_fit_height(lv_obj_t * page)
-{
- LV_ASSERT_OBJ(page, LV_OBJX_NAME);
-
- const lv_style_t * bg_style = lv_page_get_style(page, LV_PAGE_STYLE_BG);
- const lv_style_t * scrl_style = lv_page_get_style(page, LV_PAGE_STYLE_SCRL);
-
- return lv_obj_get_height(page) - bg_style->body.padding.top - bg_style->body.padding.bottom -
- scrl_style->body.padding.top - scrl_style->body.padding.bottom;
-}
-
-/**
- * Get a style of a page
- * @param page pointer to page object
- * @param type which style should be get
- * @return style pointer to a style
- * */
-const lv_style_t * lv_page_get_style(const lv_obj_t * page, lv_page_style_t type)
-{
- LV_ASSERT_OBJ(page, LV_OBJX_NAME);
-
- const lv_style_t * style = NULL;
- lv_page_ext_t * ext = lv_obj_get_ext_attr(page);
-
- switch(type) {
- case LV_PAGE_STYLE_BG: style = lv_obj_get_style(page); break;
- case LV_PAGE_STYLE_SCRL: style = lv_obj_get_style(ext->scrl); break;
- case LV_PAGE_STYLE_SB: style = ext->sb.style; break;
-#if LV_USE_ANIMATION
- case LV_PAGE_STYLE_EDGE_FLASH: style = ext->edge_flash.style; break;
-#endif
- default: style = NULL; break;
- }
-
- return style;
-}
-
-/*=====================
- * Other functions
- *====================*/
-
-/**
- * Find whether the page has been scrolled to a certain edge.
- * @param page Page object
- * @param edge Edge to check
- * @return true if the page is on the specified edge
- */
-bool lv_page_on_edge(lv_obj_t * page, lv_page_edge_t edge)
-{
- const lv_style_t * page_style = lv_obj_get_style(page);
- lv_obj_t * scrl = lv_page_get_scrl(page);
- lv_area_t page_coords;
- lv_area_t scrl_coords;
-
- lv_obj_get_coords(scrl, &scrl_coords);
- lv_obj_get_coords(page, &page_coords);
-
- if((edge & LV_PAGE_EDGE_TOP) && scrl_coords.y1 == page_coords.y1 + page_style->body.padding.top) return true;
- if((edge & LV_PAGE_EDGE_BOTTOM) && scrl_coords.y2 == page_coords.y2 - page_style->body.padding.bottom) return true;
- if((edge & LV_PAGE_EDGE_LEFT) && scrl_coords.x1 == page_coords.x1 + page_style->body.padding.left) return true;
- if((edge & LV_PAGE_EDGE_RIGHT) && scrl_coords.x2 == page_coords.x2 - page_style->body.padding.right) return true;
-
- return false;
-}
-
-/**
- * Glue the object to the page. After it the page can be moved (dragged) with this object too.
- * @param obj pointer to an object on a page
- * @param glue true: enable glue, false: disable glue
- */
-void lv_page_glue_obj(lv_obj_t * obj, bool glue)
-{
- lv_obj_set_drag_parent(obj, glue);
- lv_obj_set_drag(obj, glue);
-}
-
-/**
- * Focus on an object. It ensures that the object will be visible on the page.
- * @param page pointer to a page object
- * @param obj pointer to an object to focus (must be on the page)
- * @param anim_en LV_ANIM_ON to focus with animation; LV_ANIM_OFF to focus without animation
- */
-void lv_page_focus(lv_obj_t * page, const lv_obj_t * obj, lv_anim_enable_t anim_en)
-{
- lv_page_ext_t * ext = lv_obj_get_ext_attr(page);
-
-#if LV_USE_ANIMATION
- /* Be sure there is no position changing animation in progress
- * because it can overide the current changes*/
- lv_anim_del(page, (lv_anim_exec_xcb_t)lv_obj_set_x);
- lv_anim_del(page, (lv_anim_exec_xcb_t)lv_obj_set_y);
- lv_anim_del(ext->scrl, (lv_anim_exec_xcb_t)lv_obj_set_x);
- lv_anim_del(ext->scrl, (lv_anim_exec_xcb_t)lv_obj_set_y);
-#endif
-
- const lv_style_t * style = lv_page_get_style(page, LV_PAGE_STYLE_BG);
- const lv_style_t * style_scrl = lv_page_get_style(page, LV_PAGE_STYLE_SCRL);
-
- /*If obj is higher then the page focus where the "error" is smaller*/
- lv_coord_t obj_y = obj->coords.y1 - ext->scrl->coords.y1;
- lv_coord_t obj_h = lv_obj_get_height(obj);
- lv_coord_t scrlable_y = lv_obj_get_y(ext->scrl);
- lv_coord_t page_h = lv_obj_get_height(page);
-
- lv_coord_t top_err = -(scrlable_y + obj_y);
- lv_coord_t bot_err = scrlable_y + obj_y + obj_h - page_h;
-
- /*Out of the page on the top*/
- if((obj_h <= page_h && top_err > 0) || (obj_h > page_h && top_err < bot_err)) {
- /*Calculate a new position and let some space above*/
- scrlable_y = -(obj_y - style_scrl->body.padding.top - style->body.padding.top);
- scrlable_y += style_scrl->body.padding.top;
- }
- /*Out of the page on the bottom*/
- else if((obj_h <= page_h && bot_err > 0) || (obj_h > page_h && top_err >= bot_err)) {
- /*Calculate a new position and let some space below*/
- scrlable_y = -(obj_y + style_scrl->body.padding.bottom + style->body.padding.bottom);
- scrlable_y -= style_scrl->body.padding.bottom;
- scrlable_y += page_h - obj_h;
- }
-
- /*If obj is wider then the page focus where the "error" is smaller*/
- lv_coord_t obj_x = obj->coords.x1 - ext->scrl->coords.x1;
- lv_coord_t obj_w = lv_obj_get_width(obj);
- lv_coord_t scrlable_x = lv_obj_get_x(ext->scrl);
- lv_coord_t page_w = lv_obj_get_width(page);
-
- lv_coord_t left_err = -(scrlable_x + obj_x);
- lv_coord_t right_err = scrlable_x + obj_x + obj_w - page_w;
-
- /*Out of the page on the left*/
- if((obj_w <= page_w && left_err > 0) || (obj_w > page_w && left_err < right_err)) {
- /*Calculate a new position and let some space above*/
- scrlable_x = -(obj_x - style_scrl->body.padding.left - style->body.padding.left);
- scrlable_x += style_scrl->body.padding.left;
- }
- /*Out of the page on the rigth*/
- else if((obj_w <= page_w && right_err > 0) || (obj_w > page_w && left_err >= right_err)) {
- /*Calculate a new position and let some space below*/
- scrlable_x = -(obj_x + style_scrl->body.padding.right + style->body.padding.right);
- scrlable_x -= style_scrl->body.padding.right;
- scrlable_x += page_w - obj_w;
- }
-
- if(anim_en == LV_ANIM_OFF || lv_page_get_anim_time(page) == 0) {
- lv_obj_set_y(ext->scrl, scrlable_y);
- lv_obj_set_x(ext->scrl, scrlable_x);
- } else {
-#if LV_USE_ANIMATION
- lv_anim_t a;
- a.act_time = 0;
- a.start = lv_obj_get_y(ext->scrl);
- a.end = scrlable_y;
- a.time = lv_page_get_anim_time(page);
- a.ready_cb = NULL;
- a.playback = 0;
- a.repeat = 0;
- a.var = ext->scrl;
- a.path_cb = lv_anim_path_linear;
- a.exec_cb = (lv_anim_exec_xcb_t)lv_obj_set_y;
- lv_anim_create(&a);
-
- a.start = lv_obj_get_x(ext->scrl);
- a.end = scrlable_x;
- a.exec_cb = (lv_anim_exec_xcb_t)lv_obj_set_x;
- lv_anim_create(&a);
-#endif
- }
-}
-
-/**
- * Scroll the page horizontally
- * @param page pointer to a page object
- * @param dist the distance to scroll (< 0: scroll right; > 0 scroll left)
- */
-void lv_page_scroll_hor(lv_obj_t * page, lv_coord_t dist)
-{
- lv_obj_t * scrl = lv_page_get_scrl(page);
-
-#if LV_USE_ANIMATION
- lv_anim_t a;
- a.var = scrl;
- a.start = lv_obj_get_x(scrl);
- a.end = a.start + dist;
- a.exec_cb = (lv_anim_exec_xcb_t)lv_obj_set_x;
- a.path_cb = lv_anim_path_linear;
- a.ready_cb = NULL;
- a.act_time = 0;
- a.time = LV_PAGE_SCROLL_ANIM_TIME;
- a.playback = 0;
- a.playback_pause = 0;
- a.repeat = 0;
- a.repeat_pause = 0;
- lv_anim_create(&a);
-#else
- lv_obj_set_x(scrl, lv_obj_get_x(scrl) + dist);
-#endif
-}
-
-/**
- * Scroll the page vertically
- * @param page pointer to a page object
- * @param dist the distance to scroll (< 0: scroll down; > 0 scroll up)
- */
-void lv_page_scroll_ver(lv_obj_t * page, lv_coord_t dist)
-{
- lv_obj_t * scrl = lv_page_get_scrl(page);
-
-#if LV_USE_ANIMATION
- lv_anim_t a;
- a.var = scrl;
- a.start = lv_obj_get_y(scrl);
- a.end = a.start + dist;
- a.exec_cb = (lv_anim_exec_xcb_t)lv_obj_set_y;
- a.path_cb = lv_anim_path_linear;
- a.ready_cb = NULL;
- a.act_time = 0;
- a.time = LV_PAGE_SCROLL_ANIM_TIME;
- a.playback = 0;
- a.playback_pause = 0;
- a.repeat = 0;
- a.repeat_pause = 0;
- lv_anim_create(&a);
-#else
- lv_obj_set_y(scrl, lv_obj_get_y(scrl) + dist);
-#endif
-}
-
-/**
- * Not intended to use directly by the user but by other object types internally.
- * Start an edge flash animation. Exactly one `ext->edge_flash.xxx_ip` should be set
- * @param page
- */
-void lv_page_start_edge_flash(lv_obj_t * page)
-{
-#if LV_USE_ANIMATION
- lv_page_ext_t * ext = lv_obj_get_ext_attr(page);
- if(ext->edge_flash.enabled) {
- lv_anim_t a;
- a.var = page;
- a.start = 0;
- a.end = LV_PAGE_END_FLASH_SIZE;
- a.exec_cb = (lv_anim_exec_xcb_t)edge_flash_anim;
- a.path_cb = lv_anim_path_linear;
- a.ready_cb = edge_flash_anim_end;
- a.act_time = 0;
- a.time = LV_PAGE_END_ANIM_TIME;
- a.playback = 1;
- a.playback_pause = LV_PAGE_END_ANIM_WAIT_TIME;
- a.repeat = 0;
- a.repeat_pause = 0;
- lv_anim_create(&a);
- }
-#else
- (void)page; /*Unused*/
-#endif
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Handle the drawing related tasks of the pages
- * @param page pointer to an object
- * @param mask the object will be drawn only in this area
- * @param mode LV_DESIGN_COVER_CHK: only check if the object fully covers the 'mask_p' area
- * (return 'true' if yes)
- * LV_DESIGN_DRAW: draw the object (always return 'true')
- * LV_DESIGN_DRAW_POST: drawing after every children are drawn
- * @param return true/false, depends on 'mode'
- */
-static bool lv_page_design(lv_obj_t * page, const lv_area_t * mask, lv_design_mode_t mode)
-{
- if(mode == LV_DESIGN_COVER_CHK) {
- return ancestor_design(page, mask, mode);
- }
- /*Cache page bg style for temporary modification*/
- const lv_style_t * style = lv_page_get_style(page, LV_PAGE_STYLE_BG);
- lv_style_t style_tmp;
- lv_style_copy(&style_tmp, style);
-
- if(mode == LV_DESIGN_DRAW_MAIN) {
- /*Draw without border*/
- style_tmp.body.border.width = 0;
- lv_draw_rect(&page->coords, mask, &style_tmp, lv_obj_get_opa_scale(page));
-
- } else if(mode == LV_DESIGN_DRAW_POST) {
- /*Draw only a border*/
- style_tmp.body.shadow.width = 0;
- style_tmp.body.opa = LV_OPA_TRANSP;
- lv_draw_rect(&page->coords, mask, &style_tmp, lv_obj_get_opa_scale(page));
-
- lv_page_ext_t * ext = lv_obj_get_ext_attr(page);
-
- /*Draw the scrollbars*/
- lv_area_t sb_area;
- if(ext->sb.hor_draw && (ext->sb.mode & LV_SB_MODE_HIDE) == 0) {
- /*Convert the relative coordinates to absolute*/
- lv_area_copy(&sb_area, &ext->sb.hor_area);
- sb_area.x1 += page->coords.x1;
- sb_area.y1 += page->coords.y1;
- sb_area.x2 += page->coords.x1;
- sb_area.y2 += page->coords.y1;
- lv_draw_rect(&sb_area, mask, ext->sb.style, lv_obj_get_opa_scale(page));
- }
-
- if(ext->sb.ver_draw && (ext->sb.mode & LV_SB_MODE_HIDE) == 0) {
- /*Convert the relative coordinates to absolute*/
- lv_area_copy(&sb_area, &ext->sb.ver_area);
- sb_area.x1 += page->coords.x1;
- sb_area.y1 += page->coords.y1;
- sb_area.x2 += page->coords.x1;
- sb_area.y2 += page->coords.y1;
- lv_draw_rect(&sb_area, mask, ext->sb.style, lv_obj_get_opa_scale(page));
- }
-
-#if LV_USE_ANIMATION
- {
- lv_coord_t page_w = lv_obj_get_width(page);
- lv_coord_t page_h = lv_obj_get_height(page);
-
- lv_area_t flash_area;
-
- if(ext->edge_flash.top_ip) {
- flash_area.x1 = page->coords.x1 - page_w;
- flash_area.x2 = page->coords.x2 + page_w;
- flash_area.y1 = page->coords.y1 - 3 * page_w + ext->edge_flash.state;
- flash_area.y2 = page->coords.y1 + ext->edge_flash.state;
- } else if(ext->edge_flash.bottom_ip) {
- flash_area.x1 = page->coords.x1 - page_w;
- flash_area.x2 = page->coords.x2 + page_w;
- flash_area.y1 = page->coords.y2 - ext->edge_flash.state;
- flash_area.y2 = page->coords.y2 + 3 * page_w - ext->edge_flash.state;
- } else if(ext->edge_flash.right_ip) {
- flash_area.x1 = page->coords.x2 - ext->edge_flash.state;
- flash_area.x2 = page->coords.x2 + 3 * page_h - ext->edge_flash.state;
- flash_area.y1 = page->coords.y1 - page_h;
- flash_area.y2 = page->coords.y2 + page_h;
- } else if(ext->edge_flash.left_ip) {
- flash_area.x1 = page->coords.x1 - 3 * page_h + ext->edge_flash.state;
- flash_area.x2 = page->coords.x1 + ext->edge_flash.state;
- flash_area.y1 = page->coords.y1 - page_h;
- flash_area.y2 = page->coords.y2 + page_h;
- }
-
- if(ext->edge_flash.left_ip || ext->edge_flash.right_ip || ext->edge_flash.top_ip ||
- ext->edge_flash.bottom_ip) {
- lv_style_t flash_style;
- lv_style_copy(&flash_style, ext->edge_flash.style);
- flash_style.body.radius = LV_RADIUS_CIRCLE;
- uint32_t opa = (flash_style.body.opa * ext->edge_flash.state) / LV_PAGE_END_FLASH_SIZE;
- flash_style.body.opa = opa;
- lv_draw_rect(&flash_area, mask, &flash_style, lv_obj_get_opa_scale(page));
- }
- }
-#endif
- }
-
- return true;
-}
-
-/**
- * Handle the drawing related tasks of the scrollable object
- * @param scrl pointer to an object
- * @param mask the object will be drawn only in this area
- * @param mode LV_DESIGN_COVER_CHK: only check if the object fully covers the 'mask_p' area
- * (return 'true' if yes)
- * LV_DESIGN_DRAW: draw the object (always return 'true')
- * LV_DESIGN_DRAW_POST: drawing after every children are drawn
- * @param return true/false, depends on 'mode'
- */
-static bool lv_scrl_design(lv_obj_t * scrl, const lv_area_t * mask, lv_design_mode_t mode)
-{
- if(mode == LV_DESIGN_COVER_CHK) {
- return ancestor_design(scrl, mask, mode);
- } else if(mode == LV_DESIGN_DRAW_MAIN) {
-#if LV_USE_GROUP
- /* If the page is focused in a group and
- * the background object is not visible (transparent)
- * then "activate" the style of the scrollable*/
- const lv_style_t * style_scrl_ori = lv_obj_get_style(scrl);
- lv_obj_t * page = lv_obj_get_parent(scrl);
- const lv_style_t * style_page = lv_obj_get_style(page);
- lv_group_t * g = lv_obj_get_group(page);
- if((style_page->body.opa == LV_OPA_TRANSP) &&
- style_page->body.border.width == 0) { /*Is the background visible?*/
- if(lv_group_get_focused(g) == page) {
- lv_style_t * style_mod;
- style_mod = lv_group_mod_style(g, style_scrl_ori);
- /*If still not visible modify the style a littel bit*/
- if((style_mod->body.opa == LV_OPA_TRANSP) && style_mod->body.border.width == 0) {
- style_mod->body.opa = LV_OPA_50;
- style_mod->body.border.width = 1;
- style_mod = lv_group_mod_style(g, style_mod);
- }
-
- scrl->style_p = style_mod; /*Temporally change the style to the activated */
- }
- }
-#endif
- ancestor_design(scrl, mask, mode);
-
-#if LV_USE_GROUP
- scrl->style_p = style_scrl_ori; /*Revert the style*/
-#endif
- } else if(mode == LV_DESIGN_DRAW_POST) {
- ancestor_design(scrl, mask, mode);
- }
-
- return true;
-}
-
-/**
- * Signal function of the page
- * @param page pointer to a page object
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_page_signal(lv_obj_t * page, lv_signal_t sign, void * param)
-{
- lv_res_t res;
-
- /* Include the ancient signal function */
- res = ancestor_signal(page, sign, param);
- if(res != LV_RES_OK) return res;
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);
-
- lv_page_ext_t * ext = lv_obj_get_ext_attr(page);
- lv_obj_t * child;
- if(sign == LV_SIGNAL_CHILD_CHG) { /*Automatically move children to the scrollable object*/
- if(ext->scrl == NULL) return LV_RES_OK;
- const lv_style_t * style_bg = lv_page_get_style(page, LV_PAGE_STYLE_BG);
- const lv_style_t * style_scrl = lv_page_get_style(page, LV_PAGE_STYLE_SCRL);
- lv_fit_t fit_left = lv_page_get_scrl_fit_left(page);
- lv_fit_t fit_right = lv_page_get_scrl_fit_right(page);
- lv_fit_t fit_top = lv_page_get_scrl_fit_top(page);
- child = lv_obj_get_child(page, NULL);
- while(child != NULL) {
- if(lv_obj_is_protected(child, LV_PROTECT_PARENT) == false) {
- lv_obj_t * tmp = child;
- child = lv_obj_get_child(page, child); /*Get the next child before move this*/
-
- /* Reposition the child to take padding into account (Only if it's on (0;0) or (widht;height) coordinates now)
- * It's required to keep new the object on the same coordinate if FIT is enabled.*/
- if((tmp->coords.x1 == page->coords.x1) && (fit_left == LV_FIT_TIGHT || fit_left == LV_FIT_FILL)) {
- tmp->coords.x1 += style_scrl->body.padding.left;
- tmp->coords.x2 += style_scrl->body.padding.left;
- }
- else if((tmp->coords.x2 == page->coords.x2) && (fit_right == LV_FIT_TIGHT || fit_right == LV_FIT_FILL)) {
- tmp->coords.x1 -= style_scrl->body.padding.right + style_bg->body.padding.right;
- tmp->coords.x2 -= style_scrl->body.padding.right + style_bg->body.padding.right;
- }
- if((tmp->coords.y1 == page->coords.y1) && (fit_top == LV_FIT_TIGHT || fit_top == LV_FIT_FILL)) {
- tmp->coords.y1 += style_scrl->body.padding.top;
- tmp->coords.y2 += style_scrl->body.padding.top;
- }
- lv_obj_set_parent(tmp, ext->scrl);
- } else {
- child = lv_obj_get_child(page, child);
- }
- }
- } else if(sign == LV_SIGNAL_STYLE_CHG) {
- ext->scrl->signal_cb(ext->scrl, LV_SIGNAL_CORD_CHG, &ext->scrl->coords);
-
- /*The scrollbars are important only if they are visible now*/
- if(ext->sb.hor_draw || ext->sb.ver_draw) lv_page_sb_refresh(page);
-
- /*Refresh the ext. size because the scrollbars might be positioned out of the page*/
- lv_obj_refresh_ext_draw_pad(page);
- } else if(sign == LV_SIGNAL_CORD_CHG) {
- /*Refresh the scrollbar and notify the scrl if the size is changed*/
- if(ext->scrl != NULL && (lv_obj_get_width(page) != lv_area_get_width(param) ||
- lv_obj_get_height(page) != lv_area_get_height(param))) {
- /*If no hor_fit enabled set the scrollable's width to the page's width*/
- ext->scrl->signal_cb(ext->scrl, LV_SIGNAL_CORD_CHG, &ext->scrl->coords);
-
- /*The scrollbars are important only if they are visible now*/
- if(ext->sb.hor_draw || ext->sb.ver_draw) lv_page_sb_refresh(page);
- }
- } else if(sign == LV_SIGNAL_REFR_EXT_DRAW_PAD) {
- /*Ensure ext. size for the scrollbars if they are out of the page*/
- if(page->ext_draw_pad < (-ext->sb.style->body.padding.right))
- page->ext_draw_pad = -ext->sb.style->body.padding.right;
- if(page->ext_draw_pad < (-ext->sb.style->body.padding.bottom))
- page->ext_draw_pad = -ext->sb.style->body.padding.bottom;
- } else if(sign == LV_SIGNAL_CONTROL) {
- uint32_t c = *((uint32_t *)param);
-
- if(c == LV_KEY_DOWN) {
- lv_page_scroll_ver(page, -lv_obj_get_height(page) / 4);
- } else if(c == LV_KEY_UP) {
- lv_page_scroll_ver(page, lv_obj_get_height(page) / 4);
- } else if(c == LV_KEY_RIGHT) {
- /*If the page can't be scrolled horizontally because it's not wide enough then scroll it
- * vertically*/
- if(lv_page_get_scrl_width(page) <= lv_obj_get_width(page))
- lv_page_scroll_ver(page, -lv_obj_get_height(page) / 4);
- else
- lv_page_scroll_hor(page, -lv_obj_get_width(page) / 4);
- } else if(c == LV_KEY_LEFT) {
- /*If the page can't be scrolled horizontally because it's not wide enough then scroll it
- * vertically*/
- if(lv_page_get_scrl_width(page) <= lv_obj_get_width(page))
- lv_page_scroll_ver(page, lv_obj_get_height(page) / 4);
- else
- lv_page_scroll_hor(page, lv_obj_get_width(page) / 4);
- }
- } else if(sign == LV_SIGNAL_GET_EDITABLE) {
- bool * editable = (bool *)param;
- *editable = true;
- }
-
- return res;
-}
-
-/**
- * Signal function of the scrollable part of a page
- * @param scrl pointer to the scrollable object
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, void * param)
-{
- lv_res_t res;
-
- /* Include the ancient signal function */
- res = ancestor_signal(scrl, sign, param);
- if(res != LV_RES_OK) return res;
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, "");
-
- lv_obj_t * page = lv_obj_get_parent(scrl);
- const lv_style_t * page_style = lv_obj_get_style(page);
- lv_page_ext_t * page_ext = lv_obj_get_ext_attr(page);
-
- if(sign == LV_SIGNAL_CORD_CHG) {
- /*Limit the position of the scrollable object to be always visible
- * (Do not let its edge inner then its parent respective edge)*/
- lv_coord_t new_x = lv_obj_get_x(scrl);
- lv_coord_t new_y = lv_obj_get_y(scrl);
- bool refr_x = false;
- bool refr_y = false;
- lv_area_t page_coords;
- lv_area_t scrl_coords;
- lv_obj_get_coords(scrl, &scrl_coords);
- lv_obj_get_coords(page, &page_coords);
-
- lv_area_t * ori_coords = (lv_area_t *)param;
- lv_coord_t diff_x = scrl->coords.x1 - ori_coords->x1;
- lv_coord_t diff_y = scrl->coords.y1 - ori_coords->y1;
- lv_coord_t hpad = page_style->body.padding.left + page_style->body.padding.right;
- lv_coord_t vpad = page_style->body.padding.top + page_style->body.padding.bottom;
- lv_obj_t * page_parent = lv_obj_get_parent(page);
-
- lv_indev_t * indev = lv_indev_get_act();
- lv_point_t drag_vect;
- lv_indev_get_vect(indev, &drag_vect);
-
- /* Start the scroll propagation if there is drag vector on the indev, but the drag is not
- * started yet and the scrollable is in a corner. It will enable the scroll propagation only
- * when a new scroll begins and not when the scrollable is already being scrolled.*/
- if(page_ext->scroll_prop && page_ext->scroll_prop_ip == 0 && lv_indev_is_dragging(indev) == false) {
- if(((drag_vect.y > 0 && scrl_coords.y1 == page_coords.y1 + page_style->body.padding.top) ||
- (drag_vect.y < 0 && scrl_coords.y2 == page_coords.y2 - page_style->body.padding.bottom)) &&
- ((drag_vect.x > 0 && scrl_coords.x1 == page_coords.x1 + page_style->body.padding.left) ||
- (drag_vect.x < 0 && scrl_coords.x2 == page_coords.x2 - page_style->body.padding.right))) {
-
- if(lv_obj_get_parent(page_parent) != NULL) { /*Do not propagate the scroll to a screen*/
- page_ext->scroll_prop_ip = 1;
- }
- }
- }
-
- /*scrollable width smaller then page width? -> align to left*/
- if(lv_area_get_width(&scrl_coords) + hpad <= lv_area_get_width(&page_coords)) {
- if(scrl_coords.x1 != page_coords.x1 + page_style->body.padding.left) {
- new_x = page_style->body.padding.left;
- refr_x = true;
- }
- } else {
- /*If the scroll propagation is in progress revert the original coordinates (don't let
- * the page scroll)*/
- if(page_ext->scroll_prop_ip) {
- if(drag_vect.x == diff_x) { /*`scrl` is bouncing: drag pos. it somewhere and here it
- is reverted. Handle only the pos. because of drag*/
- new_x = ori_coords->x1 - page_coords.x1;
- refr_x = true;
- }
- }
- /*The edges of the scrollable can not be in the page (minus hpad) */
- else if(scrl_coords.x2 < page_coords.x2 - page_style->body.padding.right) {
- new_x = lv_area_get_width(&page_coords) - lv_area_get_width(&scrl_coords) -
- page_style->body.padding.right; /* Right align */
- refr_x = true;
-#if LV_USE_ANIMATION
- if(page_ext->edge_flash.enabled && page_ext->edge_flash.left_ip == 0 &&
- page_ext->edge_flash.right_ip == 0 && page_ext->edge_flash.top_ip == 0 &&
- page_ext->edge_flash.bottom_ip == 0) {
- lv_page_start_edge_flash(page);
- page_ext->edge_flash.right_ip = 1;
- }
-#endif
- } else if(scrl_coords.x1 > page_coords.x1 + page_style->body.padding.left) {
- new_x = page_style->body.padding.left; /*Left align*/
- refr_x = true;
-#if LV_USE_ANIMATION
- if(page_ext->edge_flash.enabled && page_ext->edge_flash.left_ip == 0 &&
- page_ext->edge_flash.right_ip == 0 && page_ext->edge_flash.top_ip == 0 &&
- page_ext->edge_flash.bottom_ip == 0) {
- lv_page_start_edge_flash(page);
- page_ext->edge_flash.left_ip = 1;
- }
-#endif
- }
- }
-
- /*scrollable height smaller then page height? -> align to top*/
- if(lv_area_get_height(&scrl_coords) + vpad <= lv_area_get_height(&page_coords)) {
- if(scrl_coords.y1 != page_coords.y1 + page_style->body.padding.top) {
- new_y = page_style->body.padding.top;
- refr_y = true;
- }
- } else {
- /*If the scroll propagation is in progress revert the original coordinates (don't let
- * the page scroll)*/
- if(page_ext->scroll_prop_ip) {
- if(drag_vect.y == diff_y) { /*`scrl` is bouncing: drag pos. it somewhere and here it
- is reverted. Handle only the pos. because of drag*/
- new_y = ori_coords->y1 - page_coords.y1;
- refr_y = true;
- }
- }
- /*The edges of the scrollable can not be in the page (minus vpad) */
- else if(scrl_coords.y2 < page_coords.y2 - page_style->body.padding.bottom) {
- new_y = lv_area_get_height(&page_coords) - lv_area_get_height(&scrl_coords) -
- page_style->body.padding.bottom; /* Bottom align */
- refr_y = true;
-#if LV_USE_ANIMATION
- if(page_ext->edge_flash.enabled && page_ext->edge_flash.left_ip == 0 &&
- page_ext->edge_flash.right_ip == 0 && page_ext->edge_flash.top_ip == 0 &&
- page_ext->edge_flash.bottom_ip == 0) {
- lv_page_start_edge_flash(page);
- page_ext->edge_flash.bottom_ip = 1;
- }
-#endif
- } else if(scrl_coords.y1 > page_coords.y1 + page_style->body.padding.top) {
- new_y = page_style->body.padding.top; /*Top align*/
- refr_y = true;
-#if LV_USE_ANIMATION
- if(page_ext->edge_flash.enabled && page_ext->edge_flash.left_ip == 0 &&
- page_ext->edge_flash.right_ip == 0 && page_ext->edge_flash.top_ip == 0 &&
- page_ext->edge_flash.bottom_ip == 0) {
- lv_page_start_edge_flash(page);
- page_ext->edge_flash.top_ip = 1;
- }
-#endif
- }
- }
-
- if(refr_x || refr_y) {
- lv_obj_set_pos(scrl, new_x, new_y);
-
- if(page_ext->scroll_prop_ip) {
- if(refr_y) lv_obj_set_y(page_parent, lv_obj_get_y(page_parent) + diff_y);
- if(refr_x) lv_obj_set_x(page_parent, lv_obj_get_x(page_parent) + diff_x);
- }
- }
-
- lv_page_sb_refresh(page);
- } else if(sign == LV_SIGNAL_DRAG_END) {
-
- /*Scroll propagation is finished on drag end*/
- page_ext->scroll_prop_ip = 0;
-
- /*Hide scrollbars if required*/
- if(page_ext->sb.mode == LV_SB_MODE_DRAG) {
- lv_area_t sb_area_tmp;
- if(page_ext->sb.hor_draw) {
- lv_area_copy(&sb_area_tmp, &page_ext->sb.hor_area);
- sb_area_tmp.x1 += page->coords.x1;
- sb_area_tmp.y1 += page->coords.y1;
- sb_area_tmp.x2 += page->coords.x1;
- sb_area_tmp.y2 += page->coords.y1;
- lv_obj_invalidate_area(page, &sb_area_tmp);
- page_ext->sb.hor_draw = 0;
- }
- if(page_ext->sb.ver_draw) {
- lv_area_copy(&sb_area_tmp, &page_ext->sb.ver_area);
- sb_area_tmp.x1 += page->coords.x1;
- sb_area_tmp.y1 += page->coords.y1;
- sb_area_tmp.x2 += page->coords.x1;
- sb_area_tmp.y2 += page->coords.y1;
- lv_obj_invalidate_area(page, &sb_area_tmp);
- page_ext->sb.ver_draw = 0;
- }
- }
- } else if(sign == LV_SIGNAL_CLEANUP) {
- page_ext->scrl = NULL;
- }
-
- return res;
-}
-
-/**
- * Propagate the input device related event of the scrollable to the parent page background
- * It is used by default if the scrollable's event is not specified
- * @param scrl pointer to the page's scrollable object
- * @param event type of the event
- * @param data data of the event
- */
-static void scrl_def_event_cb(lv_obj_t * scrl, lv_event_t event)
-{
- lv_obj_t * page = lv_obj_get_parent(scrl);
-
- /*clang-format off*/
- if(event == LV_EVENT_PRESSED || event == LV_EVENT_PRESSING || event == LV_EVENT_PRESS_LOST ||
- event == LV_EVENT_RELEASED || event == LV_EVENT_SHORT_CLICKED || event == LV_EVENT_CLICKED ||
- event == LV_EVENT_LONG_PRESSED || event == LV_EVENT_LONG_PRESSED_REPEAT ||
- event == LV_EVENT_DRAG_BEGIN || event == LV_EVENT_DRAG_END || event == LV_EVENT_DRAG_THROW_BEGIN) {
- lv_event_send(page, event, lv_event_get_data());
- }
- /*clang-format on*/
-}
-
-/**
- * Refresh the position and size of the scroll bars.
- * @param page pointer to a page object
- */
-static void lv_page_sb_refresh(lv_obj_t * page)
-{
- lv_page_ext_t * ext = lv_obj_get_ext_attr(page);
- const lv_style_t * style = lv_obj_get_style(page);
- lv_obj_t * scrl = ext->scrl;
- lv_coord_t size_tmp;
- lv_coord_t scrl_w = lv_obj_get_width(scrl);
- lv_coord_t scrl_h = lv_obj_get_height(scrl);
- lv_coord_t obj_w = lv_obj_get_width(page);
- lv_coord_t obj_h = lv_obj_get_height(page);
-
- /*Always let 'scrollbar width' padding above, under, left and right to the scrollbars
- * else:
- * - horizontal and vertical scrollbars can overlap on the corners
- * - if the page has radius the scrollbar can be out of the radius */
- lv_coord_t sb_hor_pad = LV_MATH_MAX(ext->sb.style->body.padding.inner, style->body.padding.right);
- lv_coord_t sb_ver_pad = LV_MATH_MAX(ext->sb.style->body.padding.inner, style->body.padding.bottom);
-
- if(ext->sb.mode == LV_SB_MODE_OFF) return;
-
- if(ext->sb.mode == LV_SB_MODE_ON) {
- ext->sb.hor_draw = 1;
- ext->sb.ver_draw = 1;
- }
-
- /*Invalidate the current (old) scrollbar areas*/
- lv_area_t sb_area_tmp;
- if(ext->sb.hor_draw != 0) {
- lv_area_copy(&sb_area_tmp, &ext->sb.hor_area);
- sb_area_tmp.x1 += page->coords.x1;
- sb_area_tmp.y1 += page->coords.y1;
- sb_area_tmp.x2 += page->coords.x1;
- sb_area_tmp.y2 += page->coords.y1;
- lv_obj_invalidate_area(page, &sb_area_tmp);
- }
- if(ext->sb.ver_draw != 0) {
- lv_area_copy(&sb_area_tmp, &ext->sb.ver_area);
- sb_area_tmp.x1 += page->coords.x1;
- sb_area_tmp.y1 += page->coords.y1;
- sb_area_tmp.x2 += page->coords.x1;
- sb_area_tmp.y2 += page->coords.y1;
- lv_obj_invalidate_area(page, &sb_area_tmp);
- }
-
- if(ext->sb.mode == LV_SB_MODE_DRAG && lv_indev_is_dragging(lv_indev_get_act()) == false) {
- ext->sb.hor_draw = 0;
- ext->sb.ver_draw = 0;
- return;
- }
-
- /*Full sized horizontal scrollbar*/
- if(scrl_w <= obj_w - style->body.padding.left - style->body.padding.right) {
- lv_area_set_width(&ext->sb.hor_area, obj_w - 2 * sb_hor_pad);
- lv_area_set_pos(&ext->sb.hor_area, sb_hor_pad,
- obj_h - ext->sb.style->body.padding.inner - ext->sb.style->body.padding.bottom);
- if(ext->sb.mode == LV_SB_MODE_AUTO || ext->sb.mode == LV_SB_MODE_DRAG) ext->sb.hor_draw = 0;
- }
- /*Smaller horizontal scrollbar*/
- else {
- size_tmp =
- (obj_w * (obj_w - (2 * sb_hor_pad))) / (scrl_w + style->body.padding.left + style->body.padding.right);
- if(size_tmp < LV_PAGE_SB_MIN_SIZE) size_tmp = LV_PAGE_SB_MIN_SIZE;
- lv_area_set_width(&ext->sb.hor_area, size_tmp);
-
- lv_area_set_pos(&ext->sb.hor_area,
- sb_hor_pad +
- (-(lv_obj_get_x(scrl) - style->body.padding.left) * (obj_w - size_tmp - 2 * sb_hor_pad)) /
- (scrl_w + style->body.padding.left + style->body.padding.right - obj_w),
- obj_h - ext->sb.style->body.padding.inner - ext->sb.style->body.padding.bottom);
-
- if(ext->sb.mode == LV_SB_MODE_AUTO || ext->sb.mode == LV_SB_MODE_DRAG) ext->sb.hor_draw = 1;
- }
-
- /*Full sized vertical scroll bar*/
- if(scrl_h <= obj_h - style->body.padding.top - style->body.padding.bottom) {
- lv_area_set_height(&ext->sb.ver_area, obj_h - 2 * sb_ver_pad);
- lv_area_set_pos(&ext->sb.ver_area,
- obj_w - ext->sb.style->body.padding.inner - ext->sb.style->body.padding.right, sb_ver_pad);
- if(ext->sb.mode == LV_SB_MODE_AUTO || ext->sb.mode == LV_SB_MODE_DRAG) ext->sb.ver_draw = 0;
- }
- /*Smaller vertical scroll bar*/
- else {
- size_tmp =
- (obj_h * (obj_h - (2 * sb_ver_pad))) / (scrl_h + style->body.padding.top + style->body.padding.bottom);
- if(size_tmp < LV_PAGE_SB_MIN_SIZE) size_tmp = LV_PAGE_SB_MIN_SIZE;
- lv_area_set_height(&ext->sb.ver_area, size_tmp);
-
- lv_area_set_pos(&ext->sb.ver_area,
- obj_w - ext->sb.style->body.padding.inner - ext->sb.style->body.padding.right,
- sb_ver_pad + (-(lv_obj_get_y(scrl) - ext->sb.style->body.padding.bottom) *
- (obj_h - size_tmp - 2 * sb_ver_pad)) /
- (scrl_h + style->body.padding.top + style->body.padding.bottom - obj_h));
-
- if(ext->sb.mode == LV_SB_MODE_AUTO || ext->sb.mode == LV_SB_MODE_DRAG) ext->sb.ver_draw = 1;
- }
-
- /*Invalidate the new scrollbar areas*/
- if(ext->sb.hor_draw != 0) {
- lv_area_copy(&sb_area_tmp, &ext->sb.hor_area);
- sb_area_tmp.x1 += page->coords.x1;
- sb_area_tmp.y1 += page->coords.y1;
- sb_area_tmp.x2 += page->coords.x1;
- sb_area_tmp.y2 += page->coords.y1;
- lv_obj_invalidate_area(page, &sb_area_tmp);
- }
- if(ext->sb.ver_draw != 0) {
- lv_area_copy(&sb_area_tmp, &ext->sb.ver_area);
- sb_area_tmp.x1 += page->coords.x1;
- sb_area_tmp.y1 += page->coords.y1;
- sb_area_tmp.x2 += page->coords.x1;
- sb_area_tmp.y2 += page->coords.y1;
- lv_obj_invalidate_area(page, &sb_area_tmp);
- }
-}
-
-#if LV_USE_ANIMATION
-static void edge_flash_anim(void * page, lv_anim_value_t v)
-{
- lv_page_ext_t * ext = lv_obj_get_ext_attr(page);
- ext->edge_flash.state = v;
- lv_obj_invalidate(page);
-}
-
-static void edge_flash_anim_end(lv_anim_t * a)
-{
- lv_page_ext_t * ext = lv_obj_get_ext_attr(a->var);
- ext->edge_flash.top_ip = 0;
- ext->edge_flash.bottom_ip = 0;
- ext->edge_flash.left_ip = 0;
- ext->edge_flash.right_ip = 0;
- lv_obj_invalidate(a->var);
-}
-#endif
-
-#endif
diff --git a/src/libs/lvgl/src/lv_objx/lv_page.h b/src/libs/lvgl/src/lv_objx/lv_page.h
deleted file mode 100644
index 6715c92f..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_page.h
+++ /dev/null
@@ -1,416 +0,0 @@
-/**
- * @file lv_page.h
- *
- */
-
-#ifndef LV_PAGE_H
-#define LV_PAGE_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_PAGE != 0
-
-/*Testing of dependencies*/
-#if LV_USE_CONT == 0
-#error "lv_page: lv_cont is required. Enable it in lv_conf.h (LV_USE_CONT 1) "
-#endif
-
-#include "lv_cont.h"
-#include "../lv_core/lv_indev.h"
-#include "../lv_misc/lv_anim.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/** Scrollbar modes: shows when should the scrollbars be visible*/
-enum {
- LV_SB_MODE_OFF = 0x0, /**< Never show scrollbars*/
- LV_SB_MODE_ON = 0x1, /**< Always show scrollbars*/
- LV_SB_MODE_DRAG = 0x2, /**< Show scrollbars when page is being dragged*/
- LV_SB_MODE_AUTO = 0x3, /**< Show scrollbars when the scrollable container is large enough to be scrolled*/
- LV_SB_MODE_HIDE = 0x4, /**< Hide the scroll bar temporally*/
- LV_SB_MODE_UNHIDE = 0x5, /**< Unhide the previously hidden scrollbar. Recover it's type too*/
-};
-typedef uint8_t lv_sb_mode_t;
-
-/** Edges: describes the four edges of the page*/
-enum { LV_PAGE_EDGE_LEFT = 0x1, LV_PAGE_EDGE_TOP = 0x2, LV_PAGE_EDGE_RIGHT = 0x4, LV_PAGE_EDGE_BOTTOM = 0x8 };
-typedef uint8_t lv_page_edge_t;
-
-/*Data of page*/
-typedef struct
-{
- lv_cont_ext_t bg; /*Ext. of ancestor*/
- /*New data for this type */
- lv_obj_t * scrl; /*The scrollable object on the background*/
- struct
- {
- const lv_style_t * style; /*Style of scrollbars*/
- lv_area_t hor_area; /*Horizontal scrollbar area relative to the page. (Handled by the library) */
- lv_area_t ver_area; /*Vertical scrollbar area relative to the page (Handled by the library)*/
- uint8_t hor_draw : 1; /*1: horizontal scrollbar is visible now (Handled by the library)*/
- uint8_t ver_draw : 1; /*1: vertical scrollbar is visible now (Handled by the library)*/
- lv_sb_mode_t mode : 3; /*Scrollbar visibility from 'lv_page_sb_mode_t'*/
- } sb;
-#if LV_USE_ANIMATION
- struct
- {
- lv_anim_value_t state; /*Store the current size of the edge flash effect*/
- const lv_style_t * style; /*Style of edge flash effect (usually homogeneous circle)*/
- uint8_t enabled : 1; /*1: Show a flash animation on the edge*/
- uint8_t top_ip : 1; /*Used internally to show that top most position is reached (flash is In
- Progress)*/
- uint8_t bottom_ip : 1; /*Used internally to show that bottom most position is reached (flash
- is In Progress)*/
- uint8_t right_ip : 1; /*Used internally to show that right most position is reached (flash
- is In Progress)*/
- uint8_t left_ip : 1; /*Used internally to show that left most position is reached (flash is
- In Progress)*/
- } edge_flash;
-
- uint16_t anim_time; /*Scroll animation time*/
-#endif
-
- uint8_t scroll_prop : 1; /*1: Propagate the scrolling the the parent if the edge is reached*/
- uint8_t scroll_prop_ip : 1; /*1: Scroll propagation is in progress (used by the library)*/
-} lv_page_ext_t;
-
-enum {
- LV_PAGE_STYLE_BG,
- LV_PAGE_STYLE_SCRL,
- LV_PAGE_STYLE_SB,
- LV_PAGE_STYLE_EDGE_FLASH,
-};
-typedef uint8_t lv_page_style_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Create a page objects
- * @param par pointer to an object, it will be the parent of the new page
- * @param copy pointer to a page object, if not NULL then the new object will be copied from it
- * @return pointer to the created page
- */
-lv_obj_t * lv_page_create(lv_obj_t * par, const lv_obj_t * copy);
-
-/**
- * Delete all children of the scrl object, without deleting scrl child.
- * @param page pointer to an object
- */
-void lv_page_clean(lv_obj_t * page);
-
-/**
- * Get the scrollable object of a page
- * @param page pointer to a page object
- * @return pointer to a container which is the scrollable part of the page
- */
-lv_obj_t * lv_page_get_scrl(const lv_obj_t * page);
-
-/**
- * Get the animation time
- * @param page pointer to a page object
- * @return the animation time in milliseconds
- */
-uint16_t lv_page_get_anim_time(const lv_obj_t * page);
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set the scroll bar mode on a page
- * @param page pointer to a page object
- * @param sb_mode the new mode from 'lv_page_sb.mode_t' enum
- */
-void lv_page_set_sb_mode(lv_obj_t * page, lv_sb_mode_t sb_mode);
-
-/**
- * Set the animation time for the page
- * @param page pointer to a page object
- * @param anim_time animation time in milliseconds
- */
-void lv_page_set_anim_time(lv_obj_t * page, uint16_t anim_time);
-
-/**
- * Enable the scroll propagation feature. If enabled then the page will move its parent if there is
- * no more space to scroll.
- * @param page pointer to a Page
- * @param en true or false to enable/disable scroll propagation
- */
-void lv_page_set_scroll_propagation(lv_obj_t * page, bool en);
-
-/**
- * Enable the edge flash effect. (Show an arc when the an edge is reached)
- * @param page pointer to a Page
- * @param en true or false to enable/disable end flash
- */
-void lv_page_set_edge_flash(lv_obj_t * page, bool en);
-
-/**
- * Set the fit policy in all 4 directions separately.
- * It tell how to change the page size automatically.
- * @param page pointer to a page object
- * @param left left fit policy from `lv_fit_t`
- * @param right right fit policy from `lv_fit_t`
- * @param top bottom fit policy from `lv_fit_t`
- * @param bottom bottom fit policy from `lv_fit_t`
- */
-static inline void lv_page_set_scrl_fit4(lv_obj_t * page, lv_fit_t left, lv_fit_t right, lv_fit_t top, lv_fit_t bottom)
-{
- lv_cont_set_fit4(lv_page_get_scrl(page), left, right, top, bottom);
-}
-
-/**
- * Set the fit policy horizontally and vertically separately.
- * It tell how to change the page size automatically.
- * @param page pointer to a page object
- * @param hot horizontal fit policy from `lv_fit_t`
- * @param ver vertical fit policy from `lv_fit_t`
- */
-static inline void lv_page_set_scrl_fit2(lv_obj_t * page, lv_fit_t hor, lv_fit_t ver)
-{
- lv_cont_set_fit2(lv_page_get_scrl(page), hor, ver);
-}
-
-/**
- * Set the fit policyin all 4 direction at once.
- * It tell how to change the page size automatically.
- * @param page pointer to a button object
- * @param fit fit policy from `lv_fit_t`
- */
-static inline void lv_page_set_scrl_fit(lv_obj_t * page, lv_fit_t fit)
-{
- lv_cont_set_fit(lv_page_get_scrl(page), fit);
-}
-
-/**
- * Set width of the scrollable part of a page
- * @param page pointer to a page object
- * @param w the new width of the scrollable (it ha no effect is horizontal fit is enabled)
- */
-static inline void lv_page_set_scrl_width(lv_obj_t * page, lv_coord_t w)
-{
- lv_obj_set_width(lv_page_get_scrl(page), w);
-}
-
-/**
- * Set height of the scrollable part of a page
- * @param page pointer to a page object
- * @param h the new height of the scrollable (it ha no effect is vertical fit is enabled)
- */
-static inline void lv_page_set_scrl_height(lv_obj_t * page, lv_coord_t h)
-{
- lv_obj_set_height(lv_page_get_scrl(page), h);
-}
-
-/**
- * Set the layout of the scrollable part of the page
- * @param page pointer to a page object
- * @param layout a layout from 'lv_cont_layout_t'
- */
-static inline void lv_page_set_scrl_layout(lv_obj_t * page, lv_layout_t layout)
-{
- lv_cont_set_layout(lv_page_get_scrl(page), layout);
-}
-
-/**
- * Set a style of a page
- * @param page pointer to a page object
- * @param type which style should be set
- * @param style pointer to a style
- */
-void lv_page_set_style(lv_obj_t * page, lv_page_style_t type, const lv_style_t * style);
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Set the scroll bar mode on a page
- * @param page pointer to a page object
- * @return the mode from 'lv_page_sb.mode_t' enum
- */
-lv_sb_mode_t lv_page_get_sb_mode(const lv_obj_t * page);
-
-/**
- * Get the scroll propagation property
- * @param page pointer to a Page
- * @return true or false
- */
-bool lv_page_get_scroll_propagation(lv_obj_t * page);
-
-/**
- * Get the edge flash effect property.
- * @param page pointer to a Page
- * return true or false
- */
-bool lv_page_get_edge_flash(lv_obj_t * page);
-
-/**
- * Get that width which can be set to the children to still not cause overflow (show scrollbars)
- * @param page pointer to a page object
- * @return the width which still fits into the page
- */
-lv_coord_t lv_page_get_fit_width(lv_obj_t * page);
-
-/**
- * Get that height which can be set to the children to still not cause overflow (show scrollbars)
- * @param page pointer to a page object
- * @return the height which still fits into the page
- */
-lv_coord_t lv_page_get_fit_height(lv_obj_t * page);
-
-/**
- * Get width of the scrollable part of a page
- * @param page pointer to a page object
- * @return the width of the scrollable
- */
-static inline lv_coord_t lv_page_get_scrl_width(const lv_obj_t * page)
-{
- return lv_obj_get_width(lv_page_get_scrl(page));
-}
-
-/**
- * Get height of the scrollable part of a page
- * @param page pointer to a page object
- * @return the height of the scrollable
- */
-static inline lv_coord_t lv_page_get_scrl_height(const lv_obj_t * page)
-{
- return lv_obj_get_height(lv_page_get_scrl(page));
-}
-
-/**
- * Get the layout of the scrollable part of a page
- * @param page pointer to page object
- * @return the layout from 'lv_cont_layout_t'
- */
-static inline lv_layout_t lv_page_get_scrl_layout(const lv_obj_t * page)
-{
- return lv_cont_get_layout(lv_page_get_scrl(page));
-}
-
-/**
- * Get the left fit mode
- * @param page pointer to a page object
- * @return an element of `lv_fit_t`
- */
-static inline lv_fit_t lv_page_get_scrl_fit_left(const lv_obj_t * page)
-{
- return lv_cont_get_fit_left(lv_page_get_scrl(page));
-}
-
-/**
- * Get the right fit mode
- * @param page pointer to a page object
- * @return an element of `lv_fit_t`
- */
-static inline lv_fit_t lv_page_get_scrl_fit_right(const lv_obj_t * page)
-{
- return lv_cont_get_fit_right(lv_page_get_scrl(page));
-}
-
-/**
- * Get the top fit mode
- * @param page pointer to a page object
- * @return an element of `lv_fit_t`
- */
-static inline lv_fit_t lv_page_get_scrl_fit_top(const lv_obj_t * page)
-{
- return lv_cont_get_fit_top(lv_page_get_scrl(page));
-}
-
-/**
- * Get the bottom fit mode
- * @param page pointer to a page object
- * @return an element of `lv_fit_t`
- */
-static inline lv_fit_t lv_page_get_scrl_fit_bottom(const lv_obj_t * page)
-{
- return lv_cont_get_fit_bottom(lv_page_get_scrl(page));
-}
-
-/**
- * Get a style of a page
- * @param page pointer to page object
- * @param type which style should be get
- * @return style pointer to a style
- */
-const lv_style_t * lv_page_get_style(const lv_obj_t * page, lv_page_style_t type);
-
-/*=====================
- * Other functions
- *====================*/
-
-/**
- * Find whether the page has been scrolled to a certain edge.
- * @param page Page object
- * @param edge Edge to check
- * @return true if the page is on the specified edge
- */
-bool lv_page_on_edge(lv_obj_t * page, lv_page_edge_t edge);
-
-/**
- * Glue the object to the page. After it the page can be moved (dragged) with this object too.
- * @param obj pointer to an object on a page
- * @param glue true: enable glue, false: disable glue
- */
-void lv_page_glue_obj(lv_obj_t * obj, bool glue);
-
-/**
- * Focus on an object. It ensures that the object will be visible on the page.
- * @param page pointer to a page object
- * @param obj pointer to an object to focus (must be on the page)
- * @param anim_en LV_ANIM_ON to focus with animation; LV_ANIM_OFF to focus without animation
- */
-void lv_page_focus(lv_obj_t * page, const lv_obj_t * obj, lv_anim_enable_t anim_en);
-
-/**
- * Scroll the page horizontally
- * @param page pointer to a page object
- * @param dist the distance to scroll (< 0: scroll left; > 0 scroll right)
- */
-void lv_page_scroll_hor(lv_obj_t * page, lv_coord_t dist);
-
-/**
- * Scroll the page vertically
- * @param page pointer to a page object
- * @param dist the distance to scroll (< 0: scroll down; > 0 scroll up)
- */
-void lv_page_scroll_ver(lv_obj_t * page, lv_coord_t dist);
-
-/**
- * Not intended to use directly by the user but by other object types internally.
- * Start an edge flash animation. Exactly one `ext->edge_flash.xxx_ip` should be set
- * @param page
- */
-void lv_page_start_edge_flash(lv_obj_t * page);
-/**********************
- * MACROS
- **********************/
-
-#endif /*LV_USE_PAGE*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_PAGE_H*/
diff --git a/src/libs/lvgl/src/lv_objx/lv_preload.c b/src/libs/lvgl/src/lv_objx/lv_preload.c
deleted file mode 100644
index 2de9ebb1..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_preload.c
+++ /dev/null
@@ -1,444 +0,0 @@
-/**
- * @file lv_preload.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_preload.h"
-#if LV_USE_PRELOAD != 0
-
-#include "../lv_core/lv_debug.h"
-#include "../lv_misc/lv_math.h"
-#include "../lv_draw/lv_draw_rect.h"
-#include "../lv_draw/lv_draw_arc.h"
-#include "../lv_themes/lv_theme.h"
-
-/*********************
- * DEFINES
- *********************/
-#define LV_OBJX_NAME "lv_preloader"
-
-#ifndef LV_PRELOAD_DEF_ARC_LENGTH
-#define LV_PRELOAD_DEF_ARC_LENGTH 60 /*[deg]*/
-#endif
-
-#ifndef LV_PRELOAD_DEF_SPIN_TIME
-#define LV_PRELOAD_DEF_SPIN_TIME 1000 /*[ms]*/
-#endif
-
-#ifndef LV_PRELOAD_DEF_ANIM
-#define LV_PRELOAD_DEF_ANIM LV_PRELOAD_TYPE_SPINNING_ARC /*animation type*/
-#endif
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static bool lv_preload_design(lv_obj_t * preload, const lv_area_t * mask, lv_design_mode_t mode);
-static lv_res_t lv_preload_signal(lv_obj_t * preload, lv_signal_t sign, void * param);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_signal_cb_t ancestor_signal;
-static lv_design_cb_t ancestor_design;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Create a pre loader object
- * @param par pointer to an object, it will be the parent of the new pre loader
- * @param copy pointer to a pre loader object, if not NULL then the new object will be copied from
- * it
- * @return pointer to the created pre loader
- */
-lv_obj_t * lv_preload_create(lv_obj_t * par, const lv_obj_t * copy)
-{
- LV_LOG_TRACE("preload create started");
-
- /*Create the ancestor of pre loader*/
- lv_obj_t * new_preload = lv_arc_create(par, copy);
- LV_ASSERT_MEM(new_preload);
- if(new_preload == NULL) return NULL;
-
- /*Allocate the pre loader type specific extended data*/
- lv_preload_ext_t * ext = lv_obj_allocate_ext_attr(new_preload, sizeof(lv_preload_ext_t));
- LV_ASSERT_MEM(ext);
- if(ext == NULL) return NULL;
-
- if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_preload);
- if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_cb(new_preload);
-
- /*Initialize the allocated 'ext' */
- ext->arc_length = LV_PRELOAD_DEF_ARC_LENGTH;
- ext->anim_type = LV_PRELOAD_DEF_ANIM;
- ext->anim_dir = LV_PRELOAD_DIR_FORWARD;
-
- /*The signal and design functions are not copied so set them here*/
- lv_obj_set_signal_cb(new_preload, lv_preload_signal);
- lv_obj_set_design_cb(new_preload, lv_preload_design);
-
- /*Init the new pre loader pre loader*/
- if(copy == NULL) {
- lv_obj_set_size(new_preload, LV_DPI / 2, LV_DPI / 2);
-
- /*Set the default styles*/
- lv_theme_t * th = lv_theme_get_current();
- if(th) {
- lv_preload_set_style(new_preload, LV_PRELOAD_STYLE_MAIN, th->style.preload);
- } else {
- lv_obj_set_style(new_preload, &lv_style_pretty_color);
- }
-
- ext->time = LV_PRELOAD_DEF_SPIN_TIME;
-
- }
- /*Copy an existing pre loader*/
- else {
- lv_preload_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
- ext->arc_length = copy_ext->arc_length;
- ext->time = copy_ext->time;
- ext->anim_dir = copy_ext->anim_dir;
- /*Refresh the style with new signal function*/
- lv_obj_refresh_style(new_preload);
- }
-
- lv_preload_set_type(new_preload, ext->anim_type);
-
- LV_LOG_INFO("preload created");
-
- return new_preload;
-}
-
-/*======================
- * Add/remove functions
- *=====================*/
-
-/**
- * Set the length of the spinning arc in degrees
- * @param preload pointer to a preload object
- * @param deg length of the arc
- */
-void lv_preload_set_arc_length(lv_obj_t * preload, lv_anim_value_t deg)
-{
- LV_ASSERT_OBJ(preload, LV_OBJX_NAME);
-
- lv_preload_ext_t * ext = lv_obj_get_ext_attr(preload);
-
- ext->arc_length = deg;
-}
-
-/**
- * Set the spin time of the arc
- * @param preload pointer to a preload object
- * @param time time of one round in milliseconds
- */
-void lv_preload_set_spin_time(lv_obj_t * preload, uint16_t time)
-{
- LV_ASSERT_OBJ(preload, LV_OBJX_NAME);
-
- lv_preload_ext_t * ext = lv_obj_get_ext_attr(preload);
-
- ext->time = time;
- lv_preload_set_type(preload, ext->anim_type);
-}
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set a style of a pre loader.
- * @param preload pointer to pre loader object
- * @param type which style should be set
- * @param style pointer to a style
- * */
-void lv_preload_set_style(lv_obj_t * preload, lv_preload_style_t type, const lv_style_t * style)
-{
- LV_ASSERT_OBJ(preload, LV_OBJX_NAME);
-
- switch(type) {
- case LV_PRELOAD_STYLE_MAIN: lv_arc_set_style(preload, LV_ARC_STYLE_MAIN, style); break;
- }
-}
-
-/**
- * Set the animation type of a preloadeer.
- * @param preload pointer to pre loader object
- * @param type animation type of the preload
- * */
-void lv_preload_set_type(lv_obj_t * preload, lv_preload_type_t type)
-{
- LV_ASSERT_OBJ(preload, LV_OBJX_NAME);
-
- lv_preload_ext_t * ext = lv_obj_get_ext_attr(preload);
-
- /*delete previous animation*/
- lv_anim_del(preload, NULL);
- switch(type) {
- case LV_PRELOAD_TYPE_FILLSPIN_ARC: {
- ext->anim_type = LV_PRELOAD_TYPE_FILLSPIN_ARC;
- lv_anim_t a;
- a.var = preload;
- if(ext->anim_dir == LV_PRELOAD_DIR_FORWARD) {
- /* Clockwise */
- a.start = 360;
- a.end = 0;
- } else {
- a.start = 0;
- a.end = 360;
- }
- a.exec_cb = (lv_anim_exec_xcb_t)lv_preload_spinner_anim;
- a.path_cb = lv_anim_path_ease_in_out;
- a.ready_cb = NULL;
- a.act_time = 0;
- a.time = ext->time;
- a.playback = 0;
- a.playback_pause = 0;
- a.repeat = 1;
- a.repeat_pause = 0;
- lv_anim_create(&a);
-
- lv_anim_t b;
- b.var = preload;
- if(ext->anim_dir == LV_PRELOAD_DIR_FORWARD) {
- /* Clockwise */
- b.start = 360 - ext->arc_length;
- b.end = ext->arc_length;
- } else {
- b.start = ext->arc_length;
- b.end = 360 - ext->arc_length;
- }
- b.exec_cb = (lv_anim_exec_xcb_t)lv_preload_set_arc_length;
- b.path_cb = lv_anim_path_ease_in_out;
- b.ready_cb = NULL;
- b.act_time = 0;
- b.time = ext->time;
- b.playback = 1;
- b.playback_pause = 0;
- b.repeat = 1;
- b.repeat_pause = 0;
- lv_anim_create(&b);
- break;
- }
- case LV_PRELOAD_TYPE_CONSTANT_ARC:
- case LV_PRELOAD_TYPE_SPINNING_ARC:
- default: {
- ext->anim_type = type;
- lv_anim_t a;
- a.var = preload;
- if(ext->anim_dir == LV_PRELOAD_DIR_FORWARD) {
- /* Clockwise */
- a.start = 360;
- a.end = 0;
- } else {
- a.start = 0;
- a.end = 360;
- }
- a.exec_cb = (lv_anim_exec_xcb_t)lv_preload_spinner_anim;
- a.path_cb = (LV_PRELOAD_TYPE_CONSTANT_ARC == type ?
- lv_anim_path_linear : lv_anim_path_ease_in_out);
- a.ready_cb = NULL;
- a.act_time = 0;
- a.time = ext->time;
- a.playback = 0;
- a.playback_pause = 0;
- a.repeat = 1;
- a.repeat_pause = 0;
- lv_anim_create(&a);
- break;
- }
- }
-}
-
-void lv_preload_set_dir(lv_obj_t * preload, lv_preload_dir_t dir)
-{
- LV_ASSERT_OBJ(preload, LV_OBJX_NAME);
-
- lv_preload_ext_t * ext = lv_obj_get_ext_attr(preload);
-
- ext->anim_dir = dir;
- lv_preload_set_type(preload, ext->anim_type);
-}
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the arc length [degree] of the a pre loader
- * @param preload pointer to a pre loader object
- */
-lv_anim_value_t lv_preload_get_arc_length(const lv_obj_t * preload)
-{
- LV_ASSERT_OBJ(preload, LV_OBJX_NAME);
-
- lv_preload_ext_t * ext = lv_obj_get_ext_attr(preload);
- return ext->arc_length;
-}
-
-/**
- * Get the spin time of the arc
- * @param preload pointer to a pre loader object [milliseconds]
- */
-uint16_t lv_preload_get_spin_time(const lv_obj_t * preload)
-{
- LV_ASSERT_OBJ(preload, LV_OBJX_NAME);
-
- lv_preload_ext_t * ext = lv_obj_get_ext_attr(preload);
- return ext->time;
-}
-
-/**
- * Get style of a pre loader.
- * @param preload pointer to pre loader object
- * @param type which style should be get
- * @return style pointer to the style
- * */
-const lv_style_t * lv_preload_get_style(const lv_obj_t * preload, lv_preload_style_t type)
-{
- LV_ASSERT_OBJ(preload, LV_OBJX_NAME);
-
- const lv_style_t * style = NULL;
-
- switch(type) {
- case LV_PRELOAD_STYLE_MAIN: style = lv_arc_get_style(preload, LV_ARC_STYLE_MAIN); break;
- default: style = NULL; break;
- }
-
- return style;
-}
-
-/**
- * Get the animation type of a preloadeer.
- * @param preload pointer to pre loader object
- * @return animation type
- * */
-lv_preload_type_t lv_preload_get_type(lv_obj_t * preload)
-{
- LV_ASSERT_OBJ(preload, LV_OBJX_NAME);
-
- lv_preload_ext_t * ext = lv_obj_get_ext_attr(preload);
- return ext->anim_type;
-}
-
-lv_preload_dir_t lv_preload_get_dir(lv_obj_t * preload)
-{
- lv_preload_ext_t * ext = lv_obj_get_ext_attr(preload);
- return ext->anim_dir;
-}
-
-/*=====================
- * Other functions
- *====================*/
-
-/**
- * Animator function (exec_cb) to rotate the arc of spinner.
- * @param ptr pointer to preloader
- * @param val the current desired value [0..360]
- */
-void lv_preload_spinner_anim(void * ptr, lv_anim_value_t val)
-{
- lv_obj_t * preload = ptr;
- lv_preload_ext_t * ext = lv_obj_get_ext_attr(preload);
-
- int16_t angle_start = val - ext->arc_length / 2 + 180;
- int16_t angle_end = angle_start + ext->arc_length;
-
- angle_start = angle_start % 360;
- angle_end = angle_end % 360;
-
- lv_arc_set_angles(preload, angle_start, angle_end);
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Handle the drawing related tasks of the pre loaders
- * @param preload pointer to an object
- * @param mask the object will be drawn only in this area
- * @param mode LV_DESIGN_COVER_CHK: only check if the object fully covers the 'mask_p' area
- * (return 'true' if yes)
- * LV_DESIGN_DRAW: draw the object (always return 'true')
- * LV_DESIGN_DRAW_POST: drawing after every children are drawn
- * @param return true/false, depends on 'mode'
- */
-static bool lv_preload_design(lv_obj_t * preload, const lv_area_t * mask, lv_design_mode_t mode)
-{
- /*Return false if the object is not covers the mask_p area*/
- if(mode == LV_DESIGN_COVER_CHK) {
- return false;
- }
- /*Draw the object*/
- else if(mode == LV_DESIGN_DRAW_MAIN) {
-
- /*Draw a circle as background*/
- const lv_style_t * style = lv_arc_get_style(preload, LV_ARC_STYLE_MAIN);
- if(style->body.border.width > 0) {
- lv_coord_t r = (LV_MATH_MIN(lv_obj_get_width(preload), lv_obj_get_height(preload))) / 2;
- r -= LV_MATH_MIN(style->body.padding.left, style->body.padding.top);
-
- lv_coord_t x = preload->coords.x1 + lv_obj_get_width(preload) / 2;
- lv_coord_t y = preload->coords.y1 + lv_obj_get_height(preload) / 2;
-
- lv_style_t bg_style;
- lv_style_copy(&bg_style, &lv_style_plain);
- bg_style.body.opa = LV_OPA_TRANSP;
- bg_style.body.radius = LV_RADIUS_CIRCLE;
- bg_style.body.border.color = style->body.border.color;
- bg_style.body.border.width = style->body.border.width;
-
- lv_area_t bg_area;
- bg_area.x1 = x - r;
- bg_area.y1 = y - r;
- bg_area.x2 = x + r;
- bg_area.y2 = y + r;
-
- lv_draw_rect(&bg_area, mask, &bg_style, lv_obj_get_opa_scale(preload));
- }
- /*Draw the arc above the background circle */
- ancestor_design(preload, mask, mode);
- }
- /*Post draw when the children are drawn*/
- else if(mode == LV_DESIGN_DRAW_POST) {
- }
-
- return true;
-}
-
-/**
- * Signal function of the pre loader
- * @param preload pointer to a pre loader object
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_preload_signal(lv_obj_t * preload, lv_signal_t sign, void * param)
-{
- lv_res_t res;
-
- /* Include the ancient signal function */
- res = ancestor_signal(preload, sign, param);
- if(res != LV_RES_OK) return res;
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);
-
- if(sign == LV_SIGNAL_CLEANUP) {
- /*Nothing to cleanup. (No dynamically allocated memory in 'ext')*/
- }
-
- return res;
-}
-
-#endif
diff --git a/src/libs/lvgl/src/lv_objx/lv_preload.h b/src/libs/lvgl/src/lv_objx/lv_preload.h
deleted file mode 100644
index 22b87f32..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_preload.h
+++ /dev/null
@@ -1,197 +0,0 @@
-/**
- * @file lv_preload.h
- *
- */
-
-#ifndef LV_PRELOAD_H
-#define LV_PRELOAD_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_PRELOAD != 0
-
-/*Testing of dependencies*/
-#if LV_USE_ARC == 0
-#error "lv_preload: lv_arc is required. Enable it in lv_conf.h (LV_USE_ARC 1) "
-#endif
-
-#if LV_USE_ANIMATION == 0
-#error "lv_preload: animations are required. Enable it in lv_conf.h (LV_USE_ANIMATION 1) "
-#endif
-
-#include "../lv_core/lv_obj.h"
-#include "../lv_misc/lv_anim.h"
-#include "lv_arc.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**
- * Type of preloader.
- */
-enum {
- LV_PRELOAD_TYPE_SPINNING_ARC,
- LV_PRELOAD_TYPE_FILLSPIN_ARC,
- LV_PRELOAD_TYPE_CONSTANT_ARC,
-};
-typedef uint8_t lv_preload_type_t;
-
-/**
- * Direction the preloader should spin.
- */
-enum {
- LV_PRELOAD_DIR_FORWARD,
- LV_PRELOAD_DIR_BACKWARD,
-};
-typedef uint8_t lv_preload_dir_t;
-
-/*Data of pre loader*/
-typedef struct
-{
- lv_arc_ext_t arc; /*Ext. of ancestor*/
- /*New data for this type */
- lv_anim_value_t arc_length; /*Length of the spinning indicator in degree*/
- uint16_t time; /*Time of one round*/
- lv_preload_type_t anim_type : 2; /*Type of the arc animation*/
- lv_preload_dir_t anim_dir : 1; /*Animation Direction*/
-} lv_preload_ext_t;
-
-/*Styles*/
-enum {
- LV_PRELOAD_STYLE_MAIN,
-};
-typedef uint8_t lv_preload_style_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Create a pre loader objects
- * @param par pointer to an object, it will be the parent of the new pre loader
- * @param copy pointer to a pre loader object, if not NULL then the new object will be copied from
- * it
- * @return pointer to the created pre loader
- */
-lv_obj_t * lv_preload_create(lv_obj_t * par, const lv_obj_t * copy);
-
-/*======================
- * Add/remove functions
- *=====================*/
-
-/**
- * Set the length of the spinning arc in degrees
- * @param preload pointer to a preload object
- * @param deg length of the arc
- */
-void lv_preload_set_arc_length(lv_obj_t * preload, lv_anim_value_t deg);
-
-/**
- * Set the spin time of the arc
- * @param preload pointer to a preload object
- * @param time time of one round in milliseconds
- */
-void lv_preload_set_spin_time(lv_obj_t * preload, uint16_t time);
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set a style of a pre loader.
- * @param preload pointer to pre loader object
- * @param type which style should be set
- * @param style pointer to a style
- * */
-void lv_preload_set_style(lv_obj_t * preload, lv_preload_style_t type, const lv_style_t * style);
-
-/**
- * Set the animation type of a preloader.
- * @param preload pointer to pre loader object
- * @param type animation type of the preload
- * */
-void lv_preload_set_type(lv_obj_t * preload, lv_preload_type_t type);
-
-/**
- * Set the animation direction of a preloader
- * @param preload pointer to pre loader object
- * @param direction animation direction of the preload
- */
-void lv_preload_set_dir(lv_obj_t * preload, lv_preload_dir_t dir);
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the arc length [degree] of the a pre loader
- * @param preload pointer to a pre loader object
- */
-lv_anim_value_t lv_preload_get_arc_length(const lv_obj_t * preload);
-
-/**
- * Get the spin time of the arc
- * @param preload pointer to a pre loader object [milliseconds]
- */
-uint16_t lv_preload_get_spin_time(const lv_obj_t * preload);
-
-/**
- * Get style of a pre loader.
- * @param preload pointer to pre loader object
- * @param type which style should be get
- * @return style pointer to the style
- * */
-const lv_style_t * lv_preload_get_style(const lv_obj_t * preload, lv_preload_style_t type);
-
-/**
- * Get the animation type of a preloader.
- * @param preload pointer to pre loader object
- * @return animation type
- * */
-lv_preload_type_t lv_preload_get_type(lv_obj_t * preload);
-
-/**
- * Get the animation direction of a preloader
- * @param preload pointer to pre loader object
- * @return animation direction
- */
-lv_preload_dir_t lv_preload_get_dir(lv_obj_t * preload);
-
-/*=====================
- * Other functions
- *====================*/
-
-/**
- * Animator function (exec_cb) to rotate the arc of spinner.
- * @param ptr pointer to preloader
- * @param val the current desired value [0..360]
- */
-void lv_preload_spinner_anim(void * ptr, lv_anim_value_t val);
-
-/**********************
- * MACROS
- **********************/
-
-#endif /*LV_USE_PRELOAD*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_PRELOAD_H*/
diff --git a/src/libs/lvgl/src/lv_objx/lv_roller.c b/src/libs/lvgl/src/lv_objx/lv_roller.c
deleted file mode 100644
index 4d21bbad..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_roller.c
+++ /dev/null
@@ -1,733 +0,0 @@
-/**
- * @file lv_roller.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_roller.h"
-#if LV_USE_ROLLER != 0
-
-#include "../lv_core/lv_debug.h"
-#include "../lv_draw/lv_draw.h"
-#include "../lv_core/lv_group.h"
-#include "../lv_themes/lv_theme.h"
-
-/*********************
- * DEFINES
- *********************/
-#define LV_OBJX_NAME "lv_roller"
-
-#if LV_USE_ANIMATION == 0
-#undef LV_ROLLER_DEF_ANIM_TIME
-#define LV_ROLLER_DEF_ANIM_TIME 0 /*No animation*/
-#endif
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static bool lv_roller_design(lv_obj_t * roller, const lv_area_t * mask, lv_design_mode_t mode);
-static lv_res_t lv_roller_scrl_signal(lv_obj_t * roller_scrl, lv_signal_t sign, void * param);
-static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * param);
-static void refr_position(lv_obj_t * roller, lv_anim_enable_t animen);
-static void refr_height(lv_obj_t * roller);
-static void inf_normalize(void * roller_scrl);
-#if LV_USE_ANIMATION
-static void scroll_anim_ready_cb(lv_anim_t * a);
-#endif
-static void draw_bg(lv_obj_t * roller, const lv_area_t * mask);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_signal_cb_t ancestor_signal;
-static lv_signal_cb_t ancestor_scrl_signal;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Create a roller object
- * @param par pointer to an object, it will be the parent of the new roller
- * @param copy pointer to a roller object, if not NULL then the new object will be copied from it
- * @return pointer to the created roller
- */
-lv_obj_t * lv_roller_create(lv_obj_t * par, const lv_obj_t * copy)
-{
- LV_LOG_TRACE("roller create started");
-
- /*Create the ancestor of roller*/
- lv_obj_t * new_roller = lv_ddlist_create(par, copy);
- LV_ASSERT_MEM(new_roller);
- if(new_roller == NULL) return NULL;
-
- if(ancestor_scrl_signal == NULL) ancestor_scrl_signal = lv_obj_get_signal_cb(lv_page_get_scrl(new_roller));
- if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_roller);
-
- /*Allocate the roller type specific extended data*/
- lv_roller_ext_t * ext = lv_obj_allocate_ext_attr(new_roller, sizeof(lv_roller_ext_t));
- LV_ASSERT_MEM(ext);
- if(ext == NULL) return NULL;
- ext->ddlist.draw_arrow = 0; /*Do not draw arrow by default*/
- ext->mode = LV_ROLLER_MODE_NORMAL;
-
- /*The signal and design functions are not copied so set them here*/
- lv_obj_set_signal_cb(new_roller, lv_roller_signal);
- lv_obj_set_design_cb(new_roller, lv_roller_design);
-
- /*Init the new roller roller*/
- if(copy == NULL) {
- lv_obj_t * scrl = lv_page_get_scrl(new_roller);
- lv_obj_set_drag(scrl, true); /*In ddlist it might be disabled*/
- lv_page_set_scrl_fit2(new_roller, LV_FIT_TIGHT, LV_FIT_NONE); /*Height is specified directly*/
- lv_ddlist_open(new_roller, false);
- lv_ddlist_set_anim_time(new_roller, LV_ROLLER_DEF_ANIM_TIME);
- lv_ddlist_set_stay_open(new_roller, true);
- lv_roller_set_visible_row_count(new_roller, 3);
- lv_label_set_align(ext->ddlist.label, LV_LABEL_ALIGN_CENTER);
-
- lv_obj_set_signal_cb(scrl, lv_roller_scrl_signal);
-
- /*Set the default styles*/
- lv_theme_t * th = lv_theme_get_current();
- if(th) {
- lv_roller_set_style(new_roller, LV_ROLLER_STYLE_BG, th->style.roller.bg);
- lv_roller_set_style(new_roller, LV_ROLLER_STYLE_SEL, th->style.roller.sel);
- } else {
- /*Refresh the roller's style*/
- lv_obj_refresh_style(new_roller); /*To set scrollable size automatically*/
- }
- }
- /*Copy an existing roller*/
- else {
- lv_roller_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
- ext->mode = copy_ext->mode;
-
- lv_obj_t * scrl = lv_page_get_scrl(new_roller);
- lv_ddlist_open(new_roller, false);
- lv_obj_set_signal_cb(scrl, lv_roller_scrl_signal);
-
- /*Refresh the roller's style*/
- lv_obj_refresh_style(new_roller); /*Refresh the style with new signal function*/
- }
-
- LV_LOG_INFO("roller created");
-
- return new_roller;
-}
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set the options on a roller
- * @param roller pointer to roller object
- * @param options a string with '\n' separated options. E.g. "One\nTwo\nThree"
- * @param mode `LV_ROLLER_MODE_NORMAL` or `LV_ROLLER_MODE_INFINITE`
- */
-void lv_roller_set_options(lv_obj_t * roller, const char * options, lv_roller_mode_t mode)
-{
- LV_ASSERT_OBJ(roller, LV_OBJX_NAME);
- LV_ASSERT_STR(options);
-
- lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller);
-
- if(mode == LV_ROLLER_MODE_NORMAL) {
- ext->mode = LV_ROLLER_MODE_NORMAL;
- lv_ddlist_set_options(roller, options);
-
- /* Make sure the roller's height and the scrollable's height is refreshed.
- * They are refreshed in `LV_SIGNAL_COORD_CHG` but if the new options has the same width
- * that signal won't be called. (It's called because of LV_FIT_TIGHT hor fit)*/
- refr_height(roller);
- refr_position(roller, LV_ANIM_OFF);
- } else {
- ext->mode = LV_ROLLER_MODE_INIFINITE;
-
- size_t opt_len = strlen(options) + 1; /*+1 to add '\n' after option lists*/
- char * opt_extra = lv_mem_alloc(opt_len * LV_ROLLER_INF_PAGES);
- uint8_t i;
- for(i = 0; i < LV_ROLLER_INF_PAGES; i++) {
- strcpy(&opt_extra[opt_len * i], options);
- opt_extra[opt_len * (i + 1) - 1] = '\n';
- }
- opt_extra[opt_len * LV_ROLLER_INF_PAGES - 1] = '\0';
- lv_ddlist_set_options(roller, opt_extra);
- lv_mem_free(opt_extra);
-
- /* Make sure the roller's height and the scrollable's height is refreshed.
- * They are refreshed in `LV_SIGNAL_COORD_CHG` but if the new options has the same width
- * that signal won't be called. (It called because LV_FIT_TIGHT hor fit)*/
- refr_height(roller);
-
- uint16_t real_id_cnt = ext->ddlist.option_cnt / LV_ROLLER_INF_PAGES;
- lv_roller_set_selected(roller, ((LV_ROLLER_INF_PAGES / 2) + 1) * real_id_cnt, false); /*Select the middle page*/
- }
-}
-
-/**
- * Set the align of the roller's options (left or center)
- * @param roller - pointer to a roller object
- * @param align - one of lv_label_align_t values (left, right, center)
- */
-void lv_roller_set_align(lv_obj_t * roller, lv_label_align_t align)
-{
- LV_ASSERT_OBJ(roller, LV_OBJX_NAME);
-
- lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller);
-
- lv_obj_t * label = ext->ddlist.label;
-
- if(label == NULL) return; /*Probably the roller is being deleted if the label is NULL.*/
- lv_label_set_align(label, align);
-
- switch(lv_label_get_align(label)) {
- case LV_LABEL_ALIGN_LEFT: lv_obj_align(label, NULL, LV_ALIGN_IN_LEFT_MID, 0, 0); break;
- case LV_LABEL_ALIGN_CENTER: lv_obj_align(label, NULL, LV_ALIGN_CENTER, 0, 0); break;
- case LV_LABEL_ALIGN_RIGHT: lv_obj_align(label, NULL, LV_ALIGN_IN_RIGHT_MID, 0, 0); break;
- }
-}
-
-/**
- * Set the selected option
- * @param roller pointer to a roller object
- * @param sel_opt id of the selected option (0 ... number of option - 1);
- * @param anim_en LV_ANIM_ON: set with animation; LV_ANOM_OFF set immediately
- */
-void lv_roller_set_selected(lv_obj_t * roller, uint16_t sel_opt, lv_anim_enable_t anim)
-{
- LV_ASSERT_OBJ(roller, LV_OBJX_NAME);
-
-#if LV_USE_ANIMATION == 0
- anim = LV_ANIM_OFF;
-#endif
-
- if(lv_roller_get_selected(roller) == sel_opt) return;
-
- lv_ddlist_set_selected(roller, sel_opt);
- refr_position(roller, anim);
-}
-
-/**
- * Set the height to show the given number of rows (options)
- * @param roller pointer to a roller object
- * @param row_cnt number of desired visible rows
- */
-void lv_roller_set_visible_row_count(lv_obj_t * roller, uint8_t row_cnt)
-{
- LV_ASSERT_OBJ(roller, LV_OBJX_NAME);
-
- lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller);
- const lv_style_t * style_label = lv_obj_get_style(ext->ddlist.label);
- uint8_t n_line_space = (row_cnt > 1) ? row_cnt - 1 : 1;
- lv_ddlist_set_fix_height(roller, lv_font_get_line_height(style_label->text.font) * row_cnt +
- style_label->text.line_space * n_line_space);
-}
-
-/**
- * Set a style of a roller
- * @param roller pointer to a roller object
- * @param type which style should be set
- * @param style pointer to a style
- */
-void lv_roller_set_style(lv_obj_t * roller, lv_roller_style_t type, const lv_style_t * style)
-{
- LV_ASSERT_OBJ(roller, LV_OBJX_NAME);
-
- switch(type) {
- case LV_ROLLER_STYLE_BG: lv_obj_set_style(roller, style); break;
- case LV_ROLLER_STYLE_SEL: lv_ddlist_set_style(roller, LV_DDLIST_STYLE_SEL, style); break;
- }
-}
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the id of the selected option
- * @param roller pointer to a roller object
- * @return id of the selected option (0 ... number of option - 1);
- */
-uint16_t lv_roller_get_selected(const lv_obj_t * roller)
-{
- LV_ASSERT_OBJ(roller, LV_OBJX_NAME);
-
- lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller);
- if(ext->mode == LV_ROLLER_MODE_INIFINITE) {
- uint16_t real_id_cnt = ext->ddlist.option_cnt / LV_ROLLER_INF_PAGES;
- return lv_ddlist_get_selected(roller) % real_id_cnt;
- } else {
- return lv_ddlist_get_selected(roller);
- }
-}
-
-/**
- * Get the align attribute. Default alignment after _create is LV_LABEL_ALIGN_CENTER
- * @param roller pointer to a roller object
- * @return LV_LABEL_ALIGN_LEFT, LV_LABEL_ALIGN_RIGHT or LV_LABEL_ALIGN_CENTER
- */
-lv_label_align_t lv_roller_get_align(const lv_obj_t * roller)
-{
- LV_ASSERT_OBJ(roller, LV_OBJX_NAME);
-
- lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller);
- LV_ASSERT_MEM(ext);
- LV_ASSERT_MEM(ext->ddlist.label);
- return lv_label_get_align(ext->ddlist.label);
-}
-
-/**
- * Get the auto width set attribute
- * @param roller pointer to a roller object
- * @return true: auto size enabled; false: manual width settings enabled
- */
-bool lv_roller_get_hor_fit(const lv_obj_t * roller)
-{
- LV_ASSERT_OBJ(roller, LV_OBJX_NAME);
-
- return lv_page_get_scrl_fit_left(roller);
-}
-
-/**
- * Get a style of a roller
- * @param roller pointer to a roller object
- * @param type which style should be get
- * @return style pointer to a style
- * */
-const lv_style_t * lv_roller_get_style(const lv_obj_t * roller, lv_roller_style_t type)
-{
- LV_ASSERT_OBJ(roller, LV_OBJX_NAME);
-
- switch(type) {
- case LV_ROLLER_STYLE_BG: return lv_obj_get_style(roller);
- case LV_ROLLER_STYLE_SEL: return lv_ddlist_get_style(roller, LV_DDLIST_STYLE_SEL);
- default: return NULL;
- }
-
- /*To avoid warning*/
- return NULL;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Handle the drawing related tasks of the rollers
- * @param roller pointer to an object
- * @param mask the object will be drawn only in this area
- * @param mode LV_DESIGN_COVER_CHK: only check if the object fully covers the 'mask_p' area
- * (return 'true' if yes)
- * LV_DESIGN_DRAW: draw the object (always return 'true')
- * LV_DESIGN_DRAW_POST: drawing after every children are drawn
- * @param return true/false, depends on 'mode'
- */
-static bool lv_roller_design(lv_obj_t * roller, const lv_area_t * mask, lv_design_mode_t mode)
-{
- /*Return false if the object is not covers the mask_p area*/
- if(mode == LV_DESIGN_COVER_CHK) {
- return false;
- }
- /*Draw the object*/
- else if(mode == LV_DESIGN_DRAW_MAIN) {
- draw_bg(roller, mask);
-
- const lv_style_t * style = lv_roller_get_style(roller, LV_ROLLER_STYLE_BG);
- lv_opa_t opa_scale = lv_obj_get_opa_scale(roller);
- const lv_font_t * font = style->text.font;
- lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller);
- lv_coord_t font_h = lv_font_get_line_height(font);
- lv_area_t rect_area;
- rect_area.y1 = roller->coords.y1 + lv_obj_get_height(roller) / 2 - font_h / 2 - style->text.line_space / 2;
- if((font_h & 0x1) && (style->text.line_space & 0x1)) rect_area.y1--; /*Compensate the two rounding error*/
- rect_area.y2 = rect_area.y1 + font_h + style->text.line_space - 1;
- lv_area_t roller_coords;
- lv_obj_get_coords(roller, &roller_coords);
- lv_obj_get_inner_coords(roller, &roller_coords);
-
- rect_area.x1 = roller_coords.x1;
- rect_area.x2 = roller_coords.x2;
-
- lv_draw_rect(&rect_area, mask, ext->ddlist.sel_style, opa_scale);
- }
- /*Post draw when the children are drawn*/
- else if(mode == LV_DESIGN_DRAW_POST) {
- const lv_style_t * style = lv_roller_get_style(roller, LV_ROLLER_STYLE_BG);
- lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller);
- const lv_font_t * font = style->text.font;
- lv_coord_t font_h = lv_font_get_line_height(font);
- lv_opa_t opa_scale = lv_obj_get_opa_scale(roller);
-
- /*Redraw the text on the selected area with a different color*/
- lv_area_t rect_area;
- rect_area.y1 = roller->coords.y1 + lv_obj_get_height(roller) / 2 - font_h / 2 - style->text.line_space / 2;
- if((font_h & 0x1) && (style->text.line_space & 0x1)) rect_area.y1--; /*Compensate the two rounding error*/
- rect_area.y2 = rect_area.y1 + font_h + style->text.line_space - 1;
- rect_area.x1 = roller->coords.x1;
- rect_area.x2 = roller->coords.x2;
- lv_area_t mask_sel;
- bool area_ok;
- area_ok = lv_area_intersect(&mask_sel, mask, &rect_area);
- if(area_ok) {
- const lv_style_t * sel_style = lv_roller_get_style(roller, LV_ROLLER_STYLE_SEL);
- lv_style_t new_style;
- lv_txt_flag_t txt_align = LV_TXT_FLAG_NONE;
-
- {
- lv_label_align_t label_align = lv_label_get_align(ext->ddlist.label);
-
- if(LV_LABEL_ALIGN_CENTER == label_align) {
- txt_align |= LV_TXT_FLAG_CENTER;
- } else if(LV_LABEL_ALIGN_RIGHT == label_align) {
- txt_align |= LV_TXT_FLAG_RIGHT;
- }
- }
-
- lv_style_copy(&new_style, style);
- new_style.text.color = sel_style->text.color;
- new_style.text.opa = sel_style->text.opa;
- lv_draw_label(&ext->ddlist.label->coords, &mask_sel, &new_style, opa_scale,
- lv_label_get_text(ext->ddlist.label), txt_align, NULL, NULL, NULL, lv_obj_get_base_dir(ext->ddlist.label));
- }
- }
-
- return true;
-}
-
-/**
- * Signal function of the roller
- * @param roller pointer to a roller object
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * param)
-{
- lv_res_t res = LV_RES_OK;
-
- /*Don't let the drop down list to handle the control signals. It works differently*/
- if(sign != LV_SIGNAL_CONTROL && sign != LV_SIGNAL_FOCUS && sign != LV_SIGNAL_DEFOCUS) {
- /* Include the ancient signal function */
- res = ancestor_signal(roller, sign, param);
- if(res != LV_RES_OK) return res;
- }
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);
-
- lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller);
-
- if(sign == LV_SIGNAL_STYLE_CHG) {
- refr_height(roller);
-
- refr_position(roller, false);
- } else if(sign == LV_SIGNAL_CORD_CHG) {
-
- if(lv_obj_get_width(roller) != lv_area_get_width(param) ||
- lv_obj_get_height(roller) != lv_area_get_height(param)) {
-
- refr_height(roller);
-#if LV_USE_ANIMATION
- lv_anim_del(lv_page_get_scrl(roller), (lv_anim_exec_xcb_t)lv_obj_set_y);
-#endif
- lv_ddlist_set_selected(roller, ext->ddlist.sel_opt_id);
- refr_position(roller, false);
- }
- } else if(sign == LV_SIGNAL_FOCUS) {
-#if LV_USE_GROUP
- lv_group_t * g = lv_obj_get_group(roller);
- bool editing = lv_group_get_editing(g);
- lv_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act());
-
- /*Encoders need special handling*/
- if(indev_type == LV_INDEV_TYPE_ENCODER) {
- /*In navigate mode revert the original value*/
- if(!editing) {
- if(ext->ddlist.sel_opt_id != ext->ddlist.sel_opt_id_ori) {
- ext->ddlist.sel_opt_id = ext->ddlist.sel_opt_id_ori;
- refr_position(roller, true);
- }
- }
- /*Save the current state when entered to edit mode*/
- else {
- ext->ddlist.sel_opt_id_ori = ext->ddlist.sel_opt_id;
- }
- } else {
- ext->ddlist.sel_opt_id_ori = ext->ddlist.sel_opt_id; /*Save the current value. Used to revert this state if
- ENER wont't be pressed*/
- }
-#endif
- } else if(sign == LV_SIGNAL_DEFOCUS) {
-#if LV_USE_GROUP
- /*Revert the original state*/
- if(ext->ddlist.sel_opt_id != ext->ddlist.sel_opt_id_ori) {
- ext->ddlist.sel_opt_id = ext->ddlist.sel_opt_id_ori;
- refr_position(roller, true);
- }
-#endif
- } else if(sign == LV_SIGNAL_CONTROL) {
- char c = *((char *)param);
- if(c == LV_KEY_RIGHT || c == LV_KEY_DOWN) {
- if(ext->ddlist.sel_opt_id + 1 < ext->ddlist.option_cnt) {
- uint16_t ori_id = ext->ddlist.sel_opt_id_ori; /*lv_roller_set_selceted will overwrite this*/
- lv_roller_set_selected(roller, ext->ddlist.sel_opt_id + 1, true);
- ext->ddlist.sel_opt_id_ori = ori_id;
- }
- } else if(c == LV_KEY_LEFT || c == LV_KEY_UP) {
- if(ext->ddlist.sel_opt_id > 0) {
- uint16_t ori_id = ext->ddlist.sel_opt_id_ori; /*lv_roller_set_selceted will overwrite this*/
- lv_roller_set_selected(roller, ext->ddlist.sel_opt_id - 1, true);
- ext->ddlist.sel_opt_id_ori = ori_id;
- }
- }
- }
-
- return res;
-}
-
-/**
- * Signal function of the scrollable part of the roller.
- * @param roller_scrl ointer to the scrollable part of roller (page)
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_roller_scrl_signal(lv_obj_t * roller_scrl, lv_signal_t sign, void * param)
-{
- lv_res_t res;
-
- /* Include the ancient signal function */
- res = ancestor_scrl_signal(roller_scrl, sign, param);
- if(res != LV_RES_OK) return res;
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);
-
- lv_indev_t * indev = lv_indev_get_act();
- int32_t id = -1;
- lv_obj_t * roller = lv_obj_get_parent(roller_scrl);
- lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller);
-
- if(ext->ddlist.label == NULL)
- return LV_RES_INV; /*On delete the ddlist signal deletes the label so nothing left to do
- here*/
-
- const lv_style_t * style_label = lv_obj_get_style(ext->ddlist.label);
- const lv_font_t * font = style_label->text.font;
- lv_coord_t font_h = lv_font_get_line_height(font);
-
- if(sign == LV_SIGNAL_DRAG_END) {
- /*If dragged then align the list to have an element in the middle*/
- lv_coord_t label_y1 = ext->ddlist.label->coords.y1 - roller->coords.y1;
- lv_coord_t label_unit = font_h + style_label->text.line_space;
- lv_coord_t mid = (roller->coords.y2 - roller->coords.y1) / 2;
-
- id = (mid - label_y1 + style_label->text.line_space / 2) / label_unit;
-
- if(id < 0) id = 0;
- if(id >= ext->ddlist.option_cnt) id = ext->ddlist.option_cnt - 1;
-
- ext->ddlist.sel_opt_id = id;
- ext->ddlist.sel_opt_id_ori = id;
- res = lv_event_send(roller, LV_EVENT_VALUE_CHANGED, &id);
- if(res != LV_RES_OK) return res;
- }
- /*If picked an option by clicking then set it*/
- else if(sign == LV_SIGNAL_RELEASED) {
- if(!lv_indev_is_dragging(indev)) {
- id = ext->ddlist.sel_opt_id;
-#if LV_USE_GROUP
- /*In edit mode go to navigate mode if an option is selected*/
- lv_group_t * g = lv_obj_get_group(roller);
- bool editing = lv_group_get_editing(g);
- if(editing) lv_group_set_editing(g, false);
-#endif
- }
- } else if(sign == LV_SIGNAL_PRESSED) {
-#if LV_USE_ANIMATION
- lv_anim_del(roller_scrl, (lv_anim_exec_xcb_t)lv_obj_set_y);
-#endif
- }
-
- /*Position the scrollable according to the new selected option*/
- if(id != -1) {
- refr_position(roller, true);
- }
-
- return res;
-}
-
-/**
- * Draw a rectangle which has gradient on its top and bottom
- * @param roller pointer to a roller object
- * @param mask pointer to the current mask (from the design function)
- */
-static void draw_bg(lv_obj_t * roller, const lv_area_t * mask)
-{
- const lv_style_t * style = lv_roller_get_style(roller, LV_ROLLER_STYLE_BG);
- lv_area_t half_mask;
- lv_area_t half_roller;
- lv_coord_t h = lv_obj_get_height(roller);
- bool union_ok;
- lv_area_copy(&half_roller, &roller->coords);
-
- half_roller.x1 -= roller->ext_draw_pad; /*Add ext size too (e.g. because of shadow draw) */
- half_roller.x2 += roller->ext_draw_pad;
- half_roller.y1 -= roller->ext_draw_pad;
- half_roller.y2 = roller->coords.y1 + h / 2;
-
- union_ok = lv_area_intersect(&half_mask, &half_roller, mask);
-
- half_roller.x1 += roller->ext_draw_pad; /*Revert ext. size adding*/
- half_roller.x2 -= roller->ext_draw_pad;
- half_roller.y1 += roller->ext_draw_pad;
- half_roller.y2 += style->body.radius;
-
- if(union_ok) {
- lv_draw_rect(&half_roller, &half_mask, style, lv_obj_get_opa_scale(roller));
- }
-
- half_roller.x1 -= roller->ext_draw_pad; /*Add ext size too (e.g. because of shadow draw) */
- half_roller.x2 += roller->ext_draw_pad;
- half_roller.y2 = roller->coords.y2 + roller->ext_draw_pad;
- half_roller.y1 = roller->coords.y1 + h / 2;
- if((h & 0x1) == 0) half_roller.y1++; /*With even height the pixels in the middle would be drawn twice*/
-
- union_ok = lv_area_intersect(&half_mask, &half_roller, mask);
-
- half_roller.x1 += roller->ext_draw_pad; /*Revert ext. size adding*/
- half_roller.x2 -= roller->ext_draw_pad;
- half_roller.y2 -= roller->ext_draw_pad;
- half_roller.y1 -= style->body.radius;
-
- if(union_ok) {
- lv_style_t style_tmp;
- memcpy(&style_tmp, style, sizeof(lv_style_t));
- style_tmp.body.main_color = style->body.grad_color;
- style_tmp.body.grad_color = style->body.main_color;
- lv_draw_rect(&half_roller, &half_mask, &style_tmp, lv_obj_get_opa_scale(roller));
- }
-}
-
-/**
- * Refresh the position of the roller. It uses the id stored in: ext->ddlist.selected_option_id
- * @param roller pointer to a roller object
- * @param anim_en LV_ANIM_ON: refresh with animation; LV_ANOM_OFF: without animation
- */
-static void refr_position(lv_obj_t * roller, lv_anim_enable_t anim_en)
-{
-#if LV_USE_ANIMATION == 0
- anim_en = LV_ANIM_OFF;
-#endif
-
- lv_obj_t * roller_scrl = lv_page_get_scrl(roller);
- lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller);
- const lv_style_t * style_label = lv_obj_get_style(ext->ddlist.label);
- const lv_font_t * font = style_label->text.font;
- lv_coord_t font_h = lv_font_get_line_height(font);
- lv_coord_t h = lv_obj_get_height(roller);
- uint16_t anim_time = lv_roller_get_anim_time(roller);
-
- /* Normally the animtaion's `end_cb` sets correct position of the roller is infinite.
- * But without animations do it manually*/
- if(anim_en == LV_ANIM_OFF || anim_time == 0) {
- inf_normalize(roller_scrl);
- }
-
- int32_t id = ext->ddlist.sel_opt_id;
- lv_coord_t line_y1 =
- id * (font_h + style_label->text.line_space) + ext->ddlist.label->coords.y1 - roller_scrl->coords.y1;
- lv_coord_t new_y = -line_y1 + (h - font_h) / 2;
-
- if(anim_en == LV_ANIM_OFF || anim_time == 0) {
- lv_obj_set_y(roller_scrl, new_y);
- } else {
-#if LV_USE_ANIMATION
- lv_anim_t a;
- a.var = roller_scrl;
- a.start = lv_obj_get_y(roller_scrl);
- a.end = new_y;
- a.exec_cb = (lv_anim_exec_xcb_t)lv_obj_set_y;
- a.path_cb = lv_anim_path_linear;
- a.ready_cb = scroll_anim_ready_cb;
- a.act_time = 0;
- a.time = anim_time;
- a.playback = 0;
- a.playback_pause = 0;
- a.repeat = 0;
- a.repeat_pause = 0;
- lv_anim_create(&a);
-#endif
- }
-}
-
-/**
- * Refresh the height of the roller and the scrolable
- * @param roller pointer to roller
- */
-static void refr_height(lv_obj_t * roller)
-{
- lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller);
- lv_align_t obj_align = LV_ALIGN_IN_LEFT_MID;
- if(ext->ddlist.label) {
- lv_label_align_t label_align = lv_label_get_align(ext->ddlist.label);
- if(LV_LABEL_ALIGN_CENTER == label_align)
- obj_align = LV_ALIGN_CENTER;
- else if(LV_LABEL_ALIGN_RIGHT == label_align)
- obj_align = LV_ALIGN_IN_RIGHT_MID;
- }
-
- lv_obj_set_height(lv_page_get_scrl(roller), lv_obj_get_height(ext->ddlist.label) + lv_obj_get_height(roller));
- lv_obj_align(ext->ddlist.label, NULL, obj_align, 0, 0);
-#if LV_USE_ANIMATION
- lv_anim_del(lv_page_get_scrl(roller), (lv_anim_exec_xcb_t)lv_obj_set_y);
-#endif
- lv_ddlist_set_selected(roller, ext->ddlist.sel_opt_id);
-}
-
-/**
- * Set the middle page for the roller if inifinte is enabled
- * @param scrl pointer to the roller's scrollable (lv_obj_t *)
- */
-static void inf_normalize(void * scrl)
-{
- lv_obj_t * roller_scrl = (lv_obj_t *)scrl;
- lv_obj_t * roller = lv_obj_get_parent(roller_scrl);
- lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller);
-
- if(ext->mode == LV_ROLLER_MODE_INIFINITE) {
- uint16_t real_id_cnt = ext->ddlist.option_cnt / LV_ROLLER_INF_PAGES;
-
- ext->ddlist.sel_opt_id = ext->ddlist.sel_opt_id % real_id_cnt;
-
- ext->ddlist.sel_opt_id += (LV_ROLLER_INF_PAGES / 2) * real_id_cnt; /*Select the middle page*/
-
- /*Move to the new id*/
- const lv_style_t * style_label = lv_obj_get_style(ext->ddlist.label);
- const lv_font_t * font = style_label->text.font;
- lv_coord_t font_h = lv_font_get_line_height(font);
- lv_coord_t h = lv_obj_get_height(roller);
-
- lv_coord_t line_y1 = ext->ddlist.sel_opt_id * (font_h + style_label->text.line_space) +
- ext->ddlist.label->coords.y1 - roller_scrl->coords.y1;
- lv_coord_t new_y = -line_y1 + (h - font_h) / 2;
- lv_obj_set_y(roller_scrl, new_y);
- }
-}
-
-#if LV_USE_ANIMATION
-static void scroll_anim_ready_cb(lv_anim_t * a)
-{
- inf_normalize(a->var);
-}
-#endif
-
-#endif
diff --git a/src/libs/lvgl/src/lv_objx/lv_roller.h b/src/libs/lvgl/src/lv_objx/lv_roller.h
deleted file mode 100644
index 5303c3aa..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_roller.h
+++ /dev/null
@@ -1,212 +0,0 @@
-/**
- * @file lv_roller.h
- *
- */
-
-#ifndef LV_ROLLER_H
-#define LV_ROLLER_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_ROLLER != 0
-
-/*Testing of dependencies*/
-#if LV_USE_DDLIST == 0
-#error "lv_roller: lv_ddlist is required. Enable it in lv_conf.h (LV_USE_DDLIST 1) "
-#endif
-
-#include "../lv_core/lv_obj.h"
-#include "lv_ddlist.h"
-#include "lv_label.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/** Roller mode. */
-enum {
- LV_ROLLER_MODE_NORMAL, /**< Normal mode (roller ends at the end of the options). */
- LV_ROLLER_MODE_INIFINITE, /**< Infinite mode (roller can be scrolled forever). */
-};
-
-typedef uint8_t lv_roller_mode_t;
-
-
-
-/*Data of roller*/
-typedef struct
-{
- lv_ddlist_ext_t ddlist; /*Ext. of ancestor*/
- /*New data for this type */
- lv_roller_mode_t mode : 1;
-} lv_roller_ext_t;
-
-enum {
- LV_ROLLER_STYLE_BG,
- LV_ROLLER_STYLE_SEL,
-};
-typedef uint8_t lv_roller_style_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Create a roller object
- * @param par pointer to an object, it will be the parent of the new roller
- * @param copy pointer to a roller object, if not NULL then the new object will be copied from it
- * @return pointer to the created roller
- */
-lv_obj_t * lv_roller_create(lv_obj_t * par, const lv_obj_t * copy);
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set the options on a roller
- * @param roller pointer to roller object
- * @param options a string with '\n' separated options. E.g. "One\nTwo\nThree"
- * @param mode `LV_ROLLER_MODE_NORMAL` or `LV_ROLLER_MODE_INFINITE`
- */
-void lv_roller_set_options(lv_obj_t * roller, const char * options, lv_roller_mode_t mode);
-
-/**
- * Set the align of the roller's options (left, right or center[default])
- * @param roller - pointer to a roller object
- * @param align - one of lv_label_align_t values (left, right, center)
- */
-void lv_roller_set_align(lv_obj_t * roller, lv_label_align_t align);
-
-/**
- * Set the selected option
- * @param roller pointer to a roller object
- * @param sel_opt id of the selected option (0 ... number of option - 1);
- * @param anim LV_ANOM_ON: set with animation; LV_ANIM_OFF set immediately
- */
-void lv_roller_set_selected(lv_obj_t * roller, uint16_t sel_opt, lv_anim_enable_t anim);
-
-/**
- * Set the height to show the given number of rows (options)
- * @param roller pointer to a roller object
- * @param row_cnt number of desired visible rows
- */
-void lv_roller_set_visible_row_count(lv_obj_t * roller, uint8_t row_cnt);
-
-/**
- * Set a fix width for the drop down list
- * @param roller pointer to a roller obejct
- * @param w the width when the list is opened (0: auto size)
- */
-static inline void lv_roller_set_fix_width(lv_obj_t * roller, lv_coord_t w)
-{
- lv_ddlist_set_fix_width(roller, w);
-}
-
-/**
- * Set the open/close animation time.
- * @param roller pointer to a roller object
- * @param anim_time: open/close animation time [ms]
- */
-static inline void lv_roller_set_anim_time(lv_obj_t * roller, uint16_t anim_time)
-{
- lv_ddlist_set_anim_time(roller, anim_time);
-}
-
-/**
- * Set a style of a roller
- * @param roller pointer to a roller object
- * @param type which style should be set
- * @param style pointer to a style
- */
-void lv_roller_set_style(lv_obj_t * roller, lv_roller_style_t type, const lv_style_t * style);
-
-/*=====================
- * Getter functions
- *====================*/
-/**
- * Get the id of the selected option
- * @param roller pointer to a roller object
- * @return id of the selected option (0 ... number of option - 1);
- */
-uint16_t lv_roller_get_selected(const lv_obj_t * roller);
-
-/**
- * Get the current selected option as a string
- * @param roller pointer to roller object
- * @param buf pointer to an array to store the string
- * @param buf_size size of `buf` in bytes. 0: to ignore it.
- */
-static inline void lv_roller_get_selected_str(const lv_obj_t * roller, char * buf, uint16_t buf_size)
-{
- lv_ddlist_get_selected_str(roller, buf, buf_size);
-}
-
-/**
- * Get the align attribute. Default alignment after _create is LV_LABEL_ALIGN_CENTER
- * @param roller pointer to a roller object
- * @return LV_LABEL_ALIGN_LEFT, LV_LABEL_ALIGN_RIGHT or LV_LABEL_ALIGN_CENTER
- */
-lv_label_align_t lv_roller_get_align(const lv_obj_t * roller);
-
-/**
- * Get the options of a roller
- * @param roller pointer to roller object
- * @return the options separated by '\n'-s (E.g. "Option1\nOption2\nOption3")
- */
-static inline const char * lv_roller_get_options(const lv_obj_t * roller)
-{
- return lv_ddlist_get_options(roller);
-}
-
-/**
- * Get the open/close animation time.
- * @param roller pointer to a roller
- * @return open/close animation time [ms]
- */
-static inline uint16_t lv_roller_get_anim_time(const lv_obj_t * roller)
-{
- return lv_ddlist_get_anim_time(roller);
-}
-
-/**
- * Get the auto width set attribute
- * @param roller pointer to a roller object
- * @return true: auto size enabled; false: manual width settings enabled
- */
-bool lv_roller_get_hor_fit(const lv_obj_t * roller);
-
-/**
- * Get a style of a roller
- * @param roller pointer to a roller object
- * @param type which style should be get
- * @return style pointer to a style
- * */
-const lv_style_t * lv_roller_get_style(const lv_obj_t * roller, lv_roller_style_t type);
-
-/**********************
- * MACROS
- **********************/
-
-#endif /*LV_USE_ROLLER*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_ROLLER_H*/
diff --git a/src/libs/lvgl/src/lv_objx/lv_slider.c b/src/libs/lvgl/src/lv_objx/lv_slider.c
deleted file mode 100644
index 6e94973d..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_slider.c
+++ /dev/null
@@ -1,620 +0,0 @@
-
-/**
- * @file lv_slider.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_slider.h"
-#if LV_USE_SLIDER != 0
-
-#include "../lv_core/lv_debug.h"
-#include "../lv_core/lv_group.h"
-#include "../lv_core/lv_indev.h"
-#include "../lv_draw/lv_draw.h"
-#include "../lv_themes/lv_theme.h"
-#include "../lv_misc/lv_math.h"
-
-/*********************
- * DEFINES
- *********************/
-#define LV_OBJX_NAME "lv_slider"
-
-#define LV_SLIDER_SIZE_MIN 4 /*hor. pad and ver. pad cannot make the bar or indicator smaller then this [px]*/
-#define LV_SLIDER_NOT_PRESSED INT16_MIN
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static bool lv_slider_design(lv_obj_t * slider, const lv_area_t * mask, lv_design_mode_t mode);
-static lv_res_t lv_slider_signal(lv_obj_t * slider, lv_signal_t sign, void * param);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_design_cb_t ancestor_design_f;
-static lv_signal_cb_t ancestor_signal;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Create a slider objects
- * @param par pointer to an object, it will be the parent of the new slider
- * @param copy pointer to a slider object, if not NULL then the new object will be copied from it
- * @return pointer to the created slider
- */
-lv_obj_t * lv_slider_create(lv_obj_t * par, const lv_obj_t * copy)
-{
- LV_LOG_TRACE("slider create started");
-
- /*Create the ancestor slider*/
- lv_obj_t * new_slider = lv_bar_create(par, copy);
- LV_ASSERT_MEM(new_slider);
- if(new_slider == NULL) return NULL;
-
- if(ancestor_design_f == NULL) ancestor_design_f = lv_obj_get_design_cb(new_slider);
- if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_slider);
-
- /*Allocate the slider type specific extended data*/
- lv_slider_ext_t * ext = lv_obj_allocate_ext_attr(new_slider, sizeof(lv_slider_ext_t));
- LV_ASSERT_MEM(ext);
- if(ext == NULL) return NULL;
-
- /*Initialize the allocated 'ext' */
- ext->drag_value = LV_SLIDER_NOT_PRESSED;
- ext->style_knob = &lv_style_pretty;
- ext->knob_in = 0;
-
- /*The signal and design functions are not copied so set them here*/
- lv_obj_set_signal_cb(new_slider, lv_slider_signal);
- lv_obj_set_design_cb(new_slider, lv_slider_design);
-
- /*Init the new slider slider*/
- if(copy == NULL) {
- lv_obj_set_click(new_slider, true);
- lv_obj_set_protect(new_slider, LV_PROTECT_PRESS_LOST);
-
- /*Set the default styles*/
- lv_theme_t * th = lv_theme_get_current();
- if(th) {
- lv_slider_set_style(new_slider, LV_SLIDER_STYLE_BG, th->style.slider.bg);
- lv_slider_set_style(new_slider, LV_SLIDER_STYLE_INDIC, th->style.slider.indic);
- lv_slider_set_style(new_slider, LV_SLIDER_STYLE_KNOB, th->style.slider.knob);
- } else {
- lv_slider_set_style(new_slider, LV_SLIDER_STYLE_KNOB, ext->style_knob);
- }
- }
- /*Copy an existing slider*/
- else {
- lv_slider_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
- ext->style_knob = copy_ext->style_knob;
- ext->knob_in = copy_ext->knob_in;
- /*Refresh the style with new signal function*/
- lv_obj_refresh_style(new_slider);
- }
-
- LV_LOG_INFO("slider created");
-
- return new_slider;
-}
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set the 'knob in' attribute of a slider
- * @param slider pointer to slider object
- * @param in true: the knob is drawn always in the slider;
- * false: the knob can be out on the edges
- */
-void lv_slider_set_knob_in(lv_obj_t * slider, bool in)
-{
- LV_ASSERT_OBJ(slider, LV_OBJX_NAME);
-
- lv_slider_ext_t * ext = lv_obj_get_ext_attr(slider);
- if(ext->knob_in == in) return;
-
- ext->knob_in = in == false ? 0 : 1;
- lv_obj_invalidate(slider);
-}
-
-/**
- * Set a style of a slider
- * @param slider pointer to a slider object
- * @param type which style should be set
- * @param style pointer to a style
- */
-void lv_slider_set_style(lv_obj_t * slider, lv_slider_style_t type, const lv_style_t * style)
-{
- LV_ASSERT_OBJ(slider, LV_OBJX_NAME);
-
- lv_slider_ext_t * ext = lv_obj_get_ext_attr(slider);
-
- switch(type) {
- case LV_SLIDER_STYLE_BG: lv_bar_set_style(slider, LV_BAR_STYLE_BG, style); break;
- case LV_SLIDER_STYLE_INDIC: lv_bar_set_style(slider, LV_BAR_STYLE_INDIC, style); break;
- case LV_SLIDER_STYLE_KNOB:
- ext->style_knob = style;
- lv_obj_refresh_ext_draw_pad(slider);
- break;
- }
-}
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the value of a slider
- * @param slider pointer to a slider object
- * @return the value of the slider
- */
-int16_t lv_slider_get_value(const lv_obj_t * slider)
-{
- LV_ASSERT_OBJ(slider, LV_OBJX_NAME);
-
- lv_slider_ext_t * ext = lv_obj_get_ext_attr(slider);
-
- if(ext->drag_value != LV_SLIDER_NOT_PRESSED)
- return ext->drag_value;
- else
- return lv_bar_get_value(slider);
-}
-
-/**
- * Give the slider is being dragged or not
- * @param slider pointer to a slider object
- * @return true: drag in progress false: not dragged
- */
-bool lv_slider_is_dragged(const lv_obj_t * slider)
-{
- LV_ASSERT_OBJ(slider, LV_OBJX_NAME);
-
- lv_slider_ext_t * ext = lv_obj_get_ext_attr(slider);
- return ext->drag_value == LV_SLIDER_NOT_PRESSED ? false : true;
-}
-
-/**
- * Get the 'knob in' attribute of a slider
- * @param slider pointer to slider object
- * @return true: the knob is drawn always in the slider;
- * false: the knob can be out on the edges
- */
-bool lv_slider_get_knob_in(const lv_obj_t * slider)
-{
- LV_ASSERT_OBJ(slider, LV_OBJX_NAME);
-
- lv_slider_ext_t * ext = lv_obj_get_ext_attr(slider);
- return ext->knob_in == 0 ? false : true;
-}
-
-/**
- * Get a style of a slider
- * @param slider pointer to a slider object
- * @param type which style should be get
- * @return style pointer to a style
- */
-const lv_style_t * lv_slider_get_style(const lv_obj_t * slider, lv_slider_style_t type)
-{
- LV_ASSERT_OBJ(slider, LV_OBJX_NAME);
-
- const lv_style_t * style = NULL;
- lv_slider_ext_t * ext = lv_obj_get_ext_attr(slider);
-
- switch(type) {
- case LV_SLIDER_STYLE_BG: style = lv_bar_get_style(slider, LV_BAR_STYLE_BG); break;
- case LV_SLIDER_STYLE_INDIC: style = lv_bar_get_style(slider, LV_BAR_STYLE_INDIC); break;
- case LV_SLIDER_STYLE_KNOB: style = ext->style_knob; break;
- default: style = NULL; break;
- }
-
- return style;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Handle the drawing related tasks of the sliders
- * @param slider pointer to an object
- * @param mask the object will be drawn only in this area
- * @param mode LV_DESIGN_COVER_CHK: only check if the object fully covers the 'mask_p' area
- * (return 'true' if yes)
- * LV_DESIGN_DRAW: draw the object (always return 'true')
- * LV_DESIGN_DRAW_POST: drawing after every children are drawn
- * @param return true/false, depends on 'mode'
- */
-static bool lv_slider_design(lv_obj_t * slider, const lv_area_t * mask, lv_design_mode_t mode)
-{
- /*Return false if the object is not covers the mask_p area*/
- if(mode == LV_DESIGN_COVER_CHK) {
- return false;
- }
- /*Draw the object*/
- else if(mode == LV_DESIGN_DRAW_MAIN) {
- lv_slider_ext_t * ext = lv_obj_get_ext_attr(slider);
-
- const lv_style_t * style_bg = lv_slider_get_style(slider, LV_SLIDER_STYLE_BG);
- const lv_style_t * style_knob = lv_slider_get_style(slider, LV_SLIDER_STYLE_KNOB);
- const lv_style_t * style_indic = lv_slider_get_style(slider, LV_SLIDER_STYLE_INDIC);
-
- lv_opa_t opa_scale = lv_obj_get_opa_scale(slider);
-
- lv_coord_t slider_w = lv_area_get_width(&slider->coords);
- lv_coord_t slider_h = lv_area_get_height(&slider->coords);
-
- /*Draw the bar*/
- lv_area_t area_bg;
- lv_area_copy(&area_bg, &slider->coords);
-
- /*Be sure at least LV_SLIDER_SIZE_MIN size will remain*/
- lv_coord_t pad_top_bg = style_bg->body.padding.top;
- lv_coord_t pad_bottom_bg = style_bg->body.padding.bottom;
- lv_coord_t pad_left_bg = style_bg->body.padding.left;
- lv_coord_t pad_right_bg = style_bg->body.padding.right;
- if(pad_top_bg + pad_bottom_bg + LV_SLIDER_SIZE_MIN > lv_area_get_height(&area_bg)) {
- pad_top_bg = (lv_area_get_height(&area_bg) - LV_SLIDER_SIZE_MIN) >> 1;
- pad_bottom_bg = pad_top_bg;
- }
- if(pad_left_bg + pad_right_bg + LV_SLIDER_SIZE_MIN > lv_area_get_width(&area_bg)) {
- pad_left_bg = (lv_area_get_width(&area_bg) - LV_SLIDER_SIZE_MIN) >> 1;
- pad_right_bg = (lv_area_get_width(&area_bg) - LV_SLIDER_SIZE_MIN) >> 1;
- }
-
- if(ext->knob_in) { /*Enable extra size if the knob is inside */
- area_bg.x1 += pad_left_bg;
- area_bg.x2 -= pad_right_bg;
- area_bg.y1 += pad_top_bg;
- area_bg.y2 -= pad_bottom_bg;
- } else { /*Let space only in the perpendicular directions*/
- area_bg.x1 += slider_w < slider_h ? pad_left_bg : 0; /*Pad only for vertical slider*/
- area_bg.x2 -= slider_w < slider_h ? pad_right_bg : 0; /*Pad only for vertical slider*/
- area_bg.y1 += slider_w > slider_h ? pad_top_bg : 0; /*Pad only for horizontal slider*/
- area_bg.y2 -= slider_w > slider_h ? pad_bottom_bg : 0; /*Pad only for horizontal slider*/
- }
-
-#if LV_USE_GROUP == 0
- lv_draw_rect(&area_bg, mask, style_bg, lv_obj_get_opa_scale(slider));
-#else
- /* Draw the borders later if the slider is focused.
- * At value = 100% the indicator can cover to whole background and the focused style won't
- * be visible*/
- if(lv_obj_is_focused(slider)) {
- lv_style_t style_tmp;
- lv_style_copy(&style_tmp, style_bg);
- style_tmp.body.border.width = 0;
- lv_draw_rect(&area_bg, mask, &style_tmp, opa_scale);
- } else {
- lv_draw_rect(&area_bg, mask, style_bg, opa_scale);
- }
-#endif
-
- /*Draw the indicator*/
- lv_area_t area_indic;
- lv_area_copy(&area_indic, &area_bg);
-
- /*Be sure at least ver pad/hor pad width indicator will remain*/
- lv_coord_t pad_top_indic = style_indic->body.padding.top;
- lv_coord_t pad_bottom_indic = style_indic->body.padding.bottom;
- lv_coord_t pad_left_indic = style_indic->body.padding.left;
- lv_coord_t pad_right_indic = style_indic->body.padding.right;
- if(pad_top_indic + pad_bottom_indic + LV_SLIDER_SIZE_MIN > lv_area_get_height(&area_bg)) {
- pad_top_indic = (lv_area_get_height(&area_bg) - LV_SLIDER_SIZE_MIN) >> 1;
- pad_bottom_indic = pad_top_indic;
- }
- if(pad_left_indic + pad_right_indic + LV_SLIDER_SIZE_MIN > lv_area_get_width(&area_bg)) {
- pad_left_indic = (lv_area_get_width(&area_bg) - LV_SLIDER_SIZE_MIN) >> 1;
- pad_right_indic = pad_left_indic;
- }
-
- area_indic.x1 += pad_left_indic;
- area_indic.x2 -= pad_right_indic;
- area_indic.y1 += pad_top_indic;
- area_indic.y2 -= pad_bottom_indic;
-
- lv_coord_t cur_value = lv_slider_get_value(slider);
- lv_coord_t min_value = lv_slider_get_min_value(slider);
- lv_coord_t max_value = lv_slider_get_max_value(slider);
-
- /*If dragged draw to the drag position*/
- if(ext->drag_value != LV_SLIDER_NOT_PRESSED) cur_value = ext->drag_value;
- bool sym = false;
- if(ext->bar.sym && ext->bar.min_value < 0 && ext->bar.max_value > 0) sym = true;
-
- if(slider_w >= slider_h) {
- lv_coord_t indic_w = lv_area_get_width(&area_indic);
-#if LV_USE_ANIMATION
- if(ext->bar.anim_state != LV_BAR_ANIM_STATE_INV) {
- /*Calculate the coordinates of anim. start and end*/
- lv_coord_t anim_start_x =
- (int32_t)((int32_t)indic_w * (ext->bar.anim_start - min_value)) / (max_value - min_value);
- lv_coord_t anim_end_x =
- (int32_t)((int32_t)indic_w * (ext->bar.anim_end - min_value)) / (max_value - min_value);
-
- /*Calculate the real position based on `anim_state` (between `anim_start` and
- * `anim_end`)*/
- area_indic.x2 = anim_start_x + (((anim_end_x - anim_start_x) * ext->bar.anim_state) >> 8);
- } else
-#endif
- {
- area_indic.x2 = (int32_t)((int32_t)indic_w * (cur_value - min_value)) / (max_value - min_value);
- }
-
- area_indic.x2 = area_indic.x1 + area_indic.x2 - 1;
- if(sym) {
- /*Calculate the coordinate of the zero point*/
- lv_coord_t zero;
- zero = area_indic.x1 + (-ext->bar.min_value * slider_w) / (ext->bar.max_value - ext->bar.min_value);
- if(area_indic.x2 > zero)
- area_indic.x1 = zero;
- else {
- area_indic.x1 = area_indic.x2;
- area_indic.x2 = zero;
- }
- }
-
- /*Draw the indicator but don't draw an ugly 1px wide rectangle on the left on min.
- * value*/
- if(area_indic.x1 != area_indic.x2) lv_draw_rect(&area_indic, mask, style_indic, opa_scale);
-
- } else {
- lv_coord_t indic_h = lv_area_get_height(&area_indic);
-#if LV_USE_ANIMATION
- if(ext->bar.anim_state != LV_BAR_ANIM_STATE_INV) {
- /*Calculate the coordinates of anim. start and end*/
- lv_coord_t anim_start_y =
- (int32_t)((int32_t)indic_h * (ext->bar.anim_start - min_value)) / (max_value - min_value);
- lv_coord_t anim_end_y =
- (int32_t)((int32_t)indic_h * (ext->bar.anim_end - min_value)) / (max_value - min_value);
-
- /*Calculate the real position based on `anim_state` (between `anim_start` and
- * `anim_end`)*/
- area_indic.y1 = anim_start_y + (((anim_end_y - anim_start_y) * ext->bar.anim_state) >> 8);
- } else
-#endif
- {
- area_indic.y1 = (int32_t)((int32_t)indic_h * (cur_value - min_value)) / (max_value - min_value);
- }
-
- area_indic.y1 = area_indic.y2 - area_indic.y1 + 1;
-
- if(sym) {
- /*Calculate the coordinate of the zero point*/
- lv_coord_t zero;
- zero = area_indic.y2 - (-ext->bar.min_value * slider_h) / (ext->bar.max_value - ext->bar.min_value);
- if(area_indic.y1 < zero)
- area_indic.y2 = zero;
- else {
- area_indic.y2 = area_indic.y1;
- area_indic.y1 = zero;
- }
- }
-
- /*Draw the indicator but don't draw an ugly 1px height rectangle on the bottom on min.
- * value*/
- if(area_indic.x1 != area_indic.x2) lv_draw_rect(&area_indic, mask, style_indic, opa_scale);
- }
-
- /*Before the knob add the border if required*/
-#if LV_USE_GROUP
- /* Draw the borders later if the bar is focused.
- * At value = 100% the indicator can cover to whole background and the focused style won't
- * be visible*/
- if(lv_obj_is_focused(slider)) {
- lv_style_t style_tmp;
- lv_style_copy(&style_tmp, style_bg);
- style_tmp.body.opa = LV_OPA_TRANSP;
- style_tmp.body.shadow.width = 0;
- lv_draw_rect(&area_bg, mask, &style_tmp, opa_scale);
- }
-#endif
-
- /*Draw the knob*/
- lv_area_t knob_area;
- lv_area_copy(&knob_area, &slider->coords);
-
- if(slider_w >= slider_h) {
- if(ext->knob_in == 0) {
- if(sym == false) {
- knob_area.x1 = area_indic.x2 - slider_h / 2;
- } else {
- if(cur_value > 0) knob_area.x1 = area_indic.x2 - slider_h / 2;
- else knob_area.x1 = area_indic.x1 - slider_h / 2;
- }
- knob_area.x2 = knob_area.x1 + slider_h - 1;
- } else {
-#if LV_USE_ANIMATION
- if(ext->bar.anim_state != LV_BAR_ANIM_STATE_INV) {
- lv_coord_t w = slider_w - slider_h - 1;
- lv_coord_t anim_start_x =
- (int32_t)((int32_t)w * (ext->bar.anim_start - min_value)) / (max_value - min_value);
- lv_coord_t anim_end_x =
- (int32_t)((int32_t)w * (ext->bar.anim_end - min_value)) / (max_value - min_value);
-
- /*Calculate the real position based on `anim_state` (between `anim_start` and
- * `anim_end`)*/
- knob_area.x1 = anim_start_x + (((anim_end_x - anim_start_x) * ext->bar.anim_state) >> 8);
- } else
-#endif
- {
- knob_area.x1 = (int32_t)((int32_t)(slider_w - slider_h - 1) * (cur_value - min_value)) /
- (max_value - min_value);
- }
-
- knob_area.x1 += slider->coords.x1;
- knob_area.x2 = knob_area.x1 + slider_h - 1;
- }
-
- knob_area.y1 = slider->coords.y1;
- knob_area.y2 = slider->coords.y2;
- } else {
- if(ext->knob_in == 0) {
- if(sym == false) {
- knob_area.y1 = area_indic.y1 - slider_w / 2;
- } else {
- if(cur_value > 0) knob_area.y1 = area_indic.y1 - slider_w / 2;
- else knob_area.y1 = area_indic.y2 - slider_w / 2;
- }
- knob_area.y2 = knob_area.y1 + slider_w - 1;
- } else {
-#if LV_USE_ANIMATION
- if(ext->bar.anim_state != LV_BAR_ANIM_STATE_INV) {
- lv_coord_t h = slider_h - slider_w - 1;
- lv_coord_t anim_start_x =
- (int32_t)((int32_t)h * (ext->bar.anim_start - min_value)) / (max_value - min_value);
- lv_coord_t anim_end_x =
- (int32_t)((int32_t)h * (ext->bar.anim_end - min_value)) / (max_value - min_value);
-
- /*Calculate the real position based on `anim_state` (between `anim_start` and
- * `anim_end`)*/
- knob_area.y2 = anim_start_x + (((anim_end_x - anim_start_x) * ext->bar.anim_state) >> 8);
- } else
-#endif
- {
- knob_area.y2 = (int32_t)((int32_t)(slider_h - slider_w - 1) * (cur_value - min_value)) /
- (max_value - min_value);
- }
-
- knob_area.y2 = slider->coords.y2 - knob_area.y2;
- knob_area.y1 = knob_area.y2 - slider_w - 1;
- }
- knob_area.x1 = slider->coords.x1;
- knob_area.x2 = slider->coords.x2;
- }
- lv_draw_rect(&knob_area, mask, style_knob, opa_scale);
- }
- /*Post draw when the children are drawn*/
- else if(mode == LV_DESIGN_DRAW_POST) {
- }
-
- return true;
-}
-
-/**
- * Signal function of the slider
- * @param slider pointer to a slider object
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_slider_signal(lv_obj_t * slider, lv_signal_t sign, void * param)
-{
- lv_res_t res;
-
- /* Include the ancient signal function */
- res = ancestor_signal(slider, sign, param);
- if(res != LV_RES_OK) return res;
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);
-
- lv_slider_ext_t * ext = lv_obj_get_ext_attr(slider);
- lv_point_t p;
- lv_coord_t w = lv_obj_get_width(slider);
- lv_coord_t h = lv_obj_get_height(slider);
-
- if(sign == LV_SIGNAL_PRESSED) {
- ext->drag_value = lv_slider_get_value(slider);
- } else if(sign == LV_SIGNAL_PRESSING) {
- lv_indev_get_point(param, &p);
- int16_t tmp = 0;
- if(w > h) {
- lv_coord_t knob_w = h;
- p.x -=
- slider->coords.x1 + h / 2; /*Modify the point to shift with half knob (important on the start and end)*/
- tmp = (int32_t)((int32_t)p.x * (ext->bar.max_value - ext->bar.min_value + 1)) / (w - knob_w);
- tmp += ext->bar.min_value;
- } else {
- lv_coord_t knob_h = w;
- p.y -=
- slider->coords.y1 + w / 2; /*Modify the point to shift with half knob (important on the start and end)*/
- tmp = (int32_t)((int32_t)p.y * (ext->bar.max_value - ext->bar.min_value + 1)) / (h - knob_h);
- tmp = ext->bar.max_value - tmp; /*Invert the value: smaller value means higher y*/
- }
-
- if(tmp < ext->bar.min_value)
- tmp = ext->bar.min_value;
- else if(tmp > ext->bar.max_value)
- tmp = ext->bar.max_value;
-
- if(tmp != ext->drag_value) {
- ext->drag_value = tmp;
- lv_obj_invalidate(slider);
- res = lv_event_send(slider, LV_EVENT_VALUE_CHANGED, NULL);
- if(res != LV_RES_OK) return res;
- }
- } else if(sign == LV_SIGNAL_RELEASED || sign == LV_SIGNAL_PRESS_LOST) {
- if(ext->drag_value != LV_SLIDER_NOT_PRESSED) lv_slider_set_value(slider, ext->drag_value, false);
- ext->drag_value = LV_SLIDER_NOT_PRESSED;
-
-#if LV_USE_GROUP
- /*Leave edit mode if released. (No need to wait for LONG_PRESS) */
- lv_group_t * g = lv_obj_get_group(slider);
- bool editing = lv_group_get_editing(g);
- lv_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act());
- if(indev_type == LV_INDEV_TYPE_ENCODER) {
- if(editing) lv_group_set_editing(g, false);
- }
-#endif
-
- } else if(sign == LV_SIGNAL_CORD_CHG) {
- /* The knob size depends on slider size.
- * During the drawing method the ext. size is used by the knob so refresh the ext. size.*/
- if(lv_obj_get_width(slider) != lv_area_get_width(param) ||
- lv_obj_get_height(slider) != lv_area_get_height(param)) {
- slider->signal_cb(slider, LV_SIGNAL_REFR_EXT_DRAW_PAD, NULL);
- }
- } else if(sign == LV_SIGNAL_REFR_EXT_DRAW_PAD) {
- const lv_style_t * style = lv_slider_get_style(slider, LV_SLIDER_STYLE_BG);
- const lv_style_t * knob_style = lv_slider_get_style(slider, LV_SLIDER_STYLE_KNOB);
-
- lv_coord_t shadow_w = knob_style->body.shadow.width;
- if(ext->knob_in == 0) {
- /* The smaller size is the knob diameter*/
- lv_coord_t x = LV_MATH_MIN(w / 2 + 1 + shadow_w, h / 2 + 1 + shadow_w);
- if(slider->ext_draw_pad < x) slider->ext_draw_pad = x;
- } else {
- lv_coord_t pad = 0;
- pad = LV_MATH_MIN(pad, style->body.padding.top);
- pad = LV_MATH_MIN(pad, style->body.padding.bottom);
- pad = LV_MATH_MIN(pad, style->body.padding.left);
- pad = LV_MATH_MIN(pad, style->body.padding.right);
- if(pad < 0) pad = -pad;
- if(slider->ext_draw_pad < pad) slider->ext_draw_pad = pad;
-
- if(slider->ext_draw_pad < shadow_w) slider->ext_draw_pad = shadow_w;
- }
- } else if(sign == LV_SIGNAL_CONTROL) {
- char c = *((char *)param);
-
- ext->drag_value = LV_SLIDER_NOT_PRESSED;
-
- if(c == LV_KEY_RIGHT || c == LV_KEY_UP) {
- lv_slider_set_value(slider, lv_slider_get_value(slider) + 1, true);
- res = lv_event_send(slider, LV_EVENT_VALUE_CHANGED, NULL);
- if(res != LV_RES_OK) return res;
- } else if(c == LV_KEY_LEFT || c == LV_KEY_DOWN) {
- lv_slider_set_value(slider, lv_slider_get_value(slider) - 1, true);
- res = lv_event_send(slider, LV_EVENT_VALUE_CHANGED, NULL);
- if(res != LV_RES_OK) return res;
- }
- } else if(sign == LV_SIGNAL_GET_EDITABLE) {
- bool * editable = (bool *)param;
- *editable = true;
- }
-
- return res;
-}
-#endif
diff --git a/src/libs/lvgl/src/lv_objx/lv_slider.h b/src/libs/lvgl/src/lv_objx/lv_slider.h
deleted file mode 100644
index 967c8b68..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_slider.h
+++ /dev/null
@@ -1,216 +0,0 @@
-/**
- * @file lv_slider.h
- *
- */
-
-#ifndef LV_SLIDER_H
-#define LV_SLIDER_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_SLIDER != 0
-
-/*Testing of dependencies*/
-#if LV_USE_BAR == 0
-#error "lv_slider: lv_bar is required. Enable it in lv_conf.h (LV_USE_BAR 1) "
-#endif
-
-#include "../lv_core/lv_obj.h"
-#include "lv_bar.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-/*Data of slider*/
-typedef struct
-{
- lv_bar_ext_t bar; /*Ext. of ancestor*/
- /*New data for this type */
- const lv_style_t * style_knob; /*Style of the knob*/
- int16_t drag_value; /*Store a temporal value during press until release (Handled by the library)*/
- uint8_t knob_in : 1; /*1: Draw the knob inside the bar*/
-} lv_slider_ext_t;
-
-/** Built-in styles of slider*/
-enum {
- LV_SLIDER_STYLE_BG, /** Slider background style. */
- LV_SLIDER_STYLE_INDIC, /** Slider indicator (filled area) style. */
- LV_SLIDER_STYLE_KNOB, /** Slider knob style. */
-};
-typedef uint8_t lv_slider_style_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Create a slider objects
- * @param par pointer to an object, it will be the parent of the new slider
- * @param copy pointer to a slider object, if not NULL then the new object will be copied from it
- * @return pointer to the created slider
- */
-lv_obj_t * lv_slider_create(lv_obj_t * par, const lv_obj_t * copy);
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set a new value on the slider
- * @param slider pointer to a slider object
- * @param value new value
- * @param anim LV_ANIM_ON: set the value with an animation; LV_ANIM_OFF: change the value immediately
- */
-static inline void lv_slider_set_value(lv_obj_t * slider, int16_t value, lv_anim_enable_t anim)
-{
- lv_bar_set_value(slider, value, anim);
-}
-
-/**
- * Set minimum and the maximum values of a bar
- * @param slider pointer to the slider object
- * @param min minimum value
- * @param max maximum value
- */
-static inline void lv_slider_set_range(lv_obj_t * slider, int16_t min, int16_t max)
-{
- lv_bar_set_range(slider, min, max);
-}
-
-/**
- * Make the slider symmetric to zero. The indicator will grow from zero instead of the minimum
- * position.
- * @param slider pointer to a slider object
- * @param en true: enable disable symmetric behavior; false: disable
- */
-static inline void lv_slider_set_anim_time(lv_obj_t * slider, uint16_t anim_time)
-{
- lv_bar_set_anim_time(slider, anim_time);
-}
-
-/**
- * Set the animation time of the slider
- * @param slider pointer to a bar object
- * @param anim_time the animation time in milliseconds.
- */
-static inline void lv_slider_set_sym(lv_obj_t * slider, bool en)
-{
- lv_bar_set_sym(slider, en);
-}
-
-/**
- * Set the 'knob in' attribute of a slider
- * @param slider pointer to slider object
- * @param in true: the knob is drawn always in the slider;
- * false: the knob can be out on the edges
- */
-void lv_slider_set_knob_in(lv_obj_t * slider, bool in);
-
-/**
- * Set a style of a slider
- * @param slider pointer to a slider object
- * @param type which style should be set
- * @param style pointer to a style
- */
-void lv_slider_set_style(lv_obj_t * slider, lv_slider_style_t type, const lv_style_t * style);
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the value of a slider
- * @param slider pointer to a slider object
- * @return the value of the slider
- */
-int16_t lv_slider_get_value(const lv_obj_t * slider);
-
-/**
- * Get the minimum value of a slider
- * @param slider pointer to a slider object
- * @return the minimum value of the slider
- */
-static inline int16_t lv_slider_get_min_value(const lv_obj_t * slider)
-{
- return lv_bar_get_min_value(slider);
-}
-
-/**
- * Get the maximum value of a slider
- * @param slider pointer to a slider object
- * @return the maximum value of the slider
- */
-static inline int16_t lv_slider_get_max_value(const lv_obj_t * slider)
-{
- return lv_bar_get_max_value(slider);
-}
-
-/**
- * Give the slider is being dragged or not
- * @param slider pointer to a slider object
- * @return true: drag in progress false: not dragged
- */
-bool lv_slider_is_dragged(const lv_obj_t * slider);
-
-/**
- * Get the animation time of the slider
- * @param slider pointer to a slider object
- * @return the animation time in milliseconds.
- */
-static inline uint16_t lv_slider_get_anim_time(lv_obj_t * slider)
-{
- return lv_bar_get_anim_time(slider);
-}
-
-/**
- * Get whether the slider is symmetric or not.
- * @param slider pointer to a bar object
- * @return true: symmetric is enabled; false: disable
- */
-static inline bool lv_slider_get_sym(lv_obj_t * slider)
-{
- return lv_bar_get_sym(slider);
-}
-
-/**
- * Get the 'knob in' attribute of a slider
- * @param slider pointer to slider object
- * @return true: the knob is drawn always in the slider;
- * false: the knob can be out on the edges
- */
-bool lv_slider_get_knob_in(const lv_obj_t * slider);
-
-/**
- * Get a style of a slider
- * @param slider pointer to a slider object
- * @param type which style should be get
- * @return style pointer to a style
- */
-const lv_style_t * lv_slider_get_style(const lv_obj_t * slider, lv_slider_style_t type);
-
-/**********************
- * MACROS
- **********************/
-
-#endif /*LV_USE_SLIDER*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_SLIDER_H*/
diff --git a/src/libs/lvgl/src/lv_objx/lv_spinbox.c b/src/libs/lvgl/src/lv_objx/lv_spinbox.c
deleted file mode 100644
index 6873085a..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_spinbox.c
+++ /dev/null
@@ -1,479 +0,0 @@
-/**
- * @file lv_spinbox.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_spinbox.h"
-
-#if LV_USE_SPINBOX != 0
-#include "../lv_core/lv_debug.h"
-#include "../lv_themes/lv_theme.h"
-#include "../lv_misc/lv_math.h"
-#include "../lv_misc/lv_utils.h"
-
-/*********************
- * DEFINES
- *********************/
-#define LV_OBJX_NAME "lv_spinbox"
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static lv_res_t lv_spinbox_signal(lv_obj_t * spinbox, lv_signal_t sign, void * param);
-static void lv_spinbox_updatevalue(lv_obj_t * spinbox);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_signal_cb_t ancestor_signal;
-static lv_design_cb_t ancestor_design;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Create a spinbox object
- * @param par pointer to an object, it will be the parent of the new spinbox
- * @param copy pointer to a spinbox object, if not NULL then the new object will be copied from it
- * @return pointer to the created spinbox
- */
-lv_obj_t * lv_spinbox_create(lv_obj_t * par, const lv_obj_t * copy)
-{
- LV_LOG_TRACE("spinbox create started");
-
- /*Create the ancestor of spinbox*/
- lv_obj_t * new_spinbox = lv_ta_create(par, copy);
- LV_ASSERT_MEM(new_spinbox);
- if(new_spinbox == NULL) return NULL;
-
- /*Allocate the spinbox type specific extended data*/
- lv_spinbox_ext_t * ext = lv_obj_allocate_ext_attr(new_spinbox, sizeof(lv_spinbox_ext_t));
- LV_ASSERT_MEM(ext);
- if(ext == NULL) return NULL;
- if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_spinbox);
- if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_cb(new_spinbox);
-
- /*Initialize the allocated 'ext'*/
- ext->value = 0;
- ext->dec_point_pos = 0;
- ext->digit_count = 5;
- ext->digit_padding_left = 0;
- ext->step = 1;
- ext->range_max = 99999;
- ext->range_min = -99999;
-
- lv_ta_set_cursor_type(new_spinbox, LV_CURSOR_BLOCK);
- lv_ta_set_one_line(new_spinbox, true);
- lv_ta_set_cursor_click_pos(new_spinbox, false);
-
- /*The signal and design functions are not copied so set them here*/
- lv_obj_set_signal_cb(new_spinbox, lv_spinbox_signal);
- lv_obj_set_design_cb(new_spinbox, ancestor_design); /*Leave the Text area's design function*/
-
- /*Init the new spinbox spinbox*/
- if(copy == NULL) {
- /*Set the default styles*/
- lv_theme_t * th = lv_theme_get_current();
- if(th) {
- lv_spinbox_set_style(new_spinbox, LV_SPINBOX_STYLE_BG, th->style.spinbox.bg);
- lv_spinbox_set_style(new_spinbox, LV_SPINBOX_STYLE_CURSOR, th->style.spinbox.cursor);
- lv_spinbox_set_style(new_spinbox, LV_SPINBOX_STYLE_SB, th->style.spinbox.sb);
- }
- }
- /*Copy an existing spinbox*/
- else {
- lv_spinbox_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
-
- lv_spinbox_set_value(new_spinbox, copy_ext->value);
- lv_spinbox_set_digit_format(new_spinbox, (uint8_t)copy_ext->digit_count, (uint8_t)copy_ext->dec_point_pos);
- lv_spinbox_set_range(new_spinbox, copy_ext->range_min, copy_ext->range_max);
- lv_spinbox_set_step(new_spinbox, copy_ext->step);
-
- /*Refresh the style with new signal function*/
- lv_obj_refresh_style(new_spinbox);
- }
-
- lv_spinbox_updatevalue(new_spinbox);
-
- LV_LOG_INFO("spinbox created");
-
- return new_spinbox;
-}
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set spinbox value
- * @param spinbox pointer to spinbox
- * @param i value to be set
- */
-void lv_spinbox_set_value(lv_obj_t * spinbox, int32_t i)
-{
- LV_ASSERT_OBJ(spinbox, LV_OBJX_NAME);
-
- lv_spinbox_ext_t * ext = lv_obj_get_ext_attr(spinbox);
- if(ext == NULL) return;
-
- if(i > ext->range_max) i = ext->range_max;
- if(i < ext->range_min) i = ext->range_min;
-
- ext->value = i;
-
- lv_spinbox_updatevalue(spinbox);
-}
-
-/**
- * Set spinbox digit format (digit count and decimal format)
- * @param spinbox pointer to spinbox
- * @param digit_count number of digit excluding the decimal separator and the sign
- * @param separator_position number of digit before the decimal point. If 0, decimal point is not
- * shown
- */
-void lv_spinbox_set_digit_format(lv_obj_t * spinbox, uint8_t digit_count, uint8_t separator_position)
-{
- LV_ASSERT_OBJ(spinbox, LV_OBJX_NAME);
-
- lv_spinbox_ext_t * ext = lv_obj_get_ext_attr(spinbox);
- if(ext == NULL) return;
-
- if(digit_count > LV_SPINBOX_MAX_DIGIT_COUNT) digit_count = LV_SPINBOX_MAX_DIGIT_COUNT;
-
- if(separator_position > LV_SPINBOX_MAX_DIGIT_COUNT) separator_position = LV_SPINBOX_MAX_DIGIT_COUNT;
-
- ext->digit_count = digit_count;
- ext->dec_point_pos = separator_position;
-
- lv_spinbox_updatevalue(spinbox);
-}
-
-/**
- * Set spinbox step
- * @param spinbox pointer to spinbox
- * @param step steps on increment/decrement
- */
-void lv_spinbox_set_step(lv_obj_t * spinbox, uint32_t step)
-{
- LV_ASSERT_OBJ(spinbox, LV_OBJX_NAME);
-
- lv_spinbox_ext_t * ext = lv_obj_get_ext_attr(spinbox);
- if(ext == NULL) return;
-
- ext->step = step;
-}
-
-/**
- * Set spinbox value range
- * @param spinbox pointer to spinbox
- * @param range_min maximum value, inclusive
- * @param range_max minimum value, inclusive
- */
-void lv_spinbox_set_range(lv_obj_t * spinbox, int32_t range_min, int32_t range_max)
-{
- LV_ASSERT_OBJ(spinbox, LV_OBJX_NAME);
-
- lv_spinbox_ext_t * ext = lv_obj_get_ext_attr(spinbox);
- if(ext == NULL) return;
-
- ext->range_max = range_max;
- ext->range_min = range_min;
-
- if(ext->value > ext->range_max) {
- ext->value = ext->range_max;
- lv_obj_invalidate(spinbox);
- }
- if(ext->value < ext->range_min) {
- ext->value = ext->range_min;
- lv_obj_invalidate(spinbox);
- }
-}
-
-/**
- * Set spinbox left padding in digits count (added between sign and first digit)
- * @param spinbox pointer to spinbox
- * @param cb Callback function called on value change event
- */
-void lv_spinbox_set_padding_left(lv_obj_t * spinbox, uint8_t padding)
-{
- LV_ASSERT_OBJ(spinbox, LV_OBJX_NAME);
-
- lv_spinbox_ext_t * ext = lv_obj_get_ext_attr(spinbox);
- ext->digit_padding_left = padding;
- lv_spinbox_updatevalue(spinbox);
-}
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the spinbox numeral value (user has to convert to float according to its digit format)
- * @param spinbox pointer to spinbox
- * @return value integer value of the spinbox
- */
-int32_t lv_spinbox_get_value(lv_obj_t * spinbox)
-{
- LV_ASSERT_OBJ(spinbox, LV_OBJX_NAME);
-
- lv_spinbox_ext_t * ext = lv_obj_get_ext_attr(spinbox);
-
- return ext->value;
-}
-
-/*=====================
- * Other functions
- *====================*/
-
-/**
- * Select next lower digit for edition
- * @param spinbox pointer to spinbox
- */
-void lv_spinbox_step_next(lv_obj_t * spinbox)
-{
- LV_ASSERT_OBJ(spinbox, LV_OBJX_NAME);
-
- lv_spinbox_ext_t * ext = lv_obj_get_ext_attr(spinbox);
-
- int32_t new_step = ext->step / 10;
- if((new_step) > 0)
- ext->step = new_step;
- else
- ext->step = 1;
-
- lv_spinbox_updatevalue(spinbox);
-}
-
-/**
- * Select next higher digit for edition
- * @param spinbox pointer to spinbox
- */
-void lv_spinbox_step_prev(lv_obj_t * spinbox)
-{
- LV_ASSERT_OBJ(spinbox, LV_OBJX_NAME);
-
- lv_spinbox_ext_t * ext = lv_obj_get_ext_attr(spinbox);
- int32_t step_limit;
- step_limit = LV_MATH_MAX(ext->range_max, (ext->range_min < 0 ? (-ext->range_min) : ext->range_min));
- int32_t new_step = ext->step * 10;
- if(new_step <= step_limit) ext->step = new_step;
-
- lv_spinbox_updatevalue(spinbox);
-}
-
-/**
- * Increment spinbox value by one step
- * @param spinbox pointer to spinbox
- */
-void lv_spinbox_increment(lv_obj_t * spinbox)
-{
- LV_ASSERT_OBJ(spinbox, LV_OBJX_NAME);
-
- lv_spinbox_ext_t * ext = lv_obj_get_ext_attr(spinbox);
-
- if(ext->value + ext->step <= ext->range_max) {
- /*Special mode when zero crossing*/
- if((ext->value + ext->step) > 0 && ext->value < 0) ext->value = -ext->value;
- ext->value += ext->step;
-
- } else {
- ext->value = ext->range_max;
- }
-
- lv_spinbox_updatevalue(spinbox);
-}
-
-/**
- * Decrement spinbox value by one step
- * @param spinbox pointer to spinbox
- */
-void lv_spinbox_decrement(lv_obj_t * spinbox)
-{
- LV_ASSERT_OBJ(spinbox, LV_OBJX_NAME);
-
- lv_spinbox_ext_t * ext = lv_obj_get_ext_attr(spinbox);
-
- if(ext->value - ext->step >= ext->range_min) {
- /*Special mode when zero crossing*/
- if((ext->value - ext->step) < 0 && ext->value > 0) ext->value = -ext->value;
- ext->value -= ext->step;
- } else {
- ext->value = ext->range_min;
- }
-
- lv_spinbox_updatevalue(spinbox);
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Signal function of the spinbox
- * @param spinbox pointer to a spinbox object
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_spinbox_signal(lv_obj_t * spinbox, lv_signal_t sign, void * param)
-{
-
- lv_res_t res = LV_RES_OK;
-
- /* Include the ancient signal function */
- if(sign != LV_SIGNAL_CONTROL) {
- res = ancestor_signal(spinbox, sign, param);
- if(res != LV_RES_OK) return res;
- }
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);
-
-
- lv_spinbox_ext_t * ext = lv_obj_get_ext_attr(spinbox);
- if(sign == LV_SIGNAL_CLEANUP) {
- /*Nothing to cleanup. (No dynamically allocated memory in 'ext')*/
- } else if(sign == LV_SIGNAL_GET_TYPE) {
- lv_obj_type_t * buf = param;
- uint8_t i;
- for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/
- if(buf->type[i] == NULL) break;
- }
- buf->type[i] = "lv_spinbox";
- } else if(sign == LV_SIGNAL_RELEASED) {
- /*If released with an ENCODER then move to the next digit*/
-#if LV_USE_GROUP
- lv_indev_t * indev = lv_indev_get_act();
- if(lv_indev_get_type(indev) == LV_INDEV_TYPE_ENCODER) {
- if(lv_group_get_editing(lv_obj_get_group(spinbox))) {
- if(ext->step > 1) {
- lv_spinbox_step_next(spinbox);
- } else {
- /*Restart from the MSB*/
- ext->step = 1;
- uint32_t i;
- for(i = 0; i < ext->digit_count; i++) {
- int32_t new_step = ext->step * 10;
- if(new_step >= ext->range_max) break;
- ext->step = new_step;
- }
- lv_spinbox_step_prev(spinbox);
- }
- }
- }
-#endif
- } else if(sign == LV_SIGNAL_CONTROL) {
- lv_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act());
-
- uint32_t c = *((uint32_t *)param); /*uint32_t because can be UTF-8*/
- if(c == LV_KEY_RIGHT) {
- if(indev_type == LV_INDEV_TYPE_ENCODER)
- lv_spinbox_increment(spinbox);
- else
- lv_spinbox_step_next(spinbox);
- } else if(c == LV_KEY_LEFT) {
- if(indev_type == LV_INDEV_TYPE_ENCODER)
- lv_spinbox_decrement(spinbox);
- else
- lv_spinbox_step_prev(spinbox);
- } else if(c == LV_KEY_UP) {
- lv_spinbox_increment(spinbox);
- } else if(c == LV_KEY_DOWN) {
- lv_spinbox_decrement(spinbox);
- } else {
- lv_ta_add_char(spinbox, c);
- }
- }
-
- return res;
-}
-
-static void lv_spinbox_updatevalue(lv_obj_t * spinbox)
-{
- lv_spinbox_ext_t * ext = lv_obj_get_ext_attr(spinbox);
-
- char buf[LV_SPINBOX_MAX_DIGIT_COUNT + 8];
- memset(buf, 0, sizeof(buf));
- char * buf_p = buf;
- uint8_t cur_shift_left = 0;
-
- if (ext->range_min < 0) { // hide sign if there are only positive values
- /*Add the sign*/
- (*buf_p) = ext->value >= 0 ? '+' : '-';
- buf_p++;
- } else {
- /*Cursor need shift to left*/
- cur_shift_left++;
- }
-
- int32_t i;
- /*padding left*/
- for(i = 0; i < ext->digit_padding_left; i++) {
- (*buf_p) = ' ';
- buf_p++;
- }
-
- char digits[64];
- /*Convert the numbers to string (the sign is already handled so always covert positive number)*/
- lv_utils_num_to_str(ext->value < 0 ? -ext->value : ext->value, digits);
-
- /*Add leading zeros*/
- int lz_cnt = ext->digit_count - (int)strlen(digits);
- if(lz_cnt > 0) {
- for(i = (uint16_t)strlen(digits); i >= 0; i--) {
- digits[i + lz_cnt] = digits[i];
- }
- for(i = 0; i < lz_cnt; i++) {
- digits[i] = '0';
- }
- }
-
- int32_t intDigits;
- intDigits = (ext->dec_point_pos == 0) ? ext->digit_count : ext->dec_point_pos;
-
- /*Add the decimal part*/
- for(i = 0; i < intDigits && digits[i] != '\0'; i++) {
- (*buf_p) = digits[i];
- buf_p++;
- }
-
- if(ext->dec_point_pos != 0) {
- /*Insert the decimal point*/
- (*buf_p) = '.';
- buf_p++;
-
- for(/*Leave i*/; i < ext->digit_count && digits[i] != '\0'; i++) {
- (*buf_p) = digits[i];
- buf_p++;
- }
- }
-
- /*Refresh the text*/
- lv_ta_set_text(spinbox, (char *)buf);
-
- /*Set the cursor position*/
- int32_t step = ext->step;
- uint8_t cur_pos = (uint8_t)ext->digit_count;
- while(step >= 10) {
- step /= 10;
- cur_pos--;
- }
-
- if(cur_pos > intDigits) cur_pos++; /*Skip teh decimal point*/
-
- cur_pos += (ext->digit_padding_left - cur_shift_left);
-
- lv_ta_set_cursor_pos(spinbox, cur_pos);
-}
-
-#endif
diff --git a/src/libs/lvgl/src/lv_objx/lv_spinbox.h b/src/libs/lvgl/src/lv_objx/lv_spinbox.h
deleted file mode 100644
index ea60169e..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_spinbox.h
+++ /dev/null
@@ -1,188 +0,0 @@
-/**
- * @file lv_spinbox.h
- *
- */
-
-#ifndef LV_SPINBOX_H
-#define LV_SPINBOX_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_SPINBOX != 0
-
-/*Testing of dependencies*/
-#if LV_USE_TA == 0
-#error "lv_spinbox: lv_ta is required. Enable it in lv_conf.h (LV_USE_TA 1) "
-#endif
-
-#include "../lv_core/lv_obj.h"
-#include "../lv_objx/lv_ta.h"
-
-/*********************
- * DEFINES
- *********************/
-#define LV_SPINBOX_MAX_DIGIT_COUNT 16
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/*Data of spinbox*/
-typedef struct
-{
- lv_ta_ext_t ta; /*Ext. of ancestor*/
- /*New data for this type */
- int32_t value;
- int32_t range_max;
- int32_t range_min;
- int32_t step;
- uint16_t digit_count : 4;
- uint16_t dec_point_pos : 4; /*if 0, there is no separator and the number is an integer*/
- uint16_t digit_padding_left : 4;
-} lv_spinbox_ext_t;
-
-/*Styles*/
-enum {
- LV_SPINBOX_STYLE_BG,
- LV_SPINBOX_STYLE_SB,
- LV_SPINBOX_STYLE_CURSOR,
-};
-typedef uint8_t lv_spinbox_style_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Create a spinbox objects
- * @param par pointer to an object, it will be the parent of the new spinbox
- * @param copy pointer to a spinbox object, if not NULL then the new object will be copied from it
- * @return pointer to the created spinbox
- */
-lv_obj_t * lv_spinbox_create(lv_obj_t * par, const lv_obj_t * copy);
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set a style of a spinbox.
- * @param templ pointer to template object
- * @param type which style should be set
- * @param style pointer to a style
- */
-static inline void lv_spinbox_set_style(lv_obj_t * spinbox, lv_spinbox_style_t type, lv_style_t * style)
-{
- lv_ta_set_style(spinbox, type, style);
-}
-
-/**
- * Set spinbox value
- * @param spinbox pointer to spinbox
- * @param i value to be set
- */
-void lv_spinbox_set_value(lv_obj_t * spinbox, int32_t i);
-
-/**
- * Set spinbox digit format (digit count and decimal format)
- * @param spinbox pointer to spinbox
- * @param digit_count number of digit excluding the decimal separator and the sign
- * @param separator_position number of digit before the decimal point. If 0, decimal point is not
- * shown
- */
-void lv_spinbox_set_digit_format(lv_obj_t * spinbox, uint8_t digit_count, uint8_t separator_position);
-
-/**
- * Set spinbox step
- * @param spinbox pointer to spinbox
- * @param step steps on increment/decrement
- */
-void lv_spinbox_set_step(lv_obj_t * spinbox, uint32_t step);
-
-/**
- * Set spinbox value range
- * @param spinbox pointer to spinbox
- * @param range_min maximum value, inclusive
- * @param range_max minimum value, inclusive
- */
-void lv_spinbox_set_range(lv_obj_t * spinbox, int32_t range_min, int32_t range_max);
-
-/**
- * Set spinbox left padding in digits count (added between sign and first digit)
- * @param spinbox pointer to spinbox
- * @param cb Callback function called on value change event
- */
-void lv_spinbox_set_padding_left(lv_obj_t * spinbox, uint8_t padding);
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get style of a spinbox.
- * @param templ pointer to template object
- * @param type which style should be get
- * @return style pointer to the style
- */
-static inline const lv_style_t * lv_spinbox_get_style(lv_obj_t * spinbox, lv_spinbox_style_t type)
-{
- return lv_ta_get_style(spinbox, type);
-}
-
-/**
- * Get the spinbox numeral value (user has to convert to float according to its digit format)
- * @param spinbox pointer to spinbox
- * @return value integer value of the spinbox
- */
-int32_t lv_spinbox_get_value(lv_obj_t * spinbox);
-
-/*=====================
- * Other functions
- *====================*/
-
-/**
- * Select next lower digit for edition by dividing the step by 10
- * @param spinbox pointer to spinbox
- */
-void lv_spinbox_step_next(lv_obj_t * spinbox);
-
-/**
- * Select next higher digit for edition by multiplying the step by 10
- * @param spinbox pointer to spinbox
- */
-void lv_spinbox_step_prev(lv_obj_t * spinbox);
-
-/**
- * Increment spinbox value by one step
- * @param spinbox pointer to spinbox
- */
-void lv_spinbox_increment(lv_obj_t * spinbox);
-
-/**
- * Decrement spinbox value by one step
- * @param spinbox pointer to spinbox
- */
-void lv_spinbox_decrement(lv_obj_t * spinbox);
-
-/**********************
- * MACROS
- **********************/
-
-#endif /*LV_USE_SPINBOX*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_SPINBOX_H*/
diff --git a/src/libs/lvgl/src/lv_objx/lv_sw.c b/src/libs/lvgl/src/lv_objx/lv_sw.c
deleted file mode 100644
index 428a4af1..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_sw.c
+++ /dev/null
@@ -1,403 +0,0 @@
-/**
- * @file lv_sw.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_sw.h"
-
-#if LV_USE_SW != 0
-
-/*Testing of dependencies*/
-#if LV_USE_SLIDER == 0
-#error "lv_sw: lv_slider is required. Enable it in lv_conf.h (LV_USE_SLIDER 1) "
-#endif
-
-#include "../lv_core/lv_debug.h"
-#include "../lv_themes/lv_theme.h"
-#include "../lv_misc/lv_math.h"
-#include "../lv_core/lv_indev.h"
-
-/*********************
- * DEFINES
- *********************/
-#define LV_OBJX_NAME "lv_sw"
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static lv_res_t lv_sw_signal(lv_obj_t * sw, lv_signal_t sign, void * param);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_signal_cb_t ancestor_signal;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Create a switch objects
- * @param par pointer to an object, it will be the parent of the new switch
- * @param copy pointer to a switch object, if not NULL then the new object will be copied from it
- * @return pointer to the created switch
- */
-lv_obj_t * lv_sw_create(lv_obj_t * par, const lv_obj_t * copy)
-{
- LV_LOG_TRACE("switch create started");
-
- /*Create the ancestor of switch*/
- lv_obj_t * new_sw = lv_slider_create(par, copy);
- LV_ASSERT_MEM(new_sw);
- if(new_sw == NULL) return NULL;
-
- if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_sw);
-
- /*Allocate the switch type specific extended data*/
- lv_sw_ext_t * ext = lv_obj_allocate_ext_attr(new_sw, sizeof(lv_sw_ext_t));
- LV_ASSERT_MEM(ext);
- if(ext == NULL) return NULL;
-
- /*Initialize the allocated 'ext' */
- ext->changed = 0;
-#if LV_USE_ANIMATION
- ext->anim_time = 0;
-#endif
- ext->style_knob_off = ext->slider.style_knob;
- ext->style_knob_on = ext->slider.style_knob;
-
- /*The signal and design functions are not copied so set them here*/
- lv_obj_set_signal_cb(new_sw, lv_sw_signal);
-
- /*Init the new switch switch*/
- if(copy == NULL) {
- lv_obj_set_size(new_sw, 2 * LV_DPI / 3, LV_DPI / 3);
- lv_slider_set_knob_in(new_sw, true);
- lv_slider_set_range(new_sw, 0, LV_SW_MAX_VALUE);
-
- /*Set the default styles*/
- lv_theme_t * th = lv_theme_get_current();
- if(th) {
- lv_sw_set_style(new_sw, LV_SW_STYLE_BG, th->style.sw.bg);
- lv_sw_set_style(new_sw, LV_SW_STYLE_INDIC, th->style.sw.indic);
- lv_sw_set_style(new_sw, LV_SW_STYLE_KNOB_OFF, th->style.sw.knob_off);
- lv_sw_set_style(new_sw, LV_SW_STYLE_KNOB_ON, th->style.sw.knob_on);
- } else {
- /*Let the slider' style*/
- }
-
- }
- /*Copy an existing switch*/
- else {
- lv_sw_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
- ext->style_knob_off = copy_ext->style_knob_off;
- ext->style_knob_on = copy_ext->style_knob_on;
-#if LV_USE_ANIMATION
- ext->anim_time = copy_ext->anim_time;
-#endif
-
- if(lv_sw_get_state(new_sw))
- lv_slider_set_style(new_sw, LV_SLIDER_STYLE_KNOB, ext->style_knob_on);
- else
- lv_slider_set_style(new_sw, LV_SLIDER_STYLE_KNOB, ext->style_knob_off);
-
- /*Refresh the style with new signal function*/
- lv_obj_refresh_style(new_sw);
- }
-
- LV_LOG_INFO("switch created");
-
- return new_sw;
-}
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Turn ON the switch
- * @param sw pointer to a switch objec
- * @param anim LV_ANOM_ON: set the value with an animation; LV_ANIM_OFF: change the value immediately
- */
-void lv_sw_on(lv_obj_t * sw, lv_anim_enable_t anim)
-{
- LV_ASSERT_OBJ(sw, LV_OBJX_NAME);
-
-#if LV_USE_ANIMATION == 0
- anim = LV_ANIM_OFF;
-#endif
- lv_sw_ext_t * ext = lv_obj_get_ext_attr(sw);
- lv_slider_set_value(sw, LV_SW_MAX_VALUE, anim);
- lv_slider_set_style(sw, LV_SLIDER_STYLE_KNOB, ext->style_knob_on);
-}
-
-/**
- * Turn OFF the switch
- * @param sw pointer to a switch object
- * @param anim LV_ANIM_ON: set the value with an animation; LV_ANIM_OFF: change the value immediately
- */
-void lv_sw_off(lv_obj_t * sw, lv_anim_enable_t anim)
-{
- LV_ASSERT_OBJ(sw, LV_OBJX_NAME);
-
-#if LV_USE_ANIMATION == 0
- anim = LV_ANIM_OFF;
-#endif
- lv_sw_ext_t * ext = lv_obj_get_ext_attr(sw);
- lv_slider_set_value(sw, 0, anim);
- lv_slider_set_style(sw, LV_SLIDER_STYLE_KNOB, ext->style_knob_off);
-}
-
-/**
- * Toggle the position of the switch
- * @param sw pointer to a switch object
- * @param anim LV_ANIM_ON: set the value with an animation; LV_ANIM_OFF: change the value immediately
- * @return resulting state of the switch.
- */
-bool lv_sw_toggle(lv_obj_t * sw, lv_anim_enable_t anim)
-{
- LV_ASSERT_OBJ(sw, LV_OBJX_NAME);
-
-#if LV_USE_ANIMATION == 0
- anim = LV_ANIM_OFF;
-#endif
-
- bool state = lv_sw_get_state(sw);
- if(state)
- lv_sw_off(sw, anim);
- else
- lv_sw_on(sw, anim);
-
- return !state;
-}
-
-/**
- * Set a style of a switch
- * @param sw pointer to a switch object
- * @param type which style should be set
- * @param style pointer to a style
- */
-void lv_sw_set_style(lv_obj_t * sw, lv_sw_style_t type, const lv_style_t * style)
-{
- LV_ASSERT_OBJ(sw, LV_OBJX_NAME);
-
- lv_sw_ext_t * ext = lv_obj_get_ext_attr(sw);
-
- switch(type) {
- case LV_SLIDER_STYLE_BG: lv_slider_set_style(sw, LV_SLIDER_STYLE_BG, style); break;
- case LV_SLIDER_STYLE_INDIC: lv_bar_set_style(sw, LV_SLIDER_STYLE_INDIC, style); break;
- case LV_SW_STYLE_KNOB_OFF:
- ext->style_knob_off = style;
- if(lv_sw_get_state(sw) == 0) lv_slider_set_style(sw, LV_SLIDER_STYLE_KNOB, style);
- break;
- case LV_SW_STYLE_KNOB_ON:
- ext->style_knob_on = style;
- if(lv_sw_get_state(sw) != 0) lv_slider_set_style(sw, LV_SLIDER_STYLE_KNOB, style);
- break;
- }
-}
-
-void lv_sw_set_anim_time(lv_obj_t * sw, uint16_t anim_time)
-{
- LV_ASSERT_OBJ(sw, LV_OBJX_NAME);
-
-#if LV_USE_ANIMATION
- lv_sw_ext_t * ext = lv_obj_get_ext_attr(sw);
- ext->anim_time = anim_time;
-#else
- (void)sw;
- (void)anim_time;
-#endif
-}
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get a style of a switch
- * @param sw pointer to a switch object
- * @param type which style should be get
- * @return style pointer to a style
- */
-const lv_style_t * lv_sw_get_style(const lv_obj_t * sw, lv_sw_style_t type)
-{
- LV_ASSERT_OBJ(sw, LV_OBJX_NAME);
-
- const lv_style_t * style = NULL;
- lv_sw_ext_t * ext = lv_obj_get_ext_attr(sw);
-
- switch(type) {
- case LV_SW_STYLE_BG: style = lv_slider_get_style(sw, LV_SLIDER_STYLE_BG); break;
- case LV_SW_STYLE_INDIC: style = lv_slider_get_style(sw, LV_SLIDER_STYLE_INDIC); break;
- case LV_SW_STYLE_KNOB_OFF: style = ext->style_knob_off; break;
- case LV_SW_STYLE_KNOB_ON: style = ext->style_knob_on; break;
- default: style = NULL; break;
- }
-
- return style;
-}
-
-uint16_t lv_sw_get_anim_time(const lv_obj_t * sw)
-{
- LV_ASSERT_OBJ(sw, LV_OBJX_NAME);
-
-#if LV_USE_ANIMATION
- lv_sw_ext_t * ext = lv_obj_get_ext_attr(sw);
- return ext->anim_time;
-#else
- (void)sw; /*Unused*/
- return 0;
-#endif
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Signal function of the switch
- * @param sw pointer to a switch object
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_sw_signal(lv_obj_t * sw, lv_signal_t sign, void * param)
-{
- lv_res_t res;
- if(sign == LV_SIGNAL_GET_TYPE) {
- res = ancestor_signal(sw, sign, param);
- if(res != LV_RES_OK) return res;
- return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);
- }
-
- lv_sw_ext_t * ext = lv_obj_get_ext_attr(sw);
-
- /*Save the current (old) value before slider signal modifies it. It will be required in the
- * later calculations*/
- int16_t old_val;
- if(sign == LV_SIGNAL_PRESSING)
- old_val = ext->slider.drag_value;
- else
- old_val = lv_slider_get_value(sw);
-
- /*Don't let the slider to call the action. Switch handles it differently*/
- lv_event_cb_t event_cb = sw->event_cb;
- sw->event_cb = NULL;
-
- /* Include the ancient signal function */
- res = ancestor_signal(sw, sign, param);
- if(res != LV_RES_OK) return res;
-
- sw->event_cb = event_cb;
-
- if(sign == LV_SIGNAL_CLEANUP) {
- /*Nothing to cleanup. (No dynamically allocated memory in 'ext')*/
- } else if(sign == LV_SIGNAL_PRESSED) {
-
- /*Save the x coordinate of the pressed point to see if the switch was slid*/
- lv_indev_t * indev = lv_indev_get_act();
- if(indev) {
- lv_point_t p;
- lv_indev_get_point(indev, &p);
- ext->start_x = p.x;
- }
- ext->slided = 0;
- ext->changed = 0;
- } else if(sign == LV_SIGNAL_PRESSING) {
- /*See if the switch was slid (moved at least a little)*/
- lv_indev_t * indev = lv_indev_get_act();
- if(indev) {
- lv_point_t p = {0, 0};
- lv_indev_get_point(indev, &p);
- if(LV_MATH_ABS(p.x - ext->start_x) > LV_INDEV_DEF_DRAG_LIMIT) ext->slided = 1;
- }
-
- /*If didn't slide then revert the min/max value. So click without slide won't move the
- * switch as a slider*/
- if(ext->slided == 0) {
- if(lv_sw_get_state(sw))
- ext->slider.drag_value = LV_SW_MAX_VALUE;
- else
- ext->slider.drag_value = 0;
- }
-
- /*If explicitly changed (by slide) don't need to be toggled on release*/
- int16_t threshold = LV_SW_MAX_VALUE / 2;
- if((old_val < threshold && ext->slider.drag_value > threshold) ||
- (old_val > threshold && ext->slider.drag_value < threshold)) {
- ext->changed = 1;
- }
- } else if(sign == LV_SIGNAL_PRESS_LOST) {
- if(lv_sw_get_state(sw)) {
- lv_slider_set_style(sw, LV_SLIDER_STYLE_KNOB, ext->style_knob_on);
- lv_slider_set_value(sw, LV_SW_MAX_VALUE, LV_ANIM_ON);
- if(res != LV_RES_OK) return res;
- } else {
- lv_slider_set_style(sw, LV_SLIDER_STYLE_KNOB, ext->style_knob_off);
- lv_slider_set_value(sw, 0, LV_ANIM_ON);
- if(res != LV_RES_OK) return res;
- }
- } else if(sign == LV_SIGNAL_RELEASED) {
- /*If not dragged then toggle the switch*/
- if(ext->changed == 0) {
- int32_t state;
- if(lv_sw_get_state(sw)) {
- lv_sw_off(sw, LV_ANIM_ON);
- state = 0;
- } else {
- lv_sw_on(sw, LV_ANIM_ON);
- state = 1;
- }
-
- res = lv_event_send(sw, LV_EVENT_VALUE_CHANGED, &state);
- if(res != LV_RES_OK) return res;
- }
- /*If the switch was dragged then calculate the new state based on the current position*/
- else {
- int16_t v = lv_slider_get_value(sw);
- int32_t state;
- if(v > LV_SW_MAX_VALUE / 2) {
- lv_sw_on(sw, LV_ANIM_ON);
- state = 1;
- } else {
- lv_sw_off(sw, LV_ANIM_ON);
- state = 0;
- }
- res = lv_event_send(sw, LV_EVENT_VALUE_CHANGED, &state);
- if(res != LV_RES_OK) return res;
- }
- } else if(sign == LV_SIGNAL_CONTROL) {
- char c = *((char *)param);
- uint32_t state;
- if(c == LV_KEY_RIGHT || c == LV_KEY_UP) {
- lv_slider_set_value(sw, LV_SW_MAX_VALUE, true);
- state = 1;
- res = lv_event_send(sw, LV_EVENT_VALUE_CHANGED, &state);
- if(res != LV_RES_OK) return res;
- } else if(c == LV_KEY_LEFT || c == LV_KEY_DOWN) {
- lv_slider_set_value(sw, 0, true);
- state = 0;
- res = lv_event_send(sw, LV_EVENT_VALUE_CHANGED, &state);
- if(res != LV_RES_OK) return res;
- }
- } else if(sign == LV_SIGNAL_GET_EDITABLE) {
- bool * editable = (bool *)param;
- *editable = false; /*The ancestor slider is editable the switch is not*/
- }
-
- return res;
-}
-
-#endif
diff --git a/src/libs/lvgl/src/lv_objx/lv_sw.h b/src/libs/lvgl/src/lv_objx/lv_sw.h
deleted file mode 100644
index f4b44aeb..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_sw.h
+++ /dev/null
@@ -1,159 +0,0 @@
-/**
- * @file lv_sw.h
- *
- */
-
-#ifndef LV_SW_H
-#define LV_SW_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_SW != 0
-
-/*Testing of dependencies*/
-#if LV_USE_SLIDER == 0
-#error "lv_sw: lv_slider is required. Enable it in lv_conf.h (LV_USE_SLIDER 1)"
-#endif
-
-#include "../lv_core/lv_obj.h"
-#include "lv_slider.h"
-
-/*********************
- * DEFINES
- *********************/
-#define LV_SW_MAX_VALUE 100
-
-/**********************
- * TYPEDEFS
- **********************/
-/*Data of switch*/
-typedef struct
-{
- lv_slider_ext_t slider; /*Ext. of ancestor*/
- /*New data for this type */
- const lv_style_t * style_knob_off; /**< Style of the knob when the switch is OFF*/
- const lv_style_t * style_knob_on; /**< Style of the knob when the switch is ON (NULL to use the same as OFF)*/
- lv_coord_t start_x;
- uint8_t changed : 1; /*Indicates the switch state explicitly changed by drag*/
- uint8_t slided : 1;
-#if LV_USE_ANIMATION
- uint16_t anim_time; /*switch animation time */
-#endif
-} lv_sw_ext_t;
-
-/**
- * Switch styles.
- */
-enum {
- LV_SW_STYLE_BG, /**< Switch background. */
- LV_SW_STYLE_INDIC, /**< Switch fill area. */
- LV_SW_STYLE_KNOB_OFF, /**< Switch knob (when off). */
- LV_SW_STYLE_KNOB_ON, /**< Switch knob (when on). */
-};
-typedef uint8_t lv_sw_style_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Create a switch objects
- * @param par pointer to an object, it will be the parent of the new switch
- * @param copy pointer to a switch object, if not NULL then the new object will be copied from it
- * @return pointer to the created switch
- */
-lv_obj_t * lv_sw_create(lv_obj_t * par, const lv_obj_t * copy);
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Turn ON the switch
- * @param sw pointer to a switch object
- * @param anim LV_ANIM_ON: set the value with an animation; LV_ANIM_OFF: change the value immediately
- */
-void lv_sw_on(lv_obj_t * sw, lv_anim_enable_t anim);
-
-/**
- * Turn OFF the switch
- * @param sw pointer to a switch object
- * @param anim LV_ANIM_ON: set the value with an animation; LV_ANIM_OFF: change the value immediately
- */
-void lv_sw_off(lv_obj_t * sw, lv_anim_enable_t anim);
-
-/**
- * Toggle the position of the switch
- * @param sw pointer to a switch object
- * @param anim LV_ANIM_ON: set the value with an animation; LV_ANIM_OFF: change the value immediately
- * @return resulting state of the switch.
- */
-bool lv_sw_toggle(lv_obj_t * sw, lv_anim_enable_t anim);
-
-/**
- * Set a style of a switch
- * @param sw pointer to a switch object
- * @param type which style should be set
- * @param style pointer to a style
- */
-void lv_sw_set_style(lv_obj_t * sw, lv_sw_style_t type, const lv_style_t * style);
-
-/**
- * Set the animation time of the switch
- * @param sw pointer to a switch object
- * @param anim_time animation time
- * @return style pointer to a style
- */
-void lv_sw_set_anim_time(lv_obj_t * sw, uint16_t anim_time);
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the state of a switch
- * @param sw pointer to a switch object
- * @return false: OFF; true: ON
- */
-static inline bool lv_sw_get_state(const lv_obj_t * sw)
-{
- return lv_bar_get_value(sw) < LV_SW_MAX_VALUE / 2 ? false : true;
-}
-
-/**
- * Get a style of a switch
- * @param sw pointer to a switch object
- * @param type which style should be get
- * @return style pointer to a style
- */
-const lv_style_t * lv_sw_get_style(const lv_obj_t * sw, lv_sw_style_t type);
-
-/**
- * Get the animation time of the switch
- * @param sw pointer to a switch object
- * @return style pointer to a style
- */
-uint16_t lv_sw_get_anim_time(const lv_obj_t * sw);
-
-/**********************
- * MACROS
- **********************/
-
-#endif /*LV_USE_SW*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_SW_H*/
diff --git a/src/libs/lvgl/src/lv_objx/lv_ta.c b/src/libs/lvgl/src/lv_objx/lv_ta.c
deleted file mode 100644
index 387e99b2..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_ta.c
+++ /dev/null
@@ -1,1948 +0,0 @@
-/**
- * @file lv_ta.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_ta.h"
-#if LV_USE_TA != 0
-#include <string.h>
-#include "../lv_core/lv_debug.h"
-#include "../lv_core/lv_group.h"
-#include "../lv_core/lv_refr.h"
-#include "../lv_draw/lv_draw.h"
-#include "../lv_themes/lv_theme.h"
-#include "../lv_misc/lv_anim.h"
-#include "../lv_misc/lv_txt.h"
-#include "../lv_misc/lv_math.h"
-
-/*********************
- * DEFINES
- *********************/
-#define LV_OBJX_NAME "lv_ta"
-
-/*Test configuration*/
-#ifndef LV_TA_DEF_CURSOR_BLINK_TIME
-#define LV_TA_DEF_CURSOR_BLINK_TIME 400 /*ms*/
-#endif
-
-#ifndef LV_TA_DEF_PWD_SHOW_TIME
-#define LV_TA_DEF_PWD_SHOW_TIME 1500 /*ms*/
-#endif
-
-#define LV_TA_DEF_WIDTH (2 * LV_DPI)
-#define LV_TA_DEF_HEIGHT (1 * LV_DPI)
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static bool lv_ta_design(lv_obj_t * ta, const lv_area_t * mask, lv_design_mode_t mode);
-static bool lv_ta_scrollable_design(lv_obj_t * scrl, const lv_area_t * mask, lv_design_mode_t mode);
-static lv_res_t lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param);
-static lv_res_t lv_ta_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, void * param);
-#if LV_USE_ANIMATION
-static void cursor_blink_anim(lv_obj_t * ta, lv_anim_value_t show);
-static void pwd_char_hider_anim(lv_obj_t * ta, lv_anim_value_t x);
-static void pwd_char_hider_anim_ready(lv_anim_t * a);
-#endif
-static void pwd_char_hider(lv_obj_t * ta);
-static bool char_is_accepted(lv_obj_t * ta, uint32_t c);
-static void get_cursor_style(lv_obj_t * ta, lv_style_t * style_res);
-static void refr_cursor_area(lv_obj_t * ta);
-static void placeholder_update(lv_obj_t * ta);
-static void update_cursor_position_on_click(lv_obj_t * ta, lv_signal_t sign, lv_indev_t * click_source);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_design_cb_t ancestor_design;
-static lv_design_cb_t scrl_design;
-static lv_signal_cb_t ancestor_signal;
-static lv_signal_cb_t scrl_signal;
-static const char * ta_insert_replace;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Create a text area objects
- * @param par pointer to an object, it will be the parent of the new text area
- * @param copy pointer to a text area object, if not NULL then the new object will be copied from it
- * @return pointer to the created text area
- */
-lv_obj_t * lv_ta_create(lv_obj_t * par, const lv_obj_t * copy)
-{
- LV_LOG_TRACE("text area create started");
-
- /*Create the ancestor object*/
- lv_obj_t * new_ta = lv_page_create(par, copy);
- LV_ASSERT_MEM(new_ta);
- if(new_ta == NULL) return NULL;
-
- if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_ta);
- if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_cb(new_ta);
- if(scrl_signal == NULL) scrl_signal = lv_obj_get_signal_cb(lv_page_get_scrl(new_ta));
- if(scrl_design == NULL) scrl_design = lv_obj_get_design_cb(lv_page_get_scrl(new_ta));
-
- /*Allocate the object type specific extended data*/
- lv_ta_ext_t * ext = lv_obj_allocate_ext_attr(new_ta, sizeof(lv_ta_ext_t));
- LV_ASSERT_MEM(ext);
- if(ext == NULL) return NULL;
-
- ext->cursor.state = 1;
- ext->pwd_mode = 0;
- ext->pwd_tmp = NULL;
- ext->pwd_show_time = LV_TA_DEF_PWD_SHOW_TIME;
- ext->accapted_chars = NULL;
- ext->max_length = 0;
- ext->cursor.style = NULL;
- ext->cursor.blink_time = LV_TA_DEF_CURSOR_BLINK_TIME;
- ext->cursor.pos = 0;
- ext->cursor.click_pos = 1;
- ext->cursor.type = LV_CURSOR_LINE;
- ext->cursor.valid_x = 0;
- ext->one_line = 0;
-#if LV_LABEL_TEXT_SEL
- ext->text_sel_en = 0;
-#endif
- ext->label = NULL;
- ext->placeholder = NULL;
-
-#if LV_USE_ANIMATION == 0
- ext->pwd_show_time = 0;
- ext->cursor.blink_time = 0;
-#endif
-
- lv_obj_set_signal_cb(new_ta, lv_ta_signal);
- lv_obj_set_signal_cb(lv_page_get_scrl(new_ta), lv_ta_scrollable_signal);
- lv_obj_set_design_cb(new_ta, lv_ta_design);
-
- /*Init the new text area object*/
- if(copy == NULL) {
- lv_page_set_scrl_fit2(new_ta, LV_FIT_FLOOD, LV_FIT_TIGHT);
-
- ext->label = lv_label_create(new_ta, NULL);
-
- lv_obj_set_design_cb(ext->page.scrl, lv_ta_scrollable_design);
-
- lv_label_set_long_mode(ext->label, LV_LABEL_LONG_BREAK);
- lv_label_set_text(ext->label, "Text area");
- lv_obj_set_click(ext->label, false);
- lv_obj_set_size(new_ta, LV_TA_DEF_WIDTH, LV_TA_DEF_HEIGHT);
- lv_ta_set_sb_mode(new_ta, LV_SB_MODE_DRAG);
- lv_page_set_style(new_ta, LV_PAGE_STYLE_SCRL, &lv_style_transp_tight);
-
- /*Set the default styles*/
- lv_theme_t * th = lv_theme_get_current();
- if(th) {
- lv_ta_set_style(new_ta, LV_TA_STYLE_BG, th->style.ta.area);
- lv_ta_set_style(new_ta, LV_TA_STYLE_SB, th->style.ta.sb);
- } else {
- lv_ta_set_style(new_ta, LV_TA_STYLE_BG, &lv_style_pretty);
- }
- }
- /*Copy an existing object*/
- else {
- lv_obj_set_design_cb(ext->page.scrl, lv_ta_scrollable_design);
- lv_ta_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
- ext->label = lv_label_create(new_ta, copy_ext->label);
- ext->pwd_mode = copy_ext->pwd_mode;
- ext->accapted_chars = copy_ext->accapted_chars;
- ext->max_length = copy_ext->max_length;
- ext->cursor.style = copy_ext->cursor.style;
- ext->cursor.pos = copy_ext->cursor.pos;
- ext->cursor.valid_x = copy_ext->cursor.valid_x;
- ext->cursor.type = copy_ext->cursor.type;
-
- if(ext->pwd_mode != 0) pwd_char_hider( new_ta);
-
- if(copy_ext->placeholder != NULL)
- ext->placeholder = lv_label_create(new_ta, copy_ext->placeholder);
- else
- ext->placeholder = NULL;
-
- if(copy_ext->pwd_tmp) {
- uint16_t len = lv_mem_get_size(copy_ext->pwd_tmp);
- ext->pwd_tmp = lv_mem_alloc(len);
- LV_ASSERT_MEM(ext->pwd_tmp);
- if(ext->pwd_tmp == NULL) return NULL;
-
- memcpy(ext->pwd_tmp, copy_ext->pwd_tmp, len);
- }
-
- if(copy_ext->one_line) lv_ta_set_one_line(new_ta, true);
-
- lv_ta_set_style(new_ta, LV_TA_STYLE_CURSOR, lv_ta_get_style(copy, LV_TA_STYLE_CURSOR));
-
- /*Refresh the style with new signal function*/
- lv_obj_refresh_style(new_ta);
- }
-
-#if LV_USE_ANIMATION
- if(ext->cursor.blink_time) {
- /*Create a cursor blinker animation*/
- lv_anim_t a;
- a.var = new_ta;
- a.exec_cb = (lv_anim_exec_xcb_t)cursor_blink_anim;
- a.time = ext->cursor.blink_time;
- a.act_time = 0;
- a.ready_cb = NULL;
- a.start = 1;
- a.end = 0;
- a.repeat = 1;
- a.repeat_pause = 0;
- a.playback = 1;
- a.playback_pause = 0;
- a.path_cb = lv_anim_path_step;
- lv_anim_create(&a);
- }
-#endif
-
- LV_LOG_INFO("text area created");
-
- return new_ta;
-}
-
-/*======================
- * Add/remove functions
- *=====================*/
-
-/**
- * Insert a character to the current cursor position.
- * To add a wide char, e.g. 'Á' use `lv_txt_encoded_conv_wc('Á')`
- * @param ta pointer to a text area object
- * @param c a character (e.g. 'a')
- */
-void lv_ta_add_char(lv_obj_t * ta, uint32_t c)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
-
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
-
- uint32_t letter_buf[2];
- letter_buf[0] = c;
- letter_buf[1] = '\0';
-
- ta_insert_replace = NULL;
- lv_event_send(ta, LV_EVENT_INSERT, letter_buf);
- if(ta_insert_replace) {
- if(ta_insert_replace[0] == '\0') return; /*Drop this text*/
-
- /*Add the replaced text directly it's different from the original*/
- if(strcmp(ta_insert_replace, (char *)letter_buf)) {
- lv_ta_add_text(ta, ta_insert_replace);
- return;
- }
- }
-
- if(ext->one_line && (c == '\n' || c == '\r')) {
- LV_LOG_INFO("Text area: line break ignored in one-line mode");
- return;
- }
-
- uint32_t c_uni = lv_txt_encoded_next((const char *)&c, NULL);
-
- if(char_is_accepted(ta, c_uni) == false) {
- LV_LOG_INFO("Character is no accepted by the text area (too long text or not in the "
- "accepted list)");
- return;
- }
-
- /*If a new line was added it shouldn't show edge flash effect*/
- bool edge_flash_en = lv_ta_get_edge_flash(ta);
- lv_ta_set_edge_flash(ta, false);
-
- if(ext->pwd_mode != 0) pwd_char_hider(ta); /*Make sure all the current text contains only '*'*/
-
- lv_label_ins_text(ext->label, ext->cursor.pos, (const char *)letter_buf); /*Insert the character*/
- lv_ta_clear_selection(ta); /*Clear selection*/
-
- if(ext->pwd_mode != 0) {
-
- ext->pwd_tmp = lv_mem_realloc(ext->pwd_tmp, strlen(ext->pwd_tmp) + 2); /*+2: the new char + \0 */
- LV_ASSERT_MEM(ext->pwd_tmp);
- if(ext->pwd_tmp == NULL) return;
-
- lv_txt_ins(ext->pwd_tmp, ext->cursor.pos, (const char *)letter_buf);
-
-#if LV_USE_ANIMATION
- /*Auto hide characters*/
- lv_anim_t a;
- a.var = ta;
- a.exec_cb = (lv_anim_exec_xcb_t)pwd_char_hider_anim;
- a.time = ext->pwd_show_time;
- a.act_time = 0;
- a.ready_cb = pwd_char_hider_anim_ready;
- a.start = 0;
- a.end = 1;
- a.repeat = 0;
- a.repeat_pause = 0;
- a.playback = 0;
- a.playback_pause = 0;
- a.path_cb = lv_anim_path_step;
- lv_anim_create(&a);
-
-#else
- pwd_char_hider(ta);
-#endif
- }
-
- /*Move the cursor after the new character*/
- lv_ta_set_cursor_pos(ta, lv_ta_get_cursor_pos(ta) + 1);
-
- /*Revert the original edge flash state*/
- lv_ta_set_edge_flash(ta, edge_flash_en);
-
- placeholder_update(ta);
-
- lv_event_send(ta, LV_EVENT_VALUE_CHANGED, NULL);
-}
-
-/**
- * Insert a text to the current cursor position
- * @param ta pointer to a text area object
- * @param txt a '\0' terminated string to insert
- */
-void lv_ta_add_text(lv_obj_t * ta, const char * txt)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
- LV_ASSERT_NULL(txt);
-
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
-
- ta_insert_replace = NULL;
- lv_event_send(ta, LV_EVENT_INSERT, txt);
- if(ta_insert_replace) {
- if(ta_insert_replace[0] == '\0') return; /*Drop this text*/
-
- /*Add the replaced text directly it's different from the original*/
- if(strcmp(ta_insert_replace, txt)) {
- lv_ta_add_text(ta, ta_insert_replace);
- return;
- }
- }
-
- if(ext->pwd_mode != 0) pwd_char_hider(ta); /*Make sure all the current text contains only '*'*/
-
- /*Add the character one-by-one if not all characters are accepted or there is character limit.*/
- if(lv_ta_get_accepted_chars(ta) || lv_ta_get_max_length(ta)) {
- uint32_t i = 0;
- while(txt[i] != '\0') {
- uint32_t c = lv_txt_encoded_next(txt, &i);
- lv_ta_add_char(ta, lv_txt_unicode_to_encoded(c));
- }
- return;
- }
-
- /*If a new line was added it shouldn't show edge flash effect*/
- bool edge_flash_en = lv_ta_get_edge_flash(ta);
- lv_ta_set_edge_flash(ta, false);
-
- /*Insert the text*/
- lv_label_ins_text(ext->label, ext->cursor.pos, txt);
- lv_ta_clear_selection(ta);
-
- if(ext->pwd_mode != 0) {
- ext->pwd_tmp = lv_mem_realloc(ext->pwd_tmp, strlen(ext->pwd_tmp) + strlen(txt) + 1);
- LV_ASSERT_MEM(ext->pwd_tmp);
- if(ext->pwd_tmp == NULL) return;
-
- lv_txt_ins(ext->pwd_tmp, ext->cursor.pos, txt);
-
-#if LV_USE_ANIMATION
- /*Auto hide characters*/
- lv_anim_t a;
- a.var = ta;
- a.exec_cb = (lv_anim_exec_xcb_t)pwd_char_hider_anim;
- a.time = ext->pwd_show_time;
- a.act_time = 0;
- a.ready_cb = pwd_char_hider_anim_ready;
- a.start = 0;
- a.end = 1;
- a.repeat = 0;
- a.repeat_pause = 0;
- a.playback = 0;
- a.playback_pause = 0;
- a.path_cb = lv_anim_path_step;
- lv_anim_create(&a);
-#else
- pwd_char_hider(ta);
-#endif
- }
-
- /*Move the cursor after the new text*/
- lv_ta_set_cursor_pos(ta, lv_ta_get_cursor_pos(ta) + lv_txt_get_encoded_length(txt));
-
- /*Revert the original edge flash state*/
- lv_ta_set_edge_flash(ta, edge_flash_en);
-
- placeholder_update(ta);
-
- lv_event_send(ta, LV_EVENT_VALUE_CHANGED, NULL);
-}
-
-/**
- * Delete a the left character from the current cursor position
- * @param ta pointer to a text area object
- */
-void lv_ta_del_char(lv_obj_t * ta)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
-
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
- uint16_t cur_pos = ext->cursor.pos;
-
- if(cur_pos == 0) return;
-
- ta_insert_replace = NULL;
- char del_buf[2] = {LV_KEY_DEL, '\0'};
- lv_event_send(ta, LV_EVENT_INSERT, del_buf);
- if(ta_insert_replace) {
- if(ta_insert_replace[0] == '\0') return; /*Drop this text*/
-
- /*Add the replaced text directly it's different from the original*/
- if(strcmp(ta_insert_replace, del_buf)) {
- lv_ta_add_text(ta, ta_insert_replace);
- return;
- }
- }
-
- char * label_txt = lv_label_get_text(ext->label);
- /*Delete a character*/
- lv_txt_cut(label_txt, ext->cursor.pos - 1, 1);
- /*Refresh the label*/
- lv_label_set_text(ext->label, label_txt);
- lv_ta_clear_selection(ta);
-
- /*Don't let 'width == 0' because cursor will not be visible*/
- if(lv_obj_get_width(ext->label) == 0) {
- const lv_style_t * style = lv_obj_get_style(ext->label);
- lv_obj_set_width(ext->label, style->line.width);
- }
-
- if(ext->pwd_mode != 0) {
- uint32_t byte_pos = lv_txt_encoded_get_byte_id(ext->pwd_tmp, ext->cursor.pos - 1);
- lv_txt_cut(ext->pwd_tmp, ext->cursor.pos - 1, lv_txt_encoded_size(&label_txt[byte_pos]));
-
- ext->pwd_tmp = lv_mem_realloc(ext->pwd_tmp, strlen(ext->pwd_tmp) + 1);
- LV_ASSERT_MEM(ext->pwd_tmp);
- if(ext->pwd_tmp == NULL) return;
- }
-
- /*Move the cursor to the place of the deleted character*/
- lv_ta_set_cursor_pos(ta, ext->cursor.pos - 1);
-
- placeholder_update(ta);
-
- lv_event_send(ta, LV_EVENT_VALUE_CHANGED, NULL);
-}
-
-/**
- * Delete the right character from the current cursor position
- * @param ta pointer to a text area object
- */
-void lv_ta_del_char_forward(lv_obj_t * ta)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
-
- uint16_t cp = lv_ta_get_cursor_pos(ta);
- lv_ta_set_cursor_pos(ta, cp + 1);
- if(cp != lv_ta_get_cursor_pos(ta)) lv_ta_del_char(ta);
-}
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set the text of a text area
- * @param ta pointer to a text area
- * @param txt pointer to the text
- */
-void lv_ta_set_text(lv_obj_t * ta, const char * txt)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
- LV_ASSERT_NULL(txt);
-
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
-
- /*Clear the existing selection*/
- lv_ta_clear_selection(ta);
-
- /*Add the character one-by-one if not all characters are accepted or there is character limit.*/
- if(lv_ta_get_accepted_chars(ta) || lv_ta_get_max_length(ta)) {
- lv_label_set_text(ext->label, "");
- lv_ta_set_cursor_pos(ta, LV_TA_CURSOR_LAST);
- if(ext->pwd_mode != 0) {
- ext->pwd_tmp[0] = '\0'; /*Clear the password too*/
- }
- uint32_t i = 0;
- while(txt[i] != '\0') {
- uint32_t c = lv_txt_encoded_next(txt, &i);
- lv_ta_add_char(ta, lv_txt_unicode_to_encoded(c));
- }
- } else {
- lv_label_set_text(ext->label, txt);
- lv_ta_set_cursor_pos(ta, LV_TA_CURSOR_LAST);
- }
-
- /*Don't let 'width == 0' because the cursor will not be visible*/
- if(lv_obj_get_width(ext->label) == 0) {
- const lv_style_t * style = lv_obj_get_style(ext->label);
- lv_obj_set_width(ext->label, lv_font_get_glyph_width(style->text.font, ' ', '\0'));
- }
-
- if(ext->pwd_mode != 0) {
- ext->pwd_tmp = lv_mem_realloc(ext->pwd_tmp, strlen(txt) + 1);
- LV_ASSERT_MEM(ext->pwd_tmp);
- if(ext->pwd_tmp == NULL) return;
- strcpy(ext->pwd_tmp, txt);
-
-#if LV_USE_ANIMATION
- /*Auto hide characters*/
- lv_anim_t a;
- a.var = ta;
- a.exec_cb = (lv_anim_exec_xcb_t)pwd_char_hider_anim;
- a.time = ext->pwd_show_time;
- a.act_time = 0;
- a.ready_cb = pwd_char_hider_anim_ready;
- a.start = 0;
- a.end = 1;
- a.repeat = 0;
- a.repeat_pause = 0;
- a.playback = 0;
- a.playback_pause = 0;
- a.path_cb = lv_anim_path_step;
- lv_anim_create(&a);
-#else
- pwd_char_hider(ta);
-#endif
- }
-
- placeholder_update(ta);
-
- lv_event_send(ta, LV_EVENT_VALUE_CHANGED, NULL);
-}
-
-/**
- * Set the placeholder text of a text area
- * @param ta pointer to a text area
- * @param txt pointer to the text
- */
-void lv_ta_set_placeholder_text(lv_obj_t * ta, const char * txt)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
- LV_ASSERT_NULL(txt);
-
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
-
- /*Create the placeholder label only when it is needed*/
- if(ext->placeholder == NULL) {
- ext->placeholder = lv_label_create(ta, NULL);
-
- if(ext->one_line) {
- lv_label_set_long_mode(ext->placeholder, LV_LABEL_LONG_EXPAND);
- } else {
- lv_label_set_long_mode(ext->placeholder, LV_LABEL_LONG_BREAK);
- }
- }
-
- lv_label_set_text(ext->placeholder, txt);
-
- /*Refresh the placeholder's align*/
- lv_ta_set_text_align(ta, lv_label_get_align(ext->label));
-
- placeholder_update(ta);
-}
-
-/**
- * Set the cursor position
- * @param obj pointer to a text area object
- * @param pos the new cursor position in character index
- * < 0 : index from the end of the text
- * LV_TA_CURSOR_LAST: go after the last character
- */
-void lv_ta_set_cursor_pos(lv_obj_t * ta, int16_t pos)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
-
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
- if(ext->cursor.pos == pos) return;
-
- uint16_t len = lv_txt_get_encoded_length(lv_label_get_text(ext->label));
-
- if(pos < 0) pos = len + pos;
-
- if(pos > len || pos == LV_TA_CURSOR_LAST) pos = len;
-
- ext->cursor.pos = pos;
-
- /*Position the label to make the cursor visible*/
- lv_obj_t * label_par = lv_obj_get_parent(ext->label);
- lv_point_t cur_pos;
- const lv_style_t * style = lv_obj_get_style(ta);
- const lv_font_t * font_p = style->text.font;
- lv_area_t label_cords;
- lv_area_t ta_cords;
- lv_label_get_letter_pos(ext->label, pos, &cur_pos);
- lv_obj_get_coords(ta, &ta_cords);
- lv_obj_get_coords(ext->label, &label_cords);
-
- /*Check the top*/
- lv_coord_t font_h = lv_font_get_line_height(font_p);
- if(lv_obj_get_y(label_par) + cur_pos.y < 0) {
- lv_obj_set_y(label_par, -cur_pos.y + style->body.padding.top);
- }
-
- /*Check the bottom*/
- if(label_cords.y1 + cur_pos.y + font_h + style->body.padding.bottom > ta_cords.y2) {
- lv_obj_set_y(label_par, -(cur_pos.y - lv_obj_get_height(ta) + font_h + style->body.padding.top +
- style->body.padding.bottom));
- }
- /*Check the left (use the font_h as general unit)*/
- if(lv_obj_get_x(label_par) + cur_pos.x < font_h) {
- lv_obj_set_x(label_par, -cur_pos.x + font_h);
- }
-
- /*Check the right (use the font_h as general unit)*/
- if(label_cords.x1 + cur_pos.x + font_h + style->body.padding.right > ta_cords.x2) {
- lv_obj_set_x(label_par, -(cur_pos.x - lv_obj_get_width(ta) + font_h + style->body.padding.left +
- style->body.padding.right));
- }
-
- ext->cursor.valid_x = cur_pos.x;
-
-#if LV_USE_ANIMATION
- if(ext->cursor.blink_time) {
- /*Reset cursor blink animation*/
- lv_anim_t a;
- a.var = ta;
- a.exec_cb = (lv_anim_exec_xcb_t)cursor_blink_anim;
- a.time = ext->cursor.blink_time;
- a.act_time = 0;
- a.ready_cb = NULL;
- a.start = 1;
- a.end = 0;
- a.repeat = 1;
- a.repeat_pause = 0;
- a.playback = 1;
- a.playback_pause = 0;
- a.path_cb = lv_anim_path_step;
- lv_anim_create(&a);
- }
-#endif
-
- refr_cursor_area(ta);
-}
-
-/**
- * Set the cursor type.
- * @param ta pointer to a text area object
- * @param cur_type: element of 'lv_ta_cursor_type_t'
- */
-void lv_ta_set_cursor_type(lv_obj_t * ta, lv_cursor_type_t cur_type)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
-
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
- if(ext->cursor.type == cur_type) return;
-
- ext->cursor.type = cur_type;
-
- refr_cursor_area(ta);
-}
-
-/**
- * Enable/Disable the positioning of the the cursor by clicking the text on the text area.
- * @param ta pointer to a text area object
- * @param en true: enable click positions; false: disable
- */
-void lv_ta_set_cursor_click_pos(lv_obj_t * ta, bool en)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
-
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
- ext->cursor.click_pos = en ? 1 : 0;
-}
-
-/**
- * Enable/Disable password mode
- * @param ta pointer to a text area object
- * @param en true: enable, false: disable
- */
-void lv_ta_set_pwd_mode(lv_obj_t * ta, bool en)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
-
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
- if(ext->pwd_mode == en) return;
-
- /*Pwd mode is now enabled*/
- if(ext->pwd_mode == 0 && en != false) {
- char * txt = lv_label_get_text(ext->label);
- size_t len = strlen(txt);
- ext->pwd_tmp = lv_mem_alloc(len + 1);
- LV_ASSERT_MEM(ext->pwd_tmp);
- if(ext->pwd_tmp == NULL) return;
-
- strcpy(ext->pwd_tmp, txt);
-
- uint16_t i;
- uint16_t encoded_len = lv_txt_get_encoded_length(txt);
- for(i = 0; i < encoded_len; i++) {
- txt[i] = '*'; /*All char to '*'*/
- }
- txt[i] = '\0';
-
- lv_ta_clear_selection(ta);
-
- lv_label_set_text(ext->label, NULL);
- }
- /*Pwd mode is now disabled*/
- else if(ext->pwd_mode == 1 && en == false) {
- lv_ta_clear_selection(ta);
- lv_label_set_text(ext->label, ext->pwd_tmp);
- lv_mem_free(ext->pwd_tmp);
- ext->pwd_tmp = NULL;
- }
-
- ext->pwd_mode = en == false ? 0 : 1;
-
- refr_cursor_area(ta);
-}
-
-/**
- * Configure the text area to one line or back to normal
- * @param ta pointer to a Text area object
- * @param en true: one line, false: normal
- */
-void lv_ta_set_one_line(lv_obj_t * ta, bool en)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
-
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
- if(ext->one_line == en) return;
- lv_label_align_t old_align = lv_label_get_align(ext->label);
-
- if(en) {
- const lv_style_t * style_ta = lv_obj_get_style(ta);
- const lv_style_t * style_scrl = lv_obj_get_style(lv_page_get_scrl(ta));
- const lv_style_t * style_label = lv_obj_get_style(ext->label);
- lv_coord_t font_h = lv_font_get_line_height(style_label->text.font);
-
- ext->one_line = 1;
- lv_page_set_scrl_fit2(ta, LV_FIT_TIGHT, LV_FIT_FLOOD);
- lv_obj_set_height(ta, font_h + style_ta->body.padding.top + style_ta->body.padding.bottom +
- style_scrl->body.padding.top + style_scrl->body.padding.bottom);
- lv_label_set_long_mode(ext->label, LV_LABEL_LONG_EXPAND);
- if(ext->placeholder) lv_label_set_long_mode(ext->placeholder, LV_LABEL_LONG_EXPAND);
- lv_obj_set_pos(lv_page_get_scrl(ta), style_ta->body.padding.left, style_ta->body.padding.top);
- } else {
- const lv_style_t * style_ta = lv_obj_get_style(ta);
-
- ext->one_line = 0;
- lv_page_set_scrl_fit2(ta, LV_FIT_FLOOD, LV_FIT_TIGHT);
- lv_label_set_long_mode(ext->label, LV_LABEL_LONG_BREAK);
- if(ext->placeholder) lv_label_set_long_mode(ext->placeholder, LV_LABEL_LONG_BREAK);
-
- lv_obj_set_height(ta, LV_TA_DEF_HEIGHT);
- lv_obj_set_pos(lv_page_get_scrl(ta), style_ta->body.padding.left, style_ta->body.padding.top);
- }
-
- placeholder_update(ta);
- /* `refr_cursor_area` is called at the end of lv_ta_set_text_align */
- lv_ta_set_text_align(ta, old_align);
-}
-
-/**
- * Set the alignment of the text area.
- * In one line mode the text can be scrolled only with `LV_LABEL_ALIGN_LEFT`.
- * This function should be called if the size of text area changes.
- * @param ta pointer to a text are object
- * @param align the desired alignment from `lv_label_align_t`. (LV_LABEL_ALIGN_LEFT/CENTER/RIGHT)
- */
-void lv_ta_set_text_align(lv_obj_t * ta, lv_label_align_t align)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
-
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
- lv_obj_t * label = lv_ta_get_label(ta);
- if(!ext->one_line) {
- lv_label_set_align(label, align);
- if(ext->placeholder) lv_label_set_align(ext->placeholder, align);
- } else {
- /*Normal left align. Just let the text expand*/
- if(align == LV_LABEL_ALIGN_LEFT) {
- lv_label_set_long_mode(label, LV_LABEL_LONG_EXPAND);
- lv_page_set_scrl_fit2(ta, LV_FIT_TIGHT, LV_FIT_FLOOD);
- lv_label_set_align(label, align);
- if(ext->placeholder) lv_label_set_align(ext->placeholder, align);
-
- }
- /*Else use fix label width equal to the Text area width*/
- else {
- lv_label_set_long_mode(label, LV_LABEL_LONG_CROP);
- lv_page_set_scrl_fit2(ta, LV_FIT_FLOOD, LV_FIT_FLOOD);
- lv_label_set_align(label, align);
- if(ext->placeholder) lv_label_set_align(ext->placeholder, align);
-
- lv_obj_set_width(label, lv_page_get_fit_width(ta));
- }
- }
-
- refr_cursor_area(ta);
-}
-
-/**
- * Set a list of characters. Only these characters will be accepted by the text area
- * @param ta pointer to Text Area
- * @param list list of characters. Only the pointer is saved. E.g. "+-.,0123456789"
- */
-void lv_ta_set_accepted_chars(lv_obj_t * ta, const char * list)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
-
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
-
- ext->accapted_chars = list;
-}
-
-/**
- * Set max length of a Text Area.
- * @param ta pointer to Text Area
- * @param num the maximal number of characters can be added (`lv_ta_set_text` ignores it)
- */
-void lv_ta_set_max_length(lv_obj_t * ta, uint16_t num)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
-
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
-
- ext->max_length = num;
-}
-
-/**
- * In `LV_EVENT_INSERT` the text which planned to be inserted can be replaced by an other text.
- * It can be used to add automatic formatting to the text area.
- * @param ta pointer to a text area.
- * @param txt pointer to a new string to insert. If `""` no text will be added.
- * The variable must be live after the `event_cb` exists. (Should be `global` or
- * `static`)
- */
-void lv_ta_set_insert_replace(lv_obj_t * ta, const char * txt)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
-
- (void)ta; /*Unused*/
- ta_insert_replace = txt;
-}
-
-/**
- * Set a style of a text area
- * @param ta pointer to a text area object
- * @param type which style should be set
- * @param style pointer to a style
- */
-void lv_ta_set_style(lv_obj_t * ta, lv_ta_style_t type, const lv_style_t * style)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
-
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
-
- switch(type) {
- case LV_TA_STYLE_BG: lv_page_set_style(ta, LV_PAGE_STYLE_BG, style); break;
- case LV_TA_STYLE_SB: lv_page_set_style(ta, LV_PAGE_STYLE_SB, style); break;
- case LV_TA_STYLE_EDGE_FLASH: lv_page_set_style(ta, LV_PAGE_STYLE_EDGE_FLASH, style); break;
- case LV_TA_STYLE_CURSOR:
- ext->cursor.style = style;
- lv_obj_refresh_ext_draw_pad(lv_page_get_scrl(ta)); /*Refresh ext. size because of cursor drawing*/
- refr_cursor_area(ta);
- break;
- case LV_TA_STYLE_PLACEHOLDER:
- if(ext->placeholder) lv_label_set_style(ext->placeholder, LV_LABEL_STYLE_MAIN, style);
- break;
- }
-}
-
-/**
- * Enable/disable selection mode.
- * @param ta pointer to a text area object
- * @param en true or false to enable/disable selection mode
- */
-void lv_ta_set_text_sel(lv_obj_t * ta, bool en)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
-
-#if LV_LABEL_TEXT_SEL
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
-
- ext->text_sel_en = en;
-
- if(!en) lv_ta_clear_selection(ta);
-#else
- (void)ta; /*Unused*/
- (void)en; /*Unused*/
-#endif
-}
-
-/**
- * Set how long show the password before changing it to '*'
- * @param ta pointer to Text area
- * @param time show time in milliseconds. 0: hide immediately.
- */
-void lv_ta_set_pwd_show_time(lv_obj_t * ta, uint16_t time)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
-
-#if LV_USE_ANIMATION == 0
- time = 0;
-#endif
-
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
- ext->pwd_show_time = time;
-}
-
-/**
- * Set cursor blink animation time
- * @param ta pointer to Text area
- * @param time blink period. 0: disable blinking
- */
-void lv_ta_set_cursor_blink_time(lv_obj_t * ta, uint16_t time)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
-
-#if LV_USE_ANIMATION == 0
- time = 0;
-#endif
-
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
- ext->cursor.blink_time = time;
-
-#if LV_USE_ANIMATION
- if(ext->cursor.blink_time) {
- /*Reset cursor blink animation*/
- lv_anim_t a;
- a.var = ta;
- a.exec_cb = (lv_anim_exec_xcb_t)cursor_blink_anim;
- a.time = ext->cursor.blink_time;
- a.act_time = 0;
- a.ready_cb = NULL;
- a.start = 1;
- a.end = 0;
- a.repeat = 1;
- a.repeat_pause = 0;
- a.playback = 1;
- a.playback_pause = 0;
- a.path_cb = lv_anim_path_step;
- lv_anim_create(&a);
- } else {
- lv_anim_del(ta, (lv_anim_exec_xcb_t)cursor_blink_anim);
- ext->cursor.state = 1;
- }
-#else
- ext->cursor.state = 1;
-#endif
-}
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the text of a text area. In password mode it gives the real text (not '*'s).
- * @param ta pointer to a text area object
- * @return pointer to the text
- */
-const char * lv_ta_get_text(const lv_obj_t * ta)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
-
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
-
- const char * txt;
- if(ext->pwd_mode == 0) {
- txt = lv_label_get_text(ext->label);
- } else {
- txt = ext->pwd_tmp;
- }
-
- return txt;
-}
-
-/**
- * Get the placeholder text of a text area
- * @param ta pointer to a text area object
- * @return pointer to the text
- */
-const char * lv_ta_get_placeholder_text(lv_obj_t * ta)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
-
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
-
- const char * txt = NULL;
-
- if(ext->placeholder) txt = lv_label_get_text(ext->placeholder);
-
- return txt;
-}
-
-/**
- * Get the label of a text area
- * @param ta pointer to a text area object
- * @return pointer to the label object
- */
-lv_obj_t * lv_ta_get_label(const lv_obj_t * ta)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
-
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
- return ext->label;
-}
-
-/**
- * Get the current cursor position in character index
- * @param ta pointer to a text area object
- * @return the cursor position
- */
-uint16_t lv_ta_get_cursor_pos(const lv_obj_t * ta)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
-
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
- return ext->cursor.pos;
-}
-
-/**
- * Get the current cursor type.
- * @param ta pointer to a text area object
- * @return element of 'lv_ta_cursor_type_t'
- */
-lv_cursor_type_t lv_ta_get_cursor_type(const lv_obj_t * ta)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
-
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
- return ext->cursor.type;
-}
-
-/**
- * Get whether the cursor click positioning is enabled or not.
- * @param ta pointer to a text area object
- * @return true: enable click positions; false: disable
- */
-bool lv_ta_get_cursor_click_pos(lv_obj_t * ta)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
-
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
- return ext->cursor.click_pos ? true : false;
-}
-
-/**
- * Get the password mode attribute
- * @param ta pointer to a text area object
- * @return true: password mode is enabled, false: disabled
- */
-bool lv_ta_get_pwd_mode(const lv_obj_t * ta)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
-
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
- return ext->pwd_mode == 0 ? false : true;
-}
-
-/**
- * Get the one line configuration attribute
- * @param ta pointer to a text area object
- * @return true: one line configuration is enabled, false: disabled
- */
-bool lv_ta_get_one_line(const lv_obj_t * ta)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
-
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
- return ext->one_line == 0 ? false : true;
-}
-
-/**
- * Get a list of accepted characters.
- * @param ta pointer to Text Area
- * @return list of accented characters.
- */
-const char * lv_ta_get_accepted_chars(lv_obj_t * ta)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
-
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
-
- return ext->accapted_chars;
-}
-
-/**
- * Set max length of a Text Area.
- * @param ta pointer to Text Area
- * @return the maximal number of characters to be add
- */
-uint16_t lv_ta_get_max_length(lv_obj_t * ta)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
-
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
- return ext->max_length;
-}
-
-/**
- * Get a style of a text area
- * @param ta pointer to a text area object
- * @param type which style should be get
- * @return style pointer to a style
- */
-const lv_style_t * lv_ta_get_style(const lv_obj_t * ta, lv_ta_style_t type)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
-
- const lv_style_t * style = NULL;
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
-
- switch(type) {
- case LV_TA_STYLE_BG: style = lv_page_get_style(ta, LV_PAGE_STYLE_BG); break;
- case LV_TA_STYLE_SB: style = lv_page_get_style(ta, LV_PAGE_STYLE_SB); break;
- case LV_TA_STYLE_EDGE_FLASH: style = lv_page_get_style(ta, LV_PAGE_STYLE_EDGE_FLASH); break;
- case LV_TA_STYLE_CURSOR: style = ext->cursor.style; break;
- case LV_TA_STYLE_PLACEHOLDER:
- if(ext->placeholder) style = lv_label_get_style(ext->placeholder, LV_LABEL_STYLE_MAIN);
- break;
- default: style = NULL; break;
- }
-
- return style;
-}
-
-/**
- * Find whether text is selected or not.
- * @param ta Text area object
- * @return whether text is selected or not
- */
-bool lv_ta_text_is_selected(const lv_obj_t * ta)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
-
-#if LV_LABEL_TEXT_SEL
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
-
- if((lv_label_get_text_sel_start(ext->label) == LV_DRAW_LABEL_NO_TXT_SEL ||
- lv_label_get_text_sel_end(ext->label) == LV_DRAW_LABEL_NO_TXT_SEL)) {
- return true;
- } else {
- return false;
- }
-#else
- (void)ta; /*Unused*/
- return false;
-#endif
-}
-
-/**
- * Find whether selection mode is enabled.
- * @param ta pointer to a text area object
- * @return true: selection mode is enabled, false: disabled
- */
-bool lv_ta_get_text_sel_en(lv_obj_t * ta)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
-
-#if LV_LABEL_TEXT_SEL
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
- return ext->text_sel_en;
-#else
- (void)ta; /*Unused*/
- return false;
-#endif
-}
-
-/**
- * Set how long show the password before changing it to '*'
- * @param ta pointer to Text area
- * @return show time in milliseconds. 0: hide immediately.
- */
-uint16_t lv_ta_get_pwd_show_time(lv_obj_t * ta)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
-
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
-
- return ext->pwd_show_time;
-}
-
-/**
- * Set cursor blink animation time
- * @param ta pointer to Text area
- * @return time blink period. 0: disable blinking
- */
-uint16_t lv_ta_get_cursor_blink_time(lv_obj_t * ta)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
-
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
- return ext->cursor.blink_time;
-}
-
-/*=====================
- * Other functions
- *====================*/
-
-/**
- * Clear the selection on the text area.
- * @param ta Text area object
- */
-void lv_ta_clear_selection(lv_obj_t * ta)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
-
-#if LV_LABEL_TEXT_SEL
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
-
- if(lv_label_get_text_sel_start(ext->label) != LV_DRAW_LABEL_NO_TXT_SEL ||
- lv_label_get_text_sel_end(ext->label) != LV_DRAW_LABEL_NO_TXT_SEL) {
- lv_label_set_text_sel_start(ext->label, LV_DRAW_LABEL_NO_TXT_SEL);
- lv_label_set_text_sel_end(ext->label, LV_DRAW_LABEL_NO_TXT_SEL);
- }
-#else
- (void)ta; /*Unused*/
-#endif
-}
-
-/**
- * Move the cursor one character right
- * @param ta pointer to a text area object
- */
-void lv_ta_cursor_right(lv_obj_t * ta)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
-
- uint16_t cp = lv_ta_get_cursor_pos(ta);
- cp++;
- lv_ta_set_cursor_pos(ta, cp);
-}
-
-/**
- * Move the cursor one character left
- * @param ta pointer to a text area object
- */
-void lv_ta_cursor_left(lv_obj_t * ta)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
-
- uint16_t cp = lv_ta_get_cursor_pos(ta);
- if(cp > 0) {
- cp--;
- lv_ta_set_cursor_pos(ta, cp);
- }
-}
-
-/**
- * Move the cursor one line down
- * @param ta pointer to a text area object
- */
-void lv_ta_cursor_down(lv_obj_t * ta)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
-
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
- lv_point_t pos;
-
- /*Get the position of the current letter*/
- lv_label_get_letter_pos(ext->label, lv_ta_get_cursor_pos(ta), &pos);
-
- /*Increment the y with one line and keep the valid x*/
- const lv_style_t * label_style = lv_obj_get_style(ext->label);
- const lv_font_t * font_p = label_style->text.font;
- lv_coord_t font_h = lv_font_get_line_height(font_p);
- pos.y += font_h + label_style->text.line_space + 1;
- pos.x = ext->cursor.valid_x;
-
- /*Do not go below the last line*/
- if(pos.y < lv_obj_get_height(ext->label)) {
- /*Get the letter index on the new cursor position and set it*/
- uint16_t new_cur_pos = lv_label_get_letter_on(ext->label, &pos);
-
- lv_coord_t cur_valid_x_tmp = ext->cursor.valid_x; /*Cursor position set overwrites the valid positon */
- lv_ta_set_cursor_pos(ta, new_cur_pos);
- ext->cursor.valid_x = cur_valid_x_tmp;
- }
-}
-
-/**
- * Move the cursor one line up
- * @param ta pointer to a text area object
- */
-void lv_ta_cursor_up(lv_obj_t * ta)
-{
- LV_ASSERT_OBJ(ta, LV_OBJX_NAME);
-
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
- lv_point_t pos;
-
- /*Get the position of the current letter*/
- lv_label_get_letter_pos(ext->label, lv_ta_get_cursor_pos(ta), &pos);
-
- /*Decrement the y with one line and keep the valid x*/
- const lv_style_t * label_style = lv_obj_get_style(ext->label);
- const lv_font_t * font = label_style->text.font;
- lv_coord_t font_h = lv_font_get_line_height(font);
- pos.y -= font_h + label_style->text.line_space - 1;
- pos.x = ext->cursor.valid_x;
-
- /*Get the letter index on the new cursor position and set it*/
- uint16_t new_cur_pos = lv_label_get_letter_on(ext->label, &pos);
- lv_coord_t cur_valid_x_tmp = ext->cursor.valid_x; /*Cursor position set overwrites the valid positon */
- lv_ta_set_cursor_pos(ta, new_cur_pos);
- ext->cursor.valid_x = cur_valid_x_tmp;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Handle the drawing related tasks of the text areas
- * @param ta pointer to an object
- * @param mask the object will be drawn only in this area
- * @param mode LV_DESIGN_COVER_CHK: only check if the object fully covers the 'mask_p' area
- * (return 'true' if yes)
- * LV_DESIGN_DRAW_MAIN: draw the object (always return 'true')
- * LV_DESIGN_DRAW_POST: drawing after every children are drawn
- * @param return true/false, depends on 'mode'
- */
-static bool lv_ta_design(lv_obj_t * ta, const lv_area_t * mask, lv_design_mode_t mode)
-{
- if(mode == LV_DESIGN_COVER_CHK) {
- /*Return false if the object is not covers the mask_p area*/
- return ancestor_design(ta, mask, mode);
- } else if(mode == LV_DESIGN_DRAW_MAIN) {
- /*Draw the object*/
- ancestor_design(ta, mask, mode);
-
- } else if(mode == LV_DESIGN_DRAW_POST) {
- ancestor_design(ta, mask, mode);
- }
- return true;
-}
-
-/**
- * An extended scrollable design of the page. Calls the normal design function and draws a cursor.
- * @param scrl pointer to the scrollable part of the Text area
- * @param mask the object will be drawn only in this area
- * @param mode LV_DESIGN_COVER_CHK: only check if the object fully covers the 'mask_p' area
- * (return 'true' if yes)
- * LV_DESIGN_DRAW_MAIN: draw the object (always return 'true')
- * LV_DESIGN_DRAW_POST: drawing after every children are drawn
- * @return return true/false, depends on 'mode'
- */
-static bool lv_ta_scrollable_design(lv_obj_t * scrl, const lv_area_t * mask, lv_design_mode_t mode)
-{
- if(mode == LV_DESIGN_COVER_CHK) {
- /*Return false if the object is not covers the mask_p area*/
- return scrl_design(scrl, mask, mode);
- } else if(mode == LV_DESIGN_DRAW_MAIN) {
- /*Draw the object*/
- scrl_design(scrl, mask, mode);
- } else if(mode == LV_DESIGN_DRAW_POST) {
- scrl_design(scrl, mask, mode);
-
- /*Draw the cursor*/
- lv_obj_t * ta = lv_obj_get_parent(scrl);
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
-
- if(ext->cursor.type == LV_CURSOR_NONE || (ext->cursor.type & LV_CURSOR_HIDDEN) || ext->cursor.state == 0) {
- return true; /*The cursor is not visible now*/
- }
-
- lv_style_t cur_style;
- get_cursor_style(ta, &cur_style);
-
- const char * txt = lv_label_get_text(ext->label);
-
- /*Draw he cursor according to the type*/
- lv_area_t cur_area;
- lv_area_copy(&cur_area, &ext->cursor.area);
-
- cur_area.x1 += ext->label->coords.x1;
- cur_area.y1 += ext->label->coords.y1;
- cur_area.x2 += ext->label->coords.x1;
- cur_area.y2 += ext->label->coords.y1;
-
- lv_opa_t opa_scale = lv_obj_get_opa_scale(ta);
-
- if(ext->cursor.type == LV_CURSOR_LINE) {
- lv_draw_rect(&cur_area, mask, &cur_style, opa_scale);
- } else if(ext->cursor.type == LV_CURSOR_BLOCK) {
- lv_draw_rect(&cur_area, mask, &cur_style, opa_scale);
-
- char letter_buf[8] = {0};
- memcpy(letter_buf, &txt[ext->cursor.txt_byte_pos], lv_txt_encoded_size(&txt[ext->cursor.txt_byte_pos]));
-
- cur_area.x1 += cur_style.body.padding.left;
- cur_area.y1 += cur_style.body.padding.top;
- lv_draw_label(&cur_area, mask, &cur_style, opa_scale, letter_buf, LV_TXT_FLAG_NONE, NULL, NULL, NULL, lv_obj_get_base_dir(ta));
-
- } else if(ext->cursor.type == LV_CURSOR_OUTLINE) {
- cur_style.body.opa = LV_OPA_TRANSP;
- if(cur_style.body.border.width == 0) cur_style.body.border.width = 1; /*Be sure the border will be drawn*/
- lv_draw_rect(&cur_area, mask, &cur_style, opa_scale);
- } else if(ext->cursor.type == LV_CURSOR_UNDERLINE) {
- lv_draw_rect(&cur_area, mask, &cur_style, opa_scale);
- }
- }
-
- return true;
-}
-
-/**
- * Signal function of the text area
- * @param ta pointer to a text area object
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param)
-{
- lv_res_t res;
-
- /* Include the ancient signal function */
- res = ancestor_signal(ta, sign, param);
- if(res != LV_RES_OK) return res;
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);
-
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
- if(sign == LV_SIGNAL_CLEANUP) {
- if(ext->pwd_tmp != NULL) lv_mem_free(ext->pwd_tmp);
-
- /* (The created label will be deleted automatically) */
- } else if(sign == LV_SIGNAL_STYLE_CHG) {
- if(ext->label) {
- lv_obj_t * scrl = lv_page_get_scrl(ta);
- const lv_style_t * style_ta = lv_obj_get_style(ta);
- const lv_style_t * style_scrl = lv_obj_get_style(scrl);
- if(ext->one_line) {
- /*In one line mode refresh the Text Area height because 'vpad' can modify it*/
- const lv_style_t * style_label = lv_obj_get_style(ext->label);
- lv_coord_t font_h = lv_font_get_line_height(style_label->text.font);
- lv_obj_set_height(ext->label, font_h);
- lv_obj_set_height(ta, font_h + style_ta->body.padding.top + style_ta->body.padding.bottom +
- style_scrl->body.padding.top + style_scrl->body.padding.bottom);
- } else {
- /*In not one line mode refresh the Label width because 'hpad' can modify it*/
- lv_obj_set_width(ext->label, lv_page_get_fit_width(ta));
- lv_obj_set_pos(ext->label, style_scrl->body.padding.left,
- style_scrl->body.padding.right); /*Be sure the Label is in the correct position*/
-
- if(ext->placeholder) {
- lv_obj_set_width(ext->placeholder, lv_page_get_fit_width(ta));
- lv_obj_set_pos(ext->placeholder, style_scrl->body.padding.left,
- style_scrl->body.padding.top); /*Be sure the placeholder is in the correct position*/
- }
- }
- lv_label_set_text(ext->label, NULL);
- }
- } else if(sign == LV_SIGNAL_CORD_CHG) {
- /*Set the label width according to the text area width*/
- if(ext->label) {
- if(lv_obj_get_width(ta) != lv_area_get_width(param) || lv_obj_get_height(ta) != lv_area_get_height(param)) {
- lv_obj_t * scrl = lv_page_get_scrl(ta);
- const lv_style_t * style_scrl = lv_obj_get_style(scrl);
- lv_obj_set_width(ext->label, lv_page_get_fit_width(ta));
- lv_obj_set_pos(ext->label, style_scrl->body.padding.left, style_scrl->body.padding.top);
- lv_label_set_text(ext->label, NULL); /*Refresh the label*/
-
- refr_cursor_area(ta);
- }
- }
- /*Set the placeholder width according to the text area width*/
- if(ext->placeholder) {
- if(lv_obj_get_width(ta) != lv_area_get_width(param) || lv_obj_get_height(ta) != lv_area_get_height(param)) {
- lv_obj_t * scrl = lv_page_get_scrl(ta);
- const lv_style_t * style_scrl = lv_obj_get_style(scrl);
- lv_obj_set_width(ext->placeholder, lv_page_get_fit_width(ta));
- lv_obj_set_pos(ext->placeholder, style_scrl->body.padding.left, style_scrl->body.padding.top);
- lv_label_set_text(ext->placeholder, NULL); /*Refresh the label*/
-
- refr_cursor_area(ta);
- }
- }
- } else if(sign == LV_SIGNAL_CONTROL) {
- uint32_t c = *((uint32_t *)param); /*uint32_t because can be UTF-8*/
- if(c == LV_KEY_RIGHT)
- lv_ta_cursor_right(ta);
- else if(c == LV_KEY_LEFT)
- lv_ta_cursor_left(ta);
- else if(c == LV_KEY_UP)
- lv_ta_cursor_up(ta);
- else if(c == LV_KEY_DOWN)
- lv_ta_cursor_down(ta);
- else if(c == LV_KEY_BACKSPACE)
- lv_ta_del_char(ta);
- else if(c == LV_KEY_DEL)
- lv_ta_del_char_forward(ta);
- else if(c == LV_KEY_HOME)
- lv_ta_set_cursor_pos(ta, 0);
- else if(c == LV_KEY_END)
- lv_ta_set_cursor_pos(ta, LV_TA_CURSOR_LAST);
- else {
- lv_ta_add_char(ta, c);
- }
- } else if(sign == LV_SIGNAL_GET_EDITABLE) {
- bool * editable = (bool *)param;
- *editable = true;
- } else if(sign == LV_SIGNAL_DEFOCUS) {
- lv_cursor_type_t cur_type;
- cur_type = lv_ta_get_cursor_type(ta);
- lv_ta_set_cursor_type(ta, cur_type | LV_CURSOR_HIDDEN);
- } else if(sign == LV_SIGNAL_FOCUS) {
-#if LV_USE_GROUP
- lv_cursor_type_t cur_type;
- cur_type = lv_ta_get_cursor_type(ta);
- lv_group_t * g = lv_obj_get_group(ta);
- bool editing = lv_group_get_editing(g);
- lv_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act());
-
- /*Encoders need special handling*/
- if(indev_type == LV_INDEV_TYPE_ENCODER) {
- if(editing)
- lv_ta_set_cursor_type(ta, cur_type & (~LV_CURSOR_HIDDEN));
- else
- lv_ta_set_cursor_type(ta, cur_type | LV_CURSOR_HIDDEN);
- } else {
- lv_ta_set_cursor_type(ta, cur_type & (~LV_CURSOR_HIDDEN));
- }
-#endif
- } else if(sign == LV_SIGNAL_PRESSED || sign == LV_SIGNAL_PRESSING || sign == LV_SIGNAL_PRESS_LOST ||
- sign == LV_SIGNAL_RELEASED) {
- update_cursor_position_on_click(ta, sign, (lv_indev_t *)param);
- }
- return res;
-}
-
-/**
- * Signal function of the scrollable part of the text area
- * @param scrl pointer to scrollable part of a text area object
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_ta_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, void * param)
-{
- lv_res_t res;
-
- /* Include the ancient signal function */
- res = scrl_signal(scrl, sign, param);
- if(res != LV_RES_OK) return res;
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, "");
-
- lv_obj_t * ta = lv_obj_get_parent(scrl);
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
-
- if(sign == LV_SIGNAL_REFR_EXT_DRAW_PAD) {
- /*Set ext. size because the cursor might be out of this object*/
- const lv_style_t * style_label = lv_obj_get_style(ext->label);
- lv_coord_t font_h = lv_font_get_line_height(style_label->text.font);
- scrl->ext_draw_pad = LV_MATH_MAX(scrl->ext_draw_pad, style_label->text.line_space + font_h);
- } else if(sign == LV_SIGNAL_CORD_CHG) {
- /*Set the label width according to the text area width*/
- if(ext->label) {
- if(lv_obj_get_width(scrl) != lv_area_get_width(param) ||
- lv_obj_get_height(scrl) != lv_area_get_height(param)) {
-
- const lv_style_t * style_scrl = lv_obj_get_style(scrl);
- lv_obj_set_width(ext->label, lv_page_get_fit_width(ta));
- lv_obj_set_pos(ext->label, style_scrl->body.padding.left, style_scrl->body.padding.top);
- lv_label_set_text(ext->label, NULL); /*Refresh the label*/
-
- refr_cursor_area(ta);
- }
- }
- } else if(sign == LV_SIGNAL_PRESSING || sign == LV_SIGNAL_PRESSED || sign == LV_SIGNAL_PRESS_LOST ||
- sign == LV_SIGNAL_RELEASED) {
- update_cursor_position_on_click(ta, sign, (lv_indev_t *)param);
- }
-
- return res;
-}
-
-#if LV_USE_ANIMATION
-
-/**
- * Called to blink the cursor
- * @param ta pointer to a text area
- * @param hide 1: hide the cursor, 0: show it
- */
-static void cursor_blink_anim(lv_obj_t * ta, lv_anim_value_t show)
-{
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
- if(show != ext->cursor.state) {
- ext->cursor.state = show == 0 ? 0 : 1;
- if(ext->cursor.type != LV_CURSOR_NONE && (ext->cursor.type & LV_CURSOR_HIDDEN) == 0) {
- lv_area_t area_tmp;
- lv_area_copy(&area_tmp, &ext->cursor.area);
- area_tmp.x1 += ext->label->coords.x1;
- area_tmp.y1 += ext->label->coords.y1;
- area_tmp.x2 += ext->label->coords.x1;
- area_tmp.y2 += ext->label->coords.y1;
- lv_obj_invalidate_area(ta, &area_tmp);
- }
- }
-}
-
-/**
- * Dummy function to animate char hiding in pwd mode.
- * Does nothing, but a function is required in car hiding anim.
- * (pwd_char_hider callback do the real job)
- * @param ta unused
- * @param x unused
- */
-static void pwd_char_hider_anim(lv_obj_t * ta, lv_anim_value_t x)
-{
- (void)ta;
- (void)x;
-}
-
-/**
- * Call when an animation is ready to convert all characters to '*'
- * @param a pointer to the animation
- */
-static void pwd_char_hider_anim_ready(lv_anim_t * a)
-{
- lv_obj_t * ta = a->var;
- pwd_char_hider(ta);
-}
-#endif
-
-/**
- * Hide all characters (convert them to '*')
- * @param ta: pointer to text area object
- */
-static void pwd_char_hider(lv_obj_t * ta)
-{
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
- if(ext->pwd_mode != 0) {
- char * txt = lv_label_get_text(ext->label);
- int16_t len = lv_txt_get_encoded_length(txt);
- bool refr = false;
- uint16_t i;
- for(i = 0; i < len; i++) {
- txt[i] = '*';
- refr = true;
- }
-
- txt[i] = '\0';
-
- if(refr != false) lv_label_set_text(ext->label, txt);
- }
-}
-
-/**
- * Test an unicode character if it is accepted or not. Checks max length and accepted char list.
- * @param ta pointer to a test area object
- * @param c an unicode character
- * @return true: accapted; false: rejected
- */
-static bool char_is_accepted(lv_obj_t * ta, uint32_t c)
-{
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
-
- /*If no restriction accept it*/
- if(ext->accapted_chars == NULL && ext->max_length == 0) return true;
-
- /*Too many characters?*/
- if(ext->max_length > 0 && lv_txt_get_encoded_length(lv_ta_get_text(ta)) >= ext->max_length) {
- return false;
- }
-
- /*Accepted character?*/
- if(ext->accapted_chars) {
- uint32_t i = 0;
- uint32_t a;
- while(ext->accapted_chars[i] != '\0') {
- a = lv_txt_encoded_next(ext->accapted_chars, &i);
- if(a == c) return true; /*Accepted*/
- }
-
- return false; /*The character wasn't in the list*/
- } else {
- return true; /*If the accepted char list in not specified the accept the character*/
- }
-}
-
-static void get_cursor_style(lv_obj_t * ta, lv_style_t * style_res)
-{
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
- const lv_style_t * label_style = lv_obj_get_style(ext->label);
-
- if(ext->cursor.style) {
- lv_style_copy(style_res, ext->cursor.style);
- } else {
- /*If cursor style is not specified then use the modified label style */
- lv_style_copy(style_res, label_style);
- lv_color_t clv_color_tmp = style_res->text.color; /*Make letter color to cursor color*/
- style_res->text.color =
- style_res->body.main_color; /*In block mode the letter color will be current background color*/
- style_res->body.main_color = clv_color_tmp;
- style_res->body.grad_color = clv_color_tmp;
- style_res->body.border.color = clv_color_tmp;
- style_res->body.border.opa = LV_OPA_COVER;
- style_res->body.border.width = 1;
- style_res->body.shadow.width = 0;
- style_res->body.radius = 0;
- style_res->body.opa = LV_OPA_COVER;
- style_res->body.padding.left = 0;
- style_res->body.padding.right = 0;
- style_res->body.padding.top = 0;
- style_res->body.padding.bottom = 0;
- style_res->line.width = 1;
- }
-}
-
-static void refr_cursor_area(lv_obj_t * ta)
-{
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
-
- const lv_style_t * label_style = lv_obj_get_style(ext->label);
-
- lv_style_t cur_style;
- get_cursor_style(ta, &cur_style);
-
- uint16_t cur_pos = lv_ta_get_cursor_pos(ta);
- const char * txt = lv_label_get_text(ext->label);
-
- uint32_t byte_pos;
- byte_pos = lv_txt_encoded_get_byte_id(txt, cur_pos);
-
- uint32_t letter = lv_txt_encoded_next(&txt[byte_pos], NULL);
-
- lv_coord_t letter_h = lv_font_get_line_height(label_style->text.font);
-
- /*Set letter_w (set not 0 on non printable but valid chars)*/
- lv_coord_t letter_w;
- if(letter == '\0' || letter == '\n' || letter == '\r') {
- letter_w = lv_font_get_glyph_width(label_style->text.font, ' ', '\0');
- } else {
- /*`letter_next` parameter is '\0' to ignore kerning*/
- letter_w = lv_font_get_glyph_width(label_style->text.font, letter, '\0');
- }
-
- lv_point_t letter_pos;
- lv_label_get_letter_pos(ext->label, cur_pos, &letter_pos);
-
- /*If the cursor is out of the text (most right) draw it to the next line*/
- if(letter_pos.x + ext->label->coords.x1 + letter_w > ext->label->coords.x2 && ext->one_line == 0 &&
- lv_label_get_align(ext->label) != LV_LABEL_ALIGN_RIGHT) {
- letter_pos.x = 0;
- letter_pos.y += letter_h + label_style->text.line_space;
-
- if(letter != '\0') {
- byte_pos += lv_txt_encoded_size(&txt[byte_pos]);
- letter = lv_txt_encoded_next(&txt[byte_pos], NULL);
- }
-
- if(letter == '\0' || letter == '\n' || letter == '\r') {
- letter_w = lv_font_get_glyph_width(label_style->text.font, ' ', '\0');
- } else {
- letter_w = lv_font_get_glyph_width(label_style->text.font, letter, '\0');
- }
- }
-
- /*Save the byte position. It is required to draw `LV_CURSOR_BLOCK`*/
- ext->cursor.txt_byte_pos = byte_pos;
-
- /*Draw he cursor according to the type*/
- lv_area_t cur_area;
-
- if(ext->cursor.type == LV_CURSOR_LINE) {
- cur_area.x1 =
- letter_pos.x + cur_style.body.padding.left - (cur_style.line.width >> 1) - (cur_style.line.width & 0x1);
- cur_area.y1 = letter_pos.y + cur_style.body.padding.top;
- cur_area.x2 = letter_pos.x + cur_style.body.padding.right + (cur_style.line.width >> 1);
- cur_area.y2 = letter_pos.y + cur_style.body.padding.bottom + letter_h;
- } else if(ext->cursor.type == LV_CURSOR_BLOCK) {
- cur_area.x1 = letter_pos.x - cur_style.body.padding.left;
- cur_area.y1 = letter_pos.y - cur_style.body.padding.top;
- cur_area.x2 = letter_pos.x + cur_style.body.padding.right + letter_w;
- cur_area.y2 = letter_pos.y + cur_style.body.padding.bottom + letter_h;
-
- } else if(ext->cursor.type == LV_CURSOR_OUTLINE) {
- cur_area.x1 = letter_pos.x - cur_style.body.padding.left;
- cur_area.y1 = letter_pos.y - cur_style.body.padding.top;
- cur_area.x2 = letter_pos.x + cur_style.body.padding.right + letter_w;
- cur_area.y2 = letter_pos.y + cur_style.body.padding.bottom + letter_h;
- } else if(ext->cursor.type == LV_CURSOR_UNDERLINE) {
- cur_area.x1 = letter_pos.x + cur_style.body.padding.left;
- cur_area.y1 = letter_pos.y + cur_style.body.padding.top + letter_h - (cur_style.line.width >> 1);
- cur_area.x2 = letter_pos.x + cur_style.body.padding.right + letter_w;
- cur_area.y2 = letter_pos.y + cur_style.body.padding.bottom + letter_h + (cur_style.line.width >> 1) +
- (cur_style.line.width & 0x1);
- }
-
- /*Save the new area*/
- lv_area_t area_tmp;
- lv_area_copy(&area_tmp, &ext->cursor.area);
- area_tmp.x1 += ext->label->coords.x1;
- area_tmp.y1 += ext->label->coords.y1;
- area_tmp.x2 += ext->label->coords.x1;
- area_tmp.y2 += ext->label->coords.y1;
- lv_obj_invalidate_area(ta, &area_tmp);
-
- lv_area_copy(&ext->cursor.area, &cur_area);
-
- lv_area_copy(&area_tmp, &ext->cursor.area);
- area_tmp.x1 += ext->label->coords.x1;
- area_tmp.y1 += ext->label->coords.y1;
- area_tmp.x2 += ext->label->coords.x1;
- area_tmp.y2 += ext->label->coords.y1;
- lv_obj_invalidate_area(ta, &area_tmp);
-}
-
-static void placeholder_update(lv_obj_t * ta)
-{
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
- const char * ta_text;
-
- if(ext->placeholder == NULL) return;
-
- ta_text = lv_ta_get_text(ta);
-
- if(ta_text[0] == '\0') {
- /*Be sure the main label and the placeholder has the same coordinates*/
- lv_obj_t * scrl = lv_page_get_scrl(ta);
- const lv_style_t * style_scrl = lv_obj_get_style(scrl);
- lv_obj_set_pos(ext->placeholder, style_scrl->body.padding.left, style_scrl->body.padding.top);
- lv_obj_set_pos(ext->label, style_scrl->body.padding.left, style_scrl->body.padding.top);
-
- lv_obj_set_width(ext->placeholder, lv_page_get_fit_width(ta));
- lv_obj_set_hidden(ext->placeholder, false);
- } else {
- lv_obj_set_hidden(ext->placeholder, true);
- }
-}
-
-static void update_cursor_position_on_click(lv_obj_t * ta, lv_signal_t sign, lv_indev_t * click_source)
-{
-
- if(click_source == NULL) return;
-
- lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta);
- if(ext->cursor.click_pos == 0) return;
- if(ext->cursor.type == LV_CURSOR_NONE) return;
-
- if(lv_indev_get_type(click_source) == LV_INDEV_TYPE_KEYPAD ||
- lv_indev_get_type(click_source) == LV_INDEV_TYPE_ENCODER) {
- return;
- }
-
- lv_area_t label_coords;
- lv_obj_get_coords(ext->label, &label_coords);
-
- lv_point_t point_act, vect_act;
- lv_indev_get_point(click_source, &point_act);
- lv_indev_get_vect(click_source, &vect_act);
-
- if(point_act.x < 0 || point_act.y < 0) return; /*Ignore event from keypad*/
- lv_point_t rel_pos;
- rel_pos.x = point_act.x - label_coords.x1;
- rel_pos.y = point_act.y - label_coords.y1;
-
- lv_coord_t label_width = lv_obj_get_width(ext->label);
-
- uint16_t char_id_at_click;
-
-#if LV_LABEL_TEXT_SEL
- lv_label_ext_t * ext_label = lv_obj_get_ext_attr(ext->label);
- bool click_outside_label;
- /*Check if the click happened on the left side of the area outside the label*/
- if(rel_pos.x < 0) {
- char_id_at_click = 0;
- click_outside_label = true;
- }
- /*Check if the click happened on the right side of the area outside the label*/
- else if(rel_pos.x >= label_width) {
- char_id_at_click = LV_TA_CURSOR_LAST;
- click_outside_label = true;
- } else {
- char_id_at_click = lv_label_get_letter_on(ext->label, &rel_pos);
- click_outside_label = !lv_label_is_char_under_pos(ext->label, &rel_pos);
- }
-
- if(ext->text_sel_en) {
- if(!ext->text_sel_in_prog && !click_outside_label && sign == LV_SIGNAL_PRESSED) {
- /*Input device just went down. Store the selection start position*/
- ext->sel.start = char_id_at_click;
- ext->sel.end = LV_LABEL_TEXT_SEL_OFF;
- ext->text_sel_in_prog = 1;
- lv_obj_set_drag(lv_page_get_scrl(ta), false);
- } else if(ext->text_sel_in_prog && sign == LV_SIGNAL_PRESSING) {
- /*Input device may be moving. Store the end position */
- ext->sel.end = char_id_at_click;
- } else if(ext->text_sel_in_prog && (sign == LV_SIGNAL_PRESS_LOST || sign == LV_SIGNAL_RELEASED)) {
- /*Input device is released. Check if anything was selected.*/
- lv_obj_set_drag(lv_page_get_scrl(ta), true);
- }
- }
-
- if(ext->text_sel_in_prog || sign == LV_SIGNAL_PRESSED) lv_ta_set_cursor_pos(ta, char_id_at_click);
-
- if(ext->text_sel_in_prog) {
- /*If the selected area has changed then update the real values and*/
-
- /*Invalidate the text area.*/
- if(ext->sel.start > ext->sel.end) {
- if(ext_label->txt_sel_start != ext->sel.end || ext_label->txt_sel_end != ext->sel.start) {
- ext_label->txt_sel_start = ext->sel.end;
- ext_label->txt_sel_end = ext->sel.start;
- lv_obj_invalidate(ta);
- }
- } else if(ext->sel.start < ext->sel.end) {
- if(ext_label->txt_sel_start != ext->sel.start || ext_label->txt_sel_end != ext->sel.end) {
- ext_label->txt_sel_start = ext->sel.start;
- ext_label->txt_sel_end = ext->sel.end;
- lv_obj_invalidate(ta);
- }
- } else {
- if(ext_label->txt_sel_start != LV_DRAW_LABEL_NO_TXT_SEL || ext_label->txt_sel_end != LV_DRAW_LABEL_NO_TXT_SEL) {
- ext_label->txt_sel_start = LV_DRAW_LABEL_NO_TXT_SEL;
- ext_label->txt_sel_end = LV_DRAW_LABEL_NO_TXT_SEL;
- lv_obj_invalidate(ta);
- }
- }
- /*Finish selection if necessary */
- if(sign == LV_SIGNAL_PRESS_LOST || sign == LV_SIGNAL_RELEASED) {
- ext->text_sel_in_prog = 0;
- }
- }
-#else
- /*Check if the click happened on the left side of the area outside the label*/
- if(rel_pos.x < 0) {
- char_id_at_click = 0;
- }
- /*Check if the click happened on the right side of the area outside the label*/
- else if(rel_pos.x >= label_width) {
- char_id_at_click = LV_TA_CURSOR_LAST;
- } else {
- char_id_at_click = lv_label_get_letter_on(ext->label, &rel_pos);
- }
-
- if(sign == LV_SIGNAL_PRESSED) lv_ta_set_cursor_pos(ta, char_id_at_click);
-#endif
-}
-
-#endif
diff --git a/src/libs/lvgl/src/lv_objx/lv_ta.h b/src/libs/lvgl/src/lv_objx/lv_ta.h
deleted file mode 100644
index afbb94bc..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_ta.h
+++ /dev/null
@@ -1,478 +0,0 @@
-/**
- * @file lv_ta.h
- *
- */
-
-#ifndef LV_TA_H
-#define LV_TA_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_TA != 0
-
-/*Testing of dependencies*/
-#if LV_USE_PAGE == 0
-#error "lv_ta: lv_page is required. Enable it in lv_conf.h (LV_USE_PAGE 1) "
-#endif
-
-#if LV_USE_LABEL == 0
-#error "lv_ta: lv_label is required. Enable it in lv_conf.h (LV_USE_LABEL 1) "
-#endif
-
-#include "../lv_core/lv_obj.h"
-#include "lv_page.h"
-#include "lv_label.h"
-
-/*********************
- * DEFINES
- *********************/
-#define LV_TA_CURSOR_LAST (0x7FFF) /*Put the cursor after the last character*/
-
-LV_EXPORT_CONST_INT(LV_TA_CURSOR_LAST);
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/** Style of text area's cursor. */
-enum {
- LV_CURSOR_NONE, /**< No cursor */
- LV_CURSOR_LINE, /**< Vertical line */
- LV_CURSOR_BLOCK, /**< Rectangle */
- LV_CURSOR_OUTLINE, /**< Outline around character */
- LV_CURSOR_UNDERLINE, /**< Horizontal line under character */
- LV_CURSOR_HIDDEN = 0x08, /**< This flag can be ORed to any of the other values to temporarily hide the cursor */
-};
-typedef uint8_t lv_cursor_type_t;
-
-/*Data of text area*/
-typedef struct
-{
- lv_page_ext_t page; /*Ext. of ancestor*/
- /*New data for this type */
- lv_obj_t * label; /*Label of the text area*/
- lv_obj_t * placeholder; /*Place holder label. only visible if text is an empty string*/
- char * pwd_tmp; /*Used to store the original text in password mode*/
- const char * accapted_chars; /*Only these characters will be accepted. NULL: accept all*/
- uint16_t max_length; /*The max. number of characters. 0: no limit*/
- uint16_t pwd_show_time; /*Time to show characters in password mode before change them to '*' */
- struct
- {
- const lv_style_t * style; /* Style of the cursor (NULL to use label's style)*/
- lv_coord_t valid_x; /* Used when stepping up/down to a shorter line.
- * (Used by the library)*/
- uint16_t pos; /* The current cursor position
- * (0: before 1st letter; 1: before 2nd letter ...)*/
- uint16_t blink_time; /*Blink period*/
- lv_area_t area; /* Cursor area relative to the Text Area*/
- uint16_t txt_byte_pos; /* Byte index of the letter after (on) the cursor*/
- lv_cursor_type_t type : 4; /* Shape of the cursor*/
- uint8_t state : 1; /*Cursor is visible now or not (Handled by the library)*/
- uint8_t click_pos : 1; /*1: Enable positioning the cursor by clicking the text area*/
- } cursor;
-#if LV_LABEL_TEXT_SEL
- lv_draw_label_txt_sel_t sel; /*Temporary values for text selection*/
- uint8_t text_sel_in_prog : 1; /*User is in process of selecting */
- uint8_t text_sel_en : 1; /*Text can be selected on this text area*/
-#endif
- uint8_t pwd_mode : 1; /*Replace characters with '*' */
- uint8_t one_line : 1; /*One line mode (ignore line breaks)*/
-} lv_ta_ext_t;
-
-/** Possible text areas tyles. */
-enum {
- LV_TA_STYLE_BG, /**< Text area background style */
- LV_TA_STYLE_SB, /**< Scrollbar style */
- LV_TA_STYLE_CURSOR, /**< Cursor style */
- LV_TA_STYLE_EDGE_FLASH, /**< Edge flash style */
- LV_TA_STYLE_PLACEHOLDER, /**< Placeholder style */
-};
-typedef uint8_t lv_ta_style_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Create a text area objects
- * @param par pointer to an object, it will be the parent of the new text area
- * @param copy pointer to a text area object, if not NULL then the new object will be copied from it
- * @return pointer to the created text area
- */
-lv_obj_t * lv_ta_create(lv_obj_t * par, const lv_obj_t * copy);
-
-/*======================
- * Add/remove functions
- *=====================*/
-
-/**
- * Insert a character to the current cursor position.
- * To add a wide char, e.g. 'Á' use `lv_txt_encoded_conv_wc('Á')`
- * @param ta pointer to a text area object
- * @param c a character (e.g. 'a')
- */
-void lv_ta_add_char(lv_obj_t * ta, uint32_t c);
-
-/**
- * Insert a text to the current cursor position
- * @param ta pointer to a text area object
- * @param txt a '\0' terminated string to insert
- */
-void lv_ta_add_text(lv_obj_t * ta, const char * txt);
-
-/**
- * Delete a the left character from the current cursor position
- * @param ta pointer to a text area object
- */
-void lv_ta_del_char(lv_obj_t * ta);
-
-/**
- * Delete the right character from the current cursor position
- * @param ta pointer to a text area object
- */
-void lv_ta_del_char_forward(lv_obj_t * ta);
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set the text of a text area
- * @param ta pointer to a text area
- * @param txt pointer to the text
- */
-void lv_ta_set_text(lv_obj_t * ta, const char * txt);
-
-/**
- * Set the placeholder text of a text area
- * @param ta pointer to a text area
- * @param txt pointer to the text
- */
-void lv_ta_set_placeholder_text(lv_obj_t * ta, const char * txt);
-
-/**
- * Set the cursor position
- * @param obj pointer to a text area object
- * @param pos the new cursor position in character index
- * < 0 : index from the end of the text
- * LV_TA_CURSOR_LAST: go after the last character
- */
-void lv_ta_set_cursor_pos(lv_obj_t * ta, int16_t pos);
-
-/**
- * Set the cursor type.
- * @param ta pointer to a text area object
- * @param cur_type: element of 'lv_cursor_type_t'
- */
-void lv_ta_set_cursor_type(lv_obj_t * ta, lv_cursor_type_t cur_type);
-
-/**
- * Enable/Disable the positioning of the the cursor by clicking the text on the text area.
- * @param ta pointer to a text area object
- * @param en true: enable click positions; false: disable
- */
-void lv_ta_set_cursor_click_pos(lv_obj_t * ta, bool en);
-
-/**
- * Enable/Disable password mode
- * @param ta pointer to a text area object
- * @param en true: enable, false: disable
- */
-void lv_ta_set_pwd_mode(lv_obj_t * ta, bool en);
-
-/**
- * Configure the text area to one line or back to normal
- * @param ta pointer to a Text area object
- * @param en true: one line, false: normal
- */
-void lv_ta_set_one_line(lv_obj_t * ta, bool en);
-
-/**
- * Set the alignment of the text area.
- * In one line mode the text can be scrolled only with `LV_LABEL_ALIGN_LEFT`.
- * This function should be called if the size of text area changes.
- * @param ta pointer to a text are object
- * @param align the desired alignment from `lv_label_align_t`. (LV_LABEL_ALIGN_LEFT/CENTER/RIGHT)
- */
-void lv_ta_set_text_align(lv_obj_t * ta, lv_label_align_t align);
-
-/**
- * Set a list of characters. Only these characters will be accepted by the text area
- * @param ta pointer to Text Area
- * @param list list of characters. Only the pointer is saved. E.g. "+-.,0123456789"
- */
-void lv_ta_set_accepted_chars(lv_obj_t * ta, const char * list);
-
-/**
- * Set max length of a Text Area.
- * @param ta pointer to Text Area
- * @param num the maximal number of characters can be added (`lv_ta_set_text` ignores it)
- */
-void lv_ta_set_max_length(lv_obj_t * ta, uint16_t num);
-
-/**
- * In `LV_EVENT_INSERT` the text which planned to be inserted can be replaced by an other text.
- * It can be used to add automatic formatting to the text area.
- * @param ta pointer to a text area.
- * @param txt pointer to a new string to insert. If `""` no text will be added.
- * The variable must be live after the `event_cb` exists. (Should be `global` or
- * `static`)
- */
-void lv_ta_set_insert_replace(lv_obj_t * ta, const char * txt);
-
-/**
- * Set the scroll bar mode of a text area
- * @param ta pointer to a text area object
- * @param sb_mode the new mode from 'lv_page_sb_mode_t' enum
- */
-static inline void lv_ta_set_sb_mode(lv_obj_t * ta, lv_sb_mode_t mode)
-{
- lv_page_set_sb_mode(ta, mode);
-}
-
-/**
- * Enable the scroll propagation feature. If enabled then the Text area will move its parent if
- * there is no more space to scroll.
- * @param ta pointer to a Text area
- * @param en true or false to enable/disable scroll propagation
- */
-static inline void lv_ta_set_scroll_propagation(lv_obj_t * ta, bool en)
-{
- lv_page_set_scroll_propagation(ta, en);
-}
-
-/**
- * Enable the edge flash effect. (Show an arc when the an edge is reached)
- * @param page pointer to a Text Area
- * @param en true or false to enable/disable end flash
- */
-static inline void lv_ta_set_edge_flash(lv_obj_t * ta, bool en)
-{
- lv_page_set_edge_flash(ta, en);
-}
-
-/**
- * Set a style of a text area
- * @param ta pointer to a text area object
- * @param type which style should be set
- * @param style pointer to a style
- */
-void lv_ta_set_style(lv_obj_t * ta, lv_ta_style_t type, const lv_style_t * style);
-
-/**
- * Enable/disable selection mode.
- * @param ta pointer to a text area object
- * @param en true or false to enable/disable selection mode
- */
-void lv_ta_set_text_sel(lv_obj_t * ta, bool en);
-
-/**
- * Set how long show the password before changing it to '*'
- * @param ta pointer to Text area
- * @param time show time in milliseconds. 0: hide immediately.
- */
-void lv_ta_set_pwd_show_time(lv_obj_t * ta, uint16_t time);
-
-/**
- * Set cursor blink animation time
- * @param ta pointer to Text area
- * @param time blink period. 0: disable blinking
- */
-void lv_ta_set_cursor_blink_time(lv_obj_t * ta, uint16_t time);
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the text of a text area. In password mode it gives the real text (not '*'s).
- * @param ta pointer to a text area object
- * @return pointer to the text
- */
-const char * lv_ta_get_text(const lv_obj_t * ta);
-
-/**
- * Get the placeholder text of a text area
- * @param ta pointer to a text area object
- * @return pointer to the text
- */
-const char * lv_ta_get_placeholder_text(lv_obj_t * ta);
-
-/**
- * Get the label of a text area
- * @param ta pointer to a text area object
- * @return pointer to the label object
- */
-lv_obj_t * lv_ta_get_label(const lv_obj_t * ta);
-
-/**
- * Get the current cursor position in character index
- * @param ta pointer to a text area object
- * @return the cursor position
- */
-uint16_t lv_ta_get_cursor_pos(const lv_obj_t * ta);
-
-/**
- * Get the current cursor type.
- * @param ta pointer to a text area object
- * @return element of 'lv_cursor_type_t'
- */
-lv_cursor_type_t lv_ta_get_cursor_type(const lv_obj_t * ta);
-
-/**
- * Get whether the cursor click positioning is enabled or not.
- * @param ta pointer to a text area object
- * @return true: enable click positions; false: disable
- */
-bool lv_ta_get_cursor_click_pos(lv_obj_t * ta);
-
-/**
- * Get the password mode attribute
- * @param ta pointer to a text area object
- * @return true: password mode is enabled, false: disabled
- */
-bool lv_ta_get_pwd_mode(const lv_obj_t * ta);
-
-/**
- * Get the one line configuration attribute
- * @param ta pointer to a text area object
- * @return true: one line configuration is enabled, false: disabled
- */
-bool lv_ta_get_one_line(const lv_obj_t * ta);
-
-/**
- * Get a list of accepted characters.
- * @param ta pointer to Text Area
- * @return list of accented characters.
- */
-const char * lv_ta_get_accepted_chars(lv_obj_t * ta);
-
-/**
- * Set max length of a Text Area.
- * @param ta pointer to Text Area
- * @return the maximal number of characters to be add
- */
-uint16_t lv_ta_get_max_length(lv_obj_t * ta);
-
-/**
- * Get the scroll bar mode of a text area
- * @param ta pointer to a text area object
- * @return scrollbar mode from 'lv_page_sb_mode_t' enum
- */
-static inline lv_sb_mode_t lv_ta_get_sb_mode(const lv_obj_t * ta)
-{
- return lv_page_get_sb_mode(ta);
-}
-
-/**
- * Get the scroll propagation property
- * @param ta pointer to a Text area
- * @return true or false
- */
-static inline bool lv_ta_get_scroll_propagation(lv_obj_t * ta)
-{
- return lv_page_get_scroll_propagation(ta);
-}
-
-/**
- * Get the scroll propagation property
- * @param ta pointer to a Text area
- * @return true or false
- */
-static inline bool lv_ta_get_edge_flash(lv_obj_t * ta)
-{
- return lv_page_get_edge_flash(ta);
-}
-
-/**
- * Get a style of a text area
- * @param ta pointer to a text area object
- * @param type which style should be get
- * @return style pointer to a style
- */
-const lv_style_t * lv_ta_get_style(const lv_obj_t * ta, lv_ta_style_t type);
-
-/**
- * Find whether text is selected or not.
- * @param ta Text area object
- * @return whether text is selected or not
- */
-bool lv_ta_text_is_selected(const lv_obj_t * ta);
-
-/**
- * Find whether selection mode is enabled.
- * @param ta pointer to a text area object
- * @return true: selection mode is enabled, false: disabled
- */
-bool lv_ta_get_text_sel_en(lv_obj_t * ta);
-
-/**
- * Set how long show the password before changing it to '*'
- * @param ta pointer to Text area
- * @return show time in milliseconds. 0: hide immediately.
- */
-uint16_t lv_ta_get_pwd_show_time(lv_obj_t * ta);
-
-/**
- * Set cursor blink animation time
- * @param ta pointer to Text area
- * @return time blink period. 0: disable blinking
- */
-uint16_t lv_ta_get_cursor_blink_time(lv_obj_t * ta);
-
-/*=====================
- * Other functions
- *====================*/
-
-/**
- * Clear the selection on the text area.
- * @param ta Text area object
- */
-void lv_ta_clear_selection(lv_obj_t * ta);
-
-/**
- * Move the cursor one character right
- * @param ta pointer to a text area object
- */
-void lv_ta_cursor_right(lv_obj_t * ta);
-
-/**
- * Move the cursor one character left
- * @param ta pointer to a text area object
- */
-void lv_ta_cursor_left(lv_obj_t * ta);
-
-/**
- * Move the cursor one line down
- * @param ta pointer to a text area object
- */
-void lv_ta_cursor_down(lv_obj_t * ta);
-
-/**
- * Move the cursor one line up
- * @param ta pointer to a text area object
- */
-void lv_ta_cursor_up(lv_obj_t * ta);
-
-/**********************
- * MACROS
- **********************/
-
-#endif /*LV_USE_TA_H*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_TA_H*/
diff --git a/src/libs/lvgl/src/lv_objx/lv_table.c b/src/libs/lvgl/src/lv_objx/lv_table.c
deleted file mode 100644
index 1410cc3a..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_table.c
+++ /dev/null
@@ -1,894 +0,0 @@
-/**
- * @file lv_table.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_table.h"
-#if LV_USE_TABLE != 0
-
-#include "../lv_core/lv_debug.h"
-#include "../lv_misc/lv_txt.h"
-#include "../lv_misc/lv_math.h"
-#include "../lv_draw/lv_draw_label.h"
-#include "../lv_themes/lv_theme.h"
-
-/*********************
- * DEFINES
- *********************/
-#define LV_OBJX_NAME "lv_table"
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static bool lv_table_design(lv_obj_t * table, const lv_area_t * mask, lv_design_mode_t mode);
-static lv_res_t lv_table_signal(lv_obj_t * table, lv_signal_t sign, void * param);
-static lv_coord_t get_row_height(lv_obj_t * table, uint16_t row_id);
-static void refr_size(lv_obj_t * table);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_signal_cb_t ancestor_signal;
-static lv_design_cb_t ancestor_scrl_design;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Create a table object
- * @param par pointer to an object, it will be the parent of the new table
- * @param copy pointer to a table object, if not NULL then the new object will be copied from it
- * @return pointer to the created table
- */
-lv_obj_t * lv_table_create(lv_obj_t * par, const lv_obj_t * copy)
-{
- LV_LOG_TRACE("table create started");
-
- /*Create the ancestor of table*/
- lv_obj_t * new_table = lv_obj_create(par, copy);
- LV_ASSERT_MEM(new_table);
- if(new_table == NULL) return NULL;
-
- /*Allocate the table type specific extended data*/
- lv_table_ext_t * ext = lv_obj_allocate_ext_attr(new_table, sizeof(lv_table_ext_t));
- LV_ASSERT_MEM(ext);
- if(ext == NULL) return NULL;
- if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_table);
- if(ancestor_scrl_design == NULL) ancestor_scrl_design = lv_obj_get_design_cb(new_table);
-
- /*Initialize the allocated 'ext' */
- ext->cell_data = NULL;
- ext->cell_style[0] = &lv_style_plain;
- ext->cell_style[1] = &lv_style_plain;
- ext->cell_style[2] = &lv_style_plain;
- ext->cell_style[3] = &lv_style_plain;
- ext->col_cnt = 0;
- ext->row_cnt = 0;
-
- uint16_t i;
- for(i = 0; i < LV_TABLE_COL_MAX; i++) {
- ext->col_w[i] = LV_DPI;
- }
-
- /*The signal and design functions are not copied so set them here*/
- lv_obj_set_signal_cb(new_table, lv_table_signal);
- lv_obj_set_design_cb(new_table, lv_table_design);
-
- /*Init the new table table*/
- if(copy == NULL) {
- /*Set the default styles*/
- lv_theme_t * th = lv_theme_get_current();
- if(th) {
- lv_table_set_style(new_table, LV_TABLE_STYLE_BG, th->style.table.bg);
- lv_table_set_style(new_table, LV_TABLE_STYLE_CELL1, th->style.table.cell);
- lv_table_set_style(new_table, LV_TABLE_STYLE_CELL2, th->style.table.cell);
- lv_table_set_style(new_table, LV_TABLE_STYLE_CELL3, th->style.table.cell);
- lv_table_set_style(new_table, LV_TABLE_STYLE_CELL4, th->style.table.cell);
- } else {
- lv_table_set_style(new_table, LV_TABLE_STYLE_BG, &lv_style_plain_color);
- }
- lv_obj_set_click(new_table, false); /*Can be removed if click support is added*/
- }
- /*Copy an existing table*/
- else {
- lv_table_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
- ext->cell_style[0] = copy_ext->cell_style[0];
- ext->cell_style[1] = copy_ext->cell_style[1];
- ext->cell_style[2] = copy_ext->cell_style[2];
- ext->cell_style[3] = copy_ext->cell_style[3];
- lv_table_set_row_cnt(new_table, copy_ext->row_cnt);
- lv_table_set_col_cnt(new_table, copy_ext->col_cnt);
-
- /*Refresh the style with new signal function*/
- lv_obj_refresh_style(new_table);
- }
-
- LV_LOG_INFO("table created");
-
- return new_table;
-}
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set the value of a cell.
- * @param table pointer to a Table object
- * @param row id of the row [0 .. row_cnt -1]
- * @param col id of the column [0 .. col_cnt -1]
- * @param txt text to display in the cell. It will be copied and saved so this variable is not
- * required after this function call.
- */
-void lv_table_set_cell_value(lv_obj_t * table, uint16_t row, uint16_t col, const char * txt)
-{
- LV_ASSERT_OBJ(table, LV_OBJX_NAME);
- LV_ASSERT_NULL(txt);
-
- lv_table_ext_t * ext = lv_obj_get_ext_attr(table);
- if(row >= ext->row_cnt || col >= ext->col_cnt) {
- LV_LOG_WARN("lv_table_set_cell_value: invalid row or column");
- return;
- }
- uint32_t cell = row * ext->col_cnt + col;
- lv_table_cell_format_t format;
-
- /*Save the format byte*/
- if(ext->cell_data[cell]) {
- format.format_byte = ext->cell_data[cell][0];
- }
- /*Initialize the format byte*/
- else {
-#if LV_USE_BIDI
- lv_bidi_dir_t base_dir = lv_obj_get_base_dir(table);
- if(base_dir == LV_BIDI_DIR_LTR) format.s.align = LV_LABEL_ALIGN_LEFT;
- else if(base_dir == LV_BIDI_DIR_RTL) format.s.align = LV_LABEL_ALIGN_RIGHT;
- else if(base_dir == LV_BIDI_DIR_AUTO) format.s.align = lv_bidi_detect_base_dir(txt);
-#else
- format.s.align = LV_LABEL_ALIGN_LEFT;
-#endif
-
- format.s.right_merge = 0;
- format.s.type = 0;
- format.s.crop = 0;
- }
-
- ext->cell_data[cell] = lv_mem_realloc(ext->cell_data[cell], strlen(txt) + 2); /*+1: trailing '\0; +1: format byte*/
- strcpy(ext->cell_data[cell] + 1, txt); /*+1 to skip the format byte*/
-
- ext->cell_data[cell][0] = format.format_byte;
- refr_size(table);
-}
-
-/**
- * Set the number of rows
- * @param table table pointer to a Table object
- * @param row_cnt number of rows
- */
-void lv_table_set_row_cnt(lv_obj_t * table, uint16_t row_cnt)
-{
- LV_ASSERT_OBJ(table, LV_OBJX_NAME);
-
- lv_table_ext_t * ext = lv_obj_get_ext_attr(table);
- uint16_t old_row_cnt = ext->row_cnt;
- ext->row_cnt = row_cnt;
-
- if(ext->row_cnt > 0 && ext->col_cnt > 0) {
- ext->cell_data = lv_mem_realloc(ext->cell_data, ext->row_cnt * ext->col_cnt * sizeof(char *));
-
- /*Initilize the new fields*/
- if(old_row_cnt < row_cnt) {
- uint16_t old_cell_cnt = old_row_cnt * ext->col_cnt;
- uint32_t new_cell_cnt = ext->col_cnt * ext->row_cnt;
- memset(&ext->cell_data[old_cell_cnt], 0, (new_cell_cnt - old_cell_cnt) * sizeof(ext->cell_data[0]));
- }
- } else {
- lv_mem_free(ext->cell_data);
- ext->cell_data = NULL;
- }
-
- refr_size(table);
-}
-
-/**
- * Set the number of columns
- * @param table table pointer to a Table object
- * @param col_cnt number of columns. Must be < LV_TABLE_COL_MAX
- */
-void lv_table_set_col_cnt(lv_obj_t * table, uint16_t col_cnt)
-{
- LV_ASSERT_OBJ(table, LV_OBJX_NAME);
-
- if(col_cnt >= LV_TABLE_COL_MAX) {
- LV_LOG_WARN("lv_table_set_col_cnt: too many columns. Must be < LV_TABLE_COL_MAX.");
- return;
- }
-
- lv_table_ext_t * ext = lv_obj_get_ext_attr(table);
- uint16_t old_col_cnt = ext->col_cnt;
- ext->col_cnt = col_cnt;
-
- if(ext->row_cnt > 0 && ext->col_cnt > 0) {
- ext->cell_data = lv_mem_realloc(ext->cell_data, ext->row_cnt * ext->col_cnt * sizeof(char *));
- /*Initilize the new fields*/
- if(old_col_cnt < col_cnt) {
- uint16_t old_cell_cnt = old_col_cnt * ext->row_cnt;
- uint32_t new_cell_cnt = ext->col_cnt * ext->row_cnt;
- memset(&ext->cell_data[old_cell_cnt], 0, (new_cell_cnt - old_cell_cnt) * sizeof(ext->cell_data[0]));
- }
-
- } else {
- lv_mem_free(ext->cell_data);
- ext->cell_data = NULL;
- }
- refr_size(table);
-}
-
-/**
- * Set the width of a column
- * @param table table pointer to a Table object
- * @param col_id id of the column [0 .. LV_TABLE_COL_MAX -1]
- * @param w width of the column
- */
-void lv_table_set_col_width(lv_obj_t * table, uint16_t col_id, lv_coord_t w)
-{
- LV_ASSERT_OBJ(table, LV_OBJX_NAME);
-
- if(col_id >= LV_TABLE_COL_MAX) {
- LV_LOG_WARN("lv_table_set_col_width: too big 'col_id'. Must be < LV_TABLE_COL_MAX.");
- return;
- }
-
- lv_table_ext_t * ext = lv_obj_get_ext_attr(table);
- ext->col_w[col_id] = w;
- refr_size(table);
-}
-
-/**
- * Set the text align in a cell
- * @param table pointer to a Table object
- * @param row id of the row [0 .. row_cnt -1]
- * @param col id of the column [0 .. col_cnt -1]
- * @param align LV_LABEL_ALIGN_LEFT or LV_LABEL_ALIGN_CENTER or LV_LABEL_ALIGN_RIGHT
- */
-void lv_table_set_cell_align(lv_obj_t * table, uint16_t row, uint16_t col, lv_label_align_t align)
-{
- LV_ASSERT_OBJ(table, LV_OBJX_NAME);
-
- lv_table_ext_t * ext = lv_obj_get_ext_attr(table);
- if(row >= ext->row_cnt || col >= ext->col_cnt) {
- LV_LOG_WARN("lv_table_set_cell_align: invalid row or column");
- return;
- }
- uint32_t cell = row * ext->col_cnt + col;
-
- if(ext->cell_data[cell] == NULL) {
- ext->cell_data[cell] = lv_mem_alloc(2); /*+1: trailing '\0; +1: format byte*/
- ext->cell_data[cell][0] = 0;
- ext->cell_data[cell][1] = '\0';
- }
-
- lv_table_cell_format_t format;
- format.format_byte = ext->cell_data[cell][0];
- format.s.align = align;
- ext->cell_data[cell][0] = format.format_byte;
-}
-
-/**
- * Set the type of a cell.
- * @param table pointer to a Table object
- * @param row id of the row [0 .. row_cnt -1]
- * @param col id of the column [0 .. col_cnt -1]
- * @param type 1,2,3 or 4. The cell style will be chosen accordingly.
- */
-void lv_table_set_cell_type(lv_obj_t * table, uint16_t row, uint16_t col, uint8_t type)
-{
- LV_ASSERT_OBJ(table, LV_OBJX_NAME);
-
- lv_table_ext_t * ext = lv_obj_get_ext_attr(table);
- if(row >= ext->row_cnt || col >= ext->col_cnt) {
- LV_LOG_WARN("lv_table_set_cell_type: invalid row or column");
- return;
- }
- uint32_t cell = row * ext->col_cnt + col;
-
- if(ext->cell_data[cell] == NULL) {
- ext->cell_data[cell] = lv_mem_alloc(2); /*+1: trailing '\0; +1: format byte*/
- ext->cell_data[cell][0] = 0;
- ext->cell_data[cell][1] = '\0';
- }
-
- if(type > 0) type--; /*User gives 1,2,3,4 but easier to handle 0, 1, 2, 3*/
- if(type >= LV_TABLE_CELL_STYLE_CNT) type = LV_TABLE_CELL_STYLE_CNT - 1;
-
- lv_table_cell_format_t format;
- format.format_byte = ext->cell_data[cell][0];
- format.s.type = type;
- ext->cell_data[cell][0] = format.format_byte;
-}
-
-/**
- * Set the cell crop. (Don't adjust the height of the cell according to its content)
- * @param table pointer to a Table object
- * @param row id of the row [0 .. row_cnt -1]
- * @param col id of the column [0 .. col_cnt -1]
- * @param crop true: crop the cell content; false: set the cell height to the content.
- */
-void lv_table_set_cell_crop(lv_obj_t * table, uint16_t row, uint16_t col, bool crop)
-{
- LV_ASSERT_OBJ(table, LV_OBJX_NAME);
-
- lv_table_ext_t * ext = lv_obj_get_ext_attr(table);
- if(row >= ext->row_cnt || col >= ext->col_cnt) {
- LV_LOG_WARN("lv_table_set_cell_crop: invalid row or column");
- return;
- }
- uint32_t cell = row * ext->col_cnt + col;
-
- if(ext->cell_data[cell] == NULL) {
- ext->cell_data[cell] = lv_mem_alloc(2); /*+1: trailing '\0; +1: format byte*/
- ext->cell_data[cell][0] = 0;
- ext->cell_data[cell][1] = '\0';
- }
-
- lv_table_cell_format_t format;
- format.format_byte = ext->cell_data[cell][0];
- format.s.crop = crop;
- ext->cell_data[cell][0] = format.format_byte;
-}
-
-/**
- * Merge a cell with the right neighbor. The value of the cell to the right won't be displayed.
- * @param table table pointer to a Table object
- * @param row id of the row [0 .. row_cnt -1]
- * @param col id of the column [0 .. col_cnt -1]
- * @param en true: merge right; false: don't merge right
- */
-void lv_table_set_cell_merge_right(lv_obj_t * table, uint16_t row, uint16_t col, bool en)
-{
- LV_ASSERT_OBJ(table, LV_OBJX_NAME);
-
- lv_table_ext_t * ext = lv_obj_get_ext_attr(table);
- if(row >= ext->row_cnt || col >= ext->col_cnt) {
- LV_LOG_WARN("lv_table_set_cell_merge_right: invalid row or column");
- return;
- }
-
- uint32_t cell = row * ext->col_cnt + col;
-
- if(ext->cell_data[cell] == NULL) {
- ext->cell_data[cell] = lv_mem_alloc(2); /*+1: trailing '\0; +1: format byte*/
- ext->cell_data[cell][0] = 0;
- ext->cell_data[cell][1] = '\0';
- }
-
- lv_table_cell_format_t format;
- format.format_byte = ext->cell_data[cell][0];
- format.s.right_merge = en ? 1 : 0;
- ext->cell_data[cell][0] = format.format_byte;
- refr_size(table);
-}
-
-/**
- * Set a style of a table.
- * @param table pointer to table object
- * @param type which style should be set
- * @param style pointer to a style
- */
-void lv_table_set_style(lv_obj_t * table, lv_table_style_t type, const lv_style_t * style)
-{
- LV_ASSERT_OBJ(table, LV_OBJX_NAME);
-
- lv_table_ext_t * ext = lv_obj_get_ext_attr(table);
-
- switch(type) {
- case LV_TABLE_STYLE_BG:
- lv_obj_set_style(table, style);
- refr_size(table);
- break;
- case LV_TABLE_STYLE_CELL1:
- ext->cell_style[0] = style;
- refr_size(table);
- break;
- case LV_TABLE_STYLE_CELL2:
- ext->cell_style[1] = style;
- refr_size(table);
- break;
- case LV_TABLE_STYLE_CELL3:
- ext->cell_style[2] = style;
- refr_size(table);
- break;
- case LV_TABLE_STYLE_CELL4:
- ext->cell_style[3] = style;
- refr_size(table);
- break;
- }
-}
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the value of a cell.
- * @param table pointer to a Table object
- * @param row id of the row [0 .. row_cnt -1]
- * @param col id of the column [0 .. col_cnt -1]
- * @return text in the cell
- */
-const char * lv_table_get_cell_value(lv_obj_t * table, uint16_t row, uint16_t col)
-{
- LV_ASSERT_OBJ(table, LV_OBJX_NAME);
-
- lv_table_ext_t * ext = lv_obj_get_ext_attr(table);
- if(row >= ext->row_cnt || col >= ext->col_cnt) {
- LV_LOG_WARN("lv_table_set_cell_value: invalid row or column");
- return "";
- }
- uint32_t cell = row * ext->col_cnt + col;
-
- if(ext->cell_data[cell] == NULL) return "";
-
- return &ext->cell_data[cell][1]; /*Skip the format byte*/
-}
-
-/**
- * Get the number of rows.
- * @param table table pointer to a Table object
- * @return number of rows.
- */
-uint16_t lv_table_get_row_cnt(lv_obj_t * table)
-{
- LV_ASSERT_OBJ(table, LV_OBJX_NAME);
-
- lv_table_ext_t * ext = lv_obj_get_ext_attr(table);
- return ext->row_cnt;
-}
-
-/**
- * Get the number of columns.
- * @param table table pointer to a Table object
- * @return number of columns.
- */
-uint16_t lv_table_get_col_cnt(lv_obj_t * table)
-{
- LV_ASSERT_OBJ(table, LV_OBJX_NAME);
-
- lv_table_ext_t * ext = lv_obj_get_ext_attr(table);
- return ext->col_cnt;
-}
-
-/**
- * Get the width of a column
- * @param table table pointer to a Table object
- * @param col_id id of the column [0 .. LV_TABLE_COL_MAX -1]
- * @return width of the column
- */
-lv_coord_t lv_table_get_col_width(lv_obj_t * table, uint16_t col_id)
-{
- LV_ASSERT_OBJ(table, LV_OBJX_NAME);
-
- if(col_id >= LV_TABLE_COL_MAX) {
- LV_LOG_WARN("lv_table_set_col_width: too big 'col_id'. Must be < LV_TABLE_COL_MAX.");
- return 0;
- }
-
- lv_table_ext_t * ext = lv_obj_get_ext_attr(table);
- return ext->col_w[col_id];
-}
-
-/**
- * Get the text align of a cell
- * @param table pointer to a Table object
- * @param row id of the row [0 .. row_cnt -1]
- * @param col id of the column [0 .. col_cnt -1]
- * @return LV_LABEL_ALIGN_LEFT (default in case of error) or LV_LABEL_ALIGN_CENTER or
- * LV_LABEL_ALIGN_RIGHT
- */
-lv_label_align_t lv_table_get_cell_align(lv_obj_t * table, uint16_t row, uint16_t col)
-{
- LV_ASSERT_OBJ(table, LV_OBJX_NAME);
-
- lv_table_ext_t * ext = lv_obj_get_ext_attr(table);
- if(row >= ext->row_cnt || col >= ext->col_cnt) {
- LV_LOG_WARN("lv_table_set_cell_align: invalid row or column");
- return LV_LABEL_ALIGN_LEFT; /*Just return with something*/
- }
- uint32_t cell = row * ext->col_cnt + col;
-
- if(ext->cell_data[cell] == NULL)
- return LV_LABEL_ALIGN_LEFT; /*Just return with something*/
- else {
- lv_table_cell_format_t format;
- format.format_byte = ext->cell_data[cell][0];
- return format.s.align;
- }
-}
-
-/**
- * Get the type of a cell
- * @param table pointer to a Table object
- * @param row id of the row [0 .. row_cnt -1]
- * @param col id of the column [0 .. col_cnt -1]
- * @return 1,2,3 or 4
- */
-lv_label_align_t lv_table_get_cell_type(lv_obj_t * table, uint16_t row, uint16_t col)
-{
- LV_ASSERT_OBJ(table, LV_OBJX_NAME);
-
- lv_table_ext_t * ext = lv_obj_get_ext_attr(table);
- if(row >= ext->row_cnt || col >= ext->col_cnt) {
- LV_LOG_WARN("lv_table_get_cell_type: invalid row or column");
- return 1; /*Just return with something*/
- }
- uint32_t cell = row * ext->col_cnt + col;
-
- if(ext->cell_data[cell] == NULL)
- return 1; /*Just return with something*/
- else {
- lv_table_cell_format_t format;
- format.format_byte = ext->cell_data[cell][0];
- return format.s.type + 1; /*0,1,2,3 is stored but user sees 1,2,3,4*/
- }
-}
-
-/**
- * Get the crop property of a cell
- * @param table pointer to a Table object
- * @param row id of the row [0 .. row_cnt -1]
- * @param col id of the column [0 .. col_cnt -1]
- * @return true: text crop enabled; false: disabled
- */
-lv_label_align_t lv_table_get_cell_crop(lv_obj_t * table, uint16_t row, uint16_t col)
-{
- LV_ASSERT_OBJ(table, LV_OBJX_NAME);
-
- lv_table_ext_t * ext = lv_obj_get_ext_attr(table);
- if(row >= ext->row_cnt || col >= ext->col_cnt) {
- LV_LOG_WARN("lv_table_get_cell_crop: invalid row or column");
- return false; /*Just return with something*/
- }
- uint32_t cell = row * ext->col_cnt + col;
-
- if(ext->cell_data[cell] == NULL)
- return false; /*Just return with something*/
- else {
- lv_table_cell_format_t format;
- format.format_byte = ext->cell_data[cell][0];
- return format.s.crop;
- }
-}
-
-/**
- * Get the cell merge attribute.
- * @param table table pointer to a Table object
- * @param row id of the row [0 .. row_cnt -1]
- * @param col id of the column [0 .. col_cnt -1]
- * @return true: merge right; false: don't merge right
- */
-bool lv_table_get_cell_merge_right(lv_obj_t * table, uint16_t row, uint16_t col)
-{
- LV_ASSERT_OBJ(table, LV_OBJX_NAME);
-
- lv_table_ext_t * ext = lv_obj_get_ext_attr(table);
- if(row >= ext->row_cnt || col >= ext->col_cnt) {
- LV_LOG_WARN("lv_table_get_cell_merge_right: invalid row or column");
- return false;
- }
-
- uint32_t cell = row * ext->col_cnt + col;
-
- if(ext->cell_data[cell] == NULL)
- return false;
- else {
- lv_table_cell_format_t format;
- format.format_byte = ext->cell_data[cell][0];
- return format.s.right_merge ? true : false;
- }
-}
-
-/**
- * Get style of a table.
- * @param table pointer to table object
- * @param type which style should be get
- * @return style pointer to the style
- */
-const lv_style_t * lv_table_get_style(const lv_obj_t * table, lv_table_style_t type)
-{
- LV_ASSERT_OBJ(table, LV_OBJX_NAME);
-
- lv_table_ext_t * ext = lv_obj_get_ext_attr(table);
- const lv_style_t * style = NULL;
-
- switch(type) {
- case LV_TABLE_STYLE_BG: style = lv_obj_get_style(table); break;
- case LV_TABLE_STYLE_CELL1: style = ext->cell_style[0]; break;
- case LV_TABLE_STYLE_CELL2: style = ext->cell_style[1]; break;
- case LV_TABLE_STYLE_CELL3: style = ext->cell_style[2]; break;
- case LV_TABLE_STYLE_CELL4: style = ext->cell_style[3]; break;
- default: return NULL;
- }
-
- return style;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Handle the drawing related tasks of the tables
- * @param table pointer to an object
- * @param mask the object will be drawn only in this area
- * @param mode LV_DESIGN_COVER_CHK: only check if the object fully covers the 'mask_p' area
- * (return 'true' if yes)
- * LV_DESIGN_DRAW: draw the object (always return 'true')
- * LV_DESIGN_DRAW_POST: drawing after every children are drawn
- * @param return true/false, depends on 'mode'
- */
-static bool lv_table_design(lv_obj_t * table, const lv_area_t * mask, lv_design_mode_t mode)
-{
- /*Return false if the object is not covers the mask_p area*/
- if(mode == LV_DESIGN_COVER_CHK) {
- return false;
- }
- /*Draw the object*/
- else if(mode == LV_DESIGN_DRAW_MAIN) {
- ancestor_scrl_design(table, mask, mode);
-
- lv_table_ext_t * ext = lv_obj_get_ext_attr(table);
- const lv_style_t * bg_style = lv_obj_get_style(table);
- lv_coord_t h_row;
- lv_point_t txt_size;
- lv_area_t cell_area;
- lv_area_t txt_area;
- lv_txt_flag_t txt_flags;
- lv_opa_t opa_scale = lv_obj_get_opa_scale(table);
-
- uint16_t col;
- uint16_t row;
- uint16_t cell = 0;
-
- cell_area.y2 = table->coords.y1 + bg_style->body.padding.top;
- for(row = 0; row < ext->row_cnt; row++) {
- h_row = get_row_height(table, row);
-
- cell_area.y1 = cell_area.y2 + 1;
- cell_area.y2 = cell_area.y1 + h_row - 1;
-
- cell_area.x2 = table->coords.x1 + bg_style->body.padding.left;
-
- for(col = 0; col < ext->col_cnt; col++) {
-
- lv_table_cell_format_t format;
- if(ext->cell_data[cell]) {
- format.format_byte = ext->cell_data[cell][0];
- } else {
- format.s.right_merge = 0;
- format.s.align = LV_LABEL_ALIGN_LEFT;
- format.s.type = 0;
- format.s.crop = 1;
- }
-
-
- lv_style_t cell_style;
- lv_style_copy(&cell_style, ext->cell_style[format.s.type]);
- cell_area.x1 = cell_area.x2 + 1;
- cell_area.x2 = cell_area.x1 + ext->col_w[col] - 1;
-
- uint16_t col_merge = 0;
- for(col_merge = 0; col_merge + col < ext->col_cnt - 1; col_merge++) {
-
- if(ext->cell_data[cell + col_merge] != NULL) {
- format.format_byte = ext->cell_data[cell + col_merge][0];
- if(format.s.right_merge)
- cell_area.x2 += ext->col_w[col + col_merge + 1];
- else
- break;
- } else {
- break;
- }
- }
-
- lv_draw_rect(&cell_area, mask, &cell_style, opa_scale);
-
- if(ext->cell_data[cell]) {
-
- txt_area.x1 = cell_area.x1 + cell_style.body.padding.left;
- txt_area.x2 = cell_area.x2 - cell_style.body.padding.right;
- txt_area.y1 = cell_area.y1 + cell_style.body.padding.top;
- txt_area.y2 = cell_area.y2 - cell_style.body.padding.bottom;
- /*Align the content to the middle if not cropped*/
- if(format.s.crop == 0) {
- txt_flags = LV_TXT_FLAG_NONE;
- } else {
- txt_flags = LV_TXT_FLAG_EXPAND;
- }
-
- lv_txt_get_size(&txt_size, ext->cell_data[cell] + 1, cell_style.text.font,
- cell_style.text.letter_space, cell_style.text.line_space,
- lv_area_get_width(&txt_area), txt_flags);
-
- /*Align the content to the middle if not cropped*/
- if(format.s.crop == 0) {
- txt_area.y1 = cell_area.y1 + h_row / 2 - txt_size.y / 2;
- txt_area.y2 = cell_area.y1 + h_row / 2 + txt_size.y / 2;
- }
-
- switch(format.s.align) {
- default:
- case LV_LABEL_ALIGN_LEFT: txt_flags |= LV_TXT_FLAG_NONE; break;
- case LV_LABEL_ALIGN_RIGHT: txt_flags |= LV_TXT_FLAG_RIGHT; break;
- case LV_LABEL_ALIGN_CENTER: txt_flags |= LV_TXT_FLAG_CENTER; break;
- }
-
- lv_area_t label_mask;
- bool label_mask_ok;
- label_mask_ok = lv_area_intersect(&label_mask, mask, &cell_area);
- if(label_mask_ok) {
- lv_draw_label(&txt_area, &label_mask, &cell_style, opa_scale, ext->cell_data[cell] + 1,
- txt_flags, NULL, NULL, NULL, lv_obj_get_base_dir(table));
- }
- /*Draw lines after '\n's*/
- lv_point_t p1;
- lv_point_t p2;
- p1.x = cell_area.x1;
- p2.x = cell_area.x2;
- uint16_t i;
- for(i = 1; ext->cell_data[cell][i] != '\0'; i++) {
- if(ext->cell_data[cell][i] == '\n') {
- ext->cell_data[cell][i] = '\0';
- lv_txt_get_size(&txt_size, ext->cell_data[cell] + 1, cell_style.text.font,
- cell_style.text.letter_space, cell_style.text.line_space,
- lv_area_get_width(&txt_area), txt_flags);
-
- p1.y = txt_area.y1 + txt_size.y + cell_style.text.line_space / 2;
- p2.y = txt_area.y1 + txt_size.y + cell_style.text.line_space / 2;
- lv_draw_line(&p1, &p2, mask, &cell_style, opa_scale);
-
- ext->cell_data[cell][i] = '\n';
- }
- }
- }
-
- cell += col_merge + 1;
- col += col_merge;
- }
- }
- }
- /*Post draw when the children are drawn*/
- else if(mode == LV_DESIGN_DRAW_POST) {
- }
-
- return true;
-}
-
-/**
- * Signal function of the table
- * @param table pointer to a table object
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_table_signal(lv_obj_t * table, lv_signal_t sign, void * param)
-{
- lv_res_t res;
-
- /* Include the ancient signal function */
- res = ancestor_signal(table, sign, param);
- if(res != LV_RES_OK) return res;
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);
-
- if(sign == LV_SIGNAL_CLEANUP) {
- /*Free the cell texts*/
- lv_table_ext_t * ext = lv_obj_get_ext_attr(table);
- uint16_t cell;
- for(cell = 0; cell < ext->col_cnt * ext->row_cnt; cell++) {
- if(ext->cell_data[cell]) {
- lv_mem_free(ext->cell_data[cell]);
- ext->cell_data[cell] = NULL;
- }
- }
- if(ext->cell_data != NULL)
- lv_mem_free(ext->cell_data);
- }
-
- return res;
-}
-
-static void refr_size(lv_obj_t * table)
-{
- lv_coord_t h = 0;
- lv_coord_t w = 0;
-
- lv_table_ext_t * ext = lv_obj_get_ext_attr(table);
-
- uint16_t i;
- for(i = 0; i < ext->col_cnt; i++) {
- w += ext->col_w[i];
- }
- for(i = 0; i < ext->row_cnt; i++) {
- h += get_row_height(table, i);
- }
-
- const lv_style_t * bg_style = lv_obj_get_style(table);
-
- w += bg_style->body.padding.left + bg_style->body.padding.right;
- h += bg_style->body.padding.top + bg_style->body.padding.bottom;
-
- lv_obj_set_size(table, w + 1, h + 1);
- lv_obj_invalidate(table);
-}
-
-static lv_coord_t get_row_height(lv_obj_t * table, uint16_t row_id)
-{
- lv_table_ext_t * ext = lv_obj_get_ext_attr(table);
- lv_point_t txt_size;
- lv_coord_t txt_w;
- const lv_style_t * cell_style;
-
- uint16_t row_start = row_id * ext->col_cnt;
- uint16_t cell;
- uint16_t col;
- lv_coord_t h_max = lv_font_get_line_height(ext->cell_style[0]->text.font) + ext->cell_style[0]->body.padding.top +
- ext->cell_style[0]->body.padding.bottom;
-
- for(cell = row_start, col = 0; cell < row_start + ext->col_cnt; cell++, col++) {
- if(ext->cell_data[cell] != NULL) {
-
- txt_w = ext->col_w[col];
- uint16_t col_merge = 0;
- for(col_merge = 0; col_merge + col < ext->col_cnt - 1; col_merge++) {
-
- if(ext->cell_data[cell + col_merge] != NULL) {
- lv_table_cell_format_t format;
- format.format_byte = ext->cell_data[cell + col_merge][0];
- if(format.s.right_merge)
- txt_w += ext->col_w[col + col_merge + 1];
- else
- break;
- } else {
- break;
- }
- }
-
- lv_table_cell_format_t format;
- format.format_byte = ext->cell_data[cell][0];
- cell_style = ext->cell_style[format.s.type];
-
- /*With text crop assume 1 line*/
- if(format.s.crop) {
- h_max = LV_MATH_MAX(lv_font_get_line_height(cell_style->text.font) + cell_style->body.padding.top +
- cell_style->body.padding.bottom,
- h_max);
- }
- /*Without text crop calculate the height of the text in the cell*/
- else {
- txt_w -= cell_style->body.padding.left + cell_style->body.padding.right;
-
- lv_txt_get_size(&txt_size, ext->cell_data[cell] + 1, cell_style->text.font,
- cell_style->text.letter_space, cell_style->text.line_space, txt_w, LV_TXT_FLAG_NONE);
-
- h_max = LV_MATH_MAX(txt_size.y + cell_style->body.padding.top + cell_style->body.padding.bottom, h_max);
- cell += col_merge;
- col += col_merge;
- }
- }
- }
-
- return h_max;
-}
-
-#endif
diff --git a/src/libs/lvgl/src/lv_objx/lv_table.h b/src/libs/lvgl/src/lv_objx/lv_table.h
deleted file mode 100644
index d6a0be7d..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_table.h
+++ /dev/null
@@ -1,268 +0,0 @@
-/**
- * @file lv_table.h
- *
- */
-
-#ifndef LV_TABLE_H
-#define LV_TABLE_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_TABLE != 0
-
-/*Testing of dependencies*/
-#if LV_USE_LABEL == 0
-#error "lv_table: lv_label is required. Enable it in lv_conf.h (LV_USE_LABEL 1) "
-#endif
-
-#include "../lv_core/lv_obj.h"
-#include "lv_label.h"
-
-/*********************
- * DEFINES
- *********************/
-#ifndef LV_TABLE_COL_MAX
-#define LV_TABLE_COL_MAX 12
-#endif
-
-#define LV_TABLE_CELL_STYLE_CNT 4
-/**********************
- * TYPEDEFS
- **********************/
-
-/**
- * Internal table cell format structure.
- *
- * Use the `lv_table` APIs instead.
- */
-typedef union
-{
- struct
- {
- uint8_t align : 2;
- uint8_t right_merge : 1;
- uint8_t type : 2;
- uint8_t crop : 1;
- } s;
- uint8_t format_byte;
-} lv_table_cell_format_t;
-
-/*Data of table*/
-typedef struct
-{
- /*New data for this type */
- uint16_t col_cnt;
- uint16_t row_cnt;
- char ** cell_data;
- const lv_style_t * cell_style[LV_TABLE_CELL_STYLE_CNT];
- lv_coord_t col_w[LV_TABLE_COL_MAX];
-} lv_table_ext_t;
-
-/*Styles*/
-enum {
- LV_TABLE_STYLE_BG,
- LV_TABLE_STYLE_CELL1,
- LV_TABLE_STYLE_CELL2,
- LV_TABLE_STYLE_CELL3,
- LV_TABLE_STYLE_CELL4,
-};
-typedef uint8_t lv_table_style_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Create a table object
- * @param par pointer to an object, it will be the parent of the new table
- * @param copy pointer to a table object, if not NULL then the new object will be copied from it
- * @return pointer to the created table
- */
-lv_obj_t * lv_table_create(lv_obj_t * par, const lv_obj_t * copy);
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set the value of a cell.
- * @param table pointer to a Table object
- * @param row id of the row [0 .. row_cnt -1]
- * @param col id of the column [0 .. col_cnt -1]
- * @param txt text to display in the cell. It will be copied and saved so this variable is not
- * required after this function call.
- */
-void lv_table_set_cell_value(lv_obj_t * table, uint16_t row, uint16_t col, const char * txt);
-
-/**
- * Set the number of rows
- * @param table table pointer to a Table object
- * @param row_cnt number of rows
- */
-void lv_table_set_row_cnt(lv_obj_t * table, uint16_t row_cnt);
-
-/**
- * Set the number of columns
- * @param table table pointer to a Table object
- * @param col_cnt number of columns. Must be < LV_TABLE_COL_MAX
- */
-void lv_table_set_col_cnt(lv_obj_t * table, uint16_t col_cnt);
-
-/**
- * Set the width of a column
- * @param table table pointer to a Table object
- * @param col_id id of the column [0 .. LV_TABLE_COL_MAX -1]
- * @param w width of the column
- */
-void lv_table_set_col_width(lv_obj_t * table, uint16_t col_id, lv_coord_t w);
-
-/**
- * Set the text align in a cell
- * @param table pointer to a Table object
- * @param row id of the row [0 .. row_cnt -1]
- * @param col id of the column [0 .. col_cnt -1]
- * @param align LV_LABEL_ALIGN_LEFT or LV_LABEL_ALIGN_CENTER or LV_LABEL_ALIGN_RIGHT
- */
-void lv_table_set_cell_align(lv_obj_t * table, uint16_t row, uint16_t col, lv_label_align_t align);
-
-/**
- * Set the type of a cell.
- * @param table pointer to a Table object
- * @param row id of the row [0 .. row_cnt -1]
- * @param col id of the column [0 .. col_cnt -1]
- * @param type 1,2,3 or 4. The cell style will be chosen accordingly.
- */
-void lv_table_set_cell_type(lv_obj_t * table, uint16_t row, uint16_t col, uint8_t type);
-
-/**
- * Set the cell crop. (Don't adjust the height of the cell according to its content)
- * @param table pointer to a Table object
- * @param row id of the row [0 .. row_cnt -1]
- * @param col id of the column [0 .. col_cnt -1]
- * @param crop true: crop the cell content; false: set the cell height to the content.
- */
-void lv_table_set_cell_crop(lv_obj_t * table, uint16_t row, uint16_t col, bool crop);
-
-/**
- * Merge a cell with the right neighbor. The value of the cell to the right won't be displayed.
- * @param table table pointer to a Table object
- * @param row id of the row [0 .. row_cnt -1]
- * @param col id of the column [0 .. col_cnt -1]
- * @param en true: merge right; false: don't merge right
- */
-void lv_table_set_cell_merge_right(lv_obj_t * table, uint16_t row, uint16_t col, bool en);
-
-/**
- * Set a style of a table.
- * @param table pointer to table object
- * @param type which style should be set
- * @param style pointer to a style
- */
-void lv_table_set_style(lv_obj_t * table, lv_table_style_t type, const lv_style_t * style);
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the value of a cell.
- * @param table pointer to a Table object
- * @param row id of the row [0 .. row_cnt -1]
- * @param col id of the column [0 .. col_cnt -1]
- * @return text in the cell
- */
-const char * lv_table_get_cell_value(lv_obj_t * table, uint16_t row, uint16_t col);
-
-/**
- * Get the number of rows.
- * @param table table pointer to a Table object
- * @return number of rows.
- */
-uint16_t lv_table_get_row_cnt(lv_obj_t * table);
-
-/**
- * Get the number of columns.
- * @param table table pointer to a Table object
- * @return number of columns.
- */
-uint16_t lv_table_get_col_cnt(lv_obj_t * table);
-
-/**
- * Get the width of a column
- * @param table table pointer to a Table object
- * @param col_id id of the column [0 .. LV_TABLE_COL_MAX -1]
- * @return width of the column
- */
-lv_coord_t lv_table_get_col_width(lv_obj_t * table, uint16_t col_id);
-
-/**
- * Get the text align of a cell
- * @param table pointer to a Table object
- * @param row id of the row [0 .. row_cnt -1]
- * @param col id of the column [0 .. col_cnt -1]
- * @return LV_LABEL_ALIGN_LEFT (default in case of error) or LV_LABEL_ALIGN_CENTER or
- * LV_LABEL_ALIGN_RIGHT
- */
-lv_label_align_t lv_table_get_cell_align(lv_obj_t * table, uint16_t row, uint16_t col);
-
-/**
- * Get the type of a cell
- * @param table pointer to a Table object
- * @param row id of the row [0 .. row_cnt -1]
- * @param col id of the column [0 .. col_cnt -1]
- * @return 1,2,3 or 4
- */
-lv_label_align_t lv_table_get_cell_type(lv_obj_t * table, uint16_t row, uint16_t col);
-
-/**
- * Get the crop property of a cell
- * @param table pointer to a Table object
- * @param row id of the row [0 .. row_cnt -1]
- * @param col id of the column [0 .. col_cnt -1]
- * @return true: text crop enabled; false: disabled
- */
-lv_label_align_t lv_table_get_cell_crop(lv_obj_t * table, uint16_t row, uint16_t col);
-
-/**
- * Get the cell merge attribute.
- * @param table table pointer to a Table object
- * @param row id of the row [0 .. row_cnt -1]
- * @param col id of the column [0 .. col_cnt -1]
- * @return true: merge right; false: don't merge right
- */
-bool lv_table_get_cell_merge_right(lv_obj_t * table, uint16_t row, uint16_t col);
-
-/**
- * Get style of a table.
- * @param table pointer to table object
- * @param type which style should be get
- * @return style pointer to the style
- */
-const lv_style_t * lv_table_get_style(const lv_obj_t * table, lv_table_style_t type);
-
-/*=====================
- * Other functions
- *====================*/
-
-/**********************
- * MACROS
- **********************/
-
-#endif /*LV_USE_TABLE*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_TABLE_H*/
diff --git a/src/libs/lvgl/src/lv_objx/lv_tabview.c b/src/libs/lvgl/src/lv_objx/lv_tabview.c
deleted file mode 100644
index 809cf241..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_tabview.c
+++ /dev/null
@@ -1,1175 +0,0 @@
-/**
- * @file lv_tab.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_tabview.h"
-#if LV_USE_TABVIEW != 0
-
-#include "lv_btnm.h"
-#include "../lv_core/lv_debug.h"
-#include "../lv_themes/lv_theme.h"
-#include "../lv_misc/lv_anim.h"
-#include "../lv_core/lv_disp.h"
-
-/*********************
- * DEFINES
- *********************/
-#define LV_OBJX_NAME "lv_tabview"
-
-#if LV_USE_ANIMATION
-#ifndef LV_TABVIEW_DEF_ANIM_TIME
-#define LV_TABVIEW_DEF_ANIM_TIME 300 /*Animation time of focusing to the a list element [ms] (0: no animation) */
-#endif
-#else
-#undef LV_TABVIEW_DEF_ANIM_TIME
-#define LV_TABVIEW_DEF_ANIM_TIME 0 /*No animations*/
-#endif
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static lv_res_t lv_tabview_signal(lv_obj_t * tabview, lv_signal_t sign, void * param);
-static lv_res_t tabpage_signal(lv_obj_t * tab_page, lv_signal_t sign, void * param);
-static lv_res_t tabpage_scrl_signal(lv_obj_t * tab_scrl, lv_signal_t sign, void * param);
-
-static void tabpage_pressed_handler(lv_obj_t * tabview, lv_obj_t * tabpage);
-static void tabpage_pressing_handler(lv_obj_t * tabview, lv_obj_t * tabpage);
-static void tabpage_press_lost_handler(lv_obj_t * tabview, lv_obj_t * tabpage);
-static void tab_btnm_event_cb(lv_obj_t * tab_btnm, lv_event_t event);
-static void tabview_realign(lv_obj_t * tabview);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_signal_cb_t ancestor_signal;
-static lv_signal_cb_t page_signal;
-static lv_signal_cb_t page_scrl_signal;
-static const char * tab_def[] = {""};
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Create a Tab view object
- * @param par pointer to an object, it will be the parent of the new tab
- * @param copy pointer to a tab object, if not NULL then the new object will be copied from it
- * @return pointer to the created tab
- */
-lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy)
-{
- LV_LOG_TRACE("tab view create started");
-
- /*Create the ancestor of tab*/
- lv_obj_t * new_tabview = lv_obj_create(par, copy);
- LV_ASSERT_MEM(new_tabview);
- if(new_tabview == NULL) return NULL;
- if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_tabview);
-
- /*Allocate the tab type specific extended data*/
- lv_tabview_ext_t * ext = lv_obj_allocate_ext_attr(new_tabview, sizeof(lv_tabview_ext_t));
- LV_ASSERT_MEM(ext);
- if(ext == NULL) return NULL;
-
- /*Initialize the allocated 'ext' */
- ext->drag_hor = 0;
- ext->draging = 0;
- ext->scroll_ver = 0;
- ext->slide_enable = 1;
- ext->tab_cur = 0;
- ext->point_last.x = 0;
- ext->point_last.y = 0;
- ext->content = NULL;
- ext->indic = NULL;
- ext->btns = NULL;
- ext->btns_pos = LV_TABVIEW_BTNS_POS_TOP;
-#if LV_USE_ANIMATION
- ext->anim_time = LV_TABVIEW_DEF_ANIM_TIME;
-#endif
- ext->btns_hide = 0;
-
- /*The signal and design functions are not copied so set them here*/
- lv_obj_set_signal_cb(new_tabview, lv_tabview_signal);
-
- /*Init the new tab tab*/
- if(copy == NULL) {
- ext->tab_name_ptr = lv_mem_alloc(sizeof(char *));
- LV_ASSERT_MEM(ext->tab_name_ptr);
- if(ext->tab_name_ptr == NULL) return NULL;
- ext->tab_name_ptr[0] = "";
- ext->tab_cnt = 0;
-
- /* Set a size which fits into the parent.
- * Don't use `par` directly because if the tabview is created on a page it is moved to the
- * scrollable so the parent has changed */
- lv_coord_t w;
- lv_coord_t h;
- if(par) {
- w = lv_obj_get_width_fit(lv_obj_get_parent(new_tabview));
- h = lv_obj_get_height_fit(lv_obj_get_parent(new_tabview));
- } else {
- w = lv_disp_get_hor_res(NULL);
- h = lv_disp_get_ver_res(NULL);
- }
-
- lv_obj_set_size(new_tabview, w, h);
-
- ext->content = lv_cont_create(new_tabview, NULL);
- ext->btns = lv_btnm_create(new_tabview, NULL);
- ext->indic = lv_obj_create(ext->btns, NULL);
-
- lv_obj_set_height(ext->btns, 3 * LV_DPI / 4);
- lv_btnm_set_map(ext->btns, tab_def);
- lv_obj_set_event_cb(ext->btns, tab_btnm_event_cb);
-
- lv_obj_set_width(ext->indic, LV_DPI);
- lv_obj_align(ext->indic, ext->btns, LV_ALIGN_IN_BOTTOM_LEFT, 0, 0);
- lv_obj_set_click(ext->indic, false);
-
- lv_cont_set_fit2(ext->content, LV_FIT_TIGHT, LV_FIT_NONE);
- lv_cont_set_layout(ext->content, LV_LAYOUT_ROW_T);
- lv_cont_set_style(ext->content, LV_CONT_STYLE_MAIN, &lv_style_transp_tight);
- lv_obj_set_height(ext->content, lv_obj_get_height(new_tabview) - lv_obj_get_height(ext->btns));
- lv_obj_align(ext->content, ext->btns, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 0);
-
- /*Set the default styles*/
- lv_theme_t * th = lv_theme_get_current();
- if(th) {
- lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BG, th->style.tabview.bg);
- lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_INDIC, th->style.tabview.indic);
- lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BTN_BG, th->style.tabview.btn.bg);
- lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BTN_REL, th->style.tabview.btn.rel);
- lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BTN_PR, th->style.tabview.btn.pr);
- lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BTN_TGL_REL, th->style.tabview.btn.tgl_rel);
- lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BTN_TGL_PR, th->style.tabview.btn.tgl_pr);
- } else {
- lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BG, &lv_style_plain);
- lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BTN_BG, &lv_style_pretty);//transp);
- lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_INDIC, &lv_style_plain_color);
- }
- }
- /*Copy an existing tab view*/
- else {
- lv_tabview_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
- ext->point_last.x = 0;
- ext->point_last.y = 0;
- ext->btns = lv_btnm_create(new_tabview, copy_ext->btns);
- ext->indic = lv_obj_create(ext->btns, copy_ext->indic);
- ext->content = lv_cont_create(new_tabview, copy_ext->content);
-#if LV_USE_ANIMATION
- ext->anim_time = copy_ext->anim_time;
-#endif
-
- ext->tab_name_ptr = lv_mem_alloc(sizeof(char *));
- LV_ASSERT_MEM(ext->tab_name_ptr);
- if(ext->tab_name_ptr == NULL) return NULL;
- ext->tab_name_ptr[0] = "";
- lv_btnm_set_map(ext->btns, ext->tab_name_ptr);
-
- uint16_t i;
- lv_obj_t * new_tab;
- lv_obj_t * copy_tab;
- for(i = 0; i < copy_ext->tab_cnt; i++) {
- new_tab = lv_tabview_add_tab(new_tabview, copy_ext->tab_name_ptr[i]);
- copy_tab = lv_tabview_get_tab(copy, i);
- lv_page_set_style(new_tab, LV_PAGE_STYLE_BG, lv_page_get_style(copy_tab, LV_PAGE_STYLE_BG));
- lv_page_set_style(new_tab, LV_PAGE_STYLE_SCRL, lv_page_get_style(copy_tab, LV_PAGE_STYLE_SCRL));
- lv_page_set_style(new_tab, LV_PAGE_STYLE_SB, lv_page_get_style(copy_tab, LV_PAGE_STYLE_SB));
- }
-
- /*Refresh the style with new signal function*/
- lv_obj_refresh_style(new_tabview);
- }
-
- LV_LOG_INFO("tab view created");
-
- return new_tabview;
-}
-
-/**
- * Delete all children of the scrl object, without deleting scrl child.
- * @param tabview pointer to an object
- */
-void lv_tabview_clean(lv_obj_t * tabview)
-{
- LV_ASSERT_OBJ(tabview, LV_OBJX_NAME);
-
- lv_obj_t * scrl = lv_page_get_scrl(tabview);
- lv_obj_clean(scrl);
-}
-
-/*======================
- * Add/remove functions
- *=====================*/
-
-/**
- * Add a new tab with the given name
- * @param tabview pointer to Tab view object where to ass the new tab
- * @param name the text on the tab button
- * @return pointer to the created page object (lv_page). You can create your content here
- */
-lv_obj_t * lv_tabview_add_tab(lv_obj_t * tabview, const char * name)
-{
- LV_ASSERT_OBJ(tabview, LV_OBJX_NAME);
- LV_ASSERT_STR(name);
-
- lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview);
-
- /*Create the container page*/
- lv_obj_t * h = lv_page_create(ext->content, NULL);
- lv_obj_set_size(h, lv_obj_get_width(tabview), lv_obj_get_height(ext->content));
- lv_page_set_sb_mode(h, LV_SB_MODE_AUTO);
- lv_page_set_style(h, LV_PAGE_STYLE_BG, &lv_style_transp_tight);
- lv_page_set_style(h, LV_PAGE_STYLE_SCRL, &lv_style_transp);//plain_color);
-
- if(page_signal == NULL) page_signal = lv_obj_get_signal_cb(h);
- if(page_scrl_signal == NULL) page_scrl_signal = lv_obj_get_signal_cb(lv_page_get_scrl(h));
- lv_obj_set_signal_cb(h, tabpage_signal);
- lv_obj_set_signal_cb(lv_page_get_scrl(h), tabpage_scrl_signal);
-
- /*Extend the button matrix map with the new name*/
- char * name_dm;
- name_dm = lv_mem_alloc(strlen(name) + 1); /*+1 for the the closing '\0' */
- LV_ASSERT_MEM(name_dm);
- if(name_dm == NULL) return NULL;
- strcpy(name_dm, name);
-
- ext->tab_cnt++;
-
- switch(ext->btns_pos) {
- case LV_TABVIEW_BTNS_POS_TOP:
- case LV_TABVIEW_BTNS_POS_BOTTOM:
- ext->tab_name_ptr = lv_mem_realloc((void*)ext->tab_name_ptr, sizeof(char *) * (ext->tab_cnt + 1));
- break;
- case LV_TABVIEW_BTNS_POS_LEFT:
- case LV_TABVIEW_BTNS_POS_RIGHT:
- ext->tab_name_ptr = lv_mem_realloc((void*)ext->tab_name_ptr, sizeof(char *) * (ext->tab_cnt * 2));
- break;
- }
-
- LV_ASSERT_MEM(ext->tab_name_ptr);
- if(ext->tab_name_ptr == NULL) return NULL;
-
- /* FIXME: It is not possible yet to switch tab button position from/to top/bottom from/to left/right at runtime.
- * Method: clean extra \n when switch from LV_TABVIEW_BTNS_POS_LEFT or LV_TABVIEW_BTNS_POS_RIGHT
- * to LV_TABVIEW_BTNS_POS_TOP or LV_TABVIEW_BTNS_POS_BOTTOM.
- */
- switch(ext->btns_pos) {
- case LV_TABVIEW_BTNS_POS_TOP:
- case LV_TABVIEW_BTNS_POS_BOTTOM:
- ext->tab_name_ptr[ext->tab_cnt - 1] = name_dm;
- ext->tab_name_ptr[ext->tab_cnt] = "";
- break;
- case LV_TABVIEW_BTNS_POS_LEFT:
- case LV_TABVIEW_BTNS_POS_RIGHT:
- if(ext->tab_cnt == 1) {
- ext->tab_name_ptr[0] = name_dm;
- ext->tab_name_ptr[1] = "";
- } else {
- ext->tab_name_ptr[ext->tab_cnt * 2 - 3] = "\n";
- ext->tab_name_ptr[ext->tab_cnt * 2 - 2] = name_dm;
- ext->tab_name_ptr[ext->tab_cnt * 2 - 1] = "";
- }
- break;
- }
-
- /* The button matrix's map still points to the old `tab_name_ptr` which might be freed by
- * `lv_mem_realloc`. So make its current map invalid*/
- lv_btnm_ext_t * btnm_ext = lv_obj_get_ext_attr(ext->btns);
- btnm_ext->map_p = NULL;
-
- lv_btnm_set_map(ext->btns, ext->tab_name_ptr);
- lv_btnm_set_btn_ctrl(ext->btns, ext->tab_cur, LV_BTNM_CTRL_NO_REPEAT);
-
- /*Modify the indicator size*/
- const lv_style_t * style_tabs = lv_obj_get_style(ext->btns);
- lv_coord_t indic_size;
- lv_coord_t max_h, btn_h, act_y;
-
- switch(ext->btns_pos) {
- case LV_TABVIEW_BTNS_POS_TOP:
- case LV_TABVIEW_BTNS_POS_BOTTOM:
- indic_size = (lv_obj_get_width(tabview) - style_tabs->body.padding.inner * (ext->tab_cnt - 1) -
- style_tabs->body.padding.left - style_tabs->body.padding.right) /
- ext->tab_cnt;
- lv_obj_set_width(ext->indic, indic_size);
- lv_obj_set_x(ext->indic, indic_size * ext->tab_cur + style_tabs->body.padding.inner * ext->tab_cur +
- style_tabs->body.padding.left);
- break;
- case LV_TABVIEW_BTNS_POS_LEFT:
- case LV_TABVIEW_BTNS_POS_RIGHT:
- max_h = lv_obj_get_height(ext->btns) - style_tabs->body.padding.top - style_tabs->body.padding.bottom;
- btn_h = max_h - ((ext->tab_cnt - 1) * style_tabs->body.padding.inner);
- btn_h = btn_h / ext->tab_cnt;
- btn_h--; /*-1 because e.g. height = 100 means 101 pixels (0..100)*/
- act_y = style_tabs->body.padding.top + ext->tab_cur * (btn_h + style_tabs->body.padding.inner);
-
- lv_obj_set_height(ext->indic, btn_h);
- lv_obj_set_y(ext->indic, act_y);
- break;
- }
-
- /*Set the first btn as active*/
- if(ext->tab_cnt == 1) {
- ext->tab_cur = 0;
- }
-
- tabview_realign(tabview); /*Set the size of the pages, tab buttons and indicator*/
-
- lv_tabview_set_tab_act(tabview, ext->tab_cur, false);
-
- return h;
-}
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set a new tab
- * @param tabview pointer to Tab view object
- * @param id index of a tab to load
- * @param anim LV_ANIM_ON: set the value with an animation; LV_ANIM_OFF: change the value immediately
- */
-void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, lv_anim_enable_t anim)
-{
- LV_ASSERT_OBJ(tabview, LV_OBJX_NAME);
-
-#if LV_USE_ANIMATION == 0
- anim = LV_ANIM_OFF;
-#endif
- lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview);
-
- const lv_style_t * style = lv_obj_get_style(ext->content);
-
- if(id >= ext->tab_cnt) id = ext->tab_cnt - 1;
-
- lv_btnm_clear_btn_ctrl(ext->btns, ext->tab_cur, LV_BTNM_CTRL_TGL_STATE);
-
- ext->tab_cur = id;
-
- if(lv_obj_get_base_dir(tabview) == LV_BIDI_DIR_RTL) {
- id = (ext->tab_cnt - (id + 1));
- }
-
- lv_coord_t cont_x;
-
- switch(ext->btns_pos) {
- case LV_TABVIEW_BTNS_POS_TOP:
- case LV_TABVIEW_BTNS_POS_BOTTOM:
- cont_x = -(lv_obj_get_width(tabview) * id + style->body.padding.inner * id + style->body.padding.left);
- break;
- case LV_TABVIEW_BTNS_POS_LEFT:
- cont_x = -((lv_obj_get_width(tabview) - lv_obj_get_width(ext->btns)) * id + style->body.padding.inner * id +
- style->body.padding.left) +
- lv_obj_get_width(ext->btns);
- break;
- case LV_TABVIEW_BTNS_POS_RIGHT:
- cont_x = -((lv_obj_get_width(tabview) - lv_obj_get_width(ext->btns)) * id + style->body.padding.inner * id +
- style->body.padding.left);
- break;
- }
-
- if(anim == LV_ANIM_OFF || lv_tabview_get_anim_time(tabview) == 0) {
- lv_obj_set_x(ext->content, cont_x);
- }
-#if LV_USE_ANIMATION
- else {
- lv_anim_t a;
- a.var = ext->content;
- a.start = lv_obj_get_x(ext->content);
- a.end = cont_x;
- a.exec_cb = (lv_anim_exec_xcb_t)lv_obj_set_x;
- a.path_cb = lv_anim_path_linear;
- a.ready_cb = NULL;
- a.act_time = 0;
- a.time = ext->anim_time;
- a.playback = 0;
- a.playback_pause = 0;
- a.repeat = 0;
- a.repeat_pause = 0;
- lv_anim_create(&a);
- }
-#endif
-
- /*Move the indicator*/
- const lv_style_t * tabs_style = lv_obj_get_style(ext->btns);
- lv_coord_t indic_size;
- lv_coord_t indic_pos;
-
- switch(ext->btns_pos) {
- case LV_TABVIEW_BTNS_POS_TOP:
- case LV_TABVIEW_BTNS_POS_BOTTOM:
- indic_size = lv_obj_get_width(ext->indic);
- indic_pos = indic_size * id + tabs_style->body.padding.inner * id + tabs_style->body.padding.left;
- break;
- case LV_TABVIEW_BTNS_POS_LEFT:
- case LV_TABVIEW_BTNS_POS_RIGHT:
- indic_size = lv_obj_get_height(ext->indic);
- const lv_style_t * style_tabs = lv_tabview_get_style(tabview, LV_TABVIEW_STYLE_BTN_BG);
- lv_coord_t max_h = lv_obj_get_height(ext->btns) - style_tabs->body.padding.top - style_tabs->body.padding.bottom;
-
- if(ext->tab_cnt) indic_pos = (max_h * ext->tab_cur) / ext->tab_cnt;
- else indic_pos = 0;
- break;
- }
-
-#if LV_USE_ANIMATION
- if(anim == LV_ANIM_OFF || ext->anim_time == 0)
-#endif
- {
- switch(ext->btns_pos) {
- case LV_TABVIEW_BTNS_POS_TOP:
- case LV_TABVIEW_BTNS_POS_BOTTOM: lv_obj_set_x(ext->indic, indic_pos); break;
- case LV_TABVIEW_BTNS_POS_LEFT:
- case LV_TABVIEW_BTNS_POS_RIGHT: lv_obj_set_y(ext->indic, indic_pos); break;
- }
- }
-#if LV_USE_ANIMATION
- else {
- lv_anim_t a;
- a.var = ext->indic;
-
- switch(ext->btns_pos) {
- case LV_TABVIEW_BTNS_POS_TOP:
- case LV_TABVIEW_BTNS_POS_BOTTOM:
- a.start = lv_obj_get_x(ext->indic);
- a.end = indic_pos;
- a.exec_cb = (lv_anim_exec_xcb_t)lv_obj_set_x;
- break;
- case LV_TABVIEW_BTNS_POS_LEFT:
- case LV_TABVIEW_BTNS_POS_RIGHT:
- a.start = lv_obj_get_y(ext->indic);
- a.end = indic_pos;
- a.exec_cb = (lv_anim_exec_xcb_t)lv_obj_set_y;
- break;
- }
-
- a.path_cb = lv_anim_path_linear;
- a.ready_cb = NULL;
- a.act_time = 0;
- a.time = ext->anim_time;
- a.playback = 0;
- a.playback_pause = 0;
- a.repeat = 0;
- a.repeat_pause = 0;
- lv_anim_create(&a);
- }
-#endif
-
- lv_btnm_set_btn_ctrl(ext->btns, ext->tab_cur, LV_BTNM_CTRL_TGL_STATE);
-}
-
-/**
- * Enable horizontal sliding with touch pad
- * @param tabview pointer to Tab view object
- * @param en true: enable sliding; false: disable sliding
- */
-void lv_tabview_set_sliding(lv_obj_t * tabview, bool en)
-{
- LV_ASSERT_OBJ(tabview, LV_OBJX_NAME);
-
- lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview);
- ext->slide_enable = en == false ? 0 : 1;
-}
-
-/**
- * Set the animation time of tab view when a new tab is loaded
- * @param tabview pointer to Tab view object
- * @param anim_time_ms time of animation in milliseconds
- */
-void lv_tabview_set_anim_time(lv_obj_t * tabview, uint16_t anim_time)
-{
- LV_ASSERT_OBJ(tabview, LV_OBJX_NAME);
-
-#if LV_USE_ANIMATION
- lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview);
- ext->anim_time = anim_time;
-#else
- (void)tabview;
- (void)anim_time;
-#endif
-}
-
-/**
- * Set the style of a tab view
- * @param tabview pointer to a tan view object
- * @param type which style should be set
- * @param style pointer to the new style
- */
-void lv_tabview_set_style(lv_obj_t * tabview, lv_tabview_style_t type, const lv_style_t * style)
-{
- LV_ASSERT_OBJ(tabview, LV_OBJX_NAME);
-
- lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview);
-
- switch(type) {
- case LV_TABVIEW_STYLE_BG: lv_obj_set_style(tabview, style); break;
- case LV_TABVIEW_STYLE_BTN_BG:
- lv_btnm_set_style(ext->btns, LV_BTNM_STYLE_BG, style);
- tabview_realign(tabview);
- break;
- case LV_TABVIEW_STYLE_BTN_REL:
- lv_btnm_set_style(ext->btns, LV_BTNM_STYLE_BTN_REL, style);
- tabview_realign(tabview);
- break;
- case LV_TABVIEW_STYLE_BTN_PR: lv_btnm_set_style(ext->btns, LV_BTNM_STYLE_BTN_PR, style); break;
- case LV_TABVIEW_STYLE_BTN_TGL_REL: lv_btnm_set_style(ext->btns, LV_BTNM_STYLE_BTN_TGL_REL, style); break;
- case LV_TABVIEW_STYLE_BTN_TGL_PR: lv_btnm_set_style(ext->btns, LV_BTNM_STYLE_BTN_TGL_PR, style); break;
- case LV_TABVIEW_STYLE_INDIC:
- lv_obj_set_style(ext->indic, style);
-
- switch(ext->btns_pos) {
- case LV_TABVIEW_BTNS_POS_TOP:
- case LV_TABVIEW_BTNS_POS_BOTTOM: lv_obj_set_height(ext->indic, style->body.padding.inner); break;
- case LV_TABVIEW_BTNS_POS_LEFT:
- case LV_TABVIEW_BTNS_POS_RIGHT: lv_obj_set_width(ext->indic, style->body.padding.inner); break;
- }
-
- tabview_realign(tabview);
- break;
- }
-}
-
-/**
- * Set the position of tab select buttons
- * @param tabview pointer to a tan view object
- * @param btns_pos which button position
- */
-void lv_tabview_set_btns_pos(lv_obj_t * tabview, lv_tabview_btns_pos_t btns_pos)
-{
- LV_ASSERT_OBJ(tabview, LV_OBJX_NAME);
-
- lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview);
-
- ext->btns_pos = btns_pos;
- tabview_realign(tabview);
-}
-
-/**
- * Set whether tab buttons are hidden
- * @param tabview pointer to a tab view object
- * @param en whether tab buttons are hidden
- */
-void lv_tabview_set_btns_hidden(lv_obj_t * tabview, bool en)
-{
- LV_ASSERT_OBJ(tabview, LV_OBJX_NAME);
-
- lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview);
-
- ext->btns_hide = en;
- tabview_realign(tabview);
-}
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the index of the currently active tab
- * @param tabview pointer to Tab view object
- * @return the active btn index
- */
-uint16_t lv_tabview_get_tab_act(const lv_obj_t * tabview)
-{
- LV_ASSERT_OBJ(tabview, LV_OBJX_NAME);
-
- lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview);
- return ext->tab_cur;
-}
-
-/**
- * Get the number of tabs
- * @param tabview pointer to Tab view object
- * @return btn count
- */
-uint16_t lv_tabview_get_tab_count(const lv_obj_t * tabview)
-{
- LV_ASSERT_OBJ(tabview, LV_OBJX_NAME);
-
- lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview);
- return ext->tab_cnt;
-}
-
-/**
- * Get the page (content area) of a tab
- * @param tabview pointer to Tab view object
- * @param id index of the btn (>= 0)
- * @return pointer to page (lv_page) object
- */
-lv_obj_t * lv_tabview_get_tab(const lv_obj_t * tabview, uint16_t id)
-{
- LV_ASSERT_OBJ(tabview, LV_OBJX_NAME);
-
- lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview);
- uint16_t i = 0;
- lv_obj_t * page = lv_obj_get_child_back(ext->content, NULL);
-
- while(page != NULL && i != id) {
- i++;
- page = lv_obj_get_child_back(ext->content, page);
- }
-
- if(i == id) return page;
-
- return NULL;
-}
-
-/**
- * Get horizontal sliding is enabled or not
- * @param tabview pointer to Tab view object
- * @return true: enable sliding; false: disable sliding
- */
-bool lv_tabview_get_sliding(const lv_obj_t * tabview)
-{
- LV_ASSERT_OBJ(tabview, LV_OBJX_NAME);
-
- lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview);
- return ext->slide_enable ? true : false;
-}
-
-/**
- * Get the animation time of tab view when a new tab is loaded
- * @param tabview pointer to Tab view object
- * @return time of animation in milliseconds
- */
-uint16_t lv_tabview_get_anim_time(const lv_obj_t * tabview)
-{
- LV_ASSERT_OBJ(tabview, LV_OBJX_NAME);
-
-#if LV_USE_ANIMATION
- lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview);
- return ext->anim_time;
-#else
- (void)tabview;
- return 0;
-#endif
-}
-
-/**
- * Get a style of a tab view
- * @param tabview pointer to a ab view object
- * @param type which style should be get
- * @return style pointer to a style
- */
-const lv_style_t * lv_tabview_get_style(const lv_obj_t * tabview, lv_tabview_style_t type)
-{
- LV_ASSERT_OBJ(tabview, LV_OBJX_NAME);
-
- const lv_style_t * style = NULL;
- lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview);
-
- switch(type) {
- case LV_TABVIEW_STYLE_BG: style = lv_obj_get_style(tabview); break;
- case LV_TABVIEW_STYLE_BTN_BG: style = lv_btnm_get_style(ext->btns, LV_BTNM_STYLE_BG); break;
- case LV_TABVIEW_STYLE_BTN_REL: style = lv_btnm_get_style(ext->btns, LV_BTNM_STYLE_BTN_REL); break;
- case LV_TABVIEW_STYLE_BTN_PR: style = lv_btnm_get_style(ext->btns, LV_BTNM_STYLE_BTN_PR); break;
- case LV_TABVIEW_STYLE_BTN_TGL_REL: style = lv_btnm_get_style(ext->btns, LV_BTNM_STYLE_BTN_TGL_REL); break;
- case LV_TABVIEW_STYLE_BTN_TGL_PR: style = lv_btnm_get_style(ext->btns, LV_BTNM_STYLE_BTN_TGL_PR); break;
- default: style = NULL; break;
- }
-
- return style;
-}
-
-/**
- * Get position of tab select buttons
- * @param tabview pointer to a ab view object
- */
-lv_tabview_btns_pos_t lv_tabview_get_btns_pos(const lv_obj_t * tabview)
-{
- LV_ASSERT_OBJ(tabview, LV_OBJX_NAME);
-
- lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview);
- return ext->btns_pos;
-}
-
-/**
- * Get whether tab buttons are hidden
- * @param tabview pointer to a tab view object
- * @return whether tab buttons are hidden
- */
-bool lv_tabview_get_btns_hidden(const lv_obj_t * tabview)
-{
- LV_ASSERT_OBJ(tabview, LV_OBJX_NAME);
-
- lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview);
-
- return ext->btns_hide;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Signal function of the Tab view
- * @param tabview pointer to a Tab view object
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_tabview_signal(lv_obj_t * tabview, lv_signal_t sign, void * param)
-{
- lv_res_t res;
-
- /* Include the ancient signal function */
- res = ancestor_signal(tabview, sign, param);
- if(res != LV_RES_OK) return res;
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);
-
- lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview);
- if(sign == LV_SIGNAL_CLEANUP) {
- uint8_t i;
- for(i = 0; ext->tab_name_ptr[i][0] != '\0'; i++) lv_mem_free(ext->tab_name_ptr[i]);
-
- lv_mem_free(ext->tab_name_ptr);
- ext->tab_name_ptr = NULL;
- ext->btns = NULL; /*These objects were children so they are already invalid*/
- ext->content = NULL;
- } else if(sign == LV_SIGNAL_CORD_CHG) {
- if(ext->content != NULL && (lv_obj_get_width(tabview) != lv_area_get_width(param) ||
- lv_obj_get_height(tabview) != lv_area_get_height(param))) {
- tabview_realign(tabview);
- }
- } else if(sign == LV_SIGNAL_RELEASED) {
-#if LV_USE_GROUP
- /*If released by a KEYPAD or ENCODER then really the tab buttons should be released.
- * So simulate a CLICK on the tab buttons*/
- lv_indev_t * indev = lv_indev_get_act();
- lv_indev_type_t indev_type = lv_indev_get_type(indev);
- if(indev_type == LV_INDEV_TYPE_KEYPAD ||
- (indev_type == LV_INDEV_TYPE_ENCODER && lv_group_get_editing(lv_obj_get_group(tabview)))) {
- lv_event_send(ext->btns, LV_EVENT_CLICKED, lv_event_get_data());
- }
-#endif
- } else if(sign == LV_SIGNAL_FOCUS || sign == LV_SIGNAL_DEFOCUS || sign == LV_SIGNAL_CONTROL) {
- /* The button matrix is not in a group (the tab view is in it) but it should handle the
- * group signals. So propagate the related signals to the button matrix manually*/
- if(ext->btns) {
- ext->btns->signal_cb(ext->btns, sign, param);
- }
-
- if(sign == LV_SIGNAL_FOCUS) {
- lv_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act());
- /*If not focused by an input device assume the last input device*/
- if(indev_type == LV_INDEV_TYPE_NONE) {
- indev_type = lv_indev_get_type(lv_indev_get_next(NULL));
- }
-
- /*With ENCODER select the first button only in edit mode*/
- if(indev_type == LV_INDEV_TYPE_ENCODER) {
-#if LV_USE_GROUP
- lv_group_t * g = lv_obj_get_group(tabview);
- if(lv_group_get_editing(g)) {
- lv_btnm_set_pressed(ext->btns, ext->tab_cur);
- }
-#endif
- } else {
- lv_btnm_set_pressed(ext->btns, ext->tab_cur);
- }
- }
- } else if(sign == LV_SIGNAL_GET_EDITABLE) {
- bool * editable = (bool *)param;
- *editable = true;
- }
-
- return res;
-}
-
-/**
- * Signal function of a tab's page
- * @param tab pointer to a tab page object
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t tabpage_signal(lv_obj_t * tab_page, lv_signal_t sign, void * param)
-{
- lv_res_t res;
-
- /* Include the ancient signal function */
- res = page_signal(tab_page, sign, param);
- if(res != LV_RES_OK) return res;
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, "");
-
- lv_obj_t * cont = lv_obj_get_parent(tab_page);
- lv_obj_t * tabview = lv_obj_get_parent(cont);
-
- if(lv_tabview_get_sliding(tabview) == false) return res;
-
- if(sign == LV_SIGNAL_PRESSED) {
- tabpage_pressed_handler(tabview, tab_page);
- } else if(sign == LV_SIGNAL_PRESSING) {
- tabpage_pressing_handler(tabview, tab_page);
- } else if(sign == LV_SIGNAL_RELEASED || sign == LV_SIGNAL_PRESS_LOST) {
- tabpage_press_lost_handler(tabview, tab_page);
- }
-
- return res;
-}
-/**
- * Signal function of the tab page's scrollable object
- * @param tab_scrl pointer to a tab page's scrollable object
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t tabpage_scrl_signal(lv_obj_t * tab_scrl, lv_signal_t sign, void * param)
-{
- lv_res_t res;
-
- /* Include the ancient signal function */
- res = page_scrl_signal(tab_scrl, sign, param);
- if(res != LV_RES_OK) return res;
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, "");
-
- lv_obj_t * tab_page = lv_obj_get_parent(tab_scrl);
- lv_obj_t * cont = lv_obj_get_parent(tab_page);
- lv_obj_t * tabview = lv_obj_get_parent(cont);
-
- if(lv_tabview_get_sliding(tabview) == false) return res;
-
- if(sign == LV_SIGNAL_PRESSED) {
- tabpage_pressed_handler(tabview, tab_page);
- } else if(sign == LV_SIGNAL_PRESSING) {
- tabpage_pressing_handler(tabview, tab_page);
- } else if(sign == LV_SIGNAL_RELEASED || sign == LV_SIGNAL_PRESS_LOST) {
- tabpage_press_lost_handler(tabview, tab_page);
- }
-
- return res;
-}
-
-/**
- * Called when a tab's page or scrollable object is pressed
- * @param tabview pointer to the btn view object
- * @param tabpage pointer to the page of a btn
- */
-static void tabpage_pressed_handler(lv_obj_t * tabview, lv_obj_t * tabpage)
-{
- (void)tabpage;
-
- lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview);
- lv_indev_t * indev = lv_indev_get_act();
- lv_indev_get_point(indev, &ext->point_last);
-}
-
-/**
- * Called when a tab's page or scrollable object is being pressed
- * @param tabview pointer to the btn view object
- * @param tabpage pointer to the page of a btn
- */
-static void tabpage_pressing_handler(lv_obj_t * tabview, lv_obj_t * tabpage)
-{
- lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview);
- lv_indev_t * indev = lv_indev_get_act();
- lv_point_t point_act;
- lv_indev_get_point(indev, &point_act);
- lv_coord_t x_diff = point_act.x - ext->point_last.x;
- lv_coord_t y_diff = point_act.y - ext->point_last.y;
-
- if(!ext->scroll_ver && (x_diff >= LV_INDEV_DEF_DRAG_LIMIT || x_diff <= -LV_INDEV_DEF_DRAG_LIMIT)) {
- ext->draging = 1;
- /*Check if the page is on the edge */
- if((lv_page_on_edge(tabpage, LV_PAGE_EDGE_LEFT) && x_diff > 0) ||
- (lv_page_on_edge(tabpage, LV_PAGE_EDGE_RIGHT) && x_diff < 0)) {
- if(ext->drag_hor == 0) {
- ext->point_last.x = point_act.x;
- ext->point_last.y = point_act.y;
- }
- ext->drag_hor = 1;
- lv_obj_set_drag(lv_page_get_scrl(tabpage), false);
-
- } else if(ext->drag_hor == 0) {
- ext->drag_hor = 0;
- }
- } else if(y_diff >= LV_INDEV_DEF_DRAG_LIMIT || y_diff <= -LV_INDEV_DEF_DRAG_LIMIT) {
- ext->drag_hor = 0;
- ext->draging = 1;
- ext->scroll_ver = 1;
- } else
- ext->draging = 0;
-
- if(ext->drag_hor) {
- lv_obj_set_x(ext->content, lv_obj_get_x(ext->content) + point_act.x - ext->point_last.x);
- ext->point_last.x = point_act.x;
- ext->point_last.y = point_act.y;
-
- /*Move the indicator*/
- const lv_style_t * tabs_style = lv_obj_get_style(ext->btns);
- lv_coord_t indic_size;
- lv_coord_t p;
- lv_coord_t indic_y;
- const lv_style_t * indic_style;
-
- switch(ext->btns_pos) {
- case LV_TABVIEW_BTNS_POS_TOP:
- case LV_TABVIEW_BTNS_POS_BOTTOM:
- indic_size = lv_obj_get_width(ext->indic);
- indic_style = lv_obj_get_style(ext->indic);
- p = ((tabpage->coords.x1 - tabview->coords.x1) * (indic_size + tabs_style->body.padding.inner)) /
- lv_obj_get_width(tabview);
-
- {
- uint16_t id = ext->tab_cur;
- if(lv_obj_get_base_dir(tabview) == LV_BIDI_DIR_RTL) {
- id = (ext->tab_cnt - (id + 1));
- }
- lv_obj_set_x(ext->indic, indic_size * id + tabs_style->body.padding.inner * id +
- indic_style->body.padding.left - p);
- }
- break;
- case LV_TABVIEW_BTNS_POS_LEFT:
- case LV_TABVIEW_BTNS_POS_RIGHT:
- indic_size = lv_obj_get_height(ext->indic);
- indic_y = tabs_style->body.padding.top + ext->tab_cur * (indic_size + tabs_style->body.padding.inner);
- lv_obj_set_y(ext->indic, indic_y);
- break;
- }
- }
-}
-
-/**
- * Called when a tab's page or scrollable object is released or the press is lost
- * @param tabview pointer to the btn view object
- * @param tabpage pointer to the page of a btn
- */
-static void tabpage_press_lost_handler(lv_obj_t * tabview, lv_obj_t * tabpage)
-{
- lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview);
- ext->drag_hor = 0;
- ext->draging = 0;
- ext->scroll_ver = 0;
-
- lv_obj_set_drag(lv_page_get_scrl(tabpage), true);
-
- lv_indev_t * indev = lv_indev_get_act();
- lv_point_t point_act;
- lv_indev_get_point(indev, &point_act);
- lv_point_t vect;
- lv_indev_get_vect(indev, &vect);
- lv_coord_t x_predict = 0;
-
- while(vect.x != 0) {
- x_predict += vect.x;
- vect.x = vect.x * (100 - LV_INDEV_DEF_DRAG_THROW) / 100;
- }
-
- lv_coord_t page_x1 = tabpage->coords.x1 - tabview->coords.x1 + x_predict;
- lv_coord_t page_x2 = page_x1 + lv_obj_get_width(tabpage);
- lv_coord_t treshold = lv_obj_get_width(tabview) / 2;
-
- int16_t tab_cur = ext->tab_cur;
- if(page_x1 > treshold) {
- if(lv_obj_get_base_dir(tabview) == LV_BIDI_DIR_RTL) tab_cur++;
- else tab_cur--;
- } else if(page_x2 < treshold) {
- if(lv_obj_get_base_dir(tabview) == LV_BIDI_DIR_RTL) tab_cur--;
- else tab_cur++;
- }
-
- if(tab_cur > ext->tab_cnt - 1) tab_cur = ext->tab_cnt - 1;
- else if(tab_cur < 0) tab_cur = 0;
-
- uint32_t id_prev = lv_tabview_get_tab_act(tabview);
- lv_tabview_set_tab_act(tabview, tab_cur, LV_ANIM_ON);
- uint32_t id_new = lv_tabview_get_tab_act(tabview);
-
- lv_res_t res = LV_RES_OK;
- if(id_prev != id_new) res = lv_event_send(tabview, LV_EVENT_VALUE_CHANGED, &id_new);
-
- if(res != LV_RES_OK) return;
-}
-
-/**
- * Called when a tab button is clicked
- * @param tab_btnm pointer to the tab's button matrix object
- * @param event type of the event
- */
-static void tab_btnm_event_cb(lv_obj_t * tab_btnm, lv_event_t event)
-{
- if(event != LV_EVENT_CLICKED) return;
-
- uint16_t btn_id = lv_btnm_get_active_btn(tab_btnm);
- if(btn_id == LV_BTNM_BTN_NONE) return;
-
- lv_btnm_clear_btn_ctrl_all(tab_btnm, LV_BTNM_CTRL_TGL_STATE);
- lv_btnm_set_btn_ctrl(tab_btnm, btn_id, LV_BTNM_CTRL_TGL_STATE);
-
- lv_obj_t * tabview = lv_obj_get_parent(tab_btnm);
-
- uint32_t id_prev = lv_tabview_get_tab_act(tabview);
- lv_tabview_set_tab_act(tabview, btn_id, LV_ANIM_ON);
- uint32_t id_new = lv_tabview_get_tab_act(tabview);
-
- lv_res_t res = LV_RES_OK;
- if(id_prev != id_new) res = lv_event_send(tabview, LV_EVENT_VALUE_CHANGED, &id_new);
-
- if(res != LV_RES_OK) return;
-}
-
-/**
- * Realign and resize the elements of Tab view
- * @param tabview pointer to a Tab view object
- */
-static void tabview_realign(lv_obj_t * tabview)
-{
- lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview);
-
- lv_obj_set_width(ext->btns, lv_obj_get_width(tabview));
-
- if(ext->btns_hide) {
- lv_obj_set_hidden(ext->btns, true);
- lv_obj_set_hidden(ext->indic, true);
- lv_obj_set_height(ext->content, lv_obj_get_height(tabview));
- lv_obj_align(ext->content, NULL, LV_ALIGN_IN_TOP_LEFT, 0, 0);
- } else if(ext->tab_cnt != 0) {
- lv_obj_set_hidden(ext->btns, false);
- lv_obj_set_hidden(ext->indic, false);
-
- const lv_style_t * style_btn_bg = lv_tabview_get_style(tabview, LV_TABVIEW_STYLE_BTN_BG);
- const lv_style_t * style_btn_rel = lv_tabview_get_style(tabview, LV_TABVIEW_STYLE_BTN_REL);
-
- /*Set the indicator width/height*/
- lv_coord_t indic_size;
- lv_coord_t max_h;
-
- switch(ext->btns_pos) {
- case LV_TABVIEW_BTNS_POS_TOP:
- case LV_TABVIEW_BTNS_POS_BOTTOM:
- indic_size = (lv_obj_get_width(tabview) - style_btn_bg->body.padding.inner * (ext->tab_cnt - 1) -
- style_btn_bg->body.padding.left - style_btn_bg->body.padding.right) /
- ext->tab_cnt;
- lv_obj_set_width(ext->indic, indic_size);
- break;
- case LV_TABVIEW_BTNS_POS_LEFT:
- case LV_TABVIEW_BTNS_POS_RIGHT:
- lv_obj_set_height(ext->btns, lv_obj_get_height(tabview));
-
- max_h =
- lv_obj_get_height(ext->btns) - style_btn_bg->body.padding.top - style_btn_bg->body.padding.bottom;
- indic_size = max_h - ((ext->tab_cnt - 1) * style_btn_bg->body.padding.inner);
- indic_size = indic_size / ext->tab_cnt;
- indic_size--; /*-1 because e.g. height = 100 means 101 pixels (0..100)*/
- lv_obj_set_height(ext->indic, indic_size);
- break;
- }
-
- /*Set the tabs height/width*/
- lv_coord_t btns_size;
-
- switch(ext->btns_pos) {
- case LV_TABVIEW_BTNS_POS_TOP:
- case LV_TABVIEW_BTNS_POS_BOTTOM:
- btns_size = lv_font_get_line_height(style_btn_rel->text.font) + style_btn_rel->body.padding.top +
- style_btn_rel->body.padding.bottom + style_btn_bg->body.padding.top +
- style_btn_bg->body.padding.bottom;
- lv_obj_set_height(ext->btns, btns_size);
- break;
- case LV_TABVIEW_BTNS_POS_LEFT:
- case LV_TABVIEW_BTNS_POS_RIGHT:
- btns_size = lv_font_get_glyph_width(style_btn_rel->text.font, 'A', '\0') +
- style_btn_rel->body.padding.left + style_btn_rel->body.padding.right +
- style_btn_bg->body.padding.left + style_btn_bg->body.padding.right;
- lv_obj_set_width(ext->btns, btns_size);
- break;
- }
-
- switch(ext->btns_pos) {
- case LV_TABVIEW_BTNS_POS_TOP:
- case LV_TABVIEW_BTNS_POS_BOTTOM:
- lv_obj_set_height(ext->content, lv_obj_get_height(tabview) - lv_obj_get_height(ext->btns));
- break;
- case LV_TABVIEW_BTNS_POS_LEFT:
- case LV_TABVIEW_BTNS_POS_RIGHT: lv_obj_set_height(ext->content, lv_obj_get_height(tabview)); break;
- }
-
- switch(ext->btns_pos) {
- case LV_TABVIEW_BTNS_POS_TOP:
- lv_obj_align(ext->btns, NULL, LV_ALIGN_IN_TOP_LEFT, 0, 0);
- lv_obj_align(ext->content, ext->btns, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 0);
- lv_obj_align(ext->indic, ext->btns, LV_ALIGN_IN_BOTTOM_LEFT, 0, 0);
-
- lv_cont_set_fit2(ext->content, LV_FIT_TIGHT, LV_FIT_NONE);
- lv_cont_set_layout(ext->content, LV_LAYOUT_ROW_T);
- lv_obj_set_height(ext->content, lv_obj_get_height(tabview) - lv_obj_get_height(ext->btns));
- break;
- case LV_TABVIEW_BTNS_POS_BOTTOM:
- lv_obj_align(ext->content, NULL, LV_ALIGN_IN_TOP_LEFT, 0, 0);
- lv_obj_align(ext->btns, ext->content, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 0);
- lv_obj_align(ext->indic, ext->btns, LV_ALIGN_IN_TOP_LEFT, 0, 0);
-
- lv_cont_set_fit2(ext->content, LV_FIT_TIGHT, LV_FIT_NONE);
- lv_cont_set_layout(ext->content, LV_LAYOUT_ROW_T);
- lv_obj_set_height(ext->content, lv_obj_get_height(tabview) - lv_obj_get_height(ext->btns));
- break;
- case LV_TABVIEW_BTNS_POS_LEFT:
- lv_obj_align(ext->btns, NULL, LV_ALIGN_IN_TOP_LEFT, 0, 0);
- lv_obj_align(ext->content, tabview, LV_ALIGN_IN_TOP_LEFT, lv_obj_get_width(ext->btns), 0);
- lv_obj_align(ext->indic, ext->btns, LV_ALIGN_IN_TOP_RIGHT, 0, 0);
-
- lv_cont_set_fit2(ext->content, LV_FIT_TIGHT, LV_FIT_NONE);
- lv_cont_set_layout(ext->content, LV_LAYOUT_ROW_T);
- lv_obj_set_width(ext->content, lv_obj_get_width(tabview) - lv_obj_get_width(ext->btns));
-
- lv_obj_set_height(ext->btns, lv_obj_get_height(tabview));
- lv_obj_set_width(ext->indic, style_btn_bg->body.padding.inner);
- break;
- case LV_TABVIEW_BTNS_POS_RIGHT:
- lv_obj_align(ext->btns, NULL, LV_ALIGN_IN_TOP_RIGHT, 0, 0);
- lv_obj_align(ext->content, tabview, LV_ALIGN_IN_TOP_LEFT, 0, 0);
- lv_obj_align(ext->indic, ext->btns, LV_ALIGN_IN_TOP_LEFT, 0, 0);
-
- lv_cont_set_fit2(ext->content, LV_FIT_TIGHT, LV_FIT_NONE);
- lv_cont_set_layout(ext->content, LV_LAYOUT_ROW_T);
- lv_obj_set_width(ext->content, lv_obj_get_width(tabview) - lv_obj_get_width(ext->btns));
-
- lv_obj_set_height(ext->btns, lv_obj_get_height(tabview));
- lv_obj_set_width(ext->indic, style_btn_bg->body.padding.inner);
- break;
- }
- }
-
- lv_obj_t * pages = lv_obj_get_child(ext->content, NULL);
- while(pages != NULL) {
- if(lv_obj_get_signal_cb(pages) == tabpage_signal) { /*Be sure adjust only the pages (user can other things)*/
- switch(ext->btns_pos) {
- case LV_TABVIEW_BTNS_POS_TOP:
- case LV_TABVIEW_BTNS_POS_BOTTOM:
- lv_obj_set_size(pages, lv_obj_get_width(tabview), lv_obj_get_height(ext->content));
- break;
- case LV_TABVIEW_BTNS_POS_LEFT:
- case LV_TABVIEW_BTNS_POS_RIGHT:
- lv_obj_set_size(pages, lv_obj_get_width(tabview) - lv_obj_get_width(ext->btns),
- lv_obj_get_height(ext->content));
- break;
- }
- }
- pages = lv_obj_get_child(ext->content, pages);
- }
-
- if(!ext->btns_hide) {
- switch(ext->btns_pos) {
- case LV_TABVIEW_BTNS_POS_TOP: lv_obj_align(ext->indic, ext->btns, LV_ALIGN_IN_BOTTOM_LEFT, 0, 0); break;
- case LV_TABVIEW_BTNS_POS_BOTTOM: lv_obj_align(ext->indic, ext->btns, LV_ALIGN_IN_TOP_LEFT, 0, 0); break;
- case LV_TABVIEW_BTNS_POS_LEFT: lv_obj_align(ext->indic, ext->btns, LV_ALIGN_IN_TOP_RIGHT, 0, 0); break;
- case LV_TABVIEW_BTNS_POS_RIGHT: lv_obj_align(ext->indic, ext->btns, LV_ALIGN_IN_TOP_LEFT, 0, 0); break;
- }
- }
-
- lv_tabview_set_tab_act(tabview, ext->tab_cur, LV_ANIM_OFF);
-}
-#endif
diff --git a/src/libs/lvgl/src/lv_objx/lv_tabview.h b/src/libs/lvgl/src/lv_objx/lv_tabview.h
deleted file mode 100644
index f7546d0c..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_tabview.h
+++ /dev/null
@@ -1,231 +0,0 @@
-/**
- * @file lv_tabview.h
- *
- */
-
-#ifndef LV_TABVIEW_H
-#define LV_TABVIEW_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_TABVIEW != 0
-
-/*Testing of dependencies*/
-#if LV_USE_BTNM == 0
-#error "lv_tabview: lv_btnm is required. Enable it in lv_conf.h (LV_USE_BTNM 1) "
-#endif
-
-#if LV_USE_PAGE == 0
-#error "lv_tabview: lv_page is required. Enable it in lv_conf.h (LV_USE_PAGE 1) "
-#endif
-
-#include "../lv_core/lv_obj.h"
-#include "../lv_objx/lv_win.h"
-#include "../lv_objx/lv_page.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/** Position of tabview buttons. */
-enum { LV_TABVIEW_BTNS_POS_TOP, LV_TABVIEW_BTNS_POS_BOTTOM, LV_TABVIEW_BTNS_POS_LEFT, LV_TABVIEW_BTNS_POS_RIGHT };
-typedef uint8_t lv_tabview_btns_pos_t;
-
-/*Data of tab*/
-typedef struct
-{
- /*Ext. of ancestor*/
- /*New data for this type */
- lv_obj_t * btns;
- lv_obj_t * indic;
- lv_obj_t * content; /*A rectangle to show the current tab*/
- const char ** tab_name_ptr;
- lv_point_t point_last;
- uint16_t tab_cur;
- uint16_t tab_cnt;
-#if LV_USE_ANIMATION
- uint16_t anim_time;
-#endif
- uint8_t slide_enable : 1; /*1: enable horizontal sliding by touch pad*/
- uint8_t draging : 1;
- uint8_t drag_hor : 1;
- uint8_t scroll_ver : 1;
- uint8_t btns_hide : 1;
- lv_tabview_btns_pos_t btns_pos : 2;
-} lv_tabview_ext_t;
-
-enum {
- LV_TABVIEW_STYLE_BG,
- LV_TABVIEW_STYLE_INDIC,
- LV_TABVIEW_STYLE_BTN_BG,
- LV_TABVIEW_STYLE_BTN_REL,
- LV_TABVIEW_STYLE_BTN_PR,
- LV_TABVIEW_STYLE_BTN_TGL_REL,
- LV_TABVIEW_STYLE_BTN_TGL_PR,
-};
-typedef uint8_t lv_tabview_style_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Create a Tab view object
- * @param par pointer to an object, it will be the parent of the new tab
- * @param copy pointer to a tab object, if not NULL then the new object will be copied from it
- * @return pointer to the created tab
- */
-lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy);
-
-/**
- * Delete all children of the scrl object, without deleting scrl child.
- * @param tabview pointer to an object
- */
-void lv_tabview_clean(lv_obj_t * tabview);
-
-/*======================
- * Add/remove functions
- *=====================*/
-
-/**
- * Add a new tab with the given name
- * @param tabview pointer to Tab view object where to ass the new tab
- * @param name the text on the tab button
- * @return pointer to the created page object (lv_page). You can create your content here
- */
-lv_obj_t * lv_tabview_add_tab(lv_obj_t * tabview, const char * name);
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set a new tab
- * @param tabview pointer to Tab view object
- * @param id index of a tab to load
- * @param anim LV_ANIM_ON: set the value with an animation; LV_ANIM_OFF: change the value immediately
- */
-void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, lv_anim_enable_t anim);
-
-/**
- * Enable horizontal sliding with touch pad
- * @param tabview pointer to Tab view object
- * @param en true: enable sliding; false: disable sliding
- */
-void lv_tabview_set_sliding(lv_obj_t * tabview, bool en);
-
-/**
- * Set the animation time of tab view when a new tab is loaded
- * @param tabview pointer to Tab view object
- * @param anim_time time of animation in milliseconds
- */
-void lv_tabview_set_anim_time(lv_obj_t * tabview, uint16_t anim_time);
-
-/**
- * Set the style of a tab view
- * @param tabview pointer to a tan view object
- * @param type which style should be set
- * @param style pointer to the new style
- */
-void lv_tabview_set_style(lv_obj_t * tabview, lv_tabview_style_t type, const lv_style_t * style);
-
-/**
- * Set the position of tab select buttons
- * @param tabview pointer to a tab view object
- * @param btns_pos which button position
- */
-void lv_tabview_set_btns_pos(lv_obj_t * tabview, lv_tabview_btns_pos_t btns_pos);
-
-/**
- * Set whether tab buttons are hidden
- * @param tabview pointer to a tab view object
- * @param en whether tab buttons are hidden
- */
-void lv_tabview_set_btns_hidden(lv_obj_t * tabview, bool en);
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the index of the currently active tab
- * @param tabview pointer to Tab view object
- * @return the active tab index
- */
-uint16_t lv_tabview_get_tab_act(const lv_obj_t * tabview);
-
-/**
- * Get the number of tabs
- * @param tabview pointer to Tab view object
- * @return tab count
- */
-uint16_t lv_tabview_get_tab_count(const lv_obj_t * tabview);
-/**
- * Get the page (content area) of a tab
- * @param tabview pointer to Tab view object
- * @param id index of the tab (>= 0)
- * @return pointer to page (lv_page) object
- */
-lv_obj_t * lv_tabview_get_tab(const lv_obj_t * tabview, uint16_t id);
-
-/**
- * Get horizontal sliding is enabled or not
- * @param tabview pointer to Tab view object
- * @return true: enable sliding; false: disable sliding
- */
-bool lv_tabview_get_sliding(const lv_obj_t * tabview);
-
-/**
- * Get the animation time of tab view when a new tab is loaded
- * @param tabview pointer to Tab view object
- * @return time of animation in milliseconds
- */
-uint16_t lv_tabview_get_anim_time(const lv_obj_t * tabview);
-
-/**
- * Get a style of a tab view
- * @param tabview pointer to a ab view object
- * @param type which style should be get
- * @return style pointer to a style
- */
-const lv_style_t * lv_tabview_get_style(const lv_obj_t * tabview, lv_tabview_style_t type);
-
-/**
- * Get position of tab select buttons
- * @param tabview pointer to a ab view object
- */
-lv_tabview_btns_pos_t lv_tabview_get_btns_pos(const lv_obj_t * tabview);
-
-/**
- * Get whether tab buttons are hidden
- * @param tabview pointer to a tab view object
- * @return whether tab buttons are hidden
- */
-bool lv_tabview_get_btns_hidden(const lv_obj_t * tabview);
-
-/**********************
- * MACROS
- **********************/
-
-#endif /*LV_USE_TABVIEW*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_TABVIEW_H*/
diff --git a/src/libs/lvgl/src/lv_objx/lv_tileview.c b/src/libs/lvgl/src/lv_objx/lv_tileview.c
deleted file mode 100644
index 3b2f8514..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_tileview.c
+++ /dev/null
@@ -1,584 +0,0 @@
-/**
- * @file lv_tileview.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_tileview.h"
-#if LV_USE_TILEVIEW != 0
-
-#include <stdbool.h>
-#include "lv_cont.h"
-#include "../lv_core/lv_debug.h"
-#include "../lv_themes/lv_theme.h"
-
-/*********************
- * DEFINES
- *********************/
-#define LV_OBJX_NAME "lv_tileview"
-
-#if LV_USE_ANIMATION
-#ifndef LV_TILEVIEW_DEF_ANIM_TIME
-#define LV_TILEVIEW_DEF_ANIM_TIME 300 /*Animation time loading a tile [ms] (0: no animation) */
-#endif
-#else
-#undef LV_TILEVIEW_DEF_ANIM_TIME
-#define LV_TILEVIEW_DEF_ANIM_TIME 0 /*No animations*/
-#endif
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static lv_res_t lv_tileview_signal(lv_obj_t * tileview, lv_signal_t sign, void * param);
-static lv_res_t lv_tileview_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void * param);
-static void tileview_scrl_event_cb(lv_obj_t * scrl, lv_event_t event);
-static void drag_end_handler(lv_obj_t * tileview);
-static bool set_valid_drag_dirs(lv_obj_t * tileview);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_signal_cb_t ancestor_signal;
-static lv_signal_cb_t ancestor_scrl_signal;
-static lv_design_cb_t ancestor_design;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Create a tileview object
- * @param par pointer to an object, it will be the parent of the new tileview
- * @param copy pointer to a tileview object, if not NULL then the new object will be copied from it
- * @return pointer to the created tileview
- */
-lv_obj_t * lv_tileview_create(lv_obj_t * par, const lv_obj_t * copy)
-{
- LV_LOG_TRACE("tileview create started");
-
- /*Create the ancestor of tileview*/
- lv_obj_t * new_tileview = lv_page_create(par, copy);
- LV_ASSERT_MEM(new_tileview);
- if(new_tileview == NULL) return NULL;
-
- /*Allocate the tileview type specific extended data*/
- lv_tileview_ext_t * ext = lv_obj_allocate_ext_attr(new_tileview, sizeof(lv_tileview_ext_t));
- LV_ASSERT_MEM(ext);
- if(ext == NULL) return NULL;
- if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_tileview);
- if(ancestor_scrl_signal == NULL) ancestor_scrl_signal = lv_obj_get_signal_cb(lv_page_get_scrl(new_tileview));
- if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_cb(new_tileview);
-
- /*Initialize the allocated 'ext' */
-#if LV_USE_ANIMATION
- ext->anim_time = LV_TILEVIEW_DEF_ANIM_TIME;
-#endif
- ext->act_id.x = 0;
- ext->act_id.y = 0;
- ext->valid_pos = NULL;
- ext->valid_pos_cnt = 0;
-
- /*The signal and design functions are not copied so set them here*/
- lv_obj_set_signal_cb(new_tileview, lv_tileview_signal);
- lv_obj_set_signal_cb(lv_page_get_scrl(new_tileview), lv_tileview_scrl_signal);
-
- /*Init the new tileview*/
- if(copy == NULL) {
- /* Set a size which fits into the parent.
- * Don't use `par` directly because if the tileview is created on a page it is moved to the
- * scrollable so the parent has changed */
- lv_coord_t w;
- lv_coord_t h;
- if(par) {
- w = lv_obj_get_width_fit(lv_obj_get_parent(new_tileview));
- h = lv_obj_get_height_fit(lv_obj_get_parent(new_tileview));
- } else {
- w = lv_disp_get_hor_res(NULL);
- h = lv_disp_get_ver_res(NULL);
- }
-
- lv_obj_set_size(new_tileview, w, h);
-
- lv_obj_set_drag_throw(lv_page_get_scrl(new_tileview), false);
- lv_page_set_scrl_fit(new_tileview, LV_FIT_TIGHT);
- lv_obj_set_event_cb(ext->page.scrl, tileview_scrl_event_cb);
- /*Set the default styles*/
- lv_theme_t * th = lv_theme_get_current();
- if(th) {
- lv_page_set_style(new_tileview, LV_PAGE_STYLE_BG, th->style.tileview.bg);
- lv_page_set_style(new_tileview, LV_PAGE_STYLE_SCRL, th->style.tileview.scrl);
- lv_page_set_style(new_tileview, LV_PAGE_STYLE_SB, th->style.tileview.sb);
- } else {
- lv_page_set_style(new_tileview, LV_PAGE_STYLE_BG, &lv_style_transp_tight);
- lv_page_set_style(new_tileview, LV_PAGE_STYLE_SCRL, &lv_style_transp_tight);
- }
- }
- /*Copy an existing tileview*/
- else {
- lv_tileview_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
- ext->act_id.x = copy_ext->act_id.x;
- ext->act_id.y = copy_ext->act_id.y;
- ext->valid_pos = copy_ext->valid_pos;
- ext->valid_pos_cnt = copy_ext->valid_pos_cnt;
-#if LV_USE_ANIMATION
- ext->anim_time = copy_ext->anim_time;
-#endif
-
- /*Refresh the style with new signal function*/
- lv_obj_refresh_style(new_tileview);
- }
-
- LV_LOG_INFO("tileview created");
-
- return new_tileview;
-}
-
-/*======================
- * Add/remove functions
- *=====================*/
-
-/**
- * Register an object on the tileview. The register object will able to slide the tileview
- * @param tileview pointer to a Tileview object
- * @param element pointer to an object
- */
-void lv_tileview_add_element(lv_obj_t * tileview, lv_obj_t * element)
-{
- LV_ASSERT_OBJ(tileview, LV_OBJX_NAME);
- LV_ASSERT_NULL(tileview);
-
- /* Let the objects event to propagate to the scrollable part of the tileview.
- * It is required the handle dargging of the tileview with the element.*/
- element->parent_event = 1;
- lv_obj_set_drag_parent(element, true);
-
- /* When adding a new element the coordinates may shift.
- * For example y=1 can become y=1 if an element is added to the top.
- * So be sure the current tile is correctly shown*/
- lv_tileview_ext_t * ext = lv_obj_get_ext_attr(tileview);
- lv_tileview_set_tile_act(tileview, ext->act_id.x, ext->act_id.y, false);
-}
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set the valid position's indices. The scrolling will be possible only to these positions.
- * @param tileview pointer to a Tileview object
- * @param valid_pos array width the indices. E.g. `lv_point_t p[] = {{0,0}, {1,0}, {1,1}`.
- * Only the pointer is saved so can't be a local variable.
- * @param valid_pos_cnt numner of elements in `valid_pos` array
- */
-void lv_tileview_set_valid_positions(lv_obj_t * tileview, const lv_point_t valid_pos[], uint16_t valid_pos_cnt)
-{
- LV_ASSERT_OBJ(tileview, LV_OBJX_NAME);
- LV_ASSERT_NULL(valid_pos);
-
- lv_tileview_ext_t * ext = lv_obj_get_ext_attr(tileview);
- ext->valid_pos = valid_pos;
- ext->valid_pos_cnt = valid_pos_cnt;
-
- /*If valid pos. is selected do nothing*/
- uint16_t i;
- for(i = 0; i < valid_pos_cnt; i++) {
- if(valid_pos[i].x == ext->act_id.x && valid_pos[i].y == ext->act_id.y) {
- return;
- }
- }
-
- /*Set a valid position if now an invalid is selected*/
- if(valid_pos_cnt > 0) {
- lv_tileview_set_tile_act(tileview, valid_pos[0].x, valid_pos[0].y, LV_ANIM_OFF);
- }
-}
-
-/**
- * Set the tile to be shown
- * @param tileview pointer to a tileview object
- * @param x column id (0, 1, 2...)
- * @param y line id (0, 1, 2...)
- * @param anim LV_ANIM_ON: set the value with an animation; LV_ANIM_OFF: change the value immediately
- */
-void lv_tileview_set_tile_act(lv_obj_t * tileview, lv_coord_t x, lv_coord_t y, lv_anim_enable_t anim)
-{
- LV_ASSERT_OBJ(tileview, LV_OBJX_NAME);
-
-#if LV_USE_ANIMATION == 0
- anim = LV_ANIM_OFF;
-#endif
-
- lv_tileview_ext_t * ext = lv_obj_get_ext_attr(tileview);
-
- uint32_t tile_id;
- bool valid = false;
- for(tile_id = 0; tile_id < ext->valid_pos_cnt; tile_id++) {
- if(ext->valid_pos[tile_id].x == x && ext->valid_pos[tile_id].y == y) {
- valid = true;
- break;
- }
- }
-
- if(valid == false) return; /*Don't load not valid tiles*/
-
- ext->act_id.x = x;
- ext->act_id.y = y;
-
- lv_coord_t x_coord = -x * lv_obj_get_width(tileview);
- lv_coord_t y_coord = -y * lv_obj_get_height(tileview);
- lv_obj_t * scrl = lv_page_get_scrl(tileview);
- if(anim) {
-#if LV_USE_ANIMATION
- lv_coord_t x_act = lv_obj_get_x(scrl);
- lv_coord_t y_act = lv_obj_get_y(scrl);
-
- lv_anim_t a;
- a.var = scrl;
- a.exec_cb = (lv_anim_exec_xcb_t)lv_obj_set_x;
- a.path_cb = lv_anim_path_linear;
- a.ready_cb = NULL;
- a.act_time = 0;
- a.time = ext->anim_time;
- a.playback = 0;
- a.playback_pause = 0;
- a.repeat = 0;
- a.repeat_pause = 0;
-
- if(x_coord != x_act) {
- a.start = x_act;
- a.end = x_coord;
- lv_anim_create(&a);
- }
-
- if(y_coord != y_act) {
- a.start = y_act;
- a.end = y_coord;
- a.exec_cb = (lv_anim_exec_xcb_t)lv_obj_set_y;
- lv_anim_create(&a);
- }
-#endif
- } else {
- lv_obj_set_pos(scrl, x_coord, y_coord);
- }
-
- lv_res_t res = LV_RES_OK;
- res = lv_event_send(tileview, LV_EVENT_VALUE_CHANGED, &tile_id);
- if(res != LV_RES_OK) return; /*Prevent the tile loading*/
-}
-
-/**
- * Set a style of a tileview.
- * @param tileview pointer to tileview object
- * @param type which style should be set
- * @param style pointer to a style
- */
-void lv_tileview_set_style(lv_obj_t * tileview, lv_tileview_style_t type, const lv_style_t * style)
-{
- LV_ASSERT_OBJ(tileview, LV_OBJX_NAME);
-
- switch(type) {
- case LV_TILEVIEW_STYLE_MAIN: lv_obj_set_style(tileview, style); break;
- }
-}
-
-/*=====================
- * Getter functions
- *====================*/
-
-/*
- * New object specific "get" functions come here
- */
-
-/**
- * Get style of a tileview.
- * @param tileview pointer to tileview object
- * @param type which style should be get
- * @return style pointer to the style
- */
-const lv_style_t * lv_tileview_get_style(const lv_obj_t * tileview, lv_tileview_style_t type)
-{
- LV_ASSERT_OBJ(tileview, LV_OBJX_NAME);
-
- const lv_style_t * style = NULL;
- switch(type) {
- case LV_TILEVIEW_STYLE_MAIN: style = lv_obj_get_style(tileview); break;
- default: style = NULL;
- }
-
- return style;
-}
-
-/*=====================
- * Other functions
- *====================*/
-
-/*
- * New object specific "other" functions come here
- */
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Signal function of the tileview
- * @param tileview pointer to a tileview object
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_tileview_signal(lv_obj_t * tileview, lv_signal_t sign, void * param)
-{
- lv_res_t res;
-
- /* Include the ancient signal function */
- res = ancestor_signal(tileview, sign, param);
- if(res != LV_RES_OK) return res;
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);
-
- if(sign == LV_SIGNAL_CLEANUP) {
- /*Nothing to cleanup. (No dynamically allocated memory in 'ext')*/
- }
-
- return res;
-}
-
-/**
- * Signal function of the tileview scrollable
- * @param tileview pointer to the scrollable part of the tileview object
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_tileview_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void * param)
-{
-
- lv_res_t res;
-
- /* Include the ancient signal function */
- res = ancestor_scrl_signal(scrl, sign, param);
- if(res != LV_RES_OK) return res;
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, "");
-
- lv_obj_t * tileview = lv_obj_get_parent(scrl);
- const lv_style_t * style_bg = lv_tileview_get_style(tileview, LV_TILEVIEW_STYLE_MAIN);
-
- /*Apply constraint on moving of the tileview*/
- if(sign == LV_SIGNAL_CORD_CHG) {
- lv_indev_t * indev = lv_indev_get_act();
- if(indev) {
- lv_tileview_ext_t * ext = lv_obj_get_ext_attr(tileview);
-
- /*Set horizontal drag constraint if no vertical constraint an dragged to valid x
- * direction */
- if(ext->drag_ver == 0 &&
- ((ext->drag_right_en && indev->proc.types.pointer.drag_sum.x <= -LV_INDEV_DEF_DRAG_LIMIT) ||
- (ext->drag_left_en && indev->proc.types.pointer.drag_sum.x >= LV_INDEV_DEF_DRAG_LIMIT))) {
- ext->drag_hor = 1;
- }
- /*Set vertical drag constraint if no horizontal constraint an dragged to valid y
- * direction */
- if(ext->drag_hor == 0 &&
- ((ext->drag_bottom_en && indev->proc.types.pointer.drag_sum.y <= -LV_INDEV_DEF_DRAG_LIMIT) ||
- (ext->drag_top_en && indev->proc.types.pointer.drag_sum.y >= LV_INDEV_DEF_DRAG_LIMIT))) {
- ext->drag_ver = 1;
- }
-
-#if LV_USE_ANIMATION
- if(ext->drag_hor) {
- ext->page.edge_flash.top_ip = 0;
- ext->page.edge_flash.bottom_ip = 0;
- }
-
- if(ext->drag_ver) {
- ext->page.edge_flash.right_ip = 0;
- ext->page.edge_flash.left_ip = 0;
- }
-#endif
-
- lv_coord_t x = lv_obj_get_x(scrl);
- lv_coord_t y = lv_obj_get_y(scrl);
- lv_coord_t h = lv_obj_get_height(tileview);
- lv_coord_t w = lv_obj_get_width(tileview);
- if(ext->drag_top_en == 0) {
- if(y > -(ext->act_id.y * h) && indev->proc.types.pointer.vect.y > 0 && ext->drag_hor == 0) {
-#if LV_USE_ANIMATION
- if(ext->page.edge_flash.enabled && ext->page.edge_flash.left_ip == 0 &&
- ext->page.edge_flash.right_ip == 0 && ext->page.edge_flash.top_ip == 0 &&
- ext->page.edge_flash.bottom_ip == 0) {
- ext->page.edge_flash.top_ip = 1;
- lv_page_start_edge_flash(tileview);
- }
-#endif
-
- lv_obj_set_y(scrl, -ext->act_id.y * h + style_bg->body.padding.top);
- }
- }
- if(ext->drag_bottom_en == 0 && indev->proc.types.pointer.vect.y < 0 && ext->drag_hor == 0) {
- if(y < -(ext->act_id.y * h)) {
-#if LV_USE_ANIMATION
- if(ext->page.edge_flash.enabled && ext->page.edge_flash.left_ip == 0 &&
- ext->page.edge_flash.right_ip == 0 && ext->page.edge_flash.top_ip == 0 &&
- ext->page.edge_flash.bottom_ip == 0) {
- ext->page.edge_flash.bottom_ip = 1;
- lv_page_start_edge_flash(tileview);
- }
-#endif
- }
-
- lv_obj_set_y(scrl, -ext->act_id.y * h + style_bg->body.padding.top);
- }
- if(ext->drag_left_en == 0) {
- if(x > -(ext->act_id.x * w) && indev->proc.types.pointer.vect.x > 0 && ext->drag_ver == 0) {
-#if LV_USE_ANIMATION
- if(ext->page.edge_flash.enabled && ext->page.edge_flash.left_ip == 0 &&
- ext->page.edge_flash.right_ip == 0 && ext->page.edge_flash.top_ip == 0 &&
- ext->page.edge_flash.bottom_ip == 0) {
- ext->page.edge_flash.left_ip = 1;
- lv_page_start_edge_flash(tileview);
- }
-#endif
-
- lv_obj_set_x(scrl, -ext->act_id.x * w + style_bg->body.padding.left);
- }
- }
- if(ext->drag_right_en == 0 && indev->proc.types.pointer.vect.x < 0 && ext->drag_ver == 0) {
- if(x < -(ext->act_id.x * w)) {
-#if LV_USE_ANIMATION
- if(ext->page.edge_flash.enabled && ext->page.edge_flash.left_ip == 0 &&
- ext->page.edge_flash.right_ip == 0 && ext->page.edge_flash.top_ip == 0 &&
- ext->page.edge_flash.bottom_ip == 0) {
- ext->page.edge_flash.right_ip = 1;
- lv_page_start_edge_flash(tileview);
- }
-#endif
- }
-
- lv_obj_set_x(scrl, -ext->act_id.x * w + style_bg->body.padding.top);
- }
-
- /*Apply the drag constraints*/
- if(ext->drag_ver == 0)
- lv_obj_set_y(scrl, -ext->act_id.y * lv_obj_get_height(tileview) + style_bg->body.padding.top);
- if(ext->drag_hor == 0)
- lv_obj_set_x(scrl, -ext->act_id.x * lv_obj_get_width(tileview) + style_bg->body.padding.left);
- }
- }
- return res;
-}
-
-static void tileview_scrl_event_cb(lv_obj_t * scrl, lv_event_t event)
-{
- lv_obj_t * tileview = lv_obj_get_parent(scrl);
-
- /*Initialize some variables on PRESS*/
- if(event == LV_EVENT_PRESSED) {
- lv_tileview_ext_t * ext = lv_obj_get_ext_attr(tileview);
- ext->drag_hor = 0;
- ext->drag_ver = 0;
- set_valid_drag_dirs(tileview);
- }
- /*Animate the tabview to the correct location on RELEASE*/
- else if(event == LV_EVENT_PRESS_LOST || event == LV_EVENT_RELEASED) {
- /* If the element was dragged and it moved the tileview finish the drag manually to
- * let the tileview to finish the move.*/
- lv_indev_t * indev = lv_indev_get_act();
- lv_tileview_ext_t * ext = lv_obj_get_ext_attr(tileview);
- if(lv_indev_is_dragging(indev) && (ext->drag_hor || ext->drag_ver)) {
- indev->proc.types.pointer.drag_in_prog = 0;
- drag_end_handler(tileview);
- }
-
- }
-}
-
-/**
- * Called when the user releases an element of the tileview after dragging it.
- * @param tileview pointer to a tileview object
- */
-static void drag_end_handler(lv_obj_t * tileview)
-{
- lv_tileview_ext_t * ext = lv_obj_get_ext_attr(tileview);
- lv_indev_t * indev = lv_indev_get_act();
- lv_point_t point_act;
- lv_indev_get_point(indev, &point_act);
- lv_obj_t * scrl = lv_page_get_scrl(tileview);
- lv_point_t p;
-
- p.x = -(scrl->coords.x1 - lv_obj_get_width(tileview) / 2);
- p.y = -(scrl->coords.y1 - lv_obj_get_height(tileview) / 2);
-
- /*From the drag vector (drag throw) predict the end position*/
- if(ext->drag_hor) {
- lv_point_t vect;
- lv_indev_get_vect(indev, &vect);
- lv_coord_t predict = 0;
-
- while(vect.x != 0) {
- predict += vect.x;
- vect.x = vect.x * (100 - LV_INDEV_DEF_DRAG_THROW) / 100;
- }
-
- p.x -= predict;
- } else if(ext->drag_ver) {
- lv_point_t vect;
- lv_indev_get_vect(indev, &vect);
- lv_coord_t predict = 0;
-
- while(vect.y != 0) {
- predict += vect.y;
- vect.y = vect.y * (100 - LV_INDEV_DEF_DRAG_THROW) / 100;
- }
-
- p.y -= predict;
- }
-
- /*Get the index of the tile*/
- p.x = p.x / lv_obj_get_width(tileview);
- p.y = p.y / lv_obj_get_height(tileview);
-
- /*Max +- move*/
- lv_coord_t x_move = p.x - ext->act_id.x;
- lv_coord_t y_move = p.y - ext->act_id.y;
- if(x_move < -1) x_move = -1;
- if(x_move > 1) x_move = 1;
- if(y_move < -1) y_move = -1;
- if(y_move > 1) y_move = 1;
-
- /*Set the new tile*/
- lv_tileview_set_tile_act(tileview, ext->act_id.x + x_move, ext->act_id.y + y_move, true);
-}
-
-static bool set_valid_drag_dirs(lv_obj_t * tileview)
-{
-
- lv_tileview_ext_t * ext = lv_obj_get_ext_attr(tileview);
- if(ext->valid_pos == NULL) return false;
-
- ext->drag_bottom_en = 0;
- ext->drag_top_en = 0;
- ext->drag_left_en = 0;
- ext->drag_right_en = 0;
-
- uint16_t i;
- for(i = 0; i < ext->valid_pos_cnt; i++) {
- if(ext->valid_pos[i].x == ext->act_id.x && ext->valid_pos[i].y == ext->act_id.y - 1) ext->drag_top_en = 1;
- if(ext->valid_pos[i].x == ext->act_id.x && ext->valid_pos[i].y == ext->act_id.y + 1) ext->drag_bottom_en = 1;
- if(ext->valid_pos[i].x == ext->act_id.x - 1 && ext->valid_pos[i].y == ext->act_id.y) ext->drag_left_en = 1;
- if(ext->valid_pos[i].x == ext->act_id.x + 1 && ext->valid_pos[i].y == ext->act_id.y) ext->drag_right_en = 1;
- }
-
- return true;
-}
-
-#endif
diff --git a/src/libs/lvgl/src/lv_objx/lv_tileview.h b/src/libs/lvgl/src/lv_objx/lv_tileview.h
deleted file mode 100644
index 60e4098b..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_tileview.h
+++ /dev/null
@@ -1,178 +0,0 @@
-/**
- * @file lv_tileview.h
- *
- */
-
-#ifndef LV_TILEVIEW_H
-#define LV_TILEVIEW_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_TILEVIEW != 0
-
-#include "../lv_objx/lv_page.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/*Data of tileview*/
-typedef struct
-{
- lv_page_ext_t page;
- /*New data for this type */
- const lv_point_t * valid_pos;
- uint16_t valid_pos_cnt;
-#if LV_USE_ANIMATION
- uint16_t anim_time;
-#endif
- lv_point_t act_id;
- uint8_t drag_top_en : 1;
- uint8_t drag_bottom_en : 1;
- uint8_t drag_left_en : 1;
- uint8_t drag_right_en : 1;
- uint8_t drag_hor : 1;
- uint8_t drag_ver : 1;
-} lv_tileview_ext_t;
-
-/*Styles*/
-enum {
- LV_TILEVIEW_STYLE_MAIN,
-};
-typedef uint8_t lv_tileview_style_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Create a tileview objects
- * @param par pointer to an object, it will be the parent of the new tileview
- * @param copy pointer to a tileview object, if not NULL then the new object will be copied from it
- * @return pointer to the created tileview
- */
-lv_obj_t * lv_tileview_create(lv_obj_t * par, const lv_obj_t * copy);
-
-/*======================
- * Add/remove functions
- *=====================*/
-
-/**
- * Register an object on the tileview. The register object will able to slide the tileview
- * @param tileview pointer to a Tileview object
- * @param element pointer to an object
- */
-void lv_tileview_add_element(lv_obj_t * tileview, lv_obj_t * element);
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Set the valid position's indices. The scrolling will be possible only to these positions.
- * @param tileview pointer to a Tileview object
- * @param valid_pos array width the indices. E.g. `lv_point_t p[] = {{0,0}, {1,0}, {1,1}`.
- * Only the pointer is saved so can't be a local variable.
- * @param valid_pos_cnt numner of elements in `valid_pos` array
- */
-void lv_tileview_set_valid_positions(lv_obj_t * tileview, const lv_point_t valid_pos[], uint16_t valid_pos_cnt);
-
-/**
- * Set the tile to be shown
- * @param tileview pointer to a tileview object
- * @param x column id (0, 1, 2...)
- * @param y line id (0, 1, 2...)
- * @param anim LV_ANIM_ON: set the value with an animation; LV_ANIM_OFF: change the value immediately
- */
-void lv_tileview_set_tile_act(lv_obj_t * tileview, lv_coord_t x, lv_coord_t y, lv_anim_enable_t anim);
-
-/**
- * Enable the edge flash effect. (Show an arc when the an edge is reached)
- * @param tileview pointer to a Tileview
- * @param en true or false to enable/disable end flash
- */
-static inline void lv_tileview_set_edge_flash(lv_obj_t * tileview, bool en)
-{
- lv_page_set_edge_flash(tileview, en);
-}
-
-/**
- * Set the animation time for the Tile view
- * @param tileview pointer to a page object
- * @param anim_time animation time in milliseconds
- */
-static inline void lv_tileview_set_anim_time(lv_obj_t * tileview, uint16_t anim_time)
-{
- lv_page_set_anim_time(tileview, anim_time);
-}
-
-/**
- * Set a style of a tileview.
- * @param tileview pointer to tileview object
- * @param type which style should be set
- * @param style pointer to a style
- */
-void lv_tileview_set_style(lv_obj_t * tileview, lv_tileview_style_t type, const lv_style_t * style);
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the scroll propagation property
- * @param tileview pointer to a Tileview
- * @return true or false
- */
-static inline bool lv_tileview_get_edge_flash(lv_obj_t * tileview)
-{
- return lv_page_get_edge_flash(tileview);
-}
-
-/**
- * Get the animation time for the Tile view
- * @param tileview pointer to a page object
- * @return animation time in milliseconds
- */
-static inline uint16_t lv_tileview_get_anim_time(lv_obj_t * tileview)
-{
- return lv_page_get_anim_time(tileview);
-}
-
-/**
- * Get style of a tileview.
- * @param tileview pointer to tileview object
- * @param type which style should be get
- * @return style pointer to the style
- */
-const lv_style_t * lv_tileview_get_style(const lv_obj_t * tileview, lv_tileview_style_t type);
-
-/*=====================
- * Other functions
- *====================*/
-
-/**********************
- * MACROS
- **********************/
-
-#endif /*LV_USE_TILEVIEW*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_TILEVIEW_H*/
diff --git a/src/libs/lvgl/src/lv_objx/lv_win.c b/src/libs/lvgl/src/lv_objx/lv_win.c
deleted file mode 100644
index 689dad37..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_win.c
+++ /dev/null
@@ -1,618 +0,0 @@
-/**
- * @file lv_win.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_win.h"
-#if LV_USE_WIN != 0
-
-#include "../lv_core/lv_debug.h"
-#include "../lv_themes/lv_theme.h"
-#include "../lv_core/lv_disp.h"
-
-/*********************
- * DEFINES
- *********************/
-#define LV_OBJX_NAME "lv_win"
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-static lv_res_t lv_win_signal(lv_obj_t * win, lv_signal_t sign, void * param);
-static void lv_win_realign(lv_obj_t * win);
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_signal_cb_t ancestor_signal;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Create a window objects
- * @param par pointer to an object, it will be the parent of the new window
- * @param copy pointer to a window object, if not NULL then the new object will be copied from it
- * @return pointer to the created window
- */
-lv_obj_t * lv_win_create(lv_obj_t * par, const lv_obj_t * copy)
-{
- LV_LOG_TRACE("window create started");
-
- /*Create the ancestor object*/
- lv_obj_t * new_win = lv_obj_create(par, copy);
- LV_ASSERT_MEM(new_win);
- if(new_win == NULL) return NULL;
-
- if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_win);
-
- /*Allocate the object type specific extended data*/
- lv_win_ext_t * ext = lv_obj_allocate_ext_attr(new_win, sizeof(lv_win_ext_t));
- LV_ASSERT_MEM(ext);
- if(ext == NULL) return NULL;
-
- ext->page = NULL;
- ext->header = NULL;
- ext->title = NULL;
- ext->style_btn_rel = &lv_style_btn_rel;
- ext->style_btn_pr = &lv_style_btn_pr;
- ext->btn_size = (LV_DPI) / 2;
-
- /*Init the new window object*/
- if(copy == NULL) {
- /* Set a size which fits into the parent.
- * Don't use `par` directly because if the window is created on a page it is moved to the
- * scrollable so the parent has changed */
- lv_coord_t w;
- lv_coord_t h;
- if(par) {
- w = lv_obj_get_width_fit(lv_obj_get_parent(new_win));
- h = lv_obj_get_height_fit(lv_obj_get_parent(new_win));
- } else {
- w = lv_disp_get_hor_res(NULL);
- h = lv_disp_get_ver_res(NULL);
- }
-
- lv_obj_set_size(new_win, w, h);
-
- lv_obj_set_style(new_win, &lv_style_pretty);
-
- ext->page = lv_page_create(new_win, NULL);
- lv_obj_set_protect(ext->page, LV_PROTECT_PARENT);
- lv_page_set_sb_mode(ext->page, LV_SB_MODE_AUTO);
- lv_page_set_style(ext->page, LV_PAGE_STYLE_BG, &lv_style_transp_fit);
-
- /*Create a holder for the header*/
- ext->header = lv_obj_create(new_win, NULL);
- /*Move back the header because it is automatically moved to the scrollable */
- lv_obj_set_protect(ext->header, LV_PROTECT_PARENT);
- lv_obj_set_parent(ext->header, new_win);
-
- /*Create a title on the header*/
- ext->title = lv_label_create(ext->header, NULL);
- lv_label_set_text(ext->title, "My title");
-
- lv_obj_set_signal_cb(new_win, lv_win_signal);
-
- /*Set the default styles*/
- lv_theme_t * th = lv_theme_get_current();
- if(th) {
- lv_win_set_style(new_win, LV_WIN_STYLE_BG, th->style.win.bg);
- lv_win_set_style(new_win, LV_WIN_STYLE_SB, th->style.win.sb);
- lv_win_set_style(new_win, LV_WIN_STYLE_HEADER, th->style.win.header);
- lv_win_set_style(new_win, LV_WIN_STYLE_CONTENT, th->style.win.content);
- lv_win_set_style(new_win, LV_WIN_STYLE_BTN_REL, th->style.win.btn.rel);
- lv_win_set_style(new_win, LV_WIN_STYLE_BTN_PR, th->style.win.btn.pr);
- } else {
- lv_win_set_style(new_win, LV_WIN_STYLE_BG, &lv_style_plain);
- lv_win_set_style(new_win, LV_WIN_STYLE_CONTENT, &lv_style_transp);
- lv_win_set_style(new_win, LV_WIN_STYLE_HEADER, &lv_style_plain_color);
- }
- }
- /*Copy an existing object*/
- else {
- lv_win_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
- /*Create the objects*/
- ext->header = lv_obj_create(new_win, copy_ext->header);
- ext->title = lv_label_create(ext->header, copy_ext->title);
- ext->page = lv_page_create(new_win, copy_ext->page);
- ext->btn_size = copy_ext->btn_size;
-
- /*Copy the control buttons*/
- lv_obj_t * child;
- lv_obj_t * cbtn;
- child = lv_obj_get_child_back(copy_ext->header, NULL);
- child = lv_obj_get_child_back(copy_ext->header, child); /*Sip the title*/
- while(child != NULL) {
- cbtn = lv_btn_create(ext->header, child);
- lv_img_create(cbtn, lv_obj_get_child(child, NULL));
- child = lv_obj_get_child_back(copy_ext->header, child);
- }
-
- lv_obj_set_signal_cb(new_win, lv_win_signal);
- }
-
- /*Refresh the style with new signal function*/
- lv_obj_refresh_style(new_win);
-
- lv_win_realign(new_win);
-
- LV_LOG_INFO("window created");
-
- return new_win;
-}
-
-/**
- * Delete all children of the scrl object, without deleting scrl child.
- * @param win pointer to an object
- */
-void lv_win_clean(lv_obj_t * win)
-{
- LV_ASSERT_OBJ(win, LV_OBJX_NAME);
-
- lv_obj_t * scrl = lv_page_get_scrl(win);
- lv_obj_clean(scrl);
-}
-
-/*======================
- * Add/remove functions
- *=====================*/
-
-/**
- * Add control button to the header of the window
- * @param win pointer to a window object
- * @param img_src an image source ('lv_img_t' variable, path to file or a symbol)
- * @return pointer to the created button object
- */
-lv_obj_t * lv_win_add_btn(lv_obj_t * win, const void * img_src)
-{
- LV_ASSERT_OBJ(win, LV_OBJX_NAME);
- LV_ASSERT_NULL(img_src);
-
- lv_win_ext_t * ext = lv_obj_get_ext_attr(win);
-
- lv_obj_t * btn = lv_btn_create(ext->header, NULL);
- lv_btn_set_style(btn, LV_BTN_STYLE_REL, ext->style_btn_rel);
- lv_btn_set_style(btn, LV_BTN_STYLE_PR, ext->style_btn_pr);
- lv_obj_set_size(btn, ext->btn_size, ext->btn_size);
-
- lv_obj_t * img = lv_img_create(btn, NULL);
- lv_obj_set_click(img, false);
- lv_img_set_src(img, img_src);
-
- lv_win_realign(win);
-
- return btn;
-}
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Can be assigned to a window control button to close the window
- * @param btn pointer to the control button on teh widows header
- * @param evet the event type
- */
-void lv_win_close_event_cb(lv_obj_t * btn, lv_event_t event)
-{
- LV_ASSERT_OBJ(btn, "lv_btn");
-
- if(event == LV_EVENT_RELEASED) {
- lv_obj_t * win = lv_win_get_from_btn(btn);
-
- lv_obj_del(win);
- }
-}
-
-/**
- * Set the title of a window
- * @param win pointer to a window object
- * @param title string of the new title
- */
-void lv_win_set_title(lv_obj_t * win, const char * title)
-{
- LV_ASSERT_OBJ(win, LV_OBJX_NAME);
- LV_ASSERT_STR(title);
-
- lv_win_ext_t * ext = lv_obj_get_ext_attr(win);
-
- lv_label_set_text(ext->title, title);
- lv_win_realign(win);
-}
-
-/**
- * Set the control button size of a window
- * @param win pointer to a window object
- * @param size control button size
- */
-void lv_win_set_btn_size(lv_obj_t * win, lv_coord_t size)
-{
- LV_ASSERT_OBJ(win, LV_OBJX_NAME);
-
- lv_win_ext_t * ext = lv_obj_get_ext_attr(win);
- if(ext->btn_size == size) return;
-
- ext->btn_size = size;
-
- lv_win_realign(win);
-}
-
-/**
- * Set the size of the content area.
- * @param win pointer to a window object
- * @param w width
- * @param h height (the window will be higher with the height of the header)
- */
-void lv_win_set_content_size(lv_obj_t * win, lv_coord_t w, lv_coord_t h)
-{
- LV_ASSERT_OBJ(win, LV_OBJX_NAME);
-
- lv_win_ext_t * ext = lv_obj_get_ext_attr(win);
- h += lv_obj_get_height(ext->header);
-
- lv_obj_set_size(win, w, h);
-}
-
-/**
- * Set the layout of the window
- * @param win pointer to a window object
- * @param layout the layout from 'lv_layout_t'
- */
-void lv_win_set_layout(lv_obj_t * win, lv_layout_t layout)
-{
- LV_ASSERT_OBJ(win, LV_OBJX_NAME);
-
- lv_win_ext_t * ext = lv_obj_get_ext_attr(win);
- lv_page_set_scrl_layout(ext->page, layout);
-}
-
-/**
- * Set the scroll bar mode of a window
- * @param win pointer to a window object
- * @param sb_mode the new scroll bar mode from 'lv_sb_mode_t'
- */
-void lv_win_set_sb_mode(lv_obj_t * win, lv_sb_mode_t sb_mode)
-{
- LV_ASSERT_OBJ(win, LV_OBJX_NAME);
-
- lv_win_ext_t * ext = lv_obj_get_ext_attr(win);
- lv_page_set_sb_mode(ext->page, sb_mode);
-}
-/**
- * Set focus animation duration on `lv_win_focus()`
- * @param win pointer to a window object
- * @param anim_time duration of animation [ms]
- */
-void lv_win_set_anim_time(lv_obj_t * win, uint16_t anim_time)
-{
- LV_ASSERT_OBJ(win, LV_OBJX_NAME);
-
- lv_page_set_anim_time(lv_win_get_content(win), anim_time);
-}
-
-/**
- * Set a style of a window
- * @param win pointer to a window object
- * @param type which style should be set
- * @param style pointer to a style
- */
-void lv_win_set_style(lv_obj_t * win, lv_win_style_t type, const lv_style_t * style)
-{
- LV_ASSERT_OBJ(win, LV_OBJX_NAME);
-
- lv_win_ext_t * ext = lv_obj_get_ext_attr(win);
-
- switch(type) {
- case LV_WIN_STYLE_BG:
- lv_obj_set_style(win, style);
- lv_win_realign(win);
- break;
- case LV_WIN_STYLE_CONTENT: lv_page_set_style(ext->page, LV_PAGE_STYLE_SCRL, style); break;
- case LV_WIN_STYLE_SB: lv_page_set_style(ext->page, LV_PAGE_STYLE_SB, style); break;
- case LV_WIN_STYLE_HEADER:
- lv_obj_set_style(ext->header, style);
- lv_win_realign(win);
- break;
- case LV_WIN_STYLE_BTN_REL: ext->style_btn_rel = style; break;
- case LV_WIN_STYLE_BTN_PR: ext->style_btn_pr = style; break;
- }
-
- /*Refresh the existing buttons*/
- if(type == LV_WIN_STYLE_BTN_REL || type == LV_WIN_STYLE_BTN_PR) {
- lv_obj_t * btn;
- btn = lv_obj_get_child_back(ext->header, NULL);
- btn = lv_obj_get_child_back(ext->header, btn); /*Skip the title*/
- while(btn != NULL) {
- if(type == LV_WIN_STYLE_BTN_REL)
- lv_btn_set_style(btn, LV_BTN_STYLE_REL, style);
- else
- lv_btn_set_style(btn, LV_BTN_STYLE_PR, style);
- btn = lv_obj_get_child_back(ext->header, btn);
- }
- }
-}
-
-/**
- * Set drag status of a window. If set to 'true' window can be dragged like on a PC.
- * @param win pointer to a window object
- * @param en whether dragging is enabled
- */
-void lv_win_set_drag(lv_obj_t * win, bool en)
-{
- LV_ASSERT_OBJ(win, LV_OBJX_NAME);
-
- lv_win_ext_t * ext = lv_obj_get_ext_attr(win);
- lv_obj_t * win_header = ext->header;
- lv_obj_set_drag_parent(win_header, en);
- lv_obj_set_drag(win, en);
-}
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the title of a window
- * @param win pointer to a window object
- * @return title string of the window
- */
-const char * lv_win_get_title(const lv_obj_t * win)
-{
- LV_ASSERT_OBJ(win, LV_OBJX_NAME);
-
- lv_win_ext_t * ext = lv_obj_get_ext_attr(win);
- return lv_label_get_text(ext->title);
-}
-
-/**
- * Get the content holder object of window (`lv_page`) to allow additional customization
- * @param win pointer to a window object
- * @return the Page object where the window's content is
- */
-lv_obj_t * lv_win_get_content(const lv_obj_t * win)
-{
- LV_ASSERT_OBJ(win, LV_OBJX_NAME);
-
- lv_win_ext_t * ext = lv_obj_get_ext_attr(win);
- return ext->page;
-}
-
-/**
- * Get the control button size of a window
- * @param win pointer to a window object
- * @return control button size
- */
-lv_coord_t lv_win_get_btn_size(const lv_obj_t * win)
-{
- LV_ASSERT_OBJ(win, LV_OBJX_NAME);
-
- lv_win_ext_t * ext = lv_obj_get_ext_attr(win);
- return ext->btn_size;
-}
-
-/**
- * Get the pointer of a widow from one of its control button.
- * It is useful in the action of the control buttons where only button is known.
- * @param ctrl_btn pointer to a control button of a window
- * @return pointer to the window of 'ctrl_btn'
- */
-lv_obj_t * lv_win_get_from_btn(const lv_obj_t * ctrl_btn)
-{
- LV_ASSERT_OBJ(ctrl_btn, "lv_btn");
-
- lv_obj_t * header = lv_obj_get_parent(ctrl_btn);
- lv_obj_t * win = lv_obj_get_parent(header);
-
- return win;
-}
-
-/**
- * Get the layout of a window
- * @param win pointer to a window object
- * @return the layout of the window (from 'lv_layout_t')
- */
-lv_layout_t lv_win_get_layout(lv_obj_t * win)
-{
- LV_ASSERT_OBJ(win, LV_OBJX_NAME);
-
- lv_win_ext_t * ext = lv_obj_get_ext_attr(win);
- return lv_page_get_scrl_layout(ext->page);
-}
-
-/**
- * Get the scroll bar mode of a window
- * @param win pointer to a window object
- * @return the scroll bar mode of the window (from 'lv_sb_mode_t')
- */
-lv_sb_mode_t lv_win_get_sb_mode(lv_obj_t * win)
-{
- LV_ASSERT_OBJ(win, LV_OBJX_NAME);
-
- lv_win_ext_t * ext = lv_obj_get_ext_attr(win);
- return lv_page_get_sb_mode(ext->page);
-}
-
-/**
- * Get focus animation duration
- * @param win pointer to a window object
- * @return duration of animation [ms]
- */
-uint16_t lv_win_get_anim_time(const lv_obj_t * win)
-{
- LV_ASSERT_OBJ(win, LV_OBJX_NAME);
-
- return lv_page_get_anim_time(lv_win_get_content(win));
-}
-
-/**
- * Get width of the content area (page scrollable) of the window
- * @param win pointer to a window object
- * @return the width of the content_bg area
- */
-lv_coord_t lv_win_get_width(lv_obj_t * win)
-{
- LV_ASSERT_OBJ(win, LV_OBJX_NAME);
-
- lv_win_ext_t * ext = lv_obj_get_ext_attr(win);
- lv_obj_t * scrl = lv_page_get_scrl(ext->page);
- const lv_style_t * style_scrl = lv_obj_get_style(scrl);
-
- return lv_obj_get_width(scrl) - style_scrl->body.padding.left - style_scrl->body.padding.right;
-}
-
-/**
- * Get a style of a window
- * @param win pointer to a button object
- * @param type which style window be get
- * @return style pointer to a style
- */
-const lv_style_t * lv_win_get_style(const lv_obj_t * win, lv_win_style_t type)
-{
- LV_ASSERT_OBJ(win, LV_OBJX_NAME);
-
- const lv_style_t * style = NULL;
- lv_win_ext_t * ext = lv_obj_get_ext_attr(win);
-
- switch(type) {
- case LV_WIN_STYLE_BG: style = lv_obj_get_style(win); break;
- case LV_WIN_STYLE_CONTENT: style = lv_page_get_style(ext->page, LV_PAGE_STYLE_SCRL); break;
- case LV_WIN_STYLE_SB: style = lv_page_get_style(ext->page, LV_PAGE_STYLE_SB); break;
- case LV_WIN_STYLE_HEADER: style = lv_obj_get_style(ext->header); break;
- case LV_WIN_STYLE_BTN_REL: style = ext->style_btn_rel; break;
- case LV_WIN_STYLE_BTN_PR: style = ext->style_btn_pr; break;
- default: style = NULL; break;
- }
-
- return style;
-}
-
-/*=====================
- * Other functions
- *====================*/
-
-/**
- * Focus on an object. It ensures that the object will be visible in the window.
- * @param win pointer to a window object
- * @param obj pointer to an object to focus (must be in the window)
- * @param anim_en LV_ANIM_ON focus with an animation; LV_ANIM_OFF focus without animation
- */
-void lv_win_focus(lv_obj_t * win, lv_obj_t * obj, lv_anim_enable_t anim_en)
-{
- LV_ASSERT_OBJ(win, LV_OBJX_NAME);
- LV_ASSERT_OBJ(obj, "");
-
-
- lv_win_ext_t * ext = lv_obj_get_ext_attr(win);
- lv_page_focus(ext->page, obj, anim_en);
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-/**
- * Signal function of the window
- * @param win pointer to a window object
- * @param sign a signal type from lv_signal_t enum
- * @param param pointer to a signal specific variable
- * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
- */
-static lv_res_t lv_win_signal(lv_obj_t * win, lv_signal_t sign, void * param)
-{
- lv_res_t res;
-
- /* Include the ancient signal function */
- res = ancestor_signal(win, sign, param);
- if(res != LV_RES_OK) return res;
- if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);
-
- lv_win_ext_t * ext = lv_obj_get_ext_attr(win);
- if(sign == LV_SIGNAL_CHILD_CHG) { /*Move children to the page*/
- lv_obj_t * page = ext->page;
- if(page != NULL) {
- lv_obj_t * child;
- child = lv_obj_get_child(win, NULL);
- while(child != NULL) {
- if(lv_obj_is_protected(child, LV_PROTECT_PARENT) == false) {
- lv_obj_t * tmp = child;
- child = lv_obj_get_child(win, child); /*Get the next child before move this*/
- lv_obj_set_parent(tmp, page);
- } else {
- child = lv_obj_get_child(win, child);
- }
- }
- }
- } else if(sign == LV_SIGNAL_STYLE_CHG) {
- lv_win_realign(win);
- } else if(sign == LV_SIGNAL_CORD_CHG) {
- /*If the size is changed refresh the window*/
- if(lv_area_get_width(param) != lv_obj_get_width(win) || lv_area_get_height(param) != lv_obj_get_height(win)) {
- lv_win_realign(win);
- }
- } else if(sign == LV_SIGNAL_CLEANUP) {
- ext->header = NULL; /*These objects were children so they are already invalid*/
- ext->page = NULL;
- ext->title = NULL;
- } else if(sign == LV_SIGNAL_CONTROL) {
- /*Forward all the control signals to the page*/
- ext->page->signal_cb(ext->page, sign, param);
- }
-
- return res;
-}
-
-/**
- * Realign the building elements of a window
- * @param win pointer to window objectker
- */
-static void lv_win_realign(lv_obj_t * win)
-{
- lv_win_ext_t * ext = lv_obj_get_ext_attr(win);
-
- if(ext->page == NULL || ext->header == NULL || ext->title == NULL) return;
-
- const lv_style_t * header_style = lv_win_get_style(win, LV_WIN_STYLE_HEADER);
- lv_obj_set_size(ext->header, lv_obj_get_width(win),
- ext->btn_size + header_style->body.padding.top + header_style->body.padding.bottom);
-
- bool first_btn = true;
- lv_obj_t * btn;
- lv_obj_t * btn_prev = NULL;
- /*Refresh the size of all control buttons*/
- btn = lv_obj_get_child_back(ext->header, NULL);
- btn = lv_obj_get_child_back(ext->header, btn); /*Skip the title*/
- while(btn != NULL) {
- lv_obj_set_size(btn, ext->btn_size, ext->btn_size);
- if(first_btn) {
- lv_obj_align(btn, ext->header, LV_ALIGN_IN_RIGHT_MID, -header_style->body.padding.right, 0);
- first_btn = false;
- } else {
- lv_obj_align(btn, btn_prev, LV_ALIGN_OUT_LEFT_MID, -header_style->body.padding.inner, 0);
- }
- btn_prev = btn;
- btn = lv_obj_get_child_back(ext->header, btn);
- }
-
- const lv_style_t * style_header = lv_win_get_style(win, LV_WIN_STYLE_HEADER);
- lv_obj_align(ext->title, NULL, LV_ALIGN_IN_LEFT_MID, style_header->body.padding.left, 0);
-
- lv_obj_set_pos(ext->header, 0, 0);
-
- lv_obj_set_size(ext->page, lv_obj_get_width(win), lv_obj_get_height(win) - lv_obj_get_height(ext->header));
- lv_obj_align(ext->page, ext->header, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 0);
-}
-
-#endif
diff --git a/src/libs/lvgl/src/lv_objx/lv_win.h b/src/libs/lvgl/src/lv_objx/lv_win.h
deleted file mode 100644
index 28560cf6..00000000
--- a/src/libs/lvgl/src/lv_objx/lv_win.h
+++ /dev/null
@@ -1,302 +0,0 @@
-/**
- * @file lv_win.h
- *
- */
-
-#ifndef LV_WIN_H
-#define LV_WIN_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_WIN != 0
-
-/*Testing of dependencies*/
-#if LV_USE_BTN == 0
-#error "lv_win: lv_btn is required. Enable it in lv_conf.h (LV_USE_BTN 1) "
-#endif
-
-#if LV_USE_LABEL == 0
-#error "lv_win: lv_label is required. Enable it in lv_conf.h (LV_USE_LABEL 1) "
-#endif
-
-#if LV_USE_IMG == 0
-#error "lv_win: lv_img is required. Enable it in lv_conf.h (LV_USE_IMG 1) "
-#endif
-
-#if LV_USE_PAGE == 0
-#error "lv_win: lv_page is required. Enable it in lv_conf.h (LV_USE_PAGE 1) "
-#endif
-
-#include "../lv_core/lv_obj.h"
-#include "lv_cont.h"
-#include "lv_btn.h"
-#include "lv_label.h"
-#include "lv_img.h"
-#include "lv_page.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/*Data of window*/
-typedef struct
-{
- /*Ext. of ancestor*/
- /*New data for this type */
- lv_obj_t * page; /*Pointer to a page which holds the content*/
- lv_obj_t * header; /*Pointer to the header container of the window*/
- lv_obj_t * title; /*Pointer to the title label of the window*/
- const lv_style_t * style_btn_rel; /*Control button releases style*/
- const lv_style_t * style_btn_pr; /*Control button pressed style*/
- lv_coord_t btn_size; /*Size of the control buttons (square)*/
-} lv_win_ext_t;
-
-/** Window styles. */
-enum {
- LV_WIN_STYLE_BG, /**< Window object background style. */
- LV_WIN_STYLE_CONTENT, /**< Window content style. */
- LV_WIN_STYLE_SB, /**< Window scrollbar style. */
- LV_WIN_STYLE_HEADER, /**< Window titlebar background style. */
- LV_WIN_STYLE_BTN_REL, /**< Same meaning as ordinary button styles. */
- LV_WIN_STYLE_BTN_PR,
-};
-typedef uint8_t lv_win_style_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Create a window objects
- * @param par pointer to an object, it will be the parent of the new window
- * @param copy pointer to a window object, if not NULL then the new object will be copied from it
- * @return pointer to the created window
- */
-lv_obj_t * lv_win_create(lv_obj_t * par, const lv_obj_t * copy);
-
-/**
- * Delete all children of the scrl object, without deleting scrl child.
- * @param win pointer to an object
- */
-void lv_win_clean(lv_obj_t * win);
-
-/*======================
- * Add/remove functions
- *=====================*/
-
-/**
- * Add control button to the header of the window
- * @param win pointer to a window object
- * @param img_src an image source ('lv_img_t' variable, path to file or a symbol)
- * @return pointer to the created button object
- */
-lv_obj_t * lv_win_add_btn(lv_obj_t * win, const void * img_src);
-
-/*=====================
- * Setter functions
- *====================*/
-
-/**
- * Can be assigned to a window control button to close the window
- * @param btn pointer to the control button on teh widows header
- * @param evet the event type
- */
-void lv_win_close_event_cb(lv_obj_t * btn, lv_event_t event);
-
-/**
- * Set the title of a window
- * @param win pointer to a window object
- * @param title string of the new title
- */
-void lv_win_set_title(lv_obj_t * win, const char * title);
-
-/**
- * Set the control button size of a window
- * @param win pointer to a window object
- * @return control button size
- */
-void lv_win_set_btn_size(lv_obj_t * win, lv_coord_t size);
-
-
-/**
- * Set the size of the content area.
- * @param win pointer to a window object
- * @param w width
- * @param h height (the window will be higher with the height of the header)
- */
-void lv_win_set_content_size(lv_obj_t * win, lv_coord_t w, lv_coord_t h);
-
-/**
- * Set the layout of the window
- * @param win pointer to a window object
- * @param layout the layout from 'lv_layout_t'
- */
-void lv_win_set_layout(lv_obj_t * win, lv_layout_t layout);
-
-/**
- * Set the scroll bar mode of a window
- * @param win pointer to a window object
- * @param sb_mode the new scroll bar mode from 'lv_sb_mode_t'
- */
-void lv_win_set_sb_mode(lv_obj_t * win, lv_sb_mode_t sb_mode);
-
-/**
- * Set focus animation duration on `lv_win_focus()`
- * @param win pointer to a window object
- * @param anim_time duration of animation [ms]
- */
-void lv_win_set_anim_time(lv_obj_t * win, uint16_t anim_time);
-
-/**
- * Set a style of a window
- * @param win pointer to a window object
- * @param type which style should be set
- * @param style pointer to a style
- */
-void lv_win_set_style(lv_obj_t * win, lv_win_style_t type, const lv_style_t * style);
-
-/**
- * Set drag status of a window. If set to 'true' window can be dragged like on a PC.
- * @param win pointer to a window object
- * @param en whether dragging is enabled
- */
-void lv_win_set_drag(lv_obj_t * win, bool en);
-
-/*=====================
- * Getter functions
- *====================*/
-
-/**
- * Get the title of a window
- * @param win pointer to a window object
- * @return title string of the window
- */
-const char * lv_win_get_title(const lv_obj_t * win);
-
-/**
- * Get the content holder object of window (`lv_page`) to allow additional customization
- * @param win pointer to a window object
- * @return the Page object where the window's content is
- */
-lv_obj_t * lv_win_get_content(const lv_obj_t * win);
-
-/**
- * Get the control button size of a window
- * @param win pointer to a window object
- * @return control button size
- */
-lv_coord_t lv_win_get_btn_size(const lv_obj_t * win);
-
-/**
- * Get the pointer of a widow from one of its control button.
- * It is useful in the action of the control buttons where only button is known.
- * @param ctrl_btn pointer to a control button of a window
- * @return pointer to the window of 'ctrl_btn'
- */
-lv_obj_t * lv_win_get_from_btn(const lv_obj_t * ctrl_btn);
-
-/**
- * Get the layout of a window
- * @param win pointer to a window object
- * @return the layout of the window (from 'lv_layout_t')
- */
-lv_layout_t lv_win_get_layout(lv_obj_t * win);
-
-/**
- * Get the scroll bar mode of a window
- * @param win pointer to a window object
- * @return the scroll bar mode of the window (from 'lv_sb_mode_t')
- */
-lv_sb_mode_t lv_win_get_sb_mode(lv_obj_t * win);
-
-/**
- * Get focus animation duration
- * @param win pointer to a window object
- * @return duration of animation [ms]
- */
-uint16_t lv_win_get_anim_time(const lv_obj_t * win);
-
-/**
- * Get width of the content area (page scrollable) of the window
- * @param win pointer to a window object
- * @return the width of the content area
- */
-lv_coord_t lv_win_get_width(lv_obj_t * win);
-
-/**
- * Get a style of a window
- * @param win pointer to a button object
- * @param type which style window be get
- * @return style pointer to a style
- */
-const lv_style_t * lv_win_get_style(const lv_obj_t * win, lv_win_style_t type);
-
-/**
- * Get drag status of a window. If set to 'true' window can be dragged like on a PC.
- * @param win pointer to a window object
- * @return whether window is draggable
- */
-static inline bool lv_win_get_drag(const lv_obj_t * win)
-{
- return lv_obj_get_drag(win);
-}
-
-/*=====================
- * Other functions
- *====================*/
-
-/**
- * Focus on an object. It ensures that the object will be visible in the window.
- * @param win pointer to a window object
- * @param obj pointer to an object to focus (must be in the window)
- * @param anim_en LV_ANIM_ON focus with an animation; LV_ANIM_OFF focus without animation
- */
-void lv_win_focus(lv_obj_t * win, lv_obj_t * obj, lv_anim_enable_t anim_en);
-
-/**
- * Scroll the window horizontally
- * @param win pointer to a window object
- * @param dist the distance to scroll (< 0: scroll right; > 0 scroll left)
- */
-static inline void lv_win_scroll_hor(lv_obj_t * win, lv_coord_t dist)
-{
- lv_win_ext_t * ext = (lv_win_ext_t *)lv_obj_get_ext_attr(win);
- lv_page_scroll_hor(ext->page, dist);
-}
-/**
- * Scroll the window vertically
- * @param win pointer to a window object
- * @param dist the distance to scroll (< 0: scroll down; > 0 scroll up)
- */
-static inline void lv_win_scroll_ver(lv_obj_t * win, lv_coord_t dist)
-{
- lv_win_ext_t * ext = (lv_win_ext_t *)lv_obj_get_ext_attr(win);
- lv_page_scroll_ver(ext->page, dist);
-}
-
-/**********************
- * MACROS
- **********************/
-
-#endif /*LV_USE_WIN*/
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_WIN_H*/
diff --git a/src/libs/lvgl/src/lv_themes/lv_theme.c b/src/libs/lvgl/src/lv_themes/lv_theme.c
deleted file mode 100644
index 21cc38c2..00000000
--- a/src/libs/lvgl/src/lv_themes/lv_theme.c
+++ /dev/null
@@ -1,124 +0,0 @@
-/**
- * @file lv_theme.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_theme.h"
-#include "../lv_core/lv_obj.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-
-/**********************
- * STATIC VARIABLES
- **********************/
-
-#if LV_THEME_LIVE_UPDATE == 0
-static lv_theme_t * current_theme;
-#else
-/* If live update is used then a big `lv_style_t` array is used to store the real styles of the
- * theme not only pointers. On `lv_theme_set_current` the styles of the theme are copied to this
- * array. The pointers in `current_theme` are initialized to point to the styles in the array. This
- * way the theme styles will always point to the same memory address even after theme is change.
- * (The pointers in the theme points to the styles declared by the theme itself) */
-
-/* Store the styles in this array. */
-static lv_style_t th_styles[LV_THEME_STYLE_COUNT];
-static bool inited = false;
-static lv_theme_t current_theme;
-#endif
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Set a theme for the system.
- * From now, all the created objects will use styles from this theme by default
- * @param th pointer to theme (return value of: 'lv_theme_init_xxx()')
- */
-void lv_theme_set_current(lv_theme_t * th)
-{
-#if LV_THEME_LIVE_UPDATE == 0
- current_theme = th;
-
-#if LV_USE_GROUP
- /*Copy group style modification callback functions*/
- memcpy(&current_theme->group, &th->group, sizeof(th->group));
-#endif
-
- /*Let the object know their style might change*/
- lv_obj_report_style_mod(NULL);
-
-#else
- uint32_t style_num = sizeof(th->style) / sizeof(lv_style_t *); /*Number of styles in a theme*/
-
- if(!inited) {
- /*Initialize the style pointers `current_theme` to point to the `th_styles` style array */
- uint16_t i;
- lv_style_t ** cur_th_style_p = (lv_style_t **)&current_theme.style;
- for(i = 0; i < style_num; i++) {
- uintptr_t adr = (uintptr_t)&th_styles[i];
- memcpy(&cur_th_style_p[i], &adr, sizeof(lv_style_t *));
- }
- inited = true;
- }
-
- /*Copy the styles pointed by the new theme to the `th_styles` style array*/
- uint16_t i;
- lv_style_t ** th_style = (lv_style_t **)&th->style;
- for(i = 0; i < style_num; i++) {
- uintptr_t s = (uintptr_t)th_style[i];
- if(s) memcpy(&th_styles[i], (void *)s, sizeof(lv_style_t));
- }
-
-#if LV_USE_GROUP
- /*Copy group style modification callback functions*/
- memcpy(&current_theme.group, &th->group, sizeof(th->group));
-#endif
-
- /*Let the object know their style might change*/
- lv_obj_report_style_mod(NULL);
-
-#endif
-
-#if LV_USE_GROUP
- lv_group_report_style_mod(NULL);
-#endif
-}
-
-/**
- * Get the current system theme.
- * @return pointer to the current system theme. NULL if not set.
- */
-lv_theme_t * lv_theme_get_current(void)
-{
-#if LV_THEME_LIVE_UPDATE == 0
- return current_theme;
-#else
- if(!inited)
- return NULL;
- else
- return &current_theme;
-#endif
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
diff --git a/src/libs/lvgl/src/lv_themes/lv_theme.h b/src/libs/lvgl/src/lv_themes/lv_theme.h
deleted file mode 100644
index 28b532c6..00000000
--- a/src/libs/lvgl/src/lv_themes/lv_theme.h
+++ /dev/null
@@ -1,382 +0,0 @@
-/**
- *@file lv_themes.h
- *
- */
-
-#ifndef LV_THEMES_H
-#define LV_THEMES_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#include "../lv_core/lv_style.h"
-#include "../lv_core/lv_group.h"
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**
- * A theme in LittlevGL consists of many styles bound together.
- *
- * There is a style for each object type, as well as a generic style for
- * backgrounds and panels.
- */
-typedef struct
-{
- struct
- {
- lv_style_t * scr;
- lv_style_t * bg;
- lv_style_t * panel;
-
-#if LV_USE_CONT != 0
- lv_style_t * cont;
-#endif
-
-#if LV_USE_BTN != 0
- struct
- {
- lv_style_t * rel;
- lv_style_t * pr;
- lv_style_t * tgl_rel;
- lv_style_t * tgl_pr;
- lv_style_t * ina;
- } btn;
-#endif
-
-#if LV_USE_IMGBTN != 0
- struct
- {
- lv_style_t * rel;
- lv_style_t * pr;
- lv_style_t * tgl_rel;
- lv_style_t * tgl_pr;
- lv_style_t * ina;
- } imgbtn;
-#endif
-
-#if LV_USE_LABEL != 0
- struct
- {
- lv_style_t * prim;
- lv_style_t * sec;
- lv_style_t * hint;
- } label;
-#endif
-
-#if LV_USE_IMG != 0
- struct
- {
- lv_style_t * light;
- lv_style_t * dark;
- } img;
-#endif
-
-#if LV_USE_LINE != 0
- struct
- {
- lv_style_t * decor;
- } line;
-#endif
-
-#if LV_USE_LED != 0
- lv_style_t * led;
-#endif
-
-#if LV_USE_BAR != 0
- struct
- {
- lv_style_t * bg;
- lv_style_t * indic;
- } bar;
-#endif
-
-#if LV_USE_SLIDER != 0
- struct
- {
- lv_style_t * bg;
- lv_style_t * indic;
- lv_style_t * knob;
- } slider;
-#endif
-
-#if LV_USE_LMETER != 0
- lv_style_t * lmeter;
-#endif
-
-#if LV_USE_GAUGE != 0
- lv_style_t * gauge;
-#endif
-
-#if LV_USE_ARC != 0
- lv_style_t * arc;
-#endif
-
-#if LV_USE_PRELOAD != 0
- lv_style_t * preload;
-#endif
-
-#if LV_USE_SW != 0
- struct
- {
- lv_style_t * bg;
- lv_style_t * indic;
- lv_style_t * knob_off;
- lv_style_t * knob_on;
- } sw;
-#endif
-
-#if LV_USE_CHART != 0
- lv_style_t * chart;
-#endif
-
-#if LV_USE_CALENDAR != 0
- struct
- {
- lv_style_t * bg;
- lv_style_t * header;
- lv_style_t * header_pr;
- lv_style_t * day_names;
- lv_style_t * highlighted_days;
- lv_style_t * inactive_days;
- lv_style_t * week_box;
- lv_style_t * today_box;
- } calendar;
-#endif
-
-#if LV_USE_CB != 0
- struct
- {
- lv_style_t * bg;
- struct
- {
- lv_style_t * rel;
- lv_style_t * pr;
- lv_style_t * tgl_rel;
- lv_style_t * tgl_pr;
- lv_style_t * ina;
- } box;
- } cb;
-#endif
-
-#if LV_USE_BTNM != 0
- struct
- {
- lv_style_t * bg;
- struct
- {
- lv_style_t * rel;
- lv_style_t * pr;
- lv_style_t * tgl_rel;
- lv_style_t * tgl_pr;
- lv_style_t * ina;
- } btn;
- } btnm;
-#endif
-
-#if LV_USE_KB != 0
- struct
- {
- lv_style_t * bg;
- struct
- {
- lv_style_t * rel;
- lv_style_t * pr;
- lv_style_t * tgl_rel;
- lv_style_t * tgl_pr;
- lv_style_t * ina;
- } btn;
- } kb;
-#endif
-
-#if LV_USE_MBOX != 0
- struct
- {
- lv_style_t * bg;
- struct
- {
- lv_style_t * bg;
- lv_style_t * rel;
- lv_style_t * pr;
- } btn;
- } mbox;
-#endif
-
-#if LV_USE_PAGE != 0
- struct
- {
- lv_style_t * bg;
- lv_style_t * scrl;
- lv_style_t * sb;
- } page;
-#endif
-
-#if LV_USE_TA != 0
- struct
- {
- lv_style_t * area;
- lv_style_t * oneline;
- lv_style_t * cursor;
- lv_style_t * sb;
- } ta;
-#endif
-
-#if LV_USE_SPINBOX != 0
- struct
- {
- lv_style_t * bg;
- lv_style_t * cursor;
- lv_style_t * sb;
- } spinbox;
-#endif
-
-#if LV_USE_LIST
- struct
- {
- lv_style_t * bg;
- lv_style_t * scrl;
- lv_style_t * sb;
- struct
- {
- lv_style_t * rel;
- lv_style_t * pr;
- lv_style_t * tgl_rel;
- lv_style_t * tgl_pr;
- lv_style_t * ina;
- } btn;
- } list;
-#endif
-
-#if LV_USE_DDLIST != 0
- struct
- {
- lv_style_t * bg;
- lv_style_t * sel;
- lv_style_t * sb;
- } ddlist;
-#endif
-
-#if LV_USE_ROLLER != 0
- struct
- {
- lv_style_t * bg;
- lv_style_t * sel;
- } roller;
-#endif
-
-#if LV_USE_TABVIEW != 0
- struct
- {
- lv_style_t * bg;
- lv_style_t * indic;
- struct
- {
- lv_style_t * bg;
- lv_style_t * rel;
- lv_style_t * pr;
- lv_style_t * tgl_rel;
- lv_style_t * tgl_pr;
- } btn;
- } tabview;
-#endif
-
-#if LV_USE_TILEVIEW != 0
- struct
- {
- lv_style_t * bg;
- lv_style_t * scrl;
- lv_style_t * sb;
- } tileview;
-#endif
-
-#if LV_USE_TABLE != 0
- struct
- {
- lv_style_t * bg;
- lv_style_t * cell;
- } table;
-#endif
-
-#if LV_USE_WIN != 0
- struct
- {
- lv_style_t * bg;
- lv_style_t * sb;
- lv_style_t * header;
- lv_style_t * content;
- struct
- {
- lv_style_t * rel;
- lv_style_t * pr;
- } btn;
- } win;
-#endif
- } style;
-
-#if LV_USE_GROUP
- struct
- {
- /* The `x` in the names inidicates that inconsistence becasue
- * the group related function are stored in the theme.*/
- lv_group_style_mod_cb_t style_mod_xcb;
- lv_group_style_mod_cb_t style_mod_edit_xcb;
- } group;
-#endif
-} lv_theme_t;
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Set a theme for the system.
- * From now, all the created objects will use styles from this theme by default
- * @param th pointer to theme (return value of: 'lv_theme_init_xxx()')
- */
-void lv_theme_set_current(lv_theme_t * th);
-
-/**
- * Get the current system theme.
- * @return pointer to the current system theme. NULL if not set.
- */
-lv_theme_t * lv_theme_get_current(void);
-
-/**********************
- * MACROS
- **********************/
-
-/* Returns number of styles within the `lv_theme_t` structure. */
-#define LV_THEME_STYLE_COUNT (sizeof(((lv_theme_t *)0)->style) / sizeof(lv_style_t *))
-
-/**********************
- * POST INCLUDE
- *********************/
-#include "lv_theme_templ.h"
-#include "lv_theme_default.h"
-#include "lv_theme_alien.h"
-#include "lv_theme_night.h"
-#include "lv_theme_zen.h"
-#include "lv_theme_mono.h"
-#include "lv_theme_nemo.h"
-#include "lv_theme_material.h"
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_THEMES_H*/
diff --git a/src/libs/lvgl/src/lv_themes/lv_theme_alien.c b/src/libs/lvgl/src/lv_themes/lv_theme_alien.c
deleted file mode 100644
index 987a3631..00000000
--- a/src/libs/lvgl/src/lv_themes/lv_theme_alien.c
+++ /dev/null
@@ -1,958 +0,0 @@
-/**
- * @file lv_theme_alien.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_theme.h"
-
-#if LV_USE_THEME_ALIEN
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-
-/**********************
- * STATIC VARIABLES
- **********************/
-
-static uint16_t _hue;
-static lv_font_t * _font;
-
-static lv_theme_t theme;
-static lv_style_t def;
-static lv_style_t bg;
-static lv_style_t scr;
-static lv_style_t panel; /*General fancy background (e.g. to chart or ta)*/
-static lv_style_t sb;
-static lv_style_t btn_rel, btn_pr, btn_trel, btn_tpr, btn_ina;
-
-#if LV_USE_BAR
-static lv_style_t bar_bg, bar_indic;
-#endif
-
-#if LV_USE_SLIDER
-static lv_style_t slider_knob;
-#endif
-
-#if LV_USE_LMETER
-static lv_style_t lmeter_bg;
-#endif
-
-#if LV_USE_DDLIST
-static lv_style_t ddlist_bg, ddlist_sel;
-#endif
-
-#if LV_USE_BTNM
-static lv_style_t btnm_bg, btnm_rel, btnm_pr, btnm_trel, btnm_ina;
-#endif
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-static void basic_init(void)
-{
- /*Default*/
- lv_style_copy(&def, &lv_style_plain);
- def.body.opa = LV_OPA_COVER;
- def.glass = 0;
-
- def.body.main_color = lv_color_hex3(0x222);
- def.body.grad_color = lv_color_hex3(0x222);
- def.body.radius = 0;
- def.body.padding.left = LV_DPI / 8;
- def.body.padding.right = LV_DPI / 8;
- def.body.padding.top = LV_DPI / 8;
- def.body.padding.bottom = LV_DPI / 8;
- def.body.padding.inner = LV_DPI / 8;
- def.body.border.color = LV_COLOR_SILVER;
- def.body.border.width = 1;
- def.body.border.opa = LV_OPA_COVER;
- def.body.shadow.color = LV_COLOR_SILVER;
- def.body.shadow.width = 0;
- def.body.shadow.type = LV_SHADOW_FULL;
-
- def.text.color = lv_color_hex3(0xDDD);
- def.text.font = _font;
- def.text.letter_space = 1;
- def.text.line_space = 2;
-
- def.image.color = lv_color_hex3(0xDDD);
- def.image.intense = LV_OPA_TRANSP;
-
- def.line.color = lv_color_hex3(0xDDD);
- def.line.width = 1;
-
- /*Background*/
- lv_style_copy(&bg, &def);
- bg.body.main_color = lv_color_hex3(0x333);
- bg.body.grad_color = lv_color_hex3(0x333);
- bg.body.border.width = 2;
- bg.body.border.color = lv_color_hex3(0x666);
- bg.body.shadow.color = LV_COLOR_SILVER;
-
- lv_style_copy(&scr, &bg);
- scr.body.padding.bottom = 0;
- scr.body.padding.top = 0;
- scr.body.padding.left = 0;
- scr.body.padding.right = 0;
-
- /*Panel*/
- lv_style_copy(&panel, &def);
- panel.body.radius = LV_DPI / 10;
- panel.body.main_color = lv_color_hex3(0x666);
- panel.body.grad_color = lv_color_hex3(0x666);
- panel.body.border.color = lv_color_hex3(0xccc);
- panel.body.border.width = 2;
- panel.body.border.opa = LV_OPA_60;
- panel.text.color = lv_color_hsv_to_rgb(_hue, 8, 96);
- panel.image.color = lv_color_hsv_to_rgb(_hue, 8, 96);
- panel.line.color = lv_color_hsv_to_rgb(_hue, 20, 70);
-
- /*Scrollbar*/
- lv_style_copy(&sb, &def);
- sb.body.opa = LV_OPA_50;
- sb.body.radius = LV_RADIUS_CIRCLE;
- sb.body.border.color = LV_COLOR_SILVER;
- sb.body.border.opa = LV_OPA_40;
- sb.body.border.width = 1;
- sb.body.main_color = lv_color_hsv_to_rgb(_hue, 33, 92);
- sb.body.grad_color = lv_color_hsv_to_rgb(_hue, 33, 92);
- sb.body.padding.left = 1;
- sb.body.padding.right = 1;
- sb.body.padding.top = 1;
- sb.body.padding.bottom = 1;
- sb.body.padding.inner = LV_DPI / 15; /*Scrollbar width*/
-
- theme.style.bg = &bg;
- theme.style.scr = &scr;
- theme.style.panel = &panel;
-}
-
-static void cont_init(void)
-{
-#if LV_USE_CONT != 0
- theme.style.cont = &panel;
-#endif
-}
-
-static void btn_init(void)
-{
-#if LV_USE_BTN != 0
- lv_style_copy(&btn_rel, &def);
- btn_rel.glass = 0;
- btn_rel.body.opa = LV_OPA_TRANSP;
- btn_rel.body.radius = LV_RADIUS_CIRCLE;
- btn_rel.body.border.width = 2;
- btn_rel.body.border.color = lv_color_hsv_to_rgb(_hue, 70, 90);
- btn_rel.body.border.opa = LV_OPA_80;
- btn_rel.body.padding.left = LV_DPI / 4;
- btn_rel.body.padding.right = LV_DPI / 4;
- btn_rel.body.padding.top = LV_DPI / 6;
- btn_rel.body.padding.bottom = LV_DPI / 6;
- btn_rel.body.padding.inner = LV_DPI / 10;
- btn_rel.text.color = lv_color_hsv_to_rgb(_hue, 8, 96);
- btn_rel.text.font = _font;
- btn_rel.image.color = lv_color_hsv_to_rgb(_hue, 8, 96);
-
- lv_style_copy(&btn_pr, &btn_rel);
- btn_pr.body.opa = LV_OPA_COVER;
- btn_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 50, 50);
- btn_pr.body.grad_color = lv_color_hsv_to_rgb(_hue, 50, 50);
- btn_pr.body.border.opa = LV_OPA_60;
- btn_pr.text.font = _font;
- btn_pr.text.color = lv_color_hsv_to_rgb(_hue, 10, 100);
- btn_pr.image.color = lv_color_hsv_to_rgb(_hue, 10, 100);
-
- lv_style_copy(&btn_trel, &btn_pr);
- btn_trel.body.opa = LV_OPA_COVER;
- btn_trel.body.main_color = lv_color_hsv_to_rgb(_hue, 50, 60);
- btn_trel.body.grad_color = lv_color_hsv_to_rgb(_hue, 50, 60);
- btn_trel.body.border.opa = LV_OPA_60;
- btn_trel.body.border.color = lv_color_hsv_to_rgb(_hue, 80, 90);
- btn_trel.text.font = _font;
- btn_trel.text.color = lv_color_hsv_to_rgb(_hue, 0, 100);
- btn_trel.image.color = lv_color_hsv_to_rgb(_hue, 0, 100);
-
- lv_style_copy(&btn_tpr, &btn_trel);
- btn_tpr.body.opa = LV_OPA_COVER;
- btn_tpr.body.main_color = lv_color_hsv_to_rgb(_hue, 50, 50);
- btn_tpr.body.grad_color = lv_color_hsv_to_rgb(_hue, 50, 50);
- btn_tpr.body.border.opa = LV_OPA_60;
- btn_tpr.body.border.color = lv_color_hsv_to_rgb(_hue, 80, 70);
- btn_tpr.text.font = _font;
- btn_tpr.text.color = lv_color_hsv_to_rgb(_hue, 10, 90);
- btn_tpr.image.color = lv_color_hsv_to_rgb(_hue, 10, 90);
-
- lv_style_copy(&btn_ina, &btn_rel);
- btn_ina.body.border.opa = LV_OPA_60;
- btn_ina.body.border.color = lv_color_hsv_to_rgb(_hue, 10, 50);
- btn_ina.text.font = _font;
- btn_ina.text.color = lv_color_hsv_to_rgb(_hue, 10, 90);
-
- theme.style.btn.rel = &btn_rel;
- theme.style.btn.pr = &btn_pr;
- theme.style.btn.tgl_rel = &btn_trel;
- theme.style.btn.tgl_pr = &btn_tpr;
- theme.style.btn.ina = &btn_ina;
-#endif
-}
-
-static void label_init(void)
-{
-#if LV_USE_LABEL != 0
- static lv_style_t label_prim, label_sec, label_hint;
-
- lv_style_copy(&label_prim, &def);
- label_prim.text.font = _font;
- label_prim.text.color = lv_color_hsv_to_rgb(_hue, 80, 96);
-
- lv_style_copy(&label_sec, &label_prim);
- label_sec.text.color = lv_color_hsv_to_rgb(_hue, 40, 85);
-
- lv_style_copy(&label_hint, &label_prim);
- label_hint.text.color = lv_color_hsv_to_rgb(_hue, 20, 70);
-
- theme.style.label.prim = &label_prim;
- theme.style.label.sec = &label_sec;
- theme.style.label.hint = &label_hint;
-#endif
-}
-
-static void bar_init(void)
-{
-#if LV_USE_BAR
- lv_style_copy(&bar_bg, &def);
- bar_bg.body.opa = LV_OPA_30;
- bar_bg.body.radius = LV_RADIUS_CIRCLE;
- bar_bg.body.main_color = LV_COLOR_WHITE;
- bar_bg.body.grad_color = LV_COLOR_SILVER;
- bar_bg.body.border.width = 2;
- bar_bg.body.border.color = LV_COLOR_SILVER;
- bar_bg.body.border.opa = LV_OPA_20;
- bar_bg.body.padding.left = 0;
- bar_bg.body.padding.right = 0;
- bar_bg.body.padding.top = LV_DPI / 10;
- bar_bg.body.padding.bottom = LV_DPI / 10;
- bar_bg.body.padding.inner = 0;
-
- lv_style_copy(&bar_indic, &def);
- bar_indic.body.radius = LV_RADIUS_CIRCLE;
- bar_indic.body.border.width = 2;
- bar_indic.body.border.color = LV_COLOR_SILVER;
- bar_indic.body.border.opa = LV_OPA_70;
- bar_indic.body.padding.left = 0;
- bar_indic.body.padding.right = 0;
- bar_indic.body.padding.top = 0;
- bar_indic.body.padding.bottom = 0;
- bar_indic.body.shadow.width = LV_DPI / 20;
- bar_indic.body.shadow.color = lv_color_hsv_to_rgb(_hue, 20, 90);
- bar_indic.body.main_color = lv_color_hsv_to_rgb(_hue, 40, 80);
- bar_indic.body.grad_color = lv_color_hsv_to_rgb(_hue, 40, 80);
-
- theme.style.bar.bg = &bar_bg;
- theme.style.bar.indic = &bar_indic;
-#endif
-}
-
-static void img_init(void)
-{
-#if LV_USE_IMG != 0
- static lv_style_t img_light, img_dark;
- lv_style_copy(&img_light, &def);
- img_light.image.color = lv_color_hsv_to_rgb(_hue, 15, 85);
- img_light.image.intense = LV_OPA_80;
-
- lv_style_copy(&img_dark, &def);
- img_light.image.color = lv_color_hsv_to_rgb(_hue, 85, 65);
- img_light.image.intense = LV_OPA_80;
-
- theme.style.img.light = &img_light;
- theme.style.img.dark = &img_dark;
-#endif
-}
-
-static void line_init(void)
-{
-#if LV_USE_LINE != 0
- static lv_style_t line_decor;
- lv_style_copy(&line_decor, &def);
- line_decor.line.color = lv_color_hsv_to_rgb(_hue, 50, 50);
- line_decor.line.width = 1;
-
- theme.style.line.decor = &line_decor;
-#endif
-}
-
-static void led_init(void)
-{
-#if LV_USE_LED != 0
- static lv_style_t led;
- lv_style_copy(&led, &lv_style_pretty_color);
- led.body.shadow.width = LV_DPI / 10;
- led.body.radius = LV_RADIUS_CIRCLE;
- led.body.border.width = LV_DPI / 30;
- led.body.border.opa = LV_OPA_30;
- led.body.main_color = lv_color_hsv_to_rgb(_hue, 100, 100);
- led.body.grad_color = lv_color_hsv_to_rgb(_hue, 100, 40);
- led.body.border.color = lv_color_hsv_to_rgb(_hue, 60, 60);
- led.body.shadow.color = lv_color_hsv_to_rgb(_hue, 100, 100);
-
- theme.style.led = &led;
-#endif
-}
-
-static void slider_init(void)
-{
-#if LV_USE_SLIDER != 0
- lv_style_copy(&slider_knob, &def);
- slider_knob.body.opa = LV_OPA_60;
- slider_knob.body.radius = LV_RADIUS_CIRCLE;
- slider_knob.body.main_color = LV_COLOR_WHITE;
- slider_knob.body.grad_color = LV_COLOR_SILVER;
- slider_knob.body.border.width = 1;
- slider_knob.body.border.color = LV_COLOR_GRAY;
- slider_knob.body.border.opa = LV_OPA_50;
-
- theme.style.slider.bg = &bar_bg;
- theme.style.slider.indic = &bar_indic;
- theme.style.slider.knob = &slider_knob;
-#endif
-}
-
-static void sw_init(void)
-{
-#if LV_USE_SW != 0
- static lv_style_t sw_bg, sw_indic, sw_knob;
- lv_style_copy(&sw_bg, &bar_bg);
- sw_bg.body.opa = LV_OPA_COVER;
- sw_bg.body.padding.left = -2;
- sw_bg.body.padding.right = -2;
- sw_bg.body.padding.top = -2;
- sw_bg.body.padding.bottom = -2;
- sw_bg.body.main_color = lv_color_hex3(0x666);
- sw_bg.body.grad_color = lv_color_hex3(0x999);
- sw_bg.body.border.width = 2;
- sw_bg.body.border.opa = LV_OPA_50;
-
- lv_style_copy(&sw_indic, &bar_indic);
- sw_indic.body.shadow.width = LV_DPI / 20;
- sw_indic.body.padding.left = 0;
- sw_indic.body.padding.right = 0;
- sw_indic.body.padding.top = 0;
- sw_indic.body.padding.bottom = 0;
-
- lv_style_copy(&sw_knob, &slider_knob);
- sw_knob.body.opa = LV_OPA_80;
-
- theme.style.sw.bg = &sw_bg;
- theme.style.sw.indic = &sw_indic;
- theme.style.sw.knob_off = &sw_knob;
- theme.style.sw.knob_on = &sw_knob;
-#endif
-}
-
-static void lmeter_init(void)
-{
-#if LV_USE_LMETER != 0
- lv_style_copy(&lmeter_bg, &def);
- lmeter_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 70);
- lmeter_bg.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 80);
- lmeter_bg.body.padding.left = LV_DPI / 8; /*Scale line length*/
- lmeter_bg.body.padding.right = LV_DPI / 8; /*Scale line length*/
- lmeter_bg.line.color = lv_color_hex3(0x222);
- lmeter_bg.line.width = 2;
-
- theme.style.lmeter = &lmeter_bg;
-
-#endif
-}
-
-static void gauge_init(void)
-{
-#if LV_USE_GAUGE != 0
- static lv_style_t gauge_bg;
- lv_style_copy(&gauge_bg, &def);
- gauge_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 70);
- gauge_bg.body.grad_color = gauge_bg.body.main_color;
- gauge_bg.body.padding.left = LV_DPI / 16; /*Scale line length*/
- gauge_bg.body.padding.right = LV_DPI / 16; /*Scale line length*/
- gauge_bg.body.padding.top = LV_DPI / 10; /*Needle center size*/
- gauge_bg.body.padding.bottom = LV_DPI / 10; /*Needle center size*/
- gauge_bg.body.padding.inner = LV_DPI / 12; /*Label - scale distance*/
- gauge_bg.body.border.color = lv_color_hex3(0x777);
- gauge_bg.line.color = lv_color_hsv_to_rgb(_hue, 80, 75);
- gauge_bg.line.width = 2;
- gauge_bg.text.color = lv_color_hsv_to_rgb(_hue, 10, 90);
- gauge_bg.text.font = _font;
-
- theme.style.gauge = &gauge_bg;
-#endif
-}
-
-static void arc_init(void)
-{
-#if LV_USE_ARC != 0
-
- static lv_style_t arc;
- lv_style_copy(&arc, &def);
- arc.line.width = 8;
- arc.line.color = lv_color_hsv_to_rgb(_hue, 70, 90);
- arc.line.rounded = 1;
-
- /*For preloader*/
- arc.body.border.width = 2;
- arc.body.border.color = lv_color_hex3(0x555);
- arc.body.padding.left = 3;
- arc.body.padding.right = 3;
- arc.body.padding.top = 3;
- arc.body.padding.bottom = 3;
-
- theme.style.arc = &arc;
-#endif
-}
-
-static void preload_init(void)
-{
-#if LV_USE_PRELOAD != 0
-
- theme.style.preload = theme.style.arc;
-#endif
-}
-
-static void chart_init(void)
-{
-#if LV_USE_CHART
- theme.style.chart = &panel;
-#endif
-}
-
-static void calendar_init(void)
-{
-#if LV_USE_CALENDAR
- static lv_style_t header;
- static lv_style_t color_text;
- static lv_style_t gray_text;
- static lv_style_t today_box;
-
- lv_style_copy(&header, &def);
- header.body.radius = 0;
- header.body.padding.left = LV_DPI / 12;
- header.body.padding.right = LV_DPI / 12;
- header.body.padding.top = LV_DPI / 14;
- header.body.padding.bottom = LV_DPI / 14;
- header.body.main_color = lv_color_hsv_to_rgb(_hue, 30, 60);
- header.body.grad_color = header.body.main_color;
- header.body.border.opa = panel.body.border.opa;
- header.body.border.width = panel.body.border.width;
- header.body.border.color = lv_color_hsv_to_rgb(_hue, 20, 80);
- header.text.color = lv_color_hsv_to_rgb(_hue, 5, 100);
-
- lv_style_copy(&today_box, &header);
- today_box.body.main_color = lv_color_hsv_to_rgb(_hue, 40, 70);
- today_box.body.grad_color = today_box.body.main_color;
- today_box.body.opa = LV_OPA_TRANSP;
-
- lv_style_copy(&color_text, &def);
- color_text.text.color = lv_color_hsv_to_rgb(_hue, 30, 80);
-
- lv_style_copy(&gray_text, &def);
- gray_text.text.color = lv_color_hsv_to_rgb(_hue, 10, 65);
-
- theme.style.calendar.bg = &panel;
- theme.style.calendar.header = &header;
- theme.style.calendar.week_box = &header;
- theme.style.calendar.today_box = &today_box;
- theme.style.calendar.day_names = &color_text;
- theme.style.calendar.highlighted_days = &color_text;
- theme.style.calendar.inactive_days = &gray_text;
-#endif
-}
-
-static void cb_init(void)
-{
-#if LV_USE_CB != 0
- static lv_style_t cb_bg, cb_rel, cb_pr, cb_trel, cb_tpr, cb_ina;
- lv_style_copy(&cb_rel, &bg);
- cb_rel.body.radius = LV_DPI / 20;
- cb_rel.body.border.width = 1;
- cb_rel.body.border.color = LV_COLOR_GRAY;
- cb_rel.body.main_color = LV_COLOR_WHITE;
- cb_rel.body.grad_color = LV_COLOR_SILVER;
-
- lv_style_copy(&cb_bg, &bg);
- cb_bg.body.opa = LV_OPA_TRANSP;
- cb_bg.body.border.width = 0;
- cb_bg.body.padding.inner = LV_DPI / 8;
- cb_bg.body.padding.left = 0;
- cb_bg.body.padding.right = 0;
- cb_bg.body.padding.top = 0;
- cb_bg.body.padding.bottom = 0;
- cb_bg.text.font = _font;
-
- lv_style_copy(&cb_pr, &cb_rel);
- cb_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 90);
- cb_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 82);
-
- lv_style_copy(&cb_trel, &cb_rel);
- cb_trel.body.border.width = 4;
- cb_trel.body.border.color = LV_COLOR_WHITE;
- cb_trel.body.border.opa = LV_OPA_60;
- cb_trel.body.main_color = lv_color_hsv_to_rgb(_hue, 50, 82);
- cb_trel.body.grad_color = lv_color_hsv_to_rgb(_hue, 50, 62);
-
- lv_style_copy(&cb_tpr, &cb_trel);
- cb_tpr.body.border.color = LV_COLOR_SILVER;
- cb_tpr.body.border.opa = LV_OPA_70;
- cb_tpr.body.main_color = lv_color_hsv_to_rgb(_hue, 50, 72);
- cb_tpr.body.grad_color = lv_color_hsv_to_rgb(_hue, 50, 52);
-
- lv_style_copy(&cb_ina, &cb_trel);
- cb_ina.body.border.width = 1;
- cb_ina.body.border.color = LV_COLOR_GRAY;
- cb_ina.body.main_color = LV_COLOR_SILVER;
- cb_ina.body.grad_color = LV_COLOR_SILVER;
-
- theme.style.cb.bg = &cb_bg;
- theme.style.cb.box.rel = &cb_rel;
- theme.style.cb.box.pr = &cb_pr;
- theme.style.cb.box.tgl_rel = &cb_trel;
- theme.style.cb.box.tgl_pr = &cb_tpr;
- theme.style.cb.box.ina = &cb_ina;
-#endif
-}
-
-static void btnm_init(void)
-{
-#if LV_USE_BTNM
- lv_style_copy(&btnm_bg, &lv_style_transp_tight);
- btnm_bg.body.border.width = 1;
- btnm_bg.body.border.color = lv_color_hsv_to_rgb(_hue, 60, 80);
- btnm_bg.body.border.opa = LV_OPA_COVER;
- btnm_bg.body.radius = LV_DPI / 8;
-
- lv_style_copy(&btnm_rel, &lv_style_plain);
- btnm_rel.body.opa = LV_OPA_TRANSP;
- btnm_rel.body.radius = LV_DPI / 8;
- btnm_rel.text.color = lv_color_hsv_to_rgb(_hue, 60, 80);
- btnm_rel.text.font = _font;
-
- lv_style_copy(&btnm_pr, &lv_style_plain);
- btnm_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 40, 70);
- btnm_pr.body.grad_color = lv_color_hsv_to_rgb(_hue, 40, 70);
- btnm_pr.body.radius = LV_DPI / 8;
- btnm_pr.text.color = lv_color_hsv_to_rgb(_hue, 40, 40);
- btnm_pr.text.font = _font;
-
- lv_style_copy(&btnm_trel, &btnm_rel);
- btnm_trel.body.border.color = lv_color_hsv_to_rgb(_hue, 80, 80);
- btnm_trel.body.border.width = 3;
-
- lv_style_copy(&btnm_ina, &btnm_rel);
- btnm_ina.text.color = lv_color_hsv_to_rgb(_hue, 10, 60);
-
- theme.style.btnm.bg = &btnm_bg;
- theme.style.btnm.btn.rel = &btnm_rel;
- theme.style.btnm.btn.pr = &btnm_pr;
- theme.style.btnm.btn.tgl_rel = &btnm_trel;
- theme.style.btnm.btn.tgl_pr = &btnm_pr;
- theme.style.btnm.btn.ina = &btnm_ina;
-#endif
-}
-
-static void kb_init(void)
-{
-#if LV_USE_KB
- theme.style.kb.bg = &btnm_bg;
- theme.style.kb.btn.rel = &btnm_rel;
- theme.style.kb.btn.pr = &btnm_pr;
- theme.style.kb.btn.tgl_rel = &btnm_trel;
- theme.style.kb.btn.tgl_pr = &btnm_pr;
- theme.style.kb.btn.ina = &btnm_ina;
-#endif
-}
-
-static void mbox_init(void)
-{
-#if LV_USE_MBOX
- static lv_style_t mbox_bg;
- lv_style_copy(&mbox_bg, &panel);
- mbox_bg.body.shadow.width = LV_DPI / 12;
-
- theme.style.mbox.bg = &mbox_bg;
- theme.style.mbox.btn.bg = &lv_style_transp;
- theme.style.mbox.btn.rel = &btn_trel;
- theme.style.mbox.btn.pr = &btn_tpr;
-#endif
-}
-
-static void page_init(void)
-{
-#if LV_USE_PAGE
- theme.style.page.bg = &panel;
- theme.style.page.scrl = &lv_style_transp_fit;
- theme.style.page.sb = &sb;
-#endif
-}
-
-static void ta_init(void)
-{
-#if LV_USE_TA
- theme.style.ta.area = &panel;
- theme.style.ta.oneline = &panel;
- theme.style.ta.cursor = NULL;
- theme.style.ta.sb = &sb;
-#endif
-}
-
-static void spinbox_init(void)
-{
-#if LV_USE_SPINBOX
- theme.style.spinbox.bg = &panel;
- theme.style.spinbox.cursor = theme.style.ta.cursor;
- theme.style.spinbox.sb = theme.style.ta.sb;
-#endif
-}
-
-static void list_init(void)
-{
-#if LV_USE_LIST != 0
- static lv_style_t list_bg, list_rel, list_pr, list_trel, list_tpr, list_ina;
- lv_style_copy(&list_rel, &def);
- list_rel.body.opa = LV_OPA_TRANSP;
- list_rel.body.border.width = 1;
- list_rel.body.border.color = lv_color_hsv_to_rgb(_hue, 50, 85);
- list_rel.body.border.opa = LV_OPA_COVER;
- list_rel.text.color = lv_color_hsv_to_rgb(_hue, 10, 94);
- list_rel.text.font = _font;
- list_rel.image.color = lv_color_hsv_to_rgb(_hue, 10, 94);
-
- lv_style_copy(&list_pr, &list_rel);
- list_pr.body.opa = LV_OPA_COVER;
- list_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 34, 41);
- list_pr.body.grad_color = lv_color_hsv_to_rgb(_hue, 34, 41);
- list_pr.text.color = lv_color_hsv_to_rgb(_hue, 7, 96);
- list_pr.image.color = lv_color_hsv_to_rgb(_hue, 7, 96);
-
- lv_style_copy(&list_trel, &list_rel);
- lv_style_copy(&list_tpr, &list_pr);
- lv_style_copy(&list_ina, &def);
-
- lv_style_copy(&list_bg, &list_rel);
- list_bg.body.padding.left = 0;
- list_bg.body.padding.right = 0;
- list_bg.body.padding.top = 0;
- list_bg.body.padding.bottom = 0;
-
- theme.style.list.sb = &sb;
- theme.style.list.bg = &list_bg;
- theme.style.list.scrl = &lv_style_transp_tight;
- theme.style.list.btn.rel = &list_rel;
- theme.style.list.btn.pr = &list_pr;
- theme.style.list.btn.tgl_rel = &list_trel;
- theme.style.list.btn.tgl_pr = &list_tpr;
- theme.style.list.btn.ina = &list_ina;
-#endif
-}
-
-static void ddlist_init(void)
-{
-#if LV_USE_DDLIST != 0
- lv_style_copy(&ddlist_bg, &panel);
- ddlist_bg.text.line_space = LV_DPI / 8;
- ddlist_bg.body.padding.left = LV_DPI / 6;
- ddlist_bg.body.padding.right = LV_DPI / 6;
- ddlist_bg.body.padding.top = LV_DPI / 6;
- ddlist_bg.body.padding.bottom = LV_DPI / 6;
-
- lv_style_copy(&ddlist_sel, &panel);
- ddlist_sel.body.main_color = lv_color_hsv_to_rgb(_hue, 45, 70);
- ddlist_sel.body.grad_color = lv_color_hsv_to_rgb(_hue, 45, 70);
- ddlist_sel.body.opa = LV_OPA_COVER;
- ddlist_sel.body.radius = 0;
-
- theme.style.ddlist.bg = &ddlist_bg;
- theme.style.ddlist.sel = &ddlist_sel;
- theme.style.ddlist.sb = &sb;
-#endif
-}
-
-static void roller_init(void)
-{
-#if LV_USE_ROLLER != 0
- static lv_style_t roller_bg, roller_sel;
- lv_style_copy(&roller_bg, &ddlist_bg);
- roller_bg.text.line_space = LV_DPI / 6;
- roller_bg.body.radius = LV_DPI / 20;
- roller_bg.body.main_color = lv_color_hex3(0x222);
- roller_bg.body.grad_color = lv_color_hex3(0x666);
- roller_bg.body.border.opa = LV_OPA_30;
- roller_bg.text.opa = LV_OPA_70;
- roller_bg.text.color = lv_color_hsv_to_rgb(_hue, 20, 70);
- roller_bg.body.shadow.width = 0;
-
- lv_style_copy(&roller_sel, &panel);
- roller_sel.body.opa = LV_OPA_TRANSP;
- roller_sel.body.radius = 0;
- roller_sel.text.opa = LV_OPA_COVER;
- roller_sel.text.color = lv_color_hsv_to_rgb(_hue, 70, 95);
-
- theme.style.roller.bg = &roller_bg;
- theme.style.roller.sel = &roller_sel;
-#endif
-}
-
-static void tabview_init(void)
-{
-#if LV_USE_TABVIEW != 0
- static lv_style_t tab_rel, tab_pr, tab_trel, tab_tpr, tab_indic;
- lv_style_copy(&tab_rel, &def);
- tab_rel.body.main_color = lv_color_hex3(0x666);
- tab_rel.body.grad_color = lv_color_hex3(0x666);
- tab_rel.body.padding.left = 0;
- tab_rel.body.padding.right = 0;
- tab_rel.body.padding.top = LV_DPI / 6;
- tab_rel.body.padding.bottom = LV_DPI / 6;
- tab_rel.body.padding.inner = 0;
- tab_rel.body.border.width = 1;
- tab_rel.body.border.color = LV_COLOR_SILVER;
- tab_rel.body.border.opa = LV_OPA_40;
- tab_rel.text.color = lv_color_hex3(0xDDD);
- tab_rel.text.font = _font;
-
- lv_style_copy(&tab_pr, &tab_rel);
- tab_pr.body.main_color = lv_color_hex3(0x444);
- tab_pr.body.grad_color = lv_color_hex3(0x444);
-
- lv_style_copy(&tab_trel, &def);
- tab_trel.body.opa = LV_OPA_TRANSP;
- tab_trel.body.padding.left = 0;
- tab_trel.body.padding.right = 0;
- tab_trel.body.padding.top = LV_DPI / 6;
- tab_trel.body.padding.bottom = LV_DPI / 6;
- tab_trel.body.padding.inner = 0;
- tab_trel.body.border.width = 1;
- tab_trel.body.border.color = LV_COLOR_SILVER;
- tab_trel.body.border.opa = LV_OPA_40;
- tab_trel.text.color = lv_color_hsv_to_rgb(_hue, 10, 94);
- tab_trel.text.font = _font;
-
- lv_style_copy(&tab_tpr, &def);
- tab_tpr.body.main_color = LV_COLOR_GRAY;
- tab_tpr.body.grad_color = LV_COLOR_GRAY;
- tab_tpr.body.padding.left = 0;
- tab_tpr.body.padding.right = 0;
- tab_tpr.body.padding.top = LV_DPI / 6;
- tab_tpr.body.padding.bottom = LV_DPI / 6;
- tab_tpr.body.padding.inner = 0;
- tab_tpr.body.border.width = 1;
- tab_tpr.body.border.color = LV_COLOR_SILVER;
- tab_tpr.body.border.opa = LV_OPA_40;
- tab_tpr.text.color = lv_color_hsv_to_rgb(_hue, 10, 94);
- tab_tpr.text.font = _font;
-
- lv_style_copy(&tab_indic, &def);
- tab_indic.body.border.width = 0;
- tab_indic.body.main_color = lv_color_hsv_to_rgb(_hue, 80, 87);
- tab_indic.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 87);
- tab_indic.body.padding.inner = LV_DPI / 10; /*Indicator height*/
-
- theme.style.tabview.bg = &bg;
- theme.style.tabview.indic = &tab_indic;
- theme.style.tabview.btn.bg = &lv_style_transp_tight;
- theme.style.tabview.btn.rel = &tab_rel;
- theme.style.tabview.btn.pr = &tab_pr;
- theme.style.tabview.btn.tgl_rel = &tab_trel;
- theme.style.tabview.btn.tgl_pr = &tab_tpr;
-#endif
-}
-
-static void tileview_init(void)
-{
-#if LV_USE_TILEVIEW != 0
- theme.style.tileview.bg = &lv_style_transp_tight;
- theme.style.tileview.scrl = &lv_style_transp_tight;
- theme.style.tileview.sb = theme.style.page.sb;
-#endif
-}
-
-static void table_init(void)
-{
-#if LV_USE_TABLE != 0
- static lv_style_t cell;
- lv_style_copy(&cell, &panel);
- cell.body.radius = 0;
- cell.body.border.width = 1;
- cell.body.padding.left = LV_DPI / 12;
- cell.body.padding.right = LV_DPI / 12;
- cell.body.padding.top = LV_DPI / 12;
- cell.body.padding.bottom = LV_DPI / 12;
-
- theme.style.table.bg = &lv_style_transp_tight;
- theme.style.table.cell = &cell;
-#endif
-}
-
-static void win_init(void)
-{
-#if LV_USE_WIN != 0
- static lv_style_t header;
-
- lv_style_copy(&header, &def);
- header.body.radius = 0;
- header.body.padding.left = LV_DPI / 12;
- header.body.padding.right = LV_DPI / 12;
- header.body.padding.top = LV_DPI / 20;
- header.body.padding.bottom = LV_DPI / 20;
- header.body.main_color = lv_color_hsv_to_rgb(_hue, 30, 60);
- header.body.grad_color = header.body.main_color;
- header.body.border.opa = panel.body.border.opa;
- header.body.border.width = panel.body.border.width;
- header.body.border.color = lv_color_hsv_to_rgb(_hue, 20, 80);
- header.body.border.part = LV_BORDER_BOTTOM;
- header.text.color = lv_color_hsv_to_rgb(_hue, 5, 100);
- header.image.color = lv_color_hsv_to_rgb(_hue, 5, 100);
-
- theme.style.win.bg = &bg;
- theme.style.win.sb = &sb;
- theme.style.win.header = &header;
- theme.style.win.content = &lv_style_transp;
- theme.style.win.btn.rel = &btn_rel;
- theme.style.win.btn.pr = &btn_pr;
-#endif
-}
-
-#if LV_USE_GROUP
-
-static void style_mod(lv_group_t * group, lv_style_t * style)
-{
- (void)group; /*Unused*/
-#if LV_COLOR_DEPTH != 1
- /*Make the style to be a little bit orange*/
- style->body.border.opa = LV_OPA_COVER;
- style->body.border.color = lv_color_hsv_to_rgb(_hue, 70, 90);
-#else
- style->body.border.opa = LV_OPA_COVER;
- style->body.border.color = LV_COLOR_BLACK;
- style->body.border.width = 2;
-#endif
-}
-
-static void style_mod_edit(lv_group_t * group, lv_style_t * style)
-{
- (void)group; /*Unused*/
-#if LV_COLOR_DEPTH != 1
- /*Make the style to be a little bit orange*/
- style->body.border.opa = LV_OPA_COVER;
- style->body.border.color = LV_COLOR_GREEN;
-
- /*If not empty or has border then emphasis the border*/
- if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20;
-
- style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70);
- style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70);
- style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_GREEN, LV_OPA_60);
-
- style->text.color = lv_color_mix(style->text.color, LV_COLOR_GREEN, LV_OPA_70);
-#else
- style->body.border.opa = LV_OPA_COVER;
- style->body.border.color = LV_COLOR_BLACK;
- style->body.border.width = 3;
-#endif
-}
-
-#endif /*LV_USE_GROUP*/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Initialize the alien theme
- * @param hue [0..360] hue value from HSV color space to define the theme's base color
- * @param font pointer to a font (NULL to use the default)
- * @return pointer to the initialized theme
- */
-lv_theme_t * lv_theme_alien_init(uint16_t hue, lv_font_t * font)
-{
- if(font == NULL) font = LV_FONT_DEFAULT;
-
- _hue = hue;
- _font = font;
-
- /*For backward compatibility initialize all theme elements with a default style */
- uint16_t i;
- lv_style_t ** style_p = (lv_style_t **)&theme.style;
- for(i = 0; i < LV_THEME_STYLE_COUNT; i++) {
- *style_p = &def;
- style_p++;
- }
-
- basic_init();
- cont_init();
- btn_init();
- label_init();
- bar_init();
- img_init();
- line_init();
- led_init();
- slider_init();
- sw_init();
- lmeter_init();
- gauge_init();
- arc_init();
- preload_init();
- chart_init();
- calendar_init();
- cb_init();
- btnm_init();
- kb_init();
- mbox_init();
- page_init();
- ta_init();
- spinbox_init();
- list_init();
- ddlist_init();
- roller_init();
- tabview_init();
- tileview_init();
- table_init();
- win_init();
-
-#if LV_USE_GROUP
- theme.group.style_mod_xcb = style_mod;
- theme.group.style_mod_edit_xcb = style_mod_edit;
-#endif
-
- return &theme;
-}
-
-/**
- * Get a pointer to the theme
- * @return pointer to the theme
- */
-lv_theme_t * lv_theme_get_alien(void)
-{
- return &theme;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-#endif
diff --git a/src/libs/lvgl/src/lv_themes/lv_theme_alien.h b/src/libs/lvgl/src/lv_themes/lv_theme_alien.h
deleted file mode 100644
index a3d5851f..00000000
--- a/src/libs/lvgl/src/lv_themes/lv_theme_alien.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * @file lv_theme_alien.h
- *
- */
-
-#ifndef LV_THEME_ALIEN_H
-#define LV_THEME_ALIEN_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_THEME_ALIEN
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Initialize the alien theme
- * @param hue [0..360] hue value from HSV color space to define the theme's base color
- * @param font pointer to a font (NULL to use the default)
- * @return pointer to the initialized theme
- */
-lv_theme_t * lv_theme_alien_init(uint16_t hue, lv_font_t * font);
-/**
- * Get a pointer to the theme
- * @return pointer to the theme
- */
-lv_theme_t * lv_theme_get_alien(void);
-
-/**********************
- * MACROS
- **********************/
-
-#endif
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_THEME_ALIEN_H*/
diff --git a/src/libs/lvgl/src/lv_themes/lv_theme_default.c b/src/libs/lvgl/src/lv_themes/lv_theme_default.c
deleted file mode 100644
index 7a7c2311..00000000
--- a/src/libs/lvgl/src/lv_themes/lv_theme_default.c
+++ /dev/null
@@ -1,477 +0,0 @@
-/**
- * @file lv_theme_default.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_theme.h"
-
-#if LV_USE_THEME_DEFAULT
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_theme_t theme;
-static lv_style_t def;
-static lv_style_t scr;
-
-/*Static style definitions*/
-static lv_style_t sb;
-static lv_style_t plain_bordered;
-static lv_style_t label_prim;
-static lv_style_t label_sec;
-static lv_style_t label_hint;
-
-/*Saved input parameters*/
-static uint16_t _hue;
-static lv_font_t * _font;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-static void basic_init(void)
-{
- lv_style_copy(&def, &lv_style_pretty); /*Initialize the default style*/
-
- lv_style_copy(&scr, &def);
- scr.body.padding.bottom = 0;
- scr.body.padding.top = 0;
- scr.body.padding.left = 0;
- scr.body.padding.right = 0;
-
- lv_style_copy(&sb, &lv_style_pretty_color);
- sb.body.grad_color = sb.body.main_color;
- sb.body.padding.right = sb.body.padding.right / 2; /*Make closer to the edges*/
- sb.body.padding.bottom = sb.body.padding.bottom / 2;
-
- lv_style_copy(&plain_bordered, &lv_style_plain);
- plain_bordered.body.border.width = 2;
- plain_bordered.body.border.color = lv_color_hex3(0xbbb);
-
- theme.style.bg = &lv_style_plain;
- theme.style.scr = &scr;
- theme.style.panel = &lv_style_pretty;
-}
-
-static void btn_init(void)
-{
-#if LV_USE_BTN != 0
- theme.style.btn.rel = &lv_style_btn_rel;
- theme.style.btn.pr = &lv_style_btn_pr;
- theme.style.btn.tgl_rel = &lv_style_btn_tgl_rel;
- theme.style.btn.tgl_pr = &lv_style_btn_tgl_pr;
- theme.style.btn.ina = &lv_style_btn_ina;
-#endif
-}
-
-static void label_init(void)
-{
-#if LV_USE_LABEL != 0
-
- lv_style_copy(&label_prim, &lv_style_plain);
- lv_style_copy(&label_sec, &lv_style_plain);
- lv_style_copy(&label_hint, &lv_style_plain);
-
- label_prim.text.color = lv_color_hex3(0x111);
- label_sec.text.color = lv_color_hex3(0x888);
- label_hint.text.color = lv_color_hex3(0xaaa);
-
- theme.style.label.prim = &label_prim;
- theme.style.label.sec = &label_sec;
- theme.style.label.hint = &label_hint;
-#endif
-}
-
-static void img_init(void)
-{
-#if LV_USE_IMG != 0
-
- theme.style.img.light = &def;
- theme.style.img.dark = &def;
-#endif
-}
-
-static void line_init(void)
-{
-#if LV_USE_LINE != 0
-
- theme.style.line.decor = &def;
-#endif
-}
-
-static void led_init(void)
-{
-#if LV_USE_LED != 0
- static lv_style_t led;
-
- lv_style_copy(&led, &lv_style_pretty_color);
- led.body.shadow.width = LV_DPI / 10;
- led.body.radius = LV_RADIUS_CIRCLE;
- led.body.border.width = LV_DPI / 30;
- led.body.border.opa = LV_OPA_30;
- led.body.shadow.color = led.body.main_color;
-
- theme.style.led = &led;
-#endif
-}
-
-static void bar_init(void)
-{
-#if LV_USE_BAR
-
- theme.style.bar.bg = &lv_style_pretty;
- theme.style.bar.indic = &lv_style_pretty_color;
-#endif
-}
-
-static void slider_init(void)
-{
-#if LV_USE_SLIDER != 0
- static lv_style_t slider_bg;
- lv_style_copy(&slider_bg, &lv_style_pretty);
- slider_bg.body.padding.left = LV_DPI / 20;
- slider_bg.body.padding.right = LV_DPI / 20;
- slider_bg.body.padding.top = LV_DPI / 20;
- slider_bg.body.padding.bottom = LV_DPI / 20;
-
- theme.style.slider.bg = &slider_bg;
- theme.style.slider.indic = &lv_style_pretty_color;
- theme.style.slider.knob = &lv_style_pretty;
-#endif
-}
-
-static void sw_init(void)
-{
-#if LV_USE_SW != 0
- static lv_style_t sw_bg;
- lv_style_copy(&sw_bg, &lv_style_pretty);
- sw_bg.body.padding.left = 3;
- sw_bg.body.padding.right = 3;
- sw_bg.body.padding.top = 3;
- sw_bg.body.padding.bottom = 3;
-
- theme.style.sw.bg = &sw_bg;
- theme.style.sw.indic = &lv_style_pretty_color;
- theme.style.sw.knob_off = &lv_style_pretty;
- theme.style.sw.knob_on = &lv_style_pretty;
-#endif
-}
-
-static void lmeter_init(void)
-{
-#if LV_USE_LMETER != 0
- static lv_style_t lmeter;
- lv_style_copy(&lmeter, &lv_style_pretty_color);
- lmeter.line.color = lv_color_hex3(0xddd);
- lmeter.line.width = 2;
- lmeter.body.main_color = lv_color_mix(lmeter.body.main_color, LV_COLOR_WHITE, LV_OPA_50);
- lmeter.body.grad_color = lv_color_mix(lmeter.body.grad_color, LV_COLOR_BLACK, LV_OPA_50);
-
- theme.style.lmeter = &lmeter;
-#endif
-}
-
-static void gauge_init(void)
-{
-#if LV_USE_GAUGE != 0
- static lv_style_t gauge;
- lv_style_copy(&gauge, theme.style.lmeter);
- gauge.line.color = theme.style.lmeter->body.grad_color;
- gauge.line.width = 2;
- gauge.body.main_color = lv_color_hex3(0x888);
- gauge.body.grad_color = theme.style.lmeter->body.main_color;
- gauge.text.color = lv_color_hex3(0x888);
-
- theme.style.gauge = &gauge;
-#endif
-}
-
-static void chart_init(void)
-{
-#if LV_USE_CHART
-
- theme.style.chart = &lv_style_pretty;
-#endif
-}
-
-static void cb_init(void)
-{
-#if LV_USE_CB != 0
-
- theme.style.cb.bg = &lv_style_transp;
- theme.style.cb.box.rel = &lv_style_pretty;
- theme.style.cb.box.pr = &lv_style_btn_pr;
- theme.style.cb.box.tgl_rel = &lv_style_btn_tgl_rel;
- theme.style.cb.box.tgl_pr = &lv_style_btn_tgl_pr;
- theme.style.cb.box.ina = &lv_style_btn_ina;
-#endif
-}
-
-static void btnm_init(void)
-{
-#if LV_USE_BTNM
-
- theme.style.btnm.bg = &lv_style_pretty;
- theme.style.btnm.btn.rel = &lv_style_btn_rel;
- theme.style.btnm.btn.pr = &lv_style_btn_pr;
- theme.style.btnm.btn.tgl_rel = &lv_style_btn_tgl_rel;
- theme.style.btnm.btn.tgl_pr = &lv_style_btn_tgl_pr;
- theme.style.btnm.btn.ina = &lv_style_btn_ina;
-#endif
-}
-
-static void kb_init(void)
-{
-#if LV_USE_KB
-
- theme.style.kb.bg = &lv_style_pretty;
- theme.style.kb.btn.rel = &lv_style_btn_rel;
- theme.style.kb.btn.pr = &lv_style_btn_pr;
- theme.style.kb.btn.tgl_rel = &lv_style_btn_tgl_rel;
- theme.style.kb.btn.tgl_pr = &lv_style_btn_tgl_pr;
- theme.style.kb.btn.ina = &lv_style_btn_ina;
-#endif
-}
-
-static void mbox_init(void)
-{
-#if LV_USE_MBOX
-
- theme.style.mbox.bg = &lv_style_pretty;
- theme.style.mbox.btn.bg = &lv_style_transp;
- theme.style.mbox.btn.rel = &lv_style_btn_rel;
- theme.style.mbox.btn.pr = &lv_style_btn_tgl_pr;
-#endif
-}
-
-static void page_init(void)
-{
-#if LV_USE_PAGE
-
- theme.style.page.bg = &lv_style_pretty;
- theme.style.page.scrl = &lv_style_transp_tight;
- theme.style.page.sb = &sb;
-#endif
-}
-
-static void ta_init(void)
-{
-#if LV_USE_TA
-
- theme.style.ta.area = &lv_style_pretty;
- theme.style.ta.oneline = &lv_style_pretty;
- theme.style.ta.cursor = NULL;
- theme.style.ta.sb = &sb;
-#endif
-}
-
-static void list_init(void)
-{
-#if LV_USE_LIST != 0
-
- theme.style.list.bg = &lv_style_pretty;
- theme.style.list.scrl = &lv_style_transp_fit;
- theme.style.list.sb = &sb;
- theme.style.list.btn.rel = &lv_style_btn_rel;
- theme.style.list.btn.pr = &lv_style_btn_pr;
- theme.style.list.btn.tgl_rel = &lv_style_btn_tgl_rel;
- theme.style.list.btn.tgl_pr = &lv_style_btn_tgl_pr;
- theme.style.list.btn.ina = &lv_style_btn_ina;
-#endif
-}
-
-static void ddlist_init(void)
-{
-#if LV_USE_DDLIST != 0
-
- theme.style.ddlist.bg = &lv_style_pretty;
- theme.style.ddlist.sel = &lv_style_plain_color;
- theme.style.ddlist.sb = &sb;
-#endif
-}
-
-static void roller_init(void)
-{
-#if LV_USE_ROLLER != 0
-
- theme.style.roller.bg = &lv_style_pretty;
- theme.style.roller.sel = &lv_style_plain_color;
-#endif
-}
-
-static void tabview_init(void)
-{
-#if LV_USE_TABVIEW != 0
-
- theme.style.tabview.bg = &plain_bordered;
- theme.style.tabview.indic = &lv_style_plain_color;
- theme.style.tabview.btn.bg = &lv_style_transp;
- theme.style.tabview.btn.rel = &lv_style_btn_rel;
- theme.style.tabview.btn.pr = &lv_style_btn_pr;
- theme.style.tabview.btn.tgl_rel = &lv_style_btn_tgl_rel;
- theme.style.tabview.btn.tgl_pr = &lv_style_btn_tgl_pr;
-#endif
-}
-
-static void table_init(void)
-{
-#if LV_USE_TABLE != 0
- theme.style.table.bg = &lv_style_transp_tight;
- theme.style.table.cell = &lv_style_plain;
-#endif
-}
-
-static void win_init(void)
-{
-#if LV_USE_WIN != 0
-
- theme.style.win.bg = &plain_bordered;
- theme.style.win.sb = &sb;
- theme.style.win.header = &lv_style_plain_color;
- theme.style.win.content = &lv_style_transp;
- theme.style.win.btn.rel = &lv_style_btn_rel;
- theme.style.win.btn.pr = &lv_style_btn_pr;
-#endif
-}
-
-#if LV_USE_GROUP
-
-static void style_mod(lv_group_t * group, lv_style_t * style)
-{
- (void)group; /*Unused*/
-#if LV_COLOR_DEPTH != 1
- /*Make the style to be a little bit orange*/
- style->body.border.opa = LV_OPA_COVER;
- style->body.border.color = LV_COLOR_ORANGE;
-
- /*If not empty or has border then emphasis the border*/
- if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20;
-
- style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_ORANGE, LV_OPA_70);
- style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_ORANGE, LV_OPA_70);
- style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_ORANGE, LV_OPA_60);
-
- style->text.color = lv_color_mix(style->text.color, LV_COLOR_ORANGE, LV_OPA_70);
-#else
- style->body.border.opa = LV_OPA_COVER;
- style->body.border.color = LV_COLOR_BLACK;
- style->body.border.width = 2;
-#endif
-}
-
-static void style_mod_edit(lv_group_t * group, lv_style_t * style)
-{
- (void)group; /*Unused*/
-#if LV_COLOR_DEPTH != 1
- /*Make the style to be a little bit orange*/
- style->body.border.opa = LV_OPA_COVER;
- style->body.border.color = LV_COLOR_GREEN;
-
- /*If not empty or has border then emphasis the border*/
- if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20;
-
- style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70);
- style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70);
- style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_GREEN, LV_OPA_60);
-
- style->text.color = lv_color_mix(style->text.color, LV_COLOR_GREEN, LV_OPA_70);
-#else
- style->body.border.opa = LV_OPA_COVER;
- style->body.border.color = LV_COLOR_BLACK;
- style->body.border.width = 3;
-#endif
-}
-
-#endif /*LV_USE_GROUP*/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Initialize the default theme
- * @param hue [0..360] hue value from HSV color space to define the theme's base color
- * @param font pointer to a font (NULL to use the default)
- * @return pointer to the initialized theme
- */
-lv_theme_t * lv_theme_default_init(uint16_t hue, lv_font_t * font)
-{
- if(font == NULL) font = LV_FONT_DEFAULT;
-
- _hue = hue;
- _font = font;
-
- /*For backward compatibility initialize all theme elements with a default style */
- uint16_t i;
- lv_style_t ** style_p = (lv_style_t **)&theme.style;
- for(i = 0; i < LV_THEME_STYLE_COUNT; i++) {
- *style_p = &def;
- style_p++;
- }
-
- basic_init();
- btn_init();
- label_init();
- img_init();
- line_init();
- led_init();
- bar_init();
- slider_init();
- sw_init();
- lmeter_init();
- gauge_init();
- chart_init();
- cb_init();
- btnm_init();
- kb_init();
- mbox_init();
- page_init();
- ta_init();
- list_init();
- ddlist_init();
- roller_init();
- tabview_init();
- table_init();
- win_init();
-
-#if LV_USE_GROUP
- theme.group.style_mod_xcb = style_mod;
- theme.group.style_mod_edit_xcb = style_mod_edit;
-#endif
-
- return &theme;
-}
-
-/**
- * Get a pointer to the theme
- * @return pointer to the theme
- */
-lv_theme_t * lv_theme_get_default(void)
-{
- return &theme;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-#endif
diff --git a/src/libs/lvgl/src/lv_themes/lv_theme_default.h b/src/libs/lvgl/src/lv_themes/lv_theme_default.h
deleted file mode 100644
index 4a2ecc08..00000000
--- a/src/libs/lvgl/src/lv_themes/lv_theme_default.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * @file lv_theme_default.h
- *
- */
-
-#ifndef LV_THEME_DEFAULT_H
-#define LV_THEME_DEFAULT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_THEME_DEFAULT
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Initialize the default theme
- * @param hue [0..360] hue value from HSV color space to define the theme's base color
- * @param font pointer to a font (NULL to use the default)
- * @return pointer to the initialized theme
- */
-lv_theme_t * lv_theme_default_init(uint16_t hue, lv_font_t * font);
-
-/**
- * Get a pointer to the theme
- * @return pointer to the theme
- */
-lv_theme_t * lv_theme_get_default(void);
-
-/**********************
- * MACROS
- **********************/
-
-#endif
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_THEME_TEMPL_H*/
diff --git a/src/libs/lvgl/src/lv_themes/lv_theme_material.c b/src/libs/lvgl/src/lv_themes/lv_theme_material.c
deleted file mode 100644
index 6d162bf5..00000000
--- a/src/libs/lvgl/src/lv_themes/lv_theme_material.c
+++ /dev/null
@@ -1,936 +0,0 @@
-/**
- * @file lv_theme_material.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_theme.h"
-
-#if LV_USE_THEME_MATERIAL
-
-/*********************
- * DEFINES
- *********************/
-#define DEF_RADIUS 4
-#define DEF_SHADOW_COLOR lv_color_hex3(0xaaa)
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_theme_t theme;
-static lv_style_t def;
-
-/*Static style definitions*/
-static lv_style_t sb;
-
-/*Saved input parameters*/
-static uint16_t _hue;
-static lv_font_t * _font;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-static void basic_init(void)
-{
- static lv_style_t bg, panel, scr;
-
- lv_style_copy(&def, &lv_style_plain); /*Initialize the default style*/
- def.text.font = _font;
- def.body.radius = DEF_RADIUS;
-
- lv_style_copy(&bg, &def);
- bg.body.main_color = lv_color_hex(0xf0f0f0);
- bg.body.grad_color = bg.body.main_color;
- bg.body.radius = 0;
-
- lv_style_copy(&scr, &bg);
- scr.body.padding.bottom = 0;
- scr.body.padding.top = 0;
- scr.body.padding.left = 0;
- scr.body.padding.right = 0;
-
- lv_style_copy(&panel, &def);
- panel.body.radius = DEF_RADIUS;
- panel.body.main_color = LV_COLOR_WHITE;
- panel.body.grad_color = LV_COLOR_WHITE;
- panel.body.border.width = 1;
- panel.body.border.color = lv_color_hex3(0xbbb);
- panel.body.border.opa = LV_OPA_COVER;
- panel.body.shadow.color = DEF_SHADOW_COLOR;
- panel.body.shadow.type = LV_SHADOW_BOTTOM;
- panel.body.shadow.width = 4;
- panel.body.padding.left = LV_DPI / 8;
- panel.body.padding.right = LV_DPI / 8;
- panel.body.padding.top = LV_DPI / 8;
- panel.body.padding.bottom = LV_DPI / 8;
- panel.body.padding.inner = LV_DPI / 12;
- panel.text.color = lv_color_hex3(0x333);
- panel.image.color = lv_color_hex3(0x333);
-
- lv_style_copy(&sb, &def);
- sb.body.main_color = LV_COLOR_BLACK;
- sb.body.grad_color = LV_COLOR_BLACK;
- sb.body.opa = LV_OPA_40;
- sb.body.padding.right = LV_DPI / 25;
- sb.body.padding.bottom = LV_DPI / 25;
-
- theme.style.bg = &bg;
- theme.style.scr = &scr;
- theme.style.panel = &panel;
-}
-
-static void cont_init(void)
-{
-#if LV_USE_CONT != 0
-
- theme.style.cont = theme.style.panel;
-#endif
-}
-
-static void btn_init(void)
-{
-#if LV_USE_BTN != 0
- static lv_style_t rel, pr, tgl_rel, tgl_pr, ina;
-
- lv_style_copy(&rel, &def);
- rel.body.main_color = lv_color_hsv_to_rgb(_hue, 90, 70);
- rel.body.grad_color = rel.body.main_color;
- rel.body.radius = DEF_RADIUS;
- rel.body.padding.left = LV_DPI / 6;
- rel.body.padding.right = LV_DPI / 6;
- rel.body.padding.top = LV_DPI / 8;
- rel.body.padding.bottom = LV_DPI / 8;
- rel.body.padding.inner = LV_DPI / 10;
- rel.body.shadow.color = DEF_SHADOW_COLOR;
- rel.body.shadow.type = LV_SHADOW_BOTTOM;
- rel.body.shadow.width = 6;
- rel.text.color = lv_color_hsv_to_rgb(_hue, 5, 95);
- rel.image.color = lv_color_hsv_to_rgb(_hue, 5, 95);
-
- lv_style_copy(&pr, &rel);
- pr.body.main_color = lv_color_hsv_to_rgb(_hue, 90, 60);
- pr.body.grad_color = pr.body.main_color;
- pr.body.shadow.width = 4;
-
- lv_style_copy(&tgl_rel, &rel);
- tgl_rel.body.main_color = lv_color_hsv_to_rgb(_hue, 95, 50);
- tgl_rel.body.grad_color = tgl_rel.body.main_color;
- tgl_rel.body.shadow.width = 4;
-
- lv_style_copy(&tgl_pr, &tgl_rel);
- tgl_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 95, 40);
- tgl_pr.body.grad_color = tgl_pr.body.main_color;
- tgl_pr.body.shadow.width = 2;
-
- lv_style_copy(&ina, &rel);
- ina.body.main_color = lv_color_hex3(0xccc);
- ina.body.grad_color = ina.body.main_color;
- ina.body.shadow.width = 0;
- ina.text.color = lv_color_hsv_to_rgb(_hue, 95, 5);
- ina.image.color = lv_color_hsv_to_rgb(_hue, 95, 5);
-
- theme.style.btn.rel = &rel;
- theme.style.btn.pr = &pr;
- theme.style.btn.tgl_rel = &tgl_rel;
- theme.style.btn.tgl_pr = &tgl_pr;
- theme.style.btn.ina = &ina;
-#endif
-}
-
-static void label_init(void)
-{
-#if LV_USE_LABEL != 0
- static lv_style_t prim, sec, hint;
-
- lv_style_copy(&prim, &def);
- prim.text.font = _font;
- prim.text.color = lv_color_hsv_to_rgb(_hue, 80, 10);
-
- lv_style_copy(&sec, &prim);
- sec.text.color = lv_color_hsv_to_rgb(_hue, 80, 75);
-
- lv_style_copy(&hint, &prim);
- hint.text.color = lv_color_hsv_to_rgb(_hue, 40, 90);
-
- theme.style.label.prim = &prim;
- theme.style.label.sec = &sec;
- theme.style.label.hint = &hint;
-#endif
-}
-
-static void img_init(void)
-{
-#if LV_USE_IMG != 0
- static lv_style_t img_light, img_dark;
- lv_style_copy(&img_light, &def);
- img_light.image.color = lv_color_hsv_to_rgb(_hue, 15, 85);
- img_light.image.intense = LV_OPA_80;
-
- lv_style_copy(&img_dark, &def);
- img_light.image.color = lv_color_hsv_to_rgb(_hue, 85, 65);
- img_light.image.intense = LV_OPA_80;
-
- theme.style.img.light = &def;
- theme.style.img.dark = &def;
-#endif
-}
-
-static void line_init(void)
-{
-#if LV_USE_LINE != 0
-
- theme.style.line.decor = &def;
-#endif
-}
-
-static void led_init(void)
-{
-#if LV_USE_LED != 0
- static lv_style_t led;
- lv_style_copy(&led, &def);
- led.body.shadow.width = LV_DPI / 10;
- led.body.radius = LV_RADIUS_CIRCLE;
- led.body.border.width = LV_DPI / 30;
- led.body.border.opa = LV_OPA_30;
- led.body.main_color = lv_color_hsv_to_rgb(_hue, 100, 100);
- led.body.grad_color = lv_color_hsv_to_rgb(_hue, 100, 100);
- led.body.border.color = lv_color_hsv_to_rgb(_hue, 60, 60);
- led.body.shadow.color = lv_color_hsv_to_rgb(_hue, 100, 100);
-
- theme.style.led = &led;
-#endif
-}
-
-static void bar_init(void)
-{
-#if LV_USE_BAR
- static lv_style_t bar_bg, bar_indic;
-
- lv_style_copy(&bar_bg, &def);
- bar_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 15, 95);
- bar_bg.body.grad_color = bar_bg.body.main_color;
- bar_bg.body.radius = 3;
- bar_bg.body.border.width = 0;
- bar_bg.body.padding.left = LV_DPI / 16;
- bar_bg.body.padding.right = LV_DPI / 16;
- bar_bg.body.padding.top = LV_DPI / 16;
- bar_bg.body.padding.bottom = LV_DPI / 16;
-
- lv_style_copy(&bar_indic, &bar_bg);
- bar_indic.body.main_color = lv_color_hsv_to_rgb(_hue, 85, 70);
- bar_indic.body.grad_color = bar_indic.body.main_color;
- bar_indic.body.padding.left = 0;
- bar_indic.body.padding.right = 0;
- bar_indic.body.padding.top = 0;
- bar_indic.body.padding.bottom = 0;
-
- theme.style.bar.bg = &bar_bg;
- theme.style.bar.indic = &bar_indic;
-#endif
-}
-
-static void slider_init(void)
-{
-#if LV_USE_SLIDER != 0
- static lv_style_t knob;
-
- lv_style_copy(&knob, &def);
- knob.body.radius = LV_RADIUS_CIRCLE;
- knob.body.border.width = 0;
- knob.body.main_color = theme.style.bar.indic->body.main_color;
- knob.body.grad_color = knob.body.main_color;
-
- theme.style.slider.bg = theme.style.bar.bg;
- theme.style.slider.indic = theme.style.bar.indic;
- theme.style.slider.knob = &knob;
-#endif
-}
-
-static void sw_init(void)
-{
-#if LV_USE_SW != 0
- static lv_style_t sw_bg, sw_indic, sw_knob_off, sw_knob_on;
- lv_style_copy(&sw_bg, theme.style.slider.bg);
- sw_bg.body.radius = LV_RADIUS_CIRCLE;
-
- lv_style_copy(&sw_indic, theme.style.slider.bg);
- sw_indic.body.radius = LV_RADIUS_CIRCLE;
-
- lv_style_copy(&sw_knob_on, theme.style.slider.knob);
- sw_knob_on.body.shadow.width = 3;
- sw_knob_on.body.shadow.type = LV_SHADOW_BOTTOM;
- sw_knob_on.body.shadow.color = DEF_SHADOW_COLOR;
-
- lv_style_copy(&sw_knob_off, &sw_knob_on);
- sw_knob_off.body.main_color = lv_color_hex(0xfafafa);
- sw_knob_off.body.grad_color = sw_knob_off.body.main_color;
- sw_knob_off.body.border.width = 1;
- sw_knob_off.body.border.color = lv_color_hex3(0x999);
- sw_knob_off.body.border.opa = LV_OPA_COVER;
-
- theme.style.sw.bg = &sw_bg;
- theme.style.sw.indic = &sw_indic;
- theme.style.sw.knob_off = &sw_knob_off;
- theme.style.sw.knob_on = &sw_knob_on;
-#endif
-}
-
-static void lmeter_init(void)
-{
-#if LV_USE_LMETER != 0
- static lv_style_t lmeter;
- lv_style_copy(&lmeter, &def);
- lmeter.body.main_color = lv_color_hsv_to_rgb(_hue, 75, 90);
- lmeter.body.grad_color = lmeter.body.main_color;
- lmeter.body.padding.left = LV_DPI / 10; /*Scale line length*/
- lmeter.line.color = lv_color_hex3(0x999);
- lmeter.line.width = 2;
-
- theme.style.lmeter = &lmeter;
-#endif
-}
-
-static void gauge_init(void)
-{
-#if LV_USE_GAUGE != 0
-
- static lv_style_t gauge;
- lv_style_copy(&gauge, &def);
- gauge.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 60);
- gauge.body.grad_color = gauge.body.main_color;
- gauge.body.padding.left = LV_DPI / 16; /*Scale line length*/
- gauge.body.padding.inner = LV_DPI / 8;
- gauge.body.border.color = lv_color_hex3(0x999);
- gauge.text.color = lv_color_hex3(0x333);
- gauge.line.width = 3;
- gauge.line.color = lv_color_hsv_to_rgb(_hue, 95, 70);
-
- theme.style.gauge = &gauge;
-#endif
-}
-
-static void arc_init(void)
-{
-#if LV_USE_ARC != 0
-
- static lv_style_t arc;
- lv_style_copy(&arc, &def);
- arc.line.width = 10;
- arc.line.color = lv_color_hsv_to_rgb(_hue, 90, 90);
-
- /*For prelaoder*/
- arc.body.border.width = 10;
- arc.body.border.color = lv_color_hsv_to_rgb(_hue, 30, 90);
- arc.body.padding.left = 0;
- arc.body.padding.right = 0;
- arc.body.padding.top = 0;
- arc.body.padding.bottom = 0;
-
- theme.style.arc = &arc;
-#endif
-}
-
-static void preload_init(void)
-{
-#if LV_USE_PRELOAD != 0
-
- theme.style.preload = theme.style.arc;
-#endif
-}
-
-static void chart_init(void)
-{
-#if LV_USE_CHART
- theme.style.chart = theme.style.panel;
-#endif
-}
-
-static void calendar_init(void)
-{
-#if LV_USE_CALENDAR
- static lv_style_t ina_days;
- lv_style_copy(&ina_days, &def);
- ina_days.text.color = lv_color_hsv_to_rgb(_hue, 0, 70);
-
- static lv_style_t high_days;
- lv_style_copy(&high_days, &def);
- high_days.text.color = lv_color_hsv_to_rgb(_hue, 80, 90);
-
- static lv_style_t week_box;
- lv_style_copy(&week_box, &def);
- week_box.body.main_color = lv_color_hsv_to_rgb(_hue, 40, 100);
- week_box.body.grad_color = lv_color_hsv_to_rgb(_hue, 40, 100);
- week_box.body.padding.top = LV_DPI / 20;
- week_box.body.padding.bottom = LV_DPI / 20;
- week_box.body.padding.left = theme.style.panel->body.padding.left;
- week_box.body.padding.right = theme.style.panel->body.padding.right;
- week_box.body.border.color = theme.style.panel->body.border.color;
- week_box.body.border.width = theme.style.panel->body.border.width;
- week_box.body.border.part = LV_BORDER_LEFT | LV_BORDER_RIGHT;
- week_box.body.radius = 0;
-
- static lv_style_t today_box;
- lv_style_copy(&today_box, &def);
- today_box.body.main_color = LV_COLOR_WHITE;
- today_box.body.grad_color = LV_COLOR_WHITE;
- today_box.body.padding.top = LV_DPI / 20;
- today_box.body.padding.bottom = LV_DPI / 20;
- today_box.body.radius = 0;
-
- theme.style.calendar.bg = theme.style.panel;
- theme.style.calendar.header = &lv_style_transp;
- theme.style.calendar.inactive_days = &ina_days;
- theme.style.calendar.highlighted_days = &high_days;
- theme.style.calendar.week_box = &week_box;
- theme.style.calendar.today_box = &today_box;
-#endif
-}
-
-static void cb_init(void)
-{
-#if LV_USE_CB != 0
- static lv_style_t rel, pr, tgl_rel, tgl_pr, ina;
- lv_style_copy(&rel, theme.style.panel);
- rel.body.shadow.type = LV_SHADOW_BOTTOM;
- rel.body.shadow.width = 3;
-
- lv_style_copy(&pr, &rel);
- pr.body.main_color = lv_color_hex3(0xccc);
- pr.body.grad_color = pr.body.main_color;
- pr.body.shadow.width = 0;
-
- lv_style_copy(&tgl_rel, &rel);
- tgl_rel.body.main_color = lv_color_hsv_to_rgb(_hue, 75, 85);
- tgl_rel.body.grad_color = tgl_rel.body.main_color;
- tgl_rel.body.shadow.type = LV_SHADOW_FULL;
- tgl_rel.body.shadow.width = 0;
-
- lv_style_copy(&tgl_pr, &tgl_rel);
- tgl_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 75, 65);
- tgl_pr.body.grad_color = tgl_pr.body.main_color;
- tgl_pr.body.shadow.width = 0;
-
- lv_style_copy(&ina, theme.style.btn.ina);
-
- theme.style.cb.bg = &lv_style_transp;
- theme.style.cb.box.rel = &rel;
- theme.style.cb.box.pr = &pr;
- theme.style.cb.box.tgl_rel = &tgl_rel;
- theme.style.cb.box.tgl_pr = &tgl_pr;
- theme.style.cb.box.ina = &ina;
-#endif
-}
-
-static void btnm_init(void)
-{
-#if LV_USE_BTNM
- static lv_style_t bg, rel, pr, tgl_rel, tgl_pr, ina;
-
- lv_style_copy(&bg, theme.style.panel);
- bg.body.padding.left = 0;
- bg.body.padding.right = 0;
- bg.body.padding.top = 0;
- bg.body.padding.bottom = 0;
- bg.body.padding.inner = 0;
- bg.text.color = lv_color_hex3(0x555);
-
- lv_style_copy(&rel, theme.style.panel);
- rel.body.border.part = LV_BORDER_FULL | LV_BORDER_INTERNAL;
- rel.body.border.width = 1;
- rel.body.border.color = lv_color_hex3(0xbbb);
- rel.body.opa = LV_OPA_TRANSP;
- rel.body.shadow.width = 0;
-
- lv_style_copy(&pr, &rel);
- pr.glass = 0;
- pr.body.main_color = lv_color_hex3(0xddd);
- pr.body.grad_color = pr.body.main_color;
- pr.body.border.width = 0;
- pr.body.opa = LV_OPA_COVER;
-
- lv_style_copy(&tgl_rel, &pr);
- tgl_rel.body.main_color = lv_color_hsv_to_rgb(_hue, 90, 70);
- tgl_rel.body.grad_color = tgl_rel.body.main_color;
- tgl_rel.text.color = lv_color_hsv_to_rgb(_hue, 5, 95);
-
- lv_style_copy(&tgl_pr, &tgl_rel);
- tgl_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 95, 65);
- tgl_pr.body.grad_color = tgl_pr.body.main_color;
- tgl_pr.body.border.width = 0;
-
- lv_style_copy(&ina, &pr);
- ina.body.main_color = lv_color_hex3(0xccc);
- ina.body.grad_color = ina.body.main_color;
-
- theme.style.btnm.bg = &bg;
- theme.style.btnm.btn.rel = &rel;
- theme.style.btnm.btn.pr = &pr;
- theme.style.btnm.btn.tgl_rel = &tgl_rel;
- theme.style.btnm.btn.tgl_pr = &tgl_pr;
- theme.style.btnm.btn.ina = &def;
-#endif
-}
-
-static void kb_init(void)
-{
-#if LV_USE_KB
-
- static lv_style_t rel;
- lv_style_copy(&rel, &lv_style_transp);
- rel.text.font = _font;
-
- theme.style.kb.bg = theme.style.btnm.bg;
- theme.style.kb.btn.rel = &rel;
- theme.style.kb.btn.pr = theme.style.btnm.btn.pr;
- theme.style.kb.btn.tgl_rel = theme.style.btnm.btn.tgl_rel;
- theme.style.kb.btn.tgl_pr = theme.style.btnm.btn.tgl_pr;
- theme.style.kb.btn.ina = theme.style.btnm.btn.ina;
-#endif
-}
-
-static void mbox_init(void)
-{
-#if LV_USE_MBOX
- static lv_style_t pr, rel;
-
- lv_style_copy(&rel, &lv_style_transp);
- rel.glass = 0;
- rel.text.font = _font;
- rel.text.color = lv_color_hsv_to_rgb(_hue, 85, 75);
-
- lv_style_copy(&pr, theme.style.btnm.btn.pr);
- pr.text.color = lv_color_hsv_to_rgb(_hue, 85, 60);
-
- theme.style.mbox.bg = theme.style.panel;
- theme.style.mbox.btn.bg = &lv_style_transp;
- theme.style.mbox.btn.rel = &rel;
- theme.style.mbox.btn.pr = &pr;
-#endif
-}
-
-static void page_init(void)
-{
-#if LV_USE_PAGE
-
- theme.style.page.bg = theme.style.panel;
- theme.style.page.scrl = &lv_style_transp;
- theme.style.page.sb = &sb;
-#endif
-}
-
-static void ta_init(void)
-{
-#if LV_USE_TA
- static lv_style_t oneline;
-
- lv_style_copy(&oneline, &def);
- oneline.body.opa = LV_OPA_TRANSP;
- oneline.body.radius = 0;
- oneline.body.border.part = LV_BORDER_BOTTOM;
- oneline.body.border.width = 3;
- oneline.body.border.color = lv_color_hex3(0x333);
- oneline.body.border.opa = LV_OPA_COVER;
- oneline.text.color = lv_color_hex3(0x333);
-
- theme.style.ta.area = theme.style.panel;
- theme.style.ta.oneline = &oneline;
- theme.style.ta.cursor = NULL; /*Let library to calculate the cursor's style*/
- theme.style.ta.sb = &sb;
-#endif
-}
-
-static void spinbox_init(void)
-{
-#if LV_USE_SPINBOX
- theme.style.spinbox.bg = theme.style.panel;
- theme.style.spinbox.cursor = theme.style.ta.cursor;
- theme.style.spinbox.sb = theme.style.ta.sb;
-#endif
-}
-
-static void list_init(void)
-{
-#if LV_USE_LIST != 0
-
- static lv_style_t list_bg, rel, pr, tgl_rel, tgl_pr, ina;
-
- lv_style_copy(&list_bg, theme.style.panel);
- list_bg.body.padding.left = 0;
- list_bg.body.padding.right = 0;
- list_bg.body.padding.top = 0;
- list_bg.body.padding.bottom = 0;
- list_bg.body.padding.inner = 0;
-
- lv_style_copy(&rel, &lv_style_transp);
- rel.body.padding.left = LV_DPI / 8;
- rel.body.padding.right = LV_DPI / 8;
- rel.body.padding.top = LV_DPI / 6;
- rel.body.padding.bottom = LV_DPI / 6;
- rel.body.radius = 10;
- rel.body.border.color = lv_color_hex3(0xbbb);
- rel.body.border.width = 1;
- rel.body.border.part = LV_BORDER_BOTTOM;
-
- lv_style_copy(&pr, &rel);
- pr.glass = 0;
- pr.body.main_color = lv_color_hex3(0xddd);
- pr.body.grad_color = pr.body.main_color;
- pr.body.border.width = 0;
- pr.body.opa = LV_OPA_COVER;
- pr.body.radius = DEF_RADIUS;
- pr.text.font = _font;
-
- lv_style_copy(&tgl_rel, &pr);
- tgl_rel.body.main_color = lv_color_hsv_to_rgb(_hue, 90, 70);
- tgl_rel.body.grad_color = tgl_rel.body.main_color;
- tgl_rel.text.color = lv_color_hsv_to_rgb(_hue, 5, 95);
-
- lv_style_copy(&tgl_pr, &tgl_rel);
- tgl_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 90, 60);
- tgl_pr.body.grad_color = tgl_pr.body.main_color;
- tgl_pr.body.border.width = 0;
-
- lv_style_copy(&ina, &pr);
- ina.body.main_color = lv_color_hex3(0xccc);
- ina.body.grad_color = ina.body.main_color;
-
- theme.style.list.sb = &sb;
- theme.style.list.bg = &list_bg;
- theme.style.list.scrl = &lv_style_transp_tight;
- theme.style.list.btn.rel = &rel;
- theme.style.list.btn.pr = &pr;
- theme.style.list.btn.tgl_rel = &tgl_rel;
- theme.style.list.btn.tgl_pr = &tgl_pr;
- theme.style.list.btn.ina = &ina;
-#endif
-}
-
-static void ddlist_init(void)
-{
-#if LV_USE_DDLIST != 0
- static lv_style_t bg, sel;
- lv_style_copy(&bg, theme.style.panel);
- bg.body.padding.left = LV_DPI / 6;
- bg.body.padding.right = LV_DPI / 6;
- bg.body.padding.top = LV_DPI / 6;
- bg.body.padding.bottom = LV_DPI / 6;
- bg.text.line_space = LV_DPI / 8;
-
- lv_style_copy(&sel, &bg);
- sel.body.main_color = lv_color_hsv_to_rgb(_hue, 90, 70);
- sel.body.grad_color = sel.body.main_color;
- sel.body.border.width = 0;
- sel.body.shadow.width = 0;
- sel.text.color = lv_color_hsv_to_rgb(_hue, 5, 95);
-
- theme.style.ddlist.bg = &bg;
- theme.style.ddlist.sel = &sel;
- theme.style.ddlist.sb = &sb;
-#endif
-}
-
-static void roller_init(void)
-{
-#if LV_USE_ROLLER != 0
- static lv_style_t roller_bg, roller_sel;
-
- lv_style_copy(&roller_bg, &lv_style_transp);
- roller_bg.body.padding.left = LV_DPI / 6;
- roller_bg.body.padding.right = LV_DPI / 6;
- roller_bg.body.padding.top = LV_DPI / 6;
- roller_bg.body.padding.bottom = LV_DPI / 6;
- roller_bg.text.line_space = LV_DPI / 8;
- roller_bg.text.font = _font;
- roller_bg.glass = 0;
-
- lv_style_copy(&roller_sel, &roller_bg);
- roller_sel.text.color = lv_color_hsv_to_rgb(_hue, 90, 70);
-
- theme.style.roller.bg = &roller_bg;
- theme.style.roller.sel = &roller_sel;
-#endif
-}
-
-static void tabview_init(void)
-{
-#if LV_USE_TABVIEW != 0
- static lv_style_t indic, btn_bg, rel, pr, tgl_rel, tgl_pr;
-
- lv_style_copy(&indic, &def);
- indic.body.main_color = lv_color_hsv_to_rgb(_hue, 90, 70);
- indic.body.grad_color = indic.body.main_color;
- indic.body.radius = 0;
- indic.body.border.width = 0;
- indic.body.padding.inner = LV_DPI / 20;
-
- lv_style_copy(&btn_bg, &def);
- btn_bg.body.main_color = lv_color_hex3(0xccc);
- btn_bg.body.grad_color = btn_bg.body.main_color;
- btn_bg.body.radius = 0;
- btn_bg.body.border.width = 1;
- btn_bg.body.border.color = lv_color_hex3(0x888);
- btn_bg.body.border.part = LV_BORDER_BOTTOM;
- btn_bg.body.border.opa = LV_OPA_COVER;
- btn_bg.body.shadow.width = 5;
- btn_bg.body.shadow.color = DEF_SHADOW_COLOR;
- btn_bg.body.shadow.type = LV_SHADOW_BOTTOM;
- btn_bg.body.padding.inner = 0;
- btn_bg.body.padding.left = 0;
- btn_bg.body.padding.right = 0;
- btn_bg.body.padding.top = 0;
- btn_bg.body.padding.bottom = 0;
- btn_bg.text.color = lv_color_hex3(0x333);
-
- lv_style_copy(&rel, &lv_style_transp);
- rel.body.padding.top = LV_DPI / 8;
- rel.body.padding.bottom = LV_DPI / 8;
- rel.text.font = _font;
-
- lv_style_copy(&pr, &def);
- pr.body.main_color = lv_color_hex3(0xbbb);
- pr.body.grad_color = pr.body.main_color;
- pr.body.border.width = 0;
- pr.body.opa = LV_OPA_COVER;
- pr.body.radius = 0;
- pr.body.border.width = 1;
- pr.body.border.color = lv_color_hex3(0x888);
- pr.body.border.part = LV_BORDER_BOTTOM;
- pr.body.border.opa = LV_OPA_COVER;
- pr.text.color = lv_color_hex3(0x111);
-
- lv_style_copy(&tgl_rel, &lv_style_transp);
- tgl_rel.glass = 0;
- tgl_rel.text.font = _font;
- tgl_rel.text.color = lv_color_hsv_to_rgb(_hue, 90, 70);
-
- lv_style_copy(&tgl_pr, &def);
- tgl_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 15, 85);
- tgl_pr.body.grad_color = tgl_pr.body.main_color;
- tgl_pr.body.border.width = 0;
- tgl_pr.body.opa = LV_OPA_COVER;
- tgl_pr.body.radius = 0;
- tgl_pr.text.color = lv_color_hsv_to_rgb(_hue, 90, 60);
-
- theme.style.tabview.bg = theme.style.bg;
- theme.style.tabview.indic = &indic;
- theme.style.tabview.btn.bg = &btn_bg;
- theme.style.tabview.btn.rel = &rel;
- theme.style.tabview.btn.pr = &pr;
- theme.style.tabview.btn.tgl_rel = &tgl_rel;
- theme.style.tabview.btn.tgl_pr = &tgl_pr;
-#endif
-}
-
-static void tileview_init(void)
-{
-#if LV_USE_TILEVIEW != 0
- theme.style.tileview.bg = &lv_style_transp_tight;
- theme.style.tileview.scrl = &lv_style_transp_tight;
- theme.style.tileview.sb = theme.style.page.sb;
-#endif
-}
-
-static void table_init(void)
-{
-#if LV_USE_TABLE != 0
- static lv_style_t cell;
- lv_style_copy(&cell, theme.style.panel);
- cell.body.radius = 0;
- cell.body.border.width = 1;
- cell.body.padding.left = LV_DPI / 12;
- cell.body.padding.right = LV_DPI / 12;
- cell.body.padding.top = LV_DPI / 12;
- cell.body.padding.bottom = LV_DPI / 12;
-
- theme.style.table.bg = &lv_style_transp_tight;
- theme.style.table.cell = &cell;
-#endif
-}
-
-static void win_init(void)
-{
-#if LV_USE_WIN != 0
- static lv_style_t header, pr;
-
- lv_style_copy(&header, &def);
- header.body.main_color = lv_color_hex3(0xccc);
- header.body.grad_color = header.body.main_color;
- header.body.radius = 0;
- header.body.border.width = 1;
- header.body.border.color = lv_color_hex3(0xbbb);
- header.body.border.part = LV_BORDER_BOTTOM;
- header.body.border.opa = LV_OPA_COVER;
- header.body.padding.inner = 0;
- header.body.padding.left = 0;
- header.body.padding.right = 0;
- header.body.padding.top = 0;
- header.body.padding.bottom = 0;
- header.text.color = lv_color_hex3(0x333);
- header.image.color = lv_color_hex3(0x333);
-
- lv_style_copy(&pr, &def);
- pr.body.main_color = lv_color_hex3(0xbbb);
- pr.body.grad_color = pr.body.main_color;
- pr.body.border.width = 0;
- pr.body.opa = LV_OPA_COVER;
- pr.body.radius = 0;
- pr.text.color = lv_color_hex3(0x111);
- pr.image.color = lv_color_hex3(0x111);
-
- theme.style.win.bg = theme.style.panel;
- theme.style.win.sb = &sb;
- theme.style.win.header = &header;
- theme.style.win.content = &lv_style_transp;
- theme.style.win.btn.rel = &lv_style_transp;
- theme.style.win.btn.pr = &pr;
-#endif
-}
-
-#if LV_USE_GROUP
-
-static void style_mod(lv_group_t * group, lv_style_t * style)
-{
- (void)group; /*Unused*/
-#if LV_COLOR_DEPTH != 1
- uint16_t hue2 = (_hue + 60) % 360;
-
- /*Make the style to be a little bit orange*/
- style->body.border.opa = LV_OPA_COVER;
- style->body.border.color = lv_color_hsv_to_rgb(hue2, 90, 70);
-
- /*If not empty or has border then emphasis the border*/
- if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 30;
-
- style->body.main_color = lv_color_mix(style->body.main_color, lv_color_hsv_to_rgb(hue2, 90, 70), LV_OPA_70);
- style->body.grad_color = lv_color_mix(style->body.grad_color, lv_color_hsv_to_rgb(hue2, 90, 70), LV_OPA_70);
- style->body.shadow.color = lv_color_mix(style->body.shadow.color, lv_color_hsv_to_rgb(hue2, 90, 70), LV_OPA_60);
-
- style->text.color = lv_color_mix(style->text.color, lv_color_hsv_to_rgb(hue2, 90, 70), LV_OPA_70);
-#else
- style->body.border.opa = LV_OPA_COVER;
- style->body.border.color = LV_COLOR_BLACK;
- style->body.border.width = 2;
-#endif
-}
-
-static void style_mod_edit(lv_group_t * group, lv_style_t * style)
-{
- (void)group; /*Unused*/
-#if LV_COLOR_DEPTH != 1
- uint16_t hue2 = (_hue + 300) % 360;
-
- /*Make the style to be a little bit orange*/
- style->body.border.opa = LV_OPA_COVER;
- style->body.border.color = LV_COLOR_GREEN;
-
- /*If not empty or has border then emphasis the border*/
- if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 30;
-
-
- style->body.main_color = lv_color_mix(style->body.main_color, lv_color_hsv_to_rgb(hue2, 90, 70), LV_OPA_70);
- style->body.grad_color = lv_color_mix(style->body.grad_color, lv_color_hsv_to_rgb(hue2, 90, 70), LV_OPA_70);
- style->body.shadow.color = lv_color_mix(style->body.shadow.color, lv_color_hsv_to_rgb(hue2, 90, 70), LV_OPA_60);
-
- style->text.color = lv_color_mix(style->text.color, lv_color_hsv_to_rgb(hue2, 90, 70), LV_OPA_70);
-#else
- style->body.border.opa = LV_OPA_COVER;
- style->body.border.color = LV_COLOR_BLACK;
- style->body.border.width = 3;
-#endif
-}
-
-#endif /*LV_USE_GROUP*/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Initialize the material theme
- * @param hue [0..360] hue value from HSV color space to define the theme's base color
- * @param font pointer to a font (NULL to use the default)
- * @return pointer to the initialized theme
- */
-lv_theme_t * lv_theme_material_init(uint16_t hue, lv_font_t * font)
-{
- if(font == NULL) font = LV_FONT_DEFAULT;
-
- _hue = hue;
- _font = font;
-
- /*For backward compatibility initialize all theme elements with a default style */
- uint16_t i;
- lv_style_t ** style_p = (lv_style_t **)&theme.style;
- for(i = 0; i < LV_THEME_STYLE_COUNT; i++) {
- *style_p = &def;
- style_p++;
- }
-
- basic_init();
- cont_init();
- btn_init();
- label_init();
- img_init();
- line_init();
- led_init();
- bar_init();
- slider_init();
- sw_init();
- lmeter_init();
- gauge_init();
- chart_init();
- arc_init();
- preload_init();
- calendar_init();
- cb_init();
- btnm_init();
- kb_init();
- mbox_init();
- page_init();
- ta_init();
- spinbox_init();
- list_init();
- ddlist_init();
- roller_init();
- tabview_init();
- tileview_init();
- table_init();
- win_init();
-
-#if LV_USE_GROUP
- theme.group.style_mod_xcb = style_mod;
- theme.group.style_mod_edit_xcb = style_mod_edit;
-#endif
-
- return &theme;
-}
-
-/**
- * Get a pointer to the theme
- * @return pointer to the theme
- */
-lv_theme_t * lv_theme_get_material(void)
-{
- return &theme;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-#endif
diff --git a/src/libs/lvgl/src/lv_themes/lv_theme_material.h b/src/libs/lvgl/src/lv_themes/lv_theme_material.h
deleted file mode 100644
index 1f2e1b7e..00000000
--- a/src/libs/lvgl/src/lv_themes/lv_theme_material.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * @file lv_theme_material.h
- *
- */
-
-#ifndef LV_THEME_MATERIAL_H
-#define LV_THEME_MATERIAL_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_THEME_MATERIAL
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Initialize the material theme
- * @param hue [0..360] hue value from HSV color space to define the theme's base color
- * @param font pointer to a font (NULL to use the default)
- * @return pointer to the initialized theme
- */
-lv_theme_t * lv_theme_material_init(uint16_t hue, lv_font_t * font);
-
-/**
- * Get a pointer to the theme
- * @return pointer to the theme
- */
-lv_theme_t * lv_theme_get_material(void);
-
-/**********************
- * MACROS
- **********************/
-
-#endif
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_THEME_MATERIAL_H*/
diff --git a/src/libs/lvgl/src/lv_themes/lv_theme_mono.c b/src/libs/lvgl/src/lv_themes/lv_theme_mono.c
deleted file mode 100644
index 9c2e7743..00000000
--- a/src/libs/lvgl/src/lv_themes/lv_theme_mono.c
+++ /dev/null
@@ -1,525 +0,0 @@
-/**
- * @file lv_theme_templ.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_theme.h"
-
-#if LV_USE_THEME_MONO
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_theme_t theme;
-static lv_style_t def;
-static lv_style_t scr;
-
-/*Static style definitions*/
-static lv_style_t light_plain;
-static lv_style_t dark_plain;
-static lv_style_t light_frame;
-static lv_style_t dark_frame;
-
-/*Saved input parameters*/
-static lv_font_t * _font;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-static void basic_init(void)
-{
- lv_style_copy(&def, &lv_style_plain); /*Initialize the default style*/
- def.body.main_color = LV_COLOR_WHITE;
- def.body.grad_color = LV_COLOR_WHITE;
- def.body.radius = 0;
- def.body.opa = LV_OPA_COVER;
- def.body.padding.left = LV_DPI / 10;
- def.body.padding.right = LV_DPI / 10;
- def.body.padding.top = LV_DPI / 10;
- def.body.padding.bottom = LV_DPI / 10;
- def.body.padding.inner = LV_DPI / 10;
- def.body.border.color = LV_COLOR_BLACK;
- def.body.border.width = 1;
- def.body.border.opa = LV_OPA_COVER;
- def.body.border.part = LV_BORDER_FULL;
-
- def.text.font = _font;
- def.text.color = LV_COLOR_BLACK;
- def.text.letter_space = 1;
- def.text.line_space = 1;
-
- def.line.color = LV_COLOR_BLACK;
- def.line.opa = LV_OPA_COVER;
- def.line.width = 1;
-
- def.image.color = LV_COLOR_BLACK;
- def.image.intense = LV_OPA_TRANSP;
- def.image.opa = LV_OPA_COVER;
-
- lv_style_copy(&scr, &light_plain);
- scr.body.padding.bottom = 0;
- scr.body.padding.top = 0;
- scr.body.padding.left = 0;
- scr.body.padding.right = 0;
-
- lv_style_copy(&light_plain, &def);
-
- lv_style_copy(&light_frame, &light_plain);
- light_frame.body.radius = LV_DPI / 20;
-
- lv_style_copy(&dark_plain, &light_plain);
- dark_plain.body.main_color = LV_COLOR_BLACK;
- dark_plain.body.grad_color = LV_COLOR_BLACK;
- dark_plain.body.border.color = LV_COLOR_WHITE;
- dark_plain.text.color = LV_COLOR_WHITE;
- dark_plain.line.color = LV_COLOR_WHITE;
- dark_plain.image.color = LV_COLOR_WHITE;
-
- lv_style_copy(&dark_frame, &dark_plain);
- dark_frame.body.radius = LV_DPI / 20;
-
- theme.style.bg = &def;
- theme.style.scr = &scr;
- theme.style.panel = &light_frame;
-}
-
-static void cont_init(void)
-{
-#if LV_USE_CONT != 0
-
- theme.style.cont = &def;
-#endif
-}
-
-static void btn_init(void)
-{
-#if LV_USE_BTN != 0
-
- theme.style.btn.rel = &light_frame;
- theme.style.btn.pr = &dark_frame;
- theme.style.btn.tgl_rel = &dark_frame;
- theme.style.btn.tgl_pr = &light_frame;
- theme.style.btn.ina = &light_frame;
-#endif
-}
-
-static void label_init(void)
-{
-#if LV_USE_LABEL != 0
-
- theme.style.label.prim = NULL;
- theme.style.label.sec = NULL;
- theme.style.label.hint = NULL;
-#endif
-}
-
-static void img_init(void)
-{
-#if LV_USE_IMG != 0
-
- theme.style.img.light = &def;
- theme.style.img.dark = &def;
-#endif
-}
-
-static void line_init(void)
-{
-#if LV_USE_LINE != 0
- theme.style.line.decor = NULL;
-#endif
-}
-
-static void led_init(void)
-{
-#if LV_USE_LED != 0
- static lv_style_t led;
- lv_style_copy(&led, &light_frame);
- led.body.radius = LV_RADIUS_CIRCLE;
- led.body.shadow.width = LV_DPI / 8;
- led.body.shadow.color = LV_COLOR_BLACK;
- led.body.shadow.type = LV_SHADOW_FULL;
-
- theme.style.led = &led;
-#endif
-}
-
-static void bar_init(void)
-{
-#if LV_USE_BAR
- static lv_style_t bar_bg;
- static lv_style_t bar_indic;
-
- lv_style_copy(&bar_bg, &light_frame);
- bar_bg.body.padding.left = LV_DPI / 15;
- bar_bg.body.padding.right = LV_DPI / 15;
- bar_bg.body.padding.top = LV_DPI / 15;
- bar_bg.body.padding.bottom = LV_DPI / 15;
- bar_bg.body.radius = LV_RADIUS_CIRCLE;
-
- lv_style_copy(&bar_indic, &dark_frame);
- bar_indic.body.padding.left = LV_DPI / 30;
- bar_indic.body.padding.right = LV_DPI / 30;
- bar_indic.body.padding.top = LV_DPI / 30;
- bar_indic.body.padding.bottom = LV_DPI / 30;
- bar_indic.body.radius = LV_RADIUS_CIRCLE;
-
- theme.style.bar.bg = &bar_bg;
- theme.style.bar.indic = &bar_indic;
-#endif
-}
-
-static void slider_init(void)
-{
-#if LV_USE_SLIDER != 0
- static lv_style_t slider_knob;
- lv_style_copy(&slider_knob, &light_frame);
- slider_knob.body.radius = LV_RADIUS_CIRCLE;
- slider_knob.body.padding.left = LV_DPI / 30;
- slider_knob.body.padding.right = LV_DPI / 30;
- slider_knob.body.padding.top = LV_DPI / 30;
- slider_knob.body.padding.bottom = LV_DPI / 30;
-
- theme.style.slider.bg = theme.style.bar.bg;
- theme.style.slider.indic = theme.style.bar.indic;
- theme.style.slider.knob = &slider_knob;
-#endif
-}
-
-static void sw_init(void)
-{
-#if LV_USE_SW != 0
-
- theme.style.sw.bg = theme.style.slider.bg;
- theme.style.sw.indic = theme.style.slider.indic;
- theme.style.sw.knob_off = theme.style.slider.knob;
- theme.style.sw.knob_on = theme.style.slider.knob;
-#endif
-}
-
-static void lmeter_init(void)
-{
-#if LV_USE_LMETER != 0
- static lv_style_t lmeter_bg;
- lv_style_copy(&lmeter_bg, &light_frame);
- lmeter_bg.body.opa = LV_OPA_TRANSP;
- lmeter_bg.body.main_color = LV_COLOR_BLACK;
- lmeter_bg.body.grad_color = LV_COLOR_BLACK;
- lmeter_bg.body.padding.left = LV_DPI / 20;
- lmeter_bg.body.padding.inner = LV_DPI / 8;
- lmeter_bg.line.color = LV_COLOR_WHITE;
- lmeter_bg.line.width = 1;
-
- theme.style.lmeter = &lmeter_bg;
-#endif
-}
-
-static void gauge_init(void)
-{
-#if LV_USE_GAUGE != 0
- static lv_style_t gauge_bg;
- lv_style_copy(&gauge_bg, theme.style.lmeter);
- gauge_bg.line.color = LV_COLOR_BLACK;
- gauge_bg.line.width = 1;
-
- theme.style.gauge = &gauge_bg;
-#endif
-}
-
-static void chart_init(void)
-{
-#if LV_USE_CHART
- theme.style.chart = &light_frame;
-#endif
-}
-
-static void calendar_init(void)
-{
-#if LV_USE_CALENDAR
- static lv_style_t box;
- lv_style_copy(&box, &light_plain);
- box.body.padding.top = LV_DPI / 20;
- box.body.padding.bottom = LV_DPI / 20;
-
- /*Can't handle highlighted dates in this theme*/
- theme.style.calendar.week_box = &box;
- theme.style.calendar.today_box = &box;
-#endif
-}
-
-static void cb_init(void)
-{
-#if LV_USE_CB != 0
-
- theme.style.cb.bg = &lv_style_transp;
- theme.style.cb.box.rel = &light_frame;
- theme.style.cb.box.pr = &dark_frame;
- theme.style.cb.box.tgl_rel = &dark_frame;
- theme.style.cb.box.tgl_pr = &light_frame;
- theme.style.cb.box.ina = &light_frame;
-#endif
-}
-
-static void btnm_init(void)
-{
-#if LV_USE_BTNM
-
- theme.style.btnm.bg = &light_frame;
- theme.style.btnm.btn.rel = &light_frame;
- theme.style.btnm.btn.pr = &dark_frame;
- theme.style.btnm.btn.tgl_rel = &dark_frame;
- theme.style.btnm.btn.tgl_pr = &light_frame;
- theme.style.btnm.btn.ina = &light_frame;
-#endif
-}
-
-static void kb_init(void)
-{
-#if LV_USE_KB
- theme.style.kb.bg = &lv_style_transp_fit;
- theme.style.kb.btn.rel = &light_frame;
- theme.style.kb.btn.pr = &light_frame;
- theme.style.kb.btn.tgl_rel = &dark_frame;
- theme.style.kb.btn.tgl_pr = &dark_frame;
- theme.style.kb.btn.ina = &light_frame;
-#endif
-}
-
-static void mbox_init(void)
-{
-#if LV_USE_MBOX
-
- theme.style.mbox.bg = &dark_frame;
- theme.style.mbox.btn.bg = &lv_style_transp_fit;
- theme.style.mbox.btn.rel = &light_frame;
- theme.style.mbox.btn.pr = &dark_frame;
-#endif
-}
-
-static void page_init(void)
-{
-#if LV_USE_PAGE
-
- theme.style.page.bg = &light_frame;
- theme.style.page.scrl = &light_frame;
- theme.style.page.sb = &dark_frame;
-#endif
-}
-
-static void ta_init(void)
-{
-#if LV_USE_TA
-
- theme.style.ta.area = &light_frame;
- theme.style.ta.oneline = &light_frame;
- theme.style.ta.cursor = NULL; /*Let library to calculate the cursor's style*/
- theme.style.ta.sb = &dark_frame;
-#endif
-}
-
-static void list_init(void)
-{
-#if LV_USE_LIST != 0
-
- theme.style.list.sb = &dark_frame;
- theme.style.list.bg = &light_frame;
- theme.style.list.scrl = &lv_style_transp_fit;
- theme.style.list.btn.rel = &light_plain;
- theme.style.list.btn.pr = &dark_plain;
- theme.style.list.btn.tgl_rel = &dark_plain;
- theme.style.list.btn.tgl_pr = &light_plain;
- theme.style.list.btn.ina = &light_plain;
-#endif
-}
-
-static void ddlist_init(void)
-{
-#if LV_USE_DDLIST != 0
- static lv_style_t bg;
- lv_style_copy(&bg, &light_frame);
- bg.text.line_space = LV_DPI / 12;
-
- theme.style.ddlist.bg = &bg;
- theme.style.ddlist.sel = &dark_plain;
- theme.style.ddlist.sb = &dark_frame;
-#endif
-}
-
-static void roller_init(void)
-{
-#if LV_USE_ROLLER != 0
- static lv_style_t bg;
- lv_style_copy(&bg, &light_frame);
- bg.text.line_space = LV_DPI / 12;
-
- theme.style.roller.bg = &bg;
- theme.style.roller.sel = &dark_frame;
-#endif
-}
-
-static void tabview_init(void)
-{
-#if LV_USE_TABVIEW != 0
-
- theme.style.tabview.bg = &light_frame;
- theme.style.tabview.indic = &light_plain;
- theme.style.tabview.btn.bg = &lv_style_transp_fit;
- theme.style.tabview.btn.rel = &light_frame;
- theme.style.tabview.btn.pr = &dark_frame;
- theme.style.tabview.btn.tgl_rel = &dark_frame;
- theme.style.tabview.btn.tgl_pr = &light_frame;
-#endif
-}
-
-static void win_init(void)
-{
-#if LV_USE_WIN != 0
- static lv_style_t win_header;
- lv_style_copy(&win_header, &dark_plain);
- win_header.body.padding.left = LV_DPI / 30;
- win_header.body.padding.right = LV_DPI / 30;
- win_header.body.padding.top = LV_DPI / 30;
- win_header.body.padding.bottom = LV_DPI / 30;
-
- theme.style.win.bg = &light_frame;
- theme.style.win.sb = &dark_frame;
- theme.style.win.header = &win_header;
- theme.style.win.content = &lv_style_transp;
- theme.style.win.btn.rel = &light_frame;
- theme.style.win.btn.pr = &dark_frame;
-#endif
-}
-
-#if LV_USE_GROUP
-
-static void style_mod(lv_group_t * group, lv_style_t * style)
-{
- (void)group; /*Unused*/
-#if LV_COLOR_DEPTH != 1
- /*Make the style to be a little bit orange*/
- style->body.border.opa = LV_OPA_COVER;
- style->body.border.color = LV_COLOR_BLACK;
-
- /*If not empty or has border then emphasis the border*/
- if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20;
-#else
- style->body.border.opa = LV_OPA_COVER;
- style->body.border.color = LV_COLOR_BLACK;
- style->body.border.width = 2;
-#endif
-}
-
-static void style_mod_edit(lv_group_t * group, lv_style_t * style)
-{
- (void)group; /*Unused*/
-#if LV_COLOR_DEPTH != 1
- /*Make the style to be a little bit orange*/
- style->body.border.opa = LV_OPA_COVER;
- style->body.border.color = LV_COLOR_BLACK;
-
- /*If not empty or has border then emphasis the border*/
- if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20;
-#else
- style->body.border.opa = LV_OPA_COVER;
- style->body.border.color = LV_COLOR_BLACK;
- style->body.border.width = 3;
-#endif
-}
-
-#endif /*LV_USE_GROUP*/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Initialize the mono theme
- * @param hue [0..360] hue value from HSV color space to define the theme's base color; is not used
- * in lv_theme_mono
- * @param font pointer to a font (NULL to use the default)
- * @return pointer to the initialized theme
- */
-lv_theme_t * lv_theme_mono_init(uint16_t hue, lv_font_t * font)
-{
-
- (void)hue; /*Unused*/
-
- if(font == NULL) font = LV_FONT_DEFAULT;
-
- _font = font;
-
- /*For backward compatibility initialize all theme elements with a default style */
- uint16_t i;
- lv_style_t ** style_p = (lv_style_t **)&theme.style;
- for(i = 0; i < LV_THEME_STYLE_COUNT; i++) {
- *style_p = &def;
- style_p++;
- }
-
- basic_init();
- cont_init();
- btn_init();
- label_init();
- img_init();
- line_init();
- led_init();
- bar_init();
- slider_init();
- sw_init();
- lmeter_init();
- gauge_init();
- chart_init();
- calendar_init();
- cb_init();
- btnm_init();
- kb_init();
- mbox_init();
- page_init();
- ta_init();
- list_init();
- ddlist_init();
- roller_init();
- tabview_init();
- win_init();
-
-#if LV_USE_GROUP
- theme.group.style_mod_xcb = style_mod;
- theme.group.style_mod_edit_xcb = style_mod_edit;
-#endif
-
- return &theme;
-}
-
-/**
- * Get a pointer to the theme
- * @return pointer to the theme
- */
-lv_theme_t * lv_theme_get_mono(void)
-{
- return &theme;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-#endif
diff --git a/src/libs/lvgl/src/lv_themes/lv_theme_mono.h b/src/libs/lvgl/src/lv_themes/lv_theme_mono.h
deleted file mode 100644
index 6730d1e9..00000000
--- a/src/libs/lvgl/src/lv_themes/lv_theme_mono.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * @file lv_theme_mono.h
- *
- */
-
-#ifndef LV_THEME_MONO_H
-#define LV_THEME_MONO_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_THEME_MONO
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Initialize the mono theme
- * @param hue [0..360] hue value from HSV color space to define the theme's base color
- * @param font pointer to a font (NULL to use the default)
- * @return pointer to the initialized theme
- */
-lv_theme_t * lv_theme_mono_init(uint16_t hue, lv_font_t * font);
-
-/**
- * Get a pointer to the theme
- * @return pointer to the theme
- */
-lv_theme_t * lv_theme_get_mono(void);
-
-/**********************
- * MACROS
- **********************/
-
-#endif
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_THEME_MONO_H*/
diff --git a/src/libs/lvgl/src/lv_themes/lv_theme_nemo.c b/src/libs/lvgl/src/lv_themes/lv_theme_nemo.c
deleted file mode 100644
index 564c232b..00000000
--- a/src/libs/lvgl/src/lv_themes/lv_theme_nemo.c
+++ /dev/null
@@ -1,929 +0,0 @@
-/**
- * @file lv_theme_nemo.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_theme.h"
-
-#if LV_USE_THEME_NEMO
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-
-/**********************
- * STATIC VARIABLES
- **********************/
-
-static uint16_t _hue;
-static lv_font_t * _font;
-static lv_font_t * _font;
-static lv_font_t * _font;
-
-static lv_theme_t theme;
-static lv_style_t def;
-static lv_style_t bg;
-static lv_style_t scr;
-static lv_style_t panel; /*General fancy background (e.g. to chart or ta)*/
-static lv_style_t sb;
-static lv_style_t btn_rel, btn_pr, btn_trel, btn_tpr, btn_ina;
-
-#if LV_USE_BAR
-static lv_style_t bar_bg, bar_indic;
-#endif
-
-#if LV_USE_SLIDER
-static lv_style_t slider_knob;
-#endif
-
-#if LV_USE_LMETER
-static lv_style_t lmeter_bg;
-#endif
-
-#if LV_USE_DDLIST
-static lv_style_t ddlist_bg, ddlist_sel;
-#endif
-
-#if LV_USE_BTNM
-static lv_style_t btnm_bg, btnm_rel, btnm_pr, btnm_trel, btnm_ina;
-#endif
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-static void basic_init(void)
-{
- /*Default*/
- lv_style_copy(&def, &lv_style_plain);
- def.body.opa = LV_OPA_COVER;
- def.glass = 0;
-
- def.body.main_color = lv_color_hex3(0x222);
- def.body.grad_color = lv_color_hex3(0x222);
- def.body.radius = 0;
- def.body.padding.left = LV_DPI / 8;
- def.body.padding.right = LV_DPI / 8;
- def.body.padding.top = LV_DPI / 8;
- def.body.padding.bottom = LV_DPI / 8;
- def.body.padding.inner = LV_DPI / 8;
- def.body.border.color = LV_COLOR_SILVER;
- def.body.border.width = 1;
- def.body.border.opa = LV_OPA_COVER;
- def.body.shadow.color = LV_COLOR_SILVER;
- def.body.shadow.width = 0;
- def.body.shadow.type = LV_SHADOW_FULL;
-
- def.text.color = lv_color_hex3(0xDDD);
- def.text.font = _font;
- def.text.letter_space = 1;
- def.text.line_space = 2;
-
- def.image.color = lv_color_hex3(0xDDD);
- def.image.intense = LV_OPA_TRANSP;
-
- def.line.color = lv_color_hex3(0xDDD);
- def.line.width = 1;
-
- /*Background*/
- lv_style_copy(&bg, &def);
- bg.body.main_color = lv_color_hex3(0x005);
- bg.body.grad_color = lv_color_hex3(0x045);
- bg.body.border.width = 2;
- bg.body.border.color = lv_color_hex3(0x666);
- bg.body.shadow.color = LV_COLOR_SILVER;
-
- lv_style_copy(&scr, &bg);
- scr.body.padding.bottom = 0;
- scr.body.padding.top = 0;
- scr.body.padding.left = 0;
- scr.body.padding.right = 0;
-
- /*Panel*/
- lv_style_copy(&panel, &def);
- panel.body.radius = LV_DPI / 10;
- panel.body.main_color = lv_color_hex3(0x500);
- panel.body.grad_color = lv_color_hex3(0x505);
- panel.body.border.color = lv_color_hex3(0xccc);
- panel.body.border.width = 2;
- panel.body.border.opa = LV_OPA_60;
- panel.text.color = lv_color_hsv_to_rgb(_hue, 8, 96);
- panel.line.color = lv_color_hsv_to_rgb(_hue, 20, 70);
-
- /*Scrollbar*/
- lv_style_copy(&sb, &def);
- sb.body.opa = LV_OPA_50;
- sb.body.radius = LV_RADIUS_CIRCLE;
- sb.body.border.color = LV_COLOR_SILVER;
- sb.body.border.opa = LV_OPA_40;
- sb.body.border.width = 1;
- sb.body.main_color = lv_color_hsv_to_rgb(_hue, 33, 92);
- sb.body.grad_color = lv_color_hsv_to_rgb(_hue, 33, 92);
- sb.body.padding.left = 1;
- sb.body.padding.right = 1;
- sb.body.padding.top = 1;
- sb.body.padding.bottom = 1;
- sb.body.padding.inner = LV_DPI / 15; /*Scrollbar width*/
-
- theme.style.bg = &bg;
- theme.style.scr = &scr;
- theme.style.panel = &panel;
-}
-
-static void btn_init(void)
-{
-#if LV_USE_BTN != 0
- lv_style_copy(&btn_rel, &def);
- btn_rel.glass = 0;
- btn_rel.body.opa = LV_OPA_TRANSP;
- btn_rel.body.radius = LV_RADIUS_CIRCLE;
- btn_rel.body.border.width = 2;
- btn_rel.body.border.color = lv_color_hsv_to_rgb(_hue, 70, 90);
- btn_rel.body.border.opa = LV_OPA_80;
- btn_rel.body.padding.left = LV_DPI / 4;
- btn_rel.body.padding.right = LV_DPI / 4;
- btn_rel.body.padding.top = LV_DPI / 6;
- btn_rel.body.padding.bottom = LV_DPI / 6;
- btn_rel.body.padding.inner = LV_DPI / 10;
- btn_rel.text.color = lv_color_hsv_to_rgb(_hue, 8, 96);
- btn_rel.text.font = _font;
-
- lv_style_copy(&btn_pr, &btn_rel);
- btn_pr.body.opa = LV_OPA_COVER;
- btn_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 50, 50);
- btn_pr.body.grad_color = lv_color_hsv_to_rgb(_hue, 50, 50);
- btn_pr.body.border.opa = LV_OPA_60;
- btn_pr.text.font = _font;
- btn_pr.text.color = lv_color_hsv_to_rgb(_hue, 10, 100);
-
- lv_style_copy(&btn_trel, &btn_pr);
- btn_trel.body.opa = LV_OPA_COVER;
- btn_trel.body.main_color = lv_color_hsv_to_rgb(_hue, 50, 60);
- btn_trel.body.grad_color = lv_color_hsv_to_rgb(_hue, 50, 60);
- btn_trel.body.border.opa = LV_OPA_60;
- btn_trel.body.border.color = lv_color_hsv_to_rgb(_hue, 80, 90);
- btn_trel.text.font = _font;
- btn_trel.text.color = lv_color_hsv_to_rgb(_hue, 0, 100);
-
- lv_style_copy(&btn_tpr, &btn_trel);
- btn_tpr.body.opa = LV_OPA_COVER;
- btn_tpr.body.main_color = lv_color_hsv_to_rgb(_hue, 50, 50);
- btn_tpr.body.grad_color = lv_color_hsv_to_rgb(_hue, 50, 50);
- btn_tpr.body.border.opa = LV_OPA_60;
- btn_tpr.body.border.color = lv_color_hsv_to_rgb(_hue, 80, 70);
- btn_tpr.text.font = _font;
- btn_tpr.text.color = lv_color_hsv_to_rgb(_hue, 10, 90);
-
- lv_style_copy(&btn_ina, &btn_rel);
- btn_ina.body.border.opa = LV_OPA_60;
- btn_ina.body.border.color = lv_color_hsv_to_rgb(_hue, 10, 50);
- btn_ina.text.font = _font;
- btn_ina.text.color = lv_color_hsv_to_rgb(_hue, 10, 90);
-
- theme.style.btn.rel = &btn_rel;
- theme.style.btn.pr = &btn_pr;
- theme.style.btn.tgl_rel = &btn_trel;
- theme.style.btn.tgl_pr = &btn_tpr;
- theme.style.btn.ina = &btn_ina;
-#endif
-}
-
-static void label_init(void)
-{
-#if LV_USE_LABEL != 0
- static lv_style_t label_prim, label_sec, label_hint;
-
- lv_style_copy(&label_prim, &def);
- label_prim.text.font = _font;
- label_prim.text.color = lv_color_hsv_to_rgb(_hue, 5, 96);
-
- lv_style_copy(&label_sec, &label_prim);
- label_sec.text.color = lv_color_hsv_to_rgb(_hue, 40, 85);
-
- lv_style_copy(&label_hint, &label_prim);
- label_hint.text.color = lv_color_hsv_to_rgb(_hue, 20, 70);
-
- theme.style.label.prim = &label_prim;
- theme.style.label.sec = &label_sec;
- theme.style.label.hint = &label_hint;
-#endif
-}
-
-static void bar_init(void)
-{
-#if LV_USE_BAR
- lv_style_copy(&bar_bg, &def);
- bar_bg.body.opa = LV_OPA_30;
- bar_bg.body.radius = LV_RADIUS_CIRCLE;
- bar_bg.body.main_color = LV_COLOR_WHITE;
- bar_bg.body.grad_color = LV_COLOR_SILVER;
- bar_bg.body.border.width = 2;
- bar_bg.body.border.color = LV_COLOR_SILVER;
- bar_bg.body.border.opa = LV_OPA_20;
- bar_bg.body.padding.left = 0;
- bar_bg.body.padding.right = 0;
- bar_bg.body.padding.top = LV_DPI / 10;
- bar_bg.body.padding.bottom = LV_DPI / 10;
- bar_bg.body.padding.inner = 0;
-
- lv_style_copy(&bar_indic, &def);
- bar_indic.body.radius = LV_RADIUS_CIRCLE;
- bar_indic.body.border.width = 2;
- bar_indic.body.border.color = LV_COLOR_SILVER;
- bar_indic.body.border.opa = LV_OPA_70;
- bar_indic.body.padding.left = 0;
- bar_indic.body.padding.right = 0;
- bar_indic.body.padding.top = 0;
- bar_indic.body.padding.bottom = 0;
- bar_indic.body.shadow.width = LV_DPI / 20;
- bar_indic.body.shadow.color = lv_color_hsv_to_rgb(_hue, 20, 90);
- bar_indic.body.main_color = lv_color_hsv_to_rgb(_hue, 40, 80);
- bar_indic.body.grad_color = lv_color_hsv_to_rgb(_hue, 40, 80);
-
- theme.style.bar.bg = &bar_bg;
- theme.style.bar.indic = &bar_indic;
-#endif
-}
-
-static void img_init(void)
-{
-#if LV_USE_IMG != 0
- static lv_style_t img_light, img_dark;
- lv_style_copy(&img_light, &def);
- img_light.image.color = lv_color_hsv_to_rgb(_hue, 15, 85);
- img_light.image.intense = LV_OPA_80;
-
- lv_style_copy(&img_dark, &def);
- img_light.image.color = lv_color_hsv_to_rgb(_hue, 85, 65);
- img_light.image.intense = LV_OPA_80;
-
- theme.style.img.light = &img_light;
- theme.style.img.dark = &img_dark;
-#endif
-}
-
-static void line_init(void)
-{
-#if LV_USE_LINE != 0
- static lv_style_t line_decor;
- lv_style_copy(&line_decor, &def);
- line_decor.line.color = lv_color_hsv_to_rgb(_hue, 50, 50);
- line_decor.line.width = 1;
-
- theme.style.line.decor = &line_decor;
-#endif
-}
-
-static void led_init(void)
-{
-#if LV_USE_LED != 0
- static lv_style_t led;
- lv_style_copy(&led, &lv_style_pretty_color);
- led.body.shadow.width = LV_DPI / 10;
- led.body.radius = LV_RADIUS_CIRCLE;
- led.body.border.width = LV_DPI / 30;
- led.body.border.opa = LV_OPA_30;
- led.body.main_color = lv_color_hsv_to_rgb(_hue, 100, 100);
- led.body.grad_color = lv_color_hsv_to_rgb(_hue, 100, 40);
- led.body.border.color = lv_color_hsv_to_rgb(_hue, 60, 60);
- led.body.shadow.color = lv_color_hsv_to_rgb(_hue, 100, 100);
-
- theme.style.led = &led;
-#endif
-}
-
-static void slider_init(void)
-{
-#if LV_USE_SLIDER != 0
- lv_style_copy(&slider_knob, &def);
- slider_knob.body.opa = LV_OPA_60;
- slider_knob.body.radius = LV_RADIUS_CIRCLE;
- slider_knob.body.main_color = LV_COLOR_PURPLE;
- slider_knob.body.grad_color = LV_COLOR_SILVER;
- slider_knob.body.border.width = 2;
- slider_knob.body.border.color = LV_COLOR_ORANGE;
- slider_knob.body.border.opa = LV_OPA_50;
-
- theme.style.slider.bg = &bar_bg;
- theme.style.slider.indic = &bar_indic;
- theme.style.slider.knob = &slider_knob;
-#endif
-}
-
-static void sw_init(void)
-{
-#if LV_USE_SW != 0
- static lv_style_t sw_bg, sw_indic, sw_knob;
- lv_style_copy(&sw_bg, &bar_bg);
- sw_bg.body.opa = LV_OPA_COVER;
- sw_bg.body.padding.left = -2;
- sw_bg.body.padding.right = -2;
- sw_bg.body.padding.top = -2;
- sw_bg.body.padding.bottom = -2;
- sw_bg.body.main_color = lv_color_hex3(0x666);
- sw_bg.body.grad_color = lv_color_hex3(0x999);
- sw_bg.body.border.width = 2;
- sw_bg.body.border.opa = LV_OPA_50;
-
- lv_style_copy(&sw_indic, &bar_indic);
- sw_indic.body.shadow.width = LV_DPI / 20;
- sw_indic.body.padding.left = 0;
- sw_indic.body.padding.right = 0;
- sw_indic.body.padding.top = 0;
- sw_indic.body.padding.bottom = 0;
-
- lv_style_copy(&sw_knob, &slider_knob);
- sw_knob.body.opa = LV_OPA_80;
-
- theme.style.sw.bg = &sw_bg;
- theme.style.sw.indic = &sw_indic;
- theme.style.sw.knob_off = &sw_knob;
- theme.style.sw.knob_on = &sw_knob;
-#endif
-}
-
-static void lmeter_init(void)
-{
-#if LV_USE_LMETER != 0
- lv_style_copy(&lmeter_bg, &def);
- lmeter_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 70);
- lmeter_bg.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 80);
- lmeter_bg.body.padding.left = LV_DPI / 8; /*Scale line length*/
- lmeter_bg.line.color = lv_color_hex3(0x500);
- lmeter_bg.line.width = 2;
-
- theme.style.lmeter = &lmeter_bg;
-
-#endif
-}
-
-static void gauge_init(void)
-{
-#if LV_USE_GAUGE != 0
- static lv_style_t gauge_bg;
- lv_style_copy(&gauge_bg, &def);
- gauge_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 20, 100);
- gauge_bg.body.grad_color = gauge_bg.body.main_color;
- gauge_bg.body.padding.left = LV_DPI / 16; /*Scale line length*/
- gauge_bg.body.padding.right = LV_DPI / 16; /*Scale line length*/
- gauge_bg.body.padding.top = LV_DPI / 20; /*Needle center size*/
- gauge_bg.body.padding.bottom = LV_DPI / 20; /*Needle center size*/
- gauge_bg.body.padding.inner = LV_DPI / 12; /*Label - scale distance*/
- gauge_bg.body.border.color = lv_color_hex3(0x500);
- gauge_bg.line.color = lv_color_hsv_to_rgb(_hue, 80, 75);
- gauge_bg.line.width = 2;
- gauge_bg.text.color = lv_color_hsv_to_rgb(_hue, 10, 90);
- gauge_bg.text.font = _font;
-
- theme.style.gauge = &gauge_bg;
-#endif
-}
-
-static void arc_init(void)
-{
-#if LV_USE_ARC != 0
-
- static lv_style_t arc;
- lv_style_copy(&arc, &def);
- arc.line.width = 10;
- arc.line.color = lv_color_hsv_to_rgb(_hue, 70, 90);
- arc.line.rounded = 1;
-
- /*For preloader*/
- arc.body.border.width = 0;
-
- theme.style.arc = &arc;
-#endif
-}
-
-static void preload_init(void)
-{
-#if LV_USE_PRELOAD != 0
-
- theme.style.preload = theme.style.arc;
-#endif
-}
-
-static void chart_init(void)
-{
-#if LV_USE_CHART
- theme.style.chart = &panel;
-#endif
-}
-
-static void calendar_init(void)
-{
-#if LV_USE_CALENDAR != 0
- static lv_style_t ina_days;
- lv_style_copy(&ina_days, &def);
- ina_days.text.color = lv_color_hsv_to_rgb(_hue, 0, 50);
-
- static lv_style_t high_days;
- lv_style_copy(&high_days, &def);
- high_days.text.color = lv_color_hsv_to_rgb(_hue, 50, 90);
-
- static lv_style_t week_box;
- lv_style_copy(&week_box, &def);
- week_box.body.opa = LV_OPA_TRANSP;
- week_box.body.border.color = theme.style.panel->body.border.color;
- week_box.body.padding.top = LV_DPI / 20;
- week_box.body.padding.bottom = LV_DPI / 20;
-
- static lv_style_t today_box;
- lv_style_copy(&today_box, &def);
- today_box.body.main_color = LV_COLOR_WHITE;
- today_box.body.grad_color = LV_COLOR_WHITE;
- today_box.body.padding.top = LV_DPI / 20;
- today_box.body.padding.bottom = LV_DPI / 20;
- today_box.body.radius = 0;
-
- theme.style.calendar.bg = theme.style.panel;
- theme.style.calendar.header = theme.style.label.prim;
- theme.style.calendar.inactive_days = theme.style.label.hint;
- theme.style.calendar.highlighted_days = theme.style.label.sec;
- theme.style.calendar.week_box = &week_box;
- theme.style.calendar.today_box = &week_box;
- theme.style.calendar.header_pr = theme.style.label.prim;
-#endif
-}
-
-static void cb_init(void)
-{
-#if LV_USE_CB != 0
- static lv_style_t cb_bg, cb_rel, cb_pr, cb_trel, cb_tpr, cb_ina;
- lv_style_copy(&cb_rel, &bg);
- cb_rel.body.radius = LV_DPI / 20;
- cb_rel.body.border.width = 1;
- cb_rel.body.border.color = LV_COLOR_ORANGE;
- cb_rel.body.main_color = LV_COLOR_PURPLE;
- cb_rel.body.grad_color = LV_COLOR_SILVER;
-
- lv_style_copy(&cb_bg, &bg);
- cb_bg.body.opa = LV_OPA_TRANSP;
- cb_bg.body.border.width = 0;
- cb_bg.body.padding.inner = LV_DPI / 8;
- cb_bg.body.padding.left = 0;
- cb_bg.body.padding.right = 0;
- cb_bg.body.padding.top = 0;
- cb_bg.body.padding.bottom = 0;
- cb_bg.text.font = _font;
-
- lv_style_copy(&cb_pr, &cb_rel);
- cb_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 90);
- cb_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 82);
-
- lv_style_copy(&cb_trel, &cb_rel);
- cb_trel.body.border.width = 4;
- cb_trel.body.border.color = LV_COLOR_WHITE;
- cb_trel.body.border.opa = LV_OPA_60;
- cb_trel.body.main_color = lv_color_hsv_to_rgb(_hue, 50, 82);
- cb_trel.body.grad_color = lv_color_hsv_to_rgb(_hue, 50, 62);
-
- lv_style_copy(&cb_tpr, &cb_trel);
- cb_tpr.body.border.color = LV_COLOR_SILVER;
- cb_tpr.body.border.opa = LV_OPA_70;
- cb_tpr.body.main_color = lv_color_hsv_to_rgb(_hue, 50, 72);
- cb_tpr.body.grad_color = lv_color_hsv_to_rgb(_hue, 50, 52);
-
- lv_style_copy(&cb_ina, &cb_trel);
- cb_ina.body.border.width = 1;
- cb_ina.body.border.color = LV_COLOR_GRAY;
- cb_ina.body.main_color = LV_COLOR_PURPLE;
- cb_ina.body.grad_color = LV_COLOR_SILVER;
-
- theme.style.cb.bg = &cb_bg;
- theme.style.cb.box.rel = &cb_rel;
- theme.style.cb.box.pr = &cb_pr;
- theme.style.cb.box.tgl_rel = &cb_trel;
- theme.style.cb.box.tgl_pr = &cb_tpr;
- theme.style.cb.box.ina = &cb_ina;
-#endif
-}
-
-static void btnm_init(void)
-{
-#if LV_USE_BTNM
- lv_style_copy(&btnm_bg, &lv_style_transp_tight);
- btnm_bg.body.border.width = 1;
- btnm_bg.body.border.color = lv_color_hsv_to_rgb(_hue, 60, 80);
- btnm_bg.body.border.opa = LV_OPA_COVER;
- btnm_bg.body.radius = LV_DPI / 8;
-
- lv_style_copy(&btnm_rel, &lv_style_plain);
- btnm_rel.body.opa = LV_OPA_TRANSP;
- btnm_rel.body.radius = LV_DPI / 8;
- btnm_rel.text.color = lv_color_hsv_to_rgb(_hue, 60, 80);
- btnm_rel.text.font = _font;
-
- lv_style_copy(&btnm_pr, &lv_style_plain);
- btnm_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 40, 70);
- btnm_pr.body.grad_color = lv_color_hsv_to_rgb(_hue, 40, 70);
- btnm_pr.body.radius = LV_DPI / 8;
- btnm_pr.text.color = lv_color_hsv_to_rgb(_hue, 40, 40);
- btnm_pr.text.font = _font;
-
- lv_style_copy(&btnm_trel, &btnm_rel);
- btnm_trel.body.border.color = lv_color_hsv_to_rgb(_hue, 80, 80);
- btnm_trel.body.border.width = 3;
-
- lv_style_copy(&btnm_ina, &btnm_rel);
- btnm_ina.text.color = lv_color_hsv_to_rgb(_hue, 10, 60);
-
- theme.style.btnm.bg = &btnm_bg;
- theme.style.btnm.btn.rel = &btnm_rel;
- theme.style.btnm.btn.pr = &btnm_pr;
- theme.style.btnm.btn.tgl_rel = &btnm_trel;
- theme.style.btnm.btn.tgl_pr = &btnm_pr;
- theme.style.btnm.btn.ina = &btnm_ina;
-#endif
-}
-
-static void kb_init(void)
-{
-#if LV_USE_KB
- theme.style.kb.bg = &btnm_bg;
- theme.style.kb.btn.rel = &btnm_rel;
- theme.style.kb.btn.pr = &btnm_pr;
- theme.style.kb.btn.tgl_rel = &btnm_trel;
- theme.style.kb.btn.tgl_pr = &btnm_pr;
- theme.style.kb.btn.ina = &btnm_ina;
-#endif
-}
-
-static void mbox_init(void)
-{
-#if LV_USE_MBOX
- static lv_style_t mbox_bg;
- lv_style_copy(&mbox_bg, &panel);
- mbox_bg.body.shadow.width = LV_DPI / 12;
-
- theme.style.mbox.bg = &mbox_bg;
- theme.style.mbox.btn.bg = &lv_style_transp;
- theme.style.mbox.btn.rel = &btn_trel;
- theme.style.mbox.btn.pr = &btn_tpr;
-#endif
-}
-
-static void page_init(void)
-{
-#if LV_USE_PAGE
- theme.style.page.bg = &panel;
- theme.style.page.scrl = &lv_style_transp_fit;
- theme.style.page.sb = &sb;
-#endif
-}
-
-static void ta_init(void)
-{
-#if LV_USE_TA
- theme.style.ta.area = &panel;
- theme.style.ta.oneline = &panel;
- theme.style.ta.cursor = NULL;
- theme.style.ta.sb = &sb;
-#endif
-}
-
-static void spinbox_init(void)
-{
-#if LV_USE_SPINBOX
- theme.style.spinbox.bg = &panel;
- theme.style.spinbox.cursor = theme.style.ta.cursor;
- theme.style.spinbox.sb = theme.style.ta.sb;
-#endif
-}
-
-static void list_init(void)
-{
-#if LV_USE_LIST != 0
- static lv_style_t list_bg, list_rel, list_pr, list_trel, list_tpr, list_ina;
- lv_style_copy(&list_rel, &def);
- list_rel.body.opa = LV_OPA_TRANSP;
- list_rel.body.border.width = 1;
- list_rel.body.border.color = lv_color_hsv_to_rgb(_hue, 50, 85);
- list_rel.body.border.opa = LV_OPA_COVER;
- list_rel.text.color = lv_color_hsv_to_rgb(_hue, 10, 94);
- list_rel.text.font = _font;
-
- lv_style_copy(&list_pr, &list_rel);
- list_pr.body.opa = LV_OPA_COVER;
- list_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 34, 41);
- list_pr.body.grad_color = lv_color_hsv_to_rgb(_hue, 34, 41);
- list_pr.text.color = lv_color_hsv_to_rgb(_hue, 7, 96);
-
- lv_style_copy(&list_trel, &list_rel);
- lv_style_copy(&list_tpr, &list_pr);
- lv_style_copy(&list_ina, &def);
-
- lv_style_copy(&list_bg, &list_rel);
- list_bg.body.padding.left = 0;
- list_bg.body.padding.right = 0;
- list_bg.body.padding.top = 0;
- list_bg.body.padding.bottom = 0;
-
- theme.style.list.sb = &sb;
- theme.style.list.bg = &list_bg;
- theme.style.list.scrl = &lv_style_transp_tight;
- theme.style.list.btn.rel = &list_rel;
- theme.style.list.btn.pr = &list_pr;
- theme.style.list.btn.tgl_rel = &list_trel;
- theme.style.list.btn.tgl_pr = &list_tpr;
- theme.style.list.btn.ina = &list_ina;
-#endif
-}
-
-static void ddlist_init(void)
-{
-#if LV_USE_DDLIST != 0
- lv_style_copy(&ddlist_bg, &panel);
- ddlist_bg.text.line_space = LV_DPI / 8;
- ddlist_bg.body.padding.left = LV_DPI / 6;
- ddlist_bg.body.padding.right = LV_DPI / 6;
- ddlist_bg.body.padding.top = LV_DPI / 6;
- ddlist_bg.body.padding.bottom = LV_DPI / 6;
-
- lv_style_copy(&ddlist_sel, &panel);
- ddlist_sel.body.main_color = lv_color_hsv_to_rgb(_hue, 45, 70);
- ddlist_sel.body.grad_color = lv_color_hsv_to_rgb(_hue, 45, 70);
- ddlist_sel.body.opa = LV_OPA_COVER;
- ddlist_sel.body.radius = 0;
-
- theme.style.ddlist.bg = &ddlist_bg;
- theme.style.ddlist.sel = &ddlist_sel;
- theme.style.ddlist.sb = &sb;
-#endif
-}
-
-static void roller_init(void)
-{
-#if LV_USE_ROLLER != 0
- static lv_style_t roller_bg, roller_sel;
- lv_style_copy(&roller_bg, &ddlist_bg);
- roller_bg.text.line_space = LV_DPI / 6;
- roller_bg.body.radius = LV_DPI / 20;
- roller_bg.body.main_color = lv_color_hex3(0x500);
- roller_bg.body.grad_color = lv_color_hex3(0x005);
- roller_bg.body.border.opa = LV_OPA_30;
- roller_bg.text.opa = LV_OPA_70;
- roller_bg.text.color = lv_color_hsv_to_rgb(_hue, 20, 70);
- roller_bg.body.shadow.width = 0;
-
- lv_style_copy(&roller_sel, &panel);
- roller_sel.body.opa = LV_OPA_TRANSP;
- roller_sel.body.radius = 0;
- roller_sel.text.opa = LV_OPA_COVER;
- roller_sel.text.color = lv_color_hsv_to_rgb(_hue, 70, 95);
-
- theme.style.roller.bg = &roller_bg;
- theme.style.roller.sel = &roller_sel;
-#endif
-}
-
-static void tabview_init(void)
-{
-#if LV_USE_TABVIEW != 0
- static lv_style_t tab_rel, tab_pr, tab_trel, tab_tpr, tab_indic;
- lv_style_copy(&tab_rel, &def);
- tab_rel.body.main_color = lv_color_hex3(0x500);
- tab_rel.body.grad_color = lv_color_hex3(0x005);
- tab_rel.body.padding.left = 0;
- tab_rel.body.padding.right = 0;
- tab_rel.body.padding.top = LV_DPI / 6;
- tab_rel.body.padding.bottom = LV_DPI / 6;
- tab_rel.body.padding.inner = 0;
- tab_rel.body.border.width = 1;
- tab_rel.body.border.color = LV_COLOR_SILVER;
- tab_rel.body.border.opa = LV_OPA_40;
- tab_rel.text.color = lv_color_hex3(0xDDD);
- tab_rel.text.font = _font;
-
- lv_style_copy(&tab_pr, &tab_rel);
- tab_pr.body.main_color = lv_color_hex3(0x005);
- tab_pr.body.grad_color = lv_color_hex3(0x500);
-
- lv_style_copy(&tab_trel, &def);
- tab_trel.body.opa = LV_OPA_TRANSP;
- tab_trel.body.padding.left = 0;
- tab_trel.body.padding.right = 0;
- tab_trel.body.padding.top = LV_DPI / 6;
- tab_trel.body.padding.bottom = LV_DPI / 6;
- tab_trel.body.padding.inner = 0;
- tab_trel.body.border.width = 1;
- tab_trel.body.border.color = LV_COLOR_SILVER;
- tab_trel.body.border.opa = LV_OPA_40;
- tab_trel.text.color = lv_color_hsv_to_rgb(_hue, 10, 94);
- tab_trel.text.font = _font;
-
- lv_style_copy(&tab_tpr, &def);
- tab_tpr.body.main_color = LV_COLOR_GRAY;
- tab_tpr.body.grad_color = LV_COLOR_GRAY;
- tab_tpr.body.padding.left = 0;
- tab_tpr.body.padding.right = 0;
- tab_tpr.body.padding.top = LV_DPI / 6;
- tab_tpr.body.padding.bottom = LV_DPI / 6;
- tab_tpr.body.padding.inner = 0;
- tab_tpr.body.border.width = 1;
- tab_tpr.body.border.color = LV_COLOR_SILVER;
- tab_tpr.body.border.opa = LV_OPA_40;
- tab_tpr.text.color = lv_color_hsv_to_rgb(_hue, 10, 94);
- tab_tpr.text.font = _font;
-
- lv_style_copy(&tab_indic, &def);
- tab_indic.body.border.width = 0;
- tab_indic.body.main_color = lv_color_hsv_to_rgb(_hue, 80, 87);
- tab_indic.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 87);
- tab_indic.body.padding.inner = LV_DPI / 10; /*Indicator height*/
-
- theme.style.tabview.bg = &bg;
- theme.style.tabview.indic = &tab_indic;
- theme.style.tabview.btn.bg = &lv_style_transp_tight;
- theme.style.tabview.btn.rel = &tab_rel;
- theme.style.tabview.btn.pr = &tab_pr;
- theme.style.tabview.btn.tgl_rel = &tab_trel;
- theme.style.tabview.btn.tgl_pr = &tab_tpr;
-#endif
-}
-
-static void tileview_init(void)
-{
-#if LV_USE_TILEVIEW != 0
- theme.style.tileview.bg = &lv_style_transp_tight;
- theme.style.tileview.scrl = &lv_style_transp_tight;
- theme.style.tileview.sb = theme.style.page.sb;
-#endif
-}
-
-static void table_init(void)
-{
-#if LV_USE_TABLE != 0
- static lv_style_t cell;
- lv_style_copy(&cell, &panel);
- cell.body.radius = 0;
- cell.body.border.width = 1;
-
- theme.style.table.bg = &lv_style_transp_tight;
- theme.style.table.cell = &cell;
-#endif
-}
-
-static void win_init(void)
-{
-#if LV_USE_WIN != 0
- static lv_style_t win_header;
-
- lv_style_copy(&win_header, &panel);
- win_header.body.radius = 0;
- win_header.body.padding.left = LV_DPI / 12;
- win_header.body.padding.right = LV_DPI / 12;
- win_header.body.padding.top = LV_DPI / 20;
- win_header.body.padding.bottom = LV_DPI / 20;
- win_header.body.border.opa = panel.body.border.opa;
- win_header.body.border.width = panel.body.border.width;
- win_header.body.border.color = lv_color_hsv_to_rgb(_hue, 20, 80);
- win_header.text.color = lv_color_hsv_to_rgb(_hue, 5, 100);
-
- theme.style.win.bg = &bg;
- theme.style.win.sb = &sb;
- theme.style.win.header = &win_header;
- theme.style.win.content = &lv_style_transp;
- theme.style.win.btn.rel = &btn_rel;
- theme.style.win.btn.pr = &btn_pr;
-#endif
-}
-
-#if LV_USE_GROUP
-
-static void style_mod(lv_group_t * group, lv_style_t * style)
-{
- (void)group; /*Unused*/
-#if LV_COLOR_DEPTH != 1
- style->body.border.width = 2;
- style->body.border.color = LV_COLOR_SILVER;
- style->body.border.opa = LV_OPA_70;
- style->body.shadow.width = LV_DPI / 20;
- style->body.shadow.color = lv_color_hsv_to_rgb(_hue, 20, 90);
- style->body.main_color = lv_color_hsv_to_rgb(_hue, 40, 80);
- style->body.grad_color = lv_color_hsv_to_rgb(_hue, 40, 80);
-#else
- style->body.border.opa = LV_OPA_COVER;
- style->body.border.color = LV_COLOR_BLACK;
- style->body.border.width = 2;
-#endif
-}
-
-static void style_mod_edit(lv_group_t * group, lv_style_t * style)
-{
- (void)group; /*Unused*/
-#if LV_COLOR_DEPTH != 1
- /*Make the style to be a little bit orange*/
- style->body.border.opa = LV_OPA_COVER;
- style->body.border.color = LV_COLOR_GREEN;
-
- /*If not empty or has border then emphasis the border*/
- if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20;
-
- style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70);
- style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70);
- style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_GREEN, LV_OPA_60);
-
- style->text.color = lv_color_mix(style->text.color, LV_COLOR_GREEN, LV_OPA_70);
-#else
- style->body.border.opa = LV_OPA_COVER;
- style->body.border.color = LV_COLOR_BLACK;
- style->body.border.width = 3;
-#endif
-}
-
-#endif /*LV_USE_GROUP*/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Initialize the nemo theme
- * @param hue [0..360] hue value from HSV color space to define the theme's base color
- * @param font pointer to a font (NULL to use the default)
- * @return pointer to the initialized theme
- */
-lv_theme_t * lv_theme_nemo_init(uint16_t hue, lv_font_t * font)
-{
- if(font == NULL) font = LV_FONT_DEFAULT;
-
- _hue = hue;
- _font = font;
-
- /*For backward compatibility initialize all theme elements with a default style */
- uint16_t i;
- lv_style_t ** style_p = (lv_style_t **)&theme.style;
- for(i = 0; i < LV_THEME_STYLE_COUNT; i++) {
- *style_p = &def;
- style_p++;
- }
-
- basic_init();
- btn_init();
- label_init();
- bar_init();
- img_init();
- line_init();
- led_init();
- slider_init();
- sw_init();
- lmeter_init();
- gauge_init();
- arc_init();
- preload_init();
- chart_init();
- calendar_init();
- cb_init();
- btnm_init();
- kb_init();
- mbox_init();
- page_init();
- ta_init();
- spinbox_init();
- list_init();
- ddlist_init();
- roller_init();
- tabview_init();
- tileview_init();
- table_init();
- win_init();
-
-#if LV_USE_GROUP
- theme.group.style_mod_xcb = style_mod;
- theme.group.style_mod_edit_xcb = style_mod_edit;
-#endif
-
- return &theme;
-}
-
-/**
- * Get a pointer to the theme
- * @return pointer to the theme
- */
-lv_theme_t * lv_theme_get_nemo(void)
-{
- return &theme;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-#endif
diff --git a/src/libs/lvgl/src/lv_themes/lv_theme_nemo.h b/src/libs/lvgl/src/lv_themes/lv_theme_nemo.h
deleted file mode 100644
index 5464cbfd..00000000
--- a/src/libs/lvgl/src/lv_themes/lv_theme_nemo.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * @file lv_theme_nemo.h
- *
- */
-
-#ifndef LV_THEME_NEMO_H
-#define LV_THEME_NEMO_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_THEME_NEMO
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Initialize the material theme
- * @param hue [0..360] hue value from HSV color space to define the theme's base color
- * @param font pointer to a font (NULL to use the default)
- * @return pointer to the initialized theme
- */
-lv_theme_t * lv_theme_nemo_init(uint16_t hue, lv_font_t * font);
-
-/**
- * Get a pointer to the theme
- * @return pointer to the theme
- */
-lv_theme_t * lv_theme_get_nemo(void);
-
-/**********************
- * MACROS
- **********************/
-
-#endif
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_THEME_NEMO_H*/
diff --git a/src/libs/lvgl/src/lv_themes/lv_theme_night.c b/src/libs/lvgl/src/lv_themes/lv_theme_night.c
deleted file mode 100644
index c908939c..00000000
--- a/src/libs/lvgl/src/lv_themes/lv_theme_night.c
+++ /dev/null
@@ -1,847 +0,0 @@
-/**
- * @file lv_theme_night.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_theme.h"
-
-#if LV_USE_THEME_NIGHT
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_theme_t theme;
-static lv_style_t def;
-
-/*Static style definitions*/
-static lv_style_t scr, bg, sb, panel;
-static lv_style_t prim, sec, hint;
-
-/*Saved input parameters*/
-static uint16_t _hue;
-static lv_font_t * _font;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-static void basic_init(void)
-{
- lv_style_copy(&def, &lv_style_pretty); /*Initialize the default style*/
- def.text.font = _font;
-
- lv_style_copy(&bg, &lv_style_plain);
- bg.body.main_color = lv_color_hsv_to_rgb(_hue, 11, 30);
- bg.body.grad_color = lv_color_hsv_to_rgb(_hue, 11, 30);
- bg.text.color = lv_color_hsv_to_rgb(_hue, 5, 95);
- bg.text.font = _font;
- bg.image.color = lv_color_hsv_to_rgb(_hue, 5, 95);
-
- lv_style_copy(&scr, &bg);
- scr.body.padding.bottom = 0;
- scr.body.padding.top = 0;
- scr.body.padding.left = 0;
- scr.body.padding.right = 0;
-
- lv_style_copy(&sb, &def);
- sb.body.main_color = lv_color_hsv_to_rgb(_hue, 30, 60);
- sb.body.grad_color = lv_color_hsv_to_rgb(_hue, 30, 60);
- sb.body.border.width = 0;
- sb.body.padding.inner = LV_DPI / 20;
- sb.body.padding.left = 0;
- sb.body.padding.right = 0;
- sb.body.padding.top = 0;
- sb.body.padding.bottom = 0;
- sb.body.radius = LV_DPI / 30;
- sb.body.opa = LV_OPA_COVER;
-
- lv_style_copy(&panel, &bg);
- panel.body.main_color = lv_color_hsv_to_rgb(_hue, 11, 18);
- panel.body.grad_color = lv_color_hsv_to_rgb(_hue, 11, 18);
- panel.body.radius = LV_DPI / 20;
- panel.body.border.color = lv_color_hsv_to_rgb(_hue, 10, 25);
- panel.body.border.width = 1;
- panel.body.border.opa = LV_OPA_COVER;
- panel.body.padding.left = LV_DPI / 10;
- panel.body.padding.right = LV_DPI / 10;
- panel.body.padding.top = LV_DPI / 10;
- panel.body.padding.bottom = LV_DPI / 10;
- panel.line.color = lv_color_hsv_to_rgb(_hue, 20, 40);
- panel.line.width = 1;
-
- theme.style.scr = &scr;
- theme.style.bg = &bg;
- theme.style.panel = &def;
-}
-
-static void cont_init(void)
-{
-#if LV_USE_CONT != 0
-
- theme.style.cont = &panel;
-#endif
-}
-static void btn_init(void)
-{
-#if LV_USE_BTN != 0
- static lv_style_t btn_rel, btn_pr, btn_tgl_rel, btn_tgl_pr, btn_ina;
-
- lv_style_copy(&btn_rel, &def);
- btn_rel.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 40);
- btn_rel.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 20);
- btn_rel.body.border.color = lv_color_hex3(0x111);
- btn_rel.body.border.width = 1;
- btn_rel.body.border.opa = LV_OPA_70;
- btn_rel.body.padding.left = LV_DPI / 4;
- btn_rel.body.padding.right = LV_DPI / 4;
- btn_rel.body.padding.top = LV_DPI / 8;
- btn_rel.body.padding.bottom = LV_DPI / 8;
- btn_rel.body.shadow.type = LV_SHADOW_BOTTOM;
- btn_rel.body.shadow.color = lv_color_hex3(0x111);
- btn_rel.body.shadow.width = LV_DPI / 30;
- btn_rel.text.color = lv_color_hex3(0xeee);
- btn_rel.image.color = lv_color_hex3(0xeee);
-
- lv_style_copy(&btn_pr, &btn_rel);
- btn_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 30);
- btn_pr.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 10);
-
- lv_style_copy(&btn_tgl_rel, &btn_rel);
- btn_tgl_rel.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 20);
- btn_tgl_rel.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 40);
- btn_tgl_rel.body.shadow.width = LV_DPI / 40;
- btn_tgl_rel.text.color = lv_color_hex3(0xddd);
- btn_tgl_rel.image.color = lv_color_hex3(0xddd);
-
- lv_style_copy(&btn_tgl_pr, &btn_rel);
- btn_tgl_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 10);
- btn_tgl_pr.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 30);
- btn_tgl_pr.body.shadow.width = LV_DPI / 30;
- btn_tgl_pr.text.color = lv_color_hex3(0xddd);
- btn_tgl_pr.image.color = lv_color_hex3(0xddd);
-
- lv_style_copy(&btn_ina, &btn_rel);
- btn_ina.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 20);
- btn_ina.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 20);
- btn_ina.body.shadow.width = 0;
- btn_ina.text.color = lv_color_hex3(0xaaa);
- btn_ina.image.color = lv_color_hex3(0xaaa);
-
- theme.style.btn.rel = &btn_rel;
- theme.style.btn.pr = &btn_pr;
- theme.style.btn.tgl_rel = &btn_tgl_rel;
- theme.style.btn.tgl_pr = &btn_tgl_pr;
- theme.style.btn.ina = &btn_ina;
-#endif
-}
-
-static void label_init(void)
-{
-#if LV_USE_LABEL != 0
-
- lv_style_copy(&prim, &bg);
- prim.text.color = lv_color_hsv_to_rgb(_hue, 5, 95);
-
- lv_style_copy(&sec, &bg);
- sec.text.color = lv_color_hsv_to_rgb(_hue, 15, 65);
-
- lv_style_copy(&hint, &bg);
- hint.text.color = lv_color_hsv_to_rgb(_hue, 20, 55);
-
- theme.style.label.prim = &prim;
- theme.style.label.sec = &sec;
- theme.style.label.hint = &hint;
-#endif
-}
-
-static void line_init(void)
-{
-#if LV_USE_LINE != 0
-
- theme.style.line.decor = &def;
-#endif
-}
-
-static void led_init(void)
-{
-#if LV_USE_LED != 0
- static lv_style_t led;
- lv_style_copy(&led, &def);
- led.body.shadow.width = LV_DPI / 10;
- led.body.radius = LV_RADIUS_CIRCLE;
- led.body.border.width = LV_DPI / 30;
- led.body.border.opa = LV_OPA_30;
- led.body.main_color = lv_color_hsv_to_rgb(_hue, 100, 100);
- led.body.grad_color = lv_color_hsv_to_rgb(_hue, 100, 40);
- led.body.border.color = lv_color_hsv_to_rgb(_hue, 60, 60);
- led.body.shadow.color = lv_color_hsv_to_rgb(_hue, 100, 100);
-
- theme.style.led = &led;
-#endif
-}
-
-static void img_init(void)
-{
-#if LV_USE_IMG != 0
-
- theme.style.img.light = &def;
- theme.style.img.dark = &def;
-#endif
-}
-
-static void bar_init(void)
-{
-#if LV_USE_BAR
- static lv_style_t bar_bg, bar_indic;
- lv_style_copy(&bar_bg, &panel);
- bar_bg.body.padding.left = LV_DPI / 16;
- bar_bg.body.padding.right = LV_DPI / 16;
- bar_bg.body.padding.top = LV_DPI / 16;
- bar_bg.body.padding.bottom = LV_DPI / 16;
- bar_bg.body.radius = LV_RADIUS_CIRCLE;
-
- lv_style_copy(&bar_indic, &def);
- bar_indic.body.main_color = lv_color_hsv_to_rgb(_hue, 80, 70);
- bar_indic.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 70);
- bar_indic.body.border.color = lv_color_hsv_to_rgb(_hue, 20, 15);
- bar_indic.body.border.width = 1;
- bar_indic.body.border.opa = LV_OPA_COVER;
- bar_indic.body.radius = LV_RADIUS_CIRCLE;
- bar_indic.body.padding.left = 0;
- bar_indic.body.padding.right = 0;
- bar_indic.body.padding.top = 0;
- bar_indic.body.padding.bottom = 0;
-
- theme.style.bar.bg = &bar_bg;
- theme.style.bar.indic = &bar_indic;
-#endif
-}
-
-static void slider_init(void)
-{
-#if LV_USE_SLIDER != 0
- static lv_style_t slider_knob;
- lv_style_copy(&slider_knob, theme.style.btn.rel);
- slider_knob.body.radius = LV_RADIUS_CIRCLE;
-
- theme.style.slider.bg = theme.style.bar.bg;
- theme.style.slider.indic = theme.style.bar.indic;
- theme.style.slider.knob = &slider_knob;
-#endif
-}
-
-static void sw_init(void)
-{
-#if LV_USE_SW != 0
-
- theme.style.sw.bg = theme.style.bar.bg;
- theme.style.sw.indic = theme.style.bar.indic;
- theme.style.sw.knob_off = theme.style.slider.knob;
- theme.style.sw.knob_on = theme.style.slider.knob;
-#endif
-}
-
-static void lmeter_init(void)
-{
-#if LV_USE_LMETER != 0
- static lv_style_t lmeter_bg;
- lv_style_copy(&lmeter_bg, &def);
- lmeter_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 70);
- lmeter_bg.body.grad_color = lv_color_hsv_to_rgb(_hue, 95, 90);
- lmeter_bg.body.padding.left = LV_DPI / 10; /*Scale line length*/
- lmeter_bg.body.padding.inner = LV_DPI / 10; /*Text padding*/
- lmeter_bg.body.border.color = lv_color_hex3(0x333);
- lmeter_bg.line.color = lv_color_hex3(0x555);
- lmeter_bg.line.width = 1;
- lmeter_bg.text.color = lv_color_hex3(0xddd);
-
- theme.style.lmeter = &lmeter_bg;
-#endif
-}
-
-static void gauge_init(void)
-{
-#if LV_USE_GAUGE != 0
- static lv_style_t gauge_bg;
- lv_style_copy(&gauge_bg, &def);
- gauge_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 70);
- gauge_bg.body.grad_color = gauge_bg.body.main_color;
- gauge_bg.line.color = lv_color_hsv_to_rgb(_hue, 80, 75);
- gauge_bg.line.width = 1;
- gauge_bg.text.color = lv_color_hex3(0xddd);
-
- theme.style.gauge = &gauge_bg;
-#endif
-}
-
-static void arc_init(void)
-{
-#if LV_USE_ARC != 0
-
- static lv_style_t arc;
- lv_style_copy(&arc, &def);
- arc.line.width = 8;
- arc.line.color = lv_color_hsv_to_rgb(_hue, 80, 70);
- arc.line.rounded = 1;
-
- /*For preloader*/
- arc.body.border.width = 7;
- arc.body.border.color = lv_color_hsv_to_rgb(_hue, 11, 48);
- arc.body.padding.left = 1;
- arc.body.padding.right = 1;
- arc.body.padding.top = 1;
- arc.body.padding.bottom = 1;
-
- theme.style.arc = &arc;
-#endif
-}
-
-static void preload_init(void)
-{
-#if LV_USE_PRELOAD != 0
-
- theme.style.preload = theme.style.arc;
-#endif
-}
-
-static void chart_init(void)
-{
-#if LV_USE_CHART
- theme.style.chart = &panel;
-#endif
-}
-
-static void calendar_init(void)
-{
-#if LV_USE_CALENDAR
- static lv_style_t cal_bg;
- lv_style_copy(&cal_bg, &bg);
- cal_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 40);
- cal_bg.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 40);
- cal_bg.body.border.color = lv_color_hex3(0x333);
- cal_bg.body.border.width = 1;
- cal_bg.body.radius = LV_DPI / 20;
- cal_bg.body.padding.left = LV_DPI / 10;
- cal_bg.body.padding.right = LV_DPI / 10;
- cal_bg.body.padding.top = LV_DPI / 10;
- cal_bg.body.padding.bottom = LV_DPI / 10;
-
- static lv_style_t cal_header;
- lv_style_copy(&cal_header, &bg);
- cal_header.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 20);
- cal_header.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 20);
- cal_header.body.radius = 0;
- cal_header.body.border.width = 1;
- cal_header.body.border.color = lv_color_hex3(0x333);
- cal_header.body.padding.left = LV_DPI / 10;
- cal_header.body.padding.right = LV_DPI / 10;
- cal_header.body.padding.top = LV_DPI / 10;
- cal_header.body.padding.bottom = LV_DPI / 10;
-
- static lv_style_t week_box;
- lv_style_copy(&week_box, &panel);
- week_box.body.main_color = lv_color_hsv_to_rgb(_hue, 30, 45);
- week_box.body.grad_color = lv_color_hsv_to_rgb(_hue, 30, 45);
- week_box.body.radius = LV_DPI / 20;
- week_box.body.border.width = 1;
- week_box.body.padding.left = LV_DPI / 20;
- week_box.body.padding.right = LV_DPI / 20;
- week_box.body.padding.top = LV_DPI / 25;
- week_box.body.padding.bottom = LV_DPI / 25;
-
- static lv_style_t today_box;
- lv_style_copy(&today_box, &week_box);
- today_box.body.main_color = lv_color_hsv_to_rgb(_hue, 80, 70);
- today_box.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 70);
- today_box.body.radius = LV_DPI / 20;
- today_box.body.padding.left = LV_DPI / 14;
- today_box.body.padding.right = LV_DPI / 14;
- today_box.body.padding.top = LV_DPI / 14;
- today_box.body.padding.bottom = LV_DPI / 14;
-
- static lv_style_t highlighted_days;
- lv_style_copy(&highlighted_days, &bg);
- highlighted_days.text.color = lv_color_hsv_to_rgb(_hue, 40, 80);
-
- static lv_style_t ina_days;
- lv_style_copy(&ina_days, &bg);
- ina_days.text.color = lv_color_hsv_to_rgb(_hue, 0, 60);
-
- theme.style.calendar.bg = &cal_bg;
- theme.style.calendar.header = &cal_header;
- theme.style.calendar.week_box = &week_box;
- theme.style.calendar.today_box = &today_box;
- theme.style.calendar.highlighted_days = &highlighted_days;
- theme.style.calendar.day_names = &cal_bg;
- theme.style.calendar.inactive_days = &ina_days;
-#endif
-}
-
-static void cb_init(void)
-{
-#if LV_USE_CB != 0
-
- static lv_style_t rel, pr, tgl_rel, tgl_pr, ina;
-
- lv_style_copy(&rel, &def);
- rel.body.radius = LV_DPI / 20;
- rel.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 95);
- rel.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 95);
- rel.body.border.color = lv_color_hsv_to_rgb(_hue, 10, 50);
- rel.body.border.width = 2;
- ;
-
- lv_style_copy(&pr, &rel);
- pr.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 80);
- pr.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 80);
- pr.body.border.color = lv_color_hsv_to_rgb(_hue, 10, 20);
- pr.body.border.width = 1;
- ;
-
- lv_style_copy(&tgl_rel, &rel);
- tgl_rel.body.main_color = lv_color_hsv_to_rgb(_hue, 80, 90);
- tgl_rel.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 90);
- tgl_rel.body.border.color = lv_color_hsv_to_rgb(_hue, 80, 50);
-
- lv_style_copy(&tgl_pr, &tgl_rel);
- tgl_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 80, 70);
- tgl_pr.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 70);
- tgl_pr.body.border.color = lv_color_hsv_to_rgb(_hue, 80, 30);
- tgl_pr.body.border.width = 1;
- ;
-
- lv_style_copy(&ina, &rel);
- ina.body.main_color = lv_color_hex3(0x777);
- ina.body.grad_color = lv_color_hex3(0x777);
- ina.body.border.width = 0;
-
- theme.style.cb.bg = &lv_style_transp;
- theme.style.cb.box.rel = &rel;
- theme.style.cb.box.pr = &pr;
- theme.style.cb.box.tgl_rel = &tgl_rel;
- theme.style.cb.box.tgl_pr = &tgl_pr;
- theme.style.cb.box.ina = &def;
-#endif
-}
-
-static void btnm_init(void)
-{
-#if LV_USE_BTNM
- static lv_style_t btnm_bg, rel, pr, tgl_rel, tgl_pr, ina;
-
- lv_style_copy(&btnm_bg, theme.style.btn.rel);
- btnm_bg.body.padding.left = 2;
- btnm_bg.body.padding.right = 2;
- btnm_bg.body.padding.top = 2;
- btnm_bg.body.padding.bottom = 2;
- btnm_bg.body.padding.inner = 0;
- btnm_bg.body.border.width = 1;
-
- lv_style_copy(&rel, theme.style.btn.rel);
- rel.body.border.part = LV_BORDER_FULL | LV_BORDER_INTERNAL;
- rel.body.border.width = 1;
- rel.body.radius = 2;
-
- lv_style_copy(&pr, theme.style.btn.pr);
- pr.body.border.part = rel.body.border.part;
- pr.body.border.width = rel.body.border.width;
- pr.body.radius = rel.body.radius;
-
- lv_style_copy(&tgl_rel, theme.style.btn.tgl_rel);
- tgl_rel.body.border.part = rel.body.border.part;
- tgl_rel.body.border.width = rel.body.border.width;
- tgl_rel.body.radius = rel.body.radius;
-
- lv_style_copy(&tgl_pr, theme.style.btn.pr);
- tgl_pr.body.border.part = rel.body.border.part;
- tgl_pr.body.border.width = rel.body.border.width;
- tgl_pr.body.radius = rel.body.radius;
-
- lv_style_copy(&ina, theme.style.btn.ina);
- ina.body.border.part = rel.body.border.part;
- ina.body.border.width = rel.body.border.width;
- ina.body.radius = rel.body.radius;
-
- theme.style.btnm.bg = &btnm_bg;
- theme.style.btnm.btn.rel = &rel;
- theme.style.btnm.btn.pr = &pr;
- theme.style.btnm.btn.tgl_rel = &tgl_rel;
- theme.style.btnm.btn.tgl_pr = &tgl_pr;
- theme.style.btnm.btn.ina = &ina;
-#endif
-}
-
-static void kb_init(void)
-{
-#if LV_USE_KB
- theme.style.kb.bg = &bg;
- theme.style.kb.btn.rel = theme.style.btn.rel;
- theme.style.kb.btn.pr = theme.style.btn.pr;
- theme.style.kb.btn.tgl_rel = theme.style.btn.tgl_rel;
- theme.style.kb.btn.tgl_pr = theme.style.btn.tgl_pr;
- theme.style.kb.btn.ina = theme.style.btn.ina;
-#endif
-}
-
-static void mbox_init(void)
-{
-#if LV_USE_MBOX
- static lv_style_t mbox_bg;
- lv_style_copy(&mbox_bg, &bg);
- mbox_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 30, 30);
- mbox_bg.body.grad_color = lv_color_hsv_to_rgb(_hue, 30, 30);
- mbox_bg.body.border.color = lv_color_hsv_to_rgb(_hue, 11, 20);
- mbox_bg.body.border.width = 1;
- mbox_bg.body.shadow.width = LV_DPI / 10;
- mbox_bg.body.shadow.color = lv_color_hex3(0x222);
- mbox_bg.body.radius = LV_DPI / 20;
- theme.style.mbox.bg = &mbox_bg;
- theme.style.mbox.btn.bg = &lv_style_transp;
- theme.style.mbox.btn.rel = theme.style.btn.rel;
- theme.style.mbox.btn.pr = theme.style.btn.pr;
-#endif
-}
-
-static void page_init(void)
-{
-#if LV_USE_PAGE
-
- static lv_style_t page_scrl;
- lv_style_copy(&page_scrl, &bg);
- page_scrl.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 40);
- page_scrl.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 40);
- page_scrl.body.border.color = lv_color_hex3(0x333);
- page_scrl.body.border.width = 1;
- page_scrl.body.radius = LV_DPI / 20;
-
- theme.style.page.bg = &panel;
- theme.style.page.scrl = &page_scrl;
- theme.style.page.sb = &sb;
-#endif
-}
-
-static void ta_init(void)
-{
-#if LV_USE_TA
- theme.style.ta.area = &panel;
- theme.style.ta.oneline = &panel;
- theme.style.ta.cursor = NULL;
- theme.style.ta.sb = &def;
-#endif
-}
-
-static void spinbox_init(void)
-{
-#if LV_USE_SPINBOX
- theme.style.spinbox.bg = &panel;
- theme.style.spinbox.cursor = theme.style.ta.cursor;
- theme.style.spinbox.sb = theme.style.ta.sb;
-#endif
-}
-
-static void list_init(void)
-{
-#if LV_USE_LIST != 0
- static lv_style_t list_bg, list_btn_rel, list_btn_pr, list_btn_tgl_rel, list_btn_tgl_pr;
-
- lv_style_copy(&list_bg, &panel);
- list_bg.body.padding.top = 0;
- list_bg.body.padding.bottom = 0;
- list_bg.body.padding.left = 0;
- list_bg.body.padding.right = 0;
- list_bg.body.padding.inner = 0;
-
- lv_style_copy(&list_btn_rel, &bg);
- list_btn_rel.body.opa = LV_OPA_TRANSP;
- list_btn_rel.body.border.part = LV_BORDER_BOTTOM;
- list_btn_rel.body.border.color = lv_color_hsv_to_rgb(_hue, 10, 5);
- list_btn_rel.body.border.width = 1;
- list_btn_rel.body.radius = LV_DPI / 10;
- list_btn_rel.text.color = lv_color_hsv_to_rgb(_hue, 5, 80);
- list_btn_rel.image.color = lv_color_hsv_to_rgb(_hue, 5, 80);
- list_btn_rel.body.padding.top = LV_DPI / 6;
- list_btn_rel.body.padding.bottom = LV_DPI / 6;
- list_btn_rel.body.padding.left = LV_DPI / 8;
- list_btn_rel.body.padding.right = LV_DPI / 8;
-
- lv_style_copy(&list_btn_pr, theme.style.btn.pr);
- list_btn_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 5);
- list_btn_pr.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 5);
- list_btn_pr.body.border.color = lv_color_hsv_to_rgb(_hue, 10, 5);
- list_btn_pr.body.border.width = 0;
- list_btn_pr.body.padding.top = LV_DPI / 6;
- list_btn_pr.body.padding.bottom = LV_DPI / 6;
- list_btn_pr.body.padding.left = LV_DPI / 8;
- list_btn_pr.body.padding.right = LV_DPI / 8;
- list_btn_pr.text.color = lv_color_hsv_to_rgb(_hue, 5, 80);
- list_btn_pr.image.color = lv_color_hsv_to_rgb(_hue, 5, 80);
-
- lv_style_copy(&list_btn_tgl_rel, &list_btn_rel);
- list_btn_tgl_rel.body.opa = LV_OPA_COVER;
- list_btn_tgl_rel.body.main_color = lv_color_hsv_to_rgb(_hue, 80, 70);
- list_btn_tgl_rel.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 70);
- list_btn_tgl_rel.body.border.color = lv_color_hsv_to_rgb(_hue, 60, 40);
- list_btn_tgl_rel.body.radius = list_bg.body.radius;
-
- lv_style_copy(&list_btn_tgl_pr, &list_btn_tgl_rel);
- list_btn_tgl_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 80, 60);
- list_btn_tgl_pr.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 60);
-
- theme.style.list.sb = &sb;
- theme.style.list.bg = &list_bg;
- theme.style.list.scrl = &lv_style_transp_tight;
- theme.style.list.btn.rel = &list_btn_rel;
- theme.style.list.btn.pr = &list_btn_pr;
- theme.style.list.btn.tgl_rel = &list_btn_tgl_rel;
- theme.style.list.btn.tgl_pr = &list_btn_tgl_pr;
- theme.style.list.btn.ina = &def;
-#endif
-}
-
-static void ddlist_init(void)
-{
-#if LV_USE_DDLIST != 0
- static lv_style_t ddlist_bg, ddlist_sel;
- lv_style_copy(&ddlist_bg, theme.style.btn.rel);
- ddlist_bg.text.line_space = LV_DPI / 8;
- ddlist_bg.body.padding.top = LV_DPI / 8;
- ddlist_bg.body.padding.bottom = LV_DPI / 8;
- ddlist_bg.body.padding.left = LV_DPI / 8;
- ddlist_bg.body.padding.right = LV_DPI / 8;
- ddlist_bg.body.radius = LV_DPI / 30;
-
- lv_style_copy(&ddlist_sel, theme.style.btn.rel);
- ddlist_sel.body.main_color = lv_color_hsv_to_rgb(_hue, 20, 50);
- ddlist_sel.body.grad_color = lv_color_hsv_to_rgb(_hue, 20, 50);
- ddlist_sel.body.radius = 0;
-
- theme.style.ddlist.bg = &ddlist_bg;
- theme.style.ddlist.sel = &ddlist_sel;
- theme.style.ddlist.sb = &def;
-#endif
-}
-
-static void roller_init(void)
-{
-#if LV_USE_ROLLER != 0
- static lv_style_t roller_bg;
-
- lv_style_copy(&roller_bg, theme.style.ddlist.bg);
- roller_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 20);
- roller_bg.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 40);
- roller_bg.text.color = lv_color_hsv_to_rgb(_hue, 5, 70);
- roller_bg.text.opa = LV_OPA_60;
-
- theme.style.roller.bg = &roller_bg;
- theme.style.roller.sel = theme.style.ddlist.sel;
-#endif
-}
-
-static void tabview_init(void)
-{
-#if LV_USE_TABVIEW != 0
- theme.style.tabview.bg = &bg;
- theme.style.tabview.indic = &lv_style_transp;
- theme.style.tabview.btn.bg = &lv_style_transp;
- theme.style.tabview.btn.rel = theme.style.btn.rel;
- theme.style.tabview.btn.pr = theme.style.btn.pr;
- theme.style.tabview.btn.tgl_rel = theme.style.btn.tgl_rel;
- theme.style.tabview.btn.tgl_pr = theme.style.btn.tgl_pr;
-#endif
-}
-
-static void tileview_init(void)
-{
-#if LV_USE_TILEVIEW != 0
- theme.style.tileview.bg = &lv_style_transp_tight;
- theme.style.tileview.scrl = &lv_style_transp_tight;
- theme.style.tileview.sb = theme.style.page.sb;
-#endif
-}
-
-static void table_init(void)
-{
-#if LV_USE_TABLE != 0
- static lv_style_t cell;
- lv_style_copy(&cell, &panel);
- cell.body.radius = 0;
- cell.body.border.width = 1;
- cell.body.padding.left = LV_DPI / 12;
- cell.body.padding.right = LV_DPI / 12;
- cell.body.padding.top = LV_DPI / 12;
- cell.body.padding.bottom = LV_DPI / 12;
-
- theme.style.table.bg = &lv_style_transp_tight;
- theme.style.table.cell = &cell;
-#endif
-}
-
-static void win_init(void)
-{
-#if LV_USE_WIN != 0
- static lv_style_t win_bg;
- lv_style_copy(&win_bg, &bg);
- win_bg.body.border.color = lv_color_hex3(0x333);
- win_bg.body.border.width = 1;
-
- static lv_style_t win_header;
- lv_style_copy(&win_header, &win_bg);
- win_header.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 20);
- win_header.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 20);
- win_header.body.radius = 0;
- win_header.body.padding.left = 0;
- win_header.body.padding.right = 0;
- win_header.body.padding.top = 0;
- win_header.body.padding.bottom = 0;
-
- static lv_style_t win_btn_pr;
- lv_style_copy(&win_btn_pr, &def);
- win_btn_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 10);
- win_btn_pr.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 10);
- win_btn_pr.text.color = lv_color_hex3(0xaaa);
- win_btn_pr.image.color = lv_color_hex3(0xaaa);
-
- theme.style.win.bg = &win_bg;
- theme.style.win.sb = &sb;
- theme.style.win.header = &win_header;
- theme.style.win.content = &lv_style_transp;
- theme.style.win.btn.rel = &lv_style_transp;
- theme.style.win.btn.pr = &win_btn_pr;
-#endif
-}
-
-#if LV_USE_GROUP
-
-static void style_mod(lv_group_t * group, lv_style_t * style)
-{
- (void)group; /*Unused*/
-#if LV_COLOR_DEPTH != 1
- /*Make the style to be a little bit orange*/
- style->body.border.opa = LV_OPA_COVER;
- style->body.border.color = lv_color_hsv_to_rgb(_hue, 80, 70);
-
- /*If not empty or has border then emphasis the border*/
- if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20;
-#else
- style->body.border.opa = LV_OPA_COVER;
- style->body.border.color = LV_COLOR_BLACK;
- style->body.border.width = 2;
-#endif
-}
-
-static void style_mod_edit(lv_group_t * group, lv_style_t * style)
-{
- (void)group; /*Unused*/
-#if LV_COLOR_DEPTH != 1
- /*Make the style to be a little bit orange*/
- style->body.border.opa = LV_OPA_COVER;
- style->body.border.color = LV_COLOR_GREEN;
-
- /*If not empty or has border then emphasis the border*/
- if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20;
-#else
- style->body.border.opa = LV_OPA_COVER;
- style->body.border.color = LV_COLOR_BLACK;
- style->body.border.width = 3;
-#endif
-}
-
-#endif /*LV_USE_GROUP*/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Initialize the night theme
- * @param hue [0..360] hue value from HSV color space to define the theme's base color
- * @param font pointer to a font (NULL to use the default)
- * @return pointer to the initialized theme
- */
-lv_theme_t * lv_theme_night_init(uint16_t hue, lv_font_t * font)
-{
- if(font == NULL) font = LV_FONT_DEFAULT;
-
- _hue = hue;
- _font = font;
-
- /*For backward compatibility initialize all theme elements with a default style */
- uint16_t i;
- lv_style_t ** style_p = (lv_style_t **)&theme.style;
- for(i = 0; i < LV_THEME_STYLE_COUNT; i++) {
- *style_p = &def;
- style_p++;
- }
-
- basic_init();
- cont_init();
- btn_init();
- label_init();
- img_init();
- line_init();
- led_init();
- bar_init();
- slider_init();
- sw_init();
- lmeter_init();
- gauge_init();
- arc_init();
- preload_init();
- chart_init();
- calendar_init();
- cb_init();
- btnm_init();
- kb_init();
- mbox_init();
- page_init();
- ta_init();
- spinbox_init();
- list_init();
- ddlist_init();
- roller_init();
- tabview_init();
- tileview_init();
- table_init();
- win_init();
-
-#if LV_USE_GROUP
- theme.group.style_mod_xcb = style_mod;
- theme.group.style_mod_edit_xcb = style_mod_edit;
-#endif
-
- return &theme;
-}
-
-/**
- * Get a pointer to the theme
- * @return pointer to the theme
- */
-lv_theme_t * lv_theme_get_night(void)
-{
- return &theme;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-#endif
diff --git a/src/libs/lvgl/src/lv_themes/lv_theme_night.h b/src/libs/lvgl/src/lv_themes/lv_theme_night.h
deleted file mode 100644
index a009bed0..00000000
--- a/src/libs/lvgl/src/lv_themes/lv_theme_night.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * @file lv_theme_night.h
- *
- */
-
-#ifndef LV_THEME_NIGHT_H
-#define LV_THEME_NIGHT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_THEME_NIGHT
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Initialize the night theme
- * @param hue [0..360] hue value from HSV color space to define the theme's base color
- * @param font pointer to a font (NULL to use the default)
- * @return pointer to the initialized theme
- */
-lv_theme_t * lv_theme_night_init(uint16_t hue, lv_font_t * font);
-
-/**
- * Get a pointer to the theme
- * @return pointer to the theme
- */
-lv_theme_t * lv_theme_get_night(void);
-
-/**********************
- * MACROS
- **********************/
-
-#endif
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_THEME_NIGHT_H*/
diff --git a/src/libs/lvgl/src/lv_themes/lv_theme_templ.c b/src/libs/lvgl/src/lv_themes/lv_theme_templ.c
deleted file mode 100644
index fecbdb84..00000000
--- a/src/libs/lvgl/src/lv_themes/lv_theme_templ.c
+++ /dev/null
@@ -1,473 +0,0 @@
-/**
- * @file lv_theme_templ.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_theme.h"
-
-#if LV_USE_THEME_TEMPL
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_theme_t theme;
-static lv_style_t def;
-/*Static style definitions*/
-
-/*Saved input parameters*/
-static uint16_t _hue;
-static lv_font_t * _font;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-static void basic_init(void)
-{
- lv_style_copy(&def, &lv_style_pretty); /*Initialize the default style*/
- def.text.font = _font;
-
- theme.style.scr = &def;
- theme.style.bg = &def;
- theme.style.panel = &def;
-}
-
-static void cont_init(void)
-{
-#if LV_USE_CONT != 0
-
- theme.style.cont = &def;
-#endif
-}
-
-static void btn_init(void)
-{
-#if LV_USE_BTN != 0
-
- theme.style.btn.rel = &def;
- theme.style.btn.pr = &def;
- theme.style.btn.tgl_rel = &def;
- theme.style.btn.tgl_pr = &def;
- theme.style.btn.ina = &def;
-#endif
-}
-
-static void imgbtn_init(void)
-{
-#if LV_USE_IMGBTN != 0
- theme.style.imgbtn.rel = &def;
- theme.style.imgbtn.pr = &def;
- theme.style.imgbtn.tgl_rel = &def;
- theme.style.imgbtn.tgl_pr = &def;
- theme.style.imgbtn.ina = &def;
-#endif
-}
-
-static void label_init(void)
-{
-#if LV_USE_LABEL != 0
-
- theme.style.label.prim = &def;
- theme.style.label.sec = &def;
- theme.style.label.hint = &def;
-#endif
-}
-
-static void img_init(void)
-{
-#if LV_USE_IMG != 0
-
- theme.style.img.light = &def;
- theme.style.img.dark = &def;
-#endif
-}
-
-static void line_init(void)
-{
-#if LV_USE_LINE != 0
-
- theme.style.line.decor = &def;
-#endif
-}
-
-static void led_init(void)
-{
-#if LV_USE_LED != 0
-
- theme.style.led = &def;
-#endif
-}
-
-static void bar_init(void)
-{
-#if LV_USE_BAR
-
- theme.style.bar.bg = &def;
- theme.style.bar.indic = &def;
-#endif
-}
-
-static void slider_init(void)
-{
-#if LV_USE_SLIDER != 0
-
- theme.style.slider.bg = &def;
- theme.style.slider.indic = &def;
- theme.style.slider.knob = &def;
-#endif
-}
-
-static void sw_init(void)
-{
-#if LV_USE_SW != 0
-
- theme.style.sw.bg = &def;
- theme.style.sw.indic = &def;
- theme.style.sw.knob_off = &def;
- theme.style.sw.knob_on = &def;
-#endif
-}
-
-static void lmeter_init(void)
-{
-#if LV_USE_LMETER != 0
-
- theme.style.lmeter = &def;
-#endif
-}
-
-static void gauge_init(void)
-{
-#if LV_USE_GAUGE != 0
-
- theme.style.gauge = &def;
-#endif
-}
-
-static void arc_init(void)
-{
-#if LV_USE_ARC != 0
-
- theme.style.arc = &def;
-#endif
-}
-
-static void preload_init(void)
-{
-#if LV_USE_PRELOAD != 0
-
- theme.style.preload = &def;
-#endif
-}
-
-static void chart_init(void)
-{
-#if LV_USE_CHART
-
- theme.style.chart = &def;
-#endif
-}
-
-static void calendar_init(void)
-{
-#if LV_USE_CALENDAR
-
- theme.style.calendar.bg = theme.style.panel;
- theme.style.calendar.header = &def;
- theme.style.calendar.inactive_days = &def;
- theme.style.calendar.highlighted_days = &def;
- theme.style.calendar.week_box = &def;
- theme.style.calendar.today_box = &def;
- theme.style.calendar.header_pr = &def;
- theme.style.calendar.day_names = &def;
-#endif
-}
-
-static void cb_init(void)
-{
-#if LV_USE_CB != 0
-
- theme.style.cb.bg = &def;
- theme.style.cb.box.rel = &def;
- theme.style.cb.box.pr = &def;
- theme.style.cb.box.tgl_rel = &def;
- theme.style.cb.box.tgl_pr = &def;
- theme.style.cb.box.ina = &def;
-#endif
-}
-
-static void btnm_init(void)
-{
-#if LV_USE_BTNM
-
- theme.style.btnm.bg = &def;
- theme.style.btnm.btn.rel = &def;
- theme.style.btnm.btn.pr = &def;
- theme.style.btnm.btn.tgl_rel = &def;
- theme.style.btnm.btn.tgl_pr = &def;
- theme.style.btnm.btn.ina = &def;
-#endif
-}
-
-static void kb_init(void)
-{
-#if LV_USE_KB
-
- theme.style.kb.bg = &def;
- theme.style.kb.btn.rel = &def;
- theme.style.kb.btn.pr = &def;
- theme.style.kb.btn.tgl_rel = &def;
- theme.style.kb.btn.tgl_pr = &def;
- theme.style.kb.btn.ina = &def;
-#endif
-}
-
-static void mbox_init(void)
-{
-#if LV_USE_MBOX
-
- theme.style.mbox.bg = &def;
- theme.style.mbox.btn.bg = &def;
- theme.style.mbox.btn.rel = &def;
- theme.style.mbox.btn.pr = &def;
-#endif
-}
-
-static void page_init(void)
-{
-#if LV_USE_PAGE
-
- theme.style.page.bg = &def;
- theme.style.page.scrl = &def;
- theme.style.page.sb = &def;
-#endif
-}
-
-static void ta_init(void)
-{
-#if LV_USE_TA
-
- theme.style.ta.area = &def;
- theme.style.ta.oneline = &def;
- theme.style.ta.cursor = NULL; /*Let library to calculate the cursor's style*/
- theme.style.ta.sb = &def;
-#endif
-}
-
-static void list_init(void)
-{
-#if LV_USE_LIST != 0
-
- theme.style.list.sb = &def;
- theme.style.list.bg = &def;
- theme.style.list.scrl = &def;
- theme.style.list.btn.rel = &def;
- theme.style.list.btn.pr = &def;
- theme.style.list.btn.tgl_rel = &def;
- theme.style.list.btn.tgl_pr = &def;
- theme.style.list.btn.ina = &def;
-#endif
-}
-
-static void ddlist_init(void)
-{
-#if LV_USE_DDLIST != 0
-
- theme.style.ddlist.bg = &def;
- theme.style.ddlist.sel = &def;
- theme.style.ddlist.sb = &def;
-#endif
-}
-
-static void roller_init(void)
-{
-#if LV_USE_ROLLER != 0
-
- theme.style.roller.bg = &def;
- theme.style.roller.sel = &def;
-#endif
-}
-
-static void tabview_init(void)
-{
-#if LV_USE_TABVIEW != 0
-
- theme.style.tabview.bg = &def;
- theme.style.tabview.indic = &def;
- theme.style.tabview.btn.bg = &def;
- theme.style.tabview.btn.rel = &def;
- theme.style.tabview.btn.pr = &def;
- theme.style.tabview.btn.tgl_rel = &def;
- theme.style.tabview.btn.tgl_pr = &def;
-#endif
-}
-
-static void table_init(void)
-{
-#if LV_USE_TABLE != 0
- theme.style.table.bg = &def;
- theme.style.table.cell = &def;
-#endif
-}
-
-static void win_init(void)
-{
-#if LV_USE_WIN != 0
-
- theme.style.win.bg = &def;
- theme.style.win.sb = &def;
- theme.style.win.header = &def;
- theme.style.win.content = &def;
- theme.style.win.btn.rel = &def;
- theme.style.win.btn.pr = &def;
-#endif
-}
-
-#if LV_USE_GROUP
-
-static void style_mod(lv_group_t * group, lv_style_t * style)
-{
- (void)group; /*Unused*/
-
-#if LV_COLOR_DEPTH != 1
- /*Make the style to be a little bit orange*/
- style->body.border.opa = LV_OPA_COVER;
- style->body.border.color = LV_COLOR_ORANGE;
-
- /*If not empty or has border then emphasis the border*/
- if(style->body.border.width != 0) style->body.border.width = LV_DPI / 20;
-
- style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_ORANGE, LV_OPA_70);
- style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_ORANGE, LV_OPA_70);
- style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_ORANGE, LV_OPA_60);
-
- style->text.color = lv_color_mix(style->text.color, LV_COLOR_ORANGE, LV_OPA_70);
-#else
- style->body.border.opa = LV_OPA_COVER;
- style->body.border.color = LV_COLOR_BLACK;
- style->body.border.width = 2;
-#endif
-}
-
-static void style_mod_edit(lv_group_t * group, lv_style_t * style)
-{
- (void)group; /*Unused*/
-
-#if LV_COLOR_DEPTH != 1
- /*Make the style to be a little bit orange*/
- style->body.border.opa = LV_OPA_COVER;
- style->body.border.color = LV_COLOR_GREEN;
-
- /*If not empty or has border then emphasis the border*/
- if(style->body.border.width != 0) style->body.border.width = LV_DPI / 20;
-
- style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70);
- style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70);
- style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_GREEN, LV_OPA_60);
-
- style->text.color = lv_color_mix(style->text.color, LV_COLOR_GREEN, LV_OPA_70);
-#else
- style->body.border.opa = LV_OPA_COVER;
- style->body.border.color = LV_COLOR_BLACK;
- style->body.border.width = 3;
-#endif
-}
-
-#endif /*LV_USE_GROUP*/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Initialize the templ theme
- * @param hue [0..360] hue value from HSV color space to define the theme's base color
- * @param font pointer to a font (NULL to use the default)
- * @return pointer to the initialized theme
- */
-lv_theme_t * lv_theme_templ_init(uint16_t hue, lv_font_t * font)
-{
- if(font == NULL) font = LV_FONT_DEFAULT;
-
- _hue = hue;
- _font = font;
-
- /*For backward compatibility initialize all theme elements with a default style */
- uint16_t i;
- lv_style_t ** style_p = (lv_style_t **)&theme.style;
- for(i = 0; i < LV_THEME_STYLE_COUNT; i++) {
- *style_p = &def;
- style_p++;
- }
-
- basic_init();
- cont_init();
- btn_init();
- imgbtn_init();
- label_init();
- img_init();
- line_init();
- led_init();
- bar_init();
- slider_init();
- sw_init();
- lmeter_init();
- gauge_init();
- arc_init();
- preload_init();
- chart_init();
- calendar_init();
- cb_init();
- btnm_init();
- kb_init();
- mbox_init();
- page_init();
- ta_init();
- list_init();
- ddlist_init();
- roller_init();
- tabview_init();
- table_init();
- win_init();
-
-#if LV_USE_GROUP
- theme.group.style_mod_xcb = style_mod;
- theme.group.style_mod_edit_xcb = style_mod_edit;
-#endif
-
- return &theme;
-}
-
-/**
- * Get a pointer to the theme
- * @return pointer to the theme
- */
-lv_theme_t * lv_theme_get_templ(void)
-{
- return &theme;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-#endif
diff --git a/src/libs/lvgl/src/lv_themes/lv_theme_templ.h b/src/libs/lvgl/src/lv_themes/lv_theme_templ.h
deleted file mode 100644
index 7d1e3ec6..00000000
--- a/src/libs/lvgl/src/lv_themes/lv_theme_templ.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * @file lv_theme_templ.h
- *
- */
-
-#ifndef LV_THEME_TEMPL_H
-#define LV_THEME_TEMPL_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_THEME_TEMPL
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Initialize the templ theme
- * @param hue [0..360] hue value from HSV color space to define the theme's base color
- * @param font pointer to a font (NULL to use the default)
- * @return pointer to the initialized theme
- */
-lv_theme_t * lv_theme_templ_init(uint16_t hue, lv_font_t * font);
-
-/**
- * Get a pointer to the theme
- * @return pointer to the theme
- */
-lv_theme_t * lv_theme_get_templ(void);
-
-/**********************
- * MACROS
- **********************/
-
-#endif
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_THEME_TEMPL_H*/
diff --git a/src/libs/lvgl/src/lv_themes/lv_theme_zen.c b/src/libs/lvgl/src/lv_themes/lv_theme_zen.c
deleted file mode 100644
index 55569993..00000000
--- a/src/libs/lvgl/src/lv_themes/lv_theme_zen.c
+++ /dev/null
@@ -1,902 +0,0 @@
-/**
- * @file lv_theme_zen.c
- *
- */
-
-/*********************
- * INCLUDES
- *********************/
-#include "lv_theme.h"
-
-#if LV_USE_THEME_ZEN
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * STATIC PROTOTYPES
- **********************/
-
-/**********************
- * STATIC VARIABLES
- **********************/
-static lv_theme_t theme;
-/*Static style definitions*/
-static lv_style_t def;
-static lv_style_t sb;
-
-/*Saved input parameters*/
-static uint16_t _hue;
-static lv_font_t * _font;
-
-/**********************
- * MACROS
- **********************/
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-static void basic_init(void)
-{
- static lv_style_t bg;
- static lv_style_t scr;
- static lv_style_t panel;
-
- lv_style_copy(&def, &lv_style_pretty); /*Initialize the default style*/
- def.body.border.opa = LV_OPA_COVER;
- def.text.font = _font;
- def.text.color = lv_color_hex3(0x444);
- def.image.color = lv_color_hex3(0x444);
-
- lv_style_copy(&bg, &def);
- bg.body.main_color = LV_COLOR_WHITE;
- bg.body.grad_color = LV_COLOR_WHITE;
- bg.body.radius = 0;
- bg.body.border.width = 0;
- bg.body.shadow.width = 0;
-
- lv_style_copy(&scr, &bg);
- scr.body.padding.bottom = 0;
- scr.body.padding.top = 0;
- scr.body.padding.left = 0;
- scr.body.padding.right = 0;
-
- lv_style_copy(&panel, &bg);
- panel.body.radius = LV_DPI / 10;
- panel.body.border.width = 2;
- panel.body.border.color = lv_color_hsv_to_rgb(_hue, 30, 90);
- panel.body.border.opa = LV_OPA_COVER;
- panel.body.shadow.width = 4;
- panel.body.shadow.color = lv_color_hex3(0xddd);
- panel.body.padding.left = LV_DPI / 6;
- panel.body.padding.right = LV_DPI / 6;
- panel.body.padding.top = LV_DPI / 8;
- panel.body.padding.bottom = LV_DPI / 8;
- panel.body.padding.inner = LV_DPI / 10;
-
- lv_style_copy(&sb, &def);
- sb.body.main_color = lv_color_hsv_to_rgb(_hue, 30, 90);
- sb.body.grad_color = sb.body.main_color;
- sb.body.border.width = 0;
- sb.body.radius = LV_RADIUS_CIRCLE;
- sb.body.padding.inner = LV_DPI / 15;
-
- theme.style.scr = &scr;
- theme.style.bg = &bg;
- theme.style.panel = &panel;
-}
-
-static void cont_init(void)
-{
-#if LV_USE_CONT != 0
-
- theme.style.cont = theme.style.panel;
-#endif
-}
-
-static void btn_init(void)
-{
-#if LV_USE_BTN != 0
- static lv_style_t rel, pr, tgl_pr, ina;
- lv_style_copy(&rel, &def);
- rel.body.opa = LV_OPA_TRANSP;
- rel.body.radius = LV_RADIUS_CIRCLE;
- rel.body.border.width = 2;
- rel.body.border.color = lv_color_hsv_to_rgb(_hue, 40, 90);
- rel.body.border.opa = LV_OPA_COVER;
- rel.body.shadow.width = 4;
- rel.body.shadow.color = lv_color_hex3(0xddd);
- rel.body.padding.left = LV_DPI / 4;
- rel.body.padding.right = LV_DPI / 4;
- rel.body.padding.top = LV_DPI / 8;
- rel.body.padding.bottom = LV_DPI / 8;
- rel.text.color = lv_color_hsv_to_rgb(_hue, 40, 90);
- rel.image.color = lv_color_hsv_to_rgb(_hue, 40, 90);
-
- lv_style_copy(&pr, &rel);
- pr.body.border.color = lv_color_hsv_to_rgb(_hue, 40, 60);
- pr.body.shadow.width = 0;
- pr.text.color = lv_color_hsv_to_rgb(_hue, 40, 60);
- pr.image.color = lv_color_hsv_to_rgb(_hue, 40, 60);
-
- lv_style_copy(&tgl_pr, &pr);
- tgl_pr.body.border.color = lv_color_hsv_to_rgb(_hue, 40, 50);
- tgl_pr.text.color = lv_color_hsv_to_rgb(_hue, 40, 50);
- tgl_pr.image.color = lv_color_hsv_to_rgb(_hue, 40, 50);
-
- lv_style_copy(&ina, &tgl_pr);
- ina.body.border.color = lv_color_hex3(0xbbb);
- ina.text.color = lv_color_hex3(0xbbb);
- ina.image.color = lv_color_hex3(0xbbb);
-
- theme.style.btn.rel = &rel;
- theme.style.btn.pr = &pr;
- theme.style.btn.tgl_rel = &pr;
- theme.style.btn.tgl_pr = &tgl_pr;
- theme.style.btn.ina = &ina;
-#endif
-}
-
-static void label_init(void)
-{
-#if LV_USE_LABEL != 0
- static lv_style_t prim, sec, hint;
- lv_style_copy(&prim, &def);
- lv_style_copy(&sec, &def);
- lv_style_copy(&hint, &def);
-
- prim.text.color = lv_color_hex3(0x555);
- sec.text.color = lv_color_hsv_to_rgb(_hue, 50, 80);
- hint.text.color = lv_color_hsv_to_rgb(_hue, 25, 85);
-
- theme.style.label.prim = &prim;
- theme.style.label.sec = &sec;
- theme.style.label.hint = &hint;
-#endif
-}
-
-static void img_init(void)
-{
-#if LV_USE_IMG != 0
- static lv_style_t img_light, img_dark;
- lv_style_copy(&img_light, &def);
- img_light.image.color = lv_color_hsv_to_rgb(_hue, 15, 85);
- img_light.image.intense = LV_OPA_80;
-
- lv_style_copy(&img_dark, &def);
- img_light.image.color = lv_color_hsv_to_rgb(_hue, 85, 55);
- img_light.image.intense = LV_OPA_80;
-
- theme.style.img.light = &img_light;
- theme.style.img.dark = &img_dark;
-#endif
-}
-
-static void line_init(void)
-{
-#if LV_USE_LINE != 0
-
- theme.style.line.decor = &def;
-#endif
-}
-
-static void led_init(void)
-{
-#if LV_USE_LED != 0
-
- static lv_style_t led;
- lv_style_copy(&led, &lv_style_pretty_color);
- led.body.shadow.width = LV_DPI / 10;
- led.body.radius = LV_RADIUS_CIRCLE;
- led.body.border.width = LV_DPI / 30;
- led.body.border.opa = LV_OPA_30;
- led.body.main_color = lv_color_hsv_to_rgb(_hue, 60, 100);
- led.body.grad_color = lv_color_hsv_to_rgb(_hue, 60, 40);
- led.body.border.color = lv_color_hsv_to_rgb(_hue, 60, 60);
- led.body.shadow.color = lv_color_hsv_to_rgb(_hue, 80, 100);
-
- theme.style.led = &led;
-#endif
-}
-
-static void bar_init(void)
-{
-#if LV_USE_BAR
- static lv_style_t bg, indic;
-
- lv_style_copy(&bg, &def);
- bg.body.opa = LV_OPA_TRANSP;
- bg.body.radius = LV_RADIUS_CIRCLE;
- bg.body.border.width = 2;
- bg.body.border.opa = LV_OPA_COVER;
- bg.body.border.color = lv_color_hsv_to_rgb(_hue, 40, 90);
-
- lv_style_copy(&indic, &def);
- indic.body.radius = LV_RADIUS_CIRCLE;
- indic.body.main_color = lv_color_hsv_to_rgb(_hue, 40, 90);
- indic.body.grad_color = indic.body.main_color;
- indic.body.border.width = 0;
- indic.body.padding.left = LV_DPI / 20;
- indic.body.padding.right = LV_DPI / 20;
- indic.body.padding.top = LV_DPI / 20;
- indic.body.padding.bottom = LV_DPI / 20;
-
- theme.style.bar.bg = &bg;
- theme.style.bar.indic = &indic;
-#endif
-}
-
-static void slider_init(void)
-{
-#if LV_USE_SLIDER != 0
- static lv_style_t knob;
-
- lv_style_copy(&knob, &def);
- knob.body.main_color = theme.style.bar.indic->body.main_color;
- knob.body.grad_color = knob.body.main_color;
- knob.body.radius = LV_RADIUS_CIRCLE;
- knob.body.border.width = 0;
-
- theme.style.slider.bg = theme.style.bar.bg;
- theme.style.slider.indic = theme.style.bar.indic;
- theme.style.slider.knob = &knob;
-#endif
-}
-
-static void sw_init(void)
-{
-#if LV_USE_SW != 0
- static lv_style_t indic;
-
- lv_style_copy(&indic, theme.style.slider.indic);
- indic.body.radius = LV_RADIUS_CIRCLE;
- indic.body.main_color = lv_color_hsv_to_rgb(_hue, 15, 95);
- indic.body.grad_color = indic.body.main_color;
- indic.body.border.width = theme.style.slider.bg->body.border.width;
- indic.body.border.color = theme.style.slider.bg->body.border.color;
- indic.body.border.opa = theme.style.slider.bg->body.border.opa;
- indic.body.padding.left = 0;
- indic.body.padding.right = 0;
- indic.body.padding.top = 0;
- indic.body.padding.bottom = 0;
-
- theme.style.sw.bg = theme.style.slider.bg;
- theme.style.sw.indic = &indic;
- theme.style.sw.knob_off = theme.style.slider.knob;
- theme.style.sw.knob_on = theme.style.slider.knob;
-#endif
-}
-
-static void lmeter_init(void)
-{
-#if LV_USE_LMETER != 0
- static lv_style_t lmeter;
-
- lv_style_copy(&lmeter, &def);
- lmeter.line.color = lv_color_hex3(0xddd);
- lmeter.line.width = 2;
- lmeter.body.main_color = lv_color_hsv_to_rgb(_hue, 80, 70);
- lmeter.body.grad_color = lmeter.body.main_color;
- lmeter.body.padding.left = LV_DPI / 8;
- lmeter.body.padding.right = LV_DPI / 8;
-
- theme.style.lmeter = &lmeter;
-#endif
-}
-
-static void gauge_init(void)
-{
-#if LV_USE_GAUGE != 0
- static lv_style_t gauge;
-
- lv_style_copy(&gauge, &def);
- gauge.line.color = lv_color_hsv_to_rgb(_hue, 50, 70);
- gauge.line.width = 1;
- gauge.body.main_color = lv_color_hex3(0x999);
- gauge.body.grad_color = gauge.body.main_color;
- gauge.body.padding.left = LV_DPI / 16;
- gauge.body.padding.right = LV_DPI / 16;
- gauge.body.border.color = lv_color_hex3(0x666); /*Needle middle color*/
-
- theme.style.gauge = &gauge;
-#endif
-}
-
-static void arc_init(void)
-{
-#if LV_USE_ARC != 0
-
- static lv_style_t arc;
- lv_style_copy(&arc, &def);
- arc.line.width = 10;
- arc.line.color = lv_color_hsv_to_rgb(_hue, 40, 90);
- arc.line.rounded = 1;
-
- /*For preloader*/
- arc.body.border.width = 0;
-
- theme.style.arc = &arc;
-#endif
-}
-
-static void preload_init(void)
-{
-#if LV_USE_PRELOAD != 0
-
- theme.style.preload = theme.style.arc;
-#endif
-}
-
-static void chart_init(void)
-{
-#if LV_USE_CHART
- theme.style.chart = theme.style.panel;
-#endif
-}
-
-static void calendar_init(void)
-{
-#if LV_USE_CALENDAR != 0
- static lv_style_t ina_days;
- lv_style_copy(&ina_days, &def);
- ina_days.text.color = lv_color_hsv_to_rgb(_hue, 0, 70);
-
- static lv_style_t high_days;
- lv_style_copy(&high_days, &def);
- high_days.text.color = lv_color_hsv_to_rgb(_hue, 50, 90);
-
- static lv_style_t today_box;
- lv_style_copy(&today_box, &def);
- today_box.body.opa = LV_OPA_TRANSP;
- today_box.body.border.color = theme.style.panel->body.border.color;
- today_box.body.padding.top = LV_DPI / 20;
- today_box.body.padding.bottom = LV_DPI / 20;
- today_box.body.radius = LV_RADIUS_CIRCLE;
-
- theme.style.calendar.bg = theme.style.panel;
- theme.style.calendar.header = &lv_style_transp;
- theme.style.calendar.inactive_days = &ina_days;
- theme.style.calendar.highlighted_days = &high_days;
- theme.style.calendar.week_box = &lv_style_transp_fit;
- theme.style.calendar.today_box = &today_box;
-#endif
-}
-
-static void cb_init(void)
-{
-#if LV_USE_CB != 0
- static lv_style_t rel, pr, tgl_rel, tgl_pr, ina;
- lv_style_copy(&rel, &def);
- rel.body.radius = LV_DPI / 20;
- rel.body.shadow.width = 0;
- rel.body.border.width = 3;
- rel.body.border.opa = LV_OPA_COVER;
- rel.body.border.color = lv_color_hsv_to_rgb(_hue, 35, 80);
- rel.body.main_color = lv_color_hex3(0xfff);
- rel.body.grad_color = rel.body.main_color;
-
- lv_style_copy(&pr, &rel);
- pr.body.border.color = lv_color_hsv_to_rgb(_hue, 35, 70);
-
- lv_style_copy(&tgl_rel, &rel);
- tgl_rel.body.border.color = lv_color_hsv_to_rgb(_hue, 45, 80);
- tgl_rel.body.main_color = lv_color_hsv_to_rgb(_hue, 40, 90);
- tgl_rel.body.grad_color = tgl_rel.body.main_color;
-
- lv_style_copy(&tgl_pr, &rel);
- tgl_pr.body.border.color = lv_color_hsv_to_rgb(_hue, 45, 70);
- tgl_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 40, 80);
- tgl_pr.body.grad_color = tgl_pr.body.main_color;
-
- lv_style_copy(&ina, &rel);
- ina.body.border.color = lv_color_hex3(0xaaa);
-
- theme.style.cb.bg = &lv_style_transp;
- theme.style.cb.box.rel = &rel;
- theme.style.cb.box.pr = &pr;
- theme.style.cb.box.tgl_rel = &tgl_rel;
- theme.style.cb.box.tgl_pr = &tgl_pr;
- theme.style.cb.box.ina = &ina;
-#endif
-}
-
-static void btnm_init(void)
-{
-#if LV_USE_BTNM
- static lv_style_t bg, rel, pr, tgl_rel, tgl_pr, ina;
-
- lv_style_copy(&bg, &lv_style_transp);
- bg.glass = 0;
- bg.body.padding.left = 0;
- bg.body.padding.right = 0;
- bg.body.padding.top = 0;
- bg.body.padding.bottom = 0;
- bg.body.padding.inner = LV_DPI / 15;
- bg.text.font = _font;
-
- lv_style_copy(&rel, &def);
- rel.body.opa = LV_OPA_TRANSP;
- rel.body.border.width = 0;
-
- lv_style_copy(&pr, &def);
- pr.body.opa = LV_OPA_TRANSP;
- pr.body.radius = LV_DPI / 1;
- pr.body.border.width = 2;
- pr.body.border.color = lv_color_hsv_to_rgb(_hue, 40, 60);
- pr.body.border.opa = LV_OPA_COVER;
- pr.text.color = lv_color_hsv_to_rgb(_hue, 40, 60);
-
- lv_style_copy(&tgl_rel, &pr);
- tgl_rel.body.opa = LV_OPA_COVER;
- tgl_rel.body.main_color = lv_color_hsv_to_rgb(_hue, 15, 95);
- tgl_rel.body.grad_color = tgl_rel.body.main_color;
- tgl_rel.body.border.width = 0;
- tgl_rel.text.color = lv_color_hsv_to_rgb(_hue, 60, 40);
-
- lv_style_copy(&tgl_pr, &tgl_rel);
- tgl_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 30, 70);
- tgl_pr.body.grad_color = tgl_pr.body.main_color;
-
- lv_style_copy(&ina, &pr);
- ina.body.main_color = lv_color_hex3(0x888);
- ina.body.grad_color = tgl_pr.body.main_color;
- ina.text.color = lv_color_hex3(0x888);
- ;
-
- theme.style.btnm.bg = &bg;
- theme.style.btnm.btn.rel = &rel;
- theme.style.btnm.btn.pr = &pr;
- theme.style.btnm.btn.tgl_rel = &tgl_rel;
- theme.style.btnm.btn.tgl_pr = &tgl_pr;
- theme.style.btnm.btn.ina = &ina;
-#endif
-}
-
-static void kb_init(void)
-{
-#if LV_USE_KB
- static lv_style_t bg, rel, pr, tgl_rel, tgl_pr, ina;
- lv_style_copy(&bg, &def);
- bg.body.main_color = lv_color_hex3(0x666);
- bg.body.grad_color = bg.body.main_color;
- bg.body.padding.left = 0;
- bg.body.padding.right = 0;
- bg.body.padding.top = 0;
- bg.body.padding.bottom = 0;
- bg.body.padding.inner = 0;
- bg.body.radius = 0;
- bg.body.border.width = 0;
-
- lv_style_copy(&rel, &def);
- rel.body.opa = LV_OPA_COVER;
- rel.body.radius = 0;
- rel.body.border.width = 1;
- rel.body.border.color = lv_color_hex3(0x888);
- rel.body.border.opa = LV_OPA_COVER;
- rel.text.color = LV_COLOR_WHITE;
-
- lv_style_copy(&pr, &def);
- pr.body.main_color = lv_color_hex3(0xeee);
- pr.body.grad_color = pr.body.main_color;
- pr.body.border.color = lv_color_hex3(0x888);
- pr.body.border.width = 1;
- pr.body.border.opa = LV_OPA_COVER;
- pr.body.radius = 0;
- pr.text.color = lv_color_hex3(0x666);
-
- lv_style_copy(&tgl_rel, &pr);
- tgl_rel.body.main_color = lv_color_hex3(0x999);
- tgl_rel.body.grad_color = tgl_rel.body.main_color;
- tgl_rel.text.color = LV_COLOR_WHITE;
-
- lv_style_copy(&tgl_pr, &pr);
- tgl_pr.body.main_color = lv_color_hex3(0xbbb);
- tgl_pr.body.grad_color = tgl_pr.body.main_color;
- tgl_pr.text.color = lv_color_hex3(0xddd);
-
- lv_style_copy(&ina, &pr);
- ina.body.main_color = lv_color_hex3(0x777);
- ina.body.grad_color = ina.body.main_color;
- ina.text.color = lv_color_hex3(0xbbb);
-
- theme.style.kb.bg = &bg;
- theme.style.kb.btn.rel = &rel;
- theme.style.kb.btn.pr = &pr;
- theme.style.kb.btn.tgl_rel = &tgl_rel;
- theme.style.kb.btn.tgl_pr = &tgl_pr;
- theme.style.kb.btn.ina = &ina;
-#endif
-}
-
-static void mbox_init(void)
-{
-#if LV_USE_MBOX
- static lv_style_t bg, rel, pr;
- lv_style_copy(&bg, theme.style.panel);
- bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 95);
- bg.body.grad_color = bg.body.main_color;
- bg.text.color = lv_color_hsv_to_rgb(_hue, 40, 25);
-
- lv_style_copy(&rel, &def);
- rel.body.main_color = lv_color_hsv_to_rgb(_hue, 25, 85);
- rel.body.grad_color = rel.body.main_color;
- rel.body.radius = LV_RADIUS_CIRCLE;
- rel.body.border.width = 2;
- rel.body.border.color = lv_color_hsv_to_rgb(_hue, 30, 70);
- rel.body.padding.left = LV_DPI / 4;
- rel.body.padding.right = LV_DPI / 4;
- rel.body.padding.top = LV_DPI / 8;
- rel.body.padding.bottom = LV_DPI / 8;
- rel.text.color = bg.text.color;
-
- lv_style_copy(&pr, &rel);
- pr.body.border.color = lv_color_hsv_to_rgb(_hue, 30, 90);
- pr.text.color = lv_color_hsv_to_rgb(_hue, 40, 40);
- pr.body.main_color = lv_color_hsv_to_rgb(_hue, 20, 85);
- pr.body.grad_color = pr.body.main_color;
-
- theme.style.mbox.bg = &bg;
- theme.style.mbox.btn.bg = &lv_style_transp;
- theme.style.mbox.btn.rel = &rel;
- theme.style.mbox.btn.pr = &pr;
-#endif
-}
-
-static void page_init(void)
-{
-#if LV_USE_PAGE
-
- theme.style.page.bg = theme.style.panel;
- theme.style.page.scrl = &lv_style_transp;
- theme.style.page.sb = &sb;
-#endif
-}
-
-static void ta_init(void)
-{
-#if LV_USE_TA
- static lv_style_t oneline;
- lv_style_copy(&oneline, theme.style.panel);
- oneline.body.radius = LV_RADIUS_CIRCLE;
- oneline.body.padding.top = LV_DPI / 10;
- oneline.body.padding.bottom = LV_DPI / 10;
- oneline.body.shadow.width = 0;
-
- theme.style.ta.area = theme.style.panel;
- theme.style.ta.oneline = &oneline;
- theme.style.ta.cursor = NULL; /*Let library to calculate the cursor's style*/
- theme.style.ta.sb = &def;
-#endif
-}
-
-static void spinbox_init(void)
-{
-#if LV_USE_SPINBOX
- theme.style.spinbox.bg = theme.style.panel;
- theme.style.spinbox.cursor = theme.style.ta.cursor;
- theme.style.spinbox.sb = theme.style.ta.sb;
-#endif
-}
-
-static void list_init(void)
-{
-#if LV_USE_LIST != 0
- static lv_style_t bg, rel, pr, tgl_rel, tgl_pr, ina;
-
- lv_style_copy(&bg, theme.style.panel);
- bg.body.padding.left = 0;
- bg.body.padding.right = 0;
- bg.body.padding.top = 0;
- bg.body.padding.bottom = 0;
-
- lv_style_copy(&rel, &def);
- rel.body.opa = LV_OPA_TRANSP;
- rel.body.border.width = 0;
- rel.body.padding.left = LV_DPI / 8;
- rel.body.padding.right = LV_DPI / 8;
- rel.body.padding.top = LV_DPI / 8;
- rel.body.padding.bottom = LV_DPI / 8;
- rel.text.color = lv_color_hex3(0x666);
- rel.image.color = lv_color_hex3(0x666);
-
- lv_style_copy(&pr, &rel);
- pr.text.color = theme.style.btn.pr->text.color;
- pr.image.color = theme.style.btn.pr->image.color;
-
- lv_style_copy(&tgl_rel, &rel);
- tgl_rel.text.color = lv_color_hsv_to_rgb(_hue, 50, 90);
-
- lv_style_copy(&tgl_pr, &rel);
- tgl_pr.text.color = theme.style.btn.tgl_pr->text.color;
- tgl_pr.image.color = theme.style.btn.tgl_pr->image.color;
-
- lv_style_copy(&ina, &rel);
- ina.text.color = theme.style.btn.ina->text.color;
- ina.image.color = theme.style.btn.ina->image.color;
-
- theme.style.list.sb = &sb;
- theme.style.list.bg = &bg;
- theme.style.list.scrl = &lv_style_transp_tight;
- theme.style.list.btn.rel = &rel;
- theme.style.list.btn.pr = &pr;
- theme.style.list.btn.tgl_rel = &tgl_rel;
- theme.style.list.btn.tgl_pr = &tgl_pr;
- theme.style.list.btn.ina = &ina;
-#endif
-}
-
-static void ddlist_init(void)
-{
-#if LV_USE_DDLIST != 0
- static lv_style_t bg, sel;
- lv_style_copy(&bg, theme.style.panel);
- bg.text.line_space = LV_DPI / 8;
- bg.body.padding.left = LV_DPI / 6;
- bg.body.padding.right = LV_DPI / 6;
- bg.body.padding.top = LV_DPI / 8;
- bg.body.padding.bottom = LV_DPI / 8;
- bg.text.color = lv_color_hex3(0x666);
-
- lv_style_copy(&sel, &def);
- sel.body.opa = LV_OPA_TRANSP;
- sel.body.border.width = 0;
- sel.text.color = lv_color_hsv_to_rgb(_hue, 50, 80);
-
- theme.style.ddlist.bg = &bg;
- theme.style.ddlist.sel = &sel;
- theme.style.ddlist.sb = &def;
-#endif
-}
-
-static void roller_init(void)
-{
-#if LV_USE_ROLLER != 0
- static lv_style_t bg, sel;
- lv_style_copy(&bg, &def);
- bg.body.border.width = 0;
- bg.body.opa = LV_OPA_TRANSP;
- bg.text.line_space = LV_DPI / 6;
- bg.text.color = lv_color_hex3(0x999);
-
- lv_style_copy(&sel, theme.style.panel);
- sel.body.radius = LV_RADIUS_CIRCLE;
- sel.body.opa = LV_OPA_TRANSP;
-
- theme.style.roller.bg = &bg;
- theme.style.roller.sel = &sel;
-#endif
-}
-
-static void tabview_init(void)
-{
-#if LV_USE_TABVIEW != 0
- static lv_style_t btn_bg, indic, rel, pr, tgl_rel, tgl_pr;
-
- lv_style_copy(&btn_bg, &def);
- btn_bg.body.opa = LV_OPA_TRANSP;
- btn_bg.body.border.width = 2;
- btn_bg.body.border.part = LV_BORDER_BOTTOM;
- btn_bg.body.border.color = lv_color_hsv_to_rgb(_hue, 10, 90);
-
- lv_style_copy(&indic, &def);
- indic.body.padding.inner = LV_DPI / 16;
- indic.body.border.width = 0;
- indic.body.radius = LV_RADIUS_CIRCLE;
- indic.body.main_color = lv_color_hsv_to_rgb(_hue, 50, 80);
- indic.body.grad_color = indic.body.main_color;
-
- lv_style_copy(&rel, &def);
- rel.body.opa = LV_OPA_TRANSP;
- rel.body.border.width = 0;
- rel.text.color = lv_color_hex3(0x999);
-
- lv_style_copy(&pr, &rel);
- pr.text.color = lv_color_hex3(0x777);
-
- lv_style_copy(&tgl_rel, &rel);
- tgl_rel.text.color = lv_color_hsv_to_rgb(_hue, 50, 80);
-
- lv_style_copy(&tgl_pr, &rel);
- tgl_pr.text.color = lv_color_hsv_to_rgb(_hue, 50, 70);
-
- theme.style.tabview.bg = theme.style.bg;
- theme.style.tabview.indic = &indic;
- theme.style.tabview.btn.bg = &btn_bg;
- theme.style.tabview.btn.rel = &rel;
- theme.style.tabview.btn.pr = &pr;
- theme.style.tabview.btn.tgl_rel = &tgl_rel;
- theme.style.tabview.btn.tgl_pr = &tgl_pr;
-#endif
-}
-
-static void tileview_init(void)
-{
-#if LV_USE_TILEVIEW != 0
- theme.style.tileview.bg = &lv_style_transp_tight;
- theme.style.tileview.scrl = &lv_style_transp_tight;
- theme.style.tileview.sb = theme.style.page.sb;
-#endif
-}
-
-static void table_init(void)
-{
-#if LV_USE_TABLE != 0
- static lv_style_t cell;
- lv_style_copy(&cell, theme.style.panel);
- cell.body.radius = 0;
- cell.body.border.width = 1;
- cell.body.shadow.width = 0;
- cell.body.padding.left = LV_DPI / 12;
- cell.body.padding.right = LV_DPI / 12;
- cell.body.padding.top = LV_DPI / 12;
- cell.body.padding.bottom = LV_DPI / 12;
-
- theme.style.table.bg = &lv_style_transp_tight;
- theme.style.table.cell = &cell;
-#endif
-}
-
-static void win_init(void)
-{
-#if LV_USE_WIN != 0
- static lv_style_t header, rel, pr;
-
- lv_style_copy(&header, &def);
- header.body.opa = LV_OPA_TRANSP;
- header.body.border.width = 2;
- header.body.border.part = LV_BORDER_BOTTOM;
- header.body.border.color = lv_color_hsv_to_rgb(_hue, 10, 90);
- header.text.color = lv_color_hex3(0x666);
- header.image.color = lv_color_hex3(0x666);
- header.body.padding.top = 0;
- header.body.padding.bottom = 0;
- header.body.padding.inner = 0;
-
- lv_style_copy(&rel, &def);
- rel.body.opa = LV_OPA_TRANSP;
- rel.body.border.width = 0;
- rel.text.color = lv_color_hex3(0x666);
- rel.image.color = lv_color_hex3(0x666);
-
- lv_style_copy(&pr, &rel);
- pr.text.color = lv_color_hex3(0x333);
- pr.image.color = lv_color_hex3(0x333);
-
- theme.style.win.bg = theme.style.panel;
- theme.style.win.sb = &sb;
- theme.style.win.header = &header;
- theme.style.win.content = &lv_style_transp;
- theme.style.win.btn.rel = &rel;
- theme.style.win.btn.pr = &pr;
-#endif
-}
-
-#if LV_USE_GROUP
-
-static void style_mod(lv_group_t * group, lv_style_t * style)
-{
- (void)group; /*Unused*/
-#if LV_COLOR_DEPTH != 1
- /*Make the style to be a little bit orange*/
- style->body.border.opa = LV_OPA_COVER;
- style->body.border.color = lv_color_hsv_to_rgb(_hue, 40, 50);
-
- /*If not empty or has border then emphasis the border*/
- if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20;
-#else
- style->body.border.opa = LV_OPA_COVER;
- style->body.border.color = LV_COLOR_BLACK;
- style->body.border.width = 2;
-#endif
-}
-
-static void style_mod_edit(lv_group_t * group, lv_style_t * style)
-{
- (void)group; /*Unused*/
-
-#if LV_COLOR_DEPTH != 1
- /*Make the style to be a little bit orange*/
- style->body.border.opa = LV_OPA_COVER;
- style->body.border.color = LV_COLOR_GREEN;
-
- /*If not empty or has border then emphasis the border*/
- if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20;
-
- style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70);
- style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70);
- style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_GREEN, LV_OPA_60);
-
- style->text.color = lv_color_mix(style->text.color, LV_COLOR_GREEN, LV_OPA_70);
-#else
- style->body.border.opa = LV_OPA_COVER;
- style->body.border.color = LV_COLOR_BLACK;
- style->body.border.width = 3;
-#endif
-}
-
-#endif /*LV_USE_GROUP*/
-
-/**********************
- * GLOBAL FUNCTIONS
- **********************/
-
-/**
- * Initialize the zen theme
- * @param hue [0..360] hue value from HSV color space to define the theme's base color
- * @param font pointer to a font (NULL to use the default)
- * @return pointer to the initialized theme
- */
-lv_theme_t * lv_theme_zen_init(uint16_t hue, lv_font_t * font)
-{
- if(font == NULL) font = LV_FONT_DEFAULT;
-
- _hue = hue;
- _font = font;
-
- /*For backward compatibility initialize all theme elements with a default style */
- uint16_t i;
- lv_style_t ** style_p = (lv_style_t **)&theme.style;
- for(i = 0; i < LV_THEME_STYLE_COUNT; i++) {
- *style_p = &def;
- style_p++;
- }
-
- basic_init();
- cont_init();
- btn_init();
- label_init();
- img_init();
- line_init();
- led_init();
- bar_init();
- slider_init();
- sw_init();
- lmeter_init();
- gauge_init();
- arc_init();
- preload_init();
- chart_init();
- calendar_init();
- cb_init();
- btnm_init();
- kb_init();
- mbox_init();
- page_init();
- ta_init();
- spinbox_init();
- list_init();
- ddlist_init();
- roller_init();
- tabview_init();
- tileview_init();
- table_init();
- win_init();
-
-#if LV_USE_GROUP
- theme.group.style_mod_xcb = style_mod;
- theme.group.style_mod_edit_xcb = style_mod_edit;
-#endif
-
- return &theme;
-}
-
-/**
- * Get a pointer to the theme
- * @return pointer to the theme
- */
-lv_theme_t * lv_theme_get_zen(void)
-{
- return &theme;
-}
-
-/**********************
- * STATIC FUNCTIONS
- **********************/
-
-#endif
diff --git a/src/libs/lvgl/src/lv_themes/lv_theme_zen.h b/src/libs/lvgl/src/lv_themes/lv_theme_zen.h
deleted file mode 100644
index 4a497fe3..00000000
--- a/src/libs/lvgl/src/lv_themes/lv_theme_zen.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * @file lv_theme_zen.h
- *
- */
-
-#ifndef LV_THEME_ZEN_H
-#define LV_THEME_ZEN_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-#ifdef LV_CONF_INCLUDE_SIMPLE
-#include "lv_conf.h"
-#else
-#include "../../../lv_conf.h"
-#endif
-
-#if LV_USE_THEME_ZEN
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**
- * Initialize the zen theme
- * @param hue [0..360] hue value from HSV color space to define the theme's base color
- * @param font pointer to a font (NULL to use the default)
- * @return pointer to the initialized theme
- */
-lv_theme_t * lv_theme_zen_init(uint16_t hue, lv_font_t * font);
-
-/**
- * Get a pointer to the theme
- * @return pointer to the theme
- */
-lv_theme_t * lv_theme_get_zen(void);
-
-/**********************
- * MACROS
- **********************/
-
-#endif
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_THEME_ZEN_H*/
diff --git a/src/libs/lvgl/src/lv_themes/lv_themes.mk b/src/libs/lvgl/src/lv_themes/lv_themes.mk
deleted file mode 100644
index fce41e4e..00000000
--- a/src/libs/lvgl/src/lv_themes/lv_themes.mk
+++ /dev/null
@@ -1,14 +0,0 @@
-CSRCS += lv_theme_alien.c
-CSRCS += lv_theme.c
-CSRCS += lv_theme_default.c
-CSRCS += lv_theme_night.c
-CSRCS += lv_theme_templ.c
-CSRCS += lv_theme_zen.c
-CSRCS += lv_theme_material.c
-CSRCS += lv_theme_nemo.c
-CSRCS += lv_theme_mono.c
-
-DEPPATH += --dep-path $(LVGL_DIR)/lvgl/src/lv_themes
-VPATH += :$(LVGL_DIR)/lvgl/src/lv_themes
-
-CFLAGS += "-I$(LVGL_DIR)/lvgl/src/lv_themes"
diff --git a/src/libs/lvgl/src/lv_version.h b/src/libs/lvgl/src/lv_version.h
deleted file mode 100644
index 886966f7..00000000
--- a/src/libs/lvgl/src/lv_version.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * @file lv_version.h
- *
- */
-
-#ifndef LV_VERSION_H
-#define LV_VERSION_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*********************
- * INCLUDES
- *********************/
-/*Current version of LittlevGL*/
-#define LVGL_VERSION_MAJOR 6
-#define LVGL_VERSION_MINOR 1
-#define LVGL_VERSION_PATCH 1
-#define LVGL_VERSION_INFO ""
-
-
-/*********************
- * DEFINES
- *********************/
-
-/**********************
- * TYPEDEFS
- **********************/
-
-/**********************
- * GLOBAL PROTOTYPES
- **********************/
-
-/**********************
- * MACROS
- **********************/
-/** Gives 1 if the x.y.z version is supported in the current version
- * Usage:
- *
- * - Require v6
- * #if LV_VERSION_CHECK(6,0,0)
- * new_func_in_v6();
- * #endif
- *
- *
- * - Require at least v5.3
- * #if LV_VERSION_CHECK(5,3,0)
- * new_feature_from_v5_3();
- * #endif
- *
- *
- * - Require v5.3.2 bugfixes
- * #if LV_VERSION_CHECK(5,3,2)
- * bugfix_in_v5_3_2();
- * #endif
- *
- * */
-#define LV_VERSION_CHECK(x,y,z) (x == LVGL_VERSION_MAJOR && (y < LVGL_VERSION_MINOR || (y == LVGL_VERSION_MINOR && z <= LVGL_VERSION_PATCH)))
-
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /*LV_VERSION_H*/
diff --git a/src/libs/mynewt-nimble/apps/README.md b/src/libs/mynewt-nimble/apps/README.md
new file mode 100644
index 00000000..f36a836a
--- /dev/null
+++ b/src/libs/mynewt-nimble/apps/README.md
@@ -0,0 +1,54 @@
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+-->
+
+# Sample applications
+
+## advertiser
+
+This is the simplest example of advertising. Application sets NRPA, configures
+advertisement parameters: general discoverable and not connectable and fills
+advertisement fields. Transmited data contains only flags, tx power level and
+device name, which fits in 31B limit of single package. With this data set,
+device advertises for 10 seconds, terminates advertisement and repeats process
+again infinitely.
+
+## scanner
+
+This application shows how to perform simple scan. Device performs discovery
+procedure, during which receives advertising reports (if any devices are
+advertising nearby). These reports are being parsed and results are printed to
+serial port. Applicaton starts new discovery every second.
+
+## peripheral
+
+Peripheral application is based on advertiser, but has added capability of
+connecting with other devices. As peripheral, device doesn't initiate any
+connection by itself; instead, advertises infinitely and accepts any connection
+request it receives. Because we cannot use any 16 or 32 bit UUIDs, as these are
+reserved by Bluetooth SIG, we are forced to use 128-bit one. Including such
+long UUID in advertising data consumes large part of available payload, so this
+data is split in advertising data and response data.
+
+## central
+
+This application works in pair with peripheral. It's based on scanner
+application - the difference is, that if there was detected device with UUID
+fitting to the one predefined in central application, connection is initiated. \ No newline at end of file
diff --git a/src/libs/mynewt-nimble/apps/blemesh/src/main.c b/src/libs/mynewt-nimble/apps/blemesh/src/main.c
index 24c9950e..65270554 100644
--- a/src/libs/mynewt-nimble/apps/blemesh/src/main.c
+++ b/src/libs/mynewt-nimble/apps/blemesh/src/main.c
@@ -42,26 +42,6 @@ static int recent_test_id = STANDARD_TEST_ID;
static bool has_reg_fault = true;
-static struct bt_mesh_cfg_srv cfg_srv = {
- .relay = BT_MESH_RELAY_DISABLED,
- .beacon = BT_MESH_BEACON_ENABLED,
-#if MYNEWT_VAL(BLE_MESH_FRIEND)
- .frnd = BT_MESH_FRIEND_ENABLED,
-#else
- .gatt_proxy = BT_MESH_GATT_PROXY_NOT_SUPPORTED,
-#endif
-#if MYNEWT_VAL(BLE_MESH_GATT_PROXY)
- .gatt_proxy = BT_MESH_GATT_PROXY_ENABLED,
-#else
- .gatt_proxy = BT_MESH_GATT_PROXY_NOT_SUPPORTED,
-#endif
- .default_ttl = 7,
-
- /* 3 transmissions with 20ms interval */
- .net_transmit = BT_MESH_TRANSMIT(2, 20),
- .relay_retransmit = BT_MESH_TRANSMIT(2, 20),
-};
-
static int
fault_get_cur(struct bt_mesh_model *model,
uint8_t *test_id,
@@ -327,7 +307,7 @@ static const struct bt_mesh_model_op gen_level_op[] = {
};
static struct bt_mesh_model root_models[] = {
- BT_MESH_MODEL_CFG_SRV(&cfg_srv),
+ BT_MESH_MODEL_CFG_SRV,
BT_MESH_MODEL_HEALTH_SRV(&health_srv, &health_pub),
BT_MESH_MODEL(BT_MESH_MODEL_ID_GEN_ONOFF_SRV, gen_onoff_op,
&gen_onoff_pub, NULL),
@@ -385,7 +365,7 @@ static int output_number(bt_mesh_output_action_t action, uint32_t number)
return 0;
}
-static void prov_complete(u16_t net_idx, u16_t addr)
+static void prov_complete(uint16_t net_idx, uint16_t addr)
{
console_printf("Local node provisioned, primary address 0x%04x\n", addr);
}
diff --git a/src/libs/mynewt-nimble/apps/blemesh_light/src/light_model.c b/src/libs/mynewt-nimble/apps/blemesh_light/src/light_model.c
index 8b00e2c0..f666fe26 100644
--- a/src/libs/mynewt-nimble/apps/blemesh_light/src/light_model.c
+++ b/src/libs/mynewt-nimble/apps/blemesh_light/src/light_model.c
@@ -48,10 +48,10 @@ static uint16_t top_val;
static uint32_t neopixel[WS2812_NUM_LED];
#endif
-static u8_t gen_onoff_state;
-static s16_t gen_level_state;
+static uint8_t gen_onoff_state;
+static int16_t gen_level_state;
-static void light_set_lightness(u8_t percentage)
+static void light_set_lightness(uint8_t percentage)
{
#if (!MYNEWT_VAL(USE_NEOPIXEL))
int rc;
@@ -76,10 +76,10 @@ static void light_set_lightness(u8_t percentage)
#endif
#else
int i;
- u32_t lightness;
- u8_t max_lightness = 0x1f;
+ uint32_t lightness;
+ uint8_t max_lightness = 0x1f;
- lightness = (u8_t) (percentage * max_lightness / 100);
+ lightness = (uint8_t) (percentage * max_lightness / 100);
for (i = 0; i < WS2812_NUM_LED; i++) {
neopixel[i] = (lightness | lightness << 8 | lightness << 16);
@@ -90,7 +90,7 @@ static void light_set_lightness(u8_t percentage)
static void update_light_state(void)
{
- u16_t level = (u16_t)gen_level_state;
+ uint16_t level = (uint16_t)gen_level_state;
int percent = 100 * level / 0xffff;
if (gen_onoff_state == 0) {
@@ -99,44 +99,44 @@ static void update_light_state(void)
light_set_lightness((uint8_t) percent);
}
-int light_model_gen_onoff_get(struct bt_mesh_model *model, u8_t *state)
+int light_model_gen_onoff_get(struct bt_mesh_model *model, uint8_t *state)
{
*state = gen_onoff_state;
return 0;
}
-int light_model_gen_onoff_set(struct bt_mesh_model *model, u8_t state)
+int light_model_gen_onoff_set(struct bt_mesh_model *model, uint8_t state)
{
gen_onoff_state = state;
update_light_state();
return 0;
}
-int light_model_gen_level_get(struct bt_mesh_model *model, s16_t *level)
+int light_model_gen_level_get(struct bt_mesh_model *model, int16_t *level)
{
*level = gen_level_state;
return 0;
}
-int light_model_gen_level_set(struct bt_mesh_model *model, s16_t level)
+int light_model_gen_level_set(struct bt_mesh_model *model, int16_t level)
{
gen_level_state = level;
- if ((u16_t)gen_level_state > 0x0000) {
+ if ((uint16_t)gen_level_state > 0x0000) {
gen_onoff_state = 1;
}
- if ((u16_t)gen_level_state == 0x0000) {
+ if ((uint16_t)gen_level_state == 0x0000) {
gen_onoff_state = 0;
}
update_light_state();
return 0;
}
-int light_model_light_lightness_get(struct bt_mesh_model *model, s16_t *lightness)
+int light_model_light_lightness_get(struct bt_mesh_model *model, int16_t *lightness)
{
return light_model_gen_level_get(model, lightness);
}
-int light_model_light_lightness_set(struct bt_mesh_model *model, s16_t lightness)
+int light_model_light_lightness_set(struct bt_mesh_model *model, int16_t lightness)
{
return light_model_gen_level_set(model, lightness);
}
diff --git a/src/libs/mynewt-nimble/apps/blemesh_light/src/light_model.h b/src/libs/mynewt-nimble/apps/blemesh_light/src/light_model.h
index 7fcdd0c3..1f6f3c44 100644
--- a/src/libs/mynewt-nimble/apps/blemesh_light/src/light_model.h
+++ b/src/libs/mynewt-nimble/apps/blemesh_light/src/light_model.h
@@ -26,12 +26,12 @@
#include "syscfg/syscfg.h"
#include "mesh/mesh.h"
-int light_model_gen_onoff_get(struct bt_mesh_model *model, u8_t *state);
-int light_model_gen_onoff_set(struct bt_mesh_model *model, u8_t state);
-int light_model_gen_level_get(struct bt_mesh_model *model, s16_t *level);
-int light_model_gen_level_set(struct bt_mesh_model *model, s16_t level);
-int light_model_light_lightness_get(struct bt_mesh_model *model, s16_t *lightness);
-int light_model_light_lightness_set(struct bt_mesh_model *model, s16_t lightness);
+int light_model_gen_onoff_get(struct bt_mesh_model *model, uint8_t *state);
+int light_model_gen_onoff_set(struct bt_mesh_model *model, uint8_t state);
+int light_model_gen_level_get(struct bt_mesh_model *model, int16_t *level);
+int light_model_gen_level_set(struct bt_mesh_model *model, int16_t level);
+int light_model_light_lightness_get(struct bt_mesh_model *model, int16_t *lightness);
+int light_model_light_lightness_set(struct bt_mesh_model *model, int16_t lightness);
int light_model_init(void);
#endif
diff --git a/src/libs/mynewt-nimble/apps/blemesh_light/src/main.c b/src/libs/mynewt-nimble/apps/blemesh_light/src/main.c
index 51d86eb5..70deede1 100644
--- a/src/libs/mynewt-nimble/apps/blemesh_light/src/main.c
+++ b/src/libs/mynewt-nimble/apps/blemesh_light/src/main.c
@@ -31,8 +31,8 @@
#include "light_model.h"
-static void model_bound_cb(u16_t addr, struct bt_mesh_model *model,
- u16_t key_idx)
+static void model_bound_cb(uint16_t addr, struct bt_mesh_model *model,
+ uint16_t key_idx)
{
int rc;
diff --git a/src/libs/mynewt-nimble/apps/blemesh_models_example_1/src/main.c b/src/libs/mynewt-nimble/apps/blemesh_models_example_1/src/main.c
index ef398c9f..736d4d32 100644
--- a/src/libs/mynewt-nimble/apps/blemesh_models_example_1/src/main.c
+++ b/src/libs/mynewt-nimble/apps/blemesh_models_example_1/src/main.c
@@ -85,30 +85,6 @@ static void gen_onoff_status(struct bt_mesh_model *model,
struct os_mbuf *buf);
/*
- * Server Configuration Declaration
- */
-
-static struct bt_mesh_cfg_srv cfg_srv = {
- .relay = BT_MESH_RELAY_DISABLED,
- .beacon = BT_MESH_BEACON_ENABLED,
-#if defined(CONFIG_BT_MESH_FRIEND)
- .frnd = BT_MESH_FRIEND_ENABLED,
-#else
- .frnd = BT_MESH_FRIEND_NOT_SUPPORTED,
-#endif
-#if defined(CONFIG_BT_MESH_GATT_PROXY)
- .gatt_proxy = BT_MESH_GATT_PROXY_ENABLED,
-#else
- .gatt_proxy = BT_MESH_GATT_PROXY_NOT_SUPPORTED,
-#endif
- .default_ttl = 7,
-
- /* 3 transmissions with 20ms interval */
- .net_transmit = BT_MESH_TRANSMIT(2, 20),
- .relay_retransmit = BT_MESH_TRANSMIT(2, 20),
-};
-
-/*
* Client Configuration Declaration
*/
@@ -213,9 +189,9 @@ static const struct bt_mesh_model_op gen_onoff_cli_op[] = {
};
struct onoff_state {
- u8_t current;
- u8_t previous;
- u8_t led_gpio_pin;
+ uint8_t current;
+ uint8_t previous;
+ uint8_t led_gpio_pin;
};
/*
@@ -238,7 +214,7 @@ static struct onoff_state onoff_state_arr[] = {
*/
static struct bt_mesh_model root_models[] = {
- BT_MESH_MODEL_CFG_SRV(&cfg_srv),
+ BT_MESH_MODEL_CFG_SRV,
BT_MESH_MODEL_CFG_CLI(&cfg_cli),
BT_MESH_MODEL_HEALTH_SRV(&health_srv, &health_pub),
BT_MESH_MODEL(BT_MESH_MODEL_ID_GEN_ONOFF_SRV, gen_onoff_srv_op,
@@ -320,20 +296,20 @@ static const struct bt_mesh_comp comp = {
};
struct sw {
- u8_t sw_num;
- u8_t onoff_state;
+ uint8_t sw_num;
+ uint8_t onoff_state;
struct os_callout button_work;
struct os_callout button_timer;
};
-static u8_t button_press_cnt;
+static uint8_t button_press_cnt;
static struct sw sw;
-static u8_t trans_id;
-static u32_t time, last_time;
-static u16_t primary_addr;
-static u16_t primary_net_idx;
+static uint8_t trans_id;
+static uint32_t time, last_time;
+static uint16_t primary_addr;
+static uint16_t primary_net_idx;
/*
* Generic OnOff Model Server Message Handlers
@@ -416,7 +392,7 @@ static void gen_onoff_status(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- u8_t state;
+ uint8_t state;
state = net_buf_simple_pull_u8(buf);
@@ -424,7 +400,7 @@ static void gen_onoff_status(struct bt_mesh_model *model,
bt_mesh_model_elem(model)->addr, ctx->addr, state);
}
-static int output_number(bt_mesh_output_action_t action, u32_t number)
+static int output_number(bt_mesh_output_action_t action, uint32_t number)
{
BT_INFO("OOB Number %u", number);
return 0;
@@ -436,7 +412,7 @@ static int output_string(const char *str)
return 0;
}
-static void prov_complete(u16_t net_idx, u16_t addr)
+static void prov_complete(uint16_t net_idx, uint16_t addr)
{
BT_INFO("provisioning complete for net_idx 0x%04x addr 0x%04x",
net_idx, addr);
@@ -449,7 +425,7 @@ static void prov_reset(void)
bt_mesh_prov_enable(BT_MESH_PROV_ADV | BT_MESH_PROV_GATT);
}
-static u8_t dev_uuid[16] = MYNEWT_VAL(BLE_MESH_DEV_UUID);
+static uint8_t dev_uuid[16] = MYNEWT_VAL(BLE_MESH_DEV_UUID);
#define BUTTON_DEBOUNCE_DELAY_MS 250
@@ -528,7 +504,7 @@ static void button_pressed_worker(struct os_event *work)
struct bt_mesh_model *mod_cli, *mod_srv;
struct bt_mesh_model_pub *pub_cli, *pub_srv;
struct sw *sw = work->ev_arg;
- u8_t sw_idx = sw->sw_num;
+ uint8_t sw_idx = sw->sw_num;
int err;
mod_cli = mod_cli_sw[sw_idx];
@@ -599,7 +575,7 @@ static const struct bt_mesh_prov prov = {
.reset = prov_reset,
};
-void init_led(u8_t dev)
+void init_led(uint8_t dev)
{
hal_gpio_init_out(onoff_state_arr[dev].led_gpio_pin, 1);
}
diff --git a/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/ble_mesh.c b/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/ble_mesh.c
index 86d4c515..021d8e08 100644
--- a/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/ble_mesh.c
+++ b/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/ble_mesh.c
@@ -34,7 +34,7 @@
#ifdef OOB_AUTH_ENABLE
-static int output_number(bt_mesh_output_action_t action, u32_t number)
+static int output_number(bt_mesh_output_action_t action, uint32_t number)
{
printk("OOB Number: %lu\n", number);
return 0;
@@ -48,7 +48,7 @@ static int output_string(const char *str)
#endif
-static void prov_complete(u16_t net_idx, u16_t addr)
+static void prov_complete(uint16_t net_idx, uint16_t addr)
{
printk("Local node provisioned, primary address 0x%04x\n", addr);
}
@@ -58,7 +58,7 @@ static void prov_reset(void)
bt_mesh_prov_enable(BT_MESH_PROV_ADV | BT_MESH_PROV_GATT);
}
-static u8_t dev_uuid[16] = MYNEWT_VAL(BLE_MESH_DEV_UUID);
+static uint8_t dev_uuid[16] = MYNEWT_VAL(BLE_MESH_DEV_UUID);
static const struct bt_mesh_prov prov = {
.uuid = dev_uuid,
diff --git a/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/device_composition.c b/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/device_composition.c
index b638b861..5dfeaf8e 100644
--- a/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/device_composition.c
+++ b/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/device_composition.c
@@ -36,31 +36,6 @@
#include "state_binding.h"
#include "transition.h"
-static struct bt_mesh_cfg_srv cfg_srv = {
- .relay = BT_MESH_RELAY_ENABLED,
- .beacon = BT_MESH_BEACON_ENABLED,
-
-#if defined(CONFIG_BT_MESH_FRIEND)
- .frnd = BT_MESH_FRIEND_ENABLED,
-#else
- .frnd = BT_MESH_FRIEND_NOT_SUPPORTED,
-#endif
-
-#if defined(CONFIG_BT_MESH_GATT_PROXY)
- .gatt_proxy = BT_MESH_GATT_PROXY_ENABLED,
-#else
- .gatt_proxy = BT_MESH_GATT_PROXY_NOT_SUPPORTED,
-#endif
-
- .default_ttl = 7,
-
- /* 2 transmissions with 20ms interval */
- .net_transmit = BT_MESH_TRANSMIT(2, 20),
-
- /* 3 transmissions with 20ms interval */
- .relay_retransmit = BT_MESH_TRANSMIT(3, 20),
-};
-
static struct bt_mesh_health_srv health_srv = {
};
@@ -224,8 +199,8 @@ static void gen_onoff_set_unack(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- u8_t tid, onoff, tt, delay;
- s64_t now;
+ uint8_t tid, onoff, tt, delay;
+ int64_t now;
struct generic_onoff_state *state = model->user_data;
onoff = net_buf_simple_pull_u8(buf);
@@ -290,8 +265,8 @@ static void gen_onoff_set(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- u8_t tid, onoff, tt, delay;
- s64_t now;
+ uint8_t tid, onoff, tt, delay;
+ int64_t now;
struct generic_onoff_state *state = model->user_data;
onoff = net_buf_simple_pull_u8(buf);
@@ -422,12 +397,12 @@ static void gen_level_set_unack(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- u8_t tid, tt, delay;
- s16_t level;
- s64_t now;
+ uint8_t tid, tt, delay;
+ int16_t level;
+ int64_t now;
struct generic_level_state *state = model->user_data;
- level = (s16_t) net_buf_simple_pull_le16(buf);
+ level = (int16_t) net_buf_simple_pull_le16(buf);
tid = net_buf_simple_pull_u8(buf);
now = k_uptime_get();
@@ -494,12 +469,12 @@ static void gen_level_set(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- u8_t tid, tt, delay;
- s16_t level;
- s64_t now;
+ uint8_t tid, tt, delay;
+ int16_t level;
+ int64_t now;
struct generic_level_state *state = model->user_data;
- level = (s16_t) net_buf_simple_pull_le16(buf);
+ level = (int16_t) net_buf_simple_pull_le16(buf);
tid = net_buf_simple_pull_u8(buf);
now = k_uptime_get();
@@ -569,12 +544,12 @@ static void gen_delta_set_unack(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- u8_t tid, tt, delay;
- s32_t tmp32, delta;
- s64_t now;
+ uint8_t tid, tt, delay;
+ int32_t tmp32, delta;
+ int64_t now;
struct generic_level_state *state = model->user_data;
- delta = (s32_t) net_buf_simple_pull_le32(buf);
+ delta = (int32_t) net_buf_simple_pull_le32(buf);
tid = net_buf_simple_pull_u8(buf);
now = k_uptime_get();
@@ -658,12 +633,12 @@ static void gen_delta_set(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- u8_t tid, tt, delay;
- s32_t tmp32, delta;
- s64_t now;
+ uint8_t tid, tt, delay;
+ int32_t tmp32, delta;
+ int64_t now;
struct generic_level_state *state = model->user_data;
- delta = (s32_t) net_buf_simple_pull_le32(buf);
+ delta = (int32_t) net_buf_simple_pull_le32(buf);
tid = net_buf_simple_pull_u8(buf);
now = k_uptime_get();
@@ -805,13 +780,13 @@ static void gen_move_set_unack(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- u8_t tid, tt, delay;
- s16_t delta;
- s32_t tmp32;
- s64_t now;
+ uint8_t tid, tt, delay;
+ int16_t delta;
+ int32_t tmp32;
+ int64_t now;
struct generic_level_state *state = model->user_data;
- delta = (s16_t) net_buf_simple_pull_le16(buf);
+ delta = (int16_t) net_buf_simple_pull_le16(buf);
tid = net_buf_simple_pull_u8(buf);
now = k_uptime_get();
@@ -886,13 +861,13 @@ static void gen_move_set(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- u8_t tid, tt, delay;
- s16_t delta;
- s32_t tmp32;
- s64_t now;
+ uint8_t tid, tt, delay;
+ int16_t delta;
+ int32_t tmp32;
+ int64_t now;
struct generic_level_state *state = model->user_data;
- delta = (s16_t) net_buf_simple_pull_le16(buf);
+ delta = (int16_t) net_buf_simple_pull_le16(buf);
tid = net_buf_simple_pull_u8(buf);
now = k_uptime_get();
@@ -1021,7 +996,7 @@ static bool gen_def_trans_time_setunack(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- u8_t tt;
+ uint8_t tt;
struct gen_def_trans_time_state *state = model->user_data;
tt = net_buf_simple_pull_u8(buf);
@@ -1122,7 +1097,7 @@ static bool gen_onpowerup_setunack(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- u8_t onpowerup;
+ uint8_t onpowerup;
struct generic_onpowerup_state *state = model->user_data;
onpowerup = net_buf_simple_pull_u8(buf);
@@ -1187,9 +1162,9 @@ static void vnd_set_unack(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- u8_t tid;
+ uint8_t tid;
int current;
- s64_t now;
+ int64_t now;
struct vendor_state *state = model->user_data;
current = net_buf_simple_pull_le16(buf);
@@ -1290,9 +1265,9 @@ static void light_lightness_set_unack(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- u8_t tid, tt, delay;
- u16_t actual;
- s64_t now;
+ uint8_t tid, tt, delay;
+ uint16_t actual;
+ int64_t now;
struct light_lightness_state *state = model->user_data;
actual = net_buf_simple_pull_le16(buf);
@@ -1360,9 +1335,9 @@ static void light_lightness_set(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- u8_t tid, tt, delay;
- u16_t actual;
- s64_t now;
+ uint8_t tid, tt, delay;
+ uint16_t actual;
+ int64_t now;
struct light_lightness_state *state = model->user_data;
actual = net_buf_simple_pull_le16(buf);
@@ -1483,9 +1458,9 @@ static void light_lightness_linear_set_unack(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- u8_t tid, tt, delay;
- u16_t linear;
- s64_t now;
+ uint8_t tid, tt, delay;
+ uint16_t linear;
+ int64_t now;
struct light_lightness_state *state = model->user_data;
linear = net_buf_simple_pull_le16(buf);
@@ -1546,9 +1521,9 @@ static void light_lightness_linear_set(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- u8_t tid, tt, delay;
- u16_t linear;
- s64_t now;
+ uint8_t tid, tt, delay;
+ uint16_t linear;
+ int64_t now;
struct light_lightness_state *state = model->user_data;
linear = net_buf_simple_pull_le16(buf);
@@ -1690,7 +1665,7 @@ static void light_lightness_default_set_unack(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- u16_t lightness;
+ uint16_t lightness;
struct light_lightness_state *state = model->user_data;
lightness = net_buf_simple_pull_le16(buf);
@@ -1741,7 +1716,7 @@ static bool light_lightness_range_setunack(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- u16_t min, max;
+ uint16_t min, max;
struct light_lightness_state *state = model->user_data;
min = net_buf_simple_pull_le16(buf);
@@ -1908,15 +1883,15 @@ static void light_ctl_set_unack(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- u8_t tid, tt, delay;
- s16_t delta_uv;
- u16_t lightness, temp;
- s64_t now;
+ uint8_t tid, tt, delay;
+ int16_t delta_uv;
+ uint16_t lightness, temp;
+ int64_t now;
struct light_ctl_state *state = model->user_data;
lightness = net_buf_simple_pull_le16(buf);
temp = net_buf_simple_pull_le16(buf);
- delta_uv = (s16_t) net_buf_simple_pull_le16(buf);
+ delta_uv = (int16_t) net_buf_simple_pull_le16(buf);
tid = net_buf_simple_pull_u8(buf);
if (temp < TEMP_MIN || temp > TEMP_MAX) {
@@ -1991,15 +1966,15 @@ static void light_ctl_set(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- u8_t tid, tt, delay;
- s16_t delta_uv;
- u16_t lightness, temp;
- s64_t now;
+ uint8_t tid, tt, delay;
+ int16_t delta_uv;
+ uint16_t lightness, temp;
+ int64_t now;
struct light_ctl_state *state = model->user_data;
lightness = net_buf_simple_pull_le16(buf);
temp = net_buf_simple_pull_le16(buf);
- delta_uv = (s16_t) net_buf_simple_pull_le16(buf);
+ delta_uv = (int16_t) net_buf_simple_pull_le16(buf);
tid = net_buf_simple_pull_u8(buf);
if (temp < TEMP_MIN || temp > TEMP_MAX) {
@@ -2140,13 +2115,13 @@ static bool light_ctl_default_setunack(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- u16_t lightness, temp;
- s16_t delta_uv;
+ uint16_t lightness, temp;
+ int16_t delta_uv;
struct light_ctl_state *state = model->user_data;
lightness = net_buf_simple_pull_le16(buf);
temp = net_buf_simple_pull_le16(buf);
- delta_uv = (s16_t) net_buf_simple_pull_le16(buf);
+ delta_uv = (int16_t) net_buf_simple_pull_le16(buf);
/* Here, Model specification is silent about tid implementation */
@@ -2216,7 +2191,7 @@ static bool light_ctl_temp_range_setunack(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- u16_t min, max;
+ uint16_t min, max;
struct light_ctl_state *state = model->user_data;
min = net_buf_simple_pull_le16(buf);
@@ -2384,14 +2359,14 @@ static void light_ctl_temp_set_unack(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- u8_t tid, tt, delay;
- s16_t delta_uv;
- u16_t temp;
- s64_t now;
+ uint8_t tid, tt, delay;
+ int16_t delta_uv;
+ uint16_t temp;
+ int64_t now;
struct light_ctl_state *state = model->user_data;
temp = net_buf_simple_pull_le16(buf);
- delta_uv = (s16_t) net_buf_simple_pull_le16(buf);
+ delta_uv = (int16_t) net_buf_simple_pull_le16(buf);
tid = net_buf_simple_pull_u8(buf);
if (temp < TEMP_MIN || temp > TEMP_MAX) {
@@ -2463,14 +2438,14 @@ static void light_ctl_temp_set(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- u8_t tid, tt, delay;
- s16_t delta_uv;
- u16_t temp;
- s64_t now;
+ uint8_t tid, tt, delay;
+ int16_t delta_uv;
+ uint16_t temp;
+ int64_t now;
struct light_ctl_state *state = model->user_data;
temp = net_buf_simple_pull_le16(buf);
- delta_uv = (s16_t) net_buf_simple_pull_le16(buf);
+ delta_uv = (int16_t) net_buf_simple_pull_le16(buf);
tid = net_buf_simple_pull_u8(buf);
if (temp < TEMP_MIN || temp > TEMP_MAX) {
@@ -2689,7 +2664,7 @@ static const struct bt_mesh_model_op vnd_ops[] = {
};
struct bt_mesh_model root_models[] = {
- BT_MESH_MODEL_CFG_SRV(&cfg_srv),
+ BT_MESH_MODEL_CFG_SRV,
BT_MESH_MODEL_HEALTH_SRV(&health_srv, &health_pub),
BT_MESH_MODEL(BT_MESH_MODEL_ID_GEN_ONOFF_SRV,
diff --git a/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/device_composition.h b/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/device_composition.h
index 38507195..d0f054ee 100644
--- a/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/device_composition.h
+++ b/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/device_composition.h
@@ -46,109 +46,109 @@
#define CANNOT_SET_RANGE_MAX 0x02
struct generic_onoff_state {
- u8_t onoff;
- u8_t target_onoff;
+ uint8_t onoff;
+ uint8_t target_onoff;
- u8_t last_tid;
- u16_t last_src_addr;
- u16_t last_dst_addr;
- s64_t last_msg_timestamp;
+ uint8_t last_tid;
+ uint16_t last_src_addr;
+ uint16_t last_dst_addr;
+ int64_t last_msg_timestamp;
- s32_t tt_delta;
+ int32_t tt_delta;
struct transition *transition;
};
struct generic_level_state {
- s16_t level;
- s16_t target_level;
+ int16_t level;
+ int16_t target_level;
- s16_t last_level;
- s32_t last_delta;
+ int16_t last_level;
+ int32_t last_delta;
- u8_t last_tid;
- u16_t last_src_addr;
- u16_t last_dst_addr;
- s64_t last_msg_timestamp;
+ uint8_t last_tid;
+ uint16_t last_src_addr;
+ uint16_t last_dst_addr;
+ int64_t last_msg_timestamp;
- s32_t tt_delta;
+ int32_t tt_delta;
struct transition *transition;
};
struct generic_onpowerup_state {
- u8_t onpowerup;
+ uint8_t onpowerup;
};
struct gen_def_trans_time_state {
- u8_t tt;
+ uint8_t tt;
};
struct vendor_state {
int current;
- u32_t response;
- u8_t last_tid;
- u16_t last_src_addr;
- u16_t last_dst_addr;
- s64_t last_msg_timestamp;
+ uint32_t response;
+ uint8_t last_tid;
+ uint16_t last_src_addr;
+ uint16_t last_dst_addr;
+ int64_t last_msg_timestamp;
};
struct light_lightness_state {
- u16_t linear;
- u16_t target_linear;
+ uint16_t linear;
+ uint16_t target_linear;
- u16_t actual;
- u16_t target_actual;
+ uint16_t actual;
+ uint16_t target_actual;
- u16_t last;
- u16_t def;
+ uint16_t last;
+ uint16_t def;
- u8_t status_code;
- u16_t light_range_min;
- u16_t light_range_max;
- u32_t lightness_range;
+ uint8_t status_code;
+ uint16_t light_range_min;
+ uint16_t light_range_max;
+ uint32_t lightness_range;
- u8_t last_tid;
- u16_t last_src_addr;
- u16_t last_dst_addr;
- s64_t last_msg_timestamp;
+ uint8_t last_tid;
+ uint16_t last_src_addr;
+ uint16_t last_dst_addr;
+ int64_t last_msg_timestamp;
- s32_t tt_delta_actual;
- s32_t tt_delta_linear;
+ int32_t tt_delta_actual;
+ int32_t tt_delta_linear;
struct transition *transition;
};
struct light_ctl_state {
- u16_t lightness;
- u16_t target_lightness;
+ uint16_t lightness;
+ uint16_t target_lightness;
- u16_t temp;
- u16_t target_temp;
+ uint16_t temp;
+ uint16_t target_temp;
- s16_t delta_uv;
- s16_t target_delta_uv;
+ int16_t delta_uv;
+ int16_t target_delta_uv;
- u8_t status_code;
- u16_t temp_range_min;
- u16_t temp_range_max;
- u32_t temperature_range;
+ uint8_t status_code;
+ uint16_t temp_range_min;
+ uint16_t temp_range_max;
+ uint32_t temperature_range;
- u16_t lightness_def;
- u16_t temp_def;
- u32_t lightness_temp_def;
- s16_t delta_uv_def;
+ uint16_t lightness_def;
+ uint16_t temp_def;
+ uint32_t lightness_temp_def;
+ int16_t delta_uv_def;
- u32_t lightness_temp_last;
+ uint32_t lightness_temp_last;
- u8_t last_tid;
- u16_t last_src_addr;
- u16_t last_dst_addr;
- s64_t last_msg_timestamp;
+ uint8_t last_tid;
+ uint16_t last_src_addr;
+ uint16_t last_dst_addr;
+ int64_t last_msg_timestamp;
- s32_t tt_delta_lightness;
- s32_t tt_delta_temp;
- s32_t tt_delta_duv;
+ int32_t tt_delta_lightness;
+ int32_t tt_delta_temp;
+ int32_t tt_delta_duv;
struct transition *transition;
};
diff --git a/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/main.c b/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/main.c
index 7c8d65e6..741367b4 100644
--- a/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/main.c
+++ b/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/main.c
@@ -59,14 +59,14 @@ static void light_default_var_init(void)
light_ctl_srv_user_data.temp_def = TEMP_MIN;
light_ctl_srv_user_data.lightness_temp_last =
- (u32_t) ((LIGHTNESS_MAX << 16) | TEMP_MIN);
+ (uint32_t) ((LIGHTNESS_MAX << 16) | TEMP_MIN);
}
static void light_default_status_init(void)
{
- u16_t lightness;
+ uint16_t lightness;
- lightness = (u16_t) (light_ctl_srv_user_data.lightness_temp_last >> 16);
+ lightness = (uint16_t) (light_ctl_srv_user_data.lightness_temp_last >> 16);
if (lightness) {
gen_onoff_srv_root_user_data.onoff = STATE_ON;
@@ -77,10 +77,10 @@ static void light_default_status_init(void)
/* Retrieve Default Lightness & Temperature Values */
if (light_ctl_srv_user_data.lightness_temp_def) {
- light_ctl_srv_user_data.lightness_def = (u16_t)
+ light_ctl_srv_user_data.lightness_def = (uint16_t)
(light_ctl_srv_user_data.lightness_temp_def >> 16);
- light_ctl_srv_user_data.temp_def = (u16_t)
+ light_ctl_srv_user_data.temp_def = (uint16_t)
(light_ctl_srv_user_data.lightness_temp_def);
}
@@ -92,18 +92,18 @@ static void light_default_status_init(void)
/* Retrieve Range of Lightness & Temperature */
if (light_lightness_srv_user_data.lightness_range) {
- light_lightness_srv_user_data.light_range_max = (u16_t)
+ light_lightness_srv_user_data.light_range_max = (uint16_t)
(light_lightness_srv_user_data.lightness_range >> 16);
- light_lightness_srv_user_data.light_range_min = (u16_t)
+ light_lightness_srv_user_data.light_range_min = (uint16_t)
(light_lightness_srv_user_data.lightness_range);
}
if (light_ctl_srv_user_data.temperature_range) {
- light_ctl_srv_user_data.temp_range_max = (u16_t)
+ light_ctl_srv_user_data.temp_range_max = (uint16_t)
(light_ctl_srv_user_data.temperature_range >> 16);
- light_ctl_srv_user_data.temp_range_min = (u16_t)
+ light_ctl_srv_user_data.temp_range_min = (uint16_t)
(light_ctl_srv_user_data.temperature_range);
}
@@ -117,11 +117,11 @@ static void light_default_status_init(void)
state_binding(ONOFF, ONOFF_TEMP);
break;
case STATE_RESTORE:
- light_lightness_srv_user_data.last = (u16_t)
+ light_lightness_srv_user_data.last = (uint16_t)
(light_ctl_srv_user_data.lightness_temp_last >> 16);
light_ctl_srv_user_data.temp =
- (u16_t) (light_ctl_srv_user_data.lightness_temp_last);
+ (uint16_t) (light_ctl_srv_user_data.lightness_temp_last);
state_binding(ONPOWERUP, ONOFF_TEMP);
break;
@@ -132,7 +132,7 @@ static void light_default_status_init(void)
void update_light_state(void)
{
- u8_t power, color;
+ uint8_t power, color;
power = 100 * ((float) lightness / 65535);
color = 100 * ((float) (temperature + 32768) / 65535);
diff --git a/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/publisher.c b/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/publisher.c
index 21364b81..f8cf849d 100644
--- a/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/publisher.c
+++ b/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/publisher.c
@@ -41,12 +41,12 @@
static bool is_randomization_of_TIDs_done;
#if (defined(ONOFF) || defined(ONOFF_TT))
-static u8_t tid_onoff;
+static uint8_t tid_onoff;
#elif defined(VND_MODEL_TEST)
-static u8_t tid_vnd;
+static uint8_t tid_vnd;
#endif
-static u8_t tid_level;
+static uint8_t tid_level;
void randomize_publishers_TID(void)
{
@@ -61,7 +61,7 @@ void randomize_publishers_TID(void)
is_randomization_of_TIDs_done = true;
}
-static u32_t button_read(int button)
+static uint32_t button_read(int button)
{
return (uint32_t) hal_gpio_read(button);
}
diff --git a/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/state_binding.c b/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/state_binding.c
index ae539433..0778f787 100644
--- a/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/state_binding.c
+++ b/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/state_binding.c
@@ -32,14 +32,14 @@
#include "transition.h"
-u16_t lightness, target_lightness;
-s16_t temperature, target_temperature;
+uint16_t lightness, target_lightness;
+int16_t temperature, target_temperature;
-static s32_t ceiling(float num)
+static int32_t ceiling(float num)
{
- s32_t inum;
+ int32_t inum;
- inum = (s32_t) num;
+ inum = (int32_t) num;
if (num == (float) inum) {
return inum;
}
@@ -47,21 +47,21 @@ static s32_t ceiling(float num)
return inum + 1;
}
-u16_t actual_to_linear(u16_t val)
+uint16_t actual_to_linear(uint16_t val)
{
float tmp;
tmp = ((float) val / 65535);
- return (u16_t) ceiling(65535 * tmp * tmp);
+ return (uint16_t) ceiling(65535 * tmp * tmp);
}
-u16_t linear_to_actual(u16_t val)
+uint16_t linear_to_actual(uint16_t val)
{
- return (u16_t) (65535 * sqrt(((float) val / 65535)));
+ return (uint16_t) (65535 * sqrt(((float) val / 65535)));
}
-static void constrain_lightness(u16_t var)
+static void constrain_lightness(uint16_t var)
{
if (var > 0 && var < light_lightness_srv_user_data.light_range_min) {
var = light_lightness_srv_user_data.light_range_min;
@@ -72,7 +72,7 @@ static void constrain_lightness(u16_t var)
lightness = var;
}
-static void constrain_lightness2(u16_t var)
+static void constrain_lightness2(uint16_t var)
{
/* This is as per Mesh Model Specification 3.3.2.2.3 */
if (var > 0 && var < light_lightness_srv_user_data.light_range_min) {
@@ -88,7 +88,7 @@ static void constrain_lightness2(u16_t var)
lightness = var;
}
-static void constrain_target_lightness(u16_t var)
+static void constrain_target_lightness(uint16_t var)
{
if (var > 0 &&
var < light_lightness_srv_user_data.light_range_min) {
@@ -100,7 +100,7 @@ static void constrain_target_lightness(u16_t var)
target_lightness = var;
}
-static s16_t light_ctl_temp_to_level(u16_t temp)
+static int16_t light_ctl_temp_to_level(uint16_t temp)
{
float tmp;
@@ -111,14 +111,14 @@ static s16_t light_ctl_temp_to_level(u16_t temp)
tmp = tmp / (light_ctl_srv_user_data.temp_range_max -
light_ctl_srv_user_data.temp_range_min);
- return (s16_t) (tmp - 32768);
+ return (int16_t) (tmp - 32768);
/* 6.1.3.1.1 2nd formula end */
}
-static u16_t level_to_light_ctl_temp(s16_t level)
+static uint16_t level_to_light_ctl_temp(int16_t level)
{
- u16_t tmp;
+ uint16_t tmp;
float diff;
/* Mesh Model Specification 6.1.3.1.1 1st formula start */
@@ -126,14 +126,14 @@ static u16_t level_to_light_ctl_temp(s16_t level)
light_ctl_srv_user_data.temp_range_min) / 65535;
- tmp = (u16_t) ((level + 32768) * diff);
+ tmp = (uint16_t) ((level + 32768) * diff);
return (light_ctl_srv_user_data.temp_range_min + tmp);
/* 6.1.3.1.1 1st formula end */
}
-void state_binding(u8_t light, u8_t temp)
+void state_binding(uint8_t light, uint8_t temp)
{
switch (temp) {
case ONOFF_TEMP:
@@ -211,10 +211,10 @@ jump:
light_ctl_srv_user_data.lightness = lightness;
}
-void calculate_lightness_target_values(u8_t type)
+void calculate_lightness_target_values(uint8_t type)
{
bool set_light_ctl_temp_target_value;
- u16_t tmp;
+ uint16_t tmp;
set_light_ctl_temp_target_value = true;
@@ -274,7 +274,7 @@ void calculate_lightness_target_values(u8_t type)
}
}
-void calculate_temp_target_values(u8_t type)
+void calculate_temp_target_values(uint8_t type)
{
bool set_light_ctl_delta_uv_target_value;
diff --git a/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/state_binding.h b/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/state_binding.h
index db1f2a2e..0498e5c6 100644
--- a/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/state_binding.h
+++ b/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/state_binding.h
@@ -43,11 +43,11 @@ enum state_binding {
IGNORE_TEMP
};
-extern u16_t lightness, target_lightness;
-extern s16_t temperature, target_temperature;
+extern uint16_t lightness, target_lightness;
+extern int16_t temperature, target_temperature;
-void state_binding(u8_t lightness, u8_t temperature);
-void calculate_lightness_target_values(u8_t type);
-void calculate_temp_target_values(u8_t type);
+void state_binding(uint8_t lightness, uint8_t temperature);
+void calculate_lightness_target_values(uint8_t type);
+void calculate_temp_target_values(uint8_t type);
#endif
diff --git a/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/storage.c b/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/storage.c
index 86fec7cc..d0ef980a 100644
--- a/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/storage.c
+++ b/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/storage.c
@@ -32,8 +32,8 @@
#include "device_composition.h"
#include "storage.h"
-static u8_t storage_id;
-u8_t reset_counter;
+static uint8_t storage_id;
+uint8_t reset_counter;
static void save_reset_counter(void)
{
@@ -76,7 +76,7 @@ static void save_lightness_temp_def_state(void)
char buf[12];
light_ctl_srv_user_data.lightness_temp_def =
- (u32_t) ((light_ctl_srv_user_data.lightness_def << 16) |
+ (uint32_t) ((light_ctl_srv_user_data.lightness_def << 16) |
light_ctl_srv_user_data.temp_def);
settings_str_from_bytes(&light_ctl_srv_user_data.lightness_temp_def,
@@ -91,7 +91,7 @@ static void save_lightness_temp_last_state(void)
char buf[12];
light_ctl_srv_user_data.lightness_temp_last =
- (u32_t) ((light_ctl_srv_user_data.lightness << 16) |
+ (uint32_t) ((light_ctl_srv_user_data.lightness << 16) |
light_ctl_srv_user_data.temp);
settings_str_from_bytes(&light_ctl_srv_user_data.lightness_temp_last,
@@ -108,7 +108,7 @@ static void save_lightness_range(void)
char buf[12];
light_lightness_srv_user_data.lightness_range =
- (u32_t) ((light_lightness_srv_user_data.light_range_max << 16) |
+ (uint32_t) ((light_lightness_srv_user_data.light_range_max << 16) |
light_lightness_srv_user_data.light_range_min);
settings_str_from_bytes(&light_lightness_srv_user_data.lightness_range,
@@ -123,7 +123,7 @@ static void save_temperature_range(void)
char buf[12];
light_ctl_srv_user_data.temperature_range =
- (u32_t) ((light_ctl_srv_user_data.temp_range_max << 16) |
+ (uint32_t) ((light_ctl_srv_user_data.temp_range_max << 16) |
light_ctl_srv_user_data.temp_range_min);
settings_str_from_bytes(&light_ctl_srv_user_data.temperature_range,
@@ -162,7 +162,7 @@ static void storage_work_handler(struct os_event *work)
struct os_callout storage_work;
-void save_on_flash(u8_t id)
+void save_on_flash(uint8_t id)
{
storage_id = id;
os_callout_reset(&storage_work, 0);
diff --git a/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/storage.h b/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/storage.h
index e2905048..5e636f62 100644
--- a/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/storage.h
+++ b/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/storage.h
@@ -37,11 +37,11 @@ enum ps_variables_id {
TEMPERATURE_RANGE
};
-extern u8_t reset_counter;
+extern uint8_t reset_counter;
extern struct os_callout storage_work;
int ps_settings_init(void);
-void save_on_flash(u8_t id);
+void save_on_flash(uint8_t id);
#endif
diff --git a/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/transition.c b/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/transition.c
index c9463e10..e31af75d 100644
--- a/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/transition.c
+++ b/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/transition.c
@@ -40,8 +40,8 @@ struct os_callout light_ctl_temp_work;
struct os_callout dummy_timer;
-u8_t transition_type, default_tt;
-u32_t *ptr_counter;
+uint8_t transition_type, default_tt;
+uint32_t *ptr_counter;
struct os_callout *ptr_timer = &dummy_timer;
struct transition lightness_transition, temp_transition;
@@ -50,9 +50,9 @@ struct transition lightness_transition, temp_transition;
void calculate_rt(struct transition *transition)
{
- u8_t steps, resolution;
- s32_t duration_remainder;
- s64_t now;
+ uint8_t steps, resolution;
+ int32_t duration_remainder;
+ int64_t now;
if (transition->just_started) {
transition->rt = transition->tt;
@@ -88,7 +88,7 @@ void calculate_rt(struct transition *transition)
/* Function to calculate Remaining Time (End) */
-static void bound_states_transition_type_reassignment(u8_t type)
+static void bound_states_transition_type_reassignment(uint8_t type)
{
switch (type) {
case ONOFF:
@@ -113,7 +113,7 @@ static void bound_states_transition_type_reassignment(u8_t type)
static void tt_values_calculator(struct transition *transition)
{
- u8_t steps_multiplier, resolution;
+ uint8_t steps_multiplier, resolution;
resolution = (transition->tt >> 6);
steps_multiplier = (transition->tt & 0x3F);
@@ -142,7 +142,7 @@ static void tt_values_calculator(struct transition *transition)
ptr_counter = &transition->counter;
}
-void onoff_tt_values(struct generic_onoff_state *state, u8_t tt, u8_t delay)
+void onoff_tt_values(struct generic_onoff_state *state, uint8_t tt, uint8_t delay)
{
bound_states_transition_type_reassignment(ONOFF);
calculate_lightness_target_values(ONOFF);
@@ -162,7 +162,7 @@ void onoff_tt_values(struct generic_onoff_state *state, u8_t tt, u8_t delay)
state->transition->counter);
}
-void level_tt_values(struct generic_level_state *state, u8_t tt, u8_t delay)
+void level_tt_values(struct generic_level_state *state, uint8_t tt, uint8_t delay)
{
if (state == &gen_level_srv_root_user_data) {
bound_states_transition_type_reassignment(LEVEL);
@@ -188,7 +188,7 @@ void level_tt_values(struct generic_level_state *state, u8_t tt, u8_t delay)
}
void light_lightness_actual_tt_values(struct light_lightness_state *state,
- u8_t tt, u8_t delay)
+ uint8_t tt, uint8_t delay)
{
bound_states_transition_type_reassignment(ACTUAL);
calculate_lightness_target_values(ACTUAL);
@@ -210,7 +210,7 @@ void light_lightness_actual_tt_values(struct light_lightness_state *state,
}
void light_lightness_linear_tt_values(struct light_lightness_state *state,
- u8_t tt, u8_t delay)
+ uint8_t tt, uint8_t delay)
{
bound_states_transition_type_reassignment(LINEAR);
calculate_lightness_target_values(LINEAR);
@@ -231,7 +231,7 @@ void light_lightness_linear_tt_values(struct light_lightness_state *state,
state->transition->counter);
}
-void light_ctl_tt_values(struct light_ctl_state *state, u8_t tt, u8_t delay)
+void light_ctl_tt_values(struct light_ctl_state *state, uint8_t tt, uint8_t delay)
{
bound_states_transition_type_reassignment(CTL);
calculate_lightness_target_values(CTL);
@@ -261,7 +261,7 @@ void light_ctl_tt_values(struct light_ctl_state *state, u8_t tt, u8_t delay)
}
void light_ctl_temp_tt_values(struct light_ctl_state *state,
- u8_t tt, u8_t delay)
+ uint8_t tt, uint8_t delay)
{
bound_states_transition_type_reassignment(CTL_TEMP);
calculate_temp_target_values(CTL_TEMP);
@@ -331,7 +331,7 @@ static void onoff_work_handler(struct os_event *work)
static void level_lightness_work_handler(struct os_event *work)
{
- u8_t level;
+ uint8_t level;
struct generic_level_state *state = &gen_level_srv_root_user_data;
switch (transition_type) {
diff --git a/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/transition.h b/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/transition.h
index 84101395..dc3e8da1 100644
--- a/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/transition.h
+++ b/src/libs/mynewt-nimble/apps/blemesh_models_example_2/src/transition.h
@@ -42,19 +42,19 @@ enum level_transition_types {
struct transition {
bool just_started;
- u8_t tt;
- u8_t rt;
- u8_t delay;
- u32_t quo_tt;
- u32_t counter;
- u32_t total_duration;
- s64_t start_timestamp;
+ uint8_t tt;
+ uint8_t rt;
+ uint8_t delay;
+ uint32_t quo_tt;
+ uint32_t counter;
+ uint32_t total_duration;
+ int64_t start_timestamp;
struct os_callout timer;
};
-extern u8_t transition_type, default_tt;
-extern u32_t *ptr_counter;
+extern uint8_t transition_type, default_tt;
+extern uint32_t *ptr_counter;
extern struct os_callout *ptr_timer;
extern struct transition lightness_transition, temp_transition;
@@ -64,15 +64,15 @@ extern struct os_callout dummy_timer;
void calculate_rt(struct transition *transition);
-void onoff_tt_values(struct generic_onoff_state *state, u8_t tt, u8_t delay);
-void level_tt_values(struct generic_level_state *state, u8_t tt, u8_t delay);
+void onoff_tt_values(struct generic_onoff_state *state, uint8_t tt, uint8_t delay);
+void level_tt_values(struct generic_level_state *state, uint8_t tt, uint8_t delay);
void light_lightness_actual_tt_values(struct light_lightness_state *state,
- u8_t tt, u8_t delay);
+ uint8_t tt, uint8_t delay);
void light_lightness_linear_tt_values(struct light_lightness_state *state,
- u8_t tt, u8_t delay);
-void light_ctl_tt_values(struct light_ctl_state *state, u8_t tt, u8_t delay);
+ uint8_t tt, uint8_t delay);
+void light_ctl_tt_values(struct light_ctl_state *state, uint8_t tt, uint8_t delay);
void light_ctl_temp_tt_values(struct light_ctl_state *state,
- u8_t tt, u8_t delay);
+ uint8_t tt, uint8_t delay);
void onoff_handler(struct generic_onoff_state *state);
void level_lightness_handler(struct generic_level_state *state);
diff --git a/src/libs/mynewt-nimble/apps/blemesh_shell/src/main.c b/src/libs/mynewt-nimble/apps/blemesh_shell/src/main.c
index 4ad23e1d..fcf80127 100644
--- a/src/libs/mynewt-nimble/apps/blemesh_shell/src/main.c
+++ b/src/libs/mynewt-nimble/apps/blemesh_shell/src/main.c
@@ -44,21 +44,21 @@ void net_recv_ev(uint8_t ttl, uint8_t ctl, uint16_t src, uint16_t dst,
payload_len);
}
-static void model_bound_cb(u16_t addr, struct bt_mesh_model *model,
- u16_t key_idx)
+static void model_bound_cb(uint16_t addr, struct bt_mesh_model *model,
+ uint16_t key_idx)
{
console_printf("Model bound: remote addr 0x%04x key_idx 0x%04x model %p\n",
addr, key_idx, model);
}
-static void model_unbound_cb(u16_t addr, struct bt_mesh_model *model,
- u16_t key_idx)
+static void model_unbound_cb(uint16_t addr, struct bt_mesh_model *model,
+ uint16_t key_idx)
{
console_printf("Model unbound: remote addr 0x%04x key_idx 0x%04x "
"model %p\n", addr, key_idx, model);
}
-static void invalid_bearer_cb(u8_t opcode)
+static void invalid_bearer_cb(uint8_t opcode)
{
console_printf("Invalid bearer: opcode 0x%02x\n", opcode);
}
diff --git a/src/libs/mynewt-nimble/apps/blestress/src/rx_stress.c b/src/libs/mynewt-nimble/apps/blestress/src/rx_stress.c
index a4253ce6..440966ad 100644
--- a/src/libs/mynewt-nimble/apps/blestress/src/rx_stress.c
+++ b/src/libs/mynewt-nimble/apps/blestress/src/rx_stress.c
@@ -837,14 +837,6 @@ rx_stress_10_l2cap_event(struct ble_l2cap_event *event, void *arg)
MODLOG_DFLT(INFO, "Data buf %s\n", data_buf ? "OK" : "NOK");
assert(data_buf != NULL);
- /* The first 2 bytes of data is the size of appended pattern data. */
- rc = os_mbuf_append(data_buf, (uint8_t[]) {data_len >> 8, data_len},
- 2);
- if (rc) {
- os_mbuf_free_chain(data_buf);
- assert(0);
- }
-
/* Fill mbuf with the pattern */
stress_fill_mbuf_with_pattern(data_buf, data_len);
@@ -852,8 +844,13 @@ rx_stress_10_l2cap_event(struct ble_l2cap_event *event, void *arg)
rc = ble_l2cap_send(rx_stress_ctx->chan, data_buf);
MODLOG_DFLT(INFO, "Return code=%d\n", rc);
if (rc) {
- MODLOG_DFLT(INFO, "L2CAP stalled - waiting\n");
- stalled = true;
+ if (rc == BLE_HS_ESTALLED) {
+ MODLOG_DFLT(INFO, "L2CAP stalled - waiting\n");
+ stalled = true;
+ } else {
+ MODLOG_DFLT(INFO, "Sending data via L2CAP failed with error "
+ "code %d\n", rc);
+ }
}
MODLOG_DFLT(INFO, " %d, %d\n", ++send_cnt, data_len);
@@ -1365,7 +1362,7 @@ rx_stress_start(int test_num)
break;
case 10:
console_printf("Stress L2CAP send\033[0m\n");
- rc = ble_l2cap_create_server(1, STRESS_COC_MTU,
+ rc = ble_l2cap_create_server(TEST_PSM, STRESS_COC_MTU,
rx_stress_10_l2cap_event, NULL);
assert(rc == 0);
rx_stress_simple_adv(&rx_stress_adv_sets[10]);
diff --git a/src/libs/mynewt-nimble/apps/blestress/src/stress.c b/src/libs/mynewt-nimble/apps/blestress/src/stress.c
index 6f5badf0..1bdbafa9 100644
--- a/src/libs/mynewt-nimble/apps/blestress/src/stress.c
+++ b/src/libs/mynewt-nimble/apps/blestress/src/stress.c
@@ -19,6 +19,8 @@
#include "stress.h"
+static struct os_callout stress_timer_callout;
+
void
com_stress_print_report(const struct com_stress_test_ctx *test_ctxs)
{
@@ -119,7 +121,7 @@ stress_fill_mbuf_with_pattern(struct os_mbuf *om, uint16_t len)
rest = len % STRESS_PAT_LEN;
for (i = 0; i < mul; ++i) {
- rc = os_mbuf_append(om, &test_6_pattern[29], STRESS_PAT_LEN);
+ rc = os_mbuf_append(om, &test_6_pattern[0], STRESS_PAT_LEN);
if (rc) {
os_mbuf_free_chain(om);
@@ -127,7 +129,7 @@ stress_fill_mbuf_with_pattern(struct os_mbuf *om, uint16_t len)
}
}
- rc = os_mbuf_append(om, &test_6_pattern[29], rest);
+ rc = os_mbuf_append(om, &test_6_pattern[0], rest);
if (rc) {
os_mbuf_free_chain(om);
@@ -176,6 +178,7 @@ void
stress_start_timer(uint32_t timeout_ms, os_event_fn *ev_cb)
{
int rc;
+
os_callout_stop(&stress_timer_callout);
os_callout_init(&stress_timer_callout, os_eventq_dflt_get(), ev_cb, NULL);
diff --git a/src/libs/mynewt-nimble/apps/blestress/src/stress.h b/src/libs/mynewt-nimble/apps/blestress/src/stress.h
index 91ab4f47..db4fbb36 100644
--- a/src/libs/mynewt-nimble/apps/blestress/src/stress.h
+++ b/src/libs/mynewt-nimble/apps/blestress/src/stress.h
@@ -44,8 +44,9 @@ extern "C" {
#define STRESS_FIND_SRV 1
#define STRESS_FIND_CHR 2
#define STRESS_FIND_DSC 3
+/* L2CAP PSM */
+#define TEST_PSM 0x80
-struct os_callout stress_timer_callout;
struct stress_gatt_search_ctx;
typedef void stress_gatt_disc_end_fn(struct stress_gatt_search_ctx *search_ctx);
diff --git a/src/libs/mynewt-nimble/apps/blestress/src/tx_stress.c b/src/libs/mynewt-nimble/apps/blestress/src/tx_stress.c
index b73adc8a..4416c568 100644
--- a/src/libs/mynewt-nimble/apps/blestress/src/tx_stress.c
+++ b/src/libs/mynewt-nimble/apps/blestress/src/tx_stress.c
@@ -1127,7 +1127,7 @@ tx_stress_10_gap_event(struct ble_gap_event *event, void *arg)
assert(sdu_rx != NULL);
tx_stress_ctx->conn_handle = event->connect.conn_handle;
- rc = ble_l2cap_connect(event->connect.conn_handle, 1,
+ rc = ble_l2cap_connect(event->connect.conn_handle, TEST_PSM,
STRESS_COC_MTU, sdu_rx,
tx_stress_10_l2cap_event, NULL);
assert(rc == 0);
@@ -1292,17 +1292,16 @@ tx_stress_14_subs_cb(uint16_t conn_handle, const struct ble_gatt_error *error,
assert(error->status == 0);
/* If the first subscription after finding cccd */
- if(arg == NULL) {
+ if (arg == NULL) {
return 0;
}
- sub = (bool*)arg;
+ sub = (bool *)arg;
/* Enable notifications */
- if(*sub == 0) {
+ if (*sub == 0) {
*sub = true;
- om = ble_hs_mbuf_from_flat(
- (uint8_t[]) {0x01, 0x00}, 2);
+ om = ble_hs_mbuf_from_flat((uint8_t[]) {0x01, 0x00}, 2);
tx_stress_ctx->begin_us = tx_stress_ctx->end_us;
@@ -1415,7 +1414,7 @@ tx_stress_14_gap_event(struct ble_gap_event *event, void *arg)
static int
tx_stress_15_write_cb(uint16_t conn_handle, const struct ble_gatt_error *error,
- struct ble_gatt_attr *attr, void *arg)
+ struct ble_gatt_attr *attr, void *arg)
{
/* Disconnect */
ble_gap_terminate(conn_handle, BLE_ERR_REM_USER_CONN_TERM);
@@ -1464,7 +1463,7 @@ tx_stress_15_gap_event(struct ble_gap_event *event, void *arg)
case BLE_GAP_EVENT_DISCONNECT:
/* Perform use case specified number of times */
- if(tx_stress_ctx->con_stat[15].num >= MYNEWT_VAL(BLE_STRESS_REPEAT)) {
+ if (tx_stress_ctx->con_stat[15].num >= MYNEWT_VAL(BLE_STRESS_REPEAT)) {
tx_stress_on_test_finish(15);
return 0;
}
@@ -1473,7 +1472,7 @@ tx_stress_15_gap_event(struct ble_gap_event *event, void *arg)
return 0;
default:
- MODLOG_DFLT(INFO, "Other event occurs=%d\n", event->type);
+ MODLOG_DFLT(INFO, "Other event occurs=%d\n", event->type);
return 0;
}
}
@@ -1607,7 +1606,8 @@ tx_stress_test_perform(int test_num)
}
static void
-tx_stress_read_command_cb(void) {
+tx_stress_read_command_cb(void)
+{
console_printf("Start testing\n");
os_sem_release(&tx_stress_main_sem);
}
@@ -1642,7 +1642,7 @@ tx_stress_main_task_fn(void *arg)
/* Wait for the scan to find the test. Then 1 token will be
* released allowing to pass through semaphore. */
os_sem_pend(&tx_stress_main_sem, OS_TIMEOUT_NEVER);
- if(tx_stress_ctx->scan_timeout) {
+ if (tx_stress_ctx->scan_timeout) {
break;
}
diff --git a/src/libs/mynewt-nimble/apps/btshell/src/cmd.c b/src/libs/mynewt-nimble/apps/btshell/src/cmd.c
index 2713443e..28aa87f2 100644
--- a/src/libs/mynewt-nimble/apps/btshell/src/cmd.c
+++ b/src/libs/mynewt-nimble/apps/btshell/src/cmd.c
@@ -2691,15 +2691,28 @@ cmd_security_unpair(int argc, char **argv)
{
ble_addr_t peer;
int rc;
+ int oldest;
rc = parse_arg_all(argc - 1, argv + 1);
if (rc != 0) {
return rc;
}
+ rc = parse_arg_bool_dflt("oldest", 0, &oldest);
+ if (rc != 0) {
+ console_printf("invalid 'oldest' parameter\n");
+ return rc;
+ }
+
+ if (oldest) {
+ rc = ble_gap_unpair_oldest_peer();
+ console_printf("Unpair oldest status: 0x%02x\n", rc);
+ return 0;
+ }
+
rc = parse_dev_addr("peer_", cmd_peer_addr_types, &peer);
if (rc != 0) {
- console_printf("invalid 'peer_addr' parameter\n");
+ console_printf("invalid peer address\n");
return rc;
}
@@ -2714,6 +2727,7 @@ cmd_security_unpair(int argc, char **argv)
#if MYNEWT_VAL(SHELL_CMD_HELP)
static const struct shell_param security_unpair_params[] = {
+ {"oldest", "usage: =[true|false], default: false"},
{"peer_addr_type", "usage: =[public|random|public_id|random_id], default: public"},
{"peer_addr", "usage: =[XX:XX:XX:XX:XX:XX]"},
{NULL, NULL}
diff --git a/src/libs/mynewt-nimble/apps/bttester/pkg.yml b/src/libs/mynewt-nimble/apps/bttester/pkg.yml
index 00e7a760..ba2b7fb1 100644
--- a/src/libs/mynewt-nimble/apps/bttester/pkg.yml
+++ b/src/libs/mynewt-nimble/apps/bttester/pkg.yml
@@ -37,7 +37,7 @@ pkg.deps:
- "@apache-mynewt-nimble/nimble/host/services/gap"
- "@apache-mynewt-nimble/nimble/host/services/gatt"
- "@apache-mynewt-nimble/nimble/host/services/dis"
- - "@apache-mynewt-nimble/nimble/host/store/ram"
+ - "@apache-mynewt-nimble/nimble/host/store/config"
- "@apache-mynewt-nimble/nimble/transport/ram"
- "@apache-mynewt-core/hw/drivers/uart"
- "@apache-mynewt-core/hw/drivers/rtt"
diff --git a/src/libs/mynewt-nimble/apps/bttester/src/bttester.c b/src/libs/mynewt-nimble/apps/bttester/src/bttester.c
index 54b14daa..5ddc2954 100644
--- a/src/libs/mynewt-nimble/apps/bttester/src/bttester.c
+++ b/src/libs/mynewt-nimble/apps/bttester/src/bttester.c
@@ -44,16 +44,16 @@ static struct os_event bttester_ev[CMD_QUEUED];
struct btp_buf {
struct os_event *ev;
union {
- u8_t data[BTP_MTU];
+ uint8_t data[BTP_MTU];
struct btp_hdr hdr;
};
};
static struct btp_buf cmd_buf[CMD_QUEUED];
-static void supported_commands(u8_t *data, u16_t len)
+static void supported_commands(uint8_t *data, uint16_t len)
{
- u8_t buf[1];
+ uint8_t buf[1];
struct core_read_supported_commands_rp *rp = (void *) buf;
memset(buf, 0, sizeof(buf));
@@ -64,12 +64,12 @@ static void supported_commands(u8_t *data, u16_t len)
tester_set_bit(buf, CORE_UNREGISTER_SERVICE);
tester_send(BTP_SERVICE_ID_CORE, CORE_READ_SUPPORTED_COMMANDS,
- BTP_INDEX_NONE, (u8_t *) rp, sizeof(buf));
+ BTP_INDEX_NONE, (uint8_t *) rp, sizeof(buf));
}
-static void supported_services(u8_t *data, u16_t len)
+static void supported_services(uint8_t *data, uint16_t len)
{
- u8_t buf[1];
+ uint8_t buf[1];
struct core_read_supported_services_rp *rp = (void *) buf;
memset(buf, 0, sizeof(buf));
@@ -85,13 +85,13 @@ static void supported_services(u8_t *data, u16_t len)
#endif /* MYNEWT_VAL(BLE_MESH) */
tester_send(BTP_SERVICE_ID_CORE, CORE_READ_SUPPORTED_SERVICES,
- BTP_INDEX_NONE, (u8_t *) rp, sizeof(buf));
+ BTP_INDEX_NONE, (uint8_t *) rp, sizeof(buf));
}
-static void register_service(u8_t *data, u16_t len)
+static void register_service(uint8_t *data, uint16_t len)
{
struct core_register_service_cmd *cmd = (void *) data;
- u8_t status;
+ uint8_t status;
switch (cmd->id) {
case BTP_SERVICE_ID_GAP:
@@ -124,10 +124,10 @@ rsp:
status);
}
-static void unregister_service(u8_t *data, u16_t len)
+static void unregister_service(uint8_t *data, uint16_t len)
{
struct core_unregister_service_cmd *cmd = (void *) data;
- u8_t status;
+ uint8_t status;
switch (cmd->id) {
case BTP_SERVICE_ID_GAP:
@@ -155,8 +155,8 @@ static void unregister_service(u8_t *data, u16_t len)
status);
}
-static void handle_core(u8_t opcode, u8_t index, u8_t *data,
- u16_t len)
+static void handle_core(uint8_t opcode, uint8_t index, uint8_t *data,
+ uint16_t len)
{
if (index != BTP_INDEX_NONE) {
tester_rsp(BTP_SERVICE_ID_CORE, opcode, index,
@@ -186,7 +186,7 @@ static void handle_core(u8_t opcode, u8_t index, u8_t *data,
static void cmd_handler(struct os_event *ev)
{
- u16_t len;
+ uint16_t len;
struct btp_buf *cmd;
if (!ev || !ev->ev_arg) {
@@ -241,12 +241,12 @@ static void cmd_handler(struct os_event *ev)
os_eventq_put(&avail_queue, ev);
}
-static u8_t *recv_cb(u8_t *buf, size_t *off)
+static uint8_t *recv_cb(uint8_t *buf, size_t *off)
{
struct btp_hdr *cmd = (void *) buf;
struct os_event *new_ev;
struct btp_buf *new_buf, *old_buf;
- u16_t len;
+ uint16_t len;
if (*off < sizeof(*cmd)) {
return buf;
@@ -319,7 +319,7 @@ void tester_init(void)
NULL, 0);
}
-void tester_send(u8_t service, u8_t opcode, u8_t index, u8_t *data,
+void tester_send(uint8_t service, uint8_t opcode, uint8_t index, uint8_t *data,
size_t len)
{
struct btp_hdr msg;
@@ -329,7 +329,7 @@ void tester_send(u8_t service, u8_t opcode, u8_t index, u8_t *data,
msg.index = index;
msg.len = len;
- bttester_pipe_send((u8_t *)&msg, sizeof(msg));
+ bttester_pipe_send((uint8_t *)&msg, sizeof(msg));
if (data && len) {
bttester_pipe_send(data, len);
}
@@ -344,7 +344,7 @@ void tester_send(u8_t service, u8_t opcode, u8_t index, u8_t *data,
}
}
-void tester_send_buf(u8_t service, u8_t opcode, u8_t index,
+void tester_send_buf(uint8_t service, uint8_t opcode, uint8_t index,
struct os_mbuf *data)
{
struct btp_hdr msg;
@@ -354,13 +354,13 @@ void tester_send_buf(u8_t service, u8_t opcode, u8_t index,
msg.index = index;
msg.len = os_mbuf_len(data);
- bttester_pipe_send((u8_t *)&msg, sizeof(msg));
+ bttester_pipe_send((uint8_t *)&msg, sizeof(msg));
if (data && msg.len) {
bttester_pipe_send_buf(data);
}
}
-void tester_rsp(u8_t service, u8_t opcode, u8_t index, u8_t status)
+void tester_rsp(uint8_t service, uint8_t opcode, uint8_t index, uint8_t status)
{
struct btp_status s;
@@ -370,5 +370,5 @@ void tester_rsp(u8_t service, u8_t opcode, u8_t index, u8_t status)
}
s.code = status;
- tester_send(service, BTP_STATUS, index, (u8_t *) &s, sizeof(s));
+ tester_send(service, BTP_STATUS, index, (uint8_t *) &s, sizeof(s));
}
diff --git a/src/libs/mynewt-nimble/apps/bttester/src/bttester.h b/src/libs/mynewt-nimble/apps/bttester/src/bttester.h
index f4e66a6f..6761681e 100644
--- a/src/libs/mynewt-nimble/apps/bttester/src/bttester.h
+++ b/src/libs/mynewt-nimble/apps/bttester/src/bttester.h
@@ -71,37 +71,37 @@
#define sys_cpu_to_le16 htole16
struct btp_hdr {
- u8_t service;
- u8_t opcode;
- u8_t index;
- u16_t len;
- u8_t data[0];
+ uint8_t service;
+ uint8_t opcode;
+ uint8_t index;
+ uint16_t len;
+ uint8_t data[0];
} __packed;
#define BTP_STATUS 0x00
struct btp_status {
- u8_t code;
+ uint8_t code;
} __packed;
/* Core Service */
#define CORE_READ_SUPPORTED_COMMANDS 0x01
struct core_read_supported_commands_rp {
- u8_t data[0];
+ uint8_t data[0];
} __packed;
#define CORE_READ_SUPPORTED_SERVICES 0x02
struct core_read_supported_services_rp {
- u8_t data[0];
+ uint8_t data[0];
} __packed;
#define CORE_REGISTER_SERVICE 0x03
struct core_register_service_cmd {
- u8_t id;
+ uint8_t id;
} __packed;
#define CORE_UNREGISTER_SERVICE 0x04
struct core_unregister_service_cmd {
- u8_t id;
+ uint8_t id;
} __packed;
/* events */
@@ -111,13 +111,13 @@ struct core_unregister_service_cmd {
/* commands */
#define GAP_READ_SUPPORTED_COMMANDS 0x01
struct gap_read_supported_commands_rp {
- u8_t data[0];
+ uint8_t data[0];
} __packed;
#define GAP_READ_CONTROLLER_INDEX_LIST 0x02
struct gap_read_controller_index_list_rp {
- u8_t num;
- u8_t index[0];
+ uint8_t num;
+ uint8_t index[0];
} __packed;
#define GAP_SETTINGS_POWERED 0
@@ -139,41 +139,41 @@ struct gap_read_controller_index_list_rp {
#define GAP_READ_CONTROLLER_INFO 0x03
struct gap_read_controller_info_rp {
- u8_t address[6];
- u32_t supported_settings;
- u32_t current_settings;
- u8_t cod[3];
- u8_t name[249];
- u8_t short_name[11];
+ uint8_t address[6];
+ uint32_t supported_settings;
+ uint32_t current_settings;
+ uint8_t cod[3];
+ uint8_t name[249];
+ uint8_t short_name[11];
} __packed;
#define GAP_RESET 0x04
struct gap_reset_rp {
- u32_t current_settings;
+ uint32_t current_settings;
} __packed;
#define GAP_SET_POWERED 0x05
struct gap_set_powered_cmd {
- u8_t powered;
+ uint8_t powered;
} __packed;
struct gap_set_powered_rp {
- u32_t current_settings;
+ uint32_t current_settings;
} __packed;
#define GAP_SET_CONNECTABLE 0x06
struct gap_set_connectable_cmd {
- u8_t connectable;
+ uint8_t connectable;
} __packed;
struct gap_set_connectable_rp {
- u32_t current_settings;
+ uint32_t current_settings;
} __packed;
#define GAP_SET_FAST_CONNECTABLE 0x07
struct gap_set_fast_connectable_cmd {
- u8_t fast_connectable;
+ uint8_t fast_connectable;
} __packed;
struct gap_set_fast_connectable_rp {
- u32_t current_settings;
+ uint32_t current_settings;
} __packed;
#define GAP_NON_DISCOVERABLE 0x00
@@ -182,34 +182,34 @@ struct gap_set_fast_connectable_rp {
#define GAP_SET_DISCOVERABLE 0x08
struct gap_set_discoverable_cmd {
- u8_t discoverable;
+ uint8_t discoverable;
} __packed;
struct gap_set_discoverable_rp {
- u32_t current_settings;
+ uint32_t current_settings;
} __packed;
#define GAP_SET_BONDABLE 0x09
struct gap_set_bondable_cmd {
- u8_t bondable;
+ uint8_t bondable;
} __packed;
struct gap_set_bondable_rp {
- u32_t current_settings;
+ uint32_t current_settings;
} __packed;
#define GAP_START_ADVERTISING 0x0a
struct gap_start_advertising_cmd {
- u8_t adv_data_len;
- u8_t scan_rsp_len;
- u8_t adv_data[0];
- u8_t scan_rsp[0];
+ uint8_t adv_data_len;
+ uint8_t scan_rsp_len;
+ uint8_t adv_data[0];
+ uint8_t scan_rsp[0];
} __packed;
struct gap_start_advertising_rp {
- u32_t current_settings;
+ uint32_t current_settings;
} __packed;
#define GAP_STOP_ADVERTISING 0x0b
struct gap_stop_advertising_rp {
- u32_t current_settings;
+ uint32_t current_settings;
} __packed;
#define GAP_DISCOVERY_FLAG_LE 0x01
@@ -220,21 +220,21 @@ struct gap_stop_advertising_rp {
#define GAP_START_DISCOVERY 0x0c
struct gap_start_discovery_cmd {
- u8_t flags;
+ uint8_t flags;
} __packed;
#define GAP_STOP_DISCOVERY 0x0d
#define GAP_CONNECT 0x0e
struct gap_connect_cmd {
- u8_t address_type;
- u8_t address[6];
+ uint8_t address_type;
+ uint8_t address[6];
} __packed;
#define GAP_DISCONNECT 0x0f
struct gap_disconnect_cmd {
- u8_t address_type;
- u8_t address[6];
+ uint8_t address_type;
+ uint8_t address[6];
} __packed;
#define GAP_IO_CAP_DISPLAY_ONLY 0
@@ -245,85 +245,85 @@ struct gap_disconnect_cmd {
#define GAP_SET_IO_CAP 0x10
struct gap_set_io_cap_cmd {
- u8_t io_cap;
+ uint8_t io_cap;
} __packed;
#define GAP_PAIR 0x11
struct gap_pair_cmd {
- u8_t address_type;
- u8_t address[6];
+ uint8_t address_type;
+ uint8_t address[6];
} __packed;
#define GAP_UNPAIR 0x12
struct gap_unpair_cmd {
- u8_t address_type;
- u8_t address[6];
+ uint8_t address_type;
+ uint8_t address[6];
} __packed;
#define GAP_PASSKEY_ENTRY 0x13
struct gap_passkey_entry_cmd {
- u8_t address_type;
- u8_t address[6];
- u32_t passkey;
+ uint8_t address_type;
+ uint8_t address[6];
+ uint32_t passkey;
} __packed;
#define GAP_PASSKEY_CONFIRM 0x14
struct gap_passkey_confirm_cmd {
- u8_t address_type;
- u8_t address[6];
- u8_t match;
+ uint8_t address_type;
+ uint8_t address[6];
+ uint8_t match;
} __packed;
#define GAP_START_DIRECT_ADV 0x15
struct gap_start_direct_adv_cmd {
- u8_t address_type;
- u8_t address[6];
- u8_t high_duty;
+ uint8_t address_type;
+ uint8_t address[6];
+ uint8_t high_duty;
} __packed;
#define GAP_CONN_PARAM_UPDATE 0x16
struct gap_conn_param_update_cmd {
- u8_t address_type;
- u8_t address[6];
- u16_t conn_itvl_min;
- u16_t conn_itvl_max;
- u16_t conn_latency;
- u16_t supervision_timeout;
+ uint8_t address_type;
+ uint8_t address[6];
+ uint16_t conn_itvl_min;
+ uint16_t conn_itvl_max;
+ uint16_t conn_latency;
+ uint16_t supervision_timeout;
} __packed;
#define GAP_PAIRING_CONSENT_RSP 0x17
struct gap_pairing_consent_rsp_cmd {
- u8_t address_type;
- u8_t address[6];
- u8_t consent;
+ uint8_t address_type;
+ uint8_t address[6];
+ uint8_t consent;
} __packed;
#define GAP_OOB_LEGACY_SET_DATA 0x18
struct gap_oob_legacy_set_data_cmd {
- u8_t oob_data[16];
+ uint8_t oob_data[16];
} __packed;
#define GAP_OOB_SC_GET_LOCAL_DATA 0x19
struct gap_oob_sc_get_local_data_rp {
- u8_t r[16];
- u8_t c[16];
+ uint8_t r[16];
+ uint8_t c[16];
} __packed;
#define GAP_OOB_SC_SET_REMOTE_DATA 0x1a
struct gap_oob_sc_set_remote_data_cmd {
- u8_t r[16];
- u8_t c[16];
+ uint8_t r[16];
+ uint8_t c[16];
} __packed;
#define GAP_SET_MITM 0x1b
struct gap_set_mitm_cmd {
- u8_t mitm;
+ uint8_t mitm;
} __packed;
/* events */
#define GAP_EV_NEW_SETTINGS 0x80
struct gap_new_settings_ev {
- u32_t current_settings;
+ uint32_t current_settings;
} __packed;
#define GAP_DEVICE_FOUND_FLAG_RSSI 0x01
@@ -332,84 +332,84 @@ struct gap_new_settings_ev {
#define GAP_EV_DEVICE_FOUND 0x81
struct gap_device_found_ev {
- u8_t address_type;
- u8_t address[6];
- s8_t rssi;
- u8_t flags;
- u16_t eir_data_len;
- u8_t eir_data[0];
+ uint8_t address_type;
+ uint8_t address[6];
+ int8_t rssi;
+ uint8_t flags;
+ uint16_t eir_data_len;
+ uint8_t eir_data[0];
} __packed;
#define GAP_EV_DEVICE_CONNECTED 0x82
struct gap_device_connected_ev {
- u8_t address_type;
- u8_t address[6];
- u16_t conn_itvl;
- u16_t conn_latency;
- u16_t supervision_timeout;
+ uint8_t address_type;
+ uint8_t address[6];
+ uint16_t conn_itvl;
+ uint16_t conn_latency;
+ uint16_t supervision_timeout;
} __packed;
#define GAP_EV_DEVICE_DISCONNECTED 0x83
struct gap_device_disconnected_ev {
- u8_t address_type;
- u8_t address[6];
+ uint8_t address_type;
+ uint8_t address[6];
} __packed;
#define GAP_EV_PASSKEY_DISPLAY 0x84
struct gap_passkey_display_ev {
- u8_t address_type;
- u8_t address[6];
- u32_t passkey;
+ uint8_t address_type;
+ uint8_t address[6];
+ uint32_t passkey;
} __packed;
#define GAP_EV_PASSKEY_ENTRY_REQ 0x85
struct gap_passkey_entry_req_ev {
- u8_t address_type;
- u8_t address[6];
+ uint8_t address_type;
+ uint8_t address[6];
} __packed;
#define GAP_EV_PASSKEY_CONFIRM_REQ 0x86
struct gap_passkey_confirm_req_ev {
- u8_t address_type;
- u8_t address[6];
- u32_t passkey;
+ uint8_t address_type;
+ uint8_t address[6];
+ uint32_t passkey;
} __packed;
#define GAP_EV_IDENTITY_RESOLVED 0x87
struct gap_identity_resolved_ev {
- u8_t address_type;
- u8_t address[6];
- u8_t identity_address_type;
- u8_t identity_address[6];
+ uint8_t address_type;
+ uint8_t address[6];
+ uint8_t identity_address_type;
+ uint8_t identity_address[6];
} __packed;
#define GAP_EV_CONN_PARAM_UPDATE 0x88
struct gap_conn_param_update_ev {
- u8_t address_type;
- u8_t address[6];
- u16_t conn_itvl;
- u16_t conn_latency;
- u16_t supervision_timeout;
+ uint8_t address_type;
+ uint8_t address[6];
+ uint16_t conn_itvl;
+ uint16_t conn_latency;
+ uint16_t supervision_timeout;
} __packed;
#define GAP_EV_SEC_LEVEL_CHANGED 0x89
struct gap_sec_level_changed_ev {
- u8_t address_type;
- u8_t address[6];
- u8_t level;
+ uint8_t address_type;
+ uint8_t address[6];
+ uint8_t level;
} __packed;
#define GAP_EV_PAIRING_CONSENT_REQ 0x8a
struct gap_pairing_consent_req_ev {
- u8_t address_type;
- u8_t address[6];
+ uint8_t address_type;
+ uint8_t address[6];
} __packed;
/* GATT Service */
/* commands */
#define GATT_READ_SUPPORTED_COMMANDS 0x01
struct gatt_read_supported_commands_rp {
- u8_t data[0];
+ uint8_t data[0];
} __packed;
#define GATT_SERVICE_PRIMARY 0x00
@@ -417,320 +417,320 @@ struct gatt_read_supported_commands_rp {
#define GATT_ADD_SERVICE 0x02
struct gatt_add_service_cmd {
- u8_t type;
- u8_t uuid_length;
- u8_t uuid[0];
+ uint8_t type;
+ uint8_t uuid_length;
+ uint8_t uuid[0];
} __packed;
struct gatt_add_service_rp {
- u16_t svc_id;
+ uint16_t svc_id;
} __packed;
#define GATT_ADD_CHARACTERISTIC 0x03
struct gatt_add_characteristic_cmd {
- u16_t svc_id;
- u8_t properties;
- u8_t permissions;
- u8_t uuid_length;
- u8_t uuid[0];
+ uint16_t svc_id;
+ uint8_t properties;
+ uint8_t permissions;
+ uint8_t uuid_length;
+ uint8_t uuid[0];
} __packed;
struct gatt_add_characteristic_rp {
- u16_t char_id;
+ uint16_t char_id;
} __packed;
#define GATT_ADD_DESCRIPTOR 0x04
struct gatt_add_descriptor_cmd {
- u16_t char_id;
- u8_t permissions;
- u8_t uuid_length;
- u8_t uuid[0];
+ uint16_t char_id;
+ uint8_t permissions;
+ uint8_t uuid_length;
+ uint8_t uuid[0];
} __packed;
struct gatt_add_descriptor_rp {
- u16_t desc_id;
+ uint16_t desc_id;
} __packed;
#define GATT_ADD_INCLUDED_SERVICE 0x05
struct gatt_add_included_service_cmd {
- u16_t svc_id;
+ uint16_t svc_id;
} __packed;
struct gatt_add_included_service_rp {
- u16_t included_service_id;
+ uint16_t included_service_id;
} __packed;
#define GATT_SET_VALUE 0x06
struct gatt_set_value_cmd {
- u16_t attr_id;
- u16_t len;
- u8_t value[0];
+ uint16_t attr_id;
+ uint16_t len;
+ uint8_t value[0];
} __packed;
#define GATT_START_SERVER 0x07
struct gatt_start_server_rp {
- u16_t db_attr_off;
- u8_t db_attr_cnt;
+ uint16_t db_attr_off;
+ uint8_t db_attr_cnt;
} __packed;
#define GATT_SET_ENC_KEY_SIZE 0x09
struct gatt_set_enc_key_size_cmd {
- u16_t attr_id;
- u8_t key_size;
+ uint16_t attr_id;
+ uint8_t key_size;
} __packed;
/* Gatt Client */
struct gatt_service {
- u16_t start_handle;
- u16_t end_handle;
- u8_t uuid_length;
- u8_t uuid[0];
+ uint16_t start_handle;
+ uint16_t end_handle;
+ uint8_t uuid_length;
+ uint8_t uuid[0];
} __packed;
struct gatt_included {
- u16_t included_handle;
+ uint16_t included_handle;
struct gatt_service service;
} __packed;
struct gatt_characteristic {
- u16_t characteristic_handle;
- u16_t value_handle;
- u8_t properties;
- u8_t uuid_length;
- u8_t uuid[0];
+ uint16_t characteristic_handle;
+ uint16_t value_handle;
+ uint8_t properties;
+ uint8_t uuid_length;
+ uint8_t uuid[0];
} __packed;
struct gatt_descriptor {
- u16_t descriptor_handle;
- u8_t uuid_length;
- u8_t uuid[0];
+ uint16_t descriptor_handle;
+ uint8_t uuid_length;
+ uint8_t uuid[0];
} __packed;
#define GATT_EXCHANGE_MTU 0x0a
#define GATT_DISC_ALL_PRIM_SVCS 0x0b
struct gatt_disc_all_prim_svcs_cmd {
- u8_t address_type;
- u8_t address[6];
+ uint8_t address_type;
+ uint8_t address[6];
} __packed;
struct gatt_disc_all_prim_svcs_rp {
- u8_t services_count;
+ uint8_t services_count;
struct gatt_service services[0];
} __packed;
#define GATT_DISC_PRIM_UUID 0x0c
struct gatt_disc_prim_uuid_cmd {
- u8_t address_type;
- u8_t address[6];
- u8_t uuid_length;
- u8_t uuid[0];
+ uint8_t address_type;
+ uint8_t address[6];
+ uint8_t uuid_length;
+ uint8_t uuid[0];
} __packed;
struct gatt_disc_prim_uuid_rp {
- u8_t services_count;
+ uint8_t services_count;
struct gatt_service services[0];
} __packed;
#define GATT_FIND_INCLUDED 0x0d
struct gatt_find_included_cmd {
- u8_t address_type;
- u8_t address[6];
- u16_t start_handle;
- u16_t end_handle;
+ uint8_t address_type;
+ uint8_t address[6];
+ uint16_t start_handle;
+ uint16_t end_handle;
} __packed;
struct gatt_find_included_rp {
- u8_t services_count;
+ uint8_t services_count;
struct gatt_included included[0];
} __packed;
#define GATT_DISC_ALL_CHRC 0x0e
struct gatt_disc_all_chrc_cmd {
- u8_t address_type;
- u8_t address[6];
- u16_t start_handle;
- u16_t end_handle;
+ uint8_t address_type;
+ uint8_t address[6];
+ uint16_t start_handle;
+ uint16_t end_handle;
} __packed;
struct gatt_disc_chrc_rp {
- u8_t characteristics_count;
+ uint8_t characteristics_count;
struct gatt_characteristic characteristics[0];
} __packed;
#define GATT_DISC_CHRC_UUID 0x0f
struct gatt_disc_chrc_uuid_cmd {
- u8_t address_type;
- u8_t address[6];
- u16_t start_handle;
- u16_t end_handle;
- u8_t uuid_length;
- u8_t uuid[0];
+ uint8_t address_type;
+ uint8_t address[6];
+ uint16_t start_handle;
+ uint16_t end_handle;
+ uint8_t uuid_length;
+ uint8_t uuid[0];
} __packed;
#define GATT_DISC_ALL_DESC 0x10
struct gatt_disc_all_desc_cmd {
- u8_t address_type;
- u8_t address[6];
- u16_t start_handle;
- u16_t end_handle;
+ uint8_t address_type;
+ uint8_t address[6];
+ uint16_t start_handle;
+ uint16_t end_handle;
} __packed;
struct gatt_disc_all_desc_rp {
- u8_t descriptors_count;
+ uint8_t descriptors_count;
struct gatt_descriptor descriptors[0];
} __packed;
#define GATT_READ 0x11
struct gatt_read_cmd {
- u8_t address_type;
- u8_t address[6];
- u16_t handle;
+ uint8_t address_type;
+ uint8_t address[6];
+ uint16_t handle;
} __packed;
struct gatt_read_rp {
- u8_t att_response;
- u16_t data_length;
- u8_t data[0];
+ uint8_t att_response;
+ uint16_t data_length;
+ uint8_t data[0];
} __packed;
#define GATT_READ_UUID 0x12
struct gatt_read_uuid_cmd {
- u8_t address_type;
- u8_t address[6];
- u16_t start_handle;
- u16_t end_handle;
- u8_t uuid_length;
- u8_t uuid[0];
+ uint8_t address_type;
+ uint8_t address[6];
+ uint16_t start_handle;
+ uint16_t end_handle;
+ uint8_t uuid_length;
+ uint8_t uuid[0];
} __packed;
#define GATT_READ_LONG 0x13
struct gatt_read_long_cmd {
- u8_t address_type;
- u8_t address[6];
- u16_t handle;
- u16_t offset;
+ uint8_t address_type;
+ uint8_t address[6];
+ uint16_t handle;
+ uint16_t offset;
} __packed;
#define GATT_READ_MULTIPLE 0x14
struct gatt_read_multiple_cmd {
- u8_t address_type;
- u8_t address[6];
- u8_t handles_count;
- u16_t handles[0];
+ uint8_t address_type;
+ uint8_t address[6];
+ uint8_t handles_count;
+ uint16_t handles[0];
} __packed;
#define GATT_WRITE_WITHOUT_RSP 0x15
struct gatt_write_without_rsp_cmd {
- u8_t address_type;
- u8_t address[6];
- u16_t handle;
- u16_t data_length;
- u8_t data[0];
+ uint8_t address_type;
+ uint8_t address[6];
+ uint16_t handle;
+ uint16_t data_length;
+ uint8_t data[0];
} __packed;
#define GATT_SIGNED_WRITE_WITHOUT_RSP 0x16
struct gatt_signed_write_without_rsp_cmd {
- u8_t address_type;
- u8_t address[6];
- u16_t handle;
- u16_t data_length;
- u8_t data[0];
+ uint8_t address_type;
+ uint8_t address[6];
+ uint16_t handle;
+ uint16_t data_length;
+ uint8_t data[0];
} __packed;
#define GATT_WRITE 0x17
struct gatt_write_cmd {
- u8_t address_type;
- u8_t address[6];
- u16_t handle;
- u16_t data_length;
- u8_t data[0];
+ uint8_t address_type;
+ uint8_t address[6];
+ uint16_t handle;
+ uint16_t data_length;
+ uint8_t data[0];
} __packed;
#define GATT_WRITE_LONG 0x18
struct gatt_write_long_cmd {
- u8_t address_type;
- u8_t address[6];
- u16_t handle;
- u16_t offset;
- u16_t data_length;
- u8_t data[0];
+ uint8_t address_type;
+ uint8_t address[6];
+ uint16_t handle;
+ uint16_t offset;
+ uint16_t data_length;
+ uint8_t data[0];
} __packed;
#define GATT_RELIABLE_WRITE 0x19
struct gatt_reliable_write_cmd {
- u8_t address_type;
- u8_t address[6];
- u16_t handle;
- u16_t offset;
- u16_t data_length;
- u8_t data[0];
+ uint8_t address_type;
+ uint8_t address[6];
+ uint16_t handle;
+ uint16_t offset;
+ uint16_t data_length;
+ uint8_t data[0];
} __packed;
#define GATT_CFG_NOTIFY 0x1a
#define GATT_CFG_INDICATE 0x1b
struct gatt_cfg_notify_cmd {
- u8_t address_type;
- u8_t address[6];
- u8_t enable;
- u16_t ccc_handle;
+ uint8_t address_type;
+ uint8_t address[6];
+ uint8_t enable;
+ uint16_t ccc_handle;
} __packed;
#define GATT_GET_ATTRIBUTES 0x1c
struct gatt_get_attributes_cmd {
- u16_t start_handle;
- u16_t end_handle;
- u8_t type_length;
- u8_t type[0];
+ uint16_t start_handle;
+ uint16_t end_handle;
+ uint8_t type_length;
+ uint8_t type[0];
} __packed;
struct gatt_get_attributes_rp {
- u8_t attrs_count;
- u8_t attrs[0];
+ uint8_t attrs_count;
+ uint8_t attrs[0];
} __packed;
struct gatt_attr {
- u16_t handle;
- u8_t permission;
- u8_t type_length;
- u8_t type[0];
+ uint16_t handle;
+ uint8_t permission;
+ uint8_t type_length;
+ uint8_t type[0];
} __packed;
#define GATT_GET_ATTRIBUTE_VALUE 0x1d
struct gatt_get_attribute_value_cmd {
- u8_t address_type;
- u8_t address[6];
- u16_t handle;
+ uint8_t address_type;
+ uint8_t address[6];
+ uint16_t handle;
} __packed;
struct gatt_get_attribute_value_rp {
- u8_t att_response;
- u16_t value_length;
- u8_t value[0];
+ uint8_t att_response;
+ uint16_t value_length;
+ uint8_t value[0];
} __packed;
#define GATT_CHANGE_DATABASE 0x1e
struct gatt_change_database {
- u16_t start_handle;
- u16_t end_handle;
- u8_t visibility;
+ uint16_t start_handle;
+ uint16_t end_handle;
+ uint8_t visibility;
} __packed;
/* GATT events */
#define GATT_EV_NOTIFICATION 0x80
struct gatt_notification_ev {
- u8_t address_type;
- u8_t address[6];
- u8_t type;
- u16_t handle;
- u16_t data_length;
- u8_t data[0];
+ uint8_t address_type;
+ uint8_t address[6];
+ uint8_t type;
+ uint16_t handle;
+ uint16_t data_length;
+ uint8_t data[0];
} __packed;
#define GATT_EV_ATTR_VALUE_CHANGED 0x81
struct gatt_attr_value_changed_ev {
- u16_t handle;
- u16_t data_length;
- u8_t data[0];
+ uint16_t handle;
+ uint16_t data_length;
+ uint8_t data[0];
} __packed;
-static inline void tester_set_bit(u8_t *addr, unsigned int bit)
+static inline void tester_set_bit(uint8_t *addr, unsigned int bit)
{
- u8_t *p = addr + (bit / 8);
+ uint8_t *p = addr + (bit / 8);
*p |= BIT(bit % 8);
}
-static inline u8_t tester_test_bit(const u8_t *addr, unsigned int bit)
+static inline uint8_t tester_test_bit(const uint8_t *addr, unsigned int bit)
{
- const u8_t *p = addr + (bit / 8);
+ const uint8_t *p = addr + (bit / 8);
return *p & BIT(bit % 8);
}
@@ -739,30 +739,33 @@ static inline u8_t tester_test_bit(const u8_t *addr, unsigned int bit)
/* commands */
#define L2CAP_READ_SUPPORTED_COMMANDS 0x01
struct l2cap_read_supported_commands_rp {
- u8_t data[0];
+ uint8_t data[0];
} __packed;
#define L2CAP_CONNECT 0x02
struct l2cap_connect_cmd {
- u8_t address_type;
- u8_t address[6];
- u16_t psm;
+ uint8_t address_type;
+ uint8_t address[6];
+ uint16_t psm;
+ uint16_t mtu;
+ uint8_t num;
} __packed;
struct l2cap_connect_rp {
- u8_t chan_id;
+ uint8_t num;
+ uint8_t chan_ids[0];
} __packed;
#define L2CAP_DISCONNECT 0x03
struct l2cap_disconnect_cmd {
- u8_t chan_id;
+ uint8_t chan_id;
} __packed;
#define L2CAP_SEND_DATA 0x04
struct l2cap_send_data_cmd {
- u8_t chan_id;
- u16_t data_len;
- u8_t data[];
+ uint8_t chan_id;
+ uint16_t data_len;
+ uint8_t data[];
} __packed;
#define L2CAP_TRANSPORT_BREDR 0x00
@@ -770,54 +773,78 @@ struct l2cap_send_data_cmd {
#define L2CAP_LISTEN 0x05
struct l2cap_listen_cmd {
- u16_t psm;
- u8_t transport;
+ uint16_t psm;
+ uint8_t transport;
+ uint16_t mtu;
+ uint16_t response;
} __packed;
#define L2CAP_ACCEPT_CONNECTION 0x06
struct l2cap_accept_connection_cmd {
- u8_t chan_id;
- u16_t result;
+ uint8_t chan_id;
+ uint16_t result;
+} __packed;
+
+#define L2CAP_RECONFIGURE 0x07
+struct l2cap_reconfigure_cmd {
+ uint8_t address_type;
+ uint8_t address[6];
+ uint16_t mtu;
+ uint8_t num;
+ uint8_t idxs[];
} __packed;
/* events */
#define L2CAP_EV_CONNECTION_REQ 0x80
struct l2cap_connection_req_ev {
- u8_t chan_id;
- u16_t psm;
- u8_t address_type;
- u8_t address[6];
+ uint8_t chan_id;
+ uint16_t psm;
+ uint8_t address_type;
+ uint8_t address[6];
} __packed;
#define L2CAP_EV_CONNECTED 0x81
struct l2cap_connected_ev {
- u8_t chan_id;
- u16_t psm;
- u8_t address_type;
- u8_t address[6];
+ uint8_t chan_id;
+ uint16_t psm;
+ uint16_t peer_mtu;
+ uint16_t peer_mps;
+ uint16_t our_mtu;
+ uint16_t our_mps;
+ uint8_t address_type;
+ uint8_t address[6];
} __packed;
#define L2CAP_EV_DISCONNECTED 0x82
struct l2cap_disconnected_ev {
- u16_t result;
- u8_t chan_id;
- u16_t psm;
- u8_t address_type;
- u8_t address[6];
+ uint16_t result;
+ uint8_t chan_id;
+ uint16_t psm;
+ uint8_t address_type;
+ uint8_t address[6];
} __packed;
#define L2CAP_EV_DATA_RECEIVED 0x83
struct l2cap_data_received_ev {
- u8_t chan_id;
- u16_t data_length;
- u8_t data[0];
+ uint8_t chan_id;
+ uint16_t data_length;
+ uint8_t data[0];
+} __packed;
+
+#define L2CAP_EV_RECONFIGURED 0x84
+struct l2cap_reconfigured_ev {
+ uint8_t chan_id;
+ uint16_t peer_mtu;
+ uint16_t peer_mps;
+ uint16_t our_mtu;
+ uint16_t our_mps;
} __packed;
/* MESH Service */
/* commands */
#define MESH_READ_SUPPORTED_COMMANDS 0x01
struct mesh_read_supported_commands_rp {
- u8_t data[0];
+ uint8_t data[0];
} __packed;
#define MESH_OUT_BLINK BIT(0)
@@ -833,88 +860,88 @@ struct mesh_read_supported_commands_rp {
#define MESH_CONFIG_PROVISIONING 0x02
struct mesh_config_provisioning_cmd {
- u8_t uuid[16];
- u8_t static_auth[16];
- u8_t out_size;
- u16_t out_actions;
- u8_t in_size;
- u16_t in_actions;
+ uint8_t uuid[16];
+ uint8_t static_auth[16];
+ uint8_t out_size;
+ uint16_t out_actions;
+ uint8_t in_size;
+ uint16_t in_actions;
} __packed;
#define MESH_PROVISION_NODE 0x03
struct mesh_provision_node_cmd {
- u8_t net_key[16];
- u16_t net_key_idx;
- u8_t flags;
- u32_t iv_index;
- u32_t seq_num;
- u16_t addr;
- u8_t dev_key[16];
+ uint8_t net_key[16];
+ uint16_t net_key_idx;
+ uint8_t flags;
+ uint32_t iv_index;
+ uint32_t seq_num;
+ uint16_t addr;
+ uint8_t dev_key[16];
} __packed;
#define MESH_INIT 0x04
#define MESH_RESET 0x05
#define MESH_INPUT_NUMBER 0x06
struct mesh_input_number_cmd {
- u32_t number;
+ uint32_t number;
} __packed;
#define MESH_INPUT_STRING 0x07
struct mesh_input_string_cmd {
- u8_t string_len;
- u8_t string[0];
+ uint8_t string_len;
+ uint8_t string[0];
} __packed;
#define MESH_IVU_TEST_MODE 0x08
struct mesh_ivu_test_mode_cmd {
- u8_t enable;
+ uint8_t enable;
} __packed;
#define MESH_IVU_TOGGLE_STATE 0x09
#define MESH_NET_SEND 0x0a
struct mesh_net_send_cmd {
- u8_t ttl;
- u16_t src;
- u16_t dst;
- u8_t payload_len;
- u8_t payload[0];
+ uint8_t ttl;
+ uint16_t src;
+ uint16_t dst;
+ uint8_t payload_len;
+ uint8_t payload[0];
} __packed;
#define MESH_HEALTH_GENERATE_FAULTS 0x0b
struct mesh_health_generate_faults_rp {
- u8_t test_id;
- u8_t cur_faults_count;
- u8_t reg_faults_count;
- u8_t current_faults[0];
- u8_t registered_faults[0];
+ uint8_t test_id;
+ uint8_t cur_faults_count;
+ uint8_t reg_faults_count;
+ uint8_t current_faults[0];
+ uint8_t registered_faults[0];
} __packed;
#define MESH_HEALTH_CLEAR_FAULTS 0x0c
#define MESH_LPN 0x0d
struct mesh_lpn_set_cmd {
- u8_t enable;
+ uint8_t enable;
} __packed;
#define MESH_LPN_POLL 0x0e
#define MESH_MODEL_SEND 0x0f
struct mesh_model_send_cmd {
- u16_t src;
- u16_t dst;
- u8_t payload_len;
- u8_t payload[0];
+ uint16_t src;
+ uint16_t dst;
+ uint8_t payload_len;
+ uint8_t payload[0];
} __packed;
#define MESH_LPN_SUBSCRIBE 0x10
struct mesh_lpn_subscribe_cmd {
- u16_t address;
+ uint16_t address;
} __packed;
#define MESH_LPN_UNSUBSCRIBE 0x11
struct mesh_lpn_unsubscribe_cmd {
- u16_t address;
+ uint16_t address;
} __packed;
#define MESH_RPL_CLEAR 0x12
@@ -923,20 +950,20 @@ struct mesh_lpn_unsubscribe_cmd {
/* events */
#define MESH_EV_OUT_NUMBER_ACTION 0x80
struct mesh_out_number_action_ev {
- u16_t action;
- u32_t number;
+ uint16_t action;
+ uint32_t number;
} __packed;
#define MESH_EV_OUT_STRING_ACTION 0x81
struct mesh_out_string_action_ev {
- u8_t string_len;
- u8_t string[0];
+ uint8_t string_len;
+ uint8_t string[0];
} __packed;
#define MESH_EV_IN_ACTION 0x82
struct mesh_in_action_ev {
- u16_t action;
- u8_t size;
+ uint16_t action;
+ uint8_t size;
} __packed;
#define MESH_EV_PROVISIONED 0x83
@@ -945,63 +972,63 @@ struct mesh_in_action_ev {
#define MESH_PROV_BEARER_PB_GATT 0x01
#define MESH_EV_PROV_LINK_OPEN 0x84
struct mesh_prov_link_open_ev {
- u8_t bearer;
+ uint8_t bearer;
} __packed;
#define MESH_EV_PROV_LINK_CLOSED 0x85
struct mesh_prov_link_closed_ev {
- u8_t bearer;
+ uint8_t bearer;
} __packed;
#define MESH_EV_NET_RECV 0x86
struct mesh_net_recv_ev {
- u8_t ttl;
- u8_t ctl;
- u16_t src;
- u16_t dst;
- u8_t payload_len;
- u8_t payload[0];
+ uint8_t ttl;
+ uint8_t ctl;
+ uint16_t src;
+ uint16_t dst;
+ uint8_t payload_len;
+ uint8_t payload[0];
} __packed;
#define MESH_EV_INVALID_BEARER 0x87
struct mesh_invalid_bearer_ev {
- u8_t opcode;
+ uint8_t opcode;
} __packed;
#define MESH_EV_INCOMP_TIMER_EXP 0x88
void tester_init(void);
-void tester_rsp(u8_t service, u8_t opcode, u8_t index, u8_t status);
-void tester_send(u8_t service, u8_t opcode, u8_t index, u8_t *data,
+void tester_rsp(uint8_t service, uint8_t opcode, uint8_t index, uint8_t status);
+void tester_send(uint8_t service, uint8_t opcode, uint8_t index, uint8_t *data,
size_t len);
-void tester_send_buf(u8_t service, u8_t opcode, u8_t index,
+void tester_send_buf(uint8_t service, uint8_t opcode, uint8_t index,
struct os_mbuf *buf);
-u8_t tester_init_gap(void);
-u8_t tester_unregister_gap(void);
-void tester_handle_gap(u8_t opcode, u8_t index, u8_t *data,
- u16_t len);
-u8_t tester_init_gatt(void);
-u8_t tester_unregister_gatt(void);
-void tester_handle_gatt(u8_t opcode, u8_t index, u8_t *data,
- u16_t len);
-int tester_gatt_notify_rx_ev(u16_t conn_handle, u16_t attr_handle,
- u8_t indication, struct os_mbuf *om);
-int tester_gatt_subscribe_ev(u16_t conn_handle, u16_t attr_handle, u8_t reason,
- u8_t prev_notify, u8_t cur_notify,
- u8_t prev_indicate, u8_t cur_indicate);
+uint8_t tester_init_gap(void);
+uint8_t tester_unregister_gap(void);
+void tester_handle_gap(uint8_t opcode, uint8_t index, uint8_t *data,
+ uint16_t len);
+uint8_t tester_init_gatt(void);
+uint8_t tester_unregister_gatt(void);
+void tester_handle_gatt(uint8_t opcode, uint8_t index, uint8_t *data,
+ uint16_t len);
+int tester_gatt_notify_rx_ev(uint16_t conn_handle, uint16_t attr_handle,
+ uint8_t indication, struct os_mbuf *om);
+int tester_gatt_subscribe_ev(uint16_t conn_handle, uint16_t attr_handle, uint8_t reason,
+ uint8_t prev_notify, uint8_t cur_notify,
+ uint8_t prev_indicate, uint8_t cur_indicate);
#if MYNEWT_VAL(BLE_L2CAP_COC_MAX_NUM)
-u8_t tester_init_l2cap(void);
-u8_t tester_unregister_l2cap(void);
-void tester_handle_l2cap(u8_t opcode, u8_t index, u8_t *data,
- u16_t len);
+uint8_t tester_init_l2cap(void);
+uint8_t tester_unregister_l2cap(void);
+void tester_handle_l2cap(uint8_t opcode, uint8_t index, uint8_t *data,
+ uint16_t len);
#endif
#if MYNEWT_VAL(BLE_MESH)
-u8_t tester_init_mesh(void);
-u8_t tester_unregister_mesh(void);
-void tester_handle_mesh(u8_t opcode, u8_t index, u8_t *data, u16_t len);
+uint8_t tester_init_mesh(void);
+uint8_t tester_unregister_mesh(void);
+void tester_handle_mesh(uint8_t opcode, uint8_t index, uint8_t *data, uint16_t len);
#endif /* MYNEWT_VAL(BLE_MESH) */
void gatt_svr_register_cb(struct ble_gatt_register_ctxt *ctxt, void *arg);
diff --git a/src/libs/mynewt-nimble/apps/bttester/src/bttester_pipe.h b/src/libs/mynewt-nimble/apps/bttester/src/bttester_pipe.h
index c54d42de..64b63cd6 100644
--- a/src/libs/mynewt-nimble/apps/bttester/src/bttester_pipe.h
+++ b/src/libs/mynewt-nimble/apps/bttester/src/bttester_pipe.h
@@ -27,9 +27,9 @@
extern "C" {
#endif
-typedef u8_t *(*bttester_pipe_recv_cb)(u8_t *buf, size_t *off);
-void bttester_pipe_register(u8_t *buf, size_t len, bttester_pipe_recv_cb cb);
-int bttester_pipe_send(const u8_t *data, int len);
+typedef uint8_t *(*bttester_pipe_recv_cb)(uint8_t *buf, size_t *off);
+void bttester_pipe_register(uint8_t *buf, size_t len, bttester_pipe_recv_cb cb);
+int bttester_pipe_send(const uint8_t *data, int len);
int bttester_pipe_send_buf(struct os_mbuf *buf);
int bttester_pipe_init(void);
diff --git a/src/libs/mynewt-nimble/apps/bttester/src/gap.c b/src/libs/mynewt-nimble/apps/bttester/src/gap.c
index 9d6de043..acac9989 100644
--- a/src/libs/mynewt-nimble/apps/bttester/src/gap.c
+++ b/src/libs/mynewt-nimble/apps/bttester/src/gap.c
@@ -51,7 +51,7 @@ static struct ble_sm_sc_oob_data oob_data_local;
static struct ble_sm_sc_oob_data oob_data_remote;
static uint16_t current_settings;
-u8_t own_addr_type;
+uint8_t own_addr_type;
static ble_addr_t peer_id_addr;
static ble_addr_t peer_ota_addr;
static bool encrypted = false;
@@ -109,9 +109,9 @@ static int gap_conn_find_by_addr(const ble_addr_t *dev_addr,
static int gap_event_cb(struct ble_gap_event *event, void *arg);
-static void supported_commands(u8_t *data, u16_t len)
+static void supported_commands(uint8_t *data, uint16_t len)
{
- u8_t cmds[3];
+ uint8_t cmds[3];
struct gap_read_supported_commands_rp *rp = (void *) &cmds;
SYS_LOG_DBG("");
@@ -143,13 +143,13 @@ static void supported_commands(u8_t *data, u16_t len)
tester_set_bit(cmds, GAP_SET_MITM);
tester_send(BTP_SERVICE_ID_GAP, GAP_READ_SUPPORTED_COMMANDS,
- CONTROLLER_INDEX, (u8_t *) rp, sizeof(cmds));
+ CONTROLLER_INDEX, (uint8_t *) rp, sizeof(cmds));
}
-static void controller_index_list(u8_t *data, u16_t len)
+static void controller_index_list(uint8_t *data, uint16_t len)
{
struct gap_read_controller_index_list_rp *rp;
- u8_t buf[sizeof(*rp) + 1];
+ uint8_t buf[sizeof(*rp) + 1];
SYS_LOG_DBG("");
@@ -159,7 +159,7 @@ static void controller_index_list(u8_t *data, u16_t len)
rp->index[0] = CONTROLLER_INDEX;
tester_send(BTP_SERVICE_ID_GAP, GAP_READ_CONTROLLER_INDEX_LIST,
- BTP_INDEX_NONE, (u8_t *) rp, sizeof(buf));
+ BTP_INDEX_NONE, (uint8_t *) rp, sizeof(buf));
}
static int check_pub_addr_unassigned(void)
@@ -174,10 +174,10 @@ static int check_pub_addr_unassigned(void)
#endif
}
-static void controller_info(u8_t *data, u16_t len)
+static void controller_info(uint8_t *data, uint16_t len)
{
struct gap_read_controller_info_rp rp;
- u32_t supported_settings = 0;
+ uint32_t supported_settings = 0;
ble_addr_t addr;
int rc;
@@ -240,7 +240,7 @@ static void controller_info(u8_t *data, u16_t len)
memcpy(rp.name, CONTROLLER_NAME, sizeof(CONTROLLER_NAME));
tester_send(BTP_SERVICE_ID_GAP, GAP_READ_CONTROLLER_INFO,
- CONTROLLER_INDEX, (u8_t *) &rp, sizeof(rp));
+ CONTROLLER_INDEX, (uint8_t *) &rp, sizeof(rp));
}
static struct ble_gap_adv_params adv_params = {
@@ -248,7 +248,7 @@ static struct ble_gap_adv_params adv_params = {
.disc_mode = BLE_GAP_DISC_MODE_NON,
};
-static void set_connectable(u8_t *data, u16_t len)
+static void set_connectable(uint8_t *data, uint16_t len)
{
const struct gap_set_connectable_cmd *cmd = (void *) data;
struct gap_set_connectable_rp rp;
@@ -266,12 +266,12 @@ static void set_connectable(u8_t *data, u16_t len)
rp.current_settings = sys_cpu_to_le32(current_settings);
tester_send(BTP_SERVICE_ID_GAP, GAP_SET_CONNECTABLE, CONTROLLER_INDEX,
- (u8_t *) &rp, sizeof(rp));
+ (uint8_t *) &rp, sizeof(rp));
}
-static u8_t ad_flags = BLE_HS_ADV_F_BREDR_UNSUP;
+static uint8_t ad_flags = BLE_HS_ADV_F_BREDR_UNSUP;
-static void set_discoverable(u8_t *data, u16_t len)
+static void set_discoverable(uint8_t *data, uint16_t len)
{
const struct gap_set_discoverable_cmd *cmd = (void *) data;
struct gap_set_discoverable_rp rp;
@@ -305,10 +305,10 @@ static void set_discoverable(u8_t *data, u16_t len)
rp.current_settings = sys_cpu_to_le32(current_settings);
tester_send(BTP_SERVICE_ID_GAP, GAP_SET_DISCOVERABLE, CONTROLLER_INDEX,
- (u8_t *) &rp, sizeof(rp));
+ (uint8_t *) &rp, sizeof(rp));
}
-static void set_bondable(const u8_t *data, u16_t len)
+static void set_bondable(const uint8_t *data, uint16_t len)
{
const struct gap_set_bondable_cmd *cmd = (void *) data;
struct gap_set_bondable_rp rp;
@@ -325,7 +325,7 @@ static void set_bondable(const u8_t *data, u16_t len)
rp.current_settings = sys_cpu_to_le32(current_settings);
tester_send(BTP_SERVICE_ID_GAP, GAP_SET_BONDABLE, CONTROLLER_INDEX,
- (u8_t *) &rp, sizeof(rp));
+ (uint8_t *) &rp, sizeof(rp));
}
static struct bt_data ad[10] = {
@@ -334,7 +334,7 @@ static struct bt_data ad[10] = {
static struct bt_data sd[10];
static int set_ad(const struct bt_data *ad, size_t ad_len,
- u8_t *buf, u8_t *buf_len)
+ uint8_t *buf, uint8_t *buf_len)
{
int i;
@@ -350,14 +350,14 @@ static int set_ad(const struct bt_data *ad, size_t ad_len,
return 0;
}
-static void start_advertising(const u8_t *data, u16_t len)
+static void start_advertising(const uint8_t *data, uint16_t len)
{
const struct gap_start_advertising_cmd *cmd = (void *) data;
struct gap_start_advertising_rp rp;
int32_t duration_ms = BLE_HS_FOREVER;
uint8_t buf[BLE_HS_ADV_MAX_SZ];
uint8_t buf_len = 0;
- u8_t adv_len, sd_len;
+ uint8_t adv_len, sd_len;
int err;
int i;
@@ -429,14 +429,14 @@ static void start_advertising(const u8_t *data, u16_t len)
rp.current_settings = sys_cpu_to_le32(current_settings);
tester_send(BTP_SERVICE_ID_GAP, GAP_START_ADVERTISING, CONTROLLER_INDEX,
- (u8_t *) &rp, sizeof(rp));
+ (uint8_t *) &rp, sizeof(rp));
return;
fail:
tester_rsp(BTP_SERVICE_ID_GAP, GAP_START_ADVERTISING, CONTROLLER_INDEX,
BTP_STATUS_FAILED);
}
-static void stop_advertising(const u8_t *data, u16_t len)
+static void stop_advertising(const uint8_t *data, uint16_t len)
{
struct gap_stop_advertising_rp rp;
@@ -452,12 +452,12 @@ static void stop_advertising(const u8_t *data, u16_t len)
rp.current_settings = sys_cpu_to_le32(current_settings);
tester_send(BTP_SERVICE_ID_GAP, GAP_STOP_ADVERTISING, CONTROLLER_INDEX,
- (u8_t *) &rp, sizeof(rp));
+ (uint8_t *) &rp, sizeof(rp));
}
-static u8_t get_ad_flags(const u8_t *data, u8_t data_len)
+static uint8_t get_ad_flags(const uint8_t *data, uint8_t data_len)
{
- u8_t len, i;
+ uint8_t len, i;
/* Parse advertisement to get flags */
for (i = 0; i < data_len; i += len - 1) {
@@ -482,11 +482,11 @@ static u8_t get_ad_flags(const u8_t *data, u8_t data_len)
return 0;
}
-static u8_t discovery_flags;
+static uint8_t discovery_flags;
static struct os_mbuf *adv_buf;
-static void store_adv(const ble_addr_t *addr, s8_t rssi,
- const u8_t *data, u8_t len)
+static void store_adv(const ble_addr_t *addr, int8_t rssi,
+ const uint8_t *data, uint8_t len)
{
struct gap_device_found_ev *ev;
@@ -503,8 +503,8 @@ static void store_adv(const ble_addr_t *addr, s8_t rssi,
memcpy(net_buf_simple_add(adv_buf, len), data, len);
}
-static void device_found(ble_addr_t *addr, s8_t rssi, u8_t evtype,
- const u8_t *data, u8_t len)
+static void device_found(ble_addr_t *addr, int8_t rssi, uint8_t evtype,
+ const uint8_t *data, uint8_t len)
{
struct gap_device_found_ev *ev;
ble_addr_t a;
@@ -512,7 +512,7 @@ static void device_found(ble_addr_t *addr, s8_t rssi, u8_t evtype,
/* if General/Limited Discovery - parse Advertising data to get flags */
if (!(discovery_flags & GAP_DISCOVERY_FLAG_LE_OBSERVE) &&
(evtype != BLE_HCI_ADV_RPT_EVTYPE_SCAN_RSP)) {
- u8_t flags = get_ad_flags(data, len);
+ uint8_t flags = get_ad_flags(data, len);
/* ignore non-discoverable devices */
if (!(flags & BLE_AD_DISCOV_MASK)) {
@@ -593,11 +593,11 @@ static int discovery_cb(struct ble_gap_event *event, void *arg)
return 0;
}
-static void start_discovery(const u8_t *data, u16_t len)
+static void start_discovery(const uint8_t *data, uint16_t len)
{
const struct gap_start_discovery_cmd *cmd = (void *) data;
struct ble_gap_disc_params params = {0};
- u8_t status;
+ uint8_t status;
SYS_LOG_DBG("");
@@ -626,9 +626,9 @@ reply:
status);
}
-static void stop_discovery(const u8_t *data, u16_t len)
+static void stop_discovery(const uint8_t *data, uint16_t len)
{
- u8_t status = BTP_STATUS_SUCCESS;
+ uint8_t status = BTP_STATUS_SUCCESS;
SYS_LOG_DBG("");
@@ -680,13 +680,13 @@ static void device_connected_ev_send(struct os_event *ev)
}
tester_send(BTP_SERVICE_ID_GAP, GAP_EV_DEVICE_CONNECTED,
- CONTROLLER_INDEX, (u8_t *) &connected_ev,
+ CONTROLLER_INDEX, (uint8_t *) &connected_ev,
sizeof(connected_ev));
periph_privacy(desc);
}
-static void le_connected(u16_t conn_handle, int status)
+static void le_connected(uint16_t conn_handle, int status)
{
struct ble_gap_conn_desc desc;
ble_addr_t *addr;
@@ -720,7 +720,7 @@ static void le_connected(u16_t conn_handle, int status)
CONNECTED_EV_DELAY_MS(desc.conn_itvl)));
#else
tester_send(BTP_SERVICE_ID_GAP, GAP_EV_DEVICE_CONNECTED,
- CONTROLLER_INDEX, (u8_t *) &connected_ev,
+ CONTROLLER_INDEX, (uint8_t *) &connected_ev,
sizeof(connected_ev));
#endif
}
@@ -763,10 +763,10 @@ static void le_disconnected(struct ble_gap_conn_desc *conn, int reason)
ev.address_type = addr->type;
tester_send(BTP_SERVICE_ID_GAP, GAP_EV_DEVICE_DISCONNECTED,
- CONTROLLER_INDEX, (u8_t *) &ev, sizeof(ev));
+ CONTROLLER_INDEX, (uint8_t *) &ev, sizeof(ev));
}
-static void auth_passkey_oob(u16_t conn_handle)
+static void auth_passkey_oob(uint16_t conn_handle)
{
struct ble_gap_conn_desc desc;
struct ble_sm_io pk;
@@ -786,7 +786,7 @@ static void auth_passkey_oob(u16_t conn_handle)
assert(rc == 0);
}
-static void auth_passkey_display(u16_t conn_handle, unsigned int passkey)
+static void auth_passkey_display(uint16_t conn_handle, unsigned int passkey)
{
struct ble_gap_conn_desc desc;
struct gap_passkey_display_ev ev;
@@ -817,10 +817,10 @@ static void auth_passkey_display(u16_t conn_handle, unsigned int passkey)
ev.passkey = sys_cpu_to_le32(pk.passkey);
tester_send(BTP_SERVICE_ID_GAP, GAP_EV_PASSKEY_DISPLAY,
- CONTROLLER_INDEX, (u8_t *) &ev, sizeof(ev));
+ CONTROLLER_INDEX, (uint8_t *) &ev, sizeof(ev));
}
-static void auth_passkey_entry(u16_t conn_handle)
+static void auth_passkey_entry(uint16_t conn_handle)
{
struct ble_gap_conn_desc desc;
struct gap_passkey_entry_req_ev ev;
@@ -840,10 +840,10 @@ static void auth_passkey_entry(u16_t conn_handle)
ev.address_type = addr->type;
tester_send(BTP_SERVICE_ID_GAP, GAP_EV_PASSKEY_ENTRY_REQ,
- CONTROLLER_INDEX, (u8_t *) &ev, sizeof(ev));
+ CONTROLLER_INDEX, (uint8_t *) &ev, sizeof(ev));
}
-static void auth_passkey_numcmp(u16_t conn_handle, unsigned int passkey)
+static void auth_passkey_numcmp(uint16_t conn_handle, unsigned int passkey)
{
struct ble_gap_conn_desc desc;
struct gap_passkey_confirm_req_ev ev;
@@ -864,10 +864,10 @@ static void auth_passkey_numcmp(u16_t conn_handle, unsigned int passkey)
ev.passkey = sys_cpu_to_le32(passkey);
tester_send(BTP_SERVICE_ID_GAP, GAP_EV_PASSKEY_CONFIRM_REQ,
- CONTROLLER_INDEX, (u8_t *) &ev, sizeof(ev));
+ CONTROLLER_INDEX, (uint8_t *) &ev, sizeof(ev));
}
-static void auth_passkey_oob_sc(u16_t conn_handle)
+static void auth_passkey_oob_sc(uint16_t conn_handle)
{
int rc;
struct ble_sm_io pk;
@@ -889,7 +889,7 @@ static void auth_passkey_oob_sc(u16_t conn_handle)
}
}
-static void le_passkey_action(u16_t conn_handle,
+static void le_passkey_action(uint16_t conn_handle,
struct ble_gap_passkey_params *params)
{
SYS_LOG_DBG("");
@@ -917,7 +917,7 @@ static void le_passkey_action(u16_t conn_handle,
}
}
-static void le_identity_resolved(u16_t conn_handle)
+static void le_identity_resolved(uint16_t conn_handle)
{
struct ble_gap_conn_desc desc;
struct gap_identity_resolved_ev ev;
@@ -941,7 +941,7 @@ static void le_identity_resolved(u16_t conn_handle)
sizeof(ev.identity_address));
tester_send(BTP_SERVICE_ID_GAP, GAP_EV_IDENTITY_RESOLVED,
- CONTROLLER_INDEX, (u8_t *) &ev, sizeof(ev));
+ CONTROLLER_INDEX, (uint8_t *) &ev, sizeof(ev));
}
static void le_conn_param_update(struct ble_gap_conn_desc *desc)
@@ -958,7 +958,7 @@ static void le_conn_param_update(struct ble_gap_conn_desc *desc)
ev.supervision_timeout = desc->supervision_timeout;
tester_send(BTP_SERVICE_ID_GAP, GAP_EV_CONN_PARAM_UPDATE,
- CONTROLLER_INDEX, (u8_t *) &ev, sizeof(ev));
+ CONTROLLER_INDEX, (uint8_t *) &ev, sizeof(ev));
}
static void le_encryption_changed(struct ble_gap_conn_desc *desc)
@@ -986,7 +986,7 @@ static void le_encryption_changed(struct ble_gap_conn_desc *desc)
}
tester_send(BTP_SERVICE_ID_GAP, GAP_EV_SEC_LEVEL_CHANGED,
- CONTROLLER_INDEX, (u8_t *) &ev, sizeof(ev));
+ CONTROLLER_INDEX, (uint8_t *) &ev, sizeof(ev));
}
static void print_bytes(const uint8_t *bytes, int len)
@@ -1055,7 +1055,7 @@ static void adv_complete(void)
ev.current_settings = sys_cpu_to_le32(current_settings);
tester_send(BTP_SERVICE_ID_GAP, GAP_EV_NEW_SETTINGS, CONTROLLER_INDEX,
- (u8_t *) &ev, sizeof(ev));
+ (uint8_t *) &ev, sizeof(ev));
}
static int gap_event_cb(struct ble_gap_event *event, void *arg)
@@ -1197,9 +1197,9 @@ static int gap_event_cb(struct ble_gap_event *event, void *arg)
return 0;
}
-static void connect(const u8_t *data, u16_t len)
+static void connect(const uint8_t *data, uint16_t len)
{
- u8_t status = BTP_STATUS_SUCCESS;
+ uint8_t status = BTP_STATUS_SUCCESS;
SYS_LOG_DBG("");
@@ -1211,10 +1211,10 @@ static void connect(const u8_t *data, u16_t len)
tester_rsp(BTP_SERVICE_ID_GAP, GAP_CONNECT, CONTROLLER_INDEX, status);
}
-static void disconnect(const u8_t *data, u16_t len)
+static void disconnect(const uint8_t *data, uint16_t len)
{
struct ble_gap_conn_desc desc;
- u8_t status;
+ uint8_t status;
int rc;
SYS_LOG_DBG("");
@@ -1236,10 +1236,10 @@ rsp:
status);
}
-static void set_io_cap(const u8_t *data, u16_t len)
+static void set_io_cap(const uint8_t *data, uint16_t len)
{
const struct gap_set_io_cap_cmd *cmd = (void *) data;
- u8_t status;
+ uint8_t status;
SYS_LOG_DBG("");
@@ -1276,10 +1276,10 @@ rsp:
status);
}
-static void pair(const u8_t *data, u16_t len)
+static void pair(const uint8_t *data, uint16_t len)
{
struct ble_gap_conn_desc desc;
- u8_t status;
+ uint8_t status;
int rc;
SYS_LOG_DBG("");
@@ -1301,9 +1301,9 @@ rsp:
tester_rsp(BTP_SERVICE_ID_GAP, GAP_PAIR, CONTROLLER_INDEX, status);
}
-static void unpair(const u8_t *data, u16_t len)
+static void unpair(const uint8_t *data, uint16_t len)
{
- u8_t status;
+ uint8_t status;
int err;
SYS_LOG_DBG("");
@@ -1313,12 +1313,12 @@ static void unpair(const u8_t *data, u16_t len)
tester_rsp(BTP_SERVICE_ID_GAP, GAP_UNPAIR, CONTROLLER_INDEX, status);
}
-static void passkey_entry(const u8_t *data, u16_t len)
+static void passkey_entry(const uint8_t *data, uint16_t len)
{
const struct gap_passkey_entry_cmd *cmd = (void *) data;
struct ble_gap_conn_desc desc;
struct ble_sm_io pk;
- u8_t status;
+ uint8_t status;
int rc;
SYS_LOG_DBG("");
@@ -1345,12 +1345,12 @@ rsp:
status);
}
-static void passkey_confirm(const u8_t *data, u16_t len)
+static void passkey_confirm(const uint8_t *data, uint16_t len)
{
const struct gap_passkey_confirm_cmd *cmd = (void *) data;
struct ble_gap_conn_desc desc;
struct ble_sm_io pk;
- u8_t status;
+ uint8_t status;
int rc;
SYS_LOG_DBG("");
@@ -1378,7 +1378,7 @@ rsp:
status);
}
-static void start_direct_adv(const u8_t *data, u16_t len)
+static void start_direct_adv(const uint8_t *data, uint16_t len)
{
const struct gap_start_direct_adv_cmd *cmd = (void *) data;
struct gap_start_advertising_rp rp;
@@ -1403,7 +1403,7 @@ static void start_direct_adv(const u8_t *data, u16_t len)
rp.current_settings = sys_cpu_to_le32(current_settings);
tester_send(BTP_SERVICE_ID_GAP, GAP_START_DIRECT_ADV, CONTROLLER_INDEX,
- (u8_t *) &rp, sizeof(rp));
+ (uint8_t *) &rp, sizeof(rp));
return;
fail:
tester_rsp(BTP_SERVICE_ID_GAP, GAP_START_DIRECT_ADV, CONTROLLER_INDEX,
@@ -1416,7 +1416,7 @@ static void conn_param_update_cb(uint16_t conn_handle, int status, void *arg)
conn_handle, status);
}
-static int conn_param_update_slave(u16_t conn_handle,
+static int conn_param_update_slave(uint16_t conn_handle,
const struct gap_conn_param_update_cmd *cmd)
{
int rc;
@@ -1436,7 +1436,7 @@ static int conn_param_update_slave(u16_t conn_handle,
return 0;
}
-static int conn_param_update_master(u16_t conn_handle,
+static int conn_param_update_master(uint16_t conn_handle,
const struct gap_conn_param_update_cmd *cmd)
{
int rc;
@@ -1489,7 +1489,7 @@ rsp:
SYS_LOG_ERR("Conn param update fail; rc=%d", rc);
}
-static void conn_param_update_async(const u8_t *data, u16_t len)
+static void conn_param_update_async(const uint8_t *data, uint16_t len)
{
const struct gap_conn_param_update_cmd *cmd = (void *) data;
update_params = *cmd;
@@ -1500,7 +1500,7 @@ static void conn_param_update_async(const u8_t *data, u16_t len)
BTP_STATUS_SUCCESS);
}
-static void oob_legacy_set_data(const u8_t *data, u16_t len)
+static void oob_legacy_set_data(const uint8_t *data, uint16_t len)
{
const struct gap_oob_legacy_set_data_cmd *cmd = (void *) data;
@@ -1511,7 +1511,7 @@ static void oob_legacy_set_data(const u8_t *data, u16_t len)
CONTROLLER_INDEX, BTP_STATUS_SUCCESS);
}
-static void oob_sc_get_local_data(const u8_t *data, u16_t len)
+static void oob_sc_get_local_data(const uint8_t *data, uint16_t len)
{
struct gap_oob_sc_get_local_data_rp rp;
@@ -1519,10 +1519,10 @@ static void oob_sc_get_local_data(const u8_t *data, u16_t len)
memcpy(rp.c, oob_data_local.c, 16);
tester_send(BTP_SERVICE_ID_GAP, GAP_OOB_SC_GET_LOCAL_DATA,
- CONTROLLER_INDEX, (u8_t *) &rp, sizeof(rp));
+ CONTROLLER_INDEX, (uint8_t *) &rp, sizeof(rp));
}
-static void oob_sc_set_remote_data(const u8_t *data, u16_t len)
+static void oob_sc_set_remote_data(const uint8_t *data, uint16_t len)
{
const struct gap_oob_sc_set_remote_data_cmd *cmd = (void *) data;
@@ -1534,7 +1534,7 @@ static void oob_sc_set_remote_data(const u8_t *data, u16_t len)
CONTROLLER_INDEX, BTP_STATUS_SUCCESS);
}
-static void set_mitm(const u8_t *data, u16_t len)
+static void set_mitm(const uint8_t *data, uint16_t len)
{
const struct gap_set_mitm_cmd *cmd = (void *) data;
@@ -1544,8 +1544,8 @@ static void set_mitm(const u8_t *data, u16_t len)
CONTROLLER_INDEX, BTP_STATUS_SUCCESS);
}
-void tester_handle_gap(u8_t opcode, u8_t index, u8_t *data,
- u16_t len)
+void tester_handle_gap(uint8_t opcode, uint8_t index, uint8_t *data,
+ uint16_t len)
{
switch (opcode) {
case GAP_READ_SUPPORTED_COMMANDS:
@@ -1664,7 +1664,7 @@ static void tester_init_gap_cb(int err)
BTP_STATUS_SUCCESS);
}
-u8_t tester_init_gap(void)
+uint8_t tester_init_gap(void)
{
#if MYNEWT_VAL(BLE_SM_SC)
int rc;
@@ -1682,7 +1682,7 @@ u8_t tester_init_gap(void)
return BTP_STATUS_SUCCESS;
}
-u8_t tester_unregister_gap(void)
+uint8_t tester_unregister_gap(void)
{
return BTP_STATUS_SUCCESS;
}
diff --git a/src/libs/mynewt-nimble/apps/bttester/src/gatt.c b/src/libs/mynewt-nimble/apps/bttester/src/gatt.c
index 7e7d1d3b..d40de262 100644
--- a/src/libs/mynewt-nimble/apps/bttester/src/gatt.c
+++ b/src/libs/mynewt-nimble/apps/bttester/src/gatt.c
@@ -76,8 +76,8 @@
static uint8_t gatt_svr_pts_static_long_val[300];
static uint8_t gatt_svr_pts_static_val[30];
static uint8_t gatt_svr_pts_static_short_val;
-static u8_t notify_state;
-static u8_t indicate_state;
+static uint8_t notify_state;
+static uint8_t indicate_state;
static uint16_t myconn_handle;
static struct os_callout notify_tx_timer;
uint16_t notify_handle;
@@ -253,7 +253,7 @@ static const struct ble_gatt_svc_def gatt_svr_svcs[] = {
},
};
-static void attr_value_changed_ev(u16_t handle, struct os_mbuf *data)
+static void attr_value_changed_ev(uint16_t handle, struct os_mbuf *data)
{
struct gatt_attr_value_changed_ev *ev;
struct os_mbuf *buf = os_msys_get(0, 0);
@@ -569,7 +569,7 @@ gatt_svr_rel_write_test(uint16_t conn_handle, uint16_t attr_handle,
}
}
-static void start_server(u8_t *data, u16_t len)
+static void start_server(uint8_t *data, uint16_t len)
{
struct gatt_start_server_rp rp;
@@ -583,14 +583,14 @@ static void start_server(u8_t *data, u16_t len)
rp.db_attr_cnt = 0;
tester_send(BTP_SERVICE_ID_GATT, GATT_START_SERVER, CONTROLLER_INDEX,
- (u8_t *) &rp, sizeof(rp));
+ (uint8_t *) &rp, sizeof(rp));
}
/* Convert UUID from BTP command to bt_uuid */
-static u8_t btp2bt_uuid(const u8_t *uuid, u8_t len,
+static uint8_t btp2bt_uuid(const uint8_t *uuid, uint8_t len,
ble_uuid_any_t *bt_uuid)
{
- u16_t le16;
+ uint16_t le16;
switch (len) {
case 0x02: /* UUID 16 */
@@ -614,8 +614,8 @@ static u8_t btp2bt_uuid(const u8_t *uuid, u8_t len,
* It is not intended to be used by client and server at the same time.
*/
static struct {
- u16_t len;
- u8_t buf[MAX_BUFFER_SIZE];
+ uint16_t len;
+ uint8_t buf[MAX_BUFFER_SIZE];
} gatt_buf;
static void *gatt_buf_add(const void *data, size_t len)
@@ -665,7 +665,7 @@ static int read_cb(uint16_t conn_handle,
void *arg)
{
struct gatt_read_rp *rp = (void *) gatt_buf.buf;
- u8_t btp_opcode = (uint8_t) (int) arg;
+ uint8_t btp_opcode = (uint8_t) (int) arg;
SYS_LOG_DBG("status=%d", error->status);
@@ -692,7 +692,7 @@ static int read_cb(uint16_t conn_handle,
return 0;
}
-static void read(u8_t *data, u16_t len)
+static void read(uint8_t *data, uint16_t len)
{
const struct gatt_read_cmd *cmd = (void *) data;
struct ble_gap_conn_desc conn;
@@ -731,7 +731,7 @@ static int read_long_cb(uint16_t conn_handle,
void *arg)
{
struct gatt_read_rp *rp = (void *) gatt_buf.buf;
- u8_t btp_opcode = (uint8_t) (int) arg;
+ uint8_t btp_opcode = (uint8_t) (int) arg;
SYS_LOG_DBG("status=%d", error->status);
@@ -762,7 +762,7 @@ static int read_long_cb(uint16_t conn_handle,
return 0;
}
-static void read_long(u8_t *data, u16_t len)
+static void read_long(uint8_t *data, uint16_t len)
{
const struct gatt_read_long_cmd *cmd = (void *) data;
struct ble_gap_conn_desc conn;
@@ -797,10 +797,10 @@ fail:
BTP_STATUS_FAILED);
}
-static void read_multiple(u8_t *data, u16_t len)
+static void read_multiple(uint8_t *data, uint16_t len)
{
const struct gatt_read_multiple_cmd *cmd = (void *) data;
- u16_t handles[cmd->handles_count];
+ uint16_t handles[cmd->handles_count];
struct ble_gap_conn_desc conn;
int rc, i;
@@ -836,11 +836,11 @@ fail:
BTP_STATUS_FAILED);
}
-static void write_without_rsp(u8_t *data, u16_t len, u8_t op, bool sign)
+static void write_without_rsp(uint8_t *data, uint16_t len, uint8_t op, bool sign)
{
const struct gatt_write_without_rsp_cmd *cmd = (void *) data;
struct ble_gap_conn_desc conn;
- u8_t status = BTP_STATUS_SUCCESS;
+ uint8_t status = BTP_STATUS_SUCCESS;
int rc;
SYS_LOG_DBG("");
@@ -866,7 +866,7 @@ static int write_rsp(uint16_t conn_handle, const struct ble_gatt_error *error,
void *arg)
{
uint8_t err = (uint8_t) error->status;
- u8_t btp_opcode = (uint8_t) (int) arg;
+ uint8_t btp_opcode = (uint8_t) (int) arg;
SYS_LOG_DBG("");
@@ -875,7 +875,7 @@ static int write_rsp(uint16_t conn_handle, const struct ble_gatt_error *error,
return 0;
}
-static void write(u8_t *data, u16_t len)
+static void write(uint8_t *data, uint16_t len)
{
const struct gatt_write_cmd *cmd = (void *) data;
struct ble_gap_conn_desc conn;
@@ -901,7 +901,7 @@ fail:
BTP_STATUS_FAILED);
}
-static void write_long(u8_t *data, u16_t len)
+static void write_long(uint8_t *data, uint16_t len)
{
const struct gatt_write_long_cmd *cmd = (void *) data;
struct ble_gap_conn_desc conn;
@@ -952,7 +952,7 @@ static int reliable_write_rsp(uint16_t conn_handle,
return 0;
}
-static void reliable_write(u8_t *data, u16_t len)
+static void reliable_write(uint8_t *data, uint16_t len)
{
const struct gatt_reliable_write_cmd *cmd = (void *) data;
struct ble_gap_conn_desc conn;
@@ -994,12 +994,12 @@ fail:
}
static struct bt_gatt_subscribe_params {
- u16_t ccc_handle;
- u16_t value;
- u16_t value_handle;
+ uint16_t ccc_handle;
+ uint16_t value;
+ uint16_t value_handle;
} subscribe_params;
-static void read_uuid(u8_t *data, u16_t len)
+static void read_uuid(uint8_t *data, uint16_t len)
{
const struct gatt_read_uuid_cmd *cmd = (void *) data;
struct ble_gap_conn_desc conn;
@@ -1046,8 +1046,8 @@ static int disc_prim_uuid_cb(uint16_t conn_handle,
struct gatt_disc_prim_uuid_rp *rp = (void *) gatt_buf.buf;
struct gatt_service *service;
const ble_uuid_any_t *uuid;
- u8_t uuid_length;
- u8_t opcode = (u8_t) (int) arg;
+ uint8_t uuid_length;
+ uint8_t opcode = (uint8_t) (int) arg;
SYS_LOG_DBG("");
@@ -1081,7 +1081,7 @@ static int disc_prim_uuid_cb(uint16_t conn_handle,
service->uuid_length = uuid_length;
if (uuid->u.type == BLE_UUID_TYPE_16) {
- u16_t u16 = sys_cpu_to_le16(BLE_UUID16(uuid)->value);
+ uint16_t u16 = sys_cpu_to_le16(BLE_UUID16(uuid)->value);
memcpy(service->uuid, &u16, uuid_length);
} else {
memcpy(service->uuid, BLE_UUID128(uuid)->value,
@@ -1102,7 +1102,7 @@ static int disc_all_desc_cb(uint16_t conn_handle,
struct gatt_disc_all_desc_rp *rp = (void *) gatt_buf.buf;
struct gatt_descriptor *dsc;
const ble_uuid_any_t *uuid;
- u8_t uuid_length;
+ uint8_t uuid_length;
SYS_LOG_DBG("");
@@ -1135,7 +1135,7 @@ static int disc_all_desc_cb(uint16_t conn_handle,
dsc->uuid_length = uuid_length;
if (uuid->u.type == BLE_UUID_TYPE_16) {
- u16_t u16 = sys_cpu_to_le16(BLE_UUID16(uuid)->value);
+ uint16_t u16 = sys_cpu_to_le16(BLE_UUID16(uuid)->value);
memcpy(dsc->uuid, &u16, uuid_length);
} else {
memcpy(dsc->uuid, BLE_UUID128(uuid)->value, uuid_length);
@@ -1146,7 +1146,7 @@ static int disc_all_desc_cb(uint16_t conn_handle,
return 0;
}
-static void disc_all_prim_svcs(u8_t *data, u16_t len)
+static void disc_all_prim_svcs(uint8_t *data, uint16_t len)
{
struct ble_gap_conn_desc conn;
int rc;
@@ -1175,7 +1175,7 @@ fail:
CONTROLLER_INDEX, BTP_STATUS_FAILED);
}
-static void disc_all_desc(u8_t *data, u16_t len)
+static void disc_all_desc(uint8_t *data, uint16_t len)
{
const struct gatt_disc_all_desc_cmd *cmd = (void *) data;
struct ble_gap_conn_desc conn;
@@ -1221,7 +1221,7 @@ static int find_included_cb(uint16_t conn_handle,
struct gatt_included *included;
const ble_uuid_any_t *uuid;
int service_handle = (int) arg;
- u8_t uuid_length;
+ uint8_t uuid_length;
SYS_LOG_DBG("");
@@ -1259,7 +1259,7 @@ static int find_included_cb(uint16_t conn_handle,
included->service.uuid_length = uuid_length;
if (uuid->u.type == BLE_UUID_TYPE_16) {
- u16_t u16 = sys_cpu_to_le16(BLE_UUID16(uuid)->value);
+ uint16_t u16 = sys_cpu_to_le16(BLE_UUID16(uuid)->value);
memcpy(included->service.uuid, &u16, uuid_length);
} else {
memcpy(included->service.uuid, BLE_UUID128(uuid)->value,
@@ -1278,8 +1278,8 @@ static int disc_chrc_cb(uint16_t conn_handle,
struct gatt_disc_chrc_rp *rp = (void *) gatt_buf.buf;
struct gatt_characteristic *chrc;
const ble_uuid_any_t *uuid;
- u8_t btp_opcode = (uint8_t) (int) arg;
- u8_t uuid_length;
+ uint8_t btp_opcode = (uint8_t) (int) arg;
+ uint8_t uuid_length;
SYS_LOG_DBG("");
@@ -1314,7 +1314,7 @@ static int disc_chrc_cb(uint16_t conn_handle,
chrc->uuid_length = uuid_length;
if (uuid->u.type == BLE_UUID_TYPE_16) {
- u16_t u16 = sys_cpu_to_le16(BLE_UUID16(uuid)->value);
+ uint16_t u16 = sys_cpu_to_le16(BLE_UUID16(uuid)->value);
memcpy(chrc->uuid, &u16, uuid_length);
} else {
memcpy(chrc->uuid, BLE_UUID128(uuid)->value,
@@ -1326,7 +1326,7 @@ static int disc_chrc_cb(uint16_t conn_handle,
return 0;
}
-static void disc_chrc_uuid(u8_t *data, u16_t len)
+static void disc_chrc_uuid(uint8_t *data, uint16_t len)
{
const struct gatt_disc_chrc_uuid_cmd *cmd = (void *) data;
struct ble_gap_conn_desc conn;
@@ -1366,7 +1366,7 @@ fail:
BTP_STATUS_FAILED);
}
-static void disc_prim_uuid(u8_t *data, u16_t len)
+static void disc_prim_uuid(uint8_t *data, uint16_t len)
{
const struct gatt_disc_prim_uuid_cmd *cmd = (void *) data;
struct ble_gap_conn_desc conn;
@@ -1402,7 +1402,7 @@ fail:
BTP_STATUS_FAILED);
}
-static void disc_all_chrc(u8_t *data, u16_t len)
+static void disc_all_chrc(uint8_t *data, uint16_t len)
{
const struct gatt_disc_all_chrc_cmd *cmd = (void *) data;
struct ble_gap_conn_desc conn;
@@ -1439,7 +1439,7 @@ fail:
BTP_STATUS_FAILED);
}
-static void find_included(u8_t *data, u16_t len)
+static void find_included(uint8_t *data, uint16_t len)
{
const struct gatt_find_included_cmd *cmd = (void *) data;
struct ble_gap_conn_desc conn;
@@ -1495,7 +1495,7 @@ static int exchange_func(uint16_t conn_handle,
return 0;
}
-static void exchange_mtu(u8_t *data, u16_t len)
+static void exchange_mtu(uint8_t *data, uint16_t len)
{
struct ble_gap_conn_desc conn;
int rc;
@@ -1517,10 +1517,10 @@ fail:
CONTROLLER_INDEX, BTP_STATUS_FAILED);
}
-static int enable_subscription(u16_t conn_handle, u16_t ccc_handle,
- u16_t value)
+static int enable_subscription(uint16_t conn_handle, uint16_t ccc_handle,
+ uint16_t value)
{
- u8_t op;
+ uint8_t op;
SYS_LOG_DBG("");
@@ -1538,9 +1538,9 @@ static int enable_subscription(u16_t conn_handle, u16_t ccc_handle,
return 0;
}
-static int disable_subscription(u16_t conn_handle, u16_t ccc_handle)
+static int disable_subscription(uint16_t conn_handle, uint16_t ccc_handle)
{
- u16_t value = 0x00;
+ uint16_t value = 0x00;
SYS_LOG_DBG("");
@@ -1559,12 +1559,12 @@ static int disable_subscription(u16_t conn_handle, u16_t ccc_handle)
return 0;
}
-static void config_subscription(u8_t *data, u16_t len, u8_t op)
+static void config_subscription(uint8_t *data, uint16_t len, uint8_t op)
{
const struct gatt_cfg_notify_cmd *cmd = (void *) data;
struct ble_gap_conn_desc conn;
- u16_t ccc_handle = sys_le16_to_cpu(cmd->ccc_handle);
- u8_t status;
+ uint16_t ccc_handle = sys_le16_to_cpu(cmd->ccc_handle);
+ uint8_t status;
int rc;
SYS_LOG_DBG("");
@@ -1577,7 +1577,7 @@ static void config_subscription(u8_t *data, u16_t len, u8_t op)
}
if (cmd->enable) {
- u16_t value;
+ uint16_t value;
if (op == GATT_CFG_NOTIFY) {
value = 0x0001;
@@ -1625,10 +1625,10 @@ static int flags_hs2btp_map[] = {
BTP_PERM_F_WRITE_AUTHOR,
};
-static u8_t flags_hs2btp(u8_t flags)
+static uint8_t flags_hs2btp(uint8_t flags)
{
int i;
- u8_t ret = 0;
+ uint8_t ret = 0;
for (i = 0; i < 8; ++i) {
if (flags & BIT(i)) {
@@ -1639,17 +1639,17 @@ static u8_t flags_hs2btp(u8_t flags)
return ret;
}
-static void get_attrs(u8_t *data, u16_t len)
+static void get_attrs(uint8_t *data, uint16_t len)
{
const struct gatt_get_attributes_cmd *cmd = (void *) data;
struct gatt_get_attributes_rp *rp;
struct gatt_attr *gatt_attr;
struct os_mbuf *buf = os_msys_get(0, 0);
- u16_t start_handle, end_handle;
+ uint16_t start_handle, end_handle;
struct ble_att_svr_entry *entry = NULL;
ble_uuid_any_t uuid;
ble_uuid_t *uuid_ptr = NULL;
- u8_t count = 0;
+ uint8_t count = 0;
char str[BLE_UUID_STR_LEN];
SYS_LOG_DBG("");
@@ -1718,13 +1718,13 @@ free:
os_mbuf_free_chain(buf);
}
-static void get_attr_val(u8_t *data, u16_t len)
+static void get_attr_val(uint8_t *data, uint16_t len)
{
const struct gatt_get_attribute_value_cmd *cmd = (void *) data;
struct gatt_get_attribute_value_rp *rp;
struct ble_gap_conn_desc conn;
struct os_mbuf *buf = os_msys_get(0, 0);
- u16_t handle = sys_cpu_to_le16(cmd->handle);
+ uint16_t handle = sys_cpu_to_le16(cmd->handle);
uint8_t out_att_err;
int conn_status;
@@ -1766,7 +1766,7 @@ free:
os_mbuf_free_chain(buf);
}
-static void change_database(u8_t *data, u16_t len)
+static void change_database(uint8_t *data, uint16_t len)
{
const struct gatt_change_database *cmd = (void *) data;
@@ -1782,9 +1782,9 @@ static void change_database(u8_t *data, u16_t len)
return;
}
-static void supported_commands(u8_t *data, u16_t len)
+static void supported_commands(uint8_t *data, uint16_t len)
{
- u8_t cmds[4];
+ uint8_t cmds[4];
struct gatt_read_supported_commands_rp *rp = (void *) cmds;
SYS_LOG_DBG("");
@@ -1816,7 +1816,7 @@ static void supported_commands(u8_t *data, u16_t len)
tester_set_bit(cmds, GATT_CHANGE_DATABASE);
tester_send(BTP_SERVICE_ID_GATT, GATT_READ_SUPPORTED_COMMANDS,
- CONTROLLER_INDEX, (u8_t *) rp, sizeof(cmds));
+ CONTROLLER_INDEX, (uint8_t *) rp, sizeof(cmds));
}
enum attr_type {
@@ -1825,8 +1825,8 @@ enum attr_type {
BLE_GATT_ATTR_DSC,
};
-void tester_handle_gatt(u8_t opcode, u8_t index, u8_t *data,
- u16_t len)
+void tester_handle_gatt(uint8_t opcode, uint8_t index, uint8_t *data,
+ uint16_t len)
{
switch (opcode) {
case GATT_READ_SUPPORTED_COMMANDS:
@@ -1905,8 +1905,8 @@ void tester_handle_gatt(u8_t opcode, u8_t index, u8_t *data,
}
}
-int tester_gatt_notify_rx_ev(u16_t conn_handle, u16_t attr_handle,
- u8_t indication, struct os_mbuf *om)
+int tester_gatt_notify_rx_ev(uint16_t conn_handle, uint16_t attr_handle,
+ uint8_t indication, struct os_mbuf *om)
{
struct gatt_notification_ev *ev;
struct ble_gap_conn_desc conn;
@@ -1930,7 +1930,7 @@ int tester_gatt_notify_rx_ev(u16_t conn_handle, u16_t attr_handle,
ev->address_type = addr->type;
memcpy(ev->address, addr->val, sizeof(ev->address));
- ev->type = (u8_t) (indication ? 0x02 : 0x01);
+ ev->type = (uint8_t) (indication ? 0x02 : 0x01);
ev->handle = sys_cpu_to_le16(attr_handle);
ev->data_length = sys_cpu_to_le16(os_mbuf_len(om));
os_mbuf_appendfrom(buf, om, 0, os_mbuf_len(om));
@@ -1988,9 +1988,9 @@ void notify_test(struct os_event *ev)
}
}
-int tester_gatt_subscribe_ev(u16_t conn_handle, u16_t attr_handle, u8_t reason,
- u8_t prev_notify, u8_t cur_notify,
- u8_t prev_indicate, u8_t cur_indicate)
+int tester_gatt_subscribe_ev(uint16_t conn_handle, uint16_t attr_handle, uint8_t reason,
+ uint8_t prev_notify, uint8_t cur_notify,
+ uint8_t prev_indicate, uint8_t cur_indicate)
{
SYS_LOG_DBG("");
myconn_handle = conn_handle;
@@ -2084,7 +2084,7 @@ int gatt_svr_init(void)
return 0;
}
-u8_t tester_init_gatt(void)
+uint8_t tester_init_gatt(void)
{
os_callout_init(&notify_tx_timer, os_eventq_dflt_get(),
notify_test, NULL);
@@ -2092,7 +2092,7 @@ u8_t tester_init_gatt(void)
return BTP_STATUS_SUCCESS;
}
-u8_t tester_unregister_gatt(void)
+uint8_t tester_unregister_gatt(void)
{
return BTP_STATUS_SUCCESS;
}
diff --git a/src/libs/mynewt-nimble/apps/bttester/src/glue.c b/src/libs/mynewt-nimble/apps/bttester/src/glue.c
index 6cd7643c..3e606062 100644
--- a/src/libs/mynewt-nimble/apps/bttester/src/glue.c
+++ b/src/libs/mynewt-nimble/apps/bttester/src/glue.c
@@ -33,8 +33,8 @@ const char *bt_hex(const void *buf, size_t len)
{
static const char hex[] = "0123456789abcdef";
static char hexbufs[4][137];
- static u8_t curbuf;
- const u8_t *b = buf;
+ static uint8_t curbuf;
+ const uint8_t *b = buf;
char *str;
int i;
diff --git a/src/libs/mynewt-nimble/apps/bttester/src/glue.h b/src/libs/mynewt-nimble/apps/bttester/src/glue.h
index e563331e..65085601 100644
--- a/src/libs/mynewt-nimble/apps/bttester/src/glue.h
+++ b/src/libs/mynewt-nimble/apps/bttester/src/glue.h
@@ -22,11 +22,11 @@
#include "os/endian.h"
-#define u8_t uint8_t
-#define s8_t int8_t
-#define u16_t uint16_t
-#define u32_t uint32_t
-#define s32_t int32_t
+#define uint8_t uint8_t
+#define int8_t int8_t
+#define uint16_t uint16_t
+#define uint32_t uint32_t
+#define int32_t int32_t
#ifndef BIT
#define BIT(n) (1UL << (n))
@@ -37,16 +37,16 @@
#define sys_le16_to_cpu le16toh
struct bt_data {
- u8_t type;
- u8_t data_len;
- const u8_t *data;
+ uint8_t type;
+ uint8_t data_len;
+ const uint8_t *data;
};
#define BT_DATA(_type, _data, _data_len) \
{ \
.type = (_type), \
.data_len = (_data_len), \
- .data = (const u8_t *)(_data), \
+ .data = (const uint8_t *)(_data), \
}
struct os_mbuf * NET_BUF_SIMPLE(uint16_t size);
diff --git a/src/libs/mynewt-nimble/apps/bttester/src/l2cap.c b/src/libs/mynewt-nimble/apps/bttester/src/l2cap.c
index 45b904a1..5c4fc712 100644
--- a/src/libs/mynewt-nimble/apps/bttester/src/l2cap.c
+++ b/src/libs/mynewt-nimble/apps/bttester/src/l2cap.c
@@ -33,11 +33,13 @@
#include "host/ble_gap.h"
#include "host/ble_l2cap.h"
+#include "../../../nimble/host/src/ble_l2cap_priv.h"
+
#include "bttester.h"
#define CONTROLLER_INDEX 0
#define CHANNELS MYNEWT_VAL(BLE_L2CAP_COC_MAX_NUM)
-#define TESTER_COC_MTU (230)
+#define TESTER_COC_MTU MYNEWT_VAL(BTTESTER_L2CAP_COC_MTU)
#define TESTER_COC_BUF_COUNT (3 * MYNEWT_VAL(BLE_L2CAP_COC_MAX_NUM))
static os_membuf_t tester_sdu_coc_mem[
@@ -48,14 +50,34 @@ struct os_mbuf_pool sdu_os_mbuf_pool;
static struct os_mempool sdu_coc_mbuf_mempool;
static struct channel {
- u8_t chan_id; /* Internal number that identifies L2CAP channel. */
- u8_t state;
+ uint8_t chan_id; /* Internal number that identifies L2CAP channel. */
+ uint8_t state;
struct ble_l2cap_chan *chan;
} channels[CHANNELS];
-static u8_t recv_cb_buf[TESTER_COC_MTU + sizeof(struct l2cap_data_received_ev)];
+static uint8_t recv_cb_buf[TESTER_COC_MTU + sizeof(struct l2cap_data_received_ev)];
+
+static struct channel *get_free_channel(void)
+{
+ uint8_t i;
+ struct channel *chan;
-struct channel *find_channel(struct ble_l2cap_chan *chan) {
+ for (i = 0; i < CHANNELS; i++) {
+ if (channels[i].state) {
+ continue;
+ }
+
+ chan = &channels[i];
+ chan->chan_id = i;
+
+ return chan;
+ }
+
+ return NULL;
+}
+
+struct channel *find_channel(struct ble_l2cap_chan *chan)
+{
int i;
for (i = 0; i < CHANNELS; ++i) {
@@ -67,6 +89,15 @@ struct channel *find_channel(struct ble_l2cap_chan *chan) {
return NULL;
}
+struct channel *get_channel(uint8_t chan_id)
+{
+ if (chan_id >= CHANNELS) {
+ return NULL;
+ }
+
+ return &channels[chan_id];
+}
+
static void
tester_l2cap_coc_recv(struct ble_l2cap_chan *chan, struct os_mbuf *sdu)
{
@@ -84,14 +115,20 @@ static void recv_cb(uint16_t conn_handle, struct ble_l2cap_chan *chan,
struct os_mbuf *buf, void *arg)
{
struct l2cap_data_received_ev *ev = (void *) recv_cb_buf;
- struct channel *channel = arg;
+ struct channel *channel = find_channel(chan);
+ assert(channel != NULL);
ev->chan_id = channel->chan_id;
- ev->data_length = buf->om_len;
- memcpy(ev->data, buf->om_data, buf->om_len);
+ ev->data_length = OS_MBUF_PKTLEN(buf);
+
+ if (ev->data_length > TESTER_COC_MTU) {
+ SYS_LOG_ERR("Too large sdu received, truncating data");
+ ev->data_length = TESTER_COC_MTU;
+ }
+ os_mbuf_copydata(buf, 0, ev->data_length, ev->data);
tester_send(BTP_SERVICE_ID_L2CAP, L2CAP_EV_DATA_RECEIVED,
- CONTROLLER_INDEX, recv_cb_buf, sizeof(*ev) + buf->om_len);
+ CONTROLLER_INDEX, recv_cb_buf, sizeof(*ev) + ev->data_length);
tester_l2cap_coc_recv(chan, buf);
}
@@ -108,44 +145,49 @@ static void unstalled_cb(uint16_t conn_handle, struct ble_l2cap_chan *chan,
}
}
-static struct channel *get_free_channel(void)
+static void reconfigured_ev(uint16_t conn_handle, struct ble_l2cap_chan *chan,
+ struct ble_l2cap_chan_info *chan_info,
+ int status)
{
- u8_t i;
- struct channel *chan;
+ struct l2cap_reconfigured_ev ev;
+ struct channel *channel;
- for (i = 0; i < CHANNELS; i++) {
- if (channels[i].state) {
- continue;
- }
+ if (status != 0) {
+ return;
+ }
- chan = &channels[i];
- chan->chan_id = i;
+ channel = find_channel(chan);
+ assert(channel != NULL);
- return chan;
- }
+ ev.chan_id = channel->chan_id;
+ ev.peer_mtu = chan_info->peer_coc_mtu;
+ ev.peer_mps = chan_info->peer_l2cap_mtu;
+ ev.our_mtu = chan_info->our_coc_mtu;
+ ev.our_mps = chan_info->our_l2cap_mtu;
- return NULL;
+ tester_send(BTP_SERVICE_ID_L2CAP, L2CAP_EV_RECONFIGURED,
+ CONTROLLER_INDEX, (uint8_t *) &ev, sizeof(ev));
}
static void connected_cb(uint16_t conn_handle, struct ble_l2cap_chan *chan,
- void *arg)
+ struct ble_l2cap_chan_info *chan_info, void *arg)
{
struct l2cap_connected_ev ev;
struct ble_gap_conn_desc desc;
- struct channel *channel;
+ struct channel *channel = find_channel(chan);
- channel = get_free_channel();
- if (!channel) {
- assert(0);
+ if (channel == NULL) {
+ channel = get_free_channel();
}
- channel->chan = chan;
- channel->state = 0;
-
ev.chan_id = channel->chan_id;
+ ev.psm = chan_info->psm;
+ ev.peer_mtu = chan_info->peer_coc_mtu;
+ ev.peer_mps = chan_info->peer_l2cap_mtu;
+ ev.our_mtu = chan_info->our_coc_mtu;
+ ev.our_mps = chan_info->our_l2cap_mtu;
channel->state = 1;
channel->chan = chan;
- /* TODO: ev.psm */
if (!ble_gap_conn_find(conn_handle, &desc)) {
ev.address_type = desc.peer_ota_addr.type;
@@ -154,11 +196,11 @@ static void connected_cb(uint16_t conn_handle, struct ble_l2cap_chan *chan,
}
tester_send(BTP_SERVICE_ID_L2CAP, L2CAP_EV_CONNECTED, CONTROLLER_INDEX,
- (u8_t *) &ev, sizeof(ev));
+ (uint8_t *) &ev, sizeof(ev));
}
static void disconnected_cb(uint16_t conn_handle, struct ble_l2cap_chan *chan,
- void *arg)
+ struct ble_l2cap_chan_info *chan_info, void *arg)
{
struct l2cap_disconnected_ev ev;
struct ble_gap_conn_desc desc;
@@ -167,14 +209,12 @@ static void disconnected_cb(uint16_t conn_handle, struct ble_l2cap_chan *chan,
memset(&ev, 0, sizeof(struct l2cap_disconnected_ev));
channel = find_channel(chan);
- if (channel != NULL) {
- channel->state = 0;
- channel->chan = chan;
+ assert(channel != NULL);
- ev.chan_id = channel->chan_id;
- /* TODO: ev.result */
- /* TODO: ev.psm */
- }
+ channel->state = 0;
+ channel->chan = chan;
+ ev.chan_id = channel->chan_id;
+ ev.psm = chan_info->psm;
if (!ble_gap_conn_find(conn_handle, &desc)) {
ev.address_type = desc.peer_ota_addr.type;
@@ -183,7 +223,7 @@ static void disconnected_cb(uint16_t conn_handle, struct ble_l2cap_chan *chan,
}
tester_send(BTP_SERVICE_ID_L2CAP, L2CAP_EV_DISCONNECTED,
- CONTROLLER_INDEX, (u8_t *) &ev, sizeof(ev));
+ CONTROLLER_INDEX, (uint8_t *) &ev, sizeof(ev));
}
static int accept_cb(uint16_t conn_handle, uint16_t peer_mtu,
@@ -208,39 +248,51 @@ static int
tester_l2cap_event(struct ble_l2cap_event *event, void *arg)
{
struct ble_l2cap_chan_info chan_info;
+ int accept_response;
switch (event->type) {
- case BLE_L2CAP_EVENT_COC_CONNECTED:
+ case BLE_L2CAP_EVENT_COC_CONNECTED:
+ if (ble_l2cap_get_chan_info(event->connect.chan, &chan_info)) {
+ assert(0);
+ }
+
if (event->connect.status) {
console_printf("LE COC error: %d\n", event->connect.status);
disconnected_cb(event->connect.conn_handle,
- event->connect.chan, arg);
+ event->connect.chan, &chan_info, arg);
return 0;
}
- ble_l2cap_get_chan_info(event->connect.chan, &chan_info);
-
- console_printf("LE COC connected, conn: %d, chan: 0x%08lx, scid: 0x%04x, "
- "dcid: 0x%04x, our_mtu: 0x%04x, peer_mtu: 0x%04x\n",
- event->connect.conn_handle,
- (uint32_t) event->connect.chan,
- chan_info.scid,
- chan_info.dcid,
- chan_info.our_l2cap_mtu,
- chan_info.peer_l2cap_mtu);
+ console_printf("LE COC connected, conn: %d, chan: 0x%08lx, "
+ "psm: 0x%02x, scid: 0x%04x, dcid: 0x%04x, "
+ "our_mps: %d, our_mtu: %d, peer_mps: %d, "
+ "peer_mtu: %d\n", event->connect.conn_handle,
+ (uint32_t) event->connect.chan, chan_info.psm,
+ chan_info.scid, chan_info.dcid,
+ chan_info.our_l2cap_mtu, chan_info.our_coc_mtu,
+ chan_info.peer_l2cap_mtu, chan_info.peer_coc_mtu);
connected_cb(event->connect.conn_handle,
- event->connect.chan, arg);
+ event->connect.chan, &chan_info, arg);
return 0;
case BLE_L2CAP_EVENT_COC_DISCONNECTED:
+ if (ble_l2cap_get_chan_info(event->disconnect.chan,
+ &chan_info)) {
+ assert(0);
+ }
console_printf("LE CoC disconnected, chan: 0x%08lx\n",
(uint32_t) event->disconnect.chan);
disconnected_cb(event->disconnect.conn_handle,
- event->disconnect.chan, arg);
+ event->disconnect.chan, &chan_info, arg);
return 0;
case BLE_L2CAP_EVENT_COC_ACCEPT:
+ accept_response = POINTER_TO_INT(arg);
+ if (accept_response) {
+ return accept_response;
+ }
+
console_printf("LE CoC accept, chan: 0x%08lx, handle: %u, sdu_size: %u\n",
(uint32_t) event->accept.chan,
event->accept.conn_handle,
@@ -254,7 +306,8 @@ tester_l2cap_event(struct ble_l2cap_event *event, void *arg)
console_printf("LE CoC data received, chan: 0x%08lx, handle: %u, sdu_len: %u\n",
(uint32_t) event->receive.chan,
event->receive.conn_handle,
- event->receive.sdu_rx->om_len);
+ OS_MBUF_PKTLEN(event->receive.sdu_rx));
+
recv_cb(event->receive.conn_handle, event->receive.chan,
event->receive.sdu_rx, arg);
return 0;
@@ -263,57 +316,118 @@ tester_l2cap_event(struct ble_l2cap_event *event, void *arg)
(uint32_t) event->tx_unstalled.chan,
event->tx_unstalled.conn_handle,
event->tx_unstalled.status);
+
unstalled_cb(event->tx_unstalled.conn_handle,
event->tx_unstalled.chan,
event->tx_unstalled.status, arg);
return 0;
+ case BLE_L2CAP_EVENT_COC_RECONFIG_COMPLETED:
+ if (ble_l2cap_get_chan_info(event->reconfigured.chan,
+ &chan_info)) {
+ assert(0);
+ }
+ console_printf("LE CoC reconfigure completed status 0x%02x, "
+ "chan: 0x%08lx\n", event->reconfigured.status,
+ (uint32_t) event->reconfigured.chan);
+
+ if (event->reconfigured.status == 0) {
+ console_printf("\t our_mps: %d our_mtu %d\n",
+ chan_info.our_l2cap_mtu, chan_info.our_coc_mtu);
+ }
+
+ reconfigured_ev(event->reconfigured.conn_handle,
+ event->reconfigured.chan,
+ &chan_info,
+ event->reconfigured.status);
+ return 0;
+ case BLE_L2CAP_EVENT_COC_PEER_RECONFIGURED:
+ if (ble_l2cap_get_chan_info(event->reconfigured.chan,
+ &chan_info)) {
+ assert(0);
+ }
+ console_printf("LE CoC peer reconfigured status 0x%02x, "
+ "chan: 0x%08lx\n", event->reconfigured.status,
+ (uint32_t) event->reconfigured.chan);
+
+ if (event->reconfigured.status == 0) {
+ console_printf("\t peer_mps: %d peer_mtu %d\n",
+ chan_info.peer_l2cap_mtu, chan_info.peer_coc_mtu);
+ }
+
+ reconfigured_ev(event->reconfigured.conn_handle,
+ event->reconfigured.chan,
+ &chan_info,
+ event->reconfigured.status);
+ return 0;
default:
return 0;
}
}
-static void connect(u8_t *data, u16_t len)
+static void connect(uint8_t *data, uint16_t len)
{
const struct l2cap_connect_cmd *cmd = (void *) data;
- struct l2cap_connect_rp rp;
+ uint8_t rp_buf[sizeof(struct l2cap_connect_rp) + cmd->num];
+ struct l2cap_connect_rp *rp = (void *) rp_buf;
struct ble_gap_conn_desc desc;
struct channel *chan;
- struct os_mbuf *sdu_rx;
+ struct os_mbuf *sdu_rx[cmd->num];
ble_addr_t *addr = (void *) data;
+ uint16_t mtu = htole16(cmd->mtu);
int rc;
+ int i;
SYS_LOG_DBG("connect: type: %d addr: %s", addr->type, bt_hex(addr->val, 6));
+ if (mtu == 0 || mtu > TESTER_COC_MTU) {
+ mtu = TESTER_COC_MTU;
+ }
+
rc = ble_gap_conn_find_by_addr(addr, &desc);
if (rc) {
SYS_LOG_ERR("GAP conn find failed");
goto fail;
}
- chan = get_free_channel();
- if (!chan) {
- SYS_LOG_ERR("No free channels");
- goto fail;
+ rp->num = cmd->num;
+
+ for (i = 0; i < cmd->num; i++) {
+ chan = get_free_channel();
+ if (!chan) {
+ SYS_LOG_ERR("No free channels");
+ goto fail;
+ }
+
+ rp->chan_ids[i] = chan->chan_id;
+
+ sdu_rx[i] = os_mbuf_get_pkthdr(&sdu_os_mbuf_pool, 0);
+ if (sdu_rx[i] == NULL) {
+ SYS_LOG_ERR("Failed to alloc buf");
+ goto fail;
+ }
}
- sdu_rx = os_mbuf_get_pkthdr(&sdu_os_mbuf_pool, 0);
- if (sdu_rx == NULL) {
- SYS_LOG_ERR("Failed to alloc buf");
+ if (cmd->num == 1) {
+ rc = ble_l2cap_connect(desc.conn_handle, htole16(cmd->psm),
+ mtu, sdu_rx[0],
+ tester_l2cap_event, NULL);
+ } else if (cmd->num > 1) {
+ rc = ble_l2cap_enhanced_connect(desc.conn_handle,
+ htole16(cmd->psm), mtu,
+ cmd->num, sdu_rx,
+ tester_l2cap_event, NULL);
+ } else {
+ SYS_LOG_ERR("Invalid 'num' parameter value");
goto fail;
}
- rc = ble_l2cap_connect(desc.conn_handle, htole16(cmd->psm),
- TESTER_COC_MTU, sdu_rx,
- tester_l2cap_event, chan);
if (rc) {
SYS_LOG_ERR("L2CAP connect failed\n");
goto fail;
}
- rp.chan_id = chan->chan_id;
-
tester_send(BTP_SERVICE_ID_L2CAP, L2CAP_CONNECT, CONTROLLER_INDEX,
- (u8_t *) &rp, sizeof(rp));
+ (uint8_t *) rp, sizeof(rp_buf));
return;
@@ -322,16 +436,17 @@ fail:
BTP_STATUS_FAILED);
}
-static void disconnect(u8_t *data, u16_t len)
+static void disconnect(const uint8_t *data, uint16_t len)
{
const struct l2cap_disconnect_cmd *cmd = (void *) data;
struct channel *chan;
- u8_t status;
+ uint8_t status;
int err;
SYS_LOG_DBG("");
- chan = &channels[cmd->chan_id];
+ chan = get_channel(cmd->chan_id);
+ assert(chan != NULL);
err = ble_l2cap_disconnect(chan->chan);
if (err) {
@@ -346,16 +461,21 @@ rsp:
status);
}
-static void send_data(u8_t *data, u16_t len)
+static void send_data(const uint8_t *data, uint16_t len)
{
const struct l2cap_send_data_cmd *cmd = (void *) data;
- struct channel *chan = &channels[cmd->chan_id];
struct os_mbuf *sdu_tx = NULL;
int rc;
- u16_t data_len = sys_le16_to_cpu(cmd->data_len);
+ uint16_t data_len = sys_le16_to_cpu(cmd->data_len);
+ struct channel *chan = get_channel(cmd->chan_id);
SYS_LOG_DBG("cmd->chan_id=%d", cmd->chan_id);
+ if (!chan) {
+ SYS_LOG_ERR("Invalid channel\n");
+ goto fail;
+ }
+
/* FIXME: For now, fail if data length exceeds buffer length */
if (data_len > TESTER_COC_MTU) {
SYS_LOG_ERR("Data length exceeds buffer length");
@@ -386,16 +506,48 @@ fail:
BTP_STATUS_FAILED);
}
-static void listen(u8_t *data, u16_t len)
+static int
+l2cap_coc_err2hs_err(uint16_t coc_err)
+{
+ switch (coc_err) {
+ case BLE_L2CAP_COC_ERR_UNKNOWN_LE_PSM:
+ return BLE_HS_ENOTSUP;
+ case BLE_L2CAP_COC_ERR_NO_RESOURCES:
+ return BLE_HS_ENOMEM;
+ case BLE_L2CAP_COC_ERR_INSUFFICIENT_AUTHEN:
+ return BLE_HS_EAUTHEN;
+ case BLE_L2CAP_COC_ERR_INSUFFICIENT_AUTHOR:
+ return BLE_HS_EAUTHOR;
+ case BLE_L2CAP_COC_ERR_INSUFFICIENT_ENC:
+ return BLE_HS_EENCRYPT;
+ case BLE_L2CAP_COC_ERR_INSUFFICIENT_KEY_SZ:
+ return BLE_HS_EENCRYPT_KEY_SZ;
+ case BLE_L2CAP_COC_ERR_UNACCEPTABLE_PARAMETERS:
+ return BLE_HS_EINVAL;
+ default:
+ return 0;
+ }
+}
+
+
+static void listen(const uint8_t *data, uint16_t len)
{
const struct l2cap_listen_cmd *cmd = (void *) data;
+ uint16_t mtu = htole16(cmd->mtu);
+ uint16_t rsp = htole16(cmd->response);
int rc;
SYS_LOG_DBG("");
+ if (mtu == 0 || mtu > TESTER_COC_MTU) {
+ mtu = TESTER_COC_MTU;
+ }
+
+ rsp = l2cap_coc_err2hs_err(rsp);
+
/* TODO: Handle cmd->transport flag */
- rc = ble_l2cap_create_server(cmd->psm, TESTER_COC_MTU,
- tester_l2cap_event, NULL);
+ rc = ble_l2cap_create_server(cmd->psm, mtu, tester_l2cap_event,
+ INT_TO_POINTER(rsp));
if (rc) {
goto fail;
}
@@ -409,9 +561,54 @@ fail:
BTP_STATUS_FAILED);
}
-static void supported_commands(u8_t *data, u16_t len)
+static void reconfigure(const uint8_t *data, uint16_t len)
{
- u8_t cmds[1];
+ const struct l2cap_reconfigure_cmd *cmd = (void *) data;
+ uint16_t mtu = htole16(cmd->mtu);
+ struct ble_gap_conn_desc desc;
+ ble_addr_t *addr = (void *) data;
+ struct ble_l2cap_chan *chans[cmd->num];
+ struct channel *channel;
+ int rc;
+ int i;
+
+ SYS_LOG_DBG("");
+
+ if (mtu == 0 || mtu > TESTER_COC_MTU) {
+ mtu = TESTER_COC_MTU;
+ }
+
+ rc = ble_gap_conn_find_by_addr(addr, &desc);
+ if (rc) {
+ SYS_LOG_ERR("GAP conn find failed");
+ goto fail;
+ }
+
+ for (i = 0; i < cmd->num; ++i) {
+ channel = get_channel(cmd->idxs[i]);
+ if (channel == NULL) {
+ goto fail;
+ }
+ chans[i] = channel->chan;
+ }
+
+ rc = ble_l2cap_reconfig(chans, cmd->num, mtu);
+ if (rc) {
+ goto fail;
+ }
+
+ tester_rsp(BTP_SERVICE_ID_L2CAP, L2CAP_RECONFIGURE, CONTROLLER_INDEX,
+ BTP_STATUS_SUCCESS);
+ return;
+
+fail:
+ tester_rsp(BTP_SERVICE_ID_L2CAP, L2CAP_RECONFIGURE, CONTROLLER_INDEX,
+ BTP_STATUS_FAILED);
+}
+
+static void supported_commands(uint8_t *data, uint16_t len)
+{
+ uint8_t cmds[1];
struct l2cap_read_supported_commands_rp *rp = (void *) cmds;
memset(cmds, 0, sizeof(cmds));
@@ -421,13 +618,14 @@ static void supported_commands(u8_t *data, u16_t len)
tester_set_bit(cmds, L2CAP_DISCONNECT);
tester_set_bit(cmds, L2CAP_LISTEN);
tester_set_bit(cmds, L2CAP_SEND_DATA);
+ tester_set_bit(cmds, L2CAP_RECONFIGURE);
tester_send(BTP_SERVICE_ID_L2CAP, L2CAP_READ_SUPPORTED_COMMANDS,
- CONTROLLER_INDEX, (u8_t *) rp, sizeof(cmds));
+ CONTROLLER_INDEX, (uint8_t *) rp, sizeof(cmds));
}
-void tester_handle_l2cap(u8_t opcode, u8_t index, u8_t *data,
- u16_t len)
+void tester_handle_l2cap(uint8_t opcode, uint8_t index, uint8_t *data,
+ uint16_t len)
{
switch (opcode) {
case L2CAP_READ_SUPPORTED_COMMANDS:
@@ -445,6 +643,9 @@ void tester_handle_l2cap(u8_t opcode, u8_t index, u8_t *data,
case L2CAP_LISTEN:
listen(data, len);
return;
+ case L2CAP_RECONFIGURE:
+ reconfigure(data, len);
+ return;
default:
tester_rsp(BTP_SERVICE_ID_L2CAP, opcode, index,
BTP_STATUS_UNKNOWN_CMD);
@@ -452,7 +653,7 @@ void tester_handle_l2cap(u8_t opcode, u8_t index, u8_t *data,
}
}
-u8_t tester_init_l2cap(void)
+uint8_t tester_init_l2cap(void)
{
int rc;
@@ -469,7 +670,7 @@ u8_t tester_init_l2cap(void)
return BTP_STATUS_SUCCESS;
}
-u8_t tester_unregister_l2cap(void)
+uint8_t tester_unregister_l2cap(void)
{
return BTP_STATUS_SUCCESS;
}
diff --git a/src/libs/mynewt-nimble/apps/bttester/src/mesh.c b/src/libs/mynewt-nimble/apps/bttester/src/mesh.c
index e18a2a4e..8226fe99 100644
--- a/src/libs/mynewt-nimble/apps/bttester/src/mesh.c
+++ b/src/libs/mynewt-nimble/apps/bttester/src/mesh.c
@@ -38,7 +38,7 @@
#include "bttester.h"
-extern u8_t own_addr_type;
+extern uint8_t own_addr_type;
#define CONTROLLER_INDEX 0
#define CID_LOCAL 0xffff
@@ -47,21 +47,21 @@ extern u8_t own_addr_type;
#define CUR_FAULTS_MAX 4
#define HEALTH_TEST_ID 0x00
-static u8_t cur_faults[CUR_FAULTS_MAX];
-static u8_t reg_faults[CUR_FAULTS_MAX * 2];
+static uint8_t cur_faults[CUR_FAULTS_MAX];
+static uint8_t reg_faults[CUR_FAULTS_MAX * 2];
/* Provision node data */
-static u8_t net_key[16];
-static u16_t net_key_idx;
-static u8_t flags;
-static u32_t iv_index;
-static u16_t addr;
-static u8_t dev_key[16];
-static u8_t input_size;
+static uint8_t net_key[16];
+static uint16_t net_key_idx;
+static uint8_t flags;
+static uint32_t iv_index;
+static uint16_t addr;
+static uint8_t dev_key[16];
+static uint8_t input_size;
/* Configured provisioning data */
-static u8_t dev_uuid[16];
-static u8_t static_auth[16];
+static uint8_t dev_uuid[16];
+static uint8_t static_auth[16];
/* Vendor Model data */
#define VND_MODEL_ID_1 0x1234
@@ -71,20 +71,20 @@ static u8_t static_auth[16];
static struct model_data {
struct bt_mesh_model *model;
- u16_t addr;
- u16_t appkey_idx;
+ uint16_t addr;
+ uint16_t appkey_idx;
} model_bound[MODEL_BOUNDS_MAX];
static struct {
- u16_t local;
- u16_t dst;
- u16_t net_idx;
+ uint16_t local;
+ uint16_t dst;
+ uint16_t net_idx;
} net = {
.local = BT_MESH_ADDR_UNASSIGNED,
.dst = BT_MESH_ADDR_UNASSIGNED,
};
-static void supported_commands(u8_t *data, u16_t len)
+static void supported_commands(uint8_t *data, uint16_t len)
{
struct os_mbuf *buf = NET_BUF_SIMPLE(BTP_DATA_MAX_SIZE);
@@ -121,29 +121,9 @@ static void supported_commands(u8_t *data, u16_t len)
CONTROLLER_INDEX, buf);
}
-static struct bt_mesh_cfg_srv cfg_srv = {
- .relay = BT_MESH_RELAY_ENABLED,
- .beacon = BT_MESH_BEACON_ENABLED,
-#if MYNEWT_VAL(BLE_MESH_FRIEND)
- .frnd = BT_MESH_FRIEND_ENABLED,
-#else
- .frnd = BT_MESH_FRIEND_NOT_SUPPORTED,
-#endif
-#if MYNEWT_VAL(BLE_MESH_GATT_PROXY)
- .gatt_proxy = BT_MESH_GATT_PROXY_ENABLED,
-#else
- .gatt_proxy = BT_MESH_GATT_PROXY_NOT_SUPPORTED,
-#endif
- .default_ttl = 7,
-
- /* 3 transmissions with 20ms interval */
- .net_transmit = BT_MESH_TRANSMIT(2, 20),
- .relay_retransmit = BT_MESH_TRANSMIT(2, 20),
-};
-
-static void get_faults(u8_t *faults, u8_t faults_size, u8_t *dst, u8_t *count)
+static void get_faults(uint8_t *faults, uint8_t faults_size, uint8_t *dst, uint8_t *count)
{
- u8_t i, limit = *count;
+ uint8_t i, limit = *count;
for (i = 0, *count = 0; i < faults_size && *count < limit; i++) {
if (faults[i]) {
@@ -153,8 +133,8 @@ static void get_faults(u8_t *faults, u8_t faults_size, u8_t *dst, u8_t *count)
}
}
-static int fault_get_cur(struct bt_mesh_model *model, u8_t *test_id,
- u16_t *company_id, u8_t *faults, u8_t *fault_count)
+static int fault_get_cur(struct bt_mesh_model *model, uint8_t *test_id,
+ uint16_t *company_id, uint8_t *faults, uint8_t *fault_count)
{
SYS_LOG_DBG("");
@@ -166,8 +146,8 @@ static int fault_get_cur(struct bt_mesh_model *model, u8_t *test_id,
return 0;
}
-static int fault_get_reg(struct bt_mesh_model *model, u16_t company_id,
- u8_t *test_id, u8_t *faults, u8_t *fault_count)
+static int fault_get_reg(struct bt_mesh_model *model, uint16_t company_id,
+ uint8_t *test_id, uint8_t *faults, uint8_t *fault_count)
{
SYS_LOG_DBG("company_id 0x%04x", company_id);
@@ -229,7 +209,7 @@ health_pub_init(void)
static struct bt_mesh_cfg_cli cfg_cli = {
};
-void show_faults(u8_t test_id, u16_t cid, u8_t *faults, size_t fault_count)
+void show_faults(uint8_t test_id, uint16_t cid, uint8_t *faults, size_t fault_count)
{
size_t i;
@@ -247,8 +227,8 @@ void show_faults(u8_t test_id, u16_t cid, u8_t *faults, size_t fault_count)
}
}
-static void health_current_status(struct bt_mesh_health_cli *cli, u16_t addr,
- u8_t test_id, u16_t cid, u8_t *faults,
+static void health_current_status(struct bt_mesh_health_cli *cli, uint16_t addr,
+ uint8_t test_id, uint16_t cid, uint8_t *faults,
size_t fault_count)
{
SYS_LOG_DBG("Health Current Status from 0x%04x", addr);
@@ -260,7 +240,7 @@ static struct bt_mesh_health_cli health_cli = {
};
static struct bt_mesh_model root_models[] = {
- BT_MESH_MODEL_CFG_SRV(&cfg_srv),
+ BT_MESH_MODEL_CFG_SRV,
BT_MESH_MODEL_CFG_CLI(&cfg_cli),
BT_MESH_MODEL_HEALTH_SRV(&health_srv, &health_pub),
BT_MESH_MODEL_HEALTH_CLI(&health_cli),
@@ -295,7 +275,7 @@ static void link_open(bt_mesh_prov_bearer_t bearer)
}
tester_send(BTP_SERVICE_ID_MESH, MESH_EV_PROV_LINK_OPEN,
- CONTROLLER_INDEX, (u8_t *) &ev, sizeof(ev));
+ CONTROLLER_INDEX, (uint8_t *) &ev, sizeof(ev));
}
static void link_close(bt_mesh_prov_bearer_t bearer)
@@ -318,10 +298,10 @@ static void link_close(bt_mesh_prov_bearer_t bearer)
}
tester_send(BTP_SERVICE_ID_MESH, MESH_EV_PROV_LINK_CLOSED,
- CONTROLLER_INDEX, (u8_t *) &ev, sizeof(ev));
+ CONTROLLER_INDEX, (uint8_t *) &ev, sizeof(ev));
}
-static int output_number(bt_mesh_output_action_t action, u32_t number)
+static int output_number(bt_mesh_output_action_t action, uint32_t number)
{
struct mesh_out_number_action_ev ev;
@@ -331,7 +311,7 @@ static int output_number(bt_mesh_output_action_t action, u32_t number)
ev.number = sys_cpu_to_le32(number);
tester_send(BTP_SERVICE_ID_MESH, MESH_EV_OUT_NUMBER_ACTION,
- CONTROLLER_INDEX, (u8_t *) &ev, sizeof(ev));
+ CONTROLLER_INDEX, (uint8_t *) &ev, sizeof(ev));
return 0;
}
@@ -357,7 +337,7 @@ static int output_string(const char *str)
return 0;
}
-static int input(bt_mesh_input_action_t action, u8_t size)
+static int input(bt_mesh_input_action_t action, uint8_t size)
{
struct mesh_in_action_ev ev;
@@ -369,12 +349,15 @@ static int input(bt_mesh_input_action_t action, u8_t size)
ev.size = size;
tester_send(BTP_SERVICE_ID_MESH, MESH_EV_IN_ACTION, CONTROLLER_INDEX,
- (u8_t *) &ev, sizeof(ev));
+ (uint8_t *) &ev, sizeof(ev));
return 0;
}
-static void prov_complete(u16_t net_idx, u16_t addr)
+static uint8_t vnd_app_key[16];
+static uint16_t vnd_app_key_idx = 0x000f;
+
+static void prov_complete(uint16_t net_idx, uint16_t addr)
{
SYS_LOG_DBG("net_idx 0x%04x addr 0x%04x", net_idx, addr);
@@ -412,7 +395,7 @@ static struct bt_mesh_prov prov = {
.reset = prov_reset,
};
-static void config_prov(u8_t *data, u16_t len)
+static void config_prov(uint8_t *data, uint16_t len)
{
const struct mesh_config_provisioning_cmd *cmd = (void *) data;
@@ -430,7 +413,7 @@ static void config_prov(u8_t *data, u16_t len)
CONTROLLER_INDEX, BTP_STATUS_SUCCESS);
}
-static void provision_node(u8_t *data, u16_t len)
+static void provision_node(uint8_t *data, uint16_t len)
{
const struct mesh_provision_node_cmd *cmd = (void *) data;
@@ -448,9 +431,9 @@ static void provision_node(u8_t *data, u16_t len)
CONTROLLER_INDEX, BTP_STATUS_SUCCESS);
}
-static void init(u8_t *data, u16_t len)
+static void init(uint8_t *data, uint16_t len)
{
- u8_t status = BTP_STATUS_SUCCESS;
+ uint8_t status = BTP_STATUS_SUCCESS;
int err;
SYS_LOG_DBG("");
@@ -475,15 +458,12 @@ static void init(u8_t *data, u16_t len)
}
}
- /* Set device key for vendor model */
- vnd_models[0].keys[0] = BT_MESH_KEY_DEV;
-
rsp:
tester_rsp(BTP_SERVICE_ID_MESH, MESH_INIT, CONTROLLER_INDEX,
status);
}
-static void reset(u8_t *data, u16_t len)
+static void reset(uint8_t *data, uint16_t len)
{
SYS_LOG_DBG("");
@@ -493,11 +473,11 @@ static void reset(u8_t *data, u16_t len)
BTP_STATUS_SUCCESS);
}
-static void input_number(u8_t *data, u16_t len)
+static void input_number(uint8_t *data, uint16_t len)
{
const struct mesh_input_number_cmd *cmd = (void *) data;
- u8_t status = BTP_STATUS_SUCCESS;
- u32_t number;
+ uint8_t status = BTP_STATUS_SUCCESS;
+ uint32_t number;
int err;
number = sys_le32_to_cpu(cmd->number);
@@ -513,11 +493,11 @@ static void input_number(u8_t *data, u16_t len)
status);
}
-static void input_string(u8_t *data, u16_t len)
+static void input_string(uint8_t *data, uint16_t len)
{
const struct mesh_input_string_cmd *cmd = (void *) data;
- u8_t status = BTP_STATUS_SUCCESS;
- u8_t str_auth[16];
+ uint8_t status = BTP_STATUS_SUCCESS;
+ uint8_t str_auth[16];
int err;
SYS_LOG_DBG("");
@@ -544,7 +524,7 @@ rsp:
status);
}
-static void ivu_test_mode(u8_t *data, u16_t len)
+static void ivu_test_mode(uint8_t *data, uint16_t len)
{
const struct mesh_ivu_test_mode_cmd *cmd = (void *) data;
@@ -556,7 +536,7 @@ static void ivu_test_mode(u8_t *data, u16_t len)
BTP_STATUS_SUCCESS);
}
-static void ivu_toggle_state(u8_t *data, u16_t len)
+static void ivu_toggle_state(uint8_t *data, uint16_t len)
{
bool result;
@@ -571,7 +551,7 @@ static void ivu_toggle_state(u8_t *data, u16_t len)
result ? BTP_STATUS_SUCCESS : BTP_STATUS_FAILED);
}
-static void lpn(u8_t *data, u16_t len)
+static void lpn(uint8_t *data, uint16_t len)
{
struct mesh_lpn_set_cmd *cmd = (void *) data;
bool enable;
@@ -589,7 +569,7 @@ static void lpn(u8_t *data, u16_t len)
err ? BTP_STATUS_FAILED : BTP_STATUS_SUCCESS);
}
-static void lpn_poll(u8_t *data, u16_t len)
+static void lpn_poll(uint8_t *data, uint16_t len)
{
int err;
@@ -604,13 +584,13 @@ static void lpn_poll(u8_t *data, u16_t len)
err ? BTP_STATUS_FAILED : BTP_STATUS_SUCCESS);
}
-static void net_send(u8_t *data, u16_t len)
+static void net_send(uint8_t *data, uint16_t len)
{
struct mesh_net_send_cmd *cmd = (void *) data;
- struct os_mbuf *msg = NET_BUF_SIMPLE(UINT8_MAX);
+ struct os_mbuf *msg = NET_BUF_SIMPLE(UINT8_MAX);
struct bt_mesh_msg_ctx ctx = {
.net_idx = net.net_idx,
- .app_idx = BT_MESH_KEY_DEV,
+ .app_idx = vnd_app_key_idx,
.addr = sys_le16_to_cpu(cmd->dst),
.send_ttl = cmd->ttl,
};
@@ -619,6 +599,12 @@ static void net_send(u8_t *data, u16_t len)
SYS_LOG_DBG("ttl 0x%02x dst 0x%04x payload_len %d", ctx.send_ttl,
ctx.addr, cmd->payload_len);
+ if (!bt_mesh_app_key_get(vnd_app_key_idx)) {
+ (void)bt_mesh_app_key_add(vnd_app_key_idx, net.net_idx,
+ vnd_app_key);
+ vnd_models[0].keys[0] = vnd_app_key_idx;
+ }
+
net_buf_simple_add_mem(msg, cmd->payload, cmd->payload_len);
err = bt_mesh_model_send(&vnd_models[0], &ctx, msg, NULL, NULL);
@@ -632,13 +618,13 @@ static void net_send(u8_t *data, u16_t len)
os_mbuf_free_chain(msg);
}
-static void health_generate_faults(u8_t *data, u16_t len)
+static void health_generate_faults(uint8_t *data, uint16_t len)
{
struct mesh_health_generate_faults_rp *rp;
struct os_mbuf *buf = NET_BUF_SIMPLE(sizeof(*rp) + sizeof(cur_faults) +
sizeof(reg_faults));
- u8_t some_faults[] = { 0x01, 0x02, 0x03, 0xff, 0x06 };
- u8_t cur_faults_count, reg_faults_count;
+ uint8_t some_faults[] = { 0x01, 0x02, 0x03, 0xff, 0x06 };
+ uint8_t cur_faults_count, reg_faults_count;
rp = net_buf_simple_add(buf, sizeof(*rp));
@@ -658,7 +644,7 @@ static void health_generate_faults(u8_t *data, u16_t len)
CONTROLLER_INDEX, buf);
}
-static void health_clear_faults(u8_t *data, u16_t len)
+static void health_clear_faults(uint8_t *data, uint16_t len)
{
SYS_LOG_DBG("");
@@ -671,7 +657,7 @@ static void health_clear_faults(u8_t *data, u16_t len)
CONTROLLER_INDEX, BTP_STATUS_SUCCESS);
}
-static void model_send(u8_t *data, u16_t len)
+static void model_send(uint8_t *data, uint16_t len)
{
struct mesh_model_send_cmd *cmd = (void *) data;
struct os_mbuf *msg = NET_BUF_SIMPLE(UINT8_MAX);
@@ -683,7 +669,7 @@ static void model_send(u8_t *data, u16_t len)
};
struct bt_mesh_model *model = NULL;
int err, i;
- u16_t src = sys_le16_to_cpu(cmd->src);
+ uint16_t src = sys_le16_to_cpu(cmd->src);
/* Lookup source address */
for (i = 0; i < ARRAY_SIZE(model_bound); i++) {
@@ -720,10 +706,10 @@ fail:
}
#if MYNEWT_VAL(BLE_MESH_TESTING)
-static void lpn_subscribe(u8_t *data, u16_t len)
+static void lpn_subscribe(uint8_t *data, uint16_t len)
{
struct mesh_lpn_subscribe_cmd *cmd = (void *) data;
- u16_t address = sys_le16_to_cpu(cmd->address);
+ uint16_t address = sys_le16_to_cpu(cmd->address);
int err;
SYS_LOG_DBG("address 0x%04x", address);
@@ -737,10 +723,10 @@ static void lpn_subscribe(u8_t *data, u16_t len)
err ? BTP_STATUS_FAILED : BTP_STATUS_SUCCESS);
}
-static void lpn_unsubscribe(u8_t *data, u16_t len)
+static void lpn_unsubscribe(uint8_t *data, uint16_t len)
{
struct mesh_lpn_unsubscribe_cmd *cmd = (void *) data;
- u16_t address = sys_le16_to_cpu(cmd->address);
+ uint16_t address = sys_le16_to_cpu(cmd->address);
int err;
SYS_LOG_DBG("address 0x%04x", address);
@@ -754,7 +740,7 @@ static void lpn_unsubscribe(u8_t *data, u16_t len)
err ? BTP_STATUS_FAILED : BTP_STATUS_SUCCESS);
}
-static void rpl_clear(u8_t *data, u16_t len)
+static void rpl_clear(uint8_t *data, uint16_t len)
{
int err;
@@ -770,7 +756,7 @@ static void rpl_clear(u8_t *data, u16_t len)
}
#endif /* MYNEWT_VAL(BLE_MESH_TESTING) */
-static void proxy_identity_enable(u8_t *data, u16_t len)
+static void proxy_identity_enable(uint8_t *data, uint16_t len)
{
int err;
@@ -785,7 +771,7 @@ static void proxy_identity_enable(u8_t *data, u16_t len)
err ? BTP_STATUS_FAILED : BTP_STATUS_SUCCESS);
}
-void tester_handle_mesh(u8_t opcode, u8_t index, u8_t *data, u16_t len)
+void tester_handle_mesh(uint8_t opcode, uint8_t index, uint8_t *data, uint16_t len)
{
switch (opcode) {
case MESH_READ_SUPPORTED_COMMANDS:
@@ -854,7 +840,7 @@ void tester_handle_mesh(u8_t opcode, u8_t index, u8_t *data, u16_t len)
}
}
-void net_recv_ev(u8_t ttl, u8_t ctl, u16_t src, u16_t dst, const void *payload,
+void net_recv_ev(uint8_t ttl, uint8_t ctl, uint16_t src, uint16_t dst, const void *payload,
size_t payload_len)
{
struct os_mbuf *buf = NET_BUF_SIMPLE(UINT8_MAX);
@@ -883,8 +869,8 @@ done:
os_mbuf_free_chain(buf);
}
-static void model_bound_cb(u16_t addr, struct bt_mesh_model *model,
- u16_t key_idx)
+static void model_bound_cb(uint16_t addr, struct bt_mesh_model *model,
+ uint16_t key_idx)
{
int i;
@@ -904,8 +890,8 @@ static void model_bound_cb(u16_t addr, struct bt_mesh_model *model,
SYS_LOG_ERR("model_bound is full");
}
-static void model_unbound_cb(u16_t addr, struct bt_mesh_model *model,
- u16_t key_idx)
+static void model_unbound_cb(uint16_t addr, struct bt_mesh_model *model,
+ uint16_t key_idx)
{
int i;
@@ -925,7 +911,7 @@ static void model_unbound_cb(u16_t addr, struct bt_mesh_model *model,
SYS_LOG_INF("model not found");
}
-static void invalid_bearer_cb(u8_t opcode)
+static void invalid_bearer_cb(uint8_t opcode)
{
struct mesh_invalid_bearer_ev ev = {
.opcode = opcode,
@@ -934,7 +920,7 @@ static void invalid_bearer_cb(u8_t opcode)
SYS_LOG_DBG("opcode 0x%02x", opcode);
tester_send(BTP_SERVICE_ID_MESH, MESH_EV_INVALID_BEARER,
- CONTROLLER_INDEX, (u8_t *) &ev, sizeof(ev));
+ CONTROLLER_INDEX, (uint8_t *) &ev, sizeof(ev));
}
static void incomp_timer_exp_cb(void)
@@ -951,7 +937,7 @@ static struct bt_test_cb bt_test_cb = {
.mesh_trans_incomp_timer_exp = incomp_timer_exp_cb,
};
-u8_t tester_init_mesh(void)
+uint8_t tester_init_mesh(void)
{
health_pub_init();
@@ -962,7 +948,7 @@ u8_t tester_init_mesh(void)
return BTP_STATUS_SUCCESS;
}
-u8_t tester_unregister_mesh(void)
+uint8_t tester_unregister_mesh(void)
{
return BTP_STATUS_SUCCESS;
}
diff --git a/src/libs/mynewt-nimble/apps/bttester/src/rtt_pipe.c b/src/libs/mynewt-nimble/apps/bttester/src/rtt_pipe.c
index 379345a0..4e667709 100644
--- a/src/libs/mynewt-nimble/apps/bttester/src/rtt_pipe.c
+++ b/src/libs/mynewt-nimble/apps/bttester/src/rtt_pipe.c
@@ -31,7 +31,7 @@ static struct hal_timer rtt_timer;
static bttester_pipe_recv_cb app_cb;
-static u8_t *recv_buf;
+static uint8_t *recv_buf;
static size_t recv_buf_len;
static size_t recv_off;
@@ -74,7 +74,7 @@ rtt_pipe_poll_func(void *arg)
itvl_ms = min(itvl_ms, RTT_INPUT_POLL_INTERVAL_MAX);
} else {
while (key >= 0 && avail > 0) {
- recv_buf[recv_off] = (u8_t) key;
+ recv_buf[recv_off] = (uint8_t) key;
recv_off++;
avail = recv_buf_len - recv_off;
key = rtt_pipe_get_char((unsigned int) rtt_index_down);
@@ -93,14 +93,14 @@ rtt_pipe_poll_func(void *arg)
}
int
-bttester_pipe_send(const u8_t *data, int len)
+bttester_pipe_send(const uint8_t *data, int len)
{
SEGGER_RTT_Write((unsigned int) rtt_index_up, data, (unsigned int) len);
return 0;
}
void
-bttester_pipe_register(u8_t *buf, size_t len, bttester_pipe_recv_cb cb)
+bttester_pipe_register(uint8_t *buf, size_t len, bttester_pipe_recv_cb cb)
{
recv_buf = buf;
recv_buf_len = len;
diff --git a/src/libs/mynewt-nimble/apps/bttester/src/uart_pipe.c b/src/libs/mynewt-nimble/apps/bttester/src/uart_pipe.c
index ecbefa02..1118d9af 100644
--- a/src/libs/mynewt-nimble/apps/bttester/src/uart_pipe.c
+++ b/src/libs/mynewt-nimble/apps/bttester/src/uart_pipe.c
@@ -26,7 +26,7 @@
#include "bttester_pipe.h"
-static u8_t *recv_buf;
+static uint8_t *recv_buf;
static size_t recv_buf_len;
static bttester_pipe_recv_cb app_cb;
static size_t recv_off;
@@ -144,7 +144,7 @@ uart_console_rx_char(void *arg, uint8_t byte)
static int
uart_pipe_handle_char(int key)
{
- recv_buf[recv_off] = (u8_t) key;
+ recv_buf[recv_off] = (uint8_t) key;
recv_off++;
return 0;
@@ -194,7 +194,7 @@ uart_console_rx_char_event(struct os_event *ev)
}
int
-bttester_pipe_send(const u8_t *data, int len)
+bttester_pipe_send(const uint8_t *data, int len)
{
int i;
@@ -272,7 +272,7 @@ bttester_pipe_init(void)
}
void
-bttester_pipe_register(u8_t *buf, size_t len, bttester_pipe_recv_cb cb)
+bttester_pipe_register(uint8_t *buf, size_t len, bttester_pipe_recv_cb cb)
{
recv_buf = buf;
recv_buf_len = len;
diff --git a/src/libs/mynewt-nimble/apps/bttester/syscfg.yml b/src/libs/mynewt-nimble/apps/bttester/syscfg.yml
index d0fffe13..db869c34 100644
--- a/src/libs/mynewt-nimble/apps/bttester/syscfg.yml
+++ b/src/libs/mynewt-nimble/apps/bttester/syscfg.yml
@@ -53,7 +53,7 @@ syscfg.defs:
BTTESTER_CONN_RETRY:
description: Retry connections when connection failed to be established
- value: 3
+ value: 0
BTTESTER_BTP_DATA_SIZE_MAX:
description: Maximum BTP payload
@@ -71,12 +71,16 @@ syscfg.defs:
description: Enable logging BTP traffic
value: 0
+ BTTESTER_L2CAP_COC_MTU:
+ description: Maximum MTU size the application can handle
+ value: 230
+
syscfg.vals:
OS_MAIN_STACK_SIZE: 512
SHELL_TASK: 0
SHELL_NEWTMGR: 0
LOG_LEVEL: 12
- MSYS_1_BLOCK_COUNT: 48
+ MSYS_1_BLOCK_COUNT: 80
BLE_MONITOR_RTT: 1
CONSOLE_RTT: 0
@@ -86,6 +90,8 @@ syscfg.vals:
BLE_L2CAP_COC_MAX_NUM: 2
BLE_L2CAP_SIG_MAX_PROCS: 2
+ BLE_L2CAP_ENHANCED_COC: 1
+ BLE_VERSION: 52
# Some testcases require MPS < MTU
BLE_L2CAP_COC_MPS: 100
BLE_RPA_TIMEOUT: 30
@@ -98,6 +104,9 @@ syscfg.vals:
BLE_SVC_GAP_PPCP_MIN_CONN_INTERVAL: 9
BLE_SVC_GAP_PPCP_MAX_CONN_INTERVAL: 30
BLE_SVC_GAP_PPCP_SUPERVISION_TMO: 2000
+ BLE_SVC_GAP_APPEARANCE_WRITE_PERM: 0
+ BLE_SVC_GAP_DEVICE_NAME_WRITE_PERM: 0
+ BLE_STORE_CONFIG_PERSIST: 0
BLE_MESH: 1
BLE_MESH_SHELL: 0
@@ -117,6 +126,11 @@ syscfg.vals:
BLE_MESH_FRIEND: 1
BLE_MESH_CFG_CLI: 1
BLE_MESH_RX_SDU_MAX: 110
+ BLE_MESH_HEALTH_CLI: 1
+ BLE_MESH_FRIEND_QUEUE_SIZE: 32
+ BLE_MESH_RX_SEG_MAX: 13
+ BLE_MESH_TX_SEG_MSG_COUNT: 2
+ BLE_MAX_CONNECTIONS: 8
BLE_MESH_ADV_BUF_COUNT: 20
BLE_MESH_TX_SEG_MAX: 6
diff --git a/src/libs/mynewt-nimble/apps/central/pkg.yml b/src/libs/mynewt-nimble/apps/central/pkg.yml
new file mode 100755
index 00000000..c10ad933
--- /dev/null
+++ b/src/libs/mynewt-nimble/apps/central/pkg.yml
@@ -0,0 +1,34 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+pkg.name: "apps/central"
+pkg.type: app
+pkg.description: "Basic central application"
+pkg.author: "Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>"
+
+pkg.deps:
+ - "@apache-mynewt-core/kernel/os"
+ - "@apache-mynewt-core/sys/console/full"
+ - "@apache-mynewt-core/sys/log/full"
+ - "@apache-mynewt-core/sys/stats/full"
+ - "@apache-mynewt-core/sys/log/modlog"
+ - "@apache-mynewt-nimble/nimble/host"
+ - "@apache-mynewt-nimble/nimble/host/util/"
+ - "@apache-mynewt-nimble/nimble/host/store/config"
+ - "@apache-mynewt-nimble/nimble/transport"
diff --git a/src/libs/mynewt-nimble/apps/central/src/main.c b/src/libs/mynewt-nimble/apps/central/src/main.c
new file mode 100755
index 00000000..b2370359
--- /dev/null
+++ b/src/libs/mynewt-nimble/apps/central/src/main.c
@@ -0,0 +1,186 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include "sysinit/sysinit.h"
+#include "os/os.h"
+#include "console/console.h"
+#include "host/ble_hs.h"
+#include "host/util/util.h"
+#include "console/console.h"
+#include "log/log.h"
+
+static uint8_t g_own_addr_type;
+
+static void
+ble_app_set_addr(void)
+{
+ ble_addr_t addr;
+ int rc;
+
+ /* generate new non-resolvable private address */
+ rc = ble_hs_id_gen_rnd(0, &addr);
+ assert(rc == 0);
+
+ /* set generated address */
+ rc = ble_hs_id_set_rnd(addr.val);
+ assert(rc == 0);
+}
+
+/* scan_event() calls scan(), so forward declaration is required */
+static void scan(void);
+
+/* connection has separate event handler from scan */
+static int
+conn_event(struct ble_gap_event *event, void *arg)
+{
+ switch (event->type) {
+ case BLE_GAP_EVENT_CONNECT:
+ if (event->connect.status == 0) {
+ MODLOG_DFLT(INFO,"Connection was established\n");
+ ble_gap_terminate(event->connect.conn_handle, 0x13);
+ } else {
+ MODLOG_DFLT(INFO,"Connection failed, error code: %i\n",
+ event->connect.status);
+ }
+ break;
+ case BLE_GAP_EVENT_DISCONNECT:
+ MODLOG_DFLT(INFO,"Disconnected, reason code: %i\n",
+ event->disconnect.reason);
+ scan();
+ break;
+ case BLE_GAP_EVENT_CONN_UPDATE_REQ:
+ MODLOG_DFLT(INFO,"Connection update request received\n");
+ break;
+ case BLE_GAP_EVENT_CONN_UPDATE:
+ if (event->conn_update.status == 0) {
+ MODLOG_DFLT(INFO,"Connection update successful\n");
+ } else {
+ MODLOG_DFLT(INFO,"Connection update failed; reson: %d\n",
+ event->conn_update.status);
+ }
+ break;
+ default:
+ MODLOG_DFLT(INFO,"Connection event type not supported, %d\n",
+ event->type);
+ break;
+ }
+ return 0;
+}
+
+static int
+scan_event(struct ble_gap_event *event, void *arg)
+{
+ /* predef_uuid stores information about UUID of device,
+ that we connect to */
+ const ble_uuid128_t predef_uuid =
+ BLE_UUID128_INIT(0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
+ 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff);
+ struct ble_hs_adv_fields parsed_fields;
+ int uuid_cmp_result;
+
+ memset(&parsed_fields, 0, sizeof(parsed_fields));
+
+ switch (event->type) {
+ /* advertising report has been received during discovery procedure */
+ case BLE_GAP_EVENT_DISC:
+ MODLOG_DFLT(INFO, "Advertising report received! Checking UUID...\n");
+ ble_hs_adv_parse_fields(&parsed_fields, event->disc.data,
+ event->disc.length_data);
+ /* Predefined UUID is compared to recieved one;
+ if doesn't fit - end procedure and go back to scanning,
+ else - connect. */
+ uuid_cmp_result = ble_uuid_cmp(&predef_uuid.u, &parsed_fields.uuids128->u);
+ if (uuid_cmp_result) {
+ MODLOG_DFLT(INFO, "UUID doesn't fit\n");
+ } else {
+ MODLOG_DFLT(INFO, "UUID fits, connecting...\n");
+ ble_gap_disc_cancel();
+ ble_gap_connect(g_own_addr_type, &(event->disc.addr), 10000,
+ NULL, conn_event, NULL);
+ }
+ break;
+ case BLE_GAP_EVENT_DISC_COMPLETE:
+ MODLOG_DFLT(INFO,"Discovery completed, reason: %d\n",
+ event->disc_complete.reason);
+ scan();
+ break;
+ default:
+ MODLOG_DFLT(ERROR, "Discovery event not handled\n");
+ break;
+ }
+ return 0;
+}
+
+static void
+scan(void)
+{
+ int rc;
+
+ /* set scan parameters:
+ - scan interval in 0.625ms units
+ - scan window in 0.625ms units
+ - filter policy - 0 if whitelisting not used
+ - limited - should limited discovery be used
+ - passive - should passive scan be used
+ - filter duplicates - 1 enables filtering duplicated advertisements */
+ const struct ble_gap_disc_params scan_params = {10000, 200, 0, 0, 0, 1};
+
+ /* performs discovery procedure */
+ rc = ble_gap_disc(g_own_addr_type, 10000, &scan_params,scan_event, NULL);
+ assert(rc == 0);
+}
+
+static void
+on_sync(void)
+{
+ int rc;
+ /* Generate a non-resolvable private address. */
+ ble_app_set_addr();
+
+ /* g_own_addr_type will store type of addres our BSP uses */
+
+ rc = ble_hs_util_ensure_addr(0);
+ rc = ble_hs_id_infer_auto(0, &g_own_addr_type);
+ assert(rc == 0);
+ /* begin scanning */
+ scan();
+}
+
+static void
+on_reset(int reason)
+{
+ console_printf("Resetting state; reason=%d\n", reason);
+}
+
+int
+main(int argc, char **argv)
+{
+ /* Initialize all packages. */
+ sysinit();
+
+ ble_hs_cfg.sync_cb = on_sync;
+ ble_hs_cfg.reset_cb = on_reset;
+
+ /* As the last thing, process events from default event queue. */
+ while (1) {
+ os_eventq_run(os_eventq_dflt_get());
+ }
+
+ return 0;
+}
diff --git a/src/libs/mynewt-nimble/apps/mesh_badge/README.md b/src/libs/mynewt-nimble/apps/mesh_badge/README.md
new file mode 100644
index 00000000..8d2b3fa3
--- /dev/null
+++ b/src/libs/mynewt-nimble/apps/mesh_badge/README.md
@@ -0,0 +1,48 @@
+### Mesh Badge
+
+
+##### Overview
+********
+
+This sample app for the reel board showcases Bluetooth Mesh
+
+The app starts off as a regular Bluetooth GATT peripheral application.
+Install the the "nRF Connect" app on your phone (available both for
+Android and iOS) to access the service that the app exposes. The service
+can also be accessed with any Bluetooth LE GATT client from your PC,
+however these instructions focus on the necessary steps for phones.
+
+##### Steps to set up
+***************
+
+* On your phone, use the nRF Connect app to Scan for devices and look
+ for "reel board"
+* Connect to the device. You'll see a single service - select it
+* Request to write to the characteristic by pressing on the upward pointing
+ arrow symbol
+* Select "Text" to enter text instead of hex
+* Enter your name (or any other arbitrary text). Multiple words
+ separated by spaces are possible. The font used on the reel display
+ allows three rows of up to 12 characters
+ wide text. You can force line breaks with a comma.
+* Press "Send" - this will trigger pairing since this is a protected
+ characteristic. The passkey for the pairing will be shown on the board's
+ display. Enter the passkey in your phone.
+* Once pairing is complete the board will show the text you sent. If
+ you're not happy with it you can try writing something else.
+* When you're happy with the text, disconnect from the board (exit the app or
+ go back to the device scan page)
+* Once disconnected the board switches over to Bluetooth Mesh mode, and you
+ can't connect to it anymore over GATT.
+
+If you configure multiple boards like this they can communicate with
+each other over mesh: by pressing the user button on the board the first
+word (name) of the stored text will be sent to all other boards in
+the network and cause the other boards to display "<name> says hi!".
+
+To reset a board to its initial state (disable mesh, erase the stored
+text, and make it connectable over GATT):
+
+* Keep the user button pressed when powering on (or press the reset button
+ when powered)
+* Wait until "Reseting Device" is shown
diff --git a/src/libs/mynewt-nimble/apps/mesh_badge/pkg.yml b/src/libs/mynewt-nimble/apps/mesh_badge/pkg.yml
new file mode 100644
index 00000000..0718236f
--- /dev/null
+++ b/src/libs/mynewt-nimble/apps/mesh_badge/pkg.yml
@@ -0,0 +1,39 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+pkg.name: apps/mesh_badge
+pkg.type: app
+pkg.description: Sample app for the reel board that showcases Bluetooth Mesh
+pkg.author: "Apache Mynewt <dev@mynewt.apache.org>"
+pkg.homepage: "http://mynewt.apache.org/"
+pkg.keywords:
+
+pkg.deps:
+ - "@apache-mynewt-core/hw/drivers/display/cfb"
+ - "@apache-mynewt-core/hw/drivers/display/ssd1673"
+ - "@apache-mynewt-core/kernel/os"
+ - "@apache-mynewt-core/sys/console/full"
+ - "@apache-mynewt-core/sys/log/full"
+ - "@apache-mynewt-core/sys/log/modlog"
+ - "@apache-mynewt-core/sys/stats/full"
+ - "@apache-mynewt-core/sys/shell"
+ - nimble/controller
+ - nimble/host
+ - nimble/host/services/gap
+ - nimble/host/services/gatt
+ - nimble/host/store/config
+ - nimble/transport/ram
diff --git a/src/libs/mynewt-nimble/apps/mesh_badge/src/board.h b/src/libs/mynewt-nimble/apps/mesh_badge/src/board.h
new file mode 100644
index 00000000..af77e0b4
--- /dev/null
+++ b/src/libs/mynewt-nimble/apps/mesh_badge/src/board.h
@@ -0,0 +1,15 @@
+/*
+ * Copyright (c) 2018 Phytec Messtechnik GmbH
+ * Copyright (c) 2018 Intel Corporation
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+#include "mesh/mesh.h"
+
+void board_refresh_display(void);
+void board_show_text(const char *text, bool center, int32_t duration);
+void board_blink_leds(void);
+void board_add_hello(uint16_t addr, const char *name);
+void board_add_heartbeat(uint16_t addr, uint8_t hops);
+int board_init(void);
diff --git a/src/libs/mynewt-nimble/apps/mesh_badge/src/gatt_svr.c b/src/libs/mynewt-nimble/apps/mesh_badge/src/gatt_svr.c
new file mode 100644
index 00000000..c6005a68
--- /dev/null
+++ b/src/libs/mynewt-nimble/apps/mesh_badge/src/gatt_svr.c
@@ -0,0 +1,226 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include <assert.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "services/gap/ble_svc_gap.h"
+#include "bsp/bsp.h"
+#include "host/ble_hs.h"
+#include "host/ble_uuid.h"
+
+#include "mesh.h"
+#include "board.h"
+#include "mesh_badge.h"
+
+static const ble_uuid16_t gatt_cud_uuid = BLE_UUID16_INIT(0x2901);
+static const ble_uuid16_t gatt_cpf_uuid = BLE_UUID16_INIT(0x2904);
+
+/** @brief GATT Characteristic Presentation Format Attribute Value. */
+struct bt_gatt_cpf {
+ /** Format of the value of the characteristic */
+ uint8_t format;
+ /** Exponent field to determine how the value of this characteristic is further formatted */
+ int8_t exponent;
+ /** Unit of the characteristic */
+ uint16_t unit;
+ /** Name space of the description */
+ uint8_t name_space;
+ /** Description of the characteristic as defined in a higher layer profile */
+ uint16_t description;
+} __packed;
+
+#define CPF_FORMAT_UTF8 0x19
+
+static const struct bt_gatt_cpf name_cpf = {
+ .format = CPF_FORMAT_UTF8,
+};
+
+static const ble_uuid128_t name_uuid = BLE_UUID128_INIT(
+ 0xf0, 0xde, 0xbc, 0x9a, 0x78, 0x56, 0x34, 0x12,
+ 0x78, 0x56, 0x34, 0x12, 0x78, 0x56, 0x34, 0x12);
+
+static const ble_uuid128_t name_enc_uuid = BLE_UUID128_INIT(
+ 0xf1, 0xde, 0xbc, 0x9a, 0x78, 0x56, 0x34, 0x12,
+ 0x78, 0x56, 0x34, 0x12, 0x78, 0x56, 0x34, 0x12);
+
+static int
+gatt_svr_chr_access(uint16_t conn_handle, uint16_t attr_handle,
+ struct ble_gatt_access_ctxt *ctxt,
+ void *arg);
+
+static const struct ble_gatt_svc_def gatt_svr_svcs[] = {
+ {
+ .type = BLE_GATT_SVC_TYPE_PRIMARY,
+ .uuid = &name_uuid.u,
+ .characteristics = (struct ble_gatt_chr_def[]) { {
+ .uuid = &name_enc_uuid.u,
+ .access_cb = gatt_svr_chr_access,
+ .flags = BLE_GATT_CHR_F_READ |
+ BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_WRITE_ENC,
+ .descriptors = (struct ble_gatt_dsc_def[]) { {
+ .uuid = &gatt_cud_uuid.u,
+ .access_cb = gatt_svr_chr_access,
+ .att_flags = BLE_ATT_F_READ,
+ }, {
+ .uuid = &gatt_cpf_uuid.u,
+ .access_cb = gatt_svr_chr_access,
+ .att_flags = BLE_ATT_F_READ,
+ }, {
+ 0, /* No more descriptors in this characteristic. */
+ } }
+ }, {
+ 0, /* No more characteristics in this service. */
+ } },
+ },
+
+ {
+ 0, /* No more services. */
+ },
+};
+
+static int read_name(struct os_mbuf *om)
+{
+ const char *value = bt_get_name();
+ int rc;
+
+ rc = os_mbuf_append(om, value, (uint16_t) strlen(value));
+ return rc == 0 ? 0 : BLE_ATT_ERR_INSUFFICIENT_RES;
+}
+
+static int write_name(struct os_mbuf *om)
+{
+ char name[MYNEWT_VAL(BLE_SVC_GAP_DEVICE_NAME_MAX_LENGTH)];
+ uint16_t len;
+ uint16_t om_len;
+ int rc;
+
+ om_len = OS_MBUF_PKTLEN(om);
+ if (om_len >= sizeof(name)) {
+ return BLE_ATT_ERR_INVALID_ATTR_VALUE_LEN;
+ }
+
+ rc = ble_hs_mbuf_to_flat(om, name, sizeof(name) - 1, &len);
+ if (rc != 0) {
+ return BLE_ATT_ERR_UNLIKELY;
+ }
+
+ name[len] = '\0';
+
+ rc = bt_set_name(name);
+ if (rc) {
+ return BLE_ATT_ERR_INSUFFICIENT_RES;
+ }
+
+ board_refresh_display();
+
+ return 0;
+}
+
+static int
+gatt_svr_chr_access(uint16_t conn_handle, uint16_t attr_handle,
+ struct ble_gatt_access_ctxt *ctxt,
+ void *arg)
+{
+ const ble_uuid_t *uuid;
+ int rc;
+
+ uuid = ctxt->chr->uuid;
+
+ if (ble_uuid_cmp(uuid, &name_enc_uuid.u) == 0) {
+ switch (ctxt->op) {
+ case BLE_GATT_ACCESS_OP_READ_CHR:
+ rc = read_name(ctxt->om);
+ return rc;
+
+ case BLE_GATT_ACCESS_OP_WRITE_CHR:
+ rc = write_name(ctxt->om);
+ return rc;
+
+ default:
+ assert(0);
+ return BLE_ATT_ERR_UNLIKELY;
+ }
+ } else if (ble_uuid_cmp(uuid, &gatt_cud_uuid.u) == 0) {
+ rc = os_mbuf_append(ctxt->om, "Badge Name",
+ (uint16_t) strlen("Badge Name"));
+ return rc == 0 ? 0 : BLE_ATT_ERR_INSUFFICIENT_RES;
+ } else if (ble_uuid_cmp(uuid, &gatt_cpf_uuid.u) == 0) {
+ rc = os_mbuf_append(ctxt->om, &name_cpf,
+ (uint16_t) sizeof(name_cpf));
+ return rc == 0 ? 0 : BLE_ATT_ERR_INSUFFICIENT_RES;
+ }
+
+ /* Unknown characteristic; the nimble stack should not have called this
+ * function.
+ */
+ assert(0);
+ return BLE_ATT_ERR_UNLIKELY;
+}
+
+void
+gatt_svr_register_cb(struct ble_gatt_register_ctxt *ctxt, void *arg)
+{
+ char buf[BLE_UUID_STR_LEN];
+
+ switch (ctxt->op) {
+ case BLE_GATT_REGISTER_OP_SVC:
+ MODLOG_DFLT(DEBUG, "registered service %s with handle=%d\n",
+ ble_uuid_to_str(ctxt->svc.svc_def->uuid, buf),
+ ctxt->svc.handle);
+ break;
+
+ case BLE_GATT_REGISTER_OP_CHR:
+ MODLOG_DFLT(DEBUG, "registering characteristic %s with "
+ "def_handle=%d val_handle=%d\n",
+ ble_uuid_to_str(ctxt->chr.chr_def->uuid, buf),
+ ctxt->chr.def_handle,
+ ctxt->chr.val_handle);
+ break;
+
+ case BLE_GATT_REGISTER_OP_DSC:
+ MODLOG_DFLT(DEBUG, "registering descriptor %s with handle=%d\n",
+ ble_uuid_to_str(ctxt->dsc.dsc_def->uuid, buf),
+ ctxt->dsc.handle);
+ break;
+
+ default:
+ assert(0);
+ break;
+ }
+}
+
+int
+gatt_svr_init(void)
+{
+ int rc;
+
+ rc = ble_gatts_count_cfg(gatt_svr_svcs);
+ if (rc != 0) {
+ return rc;
+ }
+
+ rc = ble_gatts_add_svcs(gatt_svr_svcs);
+ if (rc != 0) {
+ return rc;
+ }
+
+ return 0;
+}
diff --git a/src/libs/mynewt-nimble/apps/mesh_badge/src/main.c b/src/libs/mynewt-nimble/apps/mesh_badge/src/main.c
new file mode 100644
index 00000000..d856d816
--- /dev/null
+++ b/src/libs/mynewt-nimble/apps/mesh_badge/src/main.c
@@ -0,0 +1,393 @@
+/*
+ * Copyright (c) 2018 Intel Corporation
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+#include "console/console.h"
+#include "host/ble_gap.h"
+#include "mesh/glue.h"
+#include "services/gap/ble_svc_gap.h"
+#include "base64/base64.h"
+
+#include "mesh_badge.h"
+#include "mesh.h"
+#include "board.h"
+
+static char badge_name[MYNEWT_VAL(BLE_SVC_GAP_DEVICE_NAME_MAX_LENGTH)];
+
+#define MESH_BADGE_NAME_ENCODE_SIZE \
+ BASE64_ENCODE_SIZE(sizeof(badge_name))
+
+static bool reset_mesh;
+
+void print_addr(const void *addr)
+{
+ const uint8_t *u8p;
+
+ u8p = addr;
+ MODLOG_DFLT(INFO, "%02x:%02x:%02x:%02x:%02x:%02x",
+ u8p[5], u8p[4], u8p[3], u8p[2], u8p[1], u8p[0]);
+}
+
+static void
+print_conn_desc(struct ble_gap_conn_desc *desc)
+{
+ MODLOG_DFLT(INFO, "handle=%d our_ota_addr_type=%d our_ota_addr=",
+ desc->conn_handle, desc->our_ota_addr.type);
+ print_addr(desc->our_ota_addr.val);
+ MODLOG_DFLT(INFO, " our_id_addr_type=%d our_id_addr=",
+ desc->our_id_addr.type);
+ print_addr(desc->our_id_addr.val);
+ MODLOG_DFLT(INFO, " peer_ota_addr_type=%d peer_ota_addr=",
+ desc->peer_ota_addr.type);
+ print_addr(desc->peer_ota_addr.val);
+ MODLOG_DFLT(INFO, " peer_id_addr_type=%d peer_id_addr=",
+ desc->peer_id_addr.type);
+ print_addr(desc->peer_id_addr.val);
+ MODLOG_DFLT(INFO, " conn_itvl=%d conn_latency=%d supervision_timeout=%d "
+ "encrypted=%d authenticated=%d bonded=%d\n",
+ desc->conn_itvl, desc->conn_latency,
+ desc->supervision_timeout,
+ desc->sec_state.encrypted,
+ desc->sec_state.authenticated,
+ desc->sec_state.bonded);
+}
+
+static int gap_event(struct ble_gap_event *event, void *arg);
+
+static void advertise(void)
+{
+ uint8_t own_addr_type;
+ struct ble_gap_adv_params adv_params;
+ struct ble_hs_adv_fields fields;
+ const char *name;
+ int rc;
+
+ /* Figure out address to use while advertising (no privacy for now) */
+ rc = ble_hs_id_infer_auto(0, &own_addr_type);
+ if (rc != 0) {
+ MODLOG_DFLT(ERROR, "error determining address type; rc=%d\n", rc);
+ return;
+ }
+
+ /**
+ * Set the advertisement data included in our advertisements:
+ * o Flags (indicates advertisement type and other general info).
+ * o Advertising tx power.
+ * o Device name.
+ * o 16-bit service UUIDs (alert notifications).
+ */
+
+ memset(&fields, 0, sizeof fields);
+
+ /* Advertise two flags:
+ * o Discoverability in forthcoming advertisement (general)
+ * o BLE-only (BR/EDR unsupported).
+ */
+ fields.flags = BLE_HS_ADV_F_DISC_GEN |
+ BLE_HS_ADV_F_BREDR_UNSUP;
+
+#if 0
+ /* Indicate that the TX power level field should be included; have the
+ * stack fill this value automatically. This is done by assiging the
+ * special value BLE_HS_ADV_TX_PWR_LVL_AUTO.
+ */
+ fields.tx_pwr_lvl_is_present = 1;
+ fields.tx_pwr_lvl = BLE_HS_ADV_TX_PWR_LVL_AUTO;
+#endif
+
+ name = ble_svc_gap_device_name();
+ fields.name = (uint8_t *)name;
+ fields.name_len = (uint8_t) strlen(name);
+ fields.name_is_complete = 1;
+
+ rc = ble_gap_adv_set_fields(&fields);
+ if (rc != 0) {
+ MODLOG_DFLT(ERROR, "error setting advertisement data; rc=%d\n", rc);
+ return;
+ }
+
+ /* Begin advertising. */
+ memset(&adv_params, 0, sizeof adv_params);
+ adv_params.conn_mode = BLE_GAP_CONN_MODE_UND;
+ adv_params.disc_mode = BLE_GAP_DISC_MODE_GEN;
+ rc = ble_gap_adv_start(own_addr_type, NULL, BLE_HS_FOREVER,
+ &adv_params, gap_event, NULL);
+ if (rc != 0) {
+ MODLOG_DFLT(ERROR, "error enabling advertisement; rc=%d\n", rc);
+ return;
+ }
+}
+
+static void passkey_display(uint16_t conn_handle)
+{
+ char buf[20];
+ struct ble_sm_io pk;
+ int rc;
+
+ bt_rand(&pk.passkey, sizeof(pk.passkey));
+ /* Max value is 999999 */
+ pk.passkey %= 1000000;
+ pk.action = BLE_SM_IOACT_DISP;
+
+ rc = ble_sm_inject_io(conn_handle, &pk);
+ assert(rc == 0);
+
+ snprintk(buf, sizeof(buf), "Passkey:\n%06lu", pk.passkey);
+
+ printk("%s\n", buf);
+ board_show_text(buf, false, K_FOREVER);
+}
+
+static void pairing_complete(uint16_t conn_handle, bool bonded)
+{
+ printk("Pairing Complete\n");
+ board_show_text("Pairing Complete", false, K_SECONDS(2));
+}
+
+static void pairing_failed(uint16_t conn_handle)
+{
+ printk("Pairing Failed\n");
+ board_show_text("Pairing Failed", false, K_SECONDS(2));
+}
+
+static void connected(uint16_t conn_handle, int err)
+{
+ printk("Connected (err 0x%02x)\n", err);
+
+ if (err) {
+ board_show_text("Connection failed", false, K_SECONDS(2));
+ } else {
+ board_show_text("Connected", false, K_FOREVER);
+ }
+}
+
+static void disconnected(uint16_t conn_handle, int reason)
+{
+ printk("Disconnected (reason 0x%02x)\n", reason);
+
+ if (strcmp(MYNEWT_VAL(BLE_SVC_GAP_DEVICE_NAME), bt_get_name()) != 0 &&
+ !mesh_is_initialized()) {
+ /* Mesh will take over advertising control */
+ ble_gap_adv_stop();
+ mesh_start();
+ } else {
+ board_show_text("Disconnected", false, K_SECONDS(2));
+ }
+}
+
+static int gap_event(struct ble_gap_event *event, void *arg)
+{
+ struct ble_gap_conn_desc desc;
+ int rc;
+
+ switch (event->type) {
+ case BLE_GAP_EVENT_CONNECT:
+ /* A new connection was established or a connection attempt failed. */
+ MODLOG_DFLT(INFO, "connection %s; status=%d ",
+ event->connect.status == 0 ? "established" : "failed",
+ event->connect.status);
+ if (event->connect.status == 0) {
+ rc = ble_gap_conn_find(event->connect.conn_handle, &desc);
+ assert(rc == 0);
+ print_conn_desc(&desc);
+ connected(event->connect.conn_handle,
+ event->connect.status);
+ }
+ MODLOG_DFLT(INFO, "\n");
+
+ if (event->connect.status != 0) {
+ /* Connection failed; resume advertising. */
+ advertise();
+ }
+ return 0;
+
+ case BLE_GAP_EVENT_DISCONNECT:
+ MODLOG_DFLT(INFO, "disconnect; reason=%d ", event->disconnect.reason);
+ print_conn_desc(&event->disconnect.conn);
+ MODLOG_DFLT(INFO, "\n");
+
+ /* Connection terminated; resume advertising. */
+ advertise();
+
+ disconnected(event->disconnect.conn.conn_handle,
+ event->disconnect.reason);
+ return 0;
+
+ case BLE_GAP_EVENT_CONN_UPDATE:
+ /* The central has updated the connection parameters. */
+ MODLOG_DFLT(INFO, "connection updated; status=%d ",
+ event->conn_update.status);
+ rc = ble_gap_conn_find(event->connect.conn_handle, &desc);
+ assert(rc == 0);
+ print_conn_desc(&desc);
+ MODLOG_DFLT(INFO, "\n");
+ return 0;
+
+ case BLE_GAP_EVENT_ENC_CHANGE:
+ /* Encryption has been enabled or disabled for this connection. */
+ MODLOG_DFLT(INFO, "encryption change event; status=%d ",
+ event->enc_change.status);
+ rc = ble_gap_conn_find(event->connect.conn_handle, &desc);
+ assert(rc == 0);
+ print_conn_desc(&desc);
+ MODLOG_DFLT(INFO, "\n");
+
+ if (desc.sec_state.bonded) {
+ pairing_complete(event->enc_change.conn_handle, true);
+ } else if(desc.sec_state.encrypted) {
+ pairing_complete(event->enc_change.conn_handle, false);
+ } else {
+ pairing_failed(event->enc_change.conn_handle);
+ }
+ return 0;
+
+ case BLE_GAP_EVENT_PASSKEY_ACTION:
+ MODLOG_DFLT(INFO, "passkey action event; conn_handle=%d action=%d numcmp=%d\n",
+ event->passkey.conn_handle,
+ event->passkey.params.action,
+ event->passkey.params.numcmp);
+ passkey_display(event->passkey.conn_handle);
+ return 0;
+
+ case BLE_GAP_EVENT_REPEAT_PAIRING:
+ /* We already have a bond with the peer, but it is attempting to
+ * establish a new secure link. This app sacrifices security for
+ * convenience: just throw away the old bond and accept the new link.
+ */
+
+ /* Delete the old bond. */
+ rc = ble_gap_conn_find(event->repeat_pairing.conn_handle, &desc);
+ assert(rc == 0);
+ ble_store_util_delete_peer(&desc.peer_id_addr);
+
+ /* Return BLE_GAP_REPEAT_PAIRING_RETRY to indicate that the host should
+ * continue with the pairing operation.
+ */
+ return BLE_GAP_REPEAT_PAIRING_RETRY;
+
+ }
+
+ return 0;
+}
+
+static void on_sync(void)
+{
+ int err;
+ ble_addr_t addr;
+
+ /* Use NRPA */
+ err = ble_hs_id_gen_rnd(1, &addr);
+ assert(err == 0);
+ err = ble_hs_id_set_rnd(addr.val);
+ assert(err == 0);
+
+ printk("Bluetooth initialized\n");
+
+ err = mesh_init(addr.type);
+ if (err) {
+ printk("Initializing mesh failed (err %d)\n", err);
+ return;
+ }
+
+ printk("Mesh initialized\n");
+
+ if (IS_ENABLED(CONFIG_SETTINGS)) {
+ settings_load();
+ }
+
+ if (reset_mesh) {
+ bt_mesh_reset();
+ reset_mesh = false;
+ }
+
+ if (!mesh_is_initialized()) {
+ advertise();
+ } else {
+ printk("Already provisioned\n");
+ ble_svc_gap_device_name_set(bt_get_name());
+ }
+
+ board_refresh_display();
+
+ printk("Board started\n");
+}
+
+void schedule_mesh_reset(void)
+{
+ reset_mesh = true;
+}
+
+static void on_reset(int reason)
+{
+ MODLOG_DFLT(ERROR, "Resetting state; reason=%d\n", reason);
+}
+
+const char *bt_get_name(void)
+{
+ char buf[MESH_BADGE_NAME_ENCODE_SIZE];
+ int rc, len;
+
+ rc = conf_get_stored_value("mesh_badge/badge_name",
+ buf, sizeof(buf));
+ if (rc == OS_ENOENT) {
+ bt_set_name(MYNEWT_VAL(BLE_SVC_GAP_DEVICE_NAME));
+ } else {
+ assert(rc == 0);
+ }
+
+ memset(badge_name, '\0', sizeof(badge_name));
+ len = base64_decode(buf, badge_name);
+ if (len < 0) {
+ bt_set_name(MYNEWT_VAL(BLE_SVC_GAP_DEVICE_NAME));
+ }
+
+ return badge_name;
+}
+
+int bt_set_name(const char *name)
+{
+ char buf[MESH_BADGE_NAME_ENCODE_SIZE];
+ int rc;
+
+ memset(badge_name, '\0', sizeof(badge_name));
+ memcpy(badge_name, name, strlen(name));
+ base64_encode(badge_name, sizeof(badge_name), buf, 1);
+ rc = conf_save_one("mesh_badge/badge_name", buf);
+ assert(rc == 0);
+
+ return 0;
+}
+
+int main(void)
+{
+ int err;
+
+ /* Initialize OS */
+ sysinit();
+
+ err = board_init();
+ if (err) {
+ printk("board init failed (err %d)\n", err);
+ assert(err == 0);
+ }
+
+ /* Initialize the NimBLE host configuration. */
+ ble_hs_cfg.reset_cb = on_reset;
+ ble_hs_cfg.sync_cb = on_sync;
+ ble_hs_cfg.gatts_register_cb = gatt_svr_register_cb;
+ ble_hs_cfg.store_status_cb = ble_store_util_status_rr;
+ ble_hs_cfg.sm_io_cap = BLE_SM_IO_CAP_DISP_ONLY;
+
+ err = gatt_svr_init();
+ assert(err == 0);
+
+ /*
+ * As the last thing, process events from default event queue.
+ */
+ while (1) {
+ os_eventq_run(os_eventq_dflt_get());
+ }
+ return 0;
+}
diff --git a/src/libs/mynewt-nimble/apps/mesh_badge/src/mesh.c b/src/libs/mynewt-nimble/apps/mesh_badge/src/mesh.c
new file mode 100644
index 00000000..ee999172
--- /dev/null
+++ b/src/libs/mynewt-nimble/apps/mesh_badge/src/mesh.c
@@ -0,0 +1,313 @@
+/*
+ * Copyright (c) 2018 Intel Corporation
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+#include "console/console.h"
+#include "mesh/mesh.h"
+
+#include "mesh_badge.h"
+#include "mesh.h"
+#include "board.h"
+
+#define BT_COMP_ID_LF 0x05f1
+
+#define MOD_LF 0x0000
+#define OP_HELLO 0xbb
+#define OP_HEARTBEAT 0xbc
+#define OP_VND_HELLO BT_MESH_MODEL_OP_3(OP_HELLO, BT_COMP_ID_LF)
+#define OP_VND_HEARTBEAT BT_MESH_MODEL_OP_3(OP_HEARTBEAT, BT_COMP_ID_LF)
+
+#define DEFAULT_TTL 31
+#define GROUP_ADDR 0xc123
+#define NET_IDX 0x000
+#define APP_IDX 0x000
+#define FLAGS 0
+static struct ble_npl_callout hello_work;
+static struct ble_npl_callout mesh_start_work;
+
+static void heartbeat(const struct bt_mesh_hb_sub *sub, uint8_t hops,
+ uint16_t feat)
+{
+ board_show_text("Heartbeat Received", false, K_SECONDS(2));
+}
+
+static struct bt_mesh_cfg_cli cfg_cli = {
+};
+
+static void attention_on(struct bt_mesh_model *model)
+{
+ board_show_text("Attention!", false, K_SECONDS(2));
+}
+
+static void attention_off(struct bt_mesh_model *model)
+{
+ board_refresh_display();
+}
+
+static const struct bt_mesh_health_srv_cb health_srv_cb = {
+ .attn_on = attention_on,
+ .attn_off = attention_off,
+};
+
+static struct bt_mesh_health_srv health_srv = {
+ .cb = &health_srv_cb,
+};
+
+static struct os_mbuf *bt_mesh_pub_msg_health_pub;
+static struct bt_mesh_model_pub health_pub;
+
+static struct bt_mesh_model root_models[] = {
+ BT_MESH_MODEL_CFG_SRV,
+ BT_MESH_MODEL_CFG_CLI(&cfg_cli),
+ BT_MESH_MODEL_HEALTH_SRV(&health_srv, &health_pub),
+};
+
+static void vnd_hello(struct bt_mesh_model *model,
+ struct bt_mesh_msg_ctx *ctx,
+ struct os_mbuf *buf)
+{
+ char str[32];
+ size_t len;
+
+ printk("Hello message from 0x%04x\n", ctx->addr);
+
+ if (ctx->addr == bt_mesh_model_elem(model)->addr) {
+ printk("Ignoring message from self\n");
+ return;
+ }
+
+ len = min(buf->om_len, 8);
+ memcpy(str, buf->om_data, len);
+ str[len] = '\0';
+
+ board_add_hello(ctx->addr, str);
+
+ strcpy(str + len, " says hi!");
+
+ board_show_text(str, false, K_SECONDS(3));
+
+ board_blink_leds();
+}
+
+static void vnd_heartbeat(struct bt_mesh_model *model,
+ struct bt_mesh_msg_ctx *ctx,
+ struct os_mbuf *buf)
+{
+ uint8_t init_ttl, hops;
+
+ /* Ignore messages from self */
+ if (ctx->addr == bt_mesh_model_elem(model)->addr) {
+ return;
+ }
+
+ init_ttl = net_buf_simple_pull_u8(buf);
+ hops = init_ttl - ctx->recv_ttl + 1;
+
+ printk("Heartbeat from 0x%04x over %u hop%s\n", ctx->addr,
+ hops, hops == 1 ? "" : "s");
+
+ board_add_heartbeat(ctx->addr, hops);
+}
+
+static const struct bt_mesh_model_op vnd_ops[] = {
+ { OP_VND_HELLO, 1, vnd_hello },
+ { OP_VND_HEARTBEAT, 1, vnd_heartbeat },
+ BT_MESH_MODEL_OP_END,
+};
+
+static int pub_update(struct bt_mesh_model *mod)
+{
+ struct os_mbuf *msg = mod->pub->msg;
+
+ printk("Preparing to send heartbeat\n");
+
+ bt_mesh_model_msg_init(msg, OP_VND_HEARTBEAT);
+ net_buf_simple_add_u8(msg, DEFAULT_TTL);
+
+ return 0;
+}
+
+static struct os_mbuf *bt_mesh_pub_msg_vnd_pub;
+static struct bt_mesh_model_pub vnd_pub;
+
+static struct bt_mesh_model vnd_models[] = {
+ BT_MESH_MODEL_VND(BT_COMP_ID_LF, MOD_LF, vnd_ops, &vnd_pub, NULL),
+};
+
+static struct bt_mesh_elem elements[] = {
+ BT_MESH_ELEM(0, root_models, vnd_models),
+};
+
+static const struct bt_mesh_comp comp = {
+ .cid = BT_COMP_ID_LF,
+ .elem = elements,
+ .elem_count = ARRAY_SIZE(elements),
+};
+
+static size_t first_name_len(const char *name)
+{
+ size_t len;
+
+ for (len = 0; *name; name++, len++) {
+ switch (*name) {
+ case ' ':
+ case ',':
+ case '\n':
+ return len;
+ }
+ }
+
+ return len;
+}
+
+static void send_hello(struct ble_npl_event *work)
+{
+ struct os_mbuf *msg = NET_BUF_SIMPLE(3 + 8 + 4);
+ struct bt_mesh_msg_ctx ctx = {
+ .net_idx = NET_IDX,
+ .app_idx = APP_IDX,
+ .addr = GROUP_ADDR,
+ .send_ttl = DEFAULT_TTL,
+ };
+ const char *name = bt_get_name();
+
+ bt_mesh_model_msg_init(msg, OP_VND_HELLO);
+ net_buf_simple_add_mem(msg, name, first_name_len(name));
+
+ if (bt_mesh_model_send(&vnd_models[0], &ctx, msg, NULL, NULL) == 0) {
+ board_show_text("Saying \"hi!\" to everyone", false,
+ K_SECONDS(2));
+ } else {
+ board_show_text("Sending Failed!", false, K_SECONDS(2));
+ }
+
+ os_mbuf_free_chain(msg);
+}
+
+void mesh_send_hello(void)
+{
+ k_work_submit(&hello_work);
+}
+
+static int provision_and_configure(void)
+{
+ static const uint8_t net_key[16] = {
+ 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc,
+ 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc,
+ };
+ static const uint8_t app_key[16] = {
+ 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+ 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+ };
+ static const uint16_t iv_index;
+ struct bt_mesh_cfg_mod_pub pub = {
+ .addr = GROUP_ADDR,
+ .app_idx = APP_IDX,
+ .ttl = DEFAULT_TTL,
+ .period = BT_MESH_PUB_PERIOD_SEC(10),
+ };
+ uint8_t dev_key[16];
+ uint16_t addr;
+ int err;
+
+ err = bt_rand(dev_key, sizeof(dev_key));
+ if (err) {
+ return err;
+ }
+
+ do {
+ err = bt_rand(&addr, sizeof(addr));
+ if (err) {
+ return err;
+ }
+ } while (!addr);
+
+ /* Make sure it's a unicast address (highest bit unset) */
+ addr &= ~0x8000;
+
+ err = bt_mesh_provision(net_key, NET_IDX, FLAGS, iv_index, addr,
+ dev_key);
+ if (err) {
+ return err;
+ }
+
+ printk("Configuring...\n");
+
+ /* Add Application Key */
+ bt_mesh_cfg_app_key_add(NET_IDX, addr, NET_IDX, APP_IDX, app_key, NULL);
+
+ /* Bind to vendor model */
+ bt_mesh_cfg_mod_app_bind_vnd(NET_IDX, addr, addr, APP_IDX,
+ MOD_LF, BT_COMP_ID_LF, NULL);
+
+ /* Bind to Health model */
+ bt_mesh_cfg_mod_app_bind(NET_IDX, addr, addr, APP_IDX,
+ BT_MESH_MODEL_ID_HEALTH_SRV, NULL);
+
+ /* Add model subscription */
+ bt_mesh_cfg_mod_sub_add_vnd(NET_IDX, addr, addr, GROUP_ADDR,
+ MOD_LF, BT_COMP_ID_LF, NULL);
+
+ bt_mesh_cfg_mod_pub_set_vnd(NET_IDX, addr, addr, MOD_LF, BT_COMP_ID_LF,
+ &pub, NULL);
+
+ printk("Configuration complete\n");
+
+ return addr;
+}
+
+static void start_mesh(struct ble_npl_event *work)
+{
+ int err;
+
+ err = provision_and_configure();
+ if (err < 0) {
+ board_show_text("Starting Mesh Failed", false,
+ K_SECONDS(2));
+ } else {
+ char buf[32];
+
+ snprintk(buf, sizeof(buf),
+ "Mesh Started\nAddr: 0x%04x", err);
+ board_show_text(buf, false, K_SECONDS(4));
+ }
+}
+
+void mesh_start(void)
+{
+ k_work_submit(&mesh_start_work);
+}
+
+bool mesh_is_initialized(void)
+{
+ return bt_mesh_is_provisioned();
+}
+
+uint16_t mesh_get_addr(void)
+{
+ return elements[0].addr;
+}
+
+int mesh_init(uint8_t addr_type)
+{
+ static const uint8_t dev_uuid[16] = { 0xc0, 0xff, 0xee };
+ static const struct bt_mesh_prov prov = {
+ .uuid = dev_uuid,
+ };
+
+ hb_cb = { .recv = heartbeat };
+
+ bt_mesh_pub_msg_health_pub = NET_BUF_SIMPLE(0);
+ health_pub.msg = bt_mesh_pub_msg_health_pub;
+
+ bt_mesh_pub_msg_vnd_pub = NET_BUF_SIMPLE(3 + 1);
+ vnd_pub.msg = bt_mesh_pub_msg_vnd_pub;
+ vnd_pub.update = pub_update;
+
+ k_work_init(&hello_work, send_hello);
+ k_work_init(&mesh_start_work, start_mesh);
+
+ return bt_mesh_init(addr_type, &prov, &comp);
+}
diff --git a/src/libs/mynewt-nimble/apps/mesh_badge/src/mesh.h b/src/libs/mynewt-nimble/apps/mesh_badge/src/mesh.h
new file mode 100644
index 00000000..33ee7cd2
--- /dev/null
+++ b/src/libs/mynewt-nimble/apps/mesh_badge/src/mesh.h
@@ -0,0 +1,14 @@
+/*
+ * Copyright (c) 2018 Intel Corporation
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+#include "mesh/mesh.h"
+
+void mesh_send_hello(void);
+
+uint16_t mesh_get_addr(void);
+bool mesh_is_initialized(void);
+void mesh_start(void);
+int mesh_init(uint8_t addr_type);
diff --git a/src/libs/mynewt-nimble/apps/mesh_badge/src/mesh_badge.h b/src/libs/mynewt-nimble/apps/mesh_badge/src/mesh_badge.h
new file mode 100644
index 00000000..a156f1ce
--- /dev/null
+++ b/src/libs/mynewt-nimble/apps/mesh_badge/src/mesh_badge.h
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+struct ble_gatt_register_ctxt;
+
+void gatt_svr_register_cb(struct ble_gatt_register_ctxt *ctxt, void *arg);
+int gatt_svr_init(void);
+
+void schedule_mesh_reset(void);
+const char *bt_get_name(void);
+int bt_set_name(const char *);
+
diff --git a/src/libs/mynewt-nimble/apps/mesh_badge/src/reel_board.c b/src/libs/mynewt-nimble/apps/mesh_badge/src/reel_board.c
new file mode 100644
index 00000000..bc822937
--- /dev/null
+++ b/src/libs/mynewt-nimble/apps/mesh_badge/src/reel_board.c
@@ -0,0 +1,508 @@
+/*
+ * Copyright (c) 2018 Phytec Messtechnik GmbH
+ * Copyright (c) 2018 Intel Corporation
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+#include "os/mynewt.h"
+#include "bsp/bsp.h"
+#include "console/console.h"
+#include "hal/hal_flash.h"
+#include "hal/hal_gpio.h"
+#include "mesh/glue.h"
+#include "services/gap/ble_svc_gap.h"
+
+#include "mesh_badge.h"
+#include "display/cfb.h"
+#include "mesh.h"
+#include "board.h"
+
+#define printk console_printf
+
+enum font_size {
+ FONT_BIG = 0,
+ FONT_MEDIUM = 1,
+ FONT_SMALL = 2,
+};
+
+struct font_info {
+ uint8_t columns;
+} fonts[] = {
+ [FONT_BIG] = { .columns = 12 },
+ [FONT_MEDIUM] = { .columns = 16 },
+ [FONT_SMALL] = { .columns = 25 },
+};
+
+#define LONG_PRESS_TIMEOUT K_SECONDS(1)
+
+#define STAT_COUNT 128
+
+#define EDGE (GPIO_INT_EDGE | GPIO_INT_DOUBLE_EDGE)
+
+#ifdef SW0_GPIO_FLAGS
+#define PULL_UP SW0_GPIO_FLAGS
+#else
+#define PULL_UP 0
+#endif
+
+static struct os_dev *epd_dev;
+static bool pressed;
+static bool stats_view;
+static struct k_delayed_work epd_work;
+static struct k_delayed_work long_press_work;
+
+static struct {
+ int pin;
+} leds[] = {
+ { .pin = LED_1, },
+ { .pin = RGB_LED_RED, },
+ { .pin = RGB_LED_GRN, },
+ { .pin = RGB_LED_BLU, },
+};
+
+struct k_delayed_work led_timer;
+
+static size_t print_line(enum font_size font_size, int row, const char *text,
+ size_t len, bool center)
+{
+ uint8_t font_height, font_width;
+ char line[fonts[FONT_SMALL].columns + 1];
+ int pad;
+
+ cfb_framebuffer_set_font(epd_dev, font_size);
+
+ len = min(len, fonts[font_size].columns);
+ memcpy(line, text, len);
+ line[len] = '\0';
+
+ if (center) {
+ pad = (fonts[font_size].columns - len) / 2;
+ } else {
+ pad = 0;
+ }
+
+ cfb_get_font_size(epd_dev, font_size, &font_width, &font_height);
+
+ if (cfb_print(epd_dev, line, font_width * pad, font_height * row)) {
+ printk("Failed to print a string\n");
+ }
+
+ return len;
+}
+
+static size_t get_len(enum font_size font, const char *text)
+{
+ const char *space = NULL;
+ size_t i;
+
+ for (i = 0; i <= fonts[font].columns; i++) {
+ switch (text[i]) {
+ case '\n':
+ case '\0':
+ return i;
+ case ' ':
+ space = &text[i];
+ break;
+ default:
+ continue;
+ }
+ }
+
+ /* If we got more characters than fits a line, and a space was
+ * encountered, fall back to the last space.
+ */
+ if (space) {
+ return space - text;
+ }
+
+ return fonts[font].columns;
+}
+
+void board_blink_leds(void)
+{
+ k_delayed_work_submit(&led_timer, K_MSEC(100));
+}
+
+void board_show_text(const char *text, bool center, int32_t duration)
+{
+ int i;
+
+ cfb_framebuffer_clear(epd_dev, false);
+
+ for (i = 0; i < 3; i++) {
+ size_t len;
+
+ while (*text == ' ' || *text == '\n') {
+ text++;
+ }
+
+ len = get_len(FONT_BIG, text);
+ if (!len) {
+ break;
+ }
+
+ text += print_line(FONT_BIG, i, text, len, center);
+ if (!*text) {
+ break;
+ }
+ }
+
+ cfb_framebuffer_finalize(epd_dev);
+
+ if (duration != K_FOREVER) {
+ k_delayed_work_submit(&epd_work, duration);
+ }
+}
+
+static struct stat {
+ uint16_t addr;
+ char name[9];
+ uint8_t min_hops;
+ uint8_t max_hops;
+ uint16_t hello_count;
+ uint16_t heartbeat_count;
+} stats[STAT_COUNT] = {
+ [0 ... (STAT_COUNT - 1)] = {
+ .min_hops = BT_MESH_TTL_MAX,
+ .max_hops = 0,
+ },
+};
+
+static uint32_t stat_count;
+
+#define NO_UPDATE -1
+
+static int add_hello(uint16_t addr, const char *name)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(stats); i++) {
+ struct stat *stat = &stats[i];
+
+ if (!stat->addr) {
+ stat->addr = addr;
+ strncpy(stat->name, name, sizeof(stat->name) - 1);
+ stat->hello_count = 1;
+ stat_count++;
+ return i;
+ }
+
+ if (stat->addr == addr) {
+ /* Update name, incase it has changed */
+ strncpy(stat->name, name, sizeof(stat->name) - 1);
+
+ if (stat->hello_count < 0xffff) {
+ stat->hello_count++;
+ return i;
+ }
+
+ return NO_UPDATE;
+ }
+ }
+
+ return NO_UPDATE;
+}
+
+static int add_heartbeat(uint16_t addr, uint8_t hops)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(stats); i++) {
+ struct stat *stat = &stats[i];
+
+ if (!stat->addr) {
+ stat->addr = addr;
+ stat->heartbeat_count = 1;
+ stat->min_hops = hops;
+ stat->max_hops = hops;
+ stat_count++;
+ return i;
+ }
+
+ if (stat->addr == addr) {
+ if (hops < stat->min_hops) {
+ stat->min_hops = hops;
+ } else if (hops > stat->max_hops) {
+ stat->max_hops = hops;
+ }
+
+ if (stat->heartbeat_count < 0xffff) {
+ stat->heartbeat_count++;
+ return i;
+ }
+
+ return NO_UPDATE;
+ }
+ }
+
+ return NO_UPDATE;
+}
+
+void board_add_hello(uint16_t addr, const char *name)
+{
+ uint32_t sort_i;
+
+ sort_i = add_hello(addr, name);
+ if (sort_i != NO_UPDATE) {
+ }
+}
+
+void board_add_heartbeat(uint16_t addr, uint8_t hops)
+{
+ uint32_t sort_i;
+
+ sort_i = add_heartbeat(addr, hops);
+ if (sort_i != NO_UPDATE) {
+ }
+}
+
+static void show_statistics(void)
+{
+ int top[4] = { -1, -1, -1, -1 };
+ int len, i, line = 0;
+ struct stat *stat;
+ char str[32];
+
+ cfb_framebuffer_clear(epd_dev, false);
+
+ len = snprintk(str, sizeof(str),
+ "Own Address: 0x%04x", mesh_get_addr());
+ print_line(FONT_SMALL, line++, str, len, false);
+
+ len = snprintk(str, sizeof(str),
+ "Node Count: %lu", stat_count + 1);
+ print_line(FONT_SMALL, line++, str, len, false);
+
+ /* Find the top sender */
+ for (i = 0; i < ARRAY_SIZE(stats); i++) {
+ int j;
+
+ stat = &stats[i];
+ if (!stat->addr) {
+ break;
+ }
+
+ if (!stat->hello_count) {
+ continue;
+ }
+
+ for (j = 0; j < ARRAY_SIZE(top); j++) {
+ if (top[j] < 0) {
+ top[j] = i;
+ break;
+ }
+
+ if (stat->hello_count <= stats[top[j]].hello_count) {
+ continue;
+ }
+
+ /* Move other elements down the list */
+ if (j < ARRAY_SIZE(top) - 1) {
+ memmove(&top[j + 1], &top[j],
+ ((ARRAY_SIZE(top) - j - 1) *
+ sizeof(top[j])));
+ }
+
+ top[j] = i;
+ break;
+ }
+ }
+
+ if (stat_count >= 0) {
+ len = snprintk(str, sizeof(str), "Most messages from:");
+ print_line(FONT_SMALL, line++, str, len, false);
+
+ for (i = 0; i < ARRAY_SIZE(top); i++) {
+ if (top[i] < 0) {
+ break;
+ }
+
+ stat = &stats[top[i]];
+
+ len = snprintk(str, sizeof(str), "%-3u 0x%04x %s",
+ stat->hello_count, stat->addr,
+ stat->name);
+ print_line(FONT_SMALL, line++, str, len, false);
+ }
+ }
+
+ cfb_framebuffer_finalize(epd_dev);
+}
+
+static void epd_update(struct ble_npl_event *work)
+{
+ char buf[MYNEWT_VAL(BLE_SVC_GAP_DEVICE_NAME_MAX_LENGTH)];
+ int i;
+
+ if (stats_view) {
+ show_statistics();
+ return;
+ }
+
+ strncpy(buf, bt_get_name(), sizeof(buf));
+
+ /* Convert commas to newlines */
+ for (i = 0; buf[i] != '\0'; i++) {
+ if (buf[i] == ',') {
+ buf[i] = '\n';
+ }
+ }
+
+ board_show_text(buf, true, K_FOREVER);
+}
+
+static void long_press(struct ble_npl_event *work)
+{
+ /* Treat as release so actual release doesn't send messages */
+ pressed = false;
+ stats_view = !stats_view;
+ board_refresh_display();
+}
+
+static bool button_is_pressed(void)
+{
+ uint32_t val;
+
+ val = (uint32_t) hal_gpio_read(BUTTON_1);
+
+ return !val;
+}
+
+static void button_interrupt(struct os_event *ev)
+{
+ int pin_pos = (int ) ev->ev_arg;
+
+ if (button_is_pressed() == pressed) {
+ return;
+ }
+
+ pressed = !pressed;
+ printk("Button %s\n", pressed ? "pressed" : "released");
+
+ if (pressed) {
+ k_delayed_work_submit(&long_press_work, LONG_PRESS_TIMEOUT);
+ return;
+ }
+
+ k_delayed_work_cancel(&long_press_work);
+
+ if (!mesh_is_initialized()) {
+ return;
+ }
+
+ /* Short press does currently nothing in statistics view */
+ if (stats_view) {
+ return;
+ }
+
+ if (pin_pos == BUTTON_1) {
+ mesh_send_hello();
+ }
+}
+
+static struct os_event button_event;
+
+static void
+gpio_irq_handler(void *arg)
+{
+ button_event.ev_arg = arg;
+ os_eventq_put(os_eventq_dflt_get(), &button_event);
+}
+
+static int configure_button(void)
+{
+ button_event.ev_cb = button_interrupt;
+
+ hal_gpio_irq_init(BUTTON_1, gpio_irq_handler, (void *) BUTTON_1,
+ HAL_GPIO_TRIG_BOTH, HAL_GPIO_PULL_UP);
+ hal_gpio_irq_enable(BUTTON_1);
+
+ return 0;
+}
+
+static void led_timeout(struct ble_npl_event *work)
+{
+ static int led_cntr;
+ int i;
+
+ /* Disable all LEDs */
+ for (i = 0; i < ARRAY_SIZE(leds); i++) {
+ hal_gpio_write(leds[i].pin, 1);
+ }
+
+ /* Stop after 5 iterations */
+ if (led_cntr > (ARRAY_SIZE(leds) * 5)) {
+ led_cntr = 0;
+ return;
+ }
+
+ /* Select and enable current LED */
+ i = led_cntr++ % ARRAY_SIZE(leds);
+ hal_gpio_write(leds[i].pin, 0);
+
+ k_delayed_work_submit(&led_timer, K_MSEC(100));
+}
+
+static int configure_leds(void)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(leds); i++) {
+ hal_gpio_init_out(leds[i].pin, 1);
+ }
+
+ k_delayed_work_init(&led_timer, led_timeout);
+ return 0;
+}
+
+static int erase_storage(void)
+{
+ bt_set_name(MYNEWT_VAL(BLE_SVC_GAP_DEVICE_NAME));
+ ble_store_clear();
+ schedule_mesh_reset();
+ return 0;
+}
+
+void board_refresh_display(void)
+{
+ k_delayed_work_submit(&epd_work, K_NO_WAIT);
+}
+
+int board_init(void)
+{
+ epd_dev = os_dev_lookup(MYNEWT_VAL(SSD1673_OS_DEV_NAME));
+ if (epd_dev == NULL) {
+ printk("SSD1673 device not found\n");
+ return -ENODEV;
+ }
+
+ if (cfb_framebuffer_init(epd_dev)) {
+ printk("Framebuffer initialization failed\n");
+ return -EIO;
+ }
+
+ cfb_framebuffer_clear(epd_dev, true);
+
+ if (configure_button()) {
+ printk("Failed to configure button\n");
+ return -EIO;
+ }
+
+ if (configure_leds()) {
+ printk("LED init failed\n");
+ return -EIO;
+ }
+
+ k_delayed_work_init(&epd_work, epd_update);
+ k_delayed_work_init(&long_press_work, long_press);
+
+ pressed = button_is_pressed();
+ if (pressed) {
+ printk("Erasing storage\n");
+ board_show_text("Resetting Device", false, K_SECONDS(4));
+ erase_storage();
+ }
+
+ return 0;
+}
diff --git a/src/libs/mynewt-nimble/apps/mesh_badge/syscfg.yml b/src/libs/mynewt-nimble/apps/mesh_badge/syscfg.yml
new file mode 100644
index 00000000..0c60c016
--- /dev/null
+++ b/src/libs/mynewt-nimble/apps/mesh_badge/syscfg.yml
@@ -0,0 +1,58 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# Package: apps/mesh_badge
+
+syscfg.vals:
+ # Enable the shell task.
+ SHELL_TASK: 1
+
+ # Set log level to info (disable debug logging).
+ LOG_LEVEL: 1
+
+ # Default task settings
+ OS_MAIN_STACK_SIZE: 768
+
+ # Newtmgr is not supported in this app, so disable newtmgr-over-shell.
+ SHELL_NEWTMGR: 0
+
+ REEL_BOARD_ENABLE_ACTIVE_MODE: 1
+ SPI_0_MASTER: 1
+
+ BLE_MESH: 1
+ MSYS_1_BLOCK_COUNT: 48
+
+ BLE_SVC_GAP_DEVICE_NAME: '"reel board"'
+
+ BLE_SM_SC: 1
+ BLE_SM_BONDING: 1
+ BLE_MESH_RELAY: 1
+ BLE_MESH_GATT_PROXY: 0
+ BLE_MESH_PB_ADV: 0
+ BLE_MESH_PB_GATT: 0
+ BLE_MESH_ADV_BUF_COUNT: 30
+ BLE_MESH_LABEL_COUNT: 0
+ BLE_MESH_CFG_CLI: 1
+ BLE_MESH_TX_SEG_MAX: 6
+ BLE_MESH_TX_SEG_MSG_COUNT: 3
+ BLE_MESH_RX_SEG_MSG_COUNT: 3
+ BLE_MESH_CRPL: 128
+ BLE_MESH_RPL_STORE_TIMEOUT: 120
+ BLE_MESH_SETTINGS: 1
+ CONFIG_NFFS: 1
+ BLE_MESH_PB_ADV: 1 \ No newline at end of file
diff --git a/src/libs/mynewt-nimble/nimble/controller/include/controller/ble_ll.h b/src/libs/mynewt-nimble/nimble/controller/include/controller/ble_ll.h
index d3340445..1c43e69f 100644
--- a/src/libs/mynewt-nimble/nimble/controller/include/controller/ble_ll.h
+++ b/src/libs/mynewt-nimble/nimble/controller/include/controller/ble_ll.h
@@ -69,6 +69,29 @@ extern "C" {
/* Timing jitter as per spec is +/16 usecs */
#define BLE_LL_JITTER_USECS (16)
+
+#if MYNEWT_VAL(BLE_LL_SCA) < 0
+#error Invalid SCA value
+#elif MYNEWT_VAL(BLE_LL_SCA) <= 20
+#define BLE_LL_SCA_ENUM 7
+#elif MYNEWT_VAL(BLE_LL_SCA) <= 30
+#define BLE_LL_SCA_ENUM 6
+#elif MYNEWT_VAL(BLE_LL_SCA) <= 50
+#define BLE_LL_SCA_ENUM 5
+#elif MYNEWT_VAL(BLE_LL_SCA) <= 75
+#define BLE_LL_SCA_ENUM 4
+#elif MYNEWT_VAL(BLE_LL_SCA) <= 100
+#define BLE_LL_SCA_ENUM 3
+#elif MYNEWT_VAL(BLE_LL_SCA) <= 150
+#define BLE_LL_SCA_ENUM 2
+#elif MYNEWT_VAL(BLE_LL_SCA) <= 250
+#define BLE_LL_SCA_ENUM 1
+#elif MYNEWT_VAL(BLE_LL_SCA) <= 500
+#define BLE_LL_SCA_ENUM 0
+#else
+#error Invalid SCA value
+#endif
+
/* Packet queue header definition */
STAILQ_HEAD(ble_ll_pkt_q, os_mbuf_pkthdr);
@@ -373,6 +396,12 @@ struct ble_dev_addr
#define BLE_LL_LLID_DATA_START (2)
#define BLE_LL_LLID_CTRL (3)
+#define BLE_LL_LLID_IS_CTRL(hdr) \
+ (((hdr) & BLE_LL_DATA_HDR_LLID_MASK) == BLE_LL_LLID_CTRL)
+#define BLE_LL_LLID_IS_DATA(hdr) \
+ ((((hdr) & BLE_LL_DATA_HDR_LLID_MASK) == BLE_LL_LLID_DATA_START) || \
+ (((hdr) & BLE_LL_DATA_HDR_LLID_MASK) == BLE_LL_LLID_DATA_FRAG))
+
/*
* CONNECT_REQ
* -> InitA (6 bytes)
@@ -545,6 +574,7 @@ void ble_ll_rand_sample(uint8_t rnum);
int ble_ll_rand_data_get(uint8_t *buf, uint8_t len);
void ble_ll_rand_prand_get(uint8_t *prand);
int ble_ll_rand_start(void);
+uint32_t ble_ll_rand(void);
static inline int
ble_ll_get_addr_type(uint8_t txrxflag)
diff --git a/src/libs/mynewt-nimble/nimble/controller/include/controller/ble_ll_conn.h b/src/libs/mynewt-nimble/nimble/controller/include/controller/ble_ll_conn.h
index 26c99265..d7db6878 100644
--- a/src/libs/mynewt-nimble/nimble/controller/include/controller/ble_ll_conn.h
+++ b/src/libs/mynewt-nimble/nimble/controller/include/controller/ble_ll_conn.h
@@ -58,6 +58,8 @@ extern "C" {
/* Definition for RSSI when the RSSI is unknown */
#define BLE_LL_CONN_UNKNOWN_RSSI (127)
+#define BLE_LL_CONN_HANDLE_ISO_OFFSET (0x0100)
+
#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_ENCRYPTION)
/*
* Encryption states for a connection
@@ -69,6 +71,7 @@ extern "C" {
enum conn_enc_state {
CONN_ENC_S_UNENCRYPTED = 1,
CONN_ENC_S_ENCRYPTED,
+ CONN_ENC_S_ENC_RSP_TO_BE_SENT,
CONN_ENC_S_ENC_RSP_WAIT,
CONN_ENC_S_PAUSE_ENC_RSP_WAIT,
CONN_ENC_S_PAUSED,
@@ -270,6 +273,10 @@ struct ble_ll_conn_sm
uint8_t last_rxd_hdr_byte; /* note: possibly can make 1 bit since we
only use the MD bit now */
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_CTRL_TO_HOST_FLOW_CONTROL)
+ uint16_t cth_flow_pending;
+#endif
+
/* connection event mgmt */
uint8_t reject_reason;
uint8_t host_reply_opcode;
diff --git a/src/libs/mynewt-nimble/nimble/controller/include/controller/ble_ll_ctrl.h b/src/libs/mynewt-nimble/nimble/controller/include/controller/ble_ll_ctrl.h
index b0da1e73..15a45b2a 100644
--- a/src/libs/mynewt-nimble/nimble/controller/include/controller/ble_ll_ctrl.h
+++ b/src/libs/mynewt-nimble/nimble/controller/include/controller/ble_ll_ctrl.h
@@ -39,7 +39,9 @@ extern "C" {
#define BLE_LL_CTRL_PROC_LE_PING (7)
#define BLE_LL_CTRL_PROC_DATA_LEN_UPD (8)
#define BLE_LL_CTRL_PROC_PHY_UPDATE (9)
-#define BLE_LL_CTRL_PROC_NUM (10)
+#define BLE_LL_CTRL_PROC_SCA_UPDATE (10)
+#define BLE_LL_CTRL_PROC_CIS_CREATE (11)
+#define BLE_LL_CTRL_PROC_NUM (12)
#define BLE_LL_CTRL_PROC_IDLE (255)
/* Checks if a particular control procedure is running */
@@ -54,45 +56,51 @@ extern "C" {
* -> Opcode (1 byte)
* -> Data (0 - 26 bytes)
*/
-#define BLE_LL_CTRL_CONN_UPDATE_IND (0)
-#define BLE_LL_CTRL_CHANNEL_MAP_REQ (1)
-#define BLE_LL_CTRL_TERMINATE_IND (2)
-#define BLE_LL_CTRL_ENC_REQ (3)
-#define BLE_LL_CTRL_ENC_RSP (4)
-#define BLE_LL_CTRL_START_ENC_REQ (5)
-#define BLE_LL_CTRL_START_ENC_RSP (6)
-#define BLE_LL_CTRL_UNKNOWN_RSP (7)
-#define BLE_LL_CTRL_FEATURE_REQ (8)
-#define BLE_LL_CTRL_FEATURE_RSP (9)
-#define BLE_LL_CTRL_PAUSE_ENC_REQ (10)
-#define BLE_LL_CTRL_PAUSE_ENC_RSP (11)
-#define BLE_LL_CTRL_VERSION_IND (12)
-#define BLE_LL_CTRL_REJECT_IND (13)
-#define BLE_LL_CTRL_SLAVE_FEATURE_REQ (14)
-#define BLE_LL_CTRL_CONN_PARM_REQ (15)
-#define BLE_LL_CTRL_CONN_PARM_RSP (16)
-#define BLE_LL_CTRL_REJECT_IND_EXT (17)
-#define BLE_LL_CTRL_PING_REQ (18)
-#define BLE_LL_CTRL_PING_RSP (19)
-#define BLE_LL_CTRL_LENGTH_REQ (20)
-#define BLE_LL_CTRL_LENGTH_RSP (21)
-#define BLE_LL_CTRL_PHY_REQ (22)
-#define BLE_LL_CTRL_PHY_RSP (23)
-#define BLE_LL_CTRL_PHY_UPDATE_IND (24)
-#define BLE_LL_CTRL_MIN_USED_CHAN_IND (25)
-#define BLE_LL_CTRL_CTE_REQ (26)
-#define BLE_LL_CTRL_CTE_RSP (27)
-#define BLE_LL_CTRL_PERIODIC_SYNC_IND (28)
-#define BLE_LL_CTRL_CLOCK_ACCURACY_REQ (29)
-#define BLE_LL_CTRL_CLOCK_ACCURACY_RSP (30)
+#define BLE_LL_CTRL_CONN_UPDATE_IND (0x00)
+#define BLE_LL_CTRL_CHANNEL_MAP_REQ (0x01)
+#define BLE_LL_CTRL_TERMINATE_IND (0x02)
+#define BLE_LL_CTRL_ENC_REQ (0x03)
+#define BLE_LL_CTRL_ENC_RSP (0x04)
+#define BLE_LL_CTRL_START_ENC_REQ (0x05)
+#define BLE_LL_CTRL_START_ENC_RSP (0x06)
+#define BLE_LL_CTRL_UNKNOWN_RSP (0x07)
+#define BLE_LL_CTRL_FEATURE_REQ (0x08)
+#define BLE_LL_CTRL_FEATURE_RSP (0x09)
+#define BLE_LL_CTRL_PAUSE_ENC_REQ (0x0A)
+#define BLE_LL_CTRL_PAUSE_ENC_RSP (0x0B)
+#define BLE_LL_CTRL_VERSION_IND (0x0C)
+#define BLE_LL_CTRL_REJECT_IND (0x0D)
+#define BLE_LL_CTRL_SLAVE_FEATURE_REQ (0x0E)
+#define BLE_LL_CTRL_CONN_PARM_REQ (0x0F)
+#define BLE_LL_CTRL_CONN_PARM_RSP (0x10)
+#define BLE_LL_CTRL_REJECT_IND_EXT (0x11)
+#define BLE_LL_CTRL_PING_REQ (0x12)
+#define BLE_LL_CTRL_PING_RSP (0x13)
+#define BLE_LL_CTRL_LENGTH_REQ (0x14)
+#define BLE_LL_CTRL_LENGTH_RSP (0x15)
+#define BLE_LL_CTRL_PHY_REQ (0x16)
+#define BLE_LL_CTRL_PHY_RSP (0x17)
+#define BLE_LL_CTRL_PHY_UPDATE_IND (0x18)
+#define BLE_LL_CTRL_MIN_USED_CHAN_IND (0x19)
+#define BLE_LL_CTRL_CTE_REQ (0x1A)
+#define BLE_LL_CTRL_CTE_RSP (0x1B)
+#define BLE_LL_CTRL_PERIODIC_SYNC_IND (0x1C)
+#define BLE_LL_CTRL_CLOCK_ACCURACY_REQ (0x1D)
+#define BLE_LL_CTRL_CLOCK_ACCURACY_RSP (0x1E)
+#define BLE_LL_CTRL_CIS_REQ (0x1F)
+#define BLE_LL_CTRL_CIS_RSP (0x20)
+#define BLE_LL_CTRL_CIS_IND (0x21)
+#define BLE_LL_CTRL_CIS_TERMINATE_IND (0x22)
/* Maximum opcode value */
-#define BLE_LL_CTRL_OPCODES (BLE_LL_CTRL_CLOCK_ACCURACY_RSP + 1)
+#define BLE_LL_CTRL_OPCODES (BLE_LL_CTRL_CIS_TERMINATE_IND + 1)
extern const uint8_t g_ble_ll_ctrl_pkt_lengths[BLE_LL_CTRL_OPCODES];
/* Maximum LL control PDU size */
-#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_PERIODIC_ADV_SYNC_TRANSFER)
+#if MYNEWT_VAL(BLE_ISO)
+#define BLE_LL_CTRL_MAX_PDU_LEN (42)
+#elif MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_PERIODIC_ADV_SYNC_TRANSFER)
#define BLE_LL_CTRL_MAX_PDU_LEN (35)
#else
#define BLE_LL_CTRL_MAX_PDU_LEN (27)
@@ -261,6 +269,12 @@ struct ble_ll_len_req
#define BLE_LL_CTRL_CLOCK_ACCURACY_REQ_LEN (1)
#define BLE_LL_CTRL_CLOCK_ACCURACY_RSP_LEN (1)
+/* BLE ISO */
+#define BLE_LL_CTRL_CIS_REQ_LEN (42)
+#define BLE_LL_CTRL_CIS_RSP_LEN (8)
+#define BLE_LL_CTRL_CIS_IND_LEN (15)
+#define BLE_LL_CTRL_CIS_TERMINATE_LEN (3)
+
/* API */
struct ble_ll_conn_sm;
void ble_ll_ctrl_proc_start(struct ble_ll_conn_sm *connsm, int ctrl_proc);
@@ -306,6 +320,11 @@ void ble_ll_hci_ev_send_vendor_err(const char *file, uint32_t line);
uint8_t ble_ll_ctrl_phy_tx_transition_get(uint8_t phy_mask);
uint8_t ble_ll_ctrl_phy_from_phy_mask(uint8_t phy_mask);
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_SCA_UPDATE)
+void ble_ll_hci_ev_sca_update(struct ble_ll_conn_sm *connsm,
+ uint8_t status, uint8_t peer_sca);
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/src/libs/mynewt-nimble/nimble/controller/include/controller/ble_ll_hci.h b/src/libs/mynewt-nimble/nimble/controller/include/controller/ble_ll_hci.h
index abef8746..6a9e48e5 100644
--- a/src/libs/mynewt-nimble/nimble/controller/include/controller/ble_ll_hci.h
+++ b/src/libs/mynewt-nimble/nimble/controller/include/controller/ble_ll_hci.h
@@ -27,7 +27,7 @@ extern "C" {
#include "nimble/hci_common.h"
/* For supported commands */
-#define BLE_LL_SUPP_CMD_LEN (42)
+#define BLE_LL_SUPP_CMD_LEN (45)
extern const uint8_t g_ble_ll_supp_cmds[BLE_LL_SUPP_CMD_LEN];
/* The largest event the controller will send. */
diff --git a/src/libs/mynewt-nimble/nimble/controller/include/controller/ble_ll_iso.h b/src/libs/mynewt-nimble/nimble/controller/include/controller/ble_ll_iso.h
new file mode 100644
index 00000000..2944b074
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/controller/include/controller/ble_ll_iso.h
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#ifndef H_BLE_LL_ISO
+#define H_BLE_LL_ISO
+
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int ble_ll_iso_read_tx_sync(const uint8_t *cmdbuf, uint8_t len);
+int ble_ll_iso_set_cig_param(const uint8_t *cmdbuf, uint8_t len, uint8_t *rspbuf, uint8_t *rsplen);
+int ble_ll_iso_set_cig_param_test(const uint8_t *cmdbuf, uint8_t len, uint8_t *rspbuf, uint8_t *rsplen);
+int ble_ll_iso_create_cis(const uint8_t *cmdbuf, uint8_t len);
+int ble_ll_iso_disconnect_cmd(const struct ble_hci_lc_disconnect_cp *cmd);
+int ble_ll_iso_remove_cig(const uint8_t *cmdbuf, uint8_t len, uint8_t *rspbuf, uint8_t *rsplen);
+int ble_ll_iso_accept_cis_req(const uint8_t *cmdbuf, uint8_t len);
+int ble_ll_iso_reject_cis_req(const uint8_t *cmdbuf, uint8_t len);
+int ble_ll_iso_create_big(const uint8_t *cmdbuf, uint8_t len);
+int ble_ll_iso_create_big_test(const uint8_t *cmdbuf, uint8_t len);
+int ble_ll_iso_terminate_big(const uint8_t *cmdbuf, uint8_t len);
+int ble_ll_iso_big_create_sync(const uint8_t *cmdbuf, uint8_t len);
+int ble_ll_iso_big_terminate_sync(const uint8_t *cmdbuf, uint8_t len);
+int ble_ll_iso_setup_iso_data_path(const uint8_t *cmdbuf, uint8_t len);
+int ble_ll_iso_remove_iso_data_path(const uint8_t *cmdbuf, uint8_t len);
+int ble_ll_iso_transmit_test(const uint8_t *cmdbuf, uint8_t len);
+int ble_ll_iso_receive_test(const uint8_t *cmdbuf, uint8_t len);
+int ble_ll_iso_read_counters_test(const uint8_t *cmdbuf, uint8_t len);
+int ble_ll_iso_end_test(const uint8_t *cmdbuf, uint8_t len);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/libs/mynewt-nimble/nimble/controller/include/controller/ble_phy.h b/src/libs/mynewt-nimble/nimble/controller/include/controller/ble_phy.h
index cabb0adb..cd8350d6 100644
--- a/src/libs/mynewt-nimble/nimble/controller/include/controller/ble_phy.h
+++ b/src/libs/mynewt-nimble/nimble/controller/include/controller/ble_phy.h
@@ -225,6 +225,8 @@ static inline int ble_ll_phy_to_phy_mode(int phy, int phy_options)
if (phy == BLE_PHY_CODED && phy_options == BLE_HCI_LE_PHY_CODED_S2_PREF) {
phy_mode = BLE_PHY_MODE_CODED_500KBPS;
}
+#else
+ (void)phy_options;
#endif
return phy_mode;
diff --git a/src/libs/mynewt-nimble/nimble/controller/src/ble_ll.c b/src/libs/mynewt-nimble/nimble/controller/src/ble_ll.c
index 996ad9c3..a5c48978 100644
--- a/src/libs/mynewt-nimble/nimble/controller/src/ble_ll.c
+++ b/src/libs/mynewt-nimble/nimble/controller/src/ble_ll.c
@@ -247,9 +247,6 @@ uint8_t g_dev_addr[BLE_DEV_ADDR_LEN];
/** Our random address */
uint8_t g_random_addr[BLE_DEV_ADDR_LEN];
-/** Our supported features which can be controller by the host */
-uint64_t g_ble_ll_supported_host_features = 0;
-
static const uint16_t g_ble_ll_pdu_header_tx_time[BLE_PHY_NUM_MODE] =
{
[BLE_PHY_MODE_1M] =
@@ -1206,8 +1203,6 @@ ble_ll_task(void *arg)
/* Tell the host that we are ready to receive packets */
ble_ll_hci_send_noop();
- ble_ll_rand_start();
-
while (1) {
ev = ble_npl_eventq_get(&g_ble_ll_data.ll_evq, BLE_NPL_TIME_FOREVER);
assert(ev);
@@ -1305,10 +1300,6 @@ ble_ll_set_host_feat(const uint8_t *cmdbuf, uint8_t len)
mask = (uint64_t)1 << (cmd->bit_num);
if (!(mask & BLE_LL_HOST_CONTROLLED_FEATURES)) {
- return BLE_ERR_INV_HCI_CMD_PARMS;
- }
-
- if (!(mask & g_ble_ll_supported_host_features)) {
return BLE_ERR_UNSUPPORTED;
}
@@ -1372,6 +1363,20 @@ ble_ll_mbuf_init(struct os_mbuf *m, uint8_t pdulen, uint8_t hdr)
ble_hdr->txinfo.hdr_byte = hdr;
}
+static void
+ble_ll_validate_task(void)
+{
+#ifdef MYNEWT
+#ifndef NDEBUG
+ struct os_task_info oti;
+
+ os_task_info_get(&g_ble_ll_task, &oti);
+
+ BLE_LL_ASSERT(oti.oti_stkusage < oti.oti_stksize);
+#endif
+#endif
+}
+
/**
* Called to reset the controller. This performs a "software reset" of the link
* layer; it does not perform a HW reset of the controller nor does it reset
@@ -1388,6 +1393,9 @@ ble_ll_reset(void)
int rc;
os_sr_t sr;
+ /* do sanity check on LL task stack */
+ ble_ll_validate_task();
+
OS_ENTER_CRITICAL(sr);
ble_phy_disable();
ble_ll_sched_stop();
@@ -1447,23 +1455,6 @@ ble_ll_reset(void)
return rc;
}
-static void
-ble_ll_seed_prng(void)
-{
- uint32_t seed;
- int i;
-
- /* Seed random number generator with least significant bytes of device
- * address.
- */
- seed = 0;
- for (i = 0; i < 4; ++i) {
- seed |= g_dev_addr[i];
- seed <<= 8;
- }
- srand(seed);
-}
-
uint32_t
ble_ll_pdu_tx_time_get(uint16_t payload_len, int phy_mode)
{
@@ -1678,16 +1669,24 @@ ble_ll_init(void)
features |= BLE_LL_FEAT_SYNC_TRANS_SEND;
#endif
- /* Initialize random number generation */
- ble_ll_rand_init();
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_SCA_UPDATE)
+ features |= BLE_LL_FEAT_SCA_UPDATE;
+#endif
- /* XXX: This really doesn't belong here, as the address probably has not
- * been set yet.
- */
- ble_ll_seed_prng();
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO)
+ features |= BLE_LL_FEAT_CIS_MASTER;
+ features |= BLE_LL_FEAT_CIS_SLAVE;
+ features |= BLE_LL_FEAT_ISO_BROADCASTER;
+ features |= BLE_LL_FEAT_ISO_HOST_SUPPORT;
+#endif
lldata->ll_supp_features = features;
+ /* Initialize random number generation */
+ ble_ll_rand_init();
+ /* Start the random number generator */
+ ble_ll_rand_start();
+
rc = stats_init_and_reg(STATS_HDR(ble_ll_stats),
STATS_SIZE_INIT_PARMS(ble_ll_stats, STATS_SIZE_32),
STATS_NAME_INIT_PARMS(ble_ll_stats),
diff --git a/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_adv.c b/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_adv.c
index 4ffbe206..72c4e7d6 100644
--- a/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_adv.c
+++ b/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_adv.c
@@ -131,6 +131,7 @@ struct ble_ll_adv_sm
uint8_t aux_index : 1;
uint8_t aux_first_pdu : 1;
uint8_t aux_not_scanned : 1;
+ uint8_t aux_dropped : 1;
struct ble_mbuf_hdr *rx_ble_hdr;
struct os_mbuf **aux_data;
struct ble_ll_adv_aux aux[2];
@@ -685,7 +686,7 @@ ble_ll_adv_put_syncinfo(struct ble_ll_adv_sm *advsm,
dptr[8] = advsm->periodic_chanmap[4] & 0x1f;
/* SCA (3 bits) */
- dptr[8] |= MYNEWT_VAL(BLE_LL_MASTER_SCA) << 5;
+ dptr[8] |= BLE_LL_SCA_ENUM << 5;
/* AA (4 bytes) */
put_le32(&dptr[9], advsm->periodic_access_addr);
@@ -1269,7 +1270,7 @@ ble_ll_adv_secondary_tx_start_cb(struct ble_ll_sched_item *sch)
rc = ble_phy_tx_set_start_time(txstart, sch->remainder);
if (rc) {
STATS_INC(ble_ll_stats, adv_late_starts);
- goto adv_tx_done;
+ goto adv_aux_dropped;
}
#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_ENCRYPTION)
@@ -1304,7 +1305,7 @@ ble_ll_adv_secondary_tx_start_cb(struct ble_ll_sched_item *sch)
/* Transmit advertisement */
rc = ble_phy_tx(pducb, advsm, end_trans);
if (rc) {
- goto adv_tx_done;
+ goto adv_aux_dropped;
}
/* Enable/disable whitelisting based on filter policy */
@@ -1322,7 +1323,8 @@ ble_ll_adv_secondary_tx_start_cb(struct ble_ll_sched_item *sch)
return BLE_LL_SCHED_STATE_RUNNING;
-adv_tx_done:
+adv_aux_dropped:
+ advsm->aux_dropped = 1;
ble_ll_adv_tx_done(advsm);
return BLE_LL_SCHED_STATE_DONE;
}
@@ -1377,7 +1379,7 @@ ble_ll_adv_aux_calculate(struct ble_ll_adv_sm *advsm,
g_ble_ll_conn_params.num_used_chans,
g_ble_ll_conn_params.master_chan_map);
#else
- aux->chan = ble_ll_utils_remapped_channel(rand() % BLE_PHY_NUM_DATA_CHANS,
+ aux->chan = ble_ll_utils_remapped_channel(ble_ll_rand() % BLE_PHY_NUM_DATA_CHANS,
g_ble_ll_conn_params.master_chan_map);
#endif
@@ -1554,6 +1556,7 @@ ble_ll_adv_aux_schedule_first(struct ble_ll_adv_sm *advsm)
advsm->aux_index = 0;
advsm->aux_first_pdu = 1;
advsm->aux_not_scanned = 0;
+ advsm->aux_dropped = 0;
aux = AUX_CURRENT(advsm);
ble_ll_adv_aux_calculate(advsm, aux, 0);
@@ -1853,7 +1856,7 @@ ble_ll_adv_update_did(struct ble_ll_adv_sm *advsm)
* the previously used value.
*/
do {
- advsm->adi = (advsm->adi & 0xf000) | (rand() & 0x0fff);
+ advsm->adi = (advsm->adi & 0xf000) | (ble_ll_rand() & 0x0fff);
} while (old_adi == advsm->adi);
}
#endif
@@ -2544,11 +2547,11 @@ ble_ll_adv_sm_start_periodic(struct ble_ll_adv_sm *advsm)
advsm->periodic_num_used_chans = g_ble_ll_conn_params.num_used_chans;
advsm->periodic_event_cntr = 0;
/* for chaining we start with random counter as we share access addr */
- advsm->periodic_chain_event_cntr = rand();
+ advsm->periodic_chain_event_cntr = ble_ll_rand();
advsm->periodic_access_addr = ble_ll_utils_calc_access_addr();
advsm->periodic_channel_id = ((advsm->periodic_access_addr & 0xffff0000) >> 16) ^
(advsm->periodic_access_addr & 0x0000ffff);
- advsm->periodic_crcinit = rand() & 0xffffff;
+ advsm->periodic_crcinit = ble_ll_rand() & 0xffffff;
usecs = (uint32_t)advsm->periodic_adv_itvl_max * BLE_LL_ADV_PERIODIC_ITVL;
ticks = os_cputime_usecs_to_ticks(usecs);
@@ -2737,7 +2740,7 @@ ble_ll_adv_sm_start(struct ble_ll_adv_sm *advsm)
*/
earliest_start_time = ble_ll_rfmgmt_enable_now();
- start_delay_us = rand() % (BLE_LL_ADV_DELAY_MS_MAX * 1000);
+ start_delay_us = ble_ll_rand() % (BLE_LL_ADV_DELAY_MS_MAX * 1000);
advsm->adv_pdu_start_time = os_cputime_get32() +
os_cputime_usecs_to_ticks(start_delay_us);
@@ -4019,8 +4022,8 @@ ble_ll_adv_periodic_send_sync_ind(struct ble_ll_adv_sm *advsm,
/* SID, AType, SCA */
sync_ind[24] = (advsm->adi >> 12);
- sync_ind[24] |= !!(advsm->flags & BLE_LL_ADV_SM_FLAG_TX_ADD) << 4 ;
- sync_ind[24] |= MYNEWT_VAL(BLE_LL_MASTER_SCA) << 5;
+ sync_ind[24] |= !!(advsm->flags & BLE_LL_ADV_SM_FLAG_TX_ADD) << 4;
+ sync_ind[24] |= BLE_LL_SCA_ENUM << 5;
/* PHY */
sync_ind[25] = (0x01 << (advsm->sec_phy - 1));
@@ -4836,6 +4839,11 @@ ble_ll_adv_sec_done(struct ble_ll_adv_sm *advsm)
/* We don't need RF anymore */
ble_ll_rfmgmt_release();
+ if (advsm->aux_dropped) {
+ ble_ll_adv_drop_event(advsm);
+ return;
+ }
+
if (advsm->aux_not_scanned) {
ble_ll_sched_rmv_elem(&aux_next->sch);
}
diff --git a/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_conn.c b/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_conn.c
index 1b17a0d2..b8352f4a 100644
--- a/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_conn.c
+++ b/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_conn.c
@@ -225,6 +225,166 @@ STATS_NAME_END(ble_ll_conn_stats)
static void ble_ll_conn_event_end(struct ble_npl_event *ev);
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_CTRL_TO_HOST_FLOW_CONTROL)
+struct ble_ll_conn_cth_flow {
+ bool enabled;
+ uint16_t max_buffers;
+ uint16_t num_buffers;
+};
+
+static struct ble_ll_conn_cth_flow g_ble_ll_conn_cth_flow;
+
+static struct ble_npl_event g_ble_ll_conn_cth_flow_error_ev;
+
+static bool
+ble_ll_conn_cth_flow_is_enabled(void)
+{
+ return g_ble_ll_conn_cth_flow.enabled;
+}
+
+static bool
+ble_ll_conn_cth_flow_alloc_credit(struct ble_ll_conn_sm *connsm)
+{
+ struct ble_ll_conn_cth_flow *cth = &g_ble_ll_conn_cth_flow;
+ os_sr_t sr;
+
+ OS_ENTER_CRITICAL(sr);
+
+ if (!cth->num_buffers) {
+ OS_EXIT_CRITICAL(sr);
+ return false;
+ }
+
+ connsm->cth_flow_pending++;
+ cth->num_buffers--;
+
+ OS_EXIT_CRITICAL(sr);
+
+ return true;
+}
+
+static void
+ble_ll_conn_cth_flow_free_credit(struct ble_ll_conn_sm *connsm, uint16_t credits)
+{
+ struct ble_ll_conn_cth_flow *cth = &g_ble_ll_conn_cth_flow;
+ os_sr_t sr;
+
+ OS_ENTER_CRITICAL(sr);
+
+ /*
+ * It's not quite clear what we should do if host gives back more credits
+ * that we have allocated. For now let's just set invalid values back to
+ * sane values and continue.
+ */
+
+ cth->num_buffers += credits;
+ if (cth->num_buffers > cth->max_buffers) {
+ cth->num_buffers = cth->max_buffers;
+ }
+
+ if (connsm->cth_flow_pending < credits) {
+ connsm->cth_flow_pending = 0;
+ } else {
+ connsm->cth_flow_pending -= credits;
+ }
+
+ OS_EXIT_CRITICAL(sr);
+}
+
+static void
+ble_ll_conn_cth_flow_error_fn(struct ble_npl_event *ev)
+{
+ struct ble_hci_ev *hci_ev;
+ struct ble_hci_ev_command_complete *hci_ev_cp;
+ uint16_t opcode;
+
+ hci_ev = (void *)ble_hci_trans_buf_alloc(BLE_HCI_TRANS_BUF_EVT_HI);
+ if (!hci_ev) {
+ /* Not much we can do anyway... */
+ return;
+ }
+
+ /*
+ * We are here in case length of HCI_Host_Number_Of_Completed_Packets was
+ * invalid. We will send an error back to host and we can only hope host is
+ * reasonable and will do some actions to recover, e.g. it should disconnect
+ * all connections to guarantee that all credits are back in pool and we're
+ * back in sync (although spec does not really say what should happen).
+ */
+
+ opcode = BLE_HCI_OP(BLE_HCI_OGF_CTLR_BASEBAND,
+ BLE_HCI_OCF_CB_HOST_NUM_COMP_PKTS);
+
+ hci_ev->opcode = BLE_HCI_EVCODE_COMMAND_COMPLETE;
+ hci_ev->length = sizeof(*hci_ev_cp);
+
+ hci_ev_cp = (void *)hci_ev->data;
+ hci_ev_cp->num_packets = BLE_LL_CFG_NUM_HCI_CMD_PKTS;
+ hci_ev_cp->opcode = htole16(opcode);
+ hci_ev_cp->status = BLE_ERR_INV_HCI_CMD_PARMS;
+
+ ble_ll_hci_event_send(hci_ev);
+}
+
+void
+ble_ll_conn_cth_flow_set_buffers(uint16_t num_buffers)
+{
+ BLE_LL_ASSERT(num_buffers);
+
+ g_ble_ll_conn_cth_flow.max_buffers = num_buffers;
+ g_ble_ll_conn_cth_flow.num_buffers = num_buffers;
+}
+
+bool
+ble_ll_conn_cth_flow_enable(bool enabled)
+{
+ struct ble_ll_conn_cth_flow *cth = &g_ble_ll_conn_cth_flow;
+
+ if (cth->enabled == enabled) {
+ return true;
+ }
+
+ if (!SLIST_EMPTY(&g_ble_ll_conn_active_list)) {
+ return false;
+ }
+
+ cth->enabled = enabled;
+
+ return true;
+}
+
+void
+ble_ll_conn_cth_flow_process_cmd(const uint8_t *cmdbuf)
+{
+ const struct ble_hci_cmd *cmd;
+ const struct ble_hci_cb_host_num_comp_pkts_cp *cp;
+ struct ble_ll_conn_sm *connsm;
+ int i;
+
+ cmd = (const void *)cmdbuf;
+ cp = (const void *)cmd->data;
+
+ if (cmd->length != sizeof(cp->handles) + cp->handles * sizeof(cp->h[0])) {
+ ble_npl_eventq_put(&g_ble_ll_data.ll_evq, &g_ble_ll_conn_cth_flow_error_ev);
+ return;
+ }
+
+ for (i = 0; i < cp->handles; i++) {
+ /*
+ * It's probably ok that we do not have active connection with given
+ * handle - this can happen if disconnection already happened in LL but
+ * host sent credits back before processing disconnection event. In such
+ * case we can simply ignore command for that connection since credits
+ * are returned by LL already.
+ */
+ connsm = ble_ll_conn_find_active_conn(cp->h[i].handle);
+ if (connsm) {
+ ble_ll_conn_cth_flow_free_credit(connsm, cp->h[i].count);
+ }
+ }
+}
+#endif
+
#if (BLE_LL_BT5_PHY_SUPPORTED == 1)
/**
* Checks to see if we should start a PHY update procedure
@@ -332,7 +492,7 @@ ble_ll_conn_is_lru(struct ble_ll_conn_sm *s1, struct ble_ll_conn_sm *s2)
int rc;
/* Set time that we last serviced the schedule */
- if ((int32_t)(s1->last_scheduled - s2->last_scheduled) < 0) {
+ if (CPUTIME_LT(s1->last_scheduled, s2->last_scheduled)) {
rc = 1;
} else {
rc = 0;
@@ -855,8 +1015,14 @@ ble_ll_conn_tx_pdu(struct ble_ll_conn_sm *connsm)
/*
* If we are encrypting, we are only allowed to send certain
* kinds of LL control PDU's. If none is enqueued, send empty pdu!
+ *
+ * In Slave role, we are allowed to send unencrypted packets until
+ * LL_ENC_RSP is sent.
*/
- if (connsm->enc_data.enc_state > CONN_ENC_S_ENCRYPTED) {
+ if (((connsm->enc_data.enc_state > CONN_ENC_S_ENCRYPTED) &&
+ CONN_IS_MASTER(connsm)) ||
+ ((connsm->enc_data.enc_state > CONN_ENC_S_ENC_RSP_TO_BE_SENT) &&
+ CONN_IS_SLAVE(connsm))) {
if (!ble_ll_ctrl_enc_allowed_pdu_tx(pkthdr)) {
CONN_F_EMPTY_PDU_TXD(connsm) = 1;
goto conn_tx_pdu;
@@ -991,10 +1157,10 @@ ble_ll_conn_tx_pdu(struct ble_ll_conn_sm *connsm)
}
ticks = os_cputime_usecs_to_ticks(ticks);
- if ((int32_t)((os_cputime_get32() + ticks) - next_event_time) < 0) {
+ if (CPUTIME_LT(os_cputime_get32() + ticks, next_event_time)) {
md = 1;
}
- }
+ }
/* If we send an empty PDU we need to initialize the header */
conn_tx_pdu:
@@ -1450,10 +1616,10 @@ ble_ll_conn_master_common_init(struct ble_ll_conn_sm *connsm)
*/
connsm->tx_win_size = BLE_LL_CONN_TX_WIN_MIN + 1;
connsm->tx_win_off = 0;
- connsm->master_sca = MYNEWT_VAL(BLE_LL_MASTER_SCA);
+ connsm->master_sca = BLE_LL_SCA_ENUM;
/* Hop increment is a random value between 5 and 16. */
- connsm->hop_inc = (rand() % 12) + 5;
+ connsm->hop_inc = (ble_ll_rand() % 12) + 5;
/* Set channel map to map requested by host */
connsm->num_used_chans = g_ble_ll_conn_params.num_used_chans;
@@ -1462,7 +1628,7 @@ ble_ll_conn_master_common_init(struct ble_ll_conn_sm *connsm)
/* Calculate random access address and crc initialization value */
connsm->access_addr = ble_ll_utils_calc_access_addr();
- connsm->crcinit = rand() & 0xffffff;
+ connsm->crcinit = ble_ll_rand() & 0xffffff;
/* Set initial schedule callback */
connsm->conn_sch.sched_cb = ble_ll_conn_event_start_cb;
@@ -1861,6 +2027,10 @@ ble_ll_conn_end(struct ble_ll_conn_sm *connsm, uint8_t ble_err)
/* Remove from the active connection list */
SLIST_REMOVE(&g_ble_ll_conn_active_list, connsm, ble_ll_conn_sm, act_sle);
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_CTRL_TO_HOST_FLOW_CONTROL)
+ ble_ll_conn_cth_flow_free_credit(connsm, connsm->cth_flow_pending);
+#endif
+
/* Free the current transmit pdu if there is one. */
if (connsm->cur_tx_pdu) {
os_mbuf_free_chain(connsm->cur_tx_pdu);
@@ -3239,6 +3409,13 @@ ble_ll_init_rx_isr_end(uint8_t *rxbuf, uint8_t crcok,
*/
memcpy(init_addr, rl->rl_local_rpa, BLE_DEV_ADDR_LEN);
}
+ } else if (!ble_ll_is_rpa(adv_addr, adv_addr_type)) {
+ /* undirected with ID address, assure privacy if on RL */
+ rl = ble_ll_resolv_list_find(adv_addr, adv_addr_type);
+ if (rl && (rl->rl_priv_mode == BLE_HCI_PRIVACY_NETWORK) &&
+ rl->rl_has_peer) {
+ goto init_rx_isr_exit;
+ }
}
#endif
@@ -3452,129 +3629,142 @@ ble_ll_conn_rx_data_pdu(struct os_mbuf *rxpdu, struct ble_mbuf_hdr *hdr)
uint16_t acl_hdr;
struct ble_ll_conn_sm *connsm;
- if (BLE_MBUF_HDR_CRC_OK(hdr)) {
- /* XXX: there is a chance that the connection was thrown away and
- re-used before processing packets here. Fix this. */
- /* We better have a connection state machine */
- connsm = ble_ll_conn_find_active_conn(hdr->rxinfo.handle);
- if (connsm) {
- /* Check state machine */
- ble_ll_conn_chk_csm_flags(connsm);
+ /* Packets with invalid CRC are not sent to LL */
+ BLE_LL_ASSERT(BLE_MBUF_HDR_CRC_OK(hdr));
- /* Validate rx data pdu */
- rxbuf = rxpdu->om_data;
- hdr_byte = rxbuf[0];
- acl_len = rxbuf[1];
- llid = hdr_byte & BLE_LL_DATA_HDR_LLID_MASK;
+ /* XXX: there is a chance that the connection was thrown away and
+ re-used before processing packets here. Fix this. */
+ /* We better have a connection state machine */
+ connsm = ble_ll_conn_find_active_conn(hdr->rxinfo.handle);
+ if (!connsm) {
+ STATS_INC(ble_ll_conn_stats, no_conn_sm);
+ goto conn_rx_data_pdu_end;
+ }
- /*
- * Check that the LLID and payload length are reasonable.
- * Empty payload is only allowed for LLID == 01b.
- * */
- if ((llid == 0) ||
- ((acl_len == 0) && (llid != BLE_LL_LLID_DATA_FRAG))) {
- STATS_INC(ble_ll_conn_stats, rx_bad_llid);
- goto conn_rx_data_pdu_end;
- }
+ /* Check state machine */
+ ble_ll_conn_chk_csm_flags(connsm);
+
+ /* Validate rx data pdu */
+ rxbuf = rxpdu->om_data;
+ hdr_byte = rxbuf[0];
+ acl_len = rxbuf[1];
+ llid = hdr_byte & BLE_LL_DATA_HDR_LLID_MASK;
+
+ /*
+ * Check that the LLID and payload length are reasonable.
+ * Empty payload is only allowed for LLID == 01b.
+ * */
+ if ((llid == 0) || ((acl_len == 0) && (llid != BLE_LL_LLID_DATA_FRAG))) {
+ STATS_INC(ble_ll_conn_stats, rx_bad_llid);
+ goto conn_rx_data_pdu_end;
+ }
#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_ENCRYPTION)
- /* Check if PDU is allowed when encryption is started. If not,
- * terminate connection.
- *
- * Reference: Core 5.0, Vol 6, Part B, 5.1.3.1
- */
- if ((connsm->enc_data.enc_state > CONN_ENC_S_PAUSE_ENC_RSP_WAIT) &&
- !ble_ll_ctrl_enc_allowed_pdu_rx(rxpdu)) {
- ble_ll_conn_timeout(connsm, BLE_ERR_CONN_TERM_MIC);
- goto conn_rx_data_pdu_end;
- }
+ /* Check if PDU is allowed when encryption is started. If not,
+ * terminate connection.
+ *
+ * Reference: Core 5.0, Vol 6, Part B, 5.1.3.1
+ */
+ if ((connsm->enc_data.enc_state > CONN_ENC_S_PAUSE_ENC_RSP_WAIT &&
+ CONN_IS_MASTER(connsm)) ||
+ (connsm->enc_data.enc_state >= CONN_ENC_S_ENC_RSP_TO_BE_SENT &&
+ CONN_IS_SLAVE(connsm))) {
+ if (!ble_ll_ctrl_enc_allowed_pdu_rx(rxpdu)) {
+ ble_ll_conn_timeout(connsm, BLE_ERR_CONN_TERM_MIC);
+ goto conn_rx_data_pdu_end;
+ }
+ }
#endif
#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_PING)
- /*
- * Reset authenticated payload timeout if valid MIC. NOTE: we dont
- * check the MIC failure bit as that would have terminated the
- * connection
- */
- if ((connsm->enc_data.enc_state == CONN_ENC_S_ENCRYPTED) &&
- CONN_F_LE_PING_SUPP(connsm) && (acl_len != 0)) {
- ble_ll_conn_auth_pyld_timer_start(connsm);
- }
+ /*
+ * Reset authenticated payload timeout if valid MIC. NOTE: we dont
+ * check the MIC failure bit as that would have terminated the
+ * connection
+ */
+ if ((connsm->enc_data.enc_state == CONN_ENC_S_ENCRYPTED) &&
+ CONN_F_LE_PING_SUPP(connsm) && (acl_len != 0)) {
+ ble_ll_conn_auth_pyld_timer_start(connsm);
+ }
#endif
- /* Update RSSI */
- connsm->conn_rssi = hdr->rxinfo.rssi;
+ /* Update RSSI */
+ connsm->conn_rssi = hdr->rxinfo.rssi;
- /*
- * If we are a slave, we can only start to use slave latency
- * once we have received a NESN of 1 from the master
- */
- if (connsm->conn_role == BLE_LL_CONN_ROLE_SLAVE) {
- if (hdr_byte & BLE_LL_DATA_HDR_NESN_MASK) {
- connsm->csmflags.cfbit.allow_slave_latency = 1;
- }
- }
+ /*
+ * If we are a slave, we can only start to use slave latency
+ * once we have received a NESN of 1 from the master
+ */
+ if (connsm->conn_role == BLE_LL_CONN_ROLE_SLAVE) {
+ if (hdr_byte & BLE_LL_DATA_HDR_NESN_MASK) {
+ connsm->csmflags.cfbit.allow_slave_latency = 1;
+ }
+ }
- /*
- * Discard the received PDU if the sequence number is the same
- * as the last received sequence number
- */
- rxd_sn = hdr_byte & BLE_LL_DATA_HDR_SN_MASK;
- if (rxd_sn != connsm->last_rxd_sn) {
- /* Update last rxd sn */
- connsm->last_rxd_sn = rxd_sn;
-
- /* No need to do anything if empty pdu */
- if ((llid == BLE_LL_LLID_DATA_FRAG) && (acl_len == 0)) {
- goto conn_rx_data_pdu_end;
- }
+ /*
+ * Discard the received PDU if the sequence number is the same
+ * as the last received sequence number
+ */
+ rxd_sn = hdr_byte & BLE_LL_DATA_HDR_SN_MASK;
+ if (rxd_sn == connsm->last_rxd_sn) {
+ STATS_INC(ble_ll_conn_stats, data_pdu_rx_dup);
+ goto conn_rx_data_pdu_end;
+ }
+
+ /* Update last rxd sn */
+ connsm->last_rxd_sn = rxd_sn;
+
+ /* No need to do anything if empty pdu */
+ if ((llid == BLE_LL_LLID_DATA_FRAG) && (acl_len == 0)) {
+ goto conn_rx_data_pdu_end;
+ }
#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_ENCRYPTION)
- /*
- * XXX: should we check to see if we are in a state where we
- * might expect to get an encrypted PDU?
- */
- if (BLE_MBUF_HDR_MIC_FAILURE(hdr)) {
- STATS_INC(ble_ll_conn_stats, mic_failures);
- ble_ll_conn_timeout(connsm, BLE_ERR_CONN_TERM_MIC);
- goto conn_rx_data_pdu_end;
- }
+ /*
+ * XXX: should we check to see if we are in a state where we
+ * might expect to get an encrypted PDU?
+ */
+ if (BLE_MBUF_HDR_MIC_FAILURE(hdr)) {
+ STATS_INC(ble_ll_conn_stats, mic_failures);
+ ble_ll_conn_timeout(connsm, BLE_ERR_CONN_TERM_MIC);
+ goto conn_rx_data_pdu_end;
+ }
#endif
- if (llid == BLE_LL_LLID_CTRL) {
- /* Process control frame */
- STATS_INC(ble_ll_conn_stats, rx_ctrl_pdus);
- if (ble_ll_ctrl_rx_pdu(connsm, rxpdu)) {
- STATS_INC(ble_ll_conn_stats, rx_malformed_ctrl_pdus);
- }
- } else {
- /* Count # of received l2cap frames and byes */
- STATS_INC(ble_ll_conn_stats, rx_l2cap_pdus);
- STATS_INCN(ble_ll_conn_stats, rx_l2cap_bytes, acl_len);
-
- /* NOTE: there should be at least two bytes available */
- BLE_LL_ASSERT(OS_MBUF_LEADINGSPACE(rxpdu) >= 2);
- os_mbuf_prepend(rxpdu, 2);
- rxbuf = rxpdu->om_data;
-
- acl_hdr = (llid << 12) | connsm->conn_handle;
- put_le16(rxbuf, acl_hdr);
- put_le16(rxbuf + 2, acl_len);
- ble_hci_trans_ll_acl_tx(rxpdu);
- }
-
- /* NOTE: we dont free the mbuf since we handed it off! */
- return;
- } else {
- STATS_INC(ble_ll_conn_stats, data_pdu_rx_dup);
- }
- } else {
- STATS_INC(ble_ll_conn_stats, no_conn_sm);
+ if (llid == BLE_LL_LLID_CTRL) {
+ /* Process control frame */
+ STATS_INC(ble_ll_conn_stats, rx_ctrl_pdus);
+ if (ble_ll_ctrl_rx_pdu(connsm, rxpdu)) {
+ STATS_INC(ble_ll_conn_stats, rx_malformed_ctrl_pdus);
}
+ } else {
+ /* Count # of received l2cap frames and byes */
+ STATS_INC(ble_ll_conn_stats, rx_l2cap_pdus);
+ STATS_INCN(ble_ll_conn_stats, rx_l2cap_bytes, acl_len);
+
+ /* NOTE: there should be at least two bytes available */
+ BLE_LL_ASSERT(OS_MBUF_LEADINGSPACE(rxpdu) >= 2);
+ os_mbuf_prepend(rxpdu, 2);
+ rxbuf = rxpdu->om_data;
+
+ acl_hdr = (llid << 12) | connsm->conn_handle;
+ put_le16(rxbuf, acl_hdr);
+ put_le16(rxbuf + 2, acl_len);
+ ble_hci_trans_ll_acl_tx(rxpdu);
}
+ /* NOTE: we dont free the mbuf since we handed it off! */
+ return;
+
/* Free buffer */
conn_rx_data_pdu_end:
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_CTRL_TO_HOST_FLOW_CONTROL)
+ /* Need to give credit back if we allocated one for this PDU */
+ if (hdr->rxinfo.flags & BLE_MBUF_HDR_F_CONN_CREDIT) {
+ ble_ll_conn_cth_flow_free_credit(connsm, 1);
+ }
+#endif
+
os_mbuf_free_chain(rxpdu);
}
@@ -3595,7 +3785,6 @@ int
ble_ll_conn_rx_isr_end(uint8_t *rxbuf, struct ble_mbuf_hdr *rxhdr)
{
int rc;
- int is_ctrl;
uint8_t hdr_byte;
uint8_t hdr_sn;
uint8_t hdr_nesn;
@@ -3609,29 +3798,58 @@ ble_ll_conn_rx_isr_end(uint8_t *rxbuf, struct ble_mbuf_hdr *rxhdr)
uint32_t add_usecs;
struct os_mbuf *txpdu;
struct ble_ll_conn_sm *connsm;
- struct os_mbuf *rxpdu;
+ struct os_mbuf *rxpdu = NULL;
struct ble_mbuf_hdr *txhdr;
int rx_phy_mode;
+ bool alloc_rxpdu = true;
+
+ rc = -1;
+ connsm = g_ble_ll_conn_cur_sm;
/* Retrieve the header and payload length */
hdr_byte = rxbuf[0];
rx_pyld_len = rxbuf[1];
/*
+ * No need to alloc rxpdu for packets with invalid CRC, we would throw them
+ * away instantly from LL anyway.
+ */
+ if (!BLE_MBUF_HDR_CRC_OK(rxhdr)) {
+ alloc_rxpdu = false;
+ }
+
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_CTRL_TO_HOST_FLOW_CONTROL)
+ /*
+ * If flow control is enabled, we need to have credit available for each
+ * non-empty data packet that LL may send to host. If there are no credits
+ * available, we don't need to allocate buffer for this packet so LL will
+ * nak it.
+ */
+ if (alloc_rxpdu && ble_ll_conn_cth_flow_is_enabled() &&
+ BLE_LL_LLID_IS_DATA(hdr_byte) && (rx_pyld_len > 0)) {
+ if (ble_ll_conn_cth_flow_alloc_credit(connsm)) {
+ rxhdr->rxinfo.flags |= BLE_MBUF_HDR_F_CONN_CREDIT;
+ } else {
+ alloc_rxpdu = false;
+ }
+ }
+#endif
+
+ /*
* We need to attempt to allocate a buffer here. The reason we do this
* now is that we should not ack the packet if we have no receive
* buffers available. We want to free up our transmit PDU if it was
* acked, but we should not ack the received frame if we cant hand it up.
* NOTE: we hand up empty pdu's to the LL task!
*/
- rxpdu = ble_ll_rxpdu_alloc(rx_pyld_len + BLE_LL_PDU_HDR_LEN);
+ if (alloc_rxpdu) {
+ rxpdu = ble_ll_rxpdu_alloc(rx_pyld_len + BLE_LL_PDU_HDR_LEN);
+ }
/*
* We should have a current connection state machine. If we dont, we just
* hand the packet to the higher layer to count it.
*/
- rc = -1;
- connsm = g_ble_ll_conn_cur_sm;
if (!connsm) {
STATS_INC(ble_ll_conn_stats, rx_data_pdu_no_conn);
goto conn_exit;
@@ -3693,9 +3911,7 @@ ble_ll_conn_rx_isr_end(uint8_t *rxbuf, struct ble_mbuf_hdr *rxhdr)
/* Set last received header byte */
connsm->last_rxd_hdr_byte = hdr_byte;
- is_ctrl = 0;
- if ((hdr_byte & BLE_LL_DATA_HDR_LLID_MASK) == BLE_LL_LLID_CTRL) {
- is_ctrl = 1;
+ if (BLE_LL_LLID_IS_CTRL(hdr_byte)) {
opcode = rxbuf[2];
}
@@ -3784,7 +4000,7 @@ ble_ll_conn_rx_isr_end(uint8_t *rxbuf, struct ble_mbuf_hdr *rxhdr)
/* Adjust payload for max TX time and octets */
#if (BLE_LL_BT5_PHY_SUPPORTED == 1)
- if (is_ctrl &&
+ if (BLE_LL_LLID_IS_CTRL(hdr_byte) &&
(connsm->conn_role == BLE_LL_CONN_ROLE_SLAVE) &&
(opcode == BLE_LL_CTRL_PHY_UPDATE_IND)) {
connsm->phy_tx_transition =
@@ -3803,8 +4019,9 @@ ble_ll_conn_rx_isr_end(uint8_t *rxbuf, struct ble_mbuf_hdr *rxhdr)
/* If this is a TERMINATE_IND, we have to reply */
chk_rx_terminate_ind:
/* If we received a terminate IND, we must set some flags */
- if (is_ctrl && (opcode == BLE_LL_CTRL_TERMINATE_IND)
- && (rx_pyld_len == (1 + BLE_LL_CTRL_TERMINATE_IND_LEN))) {
+ if (BLE_LL_LLID_IS_CTRL(hdr_byte) &&
+ (opcode == BLE_LL_CTRL_TERMINATE_IND) &&
+ (rx_pyld_len == (1 + BLE_LL_CTRL_TERMINATE_IND_LEN))) {
connsm->csmflags.cfbit.terminate_ind_rxd = 1;
connsm->rxd_disconnect_reason = rxbuf[3];
}
@@ -4226,6 +4443,12 @@ ble_ll_conn_module_reset(void)
g_ble_ll_conn_sync_transfer_params.mode = 0;
g_ble_ll_conn_sync_transfer_params.sync_timeout_us = 0;
#endif
+
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_CTRL_TO_HOST_FLOW_CONTROL)
+ g_ble_ll_conn_cth_flow.enabled = false;
+ g_ble_ll_conn_cth_flow.max_buffers = 1;
+ g_ble_ll_conn_cth_flow.num_buffers = 1;
+#endif
}
/* Initialize the connection module */
@@ -4265,6 +4488,11 @@ ble_ll_conn_module_init(void)
"ble_ll_conn");
BLE_LL_ASSERT(rc == 0);
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_CTRL_TO_HOST_FLOW_CONTROL)
+ ble_npl_event_init(&g_ble_ll_conn_cth_flow_error_ev,
+ ble_ll_conn_cth_flow_error_fn, NULL);
+#endif
+
/* Call reset to finish reset of initialization */
ble_ll_conn_module_reset();
}
diff --git a/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_conn_hci.c b/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_conn_hci.c
index 1350fdc0..9936b9d3 100644
--- a/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_conn_hci.c
+++ b/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_conn_hci.c
@@ -1128,16 +1128,11 @@ ble_ll_conn_create_cancel(ble_ll_hci_post_cmd_complete_cb *post_cmd_cb)
* @return int
*/
int
-ble_ll_conn_hci_disconnect_cmd(const uint8_t *cmdbuf, uint8_t len)
+ble_ll_conn_hci_disconnect_cmd(const struct ble_hci_lc_disconnect_cp *cmd)
{
int rc;
uint16_t handle;
struct ble_ll_conn_sm *connsm;
- const struct ble_hci_lc_disconnect_cp *cmd = (const void *) cmdbuf;
-
- if (len != sizeof (*cmd)) {
- return BLE_ERR_INV_HCI_CMD_PARMS;
- }
/* Check for valid parameters */
handle = le16toh(cmd->conn_handle);
@@ -1565,6 +1560,34 @@ ltk_key_cmd_complete:
}
#endif
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_SCA_UPDATE)
+int
+ble_ll_conn_req_peer_sca(const uint8_t *cmdbuf, uint8_t len,
+ uint8_t *rspbuf, uint8_t *rsplen)
+{
+ const struct ble_hci_le_request_peer_sca_cp *params = (const void *)cmdbuf;
+ struct ble_ll_conn_sm *connsm;
+
+ connsm = ble_ll_conn_find_active_conn(params->conn_handle);
+ if (!connsm) {
+ return BLE_ERR_UNK_CONN_ID;
+ }
+
+ if (!(connsm->remote_features[2] & (BLE_LL_FEAT_SCA_UPDATE >> 24))) {
+ return BLE_ERR_UNSUPP_REM_FEATURE;
+ }
+
+ if (IS_PENDING_CTRL_PROC(connsm, BLE_LL_CTRL_PROC_SCA_UPDATE)) {
+ /* Not really specified what we should return */
+ return BLE_ERR_CTLR_BUSY;
+ }
+
+ ble_ll_ctrl_proc_start(connsm, BLE_LL_CTRL_PROC_SCA_UPDATE);
+
+ return 0;
+}
+#endif
+
#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_PING)
/**
* Read authenticated payload timeout (OGF=3, OCF==0x007B)
diff --git a/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_conn_priv.h b/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_conn_priv.h
index f2f72d17..53358c4a 100644
--- a/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_conn_priv.h
+++ b/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_conn_priv.h
@@ -164,7 +164,7 @@ bool ble_ll_conn_init_pending_aux_conn_rsp(void);
void ble_ll_disconn_comp_event_send(struct ble_ll_conn_sm *connsm,
uint8_t reason);
void ble_ll_auth_pyld_tmo_event_send(struct ble_ll_conn_sm *connsm);
-int ble_ll_conn_hci_disconnect_cmd(const uint8_t *cmdbuf, uint8_t len);
+int ble_ll_conn_hci_disconnect_cmd(const struct ble_hci_lc_disconnect_cp *cmd);
int ble_ll_conn_hci_rd_rem_ver_cmd(const uint8_t *cmdbuf, uint8_t len);
int ble_ll_conn_create(const uint8_t *cmdbuf, uint8_t len);
int ble_ll_conn_hci_update(const uint8_t *cmdbuf, uint8_t len);
@@ -196,12 +196,23 @@ int ble_ll_conn_hci_wr_auth_pyld_tmo(const uint8_t *cmdbuf, uint8_t len,
uint8_t *rspbuf, uint8_t *rsplen);
int ble_ll_conn_hci_rd_auth_pyld_tmo(const uint8_t *cmdbuf, uint8_t len,
uint8_t *rspbuf, uint8_t *rsplen);
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_SCA_UPDATE)
+int ble_ll_conn_req_peer_sca(const uint8_t *cmdbuf, uint8_t len,
+ uint8_t *rspbuf, uint8_t *rsplen);
+#endif
+
#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_PING)
void ble_ll_conn_auth_pyld_timer_start(struct ble_ll_conn_sm *connsm);
#else
#define ble_ll_conn_auth_pyld_timer_start(x)
#endif
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_CTRL_TO_HOST_FLOW_CONTROL)
+void ble_ll_conn_cth_flow_set_buffers(uint16_t num_buffers);
+bool ble_ll_conn_cth_flow_enable(bool enabled);
+void ble_ll_conn_cth_flow_process_cmd(const uint8_t *cmdbuf);
+#endif
+
int ble_ll_hci_cmd_rx(uint8_t *cmd, void *arg);
int ble_ll_hci_acl_rx(struct os_mbuf *om, void *arg);
diff --git a/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_ctrl.c b/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_ctrl.c
index ea2ba834..c4ac6504 100644
--- a/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_ctrl.c
+++ b/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_ctrl.c
@@ -112,6 +112,10 @@ const uint8_t g_ble_ll_ctrl_pkt_lengths[BLE_LL_CTRL_OPCODES] =
BLE_LL_CTRL_PERIODIC_SYNC_IND_LEN,
BLE_LL_CTRL_CLOCK_ACCURACY_REQ_LEN,
BLE_LL_CTRL_CLOCK_ACCURACY_RSP_LEN,
+ BLE_LL_CTRL_CIS_REQ_LEN,
+ BLE_LL_CTRL_CIS_RSP_LEN,
+ BLE_LL_CTRL_CIS_IND_LEN,
+ BLE_LL_CTRL_CIS_TERMINATE_LEN
};
/**
@@ -506,6 +510,12 @@ ble_ll_ctrl_proc_unk_rsp(struct ble_ll_conn_sm *connsm, uint8_t *dptr, uint8_t *
ctrl_proc = BLE_LL_CTRL_PROC_PHY_UPDATE;
break;
#endif
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_SCA_UPDATE)
+ case BLE_LL_CTRL_CLOCK_ACCURACY_REQ:
+ ble_ll_hci_ev_sca_update(connsm, BLE_ERR_UNSUPPORTED, 0);
+ ctrl_proc = BLE_LL_CTRL_PROC_SCA_UPDATE;
+ break;
+#endif
default:
ctrl_proc = BLE_LL_CTRL_PROC_NUM;
break;
@@ -836,6 +846,20 @@ ble_ll_ctrl_phy_req_rsp_make(struct ble_ll_conn_sm *connsm, uint8_t *ctrdata)
}
}
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_SCA_UPDATE)
+/**
+ * Create a LL_CLOCK_ACCURACY_REQ or LL_CLOCK_ACCURACY_RSP pdu
+ *
+ * @param connsm Pointer to connection state machine
+ * @param ctrdata: Pointer to where CtrData starts in pdu
+ */
+static void
+ble_ll_ctrl_sca_req_rsp_make(struct ble_ll_conn_sm *connsm, uint8_t *ctrdata)
+{
+ ctrdata[0] = BLE_LL_SCA_ENUM;
+}
+#endif
+
static uint8_t
ble_ll_ctrl_rx_phy_req(struct ble_ll_conn_sm *connsm, uint8_t *req,
uint8_t *rsp)
@@ -1040,11 +1064,70 @@ ble_ll_ctrl_rx_periodic_sync_ind(struct ble_ll_conn_sm *connsm, uint8_t *dptr)
connsm->sync_transfer_skip,
connsm->sync_transfer_sync_timeout);
}
+ return BLE_ERR_MAX;
+}
+#endif
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_SCA_UPDATE)
+/**
+ * Called when a BLE_LL_CTRL_CLOCK_ACCURACY_REQ PDU is received
+ *
+ * @param connsm
+ * @param dptr
+ * @param rsp Pointer to CtrData of BLE_LL_CTRL_CLOCK_ACCURACY_RSP.
+ *
+ * @return uint8_t
+ */
+static uint8_t
+ble_ll_ctrl_rx_sca_req(struct ble_ll_conn_sm *connsm, uint8_t *dptr,
+ uint8_t *rsp)
+{
+ ble_ll_ctrl_sca_req_rsp_make(connsm, rsp);
+ return BLE_LL_CTRL_CLOCK_ACCURACY_RSP;
+}
+
+/**
+ * Called when a BLE_LL_CTRL_CLOCK_ACCURACY_RSP PDU is received
+ *
+ * @param connsm
+ * @param dptr
+ *
+ * @return uint8_t
+ */
+static uint8_t
+ble_ll_ctrl_rx_sca_rsp(struct ble_ll_conn_sm *connsm, uint8_t *dptr)
+{
+ if (connsm->cur_ctrl_proc != BLE_LL_CTRL_PROC_SCA_UPDATE) {
+ return BLE_LL_CTRL_UNKNOWN_RSP;
+ }
+ ble_ll_ctrl_proc_stop(connsm, BLE_LL_CTRL_PROC_SCA_UPDATE);
+ ble_ll_hci_ev_sca_update(connsm, BLE_ERR_SUCCESS, dptr[0]);
return BLE_ERR_MAX;
}
+
#endif
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO)
+static uint8_t
+ble_ll_ctrl_rx_cis_req(struct ble_ll_conn_sm *connsm, uint8_t *dptr,
+ uint8_t *rspdata)
+{
+ return BLE_LL_CTRL_UNKNOWN_RSP;
+}
+
+static uint8_t
+ble_ll_ctrl_rx_cis_rsp(struct ble_ll_conn_sm *connsm, uint8_t *dptr,
+ uint8_t *rspdata)
+{
+ return BLE_LL_CTRL_UNKNOWN_RSP;
+}
+
+static uint8_t
+ble_ll_ctrl_rx_cis_ind(struct ble_ll_conn_sm *connsm, uint8_t *dptr)
+{
+ return BLE_LL_CTRL_UNKNOWN_RSP;
+}
+#endif
/**
* Create a link layer length request or length response PDU.
*
@@ -1250,6 +1333,15 @@ ble_ll_ctrl_start_enc_send(struct ble_ll_conn_sm *connsm)
return rc;
}
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO)
+static void
+ble_ll_ctrl_cis_create(struct ble_ll_conn_sm *connsm, uint8_t *dptr)
+{
+ /* TODO Implement */
+ return;
+}
+#endif
+
/**
* Create a link layer control "encrypt request" PDU.
*
@@ -1351,7 +1443,7 @@ ble_ll_ctrl_rx_enc_req(struct ble_ll_conn_sm *connsm, uint8_t *dptr,
return BLE_LL_CTRL_UNKNOWN_RSP;
}
- connsm->enc_data.enc_state = CONN_ENC_S_LTK_REQ_WAIT;
+ connsm->enc_data.enc_state = CONN_ENC_S_ENC_RSP_TO_BE_SENT;
/* In case we were already encrypted we need to reset packet counters */
connsm->enc_data.rx_pkt_cntr = 0;
@@ -1676,6 +1768,12 @@ ble_ll_ctrl_rx_reject_ind(struct ble_ll_conn_sm *connsm, uint8_t *dptr,
*/
ble_ll_ctrl_proc_stop(connsm, BLE_LL_CTRL_PROC_DATA_LEN_UPD);
break;
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_SCA_UPDATE)
+ case BLE_LL_CTRL_PROC_SCA_UPDATE:
+ ble_ll_hci_ev_sca_update(connsm, ble_error, 0);
+ ble_ll_ctrl_proc_stop(connsm, BLE_LL_CTRL_PROC_SCA_UPDATE);
+ break;
+#endif
default:
break;
}
@@ -2139,6 +2237,18 @@ ble_ll_ctrl_proc_init(struct ble_ll_conn_sm *connsm, int ctrl_proc)
ble_ll_ctrl_phy_req_rsp_make(connsm, ctrdata);
break;
#endif
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_SCA_UPDATE)
+ case BLE_LL_CTRL_PROC_SCA_UPDATE:
+ opcode = BLE_LL_CTRL_CLOCK_ACCURACY_REQ;
+ ble_ll_ctrl_sca_req_rsp_make(connsm, ctrdata);
+ break;
+#endif
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO)
+ case BLE_LL_CTRL_PROC_CIS_CREATE:
+ opcode = BLE_LL_CTRL_CIS_REQ;
+ ble_ll_ctrl_cis_create(connsm, ctrdata);
+ break;
+#endif
default:
BLE_LL_ASSERT(0);
break;
@@ -2568,6 +2678,26 @@ ble_ll_ctrl_rx_pdu(struct ble_ll_conn_sm *connsm, struct os_mbuf *om)
rsp_opcode = ble_ll_ctrl_rx_phy_update_ind(connsm, dptr);
break;
#endif
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_SCA_UPDATE)
+ case BLE_LL_CTRL_CLOCK_ACCURACY_REQ:
+ rsp_opcode = ble_ll_ctrl_rx_sca_req(connsm, dptr, rspdata);
+ break;
+ case BLE_LL_CTRL_CLOCK_ACCURACY_RSP:
+ rsp_opcode = ble_ll_ctrl_rx_sca_rsp(connsm, dptr);
+ break;
+#endif
+
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO)
+ case BLE_LL_CTRL_CIS_REQ:
+ rsp_opcode = ble_ll_ctrl_rx_cis_req(connsm, dptr, rspdata);
+ break;
+ case BLE_LL_CTRL_CIS_RSP:
+ rsp_opcode = ble_ll_ctrl_rx_cis_rsp(connsm, dptr, rspdata);
+ break;
+ case BLE_LL_CTRL_CIS_IND:
+ rsp_opcode = ble_ll_ctrl_rx_cis_ind(connsm, dptr);
+ break;
+#endif
#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_PERIODIC_ADV_SYNC_TRANSFER)
case BLE_LL_CTRL_PERIODIC_SYNC_IND:
rsp_opcode = ble_ll_ctrl_rx_periodic_sync_ind(connsm, dptr);
@@ -2709,6 +2839,7 @@ ble_ll_ctrl_tx_done(struct os_mbuf *txpdu, struct ble_ll_conn_sm *connsm)
connsm->enc_data.enc_state = CONN_ENC_S_ENC_RSP_WAIT;
break;
case BLE_LL_CTRL_ENC_RSP:
+ connsm->enc_data.enc_state = CONN_ENC_S_LTK_REQ_WAIT;
connsm->csmflags.cfbit.send_ltk_req = 1;
break;
case BLE_LL_CTRL_START_ENC_RSP:
diff --git a/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_hci.c b/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_hci.c
index b82adc2e..a3da98d9 100644
--- a/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_hci.c
+++ b/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_hci.c
@@ -33,6 +33,7 @@
#include "controller/ble_ll_whitelist.h"
#include "controller/ble_ll_resolv.h"
#include "controller/ble_ll_sync.h"
+#include "controller/ble_ll_iso.h"
#include "ble_ll_priv.h"
#include "ble_ll_conn_priv.h"
@@ -327,6 +328,31 @@ ble_ll_hci_le_read_bufsize(uint8_t *rspbuf, uint8_t *rsplen)
return BLE_ERR_SUCCESS;
}
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO)
+/**
+ * HCI read buffer size v2 command. Returns the ACL and ISO data packet length and
+ * num data packets.
+ *
+ * @param rspbuf Pointer to response buffer
+ * @param rsplen Length of response buffer
+ *
+ * @return int BLE error code
+ */
+static int
+ble_ll_hci_le_read_bufsize_v2(uint8_t *rspbuf, uint8_t *rsplen)
+{
+ struct ble_hci_le_rd_buf_size_v2_rp *rp = (void *) rspbuf;
+
+ rp->data_len = htole16(g_ble_ll_data.ll_acl_pkt_size);
+ rp->data_packets = g_ble_ll_data.ll_num_acl_pkts;
+ rp->iso_data_len = 0;
+ rp->iso_data_packets = 0;
+
+ *rsplen = sizeof(*rp);
+ return BLE_ERR_SUCCESS;
+}
+#endif
+
#if (BLE_LL_BT5_PHY_SUPPORTED == 1)
/**
* Checks the preferred phy masks for validity and places the preferred masks
@@ -618,6 +644,9 @@ ble_ll_hci_le_cmd_send_cmd_status(uint16_t ocf)
case BLE_HCI_OCF_LE_GEN_DHKEY:
case BLE_HCI_OCF_LE_SET_PHY:
case BLE_HCI_OCF_LE_PERIODIC_ADV_CREATE_SYNC:
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_SCA_UPDATE)
+ case BLE_HCI_OCF_LE_REQ_PEER_SCA:
+#endif
rc = 1;
break;
default:
@@ -1149,11 +1178,78 @@ ble_ll_hci_le_cmd_proc(const uint8_t *cmdbuf, uint8_t len, uint16_t ocf,
rc = ble_ll_set_default_sync_transfer_params(cmdbuf, len);
break;
#endif
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO)
+ case BLE_HCI_OCF_LE_READ_ISO_TX_SYNC:
+ rc = ble_ll_iso_read_tx_sync(cmdbuf, len);
+ break;
+ case BLE_HCI_OCF_LE_SET_CIG_PARAM:
+ rc = ble_ll_iso_set_cig_param(cmdbuf, len, rspbuf, rsplen);
+ break;
+ case BLE_HCI_OCF_LE_CREATE_CIS:
+ rc = ble_ll_iso_create_cis(cmdbuf, len);
+ break;
+ case BLE_HCI_OCF_LE_REMOVE_CIG:
+ rc = ble_ll_iso_remove_cig(cmdbuf, len, rspbuf, rsplen);
+ break;
+ case BLE_HCI_OCF_LE_ACCEPT_CIS_REQ:
+ rc = ble_ll_iso_accept_cis_req(cmdbuf, len);
+ break;
+ case BLE_HCI_OCF_LE_REJECT_CIS_REQ:
+ rc = ble_ll_iso_reject_cis_req(cmdbuf, len);
+ break;
+ case BLE_HCI_OCF_LE_CREATE_BIG:
+ rc = ble_ll_iso_create_big(cmdbuf, len);
+ break;
+ case BLE_HCI_OCF_LE_TERMINATE_BIG:
+ rc = ble_ll_iso_terminate_big(cmdbuf, len);
+ break;
+ case BLE_HCI_OCF_LE_BIG_CREATE_SYNC:
+ rc = ble_ll_iso_big_create_sync(cmdbuf, len);
+ break;
+ case BLE_HCI_OCF_LE_BIG_TERMINATE_SYNC:
+ rc = ble_ll_iso_big_terminate_sync(cmdbuf,len);
+ break;
+ case BLE_HCI_OCF_LE_SETUP_ISO_DATA_PATH:
+ rc = ble_ll_iso_setup_iso_data_path(cmdbuf, len);
+ break;
+ case BLE_HCI_OCF_LE_REMOVE_ISO_DATA_PATH:
+ rc = ble_ll_iso_remove_iso_data_path(cmdbuf, len);
+ break;
+ case BLE_HCI_OCF_LE_RD_BUF_SIZE_V2:
+ rc = ble_ll_hci_le_read_bufsize_v2(rspbuf, rsplen);
+ break;
+#endif
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO_TEST)
+ case BLE_HCI_OCF_LE_SET_CIG_PARAM_TEST:
+ rc = ble_ll_iso_set_cig_param_test(cmdbuf, len, rspbuf, rsplen);
+ break;
+ case BLE_HCI_OCF_LE_CREATE_BIG_TEST:
+ rc = ble_ll_iso_create_big_test(cmdbuf, len);
+ break;
+ case BLE_HCI_OCF_LE_ISO_TRANSMIT_TEST:
+ rc = ble_ll_iso_transmit_test(cmdbuf, len);
+ break;
+ case BLE_HCI_OCF_LE_ISO_RECEIVE_TEST:
+ rc = ble_ll_iso_receive_test(cmdbuf, len);
+ break;
+ case BLE_HCI_OCF_LE_ISO_READ_TEST_COUNTERS:
+ rc = ble_ll_iso_read_counters_test(cmdbuf, len);
+ break;
+ case BLE_HCI_OCF_LE_ISO_TEST_END:
+ rc = ble_ll_iso_end_test(cmdbuf, len);
+ break;
+#endif
#if MYNEWT_VAL(BLE_VERSION) >= 52
case BLE_HCI_OCF_LE_SET_HOST_FEAT:
rc = ble_ll_set_host_feat(cmdbuf, len);
break;
#endif
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_SCA_UPDATE)
+ case BLE_HCI_OCF_LE_REQ_PEER_SCA:
+ rc = ble_ll_conn_req_peer_sca(cmdbuf, len,
+ rspbuf, rsplen);
+ break;
+#endif
default:
rc = BLE_ERR_UNKNOWN_HCI_CMD;
break;
@@ -1174,6 +1270,26 @@ ble_ll_hci_le_cmd_proc(const uint8_t *cmdbuf, uint8_t len, uint16_t ocf,
return rc;
}
+static int
+ble_ll_hci_disconnect(const uint8_t *cmdbuf, uint8_t len)
+{
+ const struct ble_hci_lc_disconnect_cp *cmd;
+
+ cmd = (const void *) cmdbuf;
+
+ if (len != sizeof (*cmd)) {
+ return BLE_ERR_INV_HCI_CMD_PARMS;
+ }
+
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO)
+ if (le16toh(cmd->conn_handle) >= BLE_LL_CONN_HANDLE_ISO_OFFSET) {
+ return ble_ll_iso_disconnect_cmd(cmd);
+ }
+#endif
+
+ return ble_ll_conn_hci_disconnect_cmd(cmd);
+}
+
/**
* Process a link control command sent from the host to the controller. The HCI
* command has a 3 byte command header followed by data. The header is:
@@ -1194,7 +1310,7 @@ ble_ll_hci_link_ctrl_cmd_proc(const uint8_t *cmdbuf, uint8_t len, uint16_t ocf)
switch (ocf) {
case BLE_HCI_OCF_DISCONNECT_CMD:
- rc = ble_ll_conn_hci_disconnect_cmd(cmdbuf, len);
+ rc = ble_ll_hci_disconnect(cmdbuf, len);
/* Send command status instead of command complete */
rc += (BLE_ERR_MAX + 1);
break;
@@ -1227,6 +1343,64 @@ ble_ll_hci_cb_set_event_mask(const uint8_t *cmdbuf, uint8_t len)
return BLE_ERR_SUCCESS;
}
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_CTRL_TO_HOST_FLOW_CONTROL)
+static int
+ble_ll_hci_cb_set_ctrlr_to_host_fc(const uint8_t *cmdbuf, uint8_t len)
+{
+ const struct ble_hci_cb_ctlr_to_host_fc_cp *cmd = (const void *) cmdbuf;
+
+ if (len != sizeof (*cmd)) {
+ return BLE_ERR_INV_HCI_CMD_PARMS;
+ }
+
+ /* We only allow to either disable flow control or enable for ACL only */
+ if (cmd->enable > 1) {
+ return BLE_ERR_INV_HCI_CMD_PARMS;
+ }
+
+ if (!ble_ll_conn_cth_flow_enable(cmd->enable)) {
+ return BLE_ERR_CMD_DISALLOWED;
+ }
+
+ return BLE_ERR_SUCCESS;
+}
+
+static int
+ble_ll_hci_cb_host_buf_size(const uint8_t *cmdbuf, uint8_t len)
+{
+ const struct ble_hci_cb_host_buf_size_cp *cmd = (const void *) cmdbuf;
+ uint16_t acl_num;
+ uint16_t acl_data_len;
+
+ if (len != sizeof (*cmd)) {
+ return BLE_ERR_INV_HCI_CMD_PARMS;
+ }
+
+ /* We do not support SCO so those parameters should be set to 0 */
+ if (cmd->sco_num || cmd->sco_data_len) {
+ return BLE_ERR_INV_HCI_CMD_PARMS;
+ }
+
+ /*
+ * Core 5.2 Vol 4 Part E section 7.3.39 states that "Both the Host and the
+ * Controller shall support command and event packets, where the data portion
+ * (excluding header) contained in the packets is 255 octets in size.".
+ * This means we can basically accept any allowed value since LL does not
+ * reassemble incoming data thus will not send more than 255 octets in single
+ * data packet.
+ */
+ acl_num = le16toh(cmd->acl_num);
+ acl_data_len = le16toh(cmd->acl_data_len);
+ if (acl_data_len < 255) {
+ return BLE_ERR_INV_HCI_CMD_PARMS;
+ }
+
+ ble_ll_conn_cth_flow_set_buffers(acl_num);
+
+ return BLE_ERR_SUCCESS;
+}
+#endif
+
static int
ble_ll_hci_cb_set_event_mask2(const uint8_t *cmdbuf, uint8_t len)
{
@@ -1259,6 +1433,22 @@ ble_ll_hci_ctlr_bb_cmd_proc(const uint8_t *cmdbuf, uint8_t len, uint16_t ocf,
rc = ble_ll_reset();
}
break;
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_CTRL_TO_HOST_FLOW_CONTROL)
+ case BLE_HCI_OCF_CB_SET_CTLR_TO_HOST_FC:
+ rc = ble_ll_hci_cb_set_ctrlr_to_host_fc(cmdbuf, len);
+ break;
+ case BLE_HCI_OCF_CB_HOST_BUF_SIZE:
+ rc = ble_ll_hci_cb_host_buf_size(cmdbuf, len);
+ break;
+ case BLE_HCI_OCF_CB_HOST_NUM_COMP_PKTS:
+ /*
+ * HCI_Host_Number_Of_Completed_Packets is handled immediately when
+ * received from transport so we should never receive it here.
+ */
+ BLE_LL_ASSERT(0);
+ rc = BLE_ERR_UNKNOWN_HCI_CMD;
+ break;
+#endif
case BLE_HCI_OCF_CB_SET_EVENT_MASK2:
rc = ble_ll_hci_cb_set_event_mask2(cmdbuf, len);
break;
@@ -1454,9 +1644,33 @@ ble_ll_hci_cmd_proc(struct ble_npl_event *ev)
* BLE_ERR_MEM_CAPACITY on HCI buffer exhaustion.
*/
int
-ble_ll_hci_cmd_rx(uint8_t *cmd, void *arg)
+ble_ll_hci_cmd_rx(uint8_t *cmdbuf, void *arg)
{
struct ble_npl_event *ev;
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_CTRL_TO_HOST_FLOW_CONTROL)
+ const struct ble_hci_cmd *cmd;
+ uint16_t opcode;
+ uint16_t ocf;
+ uint16_t ogf;
+
+ cmd = (const void *)cmdbuf;
+ opcode = le16toh(cmd->opcode);
+ ogf = BLE_HCI_OGF(opcode);
+ ocf = BLE_HCI_OCF(opcode);
+
+ /*
+ * HCI_Host_Number_Of_Completed_Packets is processed outside standard flow
+ * thus it can be sent at any time, even if another command is already
+ * pending. This means we should better process it here and send an event to
+ * LL in case of error.
+ */
+ if ((ogf == BLE_HCI_OGF_CTLR_BASEBAND) &&
+ (ocf == BLE_HCI_OCF_CB_HOST_NUM_COMP_PKTS)) {
+ ble_ll_conn_cth_flow_process_cmd(cmdbuf);
+ ble_hci_trans_buf_free(cmdbuf);
+ return 0;
+ }
+#endif
/* Get an event structure off the queue */
ev = &g_ble_ll_hci_cmd_ev;
@@ -1465,7 +1679,7 @@ ble_ll_hci_cmd_rx(uint8_t *cmd, void *arg)
}
/* Fill out the event and post to Link Layer */
- ble_npl_event_set_arg(ev, cmd);
+ ble_npl_event_set_arg(ev, cmdbuf);
ble_npl_eventq_put(&g_ble_ll_data.ll_evq, ev);
return 0;
diff --git a/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_hci_ev.c b/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_hci_ev.c
index dbc50db9..0d6da9a0 100644
--- a/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_hci_ev.c
+++ b/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_hci_ev.c
@@ -461,6 +461,37 @@ ble_ll_hci_ev_phy_update(struct ble_ll_conn_sm *connsm, uint8_t status)
}
#endif
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_SCA_UPDATE)
+void
+ble_ll_hci_ev_sca_update(struct ble_ll_conn_sm *connsm, uint8_t status,
+ uint8_t peer_sca)
+{
+ struct ble_hci_ev_le_subev_peer_sca_complete *ev;
+ struct ble_hci_ev *hci_ev;
+
+ if (!ble_ll_hci_is_le_event_enabled(BLE_HCI_LE_SUBEV_REQ_PEER_SCA_COMP)) {
+ return;
+ }
+
+ hci_ev = (void *) ble_hci_trans_buf_alloc(BLE_HCI_TRANS_BUF_EVT_HI);
+ if (!hci_ev) {
+ return;
+ }
+
+ hci_ev->opcode = BLE_HCI_EVCODE_LE_META;
+ hci_ev->length = sizeof(*ev);
+ ev = (void *) hci_ev->data;
+
+ ev->subev_code = BLE_HCI_LE_SUBEV_REQ_PEER_SCA_COMP;
+ ev->status = status;
+ ev->conn_handle = htole16(connsm->conn_handle);
+ ev->sca = peer_sca;
+
+ ble_ll_hci_event_send(hci_ev);
+}
+
+#endif
+
void
ble_ll_hci_ev_send_vendor_err(const char *file, uint32_t line)
{
diff --git a/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_iso.c b/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_iso.c
new file mode 100644
index 00000000..a6186fe1
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_iso.c
@@ -0,0 +1,146 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include <stdint.h>
+#include "syscfg/syscfg.h"
+#include "nimble/ble.h"
+#include "nimble/hci_common.h"
+#include "controller/ble_ll_iso.h"
+
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO)
+
+int
+ble_ll_iso_read_tx_sync(const uint8_t *cmdbuf, uint8_t len)
+{
+ return BLE_ERR_UNSUPPORTED;
+}
+
+int
+ble_ll_iso_set_cig_param(const uint8_t *cmdbuf, uint8_t len,
+ uint8_t *rspbuf, uint8_t *rsplen)
+{
+ return BLE_ERR_UNSUPPORTED;
+}
+
+int
+ble_ll_iso_create_cis(const uint8_t *cmdbuf, uint8_t len)
+{
+ return BLE_ERR_UNSUPPORTED;
+}
+
+int
+ble_ll_iso_disconnect_cmd(const struct ble_hci_lc_disconnect_cp *cmd)
+{
+ return BLE_ERR_UNSUPPORTED;
+}
+
+int
+ble_ll_iso_remove_cig(const uint8_t *cmdbuf, uint8_t len,
+ uint8_t *rspbuf, uint8_t *rsplen)
+{
+ return BLE_ERR_UNSUPPORTED;
+}
+
+int
+ble_ll_iso_accept_cis_req(const uint8_t *cmdbuf, uint8_t len)
+{
+ return BLE_ERR_UNSUPPORTED;
+}
+
+int
+ble_ll_iso_reject_cis_req(const uint8_t *cmdbuf, uint8_t len)
+{
+ return BLE_ERR_UNSUPPORTED;
+}
+
+int
+ble_ll_iso_setup_iso_data_path(const uint8_t *cmdbuf, uint8_t len)
+{
+ return BLE_ERR_UNSUPPORTED;
+}
+
+int
+ble_ll_iso_remove_iso_data_path(const uint8_t *cmdbuf, uint8_t len)
+{
+ /* Nothing to do here for now when HCI is supported */
+ return 0;
+}
+int
+ble_ll_iso_create_big(const uint8_t *cmdbuf, uint8_t len)
+{
+ return BLE_ERR_UNSUPPORTED;
+}
+
+int
+ble_ll_iso_terminate_big(const uint8_t *cmdbuf, uint8_t len)
+{
+ return BLE_ERR_UNSUPPORTED;
+}
+
+int
+ble_ll_iso_big_create_sync(const uint8_t *cmdbuf, uint8_t len)
+{
+ return BLE_ERR_UNSUPPORTED;
+}
+
+int
+ble_ll_iso_big_terminate_sync(const uint8_t *cmdbuf, uint8_t len)
+{
+ return BLE_ERR_UNSUPPORTED;
+}
+
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO_TEST)
+int
+ble_ll_iso_set_cig_param_test(const uint8_t *cmdbuf, uint8_t len,
+ uint8_t *rspbuf, uint8_t *rsplen)
+{
+ return BLE_ERR_UNSUPPORTED;
+}
+
+int
+ble_ll_iso_create_big_test(const uint8_t *cmdbuf, uint8_t len)
+{
+ return BLE_ERR_UNSUPPORTED;
+}
+
+int
+ble_ll_iso_transmit_test(const uint8_t *cmdbuf, uint8_t len)
+{
+ return BLE_ERR_UNSUPPORTED;
+}
+
+int
+ble_ll_iso_receive_test(const uint8_t *cmdbuf, uint8_t len)
+{
+ return BLE_ERR_UNSUPPORTED;
+}
+
+int
+ble_ll_iso_read_counters_test(const uint8_t *cmdbuf, uint8_t len)
+{
+ return BLE_ERR_UNSUPPORTED;
+}
+
+int
+ble_ll_iso_end_test(const uint8_t *cmdbuf, uint8_t len)
+{
+ return BLE_ERR_UNSUPPORTED;
+}
+#endif
+#endif
diff --git a/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_rand.c b/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_rand.c
index 7b384e9d..8aa71271 100644
--- a/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_rand.c
+++ b/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_rand.c
@@ -17,6 +17,9 @@
* under the License.
*/
+/* for jrand48 */
+#define _XOPEN_SOURCE
+#include <stdlib.h>
#include <stdint.h>
#include <assert.h>
#include <string.h>
@@ -120,6 +123,21 @@ ble_ll_rand_data_get(uint8_t *buf, uint8_t len)
return BLE_ERR_SUCCESS;
}
+/* Simple wrapper to allow easy replacement of rand() */
+uint32_t
+ble_ll_rand(void)
+{
+ static unsigned short xsubi[3];
+ static bool init = true;
+
+ if (init) {
+ init = false;
+ ble_ll_rand_data_get((uint8_t *)xsubi, sizeof(xsubi));
+ }
+
+ return (uint32_t) jrand48(xsubi);
+}
+
/**
* Called to obtain a "prand" as defined in core V4.2 Vol 6 Part B 1.3.2.2
*
diff --git a/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_scan.c b/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_scan.c
index 84747db7..0cbcb376 100644
--- a/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_scan.c
+++ b/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_scan.c
@@ -293,7 +293,7 @@ ble_ll_scan_req_backoff(struct ble_ll_scan_sm *scansm, int success)
STATS_INC(ble_ll_stats, scan_req_txf);
}
- scansm->backoff_count = rand() & (scansm->upper_limit - 1);
+ scansm->backoff_count = ble_ll_rand() & (scansm->upper_limit - 1);
++scansm->backoff_count;
BLE_LL_ASSERT(scansm->backoff_count <= 256);
}
@@ -305,7 +305,7 @@ ble_ll_scan_refresh_nrpa(struct ble_ll_scan_sm *scansm)
ble_npl_time_t now;
now = ble_npl_time_get();
- if ((ble_npl_stime_t)(now - scansm->scan_nrpa_timer) >= 0) {
+ if (CPUTIME_GEQ(now, scansm->scan_nrpa_timer)) {
/* Generate new NRPA */
ble_ll_rand_data_get(scansm->scan_nrpa, BLE_DEV_ADDR_LEN);
scansm->scan_nrpa[5] &= ~0xc0;
@@ -617,7 +617,7 @@ ble_ll_scan_add_scan_rsp_adv(uint8_t *addr, uint8_t txadd,
static int
ble_ll_hci_send_legacy_ext_adv_report(uint8_t evtype,
const uint8_t *addr, uint8_t addr_type,
- uint8_t rssi,
+ int8_t rssi,
uint8_t adv_data_len,
struct os_mbuf *adv_data,
const uint8_t *inita, uint8_t inita_type)
@@ -1125,6 +1125,22 @@ ble_ll_scan_sm_stop(int chk_disable)
scansm = &g_ble_ll_scan_sm;
os_cputime_timer_stop(&scansm->scan_timer);
+ /* Only set state if we are currently in a scan window */
+ if (chk_disable) {
+ OS_ENTER_CRITICAL(sr);
+ lls = ble_ll_state_get();
+
+ if ((lls == BLE_LL_STATE_SCANNING) ||
+ (lls == BLE_LL_STATE_INITIATING && chk_disable == 1)) {
+ /* Disable phy */
+ ble_phy_disable();
+
+ /* Set LL state to standby */
+ ble_ll_state_set(BLE_LL_STATE_STANDBY);
+ }
+ OS_EXIT_CRITICAL(sr);
+ }
+
OS_ENTER_CRITICAL(sr);
/* Disable scanning state machine */
@@ -1149,22 +1165,6 @@ ble_ll_scan_sm_stop(int chk_disable)
/* Count # of times stopped */
STATS_INC(ble_ll_stats, scan_stops);
- /* Only set state if we are currently in a scan window */
- if (chk_disable) {
- OS_ENTER_CRITICAL(sr);
- lls = ble_ll_state_get();
-
- if ((lls == BLE_LL_STATE_SCANNING) ||
- (lls == BLE_LL_STATE_INITIATING && chk_disable == 1)) {
- /* Disable phy */
- ble_phy_disable();
-
- /* Set LL state to standby */
- ble_ll_state_set(BLE_LL_STATE_STANDBY);
- }
- OS_EXIT_CRITICAL(sr);
- }
-
/* No need for RF anymore */
OS_ENTER_CRITICAL(sr);
ble_ll_rfmgmt_scan_changed(false, 0);
@@ -1991,10 +1991,10 @@ ble_ll_scan_rx_filter(struct ble_mbuf_hdr *hdr, struct ble_ll_scan_addr_data *ad
{
struct ble_ll_scan_sm *scansm = &g_ble_ll_scan_sm;
struct ble_ll_scan_params *scanp = scansm->scanp;
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_PRIVACY)
#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_EXT_ADV)
struct ble_ll_aux_data *aux_data = hdr->rxinfo.user_data;
#endif
-#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_PRIVACY)
struct ble_mbuf_hdr_rxinfo *rxinfo = &hdr->rxinfo;
struct ble_ll_resolv_entry *rl = NULL;
#endif
@@ -2227,6 +2227,7 @@ ble_ll_scan_rx_isr_on_aux(uint8_t pdu_type, uint8_t *rxbuf,
*/
if (aux_data->flags & BLE_LL_AUX_IS_MATCHED) {
rxinfo->flags |= BLE_MBUF_HDR_F_DEVMATCH;
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_PRIVACY)
rxinfo->rpa_index = aux_data->rpa_index;
if (rxinfo->rpa_index >= 0) {
rxinfo->flags |= BLE_MBUF_HDR_F_RESOLVED;
@@ -2234,6 +2235,7 @@ ble_ll_scan_rx_isr_on_aux(uint8_t pdu_type, uint8_t *rxbuf,
if (aux_data->flags & BLE_LL_AUX_IS_TARGETA_RESOLVED) {
rxinfo->flags |= BLE_MBUF_HDR_F_TARGETA_RESOLVED;
}
+#endif
goto done;
}
@@ -3019,7 +3021,8 @@ ble_ll_scan_rx_pkt_in_on_legacy(uint8_t pdu_type, struct os_mbuf *om,
if (!BLE_MBUF_HDR_DEVMATCH(hdr) ||
!BLE_MBUF_HDR_CRC_OK(hdr) ||
- BLE_MBUF_HDR_IGNORED(hdr)) {
+ BLE_MBUF_HDR_IGNORED(hdr) ||
+ !scansm->scan_enabled) {
return;
}
@@ -3058,10 +3061,6 @@ ble_ll_scan_rx_pkt_in_on_aux(uint8_t pdu_type, struct os_mbuf *om,
bool send_hci_report;
int rc;
- if (!scansm->ext_scanning) {
- goto scan_continue;
- }
-
if (aux_data) {
aux_data->flags_ll |= aux_data->flags_isr;
}
@@ -3077,7 +3076,8 @@ ble_ll_scan_rx_pkt_in_on_aux(uint8_t pdu_type, struct os_mbuf *om,
BLE_MBUF_HDR_IGNORED(hdr) ||
BLE_MBUF_HDR_AUX_INVALID(hdr) ||
(aux_data->flags_ll & BLE_LL_AUX_FLAG_SCAN_ERROR) ||
- (pdu_type != BLE_ADV_PDU_TYPE_ADV_EXT_IND)) {
+ (pdu_type != BLE_ADV_PDU_TYPE_ADV_EXT_IND) ||
+ !scansm->scan_enabled) {
if (aux_data) {
ble_ll_scan_end_adv_evt(aux_data);
ble_ll_scan_aux_data_unref(aux_data);
diff --git a/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_sched.c b/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_sched.c
index 370faddf..d01f10ed 100644
--- a/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_sched.c
+++ b/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_sched.c
@@ -83,14 +83,14 @@ ble_ll_sched_is_overlap(struct ble_ll_sched_item *s1,
int rc;
rc = 1;
- if ((int32_t)(s1->start_time - s2->start_time) < 0) {
+ if (CPUTIME_LT(s1->start_time, s2->start_time)) {
/* Make sure this event does not overlap current event */
- if ((int32_t)(s1->end_time - s2->start_time) <= 0) {
+ if (CPUTIME_LEQ(s1->end_time, s2->start_time)) {
rc = 0;
}
} else {
/* Check for overlap */
- if ((int32_t)(s1->start_time - s2->end_time) >= 0) {
+ if (CPUTIME_GEQ(s1->start_time, s2->end_time)) {
rc = 0;
}
}
@@ -111,7 +111,7 @@ ble_ll_sched_overlaps_current(struct ble_ll_sched_item *sch)
rc = 0;
if (ble_ll_state_get() == BLE_LL_STATE_CONNECTION) {
ce_end_time = ble_ll_conn_get_ce_end_time();
- if ((int32_t)(ce_end_time - sch->start_time) > 0) {
+ if (CPUTIME_GT(ce_end_time, sch->start_time)) {
rc = 1;
}
}
@@ -178,7 +178,7 @@ ble_ll_sched_conn_reschedule(struct ble_ll_conn_sm *connsm)
sch->end_time = connsm->ce_end_time;
/* Better be past current time or we just leave */
- if ((int32_t)(sch->start_time - os_cputime_get32()) < 0) {
+ if (CPUTIME_LT(sch->start_time, os_cputime_get32())) {
return -1;
}
@@ -216,7 +216,7 @@ ble_ll_sched_conn_reschedule(struct ble_ll_conn_sm *connsm)
end_overlap = entry;
}
} else {
- if ((int32_t)(sch->end_time - entry->start_time) <= 0) {
+ if (CPUTIME_LEQ(sch->end_time, entry->start_time)) {
rc = 0;
TAILQ_INSERT_BEFORE(entry, sch, link);
break;
@@ -468,7 +468,7 @@ ble_ll_sched_master_new(struct ble_ll_conn_sm *connsm,
sch->end_time = earliest_end;
/* We can insert if before entry in list */
- if ((int32_t)(sch->end_time - entry->start_time) <= 0) {
+ if (CPUTIME_LEQ(sch->end_time, entry->start_time)) {
if ((earliest_start - initial_start) <= itvl_t) {
rc = 0;
TAILQ_INSERT_BEFORE(entry, sch, link);
@@ -655,7 +655,7 @@ ble_ll_sched_master_new(struct ble_ll_conn_sm *connsm,
sch->end_time = earliest_end;
/* We can insert if before entry in list */
- if ((int32_t)(sch->end_time - entry->start_time) <= 0) {
+ if (CPUTIME_LEQ(sch->end_time, entry->start_time)) {
if ((earliest_start - initial_start) <= itvl_t) {
rc = 0;
TAILQ_INSERT_BEFORE(entry, sch, link);
@@ -770,7 +770,7 @@ ble_ll_sched_slave_new(struct ble_ll_conn_sm *connsm)
while (1) {
next_sch = entry->link.tqe_next;
/* Insert if event ends before next starts */
- if ((int32_t)(sch->end_time - entry->start_time) <= 0) {
+ if (CPUTIME_LEQ(sch->end_time, entry->start_time)) {
rc = 0;
TAILQ_INSERT_BEFORE(entry, sch, link);
break;
@@ -1047,7 +1047,7 @@ ble_ll_sched_adv_new(struct ble_ll_sched_item *sch, ble_ll_sched_adv_new_cb cb,
os_cputime_timer_stop(&g_ble_ll_sched_timer);
TAILQ_FOREACH(entry, &g_ble_ll_sched_q, link) {
/* We can insert if before entry in list */
- if ((int32_t)(sch->end_time - entry->start_time) <= 0) {
+ if (CPUTIME_LEQ(sch->end_time, entry->start_time)) {
TAILQ_INSERT_BEFORE(entry, sch, link);
break;
}
@@ -1111,7 +1111,7 @@ ble_ll_sched_periodic_adv(struct ble_ll_sched_item *sch, uint32_t *start,
os_cputime_timer_stop(&g_ble_ll_sched_timer);
TAILQ_FOREACH(entry, &g_ble_ll_sched_q, link) {
/* We can insert if before entry in list */
- if ((int32_t)(sch->end_time - entry->start_time) <= 0) {
+ if (CPUTIME_LEQ(sch->end_time, entry->start_time)) {
TAILQ_INSERT_BEFORE(entry, sch, link);
break;
}
@@ -1200,7 +1200,7 @@ ble_ll_sched_adv_reschedule(struct ble_ll_sched_item *sch, uint32_t *start,
end_overlap = entry;
}
} else {
- if ((int32_t)(sch->end_time - entry->start_time) <= 0) {
+ if (CPUTIME_LEQ(sch->end_time, entry->start_time)) {
before = entry;
break;
}
@@ -1233,7 +1233,7 @@ ble_ll_sched_adv_reschedule(struct ble_ll_sched_item *sch, uint32_t *start,
sch->end_time = sch->start_time + duration;
while (1) {
next_sch = entry->link.tqe_next;
- if ((int32_t)(sch->end_time - entry->start_time) <= 0) {
+ if (CPUTIME_LEQ(sch->end_time, entry->start_time)) {
rand_ticks = entry->start_time - sch->end_time;
before = entry;
TAILQ_INSERT_BEFORE(before, sch, link);
@@ -1266,7 +1266,7 @@ ble_ll_sched_adv_reschedule(struct ble_ll_sched_item *sch, uint32_t *start,
if (!rc) {
sch->enqueued = 1;
if (rand_ticks) {
- sch->start_time += rand() % rand_ticks;
+ sch->start_time += ble_ll_rand() % rand_ticks;
}
sch->end_time = sch->start_time + duration;
*start = sch->start_time;
@@ -1580,7 +1580,7 @@ ble_ll_sched_scan_req_over_aux_ptr(uint32_t chan, uint8_t phy_mode)
while (sch) {
/* Let's check if there is no scheduled item which want to start within
* given usecs.*/
- if ((int32_t)(sch->start_time - now + os_cputime_usecs_to_ticks(usec_dur)) > 0) {
+ if (CPUTIME_GT(sch->start_time, now + os_cputime_usecs_to_ticks(usec_dur))) {
/* We are fine. Have time for scan req */
return 0;
}
@@ -1670,7 +1670,7 @@ ble_ll_sched_aux_scan(struct ble_mbuf_hdr *ble_hdr,
os_cputime_timer_stop(&g_ble_ll_sched_timer);
TAILQ_FOREACH(entry, &g_ble_ll_sched_q, link) {
/* We can insert if before entry in list */
- if ((int32_t)(sch->end_time - entry->start_time) <= 0) {
+ if (CPUTIME_LEQ(sch->end_time, entry->start_time)) {
rc = 0;
TAILQ_INSERT_BEFORE(entry, sch, link);
sch->enqueued = 1;
diff --git a/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_supp_cmd.c b/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_supp_cmd.c
index 834e0095..cae9eb7d 100644
--- a/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_supp_cmd.c
+++ b/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_supp_cmd.c
@@ -36,7 +36,22 @@
/* Octet 10 */
#define BLE_SUPP_CMD_RD_TX_PWR (0 << 2)
-#define BLE_LL_SUPP_CMD_OCTET_10 (BLE_SUPP_CMD_RD_TX_PWR)
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_CTRL_TO_HOST_FLOW_CONTROL)
+#define BLE_SUPP_CMD_SET_CTRL_TO_HOST_FLOW (1 << 5)
+#define BLE_SUPP_CMD_HOST_BUFFER_SIZE (1 << 6)
+#define BLE_SUPP_CMD_HOST_NUM_COMP_PACKETS (1 << 7)
+#else
+#define BLE_SUPP_CMD_SET_CTRL_TO_HOST_FLOW (0 << 5)
+#define BLE_SUPP_CMD_HOST_BUFFER_SIZE (0 << 6)
+#define BLE_SUPP_CMD_HOST_NUM_COMP_PACKETS (0 << 7)
+#endif
+#define BLE_LL_SUPP_CMD_OCTET_10 \
+( \
+ BLE_SUPP_CMD_RD_TX_PWR | \
+ BLE_SUPP_CMD_SET_CTRL_TO_HOST_FLOW | \
+ BLE_SUPP_CMD_HOST_BUFFER_SIZE | \
+ BLE_SUPP_CMD_HOST_NUM_COMP_PACKETS \
+)
/* Octet 14 */
#define BLE_SUPP_CMD_RD_LOC_VER (1 << 3)
@@ -404,10 +419,77 @@
#define BLE_SUPP_CMD_LE_PADV_SYNC_TRANSFER_PARAMS (0 << 0)
#define BLE_SUPP_CMD_LE_PADV_DEFAULT_SYNC_TRANSFER_PARAMS (0 << 1)
#endif
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO)
+#define BLE_SUPP_CMD_LE_READ_BUF_SIZE_V2 (1 << 5)
+#define BLE_SUPP_CMD_LE_READ_ISO_TX_SYNC (1 << 6)
+#define BLE_SUPP_CMD_LE_SET_CIG_PARAM (1 << 7)
+#else
+#define BLE_SUPP_CMD_LE_READ_BUF_SIZE_V2 (0 << 5)
+#define BLE_SUPP_CMD_LE_READ_ISO_TX_SYNC (0 << 6)
+#define BLE_SUPP_CMD_LE_SET_CIG_PARAM (0 << 7)
+#endif
+
#define BLE_LL_SUPP_CMD_OCTET_41 \
( \
- BLE_SUPP_CMD_LE_PADV_SYNC_TRANSFER_PARAMS | \
- BLE_SUPP_CMD_LE_PADV_DEFAULT_SYNC_TRANSFER_PARAMS \
+ BLE_SUPP_CMD_LE_PADV_SYNC_TRANSFER_PARAMS | \
+ BLE_SUPP_CMD_LE_PADV_DEFAULT_SYNC_TRANSFER_PARAMS | \
+ BLE_SUPP_CMD_LE_READ_BUF_SIZE_V2 | \
+ BLE_SUPP_CMD_LE_READ_ISO_TX_SYNC | \
+ BLE_SUPP_CMD_LE_SET_CIG_PARAM \
+)
+
+/* Octet 42 */
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO)
+#define BLE_SUPP_CMD_LE_SET_CIG_PARAM_TEST (1 << 0)
+#define BLE_SUPP_CMD_LE_CREATE_CIS (1 << 1)
+#define BLE_SUPP_CMD_LE_REMOVE_CIG (1 << 2)
+#define BLE_SUPP_CMD_LE_ACCEPT_CIS_REQ (1 << 3)
+#define BLE_SUPP_CMD_LE_REJECT_CIS_REQ (1 << 4)
+#define BLE_SUPP_CMD_LE_CREATE_BIG (1 << 5)
+#define BLE_SUPP_CMD_LE_CREATE_BIG_TEST (1 << 6)
+#define BLE_SUPP_CMD_LE_TERMINATE_BIG (1 << 7)
+#else
+#define BLE_SUPP_CMD_LE_SET_CIG_PARAM_TEST (0 << 0)
+#define BLE_SUPP_CMD_LE_CREATE_CIS (0 << 1)
+#define BLE_SUPP_CMD_LE_REMOVE_CIG (0 << 2)
+#define BLE_SUPP_CMD_LE_ACCEPT_CIS_REQ (0 << 3)
+#define BLE_SUPP_CMD_LE_REJECT_CIS_REQ (0 << 4)
+#define BLE_SUPP_CMD_LE_CREATE_BIG (0 << 5)
+#define BLE_SUPP_CMD_LE_CREATE_BIG_TEST (0 << 6)
+#define BLE_SUPP_CMD_LE_TERMINATE_BIG (0 << 7)
+#endif
+#define BLE_LL_SUPP_CMD_OCTET_42 \
+( \
+ BLE_SUPP_CMD_LE_SET_CIG_PARAM_TEST | \
+ BLE_SUPP_CMD_LE_CREATE_CIS | \
+ BLE_SUPP_CMD_LE_REMOVE_CIG | \
+ BLE_SUPP_CMD_LE_ACCEPT_CIS_REQ | \
+ BLE_SUPP_CMD_LE_REJECT_CIS_REQ | \
+ BLE_SUPP_CMD_LE_CREATE_BIG | \
+ BLE_SUPP_CMD_LE_CREATE_BIG_TEST | \
+ BLE_SUPP_CMD_LE_TERMINATE_BIG \
+)
+
+/* Octet 43 */
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_SCA_UPDATE)
+#define BLE_SUPP_CMD_LE_REQUEST_PEER_SCA (1 << 2)
+#else
+#define BLE_SUPP_CMD_LE_REQUEST_PEER_SCA (0 << 0)
+#endif
+#define BLE_LL_SUPP_CMD_OCTET_43 \
+( \
+ BLE_SUPP_CMD_LE_REQUEST_PEER_SCA \
+)
+
+/* Octet 44 */
+#if MYNEWT_VAL(BLE_VERSION) >= 52
+#define BLE_SUPP_CMD_LE_SET_HOST_FEATURE (1 << 0)
+#else
+#define BLE_SUPP_CMD_LE_SET_HOST_FEATURE (0 << 0)
+#endif
+#define BLE_LL_SUPP_CMD_OCTET_44 \
+( \
+ BLE_SUPP_CMD_LE_SET_HOST_FEATURE \
)
/* Defines the array of supported commands */
@@ -455,4 +537,7 @@ const uint8_t g_ble_ll_supp_cmds[BLE_LL_SUPP_CMD_LEN] =
BLE_LL_SUPP_CMD_OCTET_39,
BLE_LL_SUPP_CMD_OCTET_40, /* Octet 40 */
BLE_LL_SUPP_CMD_OCTET_41,
+ BLE_LL_SUPP_CMD_OCTET_42,
+ BLE_LL_SUPP_CMD_OCTET_43,
+ BLE_LL_SUPP_CMD_OCTET_44,
};
diff --git a/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_sync.c b/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_sync.c
index 75f18bf2..df806082 100644
--- a/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_sync.c
+++ b/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_sync.c
@@ -2091,10 +2091,10 @@ ble_ll_sync_send_sync_ind(struct ble_ll_sync_sm *syncsm,
if (syncsm->flags & BLE_LL_SYNC_SM_FLAG_ADDR_RESOLVED) {
sync_ind[24] |= 1 << 4;
} else {
- sync_ind[24] |= (syncsm->adv_addr_type == BLE_ADDR_RANDOM) << 4 ;
+ sync_ind[24] |= (syncsm->adv_addr_type == BLE_ADDR_RANDOM) << 4;
}
- sync_ind[24] |= MYNEWT_VAL(BLE_LL_MASTER_SCA) << 5;
+ sync_ind[24] |= BLE_LL_SCA_ENUM << 5;
/* PHY */
sync_ind[25] = (0x01 << (ble_ll_sync_phy_mode_to_hci(syncsm->phy_mode) - 1));
diff --git a/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_utils.c b/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_utils.c
index 7fbb18f1..ccdf3775 100644
--- a/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_utils.c
+++ b/src/libs/mynewt-nimble/nimble/controller/src/ble_ll_utils.c
@@ -50,8 +50,8 @@ ble_ll_utils_calc_access_addr(void)
aa = 0;
while (1) {
/* Get two, 16-bit random numbers */
- aa_low = rand() & 0xFFFF;
- aa_high = rand() & 0xFFFF;
+ aa_low = ble_ll_rand() & 0xFFFF;
+ aa_high = ble_ll_rand() & 0xFFFF;
/* All four bytes cannot be equal */
if (aa_low == aa_high) {
@@ -292,8 +292,7 @@ ble_ll_utils_calc_window_widening(uint32_t anchor_point,
time_since_last_anchor = (int32_t)(anchor_point - last_anchor_point);
if (time_since_last_anchor > 0) {
delta_msec = os_cputime_ticks_to_usecs(time_since_last_anchor) / 1000;
- total_sca_ppm = g_ble_sca_ppm_tbl[master_sca] +
- MYNEWT_VAL(BLE_LL_OUR_SCA);
+ total_sca_ppm = g_ble_sca_ppm_tbl[master_sca] + MYNEWT_VAL(BLE_LL_SCA);
window_widening = (total_sca_ppm * delta_msec) / 1000;
}
diff --git a/src/libs/mynewt-nimble/nimble/controller/syscfg.yml b/src/libs/mynewt-nimble/nimble/controller/syscfg.yml
index 85049cb0..2c7c2cb2 100644
--- a/src/libs/mynewt-nimble/nimble/controller/syscfg.yml
+++ b/src/libs/mynewt-nimble/nimble/controller/syscfg.yml
@@ -38,35 +38,10 @@ syscfg.defs:
type: 'task_priority'
value: 0
- # Sleep clock accuracy (sca). This is the amount of drift in the system
- # during when the device is sleeping (in parts per million).
- #
- # NOTE: 'the' master sca is an enumerated value based on the sca. Rather
- # than have a piece of code calculate this value, the developer must set
- # this value based on the value of the SCA using the following table:
- #
- # SCA between 251 and 500 ppm (inclusive); master sca = 0
- # SCA between 151 and 250 ppm (inclusive); master sca = 1
- # SCA between 101 and 150 ppm (inclusive); master sca = 2
- # SCA between 76 and 100 ppm (inclusive); master sca = 3
- # SCA between 51 and 75 ppm (inclusive); master sca = 4
- # SCA between 31 and 50 ppm (inclusive); master sca = 5
- # SCA between 21 and 30 ppm (inclusive); master sca = 6
- # SCA between 0 and 20 ppm (inclusive); master sca = 7
- #
- # For example:
- # if your clock drift is 101 ppm, your master should be set to 2.
- # if your clock drift is 20, your master sca should be set to 7.
- #
- # The values provided below are merely meant to be an example and should
- # be replaced by values appropriate for your platform.
- BLE_LL_OUR_SCA:
- description: 'The system clock accuracy of the device.'
- value: '60' # in ppm
-
- BLE_LL_MASTER_SCA:
- description: 'Enumerated value based on our sca'
- value: '4'
+ BLE_LL_SCA:
+ description: Sleep clock accuracy of our device (in ppm)
+ value: MYNEWT_VAL(BLE_LL_OUR_SCA)
+ range: 0..500
BLE_LL_TX_PWR_DBM:
description: 'Transmit power level.'
@@ -285,6 +260,35 @@ syscfg.defs:
Advertising Sync Transfer Feature.
value: MYNEWT_VAL(BLE_PERIODIC_ADV_SYNC_TRANSFER)
+ BLE_LL_CFG_FEAT_CTRL_TO_HOST_FLOW_CONTROL:
+ description: >
+ Enable controller-to-host flow control support. This allows host to
+ limit number of ACL packets sent at once from controller to avoid
+ congestion on HCI transport if feature is also supported by host.
+ value: 0
+
+ BLE_LL_CFG_FEAT_LL_SCA_UPDATE:
+ description: >
+ This option is used to enable/disable support for SCA update procedure
+ value: 0
+ restrictions:
+ - '(BLE_VERSION >= 52) if 1'
+
+ BLE_LL_CFG_FEAT_LL_ISO:
+ description: >
+ This option is used to enable/disable support for LE Isochronous Channels
+ as per Bluetooth v5.2 channels
+ value: MYNEWT_VAL(BLE_ISO)
+ restrictions:
+ - '(BLE_VERSION >= 52) if 1'
+
+ BLE_LL_CFG_FEAT_LL_ISO_TEST:
+ description: >
+ This option is used to enable/disbale test commands for ISO support
+ value: MYNEWT_VAL(BLE_ISO_TEST)
+ restrictions:
+ - 'BLE_LL_CFG_FEAT_LL_ISO if 1'
+
BLE_LL_EXT_ADV_AUX_PTR_CNT:
description: >
This option configure a max number of scheduled outstanding auxiliary
@@ -404,6 +408,10 @@ syscfg.defs:
description: use BLE_LL_RFMGMT_ENABLE_TIME instead
value: 0
deprecated: 1
+ BLE_LL_OUR_SCA:
+ description: use BLE_LL_SCA instead
+ value: 60
+ deprecated: 1
# defunct settings (to be removed eventually)
BLE_DEVICE:
@@ -418,6 +426,10 @@ syscfg.defs:
description: Superseded by BLE_LL_NUM_COMP_PKT_ITVL_MS
value: '(2 * OS_TICKS_PER_SEC)'
defunct: 1
+ BLE_LL_MASTER_SCA:
+ description: use BLE_LL_SCA instead
+ value: 4
+ defunct: 1
syscfg.vals.BLE_LL_CFG_FEAT_LL_EXT_ADV:
diff --git a/src/libs/mynewt-nimble/nimble/drivers/dialog_cmac/README.md b/src/libs/mynewt-nimble/nimble/drivers/dialog_cmac/README.md
new file mode 100644
index 00000000..2e76e2c1
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/drivers/dialog_cmac/README.md
@@ -0,0 +1,68 @@
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+-->
+
+## How to run NimBLE controller on Dialog DA1469x
+
+Dialog DA1469x has separate Cortex-M0+ core inside CMAC hw block which can run
+NimBLE controller. This means DA1469x can run full NimBLE stack: host is running
+on M33 core while controller is running on M0+ core. Both communicate using
+standard HCI H4 protocol exchanged over mailboxes located in shared memory.
+
+### Basic setup
+
+In order to run full NimBLE stack on DA1469x you will need two newt targets: one
+for M33 (e.g. `dialog_da1469x-dk-pro` BSP) and one for M0+ (`dialog_cmac` BSP).
+
+Once everything is configured properly, you only need to build target for M33.
+Target configured for M0+ will be build automatically and image is linked with
+M33 image so everything can be flashed at once just as if there is only single
+target used.
+
+Target for M33 should be set and configured as any other BLE application. In
+order to use NimBLE controller on CMAC, set proper HCI transport via syscfg:
+
+ BLE_HCI_TRANSPORT: dialog_cmac
+
+This will include proper transport, driver and add M0+ target to build process.
+
+For M0+, there is sample target provided in `targets/dialog_cmac` and it's used
+by default unless overrided by syscfg in M33 target:
+
+ CMAC_IMAGE_TARGET_NAME: "@apache-mynewt-nimble/targets/dialog_cmac"
+
+If you wish to create own target for M0+, make sure your target is set the same
+way (`app`, `bsp` and `build_profile`) as sample. Also it is recommended to use
+syscfg settings from sample target in new target.
+
+### NimBLE configuration
+
+Since host and controller are running on different cores, they both use separate
+configuration: host configuration is in M33 target, controller configuration is
+in M0+ target. There is currently no way to automatically synchronize both, so
+care needs to be taken when enabling features in either of targets.
+
+A possible workaround is to use separate `.yml` file with all the NimBLE syscfg
+values settings and include it in both targets using `$import` directive which
+is supported by recent versions of `newt` tool.
+
+### Advanced settings
+
+(tbd)
diff --git a/src/libs/mynewt-nimble/nimble/drivers/dialog_cmac/include/ble/xcvr.h b/src/libs/mynewt-nimble/nimble/drivers/dialog_cmac/include/ble/xcvr.h
new file mode 100644
index 00000000..e4e741c5
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/drivers/dialog_cmac/include/ble/xcvr.h
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#ifndef H_BLE_XCVR_
+#define H_BLE_XCVR_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define XCVR_TX_SCHED_DELAY_USECS (250)
+
+/*
+ * Define HW whitelist size. This is the total possible whitelist size;
+ * not necessarily the size that will be used (may be smaller)
+ */
+#define BLE_HW_WHITE_LIST_SIZE (8)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* H_BLE_XCVR_ */
diff --git a/src/libs/mynewt-nimble/nimble/drivers/dialog_cmac/pkg.yml b/src/libs/mynewt-nimble/nimble/drivers/dialog_cmac/pkg.yml
new file mode 100644
index 00000000..9cf63ffc
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/drivers/dialog_cmac/pkg.yml
@@ -0,0 +1,33 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+pkg.name: nimble/drivers/dialog_cmac
+pkg.description: BLE driver for Dialog CMAC
+pkg.author: "Apache Mynewt <dev@mynewt.apache.org>"
+pkg.homepage: "http://mynewt.apache.org/"
+pkg.keywords:
+ - ble
+ - bluetooth
+pkg.deps:
+ - "@apache-mynewt-nimble/nimble/controller"
+ - "@apache-mynewt-core/crypto/tinycrypt"
+pkg.apis:
+ - ble_driver
+pkg.req_apis:
+ - ble_transport
diff --git a/src/libs/mynewt-nimble/nimble/drivers/dialog_cmac/src/ble_hw.c b/src/libs/mynewt-nimble/nimble/drivers/dialog_cmac/src/ble_hw.c
new file mode 100644
index 00000000..98c8144b
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/drivers/dialog_cmac/src/ble_hw.c
@@ -0,0 +1,340 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include <assert.h>
+#include <stdint.h>
+#include "mcu/mcu.h"
+#include "nimble/ble.h"
+#include "controller/ble_hw.h"
+#include "CMAC.h"
+#include "cmac_driver/cmac_shared.h"
+#include "mcu/mcu.h"
+#include "tinycrypt/aes.h"
+
+static struct tc_aes_key_sched_struct g_ctx;
+
+int
+ble_hw_rng_init(ble_rng_isr_cb_t cb, int bias)
+{
+ cmac_rand_set_isr_cb(cb);
+ return 0;
+}
+
+int
+ble_hw_rng_start(void)
+{
+ /* Chime the M33 in case we need random numbers generated */
+ cmac_rand_start();
+ CMAC->CM_EV_SET_REG = CMAC_CM_EV_SET_REG_EV1C_CMAC2SYS_IRQ_SET_Msk;
+ return 0;
+}
+
+int
+ble_hw_rng_stop(void)
+{
+ cmac_rand_stop();
+ return 0;
+}
+
+#define BLE_HW_RESOLV_LIST_SIZE (MYNEWT_VAL(BLE_LL_RESOLV_LIST_SIZE))
+
+struct ble_hw_resolv_irk {
+ uint32_t key[4];
+};
+
+struct ble_hw_resolv_list {
+ uint8_t count;
+ struct ble_hw_resolv_irk irk[BLE_HW_RESOLV_LIST_SIZE];
+};
+
+struct ble_hw_resolv_proc {
+ uint32_t hash;
+ uint8_t f_configured;
+ uint8_t f_active;
+ uint8_t f_match;
+ uint8_t f_done;
+ struct ble_hw_resolv_irk *irk;
+ struct ble_hw_resolv_irk *irk_end;
+ uint32_t crypto_prand_in[4];
+ uint32_t crypto_e_out[4];
+};
+
+static struct ble_hw_resolv_list g_ble_hw_resolv_list;
+static struct ble_hw_resolv_proc g_ble_hw_resolv_proc;
+
+int
+ble_hw_get_public_addr(ble_addr_t *addr)
+{
+ return -1;
+}
+
+int
+ble_hw_get_static_addr(ble_addr_t *addr)
+{
+ return -1;
+}
+
+void
+ble_hw_whitelist_clear(void)
+{
+}
+
+int
+ble_hw_whitelist_add(const uint8_t *addr, uint8_t addr_type)
+{
+ return 0;
+}
+
+void
+ble_hw_whitelist_rmv(const uint8_t *addr, uint8_t addr_type)
+{
+}
+
+uint8_t
+ble_hw_whitelist_size(void)
+{
+ return 0;
+}
+
+void
+ble_hw_whitelist_enable(void)
+{
+}
+
+
+void
+ble_hw_whitelist_disable(void)
+{
+}
+
+int
+ble_hw_whitelist_match(void)
+{
+ return 0;
+}
+
+int
+ble_hw_encrypt_block(struct ble_encryption_block *ecb)
+{
+ uint32_t in_addr;
+ uint32_t out_addr;
+
+ /*
+ * The following code bears some explanation. This function is called by
+ * the LL task to encrypt blocks and calculate session keys. Address
+ * resolution also calls this function. Furthermore, during connections,
+ * the M0 crypto accelerator is used but this function is not called when
+ * using it. During the entire connection event, the M0 crypto block cannot
+ * be used as the crypto state (some of it) needs to remain un-changed.
+ * Note that this is also true when address resolution is enabled: the
+ * HW crypto block is set up and cannot be modified.
+ *
+ * Rather than attempt to share the M0 crypto block between the various
+ * controller features which require it, we decided to use software to
+ * perform the encryption task for anything being done at the link-layer
+ * (outside of an ISR). If this function is called inside an ISR, and it
+ * is when resolving addresses, the crypto accelerator is not being used
+ * by a connection event. Thus, we check to see if we are inside of an ISR.
+ * If so, we use the M0 crypto block. If outside of an ISR, we use the M33
+ */
+ if (!os_arch_in_isr()) {
+ tc_aes128_set_encrypt_key(&g_ctx, ecb->key);
+ tc_aes_encrypt(ecb->cipher_text, ecb->plain_text, &g_ctx);
+ return 0;
+ }
+
+ /* Need to retain state of in/out pointers */
+ in_addr = CMAC->CM_CRYPTO_IN_ADR2_REG;
+ out_addr = CMAC->CM_CRYPTO_OUT_ADR_REG;
+
+ while (CMAC->CM_CRYPTO_STAT_REG & CMAC_CM_CRYPTO_STAT_REG_CM_CRYPTO_BUSY_Msk);
+
+ /* RECB, memory in/out, encryption */
+ CMAC->CM_CRYPTO_CTRL_REG = CMAC_CM_CRYPTO_CTRL_REG_CM_CRYPTO_ECB_ENC_EN_Msk |
+ CMAC_CM_CRYPTO_CTRL_REG_CM_CRYPTO_IN_SEL_Msk |
+ CMAC_CM_CRYPTO_CTRL_REG_CM_CRYPTO_OUT_SEL_Msk |
+ CMAC_CM_CRYPTO_CTRL_REG_CM_CRYPTO_ENC_DECN_Msk;
+
+ CMAC->CM_CRYPTO_KEY_31_0_REG = get_le32(&ecb->key[0]);
+ CMAC->CM_CRYPTO_KEY_63_32_REG = get_le32(&ecb->key[4]);
+ CMAC->CM_CRYPTO_KEY_95_64_REG = get_le32(&ecb->key[8]);
+ CMAC->CM_CRYPTO_KEY_127_96_REG = get_le32(&ecb->key[12]);
+ CMAC->CM_CRYPTO_IN_ADR2_REG = (uint32_t)ecb->plain_text;
+ CMAC->CM_CRYPTO_OUT_ADR_REG = (uint32_t)ecb->cipher_text;
+
+ CMAC->CM_EXC_STAT_REG = CMAC_CM_EXC_STAT_REG_EXC_CRYPTO_Msk;
+ CMAC->CM_EV_SET_REG = CMAC_CM_EV_SET_REG_EV_CRYPTO_START_Msk;
+ while (!(CMAC->CM_EXC_STAT_REG & CMAC_CM_EXC_STAT_REG_EXC_CRYPTO_Msk));
+ CMAC->CM_EXC_STAT_REG = CMAC_CM_EXC_STAT_REG_EXC_CRYPTO_Msk;
+
+ CMAC->CM_CRYPTO_IN_ADR2_REG = in_addr;
+ CMAC->CM_CRYPTO_OUT_ADR_REG = out_addr;
+
+ return 0;
+}
+
+void
+ble_hw_resolv_list_clear(void)
+{
+ g_ble_hw_resolv_list.count = 0;
+}
+
+int
+ble_hw_resolv_list_add(uint8_t *irk)
+{
+ struct ble_hw_resolv_irk *e;
+
+ if (g_ble_hw_resolv_list.count == BLE_HW_RESOLV_LIST_SIZE) {
+ return BLE_ERR_MEM_CAPACITY;
+ }
+
+ e = &g_ble_hw_resolv_list.irk[g_ble_hw_resolv_list.count];
+ /* Prepare key here so we do not need to do it during resolving */
+ e->key[0] = get_le32(&irk[0]);
+ e->key[1] = get_le32(&irk[4]);
+ e->key[2] = get_le32(&irk[8]);
+ e->key[3] = get_le32(&irk[12]);
+
+ g_ble_hw_resolv_list.count++;
+
+ return BLE_ERR_SUCCESS;
+}
+
+void
+ble_hw_resolv_list_rmv(int index)
+{
+ struct ble_hw_resolv_irk *e;
+
+ if (index < g_ble_hw_resolv_list.count) {
+ g_ble_hw_resolv_list.count--;
+
+ e = &g_ble_hw_resolv_list.irk[index];
+ memmove(e, e + 1, (g_ble_hw_resolv_list.count - index) * sizeof(e->key));
+ }
+}
+
+uint8_t
+ble_hw_resolv_list_size(void)
+{
+ return BLE_HW_RESOLV_LIST_SIZE;
+}
+
+int
+ble_hw_resolv_list_match(void)
+{
+ return g_ble_hw_resolv_proc.f_match ?
+ g_ble_hw_resolv_proc.irk - g_ble_hw_resolv_list.irk : -1;
+}
+
+static void
+ble_hw_resolv_proc_next(void)
+{
+ void *src = &g_ble_hw_resolv_proc.irk->key;
+
+ if (g_ble_hw_resolv_proc.irk == g_ble_hw_resolv_proc.irk_end) {
+ g_ble_hw_resolv_proc.f_done = 1;
+ g_ble_hw_resolv_proc.f_active = 0;
+ } else {
+ __asm__ volatile (".syntax unified \n"
+ " ldm %[ptr]!, {r1, r2, r3, r4} \n"
+ " ldr %[ptr], =%[reg] \n"
+ " stm %[ptr]!, {r1, r2, r3, r4} \n"
+ : [ptr] "+l" (src)
+ : [reg] "i" (&CMAC->CM_CRYPTO_KEY_31_0_REG)
+ : "r1", "r2", "r3", "r4", "memory");
+
+ CMAC->CM_EV_SET_REG = CMAC_CM_EV_SET_REG_EV_CRYPTO_START_Msk;
+ }
+}
+
+void
+ble_hw_resolv_proc_enable(void)
+{
+ assert(!g_ble_hw_resolv_proc.f_active);
+
+ CMAC->CM_CRYPTO_CTRL_REG = CMAC_CM_CRYPTO_CTRL_REG_CM_CRYPTO_SW_REQ_ABORT_Msk;
+
+ CMAC->CM_CRYPTO_CTRL_REG = CMAC_CM_CRYPTO_CTRL_REG_CM_CRYPTO_ECB_ENC_EN_Msk |
+ CMAC_CM_CRYPTO_CTRL_REG_CM_CRYPTO_IN_SEL_Msk |
+ CMAC_CM_CRYPTO_CTRL_REG_CM_CRYPTO_OUT_SEL_Msk |
+ CMAC_CM_CRYPTO_CTRL_REG_CM_CRYPTO_ENC_DECN_Msk;
+
+ CMAC->CM_CRYPTO_IN_ADR2_REG = (uint32_t)g_ble_hw_resolv_proc.crypto_prand_in;
+ CMAC->CM_CRYPTO_OUT_ADR_REG = (uint32_t)g_ble_hw_resolv_proc.crypto_e_out;
+
+ g_ble_hw_resolv_proc.irk = g_ble_hw_resolv_list.irk;
+ g_ble_hw_resolv_proc.irk_end = g_ble_hw_resolv_list.irk +
+ g_ble_hw_resolv_list.count;
+ g_ble_hw_resolv_proc.f_configured = 1;
+ g_ble_hw_resolv_proc.f_active = 0;
+
+ /*
+ * It would be better to enable IRQ in ble_hw_resolv_proc_start, but this
+ * would introduce a bit of latency when starting resolving procedure and
+ * we need to save every us possible there in order to be able to resolve
+ * RPA on time.
+ */
+ NVIC_ClearPendingIRQ(CRYPTO_IRQn);
+ NVIC_EnableIRQ(CRYPTO_IRQn);
+}
+
+void
+ble_hw_resolv_proc_disable(void)
+{
+ g_ble_hw_resolv_proc.f_configured = 0;
+ g_ble_hw_resolv_proc.f_active = 0;
+ g_ble_hw_resolv_proc.f_match = 0;
+ g_ble_hw_resolv_proc.f_done = 1;
+
+ NVIC_DisableIRQ(CRYPTO_IRQn);
+}
+
+void
+ble_hw_resolv_proc_start(const uint8_t *addr)
+{
+ assert(g_ble_hw_resolv_proc.f_configured);
+
+ /* crypto_prand_in is already zeroed so prand is properly padded */
+ g_ble_hw_resolv_proc.crypto_prand_in[3] = get_be24(&addr[3]) << 8;
+ g_ble_hw_resolv_proc.hash = get_be24(&addr[0]);
+
+ g_ble_hw_resolv_proc.f_match = 0;
+ g_ble_hw_resolv_proc.f_done = 0;
+ g_ble_hw_resolv_proc.f_active = 1;
+
+ ble_hw_resolv_proc_next();
+}
+
+void
+CRYPTO_IRQHandler(void)
+{
+ uint32_t hash;
+
+ CMAC->CM_EXC_STAT_REG = CMAC_CM_EXC_STAT_REG_EXC_CRYPTO_Msk;
+
+ hash = g_ble_hw_resolv_proc.crypto_e_out[3] >> 8;
+ if (g_ble_hw_resolv_proc.hash == hash) {
+ g_ble_hw_resolv_proc.f_active = 0;
+ g_ble_hw_resolv_proc.f_match = 1;
+ g_ble_hw_resolv_proc.f_done = 1;
+ } else {
+ g_ble_hw_resolv_proc.irk++;
+ ble_hw_resolv_proc_next();
+ }
+}
diff --git a/src/libs/mynewt-nimble/nimble/drivers/dialog_cmac/src/ble_hw_priv.h b/src/libs/mynewt-nimble/nimble/drivers/dialog_cmac/src/ble_hw_priv.h
new file mode 100644
index 00000000..627994ff
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/drivers/dialog_cmac/src/ble_hw_priv.h
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#ifndef _BLE_HW_PRIV_H_
+#define _BLE_HW_PRIV_H_
+
+#include <stdint.h>
+
+void ble_hw_resolv_proc_enable(void);
+void ble_hw_resolv_proc_disable(void);
+void ble_hw_resolv_proc_start(const uint8_t *addr);
+
+#endif /* _BLE_HW_PRIV_H_ */
diff --git a/src/libs/mynewt-nimble/nimble/drivers/dialog_cmac/src/ble_phy.c b/src/libs/mynewt-nimble/nimble/drivers/dialog_cmac/src/ble_phy.c
new file mode 100644
index 00000000..d5767c56
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/drivers/dialog_cmac/src/ble_phy.c
@@ -0,0 +1,1798 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include "syscfg/syscfg.h"
+#if !MYNEWT_VAL(BLE_PHY_DEBUG_DSER)
+#define MCU_DIAG_SER_DISABLE
+#endif
+
+#include <assert.h>
+#include <stdint.h>
+#include <assert.h>
+#include "nimble/ble.h"
+#include "mcu/mcu.h"
+#include "mcu/cmac_timer.h"
+#include "cmac_driver/cmac_shared.h"
+#include "controller/ble_phy.h"
+#include "controller/ble_ll.h"
+#include "stats/stats.h"
+#include "CMAC.h"
+#include "ble_hw_priv.h"
+#include "ble_rf_priv.h"
+
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_CODED_PHY)
+#error LE Coded PHY cannot be enabled on DA1469x
+#endif
+
+/* Statistics */
+STATS_SECT_START(ble_phy_stats)
+ STATS_SECT_ENTRY(phy_isrs)
+ STATS_SECT_ENTRY(tx_good)
+ STATS_SECT_ENTRY(tx_fail)
+ STATS_SECT_ENTRY(tx_late)
+ STATS_SECT_ENTRY(tx_bytes)
+ STATS_SECT_ENTRY(rx_starts)
+ STATS_SECT_ENTRY(rx_aborts)
+ STATS_SECT_ENTRY(rx_valid)
+ STATS_SECT_ENTRY(rx_crc_err)
+ STATS_SECT_ENTRY(rx_late)
+ STATS_SECT_ENTRY(radio_state_errs)
+ STATS_SECT_ENTRY(rx_hw_err)
+ STATS_SECT_ENTRY(tx_hw_err)
+STATS_SECT_END
+STATS_SECT_DECL(ble_phy_stats) ble_phy_stats;
+
+STATS_NAME_START(ble_phy_stats)
+ STATS_NAME(ble_phy_stats, phy_isrs)
+ STATS_NAME(ble_phy_stats, tx_good)
+ STATS_NAME(ble_phy_stats, tx_fail)
+ STATS_NAME(ble_phy_stats, tx_late)
+ STATS_NAME(ble_phy_stats, tx_bytes)
+ STATS_NAME(ble_phy_stats, rx_starts)
+ STATS_NAME(ble_phy_stats, rx_aborts)
+ STATS_NAME(ble_phy_stats, rx_valid)
+ STATS_NAME(ble_phy_stats, rx_crc_err)
+ STATS_NAME(ble_phy_stats, rx_late)
+ STATS_NAME(ble_phy_stats, radio_state_errs)
+ STATS_NAME(ble_phy_stats, rx_hw_err)
+ STATS_NAME(ble_phy_stats, tx_hw_err)
+STATS_NAME_END(ble_phy_stats)
+
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_CODED_PHY)
+#error LE Coded PHY is not supported
+#endif
+
+/* An easy way to get and set bit field value in CMAC registers */
+#define CMAC_SETREGF(_reg, _field, _val) \
+ CMAC->_reg = (CMAC->_reg & ~(CMAC_ ## _reg ## _ ## _field ## _Msk)) | \
+ ((_val) << (CMAC_ ## _reg ## _ ## _field ## _Pos));
+#define CMAC_GETREGF(_reg, _field) \
+ (CMAC->_reg & (CMAC_ ## _reg ## _ ## _field ## _Msk)) >> \
+ (CMAC_ ## _reg ## _ ## _field ## _Pos)
+
+/* Definitions for fields queue */
+#define FIELD_DATA_REG_DMA_TX(_offset, _len) \
+ ((uint32_t)&g_ble_phy_tx_buf[(_offset)] & 0x3ffff) | ((_len) << 20)
+#define FIELD_DATA_REG_DMA_RX(_offset, _len) \
+ ((uint32_t)&g_ble_phy_rx_buf[(_offset)] & 0x3ffff) | ((_len) << 20)
+
+#if MYNEWT_VAL(BLE_LL_DTM)
+#define PHY_WHITENING (g_ble_phy_data.phy_whitening)
+#else
+#define PHY_WHITENING (1)
+#endif
+
+#define FIELD_CTRL_REG_TX_PREAMBLE \
+ (0 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_XL_CRC_Pos) | \
+ (0 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_XL_WHITENING_Pos) | \
+ (0 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_TX_DATA_SRC_Pos) | \
+ (g_ble_phy_data.phy_mode_evpsym << \
+ CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_EVPSYMBOL_LUT_Pos) | \
+ (1 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_VALID_Pos) | \
+ (g_ble_phy_data.phy_mode_pre_len << \
+ CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_SIZE_M1_Pos)
+#define FIELD_CTRL_REG_TX_ACCESS_ADDR \
+ (1 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_EXC_ON_EXP_Pos) | \
+ (0 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_XL_CRC_Pos) | \
+ (0 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_XL_WHITENING_Pos) | \
+ (0 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_TX_DATA_SRC_Pos) | \
+ (g_ble_phy_data.phy_mode_evpsym << \
+ CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_EVPSYMBOL_LUT_Pos) | \
+ (1 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_VALID_Pos) | \
+ (31 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_SIZE_M1_Pos)
+#define FIELD_CTRL_REG_TX_PAYLOAD \
+ (1 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_XL_CRC_Pos) | \
+ (PHY_WHITENING << \
+ CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_XL_WHITENING_Pos) | \
+ (1 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_XL_DMA_MEM_Pos) | \
+ (g_ble_phy_data.phy_mode_evpsym << \
+ CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_EVPSYMBOL_LUT_Pos) | \
+ (1 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_VALID_Pos);
+#define FIELD_CTRL_REG_TX_ENC_PAYLOAD \
+ (1 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_XL_CRC_Pos) | \
+ (1 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_XL_WHITENING_Pos) | \
+ (1 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_XL_DMA_CRYPTO_Pos) | \
+ (g_ble_phy_data.phy_mode_evpsym << \
+ CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_EVPSYMBOL_LUT_Pos) | \
+ (1 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_VALID_Pos)
+#define FIELD_CTRL_REG_TX_MIC \
+ (1 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_XL_CRC_Pos) | \
+ (1 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_XL_WHITENING_Pos) | \
+ (1 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_XL_DMA_CRYPTO_Pos) | \
+ (g_ble_phy_data.phy_mode_evpsym << \
+ CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_EVPSYMBOL_LUT_Pos) | \
+ (1 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_VALID_Pos)
+#define FIELD_CTRL_REG_TX_CRC \
+ (0 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_XL_CRC_Pos) | \
+ (PHY_WHITENING << \
+ CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_XL_WHITENING_Pos) | \
+ (1 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_TX_DATA_SRC_Pos) | \
+ (1 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_LAST_Pos) | \
+ (1 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_MSB_FIRST_Pos) | \
+ (g_ble_phy_data.phy_mode_evpsym << \
+ CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_EVPSYMBOL_LUT_Pos) | \
+ (1 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_VALID_Pos) | \
+ (23 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_SIZE_M1_Pos)
+#define FIELD_CTRL_REG_RX_ACCESS_ADDR \
+ (0 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_XL_CRC_Pos) | \
+ (0 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_XL_WHITENING_Pos) | \
+ (0 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_TX_DATA_SRC_Pos) | \
+ (g_ble_phy_data.phy_mode_evpsym << \
+ CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_EVPSYMBOL_LUT_Pos) | \
+ (1 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_XL_CORR_Pos) | \
+ (1 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_VALID_Pos) | \
+ (31 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_SIZE_M1_Pos)
+#define FIELD_CTRL_REG_RX_HEADER \
+ (1 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_EXC_ON_EXP_Pos) | \
+ (1 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_XL_CRC_Pos) | \
+ (PHY_WHITENING << \
+ CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_XL_WHITENING_Pos) | \
+ (1 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_XL_DMA_MEM_Pos) | \
+ (g_ble_phy_data.phy_mode_evpsym << \
+ CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_EVPSYMBOL_LUT_Pos) | \
+ (1 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_VALID_Pos)
+#define FIELD_CTRL_REG_RX_CRC \
+ (1 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_XL_CRC_Pos) | \
+ (PHY_WHITENING << \
+ CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_XL_WHITENING_Pos) | \
+ (1 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_LAST_Pos) | \
+ (1 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_MSB_FIRST_Pos) | \
+ (g_ble_phy_data.phy_mode_evpsym << \
+ CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_EVPSYMBOL_LUT_Pos) | \
+ (1 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_VALID_Pos) | \
+ (1 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_XL_DMA_MEM_Pos)
+#define FIELD_CTRL_REG_RX_PAYLOAD \
+ (1 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_XL_CRC_Pos) | \
+ (PHY_WHITENING << \
+ CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_XL_WHITENING_Pos) | \
+ (1 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_XL_DMA_MEM_Pos) | \
+ (g_ble_phy_data.phy_mode_evpsym << \
+ CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_EVPSYMBOL_LUT_Pos) | \
+ (1 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_VALID_Pos)
+#define FIELD_CTRL_REG_RX_PAYLOAD_WITH_EXC \
+ FIELD_CTRL_REG_RX_PAYLOAD | \
+ (1 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_EXC_ON_EXP_Pos)
+#define FIELD_CTRL_REG_RX_ENC_PAYLOAD \
+ (1 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_XL_CRC_Pos) | \
+ (1 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_XL_WHITENING_Pos) | \
+ (1 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_XL_DMA_CRYPTO_Pos) | \
+ (g_ble_phy_data.phy_mode_evpsym << \
+ CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_EVPSYMBOL_LUT_Pos) | \
+ (1 << CMAC_CM_FIELD_PUSH_CTRL_REG_FIELD_VALID_Pos)
+
+/* RF power up/down delays */
+#define PHY_DELAY_POWER_DN_RX (23)
+#define PHY_DELAY_POWER_DN_TX (23)
+#define PHY_DELAY_POWER_UP_RX (90)
+#define PHY_DELAY_POWER_UP_TX (75)
+#define PHY_DELAY_TX_RX ((PHY_DELAY_POWER_DN_TX) + (PHY_DELAY_POWER_UP_RX))
+#define PHY_DELAY_RX_TX ((PHY_DELAY_POWER_DN_RX) + (PHY_DELAY_POWER_UP_TX))
+
+/* RF TX/RX path delays */
+static const uint8_t g_ble_phy_path_delay_tx[2] = {
+ 4, /* 1M = 3.8us */
+ 0, /* 2M = 0.2us */
+};
+static const uint8_t g_ble_phy_path_delay_rx[2] = {
+ 2, /* 1M = 2.2us */
+ 1, /* 2M = 0.8us */
+};
+
+/* Measured and pre-calculated offsets for transitions */
+static const uint8_t g_ble_phy_frame_offset_txrx[4] = {
+ ((BLE_LL_IFS) - (PHY_DELAY_TX_RX) + (4)), /* 2M/1M */
+ ((BLE_LL_IFS) - (PHY_DELAY_TX_RX) + (5)), /* 1M/1M */
+ ((BLE_LL_IFS) - (PHY_DELAY_TX_RX) + (4)), /* 2M/2M */
+ ((BLE_LL_IFS) - (PHY_DELAY_TX_RX) + (5)), /* 1M/2M */
+};
+static const uint8_t g_ble_phy_frame_offset_rxtx[4] = {
+ ((BLE_LL_IFS) - (PHY_DELAY_RX_TX) - (5)), /* 2M/1M */
+ ((BLE_LL_IFS) - (PHY_DELAY_RX_TX) - (6)), /* 1M/1M */
+ ((BLE_LL_IFS) - (PHY_DELAY_RX_TX) - (3)), /* 2M/2M */
+ ((BLE_LL_IFS) - (PHY_DELAY_RX_TX) - (5)), /* 1M/2M */
+};
+
+/* packet start offsets (in usecs) */
+static const uint16_t g_ble_phy_mode_pkt_start_off[BLE_PHY_NUM_MODE] = { 376, 40, 24, 376 };
+
+struct ble_phy_data {
+ uint8_t phy_state; /* Current state */
+ uint8_t channel; /* Current PHY channel */
+ uint8_t phy_mode_cur; /* Current PHY mode */
+ uint8_t phy_mode_tx; /* TX PHY mode */
+ uint8_t phy_mode_rx; /* RX PHY mode */
+ uint8_t phy_mode_pre_len; /* Preamble length - 1 */
+ uint8_t phy_mode_evpsym; /* EVPSYMBOL_LUT value for fields */
+ uint8_t end_transition; /* Scheduled transition */
+ uint8_t path_delay_tx;
+ uint8_t path_delay_rx;
+ uint8_t frame_offset_txrx;
+ uint8_t frame_offset_rxtx;
+ uint8_t phy_rx_started;
+ uint8_t phy_encrypted;
+ uint8_t phy_privacy;
+#if MYNEWT_VAL(BLE_LL_DTM)
+ uint8_t phy_whitening; /* Whitening state (disabled for DTM) */
+#endif
+ uint32_t access_addr; /* Current access address */
+ uint32_t crc_init;
+ uint32_t llt_at_cputime;
+ uint32_t cputime_at_llt;
+ uint64_t start_llt;
+ struct ble_mbuf_hdr rxhdr;
+ ble_phy_tx_end_func txend_cb;
+ void *txend_arg;
+};
+
+static struct ble_phy_data g_ble_phy_data;
+
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_ENCRYPTION)
+/* Encryption related variables */
+struct ble_phy_encrypt_obj {
+ uint8_t key[16];
+ uint8_t b0[16];
+ uint8_t b1[16];
+ uint8_t ai[16];
+};
+
+struct ble_phy_encrypt_obj g_ble_phy_encrypt_data;
+
+static void ble_phy_tx_enc_start(void);
+static void ble_phy_rx_enc_start(uint8_t len);
+#endif
+
+#define SW_MAC_EXC_NONE (0)
+#define SW_MAC_EXC_LL_RX_END (1)
+#define SW_MAC_EXC_TXEND_CB (2)
+#define SW_MAC_EXC_LL_RX_START (3)
+#define SW_MAC_EXC_WFR_TIMER_EXP (4)
+
+static volatile uint8_t g_sw_mac_exc;
+
+/* Channel index to RF channel mapping */
+static const uint8_t g_ble_phy_chan_to_rf[BLE_PHY_NUM_CHANS] = {
+ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, /* 0-9 */
+ 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, /* 10-19 */
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, /* 20-29 */
+ 32, 33, 34, 35, 36, 37, 38, 0, 12, 39, /* 30-39 */
+};
+
+__attribute__((aligned(4)))
+static uint8_t g_ble_phy_tx_buf[BLE_PHY_MAX_PDU_LEN + 3];
+__attribute__((aligned(4)))
+static uint8_t g_ble_phy_rx_buf[BLE_PHY_MAX_PDU_LEN + 3];
+
+static void ble_phy_irq_field_tx(void);
+static void ble_phy_irq_field_rx(void);
+static void ble_phy_irq_frame_tx(void);
+static void ble_phy_irq_frame_rx(void);
+static bool ble_phy_rx_start_isr(void);
+static void ble_phy_rx_setup_fields(void);
+static void ble_phy_rx_setup_xcvr(void);
+static void ble_phy_mode_apply(uint8_t phy_mode);
+
+void
+FIELD_IRQHandler(void)
+{
+ MCU_DIAG_SER('E');
+
+ switch (g_ble_phy_data.phy_state) {
+ case BLE_PHY_STATE_TX:
+ ble_phy_irq_field_tx();
+ break;
+ case BLE_PHY_STATE_RX:
+ ble_phy_irq_field_rx();
+ break;
+ default:
+ STATS_INC(ble_phy_stats, radio_state_errs);
+ CMAC->CM_EXC_STAT_REG = 0xfffffffe;
+ break;
+ }
+
+ MCU_DIAG_SER('e');
+}
+
+void
+CALLBACK_IRQHandler(void)
+{
+ MCU_DIAG_SER('C');
+
+ /* XXX: clear these for now. */
+ (void)CMAC->CM_BS_SMPL_D_REG;
+
+ /* Clear IRQ*/
+ CMAC->CM_EV_SET_REG = CMAC_CM_EV_SET_REG_EV1C_CALLBACK_VALID_CLR_Msk;
+ CMAC->CM_EXC_STAT_REG = CMAC_CM_EXC_STAT_REG_EXC_FIELD_ON_THR_EXP_Msk;
+
+ /*
+ * Program next frame for transition to TX. CM_EV_LINKUP_REG register to
+ * enable actual transition can be set later, we just need to make sure 2nd
+ * frame is already set before current frame is finished - this guarantees
+ * that frame for transition will be moved to 1st frame once current frame
+ * is popped off the queue.
+ */
+ CMAC->CM_FRAME_2_REG = CMAC_CM_FRAME_2_REG_FRAME_VALID_Msk |
+ CMAC_CM_FRAME_2_REG_FRAME_TX_Msk |
+ CMAC_CM_FRAME_2_REG_FRAME_EXC_ON_BS_START_Msk |
+ ((g_ble_phy_data.frame_offset_rxtx) <<
+ CMAC_CM_FRAME_2_REG_FRAME_START_OFFSET_Pos);
+
+ /*
+ * We just got an access address match so do this as early as possible
+ * to save time in the field rx isr.
+ */
+ ble_phy_rx_start_isr();
+
+ MCU_DIAG_SER('c');
+}
+
+void
+FRAME_IRQHandler(void)
+{
+ MCU_DIAG_SER('F');
+
+ switch (g_ble_phy_data.phy_state) {
+ case BLE_PHY_STATE_TX:
+ ble_phy_irq_frame_tx();
+ break;
+ case BLE_PHY_STATE_RX:
+ ble_phy_irq_frame_rx();
+ break;
+ default:
+ STATS_INC(ble_phy_stats, radio_state_errs);
+ CMAC->CM_EXC_STAT_REG = 0xfffffffe;
+ break;
+ }
+
+ MCU_DIAG_SER('f');
+}
+
+void
+SW_MAC_IRQHandler(void)
+{
+ uint8_t exc;
+ int rc;
+
+ MCU_DIAG_SER('S');
+
+ CMAC->CM_EXC_STAT_REG = CMAC_CM_EXC_STAT_REG_EXC_SW_MAC_Msk;
+ assert(g_sw_mac_exc);
+
+ exc = g_sw_mac_exc;
+ g_sw_mac_exc = 0;
+
+ MCU_DIAG_SER('0' + exc);
+
+ /* Next SW_MAC handover can now be queued */
+ os_arch_cmac_bs_ctrl_irq_unblock();
+
+ switch (exc) {
+ case SW_MAC_EXC_TXEND_CB:
+ assert(g_ble_phy_data.txend_cb);
+ g_ble_phy_data.txend_cb(g_ble_phy_data.txend_arg);
+ break;
+ case SW_MAC_EXC_WFR_TIMER_EXP:
+ ble_ll_wfr_timer_exp(NULL);
+ break;
+ case SW_MAC_EXC_LL_RX_START:
+ /* Call Link Layer receive start function */
+ rc = ble_ll_rx_start(&g_ble_phy_rx_buf[0], g_ble_phy_data.channel,
+ &g_ble_phy_data.rxhdr);
+ if (rc == 0) {
+ /* Set rx started flag and enable rx end ISR */
+ g_ble_phy_data.phy_rx_started = 1;
+
+ /* No transition */
+ CMAC->CM_EV_LINKUP_REG = CMAC_CM_EV_LINKUP_REG_LU_PHY_TO_IDLE_2_NONE_Msk |
+ CMAC_CM_EV_LINKUP_REG_LU_FRAME_START_2_NONE_Msk;
+ } else if (rc > 0) {
+ g_ble_phy_data.phy_rx_started = 1;
+
+ /* Setup transition */
+ CMAC->CM_EV_LINKUP_REG = CMAC_CM_EV_LINKUP_REG_LU_PHY_TO_IDLE_2_EXC_Msk |
+ CMAC_CM_EV_LINKUP_REG_LU_FRAME_START_2_PHY_TO_IDLE_Msk;
+ } else {
+ /* Disable PHY */
+ ble_phy_disable();
+ STATS_INC(ble_phy_stats, rx_aborts);
+ }
+ break;
+ case SW_MAC_EXC_LL_RX_END:
+ /* Call LL end processing */
+ rc = ble_ll_rx_end(&g_ble_phy_rx_buf[0], &g_ble_phy_data.rxhdr);
+ if (rc < 0) {
+ ble_phy_disable();
+ }
+ break;
+ default:
+ assert(0);
+ break;
+ }
+
+ MCU_DIAG_SER('s');
+}
+
+static inline uint32_t
+ble_phy_convert_and_record_start_time(uint32_t cputime, uint8_t rem_usecs)
+{
+ uint64_t ll_val;
+
+ ll_val = cmac_timer_convert_hal2llt(cputime);
+
+ /*
+ * Since we just converted cputime to the LL timer, record both these
+ * values as they will be used to calculate packet reception start time.
+ */
+ g_ble_phy_data.cputime_at_llt = cputime;
+ g_ble_phy_data.llt_at_cputime = ll_val;
+ g_ble_phy_data.start_llt = ll_val + rem_usecs;
+
+ return ll_val;
+}
+
+static inline void
+ble_phy_sw_mac_handover(uint8_t exc)
+{
+ assert(!g_sw_mac_exc);
+
+ g_sw_mac_exc = exc;
+
+ CMAC->CM_EV_SET_REG = CMAC_CM_EV_SET_REG_EV1C_SW_MAC_Msk;
+
+ /*
+ * We want SW_MAC to be fired just after BS_CTRL interrupt so we block
+ * BS_CTRL temporarily and SW_MAC is next in order of interrupts priority.
+ */
+ os_arch_cmac_bs_ctrl_irq_block();
+}
+
+static void
+ble_phy_rx_end_isr(void)
+{
+ struct ble_mbuf_hdr *ble_hdr;
+
+ /* XXX just clear captured timer for now. Handle rx end time */
+ (void)CMAC->CM_TS1_REG;
+
+ /* Set RSSI and CRC status flag in header */
+ ble_hdr = &g_ble_phy_data.rxhdr;
+
+ /* Count PHY crc errors and valid packets */
+ if (CMAC->CM_CRC_REG != 0) {
+ STATS_INC(ble_phy_stats, rx_crc_err);
+ } else {
+ STATS_INC(ble_phy_stats, rx_valid);
+ ble_hdr->rxinfo.flags |= BLE_MBUF_HDR_F_CRC_OK;
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_ENCRYPTION)
+ if (g_ble_phy_data.phy_encrypted) {
+ /* Only set MIC failure flag if frame is not zero length */
+ if (g_ble_phy_rx_buf[1] != 0) {
+ if (CMAC->CM_CRYPTO_STAT_REG != 0) {
+ ble_hdr->rxinfo.flags |= BLE_MBUF_HDR_F_MIC_FAILURE;
+ } else {
+ g_ble_phy_rx_buf[1] = g_ble_phy_rx_buf[1] - 4;
+ }
+ }
+ }
+#endif
+ }
+
+ ble_phy_sw_mac_handover(SW_MAC_EXC_LL_RX_END);
+}
+
+static bool
+ble_phy_rx_start_isr(void)
+{
+ uint32_t llt32;
+ uint32_t llt_10_0;
+ uint32_t llt_10_0_mask;
+ uint32_t timestamp;
+ uint32_t ticks;
+ uint32_t usecs;
+ struct ble_mbuf_hdr *ble_hdr;
+
+ /* Initialize the ble mbuf header */
+ ble_hdr = &g_ble_phy_data.rxhdr;
+ ble_hdr->rxinfo.flags = ble_ll_state_get();
+ ble_hdr->rxinfo.channel = g_ble_phy_data.channel;
+ ble_hdr->rxinfo.handle = 0;
+ ble_hdr->rxinfo.phy = ble_phy_get_cur_phy();
+ ble_hdr->rxinfo.phy_mode = g_ble_phy_data.phy_mode_rx;
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_EXT_ADV)
+ ble_hdr->rxinfo.user_data = NULL;
+#endif
+
+ /* Read the latched RSSI value */
+ ble_hdr->rxinfo.rssi = ble_rf_get_rssi();
+#if MYNEWT_VAL(CMAC_DEBUG_DATA_ENABLE)
+ g_cmac_shared_data.debug.last_rx_rssi = ble_hdr->rxinfo.rssi;
+#endif
+
+ /* Count rx starts */
+ STATS_INC(ble_phy_stats, rx_starts);
+
+ /*
+ * Calculate packet start time. Note that we have only received the
+ * access address at this point but we should have the 1st symbol and
+ * thus the timestamp should be set (this is based on looking at the diag
+ * signals). For now, lets make sure that the dirty bit is set. The
+ * dirty bit means that the timestamp was set since the last time cleared.
+ * Note that we need to read the timestamp first to guarantee it was set
+ * before reading the LL timer.
+ */
+ timestamp = CMAC->CM_TS1_REG;
+ assert((timestamp & CMAC_CM_TS1_REG_TS1_DIRTY_Msk) != 0);
+
+ /* Get the LL timer (only need 32 bits) */
+ llt32 = cmac_timer_read32();
+
+ /*
+ * We assume that the timestamp was set within 11 bits, or 2047 usecs, of
+ * when we read the ll timer. We assume this because we need to calculate
+ * the LL timer value at the timestamp. If the low 11 bits of the LL timer
+ * are greater than the timestamp, it means that the upper bits of the
+ * timestamp are correct. If the timestamp value is greater, it means the
+ * timer wrapped the 11 bits and we need to adjust the LL timer value.
+ */
+ llt_10_0_mask = (CMAC_CM_TS1_REG_TS1_TIMER1_9_0_Msk |
+ CMAC_CM_TS1_REG_TS1_TIMER1_10_Msk);
+ timestamp &= llt_10_0_mask;
+ llt_10_0 = llt32 & llt_10_0_mask;
+ llt32 &= ~llt_10_0_mask;
+ if (timestamp > llt_10_0) {
+ llt32 -= 2048;
+ }
+ llt32 |= timestamp;
+
+ /* Actual RX start time needs to account for preamble and access address */
+ llt32 -= g_ble_phy_mode_pkt_start_off[g_ble_phy_data.phy_mode_rx] +
+ g_ble_phy_data.path_delay_rx;
+
+ if (llt32 < g_ble_phy_data.llt_at_cputime) {
+ g_ble_phy_data.llt_at_cputime -= 31;
+ g_ble_phy_data.cputime_at_llt--;
+ }
+
+ /*
+ * We now have the LL timer when the packet was received. Get the cputime
+ * and the leftover usecs.
+ */
+ usecs = llt32 - g_ble_phy_data.llt_at_cputime;
+ ticks = os_cputime_usecs_to_ticks(usecs);
+ ble_hdr->beg_cputime = g_ble_phy_data.cputime_at_llt + ticks;
+ ble_hdr->rem_usecs = usecs - os_cputime_ticks_to_usecs(ticks);
+
+ return true;
+}
+
+static void
+ble_phy_irq_field_tx_exc_bs_start_4this(void)
+{
+ CMAC->CM_EXC_STAT_REG = CMAC_CM_EXC_STAT_REG_EXC_BS_START_4THIS_Msk;
+
+ if (g_ble_phy_data.end_transition == BLE_PHY_TRANSITION_TX_RX) {
+ /*
+ * Setup 2nd frame that will start after current one.
+ * -2us offset to adjust for allowed active clock accuracy.
+ */
+ CMAC->CM_FRAME_2_REG = CMAC_CM_FRAME_2_REG_FRAME_VALID_Msk |
+ (((g_ble_phy_data.frame_offset_txrx) - 2) <<
+ CMAC_CM_FRAME_2_REG_FRAME_START_OFFSET_Pos);
+
+ /* Next frame starts automatically on phy2idle */
+ CMAC->CM_EV_LINKUP_REG = CMAC_CM_EV_LINKUP_REG_LU_PHY_TO_IDLE_2_EXC_Msk |
+ CMAC_CM_EV_LINKUP_REG_LU_FRAME_START_2_PHY_TO_IDLE_Msk;
+
+ ble_phy_wfr_enable(BLE_PHY_WFR_ENABLE_TXRX, g_ble_phy_data.phy_mode_rx, 0);
+ } else {
+ CMAC->CM_EV_LINKUP_REG = CMAC_CM_EV_LINKUP_REG_LU_PHY_TO_IDLE_2_EXC_Msk |
+ CMAC_CM_EV_LINKUP_REG_LU_FRAME_START_2_NONE_Msk;
+ }
+
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_ENCRYPTION)
+ if (g_ble_phy_data.phy_encrypted && (g_ble_phy_tx_buf[1] != 0)) {
+ ble_phy_tx_enc_start();
+ }
+#endif
+}
+
+static void
+ble_phy_irq_field_tx_exc_field_on_thr_exp(void)
+{
+ CMAC->CM_EXC_STAT_REG = CMAC_CM_EXC_STAT_REG_EXC_FIELD_ON_THR_EXP_Msk;
+ (void)CMAC->CM_TS1_REG;
+
+ /* Set up remaining field (CRC) */
+ CMAC->CM_FIELD_PUSH_CTRL_REG = FIELD_CTRL_REG_TX_CRC;
+}
+
+static void
+ble_phy_irq_field_tx(void)
+{
+ uint32_t stat;
+
+ stat = CMAC->CM_EXC_STAT_REG;
+
+ if (stat & CMAC_CM_EXC_STAT_REG_EXC_BS_START_4THIS_Msk) {
+ MCU_DIAG_SER('6');
+ ble_phy_irq_field_tx_exc_bs_start_4this();
+ }
+
+ if (stat & CMAC_CM_EXC_STAT_REG_EXC_FIELD_ON_THR_EXP_Msk) {
+ MCU_DIAG_SER('7');
+ ble_phy_irq_field_tx_exc_field_on_thr_exp();
+ }
+}
+
+static void
+ble_phy_irq_frame_tx_exc_bs_stop(void)
+{
+ CMAC->CM_EXC_STAT_REG = CMAC_CM_EXC_STAT_REG_EXC_BS_STOP_Msk;
+
+ /* Clear latched timestamp so we do not have error on next frame */
+ (void)CMAC->CM_TS1_REG;
+
+ if (g_ble_phy_data.end_transition == BLE_PHY_TRANSITION_TX_RX) {
+#if (BLE_LL_BT5_PHY_SUPPORTED == 1)
+ ble_phy_mode_apply(g_ble_phy_data.phy_mode_rx);
+#endif
+ ble_phy_rx_setup_fields();
+ } else {
+ CMAC->CM_EV_LINKUP_REG = CMAC_CM_EV_LINKUP_REG_LU_PHY_TO_IDLE_2_EXC_Msk |
+ CMAC_CM_EV_LINKUP_REG_LU_FRAME_START_2_NONE_Msk;
+ }
+
+ if (g_ble_phy_data.txend_cb) {
+ ble_phy_sw_mac_handover(SW_MAC_EXC_TXEND_CB);
+ return;
+ }
+}
+
+static void
+ble_phy_irq_frame_tx_exc_phy_to_idle_4this(void)
+{
+ CMAC->CM_EXC_STAT_REG = CMAC_CM_EXC_STAT_REG_EXC_PHY_TO_IDLE_4THIS_Msk;
+
+ if (g_ble_phy_data.end_transition == BLE_PHY_TRANSITION_TX_RX) {
+ ble_phy_rx_setup_xcvr();
+
+ g_ble_phy_data.phy_state = BLE_PHY_STATE_RX;
+ } else {
+ /*
+ * Disable explicitly in case RX-TX was done (we cannot setup for auto
+ * disable in such case) */
+ ble_rf_stop();
+
+ g_ble_phy_data.phy_state = BLE_PHY_STATE_IDLE;
+ }
+
+ g_ble_phy_data.end_transition = BLE_PHY_TRANSITION_NONE;
+}
+
+static void
+ble_phy_irq_frame_tx(void)
+{
+ uint32_t stat;
+
+ stat = CMAC->CM_EXC_STAT_REG;
+
+ /*
+ * In case of phy2idle this should be first and only exception we handle
+ * here. This is because in case of TX-RX transition frame_start will occur
+ * at the same as phy2idle so we will have 2 exceptions here. To handle this
+ * properly we first need to handle phy2idle in TX state and keep frame_start
+ * pending so it will be called again in RX state.
+ */
+ if (stat & CMAC_CM_EXC_STAT_REG_EXC_PHY_TO_IDLE_4THIS_Msk) {
+ MCU_DIAG_SER('6');
+ ble_phy_irq_frame_tx_exc_phy_to_idle_4this();
+ return;
+ }
+
+ if (stat & CMAC_CM_EXC_STAT_REG_EXC_FRAME_START_Msk) {
+ MCU_DIAG_SER('7');
+ CMAC->CM_EXC_STAT_REG = CMAC_CM_EXC_STAT_REG_EXC_FRAME_START_Msk;
+ }
+
+ if (stat & CMAC_CM_EXC_STAT_REG_EXC_BS_STOP_Msk) {
+ MCU_DIAG_SER('8');
+ ble_phy_irq_frame_tx_exc_bs_stop();
+ }
+}
+
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_ENCRYPTION)
+static void
+ble_phy_field_rx_encrypted(uint32_t len)
+{
+ if (len) {
+ /*
+ * An encrypted frame should have a minimum length of 5
+ * bytes (at least one for payload and 4 for MIC). If the
+ * length is less than 5 this frame is bogus and will most
+ * likely fail CRC. We still need to process this frame
+ * though as we need to call the handover function with
+ * the frame. If this happens we will not bother to
+ * run the remaining bytes through the accelerator; just
+ * process them like normal and generate (a hopefully
+ * incorrect) CRC.
+ */
+ if (len >= 5) {
+ /* Start the crypto accelerator */
+ ble_phy_rx_enc_start(len);
+
+ /*
+ * We have already processed one byte; process remaining
+ * payload and MIC. Note: length contains MIC.
+ */
+ len -= 2;
+ CMAC->CM_FIELD_PUSH_DATA_REG = FIELD_DATA_REG_DMA_RX(4, len);
+ CMAC->CM_FIELD_PUSH_CTRL_REG = FIELD_CTRL_REG_RX_ENC_PAYLOAD;
+
+ /* CRC */
+ CMAC->CM_FIELD_PUSH_DATA_REG = FIELD_DATA_REG_DMA_RX(4 + len, 3);
+ CMAC->CM_FIELD_PUSH_CTRL_REG = FIELD_CTRL_REG_RX_CRC;
+ } else {
+ /* We have processed one byte so far. Send remaining
+ payload bytes to normal rx payload processing */
+ len -= 2;
+ if (len) {
+ CMAC->CM_FIELD_PUSH_DATA_REG = FIELD_DATA_REG_DMA_RX(4, len);
+ CMAC->CM_FIELD_PUSH_CTRL_REG = FIELD_CTRL_REG_RX_PAYLOAD;
+ }
+
+ CMAC->CM_FIELD_PUSH_DATA_REG = FIELD_DATA_REG_DMA_RX(4 + len, 3);
+ CMAC->CM_FIELD_PUSH_CTRL_REG = FIELD_CTRL_REG_RX_CRC;
+
+ /* Clear crypto pre-buffer */
+ CMAC->CM_CRYPTO_CTRL_REG = CMAC_CM_CRYPTO_CTRL_REG_CM_CRYPTO_SW_REQ_PBUF_CLR_Msk;
+ }
+ } else {
+ /* We programmed one byte, so get next two bytes for CRC */
+ CMAC->CM_FIELD_PUSH_DATA_REG = FIELD_DATA_REG_DMA_RX(4, 1);
+ CMAC->CM_FIELD_PUSH_CTRL_REG = FIELD_CTRL_REG_RX_CRC;
+ }
+}
+#endif
+
+static void
+ble_phy_field_rx_unencrypted(uint32_t len)
+{
+ uint8_t pduhdr;
+ uint8_t adva_thr;
+
+ if (len) {
+ pduhdr = g_ble_phy_rx_buf[0];
+ adva_thr = 0;
+
+ /*
+ * Setup interrupt after AdvA to start address resolving if
+ * privacy is enabled and TxAdd bit is set.
+ */
+ if (MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_PRIVACY) &&
+ g_ble_phy_data.phy_privacy && (pduhdr & 0x40)) {
+
+ /*
+ * For legacy advertising AdvA ends at 6th byte.
+ * For extended advertising AdvA ends at 8th byte.
+ * We already programmed 2 bytes of payload so need
+ * to adjust threshold accordingly or just reset it
+ * in case there is not enough bytes in PDU to fit AdvA.
+ */
+ adva_thr = (pduhdr & 0x0f) == 0x07 ? 6 : 4;
+ if (len >= adva_thr + 2) {
+ CMAC->CM_FIELD_PUSH_DATA_REG = FIELD_DATA_REG_DMA_RX(4, adva_thr);
+ CMAC->CM_FIELD_PUSH_CTRL_REG = FIELD_CTRL_REG_RX_PAYLOAD_WITH_EXC;
+ } else {
+ adva_thr = 0;
+ }
+ }
+
+ CMAC->CM_FIELD_PUSH_DATA_REG = FIELD_DATA_REG_DMA_RX(4 + adva_thr,
+ len - adva_thr);
+ CMAC->CM_FIELD_PUSH_CTRL_REG = FIELD_CTRL_REG_RX_PAYLOAD;
+ }
+
+ CMAC->CM_FIELD_PUSH_DATA_REG = FIELD_DATA_REG_DMA_RX(4 + len, 1);
+ CMAC->CM_FIELD_PUSH_CTRL_REG = FIELD_CTRL_REG_RX_CRC;
+}
+
+static void
+ble_phy_irq_field_rx_exc_field_on_thr_exp(void)
+{
+ uint32_t len;
+ uint32_t smpl;
+
+ CMAC->CM_EXC_STAT_REG = CMAC_CM_EXC_STAT_REG_EXC_FIELD_ON_THR_EXP_Msk;
+
+ smpl = CMAC->CM_BS_SMPL_ST_REG;
+
+ if ((smpl & CMAC_CM_BS_SMPL_ST_REG_FIELD_CNT_LATCHED_Msk) == 1) {
+ assert(g_ble_phy_data.phy_rx_started == 0);
+
+ /* Clear this */
+ (void)CMAC->CM_TS1_REG;
+
+ /* Read length of frame */
+ len = CMAC->CM_BS_SMPL_D_REG;
+ len = len & 0xFF;
+
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_ENCRYPTION)
+ if (g_ble_phy_data.phy_encrypted) {
+ ble_phy_field_rx_encrypted(len);
+ } else {
+ ble_phy_field_rx_unencrypted(len);
+ }
+#else
+ ble_phy_field_rx_unencrypted(len);
+#endif
+
+ ble_phy_sw_mac_handover(SW_MAC_EXC_LL_RX_START);
+ } else if ((smpl & CMAC_CM_BS_SMPL_ST_REG_FIELD_CNT_LATCHED_Msk) == 3) {
+ (void)CMAC->CM_BS_SMPL_D_REG;
+
+ assert(g_ble_phy_data.phy_privacy);
+
+ /*
+ * Resolve only if RPA is received. AdvA is at different offset
+ * in ExtAdv PDU. TxAdd was already checked before programming
+ * field threshold.
+ */
+ if ((g_ble_phy_rx_buf[0] & 0x0f) == 0x07) {
+ if ((g_ble_phy_rx_buf[9] & 0xc0) == 0x40) {
+ ble_hw_resolv_proc_start(&g_ble_phy_rx_buf[4]);
+ }
+ } else {
+ if ((g_ble_phy_rx_buf[7] & 0xc0) == 0x40) {
+ ble_hw_resolv_proc_start(&g_ble_phy_rx_buf[2]);
+ }
+ }
+ } else {
+ assert(0);
+ }
+}
+
+static void
+ble_phy_irq_field_rx_exc_stat_reg_exc_corr_timeout(void)
+{
+ CMAC->CM_EXC_STAT_REG = CMAC_CM_EXC_STAT_REG_EXC_CORR_TIMEOUT_Msk;
+ CMAC->CM_EXC_STAT_REG = CMAC_CM_EXC_STAT_REG_EXC_BS_STOP_Msk;
+ CMAC->CM_EV_LINKUP_REG = CMAC_CM_EV_LINKUP_REG_LU_FRAME_START_2_NONE_Msk;
+
+ ble_phy_sw_mac_handover(SW_MAC_EXC_WFR_TIMER_EXP);
+}
+
+static void
+ble_phy_irq_field_rx(void)
+{
+ uint32_t stat;
+
+ stat = CMAC->CM_EXC_STAT_REG;
+
+ if (stat & CMAC_CM_EXC_STAT_REG_EXC_FIELD_ON_THR_EXP_Msk) {
+ MCU_DIAG_SER('1');
+ ble_phy_irq_field_rx_exc_field_on_thr_exp();
+ }
+
+ if (stat & CMAC_CM_EXC_STAT_REG_EXC_CORR_TIMEOUT_Msk) {
+ MCU_DIAG_SER('2');
+ ble_phy_irq_field_rx_exc_stat_reg_exc_corr_timeout();
+ }
+}
+
+static void
+ble_phy_irq_frame_rx_exc_phy_to_idle_4this(void)
+{
+ uint8_t rf_chan;
+
+ CMAC->CM_EXC_STAT_REG = CMAC_CM_EXC_STAT_REG_EXC_PHY_TO_IDLE_4THIS_Msk;
+
+ /* We are here only on transition, so switch to TX */
+#if (BLE_LL_BT5_PHY_SUPPORTED == 1)
+ ble_phy_mode_apply(g_ble_phy_data.phy_mode_tx);
+#endif
+ rf_chan = g_ble_phy_chan_to_rf[g_ble_phy_data.channel];
+ ble_rf_setup_tx(rf_chan, g_ble_phy_data.phy_mode_tx);
+ g_ble_phy_data.phy_state = BLE_PHY_STATE_TX;
+}
+
+static void
+ble_phy_irq_frame_rx_exc_frame_start(void)
+{
+ CMAC->CM_EXC_STAT_REG = CMAC_CM_EXC_STAT_REG_EXC_FRAME_START_Msk;
+}
+
+static void
+ble_phy_irq_frame_rx_exc_bs_stop(void)
+{
+ CMAC->CM_EXC_STAT_REG = CMAC_CM_EXC_STAT_REG_EXC_BS_STOP_Msk;
+ ble_phy_rx_end_isr();
+}
+
+static void
+ble_phy_irq_frame_rx(void)
+{
+ uint32_t stat;
+
+ stat = CMAC->CM_EXC_STAT_REG;
+
+ if (stat & CMAC_CM_EXC_STAT_REG_EXC_PHY_TO_IDLE_4THIS_Msk) {
+ MCU_DIAG_SER('3');
+ ble_phy_irq_frame_rx_exc_phy_to_idle_4this();
+ return;
+ }
+
+ if (stat & CMAC_CM_EXC_STAT_REG_EXC_FRAME_START_Msk) {
+ MCU_DIAG_SER('1');
+ ble_phy_irq_frame_rx_exc_frame_start();
+ }
+
+ if (stat & CMAC_CM_EXC_STAT_REG_EXC_BS_STOP_Msk) {
+ MCU_DIAG_SER('2');
+ ble_phy_irq_frame_rx_exc_bs_stop();
+ }
+}
+
+static void
+ble_phy_mode_apply(uint8_t phy_mode)
+{
+ if (phy_mode == g_ble_phy_data.phy_mode_cur) {
+ return;
+ }
+
+ switch (phy_mode) {
+ case BLE_PHY_MODE_1M:
+#if MYNEWT_VAL(BLE_PHY_RF_HP_MODE)
+ CMAC_SETREGF(CM_PHY_CTRL2_REG, CORR_CLK_MODE, 3);
+#endif
+ CMAC_SETREGF(CM_PHY_CTRL2_REG, PHY_MODE, 1);
+ g_ble_phy_data.phy_mode_evpsym = 1; /* 1000 ns per symbol */
+ g_ble_phy_data.phy_mode_pre_len = 7;
+ break;
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_2M_PHY)
+ case BLE_PHY_MODE_2M:
+#if MYNEWT_VAL(BLE_PHY_RF_HP_MODE)
+ CMAC_SETREGF(CM_PHY_CTRL2_REG, CORR_CLK_MODE, 2);
+#endif
+ CMAC_SETREGF(CM_PHY_CTRL2_REG, PHY_MODE, 0);
+ g_ble_phy_data.phy_mode_evpsym = 0; /* 500 ns per symbol */
+ g_ble_phy_data.phy_mode_pre_len = 15;
+ break;
+#endif
+ default:
+ assert(0);
+ return;
+ }
+
+ g_ble_phy_data.phy_mode_cur = phy_mode;
+}
+
+void
+ble_phy_mode_set(uint8_t tx_phy_mode, uint8_t rx_phy_mode)
+{
+ uint8_t txrx;
+ uint8_t rxtx;
+
+ g_ble_phy_data.phy_mode_tx = tx_phy_mode;
+ g_ble_phy_data.phy_mode_rx = rx_phy_mode;
+
+ g_ble_phy_data.path_delay_tx = g_ble_phy_path_delay_tx[tx_phy_mode - 1];
+ g_ble_phy_data.path_delay_rx = g_ble_phy_path_delay_rx[rx_phy_mode - 1];
+
+ /*
+ * Calculate index of transition in frame offset array without tons of
+ * branches. Note that transitions have to be in specific order in array.
+ *
+ * phy_mode 1M = 01b
+ * phy_mode 2M = 10b
+ *
+ * 1M/1M = 01b | 00b = 01b
+ * 1M/2M = 01b | 10b = 11b
+ * 2M/1M = 00b | 00b = 00b
+ * 2M/2M = 00b | 10b = 10b
+ */
+ txrx = (tx_phy_mode & 0x01) | (rx_phy_mode & 0x02);
+ rxtx = (rx_phy_mode & 0x01) | (tx_phy_mode & 0x02);
+ g_ble_phy_data.frame_offset_txrx = g_ble_phy_frame_offset_txrx[txrx];
+ g_ble_phy_data.frame_offset_rxtx = g_ble_phy_frame_offset_rxtx[rxtx];
+}
+
+int
+ble_phy_get_cur_phy(void)
+{
+#if (BLE_LL_BT5_PHY_SUPPORTED == 1)
+ switch (g_ble_phy_data.phy_mode_cur) {
+ case BLE_PHY_MODE_1M:
+ return BLE_PHY_1M;
+ case BLE_PHY_MODE_2M:
+ return BLE_PHY_2M;
+ default:
+ assert(0);
+ return -1;
+ }
+#else
+ return BLE_PHY_1M;
+#endif
+}
+
+/**
+ * Copies the data from the phy receive buffer into a mbuf chain.
+ *
+ * @param dptr Pointer to receive buffer
+ * @param rxpdu Pointer to already allocated mbuf chain
+ *
+ * NOTE: the packet header already has the total mbuf length in it. The
+ * lengths of the individual mbufs are not set prior to calling.
+ *
+ */
+void
+ble_phy_rxpdu_copy(uint8_t *dptr, struct os_mbuf *rxpdu)
+{
+ uint32_t rem_len;
+ uint32_t copy_len;
+ uint32_t block_len;
+ uint32_t block_rem_len;
+ void *dst;
+ void *src;
+ struct os_mbuf * om;
+
+ /* Better be aligned */
+ assert(((uint32_t)dptr & 3) == 0);
+
+ block_len = rxpdu->om_omp->omp_databuf_len;
+ rem_len = OS_MBUF_PKTHDR(rxpdu)->omp_len;
+ src = dptr;
+
+ /*
+ * Setup for copying from first mbuf which is shorter due to packet header
+ * and extra leading space
+ */
+ copy_len = block_len - rxpdu->om_pkthdr_len - 4;
+ om = rxpdu;
+ dst = om->om_data;
+
+ while (om) {
+ /*
+ * Always copy blocks of length aligned to word size, only last mbuf
+ * will have remaining non-word size bytes appended.
+ */
+ block_rem_len = copy_len;
+ copy_len = min(copy_len, rem_len);
+ copy_len &= ~3;
+
+ dst = om->om_data;
+ om->om_len = copy_len;
+ rem_len -= copy_len;
+ block_rem_len -= copy_len;
+
+ __asm__ volatile (".syntax unified \n"
+ " mov r4, %[len] \n"
+ " b 2f \n"
+ "1: ldr r3, [%[src], %[len]] \n"
+ " str r3, [%[dst], %[len]] \n"
+ "2: subs %[len], #4 \n"
+ " bpl 1b \n"
+ " adds %[src], %[src], r4 \n"
+ " adds %[dst], %[dst], r4 \n"
+ : [dst] "+l" (dst), [src] "+l" (src),
+ [len] "+l" (copy_len)
+ :
+ : "r3", "r4", "memory");
+
+ if ((rem_len < 4) && (block_rem_len >= rem_len)) {
+ break;
+ }
+
+ /* Move to next mbuf */
+ om = SLIST_NEXT(om, om_next);
+ copy_len = block_len;
+ }
+
+ /* Copy remaining bytes, if any, to last mbuf */
+ om->om_len += rem_len;
+ __asm__ volatile (".syntax unified \n"
+ " b 2f \n"
+ "1: ldrb r3, [%[src], %[len]] \n"
+ " strb r3, [%[dst], %[len]] \n"
+ "2: subs %[len], #1 \n"
+ " bpl 1b \n"
+ : [len] "+l" (rem_len)
+ : [dst] "l" (dst), [src] "l" (src)
+ : "r3", "memory");
+
+ /* Copy header */
+ memcpy(BLE_MBUF_HDR_PTR(rxpdu), &g_ble_phy_data.rxhdr,
+ sizeof(struct ble_mbuf_hdr));
+}
+
+void
+ble_phy_wfr_enable(int txrx, uint8_t tx_phy_mode, uint32_t wfr_usecs)
+{
+ uint64_t llt;
+ uint32_t corr_window;
+ uint32_t llt_z_ticks;
+ uint32_t aa_time;
+
+ /*
+ * RX is started 2us earlier due to allowed clock accuracy and it should end
+ * 2us later for the same reason. Preamble is always 8us (8 symbols on 1M,
+ * 16 symbols on 2M) and Access Address is 32us on 1M and 16us on 2M. Add
+ * 1us just in case...
+ */
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_2M_PHY)
+ aa_time = 2 + (g_ble_phy_data.phy_mode_rx == BLE_PHY_MODE_1M ? 40 : 24) + 2 + 1;
+#else
+ aa_time = 45;
+#endif
+
+ if (txrx == BLE_PHY_WFR_ENABLE_TXRX) {
+ CMAC_SETREGF(CM_PHY_CTRL2_REG, CORR_WINDOW, aa_time);
+ CMAC->CM_EV_LINKUP_REG = CMAC_CM_EV_LINKUP_REG_LU_CORR_TMR_LD_2_CORR_START_Msk;
+ } else if (wfr_usecs < 16384) {
+ CMAC_SETREGF(CM_PHY_CTRL2_REG, CORR_WINDOW, wfr_usecs + aa_time);
+ CMAC->CM_EV_LINKUP_REG = CMAC_CM_EV_LINKUP_REG_LU_CORR_TMR_LD_2_CORR_START_Msk;
+ } else {
+ wfr_usecs += aa_time;
+ llt = g_ble_phy_data.start_llt;
+
+ /*
+ * wfr is outside range of CORR_WINDOW so we need to use LLT to start
+ * correlator timeout with some delay. Let's use ~10ms as new CORR_WINDOW
+ * value (does not really matter, just had to pick something) so need to
+ * calculate how many hi-Z ticks of delay we need.
+ */
+ llt_z_ticks = (wfr_usecs - 10000) / 1024;
+
+ /* New CORR_WINDOW is wfr adjusted by hi-Z ticks and remainder of 1st tick. */
+ corr_window = wfr_usecs;
+ corr_window -= llt_z_ticks * 1024;
+ corr_window -= 1024 - (llt & 0x3ff);
+
+ CMAC->CM_LL_TIMER1_36_10_EQ_Z_REG = (llt >> 10) + llt_z_ticks;
+ CMAC_SETREGF(CM_PHY_CTRL2_REG, CORR_WINDOW, corr_window);
+ CMAC->CM_EV_LINKUP_REG = CMAC_CM_EV_LINKUP_REG_LU_CORR_TMR_LD_2_TMR1_36_10_EQ_Z_Msk;
+ }
+}
+
+int
+ble_phy_init(void)
+{
+ g_ble_phy_data.phy_state = BLE_PHY_STATE_IDLE;
+#if MYNEWT_VAL(BLE_LL_DTM)
+ g_ble_phy_data.phy_whitening = 1;
+#endif
+
+ ble_rf_init();
+
+ /*
+ * 9_0_EQ_X can be linked to start RX/TX so we'll use this one for
+ * scheduling TX/RX start - make sure it's not linked to LL_TIMER2LLC
+ */
+ CMAC->CM_LL_INT_SEL_REG &= ~CMAC_CM_LL_INT_SEL_REG_LL_TIMER1_9_0_EQ_X_SEL_Msk;
+
+ CMAC->CM_PHY_CTRL_REG = ((PHY_DELAY_POWER_DN_RX - 1) << 24) |
+ ((PHY_DELAY_POWER_DN_TX - 1) << 16) |
+ ((PHY_DELAY_POWER_UP_RX - 1) << 8) |
+ ((PHY_DELAY_POWER_UP_TX - 1));
+
+#if MYNEWT_VAL(BLE_PHY_RF_HP_MODE)
+ CMAC->CM_PHY_CTRL2_REG = CMAC_CM_PHY_CTRL2_REG_PHY_MODE_Msk |
+ (3 << CMAC_CM_PHY_CTRL2_REG_CORR_CLK_MODE_Pos);
+#else
+ CMAC->CM_PHY_CTRL2_REG = CMAC_CM_PHY_CTRL2_REG_PHY_MODE_Msk |
+ (2 << CMAC_CM_PHY_CTRL2_REG_CORR_CLK_MODE_Pos);
+#endif
+
+ CMAC_SETREGF(CM_CTRL2_REG, WHITENING_MODE, 0);
+ CMAC_SETREGF(CM_CTRL2_REG, CRC_MODE, 0);
+
+ /* Setup for 1M by default */
+ ble_phy_mode_set(BLE_PHY_MODE_1M, BLE_PHY_MODE_1M);
+ ble_phy_mode_apply(BLE_PHY_MODE_1M);
+
+ NVIC_SetPriority(FIELD_IRQn, 0);
+ NVIC_SetPriority(CALLBACK_IRQn, 0);
+ NVIC_SetPriority(FRAME_IRQn, 0);
+ NVIC_SetPriority(CRYPTO_IRQn, 1);
+ NVIC_SetPriority(SW_MAC_IRQn, 1);
+ NVIC_EnableIRQ(FIELD_IRQn);
+ NVIC_EnableIRQ(CALLBACK_IRQn);
+ NVIC_EnableIRQ(FRAME_IRQn);
+ NVIC_EnableIRQ(SW_MAC_IRQn);
+
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_ENCRYPTION)
+ /* Initialize non-zero fixed values in CCM blocks */
+ g_ble_phy_encrypt_data.b0[0] = 0x49;
+ g_ble_phy_encrypt_data.b1[1] = 0x01;
+ g_ble_phy_encrypt_data.ai[0] = 0x01;
+#endif
+
+ return 0;
+}
+
+void
+ble_phy_disable(void)
+{
+ MCU_DIAG_SER('D');
+
+ __disable_irq();
+
+ CMAC->CM_EV_SET_REG = CMAC_CM_EV_SET_REG_EV1C_BS_CLEAR_Msk;
+
+ __NOP();
+ __NOP();
+ __NOP();
+ __NOP();
+ __NOP();
+
+ CMAC->CM_EXC_STAT_REG = CMAC_CM_EXC_STAT_REG_EXC_FIELD_ON_THR_EXP_Msk |
+ CMAC_CM_EXC_STAT_REG_EXC_BS_START_4THIS_Msk |
+ CMAC_CM_EXC_STAT_REG_EXC_CORR_TIMEOUT_Msk |
+ CMAC_CM_EXC_STAT_REG_EXC_BS_STOP_Msk |
+ CMAC_CM_EXC_STAT_REG_EXC_FRAME_START_Msk |
+ CMAC_CM_EXC_STAT_REG_EXC_PHY_TO_IDLE_4THIS_Msk |
+ CMAC_CM_EXC_STAT_REG_EXC_SW_MAC_Msk;
+
+ NVIC->ICPR[0] = (1 << FIELD_IRQn) | (1 << CALLBACK_IRQn) |
+ (1 << FRAME_IRQn) | (1 << SW_MAC_IRQn);
+
+ os_arch_cmac_bs_ctrl_irq_unblock();
+ g_sw_mac_exc = 0;
+
+ CMAC->CM_ERROR_DIS_REG = 0;
+
+ ble_rf_stop();
+
+ /*
+ * If ble_phy_disable is called precisely when access address was matched,
+ * ts1_dirty may not be cleared properly. This is because bs_clear will
+ * cause bitstream controller to be stopped and we won't get callback_irq,
+ * but seems like demodulator is still active for a while and will trigger
+ * ev1c_ts1_trigger on 1st symbol which will set ts1_dirty. We do not expect
+ * ts1_dirty to be set after bs_clear so we won't clear it. To workaround
+ * his, we can just clear it explicitly here after everything is already
+ * disabled.
+ */
+ (void)CMAC->CM_TS1_REG;
+
+ __enable_irq();
+
+ g_ble_phy_data.phy_state = BLE_PHY_STATE_IDLE;
+}
+
+static void
+ble_phy_rx_setup_fields(void)
+{
+ /* Make sure CRC LFSR initial value is set */
+ CMAC_SETREGF(CM_CRC_REG, CRC_INIT_VAL, g_ble_phy_data.crc_init);
+
+ CMAC->CM_FIELD_PUSH_DATA_REG = g_ble_phy_data.access_addr;
+ CMAC->CM_FIELD_PUSH_CTRL_REG = FIELD_CTRL_REG_RX_ACCESS_ADDR;
+ CMAC->CM_FIELD_PUSH_DATA_REG = FIELD_DATA_REG_DMA_RX(0, 2);
+ CMAC->CM_FIELD_PUSH_CTRL_REG = FIELD_CTRL_REG_RX_HEADER;
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_ENCRYPTION)
+ if (g_ble_phy_data.phy_encrypted) {
+ /* Only program one byte for encrypted payloads */
+ CMAC->CM_FIELD_PUSH_DATA_REG = FIELD_DATA_REG_DMA_RX(2, 2);
+ CMAC->CM_FIELD_PUSH_CTRL_REG = FIELD_CTRL_REG_RX_ENC_PAYLOAD;
+ } else {
+ CMAC->CM_FIELD_PUSH_DATA_REG = FIELD_DATA_REG_DMA_RX(2, 2);
+ CMAC->CM_FIELD_PUSH_CTRL_REG = FIELD_CTRL_REG_RX_PAYLOAD;
+ }
+#else
+ CMAC->CM_FIELD_PUSH_DATA_REG = FIELD_DATA_REG_DMA_RX(2, 2);
+ CMAC->CM_FIELD_PUSH_CTRL_REG = FIELD_CTRL_REG_RX_PAYLOAD;
+#endif
+}
+
+static void
+ble_phy_rx_setup_xcvr(void)
+{
+ uint8_t rf_chan = g_ble_phy_chan_to_rf[g_ble_phy_data.channel];
+
+ CMAC->CM_EV_SET_REG = CMAC_CM_EV_SET_REG_EV1C_CALLBACK_VALID_SET_Msk;
+
+ ble_rf_setup_rx(rf_chan, g_ble_phy_data.phy_mode_rx);
+
+ g_ble_phy_data.phy_rx_started = 0;
+}
+
+int
+ble_phy_rx(void)
+{
+ MCU_DIAG_SER('R');
+
+ ble_rf_configure();
+ ble_phy_rx_setup_xcvr();
+
+ CMAC->CM_FRAME_1_REG = CMAC_CM_FRAME_1_REG_FRAME_VALID_Msk;
+
+ CMAC_SETREGF(CM_PHY_CTRL2_REG, CORR_WINDOW, 0);
+
+ ble_phy_rx_setup_fields();
+
+ g_ble_phy_data.phy_state = BLE_PHY_STATE_RX;
+
+ return 0;
+}
+
+int
+ble_phy_rx_set_start_time(uint32_t cputime, uint8_t rem_usecs)
+{
+ uint32_t ll_val32;
+ int32_t time_till_start;
+
+ MCU_DIAG_SER('r');
+
+#if (BLE_LL_BT5_PHY_SUPPORTED == 1)
+ ble_phy_mode_apply(g_ble_phy_data.phy_mode_rx);
+#endif
+
+ assert(ble_rf_is_enabled());
+
+ ble_phy_rx();
+
+ /* Get LL timer at cputime */
+ ll_val32 = ble_phy_convert_and_record_start_time(cputime, rem_usecs);
+
+ /* Add remaining usecs to get exact receive start time */
+ ll_val32 += rem_usecs;
+
+ /* Adjust start time for rx delays */
+ ll_val32 -= PHY_DELAY_POWER_UP_RX - g_ble_phy_data.path_delay_rx;
+
+ __disable_irq();
+ CMAC->CM_LL_TIMER1_9_0_EQ_X_REG = ll_val32;
+ CMAC->CM_EV_LINKUP_REG =
+ CMAC_CM_EV_LINKUP_REG_LU_FRAME_START_2_TMR1_9_0_EQ_X_Msk;
+
+ time_till_start = (int32_t)(ll_val32 - cmac_timer_read32());
+ if (time_till_start <= 0) {
+ /*
+ * Possible we missed the frame start! If we have, we need to start
+ * ASAP.
+ */
+ if ((CMAC->CM_EXC_STAT_REG & CMAC_CM_EXC_STAT_REG_EXC_FRAME_START_Msk) == 0) {
+ /* We missed start. Start now */
+ CMAC->CM_EV_LINKUP_REG =
+ CMAC_CM_EV_LINKUP_REG_LU_FRAME_START_2_ASAP_Msk;
+ }
+ }
+ __enable_irq();
+
+ return 0;
+}
+
+int
+ble_phy_tx(ble_phy_tx_pducb_t pducb, void *pducb_arg, uint8_t end_trans)
+{
+ uint8_t *txbuf = g_ble_phy_tx_buf;
+ int rc;
+
+ MCU_DIAG_SER('T');
+
+ assert(CMAC->CM_FRAME_1_REG & CMAC_CM_FRAME_1_REG_FRAME_TX_Msk);
+
+ g_ble_phy_data.end_transition = end_trans;
+
+ /*
+ * Program required fields now so in worst case TX can continue while we
+ * are still preparing header and payload.
+ */
+ CMAC->CM_FIELD_PUSH_DATA_REG = g_ble_phy_data.access_addr & 1 ? 0x5555 : 0xaaaa;
+ CMAC->CM_FIELD_PUSH_CTRL_REG = FIELD_CTRL_REG_TX_PREAMBLE;
+ CMAC->CM_FIELD_PUSH_DATA_REG = g_ble_phy_data.access_addr;
+ CMAC->CM_FIELD_PUSH_CTRL_REG = FIELD_CTRL_REG_TX_ACCESS_ADDR;
+
+ /* Make sure CRC LFSR initial value is set */
+ CMAC_SETREGF(CM_CRC_REG, CRC_INIT_VAL, g_ble_phy_data.crc_init);
+
+ /* txbuf[0] is hdr_byte, txbuf[1] is pkt_len */
+ txbuf[1] = pducb(&txbuf[2], pducb_arg, &txbuf[0]);
+
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_ENCRYPTION)
+ if (g_ble_phy_data.phy_encrypted && (txbuf[1] != 0)) {
+ /* We have to add the MIC to the length */
+ txbuf[1] += BLE_LL_DATA_MIC_LEN;
+
+ /* Program header field */
+ CMAC->CM_FIELD_PUSH_DATA_REG = FIELD_DATA_REG_DMA_TX(0, 2);
+ CMAC->CM_FIELD_PUSH_CTRL_REG = FIELD_CTRL_REG_TX_PAYLOAD;
+
+ /* Program payload (and MIC) */
+ CMAC->CM_FIELD_PUSH_DATA_REG = FIELD_DATA_REG_DMA_TX(2, txbuf[1]);
+ CMAC->CM_FIELD_PUSH_CTRL_REG = FIELD_CTRL_REG_TX_ENC_PAYLOAD;
+ } else {
+ /* Program header and payload fields */
+ CMAC->CM_FIELD_PUSH_DATA_REG = FIELD_DATA_REG_DMA_TX(0, txbuf[1] + 2);
+ CMAC->CM_FIELD_PUSH_CTRL_REG = FIELD_CTRL_REG_TX_PAYLOAD;
+ }
+#else
+ /* Program header and payload fields */
+ CMAC->CM_FIELD_PUSH_DATA_REG = FIELD_DATA_REG_DMA_TX(0, txbuf[1] + 2);
+ CMAC->CM_FIELD_PUSH_CTRL_REG = FIELD_CTRL_REG_TX_PAYLOAD;
+#endif
+
+ /*
+ * If there was FIELD_ON_THR exception it means access address was already
+ * sent and we are likely too late here - abort.
+ */
+ if (CMAC->CM_EXC_STAT_REG & CMAC_CM_EXC_STAT_REG_EXC_FIELD_ON_THR_EXP_Msk) {
+ ble_phy_disable();
+ g_ble_phy_data.end_transition = BLE_PHY_TRANSITION_NONE;
+ STATS_INC(ble_phy_stats, tx_late);
+ rc = BLE_PHY_ERR_RADIO_STATE;
+ } else {
+ if (g_ble_phy_data.phy_state == BLE_PHY_STATE_IDLE) {
+ g_ble_phy_data.phy_state = BLE_PHY_STATE_TX;
+ }
+ STATS_INC(ble_phy_stats, tx_good);
+ STATS_INCN(ble_phy_stats, tx_bytes, txbuf[1] + 2);
+ rc = BLE_ERR_SUCCESS;
+ }
+
+ /* Now we can handle BS_CTRL */
+ CMAC->CM_ERROR_DIS_REG &= ~CMAC_CM_ERROR_DIS_REG_CM_FIELD1_ERR_Msk;
+ NVIC_EnableIRQ(FRAME_IRQn);
+ NVIC_EnableIRQ(FIELD_IRQn);
+
+ return rc;
+}
+
+int
+ble_phy_tx_set_start_time(uint32_t cputime, uint8_t rem_usecs)
+{
+ uint8_t rf_chan = g_ble_phy_chan_to_rf[g_ble_phy_data.channel];
+ uint32_t ll_val32;
+ int rc;
+
+ MCU_DIAG_SER('t');
+
+#if (BLE_LL_BT5_PHY_SUPPORTED == 1)
+ ble_phy_mode_apply(g_ble_phy_data.phy_mode_tx);
+#endif
+
+ assert(ble_rf_is_enabled());
+
+ ble_rf_configure();
+ ble_rf_setup_tx(rf_chan, g_ble_phy_data.phy_mode_tx);
+
+ ll_val32 = ble_phy_convert_and_record_start_time(cputime, rem_usecs);
+ ll_val32 += rem_usecs;
+ ll_val32 -= PHY_DELAY_POWER_UP_TX + g_ble_phy_data.path_delay_tx;
+ /* we can schedule TX only up to 1023us in advance */
+ assert((int32_t)(ll_val32 - cmac_timer_read32()) < 1024);
+
+ /*
+ * We do not want FIELD/FRAME interrupts or FIELD1_ERR until ble_phy_tx()
+ * has finished pushing all the fields. Also we do not want premature
+ * FRAME_ERR so disable it until we program FRAME1 properly. If we won't
+ * make configuration on time, assume tx_late and abort TX.
+ */
+ NVIC_DisableIRQ(FRAME_IRQn);
+ NVIC_DisableIRQ(FIELD_IRQn);
+ CMAC->CM_ERROR_DIS_REG |= CMAC_CM_ERROR_DIS_REG_CM_FIELD1_ERR_Msk |
+ CMAC_CM_ERROR_DIS_REG_CM_FRAME_ERR_Msk;
+
+ CMAC->CM_LL_TIMER1_9_0_EQ_X_REG = ll_val32;
+ CMAC->CM_EV_LINKUP_REG = CMAC_CM_EV_LINKUP_REG_LU_FRAME_START_2_TMR1_9_0_EQ_X_Msk;
+
+ if ((int32_t)(ll_val32 - cmac_timer_read32()) < 0) {
+ goto tx_late;
+ }
+
+ /*
+ * Program frame now since it needs to be ready for FRAME_START, we can
+ * push fields later
+ */
+ CMAC->CM_FRAME_1_REG = CMAC_CM_FRAME_1_REG_FRAME_VALID_Msk |
+ CMAC_CM_FRAME_1_REG_FRAME_TX_Msk |
+ CMAC_CM_FRAME_1_REG_FRAME_EXC_ON_BS_START_Msk;
+
+ /*
+ * There should be no EXC_FRAME_START here so if it already happened we
+ * need to assume tx_late and abort.
+ */
+ if (CMAC->CM_EXC_STAT_REG & CMAC_CM_EXC_STAT_REG_EXC_FRAME_START_Msk) {
+ goto tx_late;
+ }
+
+ CMAC->CM_ERROR_DIS_REG &= ~CMAC_CM_ERROR_DIS_REG_CM_FRAME_ERR_Msk;
+ rc = 0;
+
+ goto done;
+
+tx_late:
+ STATS_INC(ble_phy_stats, tx_late);
+ ble_phy_disable();
+ NVIC_EnableIRQ(FRAME_IRQn);
+ NVIC_EnableIRQ(FIELD_IRQn);
+ rc = BLE_PHY_ERR_TX_LATE;
+
+done:
+ return rc;
+}
+
+void
+ble_phy_set_txend_cb(ble_phy_tx_end_func txend_cb, void *arg)
+{
+ g_ble_phy_data.txend_cb = txend_cb;
+ g_ble_phy_data.txend_arg = arg;
+}
+
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_ENCRYPTION)
+void
+ble_phy_tx_enc_start(void)
+{
+ struct ble_phy_encrypt_obj *enc;
+
+ enc = &g_ble_phy_encrypt_data;
+ enc->b0[15] = g_ble_phy_tx_buf[1] - 4;
+ enc->b1[2] = g_ble_phy_tx_buf[0] & BLE_LL_DATA_HDR_LLID_MASK;
+
+ /* XXX: should we check for busy? */
+ /* XXX: might not be needed, but for now terminate any crypto operations. */
+ CMAC->CM_CRYPTO_CTRL_REG = CMAC_CM_CRYPTO_CTRL_REG_CM_CRYPTO_SW_REQ_ABORT_Msk;
+
+ CMAC->CM_CRYPTO_CTRL_REG = CMAC_CM_CRYPTO_CTRL_REG_CM_CRYPTO_IN_SEL_Msk |
+ CMAC_CM_CRYPTO_CTRL_REG_CM_CRYPTO_CTR_MAC_EN_Msk |
+ CMAC_CM_CRYPTO_CTRL_REG_CM_CRYPTO_CTR_PLD_EN_Msk |
+ CMAC_CM_CRYPTO_CTRL_REG_CM_CRYPTO_AUTH_EN_Msk |
+ CMAC_CM_CRYPTO_CTRL_REG_CM_CRYPTO_ENC_DECN_Msk;
+
+ /* Start crypto */
+ CMAC->CM_EV_SET_REG = CMAC_CM_EV_SET_REG_EV_CRYPTO_START_Msk;
+}
+
+void
+ble_phy_rx_enc_start(uint8_t len)
+{
+ struct ble_phy_encrypt_obj *enc;
+
+ enc = &g_ble_phy_encrypt_data;
+ enc->b0[15] = len - 4; /* length without MIC as length includes MIC */
+ enc->b1[2] = g_ble_phy_rx_buf[0] & BLE_LL_DATA_HDR_LLID_MASK;
+
+ /* XXX: should we check for busy? */
+ /* XXX: might not be needed, but for now terminate any crypto operations. */
+ //CMAC->CM_CRYPTO_CTRL_REG = CMAC_CM_CRYPTO_CTRL_REG_CM_CRYPTO_SW_REQ_ABORT_Msk;
+
+ CMAC->CM_CRYPTO_CTRL_REG = CMAC_CM_CRYPTO_CTRL_REG_CM_CRYPTO_OUT_SEL_Msk |
+ CMAC_CM_CRYPTO_CTRL_REG_CM_CRYPTO_CTR_MAC_EN_Msk |
+ CMAC_CM_CRYPTO_CTRL_REG_CM_CRYPTO_CTR_PLD_EN_Msk |
+ CMAC_CM_CRYPTO_CTRL_REG_CM_CRYPTO_AUTH_EN_Msk;
+
+ /* Start crypto */
+ CMAC->CM_EV_SET_REG = CMAC_CM_EV_SET_REG_EV_CRYPTO_START_Msk;
+}
+
+void
+ble_phy_encrypt_enable(uint64_t pkt_counter, uint8_t *iv, uint8_t *key,
+ uint8_t is_master)
+{
+ struct ble_phy_encrypt_obj *enc;
+
+ enc = &g_ble_phy_encrypt_data;
+ memcpy(enc->key, key, 16);
+ memcpy(&enc->b0[6], iv, 8);
+ put_le32(&enc->b0[1], pkt_counter);
+ enc->b0[5] = is_master ? 0x80 : 0;
+ memcpy(&enc->ai[6], iv, 8);
+ put_le32(&enc->ai[1], pkt_counter);
+ enc->ai[5] = enc->b0[5];
+
+ g_ble_phy_data.phy_encrypted = 1;
+
+ /* Program key registers */
+ CMAC->CM_CRYPTO_KEY_31_0_REG = get_le32(&enc->key[0]);
+ CMAC->CM_CRYPTO_KEY_63_32_REG = get_le32(&enc->key[4]);
+ CMAC->CM_CRYPTO_KEY_95_64_REG = get_le32(&enc->key[8]);
+ CMAC->CM_CRYPTO_KEY_127_96_REG = get_le32(&enc->key[12]);
+
+ /* Program ADRx registers */
+ CMAC->CM_CRYPTO_IN_ADR0_REG = (uint32_t)enc->b1;
+ CMAC->CM_CRYPTO_IN_ADR1_REG = (uint32_t)enc->b0;
+ CMAC->CM_CRYPTO_IN_ADR2_REG = (uint32_t)&g_ble_phy_tx_buf[2];
+ CMAC->CM_CRYPTO_IN_ADR3_REG = (uint32_t)enc->ai;
+ CMAC->CM_CRYPTO_OUT_ADR_REG = (uint32_t)&g_ble_phy_rx_buf[2];
+
+ CMAC->CM_CRYPTO_CTRL_REG = CMAC_CM_CRYPTO_CTRL_REG_CM_CRYPTO_SW_REQ_PBUF_CLR_Msk;
+}
+
+void
+ble_phy_encrypt_set_pkt_cntr(uint64_t pkt_counter, int dir)
+{
+ struct ble_phy_encrypt_obj *enc;
+
+ enc = &g_ble_phy_encrypt_data;
+ put_le32(&enc->b0[1], pkt_counter);
+ enc->b0[5] = dir ? 0x80 : 0;
+ put_le32(&enc->ai[1], pkt_counter);
+ enc->ai[5] = enc->b0[5];
+
+ CMAC->CM_CRYPTO_CTRL_REG = CMAC_CM_CRYPTO_CTRL_REG_CM_CRYPTO_SW_REQ_PBUF_CLR_Msk;
+}
+
+void
+ble_phy_encrypt_disable(void)
+{
+ g_ble_phy_data.phy_encrypted = 0;
+}
+#endif
+
+int
+ble_phy_txpwr_set(int dbm)
+{
+#if MYNEWT_VAL(CMAC_DEBUG_DATA_ENABLE)
+ if (g_cmac_shared_data.debug.tx_power_override != INT8_MAX) {
+ ble_rf_set_tx_power(g_cmac_shared_data.debug.tx_power_override);
+ } else {
+ ble_rf_set_tx_power(dbm);
+ }
+#else
+ ble_rf_set_tx_power(dbm);
+#endif
+
+ return 0;
+}
+
+int
+ble_phy_txpower_round(int dbm)
+{
+ return 0;
+}
+
+void
+ble_phy_set_rx_pwr_compensation(int8_t compensation)
+{
+}
+
+int
+ble_phy_setchan(uint8_t chan, uint32_t access_addr, uint32_t crc_init)
+{
+ uint8_t rf_chan = g_ble_phy_chan_to_rf[chan];
+
+ assert(chan < BLE_PHY_NUM_CHANS);
+
+ if (chan >= BLE_PHY_NUM_CHANS) {
+ return BLE_PHY_ERR_INV_PARAM;
+ }
+
+ g_ble_phy_data.channel = chan;
+ g_ble_phy_data.access_addr = access_addr;
+ g_ble_phy_data.crc_init = crc_init;
+
+ CMAC_SETREGF(CM_PHY_CTRL2_REG, PHY_RF_CHANNEL, rf_chan);
+
+ return 0;
+}
+
+void
+ble_phy_restart_rx(void)
+{
+ /* XXX: for now, we will disable the phy using ble_phy_disable and then
+ re-enable it
+ */
+ ble_phy_disable();
+
+ /* Apply mode before starting RX */
+#if (BLE_LL_BT5_PHY_SUPPORTED == 1)
+ ble_phy_mode_apply(g_ble_phy_data.phy_mode_rx);
+#endif
+
+ /* Setup phy to rx again */
+ ble_phy_rx();
+
+ /* Start reception now */
+ CMAC->CM_EV_LINKUP_REG = CMAC_CM_EV_LINKUP_REG_LU_FRAME_START_2_ASAP_Msk;
+}
+
+uint32_t
+ble_phy_access_addr_get(void)
+{
+ return g_ble_phy_data.access_addr;
+}
+
+int
+ble_phy_state_get(void)
+{
+ return g_ble_phy_data.phy_state;
+}
+
+int
+ble_phy_rx_started(void)
+{
+ return g_ble_phy_data.phy_rx_started;
+}
+
+uint8_t
+ble_phy_xcvr_state_get(void)
+{
+ return ble_rf_is_enabled();
+}
+
+uint8_t
+ble_phy_max_data_pdu_pyld(void)
+{
+ return BLE_LL_DATA_PDU_MAX_PYLD;
+}
+
+void
+ble_phy_resolv_list_enable(void)
+{
+ g_ble_phy_data.phy_privacy = 1;
+
+ ble_hw_resolv_proc_enable();
+}
+
+void
+ble_phy_resolv_list_disable(void)
+{
+ ble_hw_resolv_proc_disable();
+
+ g_ble_phy_data.phy_privacy = 0;
+}
+
+void
+ble_phy_rfclk_enable(void)
+{
+ ble_rf_enable();
+}
+
+void
+ble_phy_rfclk_disable(void)
+{
+ /* XXX We can't disable RF while PHY_BUSY is asserted so let's wait a bit */
+ while (CMAC->CM_DIAG_WORD2_REG & CMAC_CM_DIAG_WORD2_REG_DIAG2_PHY_BUSY_BUF_Msk);
+
+ ble_rf_disable();
+}
+
+#if MYNEWT_VAL(BLE_LL_DTM)
+void
+ble_phy_enable_dtm(void)
+{
+ g_ble_phy_data.phy_whitening = 0;
+}
+
+void
+ble_phy_disable_dtm(void)
+{
+ g_ble_phy_data.phy_whitening = 1;
+}
+#endif
diff --git a/src/libs/mynewt-nimble/nimble/drivers/dialog_cmac/src/ble_rf.c b/src/libs/mynewt-nimble/nimble/drivers/dialog_cmac/src/ble_rf.c
new file mode 100644
index 00000000..806f4ea8
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/drivers/dialog_cmac/src/ble_rf.c
@@ -0,0 +1,747 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include <assert.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include "mcu/mcu.h"
+#include "mcu/cmac_timer.h"
+#include "controller/ble_phy.h"
+#include "cmac_driver/cmac_shared.h"
+#include "ble_rf_priv.h"
+
+#define RF_CALIBRATION_0 (0x01)
+#define RF_CALIBRATION_1 (0x02)
+#define RF_CALIBRATION_2 (0x04)
+
+static const int8_t g_ble_rf_power_lvls[] = {
+ -18, -12, -8, -6, -3, -2, -1, 0, 1, 2, 3, 4, 4, 5, 6
+};
+
+struct ble_phy_rf_data {
+ uint8_t tx_power_cfg0;
+ uint8_t tx_power_cfg1;
+ uint8_t tx_power_cfg2;
+ uint8_t tx_power_cfg3;
+ uint32_t cal_res_1;
+ uint32_t cal_res_2;
+ uint32_t trim_val1_tx_1;
+ uint32_t trim_val1_tx_2;
+ uint32_t trim_val2_tx;
+ uint32_t trim_val2_rx;
+ uint8_t calibrate_req;
+};
+
+static struct ble_phy_rf_data g_ble_phy_rf_data;
+
+static inline uint32_t
+get_reg32(uint32_t addr)
+{
+ volatile uint32_t *reg = (volatile uint32_t *)addr;
+
+ return *reg;
+}
+
+static inline uint32_t
+get_reg32_bits(uint32_t addr, uint32_t mask)
+{
+ volatile uint32_t *reg = (volatile uint32_t *)addr;
+
+ return (*reg & mask) >> __builtin_ctz(mask);
+}
+
+static inline void
+set_reg8(uint32_t addr, uint8_t val)
+{
+ volatile uint8_t *reg = (volatile uint8_t *)addr;
+
+ *reg = val;
+}
+
+static inline void
+set_reg16(uint32_t addr, uint16_t val)
+{
+ volatile uint16_t *reg = (volatile uint16_t *)addr;
+
+ *reg = val;
+}
+
+static inline void
+set_reg32(uint32_t addr, uint32_t val)
+{
+ volatile uint32_t *reg = (volatile uint32_t *)addr;
+
+ *reg = val;
+}
+
+static inline void
+set_reg32_bits(uint32_t addr, uint32_t mask, uint32_t val)
+{
+ volatile uint32_t *reg = (volatile uint32_t *)addr;
+
+ *reg = (*reg & (~mask)) | (val << __builtin_ctz(mask));
+}
+
+static inline void
+set_reg32_mask(uint32_t addr, uint32_t mask, uint32_t val)
+{
+ volatile uint32_t *reg = (volatile uint32_t *)addr;
+
+ *reg = (*reg & (~mask)) | (val & mask);
+}
+
+static inline void
+set_reg16_mask(uint32_t addr, uint16_t mask, uint16_t val)
+{
+ volatile uint16_t *reg = (volatile uint16_t *)addr;
+
+ *reg = (*reg & (~mask)) | (val & mask);
+}
+
+static void
+delay_us(uint32_t delay_us)
+{
+ while (delay_us--) {
+ __NOP(); __NOP(); __NOP(); __NOP(); __NOP(); __NOP(); __NOP(); __NOP();
+ __NOP(); __NOP(); __NOP(); __NOP(); __NOP(); __NOP(); __NOP(); __NOP();
+ __NOP(); __NOP(); __NOP(); __NOP(); __NOP(); __NOP(); __NOP(); __NOP();
+ __NOP(); __NOP(); __NOP(); __NOP();
+ }
+}
+
+static void
+ble_rf_apply_trim(volatile uint32_t *tv, unsigned len)
+{
+ while (len) {
+ *(volatile uint32_t *)tv[0] = tv[1];
+ len -= 2;
+ tv += 2;
+ }
+}
+
+static void
+ble_rf_apply_calibration(void)
+{
+ set_reg32(0x40020094, g_ble_phy_rf_data.cal_res_1);
+ if (g_ble_phy_rf_data.cal_res_2) {
+ set_reg32_bits(0x40022018, 0xff800000, g_ble_phy_rf_data.cal_res_2);
+ set_reg32_bits(0x40022018, 0x00007fc0, g_ble_phy_rf_data.cal_res_2);
+ }
+}
+
+static inline void
+ble_rf_ldo_on(void)
+{
+ set_reg8(0x40020004, 9);
+}
+
+static inline void
+ble_rf_ldo_off(void)
+{
+ set_reg8(0x40020004, 0);
+}
+
+static inline void
+ble_rf_rfcu_enable(void)
+{
+ set_reg32_bits(0x50000010, 0x00000020, 1);
+}
+
+static inline void
+ble_rf_rfcu_disable(void)
+{
+ set_reg32_bits(0x50000010, 0x00000020, 0);
+}
+
+static void
+ble_rf_rfcu_apply_recommended_settings(void)
+{
+ set_reg16_mask(0x400200a0, 0x0001, 0x0001);
+ set_reg16_mask(0x40021020, 0x03f0, 0x02f5);
+ set_reg32_mask(0x40021018, 0x001fffff, 0x005a5809);
+ set_reg32_mask(0x4002101c, 0x00001e01, 0x0040128c);
+ set_reg32_mask(0x40021004, 0xffffff1f, 0x64442404);
+ set_reg32_mask(0x40021008, 0xfcfcffff, 0x6b676665);
+ set_reg32_mask(0x4002100c, 0x00fcfcfc, 0x9793736f);
+ set_reg32_mask(0x40021010, 0x1f1f1c1f, 0x04072646);
+ set_reg32_mask(0x40020000, 0x001ff000, 0x0f099820);
+ set_reg16_mask(0x40020348, 0x00ff, 0x0855);
+ set_reg16(0x40020350, 0x0234);
+ set_reg16(0x40020354, 0x0a34);
+ set_reg16(0x40020358, 0x0851);
+ set_reg16(0x4002035c, 0x0a26);
+ set_reg16(0x40020360, 0x0858);
+ set_reg16(0x4002102c, 0xdfe7);
+ set_reg32_mask(0x4002103c, 0x00c00000, 0x0024a19f);
+ set_reg16_mask(0x40021000, 0x0008, 0x000b);
+ set_reg16_mask(0x40020238, 0x03e0, 0x02c0);
+ set_reg16_mask(0x4002023c, 0x03e0, 0x02c0);
+ set_reg16_mask(0x40020244, 0x03e0, 0x0250);
+ set_reg16_mask(0x40020248, 0x03e0, 0x02a0);
+ set_reg16_mask(0x4002024c, 0x03e0, 0x02c0);
+ set_reg16_mask(0x40020288, 0x03e0, 0x0300);
+ set_reg16_mask(0x4002029c, 0x001f, 0x0019);
+ set_reg16_mask(0x4002003c, 0x6000, 0x0788);
+ set_reg16_mask(0x40020074, 0x7f00, 0x2007);
+ set_reg32_mask(0x40020080, 0x00333330, 0x00222224);
+ set_reg32_mask(0x40020068, 0x00000f0f, 0x00000f0d);
+}
+
+static void
+ble_rf_rfcu_apply_settings(void)
+{
+ ble_rf_apply_trim(g_cmac_shared_data.trim.rfcu,
+ g_cmac_shared_data.trim.rfcu_len);
+ ble_rf_rfcu_apply_recommended_settings();
+}
+
+static inline void
+ble_rf_synth_enable(void)
+{
+ set_reg8(0x40020005, 3);
+}
+
+static inline void
+ble_rf_synth_disable(void)
+{
+ set_reg8(0x40020005, 0);
+ __NOP();
+ __NOP();
+}
+
+static bool
+ble_rf_synth_is_enabled(void)
+{
+ return get_reg32_bits(0x40020004, 256);
+}
+
+static void
+ble_rf_synth_apply_recommended_settings(void)
+{
+ set_reg32_mask(0x40022048, 0x0000000c, 0x000000d5);
+ set_reg32_mask(0x40022050, 0x00000300, 0x00000300);
+ set_reg16_mask(0x40022024, 0x0001, 0x0001);
+}
+
+static void
+ble_rf_synth_apply_settings(void)
+{
+ ble_rf_apply_trim(g_cmac_shared_data.trim.synth,
+ g_cmac_shared_data.trim.synth_len);
+ ble_rf_synth_apply_recommended_settings();
+}
+
+static void
+ble_rf_calibration_0(void)
+{
+ uint32_t bkp[10];
+
+ bkp[0] = get_reg32(0x40020208);
+ bkp[1] = get_reg32(0x40020250);
+ bkp[2] = get_reg32(0x40020254);
+ bkp[3] = get_reg32(0x40021028);
+ bkp[4] = get_reg32(0x40020020);
+ bkp[5] = get_reg32(0x40020294);
+ bkp[6] = get_reg32(0x4002103C);
+ bkp[7] = get_reg32(0x400200A8);
+ bkp[8] = get_reg32(0x40020000);
+ bkp[9] = get_reg32(0x40022000);
+
+ set_reg32_bits(0x40020000, 0x00000002, 0);
+ set_reg32_bits(0x40022000, 0x00000001, 0);
+ set_reg32_mask(0x4002103C, 0x00201c00, 0x00001c00);
+ set_reg32_bits(0x400200A8, 0x00000001, 1);
+ set_reg8(0x40020006, 1);
+ set_reg32(0x40020208, 0);
+ set_reg32(0x40020250, 0);
+ set_reg32(0x40020254, 0);
+ set_reg32(0x40021028, 0x00F8A494);
+ set_reg32(0x40020020, 8);
+ set_reg32(0x40020294, 0);
+ set_reg32(0x40020024, 0);
+
+ delay_us(5);
+ if (get_reg32_bits(0x40020020, 0x00000002)) {
+ goto done;
+ }
+
+ set_reg32_bits(0x40020020, 0x00000001, 1);
+ delay_us(15);
+ if (!get_reg32_bits(0x40020020, 0x00000001)) {
+ goto done;
+ }
+
+ delay_us(300);
+ if (get_reg32_bits(0x40020020, 0x00000001)) {
+ goto done;
+ }
+
+done:
+ set_reg32(0x40020024, 0);
+ set_reg32(0x40020208, bkp[0]);
+ set_reg32(0x40020250, bkp[1]);
+ set_reg32(0x40020254, bkp[2]);
+ set_reg32(0x40021028, bkp[3]);
+ set_reg32(0x40020020, bkp[4]);
+ set_reg32(0x40020294, bkp[5]);
+ set_reg32(0x4002103C, bkp[6]);
+ set_reg32(0x400200A8, bkp[7]);
+ set_reg32(0x40020000, bkp[8]);
+ set_reg32(0x40022000, bkp[9]);
+}
+
+static void
+ble_rf_calibration_1(void)
+{
+ uint32_t bkp[12];
+ uint32_t val;
+
+ bkp[0] = get_reg32(0x40020020);
+ bkp[1] = get_reg32(0x40020208);
+ bkp[2] = get_reg32(0x40020250);
+ bkp[3] = get_reg32(0x40020254);
+ bkp[4] = get_reg32(0x40020218);
+ bkp[5] = get_reg32(0x4002021c);
+ bkp[6] = get_reg32(0x40020220);
+ bkp[7] = get_reg32(0x40020270);
+ bkp[8] = get_reg32(0x4002027c);
+ bkp[9] = get_reg32(0x4002101c);
+ bkp[10] = get_reg32(0x40020000);
+ bkp[11] = get_reg32(0x40022000);
+
+ set_reg32(0x4002103c, 0x0124a21f);
+ set_reg32(0x40020208, 0);
+ set_reg32(0x40020250, 0);
+ set_reg32(0x40020254, 0);
+ set_reg32(0x40020218, 0);
+ set_reg32(0x4002021c, 0);
+ set_reg32(0x40020220, 0);
+ set_reg32(0x40020270, 0);
+ set_reg32(0x4002027c, 0);
+ set_reg32(0x40020000, 0x0f168820);
+ set_reg32_bits(0x40022000, 0x00000001, 0);
+ set_reg32_bits(0x4002101c, 0x00001e00, 0);
+ set_reg32_bits(0x4002001c, 0x0000003f, 47);
+ set_reg8(0x40020006, 1);
+ set_reg32(0x40020020, 16);
+ set_reg32_bits(0x4002003c, 0x00000800, 1);
+ set_reg32(0x40020024, 0);
+
+ delay_us(5);
+ if (get_reg32_bits(0x40020020, 0x00000002)) {
+ goto done;
+ }
+
+ set_reg32_bits(0x40020020, 0x00000001, 1);
+ delay_us(15);
+ if (!get_reg32_bits(0x40020020, 0x00000001)) {
+ goto done;
+ }
+
+ delay_us(300);
+ if (get_reg32_bits(0x40020020, 0x00000001)) {
+ goto done;
+ }
+
+ val = get_reg32(0x40020090);
+ set_reg32_bits(0x40020094, 0x0000000f, val);
+ set_reg32_bits(0x40020094, 0x00000f00, val);
+ set_reg32_bits(0x40020094, 0x000f0000, val);
+ set_reg32_bits(0x40020094, 0x0f000000, val);
+ g_ble_phy_rf_data.cal_res_1 = get_reg32(0x40020094);
+
+done:
+ set_reg32(0x40020024, 0);
+ set_reg32(0x40020020, bkp[0]);
+ set_reg32(0x40020208, bkp[1]);
+ set_reg32(0x40020250, bkp[2]);
+ set_reg32(0x40020254, bkp[3]);
+ set_reg32(0x40020218, bkp[4]);
+ set_reg32(0x4002021c, bkp[5]);
+ set_reg32(0x40020220, bkp[6]);
+ set_reg32(0x40020270, bkp[7]);
+ set_reg32(0x4002027c, bkp[8]);
+ set_reg32(0x4002101c, bkp[9]);
+ set_reg32(0x40020000, bkp[10]);
+ set_reg32(0x40022000, bkp[11]);
+ set_reg32_bits(0x4002003c, 0x00000800, 0);
+}
+
+static void
+ble_rf_calibration_2(void)
+{
+ uint32_t bkp[2];
+ uint32_t k1;
+
+ set_reg8(0x40020005, 3);
+ set_reg32(0x40022000, 0x00000300);
+ set_reg32_bits(0x40022004, 0x0000007f, 20);
+ bkp[0] = get_reg32(0x40022040);
+ set_reg32(0x40022040, 0xffffffff);
+ set_reg32_bits(0x40022018, 0x0000003f, 0);
+ set_reg32_bits(0x40022018, 0x00008000, 0);
+ set_reg32_bits(0x4002201c, 0x00000600, 2);
+ set_reg32_bits(0x4002201c, 0x00000070, 4);
+ set_reg32_bits(0x40022030, 0x3f000000, 22);
+ set_reg32_bits(0x40022030, 0x00000fc0, 24);
+ set_reg32_bits(0x40022030, 0x0000003f, 24);
+ set_reg8(0x4002201c, 0x43);
+ set_reg8(0x40020006, 2);
+ delay_us(2);
+ bkp[1] = get_reg32_bits(0x4002024c, 0x000003e0);
+ set_reg32_bits(0x4002024c, 0x000003e0, 0);
+ set_reg8(0x40020006, 1);
+ set_reg32_bits(0x400200ac, 0x00000003, 3);
+ delay_us(30);
+ delay_us(100);
+ set_reg8(0x40020005, 3);
+ k1 = get_reg32_bits(0x40022088, 0x000001ff);
+ set_reg32(0x400200ac, 0);
+ delay_us(20);
+ set_reg32_bits(0x4002024c, 0x000003e0, bkp[1]);
+ delay_us(10);
+
+ set_reg32_bits(0x40022018, 0xff800000, k1);
+ set_reg32_bits(0x40022018, 0x00007fc0, k1);
+ set_reg8(0x4002201c, 0x41);
+ set_reg32_bits(0x4002201c, 0x00000600, 2);
+ set_reg8(0x40020006, 2);
+ delay_us(2);
+ bkp[1] = get_reg32_bits(0x4002024c, 0x000003e0);
+ set_reg32_bits(0x4002024c, 0x000003e0, 0);
+ set_reg8(0x40020006, 1);
+ set_reg32_bits(0x400200ac, 0x00000003, 3);
+ delay_us(30);
+ delay_us(100);
+ set_reg8(0x40020005, 3);
+ k1 = get_reg32_bits(0x40022088, 0x1ff);
+ set_reg32(0x400200ac, 0);
+ delay_us(20);
+ set_reg32_bits(0x4002024c, 0x000003e0, bkp[1]);
+ delay_us(10);
+
+ set_reg32_bits(0x40022018, 0xff800000, k1);
+ set_reg32_bits(0x40022018, 0x00007fc0, k1);
+ set_reg8(0x4002201c, 0x41);
+ set_reg32_bits(0x4002201c, 0x00000600, 2);
+ set_reg8(0x40020006, 2);
+ delay_us(2);
+ bkp[1] = get_reg32_bits(0x4002024c, 0x000003e0);
+ set_reg32_bits(0x4002024c, 0x000003e0, 0);
+ set_reg8(0x40020006, 1);
+ set_reg32_bits(0x400200ac, 0x00000003, 3);
+ delay_us(30);
+ delay_us(100);
+ set_reg8(0x40020005, 3);
+ k1 = get_reg32_bits(0x40022088, 0x000001ff);
+ set_reg32_bits(0x40022018, 0xff800000, k1);
+ set_reg32_bits(0x40022018, 0x00007fc0, k1);
+ set_reg32_bits(0x4002201c, 0x00000001, 0);
+ set_reg32(0x40022040, bkp[0]);
+ set_reg32_bits(0x40022018, 0x0000003f, 0x1c);
+ set_reg32_bits(0x40022018, 0x00008000, 0);
+ set_reg32_bits(0x40022030, 0x3f000000, 28);
+ set_reg32_bits(0x40022030, 0x00000fc0, 30);
+ set_reg32_bits(0x40022030, 0x0000003f, 30);
+ set_reg32(0x400200ac, 0);
+ delay_us(20);
+ set_reg32_bits(0x4002024c, 0x000003e0, bkp[1]);
+ delay_us(10);
+
+ g_ble_phy_rf_data.cal_res_2 = k1;
+}
+
+static void
+ble_rf_calibrate_int(uint8_t mask)
+{
+ __disable_irq();
+
+ ble_rf_enable();
+ delay_us(20);
+
+ ble_rf_synth_disable();
+ ble_rf_synth_enable();
+ ble_rf_synth_apply_settings();
+ set_reg8(0x40020005, 1);
+
+ if (mask & RF_CALIBRATION_0) {
+ ble_rf_calibration_0();
+ }
+ if (mask & RF_CALIBRATION_1) {
+ ble_rf_calibration_1();
+ }
+ if (mask & RF_CALIBRATION_2) {
+ ble_rf_calibration_2();
+ }
+
+ ble_rf_disable();
+
+ __enable_irq();
+
+#if MYNEWT_VAL(CMAC_DEBUG_DATA_ENABLE)
+ g_cmac_shared_data.debug.cal_res_1 = g_ble_phy_rf_data.cal_res_1;
+ g_cmac_shared_data.debug.cal_res_2 = g_ble_phy_rf_data.cal_res_2;
+#endif
+}
+
+bool
+ble_rf_try_recalibrate(uint32_t idle_time_us)
+{
+ /* Run recalibration if we have at least 1ms of time to spare and RF is
+ * currently disabled. Calibration is much shorter than 1ms, but that gives
+ * us good margin to make sure we can finish before next event.
+ */
+ if (!g_ble_phy_rf_data.calibrate_req || (idle_time_us < 1000) ||
+ ble_rf_is_enabled()) {
+ return false;
+ }
+
+ ble_rf_calibrate_int(RF_CALIBRATION_2);
+
+ g_ble_phy_rf_data.calibrate_req = 0;
+
+ return true;
+}
+
+static uint32_t
+ble_rf_find_trim_reg(volatile uint32_t *tv, unsigned len, uint32_t reg)
+{
+ while (len) {
+ if (tv[0] == reg) {
+ return tv[1];
+ }
+ len -= 2;
+ tv += 2;
+ }
+
+ return 0;
+}
+
+void
+ble_rf_init(void)
+{
+ static bool done = false;
+ uint32_t val;
+
+ ble_rf_disable();
+
+ if (done) {
+ return;
+ }
+
+ val = ble_rf_find_trim_reg(g_cmac_shared_data.trim.rfcu_mode1,
+ g_cmac_shared_data.trim.rfcu_mode1_len,
+ 0x4002004c);
+ g_ble_phy_rf_data.trim_val1_tx_1 = val;
+
+ val = ble_rf_find_trim_reg(g_cmac_shared_data.trim.rfcu_mode2,
+ g_cmac_shared_data.trim.rfcu_mode2_len,
+ 0x4002004c);
+ g_ble_phy_rf_data.trim_val1_tx_2 = val;
+
+ if (!g_ble_phy_rf_data.trim_val1_tx_1 || !g_ble_phy_rf_data.trim_val1_tx_2) {
+ val = ble_rf_find_trim_reg(g_cmac_shared_data.trim.rfcu,
+ g_cmac_shared_data.trim.rfcu_len,
+ 0x4002004c);
+ if (!val) {
+ val = 0x0300;
+ }
+ g_ble_phy_rf_data.trim_val1_tx_1 = val;
+ g_ble_phy_rf_data.trim_val1_tx_2 = val;
+ }
+
+ val = ble_rf_find_trim_reg(g_cmac_shared_data.trim.synth,
+ g_cmac_shared_data.trim.synth_len,
+ 0x40022038);
+ if (!val) {
+ val = 0x0198ff03;
+ }
+ g_ble_phy_rf_data.trim_val2_rx = val;
+ g_ble_phy_rf_data.trim_val2_tx = val;
+ set_reg32_bits((uint32_t)&g_ble_phy_rf_data.trim_val2_tx, 0x0001ff00, 0x87);
+
+#if MYNEWT_VAL(CMAC_DEBUG_DATA_ENABLE)
+ g_cmac_shared_data.debug.trim_val1_tx_1 = g_ble_phy_rf_data.trim_val1_tx_1;
+ g_cmac_shared_data.debug.trim_val1_tx_2 = g_ble_phy_rf_data.trim_val1_tx_2;
+ g_cmac_shared_data.debug.trim_val2_tx = g_ble_phy_rf_data.trim_val2_tx;
+ g_cmac_shared_data.debug.trim_val2_rx = g_ble_phy_rf_data.trim_val2_rx;
+#endif
+
+ ble_rf_rfcu_enable();
+ ble_rf_rfcu_apply_settings();
+ g_ble_phy_rf_data.tx_power_cfg1 = get_reg32_bits(0x500000a4, 0xf0);
+ g_ble_phy_rf_data.tx_power_cfg2 = get_reg32_bits(0x40020238, 0x000003e0);
+ g_ble_phy_rf_data.tx_power_cfg3 = 0;
+ ble_rf_rfcu_disable();
+
+ ble_rf_calibrate_int(RF_CALIBRATION_0 | RF_CALIBRATION_1 | RF_CALIBRATION_2);
+
+ done = true;
+}
+
+void
+ble_rf_enable(void)
+{
+ if (ble_rf_is_enabled()) {
+ return;
+ }
+
+ ble_rf_rfcu_enable();
+ ble_rf_rfcu_apply_settings();
+ ble_rf_ldo_on();
+}
+
+void
+ble_rf_configure(void)
+{
+ if (ble_rf_synth_is_enabled()) {
+ return;
+ }
+
+ ble_rf_synth_enable();
+ ble_rf_synth_apply_settings();
+}
+
+void
+ble_rf_stop(void)
+{
+ ble_rf_synth_disable();
+ set_reg8(0x40020006, 0);
+}
+
+void
+ble_rf_disable(void)
+{
+ ble_rf_stop();
+ ble_rf_ldo_off();
+ ble_rf_rfcu_disable();
+}
+
+bool
+ble_rf_is_enabled(void)
+{
+ return get_reg32_bits(0x40020008, 5) == 5;
+}
+
+void
+ble_rf_calibrate_req(void)
+{
+ g_ble_phy_rf_data.calibrate_req = 1;
+}
+
+void
+ble_rf_setup_tx(uint8_t rf_chan, uint8_t phy_mode)
+{
+ set_reg32_bits(0x40020000, 0x0f000000, g_ble_phy_rf_data.tx_power_cfg0);
+ set_reg32_bits(0x500000a4, 0x000000f0, g_ble_phy_rf_data.tx_power_cfg1);
+ set_reg32_bits(0x40020238, 0x000003e0, g_ble_phy_rf_data.tx_power_cfg2);
+ set_reg32_bits(0x40020234, 0x000003e0, g_ble_phy_rf_data.tx_power_cfg3);
+
+ if (g_ble_phy_rf_data.tx_power_cfg0 < 13) {
+ set_reg32(0x4002004c, g_ble_phy_rf_data.trim_val1_tx_1);
+ } else {
+ set_reg32(0x4002004c, g_ble_phy_rf_data.trim_val1_tx_2);
+ }
+ set_reg8(0x40020005, 3);
+ set_reg8(0x40022004, rf_chan);
+ if (phy_mode == BLE_PHY_MODE_2M) {
+#if MYNEWT_VAL(BLE_PHY_RF_HP_MODE)
+ set_reg32(0x40022000, 0x00000303);
+#else
+ set_reg32(0x40022000, 0x00000003);
+#endif
+ } else {
+#if MYNEWT_VAL(BLE_PHY_RF_HP_MODE)
+ set_reg32(0x40022000, 0x00000300);
+#else
+ set_reg32(0x40022000, 0x00000000);
+#endif
+ }
+
+ ble_rf_apply_calibration();
+
+ set_reg32_bits(0x40022050, 0x00000200, 1);
+ set_reg32_bits(0x40022050, 0x00000100, 0);
+ set_reg32_bits(0x40022048, 0x01ffff00, 0x7700);
+ set_reg32(0x40022038, g_ble_phy_rf_data.trim_val2_tx);
+
+ set_reg8(0x40020006, 3);
+}
+
+void
+ble_rf_setup_rx(uint8_t rf_chan, uint8_t phy_mode)
+{
+ set_reg32_bits(0x500000a4, 0x000000f0, g_ble_phy_rf_data.tx_power_cfg1);
+ set_reg8(0x40020005, 3);
+ set_reg8(0x40022004, rf_chan);
+ if (phy_mode == BLE_PHY_MODE_2M) {
+#if MYNEWT_VAL(BLE_PHY_RF_HP_MODE)
+ set_reg32(0x40022000, 0x00000303);
+ set_reg32(0x40020000, 0x0f11b823);
+ set_reg32(0x4002103c, 0x0125261b);
+#else
+ set_reg32(0x40022000, 0x00000003);
+ set_reg32(0x40020000, 0x0f0c2803);
+ set_reg32(0x4002103c, 0x0125a61b);
+#endif
+ set_reg32(0x40021020, 0x000002f5);
+ set_reg32(0x4002102c, 0x0000d1d5);
+ } else {
+#if MYNEWT_VAL(BLE_PHY_RF_HP_MODE)
+ set_reg32(0x40022000, 0x00000300);
+ set_reg32(0x40020000, 0x0f099820);
+ set_reg32(0x4002103c, 0x0124a21f);
+#else
+ set_reg32(0x40022000, 0x00000000);
+ set_reg32(0x40020000, 0x0f062800);
+ set_reg32(0x4002103c, 0x01051e1f);
+#endif
+ set_reg32(0x40021020, 0x000002f5);
+ set_reg32(0x4002102c, 0x0000dfe7);
+ }
+
+ ble_rf_apply_calibration();
+
+ set_reg32_bits(0x40022050, 0x00000200, 1);
+ set_reg32_bits(0x40022050, 0x00000100, 1);
+ set_reg32_bits(0x40022048, 0x01ffff00, 0);
+ set_reg32(0x40022038, g_ble_phy_rf_data.trim_val2_rx);
+
+ set_reg8(0x40020006, 3);
+}
+
+void
+ble_rf_set_tx_power(int dbm)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(g_ble_rf_power_lvls); i++) {
+ if (g_ble_rf_power_lvls[i] >= dbm) {
+ break;
+ }
+ }
+
+ g_ble_phy_rf_data.tx_power_cfg0 = i + 1;
+}
+
+int8_t
+ble_rf_get_rssi(void)
+{
+ return (501 * get_reg32_bits(0x40021038, 0x000003ff) - 493000) / 4096;
+}
diff --git a/src/libs/mynewt-nimble/nimble/drivers/dialog_cmac/src/ble_rf_priv.h b/src/libs/mynewt-nimble/nimble/drivers/dialog_cmac/src/ble_rf_priv.h
new file mode 100644
index 00000000..50c2e4a7
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/drivers/dialog_cmac/src/ble_rf_priv.h
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#ifndef _BLE_RF_PRIV_H_
+#define _BLE_RF_PRIV_H_
+
+void ble_rf_init(void);
+void ble_rf_enable(void);
+void ble_rf_stop(void);
+void ble_rf_disable(void);
+bool ble_rf_is_enabled(void);
+void ble_rf_configure(void);
+
+void ble_rf_calibrate(void);
+
+void ble_rf_setup_tx(uint8_t rf_chan, uint8_t mode);
+void ble_rf_setup_rx(uint8_t rf_chan, uint8_t mode);
+
+void ble_rf_set_tx_power(int dbm);
+int8_t ble_rf_get_rssi(void);
+
+#endif /* _BLE_RF_PRIV_H_ */
diff --git a/src/libs/mynewt-nimble/nimble/drivers/dialog_cmac/syscfg.yml b/src/libs/mynewt-nimble/nimble/drivers/dialog_cmac/syscfg.yml
new file mode 100644
index 00000000..a82b62e5
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/drivers/dialog_cmac/syscfg.yml
@@ -0,0 +1,29 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+syscfg.defs:
+ BLE_PHY_RF_HP_MODE:
+ description: Enable high-performance RF mode.
+ value: 1
+
+ BLE_PHY_DEBUG_DSER:
+ description: Enable DSER output from PHY
+ value: 0
+
+syscfg.restrictions:
+ - BLE_LL_RFMGMT_ENABLE_TIME == 0 || BLE_LL_RFMGMT_ENABLE_TIME >= 20
diff --git a/src/libs/mynewt-nimble/nimble/drivers/native/src/ble_hw.c b/src/libs/mynewt-nimble/nimble/drivers/native/src/ble_hw.c
index 5eb1eb95..8aa29d32 100644
--- a/src/libs/mynewt-nimble/nimble/drivers/native/src/ble_hw.c
+++ b/src/libs/mynewt-nimble/nimble/drivers/native/src/ble_hw.c
@@ -20,6 +20,8 @@
#include <stdint.h>
#include <assert.h>
#include <string.h>
+#include <stdlib.h>
+#include <stdbool.h>
#include "syscfg/syscfg.h"
#include "os/os.h"
#include "nimble/ble.h"
@@ -32,6 +34,9 @@
/* We use this to keep track of which entries are set to valid addresses */
static uint8_t g_ble_hw_whitelist_mask;
+static ble_rng_isr_cb_t rng_cb;
+static bool rng_started;
+
/* Returns public device address or -1 if not present */
int
ble_hw_get_public_addr(ble_addr_t *addr)
@@ -143,7 +148,8 @@ ble_hw_encrypt_block(struct ble_encryption_block *ecb)
int
ble_hw_rng_init(ble_rng_isr_cb_t cb, int bias)
{
- return -1;
+ rng_cb = cb;
+ return 0;
}
/**
@@ -154,7 +160,15 @@ ble_hw_rng_init(ble_rng_isr_cb_t cb, int bias)
int
ble_hw_rng_start(void)
{
- return -1;
+ rng_started = true;
+
+ if (rng_cb) {
+ while (rng_started) {
+ rng_cb(rand());
+ }
+ }
+
+ return 0;
}
/**
@@ -165,7 +179,8 @@ ble_hw_rng_start(void)
int
ble_hw_rng_stop(void)
{
- return -1;
+ rng_started = false;
+ return 0;
}
/**
@@ -176,7 +191,7 @@ ble_hw_rng_stop(void)
uint8_t
ble_hw_rng_read(void)
{
- return 0;
+ return rand();
}
#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_PRIVACY)
diff --git a/src/libs/mynewt-nimble/nimble/drivers/nrf5340/include/ble/xcvr.h b/src/libs/mynewt-nimble/nimble/drivers/nrf5340/include/ble/xcvr.h
new file mode 100644
index 00000000..df6ef700
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/drivers/nrf5340/include/ble/xcvr.h
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#ifndef H_BLE_XCVR_
+#define H_BLE_XCVR_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define XCVR_RX_RADIO_RAMPUP_USECS (40)
+#define XCVR_TX_RADIO_RAMPUP_USECS (40)
+
+/*
+ * NOTE: we have to account for the RTC output compare issue. We want it to be
+ * 5 ticks.
+ */
+#define XCVR_PROC_DELAY_USECS (153)
+#define XCVR_RX_START_DELAY_USECS (XCVR_RX_RADIO_RAMPUP_USECS)
+#define XCVR_TX_START_DELAY_USECS (XCVR_TX_RADIO_RAMPUP_USECS)
+#define XCVR_TX_SCHED_DELAY_USECS (XCVR_TX_START_DELAY_USECS + XCVR_PROC_DELAY_USECS)
+#define XCVR_RX_SCHED_DELAY_USECS (XCVR_RX_START_DELAY_USECS + XCVR_PROC_DELAY_USECS)
+
+/*
+ * Define HW whitelist size. This is the total possible whitelist size;
+ * not necessarily the size that will be used (may be smaller)
+ */
+#define BLE_HW_WHITE_LIST_SIZE (8)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* H_BLE_XCVR_ */
diff --git a/src/libs/mynewt-nimble/nimble/drivers/nrf5340/pkg.yml b/src/libs/mynewt-nimble/nimble/drivers/nrf5340/pkg.yml
new file mode 100644
index 00000000..3ff44212
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/drivers/nrf5340/pkg.yml
@@ -0,0 +1,31 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+pkg.name: nimble/drivers/nrf5340
+pkg.description: BLE driver for nRF5340 systems.
+pkg.author: "Apache Mynewt <dev@mynewt.apache.org>"
+pkg.homepage: "http://mynewt.apache.org/"
+pkg.keywords:
+ - ble
+ - bluetooth
+
+pkg.apis: ble_driver
+pkg.deps:
+ - nimble
+ - nimble/controller
diff --git a/src/libs/mynewt-nimble/nimble/drivers/nrf5340/src/ble_hw.c b/src/libs/mynewt-nimble/nimble/drivers/nrf5340/src/ble_hw.c
new file mode 100644
index 00000000..bbe61697
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/drivers/nrf5340/src/ble_hw.c
@@ -0,0 +1,475 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include <stdint.h>
+#include <assert.h>
+#include <string.h>
+#include <syscfg/syscfg.h>
+#include <os/os.h>
+#include <nimble/ble.h>
+#include <nimble/nimble_opt.h>
+#include <controller/ble_hw.h>
+
+#include <ble/xcvr.h>
+#include <mcu/cmsis_nvic.h>
+#include <os/os_trace_api.h>
+
+/* Total number of resolving list elements */
+#define BLE_HW_RESOLV_LIST_SIZE (16)
+
+/* We use this to keep track of which entries are set to valid addresses */
+static uint8_t g_ble_hw_whitelist_mask;
+
+/* Random number generator isr callback */
+static ble_rng_isr_cb_t ble_rng_isr_cb;
+
+/* If LL privacy is enabled, allocate memory for AAR */
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_PRIVACY)
+
+/* The NRF5340 supports up to 16 IRK entries */
+#if (MYNEWT_VAL(BLE_LL_RESOLV_LIST_SIZE) < 16)
+#define NRF_IRK_LIST_ENTRIES (MYNEWT_VAL(BLE_LL_RESOLV_LIST_SIZE))
+#else
+#define NRF_IRK_LIST_ENTRIES (16)
+#endif
+
+/* NOTE: each entry is 16 bytes long. */
+uint32_t g_nrf_irk_list[NRF_IRK_LIST_ENTRIES * 4];
+
+/* Current number of IRK entries */
+uint8_t g_nrf_num_irks;
+
+#endif
+
+/* Returns public device address or -1 if not present */
+int
+ble_hw_get_public_addr(ble_addr_t *addr)
+{
+ uint32_t addr_high;
+ uint32_t addr_low;
+
+ /* Does FICR have a public address */
+ if ((NRF_FICR_NS->DEVICEADDRTYPE & 1) != 0) {
+ return -1;
+ }
+
+ /* Copy into device address. We can do this because we know platform */
+ addr_low = NRF_FICR_NS->DEVICEADDR[0];
+ addr_high = NRF_FICR_NS->DEVICEADDR[1];
+ memcpy(addr->val, &addr_low, 4);
+ memcpy(&addr->val[4], &addr_high, 2);
+ addr->type = BLE_ADDR_PUBLIC;
+
+ return 0;
+}
+
+/* Returns random static address or -1 if not present */
+int
+ble_hw_get_static_addr(ble_addr_t *addr)
+{
+ int rc;
+
+ if ((NRF_FICR_NS->DEVICEADDRTYPE & 1) == 1) {
+ memcpy(addr->val, (void *)&NRF_FICR_NS->DEVICEADDR[0], 4);
+ memcpy(&addr->val[4], (void *)&NRF_FICR_NS->DEVICEADDR[1], 2);
+ addr->val[5] |= 0xc0;
+ addr->type = BLE_ADDR_RANDOM;
+ rc = 0;
+ } else {
+ rc = -1;
+ }
+
+ return rc;
+}
+
+/**
+ * Clear the whitelist
+ *
+ * @return int
+ */
+void
+ble_hw_whitelist_clear(void)
+{
+ NRF_RADIO_NS->DACNF = 0;
+ g_ble_hw_whitelist_mask = 0;
+}
+
+/**
+ * Add a device to the hw whitelist
+ *
+ * @param addr
+ * @param addr_type
+ *
+ * @return int 0: success, BLE error code otherwise
+ */
+int
+ble_hw_whitelist_add(const uint8_t *addr, uint8_t addr_type)
+{
+ int i;
+ uint32_t mask;
+
+ /* Find first ununsed device address match element */
+ mask = 0x01;
+ for (i = 0; i < BLE_HW_WHITE_LIST_SIZE; ++i) {
+ if ((mask & g_ble_hw_whitelist_mask) == 0) {
+ NRF_RADIO_NS->DAB[i] = get_le32(addr);
+ NRF_RADIO_NS->DAP[i] = get_le16(addr + 4);
+ if (addr_type == BLE_ADDR_RANDOM) {
+ NRF_RADIO_NS->DACNF |= (mask << 8);
+ }
+ g_ble_hw_whitelist_mask |= mask;
+ return BLE_ERR_SUCCESS;
+ }
+ mask <<= 1;
+ }
+
+ return BLE_ERR_MEM_CAPACITY;
+}
+
+/**
+ * Remove a device from the hw whitelist
+ *
+ * @param addr
+ * @param addr_type
+ *
+ */
+void
+ble_hw_whitelist_rmv(const uint8_t *addr, uint8_t addr_type)
+{
+ int i;
+ uint16_t dap;
+ uint16_t txadd;
+ uint32_t dab;
+ uint32_t mask;
+
+ /* Find first ununsed device address match element */
+ dab = get_le32(addr);
+ dap = get_le16(addr + 4);
+ txadd = NRF_RADIO_NS->DACNF >> 8;
+ mask = 0x01;
+ for (i = 0; i < BLE_HW_WHITE_LIST_SIZE; ++i) {
+ if (mask & g_ble_hw_whitelist_mask) {
+ if ((dab == NRF_RADIO_NS->DAB[i]) && (dap == NRF_RADIO_NS->DAP[i])) {
+ if (addr_type == !!(txadd & mask)) {
+ break;
+ }
+ }
+ }
+ mask <<= 1;
+ }
+
+ if (i < BLE_HW_WHITE_LIST_SIZE) {
+ g_ble_hw_whitelist_mask &= ~mask;
+ NRF_RADIO_NS->DACNF &= ~mask;
+ }
+}
+
+/**
+ * Returns the size of the whitelist in HW
+ *
+ * @return int Number of devices allowed in whitelist
+ */
+uint8_t
+ble_hw_whitelist_size(void)
+{
+ return BLE_HW_WHITE_LIST_SIZE;
+}
+
+/**
+ * Enable the whitelisted devices
+ */
+void
+ble_hw_whitelist_enable(void)
+{
+ /* Enable the configured device addresses */
+ NRF_RADIO_NS->DACNF |= g_ble_hw_whitelist_mask;
+}
+
+/**
+ * Disables the whitelisted devices
+ */
+void
+ble_hw_whitelist_disable(void)
+{
+ /* Disable all whitelist devices */
+ NRF_RADIO_NS->DACNF &= 0x0000ff00;
+}
+
+/**
+ * Boolean function which returns true ('1') if there is a match on the
+ * whitelist.
+ *
+ * @return int
+ */
+int
+ble_hw_whitelist_match(void)
+{
+ return NRF_RADIO_NS->EVENTS_DEVMATCH;
+}
+
+/* Encrypt data */
+int
+ble_hw_encrypt_block(struct ble_encryption_block *ecb)
+{
+ int rc;
+ uint32_t end;
+ uint32_t err;
+
+ /* Stop ECB */
+ NRF_ECB_NS->TASKS_STOPECB = 1;
+ /* XXX: does task stop clear these counters? Anyway to do this quicker? */
+ NRF_ECB_NS->EVENTS_ENDECB = 0;
+ NRF_ECB_NS->EVENTS_ERRORECB = 0;
+ NRF_ECB_NS->ECBDATAPTR = (uint32_t)ecb;
+
+ /* Start ECB */
+ NRF_ECB_NS->TASKS_STARTECB = 1;
+
+ /* Wait till error or done */
+ rc = 0;
+ while (1) {
+ end = NRF_ECB_NS->EVENTS_ENDECB;
+ err = NRF_ECB_NS->EVENTS_ERRORECB;
+ if (end || err) {
+ if (err) {
+ rc = -1;
+ }
+ break;
+ }
+ }
+
+ return rc;
+}
+
+/**
+ * Random number generator ISR.
+ */
+static void
+ble_rng_isr(void)
+{
+ uint8_t rnum;
+
+ os_trace_isr_enter();
+
+ /* No callback? Clear and disable interrupts */
+ if (ble_rng_isr_cb == NULL) {
+ NRF_RNG_NS->INTENCLR = 1;
+ NRF_RNG_NS->EVENTS_VALRDY = 0;
+ (void)NRF_RNG_NS->SHORTS;
+ os_trace_isr_exit();
+ return;
+ }
+
+ /* If there is a value ready grab it */
+ if (NRF_RNG_NS->EVENTS_VALRDY) {
+ NRF_RNG_NS->EVENTS_VALRDY = 0;
+ rnum = (uint8_t)NRF_RNG_NS->VALUE;
+ (*ble_rng_isr_cb)(rnum);
+ }
+
+ os_trace_isr_exit();
+}
+
+/**
+ * Initialize the random number generator
+ *
+ * @param cb
+ * @param bias
+ *
+ * @return int
+ */
+int
+ble_hw_rng_init(ble_rng_isr_cb_t cb, int bias)
+{
+ /* Set bias */
+ if (bias) {
+ NRF_RNG_NS->CONFIG = 1;
+ } else {
+ NRF_RNG_NS->CONFIG = 0;
+ }
+
+ /* If we were passed a function pointer we need to enable the interrupt */
+ if (cb != NULL) {
+#ifndef RIOT_VERSION
+ NVIC_SetPriority(RNG_IRQn, (1 << __NVIC_PRIO_BITS) - 1);
+#endif
+#if MYNEWT
+ NVIC_SetVector(RNG_IRQn, (uint32_t)ble_rng_isr);
+#else
+ ble_npl_hw_set_isr(RNG_IRQn, ble_rng_isr);
+#endif
+ NVIC_EnableIRQ(RNG_IRQn);
+ ble_rng_isr_cb = cb;
+ }
+
+ return 0;
+}
+
+/**
+ * Start the random number generator
+ *
+ * @return int
+ */
+int
+ble_hw_rng_start(void)
+{
+ os_sr_t sr;
+
+ /* No need for interrupt if there is no callback */
+ OS_ENTER_CRITICAL(sr);
+ NRF_RNG_NS->EVENTS_VALRDY = 0;
+ if (ble_rng_isr_cb) {
+ NRF_RNG_NS->INTENSET = 1;
+ }
+ NRF_RNG_NS->TASKS_START = 1;
+ OS_EXIT_CRITICAL(sr);
+
+ return 0;
+}
+
+/**
+ * Stop the random generator
+ *
+ * @return int
+ */
+int
+ble_hw_rng_stop(void)
+{
+ os_sr_t sr;
+
+ /* No need for interrupt if there is no callback */
+ OS_ENTER_CRITICAL(sr);
+ NRF_RNG_NS->INTENCLR = 1;
+ NRF_RNG_NS->TASKS_STOP = 1;
+ NRF_RNG_NS->EVENTS_VALRDY = 0;
+ OS_EXIT_CRITICAL(sr);
+
+ return 0;
+}
+
+/**
+ * Read the random number generator.
+ *
+ * @return uint8_t
+ */
+uint8_t
+ble_hw_rng_read(void)
+{
+ uint8_t rnum;
+
+ /* Wait for a sample */
+ while (NRF_RNG_NS->EVENTS_VALRDY == 0) {
+ }
+
+ NRF_RNG_NS->EVENTS_VALRDY = 0;
+ rnum = (uint8_t)NRF_RNG_NS->VALUE;
+
+ return rnum;
+}
+
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_PRIVACY)
+/**
+ * Clear the resolving list
+ *
+ * @return int
+ */
+void
+ble_hw_resolv_list_clear(void)
+{
+ g_nrf_num_irks = 0;
+}
+
+/**
+ * Add a device to the hw resolving list
+ *
+ * @param irk Pointer to IRK to add
+ *
+ * @return int 0: success, BLE error code otherwise
+ */
+int
+ble_hw_resolv_list_add(uint8_t *irk)
+{
+ uint32_t *nrf_entry;
+
+ /* Find first ununsed device address match element */
+ if (g_nrf_num_irks == NRF_IRK_LIST_ENTRIES) {
+ return BLE_ERR_MEM_CAPACITY;
+ }
+
+ /* Copy into irk list */
+ nrf_entry = &g_nrf_irk_list[4 * g_nrf_num_irks];
+ memcpy(nrf_entry, irk, 16);
+
+ /* Add to total */
+ ++g_nrf_num_irks;
+ return BLE_ERR_SUCCESS;
+}
+
+/**
+ * Remove a device from the hw resolving list
+ *
+ * @param index Index of IRK to remove
+ */
+void
+ble_hw_resolv_list_rmv(int index)
+{
+ uint32_t *irk_entry;
+
+ if (index < g_nrf_num_irks) {
+ --g_nrf_num_irks;
+ irk_entry = &g_nrf_irk_list[index];
+ if (g_nrf_num_irks > index) {
+ memmove(irk_entry, irk_entry + 4, 16 * (g_nrf_num_irks - index));
+ }
+ }
+}
+
+/**
+ * Returns the size of the resolving list. NOTE: this returns the maximum
+ * allowable entries in the HW. Configuration options may limit this.
+ *
+ * @return int Number of devices allowed in resolving list
+ */
+uint8_t
+ble_hw_resolv_list_size(void)
+{
+ return BLE_HW_RESOLV_LIST_SIZE;
+}
+
+/**
+ * Called to determine if the address received was resolved.
+ *
+ * @return int Negative values indicate unresolved address; positive values
+ * indicate index in resolving list of resolved address.
+ */
+int
+ble_hw_resolv_list_match(void)
+{
+ uint32_t index;
+
+ if (NRF_AAR_NS->EVENTS_END) {
+ if (NRF_AAR_NS->EVENTS_RESOLVED) {
+ index = NRF_AAR_NS->STATUS;
+ return (int)index;
+ }
+ }
+
+ return -1;
+}
+#endif
diff --git a/src/libs/mynewt-nimble/nimble/drivers/nrf5340/src/ble_phy.c b/src/libs/mynewt-nimble/nimble/drivers/nrf5340/src/ble_phy.c
new file mode 100644
index 00000000..e07bbaa1
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/drivers/nrf5340/src/ble_phy.c
@@ -0,0 +1,1820 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include <stdint.h>
+#include <string.h>
+#include <assert.h>
+#include <syscfg/syscfg.h>
+#include <os/os.h>
+#include <nimble/ble.h>
+#include <nimble/nimble_opt.h>
+#include <nimble/nimble_npl.h>
+#include <controller/ble_phy.h>
+
+#include <ble/xcvr.h>
+#include <controller/ble_phy_trace.h>
+#include <controller/ble_ll.h>
+#include <mcu/nrf5340_net_clock.h>
+#include <mcu/cmsis_nvic.h>
+
+/*
+ * NOTE: This code uses 0-5 DPPI channels so care should be taken when using
+ * DPPI somewhere else.
+ * TODO maybe we could reduce number of used channels if we reuse same channel
+ * for mutually exclusive events but for now make it simpler to debug.
+ */
+
+#define DPPI_CH_TIMER0_EVENTS_COMPARE_0 0
+#define DPPI_CH_TIMER0_EVENTS_COMPARE_3 1
+#define DPPI_CH_RADIO_EVENTS_END 2
+#define DPPI_CH_RADIO_EVENTS_BCMATCH 3
+#define DPPI_CH_RADIO_EVENTS_ADDRESS 4
+#define DPPI_CH_RTC0_EVENTS_COMPARE_0 5
+
+#define DPPI_CH_ENABLE_ALL (DPPIC_CHEN_CH0_Msk | DPPIC_CHEN_CH1_Msk | DPPIC_CHEN_CH2_Msk | \
+ DPPIC_CHEN_CH3_Msk | DPPIC_CHEN_CH4_Msk | DPPIC_CHEN_CH5_Msk)
+
+#define DPPI_PUBLISH_TIMER0_EVENTS_COMPARE_0 ((DPPI_CH_TIMER0_EVENTS_COMPARE_0 << TIMER_PUBLISH_COMPARE_CHIDX_Pos) | \
+ (TIMER_PUBLISH_COMPARE_EN_Enabled << TIMER_PUBLISH_COMPARE_EN_Pos))
+#define DPPI_PUBLISH_TIMER0_EVENTS_COMPARE_3 ((DPPI_CH_TIMER0_EVENTS_COMPARE_3 << TIMER_PUBLISH_COMPARE_CHIDX_Pos) | \
+ (TIMER_PUBLISH_COMPARE_EN_Enabled << TIMER_PUBLISH_COMPARE_EN_Pos))
+#define DPPI_PUBLISH_RADIO_EVENTS_END ((DPPI_CH_RADIO_EVENTS_END << RADIO_PUBLISH_END_CHIDX_Pos) | \
+ (RADIO_PUBLISH_END_EN_Enabled << RADIO_PUBLISH_END_EN_Pos))
+#define DPPI_PUBLISH_RADIO_EVENTS_BCMATCH ((DPPI_CH_RADIO_EVENTS_BCMATCH << RADIO_PUBLISH_BCMATCH_CHIDX_Pos) | \
+ (RADIO_PUBLISH_BCMATCH_EN_Enabled << RADIO_PUBLISH_BCMATCH_EN_Pos))
+#define DPPI_PUBLISH_RADIO_EVENTS_ADDRESS ((DPPI_CH_RADIO_EVENTS_ADDRESS << RADIO_PUBLISH_ADDRESS_CHIDX_Pos) | \
+ (RADIO_PUBLISH_ADDRESS_EN_Enabled << RADIO_PUBLISH_ADDRESS_EN_Pos))
+#define DPPI_PUBLISH_RTC0_EVENTS_COMPARE_0 ((DPPI_CH_RTC0_EVENTS_COMPARE_0 << RTC_PUBLISH_COMPARE_CHIDX_Pos) | \
+ (RTC_PUBLISH_COMPARE_EN_Enabled << RTC_PUBLISH_COMPARE_EN_Pos))
+
+#define DPPI_SUBSCRIBE_TIMER0_TASKS_START(_enable) ((DPPI_CH_RTC0_EVENTS_COMPARE_0 << TIMER_SUBSCRIBE_START_CHIDX_Pos) | \
+ ((_enable) << TIMER_SUBSCRIBE_START_EN_Pos))
+#define DPPI_SUBSCRIBE_TIMER0_TASKS_CAPTURE1(_enable) ((DPPI_CH_RADIO_EVENTS_ADDRESS << TIMER_SUBSCRIBE_CAPTURE_CHIDX_Pos) | \
+ ((_enable) << TIMER_SUBSCRIBE_CAPTURE_EN_Pos))
+#define DPPI_SUBSCRIBE_TIMER0_TASKS_CAPTURE2(_enable) ((DPPI_CH_RADIO_EVENTS_END << TIMER_SUBSCRIBE_CAPTURE_CHIDX_Pos) | \
+ ((_enable) << TIMER_SUBSCRIBE_CAPTURE_EN_Pos))
+#define DPPI_SUBSCRIBE_TIMER0_TASKS_CAPTURE3(_enable) ((DPPI_CH_RADIO_EVENTS_ADDRESS << TIMER_SUBSCRIBE_CAPTURE_CHIDX_Pos) | \
+ ((_enable) << TIMER_SUBSCRIBE_CAPTURE_EN_Pos))
+#define DPPI_SUBSCRIBE_RADIO_TASKS_DISABLE(_enable) ((DPPI_CH_TIMER0_EVENTS_COMPARE_3 << RADIO_SUBSCRIBE_DISABLE_CHIDX_Pos) | \
+ ((_enable) << RADIO_SUBSCRIBE_DISABLE_EN_Pos))
+#define DPPI_SUBSCRIBE_RADIO_TASKS_RXEN(_enable) ((DPPI_CH_TIMER0_EVENTS_COMPARE_0 << RADIO_SUBSCRIBE_RXEN_CHIDX_Pos) | \
+ ((_enable) << RADIO_SUBSCRIBE_RXEN_EN_Pos))
+#define DPPI_SUBSCRIBE_RADIO_TASKS_TXEN(_enable) ((DPPI_CH_TIMER0_EVENTS_COMPARE_0 << RADIO_SUBSCRIBE_TXEN_CHIDX_Pos) | \
+ ((_enable) << RADIO_SUBSCRIBE_TXEN_EN_Pos))
+#define DPPI_SUBSCRIBE_AAR_TASKS_START(_enable) ((DPPI_CH_RADIO_EVENTS_BCMATCH << AAR_SUBSCRIBE_START_CHIDX_Pos) | \
+ ((_enable) << AAR_SUBSCRIBE_START_EN_Pos))
+#define DPPI_SUBSCRIBE_CCM_TASKS_CRYPT(_enable) ((DPPI_CH_RADIO_EVENTS_ADDRESS << CCM_SUBSCRIBE_CRYPT_CHIDX_Pos) | \
+ ((_enable) << CCM_SUBSCRIBE_CRYPT_EN_Pos))
+
+extern uint8_t g_nrf_num_irks;
+extern uint32_t g_nrf_irk_list[];
+
+/* To disable all radio interrupts */
+#define NRF_RADIO_IRQ_MASK_ALL (0x34FF)
+
+/*
+ * We configure the nrf with a 1 byte S0 field, 8 bit length field, and
+ * zero bit S1 field. The preamble is 8 bits long.
+ */
+#define NRF_LFLEN_BITS (8)
+#define NRF_S0LEN (1)
+#define NRF_S1LEN_BITS (0)
+#define NRF_CILEN_BITS (2)
+#define NRF_TERMLEN_BITS (3)
+
+/* Maximum length of frames */
+#define NRF_MAXLEN (255)
+#define NRF_BALEN (3) /* For base address of 3 bytes */
+
+/* NRF_RADIO_NS->PCNF0 configuration values */
+#define NRF_PCNF0 (NRF_LFLEN_BITS << RADIO_PCNF0_LFLEN_Pos) | \
+ (RADIO_PCNF0_S1INCL_Msk) | \
+ (NRF_S0LEN << RADIO_PCNF0_S0LEN_Pos) | \
+ (NRF_S1LEN_BITS << RADIO_PCNF0_S1LEN_Pos)
+#define NRF_PCNF0_1M (NRF_PCNF0) | \
+ (RADIO_PCNF0_PLEN_8bit << RADIO_PCNF0_PLEN_Pos)
+#define NRF_PCNF0_2M (NRF_PCNF0) | \
+ (RADIO_PCNF0_PLEN_16bit << RADIO_PCNF0_PLEN_Pos)
+#define NRF_PCNF0_CODED (NRF_PCNF0) | \
+ (RADIO_PCNF0_PLEN_LongRange << RADIO_PCNF0_PLEN_Pos) | \
+ (NRF_CILEN_BITS << RADIO_PCNF0_CILEN_Pos) | \
+ (NRF_TERMLEN_BITS << RADIO_PCNF0_TERMLEN_Pos)
+
+/* BLE PHY data structure */
+struct ble_phy_obj {
+ uint8_t phy_stats_initialized;
+ int8_t phy_txpwr_dbm;
+ uint8_t phy_chan;
+ uint8_t phy_state;
+ uint8_t phy_transition;
+ uint8_t phy_transition_late;
+ uint8_t phy_rx_started;
+ uint8_t phy_encrypted;
+ uint8_t phy_privacy;
+ uint8_t phy_tx_pyld_len;
+ uint8_t phy_cur_phy_mode;
+ uint8_t phy_tx_phy_mode;
+ uint8_t phy_rx_phy_mode;
+ uint8_t phy_bcc_offset;
+ int8_t rx_pwr_compensation;
+ uint32_t phy_aar_scratch;
+ uint32_t phy_access_address;
+ struct ble_mbuf_hdr rxhdr;
+ void *txend_arg;
+ ble_phy_tx_end_func txend_cb;
+ uint32_t phy_start_cputime;
+};
+struct ble_phy_obj g_ble_phy_data;
+
+/* XXX: if 27 byte packets desired we can make this smaller */
+/* Global transmit/receive buffer */
+static uint32_t g_ble_phy_tx_buf[(BLE_PHY_MAX_PDU_LEN + 3) / 4];
+static uint32_t g_ble_phy_rx_buf[(BLE_PHY_MAX_PDU_LEN + 3) / 4];
+
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_ENCRYPTION)
+/* Make sure word-aligned for faster copies */
+static uint32_t g_ble_phy_enc_buf[(BLE_PHY_MAX_PDU_LEN + 3) / 4];
+#endif
+
+/* RF center frequency for each channel index (offset from 2400 MHz) */
+static const uint8_t g_ble_phy_chan_freq[BLE_PHY_NUM_CHANS] = {
+ 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, /* 0-9 */
+ 24, 28, 30, 32, 34, 36, 38, 40, 42, 44, /* 10-19 */
+ 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, /* 20-29 */
+ 66, 68, 70, 72, 74, 76, 78, 2, 26, 80, /* 30-39 */
+};
+
+#if (BLE_LL_BT5_PHY_SUPPORTED == 1)
+/* packet start offsets (in usecs) */
+static const uint16_t g_ble_phy_mode_pkt_start_off[BLE_PHY_NUM_MODE] = {
+ [BLE_PHY_MODE_1M] = 40,
+ [BLE_PHY_MODE_2M] = 24,
+ [BLE_PHY_MODE_CODED_125KBPS] = 376,
+ [BLE_PHY_MODE_CODED_500KBPS] = 376
+};
+#endif
+
+/* Various radio timings */
+/* Radio ramp-up times in usecs (fast mode) */
+#define BLE_PHY_T_TXENFAST (XCVR_TX_RADIO_RAMPUP_USECS)
+#define BLE_PHY_T_RXENFAST (XCVR_RX_RADIO_RAMPUP_USECS)
+
+/* delay between EVENTS_READY and start of tx */
+static const uint8_t g_ble_phy_t_txdelay[BLE_PHY_NUM_MODE] = {
+ [BLE_PHY_MODE_1M] = 4,
+ [BLE_PHY_MODE_2M] = 3,
+ [BLE_PHY_MODE_CODED_125KBPS] = 5,
+ [BLE_PHY_MODE_CODED_500KBPS] = 5
+};
+/* delay between EVENTS_END and end of txd packet */
+static const uint8_t g_ble_phy_t_txenddelay[BLE_PHY_NUM_MODE] = {
+ [BLE_PHY_MODE_1M] = 4,
+ [BLE_PHY_MODE_2M] = 3,
+ [BLE_PHY_MODE_CODED_125KBPS] = 9,
+ [BLE_PHY_MODE_CODED_500KBPS] = 3
+};
+/* delay between rxd access address (w/ TERM1 for coded) and EVENTS_ADDRESS */
+static const uint8_t g_ble_phy_t_rxaddrdelay[BLE_PHY_NUM_MODE] = {
+ [BLE_PHY_MODE_1M] = 6,
+ [BLE_PHY_MODE_2M] = 2,
+ [BLE_PHY_MODE_CODED_125KBPS] = 17,
+ [BLE_PHY_MODE_CODED_500KBPS] = 17
+};
+/* delay between end of rxd packet and EVENTS_END */
+static const uint8_t g_ble_phy_t_rxenddelay[BLE_PHY_NUM_MODE] = {
+ [BLE_PHY_MODE_1M] = 6,
+ [BLE_PHY_MODE_2M] = 2,
+ [BLE_PHY_MODE_CODED_125KBPS] = 27,
+ [BLE_PHY_MODE_CODED_500KBPS] = 22
+};
+
+/* Statistics */
+STATS_SECT_START(ble_phy_stats)
+STATS_SECT_ENTRY(phy_isrs)
+STATS_SECT_ENTRY(tx_good)
+STATS_SECT_ENTRY(tx_fail)
+STATS_SECT_ENTRY(tx_late)
+STATS_SECT_ENTRY(tx_bytes)
+STATS_SECT_ENTRY(rx_starts)
+STATS_SECT_ENTRY(rx_aborts)
+STATS_SECT_ENTRY(rx_valid)
+STATS_SECT_ENTRY(rx_crc_err)
+STATS_SECT_ENTRY(rx_late)
+STATS_SECT_ENTRY(radio_state_errs)
+STATS_SECT_ENTRY(rx_hw_err)
+STATS_SECT_ENTRY(tx_hw_err)
+STATS_SECT_END
+STATS_SECT_DECL(ble_phy_stats) ble_phy_stats;
+
+STATS_NAME_START(ble_phy_stats)
+STATS_NAME(ble_phy_stats, phy_isrs)
+STATS_NAME(ble_phy_stats, tx_good)
+STATS_NAME(ble_phy_stats, tx_fail)
+STATS_NAME(ble_phy_stats, tx_late)
+STATS_NAME(ble_phy_stats, tx_bytes)
+STATS_NAME(ble_phy_stats, rx_starts)
+STATS_NAME(ble_phy_stats, rx_aborts)
+STATS_NAME(ble_phy_stats, rx_valid)
+STATS_NAME(ble_phy_stats, rx_crc_err)
+STATS_NAME(ble_phy_stats, rx_late)
+STATS_NAME(ble_phy_stats, radio_state_errs)
+STATS_NAME(ble_phy_stats, rx_hw_err)
+STATS_NAME(ble_phy_stats, tx_hw_err)
+STATS_NAME_END(ble_phy_stats)
+
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_ENCRYPTION)
+/*
+ * Per nordic, the number of bytes needed for scratch is 16 + MAX_PKT_SIZE.
+ * However, when I used a smaller size it still overwrote the scratchpad. Until
+ * I figure this out I am just going to allocate 67 words so we have enough
+ * space for 267 bytes of scratch. I used 268 bytes since not sure if this
+ * needs to be aligned and burning a byte is no big deal.
+ *
+ *#define NRF_ENC_SCRATCH_WORDS (((MYNEWT_VAL(BLE_LL_MAX_PKT_SIZE) + 16) + 3) / 4)
+ */
+#define NRF_ENC_SCRATCH_WORDS (67)
+
+static uint32_t nrf_encrypt_scratchpad[NRF_ENC_SCRATCH_WORDS];
+
+struct nrf_ccm_data {
+ uint8_t key[16];
+ uint64_t pkt_counter;
+ uint8_t dir_bit;
+ uint8_t iv[8];
+} __attribute__((packed));
+
+static struct nrf_ccm_data nrf_ccm_data;
+#endif
+
+#if (BLE_LL_BT5_PHY_SUPPORTED == 1)
+
+uint32_t
+ble_phy_mode_pdu_start_off(int phy_mode)
+{
+ return g_ble_phy_mode_pkt_start_off[phy_mode];
+}
+
+static void
+ble_phy_mode_apply(uint8_t phy_mode)
+{
+ if (phy_mode == g_ble_phy_data.phy_cur_phy_mode) {
+ return;
+ }
+
+ switch (phy_mode) {
+ case BLE_PHY_MODE_1M:
+ NRF_RADIO_NS->MODE = RADIO_MODE_MODE_Ble_1Mbit;
+ NRF_RADIO_NS->PCNF0 = NRF_PCNF0_1M;
+ break;
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_2M_PHY)
+ case BLE_PHY_MODE_2M:
+ NRF_RADIO_NS->MODE = RADIO_MODE_MODE_Ble_2Mbit;
+ NRF_RADIO_NS->PCNF0 = NRF_PCNF0_2M;
+ break;
+#endif
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_CODED_PHY)
+ case BLE_PHY_MODE_CODED_125KBPS:
+ NRF_RADIO_NS->MODE = RADIO_MODE_MODE_Ble_LR125Kbit;
+ NRF_RADIO_NS->PCNF0 = NRF_PCNF0_CODED;
+ break;
+ case BLE_PHY_MODE_CODED_500KBPS:
+ NRF_RADIO_NS->MODE = RADIO_MODE_MODE_Ble_LR500Kbit;
+ NRF_RADIO_NS->PCNF0 = NRF_PCNF0_CODED;
+ break;
+#endif
+ default:
+ assert(0);
+ }
+
+ g_ble_phy_data.phy_cur_phy_mode = phy_mode;
+}
+#endif
+
+void
+ble_phy_mode_set(uint8_t tx_phy_mode, uint8_t rx_phy_mode)
+{
+ g_ble_phy_data.phy_tx_phy_mode = tx_phy_mode;
+ g_ble_phy_data.phy_rx_phy_mode = rx_phy_mode;
+}
+
+int
+ble_phy_get_cur_phy(void)
+{
+#if (BLE_LL_BT5_PHY_SUPPORTED == 1)
+ switch (g_ble_phy_data.phy_cur_phy_mode) {
+ case BLE_PHY_MODE_1M:
+ return BLE_PHY_1M;
+ case BLE_PHY_MODE_2M:
+ return BLE_PHY_2M;
+ case BLE_PHY_MODE_CODED_125KBPS:
+ case BLE_PHY_MODE_CODED_500KBPS:
+ return BLE_PHY_CODED;
+ default:
+ assert(0);
+ return -1;
+ }
+#else
+ return BLE_PHY_1M;
+#endif
+}
+
+void
+ble_phy_rxpdu_copy(uint8_t *dptr, struct os_mbuf *rxpdu)
+{
+ uint32_t rem_len;
+ uint32_t copy_len;
+ uint32_t block_len;
+ uint32_t block_rem_len;
+ void *dst;
+ void *src;
+ struct os_mbuf * om;
+
+ /* Better be aligned */
+ assert(((uint32_t)dptr & 3) == 0);
+
+ block_len = rxpdu->om_omp->omp_databuf_len;
+ rem_len = OS_MBUF_PKTHDR(rxpdu)->omp_len;
+ src = dptr;
+
+ /*
+ * Setup for copying from first mbuf which is shorter due to packet header
+ * and extra leading space
+ */
+ copy_len = block_len - rxpdu->om_pkthdr_len - 4;
+ om = rxpdu;
+ dst = om->om_data;
+
+ while (true) {
+ /*
+ * Always copy blocks of length aligned to word size, only last mbuf
+ * will have remaining non-word size bytes appended.
+ */
+ block_rem_len = copy_len;
+ copy_len = min(copy_len, rem_len);
+ copy_len &= ~3;
+
+ dst = om->om_data;
+ om->om_len = copy_len;
+ rem_len -= copy_len;
+ block_rem_len -= copy_len;
+
+ __asm__ volatile (".syntax unified \n"
+ " mov r4, %[len] \n"
+ " b 2f \n"
+ "1: ldr r3, [%[src], %[len]] \n"
+ " str r3, [%[dst], %[len]] \n"
+ "2: subs %[len], #4 \n"
+ " bpl 1b \n"
+ " adds %[src], %[src], r4 \n"
+ " adds %[dst], %[dst], r4 \n"
+ : [dst] "+r" (dst), [src] "+r" (src),
+ [len] "+r" (copy_len)
+ :
+ : "r3", "r4", "memory"
+ );
+
+ if ((rem_len < 4) && (block_rem_len >= rem_len)) {
+ break;
+ }
+
+ /* Move to next mbuf */
+ om = SLIST_NEXT(om, om_next);
+ copy_len = block_len;
+ }
+
+ /* Copy remaining bytes, if any, to last mbuf */
+ om->om_len += rem_len;
+ __asm__ volatile (".syntax unified \n"
+ " b 2f \n"
+ "1: ldrb r3, [%[src], %[len]] \n"
+ " strb r3, [%[dst], %[len]] \n"
+ "2: subs %[len], #1 \n"
+ " bpl 1b \n"
+ : [len] "+r" (rem_len)
+ : [dst] "r" (dst), [src] "r" (src)
+ : "r3", "memory"
+ );
+
+ /* Copy header */
+ memcpy(BLE_MBUF_HDR_PTR(rxpdu), &g_ble_phy_data.rxhdr,
+ sizeof(struct ble_mbuf_hdr));
+}
+
+/**
+ * Called when we want to wait if the radio is in either the rx or tx
+ * disable states. We want to wait until that state is over before doing
+ * anything to the radio
+ */
+static void
+nrf_wait_disabled(void)
+{
+ uint32_t state;
+
+ state = NRF_RADIO_NS->STATE;
+ if (state != RADIO_STATE_STATE_Disabled) {
+ if ((state == RADIO_STATE_STATE_RxDisable) ||
+ (state == RADIO_STATE_STATE_TxDisable)) {
+ /* This will end within a short time (6 usecs). Just poll */
+ while (NRF_RADIO_NS->STATE == state) {
+ /* If this fails, something is really wrong. Should last
+ * no more than 6 usecs
+ */
+ }
+ }
+ }
+}
+
+static int
+ble_phy_set_start_time(uint32_t cputime, uint8_t rem_usecs, bool tx)
+{
+ uint32_t next_cc;
+ uint32_t cur_cc;
+ uint32_t cntr;
+ uint32_t delta;
+
+ /*
+ * We need to adjust start time to include radio ramp-up and TX pipeline
+ * delay (the latter only if applicable, so only for TX).
+ *
+ * Radio ramp-up time is 40 usecs and TX delay is 3 or 5 usecs depending on
+ * phy, thus we'll offset RTC by 2 full ticks (61 usecs) and then compensate
+ * using TIMER0 with 1 usec precision.
+ */
+
+ cputime -= 2;
+ rem_usecs += 61;
+ if (tx) {
+ rem_usecs -= BLE_PHY_T_TXENFAST;
+ rem_usecs -= g_ble_phy_t_txdelay[g_ble_phy_data.phy_cur_phy_mode];
+ } else {
+ rem_usecs -= BLE_PHY_T_RXENFAST;
+ }
+
+ /*
+ * rem_usecs will be no more than 2 ticks, but if it is more than single
+ * tick then we should better count one more low-power tick rather than
+ * 30 high-power usecs. Also make sure we don't set TIMER0 CC to 0 as the
+ * compare won't occur.
+ */
+
+ if (rem_usecs > 30) {
+ cputime++;
+ rem_usecs -= 30;
+ }
+
+ /*
+ * Can we set the RTC compare to start TIMER0? We can do it if:
+ * a) Current compare value is not N+1 or N+2 ticks from current
+ * counter.
+ * b) The value we want to set is not at least N+2 from current
+ * counter.
+ *
+ * NOTE: since the counter can tick 1 while we do these calculations we
+ * need to account for it.
+ */
+ next_cc = cputime & 0xffffff;
+ cur_cc = NRF_RTC0_NS->CC[0];
+ cntr = NRF_RTC0_NS->COUNTER;
+
+ delta = (cur_cc - cntr) & 0xffffff;
+ if ((delta <= 3) && (delta != 0)) {
+ return -1;
+ }
+ delta = (next_cc - cntr) & 0xffffff;
+ if ((delta & 0x800000) || (delta < 3)) {
+ return -1;
+ }
+
+ /* Clear and set TIMER0 to fire off at proper time */
+ NRF_TIMER0_NS->TASKS_CLEAR = 1;
+ NRF_TIMER0_NS->CC[0] = rem_usecs;
+ NRF_TIMER0_NS->EVENTS_COMPARE[0] = 0;
+
+ /* Set RTC compare to start TIMER0 */
+ NRF_RTC0_NS->EVENTS_COMPARE[0] = 0;
+ NRF_RTC0_NS->CC[0] = next_cc;
+ NRF_RTC0_NS->EVTENSET = RTC_EVTENSET_COMPARE0_Msk;
+
+ /* Enable PPI */
+ NRF_TIMER0_NS->SUBSCRIBE_START = DPPI_SUBSCRIBE_TIMER0_TASKS_START(1);
+
+ /* Store the cputime at which we set the RTC */
+ g_ble_phy_data.phy_start_cputime = cputime;
+
+ return 0;
+}
+
+static int
+ble_phy_set_start_now(void)
+{
+ os_sr_t sr;
+ uint32_t now;
+
+ OS_ENTER_CRITICAL(sr);
+
+ /*
+ * Set TIMER0 to fire immediately. We can't set CC to 0 as compare will not
+ * occur in such case.
+ */
+ NRF_TIMER0_NS->TASKS_CLEAR = 1;
+ NRF_TIMER0_NS->CC[0] = 1;
+ NRF_TIMER0_NS->EVENTS_COMPARE[0] = 0;
+
+ /*
+ * Set RTC compare to start TIMER0. We need to set it to at least N+2 ticks
+ * from current value to guarantee triggering compare event, but let's set
+ * it to N+3 to account for possible extra tick on RTC0 during these
+ * operations.
+ */
+ now = os_cputime_get32();
+ NRF_RTC0_NS->EVENTS_COMPARE[0] = 0;
+ NRF_RTC0_NS->CC[0] = now + 3;
+ NRF_RTC0_NS->EVTENSET = RTC_EVTENSET_COMPARE0_Msk;
+
+ /* Enable PPI */
+ NRF_TIMER0_NS->SUBSCRIBE_START = DPPI_SUBSCRIBE_TIMER0_TASKS_START(1);
+
+ /*
+ * Store the cputime at which we set the RTC
+ *
+ * XXX Compare event may be triggered on previous CC value (if it was set to
+ * less than N+2) so in rare cases actual start time may be 2 ticks earlier
+ * than what we expect. Since this is only used on RX, it may cause AUX scan
+ * to be scheduled 1 or 2 ticks too late so we'll miss it - it's acceptable
+ * for now.
+ */
+ g_ble_phy_data.phy_start_cputime = now + 3;
+
+ OS_EXIT_CRITICAL(sr);
+
+ return 0;
+}
+
+void
+ble_phy_wfr_enable(int txrx, uint8_t tx_phy_mode, uint32_t wfr_usecs)
+{
+ uint32_t end_time;
+ uint8_t phy;
+
+ phy = g_ble_phy_data.phy_cur_phy_mode;
+
+ if (txrx == BLE_PHY_WFR_ENABLE_TXRX) {
+ /* RX shall start exactly T_IFS after TX end captured in CC[2] */
+ end_time = NRF_TIMER0_NS->CC[2] + BLE_LL_IFS;
+ /* Adjust for delay between EVENT_END and actual TX end time */
+ end_time += g_ble_phy_t_txenddelay[tx_phy_mode];
+ /* Wait a bit longer due to allowed active clock accuracy */
+ end_time += 2;
+ /*
+ * It's possible that we'll capture PDU start time at the end of timer
+ * cycle and since wfr expires at the beginning of calculated timer
+ * cycle it can be almost 1 usec too early. Let's compensate for this
+ * by waiting 1 usec more.
+ */
+ end_time += 1;
+ } else {
+ /*
+ * RX shall start no later than wfr_usecs after RX enabled.
+ * CC[0] is the time of RXEN so adjust for radio ram-up.
+ * Do not add jitter since this is already covered by LL.
+ */
+ end_time = NRF_TIMER0_NS->CC[0] + BLE_PHY_T_RXENFAST + wfr_usecs;
+ }
+
+ /*
+ * Note: on LE Coded EVENT_ADDRESS is fired after TERM1 is received, so
+ * we are actually calculating relative to start of packet payload
+ * which is fine.
+ */
+
+ /* Adjust for receiving access address since this triggers EVENT_ADDRESS */
+ end_time += ble_phy_mode_pdu_start_off(phy);
+ /* Adjust for delay between actual access address RX and EVENT_ADDRESS */
+ end_time += g_ble_phy_t_rxaddrdelay[phy];
+
+ /* wfr_secs is the time from rxen until timeout */
+ NRF_TIMER0_NS->CC[3] = end_time;
+ NRF_TIMER0_NS->EVENTS_COMPARE[3] = 0;
+
+ /* Subscribe for wait for response events */
+ NRF_TIMER0_NS->SUBSCRIBE_CAPTURE[3] = DPPI_SUBSCRIBE_TIMER0_TASKS_CAPTURE3(1);
+ NRF_RADIO_NS->SUBSCRIBE_DISABLE = DPPI_SUBSCRIBE_RADIO_TASKS_DISABLE(1);
+
+ /* Enable the disabled interrupt so we time out on events compare */
+ NRF_RADIO_NS->INTENSET = RADIO_INTENSET_DISABLED_Msk;
+
+ /*
+ * It may happen that if CPU is halted for a brief moment (e.g. during flash
+ * erase or write), TIMER0 already counted past CC[3] and thus wfr will not
+ * fire as expected. In case this happened, let's just disable PPIs for wfr
+ * and trigger wfr manually (i.e. disable radio).
+ *
+ * Note that the same applies to RX start time set in CC[0] but since it
+ * should fire earlier than wfr, fixing wfr is enough.
+ *
+ * CC[1] is only used as a reference on RX start, we do not need it here so
+ * it can be used to read TIMER0 counter.
+ */
+ NRF_TIMER0_NS->TASKS_CAPTURE[1] = 1;
+ if (NRF_TIMER0_NS->CC[1] > NRF_TIMER0_NS->CC[3]) {
+ /* Unsubscribe from wfr events */
+ NRF_TIMER0_NS->SUBSCRIBE_CAPTURE[3] = DPPI_SUBSCRIBE_TIMER0_TASKS_CAPTURE3(0);
+ NRF_RADIO_NS->SUBSCRIBE_DISABLE = DPPI_SUBSCRIBE_RADIO_TASKS_DISABLE(0);
+
+ NRF_RADIO_NS->TASKS_DISABLE = 1;
+ }
+}
+
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_ENCRYPTION)
+static uint32_t
+ble_phy_get_ccm_datarate(void)
+{
+#if BLE_LL_BT5_PHY_SUPPORTED
+ switch (g_ble_phy_data.phy_cur_phy_mode) {
+ case BLE_PHY_MODE_1M:
+ return CCM_MODE_DATARATE_1Mbit << CCM_MODE_DATARATE_Pos;
+ case BLE_PHY_MODE_2M:
+ return CCM_MODE_DATARATE_2Mbit << CCM_MODE_DATARATE_Pos;
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_CODED_PHY)
+ case BLE_PHY_MODE_CODED_125KBPS:
+ return CCM_MODE_DATARATE_125Kbps << CCM_MODE_DATARATE_Pos;
+ case BLE_PHY_MODE_CODED_500KBPS:
+ return CCM_MODE_DATARATE_500Kbps << CCM_MODE_DATARATE_Pos;
+#endif
+ }
+
+ assert(0);
+ return 0;
+#else
+ return CCM_MODE_DATARATE_1Mbit << CCM_MODE_DATARATE_Pos;
+#endif
+}
+#endif
+
+/**
+ * Setup transceiver for receive.
+ */
+static void
+ble_phy_rx_xcvr_setup(void)
+{
+ uint8_t *dptr;
+
+ dptr = (uint8_t *)&g_ble_phy_rx_buf[0];
+ dptr += 3;
+
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_ENCRYPTION)
+ if (g_ble_phy_data.phy_encrypted) {
+ NRF_RADIO_NS->PACKETPTR = (uint32_t)&g_ble_phy_enc_buf[0];
+ NRF_CCM_NS->INPTR = (uint32_t)&g_ble_phy_enc_buf[0];
+ NRF_CCM_NS->OUTPTR = (uint32_t)dptr;
+ NRF_CCM_NS->SCRATCHPTR = (uint32_t)&nrf_encrypt_scratchpad[0];
+ NRF_CCM_NS->MODE = CCM_MODE_LENGTH_Msk | CCM_MODE_MODE_Decryption |
+ ble_phy_get_ccm_datarate();
+ NRF_CCM_NS->CNFPTR = (uint32_t)&nrf_ccm_data;
+ NRF_CCM_NS->SHORTS = 0;
+ NRF_CCM_NS->EVENTS_ERROR = 0;
+ NRF_CCM_NS->EVENTS_ENDCRYPT = 0;
+ NRF_CCM_NS->TASKS_KSGEN = 1;
+
+ /* Subscribe to radio address event */
+ NRF_CCM_NS->SUBSCRIBE_CRYPT = DPPI_SUBSCRIBE_CCM_TASKS_CRYPT(1);
+ } else {
+ NRF_RADIO_NS->PACKETPTR = (uint32_t)dptr;
+ }
+#else
+ NRF_RADIO_NS->PACKETPTR = (uint32_t)dptr;
+#endif
+
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_PRIVACY)
+ if (g_ble_phy_data.phy_privacy) {
+ NRF_AAR_NS->ENABLE = AAR_ENABLE_ENABLE_Enabled;
+ NRF_AAR_NS->IRKPTR = (uint32_t)&g_nrf_irk_list[0];
+ NRF_AAR_NS->SCRATCHPTR = (uint32_t)&g_ble_phy_data.phy_aar_scratch;
+ NRF_AAR_NS->EVENTS_END = 0;
+ NRF_AAR_NS->EVENTS_RESOLVED = 0;
+ NRF_AAR_NS->EVENTS_NOTRESOLVED = 0;
+ } else {
+ if (g_ble_phy_data.phy_encrypted == 0) {
+ NRF_AAR_NS->ENABLE = AAR_ENABLE_ENABLE_Disabled;
+ }
+ }
+#endif
+
+ /* Turn off trigger TXEN on output compare match and AAR on bcmatch */
+ NRF_RADIO_NS->SUBSCRIBE_TXEN = DPPI_SUBSCRIBE_RADIO_TASKS_TXEN(0);
+ NRF_AAR_NS->SUBSCRIBE_START = DPPI_SUBSCRIBE_AAR_TASKS_START(0);
+
+ /* Reset the rx started flag. Used for the wait for response */
+ g_ble_phy_data.phy_rx_started = 0;
+ g_ble_phy_data.phy_state = BLE_PHY_STATE_RX;
+
+#if BLE_LL_BT5_PHY_SUPPORTED
+ /*
+ * On Coded PHY there are CI and TERM1 fields before PDU starts so we need
+ * to take this into account when setting up BCC.
+ */
+ if (g_ble_phy_data.phy_cur_phy_mode == BLE_PHY_MODE_CODED_125KBPS ||
+ g_ble_phy_data.phy_cur_phy_mode == BLE_PHY_MODE_CODED_500KBPS) {
+ g_ble_phy_data.phy_bcc_offset = 5;
+ } else {
+ g_ble_phy_data.phy_bcc_offset = 0;
+ }
+#else
+ g_ble_phy_data.phy_bcc_offset = 0;
+#endif
+
+ /* I want to know when 1st byte received (after address) */
+ NRF_RADIO_NS->BCC = 8 + g_ble_phy_data.phy_bcc_offset; /* in bits */
+ NRF_RADIO_NS->EVENTS_ADDRESS = 0;
+ NRF_RADIO_NS->EVENTS_DEVMATCH = 0;
+ NRF_RADIO_NS->EVENTS_BCMATCH = 0;
+ NRF_RADIO_NS->EVENTS_RSSIEND = 0;
+ NRF_RADIO_NS->EVENTS_CRCOK = 0;
+ NRF_RADIO_NS->SHORTS = RADIO_SHORTS_END_DISABLE_Msk |
+ RADIO_SHORTS_READY_START_Msk |
+ RADIO_SHORTS_ADDRESS_BCSTART_Msk |
+ RADIO_SHORTS_ADDRESS_RSSISTART_Msk |
+ RADIO_SHORTS_DISABLED_RSSISTOP_Msk;
+
+ NRF_RADIO_NS->INTENSET = RADIO_INTENSET_ADDRESS_Msk;
+}
+
+/**
+ * Called from interrupt context when the transmit ends
+ *
+ */
+static void
+ble_phy_tx_end_isr(void)
+{
+ uint8_t tx_phy_mode;
+ uint8_t was_encrypted;
+ uint8_t transition;
+ uint32_t rx_time;
+ uint32_t wfr_time;
+
+ /* Store PHY on which we've just transmitted smth */
+ tx_phy_mode = g_ble_phy_data.phy_cur_phy_mode;
+
+ /* If this transmission was encrypted we need to remember it */
+ was_encrypted = g_ble_phy_data.phy_encrypted;
+ (void)was_encrypted;
+
+ /* Better be in TX state! */
+ assert(g_ble_phy_data.phy_state == BLE_PHY_STATE_TX);
+
+ /* Clear events and clear interrupt on disabled event */
+ NRF_RADIO_NS->EVENTS_DISABLED = 0;
+ NRF_RADIO_NS->INTENCLR = RADIO_INTENCLR_DISABLED_Msk;
+ NRF_RADIO_NS->EVENTS_END = 0;
+ wfr_time = NRF_RADIO_NS->SHORTS;
+ (void)wfr_time;
+
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_ENCRYPTION)
+ /*
+ * XXX: not sure what to do. We had a HW error during transmission.
+ * For now I just count a stat but continue on like all is good.
+ */
+ if (was_encrypted) {
+ if (NRF_CCM_NS->EVENTS_ERROR) {
+ STATS_INC(ble_phy_stats, tx_hw_err);
+ NRF_CCM_NS->EVENTS_ERROR = 0;
+ }
+ }
+#endif
+
+ /* Call transmit end callback */
+ if (g_ble_phy_data.txend_cb) {
+ g_ble_phy_data.txend_cb(g_ble_phy_data.txend_arg);
+ }
+
+ transition = g_ble_phy_data.phy_transition;
+ if (transition == BLE_PHY_TRANSITION_TX_RX) {
+
+#if (BLE_LL_BT5_PHY_SUPPORTED == 1)
+ ble_phy_mode_apply(g_ble_phy_data.phy_rx_phy_mode);
+#endif
+
+ /* Packet pointer needs to be reset. */
+ ble_phy_rx_xcvr_setup();
+
+ ble_phy_wfr_enable(BLE_PHY_WFR_ENABLE_TXRX, tx_phy_mode, 0);
+
+ /* Schedule RX exactly T_IFS after TX end captured in CC[2] */
+ rx_time = NRF_TIMER0_NS->CC[2] + BLE_LL_IFS;
+ /* Adjust for delay between EVENT_END and actual TX end time */
+ rx_time += g_ble_phy_t_txenddelay[tx_phy_mode];
+ /* Adjust for radio ramp-up */
+ rx_time -= BLE_PHY_T_RXENFAST;
+ /* Start listening a bit earlier due to allowed active clock accuracy */
+ rx_time -= 2;
+
+ NRF_TIMER0_NS->CC[0] = rx_time;
+ NRF_TIMER0_NS->EVENTS_COMPARE[0] = 0;
+
+ /* Start radio on timer */
+ NRF_RADIO_NS->SUBSCRIBE_RXEN = DPPI_SUBSCRIBE_RADIO_TASKS_RXEN(1);
+
+ } else {
+ NRF_TIMER0_NS->TASKS_STOP = 1;
+ NRF_TIMER0_NS->TASKS_SHUTDOWN = 1;
+
+ NRF_TIMER0_NS->SUBSCRIBE_CAPTURE[3] = DPPI_SUBSCRIBE_TIMER0_TASKS_CAPTURE3(0);
+ NRF_RADIO_NS->SUBSCRIBE_DISABLE = DPPI_SUBSCRIBE_RADIO_TASKS_DISABLE(0);
+ NRF_RADIO_NS->SUBSCRIBE_TXEN = DPPI_SUBSCRIBE_RADIO_TASKS_TXEN(0);
+ NRF_TIMER0_NS->SUBSCRIBE_START = DPPI_SUBSCRIBE_TIMER0_TASKS_START(0);
+
+ assert(transition == BLE_PHY_TRANSITION_NONE);
+ }
+}
+
+static inline uint8_t
+ble_phy_get_cur_rx_phy_mode(void)
+{
+ uint8_t phy;
+
+ phy = g_ble_phy_data.phy_cur_phy_mode;
+
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_CODED_PHY)
+ /*
+ * For Coded PHY mode can be set to either codings since actual coding is
+ * set in packet header. However, here we need actual coding of received
+ * packet as this determines pipeline delays so need to figure this out
+ * using CI field.
+ */
+ if ((phy == BLE_PHY_MODE_CODED_125KBPS) ||
+ (phy == BLE_PHY_MODE_CODED_500KBPS)) {
+ phy = NRF_RADIO_NS->PDUSTAT & RADIO_PDUSTAT_CISTAT_Msk ?
+ BLE_PHY_MODE_CODED_500KBPS : BLE_PHY_MODE_CODED_125KBPS;
+ }
+#endif
+
+ return phy;
+}
+
+static void
+ble_phy_rx_end_isr(void)
+{
+ int rc;
+ uint8_t *dptr;
+ uint8_t crcok;
+ uint32_t tx_time;
+ struct ble_mbuf_hdr *ble_hdr;
+
+ /* Clear events and clear interrupt */
+ NRF_RADIO_NS->EVENTS_END = 0;
+ NRF_RADIO_NS->INTENCLR = RADIO_INTENCLR_END_Msk;
+
+ /* Disable automatic RXEN */
+ NRF_RADIO_NS->SUBSCRIBE_RXEN = DPPI_SUBSCRIBE_RADIO_TASKS_RXEN(0);
+
+ /* Set RSSI and CRC status flag in header */
+ ble_hdr = &g_ble_phy_data.rxhdr;
+ assert(NRF_RADIO_NS->EVENTS_RSSIEND != 0);
+ ble_hdr->rxinfo.rssi = (-1 * NRF_RADIO_NS->RSSISAMPLE) +
+ g_ble_phy_data.rx_pwr_compensation;
+
+ dptr = (uint8_t *)&g_ble_phy_rx_buf[0];
+ dptr += 3;
+
+ /* Count PHY crc errors and valid packets */
+ crcok = NRF_RADIO_NS->EVENTS_CRCOK;
+ if (!crcok) {
+ STATS_INC(ble_phy_stats, rx_crc_err);
+ } else {
+ STATS_INC(ble_phy_stats, rx_valid);
+ ble_hdr->rxinfo.flags |= BLE_MBUF_HDR_F_CRC_OK;
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_ENCRYPTION)
+ if (g_ble_phy_data.phy_encrypted) {
+ /* Only set MIC failure flag if frame is not zero length */
+ if ((dptr[1] != 0) && (NRF_CCM_NS->MICSTATUS == 0)) {
+ ble_hdr->rxinfo.flags |= BLE_MBUF_HDR_F_MIC_FAILURE;
+ }
+
+ /*
+ * XXX: not sure how to deal with this. This should not
+ * be a MIC failure but we should not hand it up. I guess
+ * this is just some form of rx error and that is how we
+ * handle it? For now, just set CRC error flags
+ */
+ if (NRF_CCM_NS->EVENTS_ERROR) {
+ STATS_INC(ble_phy_stats, rx_hw_err);
+ ble_hdr->rxinfo.flags &= ~BLE_MBUF_HDR_F_CRC_OK;
+ }
+
+ /*
+ * XXX: This is a total hack work-around for now but I dont
+ * know what else to do. If ENDCRYPT is not set and we are
+ * encrypted we need to not trust this frame and drop it.
+ */
+ if (NRF_CCM_NS->EVENTS_ENDCRYPT == 0) {
+ STATS_INC(ble_phy_stats, rx_hw_err);
+ ble_hdr->rxinfo.flags &= ~BLE_MBUF_HDR_F_CRC_OK;
+ }
+ }
+#endif
+ }
+
+#if (BLE_LL_BT5_PHY_SUPPORTED == 1)
+ ble_phy_mode_apply(g_ble_phy_data.phy_tx_phy_mode);
+#endif
+
+ /*
+ * Let's schedule TX now and we will just cancel it after processing RXed
+ * packet if we don't need TX.
+ *
+ * We need this to initiate connection in case AUX_CONNECT_REQ was sent on
+ * LE Coded S8. In this case the time we process RXed packet is roughly the
+ * same as the limit when we need to have TX scheduled (i.e. TIMER0 and PPI
+ * armed) so we may simply miss the slot and set the timer in the past.
+ *
+ * When TX is scheduled in advance, we may event process packet a bit longer
+ * during radio ramp-up - this gives us extra 40 usecs which is more than
+ * enough.
+ */
+
+ /* Schedule TX exactly T_IFS after RX end captured in CC[2] */
+ tx_time = NRF_TIMER0_NS->CC[2] + BLE_LL_IFS;
+ /* Adjust for delay between actual RX end time and EVENT_END */
+ tx_time -= g_ble_phy_t_rxenddelay[ble_hdr->rxinfo.phy_mode];
+ /* Adjust for radio ramp-up */
+ tx_time -= BLE_PHY_T_TXENFAST;
+ /* Adjust for delay between EVENT_READY and actual TX start time */
+ tx_time -= g_ble_phy_t_txdelay[g_ble_phy_data.phy_cur_phy_mode];
+
+ NRF_TIMER0_NS->CC[0] = tx_time;
+ NRF_TIMER0_NS->EVENTS_COMPARE[0] = 0;
+
+ /* Enable automatic TX */
+ NRF_RADIO_NS->SUBSCRIBE_TXEN = DPPI_SUBSCRIBE_RADIO_TASKS_TXEN(1);
+
+ /*
+ * XXX: Hack warning!
+ *
+ * It may happen (during flash erase) that CPU is stopped for a moment and
+ * TIMER0 already counted past CC[0]. In such case we will be stuck waiting
+ * for TX to start since EVENTS_COMPARE[0] will not happen any time soon.
+ * For now let's set a flag denoting that we are late in RX-TX transition so
+ * ble_phy_tx() will fail - this allows everything to cleanup nicely without
+ * the need for extra handling in many places.
+ *
+ * Note: CC[3] is used only for wfr which we do not need here.
+ */
+ NRF_TIMER0_NS->TASKS_CAPTURE[3] = 1;
+ if (NRF_TIMER0_NS->CC[3] > NRF_TIMER0_NS->CC[0]) {
+ NRF_RADIO_NS->SUBSCRIBE_TXEN = DPPI_SUBSCRIBE_RADIO_TASKS_TXEN(0);
+
+ g_ble_phy_data.phy_transition_late = 1;
+ }
+
+ /*
+ * XXX: This is a horrible ugly hack to deal with the RAM S1 byte
+ * that is not sent over the air but is present here. Simply move the
+ * data pointer to deal with it. Fix this later.
+ */
+ dptr[2] = dptr[1];
+ dptr[1] = dptr[0];
+ rc = ble_ll_rx_end(dptr + 1, ble_hdr);
+ if (rc < 0) {
+ ble_phy_disable();
+ }
+}
+
+static bool
+ble_phy_rx_start_isr(void)
+{
+ int rc;
+ uint32_t state;
+ uint32_t usecs;
+ uint32_t pdu_usecs;
+ uint32_t ticks;
+ struct ble_mbuf_hdr *ble_hdr;
+ uint8_t *dptr;
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_PRIVACY)
+ int adva_offset;
+#endif
+
+ dptr = (uint8_t *)&g_ble_phy_rx_buf[0];
+
+ /* Clear events and clear interrupt */
+ NRF_RADIO_NS->EVENTS_ADDRESS = 0;
+
+ /* Clear wfr timer channels and DISABLED interrupt */
+ NRF_RADIO_NS->INTENCLR = RADIO_INTENCLR_DISABLED_Msk | RADIO_INTENCLR_ADDRESS_Msk;
+ NRF_TIMER0_NS->SUBSCRIBE_CAPTURE[3] = DPPI_SUBSCRIBE_TIMER0_TASKS_CAPTURE3(0);
+ NRF_RADIO_NS->SUBSCRIBE_DISABLE = DPPI_SUBSCRIBE_RADIO_TASKS_DISABLE(0);
+
+ /* Initialize the ble mbuf header */
+ ble_hdr = &g_ble_phy_data.rxhdr;
+ ble_hdr->rxinfo.flags = ble_ll_state_get();
+ ble_hdr->rxinfo.channel = g_ble_phy_data.phy_chan;
+ ble_hdr->rxinfo.handle = 0;
+ ble_hdr->rxinfo.phy = ble_phy_get_cur_phy();
+ ble_hdr->rxinfo.phy_mode = ble_phy_get_cur_rx_phy_mode();
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_EXT_ADV)
+ ble_hdr->rxinfo.user_data = NULL;
+#endif
+
+ /*
+ * Calculate accurate packets start time (with remainder)
+ *
+ * We may start receiving packet somewhere during preamble in which case
+ * it is possible that actual transmission started before TIMER0 was
+ * running - need to take this into account.
+ */
+ ble_hdr->beg_cputime = g_ble_phy_data.phy_start_cputime;
+
+ usecs = NRF_TIMER0_NS->CC[1];
+ pdu_usecs = ble_phy_mode_pdu_start_off(ble_hdr->rxinfo.phy_mode) +
+ g_ble_phy_t_rxaddrdelay[ble_hdr->rxinfo.phy_mode];
+ if (usecs < pdu_usecs) {
+ g_ble_phy_data.phy_start_cputime--;
+ usecs += 30;
+ }
+ usecs -= pdu_usecs;
+
+ ticks = os_cputime_usecs_to_ticks(usecs);
+ usecs -= os_cputime_ticks_to_usecs(ticks);
+ if (usecs == 31) {
+ usecs = 0;
+ ++ticks;
+ }
+
+ ble_hdr->beg_cputime += ticks;
+ ble_hdr->rem_usecs = usecs;
+
+ /* Wait to get 1st byte of frame */
+ while (1) {
+ state = NRF_RADIO_NS->STATE;
+ if (NRF_RADIO_NS->EVENTS_BCMATCH != 0) {
+ break;
+ }
+
+ /*
+ * If state is disabled, we should have the BCMATCH. If not,
+ * something is wrong!
+ */
+ if (state == RADIO_STATE_STATE_Disabled) {
+ NRF_RADIO_NS->INTENCLR = NRF_RADIO_IRQ_MASK_ALL;
+ NRF_RADIO_NS->SHORTS = 0;
+ return false;
+ }
+ }
+
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_PRIVACY)
+ /*
+ * If privacy is enabled and received PDU has TxAdd bit set (i.e. random
+ * address) we try to resolve address using AAR.
+ */
+ if (g_ble_phy_data.phy_privacy && (dptr[3] & 0x40)) {
+ /*
+ * AdvA is located at 4th octet in RX buffer (after S0, length an S1
+ * fields). In case of extended advertising PDU we need to add 2 more
+ * octets for extended header.
+ */
+ adva_offset = (dptr[3] & 0x0f) == 0x07 ? 2 : 0;
+ NRF_AAR_NS->ADDRPTR = (uint32_t)(dptr + 3 + adva_offset);
+
+ /* Trigger AAR after last bit of AdvA is received */
+ NRF_RADIO_NS->EVENTS_BCMATCH = 0;
+ NRF_AAR_NS->SUBSCRIBE_START = DPPI_SUBSCRIBE_AAR_TASKS_START(1);
+ NRF_RADIO_NS->BCC = (BLE_LL_PDU_HDR_LEN + adva_offset + BLE_DEV_ADDR_LEN) * 8 +
+ g_ble_phy_data.phy_bcc_offset;
+ }
+#endif
+
+ /* Call Link Layer receive start function */
+ rc = ble_ll_rx_start(dptr + 3,
+ g_ble_phy_data.phy_chan,
+ &g_ble_phy_data.rxhdr);
+ if (rc >= 0) {
+ /* Set rx started flag and enable rx end ISR */
+ g_ble_phy_data.phy_rx_started = 1;
+ NRF_RADIO_NS->INTENSET = RADIO_INTENSET_END_Msk;
+ } else {
+ /* Disable PHY */
+ ble_phy_disable();
+ STATS_INC(ble_phy_stats, rx_aborts);
+ }
+
+ /* Count rx starts */
+ STATS_INC(ble_phy_stats, rx_starts);
+
+ return true;
+}
+
+static void
+ble_phy_isr(void)
+{
+ uint32_t irq_en;
+
+ os_trace_isr_enter();
+
+ /* Read irq register to determine which interrupts are enabled */
+ irq_en = NRF_RADIO_NS->INTENCLR;
+
+ /*
+ * NOTE: order of checking is important! Possible, if things get delayed,
+ * we have both an ADDRESS and DISABLED interrupt in rx state. If we get
+ * an address, we disable the DISABLED interrupt.
+ */
+
+ /* We get this if we have started to receive a frame */
+ if ((irq_en & RADIO_INTENCLR_ADDRESS_Msk) && NRF_RADIO_NS->EVENTS_ADDRESS) {
+ /*
+ * wfr timer is calculated to expire at the exact time we should start
+ * receiving a packet (with 1 usec precision) so it is possible it will
+ * fire at the same time as EVENT_ADDRESS. If this happens, radio will
+ * be disabled while we are waiting for EVENT_BCCMATCH after 1st byte
+ * of payload is received and ble_phy_rx_start_isr() will fail. In this
+ * case we should not clear DISABLED irq mask so it will be handled as
+ * regular radio disabled event below. In other case radio was disabled
+ * on purpose and there's nothing more to handle so we can clear mask.
+ */
+ if (ble_phy_rx_start_isr()) {
+ irq_en &= ~RADIO_INTENCLR_DISABLED_Msk;
+ }
+ }
+
+ /* Check for disabled event. This only happens for transmits now */
+ if ((irq_en & RADIO_INTENCLR_DISABLED_Msk) && NRF_RADIO_NS->EVENTS_DISABLED) {
+ if (g_ble_phy_data.phy_state == BLE_PHY_STATE_RX) {
+ NRF_RADIO_NS->EVENTS_DISABLED = 0;
+ ble_ll_wfr_timer_exp(NULL);
+ } else if (g_ble_phy_data.phy_state == BLE_PHY_STATE_IDLE) {
+ assert(0);
+ } else {
+ ble_phy_tx_end_isr();
+ }
+ }
+
+ /* Receive packet end (we dont enable this for transmit) */
+ if ((irq_en & RADIO_INTENCLR_END_Msk) && NRF_RADIO_NS->EVENTS_END) {
+ ble_phy_rx_end_isr();
+ }
+
+ g_ble_phy_data.phy_transition_late = 0;
+
+ /* Ensures IRQ is cleared */
+ irq_en = NRF_RADIO_NS->SHORTS;
+
+ /* Count # of interrupts */
+ STATS_INC(ble_phy_stats, phy_isrs);
+
+ os_trace_isr_exit();
+}
+
+int
+ble_phy_init(void)
+{
+ int rc;
+
+ /* Default phy to use is 1M */
+ g_ble_phy_data.phy_cur_phy_mode = BLE_PHY_MODE_1M;
+ g_ble_phy_data.phy_tx_phy_mode = BLE_PHY_MODE_1M;
+ g_ble_phy_data.phy_rx_phy_mode = BLE_PHY_MODE_1M;
+
+ g_ble_phy_data.rx_pwr_compensation = 0;
+
+ /* Set phy channel to an invalid channel so first set channel works */
+ g_ble_phy_data.phy_chan = BLE_PHY_NUM_CHANS;
+
+ /* Toggle peripheral power to reset (just in case) */
+ NRF_RADIO_NS->POWER = 0;
+ NRF_RADIO_NS->POWER = 1;
+
+ /* Errata 16 - RADIO: POWER register is not functional
+ * Workaround: Reset all RADIO registers in firmware.
+ */
+ NRF_RADIO_NS->SUBSCRIBE_TXEN = 0;
+ NRF_RADIO_NS->SUBSCRIBE_RXEN = 0;
+ NRF_RADIO_NS->SUBSCRIBE_DISABLE = 0;
+
+ /* Disable all interrupts */
+ NRF_RADIO_NS->INTENCLR = NRF_RADIO_IRQ_MASK_ALL;
+
+ /* Set configuration registers */
+ NRF_RADIO_NS->MODE = RADIO_MODE_MODE_Ble_1Mbit;
+ NRF_RADIO_NS->PCNF0 = NRF_PCNF0;
+
+ /* XXX: should maxlen be 251 for encryption? */
+ NRF_RADIO_NS->PCNF1 = NRF_MAXLEN |
+ (RADIO_PCNF1_ENDIAN_Little << RADIO_PCNF1_ENDIAN_Pos) |
+ (NRF_BALEN << RADIO_PCNF1_BALEN_Pos) |
+ RADIO_PCNF1_WHITEEN_Msk;
+
+ /* Enable radio fast ramp-up */
+ NRF_RADIO_NS->MODECNF0 |= (RADIO_MODECNF0_RU_Fast << RADIO_MODECNF0_RU_Pos) & RADIO_MODECNF0_RU_Msk;
+
+ /* Set logical address 1 for TX and RX */
+ NRF_RADIO_NS->TXADDRESS = 0;
+ NRF_RADIO_NS->RXADDRESSES = (1 << 0);
+
+ /* Configure the CRC registers */
+ NRF_RADIO_NS->CRCCNF = (RADIO_CRCCNF_SKIPADDR_Skip << RADIO_CRCCNF_SKIPADDR_Pos) | RADIO_CRCCNF_LEN_Three;
+
+ /* Configure BLE poly */
+ NRF_RADIO_NS->CRCPOLY = 0x0000065B;
+
+ /* Configure IFS */
+ NRF_RADIO_NS->TIFS = BLE_LL_IFS;
+
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_ENCRYPTION)
+ NRF_CCM_NS->INTENCLR = 0xffffffff;
+ NRF_CCM_NS->SHORTS = CCM_SHORTS_ENDKSGEN_CRYPT_Msk;
+ NRF_CCM_NS->EVENTS_ERROR = 0;
+ memset(nrf_encrypt_scratchpad, 0, sizeof(nrf_encrypt_scratchpad));
+#endif
+
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_PRIVACY)
+ g_ble_phy_data.phy_aar_scratch = 0;
+ NRF_AAR_NS->IRKPTR = (uint32_t)&g_nrf_irk_list[0];
+ NRF_AAR_NS->INTENCLR = 0xffffffff;
+ NRF_AAR_NS->EVENTS_END = 0;
+ NRF_AAR_NS->EVENTS_RESOLVED = 0;
+ NRF_AAR_NS->EVENTS_NOTRESOLVED = 0;
+ NRF_AAR_NS->NIRK = 0;
+#endif
+
+ /* TIMER0 setup for PHY when using RTC */
+ NRF_TIMER0_NS->TASKS_STOP = 1;
+ NRF_TIMER0_NS->TASKS_SHUTDOWN = 1;
+ NRF_TIMER0_NS->BITMODE = 3; /* 32-bit timer */
+ NRF_TIMER0_NS->MODE = 0; /* Timer mode */
+ NRF_TIMER0_NS->PRESCALER = 4; /* gives us 1 MHz */
+
+ /* Publish events */
+ NRF_TIMER0_NS->PUBLISH_COMPARE[0] = DPPI_PUBLISH_TIMER0_EVENTS_COMPARE_0;
+ NRF_TIMER0_NS->PUBLISH_COMPARE[3] = DPPI_PUBLISH_TIMER0_EVENTS_COMPARE_3;
+ NRF_RADIO_NS->PUBLISH_END = DPPI_PUBLISH_RADIO_EVENTS_END;
+ NRF_RADIO_NS->PUBLISH_BCMATCH = DPPI_PUBLISH_RADIO_EVENTS_BCMATCH;
+ NRF_RADIO_NS->PUBLISH_ADDRESS = DPPI_PUBLISH_RADIO_EVENTS_ADDRESS;
+ NRF_RTC0_NS->PUBLISH_COMPARE[0] = DPPI_PUBLISH_RTC0_EVENTS_COMPARE_0;
+
+ /* Enable channels we publish on */
+ NRF_DPPIC_NS->CHENSET = DPPI_CH_ENABLE_ALL;
+
+ /* Captures tx/rx start in timer0 cc 1 and tx/rx end in timer0 cc 2 */
+ NRF_TIMER0_NS->SUBSCRIBE_CAPTURE[1] = DPPI_SUBSCRIBE_TIMER0_TASKS_CAPTURE1(1);
+ NRF_TIMER0_NS->SUBSCRIBE_CAPTURE[2] = DPPI_SUBSCRIBE_TIMER0_TASKS_CAPTURE2(1);
+
+ /* Set isr in vector table and enable interrupt */
+#ifndef RIOT_VERSION
+ NVIC_SetPriority(RADIO_IRQn, 0);
+#endif
+#if MYNEWT
+ NVIC_SetVector(RADIO_IRQn, (uint32_t)ble_phy_isr);
+#else
+ ble_npl_hw_set_isr(RADIO_IRQn, ble_phy_isr);
+#endif
+ NVIC_EnableIRQ(RADIO_IRQn);
+
+ /* Register phy statistics */
+ if (!g_ble_phy_data.phy_stats_initialized) {
+ rc = stats_init_and_reg(STATS_HDR(ble_phy_stats),
+ STATS_SIZE_INIT_PARMS(ble_phy_stats,
+ STATS_SIZE_32),
+ STATS_NAME_INIT_PARMS(ble_phy_stats),
+ "ble_phy");
+ assert(rc == 0);
+
+ g_ble_phy_data.phy_stats_initialized = 1;
+ }
+
+ return 0;
+}
+
+int
+ble_phy_rx(void)
+{
+ /*
+ * Check radio state.
+ *
+ * In case radio is now disabling we'll wait for it to finish, but if for
+ * any reason it's just in idle state we proceed with RX as usual since
+ * nRF52 radio can ramp-up from idle state as well.
+ *
+ * Note that TX and RX states values are the same except for 3rd bit so we
+ * can make a shortcut here when checking for idle state.
+ */
+ nrf_wait_disabled();
+ if ((NRF_RADIO_NS->STATE != RADIO_STATE_STATE_Disabled) &&
+ ((NRF_RADIO_NS->STATE & 0x07) != RADIO_STATE_STATE_RxIdle)) {
+ ble_phy_disable();
+ STATS_INC(ble_phy_stats, radio_state_errs);
+ return BLE_PHY_ERR_RADIO_STATE;
+ }
+
+ /* Make sure all interrupts are disabled */
+ NRF_RADIO_NS->INTENCLR = NRF_RADIO_IRQ_MASK_ALL;
+
+ /* Clear events prior to enabling receive */
+ NRF_RADIO_NS->EVENTS_END = 0;
+ NRF_RADIO_NS->EVENTS_DISABLED = 0;
+
+ /* Setup for rx */
+ ble_phy_rx_xcvr_setup();
+
+ /* task to start RX should be subscribed here */
+ assert(NRF_RADIO_NS->SUBSCRIBE_RXEN & DPPI_SUBSCRIBE_RADIO_TASKS_RXEN(1));
+
+ return 0;
+}
+
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_ENCRYPTION)
+void
+ble_phy_encrypt_enable(uint64_t pkt_counter, uint8_t *iv, uint8_t *key,
+ uint8_t is_master)
+{
+ memcpy(nrf_ccm_data.key, key, 16);
+ nrf_ccm_data.pkt_counter = pkt_counter;
+ memcpy(nrf_ccm_data.iv, iv, 8);
+ nrf_ccm_data.dir_bit = is_master;
+ g_ble_phy_data.phy_encrypted = 1;
+ /* Enable the module (AAR cannot be on while CCM on) */
+ NRF_AAR_NS->ENABLE = AAR_ENABLE_ENABLE_Disabled;
+ NRF_CCM_NS->ENABLE = CCM_ENABLE_ENABLE_Enabled;
+}
+
+void
+ble_phy_encrypt_set_pkt_cntr(uint64_t pkt_counter, int dir)
+{
+ nrf_ccm_data.pkt_counter = pkt_counter;
+ nrf_ccm_data.dir_bit = dir;
+}
+
+void
+ble_phy_encrypt_disable(void)
+{
+ NRF_CCM_NS->SUBSCRIBE_CRYPT = DPPI_SUBSCRIBE_CCM_TASKS_CRYPT(0);
+ NRF_CCM_NS->TASKS_STOP = 1;
+ NRF_CCM_NS->EVENTS_ERROR = 0;
+ NRF_CCM_NS->ENABLE = CCM_ENABLE_ENABLE_Disabled;
+
+ g_ble_phy_data.phy_encrypted = 0;
+}
+#endif
+
+void
+ble_phy_set_txend_cb(ble_phy_tx_end_func txend_cb, void *arg)
+{
+ /* Set transmit end callback and arg */
+ g_ble_phy_data.txend_cb = txend_cb;
+ g_ble_phy_data.txend_arg = arg;
+}
+
+int
+ble_phy_tx_set_start_time(uint32_t cputime, uint8_t rem_usecs)
+{
+ int rc;
+
+ ble_phy_trace_u32x2(BLE_PHY_TRACE_ID_START_TX, cputime, rem_usecs);
+
+#if (BLE_LL_BT5_PHY_SUPPORTED == 1)
+ ble_phy_mode_apply(g_ble_phy_data.phy_tx_phy_mode);
+#endif
+
+ /* XXX: This should not be necessary, but paranoia is good! */
+ /* Clear timer0 compare to RXEN since we are transmitting */
+ NRF_RADIO_NS->SUBSCRIBE_RXEN = DPPI_SUBSCRIBE_RADIO_TASKS_RXEN(0);
+
+ if (ble_phy_set_start_time(cputime, rem_usecs, true) != 0) {
+ STATS_INC(ble_phy_stats, tx_late);
+ ble_phy_disable();
+ rc = BLE_PHY_ERR_TX_LATE;
+ } else {
+ /* Enable PPI to automatically start TXEN */
+ NRF_RADIO_NS->SUBSCRIBE_TXEN = DPPI_SUBSCRIBE_RADIO_TASKS_TXEN(1);
+ rc = 0;
+ }
+ return rc;
+}
+
+int
+ble_phy_rx_set_start_time(uint32_t cputime, uint8_t rem_usecs)
+{
+ bool late = false;
+ int rc = 0;
+
+ ble_phy_trace_u32x2(BLE_PHY_TRACE_ID_START_RX, cputime, rem_usecs);
+
+#if (BLE_LL_BT5_PHY_SUPPORTED == 1)
+ ble_phy_mode_apply(g_ble_phy_data.phy_rx_phy_mode);
+#endif
+
+ /* XXX: This should not be necessary, but paranoia is good! */
+ /* Clear timer0 compare to TXEN since we are transmitting */
+ NRF_RADIO_NS->SUBSCRIBE_TXEN = DPPI_SUBSCRIBE_RADIO_TASKS_TXEN(0);
+
+ if (ble_phy_set_start_time(cputime, rem_usecs, false) != 0) {
+ STATS_INC(ble_phy_stats, rx_late);
+
+ /* We're late so let's just try to start RX as soon as possible */
+ ble_phy_set_start_now();
+
+ late = true;
+ }
+
+ /* Enable PPI to automatically start RXEN */
+ NRF_RADIO_NS->SUBSCRIBE_RXEN = DPPI_SUBSCRIBE_RADIO_TASKS_RXEN(1);
+
+ /* Start rx */
+ rc = ble_phy_rx();
+
+ /*
+ * If we enabled receiver but were late, let's return proper error code so
+ * caller can handle this.
+ */
+ if (!rc && late) {
+ rc = BLE_PHY_ERR_RX_LATE;
+ }
+
+ return rc;
+}
+
+int
+ble_phy_tx(ble_phy_tx_pducb_t pducb, void *pducb_arg, uint8_t end_trans)
+{
+ int rc;
+ uint8_t *dptr;
+ uint8_t *pktptr;
+ uint8_t payload_len;
+ uint8_t hdr_byte;
+ uint32_t state;
+ uint32_t shortcuts;
+
+ if (g_ble_phy_data.phy_transition_late) {
+ ble_phy_disable();
+ STATS_INC(ble_phy_stats, tx_late);
+ return BLE_PHY_ERR_TX_LATE;
+ }
+
+ /*
+ * This check is to make sure that the radio is not in a state where
+ * it is moving to disabled state. If so, let it get there.
+ */
+ nrf_wait_disabled();
+
+ /*
+ * XXX: Although we may not have to do this here, I clear all the PPI
+ * that should not be used when transmitting. Some of them are only enabled
+ * if encryption and/or privacy is on, but I dont care. Better to be
+ * paranoid, and if you are going to clear one, might as well clear them
+ * all.
+ */
+ NRF_TIMER0_NS->SUBSCRIBE_CAPTURE[3] = DPPI_SUBSCRIBE_TIMER0_TASKS_CAPTURE3(0);
+ NRF_RADIO_NS->SUBSCRIBE_DISABLE = DPPI_SUBSCRIBE_RADIO_TASKS_DISABLE(0);
+ NRF_AAR_NS->SUBSCRIBE_START = DPPI_SUBSCRIBE_AAR_TASKS_START(0);
+ NRF_CCM_NS->SUBSCRIBE_CRYPT = DPPI_SUBSCRIBE_CCM_TASKS_CRYPT(0);
+
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_ENCRYPTION)
+ if (g_ble_phy_data.phy_encrypted) {
+ dptr = (uint8_t *)&g_ble_phy_enc_buf[0];
+ pktptr = (uint8_t *)&g_ble_phy_tx_buf[0];
+ NRF_CCM_NS->SHORTS = CCM_SHORTS_ENDKSGEN_CRYPT_Msk;
+ NRF_CCM_NS->INPTR = (uint32_t)dptr;
+ NRF_CCM_NS->OUTPTR = (uint32_t)pktptr;
+ NRF_CCM_NS->SCRATCHPTR = (uint32_t)&nrf_encrypt_scratchpad[0];
+ NRF_CCM_NS->EVENTS_ERROR = 0;
+ NRF_CCM_NS->MODE = CCM_MODE_LENGTH_Msk | ble_phy_get_ccm_datarate();
+ NRF_CCM_NS->CNFPTR = (uint32_t)&nrf_ccm_data;
+ } else {
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_PRIVACY)
+ NRF_AAR_NS->IRKPTR = (uint32_t)&g_nrf_irk_list[0];
+#endif
+ dptr = (uint8_t *)&g_ble_phy_tx_buf[0];
+ pktptr = dptr;
+ }
+#else
+ dptr = (uint8_t *)&g_ble_phy_tx_buf[0];
+ pktptr = dptr;
+#endif
+
+ /* Set PDU payload */
+ payload_len = pducb(&dptr[3], pducb_arg, &hdr_byte);
+
+ /* RAM representation has S0, LENGTH and S1 fields. (3 bytes) */
+ dptr[0] = hdr_byte;
+ dptr[1] = payload_len;
+ dptr[2] = 0;
+
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_ENCRYPTION)
+ /* Start key-stream generation and encryption (via short) */
+ if (g_ble_phy_data.phy_encrypted) {
+ NRF_CCM_NS->TASKS_KSGEN = 1;
+ }
+#endif
+
+ NRF_RADIO_NS->PACKETPTR = (uint32_t)pktptr;
+
+ /* Clear the ready, end and disabled events */
+ NRF_RADIO_NS->EVENTS_READY = 0;
+ NRF_RADIO_NS->EVENTS_END = 0;
+ NRF_RADIO_NS->EVENTS_DISABLED = 0;
+
+ /* Enable shortcuts for transmit start/end. */
+ shortcuts = RADIO_SHORTS_END_DISABLE_Msk | RADIO_SHORTS_READY_START_Msk;
+ NRF_RADIO_NS->SHORTS = shortcuts;
+ NRF_RADIO_NS->INTENSET = RADIO_INTENSET_DISABLED_Msk;
+
+ /* Set the PHY transition */
+ g_ble_phy_data.phy_transition = end_trans;
+
+ /* Set transmitted payload length */
+ g_ble_phy_data.phy_tx_pyld_len = payload_len;
+
+ /* If we already started transmitting, abort it! */
+ state = NRF_RADIO_NS->STATE;
+ if (state != RADIO_STATE_STATE_Tx) {
+ /* Set phy state to transmitting and count packet statistics */
+ g_ble_phy_data.phy_state = BLE_PHY_STATE_TX;
+ STATS_INC(ble_phy_stats, tx_good);
+ STATS_INCN(ble_phy_stats, tx_bytes, payload_len + BLE_LL_PDU_HDR_LEN);
+ rc = BLE_ERR_SUCCESS;
+ } else {
+ ble_phy_disable();
+ STATS_INC(ble_phy_stats, tx_late);
+ rc = BLE_PHY_ERR_RADIO_STATE;
+ }
+
+ return rc;
+}
+
+int
+ble_phy_txpwr_set(int dbm)
+{
+ /* "Rail" power level if outside supported range */
+ dbm = ble_phy_txpower_round(dbm);
+
+ NRF_RADIO_NS->TXPOWER = dbm;
+ g_ble_phy_data.phy_txpwr_dbm = dbm;
+
+ return 0;
+}
+
+int
+ble_phy_txpower_round(int dbm)
+{
+ /* "Rail" power level if outside supported range */
+
+ if (dbm >= (int8_t)RADIO_TXPOWER_TXPOWER_0dBm) {
+ return (int8_t)RADIO_TXPOWER_TXPOWER_0dBm;
+ }
+
+ if (dbm >= (int8_t)RADIO_TXPOWER_TXPOWER_Neg1dBm) {
+ return (int8_t)RADIO_TXPOWER_TXPOWER_Neg1dBm;
+ }
+
+ if (dbm >= (int8_t)RADIO_TXPOWER_TXPOWER_Neg2dBm) {
+ return (int8_t)RADIO_TXPOWER_TXPOWER_Neg2dBm;
+ }
+
+ if (dbm >= (int8_t)RADIO_TXPOWER_TXPOWER_Neg3dBm) {
+ return (int8_t)RADIO_TXPOWER_TXPOWER_Neg4dBm;
+ }
+
+ if (dbm >= (int8_t)RADIO_TXPOWER_TXPOWER_Neg4dBm) {
+ return (int8_t)RADIO_TXPOWER_TXPOWER_Neg4dBm;
+ }
+
+ if (dbm >= (int8_t)RADIO_TXPOWER_TXPOWER_Neg5dBm) {
+ return (int8_t)RADIO_TXPOWER_TXPOWER_Neg5dBm;
+ }
+
+ if (dbm >= (int8_t)RADIO_TXPOWER_TXPOWER_Neg6dBm) {
+ return (int8_t)RADIO_TXPOWER_TXPOWER_Neg6dBm;
+ }
+
+ if (dbm >= (int8_t)RADIO_TXPOWER_TXPOWER_Neg7dBm) {
+ return (int8_t)RADIO_TXPOWER_TXPOWER_Neg7dBm;
+ }
+
+ if (dbm >= (int8_t)RADIO_TXPOWER_TXPOWER_Neg8dBm) {
+ return (int8_t)RADIO_TXPOWER_TXPOWER_Neg8dBm;
+ }
+
+ if (dbm >= (int8_t)RADIO_TXPOWER_TXPOWER_Neg12dBm) {
+ return (int8_t)RADIO_TXPOWER_TXPOWER_Neg12dBm;
+ }
+
+ if (dbm >= (int8_t)RADIO_TXPOWER_TXPOWER_Neg16dBm) {
+ return (int8_t)RADIO_TXPOWER_TXPOWER_Neg16dBm;
+ }
+
+ if (dbm >= (int8_t)RADIO_TXPOWER_TXPOWER_Neg20dBm) {
+ return (int8_t)RADIO_TXPOWER_TXPOWER_Neg20dBm;
+ }
+
+ if (dbm >= (int8_t)RADIO_TXPOWER_TXPOWER_Neg40dBm) {
+ return (int8_t)RADIO_TXPOWER_TXPOWER_Neg40dBm;
+ }
+
+ return (int8_t)RADIO_TXPOWER_TXPOWER_Neg40dBm;
+}
+
+static int
+ble_phy_set_access_addr(uint32_t access_addr)
+{
+ NRF_RADIO_NS->BASE0 = (access_addr << 8);
+ NRF_RADIO_NS->PREFIX0 = (NRF_RADIO_NS->PREFIX0 & 0xFFFFFF00) | (access_addr >> 24);
+
+ g_ble_phy_data.phy_access_address = access_addr;
+
+ return 0;
+}
+
+int
+ble_phy_txpwr_get(void)
+{
+ return g_ble_phy_data.phy_txpwr_dbm;
+}
+
+void
+ble_phy_set_rx_pwr_compensation(int8_t compensation)
+{
+ g_ble_phy_data.rx_pwr_compensation = compensation;
+}
+
+int
+ble_phy_setchan(uint8_t chan, uint32_t access_addr, uint32_t crcinit)
+{
+ assert(chan < BLE_PHY_NUM_CHANS);
+
+ /* Check for valid channel range */
+ if (chan >= BLE_PHY_NUM_CHANS) {
+ return BLE_PHY_ERR_INV_PARAM;
+ }
+
+ /* Set current access address */
+ ble_phy_set_access_addr(access_addr);
+
+ /* Configure crcinit */
+ NRF_RADIO_NS->CRCINIT = crcinit;
+
+ /* Set the frequency and the data whitening initial value */
+ g_ble_phy_data.phy_chan = chan;
+ NRF_RADIO_NS->FREQUENCY = g_ble_phy_chan_freq[chan];
+ NRF_RADIO_NS->DATAWHITEIV = chan;
+
+ return 0;
+}
+
+/**
+ * Stop the timer used to count microseconds when using RTC for cputime
+ */
+static void
+ble_phy_stop_usec_timer(void)
+{
+ NRF_TIMER0_NS->TASKS_STOP = 1;
+ NRF_TIMER0_NS->TASKS_SHUTDOWN = 1;
+ NRF_RTC0_NS->EVTENCLR = RTC_EVTENSET_COMPARE0_Msk;
+}
+
+/**
+ * ble phy disable irq and ppi
+ *
+ * This routine is to be called when reception was stopped due to either a
+ * wait for response timeout or a packet being received and the phy is to be
+ * restarted in receive mode. Generally, the disable routine is called to stop
+ * the phy.
+ */
+static void
+ble_phy_disable_irq_and_ppi(void)
+{
+ NRF_RADIO_NS->INTENCLR = NRF_RADIO_IRQ_MASK_ALL;
+ NRF_RADIO_NS->SHORTS = 0;
+ NRF_RADIO_NS->TASKS_DISABLE = 1;
+
+ NRF_TIMER0_NS->SUBSCRIBE_START = DPPI_SUBSCRIBE_TIMER0_TASKS_START(0);
+ NRF_TIMER0_NS->SUBSCRIBE_CAPTURE[3] = DPPI_SUBSCRIBE_TIMER0_TASKS_CAPTURE3(0);
+ NRF_RADIO_NS->SUBSCRIBE_DISABLE = DPPI_SUBSCRIBE_RADIO_TASKS_DISABLE(0);
+ NRF_RADIO_NS->SUBSCRIBE_TXEN = DPPI_SUBSCRIBE_RADIO_TASKS_TXEN(0);
+ NRF_RADIO_NS->SUBSCRIBE_RXEN = DPPI_SUBSCRIBE_RADIO_TASKS_RXEN(0);
+ NRF_AAR_NS->SUBSCRIBE_START = DPPI_SUBSCRIBE_AAR_TASKS_START(0);
+ NRF_CCM_NS->SUBSCRIBE_CRYPT = DPPI_SUBSCRIBE_CCM_TASKS_CRYPT(0);
+
+ NVIC_ClearPendingIRQ(RADIO_IRQn);
+ g_ble_phy_data.phy_state = BLE_PHY_STATE_IDLE;
+}
+
+void
+ble_phy_restart_rx(void)
+{
+ ble_phy_stop_usec_timer();
+ ble_phy_disable_irq_and_ppi();
+
+ ble_phy_set_start_now();
+ /* Enable PPI to automatically start RXEN */
+ NRF_RADIO_NS->SUBSCRIBE_RXEN = DPPI_SUBSCRIBE_RADIO_TASKS_RXEN(1);
+
+ ble_phy_rx();
+}
+
+void
+ble_phy_disable(void)
+{
+ ble_phy_trace_void(BLE_PHY_TRACE_ID_DISABLE);
+
+ ble_phy_stop_usec_timer();
+ ble_phy_disable_irq_and_ppi();
+}
+
+uint32_t
+ble_phy_access_addr_get(void)
+{
+ return g_ble_phy_data.phy_access_address;
+}
+
+int
+ble_phy_state_get(void)
+{
+ return g_ble_phy_data.phy_state;
+}
+
+int
+ble_phy_rx_started(void)
+{
+ return g_ble_phy_data.phy_rx_started;
+}
+
+uint8_t
+ble_phy_xcvr_state_get(void)
+{
+ uint32_t state;
+ state = NRF_RADIO_NS->STATE;
+ return (uint8_t)state;
+}
+
+uint8_t
+ble_phy_max_data_pdu_pyld(void)
+{
+ return BLE_LL_DATA_PDU_MAX_PYLD;
+}
+
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_PRIVACY)
+void
+ble_phy_resolv_list_enable(void)
+{
+ NRF_AAR_NS->NIRK = (uint32_t)g_nrf_num_irks;
+ g_ble_phy_data.phy_privacy = 1;
+}
+
+void
+ble_phy_resolv_list_disable(void)
+{
+ g_ble_phy_data.phy_privacy = 0;
+}
+#endif
+
+#if MYNEWT_VAL(BLE_LL_DTM)
+void
+ble_phy_enable_dtm(void)
+{
+ /* When DTM is enabled we need to disable whitening as per
+ * Bluetooth v5.0 Vol 6. Part F. 4.1.1
+ */
+ NRF_RADIO_NS->PCNF1 &= ~RADIO_PCNF1_WHITEEN_Msk;
+}
+
+void
+ble_phy_disable_dtm(void)
+{
+ /* Enable whitening */
+ NRF_RADIO_NS->PCNF1 |= RADIO_PCNF1_WHITEEN_Msk;
+}
+#endif
+
+void
+ble_phy_rfclk_enable(void)
+{
+#if MYNEWT
+ nrf5340_net_clock_hfxo_request();
+#else
+ NRF_CLOCK_NS->TASKS_HFCLKSTART = 1;
+#endif
+}
+
+void
+ble_phy_rfclk_disable(void)
+{
+#if MYNEWT
+ nrf5340_net_clock_hfxo_release();
+#else
+ NRF_CLOCK_NS->TASKS_HFCLKSTOP = 1;
+#endif
+}
diff --git a/src/libs/mynewt-nimble/nimble/drivers/nrf5340/src/ble_phy_trace.c b/src/libs/mynewt-nimble/nimble/drivers/nrf5340/src/ble_phy_trace.c
new file mode 100644
index 00000000..6967c3f7
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/drivers/nrf5340/src/ble_phy_trace.c
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include <stdint.h>
+#include <syscfg/syscfg.h>
+#include <os/os_trace_api.h>
+
+#if MYNEWT_VAL(BLE_PHY_SYSVIEW)
+
+static os_trace_module_t g_ble_phy_trace_mod;
+uint32_t ble_phy_trace_off;
+
+static void
+ble_phy_trace_module_send_desc(void)
+{
+ os_trace_module_desc(&g_ble_phy_trace_mod, "0 phy_set_tx cputime=%u usecs=%u");
+ os_trace_module_desc(&g_ble_phy_trace_mod, "1 phy_set_rx cputime=%u usecs=%u");
+ os_trace_module_desc(&g_ble_phy_trace_mod, "2 phy_disable");
+}
+
+void
+ble_phy_trace_init(void)
+{
+ ble_phy_trace_off =
+ os_trace_module_register(&g_ble_phy_trace_mod, "ble_phy", 3,
+ ble_phy_trace_module_send_desc);
+}
+#endif
diff --git a/src/libs/mynewt-nimble/nimble/drivers/nrf5340/syscfg.yml b/src/libs/mynewt-nimble/nimble/drivers/nrf5340/syscfg.yml
new file mode 100644
index 00000000..dd8b9304
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/drivers/nrf5340/syscfg.yml
@@ -0,0 +1,23 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+syscfg.defs:
+ BLE_PHY_SYSVIEW:
+ description: >
+ Enable SystemView tracing module for radio driver.
+ value: 0
diff --git a/src/libs/mynewt-nimble/nimble/host/include/host/ble_gap.h b/src/libs/mynewt-nimble/nimble/host/include/host/ble_gap.h
index 20e7dab7..20f9e30d 100644
--- a/src/libs/mynewt-nimble/nimble/host/include/host/ble_gap.h
+++ b/src/libs/mynewt-nimble/nimble/host/include/host/ble_gap.h
@@ -39,41 +39,47 @@ extern "C" {
struct hci_le_conn_complete;
struct hci_conn_update;
+#define BLE_GAP_ADV_ITVL_MS(t) ((t) * 1000 / BLE_HCI_ADV_ITVL)
+#define BLE_GAP_SCAN_ITVL_MS(t) ((t) * 1000 / BLE_HCI_SCAN_ITVL)
+#define BLE_GAP_SCAN_WIN_MS(t) ((t) * 1000 / BLE_HCI_SCAN_ITVL)
+#define BLE_GAP_CONN_ITVL_MS(t) ((t) * 1000 / BLE_HCI_CONN_ITVL)
+#define BLE_GAP_SUPERVISION_TIMEOUT_MS(t) ((t) / 10)
+
/** 30 ms. */
-#define BLE_GAP_ADV_FAST_INTERVAL1_MIN (30 * 1000 / BLE_HCI_ADV_ITVL)
+#define BLE_GAP_ADV_FAST_INTERVAL1_MIN BLE_GAP_ADV_ITVL_MS(30)
/** 60 ms. */
-#define BLE_GAP_ADV_FAST_INTERVAL1_MAX (60 * 1000 / BLE_HCI_ADV_ITVL)
+#define BLE_GAP_ADV_FAST_INTERVAL1_MAX BLE_GAP_ADV_ITVL_MS(60)
/** 100 ms. */
-#define BLE_GAP_ADV_FAST_INTERVAL2_MIN (100 * 1000 / BLE_HCI_ADV_ITVL)
+#define BLE_GAP_ADV_FAST_INTERVAL2_MIN BLE_GAP_ADV_ITVL_MS(100)
/** 150 ms. */
-#define BLE_GAP_ADV_FAST_INTERVAL2_MAX (150 * 1000 / BLE_HCI_ADV_ITVL)
+#define BLE_GAP_ADV_FAST_INTERVAL2_MAX BLE_GAP_ADV_ITVL_MS(150)
/** 30 ms; active scanning. */
-#define BLE_GAP_SCAN_FAST_INTERVAL_MIN (30 * 1000 / BLE_HCI_ADV_ITVL)
+#define BLE_GAP_SCAN_FAST_INTERVAL_MIN BLE_GAP_SCAN_ITVL_MS(30)
/** 60 ms; active scanning. */
-#define BLE_GAP_SCAN_FAST_INTERVAL_MAX (60 * 1000 / BLE_HCI_ADV_ITVL)
+#define BLE_GAP_SCAN_FAST_INTERVAL_MAX BLE_GAP_SCAN_ITVL_MS(60)
/** 11.25 ms; limited discovery interval. */
-#define BLE_GAP_LIM_DISC_SCAN_INT (11.25 * 1000 / BLE_HCI_SCAN_ITVL)
+#define BLE_GAP_LIM_DISC_SCAN_INT BLE_GAP_SCAN_ITVL_MS(11.25)
/** 11.25 ms; limited discovery window (not from the spec). */
-#define BLE_GAP_LIM_DISC_SCAN_WINDOW (11.25 * 1000 / BLE_HCI_SCAN_ITVL)
+#define BLE_GAP_LIM_DISC_SCAN_WINDOW BLE_GAP_SCAN_WIN_MS(11.25)
/** 30 ms; active scanning. */
-#define BLE_GAP_SCAN_FAST_WINDOW (30 * 1000 / BLE_HCI_SCAN_ITVL)
+#define BLE_GAP_SCAN_FAST_WINDOW BLE_GAP_SCAN_WIN_MS(30)
/* 30.72 seconds; active scanning. */
-#define BLE_GAP_SCAN_FAST_PERIOD (30.72 * 1000)
+#define BLE_GAP_SCAN_FAST_PERIOD BLE_GAP_SCAN_ITVL_MS(30.72)
/** 1.28 seconds; background scanning. */
-#define BLE_GAP_SCAN_SLOW_INTERVAL1 (1280 * 1000 / BLE_HCI_SCAN_ITVL)
+#define BLE_GAP_SCAN_SLOW_INTERVAL1 BLE_GAP_SCAN_ITVL_MS(1280)
/** 11.25 ms; background scanning. */
-#define BLE_GAP_SCAN_SLOW_WINDOW1 (11.25 * 1000 / BLE_HCI_SCAN_ITVL)
+#define BLE_GAP_SCAN_SLOW_WINDOW1 BLE_GAP_SCAN_WIN_MS(11.25)
/** 10.24 seconds. */
#define BLE_GAP_DISC_DUR_DFLT (10.24 * 1000)
@@ -88,18 +94,18 @@ struct hci_conn_update;
#define BLE_GAP_CONN_PAUSE_PERIPHERAL (5 * 1000)
/* 30 ms. */
-#define BLE_GAP_INITIAL_CONN_ITVL_MIN (30 * 1000 / BLE_HCI_CONN_ITVL)
+#define BLE_GAP_INITIAL_CONN_ITVL_MIN BLE_GAP_CONN_ITVL_MS(30)
/* 50 ms. */
-#define BLE_GAP_INITIAL_CONN_ITVL_MAX (50 * 1000 / BLE_HCI_CONN_ITVL)
+#define BLE_GAP_INITIAL_CONN_ITVL_MAX BLE_GAP_CONN_ITVL_MS(50)
/** Default channels mask: all three channels are used. */
#define BLE_GAP_ADV_DFLT_CHANNEL_MAP 0x07
#define BLE_GAP_INITIAL_CONN_LATENCY 0
#define BLE_GAP_INITIAL_SUPERVISION_TIMEOUT 0x0100
-#define BLE_GAP_INITIAL_CONN_MIN_CE_LEN 0x0010
-#define BLE_GAP_INITIAL_CONN_MAX_CE_LEN 0x0300
+#define BLE_GAP_INITIAL_CONN_MIN_CE_LEN 0x0000
+#define BLE_GAP_INITIAL_CONN_MAX_CE_LEN 0x0000
#define BLE_GAP_ROLE_MASTER 0
#define BLE_GAP_ROLE_SLAVE 1
@@ -1896,6 +1902,20 @@ int ble_gap_unpair(const ble_addr_t *peer_addr);
*/
int ble_gap_unpair_oldest_peer(void);
+/**
+ * Similar to `ble_gap_unpair_oldest_peer()`, except it makes sure that the
+ * peer received in input parameters is not deleted.
+ *
+ * @param peer_addr Address of the peer (not to be deleted)
+ *
+ * @return 0 on success;
+ * A BLE host HCI return code if the controller
+ * rejected the request;
+ * A BLE host core return code on unexpected
+ * error.
+ */
+int ble_gap_unpair_oldest_except(const ble_addr_t *peer_addr);
+
#define BLE_GAP_PRIVATE_MODE_NETWORK 0
#define BLE_GAP_PRIVATE_MODE_DEVICE 1
diff --git a/src/libs/mynewt-nimble/nimble/host/include/host/ble_hs_log.h b/src/libs/mynewt-nimble/nimble/host/include/host/ble_hs_log.h
index 8d0a4596..7b90eaf9 100644
--- a/src/libs/mynewt-nimble/nimble/host/include/host/ble_hs_log.h
+++ b/src/libs/mynewt-nimble/nimble/host/include/host/ble_hs_log.h
@@ -21,6 +21,7 @@
#define H_BLE_HS_LOG_
#include "modlog/modlog.h"
+#include "log/log.h"
/* Only include the logcfg header if this version of newt can generate it. */
#if MYNEWT_VAL(NEWT_FEATURE_LOGCFG)
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/access.h b/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/access.h
index 1f99f412..9f923cb9 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/access.h
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/access.h
@@ -28,14 +28,23 @@ extern "C" {
#define BT_MESH_ADDR_RELAYS 0xfffe
#define BT_MESH_KEY_UNUSED 0xffff
+#define BT_MESH_KEY_ANY 0xffff
#define BT_MESH_KEY_DEV 0xfffe
#define BT_MESH_KEY_DEV_LOCAL BT_MESH_KEY_DEV
#define BT_MESH_KEY_DEV_REMOTE 0xfffd
#define BT_MESH_KEY_DEV_ANY 0xfffc
+#define BT_MESH_ADDR_IS_UNICAST(addr) ((addr) && (addr) < 0x8000)
+#define BT_MESH_ADDR_IS_GROUP(addr) ((addr) >= 0xc000 && (addr) <= 0xff00)
+#define BT_MESH_ADDR_IS_VIRTUAL(addr) ((addr) >= 0x8000 && (addr) < 0xc000)
+#define BT_MESH_ADDR_IS_RFU(addr) ((addr) >= 0xff00 && (addr) <= 0xfffb)
+
#define BT_MESH_IS_DEV_KEY(key) (key == BT_MESH_KEY_DEV_LOCAL || \
key == BT_MESH_KEY_DEV_REMOTE)
+#define BT_MESH_APP_SEG_SDU_MAX 12
+#define BT_MESH_TX_SDU_MAX (CONFIG_BT_MESH_TX_SEG_MAX * BT_MESH_APP_SEG_SDU_MAX)
+#define BT_MESH_RX_SDU_MAX (CONFIG_BT_MESH_RX_SEG_MAX * BT_MESH_APP_SEG_SDU_MAX)
/** Helper to define a mesh element within an array.
*
* In case the element has no SIG or Vendor models the helper
@@ -57,13 +66,13 @@ extern "C" {
/** Abstraction that describes a Mesh Element */
struct bt_mesh_elem {
/* Unicast Address. Set at runtime during provisioning. */
- u16_t addr;
+ uint16_t addr;
/* Location Descriptor (GATT Bluetooth Namespace Descriptors) */
- const u16_t loc;
+ const uint16_t loc;
- const u8_t model_count;
- const u8_t vnd_model_count;
+ const uint8_t model_count;
+ const uint8_t vnd_model_count;
struct bt_mesh_model * const models;
struct bt_mesh_model * const vnd_models;
@@ -132,33 +141,33 @@ struct bt_mesh_elem {
/** Message sending context. */
struct bt_mesh_msg_ctx {
/** NetKey Index of the subnet to send the message on. */
- u16_t net_idx;
+ uint16_t net_idx;
/** AppKey Index to encrypt the message with. */
- u16_t app_idx;
+ uint16_t app_idx;
/** Remote address. */
- u16_t addr;
+ uint16_t addr;
/** Destination address of a received message. Not used for sending. */
- u16_t recv_dst;
+ uint16_t recv_dst;
/** RSSI of received packet. Not used for sending. */
- s8_t recv_rssi;
+ int8_t recv_rssi;
/** Received TTL value. Not used for sending. */
- u8_t recv_ttl;
+ uint8_t recv_ttl;
/** Force sending reliably by using segment acknowledgement */
bool send_rel;
/** TTL, or BT_MESH_TTL_DEFAULT for default TTL. */
- u8_t send_ttl;
+ uint8_t send_ttl;
};
struct bt_mesh_model_op {
/* OpCode encoded using the BT_MESH_MODEL_OP_* macros */
- const u32_t opcode;
+ const uint32_t opcode;
/* Minimum required message length */
const size_t min_len;
@@ -324,7 +333,7 @@ struct bt_mesh_model_op {
*
* @return Transmission count (actual transmissions is N + 1).
*/
-#define BT_MESH_TRANSMIT_COUNT(transmit) (((transmit) & (u8_t)BIT_MASK(3)))
+#define BT_MESH_TRANSMIT_COUNT(transmit) (((transmit) & (uint8_t)BIT_MASK(3)))
/** @def BT_MESH_TRANSMIT_INT
*
@@ -375,23 +384,24 @@ struct bt_mesh_model_pub {
/** The model the context belongs to. Initialized by the stack. */
struct bt_mesh_model *mod;
- u16_t addr; /**< Publish Address. */
- u16_t key; /**< Publish AppKey Index. */
+ uint16_t addr; /**< Publish Address. */
+ uint16_t key; /**< Publish AppKey Index. */
- u8_t ttl; /**< Publish Time to Live. */
- u8_t retransmit; /**< Retransmit Count & Interval Steps. */
- u8_t period; /**< Publish Period. */
- u8_t period_div:4, /**< Divisor for the Period. */
+ uint8_t ttl; /**< Publish Time to Live. */
+ uint8_t retransmit; /**< Retransmit Count & Interval Steps. */
+ uint8_t period; /**< Publish Period. */
+ uint8_t period_div:4, /**< Divisor for the Period. */
cred:1, /**< Friendship Credentials Flag. */
+ send_rel:1,
fast_period:1,/**< Use FastPeriodDivisor */
count:3; /**< Retransmissions left. */
- u32_t period_start; /**< Start of the current period. */
+ uint32_t period_start; /**< Start of the current period. */
/** @brief Publication buffer, containing the publication message.
*
* The application is expected to initialize this with
- * a valid net_buf_simple pointer, with the help of e.g.
+ * a valid os_mbuf pointer, with the help of e.g.
* the NET_BUF_SIMPLE() macro. The publication buffer must
* contain a valid publication message before calling the
* bt_mesh_model_publish() API or after the publication's
@@ -414,6 +424,10 @@ struct bt_mesh_model_pub {
* will be called periodically and is expected to update
* @ref bt_mesh_model_pub.msg with a valid publication
* message.
+ *
+ * If the callback returns non-zero, the publication is skipped
+ * and will resume on the next periodic publishing interval.
+ *
*
* @param mod The Model the Publication Context belogs to.
*
@@ -432,16 +446,18 @@ struct bt_mesh_model_cb {
* @sa settings_handler::h_set
*
* @param model Model to set the persistent data of.
+ * @param name Name/key of the settings item.
* @param val Data from the backend.
*
* @return 0 on success, error otherwise.
*/
- int (*const settings_set)(struct bt_mesh_model *model, char *val);
+ int (*const settings_set)(struct bt_mesh_model *model,
+ const char *name, char *val);
- /** @brief Callback called when all settings have been loaded.
+ /** @brief Callback called when the mesh is started.
*
- * This handler gets called after the settings have been loaded in
- * full.
+ * This handler gets called after the node has been provisioned, or
+ * after all mesh data has been loaded from persistent storage.
*
* @sa settings_handler::h_commit
*
@@ -449,12 +465,17 @@ struct bt_mesh_model_cb {
*
* @return 0 on success, error otherwise.
*/
- int (*const settings_commit)(struct bt_mesh_model *model);
+ int (*const start)(struct bt_mesh_model *model);
/** @brief Model init callback.
*
* Called on every model instance during mesh initialization.
*
+ *
+ * If any of the model init callbacks return an error, the Mesh
+ * subsystem initialization will be aborted, and the error will be
+ * returned to the caller of @ref bt_mesh_init.
+ *
* @param model Model to be initialized.
*
* @return 0 on success, error otherwise.
@@ -466,6 +487,9 @@ struct bt_mesh_model_cb {
* Called when the mesh node is reset. All model data is deleted on
* reset, and the model should clear its state.
*
+ * @note If the model stores any persistent data, this needs to be
+ * erased manually.
+ *
* @param model Model this callback belongs to.
*/
void (*const reset)(struct bt_mesh_model *model);
@@ -474,26 +498,26 @@ struct bt_mesh_model_cb {
/** Abstraction that describes a Mesh Model instance */
struct bt_mesh_model {
union {
- const u16_t id;
+ const uint16_t id;
struct {
- u16_t company;
- u16_t id;
+ uint16_t company;
+ uint16_t id;
} vnd;
};
/* Internal information, mainly for persistent storage */
- u8_t elem_idx; /* Belongs to Nth element */
- u8_t mod_idx; /* Is the Nth model in the element */
- u16_t flags; /* Model flags for internal bookkeeping */
+ uint8_t elem_idx; /* Belongs to Nth element */
+ uint8_t mod_idx; /* Is the Nth model in the element */
+ uint16_t flags; /* Model flags for internal bookkeeping */
/* Model Publication */
struct bt_mesh_model_pub * const pub;
/* AppKey List */
- u16_t keys[CONFIG_BT_MESH_MODEL_KEY_COUNT];
+ uint16_t keys[CONFIG_BT_MESH_MODEL_KEY_COUNT];
/* Subscription List (group or virtual addresses) */
- u16_t groups[CONFIG_BT_MESH_MODEL_GROUP_COUNT];
+ uint16_t groups[CONFIG_BT_MESH_MODEL_GROUP_COUNT];
const struct bt_mesh_model_op * const op;
@@ -511,11 +535,11 @@ struct bt_mesh_model {
};
struct bt_mesh_send_cb {
- void (*start)(u16_t duration, int err, void *cb_data);
+ void (*start)(uint16_t duration, int err, void *cb_data);
void (*end)(int err, void *cb_data);
};
-void bt_mesh_model_msg_init(struct os_mbuf *msg, u32_t opcode);
+void bt_mesh_model_msg_init(struct os_mbuf *msg, uint32_t opcode);
/** Special TTL value to request using configured default TTL */
#define BT_MESH_TTL_DEFAULT 0xff
@@ -574,7 +598,7 @@ struct bt_mesh_elem *bt_mesh_model_elem(struct bt_mesh_model *mod);
* if no SIG model with the given ID exists in the given element.
*/
struct bt_mesh_model *bt_mesh_model_find(const struct bt_mesh_elem *elem,
- u16_t id);
+ uint16_t id);
/** @brief Find a vendor model.
*
@@ -586,7 +610,7 @@ struct bt_mesh_model *bt_mesh_model_find(const struct bt_mesh_elem *elem,
* if no vendor model with the given ID exists in the given element.
*/
struct bt_mesh_model *bt_mesh_model_find_vnd(const struct bt_mesh_elem *elem,
- u16_t company, u16_t id);
+ uint16_t company, uint16_t id);
/** @brief Get whether the model is in the primary element of the device.
*
@@ -603,13 +627,14 @@ static inline bool bt_mesh_model_in_primary(const struct bt_mesh_model *mod)
*
* @param mod Mesh model.
* @param vnd This is a vendor model.
+ * @param name Name/key of the settings item.
* @param data Model data to store, or NULL to delete any model data.
* @param data_len Length of the model data.
*
* @return 0 on success, or (negative) error code on failure.
*/
int bt_mesh_model_data_store(struct bt_mesh_model *mod, bool vnd,
- const void *data, size_t data_len);
+ const char *name, const void *data, size_t data_len);
/** @brief Let a model extend another.
*
@@ -637,9 +662,9 @@ int bt_mesh_model_extend(struct bt_mesh_model *mod,
/** Node Composition */
struct bt_mesh_comp {
- u16_t cid;
- u16_t pid;
- u16_t vid;
+ uint16_t cid;
+ uint16_t pid;
+ uint16_t vid;
size_t elem_count;
struct bt_mesh_elem *elem;
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/atomic.h b/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/atomic.h
new file mode 100644
index 00000000..2c731794
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/atomic.h
@@ -0,0 +1,409 @@
+/* atomic operations */
+
+/*
+ * Copyright (c) 1997-2015, Wind River Systems, Inc.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+#ifndef __ATOMIC_H__
+#define __ATOMIC_H__
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+typedef int atomic_t;
+typedef atomic_t atomic_val_t;
+
+/**
+ * @defgroup atomic_apis Atomic Services APIs
+ * @ingroup kernel_apis
+ * @{
+ */
+
+/**
+ * @brief Atomic compare-and-set.
+ *
+ * This routine performs an atomic compare-and-set on @a target. If the current
+ * value of @a target equals @a old_value, @a target is set to @a new_value.
+ * If the current value of @a target does not equal @a old_value, @a target
+ * is left unchanged.
+ *
+ * @param target Address of atomic variable.
+ * @param old_value Original value to compare against.
+ * @param new_value New value to store.
+ * @return 1 if @a new_value is written, 0 otherwise.
+ */
+static inline int atomic_cas(atomic_t *target, atomic_val_t old_value,
+ atomic_val_t new_value)
+{
+ return __atomic_compare_exchange_n(target, &old_value, new_value,
+ 0, __ATOMIC_SEQ_CST,
+ __ATOMIC_SEQ_CST);
+}
+
+/**
+ *
+ * @brief Atomic addition.
+ *
+ * This routine performs an atomic addition on @a target.
+ *
+ * @param target Address of atomic variable.
+ * @param value Value to add.
+ *
+ * @return Previous value of @a target.
+ */
+static inline atomic_val_t atomic_add(atomic_t *target, atomic_val_t value)
+{
+ return __atomic_fetch_add(target, value, __ATOMIC_SEQ_CST);
+}
+
+/**
+ *
+ * @brief Atomic subtraction.
+ *
+ * This routine performs an atomic subtraction on @a target.
+ *
+ * @param target Address of atomic variable.
+ * @param value Value to subtract.
+ *
+ * @return Previous value of @a target.
+ */
+
+static inline atomic_val_t atomic_sub(atomic_t *target, atomic_val_t value)
+{
+ return __atomic_fetch_sub(target, value, __ATOMIC_SEQ_CST);
+}
+
+/**
+ *
+ * @brief Atomic increment.
+ *
+ * This routine performs an atomic increment by 1 on @a target.
+ *
+ * @param target Address of atomic variable.
+ *
+ * @return Previous value of @a target.
+ */
+
+static inline atomic_val_t atomic_inc(atomic_t *target)
+{
+ return atomic_add(target, 1);
+}
+
+/**
+ *
+ * @brief Atomic decrement.
+ *
+ * This routine performs an atomic decrement by 1 on @a target.
+ *
+ * @param target Address of atomic variable.
+ *
+ * @return Previous value of @a target.
+ */
+
+static inline atomic_val_t atomic_dec(atomic_t *target)
+{
+ return atomic_sub(target, 1);
+}
+
+/**
+ *
+ * @brief Atomic get.
+ *
+ * This routine performs an atomic read on @a target.
+ *
+ * @param target Address of atomic variable.
+ *
+ * @return Value of @a target.
+ */
+
+static inline atomic_val_t atomic_get(const atomic_t *target)
+{
+ return __atomic_load_n(target, __ATOMIC_SEQ_CST);
+}
+
+/**
+ *
+ * @brief Atomic get-and-set.
+ *
+ * This routine atomically sets @a target to @a value and returns
+ * the previous value of @a target.
+ *
+ * @param target Address of atomic variable.
+ * @param value Value to write to @a target.
+ *
+ * @return Previous value of @a target.
+ */
+
+static inline atomic_val_t atomic_set(atomic_t *target, atomic_val_t value)
+{
+ /* This builtin, as described by Intel, is not a traditional
+ * test-and-set operation, but rather an atomic exchange operation. It
+ * writes value into *ptr, and returns the previous contents of *ptr.
+ */
+ return __atomic_exchange_n(target, value, __ATOMIC_SEQ_CST);
+}
+
+/**
+ *
+ * @brief Atomic clear.
+ *
+ * This routine atomically sets @a target to zero and returns its previous
+ * value. (Hence, it is equivalent to atomic_set(target, 0).)
+ *
+ * @param target Address of atomic variable.
+ *
+ * @return Previous value of @a target.
+ */
+
+static inline atomic_val_t atomic_clear(atomic_t *target)
+{
+ return atomic_set(target, 0);
+}
+
+/**
+ *
+ * @brief Atomic bitwise inclusive OR.
+ *
+ * This routine atomically sets @a target to the bitwise inclusive OR of
+ * @a target and @a value.
+ *
+ * @param target Address of atomic variable.
+ * @param value Value to OR.
+ *
+ * @return Previous value of @a target.
+ */
+
+static inline atomic_val_t atomic_or(atomic_t *target, atomic_val_t value)
+{
+ return __atomic_fetch_or(target, value, __ATOMIC_SEQ_CST);
+}
+
+/**
+ *
+ * @brief Atomic bitwise exclusive OR (XOR).
+ *
+ * This routine atomically sets @a target to the bitwise exclusive OR (XOR) of
+ * @a target and @a value.
+ *
+ * @param target Address of atomic variable.
+ * @param value Value to XOR
+ *
+ * @return Previous value of @a target.
+ */
+
+static inline atomic_val_t atomic_xor(atomic_t *target, atomic_val_t value)
+{
+ return __atomic_fetch_xor(target, value, __ATOMIC_SEQ_CST);
+}
+
+/**
+ *
+ * @brief Atomic bitwise AND.
+ *
+ * This routine atomically sets @a target to the bitwise AND of @a target
+ * and @a value.
+ *
+ * @param target Address of atomic variable.
+ * @param value Value to AND.
+ *
+ * @return Previous value of @a target.
+ */
+
+static inline atomic_val_t atomic_and(atomic_t *target, atomic_val_t value)
+{
+ return __atomic_fetch_and(target, value, __ATOMIC_SEQ_CST);
+}
+
+/**
+ *
+ * @brief Atomic bitwise NAND.
+ *
+ * This routine atomically sets @a target to the bitwise NAND of @a target
+ * and @a value. (This operation is equivalent to target = ~(target & value).)
+ *
+ * @param target Address of atomic variable.
+ * @param value Value to NAND.
+ *
+ * @return Previous value of @a target.
+ */
+
+static inline atomic_val_t atomic_nand(atomic_t *target, atomic_val_t value)
+{
+ return __atomic_fetch_nand(target, value, __ATOMIC_SEQ_CST);
+}
+
+ /**
+ * @brief Initialize an atomic variable.
+ *
+ * This macro can be used to initialize an atomic variable. For example,
+ * @code atomic_t my_var = ATOMIC_INIT(75); @endcode
+ *
+ * @param i Value to assign to atomic variable.
+ */
+#define ATOMIC_INIT(i) (i)
+
+ /**
+ * @cond INTERNAL_HIDDEN
+ */
+
+#define ATOMIC_BITS (sizeof(atomic_val_t) * 8)
+#define ATOMIC_MASK(bit) (1 << ((bit) & (ATOMIC_BITS - 1)))
+#define ATOMIC_ELEM(addr, bit) ((addr) + ((bit) / ATOMIC_BITS))
+
+ /**
+ * INTERNAL_HIDDEN @endcond
+ */
+
+ /**
+ * @brief Define an array of atomic variables.
+ *
+ * This macro defines an array of atomic variables containing at least
+ * @a num_bits bits.
+ *
+ * @note
+ * If used from file scope, the bits of the array are initialized to zero;
+ * if used from within a function, the bits are left uninitialized.
+ *
+ * @param name Name of array of atomic variables.
+ * @param num_bits Number of bits needed.
+ */
+#define ATOMIC_DEFINE(name, num_bits) \
+ atomic_t name[1 + ((num_bits) - 1) / ATOMIC_BITS]
+
+ /**
+ * @brief Atomically test a bit.
+ *
+ * This routine tests whether bit number @a bit of @a target is set or not.
+ * The target may be a single atomic variable or an array of them.
+ *
+ * @param target Address of atomic variable or array.
+ * @param bit Bit number (starting from 0).
+ *
+ * @return 1 if the bit was set, 0 if it wasn't.
+ */
+ static inline int
+ atomic_test_bit(const atomic_t *target, int bit)
+ {
+ atomic_val_t val = atomic_get(ATOMIC_ELEM(target, bit));
+
+ return (1 & (val >> (bit & (ATOMIC_BITS - 1))));
+ }
+
+ /**
+ * @brief Atomically test and clear a bit.
+ *
+ * Atomically clear bit number @a bit of @a target and return its old value.
+ * The target may be a single atomic variable or an array of them.
+ *
+ * @param target Address of atomic variable or array.
+ * @param bit Bit number (starting from 0).
+ *
+ * @return 1 if the bit was set, 0 if it wasn't.
+ */
+ static inline int
+ atomic_test_and_clear_bit(atomic_t *target, int bit)
+ {
+ atomic_val_t mask = ATOMIC_MASK(bit);
+ atomic_val_t old;
+
+ old = atomic_and(ATOMIC_ELEM(target, bit), ~mask);
+
+ return (old & mask) != 0;
+ }
+
+ /**
+ * @brief Atomically set a bit.
+ *
+ * Atomically set bit number @a bit of @a target and return its old value.
+ * The target may be a single atomic variable or an array of them.
+ *
+ * @param target Address of atomic variable or array.
+ * @param bit Bit number (starting from 0).
+ *
+ * @return 1 if the bit was set, 0 if it wasn't.
+ */
+ static inline int
+ atomic_test_and_set_bit(atomic_t *target, int bit)
+ {
+ atomic_val_t mask = ATOMIC_MASK(bit);
+ atomic_val_t old;
+
+ old = atomic_or(ATOMIC_ELEM(target, bit), mask);
+
+ return (old & mask) != 0;
+ }
+
+ /**
+ * @brief Atomically clear a bit.
+ *
+ * Atomically clear bit number @a bit of @a target.
+ * The target may be a single atomic variable or an array of them.
+ *
+ * @param target Address of atomic variable or array.
+ * @param bit Bit number (starting from 0).
+ *
+ * @return N/A
+ */
+ static inline void
+ atomic_clear_bit(atomic_t *target, int bit)
+ {
+ atomic_val_t mask = ATOMIC_MASK(bit);
+
+ atomic_and(ATOMIC_ELEM(target, bit), ~mask);
+ }
+
+ /**
+ * @brief Atomically set a bit.
+ *
+ * Atomically set bit number @a bit of @a target.
+ * The target may be a single atomic variable or an array of them.
+ *
+ * @param target Address of atomic variable or array.
+ * @param bit Bit number (starting from 0).
+ *
+ * @return N/A
+ */
+ static inline void
+ atomic_set_bit(atomic_t *target, int bit)
+ {
+ atomic_val_t mask = ATOMIC_MASK(bit);
+
+ atomic_or(ATOMIC_ELEM(target, bit), mask);
+ }
+
+/**
+* @brief Atomically set a bit to a given value.
+*
+* Atomically set bit number @a bit of @a target to value @a val.
+* The target may be a single atomic variable or an array of them.
+*
+* @param target Address of atomic variable or array.
+* @param bit Bit number (starting from 0).
+* @param val true for 1, false for 0.
+*
+* @return N/A
+*/
+static inline void atomic_set_bit_to(atomic_t *target, int bit, bool val)
+{
+ atomic_val_t mask = ATOMIC_MASK(bit);
+
+ if (val) {
+ (void)atomic_or(ATOMIC_ELEM(target, bit), mask);
+ } else {
+ (void)atomic_and(ATOMIC_ELEM(target, bit), ~mask);
+ }
+}
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __ATOMIC_H__ */
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/cdb.h b/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/cdb.h
new file mode 100644
index 00000000..8f9a6bc9
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/cdb.h
@@ -0,0 +1,267 @@
+/*
+ * Copyright (c) 2019 Tobias Svehagen
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+#ifndef _BLUETOOTH_MESH_CDB_H_
+#define _BLUETOOTH_MESH_CDB_H_
+
+#include "syscfg/syscfg.h"
+
+#if MYNEWT_VAL(BLE_MESH_CDB)
+#define NODE_COUNT CONFIG_BT_MESH_NODE_COUNT
+#define SUBNET_COUNT CONFIG_BT_MESH_SUBNET_COUNT
+#define APP_KEY_COUNT CONFIG_BT_MESH_APP_KEY_COUNT
+#else
+#define NODE_COUNT 0
+#define SUBNET_COUNT 0
+#define APP_KEY_COUNT 0
+#endif
+
+#include "atomic.h"
+
+enum {
+ BT_MESH_CDB_NODE_CONFIGURED,
+ BT_MESH_CDB_NODE_BLACKLISTED,
+
+ BT_MESH_CDB_NODE_FLAG_COUNT
+};
+
+struct bt_mesh_cdb_node {
+ uint8_t uuid[16];
+ uint16_t addr;
+ uint16_t net_idx;
+ uint8_t num_elem;
+ uint8_t dev_key[16];
+
+ ATOMIC_DEFINE(flags, BT_MESH_CDB_NODE_FLAG_COUNT);
+};
+
+struct bt_mesh_cdb_subnet {
+ uint16_t net_idx;
+
+ bool kr_flag;
+ uint8_t kr_phase;
+
+ struct {
+ uint8_t net_key[16];
+ } keys[2];
+};
+
+struct bt_mesh_cdb_app_key {
+ uint16_t net_idx;
+ uint16_t app_idx;
+
+ struct {
+ uint8_t app_key[16];
+ } keys[2];
+};
+
+enum {
+ BT_MESH_CDB_VALID,
+ BT_MESH_CDB_SUBNET_PENDING,
+ BT_MESH_CDB_KEYS_PENDING,
+ BT_MESH_CDB_NODES_PENDING,
+ BT_MESH_CDB_IVU_IN_PROGRESS,
+
+ BT_MESH_CDB_FLAG_COUNT,
+};
+
+struct bt_mesh_cdb {
+ uint32_t iv_index;
+
+ ATOMIC_DEFINE(flags, BT_MESH_CDB_FLAG_COUNT);
+
+ struct bt_mesh_cdb_node nodes[NODE_COUNT];
+ struct bt_mesh_cdb_subnet subnets[SUBNET_COUNT];
+ struct bt_mesh_cdb_app_key app_keys[APP_KEY_COUNT];
+};
+
+extern struct bt_mesh_cdb bt_mesh_cdb;
+
+/** @brief Create the Mesh Configuration Database.
+ *
+ * Create and initialize the Mesh Configuration Database. A primary subnet,
+ * ie one with NetIdx 0, will be added and the provided key will be used as
+ * NetKey for that subnet.
+ *
+ * @param key The NetKey to be used for the primary subnet.
+ *
+ * @return 0 on success or negative error code on failure.
+ */
+int bt_mesh_cdb_create(const uint8_t key[16]);
+
+/** @brief Clear the Mesh Configuration Database.
+ *
+ * Remove all nodes, subnets and app-keys stored in the database and mark
+ * the database as invalid. The data will be cleared from persistent storage
+ * if CONFIG_BT_SETTINGS is enabled.
+ */
+void bt_mesh_cdb_clear(void);
+
+/** @brief Set and store the IV Index and IV Update flag.
+ *
+ * The IV Index stored in the CDB will be the one used during provisioning
+ * of new nodes. This function is generally only used from inside the stack.
+ *
+ * This function will store the data to persistent storage if
+ * CONFIG_BT_SETTINGS is enabled.
+ *
+ * @param iv_index The new IV Index to use.
+ * @param iv_update True if there is an ongoing IV Update procedure.
+ */
+void bt_mesh_cdb_iv_update(uint32_t iv_index, bool iv_update);
+
+/** @brief Allocate a node.
+ *
+ * Allocate a new node in the CDB.
+ *
+ * @param uuid UUID of the node.
+ * @param addr Address of the node's primary element. If 0, the lowest
+ * possible address available will be assigned to the node.
+ * @param num_elem Number of elements that the node has.
+ * @param net_idx NetIdx that the node was provisioned to.
+ *
+ * @return The new node or NULL if it cannot be allocated.
+ */
+struct bt_mesh_cdb_node *bt_mesh_cdb_node_alloc(const uint8_t uuid[16], uint16_t addr,
+ uint8_t num_elem, uint16_t net_idx);
+
+/** @brief Delete a node.
+ *
+ * Delete a node from the CDB.
+ *
+ * @param node The node to be deleted.
+ * @param store If true, the node will be cleared from persistent storage.
+ */
+void bt_mesh_cdb_node_del(struct bt_mesh_cdb_node *node, bool store);
+
+/** @brief Get a node by address.
+ *
+ * Try to find the node that has the provided address assigned to one of its
+ * elements.
+ *
+ * @param addr Address of the element to look for.
+ *
+ * @return The node that has an element with address addr or NULL if no such
+ * node exists.
+ */
+struct bt_mesh_cdb_node *bt_mesh_cdb_node_get(uint16_t addr);
+
+/** @brief Store node to persistent storage.
+ *
+ * @param node Node to be stored.
+ */
+void bt_mesh_cdb_node_store(const struct bt_mesh_cdb_node *node);
+
+enum {
+ BT_MESH_CDB_ITER_STOP = 0,
+ BT_MESH_CDB_ITER_CONTINUE,
+};
+
+/** @typedef bt_mesh_cdb_node_func_t
+ * @brief Node iterator callback.
+ *
+ * @param node Node found.
+ * @param user_data Data given.
+ *
+ * @return BT_MESH_CDB_ITER_CONTINUE to continue to iterate through the nodes
+ * or BT_MESH_CDB_ITER_STOP to stop.
+ */
+typedef uint8_t (*bt_mesh_cdb_node_func_t)(struct bt_mesh_cdb_node *node,
+ void *user_data);
+
+/** @brief Node iterator.
+ *
+ * Iterate nodes in the Mesh Configuration Database. The callback function
+ * will only be called for valid, ie allocated, nodes.
+ *
+ * @param func Callback function.
+ * @param user_data Data to pass to the callback.
+ */
+void bt_mesh_cdb_node_foreach(bt_mesh_cdb_node_func_t func, void *user_data);
+
+/** @brief Allocate a subnet.
+ *
+ * Allocate a new subnet in the CDB.
+ *
+ * @param net_idx NetIdx of the subnet.
+ *
+ * @return The new subnet or NULL if it cannot be allocated.
+ */
+struct bt_mesh_cdb_subnet *bt_mesh_cdb_subnet_alloc(uint16_t net_idx);
+
+/** @brief Delete a subnet.
+ *
+ * Delete a subnet from the CDB.
+ *
+ * @param sub The subnet to be deleted.
+ * @param store If true, the subnet will be cleared from persistent storage.
+ */
+void bt_mesh_cdb_subnet_del(struct bt_mesh_cdb_subnet *sub, bool store);
+
+/** @brief Get a subnet by NetIdx
+ *
+ * Try to find the subnet with the specified NetIdx.
+ *
+ * @param net_idx NetIdx of the subnet to look for.
+ *
+ * @return The subnet with the specified NetIdx or NULL if no such subnet
+ * exists.
+ */
+struct bt_mesh_cdb_subnet *bt_mesh_cdb_subnet_get(uint16_t net_idx);
+
+/** @brief Store subnet to persistent storage.
+ *
+ * @param sub Subnet to be stored.
+ */
+void bt_mesh_cdb_subnet_store(const struct bt_mesh_cdb_subnet *sub);
+
+/** @brief Get the flags for a subnet
+ *
+ * @param sub The subnet to get flags for.
+ *
+ * @return The flags for the subnet.
+ */
+uint8_t bt_mesh_cdb_subnet_flags(const struct bt_mesh_cdb_subnet *sub);
+
+
+/** @brief Allocate an application key.
+ *
+ * Allocate a new application key in the CDB.
+ *
+ * @param net_idx NetIdx of NetKey that the application key is bound to.
+ * @param app_idx AppIdx of the application key.
+ *
+ * @return The new application key or NULL if it cannot be allocated.
+ */
+struct bt_mesh_cdb_app_key *bt_mesh_cdb_app_key_alloc(uint16_t net_idx,
+ uint16_t app_idx);
+
+/** @brief Delete an application key.
+ *
+ * Delete an application key from the CDB.
+ *
+ * @param key The application key to be deleted.
+ * @param store If true, the key will be cleared from persistent storage.
+ */
+void bt_mesh_cdb_app_key_del(struct bt_mesh_cdb_app_key *key, bool store);
+
+/** @brief Get an application key by AppIdx
+ *
+ * Try to find the application key with the specified AppIdx.
+ *
+ * @param app_idx AppIdx of the application key to look for.
+ *
+ * @return The application key with the specified AppIdx or NULL if no such key
+ * exists.
+ */
+struct bt_mesh_cdb_app_key *bt_mesh_cdb_app_key_get(uint16_t app_idx);
+
+/** @brief Store application key to persistent storage.
+ *
+ * @param key Application key to be stored.
+ */
+void bt_mesh_cdb_app_key_store(const struct bt_mesh_cdb_app_key *key);
+
+#endif /* ZEPHYR_INCLUDE_BLUETOOTH_MESH_CDB_H_ */ \ No newline at end of file
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/cfg.h b/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/cfg.h
new file mode 100644
index 00000000..378f0a0a
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/cfg.h
@@ -0,0 +1,485 @@
+/** @file
+ * @brief Bluetooth Mesh Runtime Configuration APIs.
+ */
+
+/*
+ * Copyright (c) 2020 Nordic Semiconductor
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+#ifndef _BT_MESH_CFG_H_
+#define _BT_MESH_CFG_H_
+
+#include <stdbool.h>
+#include <stddef.h>
+#include <sys/types.h>
+
+/**
+ * @brief Bluetooth Mesh Runtime Configuration API
+ * @defgroup bt_mesh_cfg Bluetooth Mesh Runtime Configuration
+ * @ingroup bt_mesh
+ * @{
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Bluetooth Mesh Feature states */
+enum bt_mesh_feat_state {
+ /** Feature is supported, but disabled. */
+ BT_MESH_FEATURE_DISABLED,
+ /** Feature is supported and enabled. */
+ BT_MESH_FEATURE_ENABLED,
+ /** Feature is not supported, and cannot be enabled. */
+ BT_MESH_FEATURE_NOT_SUPPORTED,
+};
+
+/* Legacy feature defines */
+#define BT_MESH_RELAY_DISABLED BT_MESH_FEATURE_DISABLED
+#define BT_MESH_RELAY_ENABLED BT_MESH_FEATURE_ENABLED
+#define BT_MESH_RELAY_NOT_SUPPORTED BT_MESH_FEATURE_NOT_SUPPORTED
+
+#define BT_MESH_BEACON_DISABLED BT_MESH_FEATURE_DISABLED
+#define BT_MESH_BEACON_ENABLED BT_MESH_FEATURE_ENABLED
+
+#define BT_MESH_GATT_PROXY_DISABLED BT_MESH_FEATURE_DISABLED
+#define BT_MESH_GATT_PROXY_ENABLED BT_MESH_FEATURE_ENABLED
+#define BT_MESH_GATT_PROXY_NOT_SUPPORTED BT_MESH_FEATURE_NOT_SUPPORTED
+
+#define BT_MESH_FRIEND_DISABLED BT_MESH_FEATURE_DISABLED
+#define BT_MESH_FRIEND_ENABLED BT_MESH_FEATURE_ENABLED
+#define BT_MESH_FRIEND_NOT_SUPPORTED BT_MESH_FEATURE_NOT_SUPPORTED
+
+#define BT_MESH_NODE_IDENTITY_STOPPED BT_MESH_FEATURE_DISABLED
+#define BT_MESH_NODE_IDENTITY_RUNNING BT_MESH_FEATURE_ENABLED
+#define BT_MESH_NODE_IDENTITY_NOT_SUPPORTED BT_MESH_FEATURE_NOT_SUPPORTED
+
+/** @brief Enable or disable sending of the Secure Network Beacon.
+ *
+ * @param beacon New Secure Network Beacon state.
+ */
+void bt_mesh_beacon_set(bool beacon);
+
+/** @brief Get the current Secure Network Beacon state.
+ *
+ * @returns Whether the Secure Network Beacon feature is enabled.
+ */
+bool bt_mesh_beacon_enabled(void);
+
+/** @brief Set the default TTL value.
+ *
+ * The default TTL value is used when no explicit TTL value is set. Models will
+ * use the default TTL value when @ref bt_mesh_msg_ctx::send_ttl is
+ * @ref BT_MESH_TTL_DEFAULT.
+ *
+ * @param default_ttl The new default TTL value. Valid values are 0x00 and 0x02
+ * to @ref BT_MESH_TTL_MAX.
+ *
+ * @retval 0 Successfully set the default TTL value.
+ * @retval -EINVAL Invalid TTL value.
+ */
+int bt_mesh_default_ttl_set(uint8_t default_ttl);
+
+/** @brief Get the current default TTL value.
+ *
+ * @return The current default TTL value.
+ */
+uint8_t bt_mesh_default_ttl_get(void);
+
+/** @brief Set the Network Transmit parameters.
+ *
+ * The Network Transmit parameters determine the parameters local messages are
+ * transmitted with.
+ *
+ * @see BT_MESH_TRANSMIT
+ *
+ * @param xmit New Network Transmit parameters. Use @ref BT_MESH_TRANSMIT for
+ * encoding.
+ */
+void bt_mesh_net_transmit_set(uint8_t xmit);
+
+/** @brief Get the current Network Transmit parameters.
+ *
+ * The @ref BT_MESH_TRANSMIT_COUNT and @ref BT_MESH_TRANSMIT_INT macros can be
+ * used to decode the Network Transmit parameters.
+ *
+ * @return The current Network Transmit parameters.
+ */
+uint8_t bt_mesh_net_transmit_get(void);
+
+/** @brief Configure the Relay feature.
+ *
+ * Enable or disable the Relay feature, and configure the parameters to
+ * transmit relayed messages with.
+ *
+ * Support for the Relay feature must be enabled through the
+ * @c CONFIG_BT_MESH_RELAY configuration option.
+ *
+ * @see BT_MESH_TRANSMIT
+ *
+ * @param relay New Relay feature state. Must be one of
+ * @ref BT_MESH_FEATURE_ENABLED and
+ * @ref BT_MESH_FEATURE_DISABLED.
+ * @param xmit New Relay retransmit parameters. Use @ref BT_MESH_TRANSMIT for
+ * encoding.
+ *
+ * @retval 0 Successfully changed the Relay configuration.
+ * @retval -ENOTSUP The Relay feature is not supported.
+ * @retval -EINVAL Invalid parameter.
+ * @retval -EALREADY Already using the given parameters.
+ */
+int bt_mesh_relay_set(enum bt_mesh_feat_state relay, uint8_t xmit);
+
+/** @brief Get the current Relay feature state.
+ *
+ * @returns The Relay feature state.
+ */
+enum bt_mesh_feat_state bt_mesh_relay_get(void);
+
+/** @brief Get the current Relay Retransmit parameters.
+ *
+ * The @ref BT_MESH_TRANSMIT_COUNT and @ref BT_MESH_TRANSMIT_INT macros can be
+ * used to decode the Relay Retransmit parameters.
+ *
+ * @return The current Relay Retransmit parameters, or 0 if relay is not
+ * supported.
+ */
+uint8_t bt_mesh_relay_retransmit_get(void);
+
+/** @brief Enable or disable the GATT Proxy feature.
+ *
+ * Support for the GATT Proxy feature must be enabled through the
+ * @c CONFIG_BT_MESH_GATT_PROXY configuration option.
+ *
+ * @note The GATT Proxy feature only controls a Proxy node's ability to relay
+ * messages to the mesh network. A node that supports GATT Proxy will
+ * still advertise Connectable Proxy beacons, even if the feature is
+ * disabled. The Proxy feature can only be fully disabled through compile
+ * time configuration.
+ *
+ * @param gatt_proxy New GATT Proxy state. Must be one of
+ * @ref BT_MESH_FEATURE_ENABLED and
+ * @ref BT_MESH_FEATURE_DISABLED.
+ *
+ * @retval 0 Successfully changed the GATT Proxy feature state.
+ * @retval -ENOTSUP The GATT Proxy feature is not supported.
+ * @retval -EINVAL Invalid parameter.
+ * @retval -EALREADY Already in the given state.
+ */
+int bt_mesh_gatt_proxy_set(enum bt_mesh_feat_state gatt_proxy);
+
+/** @brief Get the current GATT Proxy state.
+ *
+ * @returns The GATT Proxy feature state.
+ */
+enum bt_mesh_feat_state bt_mesh_gatt_proxy_get(void);
+
+/** @brief Enable or disable the Friend feature.
+ *
+ * Any active friendships will be terminated immediately if the Friend feature
+ * is disabled.
+ *
+ * Support for the Friend feature must be enabled through the
+ * @c CONFIG_BT_MESH_FRIEND configuration option.
+ *
+ * @param friendship New Friend feature state. Must be one of
+ * @ref BT_MESH_FEATURE_ENABLED and
+ * @ref BT_MESH_FEATURE_DISABLED.
+ *
+ * @retval 0 Successfully changed the Friend feature state.
+ * @retval -ENOTSUP The Friend feature is not supported.
+ * @retval -EINVAL Invalid parameter.
+ * @retval -EALREADY Already in the given state.
+ */
+int bt_mesh_friend_set(enum bt_mesh_feat_state friendship);
+
+/** @brief Get the current Friend state.
+ *
+ * @returns The Friend feature state.
+ */
+enum bt_mesh_feat_state bt_mesh_friend_get(void);
+
+/**
+ * @brief Bluetooth Mesh Subnet Configuration
+ * @defgroup bt_mesh_cfg_subnet Bluetooth Mesh Subnet Configuration
+ * @{
+ */
+
+/** @brief Add a Subnet.
+ *
+ * Adds a subnet with the given network index and network key to the list of
+ * known Subnets. All messages sent on the given Subnet will be processed by
+ * this node, and the node may send and receive Network Beacons on the given
+ * Subnet.
+ *
+ * @param net_idx Network index.
+ * @param key Root network key of the Subnet. All other keys are derived
+ * from this.
+ *
+ * @retval STATUS_SUCCESS The Subnet was successfully added.
+ * @retval STATUS_INSUFF_RESOURCES No room for this Subnet.
+ * @retval STATUS_UNSPECIFIED The Subnet couldn't be created for some reason.
+ */
+uint8_t bt_mesh_subnet_add(uint16_t net_idx, const uint8_t key[16]);
+
+/** @brief Update the given Subnet.
+ *
+ * Starts the Key Refresh procedure for this Subnet by adding a second set of
+ * encryption keys. The Subnet will continue sending with the old key (but
+ * receiving messages using both) until the Subnet enters Key Refresh phase 2.
+ *
+ * This allows a network configurator to replace old network and application
+ * keys for the entire network, effectively removing access for all nodes that
+ * aren't given the new keys.
+ *
+ * @param net_idx Network index.
+ * @param key New root network key of the Subnet.
+ *
+ * @retval STATUS_SUCCESS The Subnet was updated with a second key.
+ * @retval STATUS_INVALID_NETKEY The NetIdx is unknown.
+ * @retval STATUS_IDX_ALREADY_STORED The @c key value is the same as the
+ * current key.
+ * @retval STATUS_CANNOT_UPDATE The Subnet cannot be updated for some reason.
+ */
+uint8_t bt_mesh_subnet_update(uint16_t net_idx, const uint8_t key[16]);
+
+/** @brief Delete a Subnet.
+ *
+ * Removes the Subnet with the given network index from the node. The node will
+ * stop sending Network Beacons with the given Subnet, and can no longer
+ * process messages on this Subnet.
+ *
+ * All Applications bound to this Subnet are also deleted.
+ *
+ * @param net_idx Network index.
+ *
+ * @retval STATUS_SUCCESS The Subnet was deleted.
+ * @retval STATUS_INVALID_NETKEY The NetIdx is unknown.
+ */
+uint8_t bt_mesh_subnet_del(uint16_t net_idx);
+
+/** @brief Check whether a Subnet is known.
+ *
+ * @param net_idx Network index
+ *
+ * @return true if a Subnet with the given index exists, false otherwise.
+ */
+bool bt_mesh_subnet_exists(uint16_t net_idx);
+
+/** @brief Set the Subnet's Key Refresh phase.
+ *
+ * The Key Refresh procedure is started by updating the Subnet keys through
+ * @ref bt_mesh_subnet_update. This puts the Subnet in Key Refresh Phase 1.
+ * Once all nodes have received the new Subnet key, Key Refresh Phase 2 can be
+ * activated through this function to start transmitting with the new network
+ * key. Finally, to revoke the old key, set the Key Refresh Phase to 3. This
+ * removes the old keys from the node, and returns the Subnet back to normal
+ * single-key operation with the new key set.
+ *
+ * @param net_idx Network index.
+ * @param phase Pointer to the new Key Refresh phase. Will return the actual
+ * Key Refresh phase after updating.
+ *
+ * @retval STATUS_SUCCESS The Key Refresh phase of the Subnet was successfully
+ * changed.
+ * @retval STATUS_INVALID_NETKEY The NetIdx is unknown.
+ * @retval STATUS_CANNOT_UPDATE The given phase change is invalid.
+ */
+uint8_t bt_mesh_subnet_kr_phase_set(uint16_t net_idx, uint8_t *phase);
+
+/** @brief Get the Subnet's Key Refresh phase.
+ *
+ * @param net_idx Network index.
+ * @param phase Pointer to the Key Refresh variable to fill.
+ *
+ * @retval STATUS_SUCCESS Successfully populated the @c phase variable.
+ * @retval STATUS_INVALID_NETKEY The NetIdx is unknown.
+ */
+uint8_t bt_mesh_subnet_kr_phase_get(uint16_t net_idx, uint8_t *phase);
+
+/** @brief Set the Node Identity state of the Subnet.
+ *
+ * The Node Identity state of a Subnet determines whether the Subnet advertises
+ * connectable Node Identity beacons for Proxy Clients to connect to.
+ * Once started, the Node Identity beacon runs for 60 seconds, or until it is
+ * stopped.
+ *
+ * This function serves the same purpose as @ref bt_mesh_proxy_identity_enable,
+ * but only acts on a single Subnet.
+ *
+ * GATT Proxy support must be enabled through
+ * @option{CONFIG_BT_MESH_GATT_PROXY}.
+ *
+ * @param net_idx Network index.
+ * @param node_id New Node Identity state, must be either @ref
+ * BT_MESH_FEATURE_ENABLED or @ref BT_MESH_FEATURE_DISABLED.
+ *
+ * @retval STATUS_SUCCESS Successfully set the Node Identity state of the
+ * Subnet.
+ * @retval STATUS_INVALID_NETKEY The NetIdx is unknown.
+ * @retval STATUS_FEAT_NOT_SUPP The Node Identity feature is not supported.
+ * @retval STATUS_CANNOT_SET Couldn't set the Node Identity state.
+ */
+uint8_t bt_mesh_subnet_node_id_set(uint16_t net_idx,
+ enum bt_mesh_feat_state node_id);
+
+/** @brief Get the Node Identity state of the Subnet.
+ *
+ * @param net_idx Network index.
+ * @param node_id Node Identity variable to fill.
+ *
+ * @retval STATUS_SUCCESS Successfully populated the @c node_id variable.
+ * @retval STATUS_INVALID_NETKEY The NetIdx is unknown.
+ */
+uint8_t bt_mesh_subnet_node_id_get(uint16_t net_idx,
+ enum bt_mesh_feat_state *node_id);
+
+/** @brief Get a list of all known Subnet indexes.
+ *
+ * Builds a list of all known Subnet indexes in the @c net_idxs array.
+ * If the @c net_idxs array is smaller than the list of known Subnets, this
+ * function fills all available entries and returns @c -ENOMEM. In this
+ * case, the next @c max entries of the list can be read out by calling
+ * @code
+ * bt_mesh_subnets_get(list, max, max);
+ * @endcode
+ *
+ * Note that any changes to the Subnet list between calls to this function
+ * could change the order and number of entries in the list.
+ *
+ * @param net_idxs Array to fill.
+ * @param max Max number of indexes to return.
+ * @param skip Number of indexes to skip. Enables batched processing of the
+ * list.
+ *
+ * @return The number of indexes added to the @c net_idxs array, or @c -ENOMEM
+ * if the number of known Subnets exceeds the @c max parameter.
+ */
+ssize_t bt_mesh_subnets_get(uint16_t net_idxs[], size_t max, off_t skip);
+
+/**
+ * @}
+ */
+
+/**
+ * @brief Bluetooth Mesh Application Configuration
+ * @defgroup bt_mesh_cfg_app Bluetooth Mesh Application Configuration
+ * @{
+ */
+
+/** @brief Add an Application key.
+ *
+ * Adds the Application with the given index to the list of known applications.
+ * Allows the node to send and receive model messages encrypted with this
+ * Application key.
+ *
+ * Every Application is bound to a specific Subnet. The node must know the
+ * Subnet the Application is bound to before it can add the Application.
+ *
+ * @param app_idx Application index.
+ * @param net_idx Network index the Application is bound to.
+ * @param key Application key value.
+ *
+ * @retval STATUS_SUCCESS The Application was successfully added.
+ * @retval STATUS_INVALID_NETKEY The NetIdx is unknown.
+ * @retval STATUS_INSUFF_RESOURCES There's no room for storing this
+ * Application.
+ * @retval STATUS_INVALID_BINDING This AppIdx is already bound to another
+ * Subnet.
+ * @retval STATUS_IDX_ALREADY_STORED This AppIdx is already stored with a
+ * different key value.
+ * @retval STATUS_CANNOT_SET Cannot set the Application key for some reason.
+ */
+uint8_t bt_mesh_app_key_add(uint16_t app_idx, uint16_t net_idx,
+ const uint8_t key[16]);
+
+/** @brief Update an Application key.
+ *
+ * Update an Application with a second Application key, as part of the
+ * Key Refresh procedure of the bound Subnet. The node will continue
+ * transmitting with the old application key (but receiving on both) until the
+ * Subnet enters Key Refresh phase 2. Once the Subnet enters Key Refresh phase
+ * 3, the old application key will be deleted.
+ *
+ * @note The Application key can only be updated if the bound Subnet is in Key
+ * Refresh phase 1.
+ *
+ * @param app_idx Application index.
+ * @param net_idx Network index the Application is bound to, or
+ * @ref BT_MESH_KEY_ANY to skip the binding check.
+ * @param key New key value.
+ *
+ * @retval STATUS_SUCCESS The Application key was successfully updated.
+ * @retval STATUS_INVALID_NETKEY The NetIdx is unknown.
+ * @retval STATUS_INVALID_BINDING This AppIdx is not bound to the given NetIdx.
+ * @retval STATUS_CANNOT_UPDATE The Application key cannot be updated for some
+ * reason.
+ * @retval STATUS_IDX_ALREADY_STORED This AppIdx is already updated with a
+ * different key value.
+ */
+uint8_t bt_mesh_app_key_update(uint16_t app_idx, uint16_t net_idx,
+ const uint8_t key[16]);
+
+/** @brief Delete an Application key.
+ *
+ * All models bound to this application will remove this binding.
+ * All models publishing with this application will stop publishing.
+ *
+ * @param app_idx Application index.
+ * @param net_idx Network index.
+ *
+ * @retval STATUS_SUCCESS The Application key was successfully deleted.
+ * @retval STATUS_INVALID_NETKEY The NetIdx is unknown.
+ * @retval STATUS_INVALID_BINDING This AppIdx is not bound to the given NetIdx.
+ */
+uint8_t bt_mesh_app_key_del(uint16_t app_idx, uint16_t net_idx);
+
+/** @brief Check if an Application key is known.
+ *
+ * @param app_idx Application index.
+ *
+ * @return true if the Application is known, false otherwise.
+ */
+bool bt_mesh_app_key_exists(uint16_t app_idx);
+
+/** @brief Get a list of all known Application key indexes.
+ *
+ * Builds a list of all Application indexes for the given network index in the
+ * @c app_idxs array. If the @c app_idxs array cannot fit all bound
+ * Applications, this function fills all available entries and returns @c
+ * -ENOMEM. In this case, the next @c max entries of the list can be read out
+ * by calling
+ * @code
+ * bt_mesh_app_keys_get(net_idx, list, max, max);
+ * @endcode
+ *
+ * Note that any changes to the Application key list between calls to this
+ * function could change the order and number of entries in the list.
+ *
+ * @param net_idx Network Index to get the Applications of, or @ref
+ * BT_MESH_KEY_ANY to get all Applications.
+ * @param app_idxs Array to fill.
+ * @param max Max number of indexes to return.
+ * @param skip Number of indexes to skip. Enables batched processing of the
+ * list.
+ *
+ * @return The number of indexes added to the @c app_idxs array, or @c -ENOMEM
+ * if the number of known Applications exceeds the @c max parameter.
+ */
+ssize_t bt_mesh_app_keys_get(uint16_t net_idx, uint16_t app_idxs[], size_t max,
+ off_t skip);
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+/**
+ * @}
+ */
+
+#endif /* _BT_MESH_CFG_H_ */ \ No newline at end of file
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/cfg_cli.h b/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/cfg_cli.h
index 7dc237be..bd2f9fe5 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/cfg_cli.h
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/cfg_cli.h
@@ -26,7 +26,7 @@ struct bt_mesh_cfg_cli {
struct bt_mesh_model *model;
struct k_sem op_sync;
- u32_t op_pending;
+ uint32_t op_pending;
void *op_param;
};
@@ -37,45 +37,81 @@ extern const struct bt_mesh_model_cb bt_mesh_cfg_cli_cb;
BT_MESH_MODEL_CB(BT_MESH_MODEL_ID_CFG_CLI, bt_mesh_cfg_cli_op, NULL, \
cli_data, &bt_mesh_cfg_cli_cb)
-int bt_mesh_cfg_comp_data_get(u16_t net_idx, u16_t addr, u8_t page,
- u8_t *status, struct os_mbuf *comp);
+int bt_mesh_cfg_node_reset(uint16_t net_idx, uint16_t addr, bool *status);
-int bt_mesh_cfg_beacon_get(u16_t net_idx, u16_t addr, u8_t *status);
+int bt_mesh_cfg_comp_data_get(uint16_t net_idx, uint16_t addr, uint8_t page,
+ uint8_t *status, struct os_mbuf *comp);
-int bt_mesh_cfg_beacon_set(u16_t net_idx, u16_t addr, u8_t val, u8_t *status);
+int bt_mesh_cfg_beacon_get(uint16_t net_idx, uint16_t addr, uint8_t *status);
-int bt_mesh_cfg_ttl_get(u16_t net_idx, u16_t addr, u8_t *ttl);
+int bt_mesh_cfg_beacon_set(uint16_t net_idx, uint16_t addr, uint8_t val, uint8_t *status);
-int bt_mesh_cfg_ttl_set(u16_t net_idx, u16_t addr, u8_t val, u8_t *ttl);
+int bt_mesh_cfg_ttl_get(uint16_t net_idx, uint16_t addr, uint8_t *ttl);
-int bt_mesh_cfg_friend_get(u16_t net_idx, u16_t addr, u8_t *status);
+int bt_mesh_cfg_ttl_set(uint16_t net_idx, uint16_t addr, uint8_t val, uint8_t *ttl);
-int bt_mesh_cfg_friend_set(u16_t net_idx, u16_t addr, u8_t val, u8_t *status);
+int bt_mesh_cfg_friend_get(uint16_t net_idx, uint16_t addr, uint8_t *status);
-int bt_mesh_cfg_gatt_proxy_get(u16_t net_idx, u16_t addr, u8_t *status);
+int bt_mesh_cfg_friend_set(uint16_t net_idx, uint16_t addr, uint8_t val, uint8_t *status);
-int bt_mesh_cfg_gatt_proxy_set(u16_t net_idx, u16_t addr, u8_t val,
- u8_t *status);
+int bt_mesh_cfg_gatt_proxy_get(uint16_t net_idx, uint16_t addr, uint8_t *status);
-int bt_mesh_cfg_relay_get(u16_t net_idx, u16_t addr, u8_t *status,
- u8_t *transmit);
+int bt_mesh_cfg_gatt_proxy_set(uint16_t net_idx, uint16_t addr, uint8_t val,
+ uint8_t *status);
-int bt_mesh_cfg_relay_set(u16_t net_idx, u16_t addr, u8_t new_relay,
- u8_t new_transmit, u8_t *status, u8_t *transmit);
+int bt_mesh_cfg_net_transmit_get(uint16_t net_idx, uint16_t addr,
+ uint8_t *transmit);
-int bt_mesh_cfg_net_key_add(u16_t net_idx, u16_t addr, u16_t key_net_idx,
- const u8_t net_key[16], u8_t *status);
+int bt_mesh_cfg_net_transmit_set(uint16_t net_idx, uint16_t addr,
+ uint8_t val, uint8_t *transmit);
-int bt_mesh_cfg_app_key_add(u16_t net_idx, u16_t addr, u16_t key_net_idx,
- u16_t key_app_idx, const u8_t app_key[16],
- u8_t *status);
+int bt_mesh_cfg_relay_get(uint16_t net_idx, uint16_t addr, uint8_t *status,
+ uint8_t *transmit);
-int bt_mesh_cfg_mod_app_bind(u16_t net_idx, u16_t addr, u16_t elem_addr,
- u16_t mod_app_idx, u16_t mod_id, u8_t *status);
+int bt_mesh_cfg_relay_set(uint16_t net_idx, uint16_t addr, uint8_t new_relay,
+ uint8_t new_transmit, uint8_t *status, uint8_t *transmit);
-int bt_mesh_cfg_mod_app_bind_vnd(u16_t net_idx, u16_t addr, u16_t elem_addr,
- u16_t mod_app_idx, u16_t mod_id, u16_t cid,
- u8_t *status);
+int bt_mesh_cfg_net_key_add(uint16_t net_idx, uint16_t addr, uint16_t key_net_idx,
+ const uint8_t net_key[16], uint8_t *status);
+
+int bt_mesh_cfg_net_key_get(uint16_t net_idx, uint16_t addr, uint16_t *keys,
+ size_t *key_cnt);
+
+int bt_mesh_cfg_net_key_del(uint16_t net_idx, uint16_t addr,
+ uint16_t key_net_idx, uint8_t *status);
+
+int bt_mesh_cfg_app_key_add(uint16_t net_idx, uint16_t addr, uint16_t key_net_idx,
+ uint16_t key_app_idx, const uint8_t app_key[16],
+ uint8_t *status);
+
+int bt_mesh_cfg_app_key_get(uint16_t net_idx, uint16_t addr, uint16_t key_net_idx,
+ uint8_t *status, uint16_t *keys, size_t *key_cnt);
+
+int bt_mesh_cfg_app_key_del(uint16_t net_idx, uint16_t addr,
+ uint16_t key_net_idx, uint16_t key_app_idx, uint8_t *status);
+
+int bt_mesh_cfg_mod_app_bind(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ uint16_t mod_app_idx, uint16_t mod_id, uint8_t *status);
+
+int bt_mesh_cfg_mod_app_unbind(uint16_t net_idx, uint16_t addr,
+ uint16_t elem_addr, uint16_t mod_app_idx,
+ uint16_t mod_id, uint8_t *status);
+
+int bt_mesh_cfg_mod_app_bind_vnd(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ uint16_t mod_app_idx, uint16_t mod_id, uint16_t cid,
+ uint8_t *status);
+
+int bt_mesh_cfg_mod_app_unbind_vnd(uint16_t net_idx, uint16_t addr,
+ uint16_t elem_addr, uint16_t mod_app_idx, uint16_t mod_id,
+ uint16_t cid, uint8_t *status);
+
+int bt_mesh_cfg_mod_app_get(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ uint16_t mod_id, uint8_t *status, uint16_t *apps,
+ size_t *app_cnt);
+
+int bt_mesh_cfg_mod_app_get_vnd(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ uint16_t mod_id, uint16_t cid, uint8_t *status,
+ uint16_t *apps, size_t *app_cnt);
/** @def BT_MESH_PUB_PERIOD_100MS
*
@@ -120,109 +156,117 @@ int bt_mesh_cfg_mod_app_bind_vnd(u16_t net_idx, u16_t addr, u16_t elem_addr,
#define BT_MESH_PUB_PERIOD_10MIN(steps) (((steps) & BIT_MASK(6)) | (3 << 6))
struct bt_mesh_cfg_mod_pub {
- u16_t addr;
- u16_t app_idx;
+ uint16_t addr;
+ uint16_t app_idx;
bool cred_flag;
- u8_t ttl;
- u8_t period;
- u8_t transmit;
+ uint8_t ttl;
+ uint8_t period;
+ uint8_t transmit;
};
-int bt_mesh_cfg_mod_pub_get(u16_t net_idx, u16_t addr, u16_t elem_addr,
- u16_t mod_id, struct bt_mesh_cfg_mod_pub *pub,
- u8_t *status);
+int bt_mesh_cfg_mod_pub_get(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ uint16_t mod_id, struct bt_mesh_cfg_mod_pub *pub,
+ uint8_t *status);
+
+int bt_mesh_cfg_mod_pub_get_vnd(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ uint16_t mod_id, uint16_t cid,
+ struct bt_mesh_cfg_mod_pub *pub, uint8_t *status);
+
+int bt_mesh_cfg_mod_pub_set(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ uint16_t mod_id, struct bt_mesh_cfg_mod_pub *pub,
+ uint8_t *status);
-int bt_mesh_cfg_mod_pub_get_vnd(u16_t net_idx, u16_t addr, u16_t elem_addr,
- u16_t mod_id, u16_t cid,
- struct bt_mesh_cfg_mod_pub *pub, u8_t *status);
+int bt_mesh_cfg_mod_pub_set_vnd(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ uint16_t mod_id, uint16_t cid,
+ struct bt_mesh_cfg_mod_pub *pub, uint8_t *status);
-int bt_mesh_cfg_mod_pub_set(u16_t net_idx, u16_t addr, u16_t elem_addr,
- u16_t mod_id, struct bt_mesh_cfg_mod_pub *pub,
- u8_t *status);
+int bt_mesh_cfg_mod_sub_add(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ uint16_t sub_addr, uint16_t mod_id, uint8_t *status);
-int bt_mesh_cfg_mod_pub_set_vnd(u16_t net_idx, u16_t addr, u16_t elem_addr,
- u16_t mod_id, u16_t cid,
- struct bt_mesh_cfg_mod_pub *pub, u8_t *status);
+int bt_mesh_cfg_mod_sub_add_vnd(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ uint16_t sub_addr, uint16_t mod_id, uint16_t cid,
+ uint8_t *status);
-int bt_mesh_cfg_mod_sub_add(u16_t net_idx, u16_t addr, u16_t elem_addr,
- u16_t sub_addr, u16_t mod_id, u8_t *status);
+int bt_mesh_cfg_mod_sub_del(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ uint16_t sub_addr, uint16_t mod_id, uint8_t *status);
-int bt_mesh_cfg_mod_sub_add_vnd(u16_t net_idx, u16_t addr, u16_t elem_addr,
- u16_t sub_addr, u16_t mod_id, u16_t cid,
- u8_t *status);
+int bt_mesh_cfg_mod_sub_del_vnd(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ uint16_t sub_addr, uint16_t mod_id, uint16_t cid,
+ uint8_t *status);
-int bt_mesh_cfg_mod_sub_del(u16_t net_idx, u16_t addr, u16_t elem_addr,
- u16_t sub_addr, u16_t mod_id, u8_t *status);
+int bt_mesh_cfg_mod_sub_overwrite(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ uint16_t sub_addr, uint16_t mod_id, uint8_t *status);
-int bt_mesh_cfg_mod_sub_del_vnd(u16_t net_idx, u16_t addr, u16_t elem_addr,
- u16_t sub_addr, u16_t mod_id, u16_t cid,
- u8_t *status);
+int bt_mesh_cfg_mod_sub_overwrite_vnd(uint16_t net_idx, uint16_t addr,
+ uint16_t elem_addr, uint16_t sub_addr,
+ uint16_t mod_id, uint16_t cid, uint8_t *status);
-int bt_mesh_cfg_mod_sub_overwrite(u16_t net_idx, u16_t addr, u16_t elem_addr,
- u16_t sub_addr, u16_t mod_id, u8_t *status);
+int bt_mesh_cfg_mod_sub_va_add(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ const uint8_t label[16], uint16_t mod_id,
+ uint16_t *virt_addr, uint8_t *status);
-int bt_mesh_cfg_mod_sub_overwrite_vnd(u16_t net_idx, u16_t addr,
- u16_t elem_addr, u16_t sub_addr,
- u16_t mod_id, u16_t cid, u8_t *status);
+int bt_mesh_cfg_mod_sub_va_add_vnd(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ const uint8_t label[16], uint16_t mod_id,
+ uint16_t cid, uint16_t *virt_addr, uint8_t *status);
-int bt_mesh_cfg_mod_sub_va_add(u16_t net_idx, u16_t addr, u16_t elem_addr,
- const u8_t label[16], u16_t mod_id,
- u16_t *virt_addr, u8_t *status);
+int bt_mesh_cfg_mod_sub_va_del(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ const uint8_t label[16], uint16_t mod_id,
+ uint16_t *virt_addr, uint8_t *status);
-int bt_mesh_cfg_mod_sub_va_add_vnd(u16_t net_idx, u16_t addr, u16_t elem_addr,
- const u8_t label[16], u16_t mod_id,
- u16_t cid, u16_t *virt_addr, u8_t *status);
+int bt_mesh_cfg_mod_sub_va_del_vnd(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ const uint8_t label[16], uint16_t mod_id,
+ uint16_t cid, uint16_t *virt_addr, uint8_t *status);
-int bt_mesh_cfg_mod_sub_va_del(u16_t net_idx, u16_t addr, u16_t elem_addr,
- const u8_t label[16], u16_t mod_id,
- u16_t *virt_addr, u8_t *status);
+int bt_mesh_cfg_mod_sub_va_overwrite(uint16_t net_idx, uint16_t addr,
+ uint16_t elem_addr, const uint8_t label[16],
+ uint16_t mod_id, uint16_t *virt_addr,
+ uint8_t *status);
-int bt_mesh_cfg_mod_sub_va_del_vnd(u16_t net_idx, u16_t addr, u16_t elem_addr,
- const u8_t label[16], u16_t mod_id,
- u16_t cid, u16_t *virt_addr, u8_t *status);
+int bt_mesh_cfg_mod_sub_va_overwrite_vnd(uint16_t net_idx, uint16_t addr,
+ uint16_t elem_addr, const uint8_t label[16],
+ uint16_t mod_id, uint16_t cid,
+ uint16_t *virt_addr, uint8_t *status);
-int bt_mesh_cfg_mod_sub_va_overwrite(u16_t net_idx, u16_t addr,
- u16_t elem_addr, const u8_t label[16],
- u16_t mod_id, u16_t *virt_addr,
- u8_t *status);
+int bt_mesh_cfg_mod_sub_get(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ uint16_t mod_id, uint8_t *status, uint16_t *subs,
+ size_t *sub_cnt);
-int bt_mesh_cfg_mod_sub_va_overwrite_vnd(u16_t net_idx, u16_t addr,
- u16_t elem_addr, const u8_t label[16],
- u16_t mod_id, u16_t cid,
- u16_t *virt_addr, u8_t *status);
+int bt_mesh_cfg_mod_sub_get_vnd(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ uint16_t mod_id, uint16_t cid, uint8_t *status,
+ uint16_t *subs, size_t *sub_cnt);
struct bt_mesh_cfg_hb_sub {
- u16_t src;
- u16_t dst;
- u8_t period;
- u8_t count;
- u8_t min;
- u8_t max;
+ uint16_t src;
+ uint16_t dst;
+ uint8_t period;
+ uint8_t count;
+ uint8_t min;
+ uint8_t max;
};
-int bt_mesh_cfg_hb_sub_set(u16_t net_idx, u16_t addr,
- struct bt_mesh_cfg_hb_sub *sub, u8_t *status);
+int bt_mesh_cfg_hb_sub_set(uint16_t net_idx, uint16_t addr,
+ struct bt_mesh_cfg_hb_sub *sub, uint8_t *status);
-int bt_mesh_cfg_hb_sub_get(u16_t net_idx, u16_t addr,
- struct bt_mesh_cfg_hb_sub *sub, u8_t *status);
+int bt_mesh_cfg_hb_sub_get(uint16_t net_idx, uint16_t addr,
+ struct bt_mesh_cfg_hb_sub *sub, uint8_t *status);
struct bt_mesh_cfg_hb_pub {
- u16_t dst;
- u8_t count;
- u8_t period;
- u8_t ttl;
- u16_t feat;
- u16_t net_idx;
+ uint16_t dst;
+ uint8_t count;
+ uint8_t period;
+ uint8_t ttl;
+ uint16_t feat;
+ uint16_t net_idx;
};
-int bt_mesh_cfg_hb_pub_set(u16_t net_idx, u16_t addr,
- const struct bt_mesh_cfg_hb_pub *pub, u8_t *status);
+int bt_mesh_cfg_hb_pub_set(uint16_t net_idx, uint16_t addr,
+ const struct bt_mesh_cfg_hb_pub *pub, uint8_t *status);
-int bt_mesh_cfg_hb_pub_get(u16_t net_idx, u16_t addr,
- struct bt_mesh_cfg_hb_pub *pub, u8_t *status);
+int bt_mesh_cfg_hb_pub_get(uint16_t net_idx, uint16_t addr,
+ struct bt_mesh_cfg_hb_pub *pub, uint8_t *status);
-s32_t bt_mesh_cfg_cli_timeout_get(void);
-void bt_mesh_cfg_cli_timeout_set(s32_t timeout);
+int32_t bt_mesh_cfg_cli_timeout_get(void);
+void bt_mesh_cfg_cli_timeout_set(int32_t timeout);
#ifdef __cplusplus
}
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/cfg_srv.h b/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/cfg_srv.h
index 14d8a295..5bf3f439 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/cfg_srv.h
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/cfg_srv.h
@@ -21,51 +21,13 @@
extern "C" {
#endif
-/** Mesh Configuration Server Model Context */
-struct bt_mesh_cfg_srv {
- struct bt_mesh_model *model;
-
- u8_t net_transmit; /* Network Transmit state */
- u8_t relay; /* Relay Mode state */
- u8_t relay_retransmit; /* Relay Retransmit state */
- u8_t beacon; /* Secure Network Beacon state */
- u8_t gatt_proxy; /* GATT Proxy state */
- u8_t frnd; /* Friend state */
- u8_t default_ttl; /* Default TTL */
-
- /* Heartbeat Publication */
- struct bt_mesh_hb_pub {
- struct k_delayed_work timer;
-
- u16_t dst;
- u16_t count;
- u8_t period;
- u8_t ttl;
- u16_t feat;
- u16_t net_idx;
- } hb_pub;
-
- /* Heartbeat Subscription */
- struct bt_mesh_hb_sub {
- s64_t expiry;
-
- u16_t src;
- u16_t dst;
- u16_t count;
- u8_t min_hops;
- u8_t max_hops;
-
- /* Optional subscription tracking function */
- void (*func)(u8_t hops, u16_t feat);
- } hb_sub;
-};
extern const struct bt_mesh_model_op bt_mesh_cfg_srv_op[];
extern const struct bt_mesh_model_cb bt_mesh_cfg_srv_cb;
-#define BT_MESH_MODEL_CFG_SRV(srv_data) \
+#define BT_MESH_MODEL_CFG_SRV \
BT_MESH_MODEL_CB(BT_MESH_MODEL_ID_CFG_SRV, bt_mesh_cfg_srv_op, NULL, \
- srv_data, &bt_mesh_cfg_srv_cb)
+ NULL, &bt_mesh_cfg_srv_cb)
#ifdef __cplusplus
}
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/glue.h b/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/glue.h
index e37fcfbc..abe3dd53 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/glue.h
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/glue.h
@@ -51,15 +51,6 @@
extern "C" {
#endif
-#define u8_t uint8_t
-#define s8_t int8_t
-#define u16_t uint16_t
-#define s16_t int16_t
-#define u32_t uint32_t
-#define u64_t uint64_t
-#define s64_t int64_t
-#define s32_t int32_t
-
/** @brief Helper to declare elements of bt_data arrays
*
* This macro is mainly for creating an array of struct bt_data
@@ -73,7 +64,7 @@ extern "C" {
{ \
.type = (_type), \
.data_len = (_data_len), \
- .data = (const u8_t *)(_data), \
+ .data = (const uint8_t *)(_data), \
}
/** @brief Helper to declare elements of bt_data arrays
@@ -85,8 +76,8 @@ extern "C" {
* @param _bytes Variable number of single-byte parameters
*/
#define BT_DATA_BYTES(_type, _bytes...) \
- BT_DATA(_type, ((u8_t []) { _bytes }), \
- sizeof((u8_t []) { _bytes }))
+ BT_DATA(_type, ((uint8_t []) { _bytes }), \
+ sizeof((uint8_t []) { _bytes }))
/* EIR/AD data type definitions */
#define BT_DATA_FLAGS 0x01 /* AD flags */
@@ -119,9 +110,13 @@ extern "C" {
#define sys_put_be16(a,b) put_be16(b, a)
#define sys_put_le16(a,b) put_le16(b, a)
+#define sys_put_le24(a,b) put_le24(b, a)
+#define sys_put_be24(a,b) put_be24(b, a)
#define sys_put_be32(a,b) put_be32(b, a)
#define sys_get_be16(a) get_be16(a)
+#define sys_get_be24(a) get_be24(a)
#define sys_get_le16(a) get_le16(a)
+#define sys_get_le24(a) get_le24(a)
#define sys_get_be32(a) get_be32(a)
#define sys_cpu_to_be16(a) htobe16(a)
#define sys_cpu_to_be32(a) htobe32(a)
@@ -196,9 +191,9 @@ typedef ble_addr_t bt_addr_le_t;
struct net_buf_simple_state {
/** Offset of the data pointer from the beginning of the storage */
- u16_t offset;
+ uint16_t offset;
/** Length of data */
- u16_t len;
+ uint16_t len;
};
static inline struct os_mbuf * NET_BUF_SIMPLE(uint16_t size)
@@ -238,6 +233,14 @@ static inline void net_buf_simple_init(struct os_mbuf *buf,
buf->om_len = 0;
}
+#define net_buf_simple_init_with_data(buf, data, size) \
+ os_mbuf_copyinto(buf, 0, data, size);
+
+static inline void net_buf_simple_reset(struct os_mbuf *om)
+{
+ net_buf_simple_init(om, 0);
+}
+
void net_buf_put(struct ble_npl_eventq *fifo, struct os_mbuf *buf);
void * net_buf_ref(struct os_mbuf *om);
void net_buf_unref(struct os_mbuf *om);
@@ -248,18 +251,20 @@ uint32_t net_buf_simple_pull_le32(struct os_mbuf *om);
uint8_t net_buf_simple_pull_u8(struct os_mbuf *om);
void net_buf_simple_add_le16(struct os_mbuf *om, uint16_t val);
void net_buf_simple_add_be16(struct os_mbuf *om, uint16_t val);
+void net_buf_simple_add_le24(struct os_mbuf *om, uint32_t val);
void net_buf_simple_add_u8(struct os_mbuf *om, uint8_t val);
void net_buf_simple_add_be32(struct os_mbuf *om, uint32_t val);
void net_buf_simple_add_le32(struct os_mbuf *om, uint32_t val);
void net_buf_add_zeros(struct os_mbuf *om, uint8_t len);
void net_buf_simple_push_le16(struct os_mbuf *om, uint16_t val);
void net_buf_simple_push_be16(struct os_mbuf *om, uint16_t val);
+void net_buf_simple_push_be24(struct os_mbuf *om, uint32_t val);
void net_buf_simple_push_u8(struct os_mbuf *om, uint8_t val);
void *net_buf_simple_pull(struct os_mbuf *om, uint8_t len);
void *net_buf_simple_pull_mem(struct os_mbuf *om, uint8_t len);
void *net_buf_simple_add(struct os_mbuf *om, uint8_t len);
bool k_fifo_is_empty(struct ble_npl_eventq *q);
-void *net_buf_get(struct ble_npl_eventq *fifo,s32_t t);
+void *net_buf_get(struct ble_npl_eventq *fifo,int32_t t);
uint8_t *net_buf_simple_push(struct os_mbuf *om, uint8_t len);
void net_buf_reserve(struct os_mbuf *om, size_t reserve);
@@ -271,7 +276,7 @@ void net_buf_reserve(struct os_mbuf *om, size_t reserve);
#define net_buf_clone(a, b) os_mbuf_dup(a)
#define net_buf_add_be32(a, b) net_buf_simple_add_be32(a, b)
#define net_buf_add_be16(a, b) net_buf_simple_add_be16(a, b)
-#define net_buf_pull(a, b) net_buf_simple_pull(a, b)
+#define net_buf_pull(a, b) net_buf_simple_pull_mem(a, b)
#define net_buf_pull_mem(a, b) net_buf_simple_pull_mem(a, b)
#define net_buf_pull_u8(a) net_buf_simple_pull_u8(a)
#define net_buf_pull_be16(a) net_buf_simple_pull_be16(a)
@@ -279,14 +284,16 @@ void net_buf_reserve(struct os_mbuf *om, size_t reserve);
#define BT_GATT_CCC_NOTIFY BLE_GATT_CHR_PROP_NOTIFY
+#define MIN(a, b) (((a) < (b)) ? (a) : (b))
+#define MAX(a, b) (((a) > (b)) ? (a) : (b))
/** Description of different data types that can be encoded into
* advertising data. Used to form arrays that are passed to the
* bt_le_adv_start() function.
*/
struct bt_data {
- u8_t type;
- u8_t data_len;
- const u8_t *data;
+ uint8_t type;
+ uint8_t data_len;
+ const uint8_t *data;
};
struct bt_pub_key_cb {
@@ -298,18 +305,24 @@ struct bt_pub_key_cb {
*
* @param key The local public key, or NULL in case of no key.
*/
- void (*func)(const u8_t key[64]);
+ void (*func)(const uint8_t key[64]);
struct bt_pub_key_cb *_next;
};
-typedef void (*bt_dh_key_cb_t)(const u8_t key[32]);
-int bt_dh_key_gen(const u8_t remote_pk[64], bt_dh_key_cb_t cb);
+typedef void (*bt_dh_key_cb_t)(const uint8_t key[32]);
+int bt_dh_key_gen(const uint8_t remote_pk[64], bt_dh_key_cb_t cb);
int bt_pub_key_gen(struct bt_pub_key_cb *new_cb);
uint8_t *bt_pub_key_get(void);
int bt_rand(void *buf, size_t len);
const char * bt_hex(const void *buf, size_t len);
int bt_encrypt_be(const uint8_t *key, const uint8_t *plaintext, uint8_t *enc_data);
+int bt_ccm_decrypt(const uint8_t key[16], uint8_t nonce[13], const uint8_t *enc_data,
+ size_t len, const uint8_t *aad, size_t aad_len,
+ uint8_t *plaintext, size_t mic_size);
+int bt_ccm_encrypt(const uint8_t key[16], uint8_t nonce[13], const uint8_t *enc_data,
+ size_t len, const uint8_t *aad, size_t aad_len,
+ uint8_t *plaintext, size_t mic_size);
void bt_mesh_register_gatt(void);
int bt_le_adv_start(const struct ble_gap_adv_params *param,
const struct bt_data *ad, size_t ad_len,
@@ -323,9 +336,10 @@ struct k_delayed_work {
void k_work_init(struct ble_npl_callout *work, ble_npl_event_fn handler);
void k_delayed_work_init(struct k_delayed_work *w, ble_npl_event_fn *f);
void k_delayed_work_cancel(struct k_delayed_work *w);
+bool k_delayed_work_pending(struct k_delayed_work *w);
void k_delayed_work_submit(struct k_delayed_work *w, uint32_t ms);
int64_t k_uptime_get(void);
-u32_t k_uptime_get_32(void);
+uint32_t k_uptime_get_32(void);
void k_sleep(int32_t duration);
void k_work_submit(struct ble_npl_callout *w);
void k_work_add_arg(struct ble_npl_callout *w, void *arg);
@@ -355,18 +369,18 @@ static inline void sys_memcpy_swap(void *dst, const void *src, size_t length)
src += length - 1;
for (; length > 0; length--) {
- *((u8_t *)dst++) = *((u8_t *)src--);
+ *((uint8_t *)dst++) = *((uint8_t *)src--);
}
}
#define popcount(x) __builtin_popcount(x)
-static inline unsigned int find_lsb_set(u32_t op)
+static inline unsigned int find_lsb_set(uint32_t op)
{
return __builtin_ffs(op);
}
-static inline unsigned int find_msb_set(u32_t op)
+static inline unsigned int find_msb_set(uint32_t op)
{
if (!op)
return 0;
@@ -374,43 +388,61 @@ static inline unsigned int find_msb_set(u32_t op)
return 32 - __builtin_clz(op);
}
-#define CONFIG_BT_MESH_FRIEND BLE_MESH_FRIEND
-#define CONFIG_BT_MESH_GATT_PROXY BLE_MESH_GATT_PROXY
-#define CONFIG_BT_MESH_IV_UPDATE_TEST BLE_MESH_IV_UPDATE_TEST
-#define CONFIG_BT_MESH_LOW_POWER BLE_MESH_LOW_POWER
-#define CONFIG_BT_MESH_LPN_AUTO BLE_MESH_LPN_AUTO
-#define CONFIG_BT_MESH_LPN_ESTABLISHMENT BLE_MESH_LPN_ESTABLISHMENT
-#define CONFIG_BT_MESH_PB_ADV BLE_MESH_PB_ADV
-#define CONFIG_BT_MESH_PB_GATT BLE_MESH_PB_GATT
-#define CONFIG_BT_MESH_PROV BLE_MESH_PROV
-#define CONFIG_BT_MESH_PROXY BLE_MESH_PROXY
-#define CONFIG_BT_TESTING BLE_MESH_TESTING
-#define CONFIG_BT_SETTINGS BLE_MESH_SETTINGS
-#define CONFIG_SETTINGS BLE_MESH_SETTINGS
-#define CONFIG_BT_MESH_PROVISIONER BLE_MESH_PROVISIONER
+#define CONFIG_BT_MESH_FRIEND BLE_MESH_FRIEND
+#define CONFIG_BT_MESH_GATT_PROXY BLE_MESH_GATT_PROXY
+#define CONFIG_BT_MESH_IV_UPDATE_TEST BLE_MESH_IV_UPDATE_TEST
+#define CONFIG_BT_MESH_LOW_POWER BLE_MESH_LOW_POWER
+#define CONFIG_BT_MESH_LPN_SUB_ALL_NODES_ADDR BLE_MESH_LPN_SUB_ALL_NODES_ADDR
+#define CONFIG_BT_MESH_LPN_AUTO BLE_MESH_LPN_AUTO
+#define CONFIG_BT_MESH_LPN_ESTABLISHMENT BLE_MESH_LPN_ESTABLISHMENT
+#define CONFIG_BT_MESH_PB_ADV BLE_MESH_PB_ADV
+#define CONFIG_BT_MESH_PB_GATT BLE_MESH_PB_GATT
+#define CONFIG_BT_MESH_PROV BLE_MESH_PROV
+#define CONFIG_BT_MESH_PROXY BLE_MESH_PROXY
+#define CONFIG_BT_TESTING BLE_MESH_TESTING
+#define CONFIG_BT_SETTINGS BLE_MESH_SETTINGS
+#define CONFIG_SETTINGS BLE_MESH_SETTINGS
+#define CONFIG_BT_MESH_PROVISIONER BLE_MESH_PROVISIONER
+#define CONFIG_BT_MESH_PROV_DEVICE BLE_MESH_PROV_DEVICE
/* Above flags are used with IS_ENABLED macro */
#define IS_ENABLED(config) MYNEWT_VAL(config)
-#define CONFIG_BT_MESH_LPN_GROUPS MYNEWT_VAL(BLE_MESH_LPN_GROUPS)
-#define CONFIG_BT_MESH_ADV_BUF_COUNT MYNEWT_VAL(BLE_MESH_ADV_BUF_COUNT)
-#define CONFIG_BT_MESH_FRIEND_QUEUE_SIZE MYNEWT_VAL(BLE_MESH_FRIEND_QUEUE_SIZE)
-#define CONFIG_BT_MESH_FRIEND_RECV_WIN MYNEWT_VAL(BLE_MESH_FRIEND_RECV_WIN)
-#define CONFIG_BT_MESH_LPN_POLL_TIMEOUT MYNEWT_VAL(BLE_MESH_LPN_POLL_TIMEOUT)
-#define CONFIG_BT_MESH_MODEL_GROUP_COUNT MYNEWT_VAL(BLE_MESH_MODEL_GROUP_COUNT)
-#define CONFIG_BT_MESH_MODEL_KEY_COUNT MYNEWT_VAL(BLE_MESH_MODEL_KEY_COUNT)
-#define CONFIG_BT_MESH_NODE_ID_TIMEOUT MYNEWT_VAL(BLE_MESH_NODE_ID_TIMEOUT)
-#define CONFIG_BT_MAX_CONN MYNEWT_VAL(BLE_MAX_CONNECTIONS)
-#define CONFIG_BT_MESH_SEQ_STORE_RATE MYNEWT_VAL(BLE_MESH_SEQ_STORE_RATE)
-#define CONFIG_BT_MESH_RPL_STORE_TIMEOUT MYNEWT_VAL(BLE_MESH_RPL_STORE_TIMEOUT)
-#define CONFIG_BT_MESH_APP_KEY_COUNT MYNEWT_VAL(BLE_MESH_APP_KEY_COUNT)
-#define CONFIG_BT_MESH_SUBNET_COUNT MYNEWT_VAL(BLE_MESH_SUBNET_COUNT)
-#define CONFIG_BT_MESH_STORE_TIMEOUT MYNEWT_VAL(BLE_MESH_STORE_TIMEOUT)
-#define CONFIG_BT_MESH_IVU_DIVIDER MYNEWT_VAL(BLE_MESH_IVU_DIVIDER)
-#define CONFIG_BT_DEVICE_NAME MYNEWT_VAL(BLE_MESH_DEVICE_NAME)
-#define CONFIG_BT_MESH_TX_SEG_MAX MYNEWT_VAL(BLE_MESH_TX_SEG_MAX)
-#define CONFIG_BT_MESH_LABEL_COUNT MYNEWT_VAL(BLE_MESH_LABEL_COUNT)
-#define CONFIG_BT_MESH_NODE_COUNT MYNEWT_VAL(BLE_MESH_NODE_COUNT)
+#define CONFIG_BT_MESH_LPN_GROUPS MYNEWT_VAL(BLE_MESH_LPN_GROUPS)
+#define CONFIG_BT_MESH_ADV_BUF_COUNT MYNEWT_VAL(BLE_MESH_ADV_BUF_COUNT)
+#define CONFIG_BT_MESH_SEG_BUFS MYNEWT_VAL(BLE_MESH_SEG_BUFS )
+#define CONFIG_BT_MESH_FRIEND_QUEUE_SIZE MYNEWT_VAL(BLE_MESH_FRIEND_QUEUE_SIZE)
+#define CONFIG_BT_MESH_FRIEND_RECV_WIN MYNEWT_VAL(BLE_MESH_FRIEND_RECV_WIN)
+#define CONFIG_BT_MESH_LPN_POLL_TIMEOUT MYNEWT_VAL(BLE_MESH_LPN_POLL_TIMEOUT)
+#define CONFIG_BT_MESH_MODEL_GROUP_COUNT MYNEWT_VAL(BLE_MESH_MODEL_GROUP_COUNT)
+#define CONFIG_BT_MESH_MODEL_KEY_COUNT MYNEWT_VAL(BLE_MESH_MODEL_KEY_COUNT)
+#define CONFIG_BT_MESH_NODE_ID_TIMEOUT MYNEWT_VAL(BLE_MESH_NODE_ID_TIMEOUT)
+#define CONFIG_BT_MAX_CONN MYNEWT_VAL(BLE_MAX_CONNECTIONS)
+#define CONFIG_BT_MESH_SEQ_STORE_RATE MYNEWT_VAL(BLE_MESH_SEQ_STORE_RATE)
+#define CONFIG_BT_MESH_RPL_STORE_TIMEOUT MYNEWT_VAL(BLE_MESH_RPL_STORE_TIMEOUT)
+#define CONFIG_BT_MESH_APP_KEY_COUNT MYNEWT_VAL(BLE_MESH_APP_KEY_COUNT)
+#define CONFIG_BT_MESH_SUBNET_COUNT MYNEWT_VAL(BLE_MESH_SUBNET_COUNT)
+#define CONFIG_BT_MESH_STORE_TIMEOUT MYNEWT_VAL(BLE_MESH_STORE_TIMEOUT)
+#define CONFIG_BT_MESH_IVU_DIVIDER MYNEWT_VAL(BLE_MESH_IVU_DIVIDER)
+#define CONFIG_BT_DEVICE_NAME MYNEWT_VAL(BLE_MESH_DEVICE_NAME)
+#define CONFIG_BT_RX_SEG_MAX MYNEWT_VAL(BLE_MESH_RX_SEG_MAX)
+#define CONFIG_BT_MESH_TX_SEG_MAX MYNEWT_VAL(BLE_MESH_TX_SEG_MAX)
+#define CONFIG_BT_MESH_RX_SEG_MAX MYNEWT_VAL(BLE_MESH_RX_SEG_MAX)
+#define CONFIG_BT_MESH_RX_SEG_MSG_COUNT MYNEWT_VAL(BLE_MESH_RX_SEG_MSG_COUNT)
+#define CONFIG_BT_MESH_LABEL_COUNT MYNEWT_VAL(BLE_MESH_LABEL_COUNT)
+#define CONFIG_BT_MESH_NODE_COUNT MYNEWT_VAL(BLE_MESH_CDB_NODE_COUNT)
+#define CONFIG_BT_GATT_PROXY_ENABLED MYNEWT_VAL(BLE_MESH_GATT_PROXY_ENABLED)
+#define CONFIG_BT_MESH_DEFAULT_TTL MYNEWT_VAL(BLE_MESH_DEFAULT_TTL)
+#define CONFIG_BT_MESH_NETWORK_TRANSMIT_COUNT MYNEWT_VAL(BLE_MESH_NETWORK_TRANSMIT_COUNT)
+#define CONFIG_BT_MESH_NETWORK_TRANSMIT_INTERVAL MYNEWT_VAL(BLE_MESH_NETWORK_TRANSMIT_INTERVAL)
+#define CONFIG_BT_MESH_RELAY_ENABLED MYNEWT_VAL(BLE_MESH_RELAY_ENABLED)
+#define CONFIG_BT_MESH_RELAY_RETRANSMIT_INTERVAL MYNEWT_VAL(BLE_MESH_RELAY_RETRANSMIT_INTERVAL)
+#define CONFIG_BT_MESH_BEACON_ENABLED MYNEWT_VAL(BLE_MESH_BEACON_ENABLED)
+#define CONFIG_BT_MESH_FRIEND_ENABLED MYNEWT_VAL(BLE_MESH_FRIEND_ENABLED)
+#define CONFIG_BT_MESH_RELAY MYNEWT_VAL(BLE_MESH_RELAY)
+#define CONFIG_BT_MESH_RELAY_RETRANSMIT_COUNT MYNEWT_VAL(BLE_MESH_RELAY_RETRANSMIT_COUNT)
+#define CONFIG_BT_MESH_GATT_PROXY_ENABLED MYNEWT_VAL(BLE_MESH_GATT_PROXY_ENABLED)
+#define CONFIG_BT_MESH_CDB BLE_MESH_CDB
#define printk console_printf
@@ -426,7 +458,7 @@ static inline void k_sem_init(struct k_sem *sem, unsigned int initial_count,
ble_npl_sem_init(sem, initial_count);
}
-static inline int k_sem_take(struct k_sem *sem, s32_t timeout)
+static inline int k_sem_take(struct k_sem *sem, int32_t timeout)
{
uint32_t ticks;
@@ -448,8 +480,8 @@ static inline void k_sem_give(struct k_sem *sem)
static inline int net_buf_id(struct os_mbuf *buf)
{
struct os_mbuf_pool *pool = buf->om_omp;
- u8_t *pool_start = (u8_t *)pool->omp_pool->mp_membuf_addr;
- u8_t *buf_ptr = (u8_t *)buf;
+ uint8_t *pool_start = (uint8_t *)pool->omp_pool->mp_membuf_addr;
+ uint8_t *buf_ptr = (uint8_t *)buf;
return (buf_ptr - pool_start) / BUF_SIZE(pool);
}
@@ -495,6 +527,46 @@ settings_load(void)
#define BUILD_ASSERT(cond) _Static_assert(cond, "")
+
+/* Memory slabs/blocks */
+
+/** Memory slab structure */
+struct k_mem_slab {
+ /**
+ * _wait_q_t is not required now, as we don't implement zephyr timeouts -
+ * if slab couldn't be allocated, we simply return error
+ */
+ uint32_t num_blocks; /** number of memory blocks available for allocation */
+ size_t block_size; /** size of single block */
+ /**
+ * buffer for blocks - must be alligned to N-byte, where N is a power of 2.
+ * Minimal size of buffer is num_blocks * block_size
+ */
+ char *buffer;
+ char *free_list; /** list of free memory blocks */
+ uint32_t num_used; /** count of used memory blocks */
+};
+
+struct k_mem_block_id {
+ uint32_t pool : 8;
+ uint32_t level : 4;
+ uint32_t block : 20;
+};
+
+struct k_mem_block {
+ void *data;
+ struct k_mem_block_id id;
+};
+
+extern void k_mem_slab_free(struct k_mem_slab *slab, void **mem);
+extern int k_mem_slab_alloc(struct k_mem_slab *slab, void **mem);
+static inline uint32_t k_mem_slab_num_free_get(struct k_mem_slab *slab)
+{
+ return slab->num_blocks - slab->num_used;
+}
+
+int create_free_list(struct k_mem_slab *slab);
+
#ifdef __cplusplus
}
#endif
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/health_cli.h b/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/health_cli.h
index 8ab8d6d5..e9efe4b1 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/health_cli.h
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/health_cli.h
@@ -25,12 +25,12 @@ extern "C" {
struct bt_mesh_health_cli {
struct bt_mesh_model *model;
- void (*current_status)(struct bt_mesh_health_cli *cli, u16_t addr,
- u8_t test_id, u16_t cid, u8_t *faults,
+ void (*current_status)(struct bt_mesh_health_cli *cli, uint16_t addr,
+ uint8_t test_id, uint16_t cid, uint8_t *faults,
size_t fault_count);
struct k_sem op_sync;
- u32_t op_pending;
+ uint32_t op_pending;
void *op_param;
};
@@ -43,32 +43,30 @@ extern const struct bt_mesh_model_cb bt_mesh_health_cli_cb;
int bt_mesh_health_cli_set(struct bt_mesh_model *model);
-int bt_mesh_health_fault_get(u16_t net_idx, u16_t addr, u16_t app_idx,
- u16_t cid, u8_t *test_id, u8_t *faults,
- size_t *fault_count);
+int bt_mesh_health_fault_get(uint16_t addr, uint16_t app_idx, uint16_t cid,
+ uint8_t *test_id, uint8_t *faults,
+ size_t *fault_count);
-int bt_mesh_health_fault_clear(u16_t net_idx, u16_t addr, u16_t app_idx,
- u16_t cid, u8_t *test_id, u8_t *faults,
- size_t *fault_count);
+int bt_mesh_health_fault_clear(uint16_t addr, uint16_t app_idx, uint16_t cid,
+ uint8_t *test_id, uint8_t *faults,
+ size_t *fault_count);
-int bt_mesh_health_fault_test(u16_t net_idx, u16_t addr, u16_t app_idx,
- u16_t cid, u8_t test_id, u8_t *faults,
- size_t *fault_count);
+int bt_mesh_health_fault_test(uint16_t addr, uint16_t app_idx, uint16_t cid,
+ uint8_t test_id, uint8_t *faults,
+ size_t *fault_count);
-int bt_mesh_health_period_get(u16_t net_idx, u16_t addr, u16_t app_idx,
- u8_t *divisor);
+int bt_mesh_health_period_get(uint16_t addr, uint16_t app_idx, uint8_t *divisor);
-int bt_mesh_health_period_set(u16_t net_idx, u16_t addr, u16_t app_idx,
- u8_t divisor, u8_t *updated_divisor);
+int bt_mesh_health_period_set(uint16_t addr, uint16_t app_idx, uint8_t divisor,
+ uint8_t *updated_divisor);
-int bt_mesh_health_attention_get(u16_t net_idx, u16_t addr, u16_t app_idx,
- u8_t *attention);
+int bt_mesh_health_attention_get(uint16_t addr, uint16_t app_idx, uint8_t *attention);
-int bt_mesh_health_attention_set(u16_t net_idx, u16_t addr, u16_t app_idx,
- u8_t attention, u8_t *updated_attention);
+int bt_mesh_health_attention_set(uint16_t addr, uint16_t app_idx, uint8_t attention,
+ uint8_t *updated_attention);
-s32_t bt_mesh_health_cli_timeout_get(void);
-void bt_mesh_health_cli_timeout_set(s32_t timeout);
+int32_t bt_mesh_health_cli_timeout_get(void);
+void bt_mesh_health_cli_timeout_set(int32_t timeout);
#ifdef __cplusplus
}
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/health_srv.h b/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/health_srv.h
index 83982376..ad79e368 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/health_srv.h
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/health_srv.h
@@ -23,21 +23,21 @@ extern "C" {
struct bt_mesh_health_srv_cb {
/* Fetch current faults */
- int (*fault_get_cur)(struct bt_mesh_model *model, u8_t *test_id,
- u16_t *company_id, u8_t *faults,
- u8_t *fault_count);
+ int (*fault_get_cur)(struct bt_mesh_model *model, uint8_t *test_id,
+ uint16_t *company_id, uint8_t *faults,
+ uint8_t *fault_count);
/* Fetch registered faults */
- int (*fault_get_reg)(struct bt_mesh_model *model, u16_t company_id,
- u8_t *test_id, u8_t *faults,
- u8_t *fault_count);
+ int (*fault_get_reg)(struct bt_mesh_model *model, uint16_t company_id,
+ uint8_t *test_id, uint8_t *faults,
+ uint8_t *fault_count);
/* Clear registered faults */
- int (*fault_clear)(struct bt_mesh_model *model, u16_t company_id);
+ int (*fault_clear)(struct bt_mesh_model *model, uint16_t company_id);
/* Run a specific test */
- int (*fault_test)(struct bt_mesh_model *model, u8_t test_id,
- u16_t company_id);
+ int (*fault_test)(struct bt_mesh_model *model, uint8_t test_id,
+ uint16_t company_id);
/* Attention on */
void (*attn_on)(struct bt_mesh_model *model);
@@ -52,7 +52,7 @@ struct bt_mesh_health_srv_cb {
*
* @param max_faults Maximum number of faults the element can have.
*
- * @return a New net_buf_simple of the needed size.
+ * @return a New os_mbuf of the needed size.
*/
#define BT_MESH_HEALTH_FAULT_MSG(max_faults) \
NET_BUF_SIMPLE(1 + 3 + (max_faults))
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/heartbeat.h b/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/heartbeat.h
new file mode 100644
index 00000000..b9990f6f
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/heartbeat.h
@@ -0,0 +1,123 @@
+/** @file
+ * @brief Bluetooth Mesh Heartbeat API.
+ */
+
+/*
+ * Copyright (c) 2020 Nordic Semiconductor ASA
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+#ifndef _BLUETOOTH_MESH_HEARTBEAT_H_
+#define _BLUETOOTH_MESH_HEARTBEAT_H_
+
+/**
+ * @brief Bluetooth Mesh
+ * @defgroup bt_mesh_heartbeat Bluetooth Mesh Heartbeat
+ * @ingroup bt_mesh
+ * @{
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Heartbeat Publication parameters */
+struct bt_mesh_hb_pub {
+ /** Destination address. */
+ uint16_t dst;
+ /** Remaining publish count. */
+ uint16_t count;
+ /** Time To Live value. */
+ uint8_t ttl;
+ /**
+ * Bitmap of features that trigger a Heartbeat publication if
+ * they change. Legal values are @ref BT_MESH_FEAT_RELAY,
+ * @ref BT_MESH_FEAT_PROXY, @ref BT_MESH_FEAT_FRIEND and
+ * @ref BT_MESH_FEAT_LOW_POWER.
+ */
+ uint16_t feat;
+ /** Network index used for publishing. */
+ uint16_t net_idx;
+ /** Publication period in seconds. */
+ uint32_t period;
+};
+
+/** Heartbeat Subscription parameters. */
+struct bt_mesh_hb_sub {
+ /** Subscription period in seconds. */
+ uint32_t period;
+ /** Remaining subscription time in seconds. */
+ uint32_t remaining;
+ /** Source address to receive Heartbeats from. */
+ uint16_t src;
+ /** Destination address to received Heartbeats on. */
+ uint16_t dst;
+ /** The number of received Heartbeat messages so far. */
+ uint16_t count;
+ /**
+ * Minimum hops in received messages, ie the shortest registered
+ * path from the publishing node to the subscribing node. A
+ * Heartbeat received from an immediate neighbor has hop
+ * count = 1.
+ */
+ uint8_t min_hops;
+ /**
+ * Maximum hops in received messages, ie the longest registered
+ * path from the publishing node to the subscribing node. A
+ * Heartbeat received from an immediate neighbor has hop
+ * count = 1.
+ */
+ uint8_t max_hops;
+};
+
+/** Heartbeat callback structure */
+struct bt_mesh_hb_cb {
+ /** @brief Receive callback for heartbeats.
+ *
+ * Gets called on every received Heartbeat that matches the current
+ * Heartbeat subscription parameters.
+ *
+ * @param sub Current Heartbeat subscription parameters.
+ * @param hops The number of hops the Heartbeat was received
+ * with.
+ * @param feat The feature set of the publishing node. The
+ * value is a bitmap of @ref BT_MESH_FEAT_RELAY,
+ * @ref BT_MESH_FEAT_PROXY,
+ * @ref BT_MESH_FEAT_FRIEND and
+ * @ref BT_MESH_FEAT_LOW_POWER.
+ */
+ void (*recv)(const struct bt_mesh_hb_sub *sub, uint8_t hops,
+ uint16_t feat);
+
+ /** @brief Subscription end callback for heartbeats.
+ *
+ * Gets called when the subscription period ends, providing a summary
+ * of the received heartbeat messages.
+ *
+ * @param sub Current Heartbeat subscription parameters.
+ */
+ void (*sub_end)(const struct bt_mesh_hb_sub *sub);
+};
+
+/** @brief Get the current Heartbeat publication parameters.
+ *
+ * @param get Heartbeat publication parameters return buffer.
+ */
+void bt_mesh_hb_pub_get(struct bt_mesh_hb_pub *get);
+
+/** @brief Get the current Heartbeat subscription parameters.
+ *
+ * @param get Heartbeat subscription parameters return buffer.
+ */
+void bt_mesh_hb_sub_get(struct bt_mesh_hb_sub *get);
+
+extern struct bt_mesh_hb_cb hb_cb;
+
+#ifdef __cplusplus
+}
+#endif
+/**
+ * @}
+ */
+
+#endif /* _BLUETOOTH_MESH_HEARTBEAT_H_ */ \ No newline at end of file
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/main.h b/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/main.h
index 4a5bedba..2bcb05c8 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/main.h
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/main.h
@@ -59,10 +59,37 @@ typedef enum {
BT_MESH_PROV_OOB_ON_DEV = BIT(15),
} bt_mesh_prov_oob_info_t;
+/** Device Capabilities. */
+struct bt_mesh_dev_capabilities {
+ /** Number of elements supported by the device */
+ uint8_t elem_count;
+
+ /** Supported algorithms and other capabilities */
+ uint16_t algorithms;
+
+ /** Supported public key types */
+ uint8_t pub_key_type;
+
+ /** Supported static OOB Types */
+ uint8_t static_oob;
+
+ /** Supported Output OOB Actions */
+ bt_mesh_output_action_t output_actions;
+
+ /** Supported Input OOB Actions */
+ bt_mesh_input_action_t input_actions;
+
+ /** Maximum size of Output OOB supported */
+ uint8_t output_size;
+
+ /** Maximum size in octets of Input OOB supported */
+ uint8_t input_size;
+};
+
/** Provisioning properties & capabilities. */
struct bt_mesh_prov {
/** The UUID that's used when advertising as unprovisioned */
- const u8_t *uuid;
+ const uint8_t *uuid;
/** Optional URI. This will be advertised separately from the
* unprovisioned beacon, however the unprovisioned beacon will
@@ -75,19 +102,34 @@ struct bt_mesh_prov {
bt_mesh_prov_oob_info_t oob_info;
/** Static OOB value */
- const u8_t *static_val;
+ const uint8_t *static_val;
/** Static OOB value length */
- u8_t static_val_len;
+ uint8_t static_val_len;
/** Maximum size of Output OOB supported */
- u8_t output_size;
+ uint8_t output_size;
/** Supported Output OOB Actions */
- u16_t output_actions;
+ uint16_t output_actions;
/* Maximum size of Input OOB supported */
- u8_t input_size;
+ uint8_t input_size;
/** Supported Input OOB Actions */
- u16_t input_actions;
+ uint16_t input_actions;
+
+ /** @brief Provisioning Capabilities.
+ *
+ * This callback notifies the application that the provisioning capabilities
+ * of the unprovisioned device has been received.
+ *
+ * The application can consequently call bt_mesh_auth_method_set_<*> to
+ * select suitable provisioning oob authentication method.
+ *
+ * When this callback returns, the provisioner will start authentication with
+ * the chosen method.
+ *
+ * @param cap capabilities supported by device.
+ */
+ void (*capabilities)(const struct bt_mesh_dev_capabilities *cap);
/** @brief Output of a number is requested.
*
@@ -99,7 +141,7 @@ struct bt_mesh_prov {
*
* @return Zero on success or negative error code otherwise
*/
- int (*output_number)(bt_mesh_output_action_t act, u32_t num);
+ int (*output_number)(bt_mesh_output_action_t act, uint32_t num);
/** @brief Output of a string is requested.
*
@@ -126,7 +168,7 @@ struct bt_mesh_prov {
*
* @return Zero on success or negative error code otherwise
*/
- int (*input)(bt_mesh_input_action_t act, u8_t size);
+ int (*input)(bt_mesh_input_action_t act, uint8_t size);
/** @brief The other device finished their OOB input.
*
@@ -146,9 +188,9 @@ struct bt_mesh_prov {
* @param uri_hash Pointer to URI Hash value. NULL if no hash was
* present in the beacon.
*/
- void (*unprovisioned_beacon)(u8_t uuid[16],
+ void (*unprovisioned_beacon)(uint8_t uuid[16],
bt_mesh_prov_oob_info_t oob_info,
- u32_t *uri_hash);
+ uint32_t *uri_hash);
/** @brief Provisioning link has been opened.
*
@@ -177,7 +219,7 @@ struct bt_mesh_prov {
* @param net_idx NetKeyIndex given during provisioning.
* @param addr Primary element address.
*/
- void (*complete)(u16_t net_idx, u16_t addr);
+ void (*complete)(uint16_t net_idx, uint16_t addr);
/** @brief A new node has been added to the provisioning database.
*
@@ -186,10 +228,12 @@ struct bt_mesh_prov {
* the specified NetKeyIndex and primary element address.
*
* @param net_idx NetKeyIndex given during provisioning.
+ * @param uuid UUID of the added node
* @param addr Primary element address.
* @param num_elem Number of elements that this node has.
*/
- void (*node_added)(u16_t net_idx, u16_t addr, u8_t num_elem);
+ void (*node_added)(uint16_t net_idx, uint8_t uuid[16], uint16_t addr,
+ uint8_t num_elem);
/** @brief Node has been reset.
*
@@ -222,7 +266,90 @@ int bt_mesh_input_string(const char *str);
*
* @return Zero on success or (negative) error code otherwise.
*/
-int bt_mesh_input_number(u32_t num);
+int bt_mesh_input_number(uint32_t num);
+
+/** @brief Provide Device public key.
+ *
+ * @param public_key Device public key.
+ *
+ * @return Zero on success or (negative) error code otherwise.
+ */
+int bt_mesh_prov_remote_pub_key_set(const uint8_t public_key[64]);
+
+/** @brief Use Input OOB authentication.
+ *
+ * Provisioner only.
+ *
+ * Instruct the unprovisioned device to use the specified Input OOB
+ * authentication action. When using @ref BT_MESH_PUSH, @ref BT_MESH_TWIST or
+ * @ref BT_MESH_ENTER_NUMBER, the @ref bt_mesh_prov::output_number callback is
+ * called with a random number that has to be entered on the unprovisioned
+ * device.
+ *
+ * When using @ref BT_MESH_ENTER_STRING, the @ref bt_mesh_prov::output_string
+ * callback is called with a random string that has to be entered on the
+ * unprovisioned device.
+ *
+ * @param action Authentication action used by the unprovisioned device.
+ * @param size Authentication size.
+ *
+ * @return Zero on success or (negative) error code otherwise.
+ */
+int bt_mesh_auth_method_set_input(bt_mesh_input_action_t action, uint8_t size);
+
+/** @brief Use Output OOB authentication.
+ *
+ * Provisioner only.
+ *
+ * Instruct the unprovisioned device to use the specified Output OOB
+ * authentication action. The @ref bt_mesh_prov::input callback will
+ * be called.
+ *
+ * When using @ref BT_MESH_BLINK, @ref BT_MESH_BEEP, @ref BT_MESH_VIBRATE
+ * or @ref BT_MESH_DISPLAY_NUMBER, and the application has to call
+ * @ref bt_mesh_input_number with the random number indicated by
+ * the unprovisioned device.
+ *
+ * When using @ref BT_MESH_DISPLAY_STRING, the application has to call
+ * @ref bt_mesh_input_string with the random string displayed by the
+ * unprovisioned device.
+ *
+ * @param action Authentication action used by the unprovisioned device.
+ * @param size Authentication size.
+ *
+ * @return Zero on success or (negative) error code otherwise.
+ */
+int bt_mesh_auth_method_set_output(bt_mesh_output_action_t action, uint8_t size);
+
+/** @brief Use static OOB authentication.
+ *
+ * Provisioner only.
+ *
+ * Instruct the unprovisioned device to use static OOB authentication, and use
+ * the given static authentication value when provisioning.
+ *
+ * @param static_val Static OOB value.
+ * @param size Static OOB value size.
+ *
+ * @return Zero on success or (negative) error code otherwise.
+ */
+int bt_mesh_auth_method_set_static(const uint8_t *static_val, uint8_t size);
+
+/** @brief Don't use OOB authentication.
+ *
+ * Provisioner only.
+ *
+ * Don't use any authentication when provisioning new devices. This is the
+ * default behavior.
+ *
+ * @warning Not using any authentication exposes the mesh network to
+ * impersonation attacks, where attackers can pretend to be the
+ * unprovisioned device to gain access to the network. Authentication
+ * is strongly encouraged.
+ *
+ * @return Zero on success or (negative) error code otherwise.
+ */
+int bt_mesh_auth_method_set_none(void);
/** @brief Enable specific provisioning bearers
*
@@ -258,25 +385,6 @@ int bt_mesh_prov_disable(bt_mesh_prov_bearer_t bearers);
/* Primary Network Key index */
#define BT_MESH_NET_PRIMARY 0x000
-#define BT_MESH_RELAY_DISABLED 0x00
-#define BT_MESH_RELAY_ENABLED 0x01
-#define BT_MESH_RELAY_NOT_SUPPORTED 0x02
-
-#define BT_MESH_BEACON_DISABLED 0x00
-#define BT_MESH_BEACON_ENABLED 0x01
-
-#define BT_MESH_GATT_PROXY_DISABLED 0x00
-#define BT_MESH_GATT_PROXY_ENABLED 0x01
-#define BT_MESH_GATT_PROXY_NOT_SUPPORTED 0x02
-
-#define BT_MESH_FRIEND_DISABLED 0x00
-#define BT_MESH_FRIEND_ENABLED 0x01
-#define BT_MESH_FRIEND_NOT_SUPPORTED 0x02
-
-#define BT_MESH_NODE_IDENTITY_STOPPED 0x00
-#define BT_MESH_NODE_IDENTITY_RUNNING 0x01
-#define BT_MESH_NODE_IDENTITY_NOT_SUPPORTED 0x02
-
/* Features */
#define BT_MESH_FEAT_RELAY BIT(0)
#define BT_MESH_FEAT_PROXY BIT(1)
@@ -299,7 +407,7 @@ int bt_mesh_prov_disable(bt_mesh_prov_bearer_t bearers);
*
* @return Zero on success or (negative) error code otherwise.
*/
-int bt_mesh_init(u8_t own_addr_type,
+int bt_mesh_init(uint8_t own_addr_type,
const struct bt_mesh_prov *prov,
const struct bt_mesh_comp *comp);
@@ -351,9 +459,9 @@ int bt_mesh_resume(void);
*
* @return Zero on success or (negative) error code otherwise.
*/
-int bt_mesh_provision(const u8_t net_key[16], u16_t net_idx,
- u8_t flags, u32_t iv_index, u16_t addr,
- const u8_t dev_key[16]);
+int bt_mesh_provision(const uint8_t net_key[16], uint16_t net_idx,
+ uint8_t flags, uint32_t iv_index, uint16_t addr,
+ const uint8_t dev_key[16]);
/** @brief Provision a Mesh Node using PB-ADV
*
@@ -365,8 +473,8 @@ int bt_mesh_provision(const u8_t net_key[16], u16_t net_idx,
*
* @return Zero on success or (negative) error code otherwise.
*/
-int bt_mesh_provision_adv(const u8_t uuid[16], u16_t net_idx, u16_t addr,
- u8_t attention_duration);
+int bt_mesh_provision_adv(const uint8_t uuid[16], uint16_t net_idx, uint16_t addr,
+ uint8_t attention_duration);
/** @brief Check if the local node has been provisioned.
*
@@ -428,7 +536,17 @@ int bt_mesh_lpn_poll(void);
*
* @param cb Function to call when the Friendship status changes.
*/
-void bt_mesh_lpn_set_cb(void (*cb)(u16_t friend_addr, bool established));
+void bt_mesh_lpn_set_cb(void (*cb)(uint16_t friend_addr, bool established));
+
+/** @brief Terminate Friendship.
+ *
+ * Terminated Friendship for given LPN.
+ *
+ * @param lpn_addr Low Power Node address.
+ *
+ * @return Zero on success or (negative) error code otherwise.
+ */
+int bt_mesh_friend_terminate(uint16_t lpn_addr);
#ifdef __cplusplus
}
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/mesh.h b/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/mesh.h
index 9ba63ef0..b9bc24fb 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/mesh.h
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/mesh.h
@@ -17,10 +17,15 @@
#include "glue.h"
#include "access.h"
#include "main.h"
+#include "cfg.h"
#include "cfg_srv.h"
#include "health_srv.h"
#include "cfg_cli.h"
#include "health_cli.h"
#include "proxy.h"
+#include "cdb.h"
+#include "cfg.h"
+#include "heartbeat.h"
+#include "../src/app_keys.h"
#endif /* __BT_MESH_H */
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/model_cli.h b/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/model_cli.h
index f2e77a47..87e2dd2b 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/model_cli.h
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/model_cli.h
@@ -15,7 +15,7 @@ struct bt_mesh_gen_model_cli {
struct bt_mesh_model *model;
struct k_sem op_sync;
- u32_t op_pending;
+ uint32_t op_pending;
void *op_param;
};
@@ -33,14 +33,14 @@ extern const struct bt_mesh_model_cb bt_mesh_gen_level_cli_cb;
BT_MESH_MODEL_CB(BT_MESH_MODEL_ID_GEN_LEVEL_CLI, gen_level_cli_op, pub,\
cli_data, &bt_mesh_gen_level_cli_cb)
-int bt_mesh_gen_onoff_get(u16_t net_idx, u16_t addr, u16_t app_idx,
- u8_t *state);
-int bt_mesh_gen_onoff_set(u16_t net_idx, u16_t addr, u16_t app_idx,
- u8_t val, u8_t *state);
-int bt_mesh_gen_level_get(u16_t net_idx, u16_t addr, u16_t app_idx,
- s16_t *level);
-int bt_mesh_gen_level_set(u16_t net_idx, u16_t addr, u16_t app_idx,
- s16_t val, s16_t *state);
+int bt_mesh_gen_onoff_get(uint16_t net_idx, uint16_t addr, uint16_t app_idx,
+ uint8_t *state);
+int bt_mesh_gen_onoff_set(uint16_t net_idx, uint16_t addr, uint16_t app_idx,
+ uint8_t val, uint8_t *state);
+int bt_mesh_gen_level_get(uint16_t net_idx, uint16_t addr, uint16_t app_idx,
+ int16_t *level);
+int bt_mesh_gen_level_set(uint16_t net_idx, uint16_t addr, uint16_t app_idx,
+ int16_t val, int16_t *state);
#ifdef __cplusplus
}
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/model_srv.h b/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/model_srv.h
index e498ad34..a23296b8 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/model_srv.h
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/model_srv.h
@@ -14,8 +14,8 @@ extern "C" {
struct bt_mesh_gen_onoff_srv {
struct bt_mesh_model *model;
- int (*get)(struct bt_mesh_model *model, u8_t *state);
- int (*set)(struct bt_mesh_model *model, u8_t state);
+ int (*get)(struct bt_mesh_model *model, uint8_t *state);
+ int (*set)(struct bt_mesh_model *model, uint8_t state);
};
extern const struct bt_mesh_model_op gen_onoff_srv_op[];
@@ -28,8 +28,8 @@ extern const struct bt_mesh_model_cb gen_onoff_srv_cb;
struct bt_mesh_gen_level_srv {
struct bt_mesh_model *model;
- int (*get)(struct bt_mesh_model *model, s16_t *level);
- int (*set)(struct bt_mesh_model *model, s16_t level);
+ int (*get)(struct bt_mesh_model *model, int16_t *level);
+ int (*set)(struct bt_mesh_model *model, int16_t level);
};
extern const struct bt_mesh_model_op gen_level_srv_op[];
@@ -42,8 +42,8 @@ extern const struct bt_mesh_model_cb gen_level_srv_cb;
struct bt_mesh_light_lightness_srv {
struct bt_mesh_model *model;
- int (*get)(struct bt_mesh_model *model, s16_t *level);
- int (*set)(struct bt_mesh_model *model, s16_t level);
+ int (*get)(struct bt_mesh_model *model, int16_t *level);
+ int (*set)(struct bt_mesh_model *model, int16_t level);
};
extern const struct bt_mesh_model_op light_lightness_srv_op[];
@@ -53,12 +53,12 @@ extern const struct bt_mesh_model_cb light_lightness_srv_cb;
BT_MESH_MODEL_CB(BT_MESH_MODEL_ID_LIGHT_LIGHTNESS_SRV, \
light_lightness_srv_op, pub, srv, &light_lightness_srv_cb)
-void bt_mesh_set_gen_onoff_srv_cb(int (*get)(struct bt_mesh_model *model, u8_t *state),
- int (*set)(struct bt_mesh_model *model, u8_t state));
-void bt_mesh_set_gen_level_srv_cb(int (*get)(struct bt_mesh_model *model, s16_t *level),
- int (*set)(struct bt_mesh_model *model, s16_t level));
-void bt_mesh_set_light_lightness_srv_cb(int (*get)(struct bt_mesh_model *model, s16_t *level),
- int (*set)(struct bt_mesh_model *model, s16_t level));
+void bt_mesh_set_gen_onoff_srv_cb(int (*get)(struct bt_mesh_model *model, uint8_t *state),
+ int (*set)(struct bt_mesh_model *model, uint8_t state));
+void bt_mesh_set_gen_level_srv_cb(int (*get)(struct bt_mesh_model *model, int16_t *level),
+ int (*set)(struct bt_mesh_model *model, int16_t level));
+void bt_mesh_set_light_lightness_srv_cb(int (*get)(struct bt_mesh_model *model, int16_t *level),
+ int (*set)(struct bt_mesh_model *model, int16_t level));
#ifdef __cplusplus
}
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/testing.h b/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/testing.h
index 4c2b2a61..580aafe4 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/testing.h
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/include/mesh/testing.h
@@ -33,13 +33,13 @@ extern "C" {
* Allows access to Bluetooth stack internals, not exposed by public API.
*/
struct bt_test_cb {
- void (*mesh_net_recv)(u8_t ttl, u8_t ctl, u16_t src, u16_t dst,
+ void (*mesh_net_recv)(uint8_t ttl, uint8_t ctl, uint16_t src, uint16_t dst,
const void *payload, size_t payload_len);
- void (*mesh_model_bound)(u16_t addr, struct bt_mesh_model *model,
- u16_t key_idx);
- void (*mesh_model_unbound)(u16_t addr, struct bt_mesh_model *model,
- u16_t key_idx);
- void (*mesh_prov_invalid_bearer)(u8_t opcode);
+ void (*mesh_model_bound)(uint16_t addr, struct bt_mesh_model *model,
+ uint16_t key_idx);
+ void (*mesh_model_unbound)(uint16_t addr, struct bt_mesh_model *model,
+ uint16_t key_idx);
+ void (*mesh_prov_invalid_bearer)(uint8_t opcode);
void (*mesh_trans_incomp_timer_exp)(void);
sys_snode_t node;
@@ -66,7 +66,7 @@ void bt_test_cb_unregister(struct bt_test_cb *cb);
*
* @return Zero on success or (negative) error code otherwise.
*/
-int bt_test_mesh_lpn_group_add(u16_t group);
+int bt_test_mesh_lpn_group_add(uint16_t group);
/** Send Friend Subscription List Remove message.
*
@@ -79,7 +79,7 @@ int bt_test_mesh_lpn_group_add(u16_t group);
*
* @return Zero on success or (negative) error code otherwise.
*/
-int bt_test_mesh_lpn_group_remove(u16_t *groups, size_t groups_count);
+int bt_test_mesh_lpn_group_remove(uint16_t *groups, size_t groups_count);
/** Clear replay protection list cache.
*
@@ -87,12 +87,12 @@ int bt_test_mesh_lpn_group_remove(u16_t *groups, size_t groups_count);
*/
int bt_test_mesh_rpl_clear(void);
-u8_t mod_bind(struct bt_mesh_model *model, u16_t key_idx);
-u8_t mod_unbind(struct bt_mesh_model *model, u16_t key_idx, bool store);
+uint8_t mod_bind(struct bt_mesh_model *model, uint16_t key_idx);
+uint8_t mod_unbind(struct bt_mesh_model *model, uint16_t key_idx, bool store);
int cmd_mesh_init(int argc, char *argv[]);
int bt_test_shell_init(void);
-int bt_test_bind_app_key_to_model(struct bt_mesh_model *model, u16_t key_idx, u16_t id);
+int bt_test_bind_app_key_to_model(struct bt_mesh_model *model, uint16_t key_idx, uint16_t id);
/**
* @}
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/access.c b/src/libs/mynewt-nimble/nimble/host/mesh/src/access.c
index ff8e9999..da077182 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/src/access.c
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/access.c
@@ -26,7 +26,7 @@
#endif
static const struct bt_mesh_comp *dev_comp;
-static u16_t dev_primary_addr;
+static uint16_t dev_primary_addr;
void bt_mesh_model_foreach(void (*func)(struct bt_mesh_model *mod,
struct bt_mesh_elem *elem,
@@ -53,7 +53,7 @@ void bt_mesh_model_foreach(void (*func)(struct bt_mesh_model *mod,
}
}
-s32_t bt_mesh_model_pub_period_get(struct bt_mesh_model *mod)
+int32_t bt_mesh_model_pub_period_get(struct bt_mesh_model *mod)
{
int period;
@@ -89,10 +89,10 @@ s32_t bt_mesh_model_pub_period_get(struct bt_mesh_model *mod)
}
}
-static s32_t next_period(struct bt_mesh_model *mod)
+static int32_t next_period(struct bt_mesh_model *mod)
{
struct bt_mesh_model_pub *pub = mod->pub;
- u32_t elapsed, period;
+ uint32_t elapsed, period;
period = bt_mesh_model_pub_period_get(mod);
if (!period) {
@@ -115,7 +115,7 @@ static s32_t next_period(struct bt_mesh_model *mod)
static void publish_sent(int err, void *user_data)
{
struct bt_mesh_model *mod = user_data;
- s32_t delay;
+ int32_t delay;
BT_DBG("err %d", err);
@@ -131,7 +131,7 @@ static void publish_sent(int err, void *user_data)
}
}
-static void publish_start(u16_t duration, int err, void *user_data)
+static void publish_start(uint16_t duration, int err, void *user_data)
{
struct bt_mesh_model *mod = user_data;
struct bt_mesh_model_pub *pub = mod->pub;
@@ -156,30 +156,18 @@ static int publish_retransmit(struct bt_mesh_model *mod)
{
struct os_mbuf *sdu = NET_BUF_SIMPLE(BT_MESH_TX_SDU_MAX);
struct bt_mesh_model_pub *pub = mod->pub;
- struct bt_mesh_app_key *key;
struct bt_mesh_msg_ctx ctx = {
.addr = pub->addr,
.send_ttl = pub->ttl,
+ .app_idx = pub->key,
};
struct bt_mesh_net_tx tx = {
.ctx = &ctx,
.src = bt_mesh_model_elem(mod)->addr,
- .xmit = bt_mesh_net_transmit_get(),
.friend_cred = pub->cred,
};
int err;
- key = bt_mesh_app_key_find(pub->key);
- if (!key) {
- err = -EADDRNOTAVAIL;
- goto done;
- }
-
- tx.sub = bt_mesh_subnet_get(key->net_idx);
-
- ctx.net_idx = key->net_idx;
- ctx.app_idx = key->app_idx;
-
net_buf_simple_init(sdu, 0);
net_buf_simple_add_mem(sdu, pub->msg->om_data, pub->msg->om_len);
@@ -187,15 +175,22 @@ static int publish_retransmit(struct bt_mesh_model *mod)
err = bt_mesh_trans_send(&tx, sdu, &pub_sent_cb, mod);
-done:
os_mbuf_free_chain(sdu);
return err;
}
+static void publish_retransmit_end(int err, struct bt_mesh_model_pub *pub)
+{
+ /* Cancel all retransmits for this publish attempt */
+ pub->count = 0U;
+ /* Make sure the publish timer gets reset */
+ publish_sent(err, pub->mod);
+}
+
static void mod_publish(struct ble_npl_event *work)
{
struct bt_mesh_model_pub *pub = ble_npl_event_get_arg(work);
- s32_t period_ms;
+ int32_t period_ms;
int err;
BT_DBG("");
@@ -227,7 +222,10 @@ static void mod_publish(struct ble_npl_event *work)
err = pub->update(pub->mod);
if (err) {
- BT_ERR("Failed to update publication message");
+ /* Cancel this publish attempt. */
+ BT_DBG("Update failed, skipping publish (err: %d)", err);
+ pub->period_start = k_uptime_get_32();
+ publish_retransmit_end(err, pub);
return;
}
@@ -242,7 +240,7 @@ struct bt_mesh_elem *bt_mesh_model_elem(struct bt_mesh_model *mod)
return &dev_comp->elem[mod->elem_idx];
}
-struct bt_mesh_model *bt_mesh_model_get(bool vnd, u8_t elem_idx, u8_t mod_idx)
+struct bt_mesh_model *bt_mesh_model_get(bool vnd, uint8_t elem_idx, uint8_t mod_idx)
{
struct bt_mesh_elem *elem;
@@ -274,6 +272,11 @@ static void mod_init(struct bt_mesh_model *mod, struct bt_mesh_elem *elem,
bool vnd, bool primary, void *user_data)
{
int i;
+ int *err = user_data;
+
+ if (*err) {
+ return;
+ }
if (mod->pub) {
mod->pub->mod = mod;
@@ -293,12 +296,14 @@ static void mod_init(struct bt_mesh_model *mod, struct bt_mesh_elem *elem,
}
if (mod->cb && mod->cb->init) {
- mod->cb->init(mod);
+ *err = mod->cb->init(mod);
}
}
int bt_mesh_comp_register(const struct bt_mesh_comp *comp)
{
+ int err;
+
/* There must be at least one element */
if (!comp->elem_count) {
return -EINVAL;
@@ -306,12 +311,13 @@ int bt_mesh_comp_register(const struct bt_mesh_comp *comp)
dev_comp = comp;
- bt_mesh_model_foreach(mod_init, NULL);
+ err = 0;
+ bt_mesh_model_foreach(mod_init, &err);
- return 0;
+ return err;
}
-void bt_mesh_comp_provision(u16_t addr)
+void bt_mesh_comp_provision(uint16_t addr)
{
int i;
@@ -334,16 +340,14 @@ void bt_mesh_comp_unprovision(void)
BT_DBG("");
dev_primary_addr = BT_MESH_ADDR_UNASSIGNED;
-
- bt_mesh_model_foreach(mod_init, NULL);
}
-u16_t bt_mesh_primary_addr(void)
+uint16_t bt_mesh_primary_addr(void)
{
return dev_primary_addr;
}
-static u16_t *model_group_get(struct bt_mesh_model *mod, u16_t addr)
+static uint16_t *model_group_get(struct bt_mesh_model *mod, uint16_t addr)
{
int i;
@@ -357,13 +361,13 @@ static u16_t *model_group_get(struct bt_mesh_model *mod, u16_t addr)
}
struct find_group_visitor_ctx {
- u16_t *entry;
+ uint16_t *entry;
struct bt_mesh_model *mod;
- u16_t addr;
+ uint16_t addr;
};
static enum bt_mesh_walk find_group_mod_visitor(struct bt_mesh_model *mod,
- u32_t depth, void *user_data)
+ uint32_t depth, void *user_data)
{
struct find_group_visitor_ctx *ctx = user_data;
@@ -380,7 +384,7 @@ static enum bt_mesh_walk find_group_mod_visitor(struct bt_mesh_model *mod,
return BT_MESH_WALK_CONTINUE;
}
-u16_t *bt_mesh_model_find_group(struct bt_mesh_model **mod, u16_t addr)
+uint16_t *bt_mesh_model_find_group(struct bt_mesh_model **mod, uint16_t addr)
{
struct find_group_visitor_ctx ctx = {
.mod = *mod,
@@ -396,10 +400,10 @@ u16_t *bt_mesh_model_find_group(struct bt_mesh_model **mod, u16_t addr)
}
static struct bt_mesh_model *bt_mesh_elem_find_group(struct bt_mesh_elem *elem,
- u16_t group_addr)
+ uint16_t group_addr)
{
struct bt_mesh_model *model;
- u16_t *match;
+ uint16_t *match;
int i;
for (i = 0; i < elem->model_count; i++) {
@@ -423,9 +427,9 @@ static struct bt_mesh_model *bt_mesh_elem_find_group(struct bt_mesh_elem *elem,
return NULL;
}
-struct bt_mesh_elem *bt_mesh_elem_find(u16_t addr)
+struct bt_mesh_elem *bt_mesh_elem_find(uint16_t addr)
{
- u16_t index;
+ uint16_t index;
if (BT_MESH_ADDR_IS_UNICAST(addr)) {
index = (addr - dev_comp->elem[0].addr);
@@ -447,12 +451,12 @@ struct bt_mesh_elem *bt_mesh_elem_find(u16_t addr)
return NULL;
}
-u8_t bt_mesh_elem_count(void)
+uint8_t bt_mesh_elem_count(void)
{
return dev_comp->elem_count;
}
-static bool model_has_key(struct bt_mesh_model *mod, u16_t key)
+static bool model_has_key(struct bt_mesh_model *mod, uint16_t key)
{
int i;
@@ -467,22 +471,26 @@ static bool model_has_key(struct bt_mesh_model *mod, u16_t key)
return false;
}
-static bool model_has_dst(struct bt_mesh_model *mod, u16_t dst)
+static bool model_has_dst(struct bt_mesh_model *mod, uint16_t dst)
{
if (BT_MESH_ADDR_IS_UNICAST(dst)) {
return (dev_comp->elem[mod->elem_idx].addr == dst);
} else if (BT_MESH_ADDR_IS_GROUP(dst) || BT_MESH_ADDR_IS_VIRTUAL(dst)) {
- return bt_mesh_model_find_group(&mod, dst);
+ return !!bt_mesh_model_find_group(&mod, dst);
}
- return (mod->elem_idx == 0 && bt_mesh_fixed_group_match(dst));
+ /* If a message with a fixed group address is sent to the access layer,
+ * the lower layers have already confirmed that we are subscribing to
+ * it. All models on the primary element should receive the message.
+ */
+ return mod->elem_idx == 0;
}
static const struct bt_mesh_model_op *find_op(struct bt_mesh_model *models,
- u8_t model_count, u32_t opcode,
+ uint8_t model_count, uint32_t opcode,
struct bt_mesh_model **model)
{
- u8_t i;
+ uint8_t i;
for (i = 0; i < model_count; i++) {
const struct bt_mesh_model_op *op;
@@ -500,7 +508,7 @@ static const struct bt_mesh_model_op *find_op(struct bt_mesh_model *models,
return NULL;
}
-static int get_opcode(struct os_mbuf *buf, u32_t *opcode)
+static int get_opcode(struct os_mbuf *buf, uint32_t *opcode)
{
switch (buf->om_data[0] >> 6) {
case 0x00:
@@ -527,6 +535,10 @@ static int get_opcode(struct os_mbuf *buf, u32_t *opcode)
}
*opcode = net_buf_simple_pull_u8(buf) << 16;
+ /* Using LE for the CID since the model layer is defined as
+ * little-endian in the mesh spec and using BT_MESH_MODEL_OP_3
+ * will declare the opcode in this way.
+ */
*opcode |= net_buf_simple_pull_le16(buf);
return 0;
}
@@ -534,29 +546,12 @@ static int get_opcode(struct os_mbuf *buf, u32_t *opcode)
CODE_UNREACHABLE;
}
-bool bt_mesh_fixed_group_match(u16_t addr)
-{
- /* Check for fixed group addresses */
- switch (addr) {
- case BT_MESH_ADDR_ALL_NODES:
- return true;
- case BT_MESH_ADDR_PROXIES:
- return (bt_mesh_gatt_proxy_get() == BT_MESH_GATT_PROXY_ENABLED);
- case BT_MESH_ADDR_FRIENDS:
- return (bt_mesh_friend_get() == BT_MESH_FRIEND_ENABLED);
- case BT_MESH_ADDR_RELAYS:
- return (bt_mesh_relay_get() == BT_MESH_RELAY_ENABLED);
- default:
- return false;
- }
-}
-
void bt_mesh_model_recv(struct bt_mesh_net_rx *rx, struct os_mbuf *buf)
{
struct bt_mesh_model *models, *model;
const struct bt_mesh_model_op *op;
- u32_t opcode;
- u8_t count;
+ uint32_t opcode;
+ uint8_t count;
int i;
BT_DBG("app_idx 0x%04x src 0x%04x dst 0x%04x", rx->ctx.app_idx,
@@ -615,7 +610,7 @@ void bt_mesh_model_recv(struct bt_mesh_net_rx *rx, struct os_mbuf *buf)
}
}
-void bt_mesh_model_msg_init(struct os_mbuf *msg, u32_t opcode)
+void bt_mesh_model_msg_init(struct os_mbuf *msg, uint32_t opcode)
{
net_buf_simple_init(msg, 0);
@@ -628,6 +623,10 @@ void bt_mesh_model_msg_init(struct os_mbuf *msg, u32_t opcode)
break;
case 3:
net_buf_simple_add_u8(msg, ((opcode >> 16) & 0xff));
+ /* Using LE for the CID since the model layer is defined as
+ * little-endian in the mesh spec and using BT_MESH_MODEL_OP_3
+ * will declare the opcode in this way.
+ */
net_buf_simple_add_le16(msg, opcode & 0xffff);
break;
default:
@@ -674,11 +673,8 @@ int bt_mesh_model_send(struct bt_mesh_model *model,
const struct bt_mesh_send_cb *cb, void *cb_data)
{
struct bt_mesh_net_tx tx = {
- .sub = bt_mesh_subnet_get(ctx->net_idx),
.ctx = ctx,
.src = bt_mesh_model_elem(model)->addr,
- .xmit = bt_mesh_net_transmit_get(),
- .friend_cred = 0,
};
return model_send(model, &tx, false, msg, cb, cb_data);
@@ -688,13 +684,15 @@ int bt_mesh_model_publish(struct bt_mesh_model *model)
{
struct os_mbuf *sdu = NET_BUF_SIMPLE(BT_MESH_TX_SDU_MAX);
struct bt_mesh_model_pub *pub = model->pub;
- struct bt_mesh_app_key *key;
struct bt_mesh_msg_ctx ctx = {
+ .addr = pub->addr,
+ .send_ttl = pub->ttl,
+ .send_rel = pub->send_rel,
+ .app_idx = pub->key,
};
struct bt_mesh_net_tx tx = {
.ctx = &ctx,
.src = bt_mesh_model_elem(model)->addr,
- .xmit = bt_mesh_net_transmit_get(),
};
int err;
@@ -710,12 +708,6 @@ int bt_mesh_model_publish(struct bt_mesh_model *model)
goto done;
}
- key = bt_mesh_app_key_find(pub->key);
- if (!key) {
- err = -EADDRNOTAVAIL;
- goto done;
- }
-
if (pub->msg->om_len + 4 > BT_MESH_TX_SDU_MAX) {
BT_ERR("Message does not fit maximum SDU size");
err = -EMSGSIZE;
@@ -730,13 +722,7 @@ int bt_mesh_model_publish(struct bt_mesh_model *model)
net_buf_simple_init(sdu, 0);
net_buf_simple_add_mem(sdu, pub->msg->om_data, pub->msg->om_len);
- ctx.addr = pub->addr;
- ctx.send_ttl = pub->ttl;
- ctx.net_idx = key->net_idx;
- ctx.app_idx = key->app_idx;
-
tx.friend_cred = pub->cred;
- tx.sub = bt_mesh_subnet_get(ctx.net_idx),
pub->count = BT_MESH_PUB_TRANSMIT_COUNT(pub->retransmit);
@@ -745,10 +731,7 @@ int bt_mesh_model_publish(struct bt_mesh_model *model)
err = model_send(model, &tx, true, sdu, &pub_sent_cb, model);
if (err) {
- /* Don't try retransmissions for this publish attempt */
- pub->count = 0;
- /* Make sure the publish timer gets reset */
- publish_sent(err, model);
+ publish_retransmit_end(err, pub);
}
done:
@@ -757,9 +740,9 @@ done:
}
struct bt_mesh_model *bt_mesh_model_find_vnd(const struct bt_mesh_elem *elem,
- u16_t company, u16_t id)
+ uint16_t company, uint16_t id)
{
- u8_t i;
+ uint8_t i;
for (i = 0; i < elem->vnd_model_count; i++) {
if (elem->vnd_models[i].vnd.company == company &&
@@ -772,9 +755,9 @@ struct bt_mesh_model *bt_mesh_model_find_vnd(const struct bt_mesh_elem *elem,
}
struct bt_mesh_model *bt_mesh_model_find(const struct bt_mesh_elem *elem,
- u16_t id)
+ uint16_t id)
{
- u8_t i;
+ uint8_t i;
for (i = 0; i < elem->model_count; i++) {
if (elem->models[i].id == id) {
@@ -802,29 +785,38 @@ struct bt_mesh_model *bt_mesh_model_root(struct bt_mesh_model *mod)
void bt_mesh_model_tree_walk(struct bt_mesh_model *root,
enum bt_mesh_walk (*cb)(struct bt_mesh_model *mod,
- u32_t depth,
+ uint32_t depth,
void *user_data),
void *user_data)
{
struct bt_mesh_model *m = root;
- u32_t depth = 0;
+ int depth = 0;
+ /* 'skip' is set to true when we ascend from child to parent node.
+ * In that case, we want to skip calling the callback on the parent
+ * node and we don't want to descend onto a child node as those
+ * nodes have already been visited.
+ */
+ bool skip = false;
do {
- if (cb(m, depth, user_data) == BT_MESH_WALK_STOP) {
+ if (!skip &&
+ cb(m, (uint32_t)depth, user_data) == BT_MESH_WALK_STOP) {
return;
}
#if MYNEWT_VAL(BLE_MESH_MODEL_EXTENSIONS)
- if (m->extends) {
+ if (!skip && m->extends) {
m = m->extends;
depth++;
} else if (m->flags & BT_MESH_MOD_NEXT_IS_PARENT) {
- m = m->next->next;
+ m = m->next;
depth--;
+ skip = true;
} else {
m = m->next;
+ skip = false;
}
#endif
- } while (m && m != root);
+ } while (m && depth > 0);
}
#if MYNEWT_VAL(BLE_MESH_MODEL_EXTENSIONS)
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/access.h b/src/libs/mynewt-nimble/nimble/host/mesh/src/access.h
index 48514983..affba538 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/src/access.h
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/access.h
@@ -16,8 +16,7 @@ enum {
BT_MESH_MOD_BIND_PENDING = BIT(0),
BT_MESH_MOD_SUB_PENDING = BIT(1),
BT_MESH_MOD_PUB_PENDING = BIT(2),
- BT_MESH_MOD_DATA_PRESENT = BIT(3),
- BT_MESH_MOD_NEXT_IS_PARENT = BIT(4),
+ BT_MESH_MOD_NEXT_IS_PARENT = BIT(3),
};
/* Tree walk return codes */
@@ -26,23 +25,21 @@ enum bt_mesh_walk {
BT_MESH_WALK_CONTINUE,
};
-void bt_mesh_elem_register(struct bt_mesh_elem *elem, u8_t count);
+void bt_mesh_elem_register(struct bt_mesh_elem *elem, uint8_t count);
-u8_t bt_mesh_elem_count(void);
+uint8_t bt_mesh_elem_count(void);
/* Find local element based on unicast or group address */
-struct bt_mesh_elem *bt_mesh_elem_find(u16_t addr);
+struct bt_mesh_elem *bt_mesh_elem_find(uint16_t addr);
struct bt_mesh_model *bt_mesh_model_root(struct bt_mesh_model *mod);
void bt_mesh_model_tree_walk(struct bt_mesh_model *root,
enum bt_mesh_walk (*cb)(struct bt_mesh_model *mod,
- u32_t depth,
+ uint32_t depth,
void *user_data),
void *user_data);
-u16_t *bt_mesh_model_find_group(struct bt_mesh_model **mod, u16_t addr);
-
-bool bt_mesh_fixed_group_match(u16_t addr);
+uint16_t *bt_mesh_model_find_group(struct bt_mesh_model **mod, uint16_t addr);
void bt_mesh_model_foreach(void (*func)(struct bt_mesh_model *mod,
struct bt_mesh_elem *elem,
@@ -50,16 +47,16 @@ void bt_mesh_model_foreach(void (*func)(struct bt_mesh_model *mod,
void *user_data),
void *user_data);
-s32_t bt_mesh_model_pub_period_get(struct bt_mesh_model *mod);
+int32_t bt_mesh_model_pub_period_get(struct bt_mesh_model *mod);
-void bt_mesh_comp_provision(u16_t addr);
+void bt_mesh_comp_provision(uint16_t addr);
void bt_mesh_comp_unprovision(void);
-u16_t bt_mesh_primary_addr(void);
+uint16_t bt_mesh_primary_addr(void);
const struct bt_mesh_comp *bt_mesh_comp_get(void);
-struct bt_mesh_model *bt_mesh_model_get(bool vnd, u8_t elem_idx, u8_t mod_idx);
+struct bt_mesh_model *bt_mesh_model_get(bool vnd, uint8_t elem_idx, uint8_t mod_idx);
void bt_mesh_model_recv(struct bt_mesh_net_rx *rx, struct os_mbuf *buf);
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/adv.c b/src/libs/mynewt-nimble/nimble/host/mesh/src/adv.c
index 4bd51cc1..4b372991 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/src/adv.c
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/adv.c
@@ -38,19 +38,18 @@
#define ADV_INT_DEFAULT_MS 100
#define ADV_INT_FAST_MS 20
-static s32_t adv_int_min = ADV_INT_DEFAULT_MS;
+static int32_t adv_int_min = ADV_INT_DEFAULT_MS;
/* TinyCrypt PRNG consumes a lot of stack space, so we need to have
* an increased call stack whenever it's used.
*/
#if MYNEWT
-#define ADV_STACK_SIZE 768
-OS_TASK_STACK_DEFINE(g_blemesh_stack, ADV_STACK_SIZE);
+OS_TASK_STACK_DEFINE(g_blemesh_stack, MYNEWT_VAL(BLE_MESH_ADV_STACK_SIZE));
struct os_task adv_task;
#endif
static struct ble_npl_eventq adv_queue;
-extern u8_t g_mesh_addr_type;
+extern uint8_t g_mesh_addr_type;
static int adv_initialized = false;
static os_membuf_t adv_buf_mem[OS_MEMPOOL_SIZE(
@@ -60,14 +59,6 @@ static os_membuf_t adv_buf_mem[OS_MEMPOOL_SIZE(
struct os_mbuf_pool adv_os_mbuf_pool;
static struct os_mempool adv_buf_mempool;
-static const u8_t adv_type[] = {
- [BT_MESH_ADV_PROV] = BLE_HS_ADV_TYPE_MESH_PROV,
- [BT_MESH_ADV_DATA] = BLE_HS_ADV_TYPE_MESH_MESSAGE,
- [BT_MESH_ADV_BEACON] = BLE_HS_ADV_TYPE_MESH_BEACON,
- [BT_MESH_ADV_URI] = BLE_HS_ADV_TYPE_URI,
-};
-
-
static struct bt_mesh_adv adv_pool[CONFIG_BT_MESH_ADV_BUF_COUNT];
static struct bt_mesh_adv *adv_alloc(int id)
@@ -75,7 +66,7 @@ static struct bt_mesh_adv *adv_alloc(int id)
return &adv_pool[id];
}
-static inline void adv_send_start(u16_t duration, int err,
+static inline void adv_send_start(uint16_t duration, int err,
const struct bt_mesh_send_cb *cb,
void *cb_data)
{
@@ -94,10 +85,17 @@ static inline void adv_send_end(int err, const struct bt_mesh_send_cb *cb,
static inline void adv_send(struct os_mbuf *buf)
{
+ static const uint8_t adv_type[] = {
+ [BT_MESH_ADV_PROV] = BLE_HS_ADV_TYPE_MESH_PROV,
+ [BT_MESH_ADV_DATA] = BLE_HS_ADV_TYPE_MESH_MESSAGE,
+ [BT_MESH_ADV_BEACON] = BLE_HS_ADV_TYPE_MESH_BEACON,
+ [BT_MESH_ADV_URI] = BLE_HS_ADV_TYPE_URI,
+} ;
+
const struct bt_mesh_send_cb *cb = BT_MESH_ADV(buf)->cb;
void *cb_data = BT_MESH_ADV(buf)->cb_data;
struct ble_gap_adv_params param = { 0 };
- u16_t duration, adv_int;
+ uint16_t duration, adv_int;
struct bt_data ad;
int err;
@@ -154,7 +152,7 @@ mesh_adv_thread(void *args)
static struct ble_npl_event *ev;
struct os_mbuf *buf;
#if (MYNEWT_VAL(BLE_MESH_PROXY))
- s32_t timeout;
+ int32_t timeout;
#endif
BT_DBG("started");
@@ -208,7 +206,7 @@ void bt_mesh_adv_update(void)
struct os_mbuf *bt_mesh_adv_create_from_pool(struct os_mbuf_pool *pool,
bt_mesh_adv_alloc_t get_id,
enum bt_mesh_adv_type type,
- u8_t xmit, s32_t timeout)
+ uint8_t xmit, int32_t timeout)
{
struct bt_mesh_adv *adv;
struct os_mbuf *buf;
@@ -235,10 +233,11 @@ struct os_mbuf *bt_mesh_adv_create_from_pool(struct os_mbuf_pool *pool,
ble_npl_event_set_arg(&adv->ev, buf);
return buf;
+ os_mbuf_free_chain(buf);
}
-struct os_mbuf *bt_mesh_adv_create(enum bt_mesh_adv_type type, u8_t xmit,
- s32_t timeout)
+struct os_mbuf *bt_mesh_adv_create(enum bt_mesh_adv_type type, uint8_t xmit,
+ int32_t timeout)
{
return bt_mesh_adv_create_from_pool(&adv_os_mbuf_pool, adv_alloc, type,
xmit, timeout);
@@ -257,8 +256,8 @@ void bt_mesh_adv_send(struct os_mbuf *buf, const struct bt_mesh_send_cb *cb,
net_buf_put(&adv_queue, net_buf_ref(buf));
}
-static void bt_mesh_scan_cb(const bt_addr_le_t *addr, s8_t rssi,
- u8_t adv_type, struct os_mbuf *buf)
+static void bt_mesh_scan_cb(const bt_addr_le_t *addr, int8_t rssi,
+ uint8_t adv_type, struct os_mbuf *buf)
{
if (adv_type != BLE_HCI_ADV_TYPE_ADV_NONCONN_IND) {
return;
@@ -270,7 +269,7 @@ static void bt_mesh_scan_cb(const bt_addr_le_t *addr, s8_t rssi,
while (buf->om_len > 1) {
struct net_buf_simple_state state;
- u8_t len, type;
+ uint8_t len, type;
len = net_buf_simple_pull_u8(buf);
/* Check for early termination */
@@ -304,7 +303,7 @@ static void bt_mesh_scan_cb(const bt_addr_le_t *addr, s8_t rssi,
}
net_buf_simple_restore(buf, &state);
- net_buf_simple_pull(buf, len);
+ net_buf_simple_pull_mem(buf, len);
}
}
@@ -333,7 +332,7 @@ void bt_mesh_adv_init(void)
#if MYNEWT
os_task_init(&adv_task, "mesh_adv", mesh_adv_thread, NULL,
MYNEWT_VAL(BLE_MESH_ADV_TASK_PRIO), OS_WAIT_FOREVER,
- g_blemesh_stack, ADV_STACK_SIZE);
+ g_blemesh_stack, MYNEWT_VAL(BLE_MESH_ADV_STACK_SIZE));
#endif
/* For BT5 controllers we can have fast advertising interval */
@@ -362,7 +361,7 @@ ble_adv_gap_mesh_cb(struct ble_gap_event *event, void *arg)
case BLE_GAP_EVENT_EXT_DISC:
ext_desc = &event->ext_disc;
buf = os_mbuf_get_pkthdr(&adv_os_mbuf_pool, 0);
- if (!buf || os_mbuf_append(buf, ext_desc->data, ext_desc->length_data)) {
+ if (!buf || os_mbuf_append(buf, ext_desc->om_data, ext_desc->length_data)) {
BT_ERR("Could not append data");
goto done;
}
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/adv.h b/src/libs/mynewt-nimble/nimble/host/mesh/src/adv.h
index 4d0f7d8b..779ee58e 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/src/adv.h
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/adv.h
@@ -31,23 +31,18 @@ enum bt_mesh_adv_type
BT_MESH_ADV_URI,
};
-typedef void (*bt_mesh_adv_func_t)(struct os_mbuf *buf, u16_t duration,
+typedef void (*bt_mesh_adv_func_t)(struct os_mbuf *buf, uint16_t duration,
int err, void *user_data);
struct bt_mesh_adv {
const struct bt_mesh_send_cb *cb;
void *cb_data;
- u8_t type:2,
+ uint8_t type:2,
busy:1;
- u8_t xmit;
+ uint8_t xmit;
- /* For transport layer segment sending */
- struct {
- u8_t attempts;
- } seg;
-
- u8_t flags;
+ uint8_t flags;
int ref_cnt;
struct ble_npl_event ev;
@@ -56,13 +51,13 @@ struct bt_mesh_adv {
typedef struct bt_mesh_adv *(*bt_mesh_adv_alloc_t)(int id);
/* xmit_count: Number of retransmissions, i.e. 0 == 1 transmission */
-struct os_mbuf *bt_mesh_adv_create(enum bt_mesh_adv_type type, u8_t xmit,
- s32_t timeout);
+struct os_mbuf *bt_mesh_adv_create(enum bt_mesh_adv_type type, uint8_t xmit,
+ int32_t timeout);
struct os_mbuf *bt_mesh_adv_create_from_pool(struct os_mbuf_pool *pool,
bt_mesh_adv_alloc_t get_id,
enum bt_mesh_adv_type type,
- u8_t xmit, s32_t timeout);
+ uint8_t xmit, int32_t timeout);
void bt_mesh_adv_send(struct os_mbuf *buf, const struct bt_mesh_send_cb *cb,
void *cb_data);
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/aes-ccm.c b/src/libs/mynewt-nimble/nimble/host/mesh/src/aes-ccm.c
new file mode 100644
index 00000000..ab23c264
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/aes-ccm.c
@@ -0,0 +1,224 @@
+/*
+ * Copyright (c) 2020 Nordic Semiconductor ASA
+ * Copyright (c) 2017 Intel Corporation
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+#include "crypto.h"
+#define MESH_LOG_MODULE BLE_MESH_LOG
+
+static inline void xor16(uint8_t *dst, const uint8_t *a, const uint8_t *b)
+{
+ dst[0] = a[0] ^ b[0];
+ dst[1] = a[1] ^ b[1];
+ dst[2] = a[2] ^ b[2];
+ dst[3] = a[3] ^ b[3];
+ dst[4] = a[4] ^ b[4];
+ dst[5] = a[5] ^ b[5];
+ dst[6] = a[6] ^ b[6];
+ dst[7] = a[7] ^ b[7];
+ dst[8] = a[8] ^ b[8];
+ dst[9] = a[9] ^ b[9];
+ dst[10] = a[10] ^ b[10];
+ dst[11] = a[11] ^ b[11];
+ dst[12] = a[12] ^ b[12];
+ dst[13] = a[13] ^ b[13];
+ dst[14] = a[14] ^ b[14];
+ dst[15] = a[15] ^ b[15];
+}
+
+/* pmsg is assumed to have the nonce already present in bytes 1-13 */
+static int ccm_calculate_X0(const uint8_t key[16], const uint8_t *aad, uint8_t aad_len,
+ size_t mic_size, uint8_t msg_len, uint8_t b[16],
+ uint8_t X0[16])
+{
+ int i, j, err;
+
+ /* X_0 = e(AppKey, flags || nonce || length) */
+ b[0] = (((mic_size - 2) / 2) << 3) | ((!!aad_len) << 6) | 0x01;
+
+ sys_put_be16(msg_len, b + 14);
+
+ err = bt_encrypt_be(key, b, X0);
+ if (err) {
+ return err;
+ }
+
+ /* If AAD is being used to authenticate, include it here */
+ if (aad_len) {
+ sys_put_be16(aad_len, b);
+
+ for (i = 0; i < sizeof(uint16_t); i++) {
+ b[i] = X0[i] ^ b[i];
+ }
+
+ j = 0;
+ aad_len += sizeof(uint16_t);
+ while (aad_len > 16) {
+ do {
+ b[i] = X0[i] ^ aad[j];
+ i++, j++;
+ } while (i < 16);
+
+ aad_len -= 16;
+ i = 0;
+
+ err = bt_encrypt_be(key, b, X0);
+ if (err) {
+ return err;
+ }
+ }
+
+ for (; i < aad_len; i++, j++) {
+ b[i] = X0[i] ^ aad[j];
+ }
+
+ for (i = aad_len; i < 16; i++) {
+ b[i] = X0[i];
+ }
+
+ err = bt_encrypt_be(key, b, X0);
+ if (err) {
+ return err;
+ }
+ }
+
+ return 0;
+}
+
+static int ccm_auth(const uint8_t key[16], uint8_t nonce[13],
+ const uint8_t *cleartext_msg, size_t msg_len, const uint8_t *aad,
+ size_t aad_len, uint8_t *mic, size_t mic_size)
+{
+ uint8_t b[16], Xn[16], s0[16];
+ uint16_t blk_cnt, last_blk;
+ int err, j, i;
+
+ last_blk = msg_len % 16;
+ blk_cnt = (msg_len + 15) / 16;
+ if (!last_blk) {
+ last_blk = 16U;
+ }
+
+ b[0] = 0x01;
+ memcpy(b + 1, nonce, 13);
+
+ /* S[0] = e(AppKey, 0x01 || nonce || 0x0000) */
+ sys_put_be16(0x0000, &b[14]);
+
+ err = bt_encrypt_be(key, b, s0);
+ if (err) {
+ return err;
+ }
+
+ ccm_calculate_X0(key, aad, aad_len, mic_size, msg_len, b, Xn);
+
+ for (j = 0; j < blk_cnt; j++) {
+ /* X_1 = e(AppKey, X_0 ^ Payload[0-15]) */
+ if (j + 1 == blk_cnt) {
+ for (i = 0; i < last_blk; i++) {
+ b[i] = Xn[i] ^ cleartext_msg[(j * 16) + i];
+ }
+
+ memcpy(&b[i], &Xn[i], 16 - i);
+ } else {
+ xor16(b, Xn, &cleartext_msg[j * 16]);
+ }
+
+ err = bt_encrypt_be(key, b, Xn);
+ if (err) {
+ return err;
+ }
+ }
+
+ /* MIC = C_mic ^ X_1 */
+ for (i = 0; i < mic_size; i++) {
+ mic[i] = s0[i] ^ Xn[i];
+ }
+
+ return 0;
+}
+
+static int ccm_crypt(const uint8_t key[16], const uint8_t nonce[13],
+ const uint8_t *in_msg, uint8_t *out_msg, size_t msg_len)
+{
+ uint8_t a_i[16], s_i[16];
+ uint16_t last_blk, blk_cnt;
+ size_t i, j;
+ int err;
+
+ last_blk = msg_len % 16;
+ blk_cnt = (msg_len + 15) / 16;
+ if (!last_blk) {
+ last_blk = 16U;
+ }
+
+ a_i[0] = 0x01;
+ memcpy(&a_i[1], nonce, 13);
+
+ for (j = 0; j < blk_cnt; j++) {
+ /* S_1 = e(AppKey, 0x01 || nonce || 0x0001) */
+ sys_put_be16(j + 1, &a_i[14]);
+
+ err = bt_encrypt_be(key, a_i, s_i);
+ if (err) {
+ return err;
+ }
+
+ /* Encrypted = Payload[0-15] ^ C_1 */
+ if (j < blk_cnt - 1) {
+ xor16(&out_msg[j * 16], s_i, &in_msg[j * 16]);
+ } else {
+ for (i = 0; i < last_blk; i++) {
+ out_msg[(j * 16) + i] =
+ in_msg[(j * 16) + i] ^ s_i[i];
+ }
+ }
+ }
+ return 0;
+}
+
+int bt_ccm_decrypt(const uint8_t key[16], uint8_t nonce[13], const uint8_t *enc_msg,
+ size_t msg_len, const uint8_t *aad, size_t aad_len,
+ uint8_t *out_msg, size_t mic_size)
+{
+ uint8_t mic[16];
+
+ if (aad_len >= 0xff00 || mic_size > sizeof(mic)) {
+ return -EINVAL;
+ }
+
+ ccm_crypt(key, nonce, enc_msg, out_msg, msg_len);
+
+ ccm_auth(key, nonce, out_msg, msg_len, aad, aad_len, mic, mic_size);
+
+ if (memcmp(mic, enc_msg + msg_len, mic_size)) {
+ return -EBADMSG;
+ }
+
+ return 0;
+}
+
+int bt_ccm_encrypt(const uint8_t key[16], uint8_t nonce[13], const uint8_t *msg,
+ size_t msg_len, const uint8_t *aad, size_t aad_len,
+ uint8_t *out_msg, size_t mic_size)
+{
+ uint8_t *mic = out_msg + msg_len;
+
+ BT_DBG("key %s", bt_hex(key, 16));
+ BT_DBG("nonce %s", bt_hex(nonce, 13));
+ BT_DBG("msg (len %zu) %s", msg_len, bt_hex(msg, msg_len));
+ BT_DBG("aad_len %zu mic_size %zu", aad_len, mic_size);
+
+ /* Unsupported AAD size */
+ if (aad_len >= 0xff00 || mic_size > 16) {
+ return -EINVAL;
+ }
+
+ ccm_auth(key, nonce, out_msg, msg_len, aad, aad_len, mic, mic_size);
+
+ ccm_crypt(key, nonce, msg, out_msg, msg_len);
+
+ return 0;
+}
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/app_keys.c b/src/libs/mynewt-nimble/nimble/host/mesh/src/app_keys.c
new file mode 100644
index 00000000..a6c32bf3
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/app_keys.c
@@ -0,0 +1,507 @@
+/*
+ * Copyright (c) 2017 Intel Corporation
+ * Copyright (c) 2020 Nordic Semiconductor ASA
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+#include <string.h>
+#include <stdlib.h>
+#include "mesh/mesh.h"
+#include "mesh_priv.h"
+#include "net.h"
+#include "app_keys.h"
+#include "rpl.h"
+#include "settings.h"
+#include "crypto.h"
+#include "adv.h"
+#include "proxy.h"
+#include "friend.h"
+#include "foundation.h"
+#include "access.h"
+#include "subnet.h"
+
+#define MESH_LOG_MODULE BLE_MESH_LOG
+#include "log/log.h"
+
+static struct bt_mesh_app_key apps[CONFIG_BT_MESH_APP_KEY_COUNT] = {
+ [0 ... (CONFIG_BT_MESH_APP_KEY_COUNT - 1)] = {
+ .app_idx = BT_MESH_KEY_UNUSED,
+ .net_idx = BT_MESH_KEY_UNUSED,
+ }
+};
+
+static void app_key_evt(struct bt_mesh_app_key *app, enum bt_mesh_key_evt evt)
+{
+ int i;
+
+ for (i = 0; i < (sizeof(bt_mesh_app_key_cb_list)/sizeof(void *)); i++) {
+ if (bt_mesh_app_key_cb_list[i]) {
+ BT_DBG("app_key_evt %d", i);
+ bt_mesh_app_key_cb_list[i] (app->app_idx, app->net_idx, evt);
+ }
+ }
+}
+
+struct bt_mesh_app_key *app_get(uint16_t app_idx)
+{
+ for (int i = 0; i < ARRAY_SIZE(apps); i++) {
+ if (apps[i].app_idx == app_idx) {
+ return &apps[i];
+ }
+ }
+
+ return NULL;
+}
+
+static struct bt_mesh_app_key *app_key_alloc(uint16_t app_idx)
+{
+ struct bt_mesh_app_key *app = NULL;
+
+ for (int i = 0; i < ARRAY_SIZE(apps); i++) {
+ /* Check for already existing app_key */
+ if (apps[i].app_idx == app_idx) {
+ return &apps[i];
+ }
+
+ if (!app && apps[i].app_idx == BT_MESH_KEY_UNUSED) {
+ app = &apps[i];
+ }
+ }
+
+ return app;
+}
+
+static void app_key_del(struct bt_mesh_app_key *app)
+{
+ BT_DBG("AppIdx 0x%03x", app->app_idx);
+
+ if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
+ bt_mesh_clear_app_key(app->app_idx);
+ }
+
+ app_key_evt(app, BT_MESH_KEY_DELETED);
+
+ app->net_idx = BT_MESH_KEY_UNUSED;
+ app->app_idx = BT_MESH_KEY_UNUSED;
+ (void)memset(app->keys, 0, sizeof(app->keys));
+}
+
+static void app_key_revoke(struct bt_mesh_app_key *app)
+{
+ if (!app->updated) {
+ return;
+ }
+
+ memcpy(&app->keys[0], &app->keys[1], sizeof(app->keys[0]));
+ memset(&app->keys[1], 0, sizeof(app->keys[1]));
+ app->updated = false;
+
+ if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
+ bt_mesh_store_app_key(app->app_idx);
+ }
+
+ app_key_evt(app, BT_MESH_KEY_REVOKED);
+}
+
+
+static void subnet_evt(struct bt_mesh_subnet *sub, enum bt_mesh_key_evt evt)
+{
+ if (evt == BT_MESH_KEY_UPDATED || evt == BT_MESH_KEY_ADDED) {
+ return;
+ }
+
+ for (int i = 0; i < ARRAY_SIZE(apps); i++) {
+ struct bt_mesh_app_key *app = &apps[i];
+
+ if (app->app_idx == BT_MESH_KEY_UNUSED) {
+ continue;
+ }
+
+ if (app->net_idx != sub->net_idx) {
+ continue;
+ }
+
+ if (evt == BT_MESH_KEY_DELETED) {
+ app_key_del(app);
+ } else if (evt == BT_MESH_KEY_REVOKED) {
+ app_key_revoke(app);
+ } else if (evt == BT_MESH_KEY_SWAPPED && app->updated) {
+ app_key_evt(app, BT_MESH_KEY_SWAPPED);
+ }
+ }
+}
+
+
+uint8_t bt_mesh_app_key_add(uint16_t app_idx, uint16_t net_idx,
+ const uint8_t key[16])
+{
+ if (!bt_mesh_subnet_cb_list[0]) {
+ bt_mesh_subnet_cb_list[0] = subnet_evt;
+ }
+
+ struct bt_mesh_app_key *app;
+
+ BT_DBG("net_idx 0x%04x app_idx %04x val %s", net_idx, app_idx,
+ bt_hex(key, 16));
+
+ if (!bt_mesh_subnet_get(net_idx)) {
+ return STATUS_INVALID_NETKEY;
+ }
+
+ app = app_key_alloc(app_idx);
+ if (!app) {
+ return STATUS_INSUFF_RESOURCES;
+ }
+
+ if (app->app_idx == app_idx) {
+ if (app->net_idx != net_idx) {
+ return STATUS_INVALID_BINDING;
+ }
+
+ if (memcmp(key, app->keys[0].val, 16)) {
+ return STATUS_IDX_ALREADY_STORED;
+ }
+
+ return STATUS_SUCCESS;
+ }
+
+ if (bt_mesh_app_id(key, &app->keys[0].id)) {
+ return STATUS_CANNOT_SET;
+ }
+
+ BT_DBG("AppIdx 0x%04x AID 0x%02x", app_idx, app->keys[0].id);
+
+ app->net_idx = net_idx;
+ app->app_idx = app_idx;
+ app->updated = false;
+ memcpy(app->keys[0].val, key, 16);
+
+ if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
+ BT_DBG("Storing AppKey persistently");
+ bt_mesh_store_app_key(app->app_idx);
+ }
+
+ app_key_evt(app, BT_MESH_KEY_ADDED);
+
+ return STATUS_SUCCESS;
+}
+
+struct bt_mesh_app_key *bt_mesh_app_key_get(uint16_t app_idx)
+{
+ struct bt_mesh_app_key *app;
+
+ app = app_get(app_idx);
+ if (app) {
+ return app;
+ }
+
+ return NULL;
+}
+
+uint8_t bt_mesh_app_key_update(uint16_t app_idx, uint16_t net_idx,
+ const uint8_t key[16])
+{
+ struct bt_mesh_app_key *app;
+ struct bt_mesh_subnet *sub;
+
+ BT_DBG("net_idx 0x%04x app_idx %04x val %s", net_idx, app_idx,
+ bt_hex(key, 16));
+
+ app = app_get(app_idx);
+ if (!app) {
+ return STATUS_INVALID_APPKEY;
+ }
+
+ if (net_idx != BT_MESH_KEY_UNUSED && app->net_idx != net_idx) {
+ return STATUS_INVALID_BINDING;
+ }
+
+ sub = bt_mesh_subnet_get(app->net_idx);
+ if (!sub) {
+ return STATUS_INVALID_NETKEY;
+ }
+
+ /* The AppKey Update message shall generate an error when node
+ * is in normal operation, Phase 2, or Phase 3 or in Phase 1
+ * when the AppKey Update message on a valid AppKeyIndex when
+ * the AppKey value is different.
+ */
+ if (sub->kr_phase != BT_MESH_KR_PHASE_1) {
+ return STATUS_CANNOT_UPDATE;
+ }
+
+ if (app->updated) {
+ if (memcmp(app->keys[1].val, key, 16)) {
+ return STATUS_IDX_ALREADY_STORED;
+ }
+
+ return STATUS_SUCCESS;
+ }
+
+ if (bt_mesh_app_id(key, &app->keys[1].id)) {
+ return STATUS_CANNOT_UPDATE;
+ }
+
+ BT_DBG("app_idx 0x%04x AID 0x%02x", app_idx, app->keys[1].id);
+
+ app->updated = true;
+ memcpy(app->keys[1].val, key, 16);
+
+ if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
+ BT_DBG("Storing AppKey persistently");
+ bt_mesh_store_app_key(app->app_idx);
+ }
+
+ app_key_evt(app, BT_MESH_KEY_UPDATED);
+
+ return STATUS_SUCCESS;
+}
+
+uint8_t bt_mesh_app_key_del(uint16_t app_idx, uint16_t net_idx)
+{
+ struct bt_mesh_app_key *app;
+
+ BT_DBG("AppIdx 0x%03x", app_idx);
+
+ if (net_idx != BT_MESH_KEY_UNUSED && !bt_mesh_subnet_get(net_idx)) {
+ return STATUS_INVALID_NETKEY;
+ }
+
+ app = app_get(app_idx);
+ if (!app) {
+ /* This could be a retry of a previous attempt that had its
+ * response lost, so pretend that it was a success.
+ */
+ return STATUS_SUCCESS;
+ }
+
+ if (net_idx != BT_MESH_KEY_UNUSED && net_idx != app->net_idx) {
+ return STATUS_INVALID_BINDING;
+ }
+
+ app_key_del(app);
+
+ return STATUS_SUCCESS;
+}
+
+int bt_mesh_app_key_set(uint16_t app_idx, uint16_t net_idx,
+ const uint8_t old_key[16], const uint8_t new_key[16])
+{
+ struct bt_mesh_app_key *app;
+
+ app = app_key_alloc(app_idx);
+ if (!app) {
+ return -ENOMEM;
+ }
+
+ if (app->app_idx == app_idx) {
+ return 0;
+ }
+
+ BT_DBG("AppIdx 0x%04x AID 0x%02x", app_idx, app->keys[0].id);
+
+ memcpy(app->keys[0].val, old_key, 16);
+ if (bt_mesh_app_id(old_key, &app->keys[0].id)) {
+ return -EIO;
+ }
+
+ if (new_key) {
+ memcpy(app->keys[1].val, new_key, 16);
+ if (bt_mesh_app_id(new_key, &app->keys[1].id)) {
+ return -EIO;
+ }
+ }
+
+ app->net_idx = net_idx;
+ app->app_idx = app_idx;
+ app->updated = !!new_key;
+
+ return 0;
+}
+
+bool bt_mesh_app_key_exists(uint16_t app_idx)
+{
+ for (int i = 0; i < ARRAY_SIZE(apps); i++) {
+ if (apps[i].app_idx == app_idx) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+ssize_t bt_mesh_app_keys_get(uint16_t net_idx, uint16_t app_idxs[], size_t max,
+ off_t skip)
+{
+ size_t count = 0;
+
+ for (int i = 0; i < ARRAY_SIZE(apps); i++) {
+ struct bt_mesh_app_key *app = &apps[i];
+
+ if (app->app_idx == BT_MESH_KEY_UNUSED) {
+ continue;
+ }
+
+ if (net_idx != BT_MESH_KEY_ANY && app->net_idx != net_idx) {
+ continue;
+ }
+
+ if (skip) {
+ skip--;
+ continue;
+ }
+
+ if (count >= max) {
+ return -ENOMEM;
+ }
+
+ app_idxs[count++] = app->app_idx;
+ }
+
+ return count;
+}
+
+int bt_mesh_keys_resolve(struct bt_mesh_msg_ctx *ctx,
+ struct bt_mesh_subnet **sub,
+ const uint8_t *app_key[16], uint8_t *aid)
+{
+ struct bt_mesh_app_key *app = NULL;
+
+ if (BT_MESH_IS_DEV_KEY(ctx->app_idx)) {
+ /* With device keys, the application has to decide which subnet
+ * to send on.
+ */
+ *sub = bt_mesh_subnet_get(ctx->net_idx);
+ if (!*sub) {
+ BT_WARN("Unknown NetKey 0x%03x", ctx->net_idx);
+ return -EINVAL;
+ }
+
+ if (ctx->app_idx == BT_MESH_KEY_DEV_REMOTE &&
+ !bt_mesh_elem_find(ctx->addr)) {
+ struct bt_mesh_cdb_node *node;
+
+ if (!IS_ENABLED(CONFIG_BT_MESH_CDB)) {
+ BT_WARN("No DevKey for 0x%04x", ctx->addr);
+ return -EINVAL;
+ }
+
+ node = bt_mesh_cdb_node_get(ctx->addr);
+ if (!node) {
+ BT_WARN("No DevKey for 0x%04x", ctx->addr);
+ return -EINVAL;
+ }
+
+ *app_key = node->dev_key;
+ } else {
+ *app_key = bt_mesh.dev_key;
+ }
+
+ *aid = 0;
+ return 0;
+ }
+
+ app = app_get(ctx->app_idx);
+ if (!app) {
+ BT_WARN("Unknown AppKey 0x%03x", ctx->app_idx);
+ return -EINVAL;
+ }
+
+ *sub = bt_mesh_subnet_get(app->net_idx);
+ if (!*sub) {
+ BT_WARN("Unknown NetKey 0x%03x", app->net_idx);
+ return -EINVAL;
+ }
+
+ if ((*sub)->kr_phase == BT_MESH_KR_PHASE_2 && app->updated) {
+ *aid = app->keys[1].id;
+ *app_key = app->keys[1].val;
+ } else {
+ *aid = app->keys[0].id;
+ *app_key = app->keys[0].val;
+ }
+
+ return 0;
+}
+
+uint16_t bt_mesh_app_key_find(bool dev_key, uint8_t aid,
+ struct bt_mesh_net_rx *rx,
+ int (*cb)(struct bt_mesh_net_rx *rx,
+ const uint8_t key[16], void *cb_data),
+ void *cb_data)
+{
+ int err, i;
+
+ if (dev_key) {
+ /* Attempt remote dev key first, as that is only available for
+ * provisioner devices, which normally don't interact with nodes
+ * that know their local dev key.
+ */
+ if (IS_ENABLED(CONFIG_BT_MESH_CDB) &&
+ rx->net_if != BT_MESH_NET_IF_LOCAL) {
+ struct bt_mesh_cdb_node *node;
+
+ node = bt_mesh_cdb_node_get(rx->ctx.addr);
+ if (node && !cb(rx, node->dev_key, cb_data)) {
+ return BT_MESH_KEY_DEV_REMOTE;
+ }
+ }
+
+ /** Bluetooth Mesh Specification v1.0.1, section 3.4.3:
+ * The Device key is only valid for unicast addresses.
+ */
+ if (BT_MESH_ADDR_IS_UNICAST(rx->ctx.recv_dst)) {
+ err = cb(rx, bt_mesh.dev_key, cb_data);
+ if (!err) {
+ return BT_MESH_KEY_DEV_LOCAL;
+ }
+ }
+
+ return BT_MESH_KEY_UNUSED;
+ }
+
+ for (i = 0; i < ARRAY_SIZE(apps); i++) {
+ const struct bt_mesh_app_key *app = &apps[i];
+ const struct bt_mesh_app_cred *cred;
+
+ if (app->app_idx == BT_MESH_KEY_UNUSED) {
+ continue;
+ }
+
+ if (app->net_idx != rx->sub->net_idx) {
+ continue;
+ }
+
+ if (rx->new_key && app->updated) {
+ cred = &app->keys[1];
+ } else {
+ cred = &app->keys[0];
+ }
+
+ if (cred->id != aid) {
+ continue;
+ }
+
+ err = cb(rx, cred->val, cb_data);
+ if (err) {
+ continue;
+ }
+
+ return app->app_idx;
+ }
+
+ return BT_MESH_KEY_UNUSED;
+}
+
+
+void bt_mesh_app_keys_reset(void)
+{
+ for (int i = 0; i < ARRAY_SIZE(apps); i++) {
+ struct bt_mesh_app_key *app = &apps[i];
+
+ if (app->app_idx != BT_MESH_KEY_UNUSED) {
+ app_key_del(app);
+ }
+ }
+} \ No newline at end of file
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/app_keys.h b/src/libs/mynewt-nimble/nimble/host/mesh/src/app_keys.h
new file mode 100644
index 00000000..d007b785
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/app_keys.h
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2020 Nordic Semiconductor ASA
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+#ifndef _BT_MESH_APP_KEYS_H_
+#define _BT_MESH_APP_KEYS_H_
+
+#include "mesh/mesh.h"
+#include "subnet.h"
+
+/** Mesh Application. */
+struct bt_mesh_app_key {
+ uint16_t net_idx;
+ uint16_t app_idx;
+ bool updated;
+ struct bt_mesh_app_cred {
+ uint8_t id;
+ uint8_t val[16];
+ } keys[2];
+};
+
+/** @brief Reset the app keys module. */
+void bt_mesh_app_keys_reset(void);
+
+/** @brief Get the application key with the given AppIdx.
+ *
+ * @param app_idx App index.
+ *
+ * @return The matching application, or NULL if the application isn't known.
+ */
+struct bt_mesh_app_key *bt_mesh_app_key_get(uint16_t app_idx);
+
+/** @brief Initialize a new application key with the given parameters.
+ *
+ * @param app_idx AppIndex.
+ * @param net_idx NetIndex the application is bound to.
+ * @param old_key Current application key.
+ * @param new_key Updated application key, or NULL if not known.
+ *
+ * @return 0 on success, or (negative) error code on failure.
+ */
+int bt_mesh_app_key_set(uint16_t app_idx, uint16_t net_idx,
+ const uint8_t old_key[16], const uint8_t new_key[16]);
+
+/** @brief Resolve the message encryption keys, given a message context.
+ *
+ * Will use the @c ctx::app_idx and @c ctx::net_idx fields to find a pair of
+ * message encryption keys. If @c ctx::app_idx represents a device key, the
+ * @c ctx::net_idx will be used to determine the net key. Otherwise, the
+ * @c ctx::net_idx parameter will be ignored.
+ *
+ * @param ctx Message context.
+ * @param sub Subnet return parameter.
+ * @param app_key Application return parameter.
+ * @param aid Application ID return parameter.
+ *
+ * @return 0 on success, or (negative) error code on failure.
+ */
+int bt_mesh_keys_resolve(struct bt_mesh_msg_ctx *ctx,
+ struct bt_mesh_subnet **sub,
+ const uint8_t *app_key[16], uint8_t *aid);
+
+/** @brief Iterate through all matching application keys and call @c cb on each.
+ *
+ * @param dev_key Whether to return device keys.
+ * @param aid 7 bit application ID to match.
+ * @param rx RX structure to match against.
+ * @param cb Callback to call for every valid app key.
+ * @param cb_data Callback data to pass to the callback.
+ *
+ * @return The AppIdx that yielded a 0-return from the callback.
+ */
+uint16_t bt_mesh_app_key_find(bool dev_key, uint8_t aid,
+ struct bt_mesh_net_rx *rx,
+ int (*cb)(struct bt_mesh_net_rx *rx,
+ const uint8_t key[16], void *cb_data),
+ void *cb_data);
+
+struct bt_mesh_app_key *app_get(uint16_t app_idx);
+
+extern void (*bt_mesh_app_key_cb_list[1]) (uint16_t app_idx, uint16_t net_idx,
+ enum bt_mesh_key_evt evt);
+
+#endif /* _BT_MESH_APP_KEYS_H_ */ \ No newline at end of file
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/beacon.c b/src/libs/mynewt-nimble/nimble/host/mesh/src/beacon.c
index cd540aa8..6a5fc5a1 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/src/beacon.c
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/beacon.c
@@ -21,8 +21,8 @@
#include "crypto.h"
#include "beacon.h"
#include "foundation.h"
+#include "atomic.h"
-#define UNPROVISIONED_INTERVAL (K_SECONDS(5))
#define PROVISIONED_INTERVAL (K_SECONDS(10))
#define BEACON_TYPE_UNPROVISIONED 0x00
@@ -36,26 +36,12 @@
static struct k_delayed_work beacon_timer;
-static struct bt_mesh_subnet *cache_check(u8_t data[21])
+static int cache_check(struct bt_mesh_subnet *sub, void *beacon_data)
{
- int i;
-
- for (i = 0; i < ARRAY_SIZE(bt_mesh.sub); i++) {
- struct bt_mesh_subnet *sub = &bt_mesh.sub[i];
-
- if (sub->net_idx == BT_MESH_KEY_UNUSED) {
- continue;
- }
-
- if (!memcmp(sub->beacon_cache, data, 21)) {
- return sub;
- }
- }
-
- return NULL;
+ return !memcmp(sub->beacon_cache, beacon_data, 21);
}
-static void cache_add(u8_t data[21], struct bt_mesh_subnet *sub)
+static void cache_add(uint8_t data[21], struct bt_mesh_subnet *sub)
{
memcpy(sub->beacon_cache, data, 21);
}
@@ -72,16 +58,12 @@ static void beacon_complete(int err, void *user_data)
void bt_mesh_beacon_create(struct bt_mesh_subnet *sub,
struct os_mbuf *buf)
{
- u8_t flags = bt_mesh_net_flags(sub);
+ uint8_t flags = bt_mesh_net_flags(sub);
struct bt_mesh_subnet_keys *keys;
net_buf_simple_add_u8(buf, BEACON_TYPE_SECURE);
- if (sub->kr_flag) {
- keys = &sub->keys[1];
- } else {
- keys = &sub->keys[0];
- }
+ keys = &sub->keys[SUBNET_KEY_TX_IDX(sub)];
net_buf_simple_add_u8(buf, flags);
@@ -103,43 +85,33 @@ void bt_mesh_beacon_create(struct bt_mesh_subnet *sub,
#define BEACON_THRESHOLD(sub) (K_SECONDS(10 * ((sub)->beacons_last + 1)) - \
K_SECONDS(5))
-static int secure_beacon_send(void)
+static int secure_beacon_send(struct bt_mesh_subnet *sub, void *cb_data)
{
static const struct bt_mesh_send_cb send_cb = {
.end = beacon_complete,
};
- u32_t now = k_uptime_get_32();
- int i;
+ uint32_t now = k_uptime_get_32();
+ struct os_mbuf *buf;
+ uint32_t time_diff;
BT_DBG("");
- for (i = 0; i < ARRAY_SIZE(bt_mesh.sub); i++) {
- struct bt_mesh_subnet *sub = &bt_mesh.sub[i];
- struct os_mbuf *buf;
- u32_t time_diff;
-
- if (sub->net_idx == BT_MESH_KEY_UNUSED) {
- continue;
- }
-
- time_diff = now - sub->beacon_sent;
- if (time_diff < K_SECONDS(600) &&
- time_diff < BEACON_THRESHOLD(sub)) {
- continue;
- }
+ time_diff = now - sub->beacon_sent;
+ if (time_diff < (600 * MSEC_PER_SEC) &&
+ time_diff < BEACON_THRESHOLD(sub)) {
+ return 0;
+ }
- buf = bt_mesh_adv_create(BT_MESH_ADV_BEACON, PROV_XMIT,
- K_NO_WAIT);
- if (!buf) {
- BT_ERR("Unable to allocate beacon buffer");
- return -ENOBUFS;
- }
+ buf = bt_mesh_adv_create(BT_MESH_ADV_BEACON, PROV_XMIT, K_NO_WAIT);
+ if (!buf) {
+ BT_ERR("Unable to allocate beacon buffer");
+ return -ENOMEM;
+ }
- bt_mesh_beacon_create(sub, buf);
+ bt_mesh_beacon_create(sub, buf);
- bt_mesh_adv_send(buf, &send_cb, sub);
- net_buf_unref(buf);
- }
+ bt_mesh_adv_send(buf, &send_cb, sub);
+ net_buf_unref(buf);
return 0;
}
@@ -147,9 +119,9 @@ static int secure_beacon_send(void)
static int unprovisioned_beacon_send(void)
{
const struct bt_mesh_prov *prov;
- u8_t uri_hash[16] = { 0 };
+ uint8_t uri_hash[16] = { 0 };
struct os_mbuf *buf;
- u16_t oob_info;
+ uint16_t oob_info;
BT_DBG("unprovisioned_beacon_send");
@@ -202,12 +174,11 @@ static int unprovisioned_beacon_send(void)
static void unprovisioned_beacon_recv(struct os_mbuf *buf)
{
-#if MYNEWT_VAL(BLE_MESH_PB_ADV)
const struct bt_mesh_prov *prov;
- u8_t *uuid;
- u16_t oob_info;
- u32_t uri_hash_val;
- u32_t *uri_hash = NULL;
+ uint8_t *uuid;
+ uint16_t oob_info;
+ uint32_t uri_hash_val;
+ uint32_t *uri_hash = NULL;
if (buf->om_len != 18 && buf->om_len != 22) {
BT_ERR("Invalid unprovisioned beacon length (%u)", buf->om_len);
@@ -231,13 +202,17 @@ static void unprovisioned_beacon_recv(struct os_mbuf *buf)
(bt_mesh_prov_oob_info_t)oob_info,
uri_hash);
}
-#endif
+}
+
+static void sub_update_beacon_observation(struct bt_mesh_subnet *sub)
+{
+ sub->beacons_last = sub->beacons_cur;
+ sub->beacons_cur = 0U;
}
static void update_beacon_observation(void)
{
static bool first_half;
- int i;
/* Observation period is 20 seconds, whereas the beacon timer
* runs every 10 seconds. We process what's happened during the
@@ -248,23 +223,15 @@ static void update_beacon_observation(void)
return;
}
- for (i = 0; i < ARRAY_SIZE(bt_mesh.sub); i++) {
- struct bt_mesh_subnet *sub = &bt_mesh.sub[i];
-
- if (sub->net_idx == BT_MESH_KEY_UNUSED) {
- continue;
- }
-
- sub->beacons_last = sub->beacons_cur;
- sub->beacons_cur = 0;
- }
+ bt_mesh_subnet_foreach(sub_update_beacon_observation);
}
static void beacon_send(struct ble_npl_event *work)
{
/* Don't send anything if we have an active provisioning link */
- if ((MYNEWT_VAL(BLE_MESH_PROV)) && bt_prov_active()) {
- k_delayed_work_submit(&beacon_timer, UNPROVISIONED_INTERVAL);
+ if (IS_ENABLED(CONFIG_BT_MESH_PB_ADV) && bt_mesh_prov_active()) {
+ k_delayed_work_submit(&beacon_timer,
+ K_SECONDS(MYNEWT_VAL(BLE_MESH_UNPROV_BEACON_INT)));
return;
}
@@ -272,34 +239,81 @@ static void beacon_send(struct ble_npl_event *work)
if (bt_mesh_is_provisioned()) {
update_beacon_observation();
- secure_beacon_send();
+ (void)bt_mesh_subnet_find(secure_beacon_send, NULL);
/* Only resubmit if beaconing is still enabled */
- if (bt_mesh_beacon_get() == BT_MESH_BEACON_ENABLED ||
+ if (bt_mesh_beacon_enabled() ||
atomic_test_bit(bt_mesh.flags, BT_MESH_IVU_INITIATOR)) {
k_delayed_work_submit(&beacon_timer,
PROVISIONED_INTERVAL);
}
- } else if (IS_ENABLED(CONFIG_BT_MESH_PB_ADV)) {
+
+ return;
+ }
+
+ if (IS_ENABLED(BLE_MESH_PB_ADV)) {
unprovisioned_beacon_send();
- k_delayed_work_submit(&beacon_timer, UNPROVISIONED_INTERVAL);
+ k_delayed_work_submit(&beacon_timer,
+ K_SECONDS(MYNEWT_VAL(BLE_MESH_UNPROV_BEACON_INT)));
+ }
+}
+
+struct beacon_params {
+ const uint8_t *net_id;
+ const uint8_t *auth;
+ uint32_t iv_index;
+ uint8_t flags;
+
+ bool new_key;
+};
+
+static bool auth_match(struct bt_mesh_subnet_keys *keys,
+ const struct beacon_params *params)
+{
+ uint8_t net_auth[8];
+
+ if (memcmp(params->net_id, keys->net_id, 8)) {
+ return false;
+ }
+
+ bt_mesh_beacon_auth(keys->beacon, params->flags, keys->net_id,
+ params->iv_index, net_auth);
+
+ if (memcmp(params->auth, net_auth, 8)) {
+ BT_WARN("Authentication Value %s != %s",
+ bt_hex(params->auth, 8), bt_hex(net_auth, 8));
+ return false;
}
+
+ return true;
+}
+
+static int subnet_by_id(struct bt_mesh_subnet *sub, void *cb_data)
+{
+ struct beacon_params *params = cb_data;
+
+ for (int i = 0; i < ARRAY_SIZE(sub->keys); i++) {
+ if (sub->keys[i].valid && auth_match(&sub->keys[i], params)) {
+ params->new_key = (i > 0);
+ return true;
+ }
+ }
+
+ return false;
}
static void secure_beacon_recv(struct os_mbuf *buf)
{
- u8_t *data, *net_id, *auth;
+ struct beacon_params params;
struct bt_mesh_subnet *sub;
- u32_t iv_index;
- bool new_key, kr_change, iv_change;
- u8_t flags;
+ uint8_t *data;
if (buf->om_len < 21) {
BT_ERR("Too short secure beacon (len %u)", buf->om_len);
return;
}
- sub = cache_check(buf->om_data);
+ sub = bt_mesh_subnet_find(cache_check, buf->om_data);
if (sub) {
/* We've seen this beacon before - just update the stats */
goto update_stats;
@@ -308,27 +322,30 @@ static void secure_beacon_recv(struct os_mbuf *buf)
/* So we can add to the cache if auth matches */
data = buf->om_data;
- flags = net_buf_simple_pull_u8(buf);
- net_id = net_buf_simple_pull_mem(buf, 8);
- iv_index = net_buf_simple_pull_be32(buf);
- auth = buf->om_data;
+ params.flags = net_buf_simple_pull_u8(buf);
+ params.net_id = net_buf_simple_pull_mem(buf, 8);
+ params.iv_index = net_buf_simple_pull_be32(buf);
+ params.auth = buf->om_data;
BT_DBG("flags 0x%02x id %s iv_index 0x%08x",
- flags, bt_hex(net_id, 8), (unsigned) iv_index);
+ params.flags, bt_hex(params.net_id, 8), params.iv_index);
- sub = bt_mesh_subnet_find(net_id, flags, iv_index, auth, &new_key);
+ sub = bt_mesh_subnet_find(subnet_by_id, &params);
if (!sub) {
BT_DBG("No subnet that matched beacon");
return;
}
- if (sub->kr_phase == BT_MESH_KR_PHASE_2 && !new_key) {
+ if (sub->kr_phase == BT_MESH_KR_PHASE_2 && !params.new_key) {
BT_WARN("Ignoring Phase 2 KR Update secured using old key");
return;
}
cache_add(data, sub);
+ bt_mesh_kr_update(sub, BT_MESH_KEY_REFRESH(params.flags),
+ params.new_key);
+
/* If we have NetKey0 accept initiation only from it */
if (bt_mesh_subnet_get(BT_MESH_KEY_PRIMARY) &&
sub->net_idx != BT_MESH_KEY_PRIMARY) {
@@ -337,31 +354,18 @@ static void secure_beacon_recv(struct os_mbuf *buf)
}
BT_DBG("net_idx 0x%04x iv_index 0x%08x, current iv_index 0x%08x",
- sub->net_idx, (unsigned) iv_index, (unsigned) bt_mesh.iv_index);
+ sub->net_idx, params.iv_index, bt_mesh.iv_index);
if (atomic_test_bit(bt_mesh.flags, BT_MESH_IVU_INITIATOR) &&
(atomic_test_bit(bt_mesh.flags, BT_MESH_IVU_IN_PROGRESS) ==
- BT_MESH_IV_UPDATE(flags))) {
+ BT_MESH_IV_UPDATE(params.flags))) {
bt_mesh_beacon_ivu_initiator(false);
}
- iv_change = bt_mesh_net_iv_update(iv_index, BT_MESH_IV_UPDATE(flags));
-
- kr_change = bt_mesh_kr_update(sub, BT_MESH_KEY_REFRESH(flags), new_key);
- if (kr_change) {
- bt_mesh_net_beacon_update(sub);
- }
-
- if (iv_change) {
- /* Update all subnets */
- bt_mesh_net_sec_update(NULL);
- } else if (kr_change) {
- /* Key Refresh without IV Update only impacts one subnet */
- bt_mesh_net_sec_update(sub);
- }
+ bt_mesh_net_iv_update(params.iv_index, BT_MESH_IV_UPDATE(params.flags));
update_stats:
- if (bt_mesh_beacon_get() == BT_MESH_BEACON_ENABLED &&
+ if (bt_mesh_beacon_enabled() &&
sub->beacons_cur < 0xff) {
sub->beacons_cur++;
}
@@ -369,7 +373,7 @@ update_stats:
void bt_mesh_beacon_recv(struct os_mbuf *buf)
{
- u8_t type;
+ uint8_t type;
BT_DBG("%u bytes: %s", buf->om_len, bt_hex(buf->om_data, buf->om_len));
@@ -381,7 +385,9 @@ void bt_mesh_beacon_recv(struct os_mbuf *buf)
type = net_buf_simple_pull_u8(buf);
switch (type) {
case BEACON_TYPE_UNPROVISIONED:
- unprovisioned_beacon_recv(buf);
+ if (IS_ENABLED(BLE_MESH_PB_ADV)) {
+ unprovisioned_beacon_recv(buf);
+ }
break;
case BEACON_TYPE_SECURE:
secure_beacon_recv(buf);
@@ -392,8 +398,38 @@ void bt_mesh_beacon_recv(struct os_mbuf *buf)
}
}
+void bt_mesh_beacon_update(struct bt_mesh_subnet *sub)
+{
+ uint8_t flags = bt_mesh_net_flags(sub);
+ struct bt_mesh_subnet_keys *keys;
+ int err;
+
+ keys = &sub->keys[SUBNET_KEY_TX_IDX(sub)];
+
+ BT_DBG("NetIndex 0x%03x Using %s key", sub->net_idx,
+ SUBNET_KEY_TX_IDX(sub) ? "new" : "current");
+ BT_DBG("flags 0x%02x, IVI 0x%08x", flags, bt_mesh.iv_index);
+
+ err = bt_mesh_beacon_auth(keys->beacon, flags, keys->net_id,
+ bt_mesh.iv_index, sub->auth);
+ if (err) {
+ BT_ERR("Failed updating net beacon for 0x%03x", sub->net_idx);
+ }
+}
+
+static void subnet_evt(struct bt_mesh_subnet *sub, enum bt_mesh_key_evt evt)
+{
+ if (evt != BT_MESH_KEY_DELETED) {
+ bt_mesh_beacon_update(sub);
+ }
+}
+
void bt_mesh_beacon_init(void)
{
+ if (!bt_mesh_subnet_cb_list[1]) {
+ bt_mesh_subnet_cb_list[1] = subnet_evt;
+ }
+
k_delayed_work_init(&beacon_timer, beacon_send);
}
@@ -402,35 +438,30 @@ void bt_mesh_beacon_ivu_initiator(bool enable)
atomic_set_bit_to(bt_mesh.flags, BT_MESH_IVU_INITIATOR, enable);
if (enable) {
- k_work_submit(&beacon_timer.work);
- } else if (bt_mesh_beacon_get() == BT_MESH_BEACON_DISABLED) {
+ k_delayed_work_submit(&beacon_timer, K_NO_WAIT);
+ } else if (!bt_mesh_beacon_enabled()) {
k_delayed_work_cancel(&beacon_timer);
}
}
-void bt_mesh_beacon_enable(void)
+static void subnet_beacon_enable(struct bt_mesh_subnet *sub)
{
- int i;
+ sub->beacons_last = 0U;
+ sub->beacons_cur = 0U;
+
+ bt_mesh_beacon_update(sub);
+}
+void bt_mesh_beacon_enable(void)
+{
if (!bt_mesh_is_provisioned()) {
- k_work_submit(&beacon_timer.work);
+ k_delayed_work_submit(&beacon_timer, K_NO_WAIT);
return;
}
- for (i = 0; i < ARRAY_SIZE(bt_mesh.sub); i++) {
- struct bt_mesh_subnet *sub = &bt_mesh.sub[i];
-
- if (sub->net_idx == BT_MESH_KEY_UNUSED) {
- continue;
- }
-
- sub->beacons_last = 0;
- sub->beacons_cur = 0;
-
- bt_mesh_net_beacon_update(sub);
- }
+ bt_mesh_subnet_foreach(subnet_beacon_enable);
- k_work_submit(&beacon_timer.work);
+ k_delayed_work_submit(&beacon_timer, K_NO_WAIT);
}
void bt_mesh_beacon_disable(void)
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/beacon.h b/src/libs/mynewt-nimble/nimble/host/mesh/src/beacon.h
index ac4bfed8..a6aa8cbb 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/src/beacon.h
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/beacon.h
@@ -22,5 +22,6 @@ void bt_mesh_beacon_create(struct bt_mesh_subnet *sub,
struct os_mbuf *buf);
void bt_mesh_beacon_init(void);
+void bt_mesh_beacon_update(struct bt_mesh_subnet *sub);
#endif
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/cdb.c b/src/libs/mynewt-nimble/nimble/host/mesh/src/cdb.c
new file mode 100644
index 00000000..bcca3b90
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/cdb.c
@@ -0,0 +1,389 @@
+/*
+ * Copyright (c) 2019 Tobias Svehagen
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+#if BLE_MESH_CDB
+#define BT_DBG_ENABLED MYNEWT_VAL(BLE_MESH_DEBUG_CDB)
+#define LOG_MODULE_NAME bt_mesh_cdb
+#include "log/log.h"
+
+#include "mesh/mesh.h"
+#include "net.h"
+#include "rpl.h"
+#include "settings.h"
+#include "mesh_priv.h"
+#include "mesh/glue.h"
+
+
+struct bt_mesh_cdb bt_mesh_cdb = {
+ .nodes = {
+ [0 ... (CONFIG_BT_MESH_NODE_COUNT - 1)] = {
+ .addr = BT_MESH_ADDR_UNASSIGNED,
+ }
+ },
+ .subnets = {
+ [0 ... (CONFIG_BT_MESH_SUBNET_COUNT - 1)] = {
+ .net_idx = BT_MESH_KEY_UNUSED,
+ }
+ },
+ .app_keys = {
+ [0 ... (CONFIG_BT_MESH_APP_KEY_COUNT - 1)] = {
+ .net_idx = BT_MESH_KEY_UNUSED,
+ }
+ },
+};
+
+/*
+ * Check if an address range from addr_start for addr_start + num_elem - 1 is
+ * free for use. When a conflict is found, next will be set to the next address
+ * available after the conflicting range and -EAGAIN will be returned.
+ */
+static int addr_is_free(uint16_t addr_start, uint8_t num_elem, uint16_t *next)
+{
+ uint16_t addr_end = addr_start + num_elem - 1;
+ uint16_t other_start, other_end;
+ int i;
+
+ if (!BT_MESH_ADDR_IS_UNICAST(addr_start) ||
+ !BT_MESH_ADDR_IS_UNICAST(addr_end) ||
+ num_elem == 0) {
+ return -EINVAL;
+ }
+
+ for (i = 0; i < ARRAY_SIZE(bt_mesh_cdb.nodes); i++) {
+ struct bt_mesh_cdb_node *node = &bt_mesh_cdb.nodes[i];
+
+ if (node->addr == BT_MESH_ADDR_UNASSIGNED) {
+ continue;
+ }
+
+ other_start = node->addr;
+ other_end = other_start + node->num_elem - 1;
+
+ if (!(addr_end < other_start || addr_start > other_end)) {
+ if (next) {
+ *next = other_end + 1;
+ }
+
+ return -EAGAIN;
+ }
+ }
+
+ return 0;
+}
+
+/*
+ * Find the lowest possible starting address that can fit num_elem elements. If
+ * a free address range cannot be found, BT_MESH_ADDR_UNASSIGNED will be
+ * returned. Otherwise the first address in the range is returned.
+ *
+ * NOTE: This is quite an ineffective algorithm as it might need to look
+ * through the array of nodes N+2 times. A more effective algorithm
+ * could be used if the nodes were stored in a sorted list.
+ */
+static uint16_t find_lowest_free_addr(uint8_t num_elem)
+{
+ uint16_t addr = 1, next = 0;
+ int err, i;
+
+ /*
+ * It takes a maximum of node count + 2 to find a free address if there
+ * is any. +1 for our own address and +1 for making sure that the
+ * address range is valid.
+ */
+ for (i = 0; i < ARRAY_SIZE(bt_mesh_cdb.nodes) + 2; ++i) {
+ err = addr_is_free(addr, num_elem, &next);
+ if (err == 0) {
+ break;
+ } else if (err != -EAGAIN) {
+ addr = BT_MESH_ADDR_UNASSIGNED;
+ break;
+ }
+
+ addr = next;
+ }
+
+ return addr;
+}
+
+int bt_mesh_cdb_create(const uint8_t key[16])
+{
+ struct bt_mesh_cdb_subnet *sub;
+
+ if (atomic_test_and_set_bit(bt_mesh_cdb.flags,
+ BT_MESH_CDB_VALID)) {
+ return -EALREADY;
+ }
+
+ sub = bt_mesh_cdb_subnet_alloc(BT_MESH_KEY_PRIMARY);
+ if (sub == NULL) {
+ return -ENOMEM;
+ }
+
+ memcpy(sub->keys[0].net_key, key, 16);
+ bt_mesh_cdb.iv_index = 0;
+
+ if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
+ bt_mesh_store_cdb();
+ bt_mesh_store_cdb_subnet(sub);
+ }
+
+ return 0;
+}
+
+void bt_mesh_cdb_clear(void)
+{
+ int i;
+
+ atomic_clear_bit(bt_mesh_cdb.flags, BT_MESH_CDB_VALID);
+
+ for (i = 0; i < ARRAY_SIZE(bt_mesh_cdb.nodes); ++i) {
+ if (bt_mesh_cdb.nodes[i].addr != BT_MESH_ADDR_UNASSIGNED) {
+ bt_mesh_cdb_node_del(&bt_mesh_cdb.nodes[i], true);
+ }
+ }
+
+ for (i = 0; i < ARRAY_SIZE(bt_mesh_cdb.subnets); ++i) {
+ if (bt_mesh_cdb.subnets[i].net_idx != BT_MESH_KEY_UNUSED) {
+ bt_mesh_cdb_subnet_del(&bt_mesh_cdb.subnets[i], true);
+ }
+ }
+
+ for (i = 0; i < ARRAY_SIZE(bt_mesh_cdb.app_keys); ++i) {
+ if (bt_mesh_cdb.app_keys[i].net_idx != BT_MESH_KEY_UNUSED) {
+ bt_mesh_cdb_app_key_del(&bt_mesh_cdb.app_keys[i], true);
+ }
+ }
+
+ if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
+ bt_mesh_store_cdb();
+ }
+}
+
+void bt_mesh_cdb_iv_update(uint32_t iv_index, bool iv_update)
+{
+ BT_DBG("Updating IV index to %d\n", iv_index);
+
+ bt_mesh_cdb.iv_index = iv_index;
+
+ atomic_set_bit_to(bt_mesh_cdb.flags, BT_MESH_CDB_IVU_IN_PROGRESS,
+ iv_update);
+
+ if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
+ bt_mesh_store_cdb();
+ }
+}
+
+struct bt_mesh_cdb_subnet *bt_mesh_cdb_subnet_alloc(uint16_t net_idx)
+{
+ struct bt_mesh_cdb_subnet *sub;
+ int i;
+
+ if (bt_mesh_cdb_subnet_get(net_idx) != NULL) {
+ return NULL;
+ }
+
+ for (i = 0; i < ARRAY_SIZE(bt_mesh_cdb.subnets); ++i) {
+ sub = &bt_mesh_cdb.subnets[i];
+
+ if (sub->net_idx != BT_MESH_KEY_UNUSED) {
+ continue;
+ }
+
+ sub->net_idx = net_idx;
+
+ return sub;
+ }
+
+ return NULL;
+}
+
+void bt_mesh_cdb_subnet_del(struct bt_mesh_cdb_subnet *sub, bool store)
+{
+ BT_DBG("NetIdx 0x%03x store %u", sub->net_idx, store);
+
+ if (IS_ENABLED(CONFIG_BT_SETTINGS) && store) {
+ bt_mesh_clear_cdb_subnet(sub);
+ }
+
+ sub->net_idx = BT_MESH_KEY_UNUSED;
+ memset(sub->keys, 0, sizeof(sub->keys));
+}
+
+struct bt_mesh_cdb_subnet *bt_mesh_cdb_subnet_get(uint16_t net_idx)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(bt_mesh_cdb.subnets); ++i) {
+ if (bt_mesh_cdb.subnets[i].net_idx == net_idx) {
+ return &bt_mesh_cdb.subnets[i];
+ }
+ }
+
+ return NULL;
+}
+
+void bt_mesh_cdb_subnet_store(const struct bt_mesh_cdb_subnet *sub)
+{
+ if (MYNEWT_VAL(BLE_MESH_SETTINGS)) {
+ bt_mesh_store_cdb_subnet(sub);
+ }
+}
+
+uint8_t bt_mesh_cdb_subnet_flags(const struct bt_mesh_cdb_subnet *sub)
+{
+ uint8_t flags = 0x00;
+
+ if (sub && sub->kr_flag) {
+ flags |= BT_MESH_NET_FLAG_KR;
+ }
+
+ if (atomic_test_bit(bt_mesh_cdb.flags, BT_MESH_CDB_IVU_IN_PROGRESS)) {
+ flags |= BT_MESH_NET_FLAG_IVU;
+ }
+
+ return flags;
+}
+
+struct bt_mesh_cdb_node *bt_mesh_cdb_node_alloc(const uint8_t uuid[16], uint16_t addr,
+ uint8_t num_elem, uint16_t net_idx)
+{
+ int i;
+
+ if (addr == BT_MESH_ADDR_UNASSIGNED) {
+ addr = find_lowest_free_addr(num_elem);
+ if (addr == BT_MESH_ADDR_UNASSIGNED) {
+ return NULL;
+ }
+ } else if (addr_is_free(addr, num_elem, NULL) < 0) {
+ BT_DBG("Address range 0x%04x-0x%04x is not free", addr,
+ addr + num_elem - 1);
+ return NULL;
+ }
+
+ for (i = 0; i < ARRAY_SIZE(bt_mesh_cdb.nodes); i++) {
+ struct bt_mesh_cdb_node *node = &bt_mesh_cdb.nodes[i];
+
+ if (node->addr == BT_MESH_ADDR_UNASSIGNED) {
+ memcpy(node->uuid, uuid, 16);
+ node->addr = addr;
+ node->num_elem = num_elem;
+ node->net_idx = net_idx;
+ atomic_set(node->flags, 0);
+ return node;
+ }
+ }
+
+ return NULL;
+}
+
+void bt_mesh_cdb_node_del(struct bt_mesh_cdb_node *node, bool store)
+{
+ BT_DBG("Node addr 0x%04x store %u", node->addr, store);
+
+ if (IS_ENABLED(CONFIG_BT_SETTINGS) && store) {
+ bt_mesh_clear_cdb_node(node);
+ }
+
+ node->addr = BT_MESH_ADDR_UNASSIGNED;
+ memset(node->dev_key, 0, sizeof(node->dev_key));
+}
+
+struct bt_mesh_cdb_node *bt_mesh_cdb_node_get(uint16_t addr)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(bt_mesh_cdb.nodes); i++) {
+ struct bt_mesh_cdb_node *node = &bt_mesh_cdb.nodes[i];
+
+ if (addr >= node->addr &&
+ addr <= node->addr + node->num_elem - 1) {
+ return node;
+ }
+ }
+
+ return NULL;
+}
+
+void bt_mesh_cdb_node_store(const struct bt_mesh_cdb_node *node)
+{
+ if (MYNEWT_VAL(BLE_MESH_SETTINGS)) {
+ bt_mesh_store_cdb_node(node);
+ }
+}
+
+void bt_mesh_cdb_node_foreach(bt_mesh_cdb_node_func_t func, void *user_data)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(bt_mesh_cdb.nodes); ++i) {
+ if (bt_mesh_cdb.nodes[i].addr == BT_MESH_ADDR_UNASSIGNED) {
+ continue;
+ }
+
+ if (func(&bt_mesh_cdb.nodes[i], user_data) ==
+ BT_MESH_CDB_ITER_STOP) {
+ break;
+ }
+ }
+}
+
+struct bt_mesh_cdb_app_key *bt_mesh_cdb_app_key_alloc(uint16_t net_idx,
+ uint16_t app_idx)
+{
+ struct bt_mesh_cdb_app_key *key;
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(bt_mesh_cdb.app_keys); ++i) {
+ key = &bt_mesh_cdb.app_keys[i];
+
+ if (key->net_idx != BT_MESH_KEY_UNUSED) {
+ continue;
+ }
+
+ key->net_idx = net_idx;
+ key->app_idx = app_idx;
+
+ return key;
+ }
+
+ return NULL;
+}
+
+void bt_mesh_cdb_app_key_del(struct bt_mesh_cdb_app_key *key, bool store)
+{
+ BT_DBG("AppIdx 0x%03x store %u", key->app_idx, store);
+
+ if (IS_ENABLED(CONFIG_BT_SETTINGS) && store) {
+ bt_mesh_clear_cdb_app_key(key);
+ }
+
+ key->net_idx = BT_MESH_ADDR_UNASSIGNED;
+ memset(key->keys, 0, sizeof(key->keys));
+}
+
+struct bt_mesh_cdb_app_key *bt_mesh_cdb_app_key_get(uint16_t app_idx)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(bt_mesh_cdb.app_keys); i++) {
+ struct bt_mesh_cdb_app_key *key = &bt_mesh_cdb.app_keys[i];
+
+ if (key->net_idx != BT_MESH_KEY_UNUSED &&
+ key->app_idx == app_idx) {
+ return key;
+ }
+ }
+
+ return NULL;
+}
+
+void bt_mesh_cdb_app_key_store(const struct bt_mesh_cdb_app_key *key)
+{
+ if (MYNEWT_VAL(BLE_MESH_SETTINGS)) {
+ bt_mesh_store_cdb_app_key(key);
+ }
+}
+#endif
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/cfg.c b/src/libs/mynewt-nimble/nimble/host/mesh/src/cfg.c
new file mode 100644
index 00000000..4e149255
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/cfg.c
@@ -0,0 +1,267 @@
+/*
+ * Copyright (c) 2020 Nordic Semiconductor ASA
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+#include "mesh/mesh.h"
+#include "mesh_priv.h"
+#include "net.h"
+#include "rpl.h"
+#include "beacon.h"
+#include "settings.h"
+#include "heartbeat.h"
+#include "friend.h"
+#include "cfg.h"
+#include "mesh/glue.h"
+
+void bt_mesh_beacon_set(bool beacon)
+{
+ if (atomic_test_bit(bt_mesh.flags, BT_MESH_BEACON) == beacon) {
+ return;
+ }
+
+ atomic_set_bit_to(bt_mesh.flags, BT_MESH_BEACON, beacon);
+
+ if (beacon) {
+ bt_mesh_beacon_enable();
+ } else {
+ bt_mesh_beacon_disable();
+ }
+
+ if (IS_ENABLED(CONFIG_BT_SETTINGS) &&
+ atomic_test_bit(bt_mesh.flags, BT_MESH_VALID)) {
+ bt_mesh_store_cfg();
+ }
+}
+
+bool bt_mesh_beacon_enabled(void)
+{
+ return atomic_test_bit(bt_mesh.flags, BT_MESH_BEACON);
+}
+
+static int feature_set(int feature_flag, enum bt_mesh_feat_state state)
+{
+ if (state != BT_MESH_FEATURE_DISABLED &&
+ state != BT_MESH_FEATURE_ENABLED) {
+ return -EINVAL;
+ }
+
+ if (atomic_test_bit(bt_mesh.flags, feature_flag) ==
+ (state == BT_MESH_FEATURE_ENABLED)) {
+ return -EALREADY;
+ }
+
+ atomic_set_bit_to(bt_mesh.flags, feature_flag,
+ (state == BT_MESH_FEATURE_ENABLED));
+
+ return 0;
+}
+
+static enum bt_mesh_feat_state feature_get(int feature_flag)
+{
+ return atomic_test_bit(bt_mesh.flags, feature_flag) ?
+ BT_MESH_FEATURE_ENABLED :
+ BT_MESH_FEATURE_DISABLED;
+}
+
+int bt_mesh_gatt_proxy_set(enum bt_mesh_feat_state gatt_proxy)
+{
+ int err;
+
+ if (!IS_ENABLED(CONFIG_BT_MESH_GATT_PROXY)) {
+ return -ENOTSUP;
+ }
+
+ err = feature_set(BT_MESH_GATT_PROXY, gatt_proxy);
+ if (err) {
+ return err;
+ }
+
+ bt_mesh_hb_feature_changed(BT_MESH_FEAT_PROXY);
+
+ if (IS_ENABLED(CONFIG_BT_SETTINGS) &&
+ atomic_test_bit(bt_mesh.flags, BT_MESH_VALID)) {
+ bt_mesh_store_cfg();
+ }
+
+ return 0;
+}
+
+enum bt_mesh_feat_state bt_mesh_gatt_proxy_get(void)
+{
+ if (!IS_ENABLED(CONFIG_BT_MESH_GATT_PROXY)) {
+ return BT_MESH_FEATURE_NOT_SUPPORTED;
+ }
+
+ return feature_get(BT_MESH_GATT_PROXY);
+}
+
+int bt_mesh_default_ttl_set(uint8_t default_ttl)
+{
+ if (default_ttl == 1 || default_ttl > BT_MESH_TTL_MAX) {
+ return -EINVAL;
+ }
+
+ if (default_ttl == bt_mesh.default_ttl) {
+ return 0;
+ }
+
+ bt_mesh.default_ttl = default_ttl;
+
+ if (IS_ENABLED(CONFIG_BT_SETTINGS) &&
+ atomic_test_bit(bt_mesh.flags, BT_MESH_VALID)) {
+ bt_mesh_store_cfg();
+ }
+
+ return 0;
+}
+
+uint8_t bt_mesh_default_ttl_get(void)
+{
+ return bt_mesh.default_ttl;
+}
+
+int bt_mesh_friend_set(enum bt_mesh_feat_state friendship)
+{
+ int err;
+
+ if (!IS_ENABLED(CONFIG_BT_MESH_FRIEND)) {
+ return -ENOTSUP;
+ }
+
+ err = feature_set(BT_MESH_FRIEND, friendship);
+ if (err) {
+ return err;
+ }
+
+ bt_mesh_hb_feature_changed(BT_MESH_FEAT_FRIEND);
+
+ if (IS_ENABLED(CONFIG_BT_SETTINGS) &&
+ atomic_test_bit(bt_mesh.flags, BT_MESH_VALID)) {
+ bt_mesh_store_cfg();
+ }
+
+ if (friendship == BT_MESH_FEATURE_DISABLED) {
+ bt_mesh_friends_clear();
+ }
+
+ return 0;
+}
+
+enum bt_mesh_feat_state bt_mesh_friend_get(void)
+{
+ if (!IS_ENABLED(CONFIG_BT_MESH_FRIEND)) {
+ return BT_MESH_FEATURE_NOT_SUPPORTED;
+ }
+
+ return feature_get(BT_MESH_FRIEND);
+}
+
+void bt_mesh_net_transmit_set(uint8_t xmit)
+{
+ if (bt_mesh.net_xmit == xmit) {
+ return;
+ }
+
+ bt_mesh.net_xmit = xmit;
+
+ if (IS_ENABLED(CONFIG_BT_SETTINGS) &&
+ atomic_test_bit(bt_mesh.flags, BT_MESH_VALID)) {
+ bt_mesh_store_cfg();
+ }
+}
+
+uint8_t bt_mesh_net_transmit_get(void)
+{
+ return bt_mesh.net_xmit;
+}
+
+int bt_mesh_relay_set(enum bt_mesh_feat_state relay, uint8_t xmit)
+{
+ int err;
+
+ if (!CONFIG_BT_MESH_RELAY) {
+ return -ENOTSUP;
+ }
+
+ err = feature_set(BT_MESH_RELAY, relay);
+ if (err == -EINVAL) {
+ return err;
+ }
+
+ if (err == -EALREADY && bt_mesh.relay_xmit == xmit) {
+ return -EALREADY;
+ }
+
+ bt_mesh.relay_xmit = xmit;
+ bt_mesh_hb_feature_changed(BT_MESH_FEAT_RELAY);
+
+ if (IS_ENABLED(CONFIG_BT_SETTINGS) &&
+ atomic_test_bit(bt_mesh.flags, BT_MESH_VALID)) {
+ bt_mesh_store_cfg();
+ }
+
+ return 0;
+}
+
+enum bt_mesh_feat_state bt_mesh_relay_get(void)
+{
+ return feature_get(BT_MESH_RELAY);
+}
+
+uint8_t bt_mesh_relay_retransmit_get(void)
+{
+ if (!CONFIG_BT_MESH_RELAY) {
+ return 0;
+ }
+
+ return bt_mesh.relay_xmit;
+}
+
+bool bt_mesh_fixed_group_match(uint16_t addr)
+{
+ /* Check for fixed group addresses */
+ switch (addr) {
+ case BT_MESH_ADDR_ALL_NODES:
+ return true;
+ case BT_MESH_ADDR_PROXIES:
+ return (bt_mesh_gatt_proxy_get() == BT_MESH_FEATURE_ENABLED);
+ case BT_MESH_ADDR_FRIENDS:
+ return (bt_mesh_friend_get() == BT_MESH_FEATURE_ENABLED);
+ case BT_MESH_ADDR_RELAYS:
+ return (bt_mesh_relay_get() == BT_MESH_FEATURE_ENABLED);
+ default:
+ return false;
+ }
+}
+
+void bt_mesh_cfg_init(void)
+{
+ bt_mesh.default_ttl = CONFIG_BT_MESH_DEFAULT_TTL;
+ bt_mesh.net_xmit =
+ BT_MESH_TRANSMIT(CONFIG_BT_MESH_NETWORK_TRANSMIT_COUNT,
+ CONFIG_BT_MESH_NETWORK_TRANSMIT_INTERVAL);
+
+#if defined(CONFIG_BT_MESH_RELAY)
+ bt_mesh.relay_xmit =
+ BT_MESH_TRANSMIT(CONFIG_BT_MESH_RELAY_RETRANSMIT_COUNT,
+ CONFIG_BT_MESH_RELAY_RETRANSMIT_INTERVAL);
+#endif
+
+ if (CONFIG_BT_MESH_RELAY_ENABLED) {
+ atomic_set_bit(bt_mesh.flags, BT_MESH_RELAY);
+ }
+
+ if (CONFIG_BT_MESH_BEACON_ENABLED) {
+ atomic_set_bit(bt_mesh.flags, BT_MESH_BEACON);
+ }
+
+ if (CONFIG_BT_MESH_GATT_PROXY_ENABLED) {
+ atomic_set_bit(bt_mesh.flags, BT_MESH_GATT_PROXY);
+ }
+
+ if (CONFIG_BT_MESH_FRIEND_ENABLED) {
+ atomic_set_bit(bt_mesh.flags, BT_MESH_FRIEND);
+ }
+} \ No newline at end of file
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/cfg.h b/src/libs/mynewt-nimble/nimble/host/mesh/src/cfg.h
new file mode 100644
index 00000000..6f58acf8
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/cfg.h
@@ -0,0 +1,9 @@
+/*
+ * Copyright (c) 2020 Nordic Semiconductor ASA
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+void bt_mesh_cfg_init(void);
+
+bool bt_mesh_fixed_group_match(uint16_t addr); \ No newline at end of file
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/cfg_cli.c b/src/libs/mynewt-nimble/nimble/host/mesh/src/cfg_cli.c
index 2c2f6c3f..a87cd7bb 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/src/cfg_cli.c
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/cfg_cli.c
@@ -25,11 +25,11 @@
#define DUMMY_2_BYTE_OP BT_MESH_MODEL_OP_2(0xff, 0xff)
struct comp_data {
- u8_t *status;
+ uint8_t *status;
struct os_mbuf *comp;
};
-static s32_t msg_timeout = K_SECONDS(5);
+static int32_t msg_timeout = K_SECONDS(5);
static struct bt_mesh_cfg_cli *cli;
@@ -61,9 +61,9 @@ static void comp_data_status(struct bt_mesh_model *model,
static void state_status_u8(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf*buf,
- u32_t expect_status)
+ uint32_t expect_status)
{
- u8_t *status;
+ uint8_t *status;
BT_DBG("net_idx 0x%04x app_idx 0x%04x src 0x%04x len %u: %s",
ctx->net_idx, ctx->app_idx, ctx->addr, buf->om_len,
@@ -110,8 +110,8 @@ static void gatt_proxy_status(struct bt_mesh_model *model,
}
struct relay_param {
- u8_t *status;
- u8_t *transmit;
+ uint8_t *status;
+ uint8_t *transmit;
};
static void relay_status(struct bt_mesh_model *model,
@@ -137,8 +137,8 @@ static void relay_status(struct bt_mesh_model *model,
}
struct net_key_param {
- u8_t *status;
- u16_t net_idx;
+ uint8_t *status;
+ uint16_t net_idx;
};
static void net_key_status(struct bt_mesh_model *model,
@@ -146,8 +146,8 @@ static void net_key_status(struct bt_mesh_model *model,
struct os_mbuf *buf)
{
struct net_key_param *param;
- u16_t net_idx, app_idx;
- u8_t status;
+ uint16_t net_idx;
+ uint8_t status;
BT_DBG("net_idx 0x%04x app_idx 0x%04x src 0x%04x len %u: %s",
ctx->net_idx, ctx->app_idx, ctx->addr, buf->om_len,
@@ -159,7 +159,7 @@ static void net_key_status(struct bt_mesh_model *model,
}
status = net_buf_simple_pull_u8(buf);
- key_idx_unpack(buf, &net_idx, &app_idx);
+ net_idx = net_buf_simple_pull_le16(buf) & 0xfff;
param = cli->op_param;
if (param->net_idx != net_idx) {
@@ -174,10 +174,66 @@ static void net_key_status(struct bt_mesh_model *model,
k_sem_give(&cli->op_sync);
}
+struct net_key_list_param {
+ uint16_t *keys;
+ size_t *key_cnt;
+};
+
+static void net_key_list(struct bt_mesh_model *model,
+ struct bt_mesh_msg_ctx *ctx,
+ struct os_mbuf *buf)
+{
+ struct net_key_list_param *param;
+ int i;
+
+ BT_DBG("net_idx 0x%04x app_idx 0x%04x src 0x%04x len %u: %s",
+ ctx->net_idx, ctx->app_idx, ctx->addr, buf->om_len,
+ bt_hex(buf->om_data, buf->om_len));
+
+ if (cli->op_pending != OP_NET_KEY_LIST) {
+ BT_WARN("Unexpected Net Key List message");
+ return;
+ }
+
+ param = cli->op_param;
+
+ for (i = 0; i < *param->key_cnt && buf->om_len >= 3; i += 2) {
+ key_idx_unpack(buf, &param->keys[i], &param->keys[i + 1]);
+ }
+
+ if (i < *param->key_cnt && buf->om_len >= 2) {
+ param->keys[i++] = net_buf_simple_pull_le16(buf) & 0xfff;
+ }
+
+ *param->key_cnt = i;
+
+ k_sem_give(&cli->op_sync);
+}
+
+static void node_reset_status(struct bt_mesh_model *model,
+ struct bt_mesh_msg_ctx *ctx, struct os_mbuf *buf)
+{
+ bool *param = NULL;
+ BT_DBG("net_idx 0x%04x app_idx 0x%04x src 0x%04x",
+ ctx->net_idx, ctx->app_idx, ctx->addr);
+
+ if (cli->op_pending != OP_NODE_RESET_STATUS) {
+ BT_WARN("Unexpected Node Reset Status message");
+ return;
+ }
+
+ param = cli->op_param;
+
+ if (param) {
+ *param = true;
+ }
+ k_sem_give(&cli->op_sync);
+}
+
struct app_key_param {
- u8_t *status;
- u16_t net_idx;
- u16_t app_idx;
+ uint8_t *status;
+ uint16_t net_idx;
+ uint16_t app_idx;
};
static void app_key_status(struct bt_mesh_model *model,
@@ -185,8 +241,8 @@ static void app_key_status(struct bt_mesh_model *model,
struct os_mbuf*buf)
{
struct app_key_param *param;
- u16_t net_idx, app_idx;
- u8_t status;
+ uint16_t net_idx, app_idx;
+ uint8_t status;
BT_DBG("net_idx 0x%04x app_idx 0x%04x src 0x%04x len %u: %s",
ctx->net_idx, ctx->app_idx, ctx->addr, buf->om_len,
@@ -213,21 +269,71 @@ static void app_key_status(struct bt_mesh_model *model,
k_sem_give(&cli->op_sync);
}
+struct app_key_list_param {
+ uint16_t net_idx;
+ uint8_t *status;
+ uint16_t *keys;
+ size_t *key_cnt;
+};
+
+static void app_key_list(struct bt_mesh_model *model,
+ struct bt_mesh_msg_ctx *ctx,
+ struct os_mbuf *buf)
+{
+ struct app_key_list_param *param;
+ uint16_t net_idx;
+ uint8_t status;
+ int i;
+
+ BT_DBG("net_idx 0x%04x app_idx 0x%04x src 0x%04x len %u: %s",
+ ctx->net_idx, ctx->app_idx, ctx->addr, buf->om_len,
+ bt_hex(buf->om_data, buf->om_len));
+
+ if (cli->op_pending != OP_APP_KEY_LIST) {
+ BT_WARN("Unexpected App Key List message");
+ return;
+ }
+
+ status = net_buf_simple_pull_u8(buf);
+ net_idx = net_buf_simple_pull_le16(buf) & 0xfff;
+
+ param = cli->op_param;
+ if (param->net_idx != net_idx) {
+ BT_WARN("App Key List Net Key index did not match");
+ return;
+ }
+
+ for (i = 0; i < *param->key_cnt && buf->om_len >= 3; i += 2) {
+ key_idx_unpack(buf, &param->keys[i], &param->keys[i + 1]);
+ }
+
+ if (i < *param->key_cnt && buf->om_len >= 2) {
+ param->keys[i++] = net_buf_simple_pull_le16(buf) & 0xfff;
+ }
+
+ *param->key_cnt = i;
+ if (param->status) {
+ *param->status = status;
+ }
+
+ k_sem_give(&cli->op_sync);
+}
+
struct mod_app_param {
- u8_t *status;
- u16_t elem_addr;
- u16_t mod_app_idx;
- u16_t mod_id;
- u16_t cid;
+ uint8_t *status;
+ uint16_t elem_addr;
+ uint16_t mod_app_idx;
+ uint16_t mod_id;
+ uint16_t cid;
};
static void mod_app_status(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf*buf)
{
- u16_t elem_addr, mod_app_idx, mod_id, cid;
+ uint16_t elem_addr, mod_app_idx, mod_id, cid;
struct mod_app_param *param;
- u8_t status;
+ uint8_t status;
BT_DBG("net_idx 0x%04x app_idx 0x%04x src 0x%04x len %u: %s",
ctx->net_idx, ctx->app_idx, ctx->addr, buf->om_len,
@@ -265,11 +371,92 @@ static void mod_app_status(struct bt_mesh_model *model,
k_sem_give(&cli->op_sync);
}
+struct mod_member_list_param {
+ uint8_t *status;
+ uint16_t elem_addr;
+ uint16_t mod_id;
+ uint16_t cid;
+ uint16_t *members;
+ size_t *member_cnt;
+};
+
+static void mod_member_list_handle(struct bt_mesh_msg_ctx *ctx,
+ struct os_mbuf *buf, bool vnd)
+{
+ struct mod_member_list_param *param;
+ uint16_t elem_addr, mod_id, cid;
+ uint8_t status;
+ int i;
+
+ status = net_buf_simple_pull_u8(buf);
+ elem_addr = net_buf_simple_pull_le16(buf);
+ if (vnd) {
+ cid = net_buf_simple_pull_le16(buf);
+ }
+
+ mod_id = net_buf_simple_pull_le16(buf);
+
+ param = cli->op_param;
+ if (param->elem_addr != elem_addr || param->mod_id != mod_id ||
+ (vnd && param->cid != cid)) {
+ BT_WARN("Model Member List parameters did not match");
+ return;
+ }
+
+ if (buf->om_len % 2) {
+ BT_WARN("Model Member List invalid length");
+ return;
+ }
+
+ for (i = 0; i < *param->member_cnt && buf->om_len; i++) {
+ param->members[i] = net_buf_simple_pull_le16(buf);
+ }
+
+ *param->member_cnt = i;
+ if (param->status) {
+ *param->status = status;
+ }
+
+ k_sem_give(&cli->op_sync);
+}
+
+static void mod_app_list(struct bt_mesh_model *model,
+ struct bt_mesh_msg_ctx *ctx,
+ struct os_mbuf *buf)
+{
+ BT_DBG("net_idx 0x%04x app_idx 0x%04x src 0x%04x len %u: %s",
+ ctx->net_idx, ctx->app_idx, ctx->addr, buf->om_len,
+ bt_hex(buf->om_data, buf->om_len));
+
+ if (cli->op_pending != OP_SIG_MOD_APP_LIST) {
+ BT_WARN("Unexpected Model App List message");
+ return;
+ }
+
+ mod_member_list_handle(ctx, buf, false);
+}
+
+static void mod_app_list_vnd(struct bt_mesh_model *model,
+ struct bt_mesh_msg_ctx *ctx,
+ struct os_mbuf *buf)
+{
+ BT_DBG("net_idx 0x%04x app_idx 0x%04x src 0x%04x len %u: %s",
+ ctx->net_idx, ctx->app_idx, ctx->addr, buf->om_len,
+ bt_hex(buf->om_data, buf->om_len));
+
+ if (cli->op_pending != OP_VND_MOD_APP_LIST) {
+ BT_WARN("Unexpected Model App List Vendor message");
+ return;
+ }
+
+ mod_member_list_handle(ctx, buf, true);
+}
+
struct mod_pub_param {
- u16_t mod_id;
- u16_t cid;
- u16_t elem_addr;
- u8_t *status;
+ uint16_t mod_id;
+ uint16_t cid;
+ uint16_t elem_addr;
+ uint8_t *status;
struct bt_mesh_cfg_mod_pub *pub;
};
@@ -277,9 +464,9 @@ static void mod_pub_status(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf*buf)
{
- u16_t mod_id, cid, elem_addr;
+ uint16_t mod_id, cid, elem_addr;
struct mod_pub_param *param;
- u8_t status;
+ uint8_t status;
BT_DBG("net_idx 0x%04x app_idx 0x%04x src 0x%04x len %u: %s",
ctx->net_idx, ctx->app_idx, ctx->addr, buf->om_len,
@@ -341,21 +528,21 @@ static void mod_pub_status(struct bt_mesh_model *model,
}
struct mod_sub_param {
- u8_t *status;
- u16_t elem_addr;
- u16_t *sub_addr;
- u16_t *expect_sub;
- u16_t mod_id;
- u16_t cid;
+ uint8_t *status;
+ uint16_t elem_addr;
+ uint16_t *sub_addr;
+ uint16_t *expect_sub;
+ uint16_t mod_id;
+ uint16_t cid;
};
static void mod_sub_status(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf*buf)
{
- u16_t elem_addr, sub_addr, mod_id, cid;
+ uint16_t elem_addr, sub_addr, mod_id, cid;
struct mod_sub_param *param;
- u8_t status;
+ uint8_t status;
BT_DBG("net_idx 0x%04x app_idx 0x%04x src 0x%04x len %u: %s",
ctx->net_idx, ctx->app_idx, ctx->addr, buf->om_len,
@@ -397,8 +584,40 @@ static void mod_sub_status(struct bt_mesh_model *model,
k_sem_give(&cli->op_sync);
}
+static void mod_sub_list(struct bt_mesh_model *model,
+ struct bt_mesh_msg_ctx *ctx,
+ struct os_mbuf *buf)
+{
+ BT_DBG("net_idx 0x%04x app_idx 0x%04x src 0x%04x len %u: %s",
+ ctx->net_idx, ctx->app_idx, ctx->addr, buf->om_len,
+ bt_hex(buf->om_data, buf->om_len));
+
+ if (cli->op_pending != OP_MOD_SUB_LIST) {
+ BT_WARN("Unexpected Model Subscription List message");
+ return;
+ }
+
+ mod_member_list_handle(ctx, buf, false);
+}
+
+static void mod_sub_list_vnd(struct bt_mesh_model *model,
+ struct bt_mesh_msg_ctx *ctx,
+ struct os_mbuf *buf)
+{
+ BT_DBG("net_idx 0x%04x app_idx 0x%04x src 0x%04x len %u: %s",
+ ctx->net_idx, ctx->app_idx, ctx->addr, buf->om_len,
+ bt_hex(buf->om_data, buf->om_len));
+
+ if (cli->op_pending != OP_MOD_SUB_LIST_VND) {
+ BT_WARN("Unexpected Model Subscription List Vendor message");
+ return;
+ }
+
+ mod_member_list_handle(ctx, buf, true);
+}
+
struct hb_sub_param {
- u8_t *status;
+ uint8_t *status;
struct bt_mesh_cfg_hb_sub *sub;
};
@@ -432,7 +651,7 @@ static void hb_sub_status(struct bt_mesh_model *model,
}
struct hb_pub_param {
- u8_t *status;
+ uint8_t *status;
struct bt_mesh_cfg_hb_pub *pub;
};
@@ -475,12 +694,19 @@ const struct bt_mesh_model_op bt_mesh_cfg_cli_op[] = {
{ OP_GATT_PROXY_STATUS, 1, gatt_proxy_status },
{ OP_RELAY_STATUS, 2, relay_status },
{ OP_NET_KEY_STATUS, 3, net_key_status },
+ { OP_NET_KEY_LIST, 0, net_key_list },
{ OP_APP_KEY_STATUS, 4, app_key_status },
+ { OP_APP_KEY_LIST, 3, app_key_list },
{ OP_MOD_APP_STATUS, 7, mod_app_status },
+ { OP_SIG_MOD_APP_LIST, 5, mod_app_list},
+ { OP_VND_MOD_APP_LIST, 7, mod_app_list_vnd},
{ OP_MOD_PUB_STATUS, 12, mod_pub_status },
{ OP_MOD_SUB_STATUS, 7, mod_sub_status },
+ { OP_MOD_SUB_LIST, 5, mod_sub_list},
+ { OP_MOD_SUB_LIST_VND, 7, mod_sub_list_vnd},
{ OP_HEARTBEAT_SUB_STATUS, 9, hb_sub_status },
{ OP_HEARTBEAT_PUB_STATUS, 10, hb_pub_status },
+ { OP_NODE_RESET_STATUS, 0, node_reset_status},
BT_MESH_MODEL_OP_END,
};
@@ -516,7 +742,7 @@ const struct bt_mesh_model_cb bt_mesh_cfg_cli_cb = {
.init = cfg_cli_init,
};
-static int cli_prepare(void *param, u32_t op)
+static int cli_prepare(void *param, uint32_t op)
{
if (!cli) {
BT_ERR("No available Configuration Client context!");
@@ -551,8 +777,8 @@ static int cli_wait(void)
return err;
}
-int bt_mesh_cfg_comp_data_get(u16_t net_idx, u16_t addr, u8_t page,
- u8_t *status, struct os_mbuf *comp)
+int bt_mesh_cfg_comp_data_get(uint16_t net_idx, uint16_t addr, uint8_t page,
+ uint8_t *status, struct os_mbuf *comp)
{
struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_DEV_COMP_DATA_GET, 1);
struct bt_mesh_msg_ctx ctx = {
@@ -588,8 +814,8 @@ done:
return err;
}
-static int get_state_u8(u16_t net_idx, u16_t addr, u32_t op, u32_t rsp,
- u8_t *val)
+static int get_state_u8(uint16_t net_idx, uint16_t addr, uint32_t op, uint32_t rsp,
+ uint8_t *val)
{
struct os_mbuf *msg = BT_MESH_MODEL_BUF(DUMMY_2_BYTE_OP, 0);
struct bt_mesh_msg_ctx ctx = {
@@ -620,8 +846,8 @@ done:
return err;
}
-static int set_state_u8(u16_t net_idx, u16_t addr, u32_t op, u32_t rsp,
- u8_t new_val, u8_t *val)
+static int set_state_u8(uint16_t net_idx, uint16_t addr, uint32_t op, uint32_t rsp,
+ uint8_t new_val, uint8_t *val)
{
struct os_mbuf *msg = BT_MESH_MODEL_BUF(DUMMY_2_BYTE_OP, 1);
struct bt_mesh_msg_ctx ctx = {
@@ -653,57 +879,71 @@ done:
return err;
}
-int bt_mesh_cfg_beacon_get(u16_t net_idx, u16_t addr, u8_t *status)
+int bt_mesh_cfg_beacon_get(uint16_t net_idx, uint16_t addr, uint8_t *status)
{
return get_state_u8(net_idx, addr, OP_BEACON_GET, OP_BEACON_STATUS,
status);
}
-int bt_mesh_cfg_beacon_set(u16_t net_idx, u16_t addr, u8_t val, u8_t *status)
+int bt_mesh_cfg_beacon_set(uint16_t net_idx, uint16_t addr, uint8_t val, uint8_t *status)
{
return set_state_u8(net_idx, addr, OP_BEACON_SET, OP_BEACON_STATUS,
val, status);
}
-int bt_mesh_cfg_ttl_get(u16_t net_idx, u16_t addr, u8_t *ttl)
+int bt_mesh_cfg_ttl_get(uint16_t net_idx, uint16_t addr, uint8_t *ttl)
{
return get_state_u8(net_idx, addr, OP_DEFAULT_TTL_GET,
OP_DEFAULT_TTL_STATUS, ttl);
}
-int bt_mesh_cfg_ttl_set(u16_t net_idx, u16_t addr, u8_t val, u8_t *ttl)
+int bt_mesh_cfg_ttl_set(uint16_t net_idx, uint16_t addr, uint8_t val, uint8_t *ttl)
{
return set_state_u8(net_idx, addr, OP_DEFAULT_TTL_SET,
OP_DEFAULT_TTL_STATUS, val, ttl);
}
-int bt_mesh_cfg_friend_get(u16_t net_idx, u16_t addr, u8_t *status)
+int bt_mesh_cfg_friend_get(uint16_t net_idx, uint16_t addr, uint8_t *status)
{
return get_state_u8(net_idx, addr, OP_FRIEND_GET,
OP_FRIEND_STATUS, status);
}
-int bt_mesh_cfg_friend_set(u16_t net_idx, u16_t addr, u8_t val, u8_t *status)
+int bt_mesh_cfg_friend_set(uint16_t net_idx, uint16_t addr, uint8_t val, uint8_t *status)
{
return set_state_u8(net_idx, addr, OP_FRIEND_SET, OP_FRIEND_STATUS,
val, status);
}
-int bt_mesh_cfg_gatt_proxy_get(u16_t net_idx, u16_t addr, u8_t *status)
+int bt_mesh_cfg_gatt_proxy_get(uint16_t net_idx, uint16_t addr, uint8_t *status)
{
return get_state_u8(net_idx, addr, OP_GATT_PROXY_GET,
OP_GATT_PROXY_STATUS, status);
}
-int bt_mesh_cfg_gatt_proxy_set(u16_t net_idx, u16_t addr, u8_t val,
- u8_t *status)
+int bt_mesh_cfg_gatt_proxy_set(uint16_t net_idx, uint16_t addr, uint8_t val,
+ uint8_t *status)
{
return set_state_u8(net_idx, addr, OP_GATT_PROXY_SET,
OP_GATT_PROXY_STATUS, val, status);
}
-int bt_mesh_cfg_relay_get(u16_t net_idx, u16_t addr, u8_t *status,
- u8_t *transmit)
+int bt_mesh_cfg_net_transmit_set(uint16_t net_idx, uint16_t addr,
+ uint8_t val, uint8_t *transmit)
+{
+ return set_state_u8(net_idx, addr, OP_NET_TRANSMIT_SET,
+ OP_NET_TRANSMIT_STATUS, val, transmit);
+}
+
+int bt_mesh_cfg_net_transmit_get(uint16_t net_idx, uint16_t addr,
+ uint8_t *transmit)
+{
+ return get_state_u8(net_idx, addr, OP_NET_TRANSMIT_GET,
+ OP_NET_TRANSMIT_STATUS, transmit);
+}
+
+int bt_mesh_cfg_relay_get(uint16_t net_idx, uint16_t addr, uint8_t *status,
+ uint8_t *transmit)
{
struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_RELAY_GET, 0);
struct bt_mesh_msg_ctx ctx = {
@@ -738,8 +978,8 @@ done:
return err;
}
-int bt_mesh_cfg_relay_set(u16_t net_idx, u16_t addr, u8_t new_relay,
- u8_t new_transmit, u8_t *status, u8_t *transmit)
+int bt_mesh_cfg_relay_set(uint16_t net_idx, uint16_t addr, uint8_t new_relay,
+ uint8_t new_transmit, uint8_t *status, uint8_t *transmit)
{
struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_RELAY_SET, 2);
struct bt_mesh_msg_ctx ctx = {
@@ -776,8 +1016,8 @@ done:
return err;
}
-int bt_mesh_cfg_net_key_add(u16_t net_idx, u16_t addr, u16_t key_net_idx,
- const u8_t net_key[16], u8_t *status)
+int bt_mesh_cfg_net_key_add(uint16_t net_idx, uint16_t addr, uint16_t key_net_idx,
+ const uint8_t net_key[16], uint8_t *status)
{
struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_NET_KEY_ADD, 18);
struct bt_mesh_msg_ctx ctx = {
@@ -819,9 +1059,85 @@ done:
return err;
}
-int bt_mesh_cfg_app_key_add(u16_t net_idx, u16_t addr, u16_t key_net_idx,
- u16_t key_app_idx, const u8_t app_key[16],
- u8_t *status)
+int bt_mesh_cfg_net_key_get(uint16_t net_idx, uint16_t addr, uint16_t *keys,
+ size_t *key_cnt)
+{
+ struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_NET_KEY_GET, 0);
+ struct bt_mesh_msg_ctx ctx = {
+ .net_idx = net_idx,
+ .app_idx = BT_MESH_KEY_DEV_REMOTE,
+ .addr = addr,
+ .send_ttl = BT_MESH_TTL_DEFAULT,
+ };
+ struct net_key_list_param param = {
+ .keys = keys,
+ .key_cnt = key_cnt,
+ };
+ int err;
+
+ err = cli_prepare(&param, OP_NET_KEY_LIST);
+ if (err) {
+ return err;
+ }
+
+ bt_mesh_model_msg_init(msg, OP_NET_KEY_GET);
+
+ err = bt_mesh_model_send(cli->model, &ctx, msg, NULL, NULL);
+ if (err) {
+ BT_ERR("model_send() failed (err %d)", err);
+ cli_reset();
+ return err;
+ }
+
+ os_mbuf_free_chain(msg);
+ return cli_wait();
+}
+
+int bt_mesh_cfg_net_key_del(uint16_t net_idx, uint16_t addr,
+ uint16_t key_net_idx, uint8_t *status)
+{
+ struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_NET_KEY_DEL, 2);
+ struct bt_mesh_msg_ctx ctx = {
+ .net_idx = net_idx,
+ .app_idx = BT_MESH_KEY_DEV_REMOTE,
+ .addr = addr,
+ .send_ttl = BT_MESH_TTL_DEFAULT,
+ };
+ struct net_key_param param = {
+ .status = status,
+ .net_idx = key_net_idx,
+ };
+ int err;
+
+ err = cli_prepare(&param, OP_NET_KEY_STATUS);
+ if (err) {
+ goto done;
+ }
+
+ bt_mesh_model_msg_init(msg, OP_NET_KEY_DEL);
+ net_buf_simple_add_le16(msg, key_net_idx);
+
+ err = bt_mesh_model_send(cli->model, &ctx, msg, NULL, NULL);
+ if (err) {
+ BT_ERR("model_send() failed (err %d)", err);
+ cli_reset();
+ goto done;
+ }
+
+ if (!status) {
+ cli_reset();
+ goto done;
+ }
+
+ err = cli_wait();
+done:
+ os_mbuf_free_chain(msg);
+ return err;
+}
+
+int bt_mesh_cfg_app_key_add(uint16_t net_idx, uint16_t addr, uint16_t key_net_idx,
+ uint16_t key_app_idx, const uint8_t app_key[16],
+ uint8_t *status)
{
struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_APP_KEY_ADD, 19);
struct bt_mesh_msg_ctx ctx = {
@@ -864,9 +1180,137 @@ done:
return err;
}
-static int mod_app_bind(u16_t net_idx, u16_t addr, u16_t elem_addr,
- u16_t mod_app_idx, u16_t mod_id, u16_t cid,
- u8_t *status)
+int bt_mesh_cfg_node_reset(uint16_t net_idx, uint16_t addr, bool *status)
+{
+ struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_NODE_RESET, 0);
+ struct bt_mesh_msg_ctx ctx = {
+ .net_idx = net_idx,
+ .app_idx = BT_MESH_KEY_DEV_REMOTE,
+ .addr = addr,
+ .send_ttl = BT_MESH_TTL_DEFAULT,
+ };
+
+ int err;
+
+ if (status) {
+ *status = false;
+ }
+
+ err = cli_prepare(status, OP_NODE_RESET_STATUS);
+ if (err) {
+ goto done;
+ }
+
+ bt_mesh_model_msg_init(msg, OP_NODE_RESET);
+
+ err = bt_mesh_model_send(cli->model, &ctx, msg, NULL, NULL);
+ if (err) {
+ BT_ERR("model_send() failed (err %d)", err);
+ cli_reset();
+ goto done;
+ }
+
+ if (!status) {
+ cli_reset();
+ goto done;
+ }
+
+ err = cli_wait();
+done:
+ os_mbuf_free_chain(msg);
+ if (err) {
+ return err;
+ } else {
+ return 0;
+ }
+}
+
+int bt_mesh_cfg_app_key_get(uint16_t net_idx, uint16_t addr, uint16_t key_net_idx,
+ uint8_t *status, uint16_t *keys, size_t *key_cnt)
+{
+ struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_APP_KEY_GET, 2);
+ struct bt_mesh_msg_ctx ctx = {
+ .net_idx = net_idx,
+ .app_idx = BT_MESH_KEY_DEV_REMOTE,
+ .addr = addr,
+ .send_ttl = BT_MESH_TTL_DEFAULT,
+ };
+ struct app_key_list_param param = {
+ .net_idx = key_net_idx,
+ .status = status,
+ .keys = keys,
+ .key_cnt = key_cnt,
+ };
+ int err;
+
+ err = cli_prepare(&param, OP_APP_KEY_LIST);
+ if (err) {
+ os_mbuf_free_chain(msg);
+ return err;
+ }
+
+ bt_mesh_model_msg_init(msg, OP_APP_KEY_GET);
+ net_buf_simple_add_le16(msg, key_net_idx);
+
+ err = bt_mesh_model_send(cli->model, &ctx, msg, NULL, NULL);
+ if (err) {
+ BT_ERR("model_send() failed (err %d)", err);
+ os_mbuf_free_chain(msg);
+ cli_reset();
+ return err;
+ }
+
+ os_mbuf_free_chain(msg);
+ return cli_wait();
+}
+
+int bt_mesh_cfg_app_key_del(uint16_t net_idx, uint16_t addr,
+ uint16_t key_net_idx, uint16_t key_app_idx, uint8_t *status)
+{
+ struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_APP_KEY_DEL, 3);
+ struct bt_mesh_msg_ctx ctx = {
+ .net_idx = net_idx,
+ .app_idx = BT_MESH_KEY_DEV_REMOTE,
+ .addr = addr,
+ .send_ttl = BT_MESH_TTL_DEFAULT,
+ };
+ struct app_key_param param = {
+ .status = status,
+ .net_idx = key_net_idx,
+ .app_idx = key_app_idx,
+ };
+ int err;
+
+ err = cli_prepare(&param, OP_APP_KEY_STATUS);
+ if (err) {
+ os_mbuf_free_chain(msg);
+ return err;
+ }
+
+ bt_mesh_model_msg_init(msg, OP_APP_KEY_DEL);
+ key_idx_pack(msg, key_net_idx, key_app_idx);
+
+ err = bt_mesh_model_send(cli->model, &ctx, msg, NULL, NULL);
+ if (err) {
+ BT_ERR("model_send() failed (err %d)", err);
+ os_mbuf_free_chain(msg);
+ cli_reset();
+ return err;
+ }
+
+ if (!status) {
+ cli_reset();
+ os_mbuf_free_chain(msg);
+ return 0;
+ }
+
+ os_mbuf_free_chain(msg);
+ return cli_wait();
+}
+
+static int mod_app_bind(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ uint16_t mod_app_idx, uint16_t mod_id, uint16_t cid,
+ uint8_t *status)
{
struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_MOD_APP_BIND, 8);
struct bt_mesh_msg_ctx ctx = {
@@ -917,16 +1361,16 @@ done:
return err;
}
-int bt_mesh_cfg_mod_app_bind(u16_t net_idx, u16_t addr, u16_t elem_addr,
- u16_t mod_app_idx, u16_t mod_id, u8_t *status)
+int bt_mesh_cfg_mod_app_bind(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ uint16_t mod_app_idx, uint16_t mod_id, uint8_t *status)
{
return mod_app_bind(net_idx, addr, elem_addr, mod_app_idx, mod_id,
CID_NVAL, status);
}
-int bt_mesh_cfg_mod_app_bind_vnd(u16_t net_idx, u16_t addr, u16_t elem_addr,
- u16_t mod_app_idx, u16_t mod_id, u16_t cid,
- u8_t *status)
+int bt_mesh_cfg_mod_app_bind_vnd(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ uint16_t mod_app_idx, uint16_t mod_id, uint16_t cid,
+ uint8_t *status)
{
if (cid == CID_NVAL) {
return -EINVAL;
@@ -936,8 +1380,160 @@ int bt_mesh_cfg_mod_app_bind_vnd(u16_t net_idx, u16_t addr, u16_t elem_addr,
status);
}
-static int mod_sub(u32_t op, u16_t net_idx, u16_t addr, u16_t elem_addr,
- u16_t sub_addr, u16_t mod_id, u16_t cid, u8_t *status)
+static int mod_app_unbind(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ uint16_t mod_app_idx, uint16_t mod_id, uint16_t cid,
+ uint8_t *status)
+{
+ struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_MOD_APP_UNBIND, 8);
+ struct bt_mesh_msg_ctx ctx = {
+ .net_idx = net_idx,
+ .app_idx = BT_MESH_KEY_DEV_REMOTE,
+ .addr = addr,
+ .send_ttl = BT_MESH_TTL_DEFAULT,
+ };
+ struct mod_app_param param = {
+ .status = status,
+ .elem_addr = elem_addr,
+ .mod_app_idx = mod_app_idx,
+ .mod_id = mod_id,
+ .cid = cid,
+ };
+ int err;
+
+ err = cli_prepare(&param, OP_MOD_APP_STATUS);
+ if (err) {
+ goto done;
+ }
+
+ bt_mesh_model_msg_init(msg, OP_MOD_APP_UNBIND);
+ net_buf_simple_add_le16(msg, elem_addr);
+ net_buf_simple_add_le16(msg, mod_app_idx);
+
+ if (cid != CID_NVAL) {
+ net_buf_simple_add_le16(msg, cid);
+ }
+
+ net_buf_simple_add_le16(msg, mod_id);
+
+ err = bt_mesh_model_send(cli->model, &ctx, msg, NULL, NULL);
+ if (err) {
+ BT_ERR("model_send() failed (err %d)", err);
+ cli_reset();
+ goto done;
+ }
+
+ if (!status) {
+ cli_reset();
+ err = 0;
+ goto done;
+ }
+
+done:
+ os_mbuf_free_chain(msg);
+ if (err) {
+ return err;
+ } else {
+ return cli_wait();
+ }
+}
+
+int bt_mesh_cfg_mod_app_unbind(uint16_t net_idx, uint16_t addr,
+ uint16_t elem_addr, uint16_t mod_app_idx,
+ uint16_t mod_id, uint8_t *status)
+{
+ return mod_app_unbind(net_idx, addr, elem_addr, mod_app_idx, mod_id,
+ CID_NVAL, status);
+}
+
+int bt_mesh_cfg_mod_app_unbind_vnd(uint16_t net_idx, uint16_t addr,
+ uint16_t elem_addr, uint16_t mod_app_idx,
+ uint16_t mod_id, uint16_t cid, uint8_t *status)
+{
+ if (cid == CID_NVAL) {
+ return -EINVAL;
+ }
+
+ return mod_app_unbind(net_idx, addr, elem_addr, mod_app_idx,
+ mod_id, cid, status);
+}
+
+static int mod_member_list_get(uint32_t op, uint32_t expect_op, uint16_t net_idx,
+ uint16_t addr, uint16_t elem_addr, uint16_t mod_id,
+ uint16_t cid, uint8_t *status, uint16_t *apps,
+ size_t *app_cnt)
+{
+ struct os_mbuf *msg = BT_MESH_MODEL_BUF(DUMMY_2_BYTE_OP, 6);
+ struct bt_mesh_msg_ctx ctx = {
+ .net_idx = net_idx,
+ .app_idx = BT_MESH_KEY_DEV_REMOTE,
+ .addr = addr,
+ .send_ttl = BT_MESH_TTL_DEFAULT,
+ };
+ struct mod_member_list_param param = {
+ .status = status,
+ .elem_addr = elem_addr,
+ .mod_id = mod_id,
+ .cid = cid,
+ .members = apps,
+ .member_cnt = app_cnt,
+ };
+ int err;
+
+ err = cli_prepare(&param, expect_op);
+ if (err) {
+ goto done;
+ }
+
+ BT_DBG("net_idx 0x%04x addr 0x%04x elem_addr 0x%04x",
+ net_idx, addr, elem_addr);
+ BT_DBG("mod_id 0x%04x cid 0x%04x op: %x", mod_id, cid, op);
+
+ bt_mesh_model_msg_init(msg, op);
+ net_buf_simple_add_le16(msg, elem_addr);
+
+ if (cid != CID_NVAL) {
+ net_buf_simple_add_le16(msg, cid);
+ }
+
+ net_buf_simple_add_le16(msg, mod_id);
+
+ err = bt_mesh_model_send(cli->model, &ctx, msg, NULL, NULL);
+ if (err) {
+ BT_ERR("model_send() failed (err %d)", err);
+ cli_reset();
+ goto done;
+ }
+
+ err = cli_wait();
+done:
+ os_mbuf_free_chain(msg);
+ return err;
+}
+
+int bt_mesh_cfg_mod_app_get(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ uint16_t mod_id, uint8_t *status, uint16_t *apps,
+ size_t *app_cnt)
+{
+ return mod_member_list_get(OP_SIG_MOD_APP_GET, OP_SIG_MOD_APP_LIST,
+ net_idx, addr, elem_addr, mod_id, CID_NVAL,
+ status, apps, app_cnt);
+}
+
+int bt_mesh_cfg_mod_app_get_vnd(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ uint16_t mod_id, uint16_t cid, uint8_t *status,
+ uint16_t *apps, size_t *app_cnt)
+{
+ if (cid == CID_NVAL) {
+ return -EINVAL;
+ }
+
+ return mod_member_list_get(OP_VND_MOD_APP_GET, OP_VND_MOD_APP_LIST,
+ net_idx, addr, elem_addr, mod_id, CID_NVAL,
+ status, apps, app_cnt);
+}
+
+static int mod_sub(uint32_t op, uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ uint16_t sub_addr, uint16_t mod_id, uint16_t cid, uint8_t *status)
{
struct os_mbuf *msg = BT_MESH_MODEL_BUF(DUMMY_2_BYTE_OP, 8);
struct bt_mesh_msg_ctx ctx = {
@@ -979,6 +1575,7 @@ static int mod_sub(u32_t op, u16_t net_idx, u16_t addr, u16_t elem_addr,
if (!status) {
cli_reset();
+ err = 0;
goto done;
}
@@ -988,16 +1585,16 @@ done:
return err;
}
-int bt_mesh_cfg_mod_sub_add(u16_t net_idx, u16_t addr, u16_t elem_addr,
- u16_t sub_addr, u16_t mod_id, u8_t *status)
+int bt_mesh_cfg_mod_sub_add(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ uint16_t sub_addr, uint16_t mod_id, uint8_t *status)
{
return mod_sub(OP_MOD_SUB_ADD, net_idx, addr, elem_addr, sub_addr,
mod_id, CID_NVAL, status);
}
-int bt_mesh_cfg_mod_sub_add_vnd(u16_t net_idx, u16_t addr, u16_t elem_addr,
- u16_t sub_addr, u16_t mod_id, u16_t cid,
- u8_t *status)
+int bt_mesh_cfg_mod_sub_add_vnd(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ uint16_t sub_addr, uint16_t mod_id, uint16_t cid,
+ uint8_t *status)
{
if (cid == CID_NVAL) {
return -EINVAL;
@@ -1007,16 +1604,16 @@ int bt_mesh_cfg_mod_sub_add_vnd(u16_t net_idx, u16_t addr, u16_t elem_addr,
mod_id, cid, status);
}
-int bt_mesh_cfg_mod_sub_del(u16_t net_idx, u16_t addr, u16_t elem_addr,
- u16_t sub_addr, u16_t mod_id, u8_t *status)
+int bt_mesh_cfg_mod_sub_del(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ uint16_t sub_addr, uint16_t mod_id, uint8_t *status)
{
return mod_sub(OP_MOD_SUB_DEL, net_idx, addr, elem_addr, sub_addr,
mod_id, CID_NVAL, status);
}
-int bt_mesh_cfg_mod_sub_del_vnd(u16_t net_idx, u16_t addr, u16_t elem_addr,
- u16_t sub_addr, u16_t mod_id, u16_t cid,
- u8_t *status)
+int bt_mesh_cfg_mod_sub_del_vnd(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ uint16_t sub_addr, uint16_t mod_id, uint16_t cid,
+ uint8_t *status)
{
if (cid == CID_NVAL) {
return -EINVAL;
@@ -1026,16 +1623,16 @@ int bt_mesh_cfg_mod_sub_del_vnd(u16_t net_idx, u16_t addr, u16_t elem_addr,
mod_id, cid, status);
}
-int bt_mesh_cfg_mod_sub_overwrite(u16_t net_idx, u16_t addr, u16_t elem_addr,
- u16_t sub_addr, u16_t mod_id, u8_t *status)
+int bt_mesh_cfg_mod_sub_overwrite(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ uint16_t sub_addr, uint16_t mod_id, uint8_t *status)
{
return mod_sub(OP_MOD_SUB_OVERWRITE, net_idx, addr, elem_addr,
sub_addr, mod_id, CID_NVAL, status);
}
-int bt_mesh_cfg_mod_sub_overwrite_vnd(u16_t net_idx, u16_t addr,
- u16_t elem_addr, u16_t sub_addr,
- u16_t mod_id, u16_t cid, u8_t *status)
+int bt_mesh_cfg_mod_sub_overwrite_vnd(uint16_t net_idx, uint16_t addr,
+ uint16_t elem_addr, uint16_t sub_addr,
+ uint16_t mod_id, uint16_t cid, uint8_t *status)
{
if (cid == CID_NVAL) {
return -EINVAL;
@@ -1045,9 +1642,9 @@ int bt_mesh_cfg_mod_sub_overwrite_vnd(u16_t net_idx, u16_t addr,
sub_addr, mod_id, cid, status);
}
-static int mod_sub_va(u32_t op, u16_t net_idx, u16_t addr, u16_t elem_addr,
- const u8_t label[16], u16_t mod_id, u16_t cid,
- u16_t *virt_addr, u8_t *status)
+static int mod_sub_va(uint32_t op, uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ const uint8_t label[16], uint16_t mod_id, uint16_t cid,
+ uint16_t *virt_addr, uint8_t *status)
{
struct os_mbuf *msg = BT_MESH_MODEL_BUF(DUMMY_2_BYTE_OP, 22);
struct bt_mesh_msg_ctx ctx = {
@@ -1102,17 +1699,17 @@ done:
return err;
}
-int bt_mesh_cfg_mod_sub_va_add(u16_t net_idx, u16_t addr, u16_t elem_addr,
- const u8_t label[16], u16_t mod_id,
- u16_t *virt_addr, u8_t *status)
+int bt_mesh_cfg_mod_sub_va_add(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ const uint8_t label[16], uint16_t mod_id,
+ uint16_t *virt_addr, uint8_t *status)
{
return mod_sub_va(OP_MOD_SUB_VA_ADD, net_idx, addr, elem_addr, label,
mod_id, CID_NVAL, virt_addr, status);
}
-int bt_mesh_cfg_mod_sub_va_add_vnd(u16_t net_idx, u16_t addr, u16_t elem_addr,
- const u8_t label[16], u16_t mod_id,
- u16_t cid, u16_t *virt_addr, u8_t *status)
+int bt_mesh_cfg_mod_sub_va_add_vnd(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ const uint8_t label[16], uint16_t mod_id,
+ uint16_t cid, uint16_t *virt_addr, uint8_t *status)
{
if (cid == CID_NVAL) {
return -EINVAL;
@@ -1122,17 +1719,17 @@ int bt_mesh_cfg_mod_sub_va_add_vnd(u16_t net_idx, u16_t addr, u16_t elem_addr,
mod_id, cid, virt_addr, status);
}
-int bt_mesh_cfg_mod_sub_va_del(u16_t net_idx, u16_t addr, u16_t elem_addr,
- const u8_t label[16], u16_t mod_id,
- u16_t *virt_addr, u8_t *status)
+int bt_mesh_cfg_mod_sub_va_del(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ const uint8_t label[16], uint16_t mod_id,
+ uint16_t *virt_addr, uint8_t *status)
{
return mod_sub_va(OP_MOD_SUB_VA_DEL, net_idx, addr, elem_addr, label,
mod_id, CID_NVAL, virt_addr, status);
}
-int bt_mesh_cfg_mod_sub_va_del_vnd(u16_t net_idx, u16_t addr, u16_t elem_addr,
- const u8_t label[16], u16_t mod_id,
- u16_t cid, u16_t *virt_addr, u8_t *status)
+int bt_mesh_cfg_mod_sub_va_del_vnd(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ const uint8_t label[16], uint16_t mod_id,
+ uint16_t cid, uint16_t *virt_addr, uint8_t *status)
{
if (cid == CID_NVAL) {
return -EINVAL;
@@ -1142,19 +1739,19 @@ int bt_mesh_cfg_mod_sub_va_del_vnd(u16_t net_idx, u16_t addr, u16_t elem_addr,
mod_id, cid, virt_addr, status);
}
-int bt_mesh_cfg_mod_sub_va_overwrite(u16_t net_idx, u16_t addr,
- u16_t elem_addr, const u8_t label[16],
- u16_t mod_id, u16_t *virt_addr,
- u8_t *status)
+int bt_mesh_cfg_mod_sub_va_overwrite(uint16_t net_idx, uint16_t addr,
+ uint16_t elem_addr, const uint8_t label[16],
+ uint16_t mod_id, uint16_t *virt_addr,
+ uint8_t *status)
{
return mod_sub_va(OP_MOD_SUB_VA_OVERWRITE, net_idx, addr, elem_addr,
label, mod_id, CID_NVAL, virt_addr, status);
}
-int bt_mesh_cfg_mod_sub_va_overwrite_vnd(u16_t net_idx, u16_t addr,
- u16_t elem_addr, const u8_t label[16],
- u16_t mod_id, u16_t cid,
- u16_t *virt_addr, u8_t *status)
+int bt_mesh_cfg_mod_sub_va_overwrite_vnd(uint16_t net_idx, uint16_t addr,
+ uint16_t elem_addr, const uint8_t label[16],
+ uint16_t mod_id, uint16_t cid,
+ uint16_t *virt_addr, uint8_t *status)
{
if (cid == CID_NVAL) {
return -EINVAL;
@@ -1164,9 +1761,31 @@ int bt_mesh_cfg_mod_sub_va_overwrite_vnd(u16_t net_idx, u16_t addr,
label, mod_id, cid, virt_addr, status);
}
-static int mod_pub_get(u16_t net_idx, u16_t addr, u16_t elem_addr,
- u16_t mod_id, u16_t cid,
- struct bt_mesh_cfg_mod_pub *pub, u8_t *status)
+int bt_mesh_cfg_mod_sub_get(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ uint16_t mod_id, uint8_t *status, uint16_t *subs,
+ size_t *sub_cnt)
+{
+ return mod_member_list_get(OP_MOD_SUB_GET, OP_MOD_SUB_LIST, net_idx,
+ addr, elem_addr, mod_id, CID_NVAL, status,
+ subs, sub_cnt);
+}
+
+int bt_mesh_cfg_mod_sub_get_vnd(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ uint16_t mod_id, uint16_t cid, uint8_t *status,
+ uint16_t *subs, size_t *sub_cnt)
+{
+ if (cid == CID_NVAL) {
+ return -EINVAL;
+ }
+
+ return mod_member_list_get(OP_MOD_SUB_GET_VND, OP_MOD_SUB_LIST_VND,
+ net_idx, addr, elem_addr, mod_id, CID_NVAL,
+ status, subs, sub_cnt);
+}
+
+static int mod_pub_get(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ uint16_t mod_id, uint16_t cid,
+ struct bt_mesh_cfg_mod_pub *pub, uint8_t *status)
{
struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_MOD_PUB_GET, 6);
struct bt_mesh_msg_ctx ctx = {
@@ -1217,17 +1836,17 @@ done:
return err;
}
-int bt_mesh_cfg_mod_pub_get(u16_t net_idx, u16_t addr, u16_t elem_addr,
- u16_t mod_id, struct bt_mesh_cfg_mod_pub *pub,
- u8_t *status)
+int bt_mesh_cfg_mod_pub_get(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ uint16_t mod_id, struct bt_mesh_cfg_mod_pub *pub,
+ uint8_t *status)
{
return mod_pub_get(net_idx, addr, elem_addr, mod_id, CID_NVAL,
pub, status);
}
-int bt_mesh_cfg_mod_pub_get_vnd(u16_t net_idx, u16_t addr, u16_t elem_addr,
- u16_t mod_id, u16_t cid,
- struct bt_mesh_cfg_mod_pub *pub, u8_t *status)
+int bt_mesh_cfg_mod_pub_get_vnd(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ uint16_t mod_id, uint16_t cid,
+ struct bt_mesh_cfg_mod_pub *pub, uint8_t *status)
{
if (cid == CID_NVAL) {
return -EINVAL;
@@ -1236,9 +1855,9 @@ int bt_mesh_cfg_mod_pub_get_vnd(u16_t net_idx, u16_t addr, u16_t elem_addr,
return mod_pub_get(net_idx, addr, elem_addr, mod_id, cid, pub, status);
}
-static int mod_pub_set(u16_t net_idx, u16_t addr, u16_t elem_addr,
- u16_t mod_id, u16_t cid,
- struct bt_mesh_cfg_mod_pub *pub, u8_t *status)
+static int mod_pub_set(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ uint16_t mod_id, uint16_t cid,
+ struct bt_mesh_cfg_mod_pub *pub, uint8_t *status)
{
struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_MOD_PUB_SET, 13);
struct bt_mesh_msg_ctx ctx = {
@@ -1265,7 +1884,7 @@ static int mod_pub_set(u16_t net_idx, u16_t addr, u16_t elem_addr,
net_buf_simple_add_le16(msg, elem_addr);
net_buf_simple_add_le16(msg, pub->addr);
- net_buf_simple_add_le16(msg, (pub->app_idx | (pub->cred_flag << 12)));
+ net_buf_simple_add_le16(msg, (pub->app_idx & (pub->cred_flag << 12)));
net_buf_simple_add_u8(msg, pub->ttl);
net_buf_simple_add_u8(msg, pub->period);
net_buf_simple_add_u8(msg, pub->transmit);
@@ -1294,17 +1913,17 @@ done:
return err;
}
-int bt_mesh_cfg_mod_pub_set(u16_t net_idx, u16_t addr, u16_t elem_addr,
- u16_t mod_id, struct bt_mesh_cfg_mod_pub *pub,
- u8_t *status)
+int bt_mesh_cfg_mod_pub_set(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ uint16_t mod_id, struct bt_mesh_cfg_mod_pub *pub,
+ uint8_t *status)
{
return mod_pub_set(net_idx, addr, elem_addr, mod_id, CID_NVAL,
pub, status);
}
-int bt_mesh_cfg_mod_pub_set_vnd(u16_t net_idx, u16_t addr, u16_t elem_addr,
- u16_t mod_id, u16_t cid,
- struct bt_mesh_cfg_mod_pub *pub, u8_t *status)
+int bt_mesh_cfg_mod_pub_set_vnd(uint16_t net_idx, uint16_t addr, uint16_t elem_addr,
+ uint16_t mod_id, uint16_t cid,
+ struct bt_mesh_cfg_mod_pub *pub, uint8_t *status)
{
if (cid == CID_NVAL) {
return -EINVAL;
@@ -1313,8 +1932,8 @@ int bt_mesh_cfg_mod_pub_set_vnd(u16_t net_idx, u16_t addr, u16_t elem_addr,
return mod_pub_set(net_idx, addr, elem_addr, mod_id, cid, pub, status);
}
-int bt_mesh_cfg_hb_sub_set(u16_t net_idx, u16_t addr,
- struct bt_mesh_cfg_hb_sub *sub, u8_t *status)
+int bt_mesh_cfg_hb_sub_set(uint16_t net_idx, uint16_t addr,
+ struct bt_mesh_cfg_hb_sub *sub, uint8_t *status)
{
struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_HEARTBEAT_SUB_SET, 5);
struct bt_mesh_msg_ctx ctx = {
@@ -1357,8 +1976,8 @@ done:
return err;
}
-int bt_mesh_cfg_hb_sub_get(u16_t net_idx, u16_t addr,
- struct bt_mesh_cfg_hb_sub *sub, u8_t *status)
+int bt_mesh_cfg_hb_sub_get(uint16_t net_idx, uint16_t addr,
+ struct bt_mesh_cfg_hb_sub *sub, uint8_t *status)
{
struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_HEARTBEAT_SUB_GET, 0);
struct bt_mesh_msg_ctx ctx = {
@@ -1398,8 +2017,8 @@ done:
return err;
}
-int bt_mesh_cfg_hb_pub_set(u16_t net_idx, u16_t addr,
- const struct bt_mesh_cfg_hb_pub *pub, u8_t *status)
+int bt_mesh_cfg_hb_pub_set(uint16_t net_idx, uint16_t addr,
+ const struct bt_mesh_cfg_hb_pub *pub, uint8_t *status)
{
struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_HEARTBEAT_PUB_SET, 9);
struct bt_mesh_msg_ctx ctx = {
@@ -1444,8 +2063,8 @@ done:
return err;
}
-int bt_mesh_cfg_hb_pub_get(u16_t net_idx, u16_t addr,
- struct bt_mesh_cfg_hb_pub *pub, u8_t *status)
+int bt_mesh_cfg_hb_pub_get(uint16_t net_idx, uint16_t addr,
+ struct bt_mesh_cfg_hb_pub *pub, uint8_t *status)
{
struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_HEARTBEAT_PUB_GET, 0);
struct bt_mesh_msg_ctx ctx = {
@@ -1485,12 +2104,12 @@ done:
return err;
}
-s32_t bt_mesh_cfg_cli_timeout_get(void)
+int32_t bt_mesh_cfg_cli_timeout_get(void)
{
return msg_timeout;
}
-void bt_mesh_cfg_cli_timeout_set(s32_t timeout)
+void bt_mesh_cfg_cli_timeout_set(int32_t timeout)
{
msg_timeout = timeout;
}
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/cfg_srv.c b/src/libs/mynewt-nimble/nimble/host/mesh/src/cfg_srv.c
index 57aac90a..8a085bd7 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/src/cfg_srv.c
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/cfg_srv.c
@@ -17,9 +17,12 @@
#include "mesh_priv.h"
#include "adv.h"
+#include "app_keys.h"
#include "net.h"
+#include "rpl.h"
#include "lpn.h"
#include "transport.h"
+#include "heartbeat.h"
#include "crypto.h"
#include "access.h"
#include "beacon.h"
@@ -28,12 +31,10 @@
#include "friend.h"
#include "testing.h"
#include "settings.h"
+#include "cfg.h"
-#define DEFAULT_TTL 7
-
-static struct bt_mesh_cfg_srv *conf;
-
-static struct label labels[CONFIG_BT_MESH_LABEL_COUNT];
+void (*bt_mesh_app_key_cb_list[1]) (uint16_t app_idx, uint16_t net_idx,
+ enum bt_mesh_key_evt evt);
static int comp_add_elem(struct os_mbuf *buf, struct bt_mesh_elem *elem,
bool primary)
@@ -42,7 +43,7 @@ static int comp_add_elem(struct os_mbuf *buf, struct bt_mesh_elem *elem,
int i;
if (net_buf_simple_tailroom(buf) <
- 4 + (elem->model_count * 2) + (elem->vnd_model_count * 2)) {
+ 4 + (elem->model_count * 2) + (elem->vnd_model_count * 4)) {
BT_ERR("Too large device composition");
return -E2BIG;
}
@@ -68,7 +69,7 @@ static int comp_add_elem(struct os_mbuf *buf, struct bt_mesh_elem *elem,
static int comp_get_page_0(struct os_mbuf *buf)
{
- u16_t feat = 0;
+ uint16_t feat = 0;
const struct bt_mesh_comp *comp;
int i;
@@ -113,7 +114,7 @@ static void dev_comp_data_get(struct bt_mesh_model *model,
struct os_mbuf *buf)
{
struct os_mbuf *sdu = NET_BUF_SIMPLE(BT_MESH_TX_SDU_MAX);
- u8_t page;
+ uint8_t page;
BT_DBG("net_idx 0x%04x app_idx 0x%04x src 0x%04x len %u: %s",
ctx->net_idx, ctx->app_idx, ctx->addr, buf->om_len,
@@ -145,7 +146,7 @@ static struct bt_mesh_model *get_model(struct bt_mesh_elem *elem,
struct os_mbuf *buf, bool *vnd)
{
if (buf->om_len < 4) {
- u16_t id;
+ uint16_t id;
id = net_buf_simple_pull_le16(buf);
@@ -155,7 +156,7 @@ static struct bt_mesh_model *get_model(struct bt_mesh_elem *elem,
return bt_mesh_model_find(elem, id);
} else {
- u16_t company, id;
+ uint16_t company, id;
company = net_buf_simple_pull_le16(buf);
id = net_buf_simple_pull_le16(buf);
@@ -169,25 +170,9 @@ static struct bt_mesh_model *get_model(struct bt_mesh_elem *elem,
}
}
-static bool app_key_is_valid(u16_t app_idx)
-{
- int i;
-
- for (i = 0; i < ARRAY_SIZE(bt_mesh.app_keys); i++) {
- struct bt_mesh_app_key *key = &bt_mesh.app_keys[i];
-
- if (key->net_idx != BT_MESH_KEY_UNUSED &&
- key->app_idx == app_idx) {
- return true;
- }
- }
-
- return false;
-}
-
-static u8_t _mod_pub_set(struct bt_mesh_model *model, u16_t pub_addr,
- u16_t app_idx, u8_t cred_flag, u8_t ttl, u8_t period,
- u8_t retransmit, bool store)
+static uint8_t _mod_pub_set(struct bt_mesh_model *model, uint16_t pub_addr,
+ uint16_t app_idx, uint8_t cred_flag, uint8_t ttl, uint8_t period,
+ uint8_t retransmit, bool store)
{
if (!model->pub) {
return STATUS_NVAL_PUB_PARAM;
@@ -225,10 +210,20 @@ static u8_t _mod_pub_set(struct bt_mesh_model *model, u16_t pub_addr,
return STATUS_SUCCESS;
}
- if (!bt_mesh_app_key_find(app_idx)) {
+ if (!bt_mesh_app_key_exists(app_idx)) {
return STATUS_INVALID_APPKEY;
}
+#if CONFIG_BT_MESH_LABEL_COUNT > 0
+ if (BT_MESH_ADDR_IS_VIRTUAL(model->pub->addr)) {
+ uint8_t *uuid = bt_mesh_va_label_get(model->pub->addr);
+
+ if (uuid) {
+ bt_mesh_va_del(uuid, NULL);
+ }
+ }
+#endif
+
model->pub->addr = pub_addr;
model->pub->key = app_idx;
model->pub->cred = cred_flag;
@@ -237,12 +232,12 @@ static u8_t _mod_pub_set(struct bt_mesh_model *model, u16_t pub_addr,
model->pub->retransmit = retransmit;
if (model->pub->update) {
- s32_t period_ms;
+ int32_t period_ms;
period_ms = bt_mesh_model_pub_period_get(model);
BT_DBG("period %u ms", (unsigned) period_ms);
- if (period_ms) {
+ if (period_ms > 0) {
k_delayed_work_submit(&model->pub->timer, period_ms);
} else {
k_delayed_work_cancel(&model->pub->timer);
@@ -256,13 +251,13 @@ static u8_t _mod_pub_set(struct bt_mesh_model *model, u16_t pub_addr,
return STATUS_SUCCESS;
}
-u8_t mod_bind(struct bt_mesh_model *model, u16_t key_idx)
+uint8_t mod_bind(struct bt_mesh_model *model, uint16_t key_idx)
{
int i;
BT_DBG("model %p key_idx 0x%03x", model, key_idx);
- if (!app_key_is_valid(key_idx)) {
+ if (!bt_mesh_app_key_exists(key_idx)) {
return STATUS_INVALID_APPKEY;
}
@@ -288,13 +283,13 @@ u8_t mod_bind(struct bt_mesh_model *model, u16_t key_idx)
return STATUS_INSUFF_RESOURCES;
}
-u8_t mod_unbind(struct bt_mesh_model *model, u16_t key_idx, bool store)
+uint8_t mod_unbind(struct bt_mesh_model *model, uint16_t key_idx, bool store)
{
int i;
BT_DBG("model %p key_idx 0x%03x store %u", model, key_idx, store);
- if (!app_key_is_valid(key_idx)) {
+ if (!bt_mesh_app_key_exists(key_idx)) {
return STATUS_INVALID_APPKEY;
}
@@ -318,240 +313,88 @@ u8_t mod_unbind(struct bt_mesh_model *model, u16_t key_idx, bool store)
return STATUS_SUCCESS;
}
-struct bt_mesh_app_key *bt_mesh_app_key_alloc(u16_t app_idx)
-{
- int i;
-
- for (i = 0; i < ARRAY_SIZE(bt_mesh.app_keys); i++) {
- struct bt_mesh_app_key *key = &bt_mesh.app_keys[i];
-
- if (key->net_idx == BT_MESH_KEY_UNUSED) {
- return key;
- }
- }
-
- return NULL;
-}
-
-static u8_t app_key_set(u16_t net_idx, u16_t app_idx, const u8_t val[16],
- bool update)
+static void send_app_key_status(struct bt_mesh_model *model,
+ struct bt_mesh_msg_ctx *ctx,
+ uint8_t status,
+ uint16_t app_idx, uint16_t net_idx)
{
- struct bt_mesh_app_keys *keys;
- struct bt_mesh_app_key *key;
- struct bt_mesh_subnet *sub;
-
- BT_DBG("net_idx 0x%04x app_idx %04x update %u val %s",
- net_idx, app_idx, update, bt_hex(val, 16));
-
- sub = bt_mesh_subnet_get(net_idx);
- if (!sub) {
- return STATUS_INVALID_NETKEY;
- }
-
- key = bt_mesh_app_key_find(app_idx);
- if (update) {
- if (!key) {
- return STATUS_INVALID_APPKEY;
- }
-
- if (key->net_idx != net_idx) {
- return STATUS_INVALID_BINDING;
- }
-
- keys = &key->keys[1];
-
- /* The AppKey Update message shall generate an error when node
- * is in normal operation, Phase 2, or Phase 3 or in Phase 1
- * when the AppKey Update message on a valid AppKeyIndex when
- * the AppKey value is different.
- */
- if (sub->kr_phase != BT_MESH_KR_PHASE_1) {
- return STATUS_CANNOT_UPDATE;
- }
-
- if (key->updated) {
- if (memcmp(keys->val, val, 16)) {
- return STATUS_CANNOT_UPDATE;
- } else {
- return STATUS_SUCCESS;
- }
- }
-
- key->updated = true;
- } else {
- if (key) {
- if (key->net_idx == net_idx &&
- !memcmp(key->keys[0].val, val, 16)) {
- return STATUS_SUCCESS;
- }
-
- if (key->net_idx == net_idx) {
- return STATUS_IDX_ALREADY_STORED;
- } else {
- return STATUS_INVALID_NETKEY;
- }
- }
-
- key = bt_mesh_app_key_alloc(app_idx);
- if (!key) {
- return STATUS_INSUFF_RESOURCES;
- }
+ struct os_mbuf *msg = NET_BUF_SIMPLE(
+ BT_MESH_MODEL_BUF_LEN(OP_APP_KEY_STATUS, 4));
- keys = &key->keys[0];
- }
-
- if (bt_mesh_app_id(val, &keys->id)) {
- if (update) {
- key->updated = false;
- }
-
- return STATUS_STORAGE_FAIL;
- }
-
- BT_DBG("app_idx 0x%04x AID 0x%02x", app_idx, keys->id);
-
- key->net_idx = net_idx;
- key->app_idx = app_idx;
- memcpy(keys->val, val, 16);
+ bt_mesh_model_msg_init(msg, OP_APP_KEY_STATUS);
+ net_buf_simple_add_u8(msg, status);
+ key_idx_pack(msg, net_idx, app_idx);
- if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
- BT_DBG("Storing AppKey persistently");
- bt_mesh_store_app_key(key);
+ if (bt_mesh_model_send(model, ctx, msg, NULL, NULL)) {
+ BT_ERR("Unable to send App Key Status response");
}
- return STATUS_SUCCESS;
+ os_mbuf_free_chain(msg);
}
static void app_key_add(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_APP_KEY_STATUS, 4);
- u16_t key_net_idx, key_app_idx;
- u8_t status;
+ uint16_t key_net_idx, key_app_idx;
+ uint8_t status;
key_idx_unpack(buf, &key_net_idx, &key_app_idx);
BT_DBG("AppIdx 0x%04x NetIdx 0x%04x", key_app_idx, key_net_idx);
- bt_mesh_model_msg_init(msg, OP_APP_KEY_STATUS);
-
- status = app_key_set(key_net_idx, key_app_idx, buf->om_data, false);
- BT_DBG("status 0x%02x", status);
- net_buf_simple_add_u8(msg, status);
-
- key_idx_pack(msg, key_net_idx, key_app_idx);
-
- if (bt_mesh_model_send(model, ctx, msg, NULL, NULL)) {
- BT_ERR("Unable to send App Key Status response");
- }
+ status = bt_mesh_app_key_add(key_app_idx, key_net_idx, buf->om_data);
- os_mbuf_free_chain(msg);
+ send_app_key_status(model, ctx, status, key_app_idx, key_net_idx);
}
static void app_key_update(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_APP_KEY_STATUS, 4);
- u16_t key_net_idx, key_app_idx;
- u8_t status;
+ uint16_t key_net_idx, key_app_idx;
+ uint8_t status;
key_idx_unpack(buf, &key_net_idx, &key_app_idx);
BT_DBG("AppIdx 0x%04x NetIdx 0x%04x", key_app_idx, key_net_idx);
- bt_mesh_model_msg_init(msg, OP_APP_KEY_STATUS);
-
- status = app_key_set(key_net_idx, key_app_idx, buf->om_data, true);
+ status = bt_mesh_app_key_update(key_app_idx, key_net_idx, buf->om_data);
BT_DBG("status 0x%02x", status);
- net_buf_simple_add_u8(msg, status);
-
- key_idx_pack(msg, key_net_idx, key_app_idx);
-
- if (bt_mesh_model_send(model, ctx, msg, NULL, NULL)) {
- BT_ERR("Unable to send App Key Status response");
- }
-
- os_mbuf_free_chain(msg);
+ send_app_key_status(model, ctx, status, key_app_idx, key_net_idx);
}
-struct unbind_data {
- u16_t app_idx;
- bool store;
-};
-
-static void _mod_unbind(struct bt_mesh_model *mod, struct bt_mesh_elem *elem,
- bool vnd, bool primary, void *user_data)
+static void mod_app_key_del(struct bt_mesh_model *mod,
+ struct bt_mesh_elem *elem, bool vnd, bool primary,
+ void *user_data)
{
- struct unbind_data *data = user_data;
+ uint16_t *app_idx = user_data;
- mod_unbind(mod, data->app_idx, data->store);
+ mod_unbind(mod, *app_idx, true);
}
-void bt_mesh_app_key_del(struct bt_mesh_app_key *key, bool store)
+static void app_key_evt(uint16_t app_idx, uint16_t net_idx,
+ enum bt_mesh_key_evt evt)
{
- struct unbind_data data = { .app_idx = key->app_idx, .store = store };
-
- BT_DBG("AppIdx 0x%03x store %u", key->app_idx, store);
-
- bt_mesh_model_foreach(_mod_unbind, &data);
-
- if (IS_ENABLED(CONFIG_BT_SETTINGS) && store) {
- bt_mesh_clear_app_key(key);
+ if (evt == BT_MESH_KEY_DELETED) {
+ bt_mesh_model_foreach(&mod_app_key_del, &app_idx);
}
-
- key->net_idx = BT_MESH_KEY_UNUSED;
- memset(key->keys, 0, sizeof(key->keys));
}
static void app_key_del(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_APP_KEY_STATUS, 4);
- u16_t key_net_idx, key_app_idx;
- struct bt_mesh_app_key *key;
- u8_t status;
+ uint16_t key_net_idx, key_app_idx;
+ uint8_t status;
key_idx_unpack(buf, &key_net_idx, &key_app_idx);
BT_DBG("AppIdx 0x%04x NetIdx 0x%04x", key_app_idx, key_net_idx);
- if (!bt_mesh_subnet_get(key_net_idx)) {
- status = STATUS_INVALID_NETKEY;
- goto send_status;
- }
+ status = bt_mesh_app_key_del(key_app_idx, key_net_idx);
- key = bt_mesh_app_key_find(key_app_idx);
- if (!key) {
- /* Treat as success since the client might have missed a
- * previous response and is resending the request.
- */
- status = STATUS_SUCCESS;
- goto send_status;
- }
-
- if (key->net_idx != key_net_idx) {
- status = STATUS_INVALID_BINDING;
- goto send_status;
- }
-
- bt_mesh_app_key_del(key, true);
- status = STATUS_SUCCESS;
-
-send_status:
- bt_mesh_model_msg_init(msg, OP_APP_KEY_STATUS);
-
- net_buf_simple_add_u8(msg, status);
-
- key_idx_pack(msg, key_net_idx, key_app_idx);
-
- if (bt_mesh_model_send(model, ctx, msg, NULL, NULL)) {
- BT_ERR("Unable to send App Key Status response");
- }
-
- os_mbuf_free_chain(msg);
+ send_app_key_status(model, ctx, status, key_app_idx, key_net_idx);
}
/* Index list length: 3 bytes for every pair and 2 bytes for an odd idx */
@@ -564,8 +407,11 @@ static void app_key_get(struct bt_mesh_model *model,
struct os_mbuf *msg =
BT_MESH_MODEL_BUF(OP_APP_KEY_LIST,
3 + IDX_LEN(CONFIG_BT_MESH_APP_KEY_COUNT));
- u16_t get_idx, i, prev;
- u8_t status;
+ uint16_t app_idx[CONFIG_BT_MESH_APP_KEY_COUNT];
+ uint16_t get_idx;
+ uint8_t status;
+ ssize_t count;
+ int i;
get_idx = net_buf_simple_pull_le16(buf);
if (get_idx > 0xfff) {
@@ -577,7 +423,7 @@ static void app_key_get(struct bt_mesh_model *model,
bt_mesh_model_msg_init(msg, OP_APP_KEY_LIST);
- if (!bt_mesh_subnet_get(get_idx)) {
+ if (!bt_mesh_subnet_exists(get_idx)) {
status = STATUS_INVALID_NETKEY;
} else {
status = STATUS_SUCCESS;
@@ -590,25 +436,17 @@ static void app_key_get(struct bt_mesh_model *model,
goto send_status;
}
- prev = BT_MESH_KEY_UNUSED;
- for (i = 0; i < ARRAY_SIZE(bt_mesh.app_keys); i++) {
- struct bt_mesh_app_key *key = &bt_mesh.app_keys[i];
-
- if (key->net_idx != get_idx) {
- continue;
- }
-
- if (prev == BT_MESH_KEY_UNUSED) {
- prev = key->app_idx;
- continue;
- }
+ count = bt_mesh_app_keys_get(get_idx, app_idx, ARRAY_SIZE(app_idx), 0);
+ if (count < 0 || count > ARRAY_SIZE(app_idx)) {
+ count = ARRAY_SIZE(app_idx);
+ }
- key_idx_pack(msg, prev, key->app_idx);
- prev = BT_MESH_KEY_UNUSED;
+ for (i = 0; i < count - 1; i += 2) {
+ key_idx_pack(msg, app_idx[i], app_idx[i + 1]);
}
- if (prev != BT_MESH_KEY_UNUSED) {
- net_buf_simple_add_le16(msg, prev);
+ if (i < count) {
+ net_buf_simple_add_le16(msg, app_idx[i]);
}
send_status:
@@ -631,7 +469,7 @@ static void beacon_get(struct bt_mesh_model *model,
bt_hex(buf->om_data, buf->om_len));
bt_mesh_model_msg_init(msg, OP_BEACON_STATUS);
- net_buf_simple_add_u8(msg, bt_mesh_beacon_get());
+ net_buf_simple_add_u8(msg, bt_mesh_beacon_enabled());
if (bt_mesh_model_send(model, ctx, msg, NULL, NULL)) {
BT_ERR("Unable to send Config Beacon Status response");
@@ -644,35 +482,20 @@ static void beacon_set(struct bt_mesh_model *model,
struct os_mbuf *buf)
{
struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_BEACON_STATUS, 1);
- struct bt_mesh_cfg_srv *cfg = model->user_data;
BT_DBG("net_idx 0x%04x app_idx 0x%04x src 0x%04x len %u: %s",
ctx->net_idx, ctx->app_idx, ctx->addr, buf->om_len,
bt_hex(buf->om_data, buf->om_len));
- if (!cfg) {
- BT_WARN("No Configuration Server context available");
- } else if (buf->om_data[0] == 0x00 || buf->om_data[0] == 0x01) {
- if (buf->om_data[0] != cfg->beacon) {
- cfg->beacon = buf->om_data[0];
-
- if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
- bt_mesh_store_cfg();
- }
-
- if (cfg->beacon) {
- bt_mesh_beacon_enable();
- } else {
- bt_mesh_beacon_disable();
- }
- }
- } else {
+ if (buf->om_data[0] != 0x00 && buf->om_data[0] != 0x01) {
BT_WARN("Invalid Config Beacon value 0x%02x", buf->om_data[0]);
goto done;
}
+ bt_mesh_beacon_set(buf->om_data[0]);
+
bt_mesh_model_msg_init(msg, OP_BEACON_STATUS);
- net_buf_simple_add_u8(msg, bt_mesh_beacon_get());
+ net_buf_simple_add_u8(msg, buf->om_data[0]);
if (bt_mesh_model_send(model, ctx, msg, NULL, NULL)) {
BT_ERR("Unable to send Config Beacon Status response");
@@ -709,29 +532,20 @@ static void default_ttl_set(struct bt_mesh_model *model,
struct os_mbuf *buf)
{
struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_DEFAULT_TTL_STATUS, 1);
- struct bt_mesh_cfg_srv *cfg = model->user_data;
+ int err;
BT_DBG("net_idx 0x%04x app_idx 0x%04x src 0x%04x len %u: %s",
ctx->net_idx, ctx->app_idx, ctx->addr, buf->om_len,
bt_hex(buf->om_data, buf->om_len));
- if (!cfg) {
- BT_WARN("No Configuration Server context available");
- } else if (buf->om_data[0] <= BT_MESH_TTL_MAX && buf->om_data[0] != 0x01) {
- if (cfg->default_ttl != buf->om_data[0]) {
- cfg->default_ttl = buf->om_data[0];
-
- if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
- bt_mesh_store_cfg();
- }
- }
- } else {
+ err = bt_mesh_default_ttl_set(buf->om_data[0]);
+ if (err) {
BT_WARN("Prohibited Default TTL value 0x%02x", buf->om_data[0]);
goto done;
}
bt_mesh_model_msg_init(msg, OP_DEFAULT_TTL_STATUS);
- net_buf_simple_add_u8(msg, bt_mesh_default_ttl_get());
+ net_buf_simple_add_u8(msg, buf->om_data[0]);
if (bt_mesh_model_send(model, ctx, msg, NULL, NULL)) {
BT_ERR("Unable to send Default TTL Status response");
@@ -772,8 +586,6 @@ static void gatt_proxy_set(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- struct bt_mesh_cfg_srv *cfg = model->user_data;
-
BT_DBG("net_idx 0x%04x app_idx 0x%04x src 0x%04x len %u: %s",
ctx->net_idx, ctx->app_idx, ctx->addr, buf->om_len,
bt_hex(buf->om_data, buf->om_len));
@@ -783,35 +595,8 @@ static void gatt_proxy_set(struct bt_mesh_model *model,
return;
}
- if (!(MYNEWT_VAL(BLE_MESH_GATT_PROXY)) ||
- bt_mesh_gatt_proxy_get() == BT_MESH_GATT_PROXY_NOT_SUPPORTED) {
- goto send_status;
- }
-
- if (!cfg) {
- BT_WARN("No Configuration Server context available");
- goto send_status;
- }
+ (void)bt_mesh_gatt_proxy_set(buf->om_data[0]);
- BT_DBG("GATT Proxy 0x%02x -> 0x%02x", cfg->gatt_proxy, buf->om_data[0]);
-
- if (cfg->gatt_proxy == buf->om_data[0]) {
- goto send_status;
- }
-
- cfg->gatt_proxy = buf->om_data[0];
-
- if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
- bt_mesh_store_cfg();
- }
-
- bt_mesh_adv_update();
-
- if (cfg->hb_pub.feat & BT_MESH_FEAT_PROXY) {
- bt_mesh_heartbeat_send();
- }
-
-send_status:
send_gatt_proxy_status(model, ctx);
}
@@ -841,7 +626,6 @@ static void net_transmit_set(struct bt_mesh_model *model,
struct os_mbuf *buf)
{
struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_NET_TRANSMIT_STATUS, 1);
- struct bt_mesh_cfg_srv *cfg = model->user_data;
BT_DBG("net_idx 0x%04x app_idx 0x%04x src 0x%04x len %u: %s",
ctx->net_idx, ctx->app_idx, ctx->addr, buf->om_len,
@@ -851,18 +635,10 @@ static void net_transmit_set(struct bt_mesh_model *model,
BT_MESH_TRANSMIT_COUNT(buf->om_data[0]),
BT_MESH_TRANSMIT_INT(buf->om_data[0]));
- if (!cfg) {
- BT_WARN("No Configuration Server context available");
- } else {
- cfg->net_transmit = buf->om_data[0];
-
- if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
- bt_mesh_store_cfg();
- }
- }
+ bt_mesh_net_transmit_set(buf->om_data[0]);
bt_mesh_model_msg_init(msg, OP_NET_TRANSMIT_STATUS);
- net_buf_simple_add_u8(msg, bt_mesh_net_transmit_get());
+ net_buf_simple_add_u8(msg, buf->om_data[0]);
if (bt_mesh_model_send(model, ctx, msg, NULL, NULL)) {
BT_ERR("Unable to send Network Transmit Status");
@@ -898,43 +674,18 @@ static void relay_set(struct bt_mesh_model *model,
struct os_mbuf *buf)
{
struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_RELAY_STATUS, 2);
- struct bt_mesh_cfg_srv *cfg = model->user_data;
BT_DBG("net_idx 0x%04x app_idx 0x%04x src 0x%04x len %u: %s",
ctx->net_idx, ctx->app_idx, ctx->addr, buf->om_len,
bt_hex(buf->om_data, buf->om_len));
- if (!cfg) {
- BT_WARN("No Configuration Server context available");
- } else if (buf->om_data[0] == 0x00 || buf->om_data[0] == 0x01) {
- bool change;
-
- if (cfg->relay == BT_MESH_RELAY_NOT_SUPPORTED) {
- change = false;
- } else {
- change = (cfg->relay != buf->om_data[0]);
- cfg->relay = buf->om_data[0];
- cfg->relay_retransmit = buf->om_data[1];
-
- if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
- bt_mesh_store_cfg();
- }
- }
-
- BT_DBG("Relay 0x%02x (%s) xmit 0x%02x (count %u interval %u)",
- cfg->relay, change ? "changed" : "not changed",
- cfg->relay_retransmit,
- BT_MESH_TRANSMIT_COUNT(cfg->relay_retransmit),
- BT_MESH_TRANSMIT_INT(cfg->relay_retransmit));
-
- if ((cfg->hb_pub.feat & BT_MESH_FEAT_RELAY) && change) {
- bt_mesh_heartbeat_send();
- }
- } else {
+ if (buf->om_data[0] != 0x00 && buf->om_data[0] != 0x01) {
BT_WARN("Invalid Relay value 0x%02x", buf->om_data[0]);
goto done;
}
+ (void)bt_mesh_relay_set(buf->om_data[0], buf->om_data[1]);
+
bt_mesh_model_msg_init(msg, OP_RELAY_STATUS);
net_buf_simple_add_u8(msg, bt_mesh_relay_get());
net_buf_simple_add_u8(msg, bt_mesh_relay_retransmit_get());
@@ -950,9 +701,9 @@ done:
static void send_mod_pub_status(struct bt_mesh_model *cfg_mod,
struct bt_mesh_msg_ctx *ctx,
- u16_t elem_addr, u16_t pub_addr,
+ uint16_t elem_addr, uint16_t pub_addr,
bool vnd, struct bt_mesh_model *mod,
- u8_t status, u8_t *mod_id)
+ uint8_t status, uint8_t *mod_id)
{
struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_MOD_PUB_STATUS, 14);
@@ -964,11 +715,11 @@ static void send_mod_pub_status(struct bt_mesh_model *cfg_mod,
if (status != STATUS_SUCCESS) {
memset(net_buf_simple_add(msg, 7), 0, 7);
} else {
- u16_t idx_cred;
+ uint16_t idx_cred;
net_buf_simple_add_le16(msg, pub_addr);
- idx_cred = mod->pub->key | (u16_t)mod->pub->cred << 12;
+ idx_cred = mod->pub->key | (uint16_t)mod->pub->cred << 12;
net_buf_simple_add_le16(msg, idx_cred);
net_buf_simple_add_u8(msg, mod->pub->ttl);
net_buf_simple_add_u8(msg, mod->pub->period);
@@ -992,10 +743,10 @@ static void mod_pub_get(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- u16_t elem_addr, pub_addr = 0;
+ uint16_t elem_addr, pub_addr = 0;
struct bt_mesh_model *mod;
struct bt_mesh_elem *elem;
- u8_t *mod_id, status;
+ uint8_t *mod_id, status;
bool vnd;
elem_addr = net_buf_simple_pull_le16(buf);
@@ -1039,11 +790,11 @@ static void mod_pub_set(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- u8_t retransmit, status, pub_ttl, pub_period, cred_flag;
- u16_t elem_addr, pub_addr, pub_app_idx;
+ uint8_t retransmit, status, pub_ttl, pub_period, cred_flag;
+ uint16_t elem_addr, pub_addr, pub_app_idx;
struct bt_mesh_model *mod;
struct bt_mesh_elem *elem;
- u8_t *mod_id;
+ uint8_t *mod_id;
bool vnd;
elem_addr = net_buf_simple_pull_le16(buf);
@@ -1097,102 +848,9 @@ send_status:
status, mod_id);
}
-struct label *get_label(u16_t index)
-{
- if (index >= ARRAY_SIZE(labels)) {
- return NULL;
- }
-
- return &labels[index];
-}
-
-#if CONFIG_BT_MESH_LABEL_COUNT > 0
-static inline void va_store(struct label *store)
-{
- atomic_set_bit(store->flags, BT_MESH_VA_CHANGED);
- if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
- bt_mesh_store_label();
- }
-}
-
-static struct label *va_find(const u8_t *label_uuid,
- struct label **free_slot)
-{
- struct label *match = NULL;
- int i;
-
- if (free_slot != NULL) {
- *free_slot = NULL;
- }
-
- for (i = 0; i < ARRAY_SIZE(labels); i++) {
- if (labels[i].ref == 0) {
- if (free_slot != NULL) {
- *free_slot = &labels[i];
- }
- continue;
- }
-
- if (!memcmp(labels[i].uuid, label_uuid, 16)) {
- match = &labels[i];
- }
- }
-
- return match;
-}
-
-static u8_t va_add(u8_t *label_uuid, u16_t *addr)
-{
- struct label *update, *free_slot = NULL;
-
- update = va_find(label_uuid, &free_slot);
- if (update) {
- update->ref++;
- va_store(update);
- return 0;
- }
-
- if (!free_slot) {
- return STATUS_INSUFF_RESOURCES;
- }
-
- if (bt_mesh_virtual_addr(label_uuid, addr) < 0) {
- return STATUS_UNSPECIFIED;
- }
-
- free_slot->ref = 1;
- free_slot->addr = *addr;
- memcpy(free_slot->uuid, label_uuid, 16);
- va_store(free_slot);
-
- return STATUS_SUCCESS;
-}
-
-static u8_t va_del(u8_t *label_uuid, u16_t *addr)
-{
- struct label *update;
-
- update = va_find(label_uuid, NULL);
- if (update) {
- update->ref--;
-
- if (addr) {
- *addr = update->addr;
- }
-
- va_store(update);
- }
-
- if (addr) {
- *addr = BT_MESH_ADDR_UNASSIGNED;
- }
-
- return STATUS_CANNOT_REMOVE;
-}
-
static size_t mod_sub_list_clear(struct bt_mesh_model *mod)
{
- u8_t *label_uuid;
+ uint8_t *label_uuid;
size_t clear_count;
int i;
@@ -1207,13 +865,13 @@ static size_t mod_sub_list_clear(struct bt_mesh_model *mod)
continue;
}
- label_uuid = bt_mesh_label_uuid_get(mod->groups[i]);
+ label_uuid = bt_mesh_va_label_get(mod->groups[i]);
mod->groups[i] = BT_MESH_ADDR_UNASSIGNED;
clear_count++;
if (label_uuid) {
- va_del(label_uuid, NULL);
+ bt_mesh_va_del(label_uuid, NULL);
} else {
BT_ERR("Label UUID not found");
}
@@ -1226,12 +884,12 @@ static void mod_pub_va_set(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- u8_t retransmit, status, pub_ttl, pub_period, cred_flag;
- u16_t elem_addr, pub_addr, pub_app_idx;
+ uint8_t retransmit, status, pub_ttl, pub_period, cred_flag;
+ uint16_t elem_addr, pub_addr, pub_app_idx;
struct bt_mesh_model *mod;
struct bt_mesh_elem *elem;
- u8_t *label_uuid;
- u8_t *mod_id;
+ uint8_t *label_uuid;
+ uint8_t *mod_id;
bool vnd;
elem_addr = net_buf_simple_pull_le16(buf);
@@ -1277,85 +935,25 @@ static void mod_pub_va_set(struct bt_mesh_model *model,
goto send_status;
}
- status = va_add(label_uuid, &pub_addr);
- if (status == STATUS_SUCCESS) {
- status = _mod_pub_set(mod, pub_addr, pub_app_idx, cred_flag,
- pub_ttl, pub_period, retransmit, true);
- }
-
-send_status:
- send_mod_pub_status(model, ctx, elem_addr, pub_addr, vnd, mod,
- status, mod_id);
-}
-#else
-static size_t mod_sub_list_clear(struct bt_mesh_model *mod)
-{
- size_t clear_count;
- int i;
-
- /* Unref stored labels related to this model */
- for (i = 0, clear_count = 0; i < ARRAY_SIZE(mod->groups); i++) {
- if (mod->groups[i] != BT_MESH_ADDR_UNASSIGNED) {
- mod->groups[i] = BT_MESH_ADDR_UNASSIGNED;
- clear_count++;
- }
- }
-
- return clear_count;
-}
-
-static void mod_pub_va_set(struct bt_mesh_model *model,
- struct bt_mesh_msg_ctx *ctx,
- struct os_mbuf *buf)
-{
- u8_t *mod_id, status;
- struct bt_mesh_model *mod;
- struct bt_mesh_elem *elem;
- u16_t elem_addr, pub_addr = 0;
- bool vnd;
-
- elem_addr = net_buf_simple_pull_le16(buf);
- if (!BT_MESH_ADDR_IS_UNICAST(elem_addr)) {
- BT_WARN("Prohibited element address");
- return;
- }
-
- net_buf_simple_pull(buf, 16);
- mod_id = net_buf_simple_pull(buf, 4);
-
- BT_DBG("elem_addr 0x%04x", elem_addr);
-
- elem = bt_mesh_elem_find(elem_addr);
- if (!elem) {
- mod = NULL;
- vnd = (buf->om_len == 4);
- status = STATUS_INVALID_ADDRESS;
- goto send_status;
- }
-
- mod = get_model(elem, buf, &vnd);
- if (!mod) {
- status = STATUS_INVALID_MODEL;
+ status = bt_mesh_va_add(label_uuid, &pub_addr);
+ if (status != STATUS_SUCCESS) {
goto send_status;
}
- if (!mod->pub) {
- status = STATUS_NVAL_PUB_PARAM;
- goto send_status;
+ status = _mod_pub_set(mod, pub_addr, pub_app_idx, cred_flag, pub_ttl,
+ pub_period, retransmit, true);
+ if (status != STATUS_SUCCESS) {
+ bt_mesh_va_del(label_uuid, NULL);
}
- pub_addr = mod->pub->addr;
- status = STATUS_INSUFF_RESOURCES;
-
send_status:
send_mod_pub_status(model, ctx, elem_addr, pub_addr, vnd, mod,
status, mod_id);
}
-#endif /* MYNEWT_VAL(BLE_MESH_LABEL_COUNT) > 0 */
static void send_mod_sub_status(struct bt_mesh_model *model,
- struct bt_mesh_msg_ctx *ctx, u8_t status,
- u16_t elem_addr, u16_t sub_addr, u8_t *mod_id,
+ struct bt_mesh_msg_ctx *ctx, uint8_t status,
+ uint16_t elem_addr, uint16_t sub_addr, uint8_t *mod_id,
bool vnd)
{
struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_MOD_SUB_STATUS, 9);
@@ -1386,12 +984,12 @@ static void mod_sub_add(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- u16_t elem_addr, sub_addr;
+ uint16_t elem_addr, sub_addr;
struct bt_mesh_model *mod;
struct bt_mesh_elem *elem;
- u8_t *mod_id;
- u8_t status;
- u16_t *entry;
+ uint8_t *mod_id;
+ uint8_t status;
+ uint16_t *entry;
bool vnd;
elem_addr = net_buf_simple_pull_le16(buf);
@@ -1459,12 +1057,12 @@ static void mod_sub_del(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- u16_t elem_addr, sub_addr;
+ uint16_t elem_addr, sub_addr;
struct bt_mesh_model *mod;
struct bt_mesh_elem *elem;
- u8_t *mod_id;
- u16_t *match;
- u8_t status;
+ uint8_t *mod_id;
+ uint16_t *match;
+ uint8_t status;
bool vnd;
elem_addr = net_buf_simple_pull_le16(buf);
@@ -1522,7 +1120,7 @@ send_status:
}
static enum bt_mesh_walk mod_sub_clear_visitor(struct bt_mesh_model *mod,
- u32_t depth, void *user_data)
+ uint32_t depth, void *user_data)
{
if (IS_ENABLED(CONFIG_BT_MESH_LOW_POWER)) {
bt_mesh_lpn_group_del(mod->groups, ARRAY_SIZE(mod->groups));
@@ -1537,11 +1135,11 @@ static void mod_sub_overwrite(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- u16_t elem_addr, sub_addr;
+ uint16_t elem_addr, sub_addr;
struct bt_mesh_model *mod;
struct bt_mesh_elem *elem;
- u8_t *mod_id;
- u8_t status;
+ uint8_t *mod_id;
+ uint8_t status;
bool vnd;
elem_addr = net_buf_simple_pull_le16(buf);
@@ -1605,9 +1203,9 @@ static void mod_sub_del_all(struct bt_mesh_model *model,
{
struct bt_mesh_model *mod;
struct bt_mesh_elem *elem;
- u16_t elem_addr;
- u8_t *mod_id;
- u8_t status;
+ uint16_t elem_addr;
+ uint8_t *mod_id;
+ uint8_t status;
bool vnd;
elem_addr = net_buf_simple_pull_le16(buf);
@@ -1649,12 +1247,12 @@ send_status:
}
struct mod_sub_list_ctx {
- u16_t elem_idx;
+ uint16_t elem_idx;
struct os_mbuf *msg;
};
static enum bt_mesh_walk mod_sub_list_visitor(struct bt_mesh_model *mod,
- u32_t depth, void *ctx)
+ uint32_t depth, void *ctx)
{
struct mod_sub_list_ctx *visit = ctx;
int count = 0;
@@ -1693,7 +1291,7 @@ static void mod_sub_get(struct bt_mesh_model *model,
struct mod_sub_list_ctx visit_ctx;
struct bt_mesh_model *mod;
struct bt_mesh_elem *elem;
- u16_t addr, id;
+ uint16_t addr, id;
addr = net_buf_simple_pull_le16(buf);
if (!BT_MESH_ADDR_IS_UNICAST(addr)) {
@@ -1748,9 +1346,10 @@ static void mod_sub_get_vnd(struct bt_mesh_model *model,
struct os_mbuf *buf)
{
struct os_mbuf *msg = NET_BUF_SIMPLE(BT_MESH_TX_SDU_MAX);
+ struct mod_sub_list_ctx visit_ctx;
struct bt_mesh_model *mod;
struct bt_mesh_elem *elem;
- u16_t company, addr, id;
+ uint16_t company, addr, id;
addr = net_buf_simple_pull_le16(buf);
if (!BT_MESH_ADDR_IS_UNICAST(addr)) {
@@ -1789,8 +1388,10 @@ static void mod_sub_get_vnd(struct bt_mesh_model *model,
net_buf_simple_add_le16(msg, company);
net_buf_simple_add_le16(msg, id);
+ visit_ctx.msg = msg;
+ visit_ctx.elem_idx = mod->elem_idx;
bt_mesh_model_tree_walk(bt_mesh_model_root(mod), mod_sub_list_visitor,
- msg);
+ &visit_ctx);
send_list:
if (bt_mesh_model_send(model, ctx, msg, NULL, NULL)) {
@@ -1802,18 +1403,17 @@ done:
}
-#if MYNEWT_VAL(BLE_MESH_LABEL_COUNT) > 0
static void mod_sub_va_add(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- u16_t elem_addr, sub_addr;
+ uint16_t elem_addr, sub_addr;
struct bt_mesh_model *mod;
struct bt_mesh_elem *elem;
- u8_t *label_uuid;
- u8_t *mod_id;
- u16_t *entry;
- u8_t status;
+ uint8_t *label_uuid;
+ uint8_t *mod_id;
+ uint16_t *entry;
+ uint8_t status;
bool vnd;
elem_addr = net_buf_simple_pull_le16(buf);
@@ -1843,7 +1443,7 @@ static void mod_sub_va_add(struct bt_mesh_model *model,
goto send_status;
}
- status = va_add(label_uuid, &sub_addr);
+ status = bt_mesh_va_add(label_uuid, &sub_addr);
if (status != STATUS_SUCCESS) {
goto send_status;
}
@@ -1851,6 +1451,7 @@ static void mod_sub_va_add(struct bt_mesh_model *model,
if (bt_mesh_model_find_group(&mod, sub_addr)) {
/* Tried to add existing subscription */
status = STATUS_SUCCESS;
+ bt_mesh_va_del(label_uuid, NULL);
goto send_status;
}
@@ -1858,6 +1459,7 @@ static void mod_sub_va_add(struct bt_mesh_model *model,
entry = bt_mesh_model_find_group(&mod, BT_MESH_ADDR_UNASSIGNED);
if (!entry) {
status = STATUS_INSUFF_RESOURCES;
+ bt_mesh_va_del(label_uuid, NULL);
goto send_status;
}
@@ -1882,13 +1484,13 @@ static void mod_sub_va_del(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- u16_t elem_addr, sub_addr;
+ uint16_t elem_addr, sub_addr;
struct bt_mesh_model *mod;
struct bt_mesh_elem *elem;
- u8_t *label_uuid;
- u8_t *mod_id;
- u16_t *match;
- u8_t status;
+ uint8_t *label_uuid;
+ uint8_t *mod_id;
+ uint16_t *match;
+ uint8_t status;
bool vnd;
elem_addr = net_buf_simple_pull_le16(buf);
@@ -1919,7 +1521,7 @@ static void mod_sub_va_del(struct bt_mesh_model *model,
goto send_status;
}
- status = va_del(label_uuid, &sub_addr);
+ status = bt_mesh_va_del(label_uuid, &sub_addr);
if (sub_addr == BT_MESH_ADDR_UNASSIGNED) {
goto send_status;
}
@@ -1950,12 +1552,12 @@ static void mod_sub_va_overwrite(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- u16_t elem_addr, sub_addr = BT_MESH_ADDR_UNASSIGNED;
+ uint16_t elem_addr, sub_addr = BT_MESH_ADDR_UNASSIGNED;
struct bt_mesh_model *mod;
struct bt_mesh_elem *elem;
- u8_t *label_uuid;
- u8_t *mod_id;
- u8_t status;
+ uint8_t *label_uuid;
+ uint8_t *mod_id;
+ uint8_t status;
bool vnd;
elem_addr = net_buf_simple_pull_le16(buf);
@@ -1985,11 +1587,10 @@ static void mod_sub_va_overwrite(struct bt_mesh_model *model,
}
if (ARRAY_SIZE(mod->groups) > 0) {
- bt_mesh_model_tree_walk(bt_mesh_model_root(mod),
- mod_sub_clear_visitor, NULL);
-
- status = va_add(label_uuid, &sub_addr);
+ status = bt_mesh_va_add(label_uuid, &sub_addr);
if (status == STATUS_SUCCESS) {
+ bt_mesh_model_tree_walk(bt_mesh_model_root(mod),
+ mod_sub_clear_visitor, NULL);
mod->groups[0] = sub_addr;
if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
@@ -2008,131 +1609,10 @@ send_status:
send_mod_sub_status(model, ctx, status, elem_addr, sub_addr,
mod_id, vnd);
}
-#else
-static void mod_sub_va_add(struct bt_mesh_model *model,
- struct bt_mesh_msg_ctx *ctx,
- struct os_mbuf *buf)
-{
- struct bt_mesh_model *mod;
- struct bt_mesh_elem *elem;
- u16_t elem_addr;
- u8_t *mod_id;
- u8_t status;
- bool vnd;
-
- elem_addr = net_buf_simple_pull_le16(buf);
- if (!BT_MESH_ADDR_IS_UNICAST(elem_addr)) {
- BT_WARN("Prohibited element address");
- return;
- }
-
- net_buf_simple_pull(buf, 16);
-
- mod_id = buf->om_data;
-
- elem = bt_mesh_elem_find(elem_addr);
- if (!elem) {
- mod = NULL;
- vnd = (buf->om_len == 4);
- status = STATUS_INVALID_ADDRESS;
- goto send_status;
- }
-
- mod = get_model(elem, buf, &vnd);
- if (!mod) {
- status = STATUS_INVALID_MODEL;
- goto send_status;
- }
-
- status = STATUS_INSUFF_RESOURCES;
-
-send_status:
- send_mod_sub_status(model, ctx, status, elem_addr,
- BT_MESH_ADDR_UNASSIGNED, mod_id, vnd);
-}
-
-static void mod_sub_va_del(struct bt_mesh_model *model,
- struct bt_mesh_msg_ctx *ctx,
- struct os_mbuf *buf)
-{
- struct bt_mesh_elem *elem;
- u16_t elem_addr;
- u8_t *mod_id;
- u8_t status;
- bool vnd;
-
- elem_addr = net_buf_simple_pull_le16(buf);
- if (!BT_MESH_ADDR_IS_UNICAST(elem_addr)) {
- BT_WARN("Prohibited element address");
- return;
- }
-
- net_buf_simple_pull(buf, 16);
-
- mod_id = buf->om_data;
-
- elem = bt_mesh_elem_find(elem_addr);
- if (!elem) {
- vnd = (buf->om_len == 4);
- status = STATUS_INVALID_ADDRESS;
- goto send_status;
- }
-
- if (!get_model(elem, buf, &vnd)) {
- status = STATUS_INVALID_MODEL;
- goto send_status;
- }
-
- status = STATUS_INSUFF_RESOURCES;
-
-send_status:
- send_mod_sub_status(model, ctx, status, elem_addr,
- BT_MESH_ADDR_UNASSIGNED, mod_id, vnd);
-}
-
-static void mod_sub_va_overwrite(struct bt_mesh_model *model,
- struct bt_mesh_msg_ctx *ctx,
- struct os_mbuf *buf)
-{
- struct bt_mesh_elem *elem;
- u16_t elem_addr;
- u8_t *mod_id;
- u8_t status;
- bool vnd;
-
- elem_addr = net_buf_simple_pull_le16(buf);
- if (!BT_MESH_ADDR_IS_UNICAST(elem_addr)) {
- BT_WARN("Prohibited element address");
- return;
- }
-
- net_buf_simple_pull(buf, 18);
-
- mod_id = buf->om_data;
-
- elem = bt_mesh_elem_find(elem_addr);
- if (!elem) {
- vnd = (buf->om_len == 4);
- status = STATUS_INVALID_ADDRESS;
- goto send_status;
- }
-
- if (!get_model(elem, buf, &vnd)) {
- status = STATUS_INVALID_MODEL;
- goto send_status;
- }
-
- status = STATUS_INSUFF_RESOURCES;
-
-send_status:
- send_mod_sub_status(model, ctx, status, elem_addr,
- BT_MESH_ADDR_UNASSIGNED, mod_id, vnd);
-}
-#endif /* MYNEWT_VAL(BLE_MESH_LABEL_COUNT) > 0 */
static void send_net_key_status(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
- u16_t idx, u8_t status)
+ uint16_t idx, uint8_t status)
{
struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_NET_KEY_STATUS, 3);
@@ -2152,9 +1632,8 @@ static void net_key_add(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- struct bt_mesh_subnet *sub;
- u16_t idx;
- int err;
+ uint8_t status;
+ uint16_t idx;
idx = net_buf_simple_pull_le16(buf);
if (idx > 0xfff) {
@@ -2164,72 +1643,16 @@ static void net_key_add(struct bt_mesh_model *model,
BT_DBG("idx 0x%04x", idx);
- sub = bt_mesh_subnet_get(idx);
- if (!sub) {
- int i;
-
- for (i = 0; i < ARRAY_SIZE(bt_mesh.sub); i++) {
- if (bt_mesh.sub[i].net_idx == BT_MESH_KEY_UNUSED) {
- sub = &bt_mesh.sub[i];
- break;
- }
- }
-
- if (!sub) {
- send_net_key_status(model, ctx, idx,
- STATUS_INSUFF_RESOURCES);
- return;
- }
- }
-
- /* Check for already existing subnet */
- if (sub->net_idx == idx) {
- u8_t status;
-
- if (memcmp(buf->om_data, sub->keys[0].net, 16)) {
- status = STATUS_IDX_ALREADY_STORED;
- } else {
- status = STATUS_SUCCESS;
- }
-
- send_net_key_status(model, ctx, idx, status);
- return;
- }
-
- err = bt_mesh_net_keys_create(&sub->keys[0], buf->om_data);
- if (err) {
- send_net_key_status(model, ctx, idx, STATUS_UNSPECIFIED);
- return;
- }
-
- sub->net_idx = idx;
-
- if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
- BT_DBG("Storing NetKey persistently");
- bt_mesh_store_subnet(sub);
- }
-
- /* Make sure we have valid beacon data to be sent */
- bt_mesh_net_beacon_update(sub);
-
- if ((MYNEWT_VAL(BLE_MESH_GATT_PROXY))) {
- sub->node_id = BT_MESH_NODE_IDENTITY_STOPPED;
- bt_mesh_proxy_beacon_send(sub);
- bt_mesh_adv_update();
- } else {
- sub->node_id = BT_MESH_NODE_IDENTITY_NOT_SUPPORTED;
- }
-
- send_net_key_status(model, ctx, idx, STATUS_SUCCESS);
+ status = bt_mesh_subnet_add(idx, buf->om_data);
+ send_net_key_status(model, ctx, idx, status);
}
static void net_key_update(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- struct bt_mesh_subnet *sub;
- u16_t idx;
- int err;
+ uint8_t status;
+ uint16_t idx;
idx = net_buf_simple_pull_le16(buf);
if (idx > 0xfff) {
@@ -2237,80 +1660,16 @@ static void net_key_update(struct bt_mesh_model *model,
return;
}
- BT_DBG("idx 0x%04x", idx);
-
- sub = bt_mesh_subnet_get(idx);
- if (!sub) {
- send_net_key_status(model, ctx, idx, STATUS_INVALID_NETKEY);
- return;
- }
-
- /* The node shall successfully process a NetKey Update message on a
- * valid NetKeyIndex when the NetKey value is different and the Key
- * Refresh procedure has not been started, or when the NetKey value is
- * the same in Phase 1. The NetKey Update message shall generate an
- * error when the node is in Phase 2, or Phase 3.
- */
- switch (sub->kr_phase) {
- case BT_MESH_KR_NORMAL:
- if (!memcmp(buf->om_data, sub->keys[0].net, 16)) {
- return;
- }
- break;
- case BT_MESH_KR_PHASE_1:
- if (!memcmp(buf->om_data, sub->keys[1].net, 16)) {
- send_net_key_status(model, ctx, idx, STATUS_SUCCESS);
- return;
- }
- /* fall through */
- case BT_MESH_KR_PHASE_2:
- case BT_MESH_KR_PHASE_3:
- send_net_key_status(model, ctx, idx, STATUS_CANNOT_UPDATE);
- return;
- }
-
- err = bt_mesh_net_keys_create(&sub->keys[1], buf->om_data);
- if (!err && ((MYNEWT_VAL(BLE_MESH_LOW_POWER)) ||
- (MYNEWT_VAL(BLE_MESH_FRIEND)))) {
- err = friend_cred_update(sub);
- }
-
- if (err) {
- send_net_key_status(model, ctx, idx, STATUS_UNSPECIFIED);
- return;
- }
-
- sub->kr_phase = BT_MESH_KR_PHASE_1;
-
- if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
- BT_DBG("Storing NetKey persistently");
- bt_mesh_store_subnet(sub);
- }
-
- bt_mesh_net_beacon_update(sub);
-
- send_net_key_status(model, ctx, idx, STATUS_SUCCESS);
-}
-
-static void hb_pub_disable(struct bt_mesh_cfg_srv *cfg)
-{
- BT_DBG("");
-
- cfg->hb_pub.dst = BT_MESH_ADDR_UNASSIGNED;
- cfg->hb_pub.count = 0;
- cfg->hb_pub.ttl = 0;
- cfg->hb_pub.period = 0;
+ status = bt_mesh_subnet_update(idx, buf->om_data);
- k_delayed_work_cancel(&cfg->hb_pub.timer);
+ send_net_key_status(model, ctx, idx, status);
}
static void net_key_del(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- struct bt_mesh_subnet *sub;
- u16_t del_idx;
- u8_t status;
+ uint16_t del_idx;
del_idx = net_buf_simple_pull_le16(buf);
if (del_idx > 0xfff) {
@@ -2320,28 +1679,18 @@ static void net_key_del(struct bt_mesh_model *model,
BT_DBG("idx 0x%04x", del_idx);
- sub = bt_mesh_subnet_get(del_idx);
- if (!sub) {
- /* This could be a retry of a previous attempt that had its
- * response lost, so pretend that it was a success.
- */
- status = STATUS_SUCCESS;
- goto send_status;
- }
-
/* The key that the message was encrypted with cannot be removed.
* The NetKey List must contain a minimum of one NetKey.
*/
if (ctx->net_idx == del_idx) {
- status = STATUS_CANNOT_REMOVE;
- goto send_status;
+ send_net_key_status(model, ctx, del_idx,
+ STATUS_CANNOT_REMOVE);
+ return;
}
- bt_mesh_subnet_del(sub, true);
- status = STATUS_SUCCESS;
+ bt_mesh_subnet_del(del_idx);
-send_status:
- send_net_key_status(model, ctx, del_idx, status);
+ send_net_key_status(model, ctx, del_idx, STATUS_SUCCESS);
}
static void net_key_get(struct bt_mesh_model *model,
@@ -2351,29 +1700,23 @@ static void net_key_get(struct bt_mesh_model *model,
struct os_mbuf *msg =
BT_MESH_MODEL_BUF(OP_NET_KEY_LIST,
IDX_LEN(CONFIG_BT_MESH_SUBNET_COUNT));
- u16_t prev, i;
+ uint16_t net_idx[CONFIG_BT_MESH_SUBNET_COUNT];
+ ssize_t count;
+ int i;
bt_mesh_model_msg_init(msg, OP_NET_KEY_LIST);
- prev = BT_MESH_KEY_UNUSED;
- for (i = 0; i < ARRAY_SIZE(bt_mesh.sub); i++) {
- struct bt_mesh_subnet *sub = &bt_mesh.sub[i];
-
- if (sub->net_idx == BT_MESH_KEY_UNUSED) {
- continue;
- }
-
- if (prev == BT_MESH_KEY_UNUSED) {
- prev = sub->net_idx;
- continue;
- }
+ count = bt_mesh_subnets_get(net_idx, ARRAY_SIZE(net_idx), 0);
+ if (count < 0 || count > ARRAY_SIZE(net_idx)) {
+ count = ARRAY_SIZE(net_idx);
+ }
- key_idx_pack(msg, prev, sub->net_idx);
- prev = BT_MESH_KEY_UNUSED;
+ for (i = 0; i < count - 1; i += 2) {
+ key_idx_pack(msg, net_idx[i], net_idx[i + 1]);
}
- if (prev != BT_MESH_KEY_UNUSED) {
- net_buf_simple_add_le16(msg, prev);
+ if (i < count) {
+ net_buf_simple_add_le16(msg, net_idx[i]);
}
if (bt_mesh_model_send(model, ctx, msg, NULL, NULL)) {
@@ -2383,14 +1726,32 @@ static void net_key_get(struct bt_mesh_model *model,
os_mbuf_free_chain(msg);
}
+static void send_node_id_status(struct bt_mesh_model *model,
+ struct bt_mesh_msg_ctx *ctx,
+ uint8_t status,
+ uint16_t net_idx, uint8_t node_id)
+{
+ struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_NODE_IDENTITY_STATUS, 4);
+
+ bt_mesh_model_msg_init(msg, OP_NODE_IDENTITY_STATUS);
+ net_buf_simple_add_u8(msg, status);
+ net_buf_simple_add_le16(msg, net_idx);
+ net_buf_simple_add_u8(msg, node_id);
+
+ if (bt_mesh_model_send(model, ctx, msg, NULL, NULL)) {
+ BT_ERR("Unable to send Node Identity Status");
+ }
+
+ os_mbuf_free_chain(msg);
+}
+
static void node_identity_get(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_NODE_IDENTITY_STATUS, 4);
- struct bt_mesh_subnet *sub;
- u8_t node_id;
- u16_t idx;
+ enum bt_mesh_feat_state node_id;
+ uint8_t status;
+ uint16_t idx;
BT_DBG("net_idx 0x%04x app_idx 0x%04x src 0x%04x len %u: %s",
ctx->net_idx, ctx->app_idx, ctx->addr, buf->om_len,
@@ -2399,39 +1760,20 @@ static void node_identity_get(struct bt_mesh_model *model,
idx = net_buf_simple_pull_le16(buf);
if (idx > 0xfff) {
BT_ERR("Invalid NetKeyIndex 0x%04x", idx);
- goto done;
- }
-
- bt_mesh_model_msg_init(msg, OP_NODE_IDENTITY_STATUS);
-
- sub = bt_mesh_subnet_get(idx);
- if (!sub) {
- net_buf_simple_add_u8(msg, STATUS_INVALID_NETKEY);
- node_id = 0x00;
- } else {
- net_buf_simple_add_u8(msg, STATUS_SUCCESS);
- node_id = sub->node_id;
+ return;
}
- net_buf_simple_add_le16(msg, idx);
- net_buf_simple_add_u8(msg, node_id);
-
- if (bt_mesh_model_send(model, ctx, msg, NULL, NULL)) {
- BT_ERR("Unable to send Node Identity Status");
- }
+ status = bt_mesh_subnet_node_id_get(idx, &node_id);
-done:
- os_mbuf_free_chain(msg);
+ send_node_id_status(model, ctx, status, idx, node_id);
}
static void node_identity_set(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_NODE_IDENTITY_STATUS, 4);
- struct bt_mesh_subnet *sub;
- u8_t node_id;
- u16_t idx;
+ uint8_t node_id, status;
+ uint16_t idx;
BT_DBG("net_idx 0x%04x app_idx 0x%04x src 0x%04x len %u: %s",
ctx->net_idx, ctx->app_idx, ctx->addr, buf->om_len,
@@ -2440,51 +1782,36 @@ static void node_identity_set(struct bt_mesh_model *model,
idx = net_buf_simple_pull_le16(buf);
if (idx > 0xfff) {
BT_WARN("Invalid NetKeyIndex 0x%04x", idx);
- goto done;
+ return;
}
node_id = net_buf_simple_pull_u8(buf);
if (node_id != 0x00 && node_id != 0x01) {
BT_WARN("Invalid Node ID value 0x%02x", node_id);
- goto done;
+ return;
}
- bt_mesh_model_msg_init(msg, OP_NODE_IDENTITY_STATUS);
-
- sub = bt_mesh_subnet_get(idx);
- if (!sub) {
- net_buf_simple_add_u8(msg, STATUS_INVALID_NETKEY);
- net_buf_simple_add_le16(msg, idx);
- net_buf_simple_add_u8(msg, node_id);
- } else {
- net_buf_simple_add_u8(msg, STATUS_SUCCESS);
- net_buf_simple_add_le16(msg, idx);
-
- if (MYNEWT_VAL(BLE_MESH_GATT_PROXY)) {
- if (node_id) {
- bt_mesh_proxy_identity_start(sub);
- } else {
- bt_mesh_proxy_identity_stop(sub);
- }
- bt_mesh_adv_update();
- }
-
- net_buf_simple_add_u8(msg, sub->node_id);
+ status = bt_mesh_subnet_node_id_set(idx, node_id);
+ if (status == STATUS_INVALID_NETKEY) {
+ send_node_id_status(model, ctx, status, idx,
+ BT_MESH_NODE_IDENTITY_STOPPED);
+ return;
}
- if (bt_mesh_model_send(model, ctx, msg, NULL, NULL)) {
- BT_ERR("Unable to send Node Identity Status");
+ if (status == STATUS_FEAT_NOT_SUPP) {
+ /* Should return success, even if feature isn't supported: */
+ send_node_id_status(model, ctx, STATUS_SUCCESS, idx,
+ BT_MESH_NODE_IDENTITY_NOT_SUPPORTED);
+ return;
}
-done:
- os_mbuf_free_chain(msg);
-
+ send_node_id_status(model, ctx, status, idx, node_id);
}
static void create_mod_app_status(struct os_mbuf *msg,
struct bt_mesh_model *mod, bool vnd,
- u16_t elem_addr, u16_t app_idx,
- u8_t status, u8_t *mod_id)
+ uint16_t elem_addr, uint16_t app_idx,
+ uint8_t status, uint8_t *mod_id)
{
bt_mesh_model_msg_init(msg, OP_MOD_APP_STATUS);
@@ -2504,10 +1831,10 @@ static void mod_app_bind(struct bt_mesh_model *model,
struct os_mbuf *buf)
{
struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_MOD_APP_STATUS, 9);
- u16_t elem_addr, key_app_idx;
+ uint16_t elem_addr, key_app_idx;
struct bt_mesh_model *mod;
struct bt_mesh_elem *elem;
- u8_t *mod_id, status;
+ uint8_t *mod_id, status;
bool vnd;
elem_addr = net_buf_simple_pull_le16(buf);
@@ -2565,10 +1892,10 @@ static void mod_app_unbind(struct bt_mesh_model *model,
struct os_mbuf *buf)
{
struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_MOD_APP_STATUS, 9);
- u16_t elem_addr, key_app_idx;
+ uint16_t elem_addr, key_app_idx;
struct bt_mesh_model *mod;
struct bt_mesh_elem *elem;
- u8_t *mod_id, status;
+ uint8_t *mod_id, status;
bool vnd;
elem_addr = net_buf_simple_pull_le16(buf);
@@ -2626,8 +1953,8 @@ static void mod_app_get(struct bt_mesh_model *model,
struct bt_mesh_model *mod;
struct bt_mesh_elem *elem;
- u8_t *mod_id, status;
- u16_t elem_addr;
+ uint8_t *mod_id, status;
+ uint16_t elem_addr;
bool vnd;
elem_addr = net_buf_simple_pull_le16(buf);
@@ -2694,6 +2021,8 @@ static void node_reset(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
+ static struct bt_mesh_proxy_idle_cb proxy_idle = {.cb = bt_mesh_reset};
+
struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_NODE_RESET_STATUS, 0);
BT_DBG("net_idx 0x%04x app_idx 0x%04x src 0x%04x len %u: %s",
@@ -2710,7 +2039,15 @@ static void node_reset(struct bt_mesh_model *model,
BT_ERR("Unable to send Node Reset Status");
}
- bt_mesh_reset();
+ if (!IS_ENABLED(CONFIG_BT_MESH_GATT_PROXY)) {
+ bt_mesh_reset();
+ return;
+ }
+
+ /* If the response goes to a proxy node, we'll wait for the sending to
+ * complete before moving on.
+ */
+ bt_mesh_proxy_on_idle(&proxy_idle);
os_mbuf_free_chain(msg);
}
@@ -2718,10 +2055,9 @@ static void send_friend_status(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx)
{
struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_FRIEND_STATUS, 1);
- struct bt_mesh_cfg_srv *cfg = model->user_data;
bt_mesh_model_msg_init(msg, OP_FRIEND_STATUS);
- net_buf_simple_add_u8(msg, cfg->frnd);
+ net_buf_simple_add_u8(msg, bt_mesh_friend_get());
if (bt_mesh_model_send(model, ctx, msg, NULL, NULL)) {
BT_ERR("Unable to send Friend Status");
@@ -2744,8 +2080,6 @@ static void friend_set(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- struct bt_mesh_cfg_srv *cfg = model->user_data;
-
BT_DBG("net_idx 0x%04x app_idx 0x%04x src 0x%04x len %u: %s",
ctx->net_idx, ctx->app_idx, ctx->addr, buf->om_len,
bt_hex(buf->om_data, buf->om_len));
@@ -2755,34 +2089,8 @@ static void friend_set(struct bt_mesh_model *model,
return;
}
- if (!cfg) {
- BT_WARN("No Configuration Server context available");
- goto send_status;
- }
-
- BT_DBG("Friend 0x%02x -> 0x%02x", cfg->frnd, buf->om_data[0]);
-
- if (cfg->frnd == buf->om_data[0]) {
- goto send_status;
- }
-
- if (MYNEWT_VAL(BLE_MESH_FRIEND)) {
- cfg->frnd = buf->om_data[0];
-
- if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
- bt_mesh_store_cfg();
- }
+ (void)bt_mesh_friend_set(buf->om_data[0]);
- if (cfg->frnd == BT_MESH_FRIEND_DISABLED) {
- bt_mesh_friend_clear_net_idx(BT_MESH_KEY_ANY);
- }
- }
-
- if (cfg->hb_pub.feat & BT_MESH_FEAT_FRIEND) {
- bt_mesh_heartbeat_send();
- }
-
-send_status:
send_friend_status(model, ctx);
}
@@ -2792,8 +2100,8 @@ static void lpn_timeout_get(struct bt_mesh_model *model,
{
struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_LPN_TIMEOUT_STATUS, 5);
struct bt_mesh_friend *frnd;
- u16_t lpn_addr;
- s32_t timeout;
+ uint16_t lpn_addr;
+ int32_t timeout;
lpn_addr = net_buf_simple_pull_le16(buf);
@@ -2823,9 +2131,7 @@ static void lpn_timeout_get(struct bt_mesh_model *model,
timeout = k_delayed_work_remaining_get(&frnd->timer) / 100;
send_rsp:
- net_buf_simple_add_u8(msg, timeout);
- net_buf_simple_add_u8(msg, timeout >> 8);
- net_buf_simple_add_u8(msg, timeout >> 16);
+ net_buf_simple_add_le24(msg, timeout);
if (bt_mesh_model_send(model, ctx, msg, NULL, NULL)) {
BT_ERR("Unable to send LPN PollTimeout Status");
@@ -2837,7 +2143,7 @@ done:
static void send_krp_status(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
- u16_t idx, u8_t phase, u8_t status)
+ uint16_t idx, uint8_t phase, uint8_t status)
{
struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_KRP_STATUS, 4);
@@ -2857,8 +2163,8 @@ static void send_krp_status(struct bt_mesh_model *model,
static void krp_get(struct bt_mesh_model *model, struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- struct bt_mesh_subnet *sub;
- u16_t idx;
+ uint8_t kr_phase, status;
+ uint16_t idx;
idx = net_buf_simple_pull_le16(buf);
if (idx > 0xfff) {
@@ -2868,21 +2174,16 @@ static void krp_get(struct bt_mesh_model *model, struct bt_mesh_msg_ctx *ctx,
BT_DBG("idx 0x%04x", idx);
- sub = bt_mesh_subnet_get(idx);
- if (!sub) {
- send_krp_status(model, ctx, idx, 0x00, STATUS_INVALID_NETKEY);
- } else {
- send_krp_status(model, ctx, idx, sub->kr_phase,
- STATUS_SUCCESS);
- }
+ status = bt_mesh_subnet_kr_phase_get(idx, &kr_phase);
+
+ send_krp_status(model, ctx, idx, kr_phase, status);
}
static void krp_set(struct bt_mesh_model *model, struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- struct bt_mesh_subnet *sub;
- u8_t phase;
- u16_t idx;
+ uint8_t phase, status;
+ uint16_t idx;
idx = net_buf_simple_pull_le16(buf);
phase = net_buf_simple_pull_u8(buf);
@@ -2892,56 +2193,16 @@ static void krp_set(struct bt_mesh_model *model, struct bt_mesh_msg_ctx *ctx,
return;
}
- BT_DBG("idx 0x%04x transition 0x%02x", idx, phase);
-
- sub = bt_mesh_subnet_get(idx);
- if (!sub) {
- send_krp_status(model, ctx, idx, 0x00, STATUS_INVALID_NETKEY);
- return;
- }
-
- BT_DBG("%u -> %u", sub->kr_phase, phase);
-
- if (phase < BT_MESH_KR_PHASE_2 || phase > BT_MESH_KR_PHASE_3 ||
- (sub->kr_phase == BT_MESH_KR_NORMAL &&
- phase == BT_MESH_KR_PHASE_2)) {
- BT_WARN("Prohibited transition %u -> %u", sub->kr_phase, phase);
+ status = bt_mesh_subnet_kr_phase_set(idx, &phase);
+ if (status == STATUS_CANNOT_UPDATE) {
+ BT_ERR("Invalid kr phase transition 0x%02x", phase);
return;
}
- if (sub->kr_phase == BT_MESH_KR_PHASE_1 &&
- phase == BT_MESH_KR_PHASE_2) {
- sub->kr_phase = BT_MESH_KR_PHASE_2;
- sub->kr_flag = 1;
- bt_mesh_net_beacon_update(sub);
- } else if ((sub->kr_phase == BT_MESH_KR_PHASE_1 ||
- sub->kr_phase == BT_MESH_KR_PHASE_2) &&
- phase == BT_MESH_KR_PHASE_3) {
- bt_mesh_net_revoke_keys(sub);
- if ((MYNEWT_VAL(BLE_MESH_LOW_POWER)) ||
- (MYNEWT_VAL(BLE_MESH_FRIEND))) {
- friend_cred_refresh(ctx->net_idx);
- }
- sub->kr_phase = BT_MESH_KR_NORMAL;
- sub->kr_flag = 0;
- bt_mesh_net_beacon_update(sub);
- }
-
- send_krp_status(model, ctx, idx, sub->kr_phase, STATUS_SUCCESS);
+ send_krp_status(model, ctx, idx, phase, status);
}
-static u8_t hb_log(u16_t val)
-{
- if (!val) {
- return 0x00;
- } else if (val == 0xffff) {
- return 0xff;
- } else {
- return 32 - __builtin_clz(val);
- }
-}
-
-static u8_t hb_pub_count_log(u16_t val)
+static uint8_t hb_pub_count_log(uint16_t val)
{
if (!val) {
return 0x00;
@@ -2954,32 +2215,20 @@ static u8_t hb_pub_count_log(u16_t val)
}
}
-static u16_t hb_pwr2(u8_t val, u8_t sub)
-{
- if (!val) {
- return 0x0000;
- } else if (val == 0xff || val == 0x11) {
- return 0xffff;
- } else {
- return (1 << (val - sub));
- }
-}
-
struct hb_pub_param {
- u16_t dst;
- u8_t count_log;
- u8_t period_log;
- u8_t ttl;
- u16_t feat;
- u16_t net_idx;
+ uint16_t dst;
+ uint8_t count_log;
+ uint8_t period_log;
+ uint8_t ttl;
+ uint16_t feat;
+ uint16_t net_idx;
} __packed;
static void hb_pub_send_status(struct bt_mesh_model *model,
- struct bt_mesh_msg_ctx *ctx, u8_t status,
- struct hb_pub_param *orig_msg)
+ struct bt_mesh_msg_ctx *ctx, uint8_t status,
+ const struct bt_mesh_hb_pub *pub)
{
struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_HEARTBEAT_PUB_STATUS, 10);
- struct bt_mesh_cfg_srv *cfg = model->user_data;
BT_DBG("src 0x%04x status 0x%02x", ctx->addr, status);
@@ -2987,20 +2236,13 @@ static void hb_pub_send_status(struct bt_mesh_model *model,
net_buf_simple_add_u8(msg, status);
- if (orig_msg) {
- memcpy(net_buf_simple_add(msg, sizeof(*orig_msg)), orig_msg,
- sizeof(*orig_msg));
- goto send;
- }
-
- net_buf_simple_add_le16(msg, cfg->hb_pub.dst);
- net_buf_simple_add_u8(msg, hb_pub_count_log(cfg->hb_pub.count));
- net_buf_simple_add_u8(msg, cfg->hb_pub.period);
- net_buf_simple_add_u8(msg, cfg->hb_pub.ttl);
- net_buf_simple_add_le16(msg, cfg->hb_pub.feat);
- net_buf_simple_add_le16(msg, cfg->hb_pub.net_idx);
+ net_buf_simple_add_le16(msg, pub->dst);
+ net_buf_simple_add_u8(msg, hb_pub_count_log(pub->count));
+ net_buf_simple_add_u8(msg, bt_mesh_hb_log(pub->period));
+ net_buf_simple_add_u8(msg, pub->ttl);
+ net_buf_simple_add_le16(msg, pub->feat);
+ net_buf_simple_add_le16(msg, pub->net_idx);
-send:
if (bt_mesh_model_send(model, ctx, msg, NULL, NULL)) {
BT_ERR("Unable to send Heartbeat Publication Status");
}
@@ -3012,9 +2254,13 @@ static void heartbeat_pub_get(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
+ struct bt_mesh_hb_pub pub;
+
BT_DBG("src 0x%04x", ctx->addr);
- hb_pub_send_status(model, ctx, STATUS_SUCCESS, NULL);
+ bt_mesh_hb_pub_get(&pub);
+
+ hb_pub_send_status(model, ctx, STATUS_SUCCESS, &pub);
}
static void heartbeat_pub_set(struct bt_mesh_model *model,
@@ -3022,27 +2268,32 @@ static void heartbeat_pub_set(struct bt_mesh_model *model,
struct os_mbuf *buf)
{
struct hb_pub_param *param = (void *)buf->om_data;
- struct bt_mesh_cfg_srv *cfg = model->user_data;
- u16_t dst, feat, idx;
- u8_t status;
+ struct bt_mesh_hb_pub pub;
+ uint8_t status;
BT_DBG("src 0x%04x", ctx->addr);
- dst = sys_le16_to_cpu(param->dst);
+ pub.dst = sys_le16_to_cpu(param->dst);
+ pub.count = bt_mesh_hb_pwr2(param->count_log);
+ pub.period = bt_mesh_hb_pwr2(param->period_log);
+ pub.ttl = param->ttl;
+ pub.feat = sys_le16_to_cpu(param->feat);
+ pub.net_idx = sys_le16_to_cpu(param->net_idx);
+
/* All other address types but virtual are valid */
- if (BT_MESH_ADDR_IS_VIRTUAL(dst)) {
+ if (BT_MESH_ADDR_IS_VIRTUAL(pub.dst)) {
status = STATUS_INVALID_ADDRESS;
- goto failed;
+ goto rsp;
}
if (param->count_log > 0x11 && param->count_log != 0xff) {
status = STATUS_CANNOT_SET;
- goto failed;
+ goto rsp;
}
if (param->period_log > 0x10) {
status = STATUS_CANNOT_SET;
- goto failed;
+ goto rsp;
}
if (param->ttl > BT_MESH_TTL_MAX && param->ttl != BT_MESH_TTL_DEFAULT) {
@@ -3050,84 +2301,32 @@ static void heartbeat_pub_set(struct bt_mesh_model *model,
return;
}
- feat = sys_le16_to_cpu(param->feat);
-
- idx = sys_le16_to_cpu(param->net_idx);
- if (idx > 0xfff) {
- BT_ERR("Invalid NetKeyIndex 0x%04x", idx);
+ if (pub.net_idx > 0xfff) {
+ BT_ERR("Invalid NetKeyIndex 0x%04x", pub.net_idx);
return;
}
- if (!bt_mesh_subnet_get(idx)) {
- status = STATUS_INVALID_NETKEY;
- goto failed;
- }
-
- cfg->hb_pub.dst = dst;
- cfg->hb_pub.period = param->period_log;
- cfg->hb_pub.feat = feat & BT_MESH_FEAT_SUPPORTED;
- cfg->hb_pub.net_idx = idx;
-
- if (dst == BT_MESH_ADDR_UNASSIGNED) {
- hb_pub_disable(cfg);
- } else {
- /* 2^(n-1) */
- cfg->hb_pub.count = hb_pwr2(param->count_log, 1);
- cfg->hb_pub.ttl = param->ttl;
-
- BT_DBG("period %u ms", hb_pwr2(param->period_log, 1) * 1000);
-
- /* The first Heartbeat message shall be published as soon
- * as possible after the Heartbeat Publication Period state
- * has been configured for periodic publishing.
- */
- if (param->period_log && param->count_log) {
- k_work_submit(&cfg->hb_pub.timer.work);
- } else {
- k_delayed_work_cancel(&cfg->hb_pub.timer);
- }
- }
-
- if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
- bt_mesh_store_hb_pub();
- }
-
- hb_pub_send_status(model, ctx, STATUS_SUCCESS, NULL);
-
- return;
-
-failed:
- hb_pub_send_status(model, ctx, status, param);
+ status = bt_mesh_hb_pub_set(&pub);
+rsp:
+ hb_pub_send_status(model, ctx, status, &pub);
}
static void hb_sub_send_status(struct bt_mesh_model *model,
- struct bt_mesh_msg_ctx *ctx, u8_t status)
+ struct bt_mesh_msg_ctx *ctx,
+ const struct bt_mesh_hb_sub *sub)
{
struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_HEARTBEAT_SUB_STATUS, 9);
- struct bt_mesh_cfg_srv *cfg = model->user_data;
- u16_t period;
- s64_t uptime;
-
- BT_DBG("src 0x%04x status 0x%02x", ctx->addr, status);
-
- uptime = k_uptime_get();
- if (uptime > cfg->hb_sub.expiry) {
- period = 0;
- } else {
- period = (cfg->hb_sub.expiry - uptime) / 1000;
- }
+ BT_DBG("src 0x%04x ", ctx->addr);
bt_mesh_model_msg_init(msg, OP_HEARTBEAT_SUB_STATUS);
- net_buf_simple_add_u8(msg, status);
-
- net_buf_simple_add_le16(msg, cfg->hb_sub.src);
- net_buf_simple_add_le16(msg, cfg->hb_sub.dst);
-
- net_buf_simple_add_u8(msg, hb_log(period));
- net_buf_simple_add_u8(msg, hb_log(cfg->hb_sub.count));
- net_buf_simple_add_u8(msg, cfg->hb_sub.min_hops);
- net_buf_simple_add_u8(msg, cfg->hb_sub.max_hops);
+ net_buf_simple_add_u8(msg, STATUS_SUCCESS);
+ net_buf_simple_add_le16(msg, sub->src);
+ net_buf_simple_add_le16(msg, sub->dst);
+ net_buf_simple_add_u8(msg, bt_mesh_hb_log(sub->remaining));
+ net_buf_simple_add_u8(msg, bt_mesh_hb_log(sub->count));
+ net_buf_simple_add_u8(msg, sub->min_hops);
+ net_buf_simple_add_u8(msg, sub->max_hops);
if (bt_mesh_model_send(model, ctx, msg, NULL, NULL)) {
@@ -3141,92 +2340,58 @@ static void heartbeat_sub_get(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
+ struct bt_mesh_hb_sub sub;
+
BT_DBG("src 0x%04x", ctx->addr);
- hb_sub_send_status(model, ctx, STATUS_SUCCESS);
+ bt_mesh_hb_sub_get(&sub);
+
+ hb_sub_send_status(model, ctx, &sub);
}
static void heartbeat_sub_set(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- struct bt_mesh_cfg_srv *cfg = model->user_data;
- u16_t sub_src, sub_dst;
- u8_t sub_period;
- s32_t period_ms;
+ uint8_t period_log, status;
+ struct bt_mesh_hb_sub sub;
+ uint16_t sub_src, sub_dst;
+ uint32_t period;
BT_DBG("src 0x%04x", ctx->addr);
sub_src = net_buf_simple_pull_le16(buf);
sub_dst = net_buf_simple_pull_le16(buf);
- sub_period = net_buf_simple_pull_u8(buf);
+ period_log = net_buf_simple_pull_u8(buf);
BT_DBG("sub_src 0x%04x sub_dst 0x%04x period 0x%02x",
- sub_src, sub_dst, sub_period);
-
- if (sub_src != BT_MESH_ADDR_UNASSIGNED &&
- !BT_MESH_ADDR_IS_UNICAST(sub_src)) {
- BT_WARN("Prohibited source address");
- return;
- }
+ sub_src, sub_dst, period_log);
- if (BT_MESH_ADDR_IS_VIRTUAL(sub_dst) || BT_MESH_ADDR_IS_RFU(sub_dst) ||
- (BT_MESH_ADDR_IS_UNICAST(sub_dst) &&
- sub_dst != bt_mesh_primary_addr())) {
- BT_WARN("Prohibited destination address");
+ if (period_log > 0x11) {
+ BT_WARN("Prohibited subscription period 0x%02x", period_log);
return;
}
- if (sub_period > 0x11) {
- BT_WARN("Prohibited subscription period 0x%02x", sub_period);
- return;
- }
+ period = bt_mesh_hb_pwr2(period_log);
- if (sub_src == BT_MESH_ADDR_UNASSIGNED ||
- sub_dst == BT_MESH_ADDR_UNASSIGNED ||
- sub_period == 0x00) {
- /* Only an explicit address change to unassigned should
- * trigger clearing of the values according to
- * MESH/NODE/CFG/HBS/BV-02-C.
+ status = bt_mesh_hb_sub_set(sub_src, sub_dst, period);
+ if (status != STATUS_SUCCESS) {
+ /* All errors are caused by invalid packets, which should be
+ * ignored.
*/
- if (sub_src == BT_MESH_ADDR_UNASSIGNED ||
- sub_dst == BT_MESH_ADDR_UNASSIGNED) {
- cfg->hb_sub.src = BT_MESH_ADDR_UNASSIGNED;
- cfg->hb_sub.dst = BT_MESH_ADDR_UNASSIGNED;
- cfg->hb_sub.min_hops = BT_MESH_TTL_MAX;
- cfg->hb_sub.max_hops = 0;
- cfg->hb_sub.count = 0;
- }
-
- period_ms = 0;
- } else {
- cfg->hb_sub.src = sub_src;
- cfg->hb_sub.dst = sub_dst;
- cfg->hb_sub.min_hops = BT_MESH_TTL_MAX;
- cfg->hb_sub.max_hops = 0;
- cfg->hb_sub.count = 0;
- period_ms = hb_pwr2(sub_period, 1) * 1000;
- }
-
- /* Let the transport layer know it needs to handle this address */
- bt_mesh_set_hb_sub_dst(cfg->hb_sub.dst);
-
- BT_DBG("period_ms %u", (unsigned) period_ms);
-
- if (period_ms) {
- cfg->hb_sub.expiry = k_uptime_get() + period_ms;
- } else {
- cfg->hb_sub.expiry = 0;
+ return;
}
- hb_sub_send_status(model, ctx, STATUS_SUCCESS);
+ bt_mesh_hb_sub_get(&sub);
/* MESH/NODE/CFG/HBS/BV-01-C expects the MinHops to be 0x7f after
* disabling subscription, but 0x00 for subsequent Get requests.
*/
- if (!period_ms) {
- cfg->hb_sub.min_hops = 0;
+ if (!period_log) {
+ sub.min_hops = BT_MESH_TTL_MAX;
}
+
+ hb_sub_send_status(model, ctx, &sub);
}
const struct bt_mesh_model_op bt_mesh_cfg_srv_op[] = {
@@ -3280,58 +2445,9 @@ const struct bt_mesh_model_op bt_mesh_cfg_srv_op[] = {
BT_MESH_MODEL_OP_END,
};
-static void hb_publish(struct ble_npl_event *work)
-{
- struct bt_mesh_cfg_srv *cfg = ble_npl_event_get_arg(work);
- struct bt_mesh_subnet *sub;
- u16_t period_ms;
-
- BT_DBG("hb_pub.count: %u", cfg->hb_pub.count);
-
- sub = bt_mesh_subnet_get(cfg->hb_pub.net_idx);
- if (!sub) {
- BT_ERR("No matching subnet for idx 0x%02x",
- cfg->hb_pub.net_idx);
- cfg->hb_pub.dst = BT_MESH_ADDR_UNASSIGNED;
- return;
- }
-
- if (cfg->hb_pub.count == 0) {
- return;
- }
-
- period_ms = hb_pwr2(cfg->hb_pub.period, 1) * 1000;
- if (period_ms && cfg->hb_pub.count > 1) {
- k_delayed_work_submit(&cfg->hb_pub.timer, period_ms);
- }
-
- bt_mesh_heartbeat_send();
-
- if (cfg->hb_pub.count != 0xffff) {
- cfg->hb_pub.count--;
- }
-}
-
-static bool conf_is_valid(struct bt_mesh_cfg_srv *cfg)
-{
- if (cfg->relay > 0x02) {
- return false;
- }
-
- if (cfg->beacon > 0x01) {
- return false;
- }
-
- if (cfg->default_ttl > BT_MESH_TTL_MAX) {
- return false;
- }
-
- return true;
-}
-
static int cfg_srv_init(struct bt_mesh_model *model)
{
- struct bt_mesh_cfg_srv *cfg = model->user_data;
+ bt_mesh_app_key_cb_list[0] = app_key_evt;
BT_DBG("");
@@ -3340,43 +2456,12 @@ static int cfg_srv_init(struct bt_mesh_model *model)
return -EINVAL;
}
- if (!cfg) {
- BT_ERR("No Configuration Server context provided");
- return -EINVAL;
- }
-
- if (!conf_is_valid(cfg)) {
- BT_ERR("Invalid values in configuration");
- return -EINVAL;
- }
-
/*
* Configuration Model security is device-key based and only the local
* device-key is allowed to access this model.
*/
model->keys[0] = BT_MESH_KEY_DEV_LOCAL;
- if (!(MYNEWT_VAL(BLE_MESH_RELAY))) {
- cfg->relay = BT_MESH_RELAY_NOT_SUPPORTED;
- }
-
- if (!(MYNEWT_VAL(BLE_MESH_FRIEND))) {
- cfg->frnd = BT_MESH_FRIEND_NOT_SUPPORTED;
- }
-
- if (!(MYNEWT_VAL(BLE_MESH_GATT_PROXY))) {
- cfg->gatt_proxy = BT_MESH_GATT_PROXY_NOT_SUPPORTED;
- }
-
- k_delayed_work_init(&cfg->hb_pub.timer, hb_publish);
- k_delayed_work_add_arg(&cfg->hb_pub.timer, cfg);
- cfg->hb_pub.net_idx = BT_MESH_KEY_UNUSED;
- cfg->hb_sub.expiry = 0;
-
- cfg->model = model;
-
- conf = cfg;
-
return 0;
}
@@ -3401,8 +2486,6 @@ static void mod_reset(struct bt_mesh_model *mod, struct bt_mesh_elem *elem,
if (clear_count) {
bt_mesh_store_mod_sub(mod);
}
-
- bt_mesh_model_data_store(mod, vnd, NULL, 0);
}
if (mod->cb && mod->cb->reset) {
@@ -3412,208 +2495,5 @@ static void mod_reset(struct bt_mesh_model *mod, struct bt_mesh_elem *elem,
void bt_mesh_cfg_reset(void)
{
- struct bt_mesh_cfg_srv *cfg = conf;
- int i;
-
- BT_DBG("");
-
- if (!cfg) {
- return;
- }
-
- bt_mesh_set_hb_sub_dst(BT_MESH_ADDR_UNASSIGNED);
-
- cfg->hb_sub.src = BT_MESH_ADDR_UNASSIGNED;
- cfg->hb_sub.dst = BT_MESH_ADDR_UNASSIGNED;
- cfg->hb_sub.expiry = 0;
-
- /* Delete all net keys, which also takes care of all app keys which
- * are associated with each net key.
- */
- for (i = 0; i < ARRAY_SIZE(bt_mesh.sub); i++) {
- struct bt_mesh_subnet *sub = &bt_mesh.sub[i];
-
- if (sub->net_idx != BT_MESH_KEY_UNUSED) {
- bt_mesh_subnet_del(sub, true);
- }
- }
-
bt_mesh_model_foreach(mod_reset, NULL);
-
- memset(labels, 0, sizeof(labels));
-}
-
-void bt_mesh_heartbeat(u16_t src, u16_t dst, u8_t hops, u16_t feat)
-{
- struct bt_mesh_cfg_srv *cfg = conf;
-
- if (!cfg) {
- BT_WARN("No configuaration server context available");
- return;
- }
-
- if (src != cfg->hb_sub.src || dst != cfg->hb_sub.dst) {
- BT_WARN("No subscription for received heartbeat");
- return;
- }
-
- if (k_uptime_get() > cfg->hb_sub.expiry) {
- BT_WARN("Heartbeat subscription period expired");
- return;
- }
-
- cfg->hb_sub.min_hops = min(cfg->hb_sub.min_hops, hops);
- cfg->hb_sub.max_hops = max(cfg->hb_sub.max_hops, hops);
-
- if (cfg->hb_sub.count < 0xffff) {
- cfg->hb_sub.count++;
- }
-
- BT_DBG("src 0x%04x dst 0x%04x hops %u min %u max %u count %u", src,
- dst, hops, cfg->hb_sub.min_hops, cfg->hb_sub.max_hops,
- cfg->hb_sub.count);
-
- if (cfg->hb_sub.func) {
- cfg->hb_sub.func(hops, feat);
- }
-}
-
-u8_t bt_mesh_net_transmit_get(void)
-{
- if (conf) {
- return conf->net_transmit;
- }
-
- return 0;
-}
-
-u8_t bt_mesh_relay_get(void)
-{
- if (conf) {
- return conf->relay;
- }
-
- return BT_MESH_RELAY_NOT_SUPPORTED;
-}
-
-u8_t bt_mesh_friend_get(void)
-{
- BT_DBG("conf %p conf->frnd 0x%02x", conf, conf->frnd);
-
- if (conf) {
- return conf->frnd;
- }
-
- return BT_MESH_FRIEND_NOT_SUPPORTED;
-}
-
-u8_t bt_mesh_relay_retransmit_get(void)
-{
- if (conf) {
- return conf->relay_retransmit;
- }
-
- return 0;
-}
-
-u8_t bt_mesh_beacon_get(void)
-{
- if (conf) {
- return conf->beacon;
- }
-
- return BT_MESH_BEACON_DISABLED;
-}
-
-u8_t bt_mesh_gatt_proxy_get(void)
-{
- if (conf) {
- return conf->gatt_proxy;
- }
-
- return BT_MESH_GATT_PROXY_NOT_SUPPORTED;
-}
-
-u8_t bt_mesh_default_ttl_get(void)
-{
- if (conf) {
- return conf->default_ttl;
- }
-
- return DEFAULT_TTL;
-}
-
-u8_t *bt_mesh_label_uuid_get(u16_t addr)
-{
- int i;
-
- BT_DBG("addr 0x%04x", addr);
-
- for (i = 0; i < ARRAY_SIZE(labels); i++) {
- if (labels[i].addr == addr) {
- BT_DBG("Found Label UUID for 0x%04x: %s", addr,
- bt_hex(labels[i].uuid, 16));
- return labels[i].uuid;
- }
- }
-
- BT_WARN("No matching Label UUID for 0x%04x", addr);
-
- return NULL;
-}
-
-struct bt_mesh_hb_pub *bt_mesh_hb_pub_get(void)
-{
- if (!conf) {
- return NULL;
- }
-
- return &conf->hb_pub;
-}
-
-void bt_mesh_hb_pub_disable(void)
-{
- if (conf) {
- hb_pub_disable(conf);
- }
-}
-
-struct bt_mesh_cfg_srv *bt_mesh_cfg_get(void)
-{
- return conf;
-}
-
-void bt_mesh_subnet_del(struct bt_mesh_subnet *sub, bool store)
-{
- int i;
-
- BT_DBG("NetIdx 0x%03x store %u", sub->net_idx, store);
-
- if (conf && conf->hb_pub.net_idx == sub->net_idx) {
- hb_pub_disable(conf);
-
- if (IS_ENABLED(CONFIG_BT_SETTINGS) && store) {
- bt_mesh_store_hb_pub();
- }
- }
-
- /* Delete any app keys bound to this NetKey index */
- for (i = 0; i < ARRAY_SIZE(bt_mesh.app_keys); i++) {
- struct bt_mesh_app_key *key = &bt_mesh.app_keys[i];
-
- if (key->net_idx == sub->net_idx) {
- bt_mesh_app_key_del(key, store);
- }
- }
-
- if (IS_ENABLED(CONFIG_BT_MESH_FRIEND)) {
- bt_mesh_friend_clear_net_idx(sub->net_idx);
- }
-
- if (IS_ENABLED(CONFIG_BT_SETTINGS) && store) {
- bt_mesh_clear_subnet(sub);
- }
-
- memset(sub, 0, sizeof(*sub));
- sub->net_idx = BT_MESH_KEY_UNUSED;
}
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/crypto.c b/src/libs/mynewt-nimble/nimble/host/mesh/src/crypto.c
index b6a0ba21..3111a6ef 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/src/crypto.c
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/crypto.c
@@ -24,8 +24,8 @@
#define NET_MIC_LEN(pdu) (((pdu)[1] & 0x80) ? 8 : 4)
#define APP_MIC_LEN(aszmic) ((aszmic) ? 8 : 4)
-int bt_mesh_aes_cmac(const u8_t key[16], struct bt_mesh_sg *sg,
- size_t sg_len, u8_t mac[16])
+int bt_mesh_aes_cmac(const uint8_t key[16], struct bt_mesh_sg *sg,
+ size_t sg_len, uint8_t mac[16])
{
struct tc_aes_key_sched_struct sched;
struct tc_cmac_struct state;
@@ -48,8 +48,8 @@ int bt_mesh_aes_cmac(const u8_t key[16], struct bt_mesh_sg *sg,
return 0;
}
-int bt_mesh_k1(const u8_t *ikm, size_t ikm_len, const u8_t salt[16],
- const char *info, u8_t okm[16])
+int bt_mesh_k1(const uint8_t *ikm, size_t ikm_len, const uint8_t salt[16],
+ const char *info, uint8_t okm[16])
{
int err;
@@ -61,14 +61,14 @@ int bt_mesh_k1(const u8_t *ikm, size_t ikm_len, const u8_t salt[16],
return bt_mesh_aes_cmac_one(okm, info, strlen(info), okm);
}
-int bt_mesh_k2(const u8_t n[16], const u8_t *p, size_t p_len,
- u8_t net_id[1], u8_t enc_key[16], u8_t priv_key[16])
+int bt_mesh_k2(const uint8_t n[16], const uint8_t *p, size_t p_len,
+ uint8_t net_id[1], uint8_t enc_key[16], uint8_t priv_key[16])
{
struct bt_mesh_sg sg[3];
- u8_t salt[16];
- u8_t out[16];
- u8_t t[16];
- u8_t pad;
+ uint8_t salt[16];
+ uint8_t out[16];
+ uint8_t t[16];
+ uint8_t pad;
int err;
BT_DBG("n %s", bt_hex(n, 16));
@@ -126,11 +126,11 @@ int bt_mesh_k2(const u8_t n[16], const u8_t *p, size_t p_len,
return 0;
}
-int bt_mesh_k3(const u8_t n[16], u8_t out[8])
+int bt_mesh_k3(const uint8_t n[16], uint8_t out[8])
{
- u8_t id64[] = { 'i', 'd', '6', '4', 0x01 };
- u8_t tmp[16];
- u8_t t[16];
+ uint8_t id64[] = { 'i', 'd', '6', '4', 0x01 };
+ uint8_t tmp[16];
+ uint8_t t[16];
int err;
err = bt_mesh_s1("smk3", tmp);
@@ -153,11 +153,11 @@ int bt_mesh_k3(const u8_t n[16], u8_t out[8])
return 0;
}
-int bt_mesh_k4(const u8_t n[16], u8_t out[1])
+int bt_mesh_k4(const uint8_t n[16], uint8_t out[1])
{
- u8_t id6[] = { 'i', 'd', '6', 0x01 };
- u8_t tmp[16];
- u8_t t[16];
+ uint8_t id6[] = { 'i', 'd', '6', 0x01 };
+ uint8_t tmp[16];
+ uint8_t t[16];
int err;
err = bt_mesh_s1("smk4", tmp);
@@ -180,10 +180,10 @@ int bt_mesh_k4(const u8_t n[16], u8_t out[1])
return 0;
}
-int bt_mesh_id128(const u8_t n[16], const char *s, u8_t out[16])
+int bt_mesh_id128(const uint8_t n[16], const char *s, uint8_t out[16])
{
const char *id128 = "id128\x01";
- u8_t salt[16];
+ uint8_t salt[16];
int err;
err = bt_mesh_s1(s, salt);
@@ -194,326 +194,8 @@ int bt_mesh_id128(const u8_t n[16], const char *s, u8_t out[16])
return bt_mesh_k1(n, 16, salt, id128, out);
}
-static int bt_mesh_ccm_decrypt(const u8_t key[16], u8_t nonce[13],
- const u8_t *enc_msg, size_t msg_len,
- const u8_t *aad, size_t aad_len,
- u8_t *out_msg, size_t mic_size)
-{
- u8_t msg[16], pmsg[16], cmic[16], cmsg[16], Xn[16], mic[16];
- u16_t last_blk, blk_cnt;
- size_t i, j;
- int err;
-
- if (msg_len < 1 || aad_len >= 0xff00) {
- return -EINVAL;
- }
-
- /* C_mic = e(AppKey, 0x01 || nonce || 0x0000) */
- pmsg[0] = 0x01;
- memcpy(pmsg + 1, nonce, 13);
- sys_put_be16(0x0000, pmsg + 14);
-
- err = bt_encrypt_be(key, pmsg, cmic);
- if (err) {
- return err;
- }
-
- /* X_0 = e(AppKey, 0x09 || nonce || length) */
- if (mic_size == sizeof(u64_t)) {
- pmsg[0] = 0x19 | (aad_len ? 0x40 : 0x00);
- } else {
- pmsg[0] = 0x09 | (aad_len ? 0x40 : 0x00);
- }
-
- memcpy(pmsg + 1, nonce, 13);
- sys_put_be16(msg_len, pmsg + 14);
-
- err = bt_encrypt_be(key, pmsg, Xn);
- if (err) {
- return err;
- }
-
- /* If AAD is being used to authenticate, include it here */
- if (aad_len) {
- sys_put_be16(aad_len, pmsg);
-
- for (i = 0; i < sizeof(u16_t); i++) {
- pmsg[i] = Xn[i] ^ pmsg[i];
- }
-
- j = 0;
- aad_len += sizeof(u16_t);
- while (aad_len > 16) {
- do {
- pmsg[i] = Xn[i] ^ aad[j];
- i++, j++;
- } while (i < 16);
-
- aad_len -= 16;
- i = 0;
-
- err = bt_encrypt_be(key, pmsg, Xn);
- if (err) {
- return err;
- }
- }
-
- for (; i < aad_len; i++, j++) {
- pmsg[i] = Xn[i] ^ aad[j];
- }
-
- for (i = aad_len; i < 16; i++) {
- pmsg[i] = Xn[i];
- }
-
- err = bt_encrypt_be(key, pmsg, Xn);
- if (err) {
- return err;
- }
- }
-
- last_blk = msg_len % 16;
- blk_cnt = (msg_len + 15) / 16;
- if (!last_blk) {
- last_blk = 16;
- }
-
- for (j = 0; j < blk_cnt; j++) {
- if (j + 1 == blk_cnt) {
- /* C_1 = e(AppKey, 0x01 || nonce || 0x0001) */
- pmsg[0] = 0x01;
- memcpy(pmsg + 1, nonce, 13);
- sys_put_be16(j + 1, pmsg + 14);
-
- err = bt_encrypt_be(key, pmsg, cmsg);
- if (err) {
- return err;
- }
-
- /* Encrypted = Payload[0-15] ^ C_1 */
- for (i = 0; i < last_blk; i++) {
- msg[i] = enc_msg[(j * 16) + i] ^ cmsg[i];
- }
-
- memcpy(out_msg + (j * 16), msg, last_blk);
-
- /* X_1 = e(AppKey, X_0 ^ Payload[0-15]) */
- for (i = 0; i < last_blk; i++) {
- pmsg[i] = Xn[i] ^ msg[i];
- }
-
- for (i = last_blk; i < 16; i++) {
- pmsg[i] = Xn[i] ^ 0x00;
- }
-
- err = bt_encrypt_be(key, pmsg, Xn);
- if (err) {
- return err;
- }
-
- /* MIC = C_mic ^ X_1 */
- for (i = 0; i < sizeof(mic); i++) {
- mic[i] = cmic[i] ^ Xn[i];
- }
- } else {
- /* C_1 = e(AppKey, 0x01 || nonce || 0x0001) */
- pmsg[0] = 0x01;
- memcpy(pmsg + 1, nonce, 13);
- sys_put_be16(j + 1, pmsg + 14);
-
- err = bt_encrypt_be(key, pmsg, cmsg);
- if (err) {
- return err;
- }
-
- /* Encrypted = Payload[0-15] ^ C_1 */
- for (i = 0; i < 16; i++) {
- msg[i] = enc_msg[(j * 16) + i] ^ cmsg[i];
- }
-
- memcpy(out_msg + (j * 16), msg, 16);
-
- /* X_1 = e(AppKey, X_0 ^ Payload[0-15]) */
- for (i = 0; i < 16; i++) {
- pmsg[i] = Xn[i] ^ msg[i];
- }
-
- err = bt_encrypt_be(key, pmsg, Xn);
- if (err) {
- return err;
- }
- }
- }
-
- if (memcmp(mic, enc_msg + msg_len, mic_size)) {
- return -EBADMSG;
- }
-
- return 0;
-}
-
-static int bt_mesh_ccm_encrypt(const u8_t key[16], u8_t nonce[13],
- const u8_t *msg, size_t msg_len,
- const u8_t *aad, size_t aad_len,
- u8_t *out_msg, size_t mic_size)
-{
- u8_t pmsg[16], cmic[16], cmsg[16], mic[16], Xn[16];
- u16_t blk_cnt, last_blk;
- size_t i, j;
- int err;
-
- BT_DBG("key %s", bt_hex(key, 16));
- BT_DBG("nonce %s", bt_hex(nonce, 13));
- BT_DBG("msg (len %zu) %s", msg_len, bt_hex(msg, msg_len));
- BT_DBG("aad_len %zu mic_size %zu", aad_len, mic_size);
-
- /* Unsupported AAD size */
- if (aad_len >= 0xff00) {
- return -EINVAL;
- }
-
- /* C_mic = e(AppKey, 0x01 || nonce || 0x0000) */
- pmsg[0] = 0x01;
- memcpy(pmsg + 1, nonce, 13);
- sys_put_be16(0x0000, pmsg + 14);
-
- err = bt_encrypt_be(key, pmsg, cmic);
- if (err) {
- return err;
- }
-
- /* X_0 = e(AppKey, 0x09 || nonce || length) */
- if (mic_size == sizeof(u64_t)) {
- pmsg[0] = 0x19 | (aad_len ? 0x40 : 0x00);
- } else {
- pmsg[0] = 0x09 | (aad_len ? 0x40 : 0x00);
- }
-
- memcpy(pmsg + 1, nonce, 13);
- sys_put_be16(msg_len, pmsg + 14);
-
- err = bt_encrypt_be(key, pmsg, Xn);
- if (err) {
- return err;
- }
-
- /* If AAD is being used to authenticate, include it here */
- if (aad_len) {
- sys_put_be16(aad_len, pmsg);
-
- for (i = 0; i < sizeof(u16_t); i++) {
- pmsg[i] = Xn[i] ^ pmsg[i];
- }
-
- j = 0;
- aad_len += sizeof(u16_t);
- while (aad_len > 16) {
- do {
- pmsg[i] = Xn[i] ^ aad[j];
- i++, j++;
- } while (i < 16);
-
- aad_len -= 16;
- i = 0;
-
- err = bt_encrypt_be(key, pmsg, Xn);
- if (err) {
- return err;
- }
- }
-
- for (; i < aad_len; i++, j++) {
- pmsg[i] = Xn[i] ^ aad[j];
- }
-
- for (i = aad_len; i < 16; i++) {
- pmsg[i] = Xn[i];
- }
-
- err = bt_encrypt_be(key, pmsg, Xn);
- if (err) {
- return err;
- }
- }
-
- last_blk = msg_len % 16;
- blk_cnt = (msg_len + 15) / 16;
- if (!last_blk) {
- last_blk = 16;
- }
-
- for (j = 0; j < blk_cnt; j++) {
- if (j + 1 == blk_cnt) {
- /* X_1 = e(AppKey, X_0 ^ Payload[0-15]) */
- for (i = 0; i < last_blk; i++) {
- pmsg[i] = Xn[i] ^ msg[(j * 16) + i];
- }
- for (i = last_blk; i < 16; i++) {
- pmsg[i] = Xn[i] ^ 0x00;
- }
-
- err = bt_encrypt_be(key, pmsg, Xn);
- if (err) {
- return err;
- }
-
- /* MIC = C_mic ^ X_1 */
- for (i = 0; i < sizeof(mic); i++) {
- mic[i] = cmic[i] ^ Xn[i];
- }
-
- /* C_1 = e(AppKey, 0x01 || nonce || 0x0001) */
- pmsg[0] = 0x01;
- memcpy(pmsg + 1, nonce, 13);
- sys_put_be16(j + 1, pmsg + 14);
-
- err = bt_encrypt_be(key, pmsg, cmsg);
- if (err) {
- return err;
- }
-
- /* Encrypted = Payload[0-15] ^ C_1 */
- for (i = 0; i < last_blk; i++) {
- out_msg[(j * 16) + i] =
- msg[(j * 16) + i] ^ cmsg[i];
- }
- } else {
- /* X_1 = e(AppKey, X_0 ^ Payload[0-15]) */
- for (i = 0; i < 16; i++) {
- pmsg[i] = Xn[i] ^ msg[(j * 16) + i];
- }
-
- err = bt_encrypt_be(key, pmsg, Xn);
- if (err) {
- return err;
- }
-
- /* C_1 = e(AppKey, 0x01 || nonce || 0x0001) */
- pmsg[0] = 0x01;
- memcpy(pmsg + 1, nonce, 13);
- sys_put_be16(j + 1, pmsg + 14);
-
- err = bt_encrypt_be(key, pmsg, cmsg);
- if (err) {
- return err;
- }
-
- /* Encrypted = Payload[0-15] ^ C_N */
- for (i = 0; i < 16; i++) {
- out_msg[(j * 16) + i] =
- msg[(j * 16) + i] ^ cmsg[i];
- }
-
- }
- }
-
- memcpy(out_msg + msg_len, mic, mic_size);
-
- return 0;
-}
-
-static void create_proxy_nonce(u8_t nonce[13], const u8_t *pdu,
- u32_t iv_index)
+static void create_proxy_nonce(uint8_t nonce[13], const uint8_t *pdu,
+ uint32_t iv_index)
{
/* Nonce Type */
nonce[0] = 0x03;
@@ -538,8 +220,8 @@ static void create_proxy_nonce(u8_t nonce[13], const u8_t *pdu,
sys_put_be32(iv_index, &nonce[9]);
}
-static void create_net_nonce(u8_t nonce[13], const u8_t *pdu,
- u32_t iv_index)
+static void create_net_nonce(uint8_t nonce[13], const uint8_t *pdu,
+ uint32_t iv_index)
{
/* Nonce Type */
nonce[0] = 0x00;
@@ -564,11 +246,11 @@ static void create_net_nonce(u8_t nonce[13], const u8_t *pdu,
sys_put_be32(iv_index, &nonce[9]);
}
-int bt_mesh_net_obfuscate(u8_t *pdu, u32_t iv_index,
- const u8_t privacy_key[16])
+int bt_mesh_net_obfuscate(uint8_t *pdu, uint32_t iv_index,
+ const uint8_t privacy_key[16])
{
- u8_t priv_rand[16] = { 0x00, 0x00, 0x00, 0x00, 0x00, };
- u8_t tmp[16];
+ uint8_t priv_rand[16] = { 0x00, 0x00, 0x00, 0x00, 0x00, };
+ uint8_t tmp[16];
int err, i;
BT_DBG("IVIndex %u, PrivacyKey %s", (unsigned) iv_index,
@@ -591,11 +273,11 @@ int bt_mesh_net_obfuscate(u8_t *pdu, u32_t iv_index,
return 0;
}
-int bt_mesh_net_encrypt(const u8_t key[16], struct os_mbuf *buf,
- u32_t iv_index, bool proxy)
+int bt_mesh_net_encrypt(const uint8_t key[16], struct os_mbuf *buf,
+ uint32_t iv_index, bool proxy)
{
- u8_t mic_len = NET_MIC_LEN(buf->om_data);
- u8_t nonce[13];
+ uint8_t mic_len = NET_MIC_LEN(buf->om_data);
+ uint8_t nonce[13];
int err;
BT_DBG("IVIndex %u EncKey %s mic_len %u", (unsigned) iv_index,
@@ -610,7 +292,7 @@ int bt_mesh_net_encrypt(const u8_t key[16], struct os_mbuf *buf,
BT_DBG("Nonce %s", bt_hex(nonce, 13));
- err = bt_mesh_ccm_encrypt(key, nonce, &buf->om_data[7], buf->om_len - 7,
+ err = bt_ccm_encrypt(key, nonce, &buf->om_data[7], buf->om_len - 7,
NULL, 0, &buf->om_data[7], mic_len);
if (!err) {
net_buf_simple_add(buf, mic_len);
@@ -619,11 +301,11 @@ int bt_mesh_net_encrypt(const u8_t key[16], struct os_mbuf *buf,
return err;
}
-int bt_mesh_net_decrypt(const u8_t key[16], struct os_mbuf *buf,
- u32_t iv_index, bool proxy)
+int bt_mesh_net_decrypt(const uint8_t key[16], struct os_mbuf *buf,
+ uint32_t iv_index, bool proxy)
{
- u8_t mic_len = NET_MIC_LEN(buf->om_data);
- u8_t nonce[13];
+ uint8_t mic_len = NET_MIC_LEN(buf->om_data);
+ uint8_t nonce[13];
BT_DBG("PDU (%u bytes) %s", buf->om_len, bt_hex(buf->om_data, buf->om_len));
BT_DBG("iv_index %u, key %s mic_len %u", (unsigned) iv_index,
@@ -639,118 +321,74 @@ int bt_mesh_net_decrypt(const u8_t key[16], struct os_mbuf *buf,
buf->om_len -= mic_len;
- return bt_mesh_ccm_decrypt(key, nonce, &buf->om_data[7], buf->om_len - 7,
+ return bt_ccm_decrypt(key, nonce, &buf->om_data[7], buf->om_len - 7,
NULL, 0, &buf->om_data[7], mic_len);
}
-static void create_app_nonce(u8_t nonce[13], bool dev_key, u8_t aszmic,
- u16_t src, u16_t dst, u32_t seq_num,
- u32_t iv_index)
+static void create_app_nonce(uint8_t nonce[13],
+ const struct bt_mesh_app_crypto_ctx *ctx)
{
- if (dev_key) {
+ if (ctx->dev_key) {
nonce[0] = 0x02;
} else {
nonce[0] = 0x01;
}
- sys_put_be32((seq_num | ((u32_t)aszmic << 31)), &nonce[1]);
+ sys_put_be32((ctx->seq_num | ((uint32_t)ctx->aszmic << 31)), &nonce[1]);
- sys_put_be16(src, &nonce[5]);
- sys_put_be16(dst, &nonce[7]);
+ sys_put_be16(ctx->src, &nonce[5]);
+ sys_put_be16(ctx->dst, &nonce[7]);
- sys_put_be32(iv_index, &nonce[9]);
+ sys_put_be32(ctx->iv_index, &nonce[9]);
}
-static int mesh_app_encrypt(const u8_t key[16], bool dev_key, u8_t aszmic,
- struct os_mbuf *buf, const u8_t *ad,
- u16_t src, u16_t dst, u32_t seq_num, u32_t iv_index)
+int bt_mesh_app_encrypt(const uint8_t key[16],
+ const struct bt_mesh_app_crypto_ctx *ctx,
+ struct os_mbuf *buf)
{
- u8_t nonce[13];
+ int err;
+ uint8_t nonce[13];
BT_DBG("AppKey %s", bt_hex(key, 16));
- BT_DBG("dev_key %u src 0x%04x dst 0x%04x", dev_key, src, dst);
- BT_DBG("seq_num 0x%08x iv_index 0x%08x", (unsigned) seq_num,
- (unsigned) iv_index);
+ BT_DBG("dev_key %u src 0x%04x dst 0x%04x", ctx->dev_key, ctx->src,
+ ctx->dst);
+ BT_DBG("seq_num 0x%08x iv_index 0x%08x", ctx->seq_num, ctx->iv_index);
BT_DBG("Clear: %s", bt_hex(buf->om_data, buf->om_len));
- create_app_nonce(nonce, dev_key, aszmic, src, dst, seq_num, iv_index);
+ create_app_nonce(nonce, ctx);
BT_DBG("Nonce %s", bt_hex(nonce, 13));
- return bt_mesh_ccm_encrypt(key, nonce, buf->om_data, buf->om_len, ad,
- ad ? 16 : 0, buf->om_data,
- APP_MIC_LEN(aszmic));
-}
+ err = bt_ccm_encrypt(key, nonce, buf->om_data, buf->om_len, ctx->ad,
+ ctx->ad ? 16 : 0, buf->om_data,
+ APP_MIC_LEN(ctx->aszmic));
-int bt_mesh_app_encrypt_in_place(const u8_t key[16], bool dev_key, u8_t aszmic,
- struct os_mbuf *buf, const u8_t *ad, u16_t src,
- u16_t dst, u32_t seq_num, u32_t iv_index)
-{
- int err;
-
- err = mesh_app_encrypt(key, dev_key, aszmic, buf, ad, src, dst,
- seq_num, iv_index);
if (!err) {
+ net_buf_simple_add(buf, APP_MIC_LEN(ctx->aszmic));
BT_DBG("Encr: %s", bt_hex(buf->om_data, buf->om_len));
}
return err;
}
-int bt_mesh_app_encrypt(const u8_t key[16], bool dev_key, u8_t aszmic,
- struct os_mbuf *buf, const u8_t *ad,
- u16_t src, u16_t dst, u32_t seq_num, u32_t iv_index)
+int bt_mesh_app_decrypt(const uint8_t key[16],
+ const struct bt_mesh_app_crypto_ctx *ctx,
+ struct os_mbuf *buf, struct os_mbuf *out)
{
+ uint8_t nonce[13];
int err;
- err = mesh_app_encrypt(key, dev_key, aszmic, buf, ad, src, dst,
- seq_num, iv_index);
-
- if (!err) {
- net_buf_simple_add(buf, APP_MIC_LEN(aszmic));
- BT_DBG("Encr: %s", bt_hex(buf->om_data, buf->om_len));
- }
-
- return err;
-}
-
-static int mesh_app_decrypt(const u8_t key[16], bool dev_key, u8_t aszmic,
- struct os_mbuf *buf, struct os_mbuf *out,
- const u8_t *ad, u16_t src, u16_t dst,
- u32_t seq_num, u32_t iv_index)
-{
- u8_t nonce[13];
-
BT_DBG("EncData (len %u) %s", buf->om_len,
bt_hex(buf->om_data, buf->om_len));
- create_app_nonce(nonce, dev_key, aszmic, src, dst, seq_num, iv_index);
+ create_app_nonce(nonce, ctx);
BT_DBG("AppKey %s", bt_hex(key, 16));
BT_DBG("Nonce %s", bt_hex(nonce, 13));
- return bt_mesh_ccm_decrypt(key, nonce, buf->om_data, buf->om_len, ad,
- ad ? 16 : 0, out->om_data,
- APP_MIC_LEN(aszmic));
-}
-
-int bt_mesh_app_decrypt_in_place(const u8_t key[16], bool dev_key, u8_t aszmic,
- struct os_mbuf *buf, const u8_t *ad, u16_t src,
- u16_t dst, u32_t seq_num, u32_t iv_index)
-{
- return mesh_app_decrypt(key, dev_key, aszmic, buf, buf,
- ad, src, dst, seq_num, iv_index);
-}
-
-int bt_mesh_app_decrypt(const u8_t key[16], bool dev_key, u8_t aszmic,
- struct os_mbuf *buf, struct os_mbuf *out,
- const u8_t *ad, u16_t src, u16_t dst, u32_t seq_num,
- u32_t iv_index)
-{
- int err;
-
- err = mesh_app_decrypt(key, dev_key, aszmic, buf, out,
- ad, src, dst, seq_num, iv_index);
+ err = bt_ccm_decrypt(key, nonce, buf->om_data, buf->om_len, ctx->ad,
+ ctx->ad ? 16 : 0, out->om_data,
+ APP_MIC_LEN(ctx->aszmic));
if (!err) {
net_buf_simple_add(out, buf->om_len);
}
@@ -759,7 +397,7 @@ int bt_mesh_app_decrypt(const u8_t key[16], bool dev_key, u8_t aszmic,
}
/* reversed, 8-bit, poly=0x07 */
-static const u8_t crc_table[256] = {
+static const uint8_t crc_table[256] = {
0x00, 0x91, 0xe3, 0x72, 0x07, 0x96, 0xe4, 0x75,
0x0e, 0x9f, 0xed, 0x7c, 0x09, 0x98, 0xea, 0x7b,
0x1c, 0x8d, 0xff, 0x6e, 0x1b, 0x8a, 0xf8, 0x69,
@@ -801,9 +439,9 @@ static const u8_t crc_table[256] = {
0xba, 0x2b, 0x59, 0xc8, 0xbd, 0x2c, 0x5e, 0xcf
};
-u8_t bt_mesh_fcs_calc(const u8_t *data, u8_t data_len)
+uint8_t bt_mesh_fcs_calc(const uint8_t *data, uint8_t data_len)
{
- u8_t fcs = 0xff;
+ uint8_t fcs = 0xff;
while (data_len--) {
fcs = crc_table[fcs ^ *data++];
@@ -814,11 +452,11 @@ u8_t bt_mesh_fcs_calc(const u8_t *data, u8_t data_len)
return 0xff - fcs;
}
-bool bt_mesh_fcs_check(struct os_mbuf *buf, u8_t received_fcs)
+bool bt_mesh_fcs_check(struct os_mbuf *buf, uint8_t received_fcs)
{
- const u8_t *data = buf->om_data;
- u16_t data_len = buf->om_len;
- u8_t fcs = 0xff;
+ const uint8_t *data = buf->om_data;
+ uint16_t data_len = buf->om_len;
+ uint8_t fcs = 0xff;
while (data_len--) {
fcs = crc_table[fcs ^ *data++];
@@ -827,10 +465,10 @@ bool bt_mesh_fcs_check(struct os_mbuf *buf, u8_t received_fcs)
return crc_table[fcs ^ received_fcs] == 0xcf;
}
-int bt_mesh_virtual_addr(const u8_t virtual_label[16], u16_t *addr)
+int bt_mesh_virtual_addr(const uint8_t virtual_label[16], uint16_t *addr)
{
- u8_t salt[16];
- u8_t tmp[16];
+ uint8_t salt[16];
+ uint8_t tmp[16];
int err;
err = bt_mesh_s1("vtad", salt);
@@ -848,21 +486,21 @@ int bt_mesh_virtual_addr(const u8_t virtual_label[16], u16_t *addr)
return 0;
}
-int bt_mesh_prov_conf_salt(const u8_t conf_inputs[145], u8_t salt[16])
+int bt_mesh_prov_conf_salt(const uint8_t conf_inputs[145], uint8_t salt[16])
{
- const u8_t conf_salt_key[16] = { 0 };
+ const uint8_t conf_salt_key[16] = { 0 };
return bt_mesh_aes_cmac_one(conf_salt_key, conf_inputs, 145, salt);
}
-int bt_mesh_prov_conf_key(const u8_t dhkey[32], const u8_t conf_salt[16],
- u8_t conf_key[16])
+int bt_mesh_prov_conf_key(const uint8_t dhkey[32], const uint8_t conf_salt[16],
+ uint8_t conf_key[16])
{
return bt_mesh_k1(dhkey, 32, conf_salt, "prck", conf_key);
}
-int bt_mesh_prov_conf(const u8_t conf_key[16], const u8_t rand[16],
- const u8_t auth[16], u8_t conf[16])
+int bt_mesh_prov_conf(const uint8_t conf_key[16], const uint8_t rand[16],
+ const uint8_t auth[16], uint8_t conf[16])
{
struct bt_mesh_sg sg[] = { { rand, 16 }, { auth, 16 } };
@@ -873,23 +511,23 @@ int bt_mesh_prov_conf(const u8_t conf_key[16], const u8_t rand[16],
return bt_mesh_aes_cmac(conf_key, sg, ARRAY_SIZE(sg), conf);
}
-int bt_mesh_prov_decrypt(const u8_t key[16], u8_t nonce[13],
- const u8_t data[25 + 8], u8_t out[25])
+int bt_mesh_prov_decrypt(const uint8_t key[16], uint8_t nonce[13],
+ const uint8_t data[25 + 8], uint8_t out[25])
{
- return bt_mesh_ccm_decrypt(key, nonce, data, 25, NULL, 0, out, 8);
+ return bt_ccm_decrypt(key, nonce, data, 25, NULL, 0, out, 8);
}
-int bt_mesh_prov_encrypt(const u8_t key[16], u8_t nonce[13],
- const u8_t data[25], u8_t out[25 + 8])
+int bt_mesh_prov_encrypt(const uint8_t key[16], uint8_t nonce[13],
+ const uint8_t data[25], uint8_t out[25 + 8])
{
- return bt_mesh_ccm_encrypt(key, nonce, data, 25, NULL, 0, out, 8);
+ return bt_ccm_encrypt(key, nonce, data, 25, NULL, 0, out, 8);
}
-int bt_mesh_beacon_auth(const u8_t beacon_key[16], u8_t flags,
- const u8_t net_id[8], u32_t iv_index,
- u8_t auth[8])
+int bt_mesh_beacon_auth(const uint8_t beacon_key[16], uint8_t flags,
+ const uint8_t net_id[8], uint32_t iv_index,
+ uint8_t auth[8])
{
- u8_t msg[13], tmp[16];
+ uint8_t msg[13], tmp[16];
int err;
BT_DBG("BeaconKey %s", bt_hex(beacon_key, 16));
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/crypto.h b/src/libs/mynewt-nimble/nimble/host/mesh/src/crypto.h
index 745cf324..637d13e7 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/src/crypto.h
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/crypto.h
@@ -15,81 +15,81 @@ struct bt_mesh_sg {
size_t len;
};
-int bt_mesh_aes_cmac(const u8_t key[16], struct bt_mesh_sg *sg,
- size_t sg_len, u8_t mac[16]);
+int bt_mesh_aes_cmac(const uint8_t key[16], struct bt_mesh_sg *sg,
+ size_t sg_len, uint8_t mac[16]);
-static inline int bt_mesh_aes_cmac_one(const u8_t key[16], const void *m,
- size_t len, u8_t mac[16])
+static inline int bt_mesh_aes_cmac_one(const uint8_t key[16], const void *m,
+ size_t len, uint8_t mac[16])
{
struct bt_mesh_sg sg = { m, len };
return bt_mesh_aes_cmac(key, &sg, 1, mac);
}
-static inline bool bt_mesh_s1(const char *m, u8_t salt[16])
+static inline bool bt_mesh_s1(const char *m, uint8_t salt[16])
{
- const u8_t zero[16] = { 0 };
+ const uint8_t zero[16] = { 0 };
return bt_mesh_aes_cmac_one(zero, m, strlen(m), salt);
}
-int bt_mesh_k1(const u8_t *ikm, size_t ikm_len, const u8_t salt[16],
- const char *info, u8_t okm[16]);
+int bt_mesh_k1(const uint8_t *ikm, size_t ikm_len, const uint8_t salt[16],
+ const char *info, uint8_t okm[16]);
#define bt_mesh_k1_str(ikm, ikm_len, salt_str, info, okm) \
({ \
- const u8_t salt[16] = salt_str; \
+ const uint8_t salt[16] = salt_str; \
bt_mesh_k1(ikm, ikm_len, salt, info, okm); \
})
-int bt_mesh_k2(const u8_t n[16], const u8_t *p, size_t p_len,
- u8_t net_id[1], u8_t enc_key[16], u8_t priv_key[16]);
+int bt_mesh_k2(const uint8_t n[16], const uint8_t *p, size_t p_len,
+ uint8_t net_id[1], uint8_t enc_key[16], uint8_t priv_key[16]);
-int bt_mesh_k3(const u8_t n[16], u8_t out[8]);
+int bt_mesh_k3(const uint8_t n[16], uint8_t out[8]);
-int bt_mesh_k4(const u8_t n[16], u8_t out[1]);
+int bt_mesh_k4(const uint8_t n[16], uint8_t out[1]);
-int bt_mesh_id128(const u8_t n[16], const char *s, u8_t out[16]);
+int bt_mesh_id128(const uint8_t n[16], const char *s, uint8_t out[16]);
-static inline int bt_mesh_id_resolving_key(const u8_t net_key[16],
- u8_t resolving_key[16])
+static inline int bt_mesh_id_resolving_key(const uint8_t net_key[16],
+ uint8_t resolving_key[16])
{
return bt_mesh_k1_str(net_key, 16, "smbt", "smbi", resolving_key);
}
-static inline int bt_mesh_identity_key(const u8_t net_key[16],
- u8_t identity_key[16])
+static inline int bt_mesh_identity_key(const uint8_t net_key[16],
+ uint8_t identity_key[16])
{
return bt_mesh_id128(net_key, "nkik", identity_key);
}
-static inline int bt_mesh_beacon_key(const u8_t net_key[16],
- u8_t beacon_key[16])
+static inline int bt_mesh_beacon_key(const uint8_t net_key[16],
+ uint8_t beacon_key[16])
{
return bt_mesh_id128(net_key, "nkbk", beacon_key);
}
-int bt_mesh_beacon_auth(const u8_t beacon_key[16], u8_t flags,
- const u8_t net_id[16], u32_t iv_index,
- u8_t auth[8]);
+int bt_mesh_beacon_auth(const uint8_t beacon_key[16], uint8_t flags,
+ const uint8_t net_id[16], uint32_t iv_index,
+ uint8_t auth[8]);
-static inline int bt_mesh_app_id(const u8_t app_key[16], u8_t app_id[1])
+static inline int bt_mesh_app_id(const uint8_t app_key[16], uint8_t app_id[1])
{
return bt_mesh_k4(app_key, app_id);
}
-static inline int bt_mesh_session_key(const u8_t dhkey[32],
- const u8_t prov_salt[16],
- u8_t session_key[16])
+static inline int bt_mesh_session_key(const uint8_t dhkey[32],
+ const uint8_t prov_salt[16],
+ uint8_t session_key[16])
{
return bt_mesh_k1(dhkey, 32, prov_salt, "prsk", session_key);
}
-static inline int bt_mesh_prov_nonce(const u8_t dhkey[32],
- const u8_t prov_salt[16],
- u8_t nonce[13])
+static inline int bt_mesh_prov_nonce(const uint8_t dhkey[32],
+ const uint8_t prov_salt[16],
+ uint8_t nonce[13])
{
- u8_t tmp[16];
+ uint8_t tmp[16];
int err;
err = bt_mesh_k1(dhkey, 32, prov_salt, "prsn", tmp);
@@ -100,19 +100,19 @@ static inline int bt_mesh_prov_nonce(const u8_t dhkey[32],
return err;
}
-static inline int bt_mesh_dev_key(const u8_t dhkey[32],
- const u8_t prov_salt[16],
- u8_t dev_key[16])
+static inline int bt_mesh_dev_key(const uint8_t dhkey[32],
+ const uint8_t prov_salt[16],
+ uint8_t dev_key[16])
{
return bt_mesh_k1(dhkey, 32, prov_salt, "prdk", dev_key);
}
-static inline int bt_mesh_prov_salt(const u8_t conf_salt[16],
- const u8_t prov_rand[16],
- const u8_t dev_rand[16],
- u8_t prov_salt[16])
+static inline int bt_mesh_prov_salt(const uint8_t conf_salt[16],
+ const uint8_t prov_rand[16],
+ const uint8_t dev_rand[16],
+ uint8_t prov_salt[16])
{
- const u8_t prov_salt_key[16] = { 0 };
+ const uint8_t prov_salt_key[16] = { 0 };
struct bt_mesh_sg sg[] = {
{ conf_salt, 16 },
{ prov_rand, 16 },
@@ -122,49 +122,50 @@ static inline int bt_mesh_prov_salt(const u8_t conf_salt[16],
return bt_mesh_aes_cmac(prov_salt_key, sg, ARRAY_SIZE(sg), prov_salt);
}
-int bt_mesh_net_obfuscate(u8_t *pdu, u32_t iv_index,
- const u8_t privacy_key[16]);
+int bt_mesh_net_obfuscate(uint8_t *pdu, uint32_t iv_index,
+ const uint8_t privacy_key[16]);
-int bt_mesh_net_encrypt(const u8_t key[16], struct os_mbuf *buf,
- u32_t iv_index, bool proxy);
+int bt_mesh_net_encrypt(const uint8_t key[16], struct os_mbuf *buf,
+ uint32_t iv_index, bool proxy);
-int bt_mesh_net_decrypt(const u8_t key[16], struct os_mbuf *buf,
- u32_t iv_index, bool proxy);
+int bt_mesh_net_decrypt(const uint8_t key[16], struct os_mbuf *buf,
+ uint32_t iv_index, bool proxy);
-int bt_mesh_app_encrypt_in_place(const u8_t key[16], bool dev_key, u8_t aszmic,
- struct os_mbuf*buf, const u8_t *ad, u16_t src,
- u16_t dst, u32_t seq_num, u32_t iv_index);
-
-int bt_mesh_app_encrypt(const u8_t key[16], bool dev_key, u8_t aszmic,
- struct os_mbuf*buf, const u8_t *ad,
- u16_t src, u16_t dst, u32_t seq_num, u32_t iv_index);
+struct bt_mesh_app_crypto_ctx {
+ bool dev_key;
+ uint8_t aszmic;
+ uint16_t src;
+ uint16_t dst;
+ uint32_t seq_num;
+ uint32_t iv_index;
+ const uint8_t *ad;
+};
-int bt_mesh_app_decrypt_in_place(const u8_t key[16], bool dev_key, u8_t aszmic,
- struct os_mbuf *buf, const u8_t *ad, u16_t src,
- u16_t dst, u32_t seq_num, u32_t iv_index);
+int bt_mesh_app_encrypt(const uint8_t key[16],
+ const struct bt_mesh_app_crypto_ctx *ctx,
+ struct os_mbuf *buf);
-int bt_mesh_app_decrypt(const u8_t key[16], bool dev_key, u8_t aszmic,
- struct os_mbuf*buf, struct os_mbuf*out,
- const u8_t *ad, u16_t src, u16_t dst, u32_t seq_num,
- u32_t iv_index);
+int bt_mesh_app_decrypt(const uint8_t key[16],
+ const struct bt_mesh_app_crypto_ctx *ctx,
+ struct os_mbuf *buf, struct os_mbuf *out);
-u8_t bt_mesh_fcs_calc(const u8_t *data, u8_t data_len);
+uint8_t bt_mesh_fcs_calc(const uint8_t *data, uint8_t data_len);
-bool bt_mesh_fcs_check(struct os_mbuf *buf, u8_t received_fcs);
+bool bt_mesh_fcs_check(struct os_mbuf *buf, uint8_t received_fcs);
-int bt_mesh_virtual_addr(const u8_t virtual_label[16], u16_t *addr);
+int bt_mesh_virtual_addr(const uint8_t virtual_label[16], uint16_t *addr);
-int bt_mesh_prov_conf_salt(const u8_t conf_inputs[145], u8_t salt[16]);
+int bt_mesh_prov_conf_salt(const uint8_t conf_inputs[145], uint8_t salt[16]);
-int bt_mesh_prov_conf_key(const u8_t dhkey[32], const u8_t conf_salt[16],
- u8_t conf_key[16]);
+int bt_mesh_prov_conf_key(const uint8_t dhkey[32], const uint8_t conf_salt[16],
+ uint8_t conf_key[16]);
-int bt_mesh_prov_conf(const u8_t conf_key[16], const u8_t rand[16],
- const u8_t auth[16], u8_t conf[16]);
+int bt_mesh_prov_conf(const uint8_t conf_key[16], const uint8_t rand[16],
+ const uint8_t auth[16], uint8_t conf[16]);
-int bt_mesh_prov_decrypt(const u8_t key[16], u8_t nonce[13],
- const u8_t data[25 + 8], u8_t out[25]);
+int bt_mesh_prov_decrypt(const uint8_t key[16], uint8_t nonce[13],
+ const uint8_t data[25 + 8], uint8_t out[25]);
-int bt_mesh_prov_encrypt(const u8_t key[16], u8_t nonce[13],
- const u8_t data[25], u8_t out[25 + 8]);
+int bt_mesh_prov_encrypt(const uint8_t key[16], uint8_t nonce[13],
+ const uint8_t data[25], uint8_t out[25 + 8]);
#endif
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/foundation.h b/src/libs/mynewt-nimble/nimble/host/mesh/src/foundation.h
index ee615ae9..012afbbb 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/src/foundation.h
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/foundation.h
@@ -115,57 +115,23 @@
#define STATUS_UNSPECIFIED 0x10
#define STATUS_INVALID_BINDING 0x11
-enum {
- BT_MESH_VA_CHANGED, /* Label information changed */
-};
-
-struct label {
- u16_t ref;
- u16_t addr;
- u8_t uuid[16];
- atomic_t flags[1];
-};
-
void bt_mesh_cfg_reset(void);
-void bt_mesh_heartbeat(u16_t src, u16_t dst, u8_t hops, u16_t feat);
-
-void bt_mesh_attention(struct bt_mesh_model *model, u8_t time);
-
-struct label *get_label(u16_t index);
-
-u8_t *bt_mesh_label_uuid_get(u16_t addr);
-
-struct bt_mesh_hb_pub *bt_mesh_hb_pub_get(void);
-void bt_mesh_hb_pub_disable(void);
-struct bt_mesh_cfg_srv *bt_mesh_cfg_get(void);
-
-u8_t bt_mesh_net_transmit_get(void);
-u8_t bt_mesh_relay_get(void);
-u8_t bt_mesh_friend_get(void);
-u8_t bt_mesh_relay_retransmit_get(void);
-u8_t bt_mesh_beacon_get(void);
-u8_t bt_mesh_gatt_proxy_get(void);
-u8_t bt_mesh_default_ttl_get(void);
-
-void bt_mesh_subnet_del(struct bt_mesh_subnet *sub, bool store);
-
-struct bt_mesh_app_key *bt_mesh_app_key_alloc(u16_t app_idx);
-void bt_mesh_app_key_del(struct bt_mesh_app_key *key, bool store);
+void bt_mesh_attention(struct bt_mesh_model *model, uint8_t time);
static inline void key_idx_pack(struct os_mbuf *buf,
- u16_t idx1, u16_t idx2)
+ uint16_t idx1, uint16_t idx2)
{
net_buf_simple_add_le16(buf, idx1 | ((idx2 & 0x00f) << 12));
net_buf_simple_add_u8(buf, idx2 >> 4);
}
static inline void key_idx_unpack(struct os_mbuf *buf,
- u16_t *idx1, u16_t *idx2)
+ uint16_t *idx1, uint16_t *idx2)
{
*idx1 = sys_get_le16(&buf->om_data[0]) & 0xfff;
*idx2 = sys_get_le16(&buf->om_data[1]) >> 4;
- net_buf_simple_pull(buf, 3);
+ net_buf_simple_pull_mem(buf, 3);
}
#endif
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/friend.c b/src/libs/mynewt-nimble/nimble/host/mesh/src/friend.c
index 9056a865..9a83c87f 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/src/friend.c
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/friend.c
@@ -7,7 +7,7 @@
*/
#include "syscfg/syscfg.h"
-#define MESH_LOG_MODULE BLE_MESH_CRYPTO_LOG
+#define MESH_LOG_MODULE BLE_MESH_FRIEND_LOG
#if MYNEWT_VAL(BLE_MESH_FRIEND)
@@ -21,10 +21,12 @@
#include "crypto.h"
#include "adv.h"
#include "net.h"
+#include "app_keys.h"
#include "transport.h"
#include "access.h"
#include "foundation.h"
#include "friend.h"
+#include "subnet.h"
/* We reserve one extra buffer for each friendship, since we need to be able
* to resend the last sent PDU, which sits separately outside of the queue.
@@ -48,20 +50,20 @@ static struct os_mempool friend_buf_mempool;
#define FRIEND_XMIT BT_MESH_TRANSMIT(0, 20)
struct friend_pdu_info {
- u16_t src;
- u16_t dst;
+ uint16_t src;
+ uint16_t dst;
- u8_t seq[3];
+ uint8_t seq[3];
- u8_t ttl:7,
+ uint8_t ttl:7,
ctl:1;
- u32_t iv_index;
+ uint32_t iv_index;
};
static struct friend_adv {
struct bt_mesh_adv adv;
- u16_t app_idx;
+ uint16_t app_idx;
} adv_pool[FRIEND_BUF_COUNT];
static struct bt_mesh_adv *adv_alloc(int id)
@@ -70,7 +72,7 @@ static struct bt_mesh_adv *adv_alloc(int id)
return &adv_pool[id].adv;
}
-static bool is_lpn_unicast(struct bt_mesh_friend *frnd, u16_t addr)
+static bool is_lpn_unicast(struct bt_mesh_friend *frnd, uint16_t addr)
{
if (frnd->lpn == BT_MESH_ADDR_UNASSIGNED) {
return false;
@@ -79,7 +81,7 @@ static bool is_lpn_unicast(struct bt_mesh_friend *frnd, u16_t addr)
return (addr >= frnd->lpn && addr < (frnd->lpn + frnd->num_elem));
}
-struct bt_mesh_friend *bt_mesh_friend_find(u16_t net_idx, u16_t lpn_addr,
+struct bt_mesh_friend *bt_mesh_friend_find(uint16_t net_idx, uint16_t lpn_addr,
bool valid, bool established)
{
int i;
@@ -89,7 +91,7 @@ struct bt_mesh_friend *bt_mesh_friend_find(u16_t net_idx, u16_t lpn_addr,
for (i = 0; i < ARRAY_SIZE(bt_mesh.frnd); i++) {
struct bt_mesh_friend *frnd = &bt_mesh.frnd[i];
- if (valid && !frnd->valid) {
+ if (valid && !frnd->subnet) {
continue;
}
@@ -97,7 +99,8 @@ struct bt_mesh_friend *bt_mesh_friend_find(u16_t net_idx, u16_t lpn_addr,
continue;
}
- if (net_idx != BT_MESH_KEY_ANY && frnd->net_idx != net_idx) {
+ if (net_idx != BT_MESH_KEY_ANY &&
+ (!frnd->subnet || frnd->subnet->net_idx != net_idx)) {
continue;
}
@@ -109,11 +112,18 @@ struct bt_mesh_friend *bt_mesh_friend_find(u16_t net_idx, u16_t lpn_addr,
return NULL;
}
-static void purge_buffers(struct net_buf_slist_t *list)
+static int friend_cred_create(struct bt_mesh_friend *frnd, uint8_t idx)
{
- struct os_mbuf *buf;
+ return bt_mesh_friend_cred_create(&frnd->cred[idx], frnd->lpn,
+ bt_mesh_primary_addr(),
+ frnd->lpn_counter, frnd->counter,
+ frnd->subnet->keys[idx].net);
+}
+static void purge_buffers(struct net_buf_slist_t *list)
+{
while (!net_buf_slist_is_empty(list)) {
+ struct os_mbuf *buf;
buf = (void *)net_buf_slist_get(list);
BT_MESH_ADV(buf)->flags &= ~NET_BUF_FRAGS;
net_buf_unref(buf);
@@ -125,10 +135,10 @@ static void purge_buffers(struct net_buf_slist_t *list)
* like the PTS, where the receiver might not have sufficiently compensated
* for internal latencies required to start scanning.
*/
-static s32_t recv_delay(struct bt_mesh_friend *frnd)
+static int32_t recv_delay(struct bt_mesh_friend *frnd)
{
#if CONFIG_BT_MESH_FRIEND_RECV_WIN > 50
- return (s32_t)frnd->recv_delay + (CONFIG_BT_MESH_FRIEND_RECV_WIN / 5);
+ return (int32_t)frnd->recv_delay + (CONFIG_BT_MESH_FRIEND_RECV_WIN / 5);
#else
return frnd->recv_delay;
#endif
@@ -142,7 +152,7 @@ static void friend_clear(struct bt_mesh_friend *frnd)
k_delayed_work_cancel(&frnd->timer);
- friend_cred_del(frnd->net_idx, frnd->lpn);
+ memset(frnd->cred, 0, sizeof(frnd->cred));
if (frnd->last) {
/* Cancel the sending if necessary */
@@ -163,7 +173,8 @@ static void friend_clear(struct bt_mesh_friend *frnd)
seg->seg_count = 0U;
}
- frnd->valid = 0;
+ frnd->counter++;
+ frnd->subnet = NULL;
frnd->established = 0;
frnd->pending_buf = 0;
frnd->fsn = 0;
@@ -172,26 +183,26 @@ static void friend_clear(struct bt_mesh_friend *frnd)
memset(frnd->sub_list, 0, sizeof(frnd->sub_list));
}
-void bt_mesh_friend_clear_net_idx(u16_t net_idx)
+void bt_mesh_friends_clear(void)
{
int i;
- BT_DBG("net_idx 0x%04x", net_idx);
+ BT_DBG("");
for (i = 0; i < ARRAY_SIZE(bt_mesh.frnd); i++) {
struct bt_mesh_friend *frnd = &bt_mesh.frnd[i];
- if (frnd->net_idx == BT_MESH_KEY_UNUSED) {
+ if (!frnd->subnet) {
continue;
}
- if (net_idx == BT_MESH_KEY_ANY || frnd->net_idx == net_idx) {
- friend_clear(frnd);
- }
+ friend_clear(frnd);
}
}
-void bt_mesh_friend_sec_update(u16_t net_idx)
+static void enqueue_update(struct bt_mesh_friend *frnd, uint8_t md);
+
+void bt_mesh_friend_sec_update(uint16_t net_idx)
{
int i;
@@ -200,12 +211,13 @@ void bt_mesh_friend_sec_update(u16_t net_idx)
for (i = 0; i < ARRAY_SIZE(bt_mesh.frnd); i++) {
struct bt_mesh_friend *frnd = &bt_mesh.frnd[i];
- if (frnd->net_idx == BT_MESH_KEY_UNUSED) {
+ if (!frnd->subnet) {
continue;
}
- if (net_idx == BT_MESH_KEY_ANY || frnd->net_idx == net_idx) {
- frnd->sec_update = 1;
+ if (net_idx == BT_MESH_KEY_ANY ||
+ frnd->subnet->net_idx == net_idx) {
+ enqueue_update(frnd, 0x00);
}
}
}
@@ -214,7 +226,7 @@ int bt_mesh_friend_clear(struct bt_mesh_net_rx *rx, struct os_mbuf *buf)
{
struct bt_mesh_ctl_friend_clear *msg = (void *)buf->om_data;
struct bt_mesh_friend *frnd;
- u16_t lpn_addr, lpn_counter;
+ uint16_t lpn_addr, lpn_counter;
struct bt_mesh_net_tx tx = {
.sub = rx->sub,
.ctx = &rx->ctx,
@@ -257,14 +269,14 @@ int bt_mesh_friend_clear(struct bt_mesh_net_rx *rx, struct os_mbuf *buf)
cfm.lpn_counter = msg->lpn_counter;
bt_mesh_ctl_send(&tx, TRANS_CTL_OP_FRIEND_CLEAR_CFM, &cfm,
- sizeof(cfm), NULL, NULL, NULL);
+ sizeof(cfm), NULL, NULL);
friend_clear(frnd);
return 0;
}
-static void friend_sub_add(struct bt_mesh_friend *frnd, u16_t addr)
+static void friend_sub_add(struct bt_mesh_friend *frnd, uint16_t addr)
{
int i;
@@ -278,7 +290,7 @@ static void friend_sub_add(struct bt_mesh_friend *frnd, u16_t addr)
BT_WARN("No space in friend subscription list");
}
-static void friend_sub_rem(struct bt_mesh_friend *frnd, u16_t addr)
+static void friend_sub_rem(struct bt_mesh_friend *frnd, uint16_t addr)
{
int i;
@@ -322,38 +334,41 @@ static struct os_mbuf *create_friend_pdu(struct bt_mesh_friend *frnd,
}
struct unseg_app_sdu_meta {
- struct bt_mesh_net_rx net;
- const u8_t *key;
+ struct bt_mesh_app_crypto_ctx crypto;
+ const uint8_t *key;
struct bt_mesh_subnet *subnet;
- bool is_dev_key;
- u8_t aid;
- u8_t *ad;
+ uint8_t aid;
};
static int unseg_app_sdu_unpack(struct bt_mesh_friend *frnd,
struct os_mbuf *buf,
struct unseg_app_sdu_meta *meta)
{
- u16_t app_idx = FRIEND_ADV(buf)->app_idx;
+ uint16_t app_idx = FRIEND_ADV(buf)->app_idx;
+ struct bt_mesh_net_rx net;
int err;
- meta->subnet = bt_mesh_subnet_get(frnd->net_idx);
- meta->is_dev_key = (app_idx == BT_MESH_KEY_DEV);
- meta->is_dev_key = BT_MESH_IS_DEV_KEY(app_idx);
- bt_mesh_net_header_parse(buf, &meta->net);
- err = bt_mesh_app_key_get(meta->subnet, app_idx, meta->net.ctx.recv_dst,
- &meta->key, &meta->aid);
+ meta->subnet = frnd->subnet;
+ bt_mesh_net_header_parse(buf, &net);
+ err = bt_mesh_keys_resolve(&net.ctx, &net.sub, &meta->key, &meta->aid);
if (err) {
return err;
}
- if (BT_MESH_ADDR_IS_VIRTUAL(meta->net.ctx.recv_dst)) {
- meta->ad = bt_mesh_label_uuid_get(meta->net.ctx.recv_dst);
- if (!meta->ad) {
+ meta->crypto.src = net.ctx.addr;
+ meta->crypto.dst = net.ctx.recv_dst;
+ meta->crypto.iv_index = BT_MESH_NET_IVI_TX;
+ meta->crypto.dev_key = BT_MESH_IS_DEV_KEY(app_idx);
+ meta->crypto.seq_num = net.seq;
+ meta->crypto.aszmic = 0;
+
+ if (BT_MESH_ADDR_IS_VIRTUAL(meta->crypto.dst)) {
+ meta->crypto.ad = bt_mesh_va_label_get(meta->crypto.dst);
+ if (!meta->crypto.ad) {
return -ENOENT;
}
} else {
- meta->ad = NULL;
+ meta->crypto.ad = NULL;
}
return 0;
@@ -372,12 +387,10 @@ static int unseg_app_sdu_decrypt(struct bt_mesh_friend *frnd,
net_buf_simple_pull_mem(buf, 10);
buf->om_len -= 4;
- err = bt_mesh_app_decrypt_in_place(meta->key, meta->is_dev_key,
- 0, buf, meta->ad, meta->net.ctx.addr,
- meta->net.ctx.recv_dst, meta->net.seq,
- BT_MESH_NET_IVI_TX);
+ err = bt_mesh_app_decrypt(meta->key, &meta->crypto, buf, buf);
net_buf_simple_restore(buf, &state);
+ net_buf_unref(buf);
return err;
}
@@ -394,10 +407,7 @@ static int unseg_app_sdu_encrypt(struct bt_mesh_friend *frnd,
net_buf_simple_pull_mem(buf, 10);
buf->om_len -= 4;
- err = bt_mesh_app_encrypt_in_place(meta->key, meta->is_dev_key, 0, buf,
- meta->ad, meta->net.ctx.addr,
- meta->net.ctx.recv_dst, bt_mesh.seq,
- BT_MESH_NET_IVI_TX);
+ err = bt_mesh_app_encrypt(meta->key, &meta->crypto, buf);
net_buf_simple_restore(buf, &state);
return err;
@@ -423,7 +433,7 @@ static int unseg_app_sdu_prepare(struct bt_mesh_friend *frnd,
/* No need to reencrypt the message if the sequence number is
* unchanged.
*/
- if (meta.net.seq == bt_mesh.seq) {
+ if (meta.crypto.seq_num == bt_mesh.seq) {
return 0;
}
@@ -444,28 +454,22 @@ static int unseg_app_sdu_prepare(struct bt_mesh_friend *frnd,
static int encrypt_friend_pdu(struct bt_mesh_friend *frnd, struct os_mbuf *buf,
bool master_cred)
{
- struct bt_mesh_subnet *sub = bt_mesh_subnet_get(frnd->net_idx);
- const u8_t *enc, *priv;
- u32_t iv_index;
- u16_t src;
- u8_t nid;
+ const struct bt_mesh_net_cred *cred;
+ uint32_t iv_index;
+ uint16_t src;
int err;
if (master_cred) {
- enc = sub->keys[sub->kr_flag].enc;
- priv = sub->keys[sub->kr_flag].privacy;
- nid = sub->keys[sub->kr_flag].nid;
+ cred = &frnd->subnet->keys[SUBNET_KEY_TX_IDX(frnd->subnet)]
+ .msg;
} else {
- if (friend_cred_get(sub, frnd->lpn, &nid, &enc, &priv)) {
- BT_ERR("friend_cred_get failed");
- return -ENOENT;
- }
+ cred = &frnd->cred[SUBNET_KEY_TX_IDX(frnd->subnet)];
}
src = sys_get_be16(&buf->om_data[5]);
if (bt_mesh_elem_find(src)) {
- u32_t seq;
+ uint32_t seq;
if (FRIEND_ADV(buf)->app_idx != BT_MESH_KEY_UNUSED) {
err = unseg_app_sdu_prepare(frnd, buf);
@@ -475,25 +479,23 @@ static int encrypt_friend_pdu(struct bt_mesh_friend *frnd, struct os_mbuf *buf,
}
seq = bt_mesh_next_seq();
- buf->om_data[2] = seq >> 16;
- buf->om_data[3] = seq >> 8;
- buf->om_data[4] = seq;
+ sys_put_be24(seq, &buf->om_data[2]);
iv_index = BT_MESH_NET_IVI_TX;
FRIEND_ADV(buf)->app_idx = BT_MESH_KEY_UNUSED;
} else {
- u8_t ivi = (buf->om_data[0] >> 7);
+ uint8_t ivi = (buf->om_data[0] >> 7);
iv_index = (bt_mesh.iv_index - ((bt_mesh.iv_index & 1) != ivi));
}
- buf->om_data[0] = (nid | (iv_index & 1) << 7);
+ buf->om_data[0] = (cred->nid | (iv_index & 1) << 7);
- if (bt_mesh_net_encrypt(enc, buf, iv_index, false)) {
+ if (bt_mesh_net_encrypt(cred->enc, buf, iv_index, false)) {
BT_ERR("Encrypting failed");
return -EINVAL;
}
- if (bt_mesh_net_obfuscate(buf->om_data, iv_index, priv)) {
+ if (bt_mesh_net_obfuscate(buf->om_data, iv_index, cred->privacy)) {
BT_ERR("Obfuscating failed");
return -EINVAL;
}
@@ -502,7 +504,7 @@ static int encrypt_friend_pdu(struct bt_mesh_friend *frnd, struct os_mbuf *buf,
}
static struct os_mbuf *encode_friend_ctl(struct bt_mesh_friend *frnd,
- u8_t ctl_op,
+ uint8_t ctl_op,
struct os_mbuf *sdu)
{
struct friend_pdu_info info;
@@ -524,21 +526,20 @@ static struct os_mbuf *encode_friend_ctl(struct bt_mesh_friend *frnd,
return create_friend_pdu(frnd, &info, sdu);
}
-static struct os_mbuf *encode_update(struct bt_mesh_friend *frnd, u8_t md)
+static struct os_mbuf *encode_update(struct bt_mesh_friend *frnd, uint8_t md)
{
struct bt_mesh_ctl_friend_update *upd;
struct os_mbuf *sdu = NET_BUF_SIMPLE(1 + sizeof(*upd));
- struct bt_mesh_subnet *sub = bt_mesh_subnet_get(frnd->net_idx);
struct os_mbuf *buf;
- __ASSERT_NO_MSG(sub != NULL);
+ __ASSERT_NO_MSG(frnd->subnet);
BT_DBG("lpn 0x%04x md 0x%02x", frnd->lpn, md);
net_buf_simple_init(sdu, 1);
upd = net_buf_simple_add(sdu, sizeof(*upd));
- upd->flags = bt_mesh_net_flags(sub);
+ upd->flags = bt_mesh_net_flags(frnd->subnet);
upd->iv_index = sys_cpu_to_be32(bt_mesh.iv_index);
upd->md = md;
@@ -548,7 +549,7 @@ static struct os_mbuf *encode_update(struct bt_mesh_friend *frnd, u8_t md)
return buf;
}
-static void enqueue_sub_cfm(struct bt_mesh_friend *frnd, u8_t xact)
+static void enqueue_sub_cfm(struct bt_mesh_friend *frnd, uint8_t xact)
{
struct bt_mesh_ctl_friend_sub_confirm *cfm;
struct os_mbuf *sdu = NET_BUF_SIMPLE(1 + sizeof(*cfm));
@@ -585,16 +586,18 @@ done:
static void friend_recv_delay(struct bt_mesh_friend *frnd)
{
+ int32_t delay = recv_delay(frnd);
+
frnd->pending_req = 1;
- k_delayed_work_submit(&frnd->timer, recv_delay(frnd));
- BT_DBG("Waiting RecvDelay of %d ms", (int) recv_delay(frnd));
+ k_delayed_work_submit(&frnd->timer, K_MSEC(delay));
+ BT_DBG("Waiting RecvDelay of %d ms", delay);
}
int bt_mesh_friend_sub_add(struct bt_mesh_net_rx *rx,
struct os_mbuf *buf)
{
struct bt_mesh_friend *frnd;
- u8_t xact;
+ uint8_t xact;
if (buf->om_len < BT_MESH_FRIEND_SUB_MIN_LEN) {
BT_WARN("Too short Friend Subscription Add");
@@ -629,7 +632,7 @@ int bt_mesh_friend_sub_rem(struct bt_mesh_net_rx *rx,
struct os_mbuf *buf)
{
struct bt_mesh_friend *frnd;
- u8_t xact;
+ uint8_t xact;
if (buf->om_len < BT_MESH_FRIEND_SUB_MIN_LEN) {
BT_WARN("Too short Friend Subscription Remove");
@@ -666,7 +669,7 @@ static void enqueue_buf(struct bt_mesh_friend *frnd, struct os_mbuf *buf)
frnd->queue_size++;
}
-static void enqueue_update(struct bt_mesh_friend *frnd, u8_t md)
+static void enqueue_update(struct bt_mesh_friend *frnd, uint8_t md)
{
struct os_mbuf *buf;
@@ -676,7 +679,6 @@ static void enqueue_update(struct bt_mesh_friend *frnd, u8_t md)
return;
}
- frnd->sec_update = 0;
enqueue_buf(frnd, buf);
}
@@ -735,7 +737,7 @@ int bt_mesh_friend_poll(struct bt_mesh_net_rx *rx, struct os_mbuf *buf)
return 0;
}
-static struct bt_mesh_friend *find_clear(u16_t prev_friend)
+static struct bt_mesh_friend *find_clear(uint16_t prev_friend)
{
int i;
@@ -766,13 +768,13 @@ static const struct bt_mesh_send_cb clear_sent_cb = {
static void send_friend_clear(struct bt_mesh_friend *frnd)
{
struct bt_mesh_msg_ctx ctx = {
- .net_idx = frnd->net_idx,
+ .net_idx = frnd->subnet->net_idx,
.app_idx = BT_MESH_KEY_UNUSED,
.addr = frnd->clear.frnd,
.send_ttl = BT_MESH_TTL_MAX,
};
struct bt_mesh_net_tx tx = {
- .sub = &bt_mesh.sub[0],
+ .sub = frnd->subnet,
.ctx = &ctx,
.src = bt_mesh_primary_addr(),
.xmit = bt_mesh_net_transmit_get(),
@@ -785,13 +787,13 @@ static void send_friend_clear(struct bt_mesh_friend *frnd)
BT_DBG("");
bt_mesh_ctl_send(&tx, TRANS_CTL_OP_FRIEND_CLEAR, &req,
- sizeof(req), NULL, &clear_sent_cb, frnd);
+ sizeof(req), &clear_sent_cb, frnd);
}
static void clear_timeout(struct ble_npl_event *work)
{
struct bt_mesh_friend *frnd = ble_npl_event_get_arg(work);
- u32_t duration;
+ uint32_t duration;
BT_DBG("LPN 0x%04x (old) Friend 0x%04x", frnd->lpn, frnd->clear.frnd);
@@ -820,7 +822,7 @@ int bt_mesh_friend_clear_cfm(struct bt_mesh_net_rx *rx,
{
struct bt_mesh_ctl_friend_clear_confirm *msg = (void *)buf->om_data;
struct bt_mesh_friend *frnd;
- u16_t lpn_addr, lpn_counter;
+ uint16_t lpn_addr, lpn_counter;
BT_DBG("");
@@ -855,7 +857,7 @@ int bt_mesh_friend_clear_cfm(struct bt_mesh_net_rx *rx,
return 0;
}
-static void enqueue_offer(struct bt_mesh_friend *frnd, s8_t rssi)
+static void enqueue_offer(struct bt_mesh_friend *frnd, int8_t rssi)
{
struct bt_mesh_ctl_friend_offer *off;
struct os_mbuf *sdu = NET_BUF_SIMPLE(1 + sizeof(*off));
@@ -880,11 +882,9 @@ static void enqueue_offer(struct bt_mesh_friend *frnd, s8_t rssi)
}
if (encrypt_friend_pdu(frnd, buf, true)) {
- return;
+ goto done;
}
- frnd->counter++;
-
if (frnd->last) {
net_buf_unref(frnd->last);
}
@@ -897,43 +897,45 @@ done:
}
#define RECV_WIN CONFIG_BT_MESH_FRIEND_RECV_WIN
-#define RSSI_FACT(crit) (((crit) >> 5) & (u8_t)BIT_MASK(2))
-#define RECV_WIN_FACT(crit) (((crit) >> 3) & (u8_t)BIT_MASK(2))
-#define MIN_QUEUE_SIZE_LOG(crit) ((crit) & (u8_t)BIT_MASK(3))
-#define MIN_QUEUE_SIZE(crit) ((u32_t)BIT(MIN_QUEUE_SIZE_LOG(crit)))
+#define RSSI_FACT(crit) (((crit) >> 5) & (uint8_t)BIT_MASK(2))
+#define RECV_WIN_FACT(crit) (((crit) >> 3) & (uint8_t)BIT_MASK(2))
+#define MIN_QUEUE_SIZE_LOG(crit) ((crit) & (uint8_t)BIT_MASK(3))
+#define MIN_QUEUE_SIZE(crit) ((uint32_t)BIT(MIN_QUEUE_SIZE_LOG(crit)))
-static s32_t offer_delay(struct bt_mesh_friend *frnd, s8_t rssi, u8_t crit)
+static int32_t offer_delay(struct bt_mesh_friend *frnd, int8_t rssi, uint8_t crit)
{
/* Scaling factors. The actual values are 1, 1.5, 2 & 2.5, but we
* want to avoid floating-point arithmetic.
*/
- static const u8_t fact[] = { 10, 15, 20, 25 };
- s32_t delay;
+ static const uint8_t fact[] = { 10, 15, 20, 25 };
+ int32_t delay;
BT_DBG("ReceiveWindowFactor %u ReceiveWindow %u RSSIFactor %u RSSI %d",
fact[RECV_WIN_FACT(crit)], RECV_WIN,
fact[RSSI_FACT(crit)], rssi);
/* Delay = ReceiveWindowFactor * ReceiveWindow - RSSIFactor * RSSI */
- delay = (s32_t)fact[RECV_WIN_FACT(crit)] * RECV_WIN;
- delay -= (s32_t)fact[RSSI_FACT(crit)] * rssi;
+ delay = (int32_t)fact[RECV_WIN_FACT(crit)] * RECV_WIN;
+ delay -= (int32_t)fact[RSSI_FACT(crit)] * rssi;
delay /= 10;
BT_DBG("Local Delay calculated as %d ms", (int) delay);
- if (delay < 100) {
- return K_MSEC(100);
- }
-
- return K_MSEC(delay);
+ return MAX(delay, 100);
}
int bt_mesh_friend_req(struct bt_mesh_net_rx *rx, struct os_mbuf *buf)
{
struct bt_mesh_ctl_friend_req *msg = (void *)buf->om_data;
struct bt_mesh_friend *frnd = NULL;
- u32_t poll_to;
- int i;
+ uint32_t poll_to;
+ int32_t delay;
+ int i, err;
+
+ if (rx->net_if == BT_MESH_NET_IF_LOCAL) {
+ BT_WARN("Ignoring Friend request from local interface");
+ return 0;
+ }
if (buf->om_len < sizeof(*msg)) {
BT_WARN("Too short Friend Request");
@@ -945,9 +947,7 @@ int bt_mesh_friend_req(struct bt_mesh_net_rx *rx, struct os_mbuf *buf)
return -EINVAL;
}
- poll_to = (((u32_t)msg->poll_to[0] << 16) |
- ((u32_t)msg->poll_to[1] << 8) |
- ((u32_t)msg->poll_to[2]));
+ poll_to = sys_get_be24(msg->poll_to);
if (poll_to <= 0x000009 || poll_to >= 0x34bc00) {
BT_WARN("Prohibited PollTimeout (0x%06x)", (unsigned) poll_to);
@@ -984,9 +984,8 @@ int bt_mesh_friend_req(struct bt_mesh_net_rx *rx, struct os_mbuf *buf)
}
for (i = 0; i < ARRAY_SIZE(bt_mesh.frnd); i++) {
- if (!bt_mesh.frnd[i].valid) {
+ if (!bt_mesh.frnd[i].subnet) {
frnd = &bt_mesh.frnd[i];
- frnd->valid = 1;
break;
}
}
@@ -999,12 +998,19 @@ int bt_mesh_friend_req(struct bt_mesh_net_rx *rx, struct os_mbuf *buf)
init_friend:
frnd->lpn = rx->ctx.addr;
frnd->num_elem = msg->num_elem;
- frnd->net_idx = rx->sub->net_idx;
+ frnd->subnet = rx->sub;
frnd->recv_delay = msg->recv_delay;
frnd->poll_to = poll_to * 100;
frnd->lpn_counter = sys_be16_to_cpu(msg->lpn_counter);
frnd->clear.frnd = sys_be16_to_cpu(msg->prev_addr);
+ err = friend_cred_create(frnd, SUBNET_KEY_TX_IDX(frnd->subnet));
+ if (err) {
+ BT_ERR("Failed to create friend credentials");
+ friend_clear(frnd);
+ return -EIO;
+ }
+
BT_DBG("LPN 0x%04x rssi %d recv_delay %u poll_to %ums",
frnd->lpn, rx->ctx.recv_rssi, frnd->recv_delay,
(unsigned) frnd->poll_to);
@@ -1014,24 +1020,20 @@ init_friend:
clear_procedure_start(frnd);
}
- k_delayed_work_submit(&frnd->timer,
- offer_delay(frnd, rx->ctx.recv_rssi,
- msg->criteria));
-
- friend_cred_create(rx->sub, frnd->lpn, frnd->lpn_counter,
- frnd->counter);
+ delay = offer_delay(frnd, rx->ctx.recv_rssi, msg->criteria);
+ k_delayed_work_submit(&frnd->timer, K_MSEC(delay));
enqueue_offer(frnd, rx->ctx.recv_rssi);
return 0;
}
-static bool is_seg(struct bt_mesh_friend_seg *seg, u16_t src, u16_t seq_zero)
+static bool is_seg(struct bt_mesh_friend_seg *seg, uint16_t src, uint16_t seq_zero)
{
struct os_mbuf *buf = (void *)net_buf_slist_peek_head(&seg->queue);
struct net_buf_simple_state state;
- u16_t buf_seq_zero;
- u16_t buf_src;
+ uint16_t buf_seq_zero;
+ uint16_t buf_src;
if (!buf) {
return false;
@@ -1048,8 +1050,8 @@ static bool is_seg(struct bt_mesh_friend_seg *seg, u16_t src, u16_t seq_zero)
}
static struct bt_mesh_friend_seg *get_seg(struct bt_mesh_friend *frnd,
- u16_t src, u16_t seq_zero,
- u8_t seg_count)
+ uint16_t src, uint16_t seq_zero,
+ uint8_t seg_count)
{
struct bt_mesh_friend_seg *unassigned = NULL;
int i;
@@ -1075,7 +1077,7 @@ static struct bt_mesh_friend_seg *get_seg(struct bt_mesh_friend *frnd,
static void enqueue_friend_pdu(struct bt_mesh_friend *frnd,
enum bt_mesh_friend_pdu_type type,
- u16_t src, u8_t seg_count,
+ uint16_t src, uint8_t seg_count,
struct os_mbuf *buf)
{
struct bt_mesh_friend_seg *seg;
@@ -1083,15 +1085,11 @@ static void enqueue_friend_pdu(struct bt_mesh_friend *frnd,
BT_DBG("type %u", type);
if (type == BT_MESH_FRIEND_PDU_SINGLE) {
- if (frnd->sec_update) {
- enqueue_update(frnd, 1);
- }
-
enqueue_buf(frnd, buf);
return;
}
- u16_t seq_zero = (((buf->om_data[10] << 8 | buf->om_data[11]) >> 2) & TRANS_SEQ_ZERO_MASK);
+ uint16_t seq_zero = (((buf->om_data[10] << 8 | buf->om_data[11]) >> 2) & TRANS_SEQ_ZERO_MASK);
seg = get_seg(frnd, src, seq_zero, seg_count);
if (!seg) {
@@ -1103,10 +1101,6 @@ static void enqueue_friend_pdu(struct bt_mesh_friend *frnd,
net_buf_slist_put(&seg->queue, buf);
if (type == BT_MESH_FRIEND_PDU_COMPLETE) {
- if (frnd->sec_update) {
- enqueue_update(frnd, 1);
- }
-
net_buf_slist_merge_slist(&frnd->queue, &seg->queue);
frnd->queue_size += seg->seg_count;
@@ -1117,7 +1111,7 @@ static void enqueue_friend_pdu(struct bt_mesh_friend *frnd,
}
}
-static void buf_send_start(u16_t duration, int err, void *user_data)
+static void buf_send_start(uint16_t duration, int err, void *user_data)
{
struct bt_mesh_friend *frnd = user_data;
@@ -1126,7 +1120,7 @@ static void buf_send_start(u16_t duration, int err, void *user_data)
frnd->pending_buf = 0;
/* Friend Offer doesn't follow the re-sending semantics */
- if (!frnd->established) {
+ if (!frnd->established && frnd->last) {
net_buf_unref(frnd->last);
frnd->last = NULL;
}
@@ -1154,6 +1148,38 @@ static void buf_send_end(int err, void *user_data)
}
}
+static void update_overwrite(struct os_mbuf *buf, uint8_t md)
+{
+ struct net_buf_simple_state state;
+ struct bt_mesh_ctl_friend_update *upd;
+
+ if (buf->om_len != 16) {
+ return;
+ }
+
+ net_buf_simple_save(buf, &state);
+
+ net_buf_skip(buf, 1); /* skip IVI, NID */
+
+ if (!(net_buf_pull_u8(buf) >> 7)) {
+ goto end;
+ }
+
+ net_buf_skip(buf, 7); /* skip seqnum src dec*/
+
+ if (TRANS_CTL_OP((uint8_t *) net_buf_pull_mem(buf, 1))
+ != TRANS_CTL_OP_FRIEND_UPDATE) {
+ goto end;
+ }
+
+ upd = net_buf_pull_mem(buf, sizeof(*upd));
+ BT_DBG("Update Previous Friend Update MD 0x%02x -> 0x%02x", upd->md, md);
+ upd->md = md;
+
+end:
+ net_buf_simple_restore(buf, &state);
+}
+
static void friend_timeout(struct ble_npl_event *work)
{
struct bt_mesh_friend *frnd = ble_npl_event_get_arg(work);
@@ -1162,6 +1188,8 @@ static void friend_timeout(struct ble_npl_event *work)
.end = buf_send_end,
};
+ uint8_t md;
+
__ASSERT_NO_MSG(frnd->pending_buf == 0);
BT_DBG("lpn 0x%04x send_last %u last %p", frnd->lpn,
@@ -1187,12 +1215,17 @@ static void friend_timeout(struct ble_npl_event *work)
return;
}
+ md = (uint8_t)(net_buf_slist_peek_head(&frnd->queue) != NULL);
+
+ update_overwrite(frnd->last, md);
+
if (encrypt_friend_pdu(frnd, frnd->last, false)) {
return;
}
/* Clear the flag we use for segment tracking */
BT_MESH_ADV(frnd->last)->flags &= ~NET_BUF_FRAGS;
+ BT_MESH_ADV(frnd->last)->flags = 0;
BT_DBG("Sending buf %p from Friend Queue of LPN 0x%04x",
frnd->last, frnd->lpn);
@@ -1204,8 +1237,56 @@ send_last:
bt_mesh_adv_send(frnd->last, &buf_sent_cb, frnd);
}
+static void subnet_evt(struct bt_mesh_subnet *sub, enum bt_mesh_key_evt evt)
+{
+ int i, err;
+
+ if (evt == BT_MESH_KEY_ADDED) {
+ return;
+ }
+
+ for (i = 0; i < ARRAY_SIZE(bt_mesh.frnd); i++) {
+ struct bt_mesh_friend *frnd = &bt_mesh.frnd[i];
+
+ if (frnd->subnet != sub) {
+ continue;
+ }
+
+ switch (evt) {
+ case BT_MESH_KEY_DELETED:
+ BT_DBG("Cleared network for 0x%04x", frnd->lpn);
+ friend_clear(frnd);
+ break;
+ case BT_MESH_KEY_UPDATED:
+ BT_DBG("Generating new keys for 0x%04x", frnd->lpn);
+ err = friend_cred_create(frnd, 1);
+ if (err) {
+ BT_ERR("Failed updating friend cred for 0x%04x",
+ frnd->lpn);
+ friend_clear(frnd);
+ }
+ break;
+ case BT_MESH_KEY_SWAPPED:
+ enqueue_update(frnd, 0);
+ break;
+ case BT_MESH_KEY_REVOKED:
+ BT_DBG("Revoking old keys for 0x%04x", frnd->lpn);
+ memcpy(&frnd->cred[0], &frnd->cred[1],
+ sizeof(frnd->cred[0]));
+ memset(&frnd->cred[1], 0, sizeof(frnd->cred[1]));
+ enqueue_update(frnd, 0);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
int bt_mesh_friend_init(void)
{
+ if (!bt_mesh_subnet_cb_list[3]) {
+ bt_mesh_subnet_cb_list[3] = subnet_evt;
+ }
int rc;
int i;
@@ -1223,8 +1304,6 @@ int bt_mesh_friend_init(void)
struct bt_mesh_friend *frnd = &bt_mesh.frnd[i];
int j;
- frnd->net_idx = BT_MESH_KEY_UNUSED;
-
net_buf_slist_init(&frnd->queue);
k_delayed_work_init(&frnd->timer, friend_timeout);
@@ -1240,7 +1319,7 @@ int bt_mesh_friend_init(void)
return 0;
}
-static bool is_segack(struct os_mbuf *buf, u64_t *seqauth, u16_t src)
+static bool is_segack(struct os_mbuf *buf, uint64_t *seqauth, uint16_t src)
{
struct net_buf_simple_state state;
bool found = false;
@@ -1265,7 +1344,7 @@ static bool is_segack(struct os_mbuf *buf, u64_t *seqauth, u16_t src)
net_buf_skip(buf, 2); /* skip dst */
- if (TRANS_CTL_OP((u8_t *) net_buf_pull_mem(buf, 1)) != TRANS_CTL_OP_ACK) {
+ if (TRANS_CTL_OP((uint8_t *) net_buf_pull_mem(buf, 1)) != TRANS_CTL_OP_ACK) {
goto end;
}
@@ -1276,8 +1355,8 @@ end:
return found;
}
-static void friend_purge_old_ack(struct bt_mesh_friend *frnd, u64_t *seq_auth,
- u16_t src)
+static void friend_purge_old_ack(struct bt_mesh_friend *frnd, uint64_t *seq_auth,
+ uint16_t src)
{
struct os_mbuf *cur, *prev = NULL;
@@ -1302,7 +1381,7 @@ static void friend_purge_old_ack(struct bt_mesh_friend *frnd, u64_t *seq_auth,
static void friend_lpn_enqueue_rx(struct bt_mesh_friend *frnd,
struct bt_mesh_net_rx *rx,
enum bt_mesh_friend_pdu_type type,
- u64_t *seq_auth, u8_t seg_count,
+ uint64_t *seq_auth, uint8_t seg_count,
struct os_mbuf *sbuf)
{
struct friend_pdu_info info;
@@ -1334,9 +1413,7 @@ static void friend_lpn_enqueue_rx(struct bt_mesh_friend *frnd,
info.ctl = rx->ctl;
- info.seq[0] = (rx->seq >> 16);
- info.seq[1] = (rx->seq >> 8);
- info.seq[2] = rx->seq;
+ sys_put_be24(rx->seq, info.seq);
info.iv_index = BT_MESH_NET_IVI_RX(rx);
@@ -1355,7 +1432,7 @@ static void friend_lpn_enqueue_rx(struct bt_mesh_friend *frnd,
static void friend_lpn_enqueue_tx(struct bt_mesh_friend *frnd,
struct bt_mesh_net_tx *tx,
enum bt_mesh_friend_pdu_type type,
- u64_t *seq_auth, u8_t seg_count,
+ uint64_t *seq_auth, uint8_t seg_count,
struct os_mbuf *sbuf)
{
struct friend_pdu_info info;
@@ -1373,9 +1450,7 @@ static void friend_lpn_enqueue_tx(struct bt_mesh_friend *frnd,
info.ttl = tx->ctx->send_ttl;
info.ctl = (tx->ctx->app_idx == BT_MESH_KEY_UNUSED);
- info.seq[0] = (bt_mesh.seq >> 16);
- info.seq[1] = (bt_mesh.seq >> 8);
- info.seq[2] = bt_mesh.seq;
+ sys_put_be24(bt_mesh.seq, info.seq);
info.iv_index = BT_MESH_NET_IVI_TX;
@@ -1398,8 +1473,8 @@ static void friend_lpn_enqueue_tx(struct bt_mesh_friend *frnd,
BT_DBG("Queued message for LPN 0x%04x", frnd->lpn);
}
-static bool friend_lpn_matches(struct bt_mesh_friend *frnd, u16_t net_idx,
- u16_t addr)
+static bool friend_lpn_matches(struct bt_mesh_friend *frnd, uint16_t net_idx,
+ uint16_t addr)
{
int i;
@@ -1407,7 +1482,7 @@ static bool friend_lpn_matches(struct bt_mesh_friend *frnd, u16_t net_idx,
return false;
}
- if (net_idx != frnd->net_idx) {
+ if (net_idx != frnd->subnet->net_idx) {
return false;
}
@@ -1424,7 +1499,7 @@ static bool friend_lpn_matches(struct bt_mesh_friend *frnd, u16_t net_idx,
return false;
}
-bool bt_mesh_friend_match(u16_t net_idx, u16_t addr)
+bool bt_mesh_friend_match(uint16_t net_idx, uint16_t addr)
{
int i;
@@ -1443,10 +1518,10 @@ bool bt_mesh_friend_match(u16_t net_idx, u16_t addr)
return false;
}
-static bool friend_queue_has_space(struct bt_mesh_friend *frnd, u16_t addr,
- u64_t *seq_auth, u8_t seg_count)
+static bool friend_queue_has_space(struct bt_mesh_friend *frnd, uint16_t addr,
+ uint64_t *seq_auth, uint8_t seg_count)
{
- u32_t total = 0;
+ uint32_t total = 0;
int i;
if (seg_count > CONFIG_BT_MESH_FRIEND_QUEUE_SIZE) {
@@ -1474,8 +1549,8 @@ static bool friend_queue_has_space(struct bt_mesh_friend *frnd, u16_t addr,
return (CONFIG_BT_MESH_FRIEND_QUEUE_SIZE - total) > seg_count;
}
-bool bt_mesh_friend_queue_has_space(u16_t net_idx, u16_t src, u16_t dst,
- u64_t *seq_auth, u8_t seg_count)
+bool bt_mesh_friend_queue_has_space(uint16_t net_idx, uint16_t src, uint16_t dst,
+ uint64_t *seq_auth, uint8_t seg_count)
{
bool someone_has_space = false, friend_match = false;
int i;
@@ -1509,11 +1584,11 @@ bool bt_mesh_friend_queue_has_space(u16_t net_idx, u16_t src, u16_t dst,
return someone_has_space;
}
-static bool friend_queue_prepare_space(struct bt_mesh_friend *frnd, u16_t addr,
- u64_t *seq_auth, u8_t seg_count)
+static bool friend_queue_prepare_space(struct bt_mesh_friend *frnd, uint16_t addr,
+ uint64_t *seq_auth, uint8_t seg_count)
{
bool pending_segments;
- u8_t avail_space;
+ uint8_t avail_space;
if (!friend_queue_has_space(frnd, addr, seq_auth, seg_count)) {
return false;
@@ -1547,7 +1622,7 @@ static bool friend_queue_prepare_space(struct bt_mesh_friend *frnd, u16_t addr,
void bt_mesh_friend_enqueue_rx(struct bt_mesh_net_rx *rx,
enum bt_mesh_friend_pdu_type type,
- u64_t *seq_auth, u8_t seg_count,
+ uint64_t *seq_auth, uint8_t seg_count,
struct os_mbuf *sbuf)
{
int i;
@@ -1570,6 +1645,11 @@ void bt_mesh_friend_enqueue_rx(struct bt_mesh_net_rx *rx,
continue;
}
+ if (friend_lpn_matches(frnd, rx->sub->net_idx,
+ rx->ctx.addr)) {
+ continue;
+ }
+
if (!friend_queue_prepare_space(frnd, rx->ctx.addr, seq_auth,
seg_count)) {
continue;
@@ -1582,7 +1662,7 @@ void bt_mesh_friend_enqueue_rx(struct bt_mesh_net_rx *rx,
bool bt_mesh_friend_enqueue_tx(struct bt_mesh_net_tx *tx,
enum bt_mesh_friend_pdu_type type,
- u64_t *seq_auth, u8_t seg_count,
+ uint64_t *seq_auth, uint8_t seg_count,
struct os_mbuf *sbuf)
{
bool matched = false;
@@ -1617,8 +1697,22 @@ bool bt_mesh_friend_enqueue_tx(struct bt_mesh_net_tx *tx,
return matched;
}
-void bt_mesh_friend_clear_incomplete(struct bt_mesh_subnet *sub, u16_t src,
- u16_t dst, u64_t *seq_auth)
+int bt_mesh_friend_terminate(uint16_t lpn_addr)
+{
+ struct bt_mesh_friend *frnd;
+
+ frnd = bt_mesh_friend_find(BT_MESH_KEY_ANY, lpn_addr, false, false);
+ if (!frnd) {
+ return -ENOENT;
+ }
+
+ friend_clear(frnd);
+
+ return 0;
+}
+
+void bt_mesh_friend_clear_incomplete(struct bt_mesh_subnet *sub, uint16_t src,
+ uint16_t dst, uint64_t *seq_auth)
{
int i;
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/friend.h b/src/libs/mynewt-nimble/nimble/host/mesh/src/friend.h
index 10ffa819..ee783f33 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/src/friend.h
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/friend.h
@@ -17,29 +17,29 @@ enum bt_mesh_friend_pdu_type {
BT_MESH_FRIEND_PDU_COMPLETE,
};
-bool bt_mesh_friend_match(u16_t net_idx, u16_t addr);
+bool bt_mesh_friend_match(uint16_t net_idx, uint16_t addr);
-struct bt_mesh_friend *bt_mesh_friend_find(u16_t net_idx, u16_t lpn_addr,
+struct bt_mesh_friend *bt_mesh_friend_find(uint16_t net_idx, uint16_t lpn_addr,
bool valid, bool established);
-bool bt_mesh_friend_queue_has_space(u16_t net_idx, u16_t src, u16_t dst,
- u64_t *seq_auth, u8_t seg_count);
+bool bt_mesh_friend_queue_has_space(uint16_t net_idx, uint16_t src, uint16_t dst,
+ uint64_t *seq_auth, uint8_t seg_count);
void bt_mesh_friend_enqueue_rx(struct bt_mesh_net_rx *rx,
enum bt_mesh_friend_pdu_type type,
- u64_t *seq_auth, u8_t seg_count,
+ uint64_t *seq_auth, uint8_t seg_count,
struct os_mbuf *sbuf);
bool bt_mesh_friend_enqueue_tx(struct bt_mesh_net_tx *tx,
enum bt_mesh_friend_pdu_type type,
- u64_t *seq_auth, u8_t seg_count,
+ uint64_t *seq_auth, uint8_t seg_count,
struct os_mbuf *sbuf);
-void bt_mesh_friend_clear_incomplete(struct bt_mesh_subnet *sub, u16_t src,
- u16_t dst, u64_t *seq_auth);
+void bt_mesh_friend_clear_incomplete(struct bt_mesh_subnet *sub, uint16_t src,
+ uint16_t dst, uint64_t *seq_auth);
-void bt_mesh_friend_sec_update(u16_t net_idx);
+void bt_mesh_friend_sec_update(uint16_t net_idx);
-void bt_mesh_friend_clear_net_idx(u16_t net_idx);
+void bt_mesh_friends_clear(void);
int bt_mesh_friend_poll(struct bt_mesh_net_rx *rx, struct os_mbuf *buf);
int bt_mesh_friend_req(struct bt_mesh_net_rx *rx, struct os_mbuf *buf);
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/glue.c b/src/libs/mynewt-nimble/nimble/host/mesh/src/glue.c
index 896f3d1a..aab7f374 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/src/glue.c
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/glue.c
@@ -30,7 +30,7 @@
#include "base64/base64.h"
#endif
-extern u8_t g_mesh_addr_type;
+extern uint8_t g_mesh_addr_type;
#if MYNEWT_VAL(BLE_EXT_ADV)
/* Store configuration for different bearers */
@@ -44,8 +44,8 @@ bt_hex(const void *buf, size_t len)
{
static const char hex[] = "0123456789abcdef";
static char hexbufs[4][137];
- static u8_t curbuf;
- const u8_t *b = buf;
+ static uint8_t curbuf;
+ const uint8_t *b = buf;
char *str;
int i;
@@ -215,6 +215,14 @@ net_buf_simple_add_be16(struct os_mbuf *om, uint16_t val)
}
void
+net_buf_simple_add_le24(struct os_mbuf *om, uint32_t val)
+{
+ val = htole32(val);
+ os_mbuf_append(om, &val, 3);
+ ASSERT_NOT_CHAIN(om);
+}
+
+void
net_buf_simple_add_be32(struct os_mbuf *om, uint32_t val)
{
val = htobe32(val);
@@ -270,6 +278,22 @@ net_buf_simple_push_be16(struct os_mbuf *om, uint16_t val)
}
void
+net_buf_simple_push_be24(struct os_mbuf *om, uint32_t val)
+{
+ uint8_t headroom = om->om_data - &om->om_databuf[om->om_pkthdr_len];
+
+ assert(headroom >= 3);
+ om->om_data -= 3;
+ put_be24(om->om_data, val);
+ om->om_len += 3;
+
+ if (om->om_pkthdr_len) {
+ OS_MBUF_PKTHDR(om)->omp_len += 3;
+ }
+ ASSERT_NOT_CHAIN(om);
+}
+
+void
net_buf_simple_push_u8(struct os_mbuf *om, uint8_t val)
{
uint8_t headroom = om->om_data - &om->om_databuf[om->om_pkthdr_len];
@@ -333,7 +357,7 @@ k_fifo_is_empty(struct ble_npl_eventq *q)
return ble_npl_eventq_is_empty(q);
}
-void * net_buf_get(struct ble_npl_eventq *fifo, s32_t t)
+void * net_buf_get(struct ble_npl_eventq *fifo, int32_t t)
{
struct ble_npl_event *ev = ble_npl_eventq_get(fifo, 0);
@@ -384,6 +408,12 @@ k_delayed_work_init(struct k_delayed_work *w, ble_npl_event_fn *f)
#endif
}
+bool
+k_delayed_work_pending(struct k_delayed_work *w)
+{
+ return ble_npl_callout_is_active(&w->work);
+}
+
void
k_delayed_work_cancel(struct k_delayed_work *w)
{
@@ -440,7 +470,7 @@ int64_t k_uptime_get(void)
return ble_npl_time_ticks_to_ms32(ble_npl_time_get());
}
-u32_t k_uptime_get_32(void)
+uint32_t k_uptime_get_32(void)
{
return k_uptime_get();
}
@@ -459,7 +489,7 @@ static uint8_t priv[32];
static bool has_pub = false;
int
-bt_dh_key_gen(const u8_t remote_pk[64], bt_dh_key_cb_t cb)
+bt_dh_key_gen(const uint8_t remote_pk[64], bt_dh_key_cb_t cb)
{
uint8_t dh[32];
@@ -510,7 +540,7 @@ bt_pub_key_get(void)
}
static int
-set_ad(const struct bt_data *ad, size_t ad_len, u8_t *buf, u8_t *buf_len)
+set_ad(const struct bt_data *ad, size_t ad_len, uint8_t *buf, uint8_t *buf_len)
{
int i;
@@ -846,6 +876,52 @@ void net_buf_slist_merge_slist(struct net_buf_slist_t *list,
}
}
+/** Memory slab methods */
+extern void k_mem_slab_free(struct k_mem_slab *slab, void **mem)
+{
+ **(char ***)mem = slab->free_list;
+ slab->free_list = *(char **)mem;
+ slab->num_used--;
+}
+
+extern int k_mem_slab_alloc(struct k_mem_slab *slab, void **mem)
+{
+ int result;
+
+ if (slab->free_list != NULL) {
+ /* take a free block */
+ *mem = slab->free_list;
+ slab->free_list = *(char **)(slab->free_list);
+ slab->num_used++;
+ result = 0;
+ } else {
+ *mem = NULL;
+ result = -ENOMEM;
+ }
+ return result;
+}
+
+int create_free_list(struct k_mem_slab *slab)
+{
+ uint32_t j;
+ char *p;
+
+ if(((slab->block_size | (uintptr_t)slab->buffer) &
+ (sizeof(void *) - 1)) != 0) {
+ return -EINVAL;
+ }
+
+ slab->free_list = NULL;
+ p = slab->buffer;
+
+ for (j = 0U; j < slab->num_blocks; j++) {
+ *(char **)p = slab->free_list;
+ slab->free_list = p;
+ p += slab->block_size;
+ }
+ return 0;
+}
+
#if MYNEWT_VAL(BLE_MESH_SETTINGS)
int settings_bytes_from_str(char *val_str, void *vp, int *len)
@@ -867,4 +943,3 @@ char *settings_str_from_bytes(const void *vp, int vp_len,
}
#endif /* MYNEWT_VAL(BLE_MESH_SETTINGS) */
-
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/health_cli.c b/src/libs/mynewt-nimble/nimble/host/mesh/src/health_cli.c
index 193279c2..76d639c5 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/src/health_cli.c
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/health_cli.c
@@ -21,15 +21,15 @@
#include "foundation.h"
#include "mesh/health_cli.h"
-static s32_t msg_timeout = K_SECONDS(5);
+static int32_t msg_timeout = K_SECONDS(5);
static struct bt_mesh_health_cli *health_cli;
struct health_fault_param {
- u16_t cid;
- u8_t *expect_test_id;
- u8_t *test_id;
- u8_t *faults;
+ uint16_t cid;
+ uint8_t *expect_test_id;
+ uint8_t *test_id;
+ uint8_t *faults;
size_t *fault_count;
};
@@ -38,8 +38,8 @@ static void health_fault_status(struct bt_mesh_model *model,
struct os_mbuf *buf)
{
struct health_fault_param *param;
- u8_t test_id;
- u16_t cid;
+ uint8_t test_id;
+ uint16_t cid;
BT_DBG("net_idx 0x%04x app_idx 0x%04x src 0x%04x len %u: %s",
ctx->net_idx, ctx->app_idx, ctx->addr, buf->om_len,
@@ -84,8 +84,8 @@ static void health_current_status(struct bt_mesh_model *model,
struct os_mbuf *buf)
{
struct bt_mesh_health_cli *cli = model->user_data;
- u8_t test_id;
- u16_t cid;
+ uint8_t test_id;
+ uint16_t cid;
BT_DBG("net_idx 0x%04x app_idx 0x%04x src 0x%04x len %u: %s",
ctx->net_idx, ctx->app_idx, ctx->addr, buf->om_len,
@@ -106,7 +106,7 @@ static void health_current_status(struct bt_mesh_model *model,
}
struct health_period_param {
- u8_t *divisor;
+ uint8_t *divisor;
};
static void health_period_status(struct bt_mesh_model *model,
@@ -132,7 +132,7 @@ static void health_period_status(struct bt_mesh_model *model,
}
struct health_attention_param {
- u8_t *attention;
+ uint8_t *attention;
};
static void health_attention_status(struct bt_mesh_model *model,
@@ -167,7 +167,7 @@ const struct bt_mesh_model_op bt_mesh_health_cli_op[] = {
BT_MESH_MODEL_OP_END,
};
-static int cli_prepare(void *param, u32_t op)
+static int cli_prepare(void *param, uint32_t op)
{
if (!health_cli) {
BT_ERR("No available Health Client context!");
@@ -202,12 +202,10 @@ static int cli_wait(void)
return err;
}
-int bt_mesh_health_attention_get(u16_t net_idx, u16_t addr, u16_t app_idx,
- u8_t *attention)
+int bt_mesh_health_attention_get(uint16_t addr, uint16_t app_idx, uint8_t *attention)
{
struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_ATTENTION_GET, 0);
struct bt_mesh_msg_ctx ctx = {
- .net_idx = net_idx,
.app_idx = app_idx,
.addr = addr,
.send_ttl = BT_MESH_TTL_DEFAULT,
@@ -237,12 +235,11 @@ done:
return err;
}
-int bt_mesh_health_attention_set(u16_t net_idx, u16_t addr, u16_t app_idx,
- u8_t attention, u8_t *updated_attention)
+int bt_mesh_health_attention_set(uint16_t addr, uint16_t app_idx, uint8_t attention,
+ uint8_t *updated_attention)
{
struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_ATTENTION_SET, 1);
struct bt_mesh_msg_ctx ctx = {
- .net_idx = net_idx,
.app_idx = app_idx,
.addr = addr,
.send_ttl = BT_MESH_TTL_DEFAULT,
@@ -283,12 +280,10 @@ done:
return err;
}
-int bt_mesh_health_period_get(u16_t net_idx, u16_t addr, u16_t app_idx,
- u8_t *divisor)
+int bt_mesh_health_period_get(uint16_t addr, uint16_t app_idx, uint8_t *divisor)
{
struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_HEALTH_PERIOD_GET, 0);
struct bt_mesh_msg_ctx ctx = {
- .net_idx = net_idx,
.app_idx = app_idx,
.addr = addr,
.send_ttl = BT_MESH_TTL_DEFAULT,
@@ -318,12 +313,11 @@ done:
return err;
}
-int bt_mesh_health_period_set(u16_t net_idx, u16_t addr, u16_t app_idx,
- u8_t divisor, u8_t *updated_divisor)
+int bt_mesh_health_period_set(uint16_t addr, uint16_t app_idx, uint8_t divisor,
+ uint8_t *updated_divisor)
{
struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_HEALTH_PERIOD_SET, 1);
struct bt_mesh_msg_ctx ctx = {
- .net_idx = net_idx,
.app_idx = app_idx,
.addr = addr,
.send_ttl = BT_MESH_TTL_DEFAULT,
@@ -364,13 +358,12 @@ done:
return err;
}
-int bt_mesh_health_fault_test(u16_t net_idx, u16_t addr, u16_t app_idx,
- u16_t cid, u8_t test_id, u8_t *faults,
- size_t *fault_count)
+int bt_mesh_health_fault_test(uint16_t addr, uint16_t app_idx, uint16_t cid,
+ uint8_t test_id, uint8_t *faults,
+ size_t *fault_count)
{
struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_HEALTH_FAULT_TEST, 3);
struct bt_mesh_msg_ctx ctx = {
- .net_idx = net_idx,
.app_idx = app_idx,
.addr = addr,
.send_ttl = BT_MESH_TTL_DEFAULT,
@@ -415,13 +408,12 @@ done:
return err;
}
-int bt_mesh_health_fault_clear(u16_t net_idx, u16_t addr, u16_t app_idx,
- u16_t cid, u8_t *test_id, u8_t *faults,
- size_t *fault_count)
+int bt_mesh_health_fault_clear(uint16_t addr, uint16_t app_idx, uint16_t cid,
+ uint8_t *test_id, uint8_t *faults,
+ size_t *fault_count)
{
struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_HEALTH_FAULT_CLEAR, 2);
struct bt_mesh_msg_ctx ctx = {
- .net_idx = net_idx,
.app_idx = app_idx,
.addr = addr,
.send_ttl = BT_MESH_TTL_DEFAULT,
@@ -465,13 +457,12 @@ done:
return err;
}
-int bt_mesh_health_fault_get(u16_t net_idx, u16_t addr, u16_t app_idx,
- u16_t cid, u8_t *test_id, u8_t *faults,
- size_t *fault_count)
+int bt_mesh_health_fault_get(uint16_t addr, uint16_t app_idx, uint16_t cid,
+ uint8_t *test_id, uint8_t *faults,
+ size_t *fault_count)
{
struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_HEALTH_FAULT_GET, 2);
struct bt_mesh_msg_ctx ctx = {
- .net_idx = net_idx,
.app_idx = app_idx,
.addr = addr,
.send_ttl = BT_MESH_TTL_DEFAULT,
@@ -505,12 +496,12 @@ done:
return err;
}
-s32_t bt_mesh_health_cli_timeout_get(void)
+int32_t bt_mesh_health_cli_timeout_get(void)
{
return msg_timeout;
}
-void bt_mesh_health_cli_timeout_set(s32_t timeout)
+void bt_mesh_health_cli_timeout_set(int32_t timeout)
{
msg_timeout = timeout;
}
@@ -523,6 +514,7 @@ int bt_mesh_health_cli_set(struct bt_mesh_model *model)
}
health_cli = model->user_data;
+ msg_timeout = 2 * MSEC_PER_SEC;
return 0;
}
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/health_srv.c b/src/libs/mynewt-nimble/nimble/host/mesh/src/health_srv.c
index 16de83a9..dd90533b 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/src/health_srv.c
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/health_srv.c
@@ -27,11 +27,11 @@
struct bt_mesh_health_srv *health_srv;
static void health_get_registered(struct bt_mesh_model *mod,
- u16_t company_id,
+ uint16_t company_id,
struct os_mbuf *msg)
{
struct bt_mesh_health_srv *srv = mod->user_data;
- u8_t *test_id;
+ uint8_t *test_id;
BT_DBG("Company ID 0x%04x", company_id);
@@ -41,7 +41,7 @@ static void health_get_registered(struct bt_mesh_model *mod,
net_buf_simple_add_le16(msg, company_id);
if (srv->cb && srv->cb->fault_get_reg) {
- u8_t fault_count = net_buf_simple_tailroom(msg) - 4;
+ uint8_t fault_count = net_buf_simple_tailroom(msg) - 4;
int err;
err = srv->cb->fault_get_reg(mod, company_id, test_id,
@@ -64,9 +64,9 @@ static size_t health_get_current(struct bt_mesh_model *mod,
{
struct bt_mesh_health_srv *srv = mod->user_data;
const struct bt_mesh_comp *comp;
- u8_t *test_id, *company_ptr;
- u16_t company_id;
- u8_t fault_count;
+ uint8_t *test_id, *company_ptr;
+ uint16_t company_id;
+ uint8_t fault_count;
int err;
bt_mesh_model_msg_init(msg, OP_HEALTH_CURRENT_STATUS);
@@ -104,7 +104,7 @@ static void health_fault_get(struct bt_mesh_model *model,
struct os_mbuf *buf)
{
struct os_mbuf *sdu = NET_BUF_SIMPLE(BT_MESH_TX_SDU_MAX);
- u16_t company_id;
+ uint16_t company_id;
company_id = net_buf_simple_pull_le16(buf);
@@ -124,7 +124,7 @@ static void health_fault_clear_unrel(struct bt_mesh_model *model,
struct os_mbuf *buf)
{
struct bt_mesh_health_srv *srv = model->user_data;
- u16_t company_id;
+ uint16_t company_id;
company_id = net_buf_simple_pull_le16(buf);
@@ -141,7 +141,7 @@ static void health_fault_clear(struct bt_mesh_model *model,
{
struct os_mbuf *sdu = NET_BUF_SIMPLE(BT_MESH_TX_SDU_MAX);
struct bt_mesh_health_srv *srv = model->user_data;
- u16_t company_id;
+ uint16_t company_id;
company_id = net_buf_simple_pull_le16(buf);
@@ -165,8 +165,8 @@ static void health_fault_test_unrel(struct bt_mesh_model *model,
struct os_mbuf *buf)
{
struct bt_mesh_health_srv *srv = model->user_data;
- u16_t company_id;
- u8_t test_id;
+ uint16_t company_id;
+ uint8_t test_id;
test_id = net_buf_simple_pull_u8(buf);
company_id = net_buf_simple_pull_le16(buf);
@@ -184,8 +184,8 @@ static void health_fault_test(struct bt_mesh_model *model,
{
struct os_mbuf *sdu = NET_BUF_SIMPLE(BT_MESH_TX_SDU_MAX);
struct bt_mesh_health_srv *srv = model->user_data;
- u16_t company_id;
- u8_t test_id;
+ uint16_t company_id;
+ uint8_t test_id;
BT_DBG("");
@@ -219,7 +219,7 @@ static void send_attention_status(struct bt_mesh_model *model,
{
struct os_mbuf *msg = BT_MESH_MODEL_BUF(OP_ATTENTION_STATUS, 1);
struct bt_mesh_health_srv *srv = model->user_data;
- u8_t time;
+ uint8_t time;
time = k_delayed_work_remaining_get(&srv->attn_timer) / 1000;
BT_DBG("%u second%s", time, (time == 1) ? "" : "s");
@@ -248,7 +248,7 @@ static void attention_set_unrel(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- u8_t time;
+ uint8_t time;
time = net_buf_simple_pull_u8(buf);
@@ -297,7 +297,7 @@ static void health_period_set_unrel(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf)
{
- u8_t period;
+ uint8_t period;
period = net_buf_simple_pull_u8(buf);
if (period > 15) {
@@ -389,10 +389,6 @@ static int health_srv_init(struct bt_mesh_model *model)
struct bt_mesh_health_srv *srv = model->user_data;
if (!srv) {
- if (!bt_mesh_model_in_primary(model)) {
- return 0;
- }
-
BT_ERR("No Health Server context provided");
return -EINVAL;
}
@@ -420,7 +416,7 @@ const struct bt_mesh_model_cb bt_mesh_health_srv_cb = {
.init = health_srv_init,
};
-void bt_mesh_attention(struct bt_mesh_model *model, u8_t time)
+void bt_mesh_attention(struct bt_mesh_model *model, uint8_t time)
{
struct bt_mesh_health_srv *srv;
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/heartbeat.c b/src/libs/mynewt-nimble/nimble/host/mesh/src/heartbeat.c
new file mode 100644
index 00000000..538a1cb6
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/heartbeat.c
@@ -0,0 +1,351 @@
+/*
+ * Copyright (c) 2020 Nordic Semiconductor ASA
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+#define MESH_LOG_MODULE BLE_MESH_HEARTBEAT_LOG
+
+#include "mesh_priv.h"
+#include "net.h"
+#include "rpl.h"
+#include "access.h"
+#include "lpn.h"
+#include "settings.h"
+#include "transport.h"
+#include "heartbeat.h"
+#include "foundation.h"
+#include "mesh/glue.h"
+
+struct bt_mesh_hb_cb hb_cb;
+
+static struct bt_mesh_hb_pub pub;
+static struct bt_mesh_hb_sub sub;
+static struct k_delayed_work sub_timer;
+static struct k_delayed_work pub_timer;
+
+static int64_t sub_remaining(void)
+{
+ if (sub.dst == BT_MESH_ADDR_UNASSIGNED) {
+ return 0U;
+ }
+
+ return k_delayed_work_remaining_get(&sub_timer) / MSEC_PER_SEC;
+}
+
+static void hb_publish_end_cb(int err, void *cb_data)
+{
+ if (pub.period && pub.count > 1) {
+ k_delayed_work_submit(&pub_timer, K_SECONDS(pub.period));
+ }
+
+ if (pub.count != 0xffff) {
+ pub.count--;
+ }
+}
+
+static void notify_recv(uint8_t hops, uint16_t feat)
+{
+ sub.remaining = sub_remaining();
+
+ if (hb_cb.recv != NULL) {
+ hb_cb.recv(&sub, hops, feat);
+ }
+}
+
+static void notify_sub_end(void)
+{
+ sub.remaining = 0;
+
+ if (hb_cb.sub_end != NULL) {
+ hb_cb.sub_end(&sub);
+ }
+}
+
+static void sub_end(struct ble_npl_event *work)
+{
+ notify_sub_end();
+}
+
+static int heartbeat_send(const struct bt_mesh_send_cb *cb, void *cb_data)
+{
+ uint16_t feat = 0U;
+ struct __packed {
+ uint8_t init_ttl;
+ uint16_t feat;
+ } hb;
+ struct bt_mesh_msg_ctx ctx = {
+ .net_idx = pub.net_idx,
+ .app_idx = BT_MESH_KEY_UNUSED,
+ .addr = pub.dst,
+ .send_ttl = pub.ttl,
+ };
+ struct bt_mesh_net_tx tx = {
+ .sub = bt_mesh_subnet_get(pub.net_idx),
+ .ctx = &ctx,
+ .src = bt_mesh_primary_addr(),
+ .xmit = bt_mesh_net_transmit_get(),
+ };
+
+ /* Do nothing if heartbeat publication is not enabled */
+ if (pub.dst == BT_MESH_ADDR_UNASSIGNED) {
+ return 0U;
+ }
+
+ hb.init_ttl = pub.ttl;
+
+ if (bt_mesh_relay_get() == BT_MESH_RELAY_ENABLED) {
+ feat |= BT_MESH_FEAT_RELAY;
+ }
+
+ if (bt_mesh_gatt_proxy_get() == BT_MESH_GATT_PROXY_ENABLED) {
+ feat |= BT_MESH_FEAT_PROXY;
+ }
+
+ if (bt_mesh_friend_get() == BT_MESH_FRIEND_ENABLED) {
+ feat |= BT_MESH_FEAT_FRIEND;
+ }
+
+ if (bt_mesh_lpn_established()) {
+ feat |= BT_MESH_FEAT_LOW_POWER;
+ }
+
+ hb.feat = sys_cpu_to_be16(feat);
+
+ BT_DBG("InitTTL %u feat 0x%04x", pub.ttl, feat);
+
+ return bt_mesh_ctl_send(&tx, TRANS_CTL_OP_HEARTBEAT, &hb, sizeof(hb),
+ cb, cb_data);
+}
+
+static void hb_publish_start_cb(uint16_t duration, int err, void *cb_data)
+{
+ if (err) {
+ hb_publish_end_cb(err, cb_data);
+ }
+}
+
+static void hb_publish(struct ble_npl_event *work)
+{
+ static const struct bt_mesh_send_cb publish_cb = {
+ .start = hb_publish_start_cb,
+ .end = hb_publish_end_cb,
+ };
+ struct bt_mesh_subnet *sub;
+ int err;
+
+ BT_DBG("hb_pub.count: %u", pub.count);
+
+ sub = bt_mesh_subnet_get(pub.net_idx);
+ if (!sub) {
+ BT_ERR("No matching subnet for idx 0x%02x", pub.net_idx);
+ pub.dst = BT_MESH_ADDR_UNASSIGNED;
+ return;
+ }
+
+ if (pub.count == 0U) {
+ return;
+ }
+
+ err = heartbeat_send(&publish_cb, NULL);
+ if (err) {
+ hb_publish_end_cb(err, NULL);
+ }
+}
+
+int bt_mesh_hb_recv(struct bt_mesh_net_rx *rx, struct os_mbuf *buf)
+{
+ uint8_t init_ttl, hops;
+ uint16_t feat;
+
+ if (buf->om_len < 3) {
+ BT_ERR("Too short heartbeat message");
+ return -EINVAL;
+ }
+
+ init_ttl = (net_buf_simple_pull_u8(buf) & 0x7f);
+ feat = net_buf_simple_pull_be16(buf);
+
+ hops = (init_ttl - rx->ctx.recv_ttl + 1);
+
+ if (rx->ctx.addr != sub.src || rx->ctx.recv_dst != sub.dst) {
+ BT_DBG("No subscription for received heartbeat");
+ return 0;
+ }
+
+ if (!k_delayed_work_pending(&sub_timer)) {
+ BT_DBG("Heartbeat subscription period expired");
+ return 0;
+ }
+
+ sub.min_hops = MIN(sub.min_hops, hops);
+ sub.max_hops = MAX(sub.max_hops, hops);
+
+ if (sub.count < 0xffff) {
+ sub.count++;
+ }
+
+ BT_DBG("src 0x%04x TTL %u InitTTL %u (%u hop%s) feat 0x%04x",
+ rx->ctx.addr, rx->ctx.recv_ttl, init_ttl, hops,
+ (hops == 1U) ? "" : "s", feat);
+
+ notify_recv(hops, feat);
+
+ return 0;
+}
+
+static void pub_disable(void)
+{
+ BT_DBG("");
+
+ pub.dst = BT_MESH_ADDR_UNASSIGNED;
+ pub.count = 0U;
+ pub.ttl = 0U;
+ pub.period = 0U;
+
+ k_delayed_work_cancel(&pub_timer);
+}
+
+uint8_t bt_mesh_hb_pub_set(struct bt_mesh_hb_pub *new_pub)
+{
+ if (!new_pub || new_pub->dst == BT_MESH_ADDR_UNASSIGNED) {
+ pub_disable();
+
+ if (IS_ENABLED(CONFIG_BT_SETTINGS) &&
+ bt_mesh_is_provisioned()) {
+ bt_mesh_store_hb_pub();
+ }
+
+ return STATUS_SUCCESS;
+ }
+
+ if (!bt_mesh_subnet_get(new_pub->net_idx)) {
+ BT_ERR("Unknown NetKey 0x%04x", new_pub->net_idx);
+ return STATUS_INVALID_NETKEY;
+ }
+
+ new_pub->feat &= BT_MESH_FEAT_SUPPORTED;
+ pub = *new_pub;
+
+ if (!bt_mesh_is_provisioned()) {
+ return STATUS_SUCCESS;
+ }
+
+ /* The first Heartbeat message shall be published as soon as possible
+ * after the Heartbeat Publication Period state has been configured for
+ * periodic publishing.
+ */
+ if (pub.period && pub.count) {
+ k_delayed_work_submit(&pub_timer, K_NO_WAIT);
+ } else {
+ k_delayed_work_cancel(&pub_timer);
+ }
+
+ if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
+ bt_mesh_store_hb_pub();
+ }
+
+ return STATUS_SUCCESS;
+}
+
+void bt_mesh_hb_pub_get(struct bt_mesh_hb_pub *get)
+{
+ *get = pub;
+}
+
+uint8_t bt_mesh_hb_sub_set(uint16_t src, uint16_t dst, uint32_t period)
+{
+ if (src != BT_MESH_ADDR_UNASSIGNED && !BT_MESH_ADDR_IS_UNICAST(src)) {
+ BT_WARN("Prohibited source address");
+ return STATUS_INVALID_ADDRESS;
+ }
+
+ if (BT_MESH_ADDR_IS_VIRTUAL(dst) || BT_MESH_ADDR_IS_RFU(dst) ||
+ (BT_MESH_ADDR_IS_UNICAST(dst) && dst != bt_mesh_primary_addr())) {
+ BT_WARN("Prohibited destination address");
+ return STATUS_INVALID_ADDRESS;
+ }
+
+ if (period > (1U << 16)) {
+ BT_WARN("Prohibited subscription period %u s", period);
+ return STATUS_CANNOT_SET;
+ }
+
+ /* Only an explicit address change to unassigned should trigger clearing
+ * of the values according to MESH/NODE/CFG/HBS/BV-02-C.
+ */
+ if (src == BT_MESH_ADDR_UNASSIGNED || dst == BT_MESH_ADDR_UNASSIGNED) {
+ sub.src = BT_MESH_ADDR_UNASSIGNED;
+ sub.dst = BT_MESH_ADDR_UNASSIGNED;
+ sub.min_hops = 0U;
+ sub.max_hops = 0U;
+ sub.count = 0U;
+ sub.period = sub.period - sub_remaining();
+ k_delayed_work_cancel(&sub_timer);
+ notify_sub_end();
+ } else if (period) {
+ sub.src = src;
+ sub.dst = dst;
+ sub.min_hops = BT_MESH_TTL_MAX;
+ sub.max_hops = 0U;
+ sub.count = 0U;
+ sub.period = period;
+ k_delayed_work_submit(&sub_timer, K_SECONDS(period));
+ } else {
+ /* Clearing the period should stop heartbeat subscription
+ * without clearing the parameters, so we can still read them.
+ */
+ sub.period = sub.period - sub_remaining();
+ k_delayed_work_cancel(&sub_timer);
+ notify_sub_end();
+ }
+
+ return STATUS_SUCCESS;
+}
+
+void bt_mesh_hb_sub_get(struct bt_mesh_hb_sub *get)
+{
+ *get = sub;
+ get->remaining = sub_remaining();
+}
+
+void bt_mesh_hb_feature_changed(uint16_t features)
+{
+ if (pub.dst == BT_MESH_ADDR_UNASSIGNED) {
+ return;
+ }
+
+ if (!(pub.feat & features)) {
+ return;
+ }
+
+ heartbeat_send(NULL, NULL);
+}
+
+void bt_mesh_hb_init(void)
+{
+ pub.net_idx = BT_MESH_KEY_UNUSED;
+ k_delayed_work_init(&pub_timer, hb_publish);
+ k_delayed_work_init(&sub_timer, sub_end);
+}
+
+void bt_mesh_hb_start(void)
+{
+ if (pub.count && pub.period) {
+ BT_DBG("Starting heartbeat publication");
+ k_delayed_work_submit(&pub_timer, K_NO_WAIT);
+ }
+}
+
+void bt_mesh_hb_suspend(void)
+{
+ k_delayed_work_cancel(&pub_timer);
+}
+
+void bt_mesh_hb_resume(void)
+{
+ if (pub.period && pub.count) {
+ BT_DBG("Starting heartbeat publication");
+ k_delayed_work_submit(&pub_timer, K_NO_WAIT);
+ }
+}
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/heartbeat.h b/src/libs/mynewt-nimble/nimble/host/mesh/src/heartbeat.h
new file mode 100644
index 00000000..c43683fe
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/heartbeat.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2020 Nordic Semiconductor ASA
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+#include "mesh/heartbeat.h"
+
+static inline uint16_t bt_mesh_hb_pwr2(uint8_t val)
+{
+ if (!val) {
+ return 0x0000;
+ } else if (val == 0xff || val == 0x11) {
+ return 0xffff;
+ } else {
+ return (1 << (val - 1));
+ }
+}
+
+static inline uint8_t bt_mesh_hb_log(uint32_t val)
+{
+ if (!val) {
+ return 0x00;
+ } else if (val == 0xffff) {
+ return 0xff;
+ } else {
+ return 32 - __builtin_clz(val);
+ }
+}
+
+void bt_mesh_hb_init(void);
+void bt_mesh_hb_start(void);
+void bt_mesh_hb_suspend(void);
+void bt_mesh_hb_resume(void);
+
+int bt_mesh_hb_recv(struct bt_mesh_net_rx *rx, struct os_mbuf *buf);
+void bt_mesh_hb_feature_changed(uint16_t features);
+
+uint8_t bt_mesh_hb_pub_set(struct bt_mesh_hb_pub *hb_pub);
+uint8_t bt_mesh_hb_sub_set(uint16_t src, uint16_t dst, uint32_t period);
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/light_model.c b/src/libs/mynewt-nimble/nimble/host/mesh/src/light_model.c
index b6d83818..bc4792c6 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/src/light_model.c
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/light_model.c
@@ -6,52 +6,52 @@
#include "light_model.h"
-static u8_t gen_onoff_state;
-static s16_t gen_level_state;
+static uint8_t gen_onoff_state;
+static int16_t gen_level_state;
static void update_light_state(void)
{
- console_printf("Light state: onoff=%d lvl=0x%04x\n", gen_onoff_state, (u16_t)gen_level_state);
+ console_printf("Light state: onoff=%d lvl=0x%04x\n", gen_onoff_state, (uint16_t)gen_level_state);
}
-int light_model_gen_onoff_get(struct bt_mesh_model *model, u8_t *state)
+int light_model_gen_onoff_get(struct bt_mesh_model *model, uint8_t *state)
{
*state = gen_onoff_state;
return 0;
}
-int light_model_gen_onoff_set(struct bt_mesh_model *model, u8_t state)
+int light_model_gen_onoff_set(struct bt_mesh_model *model, uint8_t state)
{
gen_onoff_state = state;
update_light_state();
return 0;
}
-int light_model_gen_level_get(struct bt_mesh_model *model, s16_t *level)
+int light_model_gen_level_get(struct bt_mesh_model *model, int16_t *level)
{
*level = gen_level_state;
return 0;
}
-int light_model_gen_level_set(struct bt_mesh_model *model, s16_t level)
+int light_model_gen_level_set(struct bt_mesh_model *model, int16_t level)
{
gen_level_state = level;
- if ((u16_t)gen_level_state > 0x0000) {
+ if ((uint16_t)gen_level_state > 0x0000) {
gen_onoff_state = 1;
}
- if ((u16_t)gen_level_state == 0x0000) {
+ if ((uint16_t)gen_level_state == 0x0000) {
gen_onoff_state = 0;
}
update_light_state();
return 0;
}
-int light_model_light_lightness_get(struct bt_mesh_model *model, s16_t *lightness)
+int light_model_light_lightness_get(struct bt_mesh_model *model, int16_t *lightness)
{
return light_model_gen_level_get(model, lightness);
}
-int light_model_light_lightness_set(struct bt_mesh_model *model, s16_t lightness)
+int light_model_light_lightness_set(struct bt_mesh_model *model, int16_t lightness)
{
return light_model_gen_level_set(model, lightness);
}
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/light_model.h b/src/libs/mynewt-nimble/nimble/host/mesh/src/light_model.h
index 95fcdb78..d5f95943 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/src/light_model.h
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/light_model.h
@@ -9,11 +9,11 @@
#include "syscfg/syscfg.h"
#include "mesh/mesh.h"
-int light_model_gen_onoff_get(struct bt_mesh_model *model, u8_t *state);
-int light_model_gen_onoff_set(struct bt_mesh_model *model, u8_t state);
-int light_model_gen_level_get(struct bt_mesh_model *model, s16_t *level);
-int light_model_gen_level_set(struct bt_mesh_model *model, s16_t level);
-int light_model_light_lightness_get(struct bt_mesh_model *model, s16_t *lightness);
-int light_model_light_lightness_set(struct bt_mesh_model *model, s16_t lightness);
+int light_model_gen_onoff_get(struct bt_mesh_model *model, uint8_t *state);
+int light_model_gen_onoff_set(struct bt_mesh_model *model, uint8_t state);
+int light_model_gen_level_get(struct bt_mesh_model *model, int16_t *level);
+int light_model_gen_level_set(struct bt_mesh_model *model, int16_t level);
+int light_model_light_lightness_get(struct bt_mesh_model *model, int16_t *lightness);
+int light_model_light_lightness_set(struct bt_mesh_model *model, int16_t lightness);
#endif
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/lpn.c b/src/libs/mynewt-nimble/nimble/host/mesh/src/lpn.c
index ec012a5f..bd48c088 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/src/lpn.c
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/lpn.c
@@ -19,6 +19,7 @@
#include "adv.h"
#include "net.h"
#include "transport.h"
+#include "heartbeat.h"
#include "access.h"
#include "beacon.h"
#include "foundation.h"
@@ -42,27 +43,33 @@
#define POLL_RETRY_TIMEOUT K_MSEC(100)
-#define REQ_RETRY_DURATION(lpn) (4 * (LPN_RECV_DELAY + (lpn)->adv_duration + \
- (lpn)->recv_win + POLL_RETRY_TIMEOUT))
+#define REQ_RETRY_DURATION(lpn) (LPN_RECV_DELAY + (lpn)->adv_duration + \
+ (lpn)->recv_win + POLL_RETRY_TIMEOUT)
#define POLL_TIMEOUT_INIT (MYNEWT_VAL(BLE_MESH_LPN_INIT_POLL_TIMEOUT) * 100)
-#define POLL_TIMEOUT_MAX(lpn) ((MYNEWT_VAL(BLE_MESH_LPN_POLL_TIMEOUT) * 100) - \
- REQ_RETRY_DURATION(lpn))
-#define REQ_ATTEMPTS(lpn) (POLL_TIMEOUT_MAX(lpn) < K_SECONDS(3) ? 2 : 4)
-#define CLEAR_ATTEMPTS 2
+#define POLL_TIMEOUT (MYNEWT_VAL(BLE_MESH_LPN_RECV_DELAY) * 100)
+
+#define REQ_ATTEMPTS_MAX 6
+#define REQ_ATTEMPTS(lpn) MIN(REQ_ATTEMPTS_MAX, \
+ POLL_TIMEOUT / REQ_RETRY_DURATION(lpn))
+
+#define POLL_TIMEOUT_MAX(lpn) (POLL_TIMEOUT - \
+ (REQ_ATTEMPTS(lpn) * REQ_RETRY_DURATION(lpn)))
+
+#define CLEAR_ATTEMPTS 3
#define LPN_CRITERIA ((MYNEWT_VAL(BLE_MESH_LPN_MIN_QUEUE_SIZE)) | \
(MYNEWT_VAL(BLE_MESH_LPN_RSSI_FACTOR) << 3) | \
(MYNEWT_VAL(BLE_MESH_LPN_RECV_WIN_FACTOR) << 5))
-#define POLL_TO(to) { (u8_t)((to) >> 16), (u8_t)((to) >> 8), (u8_t)(to) }
+#define POLL_TO(to) { (uint8_t)((to) >> 16), (uint8_t)((to) >> 8), (uint8_t)(to) }
#define LPN_POLL_TO POLL_TO(MYNEWT_VAL(BLE_MESH_LPN_POLL_TIMEOUT))
/* 2 transmissions, 20ms interval */
#define POLL_XMIT BT_MESH_TRANSMIT(1, 20)
-static void (*lpn_cb)(u16_t friend_addr, bool established);
+static void (*lpn_cb)(uint16_t friend_addr, bool established);
#if MYNEWT_VAL(BLE_MESH_LOW_POWER_LOG_LVL) == LOG_LEVEL_DEBUG
static const char *state2str(int state)
@@ -145,10 +152,7 @@ static void friend_clear_sent(int err, void *user_data)
{
struct bt_mesh_lpn *lpn = &bt_mesh.lpn;
- /* We're switching away from Low Power behavior, so permanently
- * enable scanning.
- */
- bt_mesh_scan_enable();
+ /* Scanning will enable if lpn state still enabled */
lpn->req_attempts++;
@@ -170,31 +174,30 @@ static const struct bt_mesh_send_cb clear_sent_cb = {
static int send_friend_clear(void)
{
struct bt_mesh_msg_ctx ctx = {
- .net_idx = bt_mesh.sub[0].net_idx,
+ .net_idx = bt_mesh.lpn.sub->net_idx,
.app_idx = BT_MESH_KEY_UNUSED,
.addr = bt_mesh.lpn.frnd,
.send_ttl = 0,
};
struct bt_mesh_net_tx tx = {
- .sub = &bt_mesh.sub[0],
+ .sub = bt_mesh.lpn.sub,
.ctx = &ctx,
.src = bt_mesh_primary_addr(),
.xmit = bt_mesh_net_transmit_get(),
};
struct bt_mesh_ctl_friend_clear req = {
.lpn_addr = sys_cpu_to_be16(tx.src),
- .lpn_counter = sys_cpu_to_be16(bt_mesh.lpn.counter),
+ .lpn_counter = sys_cpu_to_be16(bt_mesh.lpn.lpn_counter),
};
BT_DBG("");
return bt_mesh_ctl_send(&tx, TRANS_CTL_OP_FRIEND_CLEAR, &req,
- sizeof(req), NULL, &clear_sent_cb, NULL);
+ sizeof(req), &clear_sent_cb, NULL);
}
static void clear_friendship(bool force, bool disable)
{
- struct bt_mesh_cfg_srv *cfg = bt_mesh_cfg_get();
struct bt_mesh_lpn *lpn = &bt_mesh.lpn;
BT_DBG("force %u disable %u", force, disable);
@@ -210,8 +213,6 @@ static void clear_friendship(bool force, bool disable)
k_delayed_work_cancel(&lpn->timer);
- friend_cred_del(bt_mesh.sub[0].net_idx, lpn->frnd);
-
if (lpn->clear_success) {
lpn->old_friend = BT_MESH_ADDR_UNASSIGNED;
} else {
@@ -231,6 +232,7 @@ static void clear_friendship(bool force, bool disable)
lpn->sent_req = 0;
lpn->established = 0;
lpn->clear_success = 0;
+ lpn->sub = NULL;
group_zero(lpn->added);
group_zero(lpn->pending);
@@ -242,9 +244,7 @@ static void clear_friendship(bool force, bool disable)
*/
lpn->groups_changed = 1;
- if (cfg->hb_pub.feat & BT_MESH_FEAT_LOW_POWER) {
- bt_mesh_heartbeat_send();
- }
+ bt_mesh_hb_feature_changed(BT_MESH_FEAT_LOW_POWER);
if (disable) {
lpn_set_state(BT_MESH_LPN_DISABLED);
@@ -255,7 +255,7 @@ static void clear_friendship(bool force, bool disable)
k_delayed_work_submit(&lpn->timer, FRIEND_REQ_RETRY_TIMEOUT);
}
-static void friend_req_sent(u16_t duration, int err, void *user_data)
+static void friend_req_sent(uint16_t duration, int err, void *user_data)
{
struct bt_mesh_lpn *lpn = &bt_mesh.lpn;
@@ -284,33 +284,43 @@ static int send_friend_req(struct bt_mesh_lpn *lpn)
{
const struct bt_mesh_comp *comp = bt_mesh_comp_get();
struct bt_mesh_msg_ctx ctx = {
- .net_idx = bt_mesh.sub[0].net_idx,
.app_idx = BT_MESH_KEY_UNUSED,
.addr = BT_MESH_ADDR_FRIENDS,
.send_ttl = 0,
};
struct bt_mesh_net_tx tx = {
- .sub = &bt_mesh.sub[0],
.ctx = &ctx,
.src = bt_mesh_primary_addr(),
.xmit = POLL_XMIT,
};
+
+ lpn->lpn_counter++;
+
struct bt_mesh_ctl_friend_req req = {
.criteria = LPN_CRITERIA,
.recv_delay = LPN_RECV_DELAY,
.poll_to = LPN_POLL_TO,
- .prev_addr = lpn->old_friend,
+ .prev_addr = sys_cpu_to_be16(lpn->old_friend),
.num_elem = comp->elem_count,
- .lpn_counter = sys_cpu_to_be16(lpn->counter),
+ .lpn_counter = sys_cpu_to_be16(lpn->lpn_counter),
};
BT_DBG("");
+ lpn->sub = bt_mesh_subnet_next(NULL);
+ if (!lpn->sub) {
+ BT_ERR("No subnets, can't start LPN mode");
+ return -ENOENT;
+ }
+
+ ctx.net_idx = lpn->sub->net_idx;
+ tx.sub = lpn->sub;
+
return bt_mesh_ctl_send(&tx, TRANS_CTL_OP_FRIEND_REQ, &req,
- sizeof(req), NULL, &friend_req_sent_cb, NULL);
+ sizeof(req), &friend_req_sent_cb, NULL);
}
-static void req_sent(u16_t duration, int err, void *user_data)
+static void req_sent(uint16_t duration, int err, void *user_data)
{
struct bt_mesh_lpn *lpn = &bt_mesh.lpn;
@@ -337,6 +347,7 @@ static void req_sent(u16_t duration, int err, void *user_data)
k_delayed_work_submit(&lpn->timer,
LPN_RECV_DELAY - SCAN_LATENCY);
} else {
+ lpn_set_state(BT_MESH_LPN_WAIT_UPDATE);
k_delayed_work_submit(&lpn->timer,
LPN_RECV_DELAY + duration +
lpn->recv_win);
@@ -350,20 +361,20 @@ static const struct bt_mesh_send_cb req_sent_cb = {
static int send_friend_poll(void)
{
struct bt_mesh_msg_ctx ctx = {
- .net_idx = bt_mesh.sub[0].net_idx,
+ .net_idx = bt_mesh.lpn.sub->net_idx,
.app_idx = BT_MESH_KEY_UNUSED,
.addr = bt_mesh.lpn.frnd,
.send_ttl = 0,
};
struct bt_mesh_net_tx tx = {
- .sub = &bt_mesh.sub[0],
+ .sub = bt_mesh.lpn.sub,
.ctx = &ctx,
.src = bt_mesh_primary_addr(),
.xmit = POLL_XMIT,
.friend_cred = true,
};
struct bt_mesh_lpn *lpn = &bt_mesh.lpn;
- u8_t fsn = lpn->fsn;
+ uint8_t fsn = lpn->fsn;
int err;
BT_DBG("lpn->sent_req 0x%02x", lpn->sent_req);
@@ -377,7 +388,7 @@ static int send_friend_poll(void)
}
err = bt_mesh_ctl_send(&tx, TRANS_CTL_OP_FRIEND_POLL, &fsn, 1,
- NULL, &req_sent_cb, NULL);
+ &req_sent_cb, NULL);
if (err == 0) {
lpn->pending_poll = 0;
lpn->sent_req = TRANS_CTL_OP_FRIEND_POLL;
@@ -477,14 +488,22 @@ void bt_mesh_lpn_msg_received(struct bt_mesh_net_rx *rx)
send_friend_poll();
}
+static int friend_cred_create(struct bt_mesh_net_cred *cred,
+ const uint8_t key[16])
+{
+ struct bt_mesh_lpn *lpn = &bt_mesh.lpn;
+
+ return bt_mesh_friend_cred_create(cred, bt_mesh_primary_addr(),
+ lpn->frnd, lpn->lpn_counter,
+ lpn->frnd_counter, key);
+}
+
int bt_mesh_lpn_friend_offer(struct bt_mesh_net_rx *rx,
struct os_mbuf *buf)
{
struct bt_mesh_ctl_friend_offer *msg = (void *)buf->om_data;
struct bt_mesh_lpn *lpn = &bt_mesh.lpn;
- struct bt_mesh_subnet *sub = rx->sub;
- struct friend_cred *cred;
- u16_t frnd_counter;
+ uint16_t frnd_counter;
int err;
if (buf->om_len < sizeof(*msg)) {
@@ -508,16 +527,24 @@ int bt_mesh_lpn_friend_offer(struct bt_mesh_net_rx *rx,
msg->recv_win, msg->queue_size, msg->sub_list_size, msg->rssi,
frnd_counter);
+ lpn->frnd_counter = frnd_counter;
lpn->frnd = rx->ctx.addr;
- cred = friend_cred_create(sub, lpn->frnd, lpn->counter, frnd_counter);
- if (!cred) {
- lpn->frnd = BT_MESH_ADDR_UNASSIGNED;
- return -ENOMEM;
- }
+ /* Create friend credentials for each of the valid keys in the
+ * friendship subnet:
+ */
+ for (int i = 0; i < ARRAY_SIZE(lpn->cred); i++) {
+ if (!lpn->sub->keys[i].valid) {
+ continue;
+ }
+ err = friend_cred_create(&lpn->cred[i], lpn->sub->keys[i].net);
+ if (err) {
+ lpn->frnd = BT_MESH_ADDR_UNASSIGNED;
+ return err;
+ }
+ }
/* TODO: Add offer acceptance criteria check */
-
k_delayed_work_cancel(&lpn->timer);
lpn->recv_win = msg->recv_win;
@@ -525,15 +552,13 @@ int bt_mesh_lpn_friend_offer(struct bt_mesh_net_rx *rx,
err = send_friend_poll();
if (err) {
- friend_cred_clear(cred);
+ lpn->sub = NULL;
lpn->frnd = BT_MESH_ADDR_UNASSIGNED;
lpn->recv_win = 0;
lpn->queue_size = 0;
return err;
}
- lpn->counter++;
-
return 0;
}
@@ -542,7 +567,7 @@ int bt_mesh_lpn_friend_clear_cfm(struct bt_mesh_net_rx *rx,
{
struct bt_mesh_ctl_friend_clear_confirm *msg = (void *)buf->om_data;
struct bt_mesh_lpn *lpn = &bt_mesh.lpn;
- u16_t addr, counter;
+ uint16_t addr, counter;
if (buf->om_len < sizeof(*msg)) {
BT_WARN("Too short Friend Clear Confirm");
@@ -559,7 +584,7 @@ int bt_mesh_lpn_friend_clear_cfm(struct bt_mesh_net_rx *rx,
BT_DBG("LPNAddress 0x%04x LPNCounter 0x%04x", addr, counter);
- if (addr != bt_mesh_primary_addr() || counter != lpn->counter) {
+ if (addr != bt_mesh_primary_addr() || counter != lpn->lpn_counter) {
BT_WARN("Invalid parameters in Friend Clear Confirm");
return 0;
}
@@ -570,10 +595,10 @@ int bt_mesh_lpn_friend_clear_cfm(struct bt_mesh_net_rx *rx,
return 0;
}
-static void lpn_group_add(u16_t group)
+static void lpn_group_add(uint16_t group)
{
struct bt_mesh_lpn *lpn = &bt_mesh.lpn;
- u16_t *free_slot = NULL;
+ uint16_t *free_slot = NULL;
int i;
for (i = 0; i < ARRAY_SIZE(lpn->groups); i++) {
@@ -596,7 +621,7 @@ static void lpn_group_add(u16_t group)
lpn->groups_changed = 1;
}
-static void lpn_group_del(u16_t group)
+static void lpn_group_del(uint16_t group)
{
struct bt_mesh_lpn *lpn = &bt_mesh.lpn;
int i;
@@ -627,18 +652,18 @@ static inline int group_popcount(atomic_t *target)
#endif
}
-static bool sub_update(u8_t op)
+static bool sub_update(uint8_t op)
{
struct bt_mesh_lpn *lpn = &bt_mesh.lpn;
int added_count = group_popcount(lpn->added);
struct bt_mesh_msg_ctx ctx = {
- .net_idx = bt_mesh.sub[0].net_idx,
+ .net_idx = lpn->sub->net_idx,
.app_idx = BT_MESH_KEY_UNUSED,
.addr = lpn->frnd,
.send_ttl = 0,
};
struct bt_mesh_net_tx tx = {
- .sub = &bt_mesh.sub[0],
+ .sub = lpn->sub,
.ctx = &ctx,
.src = bt_mesh_primary_addr(),
.xmit = POLL_XMIT,
@@ -688,8 +713,8 @@ static bool sub_update(u8_t op)
req.xact = lpn->xact_next++;
- if (bt_mesh_ctl_send(&tx, op, &req, 1 + g * 2, NULL,
- &req_sent_cb, NULL) < 0) {
+ if (bt_mesh_ctl_send(&tx, op, &req, 1 + g * 2,
+ &req_sent_cb, NULL) < 0) {
group_zero(lpn->pending);
return false;
}
@@ -711,7 +736,7 @@ static void update_timeout(struct bt_mesh_lpn *lpn)
bt_mesh_scan_disable();
}
- if (lpn->req_attempts < 6) {
+ if (lpn->req_attempts < REQ_ATTEMPTS(lpn)) {
BT_WARN("Retrying first Friend Poll");
lpn->sent_req = 0;
if (send_friend_poll() == 0) {
@@ -759,14 +784,14 @@ static void lpn_timeout(struct ble_npl_event *work)
if (IS_ENABLED(CONFIG_BT_MESH_LPN_ESTABLISHMENT)) {
bt_mesh_scan_disable();
}
- lpn->counter++;
+ lpn->lpn_counter++;
lpn_set_state(BT_MESH_LPN_ENABLED);
lpn->sent_req = 0U;
k_delayed_work_submit(&lpn->timer, FRIEND_REQ_RETRY_TIMEOUT);
break;
case BT_MESH_LPN_ESTABLISHED:
if (lpn->req_attempts < REQ_ATTEMPTS(lpn)) {
- u8_t req = lpn->sent_req;
+ uint8_t req = lpn->sent_req;
lpn->sent_req = 0;
@@ -800,7 +825,7 @@ static void lpn_timeout(struct ble_npl_event *work)
}
}
-void bt_mesh_lpn_group_add(u16_t group)
+void bt_mesh_lpn_group_add(uint16_t group)
{
BT_DBG("group 0x%04x", group);
@@ -813,7 +838,7 @@ void bt_mesh_lpn_group_add(u16_t group)
sub_update(TRANS_CTL_OP_FRIEND_SUB_ADD);
}
-void bt_mesh_lpn_group_del(u16_t *groups, size_t group_count)
+void bt_mesh_lpn_group_del(uint16_t *groups, size_t group_count)
{
int i;
@@ -831,7 +856,7 @@ void bt_mesh_lpn_group_del(u16_t *groups, size_t group_count)
sub_update(TRANS_CTL_OP_FRIEND_SUB_REM);
}
-static s32_t poll_timeout(struct bt_mesh_lpn *lpn)
+static int32_t poll_timeout(struct bt_mesh_lpn *lpn)
{
/* If we're waiting for segment acks keep polling at high freq */
if (bt_mesh_tx_in_progress()) {
@@ -908,7 +933,9 @@ int bt_mesh_lpn_friend_sub_cfm(struct bt_mesh_net_rx *rx,
}
if (!lpn->sent_req) {
- k_delayed_work_submit(&lpn->timer, poll_timeout(lpn));
+ int32_t timeout = poll_timeout(lpn);
+
+ k_delayed_work_submit(&lpn->timer, K_MSEC(timeout));
}
return 0;
@@ -920,7 +947,7 @@ int bt_mesh_lpn_friend_update(struct bt_mesh_net_rx *rx,
struct bt_mesh_ctl_friend_update *msg = (void *)buf->om_data;
struct bt_mesh_lpn *lpn = &bt_mesh.lpn;
struct bt_mesh_subnet *sub = rx->sub;
- u32_t iv_index;
+ uint32_t iv_index;
if (buf->om_len < sizeof(*msg)) {
BT_WARN("Too short Friend Update");
@@ -944,8 +971,6 @@ int bt_mesh_lpn_friend_update(struct bt_mesh_net_rx *rx,
}
if (!lpn->established) {
- struct bt_mesh_cfg_srv *cfg = bt_mesh_cfg_get();
-
/* This is normally checked on the transport layer, however
* in this state we're also still accepting master
* credentials so we need to ensure the right ones (Friend
@@ -960,9 +985,7 @@ int bt_mesh_lpn_friend_update(struct bt_mesh_net_rx *rx,
BT_INFO("Friendship established with 0x%04x", lpn->frnd);
- if (cfg->hb_pub.feat & BT_MESH_FEAT_LOW_POWER) {
- bt_mesh_heartbeat_send();
- }
+ bt_mesh_hb_feature_changed(BT_MESH_FEAT_LOW_POWER);
if (lpn_cb) {
lpn_cb(lpn->frnd, true);
@@ -980,11 +1003,7 @@ int bt_mesh_lpn_friend_update(struct bt_mesh_net_rx *rx,
BT_DBG("flags 0x%02x iv_index 0x%08x md %u", msg->flags,
(unsigned) iv_index, msg->md);
- if (bt_mesh_kr_update(sub, BT_MESH_KEY_REFRESH(msg->flags),
- rx->new_key)) {
- bt_mesh_net_beacon_update(sub);
- }
-
+ bt_mesh_kr_update(sub, BT_MESH_KEY_REFRESH(msg->flags), rx->new_key);
bt_mesh_net_iv_update(iv_index, BT_MESH_IV_UPDATE(msg->flags));
if (lpn->groups_changed) {
@@ -1002,7 +1021,9 @@ int bt_mesh_lpn_friend_update(struct bt_mesh_net_rx *rx,
}
if (!lpn->sent_req) {
- k_delayed_work_submit(&lpn->timer, poll_timeout(lpn));
+ int32_t timeout = poll_timeout(lpn);
+
+ k_delayed_work_submit(&lpn->timer, K_MSEC(timeout));
}
return 0;
@@ -1019,17 +1040,41 @@ int bt_mesh_lpn_poll(void)
return send_friend_poll();
}
-void bt_mesh_lpn_set_cb(void (*cb)(u16_t friend_addr, bool established))
+void bt_mesh_lpn_set_cb(void (*cb)(uint16_t friend_addr, bool established))
{
lpn_cb = cb;
}
+static void subnet_evt(struct bt_mesh_subnet *sub, enum bt_mesh_key_evt evt)
+{
+ switch (evt) {
+ case BT_MESH_KEY_DELETED:
+ if (sub == bt_mesh.lpn.sub) {
+ BT_DBG("NetKey deleted");
+ clear_friendship(true, false);
+ }
+ break;
+ case BT_MESH_KEY_UPDATED:
+ BT_DBG("NetKey updated");
+ friend_cred_create(&bt_mesh.lpn.cred[1], sub->keys[1].net);
+ break;
+ default:
+ break;
+ }
+}
+
int bt_mesh_lpn_init(void)
{
struct bt_mesh_lpn *lpn = &bt_mesh.lpn;
+ if (!bt_mesh_subnet_cb_list[2]) {
+ bt_mesh_subnet_cb_list[2] = subnet_evt;
+ }
+
BT_DBG("");
+ lpn->groups_changed = 0;
+
k_delayed_work_init(&lpn->timer, lpn_timeout);
if (lpn->state == BT_MESH_LPN_ENABLED) {
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/lpn.h b/src/libs/mynewt-nimble/nimble/host/mesh/src/lpn.h
index 0ff6c9cf..90de2ca0 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/src/lpn.h
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/lpn.h
@@ -28,7 +28,7 @@ static inline bool bt_mesh_lpn_established(void)
#endif
}
-static inline bool bt_mesh_lpn_match(u16_t addr)
+static inline bool bt_mesh_lpn_match(uint16_t addr)
{
#if (MYNEWT_VAL(BLE_MESH_LOW_POWER))
if (bt_mesh_lpn_established()) {
@@ -58,8 +58,8 @@ static inline bool bt_mesh_lpn_timer(void)
void bt_mesh_lpn_msg_received(struct bt_mesh_net_rx *rx);
-void bt_mesh_lpn_group_add(u16_t group);
-void bt_mesh_lpn_group_del(u16_t *groups, size_t group_count);
+void bt_mesh_lpn_group_add(uint16_t group);
+void bt_mesh_lpn_group_del(uint16_t *groups, size_t group_count);
void bt_mesh_lpn_disable(bool force);
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/mesh.c b/src/libs/mynewt-nimble/nimble/host/mesh/src/mesh.c
index 52fbdbf6..bfb0e1af 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/src/mesh.c
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/mesh.c
@@ -18,7 +18,12 @@
#include "adv.h"
#include "prov.h"
+#include "provisioner.h"
#include "net.h"
+#include "subnet.h"
+#include "app_keys.h"
+#include "rpl.h"
+#include "cfg.h"
#include "beacon.h"
#include "lpn.h"
#include "friend.h"
@@ -26,16 +31,18 @@
#include "access.h"
#include "foundation.h"
#include "proxy.h"
+#include "heartbeat.h"
#include "shell.h"
#include "mesh_priv.h"
#include "settings.h"
-u8_t g_mesh_addr_type;
+
+uint8_t g_mesh_addr_type;
static struct ble_gap_event_listener mesh_event_listener;
-int bt_mesh_provision(const u8_t net_key[16], u16_t net_idx,
- u8_t flags, u32_t iv_index, u16_t addr,
- const u8_t dev_key[16])
+int bt_mesh_provision(const uint8_t net_key[16], uint16_t net_idx,
+ uint8_t flags, uint32_t iv_index, uint16_t addr,
+ const uint8_t dev_key[16])
{
bool pb_gatt_enabled;
int err;
@@ -58,6 +65,53 @@ int bt_mesh_provision(const u8_t net_key[16], u16_t net_idx,
pb_gatt_enabled = false;
}
+ /*
+ * FIXME:
+ * Should net_key and iv_index be over-ridden?
+ */
+ if (IS_ENABLED(BLE_MESH_CDB)) {
+ const struct bt_mesh_comp *comp;
+ const struct bt_mesh_prov *prov;
+ struct bt_mesh_cdb_node *node;
+
+ if (!atomic_test_bit(bt_mesh_cdb.flags,
+ BT_MESH_CDB_VALID)) {
+ BT_ERR("No valid network");
+ atomic_clear_bit(bt_mesh.flags, BT_MESH_VALID);
+ return -EINVAL;
+ }
+
+ comp = bt_mesh_comp_get();
+ if (comp == NULL) {
+ BT_ERR("Failed to get node composition");
+ atomic_clear_bit(bt_mesh.flags, BT_MESH_VALID);
+ return -EINVAL;
+ }
+
+ if (!bt_mesh_cdb_subnet_get(net_idx)) {
+ BT_ERR("No subnet with idx %d", net_idx);
+ atomic_clear_bit(bt_mesh.flags, BT_MESH_VALID);
+ return -ENOENT;
+ }
+
+ prov = bt_mesh_prov_get();
+ node = bt_mesh_cdb_node_alloc(prov->uuid, addr,
+ comp->elem_count, net_idx);
+ if (node == NULL) {
+ BT_ERR("Failed to allocate database node");
+ atomic_clear_bit(bt_mesh.flags, BT_MESH_VALID);
+ return -ENOMEM;
+ }
+
+ addr = node->addr;
+ iv_index = bt_mesh_cdb.iv_index;
+ memcpy(node->dev_key, dev_key, 16);
+
+ if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
+ bt_mesh_store_cdb_node(node);
+ }
+ }
+
err = bt_mesh_net_create(net_idx, flags, net_key, iv_index);
if (err) {
atomic_clear_bit(bt_mesh.flags, BT_MESH_VALID);
@@ -75,20 +129,18 @@ int bt_mesh_provision(const u8_t net_key[16], u16_t net_idx,
memcpy(bt_mesh.dev_key, dev_key, 16);
- if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
- BT_DBG("Storing network information persistently");
- bt_mesh_store_net();
- bt_mesh_store_subnet(&bt_mesh.sub[0]);
- bt_mesh_store_iv(false);
+ if (IS_ENABLED(CONFIG_BT_MESH_LOW_POWER) &&
+ IS_ENABLED(CONFIG_BT_MESH_LPN_SUB_ALL_NODES_ADDR)) {
+ bt_mesh_lpn_group_add(BT_MESH_ADDR_ALL_NODES);
}
- bt_mesh_net_start();
+ bt_mesh_start();
return 0;
}
-int bt_mesh_provision_adv(const u8_t uuid[16], u16_t net_idx, u16_t addr,
- u8_t attention_duration)
+int bt_mesh_provision_adv(const uint8_t uuid[16], uint16_t net_idx, uint16_t addr,
+ uint8_t attention_duration)
{
if (!atomic_test_bit(bt_mesh.flags, BT_MESH_VALID)) {
return -EINVAL;
@@ -122,25 +174,30 @@ void bt_mesh_reset(void)
bt_mesh_cfg_reset();
- bt_mesh_rx_reset();
- bt_mesh_tx_reset();
+ bt_mesh_trans_reset();
+ bt_mesh_app_keys_reset();
+ bt_mesh_net_keys_reset();
+
+ bt_mesh_net_loopback_clear(BT_MESH_KEY_ANY);
if ((MYNEWT_VAL(BLE_MESH_LOW_POWER))) {
+ if (IS_ENABLED(CONFIG_BT_MESH_LPN_SUB_ALL_NODES_ADDR)) {
+ uint16_t group = BT_MESH_ADDR_ALL_NODES;
+
+ bt_mesh_lpn_group_del(&group, 1);
+ }
+
bt_mesh_lpn_disable(true);
}
if ((MYNEWT_VAL(BLE_MESH_FRIEND))) {
- bt_mesh_friend_clear_net_idx(BT_MESH_KEY_ANY);
+ bt_mesh_friends_clear();
}
if ((MYNEWT_VAL(BLE_MESH_GATT_PROXY))) {
bt_mesh_proxy_gatt_disable();
}
- if ((MYNEWT_VAL(BLE_MESH_PB_GATT))) {
- bt_mesh_proxy_prov_enable();
- }
-
if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
bt_mesh_clear_net();
}
@@ -162,55 +219,6 @@ bool bt_mesh_is_provisioned(void)
return atomic_test_bit(bt_mesh.flags, BT_MESH_VALID);
}
-int bt_mesh_prov_enable(bt_mesh_prov_bearer_t bearers)
-{
- if (bt_mesh_is_provisioned()) {
- return -EALREADY;
- }
-
- char uuid_buf[BLE_UUID_STR_LEN];
- const struct bt_mesh_prov *prov = bt_mesh_prov_get();
- ble_uuid_t *uuid = BLE_UUID128_DECLARE();
-
- memcpy(BLE_UUID128(uuid)->value, prov->uuid, 16);
- BT_INFO("Device UUID: %s", ble_uuid_to_str(uuid, uuid_buf));
-
- if (IS_ENABLED(CONFIG_BT_MESH_PB_ADV) &&
- (bearers & BT_MESH_PROV_ADV)) {
- /* Make sure we're scanning for provisioning inviations */
- bt_mesh_scan_enable();
- /* Enable unprovisioned beacon sending */
- bt_mesh_beacon_enable();
- }
-
- if (IS_ENABLED(CONFIG_BT_MESH_PB_GATT) &&
- (bearers & BT_MESH_PROV_GATT)) {
- bt_mesh_proxy_prov_enable();
- bt_mesh_adv_update();
- }
-
- return 0;
-}
-
-int bt_mesh_prov_disable(bt_mesh_prov_bearer_t bearers)
-{
- if (bt_mesh_is_provisioned()) {
- return -EALREADY;
- }
-
- if (IS_ENABLED(CONFIG_BT_MESH_PB_ADV) &&
- (bearers & BT_MESH_PROV_ADV)) {
- bt_mesh_beacon_disable();
- bt_mesh_scan_disable();
- }
-
- if (IS_ENABLED(CONFIG_BT_MESH_PB_GATT) &&
- (bearers & BT_MESH_PROV_GATT)) {
- bt_mesh_proxy_prov_disable(true);
- }
-
- return 0;
-}
static int bt_mesh_gap_event(struct ble_gap_event *event, void *arg)
{
@@ -251,9 +259,9 @@ int bt_mesh_suspend(void)
return err;
}
- bt_mesh_hb_pub_disable();
+ bt_mesh_hb_suspend();
- if (bt_mesh_beacon_get() == BT_MESH_BEACON_ENABLED) {
+ if (bt_mesh_beacon_enabled()) {
bt_mesh_beacon_disable();
}
@@ -266,7 +274,7 @@ static void model_resume(struct bt_mesh_model *mod, struct bt_mesh_elem *elem,
bool vnd, bool primary, void *user_data)
{
if (mod->pub && mod->pub->update) {
- s32_t period_ms = bt_mesh_model_pub_period_get(mod);
+ int32_t period_ms = bt_mesh_model_pub_period_get(mod);
if (period_ms) {
k_delayed_work_submit(&mod->pub->timer, period_ms);
@@ -293,7 +301,9 @@ int bt_mesh_resume(void)
return err;
}
- if (bt_mesh_beacon_get() == BT_MESH_BEACON_ENABLED) {
+ bt_mesh_hb_resume();
+
+ if (bt_mesh_beacon_enabled()) {
bt_mesh_beacon_enable();
}
@@ -317,45 +327,76 @@ int bt_mesh_init(uint8_t own_addr_type, const struct bt_mesh_prov *prov,
return err;
}
-#if (MYNEWT_VAL(BLE_MESH_PROV))
- err = bt_mesh_prov_init(prov);
- if (err) {
- return err;
- }
-#endif
-
#if (MYNEWT_VAL(BLE_MESH_PROXY))
bt_mesh_proxy_init();
#endif
#if (MYNEWT_VAL(BLE_MESH_PROV))
- /* Need this to proper link.rx.buf allocation */
- bt_mesh_prov_reset_link();
+ err = bt_mesh_prov_init(prov);
+ if (err) {
+ return err;
+ }
#endif
+ bt_mesh_cfg_init();
bt_mesh_net_init();
bt_mesh_trans_init();
+ bt_mesh_hb_init();
bt_mesh_beacon_init();
bt_mesh_adv_init();
-#if (MYNEWT_VAL(BLE_MESH_PB_ADV))
- /* Make sure we're scanning for provisioning inviations */
- bt_mesh_scan_enable();
- /* Enable unprovisioned beacon sending */
-
- bt_mesh_beacon_enable();
-#endif
-
-#if (MYNEWT_VAL(BLE_MESH_PB_GATT))
- bt_mesh_proxy_prov_enable();
+#if (MYNEWT_VAL(BLE_MESH_SETTINGS))
+ bt_mesh_settings_init();
#endif
ble_gap_event_listener_register(&mesh_event_listener,
bt_mesh_gap_event, NULL);
-#if (MYNEWT_VAL(BLE_MESH_SETTINGS))
- bt_mesh_settings_init();
-#endif
-
return 0;
}
+
+static void model_start(struct bt_mesh_model *mod, struct bt_mesh_elem *elem,
+ bool vnd, bool primary, void *user_data)
+{
+ if (mod->cb && mod->cb->start) {
+ mod->cb->start(mod);
+ }
+}
+
+int bt_mesh_start(void)
+{
+ if (bt_mesh_beacon_enabled()) {
+ bt_mesh_beacon_enable();
+ } else {
+ bt_mesh_beacon_disable();
+ }
+
+ if (IS_ENABLED(CONFIG_BT_MESH_GATT_PROXY) &&
+ bt_mesh_gatt_proxy_get() != BT_MESH_GATT_PROXY_NOT_SUPPORTED) {
+ bt_mesh_proxy_gatt_enable();
+ bt_mesh_adv_update();
+ }
+
+ if (IS_ENABLED(CONFIG_BT_MESH_LOW_POWER)) {
+ bt_mesh_lpn_init();
+ } else {
+ bt_mesh_scan_enable();
+ }
+
+ if (IS_ENABLED(CONFIG_BT_MESH_FRIEND)) {
+ bt_mesh_friend_init();
+ }
+
+ if (IS_ENABLED(CONFIG_BT_MESH_PROV)) {
+ struct bt_mesh_subnet *sub = bt_mesh_subnet_next(NULL);
+ uint16_t addr = bt_mesh_primary_addr();
+
+ bt_mesh_prov_complete(sub->net_idx, addr);
+ }
+
+ bt_mesh_hb_start();
+
+ bt_mesh_model_foreach(model_start, NULL);
+
+ return 0;
+} \ No newline at end of file
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/mesh_priv.h b/src/libs/mynewt-nimble/nimble/host/mesh/src/mesh_priv.h
index f09bb230..213f5437 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/src/mesh_priv.h
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/mesh_priv.h
@@ -8,14 +8,28 @@
#ifndef __MESH_PRIV_H
#define __MESH_PRIV_H
+#include <stdbool.h>
+#include <stdint.h>
+
#define BT_MESH_KEY_PRIMARY 0x0000
#define BT_MESH_KEY_ANY 0xffff
-#define BT_MESH_ADDR_IS_UNICAST(addr) ((addr) && (addr) < 0x8000)
-#define BT_MESH_ADDR_IS_GROUP(addr) ((addr) >= 0xc000 && (addr) <= 0xff00)
-#define BT_MESH_ADDR_IS_VIRTUAL(addr) ((addr) >= 0x8000 && (addr) < 0xc000)
-#define BT_MESH_ADDR_IS_RFU(addr) ((addr) >= 0xff00 && (addr) <= 0xfffb)
+enum bt_mesh_key_evt {
+ BT_MESH_KEY_ADDED, /* New key added */
+ BT_MESH_KEY_DELETED, /* Existing key deleted */
+ BT_MESH_KEY_UPDATED, /* KR phase 1, second key added */
+ BT_MESH_KEY_SWAPPED, /* KR phase 2, now sending on second key */
+ BT_MESH_KEY_REVOKED, /* KR phase 3, old key removed */
+};
+
+/** Appkey callback. Instantiate with @ref BT_MESH_APP_KEY_CB */
+struct bt_mesh_app_key_cb {
+ void (*evt_handler)(uint16_t app_idx, uint16_t net_idx,
+ enum bt_mesh_key_evt evt);
+};
+
struct bt_mesh_net;
+int bt_mesh_start(void);
#define OP_GEN_ONOFF_GET BT_MESH_MODEL_OP_2(0x82, 0x01)
#define OP_GEN_ONOFF_SET BT_MESH_MODEL_OP_2(0x82, 0x02)
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/model_cli.c b/src/libs/mynewt-nimble/nimble/host/mesh/src/model_cli.c
index b00cfa52..9755ec1f 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/src/model_cli.c
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/model_cli.c
@@ -11,19 +11,19 @@
#include "mesh/model_cli.h"
#include "mesh_priv.h"
-static s32_t msg_timeout = K_SECONDS(5);
+static int32_t msg_timeout = K_SECONDS(5);
static struct bt_mesh_gen_model_cli *gen_onoff_cli;
static struct bt_mesh_gen_model_cli *gen_level_cli;
-static u8_t transaction_id = 0;
+static uint8_t transaction_id = 0;
struct gen_onoff_param {
- u8_t *state;
+ uint8_t *state;
};
struct gen_level_param {
- s16_t *level;
+ int16_t *level;
};
static void gen_onoff_status(struct bt_mesh_model *model,
@@ -32,7 +32,7 @@ static void gen_onoff_status(struct bt_mesh_model *model,
{
struct bt_mesh_gen_model_cli *cli = model->user_data;
struct gen_onoff_param *param;
- u8_t state;
+ uint8_t state;
BT_DBG("net_idx 0x%04x app_idx 0x%04x src 0x%04x len %u: %s",
@@ -62,7 +62,7 @@ static void gen_level_status(struct bt_mesh_model *model,
{
struct bt_mesh_gen_model_cli *cli = model->user_data;
struct gen_level_param *param;
- s16_t level;
+ int16_t level;
BT_DBG("net_idx 0x%04x app_idx 0x%04x src 0x%04x len %u: %s",
@@ -138,7 +138,7 @@ const struct bt_mesh_model_cb bt_mesh_gen_level_cli_cb = {
.init = level_cli_init,
};
-static int cli_wait(struct bt_mesh_gen_model_cli *cli, void *param, u32_t op)
+static int cli_wait(struct bt_mesh_gen_model_cli *cli, void *param, uint32_t op)
{
int err;
@@ -155,8 +155,8 @@ static int cli_wait(struct bt_mesh_gen_model_cli *cli, void *param, u32_t op)
return err;
}
-int bt_mesh_gen_onoff_get(u16_t net_idx, u16_t addr, u16_t app_idx,
- u8_t *state)
+int bt_mesh_gen_onoff_get(uint16_t net_idx, uint16_t addr, uint16_t app_idx,
+ uint8_t *state)
{
struct os_mbuf *msg = NET_BUF_SIMPLE(2 + 0 + 4);
struct bt_mesh_msg_ctx ctx = {
@@ -184,8 +184,8 @@ done:
return err;
}
-int bt_mesh_gen_onoff_set(u16_t net_idx, u16_t addr, u16_t app_idx,
- u8_t val, u8_t *state)
+int bt_mesh_gen_onoff_set(uint16_t net_idx, uint16_t addr, uint16_t app_idx,
+ uint8_t val, uint8_t *state)
{
struct os_mbuf *msg = NET_BUF_SIMPLE(2 + 2 + 4);
struct bt_mesh_msg_ctx ctx = {
@@ -227,8 +227,8 @@ done:
return err;
}
-int bt_mesh_gen_level_get(u16_t net_idx, u16_t addr, u16_t app_idx,
- s16_t *level)
+int bt_mesh_gen_level_get(uint16_t net_idx, uint16_t addr, uint16_t app_idx,
+ int16_t *level)
{
struct os_mbuf *msg = NET_BUF_SIMPLE(2 + 0 + 4);
struct bt_mesh_msg_ctx ctx = {
@@ -256,8 +256,8 @@ done:
return err;
}
-int bt_mesh_gen_level_set(u16_t net_idx, u16_t addr, u16_t app_idx,
- s16_t val, s16_t *state)
+int bt_mesh_gen_level_set(uint16_t net_idx, uint16_t addr, uint16_t app_idx,
+ int16_t val, int16_t *state)
{
struct os_mbuf *msg = NET_BUF_SIMPLE(2 + 3 + 4);
struct bt_mesh_msg_ctx ctx = {
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/model_srv.c b/src/libs/mynewt-nimble/nimble/host/mesh/src/model_srv.c
index 5f5a8df4..b6f34360 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/src/model_srv.c
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/model_srv.c
@@ -20,7 +20,7 @@ static void gen_onoff_status(struct bt_mesh_model *model,
{
struct bt_mesh_gen_onoff_srv *cb = model->user_data;
struct os_mbuf *msg = NET_BUF_SIMPLE(3);
- u8_t *state;
+ uint8_t *state;
bt_mesh_model_msg_init(msg, OP_GEN_ONOFF_STATUS);
state = net_buf_simple_add(msg, 1);
@@ -51,7 +51,7 @@ static void gen_onoff_set_unack(struct bt_mesh_model *model,
struct os_mbuf *buf)
{
struct bt_mesh_gen_onoff_srv *cb = model->user_data;
- u8_t state;
+ uint8_t state;
state = buf->om_data[0];
@@ -77,7 +77,7 @@ static void gen_level_status(struct bt_mesh_model *model,
{
struct bt_mesh_gen_level_srv *cb = model->user_data;
struct os_mbuf *msg = NET_BUF_SIMPLE(4);
- s16_t *level;
+ int16_t *level;
bt_mesh_model_msg_init(msg, OP_GEN_LEVEL_STATUS);
level = net_buf_simple_add(msg, 2);
@@ -107,9 +107,9 @@ static void gen_level_set_unack(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf) {
struct bt_mesh_gen_level_srv *cb = model->user_data;
- s16_t level;
+ int16_t level;
- level = (s16_t) net_buf_simple_pull_le16(buf);
+ level = (int16_t) net_buf_simple_pull_le16(buf);
BT_DBG("level: %d", level);
if (cb && cb->set) {
@@ -130,7 +130,7 @@ static void light_lightness_status(struct bt_mesh_model *model,
{
struct bt_mesh_light_lightness_srv *cb = model->user_data;
struct os_mbuf *msg = NET_BUF_SIMPLE(4);
- s16_t *lightness;
+ int16_t *lightness;
bt_mesh_model_msg_init(msg, OP_LIGHT_LIGHTNESS_STATUS);
lightness = net_buf_simple_add(msg, 2);
@@ -160,9 +160,9 @@ static void light_lightness_set_unack(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct os_mbuf *buf) {
struct bt_mesh_light_lightness_srv *cb = model->user_data;
- s16_t lightness;
+ int16_t lightness;
- lightness = (s16_t) net_buf_simple_pull_le16(buf);
+ lightness = (int16_t) net_buf_simple_pull_le16(buf);
BT_DBG("lightness: %d", lightness);
if (cb && cb->set) {
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/net.c b/src/libs/mynewt-nimble/nimble/host/mesh/src/net.c
index 240314d4..8b86935d 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/src/net.c
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/net.c
@@ -20,6 +20,7 @@
#include "adv.h"
#include "mesh_priv.h"
#include "net.h"
+#include "rpl.h"
#include "lpn.h"
#include "friend.h"
#include "proxy.h"
@@ -29,6 +30,9 @@
#include "beacon.h"
#include "settings.h"
#include "prov.h"
+#include "cfg.h"
+#include "mesh/glue.h"
+#include "mesh/slist.h"
/* Minimum valid Mesh Network PDU length. The Network headers
* themselves take up 9 bytes. After that there is a minumum of 1 byte
@@ -38,6 +42,10 @@
*/
#define BT_MESH_NET_MIN_PDU_LEN (BT_MESH_NET_HDR_LEN + 1 + 8)
+#define LOOPBACK_MAX_PDU_LEN (BT_MESH_NET_HDR_LEN + 16)
+#define LOOPBACK_USER_DATA_SIZE sizeof(struct bt_mesh_subnet *)
+#define LOOPBACK_BUF_SUB(buf) (*(struct bt_mesh_subnet **)net_buf_user_data(buf))
+
/* Seq limit after IV Update is triggered */
#define IV_UPDATE_SEQ_LIMIT 8000000
@@ -45,54 +53,34 @@
#define NID(pdu) ((pdu)[0] & 0x7f)
#define CTL(pdu) ((pdu)[1] >> 7)
#define TTL(pdu) ((pdu)[1] & 0x7f)
-#define SEQ(pdu) (((u32_t)(pdu)[2] << 16) | \
- ((u32_t)(pdu)[3] << 8) | (u32_t)(pdu)[4]);
+#define SEQ(pdu) (sys_get_be24(&pdu[2]))
#define SRC(pdu) (sys_get_be16(&(pdu)[5]))
#define DST(pdu) (sys_get_be16(&(pdu)[7]))
-/* Determine how many friendship credentials we need */
-#if (MYNEWT_VAL(BLE_MESH_FRIEND))
-#define FRIEND_CRED_COUNT MYNEWT_VAL(BLE_MESH_FRIEND_LPN_COUNT)
-#elif (MYNEWT_VAL(BLE_MESH_LOW_POWER))
-#define FRIEND_CRED_COUNT MYNEWT_VAL(BLE_MESH_SUBNET_COUNT)
-#else
-#define FRIEND_CRED_COUNT 0
-#endif
-
-static struct friend_cred friend_cred[FRIEND_CRED_COUNT];
-
-static u64_t msg_cache[MYNEWT_VAL(BLE_MESH_MSG_CACHE_SIZE)];
-static u16_t msg_cache_next;
+static struct {
+ uint32_t src : 15, /* MSb of source is always 0 */
+ seq : 17;
+} msg_cache[MYNEWT_VAL(BLE_MESH_MSG_CACHE_SIZE)];
+static uint16_t msg_cache_next;
/* Singleton network context (the implementation only supports one) */
struct bt_mesh_net bt_mesh = {
.local_queue = STAILQ_HEAD_INITIALIZER(bt_mesh.local_queue),
- .sub = {
- [0 ... (MYNEWT_VAL(BLE_MESH_SUBNET_COUNT) - 1)] = {
- .net_idx = BT_MESH_KEY_UNUSED,
- }
- },
- .app_keys = {
- [0 ... (MYNEWT_VAL(BLE_MESH_APP_KEY_COUNT) - 1)] = {
- .net_idx = BT_MESH_KEY_UNUSED,
- }
- },
-#if MYNEWT_VAL(BLE_MESH_PROVISIONER)
- .nodes = {
- [0 ... (CONFIG_BT_MESH_NODE_COUNT - 1)] = {
- .net_idx = BT_MESH_KEY_UNUSED,
- }
- },
-#endif
};
-static u32_t dup_cache[4];
+static struct os_mbuf_pool loopback_os_mbuf_pool;
+static struct os_mempool loopback_buf_mempool;
+os_membuf_t loopback_mbuf_membuf[
+ OS_MEMPOOL_SIZE(LOOPBACK_MAX_PDU_LEN + BT_MESH_MBUF_HEADER_SIZE,
+ MYNEWT_VAL(BLE_MESH_LOOPBACK_BUFS))];
+
+static uint32_t dup_cache[MYNEWT_VAL(BLE_MESH_MSG_CACHE_SIZE)];
static int dup_cache_next;
static bool check_dup(struct os_mbuf *data)
{
- const u8_t *tail = net_buf_simple_tail(data);
- u32_t val;
+ const uint8_t *tail = net_buf_simple_tail(data);
+ uint32_t val;
int i;
val = sys_get_be32(tail - 4) ^ sys_get_be32(tail - 8);
@@ -109,364 +97,52 @@ static bool check_dup(struct os_mbuf *data)
return false;
}
-static u64_t msg_hash(struct bt_mesh_net_rx *rx, struct os_mbuf *pdu)
-{
- u32_t hash1, hash2;
-
- /* Three least significant bytes of IVI + first byte of SEQ */
- hash1 = (BT_MESH_NET_IVI_RX(rx) << 8) | pdu->om_data[2];
-
- /* Two last bytes of SEQ + SRC */
- memcpy(&hash2, &pdu->om_data[3], 4);
-
- return (u64_t)hash1 << 32 | (u64_t)hash2;
-}
-
-static bool msg_cache_match(struct bt_mesh_net_rx *rx,
- struct os_mbuf *pdu)
+static bool msg_cache_match(struct os_mbuf *pdu)
{
- u64_t hash = msg_hash(rx, pdu);
- u16_t i;
+ uint16_t i;
for (i = 0; i < ARRAY_SIZE(msg_cache); i++) {
- if (msg_cache[i] == hash) {
+ if (msg_cache[i].src == SRC(pdu->om_data) &&
+ msg_cache[i].seq == (SEQ(pdu->om_data) & BIT_MASK(17))) {
return true;
}
}
- /* Add to the cache */
- rx->msg_cache_idx = msg_cache_next++;
- msg_cache[rx->msg_cache_idx] = hash;
- msg_cache_next %= ARRAY_SIZE(msg_cache);
-
return false;
}
-struct bt_mesh_subnet *bt_mesh_subnet_get(u16_t net_idx)
+static void msg_cache_add(struct bt_mesh_net_rx *rx)
{
- int i;
-
- if (net_idx == BT_MESH_KEY_ANY) {
- return &bt_mesh.sub[0];
- }
-
- for (i = 0; i < ARRAY_SIZE(bt_mesh.sub); i++) {
- if (bt_mesh.sub[i].net_idx == net_idx) {
- return &bt_mesh.sub[i];
- }
- }
-
- return NULL;
+ /* Add to the cache */
+ rx->msg_cache_idx = msg_cache_next++;
+ msg_cache[rx->msg_cache_idx].src = rx->ctx.addr;
+ msg_cache[rx->msg_cache_idx].seq = rx->seq;
+ msg_cache_next %= ARRAY_SIZE(msg_cache);
}
-int bt_mesh_net_keys_create(struct bt_mesh_subnet_keys *keys,
- const u8_t key[16])
+int bt_mesh_net_create(uint16_t idx, uint8_t flags, const uint8_t key[16],
+ uint32_t iv_index)
{
- u8_t p[] = { 0 };
- u8_t nid;
int err;
- err = bt_mesh_k2(key, p, sizeof(p), &nid, keys->enc, keys->privacy);
- if (err) {
- BT_ERR("Unable to generate NID, EncKey & PrivacyKey");
- return err;
- }
-
- memcpy(keys->net, key, 16);
-
- keys->nid = nid;
-
- BT_DBG("NID 0x%02x EncKey %s", keys->nid, bt_hex(keys->enc, 16));
- BT_DBG("PrivacyKey %s", bt_hex(keys->privacy, 16));
+ BT_DBG("idx %u flags 0x%02x iv_index %u", idx, flags, iv_index);
- err = bt_mesh_k3(key, keys->net_id);
- if (err) {
- BT_ERR("Unable to generate Net ID");
- return err;
- }
-
- BT_DBG("NetID %s", bt_hex(keys->net_id, 8));
-
-#if (MYNEWT_VAL(BLE_MESH_GATT_PROXY))
- err = bt_mesh_identity_key(key, keys->identity);
- if (err) {
- BT_ERR("Unable to generate IdentityKey");
- return err;
- }
-
- BT_DBG("IdentityKey %s", bt_hex(keys->identity, 16));
-#endif /* GATT_PROXY */
-
- err = bt_mesh_beacon_key(key, keys->beacon);
- if (err) {
- BT_ERR("Unable to generate beacon key");
- return err;
- }
-
- BT_DBG("BeaconKey %s", bt_hex(keys->beacon, 16));
-
- return 0;
-}
-
-int friend_cred_set(struct friend_cred *cred, u8_t idx, const u8_t net_key[16])
-{
- u16_t lpn_addr, frnd_addr;
- int err;
- u8_t p[9];
+ BT_DBG("NetKey %s", bt_hex(key, 16));
-#if (MYNEWT_VAL(BLE_MESH_LOW_POWER))
- if (cred->addr == bt_mesh.lpn.frnd) {
- lpn_addr = bt_mesh_primary_addr();
- frnd_addr = cred->addr;
+ if (BT_MESH_KEY_REFRESH(flags)) {
+ err = bt_mesh_subnet_set(idx, BT_MESH_KR_PHASE_2, NULL, key);
} else {
- lpn_addr = cred->addr;
- frnd_addr = bt_mesh_primary_addr();
+ err = bt_mesh_subnet_set(idx, BT_MESH_KR_NORMAL, key, NULL);
}
-#else
- lpn_addr = cred->addr;
- frnd_addr = bt_mesh_primary_addr();
-#endif
-
- BT_DBG("LPNAddress 0x%04x FriendAddress 0x%04x", lpn_addr, frnd_addr);
- BT_DBG("LPNCounter 0x%04x FriendCounter 0x%04x", cred->lpn_counter,
- cred->frnd_counter);
-
- p[0] = 0x01;
- sys_put_be16(lpn_addr, p + 1);
- sys_put_be16(frnd_addr, p + 3);
- sys_put_be16(cred->lpn_counter, p + 5);
- sys_put_be16(cred->frnd_counter, p + 7);
- err = bt_mesh_k2(net_key, p, sizeof(p), &cred->cred[idx].nid,
- cred->cred[idx].enc, cred->cred[idx].privacy);
if (err) {
- BT_ERR("Unable to generate NID, EncKey & PrivacyKey");
+ BT_ERR("Failed creating subnet");
return err;
}
- BT_DBG("Friend NID 0x%02x EncKey %s", cred->cred[idx].nid,
- bt_hex(cred->cred[idx].enc, 16));
- BT_DBG("Friend PrivacyKey %s", bt_hex(cred->cred[idx].privacy, 16));
-
- return 0;
-}
-
-void friend_cred_refresh(u16_t net_idx)
-{
- int i;
-
- for (i = 0; i < ARRAY_SIZE(friend_cred); i++) {
- struct friend_cred *cred = &friend_cred[i];
-
- if (cred->addr != BT_MESH_ADDR_UNASSIGNED &&
- cred->net_idx == net_idx) {
- memcpy(&cred->cred[0], &cred->cred[1],
- sizeof(cred->cred[0]));
- }
- }
-}
-
-int friend_cred_update(struct bt_mesh_subnet *sub)
-{
- int err, i;
-
- BT_DBG("net_idx 0x%04x", sub->net_idx);
-
- for (i = 0; i < ARRAY_SIZE(friend_cred); i++) {
- struct friend_cred *cred = &friend_cred[i];
-
- if (cred->addr == BT_MESH_ADDR_UNASSIGNED ||
- cred->net_idx != sub->net_idx) {
- continue;
- }
-
- err = friend_cred_set(cred, 1, sub->keys[1].net);
- if (err) {
- return err;
- }
- }
-
- return 0;
-}
-
-struct friend_cred *friend_cred_create(struct bt_mesh_subnet *sub, u16_t addr,
- u16_t lpn_counter, u16_t frnd_counter)
-{
- struct friend_cred *cred;
- int i, err;
-
- BT_DBG("net_idx 0x%04x addr 0x%04x", sub->net_idx, addr);
-
- for (cred = NULL, i = 0; i < ARRAY_SIZE(friend_cred); i++) {
- if ((friend_cred[i].addr == BT_MESH_ADDR_UNASSIGNED) ||
- (friend_cred[i].addr == addr &&
- friend_cred[i].net_idx == sub->net_idx)) {
- cred = &friend_cred[i];
- break;
- }
- }
-
- if (!cred) {
- BT_WARN("No free friend credential slots");
- return NULL;
- }
-
- cred->net_idx = sub->net_idx;
- cred->addr = addr;
- cred->lpn_counter = lpn_counter;
- cred->frnd_counter = frnd_counter;
-
- err = friend_cred_set(cred, 0, sub->keys[0].net);
- if (err) {
- friend_cred_clear(cred);
- return NULL;
- }
-
- if (sub->kr_flag) {
- err = friend_cred_set(cred, 1, sub->keys[1].net);
- if (err) {
- friend_cred_clear(cred);
- return NULL;
- }
- }
-
- return cred;
-}
-
-void friend_cred_clear(struct friend_cred *cred)
-{
- cred->net_idx = BT_MESH_KEY_UNUSED;
- cred->addr = BT_MESH_ADDR_UNASSIGNED;
- cred->lpn_counter = 0;
- cred->frnd_counter = 0;
- memset(cred->cred, 0, sizeof(cred->cred));
-}
-
-int friend_cred_del(u16_t net_idx, u16_t addr)
-{
- int i;
-
- for (i = 0; i < ARRAY_SIZE(friend_cred); i++) {
- struct friend_cred *cred = &friend_cred[i];
-
- if (cred->addr == addr && cred->net_idx == net_idx) {
- friend_cred_clear(cred);
- return 0;
- }
- }
-
- return -ENOENT;
-}
-
-int friend_cred_get(struct bt_mesh_subnet *sub, u16_t addr, u8_t *nid,
- const u8_t **enc, const u8_t **priv)
-{
- int i;
-
- BT_DBG("net_idx 0x%04x addr 0x%04x", sub->net_idx, addr);
-
- for (i = 0; i < ARRAY_SIZE(friend_cred); i++) {
- struct friend_cred *cred = &friend_cred[i];
-
- if (cred->net_idx != sub->net_idx) {
- continue;
- }
-
- if (addr != BT_MESH_ADDR_UNASSIGNED && cred->addr != addr) {
- continue;
- }
-
- if (nid) {
- *nid = cred->cred[sub->kr_flag].nid;
- }
-
- if (enc) {
- *enc = cred->cred[sub->kr_flag].enc;
- }
-
- if (priv) {
- *priv = cred->cred[sub->kr_flag].privacy;
- }
-
- return 0;
- }
-
- return -ENOENT;
-}
-
-u8_t bt_mesh_net_flags(struct bt_mesh_subnet *sub)
-{
- u8_t flags = 0x00;
-
- if (sub && sub->kr_flag) {
- flags |= BT_MESH_NET_FLAG_KR;
- }
-
- if (atomic_test_bit(bt_mesh.flags, BT_MESH_IVU_IN_PROGRESS)) {
- flags |= BT_MESH_NET_FLAG_IVU;
- }
-
- return flags;
-}
-
-int bt_mesh_net_beacon_update(struct bt_mesh_subnet *sub)
-{
- u8_t flags = bt_mesh_net_flags(sub);
- struct bt_mesh_subnet_keys *keys;
-
- if (sub->kr_flag) {
- BT_DBG("NetIndex %u Using new key", sub->net_idx);
- keys = &sub->keys[1];
- } else {
- BT_DBG("NetIndex %u Using current key", sub->net_idx);
- keys = &sub->keys[0];
- }
-
- BT_DBG("flags 0x%02x, IVI 0x%08x", flags, (unsigned) bt_mesh.iv_index);
-
- return bt_mesh_beacon_auth(keys->beacon, flags, keys->net_id,
- bt_mesh.iv_index, sub->auth);
-}
-
-int bt_mesh_net_create(u16_t idx, u8_t flags, const u8_t key[16],
- u32_t iv_index)
-{
- struct bt_mesh_subnet *sub;
- int err;
-
- BT_DBG("idx %u flags 0x%02x iv_index %u", idx, flags,
- (unsigned) iv_index);
-
- BT_DBG("NetKey %s", bt_hex(key, 16));
-
(void)memset(msg_cache, 0, sizeof(msg_cache));
msg_cache_next = 0U;
- sub = &bt_mesh.sub[0];
-
- sub->kr_flag = BT_MESH_KEY_REFRESH(flags);
- if (sub->kr_flag) {
- err = bt_mesh_net_keys_create(&sub->keys[1], key);
- if (err) {
- return -EIO;
- }
-
- sub->kr_phase = BT_MESH_KR_PHASE_2;
- } else {
- err = bt_mesh_net_keys_create(&sub->keys[0], key);
- if (err) {
- return -EIO;
- }
- }
-
- sub->net_idx = idx;
-
- if ((MYNEWT_VAL(BLE_MESH_GATT_PROXY))) {
- sub->node_id = BT_MESH_NODE_IDENTITY_STOPPED;
- } else {
- sub->node_id = BT_MESH_NODE_IDENTITY_NOT_SUPPORTED;
- }
-
bt_mesh.iv_index = iv_index;
atomic_set_bit_to(bt_mesh.flags, BT_MESH_IVU_IN_PROGRESS,
BT_MESH_IV_UPDATE(flags));
@@ -477,94 +153,14 @@ int bt_mesh_net_create(u16_t idx, u8_t flags, const u8_t key[16],
*/
bt_mesh.ivu_duration = BT_MESH_IVU_MIN_HOURS;
- /* Make sure we have valid beacon data to be sent */
- bt_mesh_net_beacon_update(sub);
-
- return 0;
-}
-
-void bt_mesh_net_revoke_keys(struct bt_mesh_subnet *sub)
-{
- int i;
-
- BT_DBG("idx 0x%04x", sub->net_idx);
-
- memcpy(&sub->keys[0], &sub->keys[1], sizeof(sub->keys[0]));
-
- for (i = 0; i < ARRAY_SIZE(bt_mesh.app_keys); i++) {
- struct bt_mesh_app_key *key = &bt_mesh.app_keys[i];
-
- if (key->net_idx != sub->net_idx || !key->updated) {
- continue;
- }
-
- memcpy(&key->keys[0], &key->keys[1], sizeof(key->keys[0]));
- key->updated = false;
- }
-}
-
-bool bt_mesh_kr_update(struct bt_mesh_subnet *sub, u8_t new_kr, bool new_key)
-{
- if (new_kr != sub->kr_flag && sub->kr_phase == BT_MESH_KR_NORMAL) {
- BT_WARN("KR change in normal operation. Are we blacklisted?");
- return false;
- }
-
- sub->kr_flag = new_kr;
-
- if (sub->kr_flag) {
- if (sub->kr_phase == BT_MESH_KR_PHASE_1) {
- BT_DBG("Phase 1 -> Phase 2");
- sub->kr_phase = BT_MESH_KR_PHASE_2;
- return true;
- }
- } else {
- switch (sub->kr_phase) {
- case BT_MESH_KR_PHASE_1:
- if (!new_key) {
- /* Ignore */
- break;
- }
- /* Upon receiving a Secure Network beacon with the KR flag set
- * to 0 using the new NetKey in Phase 1, the node shall
- * immediately transition to Phase 3, which effectively skips
- * Phase 2.
- *
- * Intentional fall-through.
- */
- case BT_MESH_KR_PHASE_2:
- BT_DBG("KR Phase 0x%02x -> Normal", sub->kr_phase);
- bt_mesh_net_revoke_keys(sub);
- if ((MYNEWT_VAL(BLE_MESH_LOW_POWER)) ||
- (MYNEWT_VAL(BLE_MESH_FRIEND))) {
- friend_cred_refresh(sub->net_idx);
- }
- sub->kr_phase = BT_MESH_KR_NORMAL;
- return true;
- }
+ if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
+ BT_DBG("Storing network information persistently");
+ bt_mesh_store_net();
+ bt_mesh_store_subnet(idx);
+ bt_mesh_store_iv(false);
}
- return false;
-}
-
-void bt_mesh_rpl_reset(void)
-{
- int i;
-
- /* Discard "old old" IV Index entries from RPL and flag
- * any other ones (which are valid) as old.
- */
- for (i = 0; i < ARRAY_SIZE(bt_mesh.rpl); i++) {
- struct bt_mesh_rpl *rpl = &bt_mesh.rpl[i];
-
- if (rpl->src) {
- if (rpl->old_iv) {
- memset(rpl, 0, sizeof(*rpl));
- } else {
- rpl->old_iv = true;
- }
- }
- }
+ return 0;
}
#if MYNEWT_VAL(BLE_MESH_IV_UPDATE_TEST)
@@ -588,29 +184,12 @@ bool bt_mesh_iv_update(void)
bt_mesh_net_iv_update(bt_mesh.iv_index + 1, true);
}
- bt_mesh_net_sec_update(NULL);
-
return atomic_test_bit(bt_mesh.flags, BT_MESH_IVU_IN_PROGRESS);
}
#endif /* CONFIG_BT_MESH_IV_UPDATE_TEST */
-/* Used for sending immediate beacons to Friend queues and GATT clients */
-void bt_mesh_net_sec_update(struct bt_mesh_subnet *sub)
+bool bt_mesh_net_iv_update(uint32_t iv_index, bool iv_update)
{
- if (IS_ENABLED(CONFIG_BT_MESH_FRIEND)) {
- bt_mesh_friend_sec_update(sub ? sub->net_idx : BT_MESH_KEY_ANY);
- }
-
- if (IS_ENABLED(CONFIG_BT_MESH_GATT_PROXY) &&
- bt_mesh_gatt_proxy_get() == BT_MESH_GATT_PROXY_ENABLED) {
- bt_mesh_proxy_beacon_send(sub);
- }
-}
-
-bool bt_mesh_net_iv_update(u32_t iv_index, bool iv_update)
-{
- int i;
-
if (atomic_test_bit(bt_mesh.flags, BT_MESH_IVU_IN_PROGRESS)) {
/* We're currently in IV Update mode */
@@ -644,7 +223,7 @@ bool bt_mesh_net_iv_update(u32_t iv_index, bool iv_update)
if (iv_index > bt_mesh.iv_index + 1) {
BT_WARN("Performing IV Index Recovery");
- memset(bt_mesh.rpl, 0, sizeof(bt_mesh.rpl));
+ bt_mesh_rpl_clear();
bt_mesh.iv_index = iv_index;
bt_mesh.seq = 0;
goto do_update;
@@ -694,10 +273,20 @@ do_update:
k_delayed_work_submit(&bt_mesh.ivu_timer, BT_MESH_IVU_TIMEOUT);
- for (i = 0; i < ARRAY_SIZE(bt_mesh.sub); i++) {
- if (bt_mesh.sub[i].net_idx != BT_MESH_KEY_UNUSED) {
- bt_mesh_net_beacon_update(&bt_mesh.sub[i]);
- }
+ /* Notify other modules */
+ if (IS_ENABLED(CONFIG_BT_MESH_FRIEND)) {
+ bt_mesh_friend_sec_update(BT_MESH_KEY_ANY);
+ }
+
+ if (IS_ENABLED(CONFIG_BT_MESH_GATT_PROXY) &&
+ bt_mesh_gatt_proxy_get() == BT_MESH_GATT_PROXY_ENABLED) {
+ bt_mesh_proxy_beacon_send(NULL);
+ }
+
+ bt_mesh_subnet_foreach(bt_mesh_beacon_update);
+
+ if (MYNEWT_VAL(BLE_MESH_CDB)) {
+ bt_mesh_cdb_iv_update(iv_index, iv_update);
}
if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
@@ -707,9 +296,9 @@ do_update:
return true;
}
-u32_t bt_mesh_next_seq(void)
+uint32_t bt_mesh_next_seq(void)
{
- u32_t seq = bt_mesh.seq++;
+ uint32_t seq = bt_mesh.seq++;
if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
bt_mesh_store_seq();
@@ -720,89 +309,63 @@ u32_t bt_mesh_next_seq(void)
bt_mesh_subnet_get(BT_MESH_KEY_PRIMARY)) {
bt_mesh_beacon_ivu_initiator(true);
bt_mesh_net_iv_update(bt_mesh.iv_index + 1, true);
- bt_mesh_net_sec_update(NULL);
}
return seq;
}
-int bt_mesh_net_resend(struct bt_mesh_subnet *sub, struct os_mbuf *buf,
- bool new_key, const struct bt_mesh_send_cb *cb,
- void *cb_data)
-{
- const u8_t *enc, *priv;
- u32_t seq;
- u16_t dst;
- int err;
-
- BT_DBG("net_idx 0x%04x new_key %u len %u", sub->net_idx, new_key,
- buf->om_len);
-
- enc = sub->keys[new_key].enc;
- priv = sub->keys[new_key].privacy;
-
- err = bt_mesh_net_obfuscate(buf->om_data, BT_MESH_NET_IVI_TX, priv);
- if (err) {
- BT_ERR("deobfuscate failed (err %d)", err);
- return err;
- }
-
- err = bt_mesh_net_decrypt(enc, buf, BT_MESH_NET_IVI_TX, false);
- if (err) {
- BT_ERR("decrypt failed (err %d)", err);
- return err;
- }
-
- seq = bt_mesh_next_seq();
- buf->om_data[2] = seq >> 16;
- buf->om_data[3] = seq >> 8;
- buf->om_data[4] = seq;
-
- /* Get destination, in case it's a proxy client */
- dst = DST(buf->om_data);
-
- err = bt_mesh_net_encrypt(enc, buf, BT_MESH_NET_IVI_TX, false);
- if (err) {
- BT_ERR("encrypt failed (err %d)", err);
- return err;
- }
-
- err = bt_mesh_net_obfuscate(buf->om_data, BT_MESH_NET_IVI_TX, priv);
- if (err) {
- BT_ERR("obfuscate failed (err %d)", err);
- return err;
- }
-
- if (IS_ENABLED(CONFIG_BT_MESH_GATT_PROXY) &&
- bt_mesh_proxy_relay(buf, dst)) {
- send_cb_finalize(cb, cb_data);
- } else {
- bt_mesh_adv_send(buf, cb, cb_data);
- }
-
- return 0;
-}
-
static void bt_mesh_net_local(struct ble_npl_event *work)
{
struct os_mbuf *buf;
while ((buf = net_buf_slist_get(&bt_mesh.local_queue))) {
- BT_DBG("len %u: %s", buf->om_len, bt_hex(buf->om_data, buf->om_len));
- bt_mesh_net_recv(buf, 0, BT_MESH_NET_IF_LOCAL);
+ struct bt_mesh_subnet *sub = LOOPBACK_BUF_SUB(buf);
+ struct bt_mesh_net_rx rx = {
+ .ctx = {
+ .net_idx = sub->net_idx,
+ /* Initialize AppIdx to a sane value */
+ .app_idx = BT_MESH_KEY_UNUSED,
+ .recv_ttl = TTL(buf->om_data),
+ /* TTL=1 only goes to local IF */
+ .send_ttl = 1U,
+ .addr = SRC(buf->om_data),
+ .recv_dst = DST(buf->om_data),
+ .recv_rssi = 0,
+ },
+ .net_if = BT_MESH_NET_IF_LOCAL,
+ .sub = sub,
+ .old_iv = (IVI(buf->om_data) != (bt_mesh.iv_index & 0x01)),
+ .ctl = CTL(buf->om_data),
+ .seq = SEQ(buf->om_data),
+ .new_key = SUBNET_KEY_TX_IDX(sub),
+ .local_match = 1U,
+ .friend_match = 0U,
+ };
+
+ BT_DBG("src: 0x%04x dst: 0x%04x seq 0x%06x sub %p", rx.ctx.addr,
+ rx.ctx.addr, rx.seq, sub);
+
+ (void) bt_mesh_trans_recv(buf, &rx);
net_buf_unref(buf);
}
}
-int bt_mesh_net_encode(struct bt_mesh_net_tx *tx, struct os_mbuf *buf,
- bool proxy)
+static const struct bt_mesh_net_cred *net_tx_cred_get(struct bt_mesh_net_tx *tx)
+{
+#if defined(BLE_MESH_LOW_POWER)
+ if (tx->friend_cred && bt_mesh_lpn_established()) {
+ return &bt_mesh.lpn.cred[SUBNET_KEY_TX_IDX(tx->sub)];
+ }
+#endif
+
+ tx->friend_cred = 0U;
+ return &tx->sub->keys[SUBNET_KEY_TX_IDX(tx->sub)].msg;
+}
+
+static int net_header_encode(struct bt_mesh_net_tx *tx, uint8_t nid,
+ struct os_mbuf *buf)
{
const bool ctl = (tx->ctx->app_idx == BT_MESH_KEY_UNUSED);
- u32_t seq_val;
- u8_t nid;
- const u8_t *enc, *priv;
- u8_t *seq;
- int err;
if (ctl && net_buf_simple_tailroom(buf) < 8) {
BT_ERR("Insufficient MIC space for CTL PDU");
@@ -818,11 +381,7 @@ int bt_mesh_net_encode(struct bt_mesh_net_tx *tx, struct os_mbuf *buf,
net_buf_simple_push_be16(buf, tx->ctx->addr);
net_buf_simple_push_be16(buf, tx->src);
- seq = net_buf_simple_push(buf, 3);
- seq_val = bt_mesh_next_seq();
- seq[0] = seq_val >> 16;
- seq[1] = seq_val >> 8;
- seq[2] = seq_val;
+ net_buf_simple_push_be24(buf, bt_mesh_next_seq());
if (ctl) {
net_buf_simple_push_u8(buf, tx->ctx->send_ttl | 0x80);
@@ -830,37 +389,68 @@ int bt_mesh_net_encode(struct bt_mesh_net_tx *tx, struct os_mbuf *buf,
net_buf_simple_push_u8(buf, tx->ctx->send_ttl);
}
- if (IS_ENABLED(CONFIG_BT_MESH_LOW_POWER) && tx->friend_cred) {
- if (friend_cred_get(tx->sub, BT_MESH_ADDR_UNASSIGNED,
- &nid, &enc, &priv)) {
- BT_WARN("Falling back to master credentials");
+ net_buf_simple_push_u8(buf, (nid | (BT_MESH_NET_IVI_TX & 1) << 7));
- tx->friend_cred = 0;
+ return 0;
+}
- nid = tx->sub->keys[tx->sub->kr_flag].nid;
- enc = tx->sub->keys[tx->sub->kr_flag].enc;
- priv = tx->sub->keys[tx->sub->kr_flag].privacy;
- }
- } else {
- tx->friend_cred = 0;
- nid = tx->sub->keys[tx->sub->kr_flag].nid;
- enc = tx->sub->keys[tx->sub->kr_flag].enc;
- priv = tx->sub->keys[tx->sub->kr_flag].privacy;
+static int net_encrypt(struct os_mbuf *buf,
+ const struct bt_mesh_net_cred *cred, uint32_t iv_index,
+ bool proxy)
+{
+ int err;
+
+ err = bt_mesh_net_encrypt(cred->enc, buf, iv_index, proxy);
+ if (err) {
+ return err;
}
- net_buf_simple_push_u8(buf, (nid | (BT_MESH_NET_IVI_TX & 1) << 7));
+ return bt_mesh_net_obfuscate(buf->om_data, iv_index, cred->privacy);
+}
- err = bt_mesh_net_encrypt(enc, buf, BT_MESH_NET_IVI_TX, proxy);
+int bt_mesh_net_encode(struct bt_mesh_net_tx *tx, struct os_mbuf *buf,
+ bool proxy)
+{
+ const struct bt_mesh_net_cred *cred;
+ int err;
+
+ cred = net_tx_cred_get(tx);
+ err = net_header_encode(tx, cred->nid, buf);
if (err) {
return err;
}
- return bt_mesh_net_obfuscate(buf->om_data, BT_MESH_NET_IVI_TX, priv);
+ return net_encrypt(buf, cred, BT_MESH_NET_IVI_TX, proxy);
+}
+
+static int loopback(const struct bt_mesh_net_tx *tx, const uint8_t *data,
+ size_t len)
+{
+ struct os_mbuf *buf;
+
+ buf = os_mbuf_get_pkthdr(&loopback_os_mbuf_pool, 0);
+ if (!buf) {
+ BT_WARN("Unable to allocate loopback");
+ return -ENOMEM;
+ }
+
+ BT_DBG("");
+
+ LOOPBACK_BUF_SUB(buf) = tx->sub;
+
+ net_buf_add_mem(buf, data, len);
+
+ net_buf_slist_put(&bt_mesh.local_queue, buf);
+
+ k_work_submit(&bt_mesh.local_work);
+
+ return 0;
}
int bt_mesh_net_send(struct bt_mesh_net_tx *tx, struct os_mbuf *buf,
const struct bt_mesh_send_cb *cb, void *cb_data)
{
+ const struct bt_mesh_net_cred *cred;
int err;
BT_DBG("src 0x%04x dst 0x%04x len %u headroom %zu tailroom %zu",
@@ -869,11 +459,8 @@ int bt_mesh_net_send(struct bt_mesh_net_tx *tx, struct os_mbuf *buf,
BT_DBG("Payload len %u: %s", buf->om_len, bt_hex(buf->om_data, buf->om_len));
BT_DBG("Seq 0x%06x", bt_mesh.seq);
- if (tx->ctx->send_ttl == BT_MESH_TTL_DEFAULT) {
- tx->ctx->send_ttl = bt_mesh_default_ttl_get();
- }
-
- err = bt_mesh_net_encode(tx, buf, false);
+ cred = net_tx_cred_get(tx);
+ err = net_header_encode(tx, cred->nid, buf);
if (err) {
goto done;
}
@@ -881,225 +468,118 @@ int bt_mesh_net_send(struct bt_mesh_net_tx *tx, struct os_mbuf *buf,
BT_DBG("encoded %u bytes: %s", buf->om_len,
bt_hex(buf->om_data, buf->om_len));
- /* Deliver to GATT Proxy Clients if necessary. Mesh spec 3.4.5.2:
- * "The output filter of the interface connected to advertising or
- * GATT bearers shall drop all messages with TTL value set to 1."
- */
- if (MYNEWT_VAL(BLE_MESH_GATT_PROXY) &&
- tx->ctx->send_ttl != 1) {
- if (bt_mesh_proxy_relay(buf, tx->ctx->addr) &&
- BT_MESH_ADDR_IS_UNICAST(tx->ctx->addr)) {
- /* Notify completion if this only went
- * through the Mesh Proxy.
- */
- send_cb_finalize(cb, cb_data);
-
- err = 0;
- goto done;
- }
- }
-
/* Deliver to local network interface if necessary */
if (bt_mesh_fixed_group_match(tx->ctx->addr) ||
bt_mesh_elem_find(tx->ctx->addr)) {
- if (cb && cb->start) {
- cb->start(0, 0, cb_data);
- }
- net_buf_slist_put(&bt_mesh.local_queue, net_buf_ref(buf));
- if (cb && cb->end) {
- cb->end(0, cb_data);
- }
- k_work_submit(&bt_mesh.local_work);
- } else if (tx->ctx->send_ttl != 1) {
- /* Deliver to to the advertising network interface. Mesh spec
- * 3.4.5.2: "The output filter of the interface connected to
- * advertising or GATT bearers shall drop all messages with
- * TTL value set to 1."
- */
- bt_mesh_adv_send(buf, cb, cb_data);
- }
+ err = loopback(tx, buf->om_data, buf->om_len);
-done:
- net_buf_unref(buf);
- return err;
-}
+ /* Local unicast messages should not go out to network */
+ if (BT_MESH_ADDR_IS_UNICAST(tx->ctx->addr) ||
+ tx->ctx->send_ttl == 1U) {
+ if (!err) {
+ send_cb_finalize(cb, cb_data);
+ }
-static bool auth_match(struct bt_mesh_subnet_keys *keys,
- const u8_t net_id[8], u8_t flags,
- u32_t iv_index, const u8_t auth[8])
-{
- u8_t net_auth[8];
+ goto done;
+ }
+ }
+ /* Mesh spec 3.4.5.2: "The output filter of the interface connected to
+ * advertising or GATT bearers shall drop all messages with TTL value
+ * set to 1." If a TTL=1 packet wasn't for a local interface, it is
+ * invalid.
+ */
+ if (tx->ctx->send_ttl == 1U) {
+ err = -EINVAL;
+ goto done;
+ }
- if (memcmp(net_id, keys->net_id, 8)) {
- return false;
+ err = net_encrypt(buf, cred, BT_MESH_NET_IVI_TX, false);
+ if (err) {
+ goto done;
}
- bt_mesh_beacon_auth(keys->beacon, flags, keys->net_id, iv_index,
- net_auth);
+ /* Deliver to GATT Proxy Clients if necessary. */
+ if (IS_ENABLED(CONFIG_BT_MESH_GATT_PROXY) &&
+ bt_mesh_proxy_relay(buf, tx->ctx->addr) &&
+ BT_MESH_ADDR_IS_UNICAST(tx->ctx->addr)) {
+ /* Notify completion if this only went through the Mesh Proxy */
+ send_cb_finalize(cb, cb_data);
- if (memcmp(auth, net_auth, 8)) {
- BT_WARN("Authentication Value %s != %s",
- bt_hex(auth, 8), bt_hex(net_auth, 8));
- return false;
+ err = 0;
+ goto done;
}
- return true;
+ bt_mesh_adv_send(buf, cb, cb_data);
+
+done:
+ net_buf_unref(buf);
+ return err;
}
-struct bt_mesh_subnet *bt_mesh_subnet_find(const u8_t net_id[8], u8_t flags,
- u32_t iv_index, const u8_t auth[8],
- bool *new_key)
+void bt_mesh_net_loopback_clear(uint16_t net_idx)
{
- int i;
+ struct net_buf_slist_t new_list;
+ struct os_mbuf *buf;
- for (i = 0; i < ARRAY_SIZE(bt_mesh.sub); i++) {
- struct bt_mesh_subnet *sub = &bt_mesh.sub[i];
+ BT_DBG("0x%04x", net_idx);
- if (sub->net_idx == BT_MESH_KEY_UNUSED) {
- continue;
- }
+ net_buf_slist_init(&new_list);
- if (auth_match(&sub->keys[0], net_id, flags, iv_index, auth)) {
- *new_key = false;
- return sub;
- }
-
- if (sub->kr_phase == BT_MESH_KR_NORMAL) {
- continue;
- }
+ while ((buf = net_buf_slist_get(&bt_mesh.local_queue))) {
+ struct bt_mesh_subnet *sub = LOOPBACK_BUF_SUB(buf);
- if (auth_match(&sub->keys[1], net_id, flags, iv_index, auth)) {
- *new_key = true;
- return sub;
+ if (net_idx == BT_MESH_KEY_ANY || net_idx == sub->net_idx) {
+ BT_DBG("Dropped 0x%06x", SEQ(buf->om_data));
+ net_buf_unref(buf);
+ } else {
+ net_buf_slist_put(&new_list, buf);
}
}
- return NULL;
+ bt_mesh.local_queue = new_list;
}
-static int net_decrypt(struct bt_mesh_subnet *sub, const u8_t *enc,
- const u8_t *priv, const u8_t *data,
- size_t data_len, struct bt_mesh_net_rx *rx,
- struct os_mbuf *buf)
+static bool net_decrypt(struct bt_mesh_net_rx *rx, struct os_mbuf *in,
+ struct os_mbuf *out,
+ const struct bt_mesh_net_cred *cred)
{
- BT_DBG("NID 0x%02x net_idx 0x%04x", NID(data), sub->net_idx);
- BT_DBG("IVI %u net->iv_index 0x%08x", IVI(data),
- (unsigned) bt_mesh.iv_index);
+ bool proxy = (rx->net_if == BT_MESH_NET_IF_PROXY_CFG);
- rx->old_iv = (IVI(data) != (bt_mesh.iv_index & 0x01));
+ if (NID(in->om_data) != cred->nid) {
+ return false;
+ }
- net_buf_simple_init(buf, 0);
- memcpy(net_buf_simple_add(buf, data_len), data, data_len);
+ BT_DBG("NID 0x%02x", NID(in->om_data));
+ BT_DBG("IVI %u net->iv_index 0x%08x", IVI(in->om_data), bt_mesh.iv_index);
- if (bt_mesh_net_obfuscate(buf->om_data, BT_MESH_NET_IVI_RX(rx), priv)) {
- return -ENOENT;
- }
+ rx->old_iv = (IVI(in->om_data) != (bt_mesh.iv_index & 0x01));
+ net_buf_simple_reset(out);
+ net_buf_simple_add_mem(out, in->om_data, in->om_len);
- if (rx->net_if == BT_MESH_NET_IF_ADV && msg_cache_match(rx, buf)) {
- BT_WARN("Duplicate found in Network Message Cache");
- return -EALREADY;
+ if (bt_mesh_net_obfuscate(out->om_data, BT_MESH_NET_IVI_RX(rx),
+ cred->privacy)) {
+ return false;
}
- rx->ctx.addr = SRC(buf->om_data);
+ rx->ctx.addr = SRC(out->om_data);
if (!BT_MESH_ADDR_IS_UNICAST(rx->ctx.addr)) {
- BT_WARN("Ignoring non-unicast src addr 0x%04x", rx->ctx.addr);
- return -EINVAL;
- }
-
- BT_DBG("src 0x%04x", rx->ctx.addr);
-
- if ((MYNEWT_VAL(BLE_MESH_PROXY)) &&
- rx->net_if == BT_MESH_NET_IF_PROXY_CFG) {
- return bt_mesh_net_decrypt(enc, buf, BT_MESH_NET_IVI_RX(rx),
- true);
+ BT_DBG("Ignoring non-unicast src addr 0x%04x", rx->ctx.addr);
+ return false;
}
- return bt_mesh_net_decrypt(enc, buf, BT_MESH_NET_IVI_RX(rx), false);
-}
-
-static int friend_decrypt(struct bt_mesh_subnet *sub, const u8_t *data,
- size_t data_len, struct bt_mesh_net_rx *rx,
- struct os_mbuf *buf)
-{
- int i;
-
- BT_DBG("NID 0x%02x net_idx 0x%04x", NID(data), sub->net_idx);
-
- for (i = 0; i < ARRAY_SIZE(friend_cred); i++) {
- struct friend_cred *cred = &friend_cred[i];
-
- if (cred->net_idx != sub->net_idx) {
- continue;
- }
-
- if (NID(data) == cred->cred[0].nid &&
- !net_decrypt(sub, cred->cred[0].enc, cred->cred[0].privacy,
- data, data_len, rx, buf)) {
- return 0;
- }
-
- if (sub->kr_phase == BT_MESH_KR_NORMAL) {
- continue;
- }
-
- if (NID(data) == cred->cred[1].nid &&
- !net_decrypt(sub, cred->cred[1].enc, cred->cred[1].privacy,
- data, data_len, rx, buf)) {
- rx->new_key = 1;
- return 0;
- }
+ if (bt_mesh_elem_find(rx->ctx.addr)) {
+ BT_DBG("Dropping locally originated packet");
+ return false;
}
- return -ENOENT;
-}
-
-static bool net_find_and_decrypt(const u8_t *data, size_t data_len,
- struct bt_mesh_net_rx *rx,
- struct os_mbuf *buf)
-{
- struct bt_mesh_subnet *sub;
- unsigned int i;
-
- BT_DBG("");
-
- for (i = 0; i < ARRAY_SIZE(bt_mesh.sub); i++) {
- sub = &bt_mesh.sub[i];
- if (sub->net_idx == BT_MESH_KEY_UNUSED) {
- continue;
- }
-
- if ((IS_ENABLED(CONFIG_BT_MESH_LOW_POWER) ||
- IS_ENABLED(CONFIG_BT_MESH_FRIEND)) &&
- !friend_decrypt(sub, data, data_len, rx, buf)) {
- rx->friend_cred = 1U;
- rx->ctx.net_idx = sub->net_idx;
- rx->sub = sub;
- return true;
- }
-
- if (NID(data) == sub->keys[0].nid &&
- !net_decrypt(sub, sub->keys[0].enc, sub->keys[0].privacy,
- data, data_len, rx, buf)) {
- rx->ctx.net_idx = sub->net_idx;
- rx->sub = sub;
- return true;
- }
-
- if (sub->kr_phase == BT_MESH_KR_NORMAL) {
- continue;
- }
-
- if (NID(data) == sub->keys[1].nid &&
- !net_decrypt(sub, sub->keys[1].enc, sub->keys[1].privacy,
- data, data_len, rx, buf)) {
- rx->new_key = 1;
- rx->ctx.net_idx = sub->net_idx;
- rx->sub = sub;
- return true;
- }
+ if (rx->net_if == BT_MESH_NET_IF_ADV && msg_cache_match(out)) {
+ BT_DBG("Duplicate found in Network Message Cache");
+ return false;
}
- return false;
+ BT_DBG("src 0x%04x", rx->ctx.addr);
+ return bt_mesh_net_decrypt(cred->enc, out, BT_MESH_NET_IVI_RX(rx),
+ proxy) == 0;
}
/* Relaying from advertising to the advertising bearer should only happen
@@ -1110,8 +590,6 @@ static bool net_find_and_decrypt(const u8_t *data, size_t data_len,
static bool relay_to_adv(enum bt_mesh_net_if net_if)
{
switch (net_if) {
- case BT_MESH_NET_IF_LOCAL:
- return true;
case BT_MESH_NET_IF_ADV:
return (bt_mesh_relay_get() == BT_MESH_RELAY_ENABLED);
case BT_MESH_NET_IF_PROXY:
@@ -1124,27 +602,16 @@ static bool relay_to_adv(enum bt_mesh_net_if net_if)
static void bt_mesh_net_relay(struct os_mbuf *sbuf,
struct bt_mesh_net_rx *rx)
{
- const u8_t *enc, *priv;
+ const struct bt_mesh_net_cred *cred;
struct os_mbuf *buf;
- u8_t nid, transmit;
-
- if (rx->net_if == BT_MESH_NET_IF_LOCAL) {
- /* Locally originated PDUs with TTL=1 will only be delivered
- * to local elements as per Mesh Profile 1.0 section 3.4.5.2:
- * "The output filter of the interface connected to
- * advertising or GATT bearers shall drop all messages with
- * TTL value set to 1."
- */
- if (rx->ctx.recv_ttl == 1) {
- return;
- }
- } else {
- if (rx->ctx.recv_ttl <= 1) {
- return;
- }
+ uint8_t transmit;
+
+ if (rx->ctx.recv_ttl <= 1U) {
+ return;
}
if (rx->net_if == BT_MESH_NET_IF_ADV &&
+ !rx->friend_cred &&
bt_mesh_relay_get() != BT_MESH_RELAY_ENABLED &&
bt_mesh_gatt_proxy_get() != BT_MESH_GATT_PROXY_ENABLED) {
return;
@@ -1157,7 +624,7 @@ static void bt_mesh_net_relay(struct os_mbuf *sbuf,
* Anything else (like GATT to adv, or locally originated packets)
* use the Network Transmit state.
*/
- if (rx->net_if == BT_MESH_NET_IF_ADV) {
+ if (rx->net_if == BT_MESH_NET_IF_ADV && !rx->friend_cred) {
transmit = bt_mesh_relay_retransmit_get();
} else {
transmit = bt_mesh_net_transmit_get();
@@ -1169,57 +636,45 @@ static void bt_mesh_net_relay(struct os_mbuf *sbuf,
return;
}
- /* Only decrement TTL for non-locally originated packets */
- if (rx->net_if != BT_MESH_NET_IF_LOCAL) {
- /* Leave CTL bit intact */
- sbuf->om_data[1] &= 0x80;
- sbuf->om_data[1] |= rx->ctx.recv_ttl - 1;
- }
+ /* Leave CTL bit intact */
+ sbuf->om_data[1] &= 0x80;
+ sbuf->om_data[1] |= rx->ctx.recv_ttl - 1U;
net_buf_add_mem(buf, sbuf->om_data, sbuf->om_len);
- enc = rx->sub->keys[rx->sub->kr_flag].enc;
- priv = rx->sub->keys[rx->sub->kr_flag].privacy;
- nid = rx->sub->keys[rx->sub->kr_flag].nid;
+ cred = &rx->sub->keys[SUBNET_KEY_TX_IDX(rx->sub)].msg;
BT_DBG("Relaying packet. TTL is now %u", TTL(buf->om_data));
/* Update NID if RX or RX was with friend credentials */
if (rx->friend_cred) {
buf->om_data[0] &= 0x80; /* Clear everything except IVI */
- buf->om_data[0] |= nid;
+ buf->om_data[0] |= cred->nid;
}
/* We re-encrypt and obfuscate using the received IVI rather than
* the normal TX IVI (which may be different) since the transport
* layer nonce includes the IVI.
*/
- if (bt_mesh_net_encrypt(enc, buf, BT_MESH_NET_IVI_RX(rx), false)) {
+ if (net_encrypt(buf, cred, BT_MESH_NET_IVI_RX(rx), false)) {
BT_ERR("Re-encrypting failed");
goto done;
}
- if (bt_mesh_net_obfuscate(buf->om_data, BT_MESH_NET_IVI_RX(rx), priv)) {
- BT_ERR("Re-obfuscating failed");
- goto done;
- }
-
BT_DBG("encoded %u bytes: %s", buf->om_len,
bt_hex(buf->om_data, buf->om_len));
- /* Sending to the GATT bearer should only happen if GATT Proxy
- * is enabled or the message originates from the local node.
+ /* When the Friend node relays message for lpn, the message will be
+ * retransmitted using the managed master security credentials and
+ * the Network PDU shall be retransmitted to all network interfaces.
*/
if (IS_ENABLED(CONFIG_BT_MESH_GATT_PROXY) &&
- (bt_mesh_gatt_proxy_get() == BT_MESH_GATT_PROXY_ENABLED ||
- rx->net_if == BT_MESH_NET_IF_LOCAL)) {
- if (bt_mesh_proxy_relay(buf, rx->ctx.recv_dst) &&
- BT_MESH_ADDR_IS_UNICAST(rx->ctx.recv_dst)) {
- goto done;
- }
+ (rx->friend_cred ||
+ bt_mesh_gatt_proxy_get() == BT_MESH_GATT_PROXY_ENABLED)) {
+ bt_mesh_proxy_relay(buf, rx->ctx.recv_dst);
}
- if (relay_to_adv(rx->net_if)) {
+ if (relay_to_adv(rx->net_if) || rx->friend_cred) {
bt_mesh_adv_send(buf, NULL, NULL);
}
@@ -1238,26 +693,26 @@ void bt_mesh_net_header_parse(struct os_mbuf *buf,
rx->ctx.recv_dst = DST(buf->om_data);
}
-int bt_mesh_net_decode(struct os_mbuf *data, enum bt_mesh_net_if net_if,
- struct bt_mesh_net_rx *rx, struct os_mbuf *buf)
+int bt_mesh_net_decode(struct os_mbuf *in, enum bt_mesh_net_if net_if,
+ struct bt_mesh_net_rx *rx, struct os_mbuf *out)
{
- if (data->om_len < BT_MESH_NET_MIN_PDU_LEN) {
- BT_WARN("Dropping too short mesh packet (len %u)", data->om_len);
- BT_WARN("%s", bt_hex(data->om_data, data->om_len));
+ if (in->om_len < BT_MESH_NET_MIN_PDU_LEN) {
+ BT_WARN("Dropping too short mesh packet (len %u)", in->om_len);
+ BT_WARN("%s", bt_hex(in->om_data, in->om_len));
return -EINVAL;
}
- if (net_if == BT_MESH_NET_IF_ADV && check_dup(data)) {
- BT_DBG("duplicate packet; dropping %u bytes: %s", data->om_len,
- bt_hex(data->om_data, data->om_len));
+ if (net_if == BT_MESH_NET_IF_ADV && check_dup(in)) {
+ BT_DBG("duplicate packet; dropping %u bytes: %s", in->om_len,
+ bt_hex(in->om_data, in->om_len));
return -EINVAL;
}
- BT_DBG("%u bytes: %s", data->om_len, bt_hex(data->om_data, data->om_len));
+ BT_DBG("%u bytes: %s", in->om_len, bt_hex(in->om_data, in->om_len));
rx->net_if = net_if;
- if (!net_find_and_decrypt(data->om_data, data->om_len, rx, buf)) {
+ if (!bt_mesh_net_cred_find(rx, in, out, net_decrypt)) {
BT_DBG("Unable to find matching net for packet");
return -ENOENT;
}
@@ -1265,7 +720,7 @@ int bt_mesh_net_decode(struct os_mbuf *data, enum bt_mesh_net_if net_if,
/* Initialize AppIdx to a sane value */
rx->ctx.app_idx = BT_MESH_KEY_UNUSED;
- rx->ctx.recv_ttl = TTL(buf->om_data);
+ rx->ctx.recv_ttl = TTL(out->om_data);
/* Default to responding with TTL 0 for non-routed messages */
if (rx->ctx.recv_ttl == 0) {
@@ -1274,12 +729,12 @@ int bt_mesh_net_decode(struct os_mbuf *data, enum bt_mesh_net_if net_if,
rx->ctx.send_ttl = BT_MESH_TTL_DEFAULT;
}
- rx->ctl = CTL(buf->om_data);
- rx->seq = SEQ(buf->om_data);
- rx->ctx.recv_dst = DST(buf->om_data);
+ rx->ctl = CTL(out->om_data);
+ rx->seq = SEQ(out->om_data);
+ rx->ctx.recv_dst = DST(out->om_data);
- BT_DBG("Decryption successful. Payload len %u: %s", buf->om_len,
- bt_hex(buf->om_data, buf->om_len));
+ BT_DBG("Decryption successful. Payload len %u: %s", out->om_len,
+ bt_hex(out->om_data, out->om_len));
if (net_if != BT_MESH_NET_IF_PROXY_CFG &&
rx->ctx.recv_dst == BT_MESH_ADDR_UNASSIGNED) {
@@ -1287,24 +742,16 @@ int bt_mesh_net_decode(struct os_mbuf *data, enum bt_mesh_net_if net_if,
return -EBADMSG;
}
- if (BT_MESH_ADDR_IS_RFU(rx->ctx.recv_dst)) {
- BT_ERR("Destination address is RFU; dropping packet");
- return -EBADMSG;
- }
-
- if (net_if != BT_MESH_NET_IF_LOCAL && bt_mesh_elem_find(rx->ctx.addr)) {
- BT_DBG("Dropping locally originated packet");
- return -EBADMSG;
- }
-
BT_DBG("src 0x%04x dst 0x%04x ttl %u", rx->ctx.addr, rx->ctx.recv_dst,
rx->ctx.recv_ttl);
- BT_DBG("PDU: %s", bt_hex(buf->om_data, buf->om_len));
+ BT_DBG("PDU: %s", bt_hex(out->om_data, out->om_len));
+
+ msg_cache_add(rx);
return 0;
}
-void bt_mesh_net_recv(struct os_mbuf *data, s8_t rssi,
+void bt_mesh_net_recv(struct os_mbuf *data, int8_t rssi,
enum bt_mesh_net_if net_if)
{
struct os_mbuf *buf = NET_BUF_SIMPLE(29);
@@ -1348,7 +795,7 @@ void bt_mesh_net_recv(struct os_mbuf *data, s8_t rssi,
*/
if (bt_mesh_trans_recv(buf, &rx) == -EAGAIN) {
BT_WARN("Removing rejected message from Network Message Cache");
- msg_cache[rx.msg_cache_idx] = 0ULL;
+ msg_cache[rx.msg_cache_idx].src = BT_MESH_ADDR_UNASSIGNED;
/* Rewind the next index now that we're not using this entry */
msg_cache_next = rx.msg_cache_idx;
}
@@ -1368,7 +815,8 @@ done:
static void ivu_refresh(struct ble_npl_event *work)
{
- bt_mesh.ivu_duration += BT_MESH_IVU_HOURS;
+ bt_mesh.ivu_duration = MIN(UINT8_MAX,
+ bt_mesh.ivu_duration + BT_MESH_IVU_HOURS);
BT_DBG("%s for %u hour%s",
atomic_test_bit(bt_mesh.flags, BT_MESH_IVU_IN_PROGRESS) ?
@@ -1392,42 +840,22 @@ static void ivu_refresh(struct ble_npl_event *work)
}
}
-void bt_mesh_net_start(void)
-{
- if (bt_mesh_beacon_get() == BT_MESH_BEACON_ENABLED) {
- bt_mesh_beacon_enable();
- } else {
- bt_mesh_beacon_disable();
- }
-
- if (IS_ENABLED(CONFIG_BT_MESH_GATT_PROXY) &&
- bt_mesh_gatt_proxy_get() != BT_MESH_GATT_PROXY_NOT_SUPPORTED) {
- bt_mesh_proxy_gatt_enable();
- bt_mesh_adv_update();
- }
-
- if (IS_ENABLED(CONFIG_BT_MESH_LOW_POWER)) {
- bt_mesh_lpn_init();
- } else {
- bt_mesh_scan_enable();
- }
-
- if (IS_ENABLED(CONFIG_BT_MESH_FRIEND)) {
- bt_mesh_friend_init();
- }
-
- if (IS_ENABLED(CONFIG_BT_MESH_PROV)) {
- u16_t net_idx = bt_mesh.sub[0].net_idx;
- u16_t addr = bt_mesh_primary_addr();
-
- bt_mesh_prov_complete(net_idx, addr);
- }
-}
-
void bt_mesh_net_init(void)
{
+ int rc;
+
k_delayed_work_init(&bt_mesh.ivu_timer, ivu_refresh);
k_work_init(&bt_mesh.local_work, bt_mesh_net_local);
net_buf_slist_init(&bt_mesh.local_queue);
+
+ rc = os_mempool_init(&loopback_buf_mempool, MYNEWT_VAL(BLE_MESH_LOOPBACK_BUFS),
+ LOOPBACK_MAX_PDU_LEN + BT_MESH_MBUF_HEADER_SIZE,
+ &loopback_mbuf_membuf[0], "loopback_buf_pool");
+ assert(rc == 0);
+
+ rc = os_mbuf_pool_init(&loopback_os_mbuf_pool, &loopback_buf_mempool,
+ LOOPBACK_MAX_PDU_LEN + BT_MESH_MBUF_HEADER_SIZE,
+ MYNEWT_VAL(BLE_MESH_LOOPBACK_BUFS));
+ assert(rc == 0);
}
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/net.h b/src/libs/mynewt-nimble/nimble/host/mesh/src/net.h
index 976da005..f4b1192b 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/src/net.h
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/net.h
@@ -9,13 +9,7 @@
#ifndef __NET_H__
#define __NET_H__
-#define BT_MESH_NET_FLAG_KR BIT(0)
-#define BT_MESH_NET_FLAG_IVU BIT(1)
-
-#define BT_MESH_KR_NORMAL 0x00
-#define BT_MESH_KR_PHASE_1 0x01
-#define BT_MESH_KR_PHASE_2 0x02
-#define BT_MESH_KR_PHASE_3 0x03
+#include "subnet.h"
#define BT_MESH_IV_UPDATE(flags) ((flags >> 1) & 0x01)
#define BT_MESH_KEY_REFRESH(flags) (flags & 0x01)
@@ -31,64 +25,13 @@
CONFIG_BT_MESH_IVU_DIVIDER)
#define BT_MESH_IVU_TIMEOUT K_HOURS(BT_MESH_IVU_HOURS)
-struct bt_mesh_app_key {
- u16_t net_idx;
- u16_t app_idx;
- bool updated;
- struct bt_mesh_app_keys {
- u8_t id;
- u8_t val[16];
- } keys[2];
-};
+struct bt_mesh_net_cred;
struct bt_mesh_node {
- u16_t addr;
- u16_t net_idx;
- u8_t dev_key[16];
- u8_t num_elem;
-};
-
-struct bt_mesh_subnet {
- u32_t beacon_sent; /* Timestamp of last sent beacon */
- u8_t beacons_last; /* Number of beacons during last
- * observation window
- */
- u8_t beacons_cur; /* Number of beaconds observed during
- * currently ongoing window.
- */
-
- u8_t beacon_cache[21]; /* Cached last authenticated beacon */
-
- u16_t net_idx; /* NetKeyIndex */
-
- bool kr_flag; /* Key Refresh Flag */
- u8_t kr_phase; /* Key Refresh Phase */
-
- u8_t node_id; /* Node Identity State */
- u32_t node_id_start; /* Node Identity started timestamp */
-
- u8_t auth[8]; /* Beacon Authentication Value */
-
- struct bt_mesh_subnet_keys {
- u8_t net[16]; /* NetKey */
- u8_t nid; /* NID */
- u8_t enc[16]; /* EncKey */
- u8_t net_id[8]; /* Network ID */
-#if (MYNEWT_VAL(BLE_MESH_GATT_PROXY))
- u8_t identity[16]; /* IdentityKey */
-#endif
- u8_t privacy[16]; /* PrivacyKey */
- u8_t beacon[16]; /* BeaconKey */
- } keys[2];
-};
-
-struct bt_mesh_rpl {
- u16_t src;
- bool old_iv;
-#if (MYNEWT_VAL(BLE_MESH_SETTINGS))
- bool store;
-#endif
- u32_t seq;
+ uint16_t addr;
+ uint16_t net_idx;
+ uint8_t dev_key[16];
+ uint8_t num_elem;
};
#if MYNEWT_VAL(BLE_MESH_FRIEND)
@@ -100,23 +43,23 @@ struct bt_mesh_rpl {
#endif
struct bt_mesh_friend {
- u16_t lpn;
- u8_t recv_delay;
- u8_t fsn:1,
+ uint16_t lpn;
+ uint8_t recv_delay;
+ uint8_t fsn:1,
send_last:1,
pending_req:1,
- sec_update:1,
pending_buf:1,
- valid:1,
established:1;
- s32_t poll_to;
- u8_t num_elem;
- u16_t lpn_counter;
- u16_t counter;
+ int32_t poll_to;
+ uint8_t num_elem;
+ uint16_t lpn_counter;
+ uint16_t counter;
- u16_t net_idx;
+ struct bt_mesh_subnet *subnet;
- u16_t sub_list[FRIEND_SUB_LIST_SIZE];
+ struct bt_mesh_net_cred cred[2];
+
+ uint16_t sub_list[FRIEND_SUB_LIST_SIZE];
struct k_delayed_work timer;
@@ -127,19 +70,19 @@ struct bt_mesh_friend {
* the current number of segments, in the queue. This is
* used for Friend Queue free space calculations.
*/
- u8_t seg_count;
+ uint8_t seg_count;
} seg[FRIEND_SEG_RX];
struct os_mbuf *last;
struct net_buf_slist_t queue;
- u32_t queue_size;
+ uint32_t queue_size;
/* Friend Clear Procedure */
struct {
- u32_t start; /* Clear Procedure start */
- u16_t frnd; /* Previous Friend's address */
- u16_t repeat_sec; /* Repeat timeout in seconds */
+ uint32_t start; /* Clear Procedure start */
+ uint16_t frnd; /* Previous Friend's address */
+ uint16_t repeat_sec; /* Repeat timeout in seconds */
struct k_delayed_work timer; /* Repeat timer */
} clear;
};
@@ -165,23 +108,23 @@ struct bt_mesh_lpn {
} state;
/* Transaction Number (used for subscription list) */
- u8_t xact_next;
- u8_t xact_pending;
- u8_t sent_req;
+ uint8_t xact_next;
+ uint8_t xact_pending;
+ uint8_t sent_req;
/* Address of our Friend when we're a LPN. Unassigned if we don't
* have a friend yet.
*/
- u16_t frnd;
+ uint16_t frnd;
/* Value from the friend offer */
- u8_t recv_win;
+ uint8_t recv_win;
- u8_t req_attempts; /* Number of Request attempts */
+ uint8_t req_attempts; /* Number of Request attempts */
- s32_t poll_timeout;
+ int32_t poll_timeout;
- u8_t groups_changed:1, /* Friend Subscription List needs updating */
+ uint8_t groups_changed:1, /* Friend Subscription List needs updating */
pending_poll:1, /* Poll to be sent after subscription */
disable:1, /* Disable LPN after clearing */
fsn:1, /* Friend Sequence Number */
@@ -189,22 +132,29 @@ struct bt_mesh_lpn {
clear_success:1; /* Friend Clear Confirm received */
/* Friend Queue Size */
- u8_t queue_size;
+ uint8_t queue_size;
+
+ /* FriendCounter */
+ uint16_t frnd_counter;
/* LPNCounter */
- u16_t counter;
+ uint16_t lpn_counter;
/* Previous Friend of this LPN */
- u16_t old_friend;
+ uint16_t old_friend;
/* Duration reported for last advertising packet */
- u16_t adv_duration;
+ uint16_t adv_duration;
/* Next LPN related action timer */
struct k_delayed_work timer;
/* Subscribed groups */
- u16_t groups[LPN_GROUPS];
+ uint16_t groups[LPN_GROUPS];
+
+ struct bt_mesh_subnet *sub;
+
+ struct bt_mesh_net_cred cred[2];
/* Bit fields for tracking which groups the Friend knows about */
ATOMIC_DEFINE(added, LPN_GROUPS);
@@ -231,15 +181,20 @@ enum {
BT_MESH_CFG_PENDING,
BT_MESH_MOD_PENDING,
BT_MESH_VA_PENDING,
- BT_MESH_NODES_PENDING,
+
+ /* Feature flags */
+ BT_MESH_RELAY,
+ BT_MESH_BEACON,
+ BT_MESH_GATT_PROXY,
+ BT_MESH_FRIEND,
/* Don't touch - intentionally last */
BT_MESH_FLAG_COUNT,
};
struct bt_mesh_net {
- u32_t iv_index; /* Current IV Index */
- u32_t seq; /* Next outgoing sequence number (24 bits) */
+ uint32_t iv_index; /* Current IV Index */
+ uint32_t seq; /* Next outgoing sequence number (24 bits) */
ATOMIC_DEFINE(flags, BT_MESH_FLAG_COUNT);
@@ -257,22 +212,16 @@ struct bt_mesh_net {
#endif
/* Number of hours in current IV Update state */
- u8_t ivu_duration;
+ uint8_t ivu_duration;
+
+ uint8_t net_xmit;
+ uint8_t relay_xmit;
+ uint8_t default_ttl;
/* Timer to track duration in current IV Update state */
struct k_delayed_work ivu_timer;
- u8_t dev_key[16];
-
-#if MYNEWT_VAL(BLE_MESH_PROVISIONER)
- struct bt_mesh_node nodes[MYNEWT_VAL(BLE_MESH_NODE_COUNT)];
-#endif
-
- struct bt_mesh_app_key app_keys[MYNEWT_VAL(BLE_MESH_APP_KEY_COUNT)];
-
- struct bt_mesh_subnet sub[MYNEWT_VAL(BLE_MESH_SUBNET_COUNT)];
-
- struct bt_mesh_rpl rpl[MYNEWT_VAL(BLE_MESH_CRPL)];
+ uint8_t dev_key[16];
};
/* Network interface */
@@ -287,24 +236,24 @@ enum bt_mesh_net_if {
struct bt_mesh_net_rx {
struct bt_mesh_subnet *sub;
struct bt_mesh_msg_ctx ctx;
- u32_t seq; /* Sequence Number */
- u8_t old_iv:1, /* iv_index - 1 was used */
+ uint32_t seq; /* Sequence Number */
+ uint8_t old_iv:1, /* iv_index - 1 was used */
new_key:1, /* Data was encrypted with updated key */
friend_cred:1, /* Data was encrypted with friend cred */
ctl:1, /* Network Control */
net_if:2, /* Network interface */
local_match:1, /* Matched a local element */
friend_match:1; /* Matched an LPN we're friends for */
- u16_t msg_cache_idx; /* Index of entry in message cache */
+ uint16_t msg_cache_idx; /* Index of entry in message cache */
};
/* Encoding context for Network/Transport data */
struct bt_mesh_net_tx {
struct bt_mesh_subnet *sub;
struct bt_mesh_msg_ctx *ctx;
- u16_t src;
- u8_t xmit;
- u8_t friend_cred:1,
+ uint16_t src;
+ uint8_t xmit;
+ uint8_t friend_cred:1,
aszmic:1,
aid:6;
};
@@ -318,80 +267,36 @@ extern struct bt_mesh_net bt_mesh;
#define BT_MESH_NET_HDR_LEN 9
-int bt_mesh_net_keys_create(struct bt_mesh_subnet_keys *keys,
- const u8_t key[16]);
-
-int bt_mesh_net_create(u16_t idx, u8_t flags, const u8_t key[16],
- u32_t iv_index);
-
-u8_t bt_mesh_net_flags(struct bt_mesh_subnet *sub);
-
-bool bt_mesh_kr_update(struct bt_mesh_subnet *sub, u8_t new_kr, bool new_key);
-
-void bt_mesh_net_revoke_keys(struct bt_mesh_subnet *sub);
-
-int bt_mesh_net_beacon_update(struct bt_mesh_subnet *sub);
-
-void bt_mesh_rpl_reset(void);
-
-bool bt_mesh_net_iv_update(u32_t iv_index, bool iv_update);
-
-void bt_mesh_net_sec_update(struct bt_mesh_subnet *sub);
+static inline void *net_buf_user_data(const struct os_mbuf *buf)
+{
+ return (void *)buf->om_data;
+}
-struct bt_mesh_subnet *bt_mesh_subnet_get(u16_t net_idx);
+int bt_mesh_net_create(uint16_t idx, uint8_t flags, const uint8_t key[16],
+ uint32_t iv_index);
-struct bt_mesh_subnet *bt_mesh_subnet_find(const u8_t net_id[8], u8_t flags,
- u32_t iv_index, const u8_t auth[8],
- bool *new_key);
+bool bt_mesh_net_iv_update(uint32_t iv_index, bool iv_update);
int bt_mesh_net_encode(struct bt_mesh_net_tx *tx, struct os_mbuf *buf,
bool proxy);
+int bt_mesh_net_decode(struct os_mbuf *in, enum bt_mesh_net_if net_if,
+ struct bt_mesh_net_rx *rx, struct os_mbuf *out);
+
int bt_mesh_net_send(struct bt_mesh_net_tx *tx, struct os_mbuf *buf,
const struct bt_mesh_send_cb *cb, void *cb_data);
-int bt_mesh_net_resend(struct bt_mesh_subnet *sub, struct os_mbuf *buf,
- bool new_key, const struct bt_mesh_send_cb *cb,
- void *cb_data);
-
-int bt_mesh_net_decode(struct os_mbuf *data, enum bt_mesh_net_if net_if,
- struct bt_mesh_net_rx *rx, struct os_mbuf *buf);
-
-void bt_mesh_net_recv(struct os_mbuf *data, s8_t rssi,
+void bt_mesh_net_recv(struct os_mbuf *data, int8_t rssi,
enum bt_mesh_net_if net_if);
-u32_t bt_mesh_next_seq(void);
+void bt_mesh_net_loopback_clear(uint16_t net_idx);
-void bt_mesh_net_start(void);
+uint32_t bt_mesh_next_seq(void);
void bt_mesh_net_init(void);
void bt_mesh_net_header_parse(struct os_mbuf *buf,
struct bt_mesh_net_rx *rx);
-/* Friendship Credential Management */
-struct friend_cred {
- u16_t net_idx;
- u16_t addr;
-
- u16_t lpn_counter;
- u16_t frnd_counter;
-
- struct {
- u8_t nid; /* NID */
- u8_t enc[16]; /* EncKey */
- u8_t privacy[16]; /* PrivacyKey */
- } cred[2];
-};
-
-int friend_cred_get(struct bt_mesh_subnet *sub, u16_t addr, u8_t *nid,
- const u8_t **enc, const u8_t **priv);
-int friend_cred_set(struct friend_cred *cred, u8_t idx, const u8_t net_key[16]);
-void friend_cred_refresh(u16_t net_idx);
-int friend_cred_update(struct bt_mesh_subnet *sub);
-struct friend_cred *friend_cred_create(struct bt_mesh_subnet *sub, u16_t addr,
- u16_t lpn_counter, u16_t frnd_counter);
-void friend_cred_clear(struct friend_cred *cred);
-int friend_cred_del(u16_t net_idx, u16_t addr);
static inline void send_cb_finalize(const struct bt_mesh_send_cb *cb,
void *cb_data)
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/pb_adv.c b/src/libs/mynewt-nimble/nimble/host/mesh/src/pb_adv.c
new file mode 100644
index 00000000..28391b18
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/pb_adv.c
@@ -0,0 +1,888 @@
+/* Bluetooth Mesh */
+
+/*
+ * Copyright (c) 2017 Intel Corporation
+ * Copyright (c) 2020 Nordic Semiconductor ASA
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+#include "syscfg/syscfg.h"
+#define MESH_LOG_MODULE BLE_MESH_PROV_LOG
+
+#include <stdint.h>
+#include <string.h>
+#include "mesh/mesh.h"
+#include <os/os_mbuf.h>
+#include "testing.h"
+#include "net.h"
+#include "prov.h"
+#include "adv.h"
+#include "crypto.h"
+#include "beacon.h"
+#include "prov.h"
+#include "mesh/glue.h"
+
+#define GPCF(gpc) (gpc & 0x03)
+#define GPC_START(last_seg) (((last_seg) << 2) | 0x00)
+#define GPC_ACK 0x01
+#define GPC_CONT(seg_id) (((seg_id) << 2) | 0x02)
+#define GPC_CTL(op) (((op) << 2) | 0x03)
+
+#define START_PAYLOAD_MAX 20
+#define CONT_PAYLOAD_MAX 23
+
+#define START_LAST_SEG(gpc) (gpc >> 2)
+#define CONT_SEG_INDEX(gpc) (gpc >> 2)
+
+#define BEARER_CTL(gpc) (gpc >> 2)
+#define LINK_OPEN 0x00
+#define LINK_ACK 0x01
+#define LINK_CLOSE 0x02
+
+#define XACT_SEG_DATA(_seg) (&link.rx.buf->om_data[20 + ((_seg - 1) * 23)])
+#define XACT_SEG_RECV(_seg) (link.rx.seg &= ~(1 << (_seg)))
+
+#define XACT_ID_MAX 0x7f
+#define XACT_ID_NVAL 0xff
+#define SEG_NVAL 0xff
+
+#define RETRANSMIT_TIMEOUT K_MSEC(MYNEWT_VAL(BLE_MESH_PB_ADV_RETRANS_TIMEOUT))
+#define BUF_TIMEOUT K_MSEC(400)
+#define CLOSING_TIMEOUT K_SECONDS(3)
+#define TRANSACTION_TIMEOUT K_SECONDS(30)
+
+/* Acked messages, will do retransmissions manually, taking acks into account:
+ */
+#define RETRANSMITS_RELIABLE 0
+/* Unacked messages: */
+#define RETRANSMITS_UNRELIABLE 2
+/* PDU acks: */
+#define RETRANSMITS_ACK 2
+
+enum {
+ ADV_LINK_ACTIVE, /* Link has been opened */
+ ADV_LINK_ACK_RECVD, /* Ack for link has been received */
+ ADV_LINK_CLOSING, /* Link is closing down */
+ ADV_LINK_INVALID, /* Error occurred during provisioning */
+ ADV_ACK_PENDING, /* An acknowledgment is being sent */
+ ADV_PROVISIONER, /* The link was opened as provisioner */
+
+ ADV_NUM_FLAGS,
+};
+
+struct pb_adv {
+ uint32_t id; /* Link ID */
+
+ ATOMIC_DEFINE(flags, ADV_NUM_FLAGS);
+
+ const struct prov_bearer_cb *cb;
+ void *cb_data;
+
+ struct {
+ uint8_t id; /* Most recent transaction ID */
+ uint8_t seg; /* Bit-field of unreceived segments */
+ uint8_t last_seg; /* Last segment (to check length) */
+ uint8_t fcs; /* Expected FCS value */
+ struct os_mbuf *buf;
+ } rx;
+
+ struct {
+ /* Start timestamp of the transaction */
+ int64_t start;
+
+ /* Transaction id */
+ uint8_t id;
+
+ /* Current ack id */
+ uint8_t pending_ack;
+
+ /* Pending outgoing buffer(s) */
+ struct os_mbuf *buf[3];
+
+ prov_bearer_send_complete_t cb;
+
+ void *cb_data;
+
+ /* Retransmit timer */
+ struct k_delayed_work retransmit;
+ } tx;
+
+ /* Protocol timeout */
+ struct k_delayed_work prot_timer;
+};
+
+struct prov_rx {
+ uint32_t link_id;
+ uint8_t xact_id;
+ uint8_t gpc;
+};
+
+static struct os_mbuf *rx_buf;
+static struct pb_adv link;
+
+static void gen_prov_ack_send(uint8_t xact_id);
+static void link_open(struct prov_rx *rx, struct os_mbuf *buf);
+static void link_ack(struct prov_rx *rx, struct os_mbuf *buf);
+static void link_close(struct prov_rx *rx, struct os_mbuf *buf);
+
+static void buf_sent(int err, void *user_data)
+{
+ BT_DBG("buf_send");
+
+ if (!link.tx.buf[0]) {
+ return;
+ }
+
+ BT_DBG("submit retransmit");
+ k_delayed_work_submit(&link.tx.retransmit, RETRANSMIT_TIMEOUT);
+}
+
+static struct bt_mesh_send_cb buf_sent_cb = {
+ .end = buf_sent,
+};
+
+static uint8_t last_seg(uint8_t len)
+{
+ if (len <= START_PAYLOAD_MAX) {
+ return 0;
+ }
+
+ len -= START_PAYLOAD_MAX;
+
+ return 1 + (len / CONT_PAYLOAD_MAX);
+}
+
+static void free_segments(void)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(link.tx.buf); i++) {
+ struct os_mbuf *buf = link.tx.buf[i];
+
+ if (!buf) {
+ break;
+ }
+
+ link.tx.buf[i] = NULL;
+ /* Mark as canceled */
+ BT_MESH_ADV(buf)->busy = 0U;
+ net_buf_unref(buf);
+ }
+}
+
+static uint8_t next_transaction_id(uint8_t id)
+{
+ return (((id + 1) & XACT_ID_MAX) | (id & (XACT_ID_MAX+1)));
+}
+
+static void prov_clear_tx(void)
+{
+ BT_DBG("");
+
+ k_delayed_work_cancel(&link.tx.retransmit);
+
+ free_segments();
+}
+
+static void reset_adv_link(void)
+{
+ BT_DBG("");
+ prov_clear_tx();
+
+ k_delayed_work_cancel(&link.prot_timer);
+
+ if (atomic_test_bit(link.flags, ADV_PROVISIONER)) {
+ /* Clear everything except the retransmit and protocol timer
+ * delayed work objects.
+ */
+ (void)memset(&link, 0, offsetof(struct pb_adv, tx.retransmit));
+ link.rx.id = XACT_ID_NVAL;
+ } else {
+ /* Accept another provisioning attempt */
+ link.id = 0;
+ atomic_clear(link.flags);
+ link.rx.id = XACT_ID_MAX;
+ link.tx.id = XACT_ID_NVAL;
+ }
+ link.tx.pending_ack = XACT_ID_NVAL;
+ if (!rx_buf) {
+ rx_buf = NET_BUF_SIMPLE(65);
+ }
+ link.rx.buf = rx_buf;
+ net_buf_simple_reset(link.rx.buf);
+}
+
+static void close_link(enum prov_bearer_link_status reason)
+{
+ const struct prov_bearer_cb *cb = link.cb;
+ void *cb_data = link.cb_data;
+
+ reset_adv_link();
+ cb->link_closed(&pb_adv, cb_data, reason);
+}
+
+static struct os_mbuf *adv_buf_create(uint8_t retransmits)
+{
+ struct os_mbuf *buf;
+
+ buf = bt_mesh_adv_create(BT_MESH_ADV_PROV,
+ BT_MESH_TRANSMIT(retransmits, 20),
+ BUF_TIMEOUT);
+ if (!buf) {
+ BT_ERR("Out of provisioning buffers");
+ return NULL;
+ }
+
+ return buf;
+}
+
+static void ack_complete(uint16_t duration, int err, void *user_data)
+{
+ BT_DBG("xact 0x%x complete", (uint8_t)link.tx.pending_ack);
+ atomic_clear_bit(link.flags, ADV_ACK_PENDING);
+}
+
+static bool ack_pending(void)
+{
+ return atomic_test_bit(link.flags, ADV_ACK_PENDING);
+}
+
+static void prov_failed(uint8_t err)
+{
+ BT_DBG("%u", err);
+ link.cb->error(&pb_adv, link.cb_data, err);
+ atomic_set_bit(link.flags, ADV_LINK_INVALID);
+}
+
+static void prov_msg_recv(void)
+{
+ k_delayed_work_submit(&link.prot_timer, PROTOCOL_TIMEOUT);
+
+ if (!bt_mesh_fcs_check(link.rx.buf, link.rx.fcs)) {
+ BT_ERR("Incorrect FCS");
+ return;
+ }
+
+ gen_prov_ack_send(link.rx.id);
+
+ if (atomic_test_bit(link.flags, ADV_LINK_INVALID)) {
+ BT_WARN("Unexpected msg 0x%02x on invalidated link",
+ link.rx.buf->om_data[0]);
+ prov_failed(PROV_ERR_UNEXP_PDU);
+ return;
+ }
+
+ link.cb->recv(&pb_adv, link.cb_data, link.rx.buf);
+}
+
+static void protocol_timeout(struct ble_npl_event *work)
+{
+ BT_DBG("");
+
+ link.rx.seg = 0U;
+ close_link(PROV_BEARER_LINK_STATUS_TIMEOUT);
+}
+/*******************************************************************************
+ * Generic provisioning
+ ******************************************************************************/
+
+static void gen_prov_ack_send(uint8_t xact_id)
+{
+ static const struct bt_mesh_send_cb cb = {
+ .start = ack_complete,
+ };
+ const struct bt_mesh_send_cb *complete;
+ struct os_mbuf *buf;
+ bool pending = atomic_test_and_set_bit(link.flags, ADV_ACK_PENDING);
+
+ BT_DBG("xact_id 0x%x", xact_id);
+
+ if (pending && link.tx.pending_ack == xact_id) {
+ BT_DBG("Not sending duplicate ack");
+ return;
+ }
+
+ buf = adv_buf_create(RETRANSMITS_ACK);
+ if (!buf) {
+ atomic_clear_bit(link.flags, ADV_ACK_PENDING);
+ return;
+ }
+
+ if (pending) {
+ complete = NULL;
+ } else {
+ link.tx.pending_ack = xact_id;
+ complete = &cb;
+ }
+
+ net_buf_add_be32(buf, link.id);
+ net_buf_add_u8(buf, xact_id);
+ net_buf_add_u8(buf, GPC_ACK);
+
+ bt_mesh_adv_send(buf, complete, NULL);
+ net_buf_unref(buf);
+}
+
+static void gen_prov_cont(struct prov_rx *rx, struct os_mbuf *buf)
+{
+ uint8_t seg = CONT_SEG_INDEX(rx->gpc);
+
+ BT_DBG("len %u, seg_index %u", buf->om_len, seg);
+
+ if (!link.rx.seg && link.rx.id == rx->xact_id) {
+ if (!ack_pending()) {
+ BT_DBG("Resending ack");
+ gen_prov_ack_send(rx->xact_id);
+ }
+
+ return;
+ }
+
+ if (!link.rx.seg &&
+ next_transaction_id(link.rx.id) == rx->xact_id) {
+ BT_DBG("Start segment lost");
+
+ link.rx.id = rx->xact_id;
+
+ net_buf_simple_reset(link.rx.buf);
+ link.rx.seg = SEG_NVAL;
+ link.rx.last_seg = SEG_NVAL;
+
+ prov_clear_tx();
+ } else if (rx->xact_id != link.rx.id) {
+ BT_WARN("Data for unknown transaction (0x%x != 0x%x)",
+ rx->xact_id, link.rx.id);
+ return;
+ }
+
+ if (seg > link.rx.last_seg) {
+ BT_ERR("Invalid segment index %u", seg);
+ prov_failed(PROV_ERR_NVAL_FMT);
+ return;
+ }
+
+ if (!(link.rx.seg & BIT(seg))) {
+ BT_DBG("Ignoring already received segment");
+ return;
+ }
+
+ memcpy(XACT_SEG_DATA(seg), buf->om_data, buf->om_len);
+ XACT_SEG_RECV(seg);
+
+ if (seg == link.rx.last_seg && !(link.rx.seg & BIT(0))) {
+ uint8_t expect_len;
+
+ expect_len = (link.rx.buf->om_len - 20U -
+ ((link.rx.last_seg - 1) * 23U));
+ if (expect_len != buf->om_len) {
+ BT_ERR("Incorrect last seg len: %u != %u", expect_len,
+ buf->om_len);
+ prov_failed(PROV_ERR_NVAL_FMT);
+ return;
+ }
+ }
+
+ if (!link.rx.seg) {
+ prov_msg_recv();
+ }
+}
+
+static void gen_prov_ack(struct prov_rx *rx, struct os_mbuf *buf)
+{
+ BT_DBG("len %u", buf->om_len);
+
+ if (!link.tx.buf[0]) {
+ return;
+ }
+
+ if (rx->xact_id == link.tx.id) {
+ /* Don't clear resending of link_close messages */
+ if (!atomic_test_bit(link.flags, ADV_LINK_CLOSING)) {
+ prov_clear_tx();
+ }
+
+ if (link.tx.cb) {
+ link.tx.cb(0, link.tx.cb_data);
+ }
+ }
+}
+
+static void gen_prov_start(struct prov_rx *rx, struct os_mbuf *buf)
+{
+ uint8_t seg = SEG_NVAL;
+
+ if (rx->xact_id == link.rx.id) {
+ if (!link.rx.seg) {
+ if (!ack_pending()) {
+ BT_DBG("Resending ack");
+ gen_prov_ack_send(rx->xact_id);
+ }
+
+ return;
+ }
+
+ if (!(link.rx.seg & BIT(0))) {
+ BT_DBG("Ignoring duplicate segment");
+ return;
+ }
+ } else if (rx->xact_id != next_transaction_id(link.rx.id)) {
+ BT_WARN("Unexpected xact 0x%x, expected 0x%x", rx->xact_id,
+ next_transaction_id(link.rx.id));
+ return;
+ }
+
+ net_buf_simple_reset(link.rx.buf);
+ link.rx.buf->om_len = net_buf_simple_pull_be16(buf);
+ link.rx.id = rx->xact_id;
+ link.rx.fcs = net_buf_simple_pull_u8(buf);
+
+ BT_DBG("%p len %u last_seg %u total_len %u fcs 0x%02x", link.rx.buf, buf->om_len,
+ START_LAST_SEG(rx->gpc), link.rx.buf->om_len, link.rx.fcs);
+
+ if (link.rx.buf->om_len < 1) {
+ BT_ERR("Ignoring zero-length provisioning PDU");
+ prov_failed(PROV_ERR_NVAL_FMT);
+ return;
+ }
+
+ if (START_LAST_SEG(rx->gpc) > 0 && link.rx.buf->om_len <= 20U) {
+ BT_ERR("Too small total length for multi-segment PDU");
+ prov_failed(PROV_ERR_NVAL_FMT);
+ return;
+ }
+
+ prov_clear_tx();
+
+ link.rx.last_seg = START_LAST_SEG(rx->gpc);
+ if ((link.rx.seg & BIT(0)) &&
+ (find_msb_set((~link.rx.seg) & SEG_NVAL) - 1 > link.rx.last_seg)) {
+ BT_ERR("Invalid segment index %u", seg);
+ prov_failed(PROV_ERR_NVAL_FMT);
+ return;
+ }
+
+ if (link.rx.seg) {
+ seg = link.rx.seg;
+ }
+
+ link.rx.seg = seg & ((1 << (START_LAST_SEG(rx->gpc) + 1)) - 1);
+ memcpy(link.rx.buf->om_data, buf->om_data, buf->om_len);
+ XACT_SEG_RECV(0);
+
+ if (!link.rx.seg) {
+ prov_msg_recv();
+ }
+}
+
+static void gen_prov_ctl(struct prov_rx *rx, struct os_mbuf *buf)
+{
+ BT_DBG("op 0x%02x len %u", BEARER_CTL(rx->gpc), buf->om_len);
+
+ switch (BEARER_CTL(rx->gpc)) {
+ case LINK_OPEN:
+ link_open(rx, buf);
+ break;
+ case LINK_ACK:
+ if (!atomic_test_bit(link.flags, ADV_LINK_ACTIVE)) {
+ return;
+ }
+
+ link_ack(rx, buf);
+ break;
+ case LINK_CLOSE:
+ if (!atomic_test_bit(link.flags, ADV_LINK_ACTIVE)) {
+ return;
+ }
+
+ link_close(rx, buf);
+ break;
+ default:
+ BT_ERR("Unknown bearer opcode: 0x%02x", BEARER_CTL(rx->gpc));
+
+ if (IS_ENABLED(CONFIG_BT_TESTING)) {
+ bt_test_mesh_prov_invalid_bearer(BEARER_CTL(rx->gpc));
+ }
+
+ return;
+ }
+}
+
+static const struct {
+ void (*func)(struct prov_rx *rx, struct os_mbuf *buf);
+ bool require_link;
+ uint8_t min_len;
+} gen_prov[] = {
+ { gen_prov_start, true, 3 },
+ { gen_prov_ack, true, 0 },
+ { gen_prov_cont, true, 0 },
+ { gen_prov_ctl, false, 0 },
+};
+
+static void gen_prov_recv(struct prov_rx *rx, struct os_mbuf *buf)
+{
+ if (buf->om_len < gen_prov[GPCF(rx->gpc)].min_len) {
+ BT_ERR("Too short GPC message type %u", GPCF(rx->gpc));
+ return;
+ }
+
+ if (!atomic_test_bit(link.flags, ADV_LINK_ACTIVE) &&
+ gen_prov[GPCF(rx->gpc)].require_link) {
+ BT_DBG("Ignoring message that requires active link");
+ return;
+ }
+
+ gen_prov[GPCF(rx->gpc)].func(rx, buf);
+}
+
+/*******************************************************************************
+ * TX
+ ******************************************************************************/
+
+static void send_reliable(void)
+{
+ int i;
+
+ link.tx.start = k_uptime_get();
+
+ for (i = 0; i < ARRAY_SIZE(link.tx.buf); i++) {
+ struct os_mbuf *buf = link.tx.buf[i];
+
+ if (!buf) {
+ break;
+ }
+
+ if (i + 1 < ARRAY_SIZE(link.tx.buf) && link.tx.buf[i + 1]) {
+ bt_mesh_adv_send(buf, NULL, NULL);
+ } else {
+ bt_mesh_adv_send(buf, &buf_sent_cb, NULL);
+ }
+ }
+}
+
+static void prov_retransmit(struct ble_npl_event *work)
+{
+ int32_t timeout_ms;
+ int i;
+
+ BT_DBG("");
+
+ if (!atomic_test_bit(link.flags, ADV_LINK_ACTIVE)) {
+ BT_WARN("Link not active");
+ return;
+ }
+
+ /*
+ * According to mesh profile spec (5.3.1.4.3), the close message should
+ * be restransmitted at least three times. Retransmit the link_close
+ * message until CLOSING_TIMEOUT has elapsed.
+ */
+ if (atomic_test_bit(link.flags, ADV_LINK_CLOSING)) {
+ timeout_ms = CLOSING_TIMEOUT;
+ } else {
+ timeout_ms = TRANSACTION_TIMEOUT;
+ }
+
+ if (k_uptime_get() - link.tx.start > timeout_ms) {
+ if (atomic_test_bit(link.flags, ADV_LINK_CLOSING)) {
+ close_link(PROV_BEARER_LINK_STATUS_SUCCESS);
+ } else {
+ BT_WARN("Giving up transaction");
+ close_link(PROV_BEARER_LINK_STATUS_TIMEOUT);
+ }
+
+ return;
+ }
+
+ for (i = 0; i < ARRAY_SIZE(link.tx.buf); i++) {
+ struct os_mbuf *buf = link.tx.buf[i];
+
+ if (!buf) {
+ break;
+ }
+
+ if (BT_MESH_ADV(buf)->busy) {
+ continue;
+ }
+
+ BT_DBG("%u bytes: %s", buf->om_len, bt_hex(buf->om_data, buf->om_len));
+
+ if (i + 1 < ARRAY_SIZE(link.tx.buf) && link.tx.buf[i + 1]) {
+ bt_mesh_adv_send(buf, NULL, NULL);
+ } else {
+ bt_mesh_adv_send(buf, &buf_sent_cb, NULL);
+ }
+ }
+}
+
+static int bearer_ctl_send(uint8_t op, const void *data, uint8_t data_len,
+ bool reliable)
+{
+ struct os_mbuf *buf;
+
+ BT_DBG("op 0x%02x data_len %u", op, data_len);
+
+ prov_clear_tx();
+ k_delayed_work_submit(&link.prot_timer, PROTOCOL_TIMEOUT);
+
+ buf = adv_buf_create(reliable ? RETRANSMITS_RELIABLE :
+ RETRANSMITS_UNRELIABLE);
+ if (!buf) {
+ return -ENOBUFS;
+ }
+
+ net_buf_add_be32(buf, link.id);
+ /* Transaction ID, always 0 for Bearer messages */
+ net_buf_add_u8(buf, 0x00);
+ net_buf_add_u8(buf, GPC_CTL(op));
+ net_buf_add_mem(buf, data, data_len);
+
+ if (reliable) {
+ link.tx.buf[0] = buf;
+ send_reliable();
+ } else {
+ bt_mesh_adv_send(buf, &buf_sent_cb, NULL);
+ net_buf_unref(buf);
+ }
+
+ return 0;
+}
+
+static int prov_send_adv(struct os_mbuf *msg,
+ prov_bearer_send_complete_t cb, void *cb_data)
+{
+ struct os_mbuf *start, *buf;
+ uint8_t seg_len, seg_id;
+
+ prov_clear_tx();
+ k_delayed_work_submit(&link.prot_timer, PROTOCOL_TIMEOUT);
+
+ start = adv_buf_create(RETRANSMITS_RELIABLE);
+ if (!start) {
+ return -ENOBUFS;
+ }
+
+ link.tx.id = next_transaction_id(link.tx.id);
+ net_buf_add_be32(start, link.id);
+ net_buf_add_u8(start, link.tx.id);
+
+ net_buf_add_u8(start, GPC_START(last_seg(msg->om_len)));
+ net_buf_add_be16(start, msg->om_len);
+ net_buf_add_u8(start, bt_mesh_fcs_calc(msg->om_data, msg->om_len));
+
+ link.tx.buf[0] = start;
+ link.tx.cb = cb;
+ link.tx.cb_data = cb_data;
+
+ BT_DBG("xact_id: 0x%x len: %u", link.tx.id, msg->om_len);
+
+ seg_len = MIN(msg->om_len, START_PAYLOAD_MAX);
+ BT_DBG("seg 0 len %u: %s", seg_len, bt_hex(msg->om_data, seg_len));
+ net_buf_add_mem(start, msg->om_data, seg_len);
+ net_buf_simple_pull_mem(msg, seg_len);
+
+ buf = start;
+ for (seg_id = 1U; msg->om_len > 0; seg_id++) {
+ if (seg_id >= ARRAY_SIZE(link.tx.buf)) {
+ BT_ERR("Too big message");
+ free_segments();
+ return -E2BIG;
+ }
+
+ buf = adv_buf_create(RETRANSMITS_RELIABLE);
+ if (!buf) {
+ free_segments();
+ return -ENOBUFS;
+ }
+
+ link.tx.buf[seg_id] = buf;
+
+ seg_len = MIN(msg->om_len, CONT_PAYLOAD_MAX);
+
+ BT_DBG("seg %u len %u: %s", seg_id, seg_len,
+ bt_hex(msg->om_data, seg_len));
+
+ net_buf_add_be32(buf, link.id);
+ net_buf_add_u8(buf, link.tx.id);
+ net_buf_add_u8(buf, GPC_CONT(seg_id));
+ net_buf_add_mem(buf, msg->om_data, seg_len);
+ net_buf_simple_pull_mem(msg, seg_len);
+ }
+
+ send_reliable();
+
+ return 0;
+}
+
+/*******************************************************************************
+ * Link management rx
+ ******************************************************************************/
+
+static void link_open(struct prov_rx *rx, struct os_mbuf *buf)
+{
+ BT_DBG("len %u", buf->om_len);
+
+ if (buf->om_len < 16) {
+ BT_ERR("Too short bearer open message (len %u)", buf->om_len);
+ return;
+ }
+
+ if (atomic_test_bit(link.flags, ADV_LINK_ACTIVE)) {
+ /* Send another link ack if the provisioner missed the last */
+ if (link.id == rx->link_id) {
+ BT_DBG("Resending link ack");
+ bearer_ctl_send(LINK_ACK, NULL, 0, false);
+ } else {
+ BT_DBG("Ignoring bearer open: link already active");
+ }
+
+ return;
+ }
+
+ if (memcmp(buf->om_data, bt_mesh_prov_get()->uuid, 16)) {
+ BT_DBG("Bearer open message not for us");
+ return;
+ }
+
+ link.id = rx->link_id;
+ atomic_set_bit(link.flags, ADV_LINK_ACTIVE);
+ net_buf_simple_reset(link.rx.buf);
+
+ bearer_ctl_send(LINK_ACK, NULL, 0, false);
+
+ link.cb->link_opened(&pb_adv, link.cb_data);
+}
+
+static void link_ack(struct prov_rx *rx, struct os_mbuf *buf)
+{
+ BT_DBG("len %u", buf->om_len);
+
+ if (atomic_test_bit(link.flags, ADV_PROVISIONER)) {
+ if (atomic_test_and_set_bit(link.flags, ADV_LINK_ACK_RECVD)) {
+ return;
+ }
+
+ prov_clear_tx();
+
+ link.cb->link_opened(&pb_adv, link.cb_data);
+ }
+}
+
+static void link_close(struct prov_rx *rx, struct os_mbuf *buf)
+{
+ BT_DBG("len %u", buf->om_len);
+
+ if (buf->om_len != 1) {
+ return;
+ }
+
+ close_link(net_buf_simple_pull_u8(buf));
+}
+
+/*******************************************************************************
+ * Higher level functionality
+ ******************************************************************************/
+
+void bt_mesh_pb_adv_recv(struct os_mbuf *buf)
+{
+ struct prov_rx rx;
+
+ if (!link.cb) {
+ return;
+ }
+
+ if (buf->om_len < 6) {
+ BT_WARN("Too short provisioning packet (len %u)", buf->om_len);
+ return;
+ }
+
+ rx.link_id = net_buf_simple_pull_be32(buf);
+ rx.xact_id = net_buf_simple_pull_u8(buf);
+ rx.gpc = net_buf_simple_pull_u8(buf);
+
+ if (atomic_test_bit(link.flags, ADV_LINK_ACTIVE) && link.id != rx.link_id) {
+ return;
+ }
+
+ BT_DBG("link_id 0x%08x xact_id 0x%x", rx.link_id, rx.xact_id);
+
+ gen_prov_recv(&rx, buf);
+}
+
+static int prov_link_open(const uint8_t uuid[16], int32_t timeout,
+ const struct prov_bearer_cb *cb, void *cb_data)
+{
+ BT_DBG("uuid %s", bt_hex(uuid, 16));
+
+ if (atomic_test_and_set_bit(link.flags, ADV_LINK_ACTIVE)) {
+ return -EBUSY;
+ }
+
+ atomic_set_bit(link.flags, ADV_PROVISIONER);
+
+ bt_rand(&link.id, sizeof(link.id));
+ link.tx.id = XACT_ID_MAX;
+ link.rx.id = XACT_ID_NVAL;
+ link.cb = cb;
+ link.cb_data = cb_data;
+
+ net_buf_simple_reset(link.rx.buf);
+
+ bearer_ctl_send(LINK_OPEN, uuid, 16, true);
+
+ return 0;
+}
+
+static int prov_link_accept(const struct prov_bearer_cb *cb, void *cb_data)
+{
+ if (atomic_test_bit(link.flags, ADV_LINK_ACTIVE)) {
+ return -EBUSY;
+ }
+
+ link.rx.id = XACT_ID_MAX;
+ link.tx.id = XACT_ID_NVAL;
+ link.cb = cb;
+ link.cb_data = cb_data;
+
+ /* Make sure we're scanning for provisioning inviations */
+ bt_mesh_scan_enable();
+ /* Enable unprovisioned beacon sending */
+ bt_mesh_beacon_enable();
+
+ return 0;
+}
+
+static void prov_link_close(enum prov_bearer_link_status status)
+{
+ if (atomic_test_and_set_bit(link.flags, ADV_LINK_CLOSING)) {
+ return;
+ }
+
+ bearer_ctl_send(LINK_CLOSE, &status, 1, true);
+}
+
+void pb_adv_init(void)
+{
+ k_delayed_work_init(&link.prot_timer, protocol_timeout);
+ k_delayed_work_init(&link.tx.retransmit, prov_retransmit);
+
+ if (!rx_buf) {
+ rx_buf = NET_BUF_SIMPLE(65);
+ }
+ link.rx.buf = rx_buf;
+ net_buf_simple_reset(link.rx.buf);
+}
+
+void pb_adv_reset(void)
+{
+ reset_adv_link();
+}
+
+const struct prov_bearer pb_adv = {
+ .type = BT_MESH_PROV_ADV,
+ .link_open = prov_link_open,
+ .link_accept = prov_link_accept,
+ .link_close = prov_link_close,
+ .send = prov_send_adv,
+ .clear_tx = prov_clear_tx,
+};
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/pb_gatt.c b/src/libs/mynewt-nimble/nimble/host/mesh/src/pb_gatt.c
new file mode 100644
index 00000000..a8f73787
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/pb_gatt.c
@@ -0,0 +1,158 @@
+/* Bluetooth Mesh */
+
+/*
+ * Copyright (c) 2017 Intel Corporation
+ * Copyright (c) 2020 Nordic Semiconductor ASA
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+#define MESH_LOG_MODULE BLE_MESH_PROV_LOG
+
+#include "mesh/mesh.h"
+#include "prov.h"
+#include "net.h"
+#include "proxy.h"
+#include "adv.h"
+#include "prov.h"
+
+struct prov_link {
+ uint16_t conn_handle;
+ const struct prov_bearer_cb *cb;
+ void *cb_data;
+ struct {
+ uint8_t id; /* Transaction ID */
+ uint8_t prev_id; /* Previous Transaction ID */
+ uint8_t seg; /* Bit-field of unreceived segments */
+ uint8_t last_seg; /* Last segment (to check length) */
+ uint8_t fcs; /* Expected FCS value */
+ struct os_mbuf *buf;
+ } rx;
+ struct k_delayed_work prot_timer;
+};
+
+static struct prov_link link;
+
+static void reset_state(void)
+{
+ link.conn_handle = BLE_HS_CONN_HANDLE_NONE;
+
+ k_delayed_work_cancel(&link.prot_timer);
+
+ link.rx.buf = bt_mesh_proxy_get_buf();
+}
+
+static void link_closed(enum prov_bearer_link_status status)
+{
+ const struct prov_bearer_cb *cb = link.cb;
+
+ void *cb_data = link.cb_data;
+
+ reset_state();
+
+ cb->link_closed(&pb_gatt, cb_data, status);
+}
+
+static void protocol_timeout(struct ble_npl_event *work)
+{
+ BT_DBG("Protocol timeout");
+
+ link_closed(PROV_BEARER_LINK_STATUS_TIMEOUT);
+}
+
+int bt_mesh_pb_gatt_recv(uint16_t conn_handle, struct os_mbuf *buf)
+{
+ BT_DBG("%u bytes: %s", buf->om_len, bt_hex(buf->om_data, buf->om_len));
+
+ if (link.conn_handle != conn_handle || !link.cb) {
+ BT_WARN("Data for unexpected connection");
+ return -ENOTCONN;
+ }
+
+ if (buf->om_len < 1) {
+ BT_WARN("Too short provisioning packet (len %u)", buf->om_len);
+ return -EINVAL;
+ }
+
+ k_delayed_work_submit(&link.prot_timer, PROTOCOL_TIMEOUT);
+
+ link.cb->recv(&pb_gatt, link.cb_data, buf);
+
+ return 0;
+}
+
+int bt_mesh_pb_gatt_open(uint16_t conn_handle)
+{
+ BT_DBG("conn %p", conn_handle);
+
+ if (link.conn_handle) {
+ return -EBUSY;
+ }
+
+ link.conn_handle = conn_handle;
+ k_delayed_work_submit(&link.prot_timer, PROTOCOL_TIMEOUT);
+
+ link.cb->link_opened(&pb_gatt, link.cb_data);
+
+ return 0;
+}
+
+int bt_mesh_pb_gatt_close(uint16_t conn_handle)
+{
+ BT_DBG("conn %p", conn_handle);
+
+ if (link.conn_handle != conn_handle) {
+ BT_DBG("Not connected");
+ return -ENOTCONN;
+ }
+
+ link.cb->link_closed(&pb_gatt, link.cb_data,
+ PROV_BEARER_LINK_STATUS_SUCCESS);
+
+ reset_state();
+
+ return 0;
+}
+
+static int link_accept(const struct prov_bearer_cb *cb, void *cb_data)
+{
+ bt_mesh_proxy_prov_enable();
+ bt_mesh_adv_update();
+
+ link.cb = cb;
+ link.cb_data = cb_data;
+
+ return 0;
+}
+
+static int buf_send(struct os_mbuf *buf, prov_bearer_send_complete_t cb,
+ void *cb_data)
+{
+ if (!link.conn_handle) {
+ return -ENOTCONN;
+ }
+
+ k_delayed_work_submit(&link.prot_timer, PROTOCOL_TIMEOUT);
+
+ return bt_mesh_proxy_send(link.conn_handle, BT_MESH_PROXY_PROV, buf);
+}
+
+static void clear_tx(void)
+{
+ /* No action */
+}
+
+void pb_gatt_init(void)
+{
+ k_delayed_work_init(&link.prot_timer, protocol_timeout);
+}
+
+void pb_gatt_reset(void)
+{
+ reset_state();
+}
+const struct prov_bearer pb_gatt = {
+ .type = BT_MESH_PROV_GATT,
+ .link_accept = link_accept,
+ .send = buf_send,
+ .clear_tx = clear_tx,
+}; \ No newline at end of file
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/prov.c b/src/libs/mynewt-nimble/nimble/host/mesh/src/prov.c
index fe92c0e3..ba514dde 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/src/prov.c
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/prov.c
@@ -9,8 +9,6 @@
#include "syscfg/syscfg.h"
#define MESH_LOG_MODULE BLE_MESH_PROV_LOG
-#if MYNEWT_VAL(BLE_MESH_PROV)
-
#include <errno.h>
#include "mesh/mesh.h"
@@ -18,700 +16,52 @@
#include "crypto.h"
#include "atomic.h"
-#include "adv.h"
#include "net.h"
#include "access.h"
#include "foundation.h"
-#include "proxy.h"
#include "prov.h"
#include "testing.h"
-#include "settings.h"
-#include "nodes.h"
-
-/* 3 transmissions, 20ms interval */
-#define PROV_XMIT BT_MESH_TRANSMIT(2, 20)
-
-#define AUTH_METHOD_NO_OOB 0x00
-#define AUTH_METHOD_STATIC 0x01
-#define AUTH_METHOD_OUTPUT 0x02
-#define AUTH_METHOD_INPUT 0x03
-
-#define OUTPUT_OOB_BLINK 0x00
-#define OUTPUT_OOB_BEEP 0x01
-#define OUTPUT_OOB_VIBRATE 0x02
-#define OUTPUT_OOB_NUMBER 0x03
-#define OUTPUT_OOB_STRING 0x04
-
-#define INPUT_OOB_PUSH 0x00
-#define INPUT_OOB_TWIST 0x01
-#define INPUT_OOB_NUMBER 0x02
-#define INPUT_OOB_STRING 0x03
-
-#define PUB_KEY_NO_OOB 0x00
-#define PUB_KEY_OOB 0x01
-
-#define PROV_ERR_NONE 0x00
-#define PROV_ERR_NVAL_PDU 0x01
-#define PROV_ERR_NVAL_FMT 0x02
-#define PROV_ERR_UNEXP_PDU 0x03
-#define PROV_ERR_CFM_FAILED 0x04
-#define PROV_ERR_RESOURCES 0x05
-#define PROV_ERR_DECRYPT 0x06
-#define PROV_ERR_UNEXP_ERR 0x07
-#define PROV_ERR_ADDR 0x08
-
-#define PROV_INVITE 0x00
-#define PROV_CAPABILITIES 0x01
-#define PROV_START 0x02
-#define PROV_PUB_KEY 0x03
-#define PROV_INPUT_COMPLETE 0x04
-#define PROV_CONFIRM 0x05
-#define PROV_RANDOM 0x06
-#define PROV_DATA 0x07
-#define PROV_COMPLETE 0x08
-#define PROV_FAILED 0x09
-
-#define PROV_NO_PDU 0xff
-
-#define PROV_ALG_P256 0x00
-
-#define GPCF(gpc) (gpc & 0x03)
-#define GPC_START(last_seg) (((last_seg) << 2) | 0x00)
-#define GPC_ACK 0x01
-#define GPC_CONT(seg_id) (((seg_id) << 2) | 0x02)
-#define GPC_CTL(op) (((op) << 2) | 0x03)
-
-#define START_PAYLOAD_MAX 20
-#define CONT_PAYLOAD_MAX 23
-
-#define START_LAST_SEG(gpc) (gpc >> 2)
-#define CONT_SEG_INDEX(gpc) (gpc >> 2)
-
-#define BEARER_CTL(gpc) (gpc >> 2)
-#define LINK_OPEN 0x00
-#define LINK_ACK 0x01
-#define LINK_CLOSE 0x02
-
-#define CLOSE_REASON_SUCCESS 0x00
-#define CLOSE_REASON_TIMEOUT 0x01
-#define CLOSE_REASON_FAILED 0x02
-
-#define XACT_SEG_DATA(_seg) (&link.rx.buf->om_data[20 + ((_seg - 1) * 23)])
-#define XACT_SEG_RECV(_seg) (link.rx.seg &= ~(1 << (_seg)))
-
-#define XACT_NVAL 0xff
-
-enum {
- WAIT_PUB_KEY, /* Waiting for local PubKey to be generated */
- LINK_ACTIVE, /* Link has been opened */
- LINK_ACK_RECVD, /* Ack for link has been received */
- LINK_CLOSING, /* Link is closing down */
- SEND_PUB_KEY, /* Waiting to send PubKey */
- WAIT_NUMBER, /* Waiting for number input from user */
- WAIT_STRING, /* Waiting for string input from user */
- NOTIFY_INPUT_COMPLETE, /* Notify that input has been completed. */
- LINK_INVALID, /* Error occurred during provisioning */
- PROVISIONER, /* The link was opened as provisioner */
-
- NUM_FLAGS,
-};
-
-#if MYNEWT_VAL(BLE_MESH_PROVISIONER)
-#define PROVISIONER_LINK 1
-#else
-#define PROVISIONER_LINK 0
-#endif
-
-struct provisioner_link {
- struct bt_mesh_node *node;
- u16_t addr;
- u16_t net_idx;
- u8_t attention_duration;
-};
-
-struct prov_link {
- ATOMIC_DEFINE(flags, NUM_FLAGS);
-#if (MYNEWT_VAL(BLE_MESH_PB_GATT))
- uint16_t conn_handle; /* GATT connection */
-#endif
- struct provisioner_link provisioner[PROVISIONER_LINK];
-
- u8_t dhkey[32]; /* Calculated DHKey */
- u8_t expect; /* Next expected PDU */
-
- u8_t oob_method;
- u8_t oob_action;
- u8_t oob_size;
-
- u8_t conf[16]; /* Remote Confirmation */
- u8_t rand[16]; /* Local Random */
- u8_t auth[16]; /* Authentication Value */
-
- u8_t conf_salt[16]; /* ConfirmationSalt */
- u8_t conf_key[16]; /* ConfirmationKey */
- u8_t conf_inputs[145]; /* ConfirmationInputs */
- u8_t prov_salt[16]; /* Provisioning Salt */
-
-#if (MYNEWT_VAL(BLE_MESH_PB_ADV))
- u32_t id; /* Link ID */
-
- struct {
- u8_t id; /* Transaction ID */
- u8_t prev_id; /* Previous Transaction ID */
- u8_t seg; /* Bit-field of unreceived segments */
- u8_t last_seg; /* Last segment (to check length) */
- u8_t fcs; /* Expected FCS value */
- struct os_mbuf *buf;
- } rx;
-
- struct {
- /* Start timestamp of the transaction */
- s64_t start;
-
- /* Transaction id*/
- u8_t id;
-
- /* Pending outgoing buffer(s) */
- struct os_mbuf *buf[3];
-
- /* Retransmit timer */
- struct k_delayed_work retransmit;
- } tx;
-#endif
-
- struct k_delayed_work prot_timer;
-};
-
-struct prov_rx {
- u32_t link_id;
- u8_t xact_id;
- u8_t gpc;
-};
-
-#define RETRANSMIT_TIMEOUT K_MSEC(500)
-#define BUF_TIMEOUT K_MSEC(400)
-#define CLOSING_TIMEOUT K_SECONDS(3)
-#define TRANSACTION_TIMEOUT K_SECONDS(30)
-#define PROTOCOL_TIMEOUT K_SECONDS(60)
-
-#if (MYNEWT_VAL(BLE_MESH_PB_GATT))
-#define PROV_BUF_HEADROOM 5
-#else
-#define PROV_BUF_HEADROOM 0
-static struct os_mbuf *rx_buf;
-#endif
-
-#define PROV_BUF(len) NET_BUF_SIMPLE(PROV_BUF_HEADROOM + len)
-static struct prov_link link;
+struct bt_mesh_prov_link bt_mesh_prov_link;
+const struct bt_mesh_prov *bt_mesh_prov;
-static const struct bt_mesh_prov *prov;
-
-static void pub_key_ready(const u8_t *pkey);
+static void pub_key_ready(const uint8_t *pkey)
+{
+ if (!pkey) {
+ BT_WARN("Public key not available");
+ return;
+ }
+ BT_DBG("Local public key ready");
+}
-static int reset_state(void)
+int bt_mesh_prov_reset_state(void (*func)(const uint8_t key[64]))
{
- static struct bt_pub_key_cb pub_key_cb = {
- .func = pub_key_ready,
- };
+ BT_DBG("bt_mesh_prov_reset_state");
+
int err;
+ static struct bt_pub_key_cb pub_key_cb;
+ const size_t offset = offsetof(struct bt_mesh_prov_link, dhkey);
- k_delayed_work_cancel(&link.prot_timer);
+ pub_key_cb.func = func ? func : pub_key_ready;
/* Disable Attention Timer if it was set */
- if (link.conf_inputs[0]) {
+ if (bt_mesh_prov_link.conf_inputs[0]) {
bt_mesh_attention(NULL, 0);
}
- if (IS_ENABLED(CONFIG_BT_MESH_PROVISIONER) &&
- link.provisioner->node != NULL) {
- bt_mesh_node_del(link.provisioner->node, false);
- }
-
-#if (MYNEWT_VAL(BLE_MESH_PB_ADV))
- /* Clear everything except the retransmit and protocol timer
- * delayed work objects.
- */
- (void)memset(&link, 0, offsetof(struct prov_link, tx.retransmit));
- link.rx.prev_id = XACT_NVAL;
-
-#if (MYNEWT_VAL(BLE_MESH_PB_GATT))
- link.rx.buf = bt_mesh_proxy_get_buf();
-#else
- if (!rx_buf) {
- rx_buf = NET_BUF_SIMPLE(65);
- }
- net_buf_simple_init(rx_buf, 0);
- link.rx.buf = rx_buf;
-#endif /* PB_GATT */
-
-#else /* !PB_ADV */
- /* Clear everything except the protocol timer (k_delayed_work) */
- (void)memset(&link, 0, offsetof(struct prov_link, prot_timer));
-#endif /* PB_ADV */
-
-#if (MYNEWT_VAL(BLE_MESH_PB_GATT))
- link.conn_handle = BLE_HS_CONN_HANDLE_NONE;
-#endif
+ atomic_clear(bt_mesh_prov_link.flags);
+ (void)memset((uint8_t *)&bt_mesh_prov_link + offset, 0,
+ sizeof(bt_mesh_prov_link) - offset);
err = bt_pub_key_gen(&pub_key_cb);
if (err) {
BT_ERR("Failed to generate public key (%d)", err);
return err;
}
-
return 0;
}
-#if (MYNEWT_VAL(BLE_MESH_PB_ADV))
-static void buf_sent(int err, void *user_data)
-{
- BT_DBG("buf_sent");
-
- if (!link.tx.buf[0]) {
- return;
- }
-
- k_delayed_work_submit(&link.tx.retransmit, RETRANSMIT_TIMEOUT);
-}
-
-static struct bt_mesh_send_cb buf_sent_cb = {
- .end = buf_sent,
-};
-
-static void free_segments(void)
-{
- int i;
-
- for (i = 0; i < ARRAY_SIZE(link.tx.buf); i++) {
- struct os_mbuf *buf = link.tx.buf[i];
-
- if (!buf) {
- break;
- }
-
- link.tx.buf[i] = NULL;
- /* Mark as canceled */
- BT_MESH_ADV(buf)->busy = 0;
- net_buf_unref(buf);
- }
-}
-
-static void prov_clear_tx(void)
-{
- BT_DBG("");
-
- k_delayed_work_cancel(&link.tx.retransmit);
-
- free_segments();
-}
-
-static void reset_adv_link(void)
-{
- prov_clear_tx();
-
- if (prov->link_close) {
- prov->link_close(BT_MESH_PROV_ADV);
- }
-
- reset_state();
-}
-
-static struct os_mbuf *adv_buf_create(void)
-{
- struct os_mbuf *buf;
-
- buf = bt_mesh_adv_create(BT_MESH_ADV_PROV, PROV_XMIT, BUF_TIMEOUT);
- if (!buf) {
- BT_ERR("Out of provisioning buffers");
- assert(0);
- return NULL;
- }
-
- return buf;
-}
-
-static u8_t pending_ack = XACT_NVAL;
-
-static void ack_complete(u16_t duration, int err, void *user_data)
-{
- BT_DBG("xact %u complete", (u8_t)pending_ack);
- pending_ack = XACT_NVAL;
-}
-
-static void gen_prov_ack_send(u8_t xact_id)
-{
- static const struct bt_mesh_send_cb cb = {
- .start = ack_complete,
- };
- const struct bt_mesh_send_cb *complete;
- struct os_mbuf *buf;
-
- BT_DBG("xact_id %u", xact_id);
-
- if (pending_ack == xact_id) {
- BT_DBG("Not sending duplicate ack");
- return;
- }
-
- buf = adv_buf_create();
- if (!buf) {
- return;
- }
-
- if (pending_ack == XACT_NVAL) {
- pending_ack = xact_id;
- complete = &cb;
- } else {
- complete = NULL;
- }
-
- net_buf_add_be32(buf, link.id);
- net_buf_add_u8(buf, xact_id);
- net_buf_add_u8(buf, GPC_ACK);
-
- bt_mesh_adv_send(buf, complete, NULL);
- net_buf_unref(buf);
-}
-
-static void send_reliable(void)
-{
- int i;
-
- link.tx.start = k_uptime_get();
-
- for (i = 0; i < ARRAY_SIZE(link.tx.buf); i++) {
- struct os_mbuf *buf = link.tx.buf[i];
-
- if (!buf) {
- break;
- }
-
- if (i + 1 < ARRAY_SIZE(link.tx.buf) && link.tx.buf[i + 1]) {
- bt_mesh_adv_send(buf, NULL, NULL);
- } else {
- bt_mesh_adv_send(buf, &buf_sent_cb, NULL);
- }
- }
-}
-
-static int bearer_ctl_send(u8_t op, const void *data, u8_t data_len)
-{
- struct os_mbuf *buf;
-
- BT_DBG("op 0x%02x data_len %u", op, data_len);
-
- prov_clear_tx();
-
- buf = adv_buf_create();
- if (!buf) {
- return -ENOBUFS;
- }
-
- net_buf_add_be32(buf, link.id);
- /* Transaction ID, always 0 for Bearer messages */
- net_buf_add_u8(buf, 0x00);
- net_buf_add_u8(buf, GPC_CTL(op));
- net_buf_add_mem(buf, data, data_len);
-
- link.tx.buf[0] = buf;
- send_reliable();
-
- return 0;
-}
-
-static u8_t last_seg(u8_t len)
-{
- if (len <= START_PAYLOAD_MAX) {
- return 0;
- }
-
- len -= START_PAYLOAD_MAX;
-
- return 1 + (len / CONT_PAYLOAD_MAX);
-}
-
-static inline u8_t next_transaction_id(void)
-{
- if (atomic_test_bit(link.flags, PROVISIONER)) {
- if (link.tx.id != 0x7F) {
- link.tx.id++;
- } else {
- link.tx.id = 0;
- }
- } else {
- if (link.tx.id != 0U && link.tx.id != 0xFF) {
- link.tx.id++;
- } else {
- link.tx.id = 0x80;
- }
- }
-
- return link.tx.id;
-}
-
-static int prov_send_adv(struct os_mbuf *msg)
-{
- struct os_mbuf *start, *buf;
- u8_t seg_len, seg_id;
- u8_t xact_id;
-
- BT_DBG("len %u: %s", msg->om_len, bt_hex(msg->om_data, msg->om_len));
-
- prov_clear_tx();
-
- start = adv_buf_create();
- if (!start) {
- return -ENOBUFS;
- }
-
- xact_id = next_transaction_id();
- net_buf_add_be32(start, link.id);
- net_buf_add_u8(start, xact_id);
-
- net_buf_add_u8(start, GPC_START(last_seg(msg->om_len)));
- net_buf_add_be16(start, msg->om_len);
- net_buf_add_u8(start, bt_mesh_fcs_calc(msg->om_data, msg->om_len));
-
- link.tx.buf[0] = start;
-
- seg_len = min(msg->om_len, START_PAYLOAD_MAX);
- BT_DBG("seg 0 len %u: %s", seg_len, bt_hex(msg->om_data, seg_len));
- net_buf_add_mem(start, msg->om_data, seg_len);
- net_buf_simple_pull(msg, seg_len);
-
- buf = start;
- for (seg_id = 1; msg->om_len > 0; seg_id++) {
- if (seg_id >= ARRAY_SIZE(link.tx.buf)) {
- BT_ERR("Too big message");
- free_segments();
- return -E2BIG;
- }
-
- buf = adv_buf_create();
- if (!buf) {
- free_segments();
- return -ENOBUFS;
- }
-
- link.tx.buf[seg_id] = buf;
-
- seg_len = min(msg->om_len, CONT_PAYLOAD_MAX);
-
- BT_DBG("seg_id %u len %u: %s", seg_id, seg_len,
- bt_hex(msg->om_data, seg_len));
-
- net_buf_add_be32(buf, link.id);
- net_buf_add_u8(buf, xact_id);
- net_buf_add_u8(buf, GPC_CONT(seg_id));
- net_buf_add_mem(buf, msg->om_data, seg_len);
- net_buf_simple_pull(msg, seg_len);
- }
-
- send_reliable();
-
- return 0;
-}
-
-#endif /* MYNEWT_VAL(BLE_MESH_PB_ADV) */
-
-#if (MYNEWT_VAL(BLE_MESH_PB_GATT))
-static int prov_send_gatt(struct os_mbuf *msg)
-{
- if (link.conn_handle == BLE_HS_CONN_HANDLE_NONE) {
- BT_ERR("No connection handle!?");
- return -ENOTCONN;
- }
-
- return bt_mesh_proxy_send(link.conn_handle, BT_MESH_PROXY_PROV, msg);
-}
-#endif /* MYNEWT_VAL(BLE_MESH_PB_GATT) */
-
-static inline int prov_send(struct os_mbuf *buf)
-{
- k_delayed_work_submit(&link.prot_timer, PROTOCOL_TIMEOUT);
-
-#if (MYNEWT_VAL(BLE_MESH_PB_GATT))
- if (link.conn_handle != BLE_HS_CONN_HANDLE_NONE) {
- return prov_send_gatt(buf);
- }
-#endif
-#if (MYNEWT_VAL(BLE_MESH_PB_ADV))
- return prov_send_adv(buf);
-#else
- return 0;
-#endif
-}
-
-static void prov_buf_init(struct os_mbuf *buf, u8_t type)
-{
- net_buf_simple_init(buf, PROV_BUF_HEADROOM);
- net_buf_simple_add_u8(buf, type);
-}
-
-static void prov_send_fail_msg(u8_t err)
-{
- struct os_mbuf *buf = PROV_BUF(2);
-
- prov_buf_init(buf, PROV_FAILED);
- net_buf_simple_add_u8(buf, err);
-
- if (prov_send(buf)) {
- BT_ERR("Failed to send Provisioning Failed message");
- }
-
- atomic_set_bit(link.flags, LINK_INVALID);
-
- os_mbuf_free_chain(buf);
-}
-
-static void prov_invite(const u8_t *data)
-{
- struct os_mbuf *buf = PROV_BUF(12);
-
- BT_DBG("Attention Duration: %u seconds", data[0]);
-
- if (data[0]) {
- bt_mesh_attention(NULL, data[0]);
- }
-
- link.conf_inputs[0] = data[0];
-
- prov_buf_init(buf, PROV_CAPABILITIES);
-
- /* Number of Elements supported */
- net_buf_simple_add_u8(buf, bt_mesh_elem_count());
-
- /* Supported algorithms - FIPS P-256 Eliptic Curve */
- net_buf_simple_add_be16(buf, BIT(PROV_ALG_P256));
-
- /* Public Key Type, Only "No OOB" Public Key is supported*/
- net_buf_simple_add_u8(buf, PUB_KEY_NO_OOB);
-
- /* Static OOB Type */
- net_buf_simple_add_u8(buf, prov->static_val ? BIT(0) : 0x00);
-
- /* Output OOB Size */
- net_buf_simple_add_u8(buf, prov->output_size);
-
- /* Output OOB Action */
- net_buf_simple_add_be16(buf, prov->output_actions);
-
- /* Input OOB Size */
- net_buf_simple_add_u8(buf, prov->input_size);
-
- /* Input OOB Action */
- net_buf_simple_add_be16(buf, prov->input_actions);
-
- memcpy(&link.conf_inputs[1], &buf->om_data[1], 11);
-
- if (prov_send(buf)) {
- BT_ERR("Failed to send capabilities");
- goto done;
- }
-
- link.expect = PROV_START;
-
-done:
- os_mbuf_free_chain(buf);
-}
-
-#if MYNEWT_VAL(BLE_MESH_PB_ADV)
-static void send_invite(void)
-{
- struct os_mbuf *inv = PROV_BUF(2);
-
- BT_DBG("");
-
- prov_buf_init(inv, PROV_INVITE);
- net_buf_simple_add_u8(inv, link.provisioner->attention_duration);
-
- link.conf_inputs[0] = link.provisioner->attention_duration;
-
- if (prov_send(inv)) {
- BT_ERR("Failed to send invite");
- goto done;
- }
-
- link.expect = PROV_CAPABILITIES;
-
-done:
- os_mbuf_free_chain(inv);
-}
-#endif
-
-static void send_start(void)
-{
- struct os_mbuf *start = PROV_BUF(6);
-
- BT_DBG("");
-
- prov_buf_init(start, PROV_START);
-
- net_buf_simple_add_u8(start, PROV_ALG_P256);
- net_buf_simple_add_u8(start, PUB_KEY_NO_OOB);
- net_buf_simple_add_u8(start, AUTH_METHOD_NO_OOB);
- memset(link.auth, 0, sizeof(link.auth));
-
- net_buf_simple_add_u8(start, 0); /* Auth Action */
- net_buf_simple_add_u8(start, 0); /* Auth Size */
-
- memcpy(&link.conf_inputs[12], &start->om_data[1], 5);
-
- if (prov_send(start)) {
- BT_ERR("Failed to send start");
- }
-
- os_mbuf_free_chain(start);
-}
-
-static void prov_capabilities(const u8_t *data)
-{
- u16_t algorithms, output_action, input_action;
-
- if (!IS_ENABLED(CONFIG_BT_MESH_PROVISIONER)) {
- return;
- }
-
- BT_DBG("Elements: %u", data[0]);
-
- algorithms = sys_get_be16(&data[1]);
- BT_DBG("Algorithms: %u", algorithms);
-
- BT_DBG("Public Key Type: 0x%02x", data[3]);
- BT_DBG("Static OOB Type: 0x%02x", data[4]);
- BT_DBG("Output OOB Size: %u", data[5]);
-
- output_action = sys_get_be16(&data[6]);
- BT_DBG("Output OOB Action: 0x%04x", output_action);
-
- BT_DBG("Input OOB Size: %u", data[8]);
-
- input_action = sys_get_be16(&data[9]);
- BT_DBG("Input OOB Action: 0x%04x", input_action);
-
- if (data[0] == 0) {
- BT_ERR("Invalid number of elements");
- prov_send_fail_msg(PROV_ERR_NVAL_FMT);
- return;
- }
-
- link.provisioner->node = bt_mesh_node_alloc(link.provisioner->addr,
- data[0],
- link.provisioner->net_idx);
- if (link.provisioner->node == NULL) {
- prov_send_fail_msg(PROV_ERR_RESOURCES);
- return;
- }
-
- memcpy(&link.conf_inputs[1], data, 11);
-
- atomic_set_bit(link.flags, SEND_PUB_KEY);
-
- send_start();
-}
-
-static bt_mesh_output_action_t output_action(u8_t action)
+static bt_mesh_output_action_t output_action(uint8_t action)
{
switch (action) {
case OUTPUT_OOB_BLINK:
@@ -729,7 +79,7 @@ static bt_mesh_output_action_t output_action(u8_t action)
}
}
-static bt_mesh_input_action_t input_action(u8_t action)
+static bt_mesh_input_action_t input_action(uint8_t action)
{
switch (action) {
case INPUT_OOB_PUSH:
@@ -745,7 +95,7 @@ static bt_mesh_input_action_t input_action(u8_t action)
}
}
-static int prov_auth(u8_t method, u8_t action, u8_t size)
+int bt_mesh_prov_auth(uint8_t method, uint8_t action, uint8_t size)
{
bt_mesh_output_action_t output;
bt_mesh_input_action_t input;
@@ -756,16 +106,15 @@ static int prov_auth(u8_t method, u8_t action, u8_t size)
return -EINVAL;
}
- memset(link.auth, 0, sizeof(link.auth));
+ (void)memset(bt_mesh_prov_link.auth, 0, sizeof(bt_mesh_prov_link.auth));
return 0;
case AUTH_METHOD_STATIC:
if (action || size) {
return -EINVAL;
}
- memcpy(link.auth + 16 - prov->static_val_len,
- prov->static_val, prov->static_val_len);
- memset(link.auth, 0, sizeof(link.auth) - prov->static_val_len);
+ atomic_set_bit(bt_mesh_prov_link.flags, OOB_STATIC_KEY);
+
return 0;
case AUTH_METHOD_OUTPUT:
@@ -774,19 +123,19 @@ static int prov_auth(u8_t method, u8_t action, u8_t size)
return -EINVAL;
}
- if (!(prov->output_actions & output)) {
+ if (!(bt_mesh_prov->output_actions & output)) {
return -EINVAL;
}
- if (size > prov->output_size) {
+ if (size > bt_mesh_prov->output_size) {
return -EINVAL;
}
- atomic_set_bit(link.flags, NOTIFY_INPUT_COMPLETE);
+ atomic_set_bit(bt_mesh_prov_link.flags, NOTIFY_INPUT_COMPLETE);
if (output == BT_MESH_DISPLAY_STRING) {
unsigned char str[9];
- u8_t i;
+ uint8_t i;
bt_rand(str, size);
@@ -801,22 +150,23 @@ static int prov_auth(u8_t method, u8_t action, u8_t size)
}
str[size] = '\0';
- memcpy(link.auth, str, size);
- memset(link.auth + size, 0, sizeof(link.auth) - size);
+ memcpy(bt_mesh_prov_link.auth, str, size);
+ memset(bt_mesh_prov_link.auth + size, 0,
+ sizeof(bt_mesh_prov_link.auth) - size);
- return prov->output_string((char *)str);
+ return bt_mesh_prov->output_string((char *)str);
} else {
- u32_t div[8] = { 10, 100, 1000, 10000, 100000,
+ uint32_t div[8] = { 10, 100, 1000, 10000, 100000,
1000000, 10000000, 100000000 };
- u32_t num;
+ uint32_t num;
bt_rand(&num, sizeof(num));
num %= div[size - 1];
- sys_put_be32(num, &link.auth[12]);
- memset(link.auth, 0, 12);
+ sys_put_be32(num, &bt_mesh_prov_link.auth[12]);
+ memset(bt_mesh_prov_link.auth, 0, 12);
- return prov->output_number(output, num);
+ return bt_mesh_prov->output_number(output, num);
}
case AUTH_METHOD_INPUT:
@@ -825,140 +175,38 @@ static int prov_auth(u8_t method, u8_t action, u8_t size)
return -EINVAL;
}
- if (!(prov->input_actions & input)) {
+ if (!(bt_mesh_prov->input_actions & input)) {
return -EINVAL;
}
- if (size > prov->input_size) {
+ if (size > bt_mesh_prov->input_size) {
return -EINVAL;
}
if (input == BT_MESH_ENTER_STRING) {
- atomic_set_bit(link.flags, WAIT_STRING);
+ atomic_set_bit(bt_mesh_prov_link.flags, WAIT_STRING);
} else {
- atomic_set_bit(link.flags, WAIT_NUMBER);
+ atomic_set_bit(bt_mesh_prov_link.flags, WAIT_NUMBER);
}
- return prov->input(input, size);
+ return bt_mesh_prov->input(input, size);
default:
return -EINVAL;
}
}
-static void prov_start(const u8_t *data)
-{
- BT_DBG("Algorithm: 0x%02x", data[0]);
- BT_DBG("Public Key: 0x%02x", data[1]);
- BT_DBG("Auth Method: 0x%02x", data[2]);
- BT_DBG("Auth Action: 0x%02x", data[3]);
- BT_DBG("Auth Size: 0x%02x", data[4]);
-
- if (data[0] != PROV_ALG_P256) {
- BT_ERR("Unknown algorithm 0x%02x", data[0]);
- prov_send_fail_msg(PROV_ERR_NVAL_FMT);
- return;
- }
-
- if (data[1] != PUB_KEY_NO_OOB) {
- BT_ERR("Invalid public key type: 0x%02x", data[1]);
- prov_send_fail_msg(PROV_ERR_NVAL_FMT);
- return;
- }
-
- memcpy(&link.conf_inputs[12], data, 5);
-
- /* TODO: reset link when auth fails? */
- link.expect = PROV_PUB_KEY;
-
- if (prov_auth(data[2], data[3], data[4]) < 0) {
- BT_ERR("Invalid authentication method: 0x%02x; "
- "action: 0x%02x; size: 0x%02x", data[2], data[3],
- data[4]);
- prov_send_fail_msg(PROV_ERR_NVAL_FMT);
- }
-}
-
-static void send_confirm(void)
-{
- struct os_mbuf *cfm = PROV_BUF(17);
-
- BT_DBG("ConfInputs[0] %s", bt_hex(link.conf_inputs, 64));
- BT_DBG("ConfInputs[64] %s", bt_hex(&link.conf_inputs[64], 64));
- BT_DBG("ConfInputs[128] %s", bt_hex(&link.conf_inputs[128], 17));
-
- if (bt_mesh_prov_conf_salt(link.conf_inputs, link.conf_salt)) {
- BT_ERR("Unable to generate confirmation salt");
- prov_send_fail_msg(PROV_ERR_UNEXP_ERR);
- goto done;
- }
-
- BT_DBG("ConfirmationSalt: %s", bt_hex(link.conf_salt, 16));
-
- if (bt_mesh_prov_conf_key(link.dhkey, link.conf_salt, link.conf_key)) {
- BT_ERR("Unable to generate confirmation key");
- prov_send_fail_msg(PROV_ERR_UNEXP_ERR);
- goto done;
- }
-
- BT_DBG("ConfirmationKey: %s", bt_hex(link.conf_key, 16));
-
- if (bt_rand(link.rand, 16)) {
- BT_ERR("Unable to generate random number");
- prov_send_fail_msg(PROV_ERR_UNEXP_ERR);
- goto done;
- }
-
- BT_DBG("LocalRandom: %s", bt_hex(link.rand, 16));
-
- prov_buf_init(cfm, PROV_CONFIRM);
-
- if (bt_mesh_prov_conf(link.conf_key, link.rand, link.auth,
- net_buf_simple_add(cfm, 16))) {
- BT_ERR("Unable to generate confirmation value");
- prov_send_fail_msg(PROV_ERR_UNEXP_ERR);
- goto done;
- }
-
- if (prov_send(cfm)) {
- BT_ERR("Failed to send Provisioning Confirm");
- goto done;
- }
-
- if (atomic_test_bit(link.flags, PROVISIONER)) {
- link.expect = PROV_CONFIRM;
- } else {
- link.expect = PROV_RANDOM;
- }
-
-done:
- os_mbuf_free_chain(cfm);
-}
-
-static void send_input_complete(void)
-{
- struct os_mbuf *buf = PROV_BUF(1);
-
- prov_buf_init(buf, PROV_INPUT_COMPLETE);
- if (prov_send(buf)) {
- BT_ERR("Failed to send Provisioning Input Complete");
- }
- link.expect = PROV_CONFIRM;
-
- os_mbuf_free_chain(buf);
-}
-
-int bt_mesh_input_number(u32_t num)
+int bt_mesh_input_number(uint32_t num)
{
BT_DBG("%u", (unsigned) num);
- if (!atomic_test_and_clear_bit(link.flags, WAIT_NUMBER)) {
+ if (!atomic_test_and_clear_bit(bt_mesh_prov_link.flags, WAIT_NUMBER)) {
return -EINVAL;
}
- sys_put_be32(num, &link.auth[12]);
+ sys_put_be32(num, &bt_mesh_prov_link.auth[12]);
- send_input_complete();
+ bt_mesh_prov_link.role->input_complete();
return 0;
}
@@ -967,991 +215,145 @@ int bt_mesh_input_string(const char *str)
{
BT_DBG("%s", str);
- if (!atomic_test_and_clear_bit(link.flags, WAIT_STRING)) {
+ if (!atomic_test_and_clear_bit(bt_mesh_prov_link.flags, WAIT_STRING)) {
return -EINVAL;
}
- strncpy((char *)link.auth, str, prov->input_size);
+ strncpy((char *)bt_mesh_prov_link.auth, str, bt_mesh_prov->input_size);
- send_input_complete();
+ bt_mesh_prov_link.role->input_complete();
return 0;
}
-static void send_pub_key(void)
-{
- struct os_mbuf *buf = PROV_BUF(65);
- const u8_t *key;
-
- key = bt_pub_key_get();
- if (!key) {
- BT_ERR("No public key available");
- prov_send_fail_msg(PROV_ERR_UNEXP_ERR);
- goto done;
- }
-
- BT_DBG("Local Public Key: %s", bt_hex(key, 64));
-
- prov_buf_init(buf, PROV_PUB_KEY);
-
- /* Swap X and Y halves independently to big-endian */
- sys_memcpy_swap(net_buf_simple_add(buf, 32), key, 32);
- sys_memcpy_swap(net_buf_simple_add(buf, 32), &key[32], 32);
-
- if (atomic_test_bit(link.flags, PROVISIONER)) {
- /* PublicKeyProvisioner */
- memcpy(&link.conf_inputs[17], &buf->om_data[1], 64);
- } else {
- /* PublicKeyRemote */
- memcpy(&link.conf_inputs[81], &buf->om_data[1], 64);
- }
-
- if (prov_send(buf)) {
- BT_ERR("Failed to send Public Key");
- goto done;
- }
-
- if (atomic_test_bit(link.flags, PROVISIONER)) {
- link.expect = PROV_PUB_KEY;
- } else {
- if (atomic_test_bit(link.flags, WAIT_NUMBER) ||
- atomic_test_bit(link.flags, WAIT_STRING)) {
- link.expect = PROV_NO_PDU; /* Wait for input */
- } else {
- link.expect = PROV_CONFIRM;
- }
- }
-
-done:
- os_mbuf_free_chain(buf);
-}
-
-static void prov_dh_key_cb(const u8_t dhkey[32])
-{
- BT_DBG("%p", dhkey);
-
- if (!dhkey) {
- BT_ERR("DHKey generation failed");
- prov_send_fail_msg(PROV_ERR_UNEXP_ERR);
- return;
- }
-
- sys_memcpy_swap(link.dhkey, dhkey, 32);
-
- BT_DBG("DHkey: %s", bt_hex(link.dhkey, 32));
-
- if (atomic_test_bit(link.flags, PROVISIONER)) {
- send_confirm();
- } else {
- send_pub_key();
- }
-}
-
-static void prov_dh_key_gen(void)
-{
- u8_t remote_pk_le[64], *remote_pk;
-
- if (atomic_test_bit(link.flags, PROVISIONER)) {
- remote_pk = &link.conf_inputs[81];
- } else {
- remote_pk = &link.conf_inputs[17];
- }
-
- /* Copy remote key in little-endian for bt_dh_key_gen().
- * X and Y halves are swapped independently. The bt_dh_key_gen()
- * will also take care of validating the remote public key.
- */
- sys_memcpy_swap(remote_pk_le, remote_pk, 32);
- sys_memcpy_swap(&remote_pk_le[32], &remote_pk[32], 32);
-
- if (bt_dh_key_gen(remote_pk_le, prov_dh_key_cb)) {
- BT_ERR("Failed to generate DHKey");
- prov_send_fail_msg(PROV_ERR_UNEXP_ERR);
- }
-}
-
-static void prov_pub_key(const u8_t *data)
-{
- BT_DBG("Remote Public Key: %s", bt_hex(data, 64));
-
- if (atomic_test_bit(link.flags, PROVISIONER)) {
- /* PublicKeyDevice */
- memcpy(&link.conf_inputs[81], data, 64);
-
-#if (MYNEWT_VAL(BLE_MESH_PB_ADV))
- prov_clear_tx();
-#endif
- } else {
- /* PublicKeyProvisioner */
- memcpy(&link.conf_inputs[17], data, 64);
-
- if (!bt_pub_key_get()) {
- /* Clear retransmit timer */
-#if (MYNEWT_VAL(BLE_MESH_PB_ADV))
- prov_clear_tx();
-#endif
-
- atomic_set_bit(link.flags, WAIT_PUB_KEY);
- BT_WARN("Waiting for local public key");
- return;
- }
- }
-
- prov_dh_key_gen();
-}
-
-static void pub_key_ready(const u8_t *pkey)
-{
- if (!pkey) {
- BT_WARN("Public key not available");
- return;
- }
-
- BT_DBG("Local public key ready");
-
- if (atomic_test_and_clear_bit(link.flags, WAIT_PUB_KEY)) {
- if (atomic_test_bit(link.flags, PROVISIONER)) {
- send_pub_key();
- } else {
- prov_dh_key_gen();
- }
- }
-}
-
-static void notify_input_complete(void)
-{
- if (atomic_test_and_clear_bit(link.flags, NOTIFY_INPUT_COMPLETE) &&
- prov->input_complete) {
- prov->input_complete();
- }
-}
-
-static void prov_input_complete(const u8_t *data)
-{
- BT_DBG("");
- notify_input_complete();
-}
-
-static void send_prov_data(void)
-{
- struct os_mbuf *pdu = PROV_BUF(34);
- struct bt_mesh_subnet *sub;
- u8_t session_key[16];
- u8_t nonce[13];
- int err;
-
- err = bt_mesh_session_key(link.dhkey, link.prov_salt, session_key);
- if (err) {
- BT_ERR("Unable to generate session key");
- prov_send_fail_msg(PROV_ERR_UNEXP_ERR);
- goto done;
- }
-
- BT_DBG("SessionKey: %s", bt_hex(session_key, 16));
-
- err = bt_mesh_prov_nonce(link.dhkey, link.prov_salt, nonce);
- if (err) {
- BT_ERR("Unable to generate session nonce");
- prov_send_fail_msg(PROV_ERR_UNEXP_ERR);
- goto done;
- }
-
- BT_DBG("Nonce: %s", bt_hex(nonce, 13));
-
- err = bt_mesh_dev_key(link.dhkey, link.prov_salt,
- link.provisioner->node->dev_key);
- if (err) {
- BT_ERR("Unable to generate device key");
- prov_send_fail_msg(PROV_ERR_UNEXP_ERR);
- goto done;
- }
-
- BT_DBG("DevKey: %s", bt_hex(link.provisioner->node->dev_key, 16));
-
- sub = bt_mesh_subnet_get(link.provisioner->node->net_idx);
- if (sub == NULL) {
- BT_ERR("No subnet with net_idx %u",
- link.provisioner->node->net_idx);
- prov_send_fail_msg(PROV_ERR_UNEXP_ERR);
- goto done;
- }
-
- prov_buf_init(pdu, PROV_DATA);
- net_buf_simple_add_mem(pdu, sub->keys[sub->kr_flag].net, 16);
- net_buf_simple_add_be16(pdu, link.provisioner->node->net_idx);
- net_buf_simple_add_u8(pdu, bt_mesh_net_flags(sub));
- net_buf_simple_add_be32(pdu, bt_mesh.iv_index);
- net_buf_simple_add_be16(pdu, link.provisioner->node->addr);
- net_buf_simple_add(pdu, 8); /* For MIC */
-
- BT_DBG("net_idx %u, iv_index 0x%08x, addr 0x%04x",
- link.provisioner->node->net_idx, bt_mesh.iv_index,
- link.provisioner->node->addr);
-
- err = bt_mesh_prov_encrypt(session_key, nonce, &pdu->om_data[1],
- &pdu->om_data[1]);
- if (err) {
- BT_ERR("Unable to encrypt provisioning data");
- prov_send_fail_msg(PROV_ERR_DECRYPT);
- goto done;
- }
-
- if (prov_send(pdu)) {
- BT_ERR("Failed to send Provisioning Data");
- goto done;
- }
-
- link.expect = PROV_COMPLETE;
-
-done:
- os_mbuf_free_chain(pdu);
-}
-
-static void prov_complete(const u8_t *data)
-{
- if (!IS_ENABLED(CONFIG_BT_MESH_PROVISIONER)) {
- return;
- }
-
- struct bt_mesh_node *node = link.provisioner->node;
-#if MYNEWT_VAL(BLE_MESH_PB_ADV)
- u8_t reason = CLOSE_REASON_SUCCESS;
-#endif
-
- BT_DBG("key %s, net_idx %u, num_elem %u, addr 0x%04x",
- bt_hex(node->dev_key, 16), node->net_idx, node->num_elem,
- node->addr);
-
- if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
- bt_mesh_store_node(node);
- }
-
- link.provisioner->node = NULL;
- link.expect = PROV_NO_PDU;
- atomic_set_bit(link.flags, LINK_CLOSING);
-
-#if MYNEWT_VAL(BLE_MESH_PB_ADV)
- bearer_ctl_send(LINK_CLOSE, &reason, sizeof(reason));
-#endif
-
- bt_mesh_prov_node_added(node->net_idx, node->addr, node->num_elem);
-
- /*
- * According to mesh profile spec (5.3.1.4.3), the close message should
- * be restransmitted at least three times. Retransmit the LINK_CLOSE
- * message until CLOSING_TIMEOUT has elapsed instead of resetting the
- * link here.
- */
-}
-
-static void send_random(void)
-{
- struct os_mbuf *rnd = PROV_BUF(17);
-
- prov_buf_init(rnd, PROV_RANDOM);
- net_buf_simple_add_mem(rnd, link.rand, 16);
-
- if (prov_send(rnd)) {
- BT_ERR("Failed to send Provisioning Random");
- goto done;
- }
-
- if (atomic_test_bit(link.flags, PROVISIONER)) {
- link.expect = PROV_RANDOM;
- } else {
- link.expect = PROV_DATA;
- }
-
-done:
- os_mbuf_free_chain(rnd);
-}
-
-static void prov_random(const u8_t *data)
-{
- u8_t conf_verify[16];
- const u8_t *prov_rand, *dev_rand;
-
- BT_DBG("Remote Random: %s", bt_hex(data, 16));
-
- if (bt_mesh_prov_conf(link.conf_key, data, link.auth, conf_verify)) {
- BT_ERR("Unable to calculate confirmation verification");
- prov_send_fail_msg(PROV_ERR_UNEXP_ERR);
- return;
- }
-
- if (memcmp(conf_verify, link.conf, 16)) {
- BT_ERR("Invalid confirmation value");
- BT_DBG("Received: %s", bt_hex(link.conf, 16));
- BT_DBG("Calculated: %s", bt_hex(conf_verify, 16));
- prov_send_fail_msg(PROV_ERR_CFM_FAILED);
- return;
- }
-
- if (atomic_test_bit(link.flags, PROVISIONER)) {
- prov_rand = link.rand;
- dev_rand = data;
- } else {
- prov_rand = data;
- dev_rand = link.rand;
- }
-
- if (bt_mesh_prov_salt(link.conf_salt, prov_rand, dev_rand,
- link.prov_salt)) {
- BT_ERR("Failed to generate provisioning salt");
- prov_send_fail_msg(PROV_ERR_UNEXP_ERR);
- return;
- }
-
- BT_DBG("ProvisioningSalt: %s", bt_hex(link.prov_salt, 16));
-
- if (IS_ENABLED(CONFIG_BT_MESH_PROVISIONER) &&
- atomic_test_bit(link.flags, PROVISIONER)) {
- send_prov_data();
- } else {
- send_random();
- }
-}
-
-static void prov_confirm(const u8_t *data)
-{
- BT_DBG("Remote Confirm: %s", bt_hex(data, 16));
-
- memcpy(link.conf, data, 16);
-
- notify_input_complete();
-
- if (atomic_test_bit(link.flags, PROVISIONER)) {
- send_random();
- } else {
- send_confirm();
- }
-}
-
-static inline bool is_pb_gatt(void)
-{
-#if MYNEWT_VAL(BLE_MESH_PB_GATT)
- return (link.conn_handle != BLE_HS_CONN_HANDLE_NONE);
-#else
- return false;
-#endif
-}
-
-static void prov_data(const u8_t *data)
-{
- struct os_mbuf *msg = PROV_BUF(1);
- u8_t session_key[16];
- u8_t nonce[13];
- u8_t dev_key[16];
- u8_t pdu[25];
- u8_t flags;
- u32_t iv_index;
- u16_t addr;
- u16_t net_idx;
- int err;
- bool identity_enable;
-
- BT_DBG("");
-
- err = bt_mesh_session_key(link.dhkey, link.prov_salt, session_key);
- if (err) {
- BT_ERR("Unable to generate session key");
- prov_send_fail_msg(PROV_ERR_UNEXP_ERR);
- goto done;
- }
-
- BT_DBG("SessionKey: %s", bt_hex(session_key, 16));
-
- err = bt_mesh_prov_nonce(link.dhkey, link.prov_salt, nonce);
- if (err) {
- BT_ERR("Unable to generate session nonce");
- prov_send_fail_msg(PROV_ERR_UNEXP_ERR);
- goto done;
- }
-
- BT_DBG("Nonce: %s", bt_hex(nonce, 13));
-
- err = bt_mesh_prov_decrypt(session_key, nonce, data, pdu);
- if (err) {
- BT_ERR("Unable to decrypt provisioning data");
- prov_send_fail_msg(PROV_ERR_DECRYPT);
- goto done;
- }
-
- err = bt_mesh_dev_key(link.dhkey, link.prov_salt, dev_key);
- if (err) {
- BT_ERR("Unable to generate device key");
- prov_send_fail_msg(PROV_ERR_UNEXP_ERR);
- goto done;
- }
-
- BT_DBG("DevKey: %s", bt_hex(dev_key, 16));
-
- net_idx = sys_get_be16(&pdu[16]);
- flags = pdu[18];
- iv_index = sys_get_be32(&pdu[19]);
- addr = sys_get_be16(&pdu[23]);
-
- BT_DBG("net_idx %u iv_index 0x%08x, addr 0x%04x",
- net_idx, (unsigned) iv_index, addr);
-
- prov_buf_init(msg, PROV_COMPLETE);
- if (prov_send(msg)) {
- BT_ERR("Failed to send Provisioning Complete");
- goto done;
- }
-
- /* Ignore any further PDUs on this link */
- link.expect = PROV_NO_PDU;
-
- /* Store info, since bt_mesh_provision() will end up clearing it */
- if (IS_ENABLED(CONFIG_BT_MESH_GATT_PROXY)) {
- identity_enable = is_pb_gatt();
- } else {
- identity_enable = false;
- }
-
- err = bt_mesh_provision(pdu, net_idx, flags, iv_index, addr, dev_key);
- if (err) {
- BT_ERR("Failed to provision (err %d)", err);
- goto done;
- }
-
- /* After PB-GATT provisioning we should start advertising
- * using Node Identity.
- */
- if (IS_ENABLED(CONFIG_BT_MESH_GATT_PROXY) && identity_enable) {
- bt_mesh_proxy_identity_enable();
- }
-
-done:
- os_mbuf_free_chain(msg);
-}
-
-static void prov_failed(const u8_t *data)
-{
- BT_WARN("Error: 0x%02x", data[0]);
-}
-
-static const struct {
- void (*func)(const u8_t *data);
- u16_t len;
-} prov_handlers[] = {
- { prov_invite, 1 },
- { prov_capabilities, 11 },
- { prov_start, 5, },
- { prov_pub_key, 64 },
- { prov_input_complete, 0 },
- { prov_confirm, 16 },
- { prov_random, 16 },
- { prov_data, 33 },
- { prov_complete, 0 },
- { prov_failed, 1 },
-};
-
-#if (MYNEWT_VAL(BLE_MESH_PB_ADV))
-static void prov_retransmit(struct ble_npl_event *work)
-{
- int i, timeout;
-
- BT_DBG("");
-
- if (!atomic_test_bit(link.flags, LINK_ACTIVE)) {
- BT_WARN("Link not active");
- return;
- }
-
- if (atomic_test_bit(link.flags, LINK_CLOSING)) {
- timeout = CLOSING_TIMEOUT;
- } else {
- timeout = TRANSACTION_TIMEOUT;
- }
-
- if (k_uptime_get() - link.tx.start > timeout) {
- BT_WARN("Giving up transaction");
- reset_adv_link();
- return;
- }
-
- for (i = 0; i < ARRAY_SIZE(link.tx.buf); i++) {
- struct os_mbuf *buf = link.tx.buf[i];
-
- if (!buf) {
- break;
- }
-
- if (BT_MESH_ADV(buf)->busy) {
- continue;
- }
-
- BT_DBG("%u bytes: %s", buf->om_len, bt_hex(buf->om_data, buf->om_len));
-
- if (i + 1 < ARRAY_SIZE(link.tx.buf) && link.tx.buf[i + 1]) {
- bt_mesh_adv_send(buf, NULL, NULL);
- } else {
- bt_mesh_adv_send(buf, &buf_sent_cb, NULL);
- }
-
- }
-}
-
-static void link_open(struct prov_rx *rx, struct os_mbuf *buf)
-{
- BT_DBG("link open: len %u", buf->om_len);
-
- if (buf->om_len < 16) {
- BT_ERR("Too short bearer open message (len %u)", buf->om_len);
- return;
- }
-
- if (atomic_test_bit(link.flags, LINK_ACTIVE)) {
- /* Send another link ack if the provisioner missed the last */
- if (link.id == rx->link_id && link.expect == PROV_INVITE) {
- BT_DBG("Resending link ack");
- bearer_ctl_send(LINK_ACK, NULL, 0);
- } else {
- BT_WARN("Ignoring bearer open: link already active");
- }
-
- return;
- }
-
- if (memcmp(buf->om_data, prov->uuid, 16)) {
- BT_DBG("Bearer open message not for us");
- return;
- }
-
- if (prov->link_open) {
- prov->link_open(BT_MESH_PROV_ADV);
- }
-
- link.id = rx->link_id;
- atomic_set_bit(link.flags, LINK_ACTIVE);
- net_buf_simple_init(link.rx.buf, 0);
-
- bearer_ctl_send(LINK_ACK, NULL, 0);
-
- link.expect = PROV_INVITE;
-}
-
-static void link_ack(struct prov_rx *rx, struct os_mbuf *buf)
-{
- BT_DBG("Link ack: len %u", buf->om_len);
-
- if (IS_ENABLED(CONFIG_BT_MESH_PROVISIONER) &&
- atomic_test_bit(link.flags, PROVISIONER)) {
- if (atomic_test_and_set_bit(link.flags, LINK_ACK_RECVD)) {
- return;
- }
-
- prov_clear_tx();
-
- if (prov->link_open) {
- prov->link_open(BT_MESH_PROV_ADV);
- }
-
- send_invite();
- }
-}
-
-static void link_close(struct prov_rx *rx, struct os_mbuf *buf)
+const struct bt_mesh_prov *bt_mesh_prov_get(void)
{
- BT_DBG("Link close: len %u", buf->om_len);
-
- reset_adv_link();
+ return bt_mesh_prov;
}
-static void gen_prov_ctl(struct prov_rx *rx, struct os_mbuf *buf)
+bool bt_mesh_prov_active(void)
{
- BT_DBG("op 0x%02x len %u", BEARER_CTL(rx->gpc), buf->om_len);
-
- switch (BEARER_CTL(rx->gpc)) {
- case LINK_OPEN:
- link_open(rx, buf);
- break;
- case LINK_ACK:
- if (!atomic_test_bit(link.flags, LINK_ACTIVE)) {
- return;
- }
-
- link_ack(rx, buf);
- break;
- case LINK_CLOSE:
- if (!atomic_test_bit(link.flags, LINK_ACTIVE)) {
- return;
- }
-
- link_close(rx, buf);
- break;
- default:
- BT_ERR("Unknown bearer opcode: 0x%02x", BEARER_CTL(rx->gpc));
-
- if (IS_ENABLED(CONFIG_BT_TESTING)) {
- bt_test_mesh_prov_invalid_bearer(BEARER_CTL(rx->gpc));
- }
-
- return;
- }
+ return atomic_test_bit(bt_mesh_prov_link.flags, LINK_ACTIVE);
}
-static void prov_msg_recv(void)
+static void prov_recv(const struct prov_bearer *bearer, void *cb_data,
+ struct os_mbuf *buf)
{
- u8_t type = link.rx.buf->om_data[0];
-
- BT_DBG("type 0x%02x len %u", type, link.rx.buf->om_len);
-
- k_delayed_work_submit(&link.prot_timer, PROTOCOL_TIMEOUT);
-
- if (!bt_mesh_fcs_check(link.rx.buf, link.rx.fcs)) {
- BT_ERR("Incorrect FCS");
- return;
- }
-
- gen_prov_ack_send(link.rx.id);
- link.rx.prev_id = link.rx.id;
- link.rx.id = 0;
-
- if (atomic_test_bit(link.flags, LINK_INVALID)) {
- BT_WARN("Unexpected msg 0x%02x on invalidated link", type);
- prov_send_fail_msg(PROV_ERR_UNEXP_PDU);
- return;
- }
+ static const uint8_t op_len[10] = {
+ [PROV_INVITE] = 1,
+ [PROV_CAPABILITIES] = 11,
+ [PROV_START] = 5,
+ [PROV_PUB_KEY] = 64,
+ [PROV_INPUT_COMPLETE] = 0,
+ [PROV_CONFIRM] = 16,
+ [PROV_RANDOM] = 16,
+ [PROV_DATA] = 33,
+ [PROV_COMPLETE] = 0,
+ [PROV_FAILED] = 1,
+ };
- if (type != PROV_FAILED && type != link.expect) {
- BT_WARN("Unexpected msg 0x%02x != 0x%02x", type, link.expect);
- prov_send_fail_msg(PROV_ERR_UNEXP_PDU);
- return;
- }
+ uint8_t type = buf->om_data[0];
+ BT_DBG("type 0x%02x len %u", type, buf->om_len);
- if (type >= ARRAY_SIZE(prov_handlers)) {
+ if (type >= ARRAY_SIZE(bt_mesh_prov_link.role->op)) {
BT_ERR("Unknown provisioning PDU type 0x%02x", type);
- prov_send_fail_msg(PROV_ERR_NVAL_PDU);
+ bt_mesh_prov_link.role->error(PROV_ERR_NVAL_FMT);
return;
}
- if (1 + prov_handlers[type].len != link.rx.buf->om_len) {
- BT_ERR("Invalid length %u for type 0x%02x",
- link.rx.buf->om_len, type);
- prov_send_fail_msg(PROV_ERR_NVAL_FMT);
+ if ((type != PROV_FAILED && type != bt_mesh_prov_link.expect) ||
+ !bt_mesh_prov_link.role->op[type]) {
+ BT_WARN("Unexpected msg 0x%02x != 0x%02x", type, bt_mesh_prov_link.expect);
+ bt_mesh_prov_link.role->error(PROV_ERR_UNEXP_PDU);
return;
}
- prov_handlers[type].func(&link.rx.buf->om_data[1]);
-}
-
-static void gen_prov_cont(struct prov_rx *rx, struct os_mbuf *buf)
-{
- u8_t seg = CONT_SEG_INDEX(rx->gpc);
-
- BT_DBG("len %u, seg_index %u", buf->om_len, seg);
-
- if (!link.rx.seg && link.rx.prev_id == rx->xact_id) {
- BT_WARN("Resending ack");
- gen_prov_ack_send(rx->xact_id);
- return;
- }
-
- if (rx->xact_id != link.rx.id) {
- BT_WARN("Data for unknown transaction (%u != %u)",
- rx->xact_id, link.rx.id);
- return;
- }
-
- if (seg > link.rx.last_seg) {
- BT_ERR("Invalid segment index %u", seg);
- prov_send_fail_msg(PROV_ERR_NVAL_FMT);
- return;
- } else if (seg == link.rx.last_seg) {
- u8_t expect_len;
-
- expect_len = (link.rx.buf->om_len - 20 -
- ((link.rx.last_seg - 1) * 23));
- if (expect_len != buf->om_len) {
- BT_ERR("Incorrect last seg len: %u != %u",
- expect_len, buf->om_len);
- prov_send_fail_msg(PROV_ERR_NVAL_FMT);
- return;
- }
- }
-
- if (!(link.rx.seg & BIT(seg))) {
- BT_WARN("Ignoring already received segment");
- return;
- }
-
- memcpy(XACT_SEG_DATA(seg), buf->om_data, buf->om_len);
- XACT_SEG_RECV(seg);
-
- if (!link.rx.seg) {
- prov_msg_recv();
- }
-}
-
-static void gen_prov_ack(struct prov_rx *rx, struct os_mbuf *buf)
-{
- BT_DBG("len %u", buf->om_len);
-
- if (!link.tx.buf[0]) {
+ if (1 + op_len[type] != buf->om_len) {
+ BT_ERR("Invalid length %u for type 0x%02x", buf->om_len, type);
+ bt_mesh_prov_link.role->error(PROV_ERR_NVAL_FMT);
return;
}
- if (rx->xact_id == link.tx.id) {
- /* Don't clear resending of LINK_CLOSE messages */
- if (!atomic_test_bit(link.flags, LINK_CLOSING)) {
- prov_clear_tx();
- }
-
- /* Send the PubKey when the the Start message is ACK'ed */
- if (IS_ENABLED(CONFIG_BT_MESH_PROVISIONER) &&
- atomic_test_and_clear_bit(link.flags, SEND_PUB_KEY)) {
- if (!bt_pub_key_get()) {
- atomic_set_bit(link.flags, WAIT_PUB_KEY);
- BT_WARN("Waiting for local public key");
- } else {
- send_pub_key();
- }
- }
- }
+ bt_mesh_prov_link.role->op[type](&buf->om_data[1]);
}
-static void gen_prov_start(struct prov_rx *rx, struct os_mbuf *buf)
+static void prov_link_opened(const struct prov_bearer *bearer, void *cb_data)
{
- u16_t trailing_space = 0;
+ atomic_set_bit(bt_mesh_prov_link.flags, LINK_ACTIVE);
- if (link.rx.seg) {
- BT_WARN("Got Start while there are unreceived segments");
- return;
- }
-
- if (link.rx.prev_id == rx->xact_id) {
- BT_WARN("Resending ack");
- gen_prov_ack_send(rx->xact_id);
- return;
- }
-
- trailing_space = OS_MBUF_TRAILINGSPACE(link.rx.buf);
-
- link.rx.buf->om_len = net_buf_simple_pull_be16(buf);
- link.rx.id = rx->xact_id;
- link.rx.fcs = net_buf_simple_pull_u8(buf);
-
- BT_DBG("len %u last_seg %u total_len %u fcs 0x%02x", buf->om_len,
- START_LAST_SEG(rx->gpc), link.rx.buf->om_len, link.rx.fcs);
-
- if (link.rx.buf->om_len < 1) {
- BT_ERR("Ignoring zero-length provisioning PDU");
- prov_send_fail_msg(PROV_ERR_NVAL_FMT);
- return;
+ BT_ERR("bt_mesh_prov->link_open");
+ if (bt_mesh_prov->link_open) {
+ bt_mesh_prov->link_open(bearer->type);
}
- if (link.rx.buf->om_len > trailing_space) {
- BT_ERR("Too large provisioning PDU (%u bytes)",
- link.rx.buf->om_len);
- prov_send_fail_msg(PROV_ERR_NVAL_FMT);
- return;
- }
-
- if (START_LAST_SEG(rx->gpc) > 0 && link.rx.buf->om_len <= 20) {
- BT_ERR("Too small total length for multi-segment PDU");
- prov_send_fail_msg(PROV_ERR_NVAL_FMT);
- return;
- }
-
- link.rx.seg = (1 << (START_LAST_SEG(rx->gpc) + 1)) - 1;
- link.rx.last_seg = START_LAST_SEG(rx->gpc);
- memcpy(link.rx.buf->om_data, buf->om_data, buf->om_len);
- XACT_SEG_RECV(0);
-
- if (!link.rx.seg) {
- prov_msg_recv();
- }
-}
-
-static const struct {
- void (*func)(struct prov_rx *rx, struct os_mbuf *buf);
- bool require_link;
- u8_t min_len;
-} gen_prov[] = {
- { gen_prov_start, true, 3 },
- { gen_prov_ack, true, 0 },
- { gen_prov_cont, true, 0 },
- { gen_prov_ctl, false, 0 },
-};
-
-static void gen_prov_recv(struct prov_rx *rx, struct os_mbuf *buf)
-{
- if (buf->om_len < gen_prov[GPCF(rx->gpc)].min_len) {
- BT_ERR("Too short GPC message type %u", GPCF(rx->gpc));
- return;
- }
+ BT_ERR("bt_mesh_prov_link.bearer");
+ bt_mesh_prov_link.bearer = bearer;
- if (!atomic_test_bit(link.flags, LINK_ACTIVE) &&
- gen_prov[GPCF(rx->gpc)].require_link) {
- BT_DBG("Ignoring message that requires active link");
- return;
+ BT_ERR("bt_mesh_prov_link.role->link_opened");
+ BT_ERR("%p", bt_mesh_prov_link.role);
+ BT_ERR("%p", bt_mesh_prov_link.role->link_opened);
+ if (bt_mesh_prov_link.role->link_opened) {
+ bt_mesh_prov_link.role->link_opened();
}
-
- BT_DBG("prov_action: %d", GPCF(rx->gpc));
- gen_prov[GPCF(rx->gpc)].func(rx, buf);
+ BT_ERR("done");
}
-void bt_mesh_pb_adv_recv(struct os_mbuf *buf)
+static void prov_link_closed(const struct prov_bearer *bearer, void *cb_data,
+ enum prov_bearer_link_status reason)
{
- struct prov_rx rx;
-
- if (!bt_prov_active() && bt_mesh_is_provisioned()) {
- BT_DBG("Ignoring provisioning PDU - already provisioned");
- return;
+ if (bt_mesh_prov_link.role->link_closed) {
+ bt_mesh_prov_link.role->link_closed();
}
- if (buf->om_len < 6) {
- BT_WARN("Too short provisioning packet (len %u)", buf->om_len);
- return;
+ if (bt_mesh_prov->link_close) {
+ bt_mesh_prov->link_close(bearer->type);
}
-
- rx.link_id = net_buf_simple_pull_be32(buf);
- rx.xact_id = net_buf_simple_pull_u8(buf);
- rx.gpc = net_buf_simple_pull_u8(buf);
-
- BT_DBG("link_id 0x%08x xact_id %u", (unsigned) rx.link_id, rx.xact_id);
-
- if (atomic_test_bit(link.flags, LINK_ACTIVE) && link.id != rx.link_id) {
- BT_DBG("Ignoring mesh beacon for unknown link");
- return;
- }
-
- gen_prov_recv(&rx, buf);
}
-int bt_mesh_pb_adv_open(const u8_t uuid[16], u16_t net_idx, u16_t addr,
- u8_t attention_duration)
+static void prov_bearer_error(const struct prov_bearer *bearer, void *cb_data,
+ uint8_t err)
{
- BT_DBG("uuid %s", bt_hex(uuid, 16));
-
- if (atomic_test_and_set_bit(link.flags, LINK_ACTIVE)) {
- return -EBUSY;
+ if (bt_mesh_prov_link.role->error) {
+ bt_mesh_prov_link.role->error(err);
}
-
- atomic_set_bit(link.flags, PROVISIONER);
-
- bt_rand(&link.id, sizeof(link.id));
- link.tx.id = 0x7F;
- link.provisioner->addr = addr;
- link.provisioner->net_idx = net_idx;
- link.provisioner->attention_duration = attention_duration;
-
- net_buf_simple_init(link.rx.buf, 0);
-
- bearer_ctl_send(LINK_OPEN, uuid, 16);
-
- return 0;
}
-#endif /* MYNEWT_VAL(BLE_MESH_PB_ADV) */
+static const struct prov_bearer_cb prov_bearer_cb = {
+ .link_opened = prov_link_opened,
+ .link_closed = prov_link_closed,
+ .error = prov_bearer_error,
+ .recv = prov_recv,
+};
-#if (MYNEWT_VAL(BLE_MESH_PB_GATT))
-int bt_mesh_pb_gatt_recv(uint16_t conn_handle, struct os_mbuf *buf)
+const struct prov_bearer_cb *bt_mesh_prov_bearer_cb_get(void)
{
- u8_t type;
-
- BT_DBG("%u bytes: %s", buf->om_len, bt_hex(buf->om_data, buf->om_len));
-
- if (link.conn_handle != conn_handle) {
- BT_WARN("Data for unexpected connection");
- return -ENOTCONN;
- }
-
- if (buf->om_len < 1) {
- BT_WARN("Too short provisioning packet (len %u)", buf->om_len);
- return -EINVAL;
- }
-
- type = net_buf_simple_pull_u8(buf);
- if (type != PROV_FAILED && type != link.expect) {
- BT_WARN("Unexpected msg 0x%02x != 0x%02x", type, link.expect);
- prov_send_fail_msg(PROV_ERR_UNEXP_PDU);
- return -EINVAL;
- }
-
- if (type >= ARRAY_SIZE(prov_handlers)) {
- BT_ERR("Unknown provisioning PDU type 0x%02x", type);
- return -EINVAL;
- }
-
- if (prov_handlers[type].len != buf->om_len) {
- BT_ERR("Invalid length %u for type 0x%02x", buf->om_len, type);
- return -EINVAL;
- }
-
- prov_handlers[type].func(buf->om_data);
-
- return 0;
+ return &prov_bearer_cb;
}
-int bt_mesh_pb_gatt_open(uint16_t conn_handle)
+void bt_mesh_prov_complete(uint16_t net_idx, uint16_t addr)
{
- BT_DBG("conn_handle %d", conn_handle);
-
- if (atomic_test_and_set_bit(link.flags, LINK_ACTIVE)) {
- BT_ERR("Link already opened?");
- return -EBUSY;
- }
-
- link.conn_handle = conn_handle;
- link.expect = PROV_INVITE;
-
- if (prov->link_open) {
- prov->link_open(BT_MESH_PROV_GATT);
+ if (bt_mesh_prov->complete) {
+ bt_mesh_prov->complete(net_idx, addr);
}
-
- return 0;
}
-int bt_mesh_pb_gatt_close(uint16_t conn_handle)
+void bt_mesh_prov_reset(void)
{
- BT_DBG("conn_handle %d", conn_handle);
+ BT_DBG("bt_mesh_prov_reset");
- if (link.conn_handle != conn_handle) {
- BT_ERR("Not connected");
- return -ENOTCONN;
+ if (IS_ENABLED(CONFIG_BT_MESH_PB_ADV)) {
+ pb_adv_reset();
}
- if (prov->link_close) {
- prov->link_close(BT_MESH_PROV_GATT);
+ if (IS_ENABLED(CONFIG_BT_MESH_PB_GATT)) {
+ pb_gatt_reset();
}
- return reset_state();
-}
-#endif /* MYNEWT_VAL(BLE_MESH_PB_GATT) */
-
-const struct bt_mesh_prov *bt_mesh_prov_get(void)
-{
- return prov;
-}
-
-bool bt_prov_active(void)
-{
- return atomic_test_bit(link.flags, LINK_ACTIVE);
-}
-
-static void protocol_timeout(struct ble_npl_event *work)
-{
- BT_DBG("Protocol timeout");
+ bt_mesh_prov_reset_state(NULL);
-#if MYNEWT_VAL(BLE_MESH_PB_GATT)
- if (link.conn_handle != BLE_HS_CONN_HANDLE_NONE) {
- bt_mesh_pb_gatt_close(link.conn_handle);
- return;
+ if (bt_mesh_prov->reset) {
+ bt_mesh_prov->reset();
}
-#endif
-
-#if MYNEWT_VAL(BLE_MESH_PB_ADV)
- u8_t reason = CLOSE_REASON_TIMEOUT;
-
- link.rx.seg = 0U;
- bearer_ctl_send(LINK_CLOSE, &reason, sizeof(reason));
-
- reset_state();
-#endif
}
int bt_mesh_prov_init(const struct bt_mesh_prov *prov_info)
@@ -1961,48 +363,14 @@ int bt_mesh_prov_init(const struct bt_mesh_prov *prov_info)
return -EINVAL;
}
- k_delayed_work_init(&link.prot_timer, protocol_timeout);
-
- prov = prov_info;
-
-#if MYNEWT_VAL(BLE_MESH_PB_ADV)
- k_delayed_work_init(&link.tx.retransmit, prov_retransmit);
-#endif
-
- return reset_state();
-}
-
-void bt_mesh_prov_reset_link(void)
-{
-#if (MYNEWT_VAL(BLE_MESH_PB_ADV))
-#if (MYNEWT_VAL(BLE_MESH_PB_GATT))
- link.rx.buf = bt_mesh_proxy_get_buf();
-#else
- net_buf_simple_init(rx_buf, 0);
- link.rx.buf = rx_buf;
-#endif
-#endif
-}
+ bt_mesh_prov = prov_info;
-void bt_mesh_prov_complete(u16_t net_idx, u16_t addr)
-{
- if (prov->complete) {
- prov->complete(net_idx, addr);
+ if (IS_ENABLED(CONFIG_BT_MESH_PB_ADV)) {
+ pb_adv_init();
}
-}
-
-void bt_mesh_prov_node_added(u16_t net_idx, u16_t addr, u8_t num_elem)
-{
- if (prov->node_added) {
- prov->node_added(net_idx, addr, num_elem);
+ if (IS_ENABLED(CONFIG_BT_MESH_PB_GATT)) {
+ pb_gatt_init();
}
-}
-void bt_mesh_prov_reset(void)
-{
- if (prov->reset) {
- prov->reset();
- }
+ return bt_mesh_prov_reset_state(NULL);
}
-
-#endif /* MYNEWT_VAL(BLE_MESH_PROV) */
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/prov.h b/src/libs/mynewt-nimble/nimble/host/mesh/src/prov.h
index 96e5a447..89f02725 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/src/prov.h
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/prov.h
@@ -9,16 +9,131 @@
#ifndef __PROV_H__
#define __PROV_H__
+#include "prov_bearer.h"
#include "os/os_mbuf.h"
#include "mesh/mesh.h"
#include "../src/ble_hs_conn_priv.h"
-int bt_mesh_pb_adv_open(const u8_t uuid[16], u16_t net_idx, u16_t addr,
- u8_t attention_duration);
+#define PROV_ERR_NONE 0x00
+#define PROV_ERR_NVAL_PDU 0x01
+#define PROV_ERR_NVAL_FMT 0x02
+#define PROV_ERR_UNEXP_PDU 0x03
+#define PROV_ERR_CFM_FAILED 0x04
+#define PROV_ERR_RESOURCES 0x05
+#define PROV_ERR_DECRYPT 0x06
+#define PROV_ERR_UNEXP_ERR 0x07
+#define PROV_ERR_ADDR 0x08
-void bt_mesh_pb_adv_recv(struct os_mbuf *buf);
+#define AUTH_METHOD_NO_OOB 0x00
+#define AUTH_METHOD_STATIC 0x01
+#define AUTH_METHOD_OUTPUT 0x02
+#define AUTH_METHOD_INPUT 0x03
+
+#define OUTPUT_OOB_BLINK 0x00
+#define OUTPUT_OOB_BEEP 0x01
+#define OUTPUT_OOB_VIBRATE 0x02
+#define OUTPUT_OOB_NUMBER 0x03
+#define OUTPUT_OOB_STRING 0x04
+
+#define INPUT_OOB_PUSH 0x00
+#define INPUT_OOB_TWIST 0x01
+#define INPUT_OOB_NUMBER 0x02
+#define INPUT_OOB_STRING 0x03
+
+#define PUB_KEY_NO_OOB 0x00
+#define PUB_KEY_OOB 0x01
+
+#define PROV_INVITE 0x00
+#define PROV_CAPABILITIES 0x01
+#define PROV_START 0x02
+#define PROV_PUB_KEY 0x03
+#define PROV_INPUT_COMPLETE 0x04
+#define PROV_CONFIRM 0x05
+#define PROV_RANDOM 0x06
+#define PROV_DATA 0x07
+#define PROV_COMPLETE 0x08
+#define PROV_FAILED 0x09
+
+#define PROV_NO_PDU 0xff
+
+#define PROV_ALG_P256 0x00
+
+#define PROV_BUF(len) \
+ NET_BUF_SIMPLE(PROV_BEARER_BUF_HEADROOM + len)
+
+enum {
+ WAIT_PUB_KEY, /* Waiting for local PubKey to be generated */
+ LINK_ACTIVE, /* Link has been opened */
+ WAIT_NUMBER, /* Waiting for number input from user */
+ WAIT_STRING, /* Waiting for string input from user */
+ NOTIFY_INPUT_COMPLETE, /* Notify that input has been completed. */
+ PROVISIONER, /* The link was opened as provisioner */
+ OOB_PUB_KEY, /* OOB Public key used */
+ PUB_KEY_SENT, /* Public key has been sent */
+ REMOTE_PUB_KEY, /* Remote key has been received */
+ INPUT_COMPLETE, /* Device input completed */
+ WAIT_CONFIRM, /* Wait for send confirm */
+ WAIT_AUTH, /* Wait for auth response */
+ OOB_STATIC_KEY, /* OOB Static Authentication */
+
+ NUM_FLAGS,
+};
+
+/** Provisioning role */
+struct bt_mesh_prov_role {
+ void (*link_opened)(void);
+
+ void (*link_closed)(void);
+
+ void (*error)(uint8_t reason);
+
+ void (*input_complete)(void);
+
+ void (*op[10])(const uint8_t *data);
+};
+
+struct bt_mesh_prov_link {
+ ATOMIC_DEFINE(flags, NUM_FLAGS);
-bool bt_prov_active(void);
+ const struct prov_bearer *bearer;
+ const struct bt_mesh_prov_role *role;
+
+ uint8_t oob_method; /* Authen method */
+ uint8_t oob_action; /* Authen action */
+ uint8_t oob_size; /* Authen size */
+ uint8_t auth[16]; /* Authen value */
+
+ uint8_t dhkey[32]; /* Calculated DHKey */
+ uint8_t expect; /* Next expected PDU */
+ uint8_t conf[16]; /* Remote Confirmation */
+ uint8_t rand[16]; /* Local Random */
+
+ uint8_t conf_salt[16]; /* ConfirmationSalt */
+ uint8_t conf_key[16]; /* ConfirmationKey */
+ uint8_t conf_inputs[145]; /* ConfirmationInputs */
+ uint8_t prov_salt[16]; /* Provisioning Salt */
+};
+
+extern struct bt_mesh_prov_link bt_mesh_prov_link;
+extern const struct bt_mesh_prov *bt_mesh_prov;
+
+static inline int bt_mesh_prov_send(struct os_mbuf *buf,
+ prov_bearer_send_complete_t cb)
+{
+ return bt_mesh_prov_link.bearer->send(buf, cb, NULL);
+}
+
+static inline void bt_mesh_prov_buf_init(struct os_mbuf *buf, uint8_t type)
+{
+ net_buf_reserve(buf, PROV_BEARER_BUF_HEADROOM);
+ net_buf_simple_add_u8(buf, type);
+}
+
+int bt_mesh_prov_reset_state(void (*func)(const uint8_t key[64]));
+
+bool bt_mesh_prov_active(void);
+
+int bt_mesh_prov_auth(uint8_t method, uint8_t action, uint8_t size);
int bt_mesh_pb_gatt_open(uint16_t conn_handle);
int bt_mesh_pb_gatt_close(uint16_t conn_handle);
@@ -26,12 +141,14 @@ int bt_mesh_pb_gatt_recv(uint16_t conn_handle, struct os_mbuf *buf);
const struct bt_mesh_prov *bt_mesh_prov_get(void);
-int bt_mesh_prov_init(const struct bt_mesh_prov *prov);
-
void bt_mesh_prov_reset_link(void);
-void bt_mesh_prov_complete(u16_t net_idx, u16_t addr);
-void bt_mesh_prov_node_added(u16_t net_idx, u16_t addr, u8_t num_elem);
+void bt_mesh_prov_complete(uint16_t net_idx, uint16_t addr);
void bt_mesh_prov_reset(void);
+const struct prov_bearer_cb *bt_mesh_prov_bearer_cb_get(void);
+
+void bt_mesh_pb_adv_recv(struct os_mbuf *buf);
+
+int bt_mesh_prov_init(const struct bt_mesh_prov *prov);
#endif
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/prov_bearer.h b/src/libs/mynewt-nimble/nimble/host/mesh/src/prov_bearer.h
new file mode 100644
index 00000000..3e526831
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/prov_bearer.h
@@ -0,0 +1,116 @@
+/* Bluetooth Mesh */
+
+/*
+ * Copyright (c) 2020 Nordic Semiconductor ASA
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+#define PROTOCOL_TIMEOUT K_SECONDS(60)
+
+/** @def PROV_BEARER_BUF_HEADROOM
+ *
+ * @brief Required headroom for the bearer packet buffers.
+ */
+#if MYNEWT_VAL(BLE_MESH_PB_GATT)
+#define PROV_BEARER_BUF_HEADROOM 5
+#else
+#define PROV_BEARER_BUF_HEADROOM 0
+#endif
+
+enum prov_bearer_link_status {
+ PROV_BEARER_LINK_STATUS_SUCCESS,
+ PROV_BEARER_LINK_STATUS_TIMEOUT,
+ PROV_BEARER_LINK_STATUS_FAIL,
+};
+
+struct prov_bearer;
+
+/** Callbacks from bearer to host */
+struct prov_bearer_cb {
+
+ void (*link_opened)(const struct prov_bearer *bearer, void *cb_data);
+
+ void (*link_closed)(const struct prov_bearer *bearer, void *cb_data,
+ enum prov_bearer_link_status reason);
+
+ void (*error)(const struct prov_bearer *bearer, void *cb_data,
+ uint8_t err);
+
+ void (*recv)(const struct prov_bearer *bearer, void *cb_data,
+ struct os_mbuf *buf);
+};
+
+typedef void (*prov_bearer_send_complete_t)(int err, void *cb_data);
+
+/** Provisioning bearer API */
+struct prov_bearer {
+ /** Provisioning bearer type. */
+ bt_mesh_prov_bearer_t type;
+
+ /** @brief Enable link establishment as a provisionee.
+ *
+ * Prompts the bearer to make itself visible to provisioners, and
+ * start accepting link open messages.
+ *
+ * @param cb Bearer event callbacks used for the duration of the link.
+ * @param cb_data Context parameter to pass to the bearer callbacks.
+ *
+ * @return Zero on success, or (negative) error code otherwise.
+ */
+ int (*link_accept)(const struct prov_bearer_cb *cb, void *cb_data);
+
+ /** @brief Send a packet on an established link.
+ *
+ * @param buf Payload buffer. Requires @ref
+ * PROV_BEARER_BUF_HEADROOM bytes of headroom.
+ * @param cb Callback to call when sending is complete.
+ * @param cb_data Callback data.
+ *
+ * @return Zero on success, or (negative) error code otherwise.
+ */
+ int (*send)(struct os_mbuf *buf, prov_bearer_send_complete_t cb,
+ void *cb_data);
+
+ /** @brief Clear any ongoing transmissions, if possible.
+ *
+ * Bearers that don't support tx clearing must implement this callback
+ * and leave it empty.
+ */
+ void (*clear_tx)(void);
+
+ /* Only available in provisioners: */
+
+ /** @brief Open a new link as a provisioner.
+ *
+ * Only available in provisioners. Bearers that don't support the
+ * provisioner role should leave this as NULL.
+ *
+ * @param uuid UUID of the node to establish a link to.
+ * @param timeout Protocol timeout.
+ * @param cb Bearer event callbacks used for the duration of the link.
+ * @param cb_data Context parameter to pass to the bearer callbacks.
+ *
+ * @return Zero on success, or (negative) error code otherwise.
+ */
+ int (*link_open)(const uint8_t uuid[16], int32_t timeout,
+ const struct prov_bearer_cb *cb, void *cb_data);
+
+ /** @brief Close the current link.
+ *
+ * Only available in provisioners. Bearers that don't support the
+ * provisioner role should leave this as NULL.
+ *
+ * @param status Link status for the link close message.
+ */
+ void (*link_close)(enum prov_bearer_link_status status);
+};
+
+extern const struct prov_bearer pb_adv;
+extern const struct prov_bearer pb_gatt;
+
+void pb_adv_init(void);
+void pb_gatt_init(void);
+
+void pb_adv_reset(void);
+void pb_gatt_reset(void);
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/prov_device.c b/src/libs/mynewt-nimble/nimble/host/mesh/src/prov_device.c
new file mode 100644
index 00000000..38a96e7a
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/prov_device.c
@@ -0,0 +1,569 @@
+/* Bluetooth Mesh */
+
+/*
+ * Copyright (c) 2017 Intel Corporation
+ * Copyright (c) 2020 Lingao Meng
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+#define MESH_LOG_MODULE BLE_MESH_PROV_LOG
+
+#include "testing.h"
+#include "crypto.h"
+#include "adv.h"
+#include "mesh/mesh.h"
+#include "net.h"
+#include "rpl.h"
+#include "beacon.h"
+#include "access.h"
+#include "foundation.h"
+#include "proxy.h"
+#include "prov.h"
+#include "settings.h"
+
+static void send_pub_key(void);
+static void pub_key_ready(const uint8_t *pkey);
+
+static int reset_state(void)
+{
+ return bt_mesh_prov_reset_state(pub_key_ready);
+}
+
+static void prov_send_fail_msg(uint8_t err)
+{
+ struct os_mbuf *buf = PROV_BUF(2);
+
+ BT_DBG("%u", err);
+
+ bt_mesh_prov_link.expect = PROV_NO_PDU;
+
+ bt_mesh_prov_buf_init(buf, PROV_FAILED);
+ net_buf_simple_add_u8(buf, err);
+
+ if (bt_mesh_prov_send(buf, NULL)) {
+ BT_ERR("Failed to send Provisioning Failed message");
+ }
+}
+
+static void prov_fail(uint8_t reason)
+{
+ /* According to Bluetooth Mesh Specification v1.0.1, Section 5.4.4, the
+ * provisioner just closes the link when something fails, while the
+ * provisionee sends the fail message, and waits for the provisioner to
+ * close the link.
+ */
+ prov_send_fail_msg(reason);
+}
+
+static void prov_invite(const uint8_t *data)
+{
+ struct os_mbuf *buf = PROV_BUF(12);
+
+ BT_DBG("Attention Duration: %u seconds", data[0]);
+
+ if (data[0]) {
+ bt_mesh_attention(NULL, data[0]);
+ }
+
+ bt_mesh_prov_link.conf_inputs[0] = data[0];
+
+ bt_mesh_prov_buf_init(buf, PROV_CAPABILITIES);
+
+ /* Number of Elements supported */
+ net_buf_simple_add_u8(buf, bt_mesh_elem_count());
+
+ /* Supported algorithms - FIPS P-256 Eliptic Curve */
+ net_buf_simple_add_be16(buf, BIT(PROV_ALG_P256));
+
+ /* Public Key Type, Only "No OOB" Public Key is supported */
+ net_buf_simple_add_u8(buf, PUB_KEY_NO_OOB);
+
+ /* Static OOB Type */
+ net_buf_simple_add_u8(buf, bt_mesh_prov->static_val ? BIT(0) : 0x00);
+
+ /* Output OOB Size */
+ net_buf_simple_add_u8(buf, bt_mesh_prov->output_size);
+
+ /* Output OOB Action */
+ net_buf_simple_add_be16(buf, bt_mesh_prov->output_actions);
+
+ /* Input OOB Size */
+ net_buf_simple_add_u8(buf, bt_mesh_prov->input_size);
+
+ /* Input OOB Action */
+ net_buf_simple_add_be16(buf, bt_mesh_prov->input_actions);
+
+ memcpy(&bt_mesh_prov_link.conf_inputs[1], &buf->om_data[1], 11);
+
+ if (bt_mesh_prov_send(buf, NULL)) {
+ BT_ERR("Failed to send capabilities");
+ return;
+ }
+
+ bt_mesh_prov_link.expect = PROV_START;
+}
+
+static void prov_start(const uint8_t *data)
+{
+ BT_DBG("Algorithm: 0x%02x", data[0]);
+ BT_DBG("Public Key: 0x%02x", data[1]);
+ BT_DBG("Auth Method: 0x%02x", data[2]);
+ BT_DBG("Auth Action: 0x%02x", data[3]);
+ BT_DBG("Auth Size: 0x%02x", data[4]);
+
+ if (data[0] != PROV_ALG_P256) {
+ BT_ERR("Unknown algorithm 0x%02x", data[0]);
+ prov_fail(PROV_ERR_NVAL_FMT);
+ return;
+ }
+
+ if (data[1] != PUB_KEY_NO_OOB) {
+ BT_ERR("Invalid public key type: 0x%02x", data[1]);
+ prov_fail(PROV_ERR_NVAL_FMT);
+ return;
+ }
+
+ memcpy(&bt_mesh_prov_link.conf_inputs[12], data, 5);
+
+ bt_mesh_prov_link.expect = PROV_PUB_KEY;
+
+ if (bt_mesh_prov_auth(data[2], data[3], data[4]) < 0) {
+ BT_ERR("Invalid authentication method: 0x%02x; "
+ "action: 0x%02x; size: 0x%02x", data[2], data[3],
+ data[4]);
+ prov_fail(PROV_ERR_NVAL_FMT);
+ }
+
+ if (atomic_test_bit(bt_mesh_prov_link.flags, OOB_STATIC_KEY)) {
+ memcpy(bt_mesh_prov_link.auth + 16 - bt_mesh_prov->static_val_len,
+ bt_mesh_prov->static_val, bt_mesh_prov->static_val_len);
+ (void)memset(bt_mesh_prov_link.auth, 0,
+ sizeof(bt_mesh_prov_link.auth) - bt_mesh_prov->static_val_len);
+ }
+}
+
+static void send_confirm(void)
+{
+ struct os_mbuf *cfm = PROV_BUF(17);
+
+ BT_DBG("ConfInputs[0] %s", bt_hex(bt_mesh_prov_link.conf_inputs, 64));
+ BT_DBG("ConfInputs[64] %s", bt_hex(&bt_mesh_prov_link.conf_inputs[64], 64));
+ BT_DBG("ConfInputs[128] %s", bt_hex(&bt_mesh_prov_link.conf_inputs[128], 17));
+
+ if (bt_mesh_prov_conf_salt(bt_mesh_prov_link.conf_inputs,
+ bt_mesh_prov_link.conf_salt)) {
+ BT_ERR("Unable to generate confirmation salt");
+ prov_fail(PROV_ERR_UNEXP_ERR);
+ return;
+ }
+
+ BT_DBG("ConfirmationSalt: %s", bt_hex(bt_mesh_prov_link.conf_salt, 16));
+
+ if (bt_mesh_prov_conf_key(bt_mesh_prov_link.dhkey, bt_mesh_prov_link.conf_salt,
+ bt_mesh_prov_link.conf_key)) {
+ BT_ERR("Unable to generate confirmation key");
+ prov_fail(PROV_ERR_UNEXP_ERR);
+ return;
+ }
+
+ BT_DBG("ConfirmationKey: %s", bt_hex(bt_mesh_prov_link.conf_key, 16));
+
+ if (bt_rand(bt_mesh_prov_link.rand, 16)) {
+ BT_ERR("Unable to generate random number");
+ prov_fail(PROV_ERR_UNEXP_ERR);
+ return;
+ }
+
+ BT_DBG("LocalRandom: %s", bt_hex(bt_mesh_prov_link.rand, 16));
+
+ bt_mesh_prov_buf_init(cfm, PROV_CONFIRM);
+
+ if (bt_mesh_prov_conf(bt_mesh_prov_link.conf_key, bt_mesh_prov_link.rand,
+ bt_mesh_prov_link.auth, net_buf_simple_add(cfm, 16))) {
+ BT_ERR("Unable to generate confirmation value");
+ prov_fail(PROV_ERR_UNEXP_ERR);
+ return;
+ }
+
+ if (bt_mesh_prov_send(cfm, NULL)) {
+ BT_ERR("Failed to send Provisioning Confirm");
+ return;
+ }
+
+ bt_mesh_prov_link.expect = PROV_RANDOM;
+
+}
+
+static void send_input_complete(void)
+{
+ struct os_mbuf *buf = PROV_BUF(1);
+
+ bt_mesh_prov_buf_init(buf, PROV_INPUT_COMPLETE);
+ if (bt_mesh_prov_send(buf, NULL)) {
+ BT_ERR("Failed to send Provisioning Input Complete");
+ }
+ bt_mesh_prov_link.expect = PROV_CONFIRM;
+}
+
+static void public_key_sent(int err, void *cb_data)
+{
+ atomic_set_bit(bt_mesh_prov_link.flags, PUB_KEY_SENT);
+
+ if (atomic_test_bit(bt_mesh_prov_link.flags, INPUT_COMPLETE)) {
+ send_input_complete();
+ return;
+ }
+}
+
+static void send_pub_key(void)
+{
+ struct os_mbuf *buf = PROV_BUF(65);
+ const uint8_t *key;
+
+ key = bt_pub_key_get();
+ if (!key) {
+ BT_ERR("No public key available");
+ prov_fail(PROV_ERR_UNEXP_ERR);
+ return;
+ }
+
+ BT_DBG("Local Public Key: %s", bt_hex(key, 64));
+
+ bt_mesh_prov_buf_init(buf, PROV_PUB_KEY);
+
+ /* Swap X and Y halves independently to big-endian */
+ sys_memcpy_swap(net_buf_simple_add(buf, 32), key, 32);
+ sys_memcpy_swap(net_buf_simple_add(buf, 32), &key[32], 32);
+
+ /* PublicKeyRemote */
+ memcpy(&bt_mesh_prov_link.conf_inputs[81], &buf->om_data[1], 64);
+
+ if (bt_mesh_prov_send(buf, public_key_sent)) {
+ BT_ERR("Failed to send Public Key");
+ return;
+ }
+
+ if (atomic_test_bit(bt_mesh_prov_link.flags, WAIT_NUMBER) ||
+ atomic_test_bit(bt_mesh_prov_link.flags, WAIT_STRING)) {
+ bt_mesh_prov_link.expect = PROV_NO_PDU; /* Wait for input */
+ } else {
+ bt_mesh_prov_link.expect = PROV_CONFIRM;
+ }
+}
+
+static void prov_dh_key_cb(const uint8_t dhkey[32])
+{
+ BT_DBG("%p", dhkey);
+
+ if (!dhkey) {
+ BT_ERR("DHKey generation failed");
+ prov_fail(PROV_ERR_UNEXP_ERR);
+ return;
+ }
+
+ sys_memcpy_swap(bt_mesh_prov_link.dhkey, dhkey, 32);
+
+ BT_DBG("DHkey: %s", bt_hex(bt_mesh_prov_link.dhkey, 32));
+
+ send_pub_key();
+}
+
+static void prov_dh_key_gen(void)
+{
+ uint8_t remote_pk_le[64], *remote_pk;
+
+ remote_pk = &bt_mesh_prov_link.conf_inputs[17];
+
+ /* Copy remote key in little-endian for bt_dh_key_gen().
+ * X and Y halves are swapped independently. The bt_dh_key_gen()
+ * will also take care of validating the remote public key.
+ */
+ sys_memcpy_swap(remote_pk_le, remote_pk, 32);
+ sys_memcpy_swap(&remote_pk_le[32], &remote_pk[32], 32);
+
+ if (bt_dh_key_gen(remote_pk_le, prov_dh_key_cb)) {
+ BT_ERR("Failed to generate DHKey");
+ prov_fail(PROV_ERR_UNEXP_ERR);
+ }
+}
+
+static void prov_pub_key(const uint8_t *data)
+{
+ BT_DBG("Remote Public Key: %s", bt_hex(data, 64));
+
+ /* PublicKeyProvisioner */
+ memcpy(&bt_mesh_prov_link.conf_inputs[17], data, 64);
+
+ if (!bt_pub_key_get()) {
+ /* Clear retransmit timer */
+ bt_mesh_prov_link.bearer->clear_tx();
+ atomic_set_bit(bt_mesh_prov_link.flags, WAIT_PUB_KEY);
+ BT_WARN("Waiting for local public key");
+ return;
+ }
+
+ prov_dh_key_gen();
+}
+
+static void pub_key_ready(const uint8_t *pkey)
+{
+ if (!pkey) {
+ BT_WARN("Public key not available");
+ return;
+ }
+
+ BT_DBG("Local public key ready");
+
+ if (atomic_test_and_clear_bit(bt_mesh_prov_link.flags, WAIT_PUB_KEY)) {
+ prov_dh_key_gen();
+ }
+}
+
+static void notify_input_complete(void)
+{
+ if (atomic_test_and_clear_bit(bt_mesh_prov_link.flags,
+ NOTIFY_INPUT_COMPLETE) &&
+ bt_mesh_prov->input_complete) {
+ bt_mesh_prov->input_complete();
+ }
+}
+
+static void send_random(void)
+{
+ struct os_mbuf *rnd = PROV_BUF(17);
+
+ bt_mesh_prov_buf_init(rnd, PROV_RANDOM);
+ net_buf_simple_add_mem(rnd, bt_mesh_prov_link.rand, 16);
+
+ if (bt_mesh_prov_send(rnd, NULL)) {
+ BT_ERR("Failed to send Provisioning Random");
+ return;
+ }
+
+ bt_mesh_prov_link.expect = PROV_DATA;
+}
+
+static void prov_random(const uint8_t *data)
+{
+ uint8_t conf_verify[16];
+
+ BT_DBG("Remote Random: %s", bt_hex(data, 16));
+ if (!memcmp(data, bt_mesh_prov_link.rand, 16)) {
+ BT_ERR("Random value is identical to ours, rejecting.");
+ prov_fail(PROV_ERR_CFM_FAILED);
+ return;
+ }
+
+ if (bt_mesh_prov_conf(bt_mesh_prov_link.conf_key, data,
+ bt_mesh_prov_link.auth, conf_verify)) {
+ BT_ERR("Unable to calculate confirmation verification");
+ prov_fail(PROV_ERR_UNEXP_ERR);
+ return;
+ }
+
+ if (memcmp(conf_verify, bt_mesh_prov_link.conf, 16)) {
+ BT_ERR("Invalid confirmation value");
+ BT_DBG("Received: %s", bt_hex(bt_mesh_prov_link.conf, 16));
+ BT_DBG("Calculated: %s", bt_hex(conf_verify, 16));
+ prov_fail(PROV_ERR_CFM_FAILED);
+ return;
+ }
+
+ if (bt_mesh_prov_salt(bt_mesh_prov_link.conf_salt, data,
+ bt_mesh_prov_link.rand, bt_mesh_prov_link.prov_salt)) {
+ BT_ERR("Failed to generate provisioning salt");
+ prov_fail(PROV_ERR_UNEXP_ERR);
+ return;
+ }
+
+ BT_DBG("ProvisioningSalt: %s", bt_hex(bt_mesh_prov_link.prov_salt, 16));
+
+ send_random();
+}
+
+static void prov_confirm(const uint8_t *data)
+{
+ BT_DBG("Remote Confirm: %s", bt_hex(data, 16));
+
+ memcpy(bt_mesh_prov_link.conf, data, 16);
+
+ notify_input_complete();
+
+ send_confirm();
+}
+
+static inline bool is_pb_gatt(void)
+{
+ return bt_mesh_prov_link.bearer &&
+ bt_mesh_prov_link.bearer->type == BT_MESH_PROV_GATT;
+}
+
+static void prov_data(const uint8_t *data)
+{
+ struct os_mbuf *msg = PROV_BUF(1);
+ uint8_t session_key[16];
+ uint8_t nonce[13];
+ uint8_t dev_key[16];
+ uint8_t pdu[25];
+ uint8_t flags;
+ uint32_t iv_index;
+ uint16_t addr;
+ uint16_t net_idx;
+ int err;
+ bool identity_enable;
+
+ BT_DBG("");
+
+ err = bt_mesh_session_key(bt_mesh_prov_link.dhkey,
+ bt_mesh_prov_link.prov_salt, session_key);
+ if (err) {
+ BT_ERR("Unable to generate session key");
+ prov_fail(PROV_ERR_UNEXP_ERR);
+ return;
+ }
+
+ BT_DBG("SessionKey: %s", bt_hex(session_key, 16));
+
+ err = bt_mesh_prov_nonce(bt_mesh_prov_link.dhkey,
+ bt_mesh_prov_link.prov_salt, nonce);
+ if (err) {
+ BT_ERR("Unable to generate session nonce");
+ prov_fail(PROV_ERR_UNEXP_ERR);
+ return;
+ }
+
+ BT_DBG("Nonce: %s", bt_hex(nonce, 13));
+
+ err = bt_mesh_prov_decrypt(session_key, nonce, data, pdu);
+ if (err) {
+ BT_ERR("Unable to decrypt provisioning data");
+ prov_fail(PROV_ERR_DECRYPT);
+ return;
+ }
+
+ err = bt_mesh_dev_key(bt_mesh_prov_link.dhkey,
+ bt_mesh_prov_link.prov_salt, dev_key);
+ if (err) {
+ BT_ERR("Unable to generate device key");
+ prov_fail(PROV_ERR_UNEXP_ERR);
+ return;
+ }
+
+ BT_DBG("DevKey: %s", bt_hex(dev_key, 16));
+
+ net_idx = sys_get_be16(&pdu[16]);
+ flags = pdu[18];
+ iv_index = sys_get_be32(&pdu[19]);
+ addr = sys_get_be16(&pdu[23]);
+
+ BT_DBG("net_idx %u iv_index 0x%08x, addr 0x%04x",
+ net_idx, iv_index, addr);
+
+ bt_mesh_prov_buf_init(msg, PROV_COMPLETE);
+ if (bt_mesh_prov_send(msg, NULL)) {
+ BT_ERR("Failed to send Provisioning Complete");
+ return;
+ }
+
+ /* Ignore any further PDUs on this link */
+ bt_mesh_prov_link.expect = PROV_NO_PDU;
+
+ /* Store info, since bt_mesh_provision() will end up clearing it */
+ if (IS_ENABLED(CONFIG_BT_MESH_GATT_PROXY)) {
+ identity_enable = is_pb_gatt();
+ } else {
+ identity_enable = false;
+ }
+
+ err = bt_mesh_provision(pdu, net_idx, flags, iv_index, addr, dev_key);
+ if (err) {
+ BT_ERR("Failed to provision (err %d)", err);
+ return;
+ }
+
+ /* After PB-GATT provisioning we should start advertising
+ * using Node Identity.
+ */
+ if (IS_ENABLED(CONFIG_BT_MESH_GATT_PROXY) && identity_enable) {
+ bt_mesh_proxy_identity_enable();
+ }
+}
+
+static void local_input_complete(void)
+{
+ if (atomic_test_bit(bt_mesh_prov_link.flags, PUB_KEY_SENT)) {
+ send_input_complete();
+ } else {
+ atomic_set_bit(bt_mesh_prov_link.flags, INPUT_COMPLETE);
+ }
+}
+
+static void prov_link_closed(void)
+{
+ reset_state();
+}
+
+static void prov_link_opened(void)
+{
+ bt_mesh_prov_link.expect = PROV_INVITE;
+}
+
+static const struct bt_mesh_prov_role role_device = {
+ .input_complete = local_input_complete,
+ .link_opened = prov_link_opened,
+ .link_closed = prov_link_closed,
+ .error = prov_fail,
+ .op = {
+ [PROV_INVITE] = prov_invite,
+ [PROV_START] = prov_start,
+ [PROV_PUB_KEY] = prov_pub_key,
+ [PROV_CONFIRM] = prov_confirm,
+ [PROV_RANDOM] = prov_random,
+ [PROV_DATA] = prov_data,
+ },
+};
+
+int bt_mesh_prov_enable(bt_mesh_prov_bearer_t bearers)
+{
+ BT_DBG("bt_mesh_prov_enable");
+
+ if (bt_mesh_is_provisioned()) {
+ return -EALREADY;
+ }
+
+ if (IS_ENABLED(CONFIG_BT_MESH_PB_ADV) &&
+ (bearers & BT_MESH_PROV_ADV)) {
+ pb_adv.link_accept(bt_mesh_prov_bearer_cb_get(), NULL);
+ }
+
+ if (IS_ENABLED(CONFIG_BT_MESH_PB_GATT) &&
+ (bearers & BT_MESH_PROV_GATT)) {
+ pb_gatt.link_accept(bt_mesh_prov_bearer_cb_get(), NULL);
+ }
+
+ BT_DBG("bt_mesh_prov_link.role = &role_device");
+ bt_mesh_prov_link.role = &role_device;
+
+ return 0;
+}
+
+int bt_mesh_prov_disable(bt_mesh_prov_bearer_t bearers)
+{
+ if (bt_mesh_is_provisioned()) {
+ return -EALREADY;
+ }
+
+ if (IS_ENABLED(CONFIG_BT_MESH_PB_ADV) &&
+ (bearers & BT_MESH_PROV_ADV)) {
+ bt_mesh_beacon_disable();
+ bt_mesh_scan_disable();
+ }
+
+ if (IS_ENABLED(CONFIG_BT_MESH_PB_GATT) &&
+ (bearers & BT_MESH_PROV_GATT)) {
+ bt_mesh_proxy_prov_disable(true);
+ }
+
+ return 0;
+}
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/provisioner.c b/src/libs/mynewt-nimble/nimble/host/mesh/src/provisioner.c
new file mode 100644
index 00000000..371c1f6c
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/provisioner.c
@@ -0,0 +1,746 @@
+/* Bluetooth Mesh */
+
+/*
+ * Copyright (c) 2017 Intel Corporation
+ * Copyright (c) 2020 Lingao Meng
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+#define MESH_LOG_MODULE BLE_MESH_PROV_LOG
+
+#include "testing.h"
+
+#include "crypto.h"
+#include "adv.h"
+#include "mesh/mesh.h"
+#include "net.h"
+#include "rpl.h"
+#include "beacon.h"
+#include "access.h"
+#include "foundation.h"
+#include "proxy.h"
+#include "prov.h"
+#include "settings.h"
+
+static struct {
+ struct bt_mesh_cdb_node *node;
+ uint16_t addr;
+ uint16_t net_idx;
+ uint8_t attention_duration;
+ uint8_t uuid[16];
+} prov_device;
+
+static void send_pub_key(void);
+static void prov_dh_key_gen(void);
+static void pub_key_ready(const uint8_t *pkey);
+
+static int reset_state(void)
+{
+#if BLE_MESH_CDB
+ if (prov_device.node != NULL) {
+ bt_mesh_cdb_node_del(prov_device.node, false);
+ }
+#endif
+ return bt_mesh_prov_reset_state(pub_key_ready);
+}
+
+static void prov_link_close(enum prov_bearer_link_status status)
+{
+ BT_DBG("%u", status);
+ bt_mesh_prov_link.expect = PROV_NO_PDU;
+
+ bt_mesh_prov_link.bearer->link_close(status);
+}
+
+static void prov_fail(uint8_t reason)
+{
+ /* According to Bluetooth Mesh Specification v1.0.1, Section 5.4.4, the
+ * provisioner just closes the link when something fails, while the
+ * provisionee sends the fail message, and waits for the provisioner to
+ * close the link.
+ */
+ prov_link_close(PROV_BEARER_LINK_STATUS_FAIL);
+}
+
+static void send_invite(void)
+{
+ struct os_mbuf *inv = PROV_BUF(2);
+
+ BT_DBG("");
+
+ bt_mesh_prov_buf_init(inv, PROV_INVITE);
+ net_buf_simple_add_u8(inv, prov_device.attention_duration);
+
+ bt_mesh_prov_link.conf_inputs[0] = prov_device.attention_duration;
+
+ if (bt_mesh_prov_send(inv, NULL)) {
+ BT_ERR("Failed to send invite");
+ return;
+ }
+
+ bt_mesh_prov_link.expect = PROV_CAPABILITIES;
+}
+
+static void start_sent(int err, void *cb_data)
+{
+ if (!bt_pub_key_get()) {
+ atomic_set_bit(bt_mesh_prov_link.flags, WAIT_PUB_KEY);
+ BT_WARN("Waiting for local public key");
+ } else {
+ send_pub_key();
+ }
+}
+
+static void send_start(void)
+{
+ BT_DBG("");
+ uint8_t method, action;
+ struct os_mbuf *start = PROV_BUF(6);
+
+ const uint8_t *data = &bt_mesh_prov_link.conf_inputs[1 + 3];
+
+ bt_mesh_prov_buf_init(start, PROV_START);
+ net_buf_simple_add_u8(start, PROV_ALG_P256);
+
+ if (atomic_test_bit(bt_mesh_prov_link.flags, REMOTE_PUB_KEY) &&
+ *data == PUB_KEY_OOB) {
+ net_buf_simple_add_u8(start, PUB_KEY_OOB);
+ atomic_set_bit(bt_mesh_prov_link.flags, OOB_PUB_KEY);
+ } else {
+ net_buf_simple_add_u8(start, PUB_KEY_NO_OOB);
+ }
+
+ if (bt_mesh_prov_link.oob_method == AUTH_METHOD_INPUT) {
+ method = AUTH_METHOD_OUTPUT;
+ if (bt_mesh_prov_link.oob_action == INPUT_OOB_STRING) {
+ action = OUTPUT_OOB_STRING;
+ } else {
+ action = OUTPUT_OOB_NUMBER;
+ }
+
+ } else if (bt_mesh_prov_link.oob_method == AUTH_METHOD_OUTPUT) {
+ method = AUTH_METHOD_INPUT;
+ if (bt_mesh_prov_link.oob_action == OUTPUT_OOB_STRING) {
+ action = INPUT_OOB_STRING;
+ } else {
+ action = INPUT_OOB_NUMBER;
+ }
+ } else {
+ method = bt_mesh_prov_link.oob_method;
+ action = 0x00;
+ }
+
+ net_buf_simple_add_u8(start, bt_mesh_prov_link.oob_method);
+
+ net_buf_simple_add_u8(start, bt_mesh_prov_link.oob_action);
+
+ net_buf_simple_add_u8(start, bt_mesh_prov_link.oob_size);
+
+ memcpy(&bt_mesh_prov_link.conf_inputs[12], &start->om_data[1], 5);
+
+ if (bt_mesh_prov_auth(method, action, bt_mesh_prov_link.oob_size) < 0) {
+ BT_ERR("Invalid authentication method: 0x%02x; "
+ "action: 0x%02x; size: 0x%02x", method,
+ action, bt_mesh_prov_link.oob_size);
+ return;
+ }
+
+ if (bt_mesh_prov_send(start, start_sent)) {
+ BT_ERR("Failed to send Provisioning Start");
+ return;
+ }
+}
+
+static bool prov_check_method(struct bt_mesh_dev_capabilities *caps)
+{
+ if (bt_mesh_prov_link.oob_method == AUTH_METHOD_STATIC) {
+ if (!caps->static_oob) {
+ BT_WARN("Device not support OOB static authentication provisioning");
+ return false;
+ }
+ } else if (bt_mesh_prov_link.oob_method == AUTH_METHOD_INPUT) {
+ if (bt_mesh_prov_link.oob_size > caps->input_size) {
+ BT_WARN("The required input length (0x%02x) "
+ "exceeds the device capacity (0x%02x)",
+ bt_mesh_prov_link.oob_size, caps->input_size);
+ return false;
+ }
+
+ if (!(BIT(bt_mesh_prov_link.oob_action) & caps->input_actions)) {
+ BT_WARN("The required input action (0x%02x) "
+ "not supported by the device (0x%02x)",
+ bt_mesh_prov_link.oob_action, caps->input_actions);
+ return false;
+ }
+
+ if (bt_mesh_prov_link.oob_action == INPUT_OOB_STRING) {
+ if (!bt_mesh_prov->output_string) {
+ BT_WARN("Not support output string");
+ return false;
+ }
+ } else {
+ if (!bt_mesh_prov->output_number) {
+ BT_WARN("Not support output number");
+ return false;
+ }
+ }
+ } else if (bt_mesh_prov_link.oob_method == AUTH_METHOD_OUTPUT) {
+ if (bt_mesh_prov_link.oob_size > caps->output_size) {
+ BT_WARN("The required output length (0x%02x) "
+ "exceeds the device capacity (0x%02x)",
+ bt_mesh_prov_link.oob_size, caps->output_size);
+ return false;
+ }
+
+ if (!(BIT(bt_mesh_prov_link.oob_action) & caps->output_actions)) {
+ BT_WARN("The required output action (0x%02x) "
+ "not supported by the device (0x%02x)",
+ bt_mesh_prov_link.oob_action, caps->output_actions);
+ return false;
+ }
+
+ if (!bt_mesh_prov->input) {
+ BT_WARN("Not support input");
+ return false;
+ }
+ }
+
+ return true;
+}
+
+static void prov_capabilities(const uint8_t *data)
+{
+ struct bt_mesh_dev_capabilities caps;
+
+ caps.elem_count = data[0];
+ BT_DBG("Elements: %u", caps.elem_count);
+
+ caps.algorithms = sys_get_be16(&data[1]);
+ BT_DBG("Algorithms: %u", caps.algorithms);
+
+ caps.pub_key_type = data[3];
+ caps.static_oob = data[4];
+ caps.output_size = data[5];
+ BT_DBG("Public Key Type: 0x%02x", caps.pub_key_type);
+ BT_DBG("Static OOB Type: 0x%02x", caps.static_oob);
+ BT_DBG("Output OOB Size: %u", caps.output_size);
+
+ caps.output_actions = (bt_mesh_output_action_t)data[6];
+ caps.input_size = data[8];
+ caps.input_actions = (bt_mesh_input_action_t)data[9];
+ BT_DBG("Output OOB Action: 0x%04x", caps.output_actions);
+ BT_DBG("Input OOB Size: %u", caps.input_size);
+ BT_DBG("Input OOB Action: 0x%04x", caps.input_actions);
+
+ if (data[0] == 0) {
+ BT_ERR("Invalid number of elements");
+ prov_fail(PROV_ERR_NVAL_FMT);
+ return;
+ }
+#if BLE_MESH_CDB
+ prov_device.node =
+ bt_mesh_cdb_node_alloc(prov_device.uuid,
+ prov_device.addr, data[0],
+ prov_device.net_idx);
+ if (prov_device.node == NULL) {
+ BT_ERR("Failed allocating node 0x%04x", prov_device.addr);
+ prov_fail(PROV_ERR_RESOURCES);
+ return;
+ }
+#endif
+ memcpy(&bt_mesh_prov_link.conf_inputs[1], data, 11);
+
+ if (bt_mesh_prov->capabilities) {
+ bt_mesh_prov->capabilities(&caps);
+ }
+
+ if (!prov_check_method(&caps)) {
+ prov_fail(PROV_ERR_UNEXP_ERR);
+ return;
+ }
+
+ send_start();
+}
+
+static void send_confirm(void)
+{
+ struct os_mbuf *cfm = PROV_BUF(17);
+
+ BT_DBG("ConfInputs[0] %s", bt_hex(bt_mesh_prov_link.conf_inputs, 64));
+ BT_DBG("ConfInputs[64] %s", bt_hex(&bt_mesh_prov_link.conf_inputs[64], 64));
+ BT_DBG("ConfInputs[128] %s", bt_hex(&bt_mesh_prov_link.conf_inputs[128], 17));
+
+ if (bt_mesh_prov_conf_salt(bt_mesh_prov_link.conf_inputs,
+ bt_mesh_prov_link.conf_salt)) {
+ BT_ERR("Unable to generate confirmation salt");
+ prov_fail(PROV_ERR_UNEXP_ERR);
+ return;
+ }
+
+ BT_DBG("ConfirmationSalt: %s", bt_hex(bt_mesh_prov_link.conf_salt, 16));
+
+ if (bt_mesh_prov_conf_key(bt_mesh_prov_link.dhkey,
+ bt_mesh_prov_link.conf_salt, bt_mesh_prov_link.conf_key)) {
+ BT_ERR("Unable to generate confirmation key");
+ prov_fail(PROV_ERR_UNEXP_ERR);
+ return;
+ }
+
+ BT_DBG("ConfirmationKey: %s", bt_hex(bt_mesh_prov_link.conf_key, 16));
+
+ if (bt_rand(bt_mesh_prov_link.rand, 16)) {
+ BT_ERR("Unable to generate random number");
+ prov_fail(PROV_ERR_UNEXP_ERR);
+ return;
+ }
+
+ BT_DBG("LocalRandom: %s", bt_hex(bt_mesh_prov_link.rand, 16));
+
+ bt_mesh_prov_buf_init(cfm, PROV_CONFIRM);
+
+ if (bt_mesh_prov_conf(bt_mesh_prov_link.conf_key,
+ bt_mesh_prov_link.rand, bt_mesh_prov_link.auth,
+ net_buf_simple_add(cfm, 16))) {
+ BT_ERR("Unable to generate confirmation value");
+ prov_fail(PROV_ERR_UNEXP_ERR);
+ return;
+ }
+
+ if (bt_mesh_prov_send(cfm, NULL)) {
+ BT_ERR("Failed to send Provisioning Confirm");
+ return;
+ }
+
+ bt_mesh_prov_link.expect = PROV_CONFIRM;
+}
+
+static void public_key_sent(int err, void *cb_data)
+{
+ atomic_set_bit(bt_mesh_prov_link.flags, PUB_KEY_SENT);
+
+ if (atomic_test_bit(bt_mesh_prov_link.flags, OOB_PUB_KEY) &&
+ atomic_test_bit(bt_mesh_prov_link.flags, REMOTE_PUB_KEY)) {
+ prov_dh_key_gen();
+ return;
+ }
+
+ bt_mesh_prov_link.expect = PROV_PUB_KEY;
+}
+
+static void send_pub_key(void)
+{
+ struct os_mbuf *buf = PROV_BUF(65);
+ const uint8_t *key;
+
+ key = bt_pub_key_get();
+ if (!key) {
+ BT_ERR("No public key available");
+ prov_fail(PROV_ERR_UNEXP_ERR);
+ return;
+ }
+
+ BT_DBG("Local Public Key: %s", bt_hex(key, 64));
+
+ bt_mesh_prov_buf_init(buf, PROV_PUB_KEY);
+
+ /* Swap X and Y halves independently to big-endian */
+ sys_memcpy_swap(net_buf_simple_add(buf, 32), key, 32);
+ sys_memcpy_swap(net_buf_simple_add(buf, 32), &key[32], 32);
+
+ /* PublicKeyProvisioner */
+ memcpy(&bt_mesh_prov_link.conf_inputs[17], &buf->om_databuf[1], 64);
+
+ if (bt_mesh_prov_send(buf, public_key_sent)) {
+ BT_ERR("Failed to send Public Key");
+ return;
+ }
+}
+
+static void prov_dh_key_cb(const uint8_t dhkey[32])
+{
+ BT_DBG("%p", dhkey);
+
+ if (!dhkey) {
+ BT_ERR("DHKey generation failed");
+ prov_fail(PROV_ERR_UNEXP_ERR);
+ return;
+ }
+
+ sys_memcpy_swap(bt_mesh_prov_link.dhkey, dhkey, 32);
+
+ BT_DBG("DHkey: %s", bt_hex(bt_mesh_prov_link.dhkey, 32));
+
+ if (atomic_test_bit(bt_mesh_prov_link.flags, WAIT_STRING) ||
+ atomic_test_bit(bt_mesh_prov_link.flags, WAIT_NUMBER) ||
+ atomic_test_bit(bt_mesh_prov_link.flags, NOTIFY_INPUT_COMPLETE)) {
+ atomic_set_bit(bt_mesh_prov_link.flags, WAIT_CONFIRM);
+ return;
+ }
+
+ send_confirm();
+}
+
+static void prov_dh_key_gen(void)
+{
+ uint8_t remote_pk_le[64], *remote_pk;
+
+ remote_pk = &bt_mesh_prov_link.conf_inputs[81];
+
+ /* Copy remote key in little-endian for bt_dh_key_gen().
+ * X and Y halves are swapped independently. The bt_dh_key_gen()
+ * will also take care of validating the remote public key.
+ */
+ sys_memcpy_swap(remote_pk_le, remote_pk, 32);
+ sys_memcpy_swap(&remote_pk_le[32], &remote_pk[32], 32);
+
+ if (bt_dh_key_gen(remote_pk_le, prov_dh_key_cb)) {
+ BT_ERR("Failed to generate DHKey");
+ prov_fail(PROV_ERR_UNEXP_ERR);
+ }
+
+ if (atomic_test_bit(bt_mesh_prov_link.flags, NOTIFY_INPUT_COMPLETE)) {
+ bt_mesh_prov_link.expect = PROV_INPUT_COMPLETE;
+ }
+}
+
+static void prov_pub_key(const uint8_t *data)
+{
+ BT_DBG("Remote Public Key: %s", bt_hex(data, 64));
+
+ atomic_set_bit(bt_mesh_prov_link.flags, REMOTE_PUB_KEY);
+
+ /* PublicKeyDevice */
+ memcpy(&bt_mesh_prov_link.conf_inputs[81], data, 64);
+ bt_mesh_prov_link.bearer->clear_tx();
+
+ prov_dh_key_gen();
+}
+
+static void pub_key_ready(const uint8_t *pkey)
+{
+ if (!pkey) {
+ BT_WARN("Public key not available");
+ return;
+ }
+
+ BT_DBG("Local public key ready");
+
+ if (atomic_test_and_clear_bit(bt_mesh_prov_link.flags, WAIT_PUB_KEY)) {
+ send_pub_key();
+ }
+}
+
+static void notify_input_complete(void)
+{
+ if (atomic_test_and_clear_bit(bt_mesh_prov_link.flags,
+ NOTIFY_INPUT_COMPLETE) &&
+ bt_mesh_prov->input_complete) {
+ bt_mesh_prov->input_complete();
+ }
+}
+
+static void prov_input_complete(const uint8_t *data)
+{
+ BT_DBG("");
+
+ notify_input_complete();
+
+ if (atomic_test_and_clear_bit(bt_mesh_prov_link.flags, WAIT_CONFIRM)) {
+ send_confirm();
+ }
+}
+
+static void send_prov_data(void)
+{
+ struct os_mbuf *pdu = PROV_BUF(34);
+#if BLE_MESH_CDB
+ struct bt_mesh_cdb_subnet *sub;
+#endif
+ uint8_t session_key[16];
+ uint8_t nonce[13];
+ int err;
+
+ err = bt_mesh_session_key(bt_mesh_prov_link.dhkey,
+ bt_mesh_prov_link.prov_salt, session_key);
+ if (err) {
+ BT_ERR("Unable to generate session key");
+ prov_fail(PROV_ERR_UNEXP_ERR);
+ return;
+ }
+
+ BT_DBG("SessionKey: %s", bt_hex(session_key, 16));
+
+ err = bt_mesh_prov_nonce(bt_mesh_prov_link.dhkey,
+ bt_mesh_prov_link.prov_salt, nonce);
+ if (err) {
+ BT_ERR("Unable to generate session nonce");
+ prov_fail(PROV_ERR_UNEXP_ERR);
+ return;
+ }
+
+ BT_DBG("Nonce: %s", bt_hex(nonce, 13));
+
+ err = bt_mesh_dev_key(bt_mesh_prov_link.dhkey,
+ bt_mesh_prov_link.prov_salt, prov_device.node->dev_key);
+ if (err) {
+ BT_ERR("Unable to generate device key");
+ prov_fail(PROV_ERR_UNEXP_ERR);
+ return;
+ }
+
+ BT_DBG("DevKey: %s", bt_hex(prov_device.node->dev_key, 16));
+#if BLE_MESH_CDB
+ sub = bt_mesh_cdb_subnet_get(prov_device.node->net_idx);
+ if (sub == NULL) {
+ BT_ERR("No subnet with net_idx %u",
+ prov_device.node->net_idx);
+ prov_fail(PROV_ERR_UNEXP_ERR);
+ return;
+ }
+#endif
+ bt_mesh_prov_buf_init(pdu, PROV_DATA);
+#if BLE_MESH_CDB
+ net_buf_simple_add_mem(pdu, sub->keys[sub->kr_flag].net_key, 16);
+ net_buf_simple_add_be16(pdu, prov_device.node->net_idx);
+ net_buf_simple_add_u8(pdu, bt_mesh_cdb_subnet_flags(sub));
+ net_buf_simple_add_be32(pdu, bt_mesh_cdb.iv_index);
+#endif
+ net_buf_simple_add_be16(pdu, prov_device.node->addr);
+ net_buf_simple_add(pdu, 8); /* For MIC */
+
+ BT_DBG("net_idx %u, iv_index 0x%08x, addr 0x%04x",
+ prov_device.node->net_idx, bt_mesh.iv_index,
+ prov_device.node->addr);
+
+ err = bt_mesh_prov_encrypt(session_key, nonce, &pdu->om_data[1],
+ &pdu->om_data[1]);
+ if (err) {
+ BT_ERR("Unable to encrypt provisioning data");
+ prov_fail(PROV_ERR_DECRYPT);
+ return;
+ }
+
+ if (bt_mesh_prov_send(pdu, NULL)) {
+ BT_ERR("Failed to send Provisioning Data");
+ return;
+ }
+
+ bt_mesh_prov_link.expect = PROV_COMPLETE;
+}
+
+static void prov_complete(const uint8_t *data)
+{
+ struct bt_mesh_cdb_node *node = prov_device.node;
+
+ BT_DBG("key %s, net_idx %u, num_elem %u, addr 0x%04x",
+ bt_hex(node->dev_key, 16), node->net_idx, node->num_elem,
+ node->addr);
+
+ if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
+ bt_mesh_store_cdb_node(node);
+ }
+
+ prov_device.node = NULL;
+ prov_link_close(PROV_BEARER_LINK_STATUS_SUCCESS);
+
+ if (bt_mesh_prov->node_added) {
+ bt_mesh_prov->node_added(node->net_idx, node->uuid, node->addr,
+ node->num_elem);
+ }
+}
+
+static void send_random(void)
+{
+ struct os_mbuf *rnd = PROV_BUF(17);
+
+ bt_mesh_prov_buf_init(rnd, PROV_RANDOM);
+ net_buf_simple_add_mem(rnd, bt_mesh_prov_link.rand, 16);
+
+ if (bt_mesh_prov_send(rnd, NULL)) {
+ BT_ERR("Failed to send Provisioning Random");
+ return;
+ }
+
+ bt_mesh_prov_link.expect = PROV_RANDOM;
+}
+
+static void prov_random(const uint8_t *data)
+{
+ uint8_t conf_verify[16];
+
+ BT_DBG("Remote Random: %s", bt_hex(data, 16));
+ if (!memcmp(data, bt_mesh_prov_link.rand, 16)) {
+ BT_ERR("Random value is identical to ours, rejecting.");
+ prov_fail(PROV_ERR_CFM_FAILED);
+ return;
+ }
+
+ if (bt_mesh_prov_conf(bt_mesh_prov_link.conf_key,
+ data, bt_mesh_prov_link.auth, conf_verify)) {
+ BT_ERR("Unable to calculate confirmation verification");
+ prov_fail(PROV_ERR_UNEXP_ERR);
+ return;
+ }
+
+ if (memcmp(conf_verify, bt_mesh_prov_link.conf, 16)) {
+ BT_ERR("Invalid confirmation value");
+ BT_DBG("Received: %s", bt_hex(bt_mesh_prov_link.conf, 16));
+ BT_DBG("Calculated: %s", bt_hex(conf_verify, 16));
+ prov_fail(PROV_ERR_CFM_FAILED);
+ return;
+ }
+
+ if (bt_mesh_prov_salt(bt_mesh_prov_link.conf_salt,
+ bt_mesh_prov_link.rand, data, bt_mesh_prov_link.prov_salt)) {
+ BT_ERR("Failed to generate provisioning salt");
+ prov_fail(PROV_ERR_UNEXP_ERR);
+ return;
+ }
+
+ BT_DBG("ProvisioningSalt: %s", bt_hex(bt_mesh_prov_link.prov_salt, 16));
+
+ send_prov_data();
+}
+
+static void prov_confirm(const uint8_t *data)
+{
+ BT_DBG("Remote Confirm: %s", bt_hex(data, 16));
+
+ memcpy(bt_mesh_prov_link.conf, data, 16);
+
+ send_random();
+}
+
+static void prov_failed(const uint8_t *data)
+{
+ BT_WARN("Error: 0x%02x", data[0]);
+ reset_state();
+}
+
+static void local_input_complete(void)
+{
+ if (atomic_test_and_clear_bit(bt_mesh_prov_link.flags, WAIT_CONFIRM)) {
+ send_confirm();
+ }
+}
+
+static void prov_link_closed(void)
+{
+ reset_state();
+}
+
+static void prov_link_opened(void)
+{
+ send_invite();
+}
+
+static const struct bt_mesh_prov_role role_provisioner = {
+ .input_complete = local_input_complete,
+ .link_opened = prov_link_opened,
+ .link_closed = prov_link_closed,
+ .error = prov_fail,
+ .op = {
+ [PROV_CAPABILITIES] = prov_capabilities,
+ [PROV_PUB_KEY] = prov_pub_key,
+ [PROV_INPUT_COMPLETE] = prov_input_complete,
+ [PROV_CONFIRM] = prov_confirm,
+ [PROV_RANDOM] = prov_random,
+ [PROV_COMPLETE] = prov_complete,
+ [PROV_FAILED] = prov_failed,
+ },
+};
+
+static void prov_set_method(uint8_t method, uint8_t action, uint8_t size)
+{
+ bt_mesh_prov_link.oob_method = method;
+ bt_mesh_prov_link.oob_action = action;
+ bt_mesh_prov_link.oob_size = size;
+}
+
+int bt_mesh_auth_method_set_input(bt_mesh_input_action_t action, uint8_t size)
+{
+ if (!action || !size || size > 8) {
+ return -EINVAL;
+ }
+
+ prov_set_method(AUTH_METHOD_INPUT, find_msb_set(action) - 1, size);
+ return 0;
+}
+
+int bt_mesh_auth_method_set_output(bt_mesh_output_action_t action, uint8_t size)
+{
+ if (!action || !size || size > 8) {
+ return -EINVAL;
+ }
+
+ prov_set_method(AUTH_METHOD_OUTPUT, find_msb_set(action) - 1, size);
+ return 0;
+}
+
+int bt_mesh_auth_method_set_static(const uint8_t *static_val, uint8_t size)
+{
+ if (!size || !static_val || size > 16) {
+ return -EINVAL;
+ }
+
+ prov_set_method(AUTH_METHOD_STATIC, 0, 0);
+
+ memcpy(bt_mesh_prov_link.auth + 16 - size, static_val, size);
+ if (size < 16) {
+ (void)memset(bt_mesh_prov_link.auth, 0,
+ sizeof(bt_mesh_prov_link.auth) - size);
+ }
+ return 0;
+}
+
+int bt_mesh_auth_method_set_none(void)
+{
+ prov_set_method(AUTH_METHOD_NO_OOB, 0, 0);
+ return 0;
+}
+
+int bt_mesh_prov_remote_pub_key_set(const uint8_t public_key[64])
+{
+ if (public_key == NULL) {
+ return -EINVAL;
+ }
+
+ if (atomic_test_and_set_bit(bt_mesh_prov_link.flags, REMOTE_PUB_KEY)) {
+ return -EALREADY;
+ }
+
+ /* Swap X and Y halves independently to big-endian */
+ memcpy(&bt_mesh_prov_link.conf_inputs[81], public_key, 32);
+ memcpy(&bt_mesh_prov_link.conf_inputs[81 + 32], &public_key[32], 32);
+
+ return 0;
+}
+
+#if defined(CONFIG_BT_MESH_PB_ADV)
+int bt_mesh_pb_adv_open(const uint8_t uuid[16], uint16_t net_idx, uint16_t addr,
+ uint8_t attention_duration)
+{
+ int err;
+
+ if (atomic_test_and_set_bit(bt_mesh_prov_link.flags, LINK_ACTIVE)) {
+ return -EBUSY;
+ }
+
+ atomic_set_bit(bt_mesh_prov_link.flags, PROVISIONER);
+ memcpy(prov_device.uuid, uuid, 16);
+ prov_device.addr = addr;
+ prov_device.net_idx = net_idx;
+ prov_device.attention_duration = attention_duration;
+ bt_mesh_prov_link.bearer = &pb_adv;
+ bt_mesh_prov_link.role = &role_provisioner;
+
+ err = bt_mesh_prov_link.bearer->link_open(prov_device.uuid, PROTOCOL_TIMEOUT,
+ bt_mesh_prov_bearer_cb_get(), NULL);
+ if (err) {
+ atomic_clear_bit(bt_mesh_prov_link.flags, LINK_ACTIVE);
+ }
+
+ return err;
+}
+#endif \ No newline at end of file
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/provisioner.h b/src/libs/mynewt-nimble/nimble/host/mesh/src/provisioner.h
new file mode 100644
index 00000000..ccda47ef
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/provisioner.h
@@ -0,0 +1,10 @@
+/* Bluetooth Mesh */
+
+/*
+ * Copyright (c) 2017 Intel Corporation
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+int bt_mesh_pb_adv_open(const uint8_t uuid[16], uint16_t net_idx, uint16_t addr,
+ uint8_t attention_duration); \ No newline at end of file
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/proxy.c b/src/libs/mynewt-nimble/nimble/host/mesh/src/proxy.c
index 134a36dd..6d631b72 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/src/proxy.c
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/proxy.c
@@ -19,6 +19,7 @@
#include "mesh_priv.h"
#include "adv.h"
#include "net.h"
+#include "rpl.h"
#include "prov.h"
#include "beacon.h"
#include "foundation.h"
@@ -28,6 +29,9 @@
#define PDU_TYPE(data) (data[0] & BIT_MASK(6))
#define PDU_SAR(data) (data[0] >> 6)
+#define BT_UUID_16_ENCODE(w16) \
+ (((w16) >> 0) & 0xFF), \
+ (((w16) >> 8) & 0xFF)
/* Mesh Profile 1.0 Section 6.6:
* "The timeout for the SAR transfer is 20 seconds. When the timeout
* expires, the Proxy Server shall disconnect."
@@ -110,14 +114,14 @@ static bool prov_fast_adv;
static struct bt_mesh_proxy_client {
uint16_t conn_handle;
- u16_t filter[MYNEWT_VAL(BLE_MESH_PROXY_FILTER_SIZE)];
+ uint16_t filter[MYNEWT_VAL(BLE_MESH_PROXY_FILTER_SIZE)];
enum __packed {
NONE,
WHITELIST,
BLACKLIST,
PROV,
} filter_type;
- u8_t msg_type;
+ uint8_t msg_type;
#if (MYNEWT_VAL(BLE_MESH_GATT_PROXY))
struct ble_npl_callout send_beacons;
#endif
@@ -127,6 +131,9 @@ static struct bt_mesh_proxy_client {
[0 ... (MYNEWT_VAL(BLE_MAX_CONNECTIONS) - 1)] = { 0 },
};
+static sys_slist_t idle_waiters;
+static atomic_t pending_notifications;
+
/* Track which service is enabled */
static enum {
MESH_GATT_NONE,
@@ -195,15 +202,15 @@ static struct bt_mesh_proxy_client *find_client(uint16_t conn_handle)
#if (MYNEWT_VAL(BLE_MESH_GATT_PROXY))
/* Next subnet in queue to be advertised */
-static int next_idx;
+static struct bt_mesh_subnet *beacon_sub;
-static int proxy_segment_and_send(uint16_t conn_handle, u8_t type,
+static int proxy_segment_and_send(uint16_t conn_handle, uint8_t type,
struct os_mbuf *msg);
static int filter_set(struct bt_mesh_proxy_client *client,
struct os_mbuf *buf)
{
- u8_t type;
+ uint8_t type;
if (buf->om_len < 1) {
BT_WARN("Too short Filter Set message");
@@ -230,7 +237,7 @@ static int filter_set(struct bt_mesh_proxy_client *client,
return 0;
}
-static void filter_add(struct bt_mesh_proxy_client *client, u16_t addr)
+static void filter_add(struct bt_mesh_proxy_client *client, uint16_t addr)
{
int i;
@@ -254,7 +261,7 @@ static void filter_add(struct bt_mesh_proxy_client *client, u16_t addr)
}
}
-static void filter_remove(struct bt_mesh_proxy_client *client, u16_t addr)
+static void filter_remove(struct bt_mesh_proxy_client *client, uint16_t addr)
{
int i;
@@ -281,7 +288,7 @@ static void send_filter_status(struct bt_mesh_proxy_client *client,
.ctx = &rx->ctx,
.src = bt_mesh_primary_addr(),
};
- u16_t filter_size;
+ uint16_t filter_size;
int i, err;
/* Configuration messages always have dst unassigned */
@@ -323,7 +330,7 @@ static void proxy_cfg(struct bt_mesh_proxy_client *client)
{
struct os_mbuf *buf = NET_BUF_SIMPLE(29);
struct bt_mesh_net_rx rx;
- u8_t opcode;
+ uint8_t opcode;
int err;
err = bt_mesh_net_decode(client->buf, BT_MESH_NET_IF_PROXY_CFG,
@@ -333,8 +340,16 @@ static void proxy_cfg(struct bt_mesh_proxy_client *client)
goto done;
}
+ rx.local_match = 1U;
+
+ if (bt_mesh_rpl_check(&rx, NULL)) {
+ BT_WARN("Replay: src 0x%04x dst 0x%04x seq 0x%06x",
+ rx.ctx.addr, rx.ctx.recv_dst, rx.seq);
+ goto done;
+ }
+
/* Remove network headers */
- net_buf_simple_pull(buf, BT_MESH_NET_HDR_LEN);
+ net_buf_simple_pull_mem(buf, BT_MESH_NET_HDR_LEN);
BT_DBG("%u bytes: %s", buf->om_len, bt_hex(buf->om_data, buf->om_len));
@@ -351,7 +366,7 @@ static void proxy_cfg(struct bt_mesh_proxy_client *client)
break;
case CFG_FILTER_ADD:
while (buf->om_len >= 2) {
- u16_t addr;
+ uint16_t addr;
addr = net_buf_simple_pull_be16(buf);
filter_add(client, addr);
@@ -360,7 +375,7 @@ static void proxy_cfg(struct bt_mesh_proxy_client *client)
break;
case CFG_FILTER_REMOVE:
while (buf->om_len >= 2) {
- u16_t addr;
+ uint16_t addr;
addr = net_buf_simple_pull_be16(buf);
filter_remove(client, addr);
@@ -389,21 +404,20 @@ static int beacon_send(uint16_t conn_handle, struct bt_mesh_subnet *sub)
return rc;
}
+static int send_beacon_cb(struct bt_mesh_subnet *sub, void *cb_data)
+{
+ struct bt_mesh_proxy_client *client = cb_data;
+
+ return beacon_send(client->conn_handle, sub);
+}
+
static void proxy_send_beacons(struct ble_npl_event *work)
{
struct bt_mesh_proxy_client *client;
- int i;
-
client = ble_npl_event_get_arg(work);
- for (i = 0; i < ARRAY_SIZE(bt_mesh.sub); i++) {
- struct bt_mesh_subnet *sub = &bt_mesh.sub[i];
-
- if (sub->net_idx != BT_MESH_KEY_UNUSED) {
- beacon_send(client->conn_handle, sub);
- }
- }
+ (void)bt_mesh_subnet_find(send_beacon_cb, client);
}
static void proxy_sar_timeout(struct ble_npl_event *work)
@@ -429,12 +443,7 @@ void bt_mesh_proxy_beacon_send(struct bt_mesh_subnet *sub)
if (!sub) {
/* NULL means we send on all subnets */
- for (i = 0; i < ARRAY_SIZE(bt_mesh.sub); i++) {
- if (bt_mesh.sub[i].net_idx != BT_MESH_KEY_UNUSED) {
- bt_mesh_proxy_beacon_send(&bt_mesh.sub[i]);
- }
- }
-
+ bt_mesh_subnet_foreach(bt_mesh_proxy_beacon_send);
return;
}
@@ -445,13 +454,17 @@ void bt_mesh_proxy_beacon_send(struct bt_mesh_subnet *sub)
}
}
-void bt_mesh_proxy_identity_start(struct bt_mesh_subnet *sub)
+static void node_id_start(struct bt_mesh_subnet *sub)
{
sub->node_id = BT_MESH_NODE_IDENTITY_RUNNING;
sub->node_id_start = k_uptime_get_32();
+}
+void bt_mesh_proxy_identity_start(struct bt_mesh_subnet *sub)
+{
+ node_id_start(sub);
/* Prioritize the recently enabled subnet */
- next_idx = sub - bt_mesh.sub;
+ beacon_sub = sub;
}
void bt_mesh_proxy_identity_stop(struct bt_mesh_subnet *sub)
@@ -462,30 +475,13 @@ void bt_mesh_proxy_identity_stop(struct bt_mesh_subnet *sub)
int bt_mesh_proxy_identity_enable(void)
{
- int i, count = 0;
-
BT_DBG("");
if (!bt_mesh_is_provisioned()) {
return -EAGAIN;
}
- for (i = 0; i < ARRAY_SIZE(bt_mesh.sub); i++) {
- struct bt_mesh_subnet *sub = &bt_mesh.sub[i];
-
- if (sub->net_idx == BT_MESH_KEY_UNUSED) {
- continue;
- }
-
- if (sub->node_id == BT_MESH_NODE_IDENTITY_NOT_SUPPORTED) {
- continue;
- }
-
- bt_mesh_proxy_identity_start(sub);
- count++;
- }
-
- if (count) {
+ if (bt_mesh_subnet_foreach(node_id_start)) {
bt_mesh_adv_update();
}
@@ -528,9 +524,9 @@ static void proxy_complete_pdu(struct bt_mesh_proxy_client *client)
static int proxy_recv(uint16_t conn_handle, uint16_t attr_handle,
struct ble_gatt_access_ctxt *ctxt, void *arg)
{
- struct bt_mesh_proxy_client *client;
- const u8_t *data = ctxt->om->om_data;
- u16_t len = ctxt->om->om_len;
+ struct bt_mesh_proxy_client *client = find_client(conn_handle);
+ const uint8_t *data = ctxt->om->om_data;
+ uint16_t len = ctxt->om->om_len;
client = find_client(conn_handle);
@@ -652,7 +648,9 @@ static void proxy_connected(uint16_t conn_handle)
static void proxy_disconnected(uint16_t conn_handle, int reason)
{
int i;
- bool disconnected = false;
+
+ BT_DBG("conn handle %u reason 0x%02x", conn_handle, reason);
+ conn_count--;
for (i = 0; i < ARRAY_SIZE(clients); i++) {
struct bt_mesh_proxy_client *client = &clients[i];
@@ -665,16 +663,11 @@ static void proxy_disconnected(uint16_t conn_handle, int reason)
k_delayed_work_cancel(&client->sar_timer);
client->conn_handle = BLE_HS_CONN_HANDLE_NONE;
- conn_count--;
- disconnected = true;
break;
}
}
- if (disconnected) {
- BT_INFO("conn_handle %d reason %d", conn_handle, reason);
- bt_mesh_adv_update();
- }
+ bt_mesh_adv_update();
}
struct os_mbuf *bt_mesh_proxy_get_buf(void)
@@ -887,7 +880,7 @@ int bt_mesh_proxy_gatt_disable(void)
return 0;
}
-void bt_mesh_proxy_addr_add(struct os_mbuf *buf, u16_t addr)
+void bt_mesh_proxy_addr_add(struct os_mbuf *buf, uint16_t addr)
{
struct bt_mesh_proxy_client *client = NULL;
int i;
@@ -911,7 +904,7 @@ void bt_mesh_proxy_addr_add(struct os_mbuf *buf, u16_t addr)
}
static bool client_filter_match(struct bt_mesh_proxy_client *client,
- u16_t addr)
+ uint16_t addr)
{
int i;
@@ -942,7 +935,7 @@ static bool client_filter_match(struct bt_mesh_proxy_client *client,
return false;
}
-bool bt_mesh_proxy_relay(struct os_mbuf *buf, u16_t dst)
+bool bt_mesh_proxy_relay(struct os_mbuf *buf, uint16_t dst)
{
bool relayed = false;
int i;
@@ -978,9 +971,25 @@ bool bt_mesh_proxy_relay(struct os_mbuf *buf, u16_t dst)
#endif /* MYNEWT_VAL(BLE_MESH_GATT_PROXY) */
-static int proxy_send(uint16_t conn_handle, const void *data, u16_t len)
+static void notify_complete(void)
+{
+ sys_snode_t *n;
+
+ if (atomic_dec(&pending_notifications) > 1) {
+ return;
+ }
+
+ BT_DBG("");
+
+ while ((n = sys_slist_get(&idle_waiters))) {
+ CONTAINER_OF(n, struct bt_mesh_proxy_idle_cb, n)->cb();
+ }
+}
+
+static int proxy_send(uint16_t conn_handle, const void *data, uint16_t len)
{
struct os_mbuf *om;
+ int err = 0;
BT_DBG("%u bytes: %s", len, bt_hex(data, len));
@@ -988,7 +997,8 @@ static int proxy_send(uint16_t conn_handle, const void *data, u16_t len)
if (gatt_svc == MESH_GATT_PROXY) {
om = ble_hs_mbuf_from_flat(data, len);
assert(om);
- ble_gattc_notify_custom(conn_handle, svc_handles.proxy_data_out_h, om);
+ err = ble_gattc_notify_custom(conn_handle, svc_handles.proxy_data_out_h, om);
+ notify_complete();
}
#endif
@@ -996,17 +1006,22 @@ static int proxy_send(uint16_t conn_handle, const void *data, u16_t len)
if (gatt_svc == MESH_GATT_PROV) {
om = ble_hs_mbuf_from_flat(data, len);
assert(om);
- ble_gattc_notify_custom(conn_handle, svc_handles.prov_data_out_h, om);
+ err = ble_gattc_notify_custom(conn_handle, svc_handles.prov_data_out_h, om);
+ notify_complete();
}
#endif
- return 0;
+ if (!err) {
+ atomic_inc(&pending_notifications);
+ }
+
+ return err;
}
-static int proxy_segment_and_send(uint16_t conn_handle, u8_t type,
+static int proxy_segment_and_send(uint16_t conn_handle, uint8_t type,
struct os_mbuf *msg)
{
- u16_t mtu;
+ uint16_t mtu;
BT_DBG("conn_handle %d type 0x%02x len %u: %s", conn_handle, type, msg->om_len,
bt_hex(msg->om_data, msg->om_len));
@@ -1020,7 +1035,7 @@ static int proxy_segment_and_send(uint16_t conn_handle, u8_t type,
net_buf_simple_push_u8(msg, PDU_HDR(SAR_FIRST, type));
proxy_send(conn_handle, msg->om_data, mtu);
- net_buf_simple_pull(msg, mtu);
+ net_buf_simple_pull_mem(msg, mtu);
while (msg->om_len) {
if (msg->om_len + 1 < mtu) {
@@ -1031,13 +1046,13 @@ static int proxy_segment_and_send(uint16_t conn_handle, u8_t type,
net_buf_simple_push_u8(msg, PDU_HDR(SAR_CONT, type));
proxy_send(conn_handle, msg->om_data, mtu);
- net_buf_simple_pull(msg, mtu);
+ net_buf_simple_pull_mem(msg, mtu);
}
return 0;
}
-int bt_mesh_proxy_send(uint16_t conn_handle, u8_t type,
+int bt_mesh_proxy_send(uint16_t conn_handle, uint8_t type,
struct os_mbuf *msg)
{
struct bt_mesh_proxy_client *client = find_client(conn_handle);
@@ -1056,11 +1071,14 @@ int bt_mesh_proxy_send(uint16_t conn_handle, u8_t type,
}
#if (MYNEWT_VAL(BLE_MESH_PB_GATT))
-static u8_t prov_svc_data[20] = { 0x27, 0x18, };
+static uint8_t prov_svc_data[20] = {
+ BT_UUID_16_ENCODE(BT_UUID_MESH_PROV_VAL),
+};
static const struct bt_data prov_ad[] = {
BT_DATA_BYTES(BT_DATA_FLAGS, (BT_LE_AD_GENERAL | BT_LE_AD_NO_BREDR)),
- BT_DATA_BYTES(BT_DATA_UUID16_ALL, 0x27, 0x18),
+ BT_DATA_BYTES(BT_DATA_UUID16_ALL,
+ BT_UUID_16_ENCODE(BT_UUID_MESH_PROV_VAL)),
BT_DATA(BT_DATA_SVC_DATA16, prov_svc_data, sizeof(prov_svc_data)),
};
#endif /* PB_GATT */
@@ -1075,23 +1093,27 @@ static const struct bt_data prov_ad[] = {
#define NODE_ID_TIMEOUT K_SECONDS(CONFIG_BT_MESH_NODE_ID_TIMEOUT)
-static u8_t proxy_svc_data[NODE_ID_LEN] = { 0x28, 0x18, };
+static uint8_t proxy_svc_data[NODE_ID_LEN] = {
+ BT_UUID_16_ENCODE(BT_UUID_MESH_PROXY_VAL),
+};
static const struct bt_data node_id_ad[] = {
BT_DATA_BYTES(BT_DATA_FLAGS, (BT_LE_AD_GENERAL | BT_LE_AD_NO_BREDR)),
- BT_DATA_BYTES(BT_DATA_UUID16_ALL, 0x28, 0x18),
+ BT_DATA_BYTES(BT_DATA_UUID16_ALL,
+ BT_UUID_16_ENCODE(BT_UUID_MESH_PROXY_VAL)),
BT_DATA(BT_DATA_SVC_DATA16, proxy_svc_data, NODE_ID_LEN),
};
static const struct bt_data net_id_ad[] = {
BT_DATA_BYTES(BT_DATA_FLAGS, (BT_LE_AD_GENERAL | BT_LE_AD_NO_BREDR)),
- BT_DATA_BYTES(BT_DATA_UUID16_ALL, 0x28, 0x18),
+ BT_DATA_BYTES(BT_DATA_UUID16_ALL,
+ BT_UUID_16_ENCODE(BT_UUID_MESH_PROXY_VAL)),
BT_DATA(BT_DATA_SVC_DATA16, proxy_svc_data, NET_ID_LEN),
};
static int node_id_adv(struct bt_mesh_subnet *sub)
{
- u8_t tmp[16];
+ uint8_t tmp[16];
int err;
BT_DBG("");
@@ -1107,7 +1129,8 @@ static int node_id_adv(struct bt_mesh_subnet *sub)
memcpy(tmp + 6, proxy_svc_data + 11, 8);
sys_put_be16(bt_mesh_primary_addr(), tmp + 14);
- err = bt_encrypt_be(sub->keys[sub->kr_flag].identity, tmp, tmp);
+ err = bt_encrypt_be(sub->keys[SUBNET_KEY_TX_IDX(sub)].identity, tmp,
+ tmp);
if (err) {
return err;
}
@@ -1135,9 +1158,9 @@ static int net_id_adv(struct bt_mesh_subnet *sub)
proxy_svc_data[2] = ID_TYPE_NET;
BT_DBG("Advertising with NetId %s",
- bt_hex(sub->keys[sub->kr_flag].net_id, 8));
+ bt_hex(sub->keys[SUBNET_KEY_TX_IDX(sub)].net_id, 8));
- memcpy(proxy_svc_data + 3, sub->keys[sub->kr_flag].net_id, 8);
+ memcpy(proxy_svc_data + 3, sub->keys[SUBNET_KEY_TX_IDX(sub)].net_id, 8);
err = bt_le_adv_start(&slow_adv_param, net_id_ad,
ARRAY_SIZE(net_id_ad), NULL, 0);
@@ -1158,60 +1181,75 @@ static bool advertise_subnet(struct bt_mesh_subnet *sub)
}
return (sub->node_id == BT_MESH_NODE_IDENTITY_RUNNING ||
- bt_mesh_gatt_proxy_get() != BT_MESH_GATT_PROXY_NOT_SUPPORTED);
+ bt_mesh_gatt_proxy_get() == BT_MESH_GATT_PROXY_ENABLED);
}
static struct bt_mesh_subnet *next_sub(void)
{
- int i;
+ struct bt_mesh_subnet *sub = NULL;
- for (i = 0; i < ARRAY_SIZE(bt_mesh.sub); i++) {
- struct bt_mesh_subnet *sub;
+ if (!beacon_sub) {
+ beacon_sub = bt_mesh_subnet_next(NULL);
+ if (!beacon_sub) {
+ /* No valid subnets */
+ return NULL;
+ }
+ }
- sub = &bt_mesh.sub[(i + next_idx) % ARRAY_SIZE(bt_mesh.sub)];
+ sub = beacon_sub;
+ do {
if (advertise_subnet(sub)) {
- next_idx = (next_idx + 1) % ARRAY_SIZE(bt_mesh.sub);
+ beacon_sub = sub;
return sub;
}
- }
+
+ sub = bt_mesh_subnet_next(sub);
+ } while (sub != beacon_sub);
+
+ /* No subnets to advertise on */
return NULL;
}
-static int sub_count(void)
+static int sub_count_cb(struct bt_mesh_subnet *sub, void *cb_data)
{
- int i, count = 0;
-
- for (i = 0; i < ARRAY_SIZE(bt_mesh.sub); i++) {
- struct bt_mesh_subnet *sub = &bt_mesh.sub[i];
+ int *count = cb_data;
- if (advertise_subnet(sub)) {
- count++;
- }
+ if (advertise_subnet(sub)) {
+ (*count)++;
}
+ return 0;
+}
+
+static int sub_count(void)
+{
+ int count = 0;
+
+ (void)bt_mesh_subnet_find(sub_count_cb, &count);
return count;
}
-static s32_t gatt_proxy_advertise(struct bt_mesh_subnet *sub)
+static int32_t gatt_proxy_advertise(struct bt_mesh_subnet *sub)
{
- s32_t remaining = K_FOREVER;
+ int32_t remaining = K_FOREVER;
int subnet_count;
BT_DBG("");
if (conn_count == CONFIG_BT_MAX_CONN) {
- BT_DBG("Connectable advertising deferred (max connections)");
- return remaining;
+ BT_DBG("Connectable advertising deferred (max connections %d)", conn_count);
+ return -ENOMEM;
}
+ sub = beacon_sub ? beacon_sub : bt_mesh_subnet_next(beacon_sub);
if (!sub) {
BT_WARN("No subnets to advertise on");
- return remaining;
+ return -ENOENT;
}
if (sub->node_id == BT_MESH_NODE_IDENTITY_RUNNING) {
- u32_t active = k_uptime_get_32() - sub->node_id_start;
+ uint32_t active = k_uptime_get_32() - sub->node_id_start;
if (active < NODE_ID_TIMEOUT) {
remaining = NODE_ID_TIMEOUT - active;
@@ -1231,7 +1269,7 @@ static s32_t gatt_proxy_advertise(struct bt_mesh_subnet *sub)
subnet_count = sub_count();
BT_DBG("sub_count %u", subnet_count);
if (subnet_count > 1) {
- s32_t max_timeout;
+ int32_t max_timeout;
/* We use NODE_ID_TIMEOUT as a starting point since it may
* be less than 60 seconds. Divide this period into at least
@@ -1249,6 +1287,8 @@ static s32_t gatt_proxy_advertise(struct bt_mesh_subnet *sub)
BT_DBG("Advertising %d ms for net_idx 0x%04x",
(int) remaining, sub->net_idx);
+ beacon_sub = bt_mesh_subnet_next(beacon_sub);
+
return remaining;
}
#endif /* GATT_PROXY */
@@ -1299,7 +1339,7 @@ static size_t gatt_prov_adv_create(struct bt_data prov_sd[2])
}
#endif /* PB_GATT */
-s32_t bt_mesh_proxy_adv_start(void)
+int32_t bt_mesh_proxy_adv_start(void)
{
BT_DBG("");
@@ -1361,6 +1401,19 @@ void bt_mesh_proxy_adv_stop(void)
}
}
+#if defined(CONFIG_BT_MESH_GATT_PROXY)
+static void subnet_evt(struct bt_mesh_subnet *sub, enum bt_mesh_key_evt evt)
+{
+ if (evt == BT_MESH_KEY_DELETED) {
+ if (sub == beacon_sub) {
+ beacon_sub = NULL;
+ }
+ } else {
+ bt_mesh_proxy_beacon_send(sub);
+ }
+}
+#endif
+
static void ble_mesh_handle_connect(struct ble_gap_event *event, void *arg)
{
#if MYNEWT_VAL(BLE_EXT_ADV)
@@ -1477,6 +1530,12 @@ int bt_mesh_proxy_init(void)
{
int i;
+#if (MYNEWT_VAL(BLE_MESH_GATT_PROXY))
+ if (!bt_mesh_subnet_cb_list[4]) {
+ bt_mesh_subnet_cb_list[4] = subnet_evt;
+ }
+#endif
+
for (i = 0; i < MYNEWT_VAL(BLE_MAX_CONNECTIONS); ++i) {
#if (MYNEWT_VAL(BLE_MESH_GATT_PROXY))
k_work_init(&clients[i].send_beacons, proxy_send_beacons);
@@ -1496,4 +1555,14 @@ int bt_mesh_proxy_init(void)
return 0;
}
+void bt_mesh_proxy_on_idle(struct bt_mesh_proxy_idle_cb *cb)
+{
+ if (!atomic_get(&pending_notifications)) {
+ cb->cb();
+ return;
+ }
+
+ sys_slist_append(&idle_waiters, &cb->n);
+}
+
#endif /* MYNEWT_VAL(BLE_MESH_PROXY) */
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/proxy.h b/src/libs/mynewt-nimble/nimble/host/mesh/src/proxy.h
index 64338a0a..ebade45a 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/src/proxy.h
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/proxy.h
@@ -15,8 +15,14 @@
#define BT_MESH_PROXY_PROV 0x03
#include "mesh/mesh.h"
+#include "mesh/slist.h"
-int bt_mesh_proxy_send(uint16_t conn_handle, u8_t type, struct os_mbuf *msg);
+struct bt_mesh_proxy_idle_cb {
+ sys_snode_t n;
+ void (*cb)(void);
+};
+
+int bt_mesh_proxy_send(uint16_t conn_handle, uint8_t type, struct os_mbuf *msg);
int bt_mesh_proxy_prov_enable(void);
int bt_mesh_proxy_prov_disable(bool disconnect);
@@ -29,16 +35,17 @@ void bt_mesh_proxy_beacon_send(struct bt_mesh_subnet *sub);
struct os_mbuf *bt_mesh_proxy_get_buf(void);
-s32_t bt_mesh_proxy_adv_start(void);
+int32_t bt_mesh_proxy_adv_start(void);
void bt_mesh_proxy_adv_stop(void);
void bt_mesh_proxy_identity_start(struct bt_mesh_subnet *sub);
void bt_mesh_proxy_identity_stop(struct bt_mesh_subnet *sub);
-bool bt_mesh_proxy_relay(struct os_mbuf *buf, u16_t dst);
-void bt_mesh_proxy_addr_add(struct os_mbuf *buf, u16_t addr);
+bool bt_mesh_proxy_relay(struct os_mbuf *buf, uint16_t dst);
+void bt_mesh_proxy_addr_add(struct os_mbuf *buf, uint16_t addr);
int bt_mesh_proxy_init(void);
+void bt_mesh_proxy_on_idle(struct bt_mesh_proxy_idle_cb *cb);
int ble_mesh_proxy_gap_event(struct ble_gap_event *event, void *arg);
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/rpl.c b/src/libs/mynewt-nimble/nimble/host/mesh/src/rpl.c
new file mode 100644
index 00000000..93c2e1a8
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/rpl.c
@@ -0,0 +1,162 @@
+/* Bluetooth Mesh */
+
+/*
+ * Copyright (c) 2017 Intel Corporation
+ * Copyright (c) 2020 Lingao Meng
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+#define MESH_LOG_MODULE BLE_MESH_RPL_LOG
+
+#include "log/log.h"
+
+#include "mesh_priv.h"
+#include "adv.h"
+#include "net.h"
+#include "rpl.h"
+#include "settings.h"
+
+static struct bt_mesh_rpl replay_list[MYNEWT_VAL(BLE_MESH_CRPL)];
+
+void bt_mesh_rpl_update(struct bt_mesh_rpl *rpl,
+ struct bt_mesh_net_rx *rx)
+{
+ rpl->src = rx->ctx.addr;
+ rpl->seq = rx->seq;
+ rpl->old_iv = rx->old_iv;
+
+ if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
+ bt_mesh_store_rpl(rpl);
+ }
+}
+
+/* Check the Replay Protection List for a replay attempt. If non-NULL match
+ * parameter is given the RPL slot is returned but it is not immediately
+ * updated (needed for segmented messages), whereas if a NULL match is given
+ * the RPL is immediately updated (used for unsegmented messages).
+ */
+bool bt_mesh_rpl_check(struct bt_mesh_net_rx *rx,
+ struct bt_mesh_rpl **match)
+{
+ int i;
+
+ /* Don't bother checking messages from ourselves */
+ if (rx->net_if == BT_MESH_NET_IF_LOCAL) {
+ return false;
+ }
+
+ /* The RPL is used only for the local node */
+ if (!rx->local_match) {
+ return false;
+ }
+
+ for (i = 0; i < ARRAY_SIZE(replay_list); i++) {
+ struct bt_mesh_rpl *rpl = &replay_list[i];
+
+ /* Empty slot */
+ if (!rpl->src) {
+ if (match) {
+ *match = rpl;
+ } else {
+ bt_mesh_rpl_update(rpl, rx);
+ }
+
+ return false;
+ }
+
+ /* Existing slot for given address */
+ if (rpl->src == rx->ctx.addr) {
+ if (rx->old_iv && !rpl->old_iv) {
+ return true;
+ }
+
+ if ((!rx->old_iv && rpl->old_iv) ||
+ rpl->seq < rx->seq) {
+ if (match) {
+ *match = rpl;
+ } else {
+ bt_mesh_rpl_update(rpl, rx);
+ }
+
+ return false;
+ } else {
+ return true;
+ }
+ }
+ }
+
+ BT_ERR("RPL is full!");
+ return true;
+}
+
+void bt_mesh_rpl_clear(void)
+{
+ BT_DBG("");
+
+ if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
+ bt_mesh_clear_rpl();
+ } else {
+ (void)memset(replay_list, 0, sizeof(replay_list));
+ }
+}
+
+struct bt_mesh_rpl *bt_mesh_rpl_find(uint16_t src)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(replay_list); i++) {
+ if (replay_list[i].src == src) {
+ return &replay_list[i];
+ }
+ }
+
+ return NULL;
+}
+
+struct bt_mesh_rpl *bt_mesh_rpl_alloc(uint16_t src)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(replay_list); i++) {
+ if (!replay_list[i].src) {
+ replay_list[i].src = src;
+ return &replay_list[i];
+ }
+ }
+
+ return NULL;
+}
+
+void bt_mesh_rpl_foreach(bt_mesh_rpl_func_t func, void *user_data)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(replay_list); i++) {
+ func(&replay_list[i], user_data);
+ }
+}
+
+void bt_mesh_rpl_reset(void)
+{
+ int i;
+
+ /* Discard "old old" IV Index entries from RPL and flag
+ * any other ones (which are valid) as old.
+ */
+ for (i = 0; i < ARRAY_SIZE(replay_list); i++) {
+ struct bt_mesh_rpl *rpl = &replay_list[i];
+
+ if (rpl->src) {
+ if (rpl->old_iv) {
+ (void)memset(rpl, 0, sizeof(*rpl));
+ } else {
+ rpl->old_iv = true;
+ }
+
+ if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
+ bt_mesh_store_rpl(rpl);
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/rpl.h b/src/libs/mynewt-nimble/nimble/host/mesh/src/rpl.h
new file mode 100644
index 00000000..0592712f
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/rpl.h
@@ -0,0 +1,30 @@
+/* Bluetooth Mesh */
+
+/*
+ * Copyright (c) 2017 Intel Corporation
+ * Copyright (c) 2020 Lingao Meng
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+struct bt_mesh_rpl {
+ uint16_t src;
+ bool old_iv;
+#if defined(CONFIG_BT_SETTINGS)
+ bool store;
+#endif
+ uint32_t seq;
+};
+
+typedef void (*bt_mesh_rpl_func_t)(struct bt_mesh_rpl *rpl,
+ void *user_data);
+
+void bt_mesh_rpl_reset(void);
+bool bt_mesh_rpl_check(struct bt_mesh_net_rx *rx,
+ struct bt_mesh_rpl **match);
+void bt_mesh_rpl_clear(void);
+struct bt_mesh_rpl *bt_mesh_rpl_find(uint16_t src);
+struct bt_mesh_rpl *bt_mesh_rpl_alloc(uint16_t src);
+void bt_mesh_rpl_foreach(bt_mesh_rpl_func_t func, void *user_data);
+void bt_mesh_rpl_update(struct bt_mesh_rpl *rpl,
+ struct bt_mesh_net_rx *rx); \ No newline at end of file
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/settings.c b/src/libs/mynewt-nimble/nimble/host/mesh/src/settings.c
index 88d9b302..537bd785 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/src/settings.c
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/settings.c
@@ -9,16 +9,23 @@
#if MYNEWT_VAL(BLE_MESH_SETTINGS)
+#include "mesh_priv.h"
#include "mesh/mesh.h"
#include "mesh/glue.h"
+#include "subnet.h"
+#include "app_keys.h"
#include "net.h"
+#include "rpl.h"
#include "crypto.h"
#include "transport.h"
+#include "heartbeat.h"
#include "access.h"
#include "foundation.h"
#include "proxy.h"
#include "settings.h"
-#include "nodes.h"
+#include "lpn.h"
+#include "cfg.h"
+
#include "config/config.h"
@@ -27,116 +34,155 @@
* bt_mesh_app_key and bt_mesh_subnet structs themselves, since once a key
* gets deleted its struct becomes invalid and may be reused for other keys.
*/
-static struct key_update {
- u16_t key_idx:12, /* AppKey or NetKey Index */
+struct key_update {
+ uint16_t key_idx:12, /* AppKey or NetKey Index */
valid:1, /* 1 if this entry is valid, 0 if not */
app_key:1, /* 1 if this is an AppKey, 0 if a NetKey */
clear:1; /* 1 if key needs clearing, 0 if storing */
-} key_updates[CONFIG_BT_MESH_APP_KEY_COUNT + CONFIG_BT_MESH_SUBNET_COUNT];
+};
+
+static struct key_update key_updates[CONFIG_BT_MESH_APP_KEY_COUNT +
+ CONFIG_BT_MESH_SUBNET_COUNT];
static struct k_delayed_work pending_store;
/* Mesh network storage information */
struct net_val {
- u16_t primary_addr;
- u8_t dev_key[16];
+ uint16_t primary_addr;
+ uint8_t dev_key[16];
} __packed;
/* Sequence number storage */
struct seq_val {
- u8_t val[3];
+ uint8_t val[3];
} __packed;
/* Heartbeat Publication storage */
struct hb_pub_val {
- u16_t dst;
- u8_t period;
- u8_t ttl;
- u16_t feat;
- u16_t net_idx:12,
+ uint16_t dst;
+ uint8_t period;
+ uint8_t ttl;
+ uint16_t feat;
+ uint16_t net_idx:12,
indefinite:1;
};
/* Miscelaneous configuration server model states */
struct cfg_val {
- u8_t net_transmit;
- u8_t relay;
- u8_t relay_retransmit;
- u8_t beacon;
- u8_t gatt_proxy;
- u8_t frnd;
- u8_t default_ttl;
+ uint8_t net_transmit;
+ uint8_t relay;
+ uint8_t relay_retransmit;
+ uint8_t beacon;
+ uint8_t gatt_proxy;
+ uint8_t frnd;
+ uint8_t default_ttl;
};
/* IV Index & IV Update storage */
struct iv_val {
- u32_t iv_index;
- u8_t iv_update:1,
+ uint32_t iv_index;
+ uint8_t iv_update:1,
iv_duration:7;
} __packed;
/* Replay Protection List storage */
struct rpl_val {
- u32_t seq:24,
+ uint32_t seq:24,
old_iv:1;
};
/* NetKey storage information */
struct net_key_val {
- u8_t kr_flag:1,
+ uint8_t kr_flag:1,
kr_phase:7;
- u8_t val[2][16];
+ uint8_t val[2][16];
} __packed;
/* AppKey storage information */
struct app_key_val {
- u16_t net_idx;
+ uint16_t net_idx;
bool updated;
- u8_t val[2][16];
+ uint8_t val[2][16];
} __packed;
struct mod_pub_val {
- u16_t addr;
- u16_t key;
- u8_t ttl;
- u8_t retransmit;
- u8_t period;
- u8_t period_div:4,
+ uint16_t addr;
+ uint16_t key;
+ uint8_t ttl;
+ uint8_t retransmit;
+ uint8_t period;
+ uint8_t period_div:4,
cred:1;
};
/* Virtual Address information */
struct va_val {
- u16_t ref;
- u16_t addr;
- u8_t uuid[16];
+ uint16_t ref;
+ uint16_t addr;
+ uint8_t uuid[16];
+} __packed;
+
+struct cdb_net_val {
+ uint32_t iv_index;
+ bool iv_update;
} __packed;
/* Node storage information */
struct node_val {
- u16_t net_idx;
- u8_t dev_key[16];
- u8_t num_elem;
+ uint16_t net_idx;
+ uint8_t num_elem;
+ uint8_t flags;
+#define F_NODE_CONFIGURED 0x01
+ uint8_t uuid[16];
+ uint8_t dev_key[16];
} __packed;
struct node_update {
- u16_t addr;
+ uint16_t addr;
bool clear;
};
-#if MYNEWT_VAL(BLE_MESH_PROVISIONER)
-static struct node_update node_updates[CONFIG_BT_MESH_NODE_COUNT];
+#if MYNEWT_VAL(BLE_MESH_CDB)
+static struct node_update cdb_node_updates[MYNEWT_VAL(BLE_MESH_CDB_NODE_COUNT)];
+static struct key_update cdb_key_updates[
+ MYNEWT_VAL(BLE_MESH_CDB_SUBNET_COUNT) +
+ MYNEWT_VAL(BLE_MESH_CDB_APP_KEY_COUNT)];
#else
-static struct node_update node_updates[0];
+static struct node_update cdb_node_updates[0];
+static struct key_update cdb_key_updates[0];
#endif
-/* We need this so we don't overwrite app-hardcoded values in case FCB
- * contains a history of changes but then has a NULL at the end.
- */
-static struct {
- bool valid;
- struct cfg_val cfg;
-} stored_cfg;
+int settings_name_next(char *name, char **next)
+{
+ int rc = 0;
+
+ if (next) {
+ *next = NULL;
+ }
+
+ if (!name) {
+ return 0;
+ }
+
+ /* name might come from flash directly, in flash the name would end
+ * with '=' or '\0' depending how storage is done. Flash reading is
+ * limited to what can be read
+ */
+ while ((*name != '\0') && (*name != '=') &&
+ (*name != '/')) {
+ rc++;
+ name++;
+ }
+
+ if (*name == '/') {
+ if (next) {
+ *next = name + 1;
+ }
+ return rc;
+ }
+
+ return rc;
+}
static int net_set(int argc, char **argv, char *val)
{
@@ -231,8 +277,7 @@ static int seq_set(int argc, char **argv, char *val)
return -EINVAL;
}
- bt_mesh.seq = ((u32_t)seq.val[0] | ((u32_t)seq.val[1] << 8) |
- ((u32_t)seq.val[2] << 16));
+ bt_mesh.seq = sys_get_le24(seq.val);
if (CONFIG_BT_MESH_SEQ_STORE_RATE > 0) {
/* Make sure we have a large enough sequence number. We
@@ -249,39 +294,12 @@ static int seq_set(int argc, char **argv, char *val)
return 0;
}
-static struct bt_mesh_rpl *rpl_find(u16_t src)
-{
- int i;
-
- for (i = 0; i < ARRAY_SIZE(bt_mesh.rpl); i++) {
- if (bt_mesh.rpl[i].src == src) {
- return &bt_mesh.rpl[i];
- }
- }
-
- return NULL;
-}
-
-static struct bt_mesh_rpl *rpl_alloc(u16_t src)
-{
- int i;
-
- for (i = 0; i < ARRAY_SIZE(bt_mesh.rpl); i++) {
- if (!bt_mesh.rpl[i].src) {
- bt_mesh.rpl[i].src = src;
- return &bt_mesh.rpl[i];
- }
- }
-
- return NULL;
-}
-
static int rpl_set(int argc, char **argv, char *val)
{
struct bt_mesh_rpl *entry;
struct rpl_val rpl;
int len, err;
- u16_t src;
+ uint16_t src;
if (argc < 1) {
BT_ERR("Invalid argc (%d)", argc);
@@ -291,7 +309,7 @@ static int rpl_set(int argc, char **argv, char *val)
BT_DBG("argv[0] %s val %s", argv[0], val ? val : "(null)");
src = strtol(argv[0], NULL, 16);
- entry = rpl_find(src);
+ entry = bt_mesh_rpl_find(src);
if (!val) {
if (entry) {
@@ -304,7 +322,7 @@ static int rpl_set(int argc, char **argv, char *val)
}
if (!entry) {
- entry = rpl_alloc(src);
+ entry = bt_mesh_rpl_alloc(src);
if (!entry) {
BT_ERR("Unable to allocate RPL entry for 0x%04x", src);
return -ENOMEM;
@@ -334,26 +352,13 @@ static int rpl_set(int argc, char **argv, char *val)
static int net_key_set(int argc, char **argv, char *val)
{
- struct bt_mesh_subnet *sub;
struct net_key_val key;
- int len, i, err;
- u16_t net_idx;
+ int len, err;
+ uint16_t net_idx;
BT_DBG("argv[0] %s val %s", argv[0], val ? val : "(null)");
net_idx = strtol(argv[0], NULL, 16);
- sub = bt_mesh_subnet_get(net_idx);
-
- if (!val) {
- if (!sub) {
- BT_ERR("No subnet with NetKeyIndex 0x%03x", net_idx);
- return -ENOENT;
- }
-
- BT_DBG("Deleting NetKeyIndex 0x%03x", net_idx);
- bt_mesh_subnet_del(sub, false);
- return 0;
- }
len = sizeof(key);
err = settings_bytes_from_str(val, &key, &len);
@@ -367,93 +372,41 @@ static int net_key_set(int argc, char **argv, char *val)
return -EINVAL;
}
- if (sub) {
- BT_DBG("Updating existing NetKeyIndex 0x%03x", net_idx);
-
- sub->kr_flag = key.kr_flag;
- sub->kr_phase = key.kr_phase;
- memcpy(sub->keys[0].net, &key.val[0], 16);
- memcpy(sub->keys[1].net, &key.val[1], 16);
-
- return 0;
- }
-
- for (i = 0; i < ARRAY_SIZE(bt_mesh.sub); i++) {
- if (bt_mesh.sub[i].net_idx == BT_MESH_KEY_UNUSED) {
- sub = &bt_mesh.sub[i];
- break;
- }
- }
-
- if (!sub) {
- BT_ERR("No space to allocate a new subnet");
- return -ENOMEM;
- }
-
- sub->net_idx = net_idx;
- sub->kr_flag = key.kr_flag;
- sub->kr_phase = key.kr_phase;
- memcpy(sub->keys[0].net, &key.val[0], 16);
- memcpy(sub->keys[1].net, &key.val[1], 16);
-
BT_DBG("NetKeyIndex 0x%03x recovered from storage", net_idx);
- return 0;
+ return bt_mesh_subnet_set(
+ net_idx, key.kr_phase, key.val[0],
+ (key.kr_phase != BT_MESH_KR_NORMAL) ? key.val[1] : NULL);
}
static int app_key_set(int argc, char **argv, char *val)
{
- struct bt_mesh_app_key *app;
struct app_key_val key;
- u16_t app_idx;
- int len, err;
+ uint16_t app_idx;
+ int len_rd, err;
BT_DBG("argv[0] %s val %s", argv[0], val ? val : "(null)");
app_idx = strtol(argv[0], NULL, 16);
+ len_rd = strtol(argv[1], NULL, 16);
- if (!val) {
- BT_DBG("Deleting AppKeyIndex 0x%03x", app_idx);
-
- app = bt_mesh_app_key_find(app_idx);
- if (app) {
- bt_mesh_app_key_del(app, false);
- }
-
+ if (!len_rd) {
return 0;
}
- len = sizeof(key);
- err = settings_bytes_from_str(val, &key, &len);
+ err = settings_bytes_from_str(val, &key, &len_rd);
if (err) {
BT_ERR("Failed to decode value %s (err %d)", val, err);
return err;
}
- if (len != sizeof(key)) {
- BT_ERR("Unexpected value length (%d != %zu)", len, sizeof(key));
- return -EINVAL;
- }
-
- app = bt_mesh_app_key_find(app_idx);
- if (!app) {
- app = bt_mesh_app_key_alloc(app_idx);
- }
-
- if (!app) {
- BT_ERR("No space for a new app key");
- return -ENOMEM;
+ err = bt_mesh_app_key_set(app_idx, key.net_idx, key.val[0],
+ key.updated ? key.val[1] : NULL);
+ if (err) {
+ BT_ERR("Failed to set \'app-key\'");
+ return err;
}
- app->net_idx = key.net_idx;
- app->app_idx = app_idx;
- app->updated = key.updated;
- memcpy(app->keys[0].val, key.val[0], 16);
- memcpy(app->keys[1].val, key.val[1], 16);
-
- bt_mesh_app_id(app->keys[0].val, &app->keys[0].id);
- bt_mesh_app_id(app->keys[1].val, &app->keys[1].id);
-
BT_DBG("AppKeyIndex 0x%03x recovered from storage", app_idx);
return 0;
@@ -461,27 +414,12 @@ static int app_key_set(int argc, char **argv, char *val)
static int hb_pub_set(int argc, char **argv, char *val)
{
- struct bt_mesh_hb_pub *pub = bt_mesh_hb_pub_get();
+ struct bt_mesh_hb_pub pub;
struct hb_pub_val hb_val;
int len, err;
BT_DBG("val %s", val ? val : "(null)");
- if (!pub) {
- return -ENOENT;
- }
-
- if (!val) {
- pub->dst = BT_MESH_ADDR_UNASSIGNED;
- pub->count = 0;
- pub->ttl = 0;
- pub->period = 0;
- pub->feat = 0;
-
- BT_DBG("Cleared heartbeat publication");
- return 0;
- }
-
len = sizeof(hb_val);
err = settings_bytes_from_str(val, &hb_val, &len);
if (err) {
@@ -495,18 +433,20 @@ static int hb_pub_set(int argc, char **argv, char *val)
return -EINVAL;
}
- pub->dst = hb_val.dst;
- pub->period = hb_val.period;
- pub->ttl = hb_val.ttl;
- pub->feat = hb_val.feat;
- pub->net_idx = hb_val.net_idx;
+ pub.dst = hb_val.dst;
+ pub.period = bt_mesh_hb_pwr2(hb_val.period);
+ pub.ttl = hb_val.ttl;
+ pub.feat = hb_val.feat;
+ pub.net_idx = hb_val.net_idx;
if (hb_val.indefinite) {
- pub->count = 0xffff;
+ pub.count = 0xffff;
} else {
- pub->count = 0;
+ pub.count = 0;
}
+ (void)bt_mesh_hb_pub_set(&pub);
+
BT_DBG("Restored heartbeat publication");
return 0;
@@ -514,35 +454,36 @@ static int hb_pub_set(int argc, char **argv, char *val)
static int cfg_set(int argc, char **argv, char *val)
{
- struct bt_mesh_cfg_srv *cfg = bt_mesh_cfg_get();
+ struct cfg_val cfg;
int len, err;
BT_DBG("val %s", val ? val : "(null)");
- if (!cfg) {
- return -ENOENT;
- }
-
if (!val) {
- stored_cfg.valid = false;
BT_DBG("Cleared configuration state");
return 0;
}
- len = sizeof(stored_cfg.cfg);
- err = settings_bytes_from_str(val, &stored_cfg.cfg, &len);
+ len = sizeof(cfg);
+ err = settings_bytes_from_str(val, &cfg, &len);
if (err) {
BT_ERR("Failed to decode value %s (err %d)", val, err);
return err;
}
- if (len != sizeof(stored_cfg.cfg)) {
+ if (len != sizeof(cfg)) {
BT_ERR("Unexpected value length (%d != %zu)", len,
- sizeof(stored_cfg.cfg));
+ sizeof(cfg));
return -EINVAL;
}
- stored_cfg.valid = true;
+ bt_mesh_net_transmit_set(cfg.net_transmit);
+ bt_mesh_relay_set(cfg.relay, cfg.relay_retransmit);
+ bt_mesh_beacon_set(cfg.beacon);
+ bt_mesh_gatt_proxy_set(cfg.gatt_proxy);
+ bt_mesh_friend_set(cfg.frnd);
+ bt_mesh_default_ttl_set(cfg.default_ttl);
+
BT_DBG("Restored configuration state");
return 0;
@@ -646,11 +587,25 @@ static int mod_set_pub(struct bt_mesh_model *mod, char *val)
return 0;
}
+static int mod_data_set(struct bt_mesh_model *mod,
+ char *name, char *len_rd)
+{
+ char *next;
+
+ settings_name_next(name, &next);
+
+ if (mod->cb && mod->cb->settings_set) {
+ return mod->cb->settings_set(mod, next, len_rd);
+ }
+
+ return 0;
+}
+
static int mod_set(bool vnd, int argc, char **argv, char *val)
{
struct bt_mesh_model *mod;
- u8_t elem_idx, mod_idx;
- u16_t mod_key;
+ uint8_t elem_idx, mod_idx;
+ uint16_t mod_key;
if (argc < 2) {
BT_ERR("Too small argc (%d)", argc);
@@ -684,11 +639,7 @@ static int mod_set(bool vnd, int argc, char **argv, char *val)
}
if (!strcmp(argv[1], "data")) {
- mod->flags |= BT_MESH_MOD_DATA_PRESENT;
-
- if (mod->cb && mod->cb->settings_set) {
- return mod->cb->settings_set(mod, val);
- }
+ return mod_data_set(mod, argv[1], val);
}
BT_WARN("Unknown module key %s", argv[1]);
@@ -709,8 +660,8 @@ static int vnd_mod_set(int argc, char **argv, char *val)
static int va_set(int argc, char **argv, char *val)
{
struct va_val va;
- struct label *lab;
- u16_t index;
+ struct bt_mesh_va *lab;
+ uint16_t index;
int len, err;
if (argc < 1) {
@@ -741,7 +692,7 @@ static int va_set(int argc, char **argv, char *val)
return 0;
}
- lab = get_label(index);
+ lab = bt_mesh_va_get(index);
if (lab == NULL) {
BT_WARN("Out of labels buffers");
return -ENOBUFS;
@@ -758,12 +709,35 @@ static int va_set(int argc, char **argv, char *val)
}
#endif
-#if MYNEWT_VAL(BLE_MESH_PROVISIONER)
-static int node_set(int argc, char **argv, char *str)
+#if MYNEWT_VAL(BLE_MESH_CDB)
+static int cdb_net_set(int argc, char *val)
+{
+ struct cdb_net_val net;
+ int len, err;
+
+ len = sizeof(net);
+ err = settings_bytes_from_str(val, &net, &len);
+ if (err) {
+ BT_ERR("Failed to set \'cdb_net\'");
+ return err;
+ }
+
+ bt_mesh_cdb.iv_index = net.iv_index;
+
+ if (net.iv_update) {
+ atomic_set_bit(bt_mesh_cdb.flags, BT_MESH_CDB_IVU_IN_PROGRESS);
+ }
+
+ atomic_set_bit(bt_mesh_cdb.flags, BT_MESH_CDB_VALID);
+
+ return 0;
+}
+
+static int cdb_node_set(int argc, char *str)
{
- struct bt_mesh_node *node;
+ struct bt_mesh_cdb_node *node;
struct node_val val;
- u16_t addr;
+ uint16_t addr;
int len, err;
if (argc < 1) {
@@ -771,15 +745,16 @@ static int node_set(int argc, char **argv, char *str)
return -ENOENT;
}
- addr = strtol(argv[0], NULL, 16);
+ addr = strtol(str, NULL, 16);
+ len = sizeof(str);
- if (str == NULL) {
+ if (argc < 1) {
BT_DBG("val (null)");
BT_DBG("Deleting node 0x%04x", addr);
- node = bt_mesh_node_find(addr);
+ node = bt_mesh_cdb_node_get(addr);
if (node) {
- bt_mesh_node_del(node, false);
+ bt_mesh_cdb_node_del(node, false);
}
return 0;
@@ -796,9 +771,10 @@ static int node_set(int argc, char **argv, char *str)
return -EINVAL;
}
- node = bt_mesh_node_find(addr);
+ node = bt_mesh_cdb_node_get(addr);
if (!node) {
- node = bt_mesh_node_alloc(addr, val.num_elem, val.net_idx);
+ node = bt_mesh_cdb_node_alloc(val.uuid, addr, val.num_elem,
+ val.net_idx);
}
if (!node) {
@@ -806,12 +782,163 @@ static int node_set(int argc, char **argv, char *str)
return -ENOMEM;
}
- memcpy(node->dev_key, &val.dev_key, 16);
+ if (val.flags & F_NODE_CONFIGURED) {
+ atomic_set_bit(node->flags, BT_MESH_CDB_NODE_CONFIGURED);
+ }
+
+ memcpy(node->uuid, val.uuid, 16);
+ memcpy(node->dev_key, val.dev_key, 16);
BT_DBG("Node 0x%04x recovered from storage", addr);
return 0;
}
+
+static int cdb_subnet_set(int argc, char *name)
+{
+ struct bt_mesh_cdb_subnet *sub;
+ struct net_key_val key;
+ uint16_t net_idx;
+ int len, len_rd, err;
+
+ if (!name) {
+ BT_ERR("Insufficient number of arguments");
+ return -ENOENT;
+ }
+
+ len_rd = sizeof(sub);
+ net_idx = strtol(name, NULL, 16);
+ sub = bt_mesh_cdb_subnet_get(net_idx);
+
+ if (len_rd == 0) {
+ BT_DBG("val (null)");
+ if (!sub) {
+ BT_ERR("No subnet with NetKeyIndex 0x%03x", net_idx);
+ return -ENOENT;
+ }
+
+ BT_DBG("Deleting NetKeyIndex 0x%03x", net_idx);
+ bt_mesh_cdb_subnet_del(sub, false);
+ return 0;
+ }
+
+ len = sizeof(key);
+ err = settings_bytes_from_str(name, &key, &len);
+ if (err) {
+ BT_ERR("Failed to set \'net-key\'");
+ return err;
+ }
+
+ if (sub) {
+ BT_DBG("Updating existing NetKeyIndex 0x%03x", net_idx);
+
+ sub->kr_flag = key.kr_flag;
+ sub->kr_phase = key.kr_phase;
+ memcpy(sub->keys[0].net_key, &key.val[0], 16);
+ memcpy(sub->keys[1].net_key, &key.val[1], 16);
+
+ return 0;
+ }
+
+ sub = bt_mesh_cdb_subnet_alloc(net_idx);
+ if (!sub) {
+ BT_ERR("No space to allocate a new subnet");
+ return -ENOMEM;
+ }
+
+ sub->kr_flag = key.kr_flag;
+ sub->kr_phase = key.kr_phase;
+ memcpy(sub->keys[0].net_key, &key.val[0], 16);
+ memcpy(sub->keys[1].net_key, &key.val[1], 16);
+
+ BT_DBG("NetKeyIndex 0x%03x recovered from storage", net_idx);
+
+ return 0;
+}
+
+static int cdb_app_key_set(int argc, char *name)
+{
+ struct bt_mesh_cdb_app_key *app;
+ struct app_key_val key;
+ uint16_t app_idx;
+ int len_rd, err;
+
+ app_idx = strtol(name, NULL, 16);
+ len_rd = sizeof(key);
+
+ if (len_rd == 0) {
+ BT_DBG("val (null)");
+ BT_DBG("Deleting AppKeyIndex 0x%03x", app_idx);
+
+ app = bt_mesh_cdb_app_key_get(app_idx);
+ if (app) {
+ bt_mesh_cdb_app_key_del(app, false);
+ }
+
+ return 0;
+ }
+
+ err = settings_bytes_from_str(name, &key, &len_rd);
+ if (err) {
+ BT_ERR("Failed to set \'app-key\'");
+ return err;
+ }
+
+ app = bt_mesh_cdb_app_key_get(app_idx);
+ if (!app) {
+ app = bt_mesh_cdb_app_key_alloc(key.net_idx, app_idx);
+ }
+
+ if (!app) {
+ BT_ERR("No space for a new app key");
+ return -ENOMEM;
+ }
+
+ memcpy(app->keys[0].app_key, key.val[0], 16);
+ memcpy(app->keys[1].app_key, key.val[1], 16);
+
+ BT_DBG("AppKeyIndex 0x%03x recovered from storage", app_idx);
+
+ return 0;
+}
+
+static int cdb_set(int argc, char **argv, char *name)
+{
+ int len;
+ char *next;
+
+ if (argc < 1) {
+ BT_ERR("Insufficient number of arguments");
+ return -ENOENT;
+ }
+
+ if (!strcmp(name, "Net")) {
+ return cdb_net_set(1, name);
+ }
+
+
+ len = settings_name_next(name, &next);
+
+ if (!next) {
+ BT_ERR("Insufficient number of arguments");
+ return -ENOENT;
+ }
+
+ if (!strncmp(name, "Node", len)) {
+ return cdb_node_set(1, next);
+ }
+
+ if (!strncmp(name, "Subnet", len)) {
+ return cdb_subnet_set(1, next);
+ }
+
+ if (!strncmp(name, "AppKey", len)) {
+ return cdb_app_key_set(1, next);
+ }
+
+ BT_WARN("Unknown module key %s", name);
+ return -ENOENT;
+}
#endif
const struct mesh_setting {
@@ -831,8 +958,8 @@ const struct mesh_setting {
#if CONFIG_BT_MESH_LABEL_COUNT > 0
{ "Va", va_set },
#endif
-#if MYNEWT_VAL(BLE_MESH_PROVISIONER)
- { "Node", node_set },
+#if MYNEWT_VAL(BLE_MESH_CDB)
+ { "cdb", cdb_set },
#endif
};
@@ -861,43 +988,12 @@ static int mesh_set(int argc, char **argv, char *val)
return -ENOENT;
}
-static int subnet_init(struct bt_mesh_subnet *sub)
-{
- int err;
-
- err = bt_mesh_net_keys_create(&sub->keys[0], sub->keys[0].net);
- if (err) {
- BT_ERR("Unable to generate keys for subnet");
- return -EIO;
- }
-
- if (sub->kr_phase != BT_MESH_KR_NORMAL) {
- err = bt_mesh_net_keys_create(&sub->keys[1], sub->keys[1].net);
- if (err) {
- BT_ERR("Unable to generate keys for subnet");
- memset(&sub->keys[0], 0, sizeof(sub->keys[0]));
- return -EIO;
- }
- }
-
- if (IS_ENABLED(CONFIG_BT_MESH_GATT_PROXY)) {
- sub->node_id = BT_MESH_NODE_IDENTITY_STOPPED;
- } else {
- sub->node_id = BT_MESH_NODE_IDENTITY_NOT_SUPPORTED;
- }
-
- /* Make sure we have valid beacon data to be sent */
- bt_mesh_net_beacon_update(sub);
-
- return 0;
-}
-
static void commit_mod(struct bt_mesh_model *mod, struct bt_mesh_elem *elem,
bool vnd, bool primary, void *user_data)
{
if (mod->pub && mod->pub->update &&
mod->pub->addr != BT_MESH_ADDR_UNASSIGNED) {
- s32_t ms = bt_mesh_model_pub_period_get(mod);
+ int32_t ms = bt_mesh_model_pub_period_get(mod);
if (ms) {
BT_DBG("Starting publish timer (period %u ms)",
(unsigned) ms);
@@ -905,20 +1001,20 @@ static void commit_mod(struct bt_mesh_model *mod, struct bt_mesh_elem *elem,
}
}
- if (mod->cb && mod->cb->settings_commit) {
- mod->cb->settings_commit(mod);
+ if (!IS_ENABLED(CONFIG_BT_MESH_LOW_POWER)) {
+ return;
+ }
+
+ for (int i = 0; i < ARRAY_SIZE(mod->groups); i++) {
+ if (mod->groups[i] != BT_MESH_ADDR_UNASSIGNED) {
+ bt_mesh_lpn_group_add(mod->groups[i]);
+ }
}
}
static int mesh_commit(void)
{
- struct bt_mesh_hb_pub *hb_pub;
- struct bt_mesh_cfg_srv *cfg;
- int i;
-
- BT_DBG("sub[0].net_idx 0x%03x", bt_mesh.sub[0].net_idx);
-
- if (bt_mesh.sub[0].net_idx == BT_MESH_KEY_UNUSED) {
+ if (!bt_mesh_subnet_next(NULL)) {
/* Nothing to do since we're not yet provisioned */
return 0;
}
@@ -927,47 +1023,15 @@ static int mesh_commit(void)
bt_mesh_proxy_prov_disable(true);
}
- for (i = 0; i < ARRAY_SIZE(bt_mesh.sub); i++) {
- struct bt_mesh_subnet *sub = &bt_mesh.sub[i];
- int err;
-
- if (sub->net_idx == BT_MESH_KEY_UNUSED) {
- continue;
- }
-
- err = subnet_init(sub);
- if (err) {
- BT_ERR("Failed to init subnet 0x%03x", sub->net_idx);
- }
- }
-
if (bt_mesh.ivu_duration < BT_MESH_IVU_MIN_HOURS) {
k_delayed_work_submit(&bt_mesh.ivu_timer, BT_MESH_IVU_TIMEOUT);
}
bt_mesh_model_foreach(commit_mod, NULL);
- hb_pub = bt_mesh_hb_pub_get();
- if (hb_pub && hb_pub->dst != BT_MESH_ADDR_UNASSIGNED &&
- hb_pub->count && hb_pub->period) {
- BT_DBG("Starting heartbeat publication");
- k_work_submit(&hb_pub->timer.work);
- }
-
- cfg = bt_mesh_cfg_get();
- if (cfg && stored_cfg.valid) {
- cfg->net_transmit = stored_cfg.cfg.net_transmit;
- cfg->relay = stored_cfg.cfg.relay;
- cfg->relay_retransmit = stored_cfg.cfg.relay_retransmit;
- cfg->beacon = stored_cfg.cfg.beacon;
- cfg->gatt_proxy = stored_cfg.cfg.gatt_proxy;
- cfg->frnd = stored_cfg.cfg.frnd;
- cfg->default_ttl = stored_cfg.cfg.default_ttl;
- }
-
atomic_set_bit(bt_mesh.flags, BT_MESH_VALID);
- bt_mesh_net_start();
+ bt_mesh_start();
return 0;
}
@@ -981,12 +1045,11 @@ static int mesh_commit(void)
#define GENERIC_PENDING_BITS (BIT(BT_MESH_KEYS_PENDING) | \
BIT(BT_MESH_HB_PUB_PENDING) | \
BIT(BT_MESH_CFG_PENDING) | \
- BIT(BT_MESH_MOD_PENDING) | \
- BIT(BT_MESH_NODES_PENDING))
+ BIT(BT_MESH_MOD_PENDING))
static void schedule_store(int flag)
{
- s32_t timeout, remaining;
+ int32_t timeout, remaining;
atomic_set_bit(bt_mesh.flags, flag);
@@ -1112,9 +1175,7 @@ static void store_pending_seq(void)
char *str;
int err;
- seq.val[0] = bt_mesh.seq;
- seq.val[1] = bt_mesh.seq >> 8;
- seq.val[2] = bt_mesh.seq >> 16;
+ sys_put_le24(bt_mesh.seq, seq.val);
str = settings_str_from_bytes(&seq, sizeof(seq), buf, sizeof(buf));
if (!str) {
@@ -1172,69 +1233,54 @@ static void store_rpl(struct bt_mesh_rpl *entry)
}
}
-static void clear_rpl(void)
+static void clear_rpl(struct bt_mesh_rpl *rpl, void *user_data)
{
- int i, err;
-
- BT_DBG("");
-
- for (i = 0; i < ARRAY_SIZE(bt_mesh.rpl); i++) {
- struct bt_mesh_rpl *rpl = &bt_mesh.rpl[i];
- char path[18];
-
- if (!rpl->src) {
- continue;
- }
+ int err;
+ char path[18];
- snprintk(path, sizeof(path), "bt_mesh/RPL/%x", rpl->src);
- err = settings_save_one(path, NULL);
- if (err) {
- BT_ERR("Failed to clear RPL");
- } else {
- BT_DBG("Cleared RPL");
- }
+ if (!rpl->src) {
+ return;
+ }
- memset(rpl, 0, sizeof(*rpl));
+ snprintk(path, sizeof(path), "bt/mesh/RPL/%x", rpl->src);
+ err = settings_save_one(path, NULL);
+ if (err) {
+ BT_ERR("Failed to clear RPL");
+ } else {
+ BT_DBG("Cleared RPL");
}
+
+ (void)memset(rpl, 0, sizeof(*rpl));
}
-static void store_pending_rpl(void)
+static void store_pending_rpl(struct bt_mesh_rpl *rpl, void *user_data)
{
- int i;
-
BT_DBG("");
- for (i = 0; i < ARRAY_SIZE(bt_mesh.rpl); i++) {
- struct bt_mesh_rpl *rpl = &bt_mesh.rpl[i];
-
- if (rpl->store) {
- rpl->store = false;
- store_rpl(rpl);
- }
+ if (rpl->store) {
+ rpl->store = false;
+ store_rpl(rpl);
}
}
static void store_pending_hb_pub(void)
{
char buf[BT_SETTINGS_SIZE(sizeof(struct hb_pub_val))];
- struct bt_mesh_hb_pub *pub = bt_mesh_hb_pub_get();
+ struct bt_mesh_hb_pub pub;
struct hb_pub_val val;
char *str;
int err;
- if (!pub) {
- return;
- }
-
- if (pub->dst == BT_MESH_ADDR_UNASSIGNED) {
+ bt_mesh_hb_pub_get(&pub);
+ if (pub.dst == BT_MESH_ADDR_UNASSIGNED) {
str = NULL;
} else {
- val.indefinite = (pub->count == 0xffff);
- val.dst = pub->dst;
- val.period = pub->period;
- val.ttl = pub->ttl;
- val.feat = pub->feat;
- val.net_idx = pub->net_idx;
+ val.indefinite = (pub.count == 0xffff);
+ val.dst = pub.dst;
+ val.period = bt_mesh_hb_log(pub.period);
+ val.ttl = pub.ttl;
+ val.feat = pub.feat;
+ val.net_idx = pub.net_idx;
str = settings_str_from_bytes(&val, sizeof(val),
buf, sizeof(buf));
@@ -1257,22 +1303,17 @@ static void store_pending_hb_pub(void)
static void store_pending_cfg(void)
{
char buf[BT_SETTINGS_SIZE(sizeof(struct cfg_val))];
- struct bt_mesh_cfg_srv *cfg = bt_mesh_cfg_get();
struct cfg_val val;
char *str;
int err;
- if (!cfg) {
- return;
- }
-
- val.net_transmit = cfg->net_transmit;
- val.relay = cfg->relay;
- val.relay_retransmit = cfg->relay_retransmit;
- val.beacon = cfg->beacon;
- val.gatt_proxy = cfg->gatt_proxy;
- val.frnd = cfg->frnd;
- val.default_ttl = cfg->default_ttl;
+ val.net_transmit = bt_mesh_net_transmit_get();
+ val.relay = bt_mesh_relay_get();
+ val.relay_retransmit = bt_mesh_relay_retransmit_get();
+ val.beacon = bt_mesh_beacon_enabled();
+ val.gatt_proxy = bt_mesh_gatt_proxy_get();
+ val.frnd = bt_mesh_friend_get();
+ val.default_ttl = bt_mesh_default_ttl_get();
str = settings_str_from_bytes(&val, sizeof(val), buf, sizeof(buf));
if (!str) {
@@ -1301,7 +1342,7 @@ static void clear_cfg(void)
}
}
-static void clear_app_key(u16_t app_idx)
+static void clear_app_key(uint16_t app_idx)
{
char path[20];
int err;
@@ -1317,7 +1358,7 @@ static void clear_app_key(u16_t app_idx)
}
}
-static void clear_net_key(u16_t net_idx)
+static void clear_net_key(uint16_t net_idx)
{
char path[20];
int err;
@@ -1333,31 +1374,36 @@ static void clear_net_key(u16_t net_idx)
}
}
-static void store_net_key(struct bt_mesh_subnet *sub)
+static void store_subnet(uint16_t net_idx)
{
- char buf[BT_SETTINGS_SIZE(sizeof(struct net_key_val))];
+ const struct bt_mesh_subnet *sub;
struct net_key_val key;
+ char buf[BT_SETTINGS_SIZE(sizeof(struct app_key_val))];
char path[20];
char *str;
int err;
- BT_DBG("NetKeyIndex 0x%03x NetKey %s", sub->net_idx,
- bt_hex(sub->keys[0].net, 16));
+ sub = bt_mesh_subnet_get(net_idx);
+ if (!sub) {
+ BT_WARN("NetKeyIndex 0x%03x not found", net_idx);
+ return;
+ }
+
+ BT_DBG("NetKeyIndex 0x%03x", net_idx);
+
+ snprintk(path, sizeof(path), "bt/mesh/NetKey/%x", net_idx);
memcpy(&key.val[0], sub->keys[0].net, 16);
memcpy(&key.val[1], sub->keys[1].net, 16);
- key.kr_flag = sub->kr_flag;
+ key.kr_flag = 0U; /* Deprecated */
key.kr_phase = sub->kr_phase;
str = settings_str_from_bytes(&key, sizeof(key), buf, sizeof(buf));
if (!str) {
- BT_ERR("Unable to encode NetKey as value");
+ BT_ERR("Unable to encode AppKey as value");
return;
}
- snprintk(path, sizeof(path), "bt_mesh/NetKey/%x", sub->net_idx);
-
- BT_DBG("Saving NetKey %s as value %s", path, str);
err = settings_save_one(path, str);
if (err) {
BT_ERR("Failed to store NetKey");
@@ -1366,16 +1412,26 @@ static void store_net_key(struct bt_mesh_subnet *sub)
}
}
-static void store_app_key(struct bt_mesh_app_key *app)
+static void store_app(uint16_t app_idx)
{
+ const struct bt_mesh_app_key *app;
char buf[BT_SETTINGS_SIZE(sizeof(struct app_key_val))];
struct app_key_val key;
char path[20];
char *str;
int err;
- key.net_idx = app->net_idx;
- key.updated = app->updated;
+ snprintk(path, sizeof(path), "bt/mesh/AppKey/%x", app_idx);
+
+ app = bt_mesh_app_key_get(app_idx);
+ if (!app) {
+ BT_WARN("ApKeyIndex 0x%03x not found", app_idx);
+ return;
+ }
+
+ key.net_idx = app->net_idx,
+ key.updated = app->updated,
+
memcpy(key.val[0], app->keys[0].val, 16);
memcpy(key.val[1], app->keys[1].val, 16);
@@ -1414,47 +1470,71 @@ static void store_pending_keys(void)
clear_net_key(update->key_idx);
}
} else {
- if (update->app_key) {
- struct bt_mesh_app_key *key;
+ store_subnet(update->key_idx);
+ }
- key = bt_mesh_app_key_find(update->key_idx);
- if (key) {
- store_app_key(key);
- } else {
- BT_WARN("AppKeyIndex 0x%03x not found",
- update->key_idx);
- }
+ update->valid = 0;
+ }
+}
- } else {
- struct bt_mesh_subnet *sub;
+static void clear_cdb(void)
+{
+ int err;
- sub = bt_mesh_subnet_get(update->key_idx);
- if (sub) {
- store_net_key(sub);
- } else {
- BT_WARN("NetKeyIndex 0x%03x not found",
- update->key_idx);
- }
- }
- }
+ err = settings_save_one("bt/mesh/cdb/Net", NULL);
+ if (err) {
+ BT_ERR("Failed to clear Network");
+ } else {
+ BT_DBG("Cleared Network");
+ }
+}
- update->valid = 0;
+static void store_pending_cdb(void)
+{
+ char buf[BT_SETTINGS_SIZE(sizeof(struct cdb_net_val))];
+ struct cdb_net_val net;
+ int err;
+ char *str;
+
+ BT_DBG("");
+
+ net.iv_index = bt_mesh_cdb.iv_index;
+ net.iv_update = atomic_test_bit(bt_mesh_cdb.flags,
+ BT_MESH_CDB_IVU_IN_PROGRESS);
+
+ str = settings_str_from_bytes(&net, sizeof(net), buf, sizeof(buf));
+ if (!str) {
+ BT_ERR("Unable to encode Network as value");
+ return;
+ }
+ err = settings_save_one("bt/mesh/cdb/Net", str);
+ if (err) {
+ BT_ERR("Failed to store Network value");
+ } else {
+ BT_DBG("Stored Network value");
}
}
-static void store_node(struct bt_mesh_node *node)
+static void store_cdb_node(const struct bt_mesh_cdb_node *node)
{
char buf[BT_SETTINGS_SIZE(sizeof(struct node_val))];
struct node_val val;
- char path[20];
+ char path[30];
char *str;
int err;
val.net_idx = node->net_idx;
val.num_elem = node->num_elem;
+ val.flags = 0;
+
+ if (atomic_test_bit(node->flags, BT_MESH_CDB_NODE_CONFIGURED)) {
+ val.flags |= F_NODE_CONFIGURED;
+ }
+
+ memcpy(val.uuid, node->uuid, 16);
memcpy(val.dev_key, node->dev_key, 16);
- snprintk(path, sizeof(path), "bt_mesh/Node/%x", node->addr);
+ snprintk(path, sizeof(path), "bt/mesh/cdb/Node/%x", node->addr);
str = settings_str_from_bytes(&val, sizeof(val), buf, sizeof(buf));
if (!str) {
@@ -1471,14 +1551,14 @@ static void store_node(struct bt_mesh_node *node)
}
}
-static void clear_node(u16_t addr)
+static void clear_cdb_node(uint16_t addr)
{
- char path[20];
+ char path[30];
int err;
BT_DBG("Node 0x%04x", addr);
- snprintk(path, sizeof(path), "bt_mesh/Node/%x", addr);
+ snprintk(path, sizeof(path), "bt/mesh/cdb/Node/%x", addr);
err = settings_save_one(path, NULL);
if (err) {
BT_ERR("Failed to clear Node 0x%04x", addr);
@@ -1487,25 +1567,27 @@ static void clear_node(u16_t addr)
}
}
-static void store_pending_nodes(void)
+static void store_pending_cdb_nodes(void)
{
int i;
- for (i = 0; i < ARRAY_SIZE(node_updates); ++i) {
- struct node_update *update = &node_updates[i];
+ for (i = 0; i < ARRAY_SIZE(cdb_node_updates); ++i) {
+ struct node_update *update = &cdb_node_updates[i];
if (update->addr == BT_MESH_ADDR_UNASSIGNED) {
continue;
}
+ BT_DBG("addr: 0x%04x, clear: %d", update->addr, update->clear);
+
if (update->clear) {
- clear_node(update->addr);
+ clear_cdb_node(update->addr);
} else {
- struct bt_mesh_node *node;
+ struct bt_mesh_cdb_node *node;
- node = bt_mesh_node_find(update->addr);
+ node = bt_mesh_cdb_node_get(update->addr);
if (node) {
- store_node(node);
+ store_cdb_node(node);
} else {
BT_WARN("Node 0x%04x not found", update->addr);
}
@@ -1515,8 +1597,139 @@ static void store_pending_nodes(void)
}
}
-static struct node_update *node_update_find(u16_t addr,
- struct node_update **free_slot)
+static void store_cdb_subnet(const struct bt_mesh_cdb_subnet *sub)
+{
+ char buf[BT_SETTINGS_SIZE(sizeof(struct net_key_val))];
+ struct net_key_val key;
+ char path[30];
+ int err;
+ char *str;
+
+ BT_DBG("NetKeyIndex 0x%03x NetKey %s", sub->net_idx,
+ bt_hex(sub->keys[0].net_key, 16));
+
+ memcpy(&key.val[0], sub->keys[0].net_key, 16);
+ memcpy(&key.val[1], sub->keys[1].net_key, 16);
+ key.kr_flag = sub->kr_flag;
+ key.kr_phase = sub->kr_phase;
+
+ snprintk(path, sizeof(path), "bt/mesh/cdb/Subnet/%x", sub->net_idx);
+
+
+ str = settings_str_from_bytes(&key, sizeof(key), buf, sizeof(buf));
+ if (!str) {
+ BT_ERR("Unable to encode Subnet as value");
+ return;
+ }
+ err = settings_save_one(path, str);
+ if (err) {
+ BT_ERR("Failed to store Subnet value");
+ } else {
+ BT_DBG("Stored Subnet value");
+ }
+}
+
+static void clear_cdb_subnet(uint16_t net_idx)
+{
+ char path[30];
+ int err;
+
+ BT_DBG("NetKeyIndex 0x%03x", net_idx);
+
+ snprintk(path, sizeof(path), "bt/mesh/cdb/Subnet/%x", net_idx);
+ err = settings_save_one(path, NULL);
+ if (err) {
+ BT_ERR("Failed to clear NetKeyIndex 0x%03x", net_idx);
+ } else {
+ BT_DBG("Cleared NetKeyIndex 0x%03x", net_idx);
+ }
+}
+
+static void store_cdb_app_key(const struct bt_mesh_cdb_app_key *app)
+{
+ char buf[BT_SETTINGS_SIZE(sizeof(struct app_key_val))];
+ struct app_key_val key;
+ char path[30];
+ int err;
+ char *str;
+
+ key.net_idx = app->net_idx;
+ key.updated = false;
+ memcpy(key.val[0], app->keys[0].app_key, 16);
+ memcpy(key.val[1], app->keys[1].app_key, 16);
+
+ snprintk(path, sizeof(path), "bt/mesh/cdb/AppKey/%x", app->app_idx);
+
+ str = settings_str_from_bytes(&key, sizeof(key), buf, sizeof(buf));
+ err = settings_save_one(path, str);
+ if (err) {
+ BT_ERR("Failed to store AppKey");
+ } else {
+ BT_DBG("Stored AppKey");
+ }
+}
+
+static void clear_cdb_app_key(uint16_t app_idx)
+{
+ char path[30];
+ int err;
+
+ snprintk(path, sizeof(path), "bt/mesh/cdb/AppKey/%x", app_idx);
+ err = settings_save_one(path, NULL);
+ if (err) {
+ BT_ERR("Failed to clear AppKeyIndex 0x%03x", app_idx);
+ } else {
+ BT_DBG("Cleared AppKeyIndex 0x%03x", app_idx);
+ }
+}
+
+static void store_pending_cdb_keys(void)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(cdb_key_updates); i++) {
+ struct key_update *update = &cdb_key_updates[i];
+
+ if (!update->valid) {
+ continue;
+ }
+
+ if (update->clear) {
+ if (update->app_key) {
+ clear_cdb_app_key(update->key_idx);
+ } else {
+ clear_cdb_subnet(update->key_idx);
+ }
+ } else {
+ if (update->app_key) {
+ struct bt_mesh_cdb_app_key *key;
+
+ key = bt_mesh_cdb_app_key_get(update->key_idx);
+ if (key) {
+ store_cdb_app_key(key);
+ } else {
+ BT_WARN("AppKeyIndex 0x%03x not found",
+ update->key_idx);
+ }
+ } else {
+ struct bt_mesh_cdb_subnet *sub;
+
+ sub = bt_mesh_cdb_subnet_get(update->key_idx);
+ if (sub) {
+ store_cdb_subnet(sub);
+ } else {
+ BT_WARN("NetKeyIndex 0x%03x not found",
+ update->key_idx);
+ }
+ }
+ }
+
+ update->valid = 0U;
+ }
+}
+
+static struct node_update *cdb_node_update_find(uint16_t addr,
+ struct node_update **free_slot)
{
struct node_update *match;
int i;
@@ -1524,8 +1737,8 @@ static struct node_update *node_update_find(u16_t addr,
match = NULL;
*free_slot = NULL;
- for (i = 0; i < ARRAY_SIZE(node_updates); i++) {
- struct node_update *update = &node_updates[i];
+ for (i = 0; i < ARRAY_SIZE(cdb_node_updates); i++) {
+ struct node_update *update = &cdb_node_updates[i];
if (update->addr == BT_MESH_ADDR_UNASSIGNED) {
*free_slot = update;
@@ -1543,7 +1756,7 @@ static struct node_update *node_update_find(u16_t addr,
static void encode_mod_path(struct bt_mesh_model *mod, bool vnd,
const char *key, char *path, size_t path_len)
{
- u16_t mod_key = (((u16_t)mod->elem_idx << 8) | mod->mod_idx);
+ uint16_t mod_key = (((uint16_t)mod->elem_idx << 8) | mod->mod_idx);
if (vnd) {
snprintk(path, path_len, "bt_mesh/v/%x/%s", mod_key, key);
@@ -1554,7 +1767,7 @@ static void encode_mod_path(struct bt_mesh_model *mod, bool vnd,
static void store_pending_mod_bind(struct bt_mesh_model *mod, bool vnd)
{
- u16_t keys[CONFIG_BT_MESH_MODEL_KEY_COUNT];
+ uint16_t keys[CONFIG_BT_MESH_MODEL_KEY_COUNT];
char buf[BT_SETTINGS_SIZE(sizeof(keys))];
char path[20];
int i, count, err;
@@ -1590,7 +1803,7 @@ static void store_pending_mod_bind(struct bt_mesh_model *mod, bool vnd)
static void store_pending_mod_sub(struct bt_mesh_model *mod, bool vnd)
{
- u16_t groups[CONFIG_BT_MESH_MODEL_GROUP_COUNT];
+ uint16_t groups[CONFIG_BT_MESH_MODEL_GROUP_COUNT];
char buf[BT_SETTINGS_SIZE(sizeof(groups))];
char path[20];
int i, count, err;
@@ -1690,19 +1903,20 @@ static void store_pending_mod(struct bt_mesh_model *mod,
static void store_pending_va(void)
{
char buf[BT_SETTINGS_SIZE(sizeof(struct va_val))];
- struct label *lab;
+ struct bt_mesh_va *lab;
struct va_val va;
char path[18];
char *val;
- u16_t i;
+ uint16_t i;
int err = 0;
- for (i = 0; (lab = get_label(i)) != NULL; i++) {
- if (!atomic_test_and_clear_bit(lab->flags,
- BT_MESH_VA_CHANGED)) {
+ for (i = 0; (lab = bt_mesh_va_get(i)) != NULL; i++) {
+ if (!lab->changed) {
continue;
}
+ lab->changed = 0U;
+
snprintk(path, sizeof(path), "bt_mesh/Va/%x", i);
if (IS_VA_DEL(lab)) {
@@ -1738,9 +1952,9 @@ static void store_pending(struct ble_npl_event *work)
if (atomic_test_and_clear_bit(bt_mesh.flags, BT_MESH_RPL_PENDING)) {
if (atomic_test_bit(bt_mesh.flags, BT_MESH_VALID)) {
- store_pending_rpl();
+ bt_mesh_rpl_foreach(store_pending_rpl, NULL);
} else {
- clear_rpl();
+ bt_mesh_rpl_foreach(clear_rpl, NULL);
}
}
@@ -1788,9 +2002,26 @@ static void store_pending(struct ble_npl_event *work)
store_pending_va();
}
- if (IS_ENABLED(CONFIG_BT_MESH_PROVISIONER) &&
- atomic_test_and_clear_bit(bt_mesh.flags, BT_MESH_NODES_PENDING)) {
- store_pending_nodes();
+ if (IS_ENABLED(CONFIG_BT_MESH_CDB)) {
+ if (atomic_test_and_clear_bit(bt_mesh_cdb.flags,
+ BT_MESH_CDB_SUBNET_PENDING)) {
+ if (atomic_test_bit(bt_mesh_cdb.flags,
+ BT_MESH_CDB_VALID)) {
+ store_pending_cdb();
+ } else {
+ clear_cdb();
+ }
+ }
+
+ if (atomic_test_and_clear_bit(bt_mesh_cdb.flags,
+ BT_MESH_CDB_NODES_PENDING)) {
+ store_pending_cdb_nodes();
+ }
+
+ if (atomic_test_and_clear_bit(bt_mesh_cdb.flags,
+ BT_MESH_CDB_KEYS_PENDING)) {
+ store_pending_cdb_keys();
+ }
}
}
@@ -1800,7 +2031,7 @@ void bt_mesh_store_rpl(struct bt_mesh_rpl *entry)
schedule_store(BT_MESH_RPL_PENDING);
}
-static struct key_update *key_update_find(bool app_key, u16_t key_idx,
+static struct key_update *key_update_find(bool app_key, uint16_t key_idx,
struct key_update **free_slot)
{
struct key_update *match;
@@ -1829,13 +2060,13 @@ static struct key_update *key_update_find(bool app_key, u16_t key_idx,
return match;
}
-void bt_mesh_store_subnet(struct bt_mesh_subnet *sub)
+void bt_mesh_store_subnet(uint16_t net_idx)
{
struct key_update *update, *free_slot;
- BT_DBG("NetKeyIndex 0x%03x", sub->net_idx);
+ BT_DBG("NetKeyIndex 0x%03x", net_idx);
- update = key_update_find(false, sub->net_idx, &free_slot);
+ update = key_update_find(false, net_idx, &free_slot);
if (update) {
update->clear = 0;
schedule_store(BT_MESH_KEYS_PENDING);
@@ -1843,25 +2074,25 @@ void bt_mesh_store_subnet(struct bt_mesh_subnet *sub)
}
if (!free_slot) {
- store_net_key(sub);
+ store_subnet(net_idx);
return;
}
free_slot->valid = 1;
- free_slot->key_idx = sub->net_idx;
+ free_slot->key_idx = net_idx;
free_slot->app_key = 0;
free_slot->clear = 0;
schedule_store(BT_MESH_KEYS_PENDING);
}
-void bt_mesh_store_app_key(struct bt_mesh_app_key *key)
+void bt_mesh_store_app_key(uint16_t app_idx)
{
struct key_update *update, *free_slot;
- BT_DBG("AppKeyIndex 0x%03x", key->app_idx);
+ BT_DBG("AppKeyIndex 0x%03x", app_idx);
- update = key_update_find(true, key->app_idx, &free_slot);
+ update = key_update_find(true, app_idx, &free_slot);
if (update) {
update->clear = 0;
schedule_store(BT_MESH_KEYS_PENDING);
@@ -1869,12 +2100,12 @@ void bt_mesh_store_app_key(struct bt_mesh_app_key *key)
}
if (!free_slot) {
- store_app_key(key);
+ store_app(app_idx);
return;
}
free_slot->valid = 1;
- free_slot->key_idx = key->app_idx;
+ free_slot->key_idx = app_idx;
free_slot->app_key = 1;
free_slot->clear = 0;
@@ -1898,13 +2129,13 @@ void bt_mesh_clear_net(void)
schedule_store(BT_MESH_CFG_PENDING);
}
-void bt_mesh_clear_subnet(struct bt_mesh_subnet *sub)
+void bt_mesh_clear_subnet(uint16_t net_idx)
{
struct key_update *update, *free_slot;
- BT_DBG("NetKeyIndex 0x%03x", sub->net_idx);
+ BT_DBG("NetKeyIndex 0x%03x", net_idx);
- update = key_update_find(false, sub->net_idx, &free_slot);
+ update = key_update_find(false, net_idx, &free_slot);
if (update) {
update->clear = 1;
schedule_store(BT_MESH_KEYS_PENDING);
@@ -1912,25 +2143,25 @@ void bt_mesh_clear_subnet(struct bt_mesh_subnet *sub)
}
if (!free_slot) {
- clear_net_key(sub->net_idx);
+ clear_net_key(net_idx);
return;
}
free_slot->valid = 1;
- free_slot->key_idx = sub->net_idx;
+ free_slot->key_idx = net_idx;
free_slot->app_key = 0;
free_slot->clear = 1;
schedule_store(BT_MESH_KEYS_PENDING);
}
-void bt_mesh_clear_app_key(struct bt_mesh_app_key *key)
+void bt_mesh_clear_app_key(uint16_t app_idx)
{
struct key_update *update, *free_slot;
- BT_DBG("AppKeyIndex 0x%03x", key->app_idx);
+ BT_DBG("AppKeyIndex 0x%03x", app_idx);
- update = key_update_find(true, key->app_idx, &free_slot);
+ update = key_update_find(true, app_idx, &free_slot);
if (update) {
update->clear = 1;
schedule_store(BT_MESH_KEYS_PENDING);
@@ -1938,12 +2169,12 @@ void bt_mesh_clear_app_key(struct bt_mesh_app_key *key)
}
if (!free_slot) {
- clear_app_key(key->app_idx);
+ clear_app_key(app_idx);
return;
}
free_slot->valid = 1;
- free_slot->key_idx = key->app_idx;
+ free_slot->key_idx = app_idx;
free_slot->app_key = 1;
free_slot->clear = 1;
@@ -1979,64 +2210,215 @@ void bt_mesh_store_label(void)
schedule_store(BT_MESH_VA_PENDING);
}
-void bt_mesh_store_node(struct bt_mesh_node *node)
+static void schedule_cdb_store(int flag)
+{
+ atomic_set_bit(bt_mesh_cdb.flags, flag);
+ k_delayed_work_submit(&pending_store, K_NO_WAIT);
+}
+
+void bt_mesh_store_cdb(void)
+{
+ schedule_cdb_store(BT_MESH_CDB_SUBNET_PENDING);
+}
+
+void bt_mesh_store_cdb_node(const struct bt_mesh_cdb_node *node)
{
struct node_update *update, *free_slot;
BT_DBG("Node 0x%04x", node->addr);
- update = node_update_find(node->addr, &free_slot);
+ update = cdb_node_update_find(node->addr, &free_slot);
if (update) {
update->clear = false;
- schedule_store(BT_MESH_NODES_PENDING);
+ schedule_cdb_store(BT_MESH_CDB_NODES_PENDING);
return;
}
if (!free_slot) {
- store_node(node);
+ store_cdb_node(node);
return;
}
free_slot->addr = node->addr;
+ free_slot->clear = false;
- schedule_store(BT_MESH_NODES_PENDING);
+ schedule_cdb_store(BT_MESH_CDB_NODES_PENDING);
}
-void bt_mesh_clear_node(struct bt_mesh_node *node)
+void bt_mesh_clear_cdb_node(struct bt_mesh_cdb_node *node)
{
struct node_update *update, *free_slot;
BT_DBG("Node 0x%04x", node->addr);
- update = node_update_find(node->addr, &free_slot);
+ update = cdb_node_update_find(node->addr, &free_slot);
if (update) {
update->clear = true;
- schedule_store(BT_MESH_NODES_PENDING);
+ schedule_cdb_store(BT_MESH_CDB_NODES_PENDING);
return;
}
if (!free_slot) {
- clear_node(node->addr);
+ clear_cdb_node(node->addr);
return;
}
free_slot->addr = node->addr;
+ free_slot->clear = true;
+
+ schedule_cdb_store(BT_MESH_CDB_NODES_PENDING);
+}
+
+/* TODO: Could be shared with key_update_find? */
+static struct key_update *cdb_key_update_find(bool app_key, uint16_t key_idx,
+ struct key_update **free_slot)
+{
+ struct key_update *match;
+ int i;
+
+ match = NULL;
+ *free_slot = NULL;
+
+ for (i = 0; i < ARRAY_SIZE(cdb_key_updates); i++) {
+ struct key_update *update = &cdb_key_updates[i];
+
+ if (!update->valid) {
+ *free_slot = update;
+ continue;
+ }
+
+ if (update->app_key != app_key) {
+ continue;
+ }
+
+ if (update->key_idx == key_idx) {
+ match = update;
+ }
+ }
- schedule_store(BT_MESH_NODES_PENDING);
+ return match;
+}
+
+void bt_mesh_store_cdb_subnet(const struct bt_mesh_cdb_subnet *sub)
+{
+ struct key_update *update, *free_slot;
+
+ BT_DBG("NetKeyIndex 0x%03x", sub->net_idx);
+
+ update = cdb_key_update_find(false, sub->net_idx, &free_slot);
+ if (update) {
+ update->clear = 0U;
+ schedule_cdb_store(BT_MESH_CDB_KEYS_PENDING);
+ return;
+ }
+
+ if (!free_slot) {
+ store_cdb_subnet(sub);
+ return;
+ }
+
+ free_slot->valid = 1U;
+ free_slot->key_idx = sub->net_idx;
+ free_slot->app_key = 0U;
+ free_slot->clear = 0U;
+
+ schedule_cdb_store(BT_MESH_CDB_KEYS_PENDING);
+}
+
+void bt_mesh_clear_cdb_subnet(struct bt_mesh_cdb_subnet *sub)
+{
+ struct key_update *update, *free_slot;
+
+ BT_DBG("NetKeyIndex 0x%03x", sub->net_idx);
+
+ update = cdb_key_update_find(false, sub->net_idx, &free_slot);
+ if (update) {
+ update->clear = 1U;
+ schedule_cdb_store(BT_MESH_CDB_KEYS_PENDING);
+ return;
+ }
+
+ if (!free_slot) {
+ clear_cdb_subnet(sub->net_idx);
+ return;
+ }
+
+ free_slot->valid = 1U;
+ free_slot->key_idx = sub->net_idx;
+ free_slot->app_key = 0U;
+ free_slot->clear = 1U;
+
+ schedule_cdb_store(BT_MESH_CDB_KEYS_PENDING);
+}
+
+void bt_mesh_store_cdb_app_key(const struct bt_mesh_cdb_app_key *key)
+{
+ struct key_update *update, *free_slot;
+
+ BT_DBG("AppKeyIndex 0x%03x", key->app_idx);
+
+ update = cdb_key_update_find(true, key->app_idx, &free_slot);
+ if (update) {
+ update->clear = 0U;
+ schedule_cdb_store(BT_MESH_CDB_KEYS_PENDING);
+ return;
+ }
+
+ if (!free_slot) {
+ store_cdb_app_key(key);
+ return;
+ }
+
+ free_slot->valid = 1U;
+ free_slot->key_idx = key->app_idx;
+ free_slot->app_key = 1U;
+ free_slot->clear = 0U;
+
+ schedule_cdb_store(BT_MESH_CDB_KEYS_PENDING);
+}
+
+void bt_mesh_clear_cdb_app_key(struct bt_mesh_cdb_app_key *key)
+{
+ struct key_update *update, *free_slot;
+
+ BT_DBG("AppKeyIndex 0x%03x", key->app_idx);
+
+ update = cdb_key_update_find(true, key->app_idx, &free_slot);
+ if (update) {
+ update->clear = 1U;
+ schedule_cdb_store(BT_MESH_CDB_KEYS_PENDING);
+ return;
+ }
+
+ if (!free_slot) {
+ clear_cdb_app_key(key->app_idx);
+ return;
+ }
+
+ free_slot->valid = 1U;
+ free_slot->key_idx = key->app_idx;
+ free_slot->app_key = 1U;
+ free_slot->clear = 1U;
+
+ schedule_cdb_store(BT_MESH_CDB_KEYS_PENDING);
}
int bt_mesh_model_data_store(struct bt_mesh_model *mod, bool vnd,
- const void *data, size_t data_len)
+ const char *name, const void *data,
+ size_t data_len)
{
- char path[20];
+ char path[30];
char buf[BT_SETTINGS_SIZE(sizeof(struct mod_pub_val))];
char *val;
int err;
encode_mod_path(mod, vnd, "data", path, sizeof(path));
+ if (name) {
+ strcat(path, "/");
+ strncat(path, name, 8);
+ }
if (data_len) {
- mod->flags |= BT_MESH_MOD_DATA_PRESENT;
val = settings_str_from_bytes(data, data_len,
buf, sizeof(buf));
if (!val) {
@@ -2044,12 +2426,8 @@ int bt_mesh_model_data_store(struct bt_mesh_model *mod, bool vnd,
return -EINVAL;
}
err = settings_save_one(path, val);
- } else if (mod->flags & BT_MESH_MOD_DATA_PRESENT) {
- mod->flags &= ~BT_MESH_MOD_DATA_PRESENT;
- err = settings_save_one(path, NULL);
} else {
- /* Nothing to delete */
- err = 0;
+ err = settings_save_one(path, NULL);
}
if (err) {
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/settings.h b/src/libs/mynewt-nimble/nimble/host/mesh/src/settings.h
index c630814e..9060a14a 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/src/settings.h
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/settings.h
@@ -8,20 +8,25 @@ void bt_mesh_store_net(void);
void bt_mesh_store_iv(bool only_duration);
void bt_mesh_store_seq(void);
void bt_mesh_store_rpl(struct bt_mesh_rpl *rpl);
-void bt_mesh_store_subnet(struct bt_mesh_subnet *sub);
-void bt_mesh_store_app_key(struct bt_mesh_app_key *key);
+void bt_mesh_store_subnet(uint16_t net_idx);
+void bt_mesh_store_app_key(uint16_t app_idx);
void bt_mesh_store_hb_pub(void);
void bt_mesh_store_cfg(void);
void bt_mesh_store_mod_bind(struct bt_mesh_model *mod);
void bt_mesh_store_mod_sub(struct bt_mesh_model *mod);
void bt_mesh_store_mod_pub(struct bt_mesh_model *mod);
void bt_mesh_store_label(void);
-void bt_mesh_store_node(struct bt_mesh_node *node);
+void bt_mesh_store_cdb(void);
+void bt_mesh_store_cdb_node(const struct bt_mesh_cdb_node *node);
+void bt_mesh_store_cdb_subnet(const struct bt_mesh_cdb_subnet *sub);
+void bt_mesh_store_cdb_app_key(const struct bt_mesh_cdb_app_key *app);
void bt_mesh_clear_net(void);
-void bt_mesh_clear_subnet(struct bt_mesh_subnet *sub);
-void bt_mesh_clear_app_key(struct bt_mesh_app_key *key);
+void bt_mesh_clear_subnet(uint16_t net_idx);
+void bt_mesh_clear_app_key(uint16_t app_idx);
void bt_mesh_clear_rpl(void);
-void bt_mesh_clear_node(struct bt_mesh_node *node);
+void bt_mesh_clear_cdb_node(struct bt_mesh_cdb_node *node);
+void bt_mesh_clear_cdb_subnet(struct bt_mesh_cdb_subnet *sub);
+void bt_mesh_clear_cdb_app_key(struct bt_mesh_cdb_app_key *app);
void bt_mesh_settings_init(void);
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/shell.c b/src/libs/mynewt-nimble/nimble/host/mesh/src/shell.c
index 91fbd978..d597ed6d 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/src/shell.c
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/shell.c
@@ -25,6 +25,7 @@
/* Private includes for raw Network & Transport layer access */
#include "net.h"
+#include "rpl.h"
#include "access.h"
#include "mesh_priv.h"
#include "lpn.h"
@@ -55,50 +56,29 @@ static struct os_eventq mesh_shell_queue;
#define VND_MODEL_ID_1 0x1234
/* Default net, app & dev key values, unless otherwise specified */
-static const u8_t default_key[16] = {
+static const uint8_t default_key[16] = {
0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
};
static struct {
- u16_t local;
- u16_t dst;
- u16_t net_idx;
- u16_t app_idx;
+ uint16_t local;
+ uint16_t dst;
+ uint16_t net_idx;
+ uint16_t app_idx;
} net = {
.local = BT_MESH_ADDR_UNASSIGNED,
.dst = BT_MESH_ADDR_UNASSIGNED,
};
-static struct bt_mesh_cfg_srv cfg_srv = {
- .relay = BT_MESH_RELAY_DISABLED,
- .beacon = BT_MESH_BEACON_ENABLED,
-#if MYNEWT_VAL(BLE_MESH_FRIEND)
- .frnd = BT_MESH_FRIEND_DISABLED,
-#else
- .frnd = BT_MESH_FRIEND_NOT_SUPPORTED,
-#endif
-#if MYNEWT_VAL(BLE_MESH_GATT_PROXY)
- .gatt_proxy = BT_MESH_GATT_PROXY_DISABLED,
-#else
- .gatt_proxy = BT_MESH_GATT_PROXY_NOT_SUPPORTED,
-#endif
-
- .default_ttl = 7,
-
- /* 3 transmissions with 20ms interval */
- .net_transmit = BT_MESH_TRANSMIT(2, 20),
- .relay_retransmit = BT_MESH_TRANSMIT(2, 20),
-};
-
#define CUR_FAULTS_MAX 4
-static u8_t cur_faults[CUR_FAULTS_MAX];
-static u8_t reg_faults[CUR_FAULTS_MAX * 2];
+static uint8_t cur_faults[CUR_FAULTS_MAX];
+static uint8_t reg_faults[CUR_FAULTS_MAX * 2];
-static void get_faults(u8_t *faults, u8_t faults_size, u8_t *dst, u8_t *count)
+static void get_faults(uint8_t *faults, uint8_t faults_size, uint8_t *dst, uint8_t *count)
{
- u8_t i, limit = *count;
+ uint8_t i, limit = *count;
for (i = 0, *count = 0; i < faults_size && *count < limit; i++) {
if (faults[i]) {
@@ -108,8 +88,8 @@ static void get_faults(u8_t *faults, u8_t faults_size, u8_t *dst, u8_t *count)
}
}
-static int fault_get_cur(struct bt_mesh_model *model, u8_t *test_id,
- u16_t *company_id, u8_t *faults, u8_t *fault_count)
+static int fault_get_cur(struct bt_mesh_model *model, uint8_t *test_id,
+ uint16_t *company_id, uint8_t *faults, uint8_t *fault_count)
{
printk("Sending current faults\n");
@@ -121,8 +101,8 @@ static int fault_get_cur(struct bt_mesh_model *model, u8_t *test_id,
return 0;
}
-static int fault_get_reg(struct bt_mesh_model *model, u16_t cid,
- u8_t *test_id, u8_t *faults, u8_t *fault_count)
+static int fault_get_reg(struct bt_mesh_model *model, uint16_t cid,
+ uint8_t *test_id, uint8_t *faults, uint8_t *fault_count)
{
if (cid != CID_VENDOR) {
printk("Faults requested for unknown Company ID 0x%04x\n", cid);
@@ -189,7 +169,7 @@ static struct bt_mesh_cfg_cli cfg_cli = {
#endif /* MYNEWT_VAL(BLE_MESH_CFG_CLI) */
#if MYNEWT_VAL(BLE_MESH_HEALTH_CLI)
-void show_faults(u8_t test_id, u16_t cid, u8_t *faults, size_t fault_count)
+void show_faults(uint8_t test_id, uint16_t cid, uint8_t *faults, size_t fault_count)
{
size_t i;
@@ -207,8 +187,8 @@ void show_faults(u8_t test_id, u16_t cid, u8_t *faults, size_t fault_count)
}
}
-static void health_current_status(struct bt_mesh_health_cli *cli, u16_t addr,
- u8_t test_id, u16_t cid, u8_t *faults,
+static void health_current_status(struct bt_mesh_health_cli *cli, uint16_t addr,
+ uint8_t test_id, uint16_t cid, uint8_t *faults,
size_t fault_count)
{
printk("Health Current Status from 0x%04x\n", addr);
@@ -242,22 +222,22 @@ static struct bt_mesh_light_lightness_srv light_lightness_srv = {
.set = light_model_light_lightness_set,
};
-void bt_mesh_set_gen_onoff_srv_cb(int (*get)(struct bt_mesh_model *model, u8_t *state),
- int (*set)(struct bt_mesh_model *model, u8_t state))
+void bt_mesh_set_gen_onoff_srv_cb(int (*get)(struct bt_mesh_model *model, uint8_t *state),
+ int (*set)(struct bt_mesh_model *model, uint8_t state))
{
gen_onoff_srv.get = get;
gen_onoff_srv.set = set;
}
-void bt_mesh_set_gen_level_srv_cb(int (*get)(struct bt_mesh_model *model, s16_t *level),
- int (*set)(struct bt_mesh_model *model, s16_t level))
+void bt_mesh_set_gen_level_srv_cb(int (*get)(struct bt_mesh_model *model, int16_t *level),
+ int (*set)(struct bt_mesh_model *model, int16_t level))
{
gen_level_srv.get = get;
gen_level_srv.set = set;
}
-void bt_mesh_set_light_lightness_srv_cb(int (*get)(struct bt_mesh_model *model, s16_t *level),
- int (*set)(struct bt_mesh_model *model, s16_t level))
+void bt_mesh_set_light_lightness_srv_cb(int (*get)(struct bt_mesh_model *model, int16_t *level),
+ int (*set)(struct bt_mesh_model *model, int16_t level))
{
light_lightness_srv.get = get;
light_lightness_srv.set = set;
@@ -265,7 +245,7 @@ void bt_mesh_set_light_lightness_srv_cb(int (*get)(struct bt_mesh_model *model,
#endif
static struct bt_mesh_model root_models[] = {
- BT_MESH_MODEL_CFG_SRV(&cfg_srv),
+ BT_MESH_MODEL_CFG_SRV,
BT_MESH_MODEL_HEALTH_SRV(&health_srv, &health_pub),
#if MYNEWT_VAL(BLE_MESH_CFG_CLI)
BT_MESH_MODEL_CFG_CLI(&cfg_cli),
@@ -297,7 +277,7 @@ static const struct bt_mesh_comp comp = {
.elem_count = ARRAY_SIZE(elements),
};
-static u8_t hex2val(char c)
+static uint8_t hex2val(char c)
{
if (c >= '0' && c <= '9') {
return c - '0';
@@ -310,7 +290,54 @@ static u8_t hex2val(char c)
}
}
-static size_t hex2bin(const char *hex, u8_t *bin, size_t bin_len)
+int char2hex(char c, uint8_t *x)
+{
+ if (c >= '0' && c <= '9') {
+ *x = c - '0';
+ } else if (c >= 'a' && c <= 'f') {
+ *x = c - 'a' + 10;
+ } else if (c >= 'A' && c <= 'F') {
+ *x = c - 'A' + 10;
+ } else {
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+int hex2char(uint8_t x, char *c)
+{
+ if (x <= 9) {
+ *c = x + '0';
+ } else if (x <= 15) {
+ *c = x - 10 + 'a';
+ } else {
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+size_t bin2hex(const uint8_t *buf, size_t buflen, char *hex, size_t hexlen)
+{
+ if ((hexlen + 1) < buflen * 2) {
+ return 0;
+ }
+
+ for (size_t i = 0; i < buflen; i++) {
+ if (hex2char(buf[i] >> 4, &hex[2 * i]) < 0) {
+ return 0;
+ }
+ if (hex2char(buf[i] & 0xf, &hex[2 * i + 1]) < 0) {
+ return 0;
+ }
+ }
+
+ hex[2 * buflen] = '\0';
+ return 2 * buflen;
+}
+
+static size_t hex2bin(const char *hex, uint8_t *bin, size_t bin_len)
{
size_t len = 0;
@@ -328,7 +355,7 @@ static size_t hex2bin(const char *hex, u8_t *bin, size_t bin_len)
return len;
}
-static void prov_complete(u16_t net_idx, u16_t addr)
+static void prov_complete(uint16_t net_idx, uint16_t addr)
{
printk("Local node provisioned, net_idx 0x%04x address 0x%04x\n",
net_idx, addr);
@@ -337,7 +364,8 @@ static void prov_complete(u16_t net_idx, u16_t addr)
net.dst = addr;
}
-static void prov_node_added(u16_t net_idx, u16_t addr, u8_t num_elem)
+static void prov_node_added(uint16_t net_idx, uint8_t uuid[16], uint16_t addr,
+ uint8_t num_elem)
{
printk("Node provisioned, net_idx 0x%04x address "
"0x%04x elements %d", net_idx, addr, num_elem);
@@ -369,7 +397,7 @@ static int output_string(const char *str)
}
static bt_mesh_input_action_t input_act;
-static u8_t input_size;
+static uint8_t input_size;
static int cmd_input_num(int argc, char *argv[])
{
@@ -437,7 +465,7 @@ struct shell_cmd_help cmd_input_str_help = {
NULL, "<string>", NULL
};
-static int input(bt_mesh_input_action_t act, u8_t size)
+static int input(bt_mesh_input_action_t act, uint8_t size)
{
switch (act) {
case BT_MESH_ENTER_NUMBER:
@@ -481,9 +509,9 @@ static void link_close(bt_mesh_prov_bearer_t bearer)
printk("Provisioning link closed on %s\n", bearer2str(bearer));
}
-static u8_t dev_uuid[16] = MYNEWT_VAL(BLE_MESH_DEV_UUID);
+static uint8_t dev_uuid[16] = MYNEWT_VAL(BLE_MESH_DEV_UUID);
-static u8_t static_val[16];
+static uint8_t static_val[16];
static struct bt_mesh_prov prov = {
.uuid = dev_uuid,
@@ -534,7 +562,7 @@ struct shell_cmd_help cmd_static_oob_help = {
static int cmd_uuid(int argc, char *argv[])
{
- u8_t uuid[16];
+ uint8_t uuid[16];
size_t len;
if (argc < 2) {
@@ -560,12 +588,38 @@ struct shell_cmd_help cmd_uuid_help = {
static int cmd_reset(int argc, char *argv[])
{
- bt_mesh_reset();
- printk("Local node reset complete\n");
+ uint16_t addr;
+ if (argc < 2) {
+ return -EINVAL;
+ }
+
+ addr = strtoul(argv[1], NULL, 0);
+
+ if (addr == net.local) {
+ bt_mesh_reset();
+ printk("Local node reset complete");
+ } else {
+ int err;
+ bool reset = false;
+
+ err = bt_mesh_cfg_node_reset(net.net_idx, net.dst, &reset);
+ if (err) {
+ printk("Unable to send "
+ "Remote Node Reset (err %d)", err);
+ return 0;
+ }
+
+ printk("Remote node reset complete");
+ }
+
return 0;
}
-static u8_t str2u8(const char *str)
+struct shell_cmd_help cmd_reset_help = {
+ NULL, "<addr>", NULL
+};
+
+static uint8_t str2u8(const char *str)
{
if (isdigit(str[0])) {
return strtoul(str, NULL, 0);
@@ -631,7 +685,7 @@ static int cmd_poll(int argc, char *argv[])
return 0;
}
-static void lpn_cb(u16_t friend_addr, bool established)
+static void lpn_cb(uint16_t friend_addr, bool established)
{
if (established) {
printk("Friendship (as LPN) established to Friend 0x%04x\n",
@@ -784,8 +838,6 @@ static int cmd_net_send(int argc, char *argv[])
struct bt_mesh_net_tx tx = {
.ctx = &ctx,
.src = net.local,
- .xmit = bt_mesh_net_transmit_get(),
- .sub = bt_mesh_subnet_get(net.net_idx),
};
size_t len;
int err = 0;
@@ -795,12 +847,6 @@ static int cmd_net_send(int argc, char *argv[])
goto done;
}
- if (!tx.sub) {
- printk("No matching subnet for NetKey Index 0x%04x\n",
- net.net_idx);
- goto done;
- }
-
net_buf_simple_init(msg, 0);
len = hex2bin(argv[1], msg->om_data, net_buf_simple_tailroom(msg) - 4);
net_buf_simple_add(msg, len);
@@ -828,7 +874,7 @@ static int cmd_rpl_clear(int argc, char *argv[])
#if MYNEWT_VAL(BLE_MESH_LOW_POWER)
static int cmd_lpn_subscribe(int argc, char *argv[])
{
- u16_t address;
+ uint16_t address;
if (argc < 2) {
return -EINVAL;
@@ -849,7 +895,7 @@ struct shell_cmd_help cmd_lpn_subscribe_help = {
static int cmd_lpn_unsubscribe(int argc, char *argv[])
{
- u16_t address;
+ uint16_t address;
if (argc < 2) {
return -EINVAL;
@@ -912,7 +958,7 @@ struct shell_cmd_help cmd_iv_update_test_help = {
int cmd_timeout(int argc, char *argv[])
{
- s32_t timeout;
+ int32_t timeout;
if (argc < 2) {
timeout = bt_mesh_cfg_cli_timeout_get();
@@ -952,7 +998,7 @@ struct shell_cmd_help cmd_timeout_help = {
static int cmd_get_comp(int argc, char *argv[])
{
struct os_mbuf *comp = NET_BUF_SIMPLE(32);
- u8_t status, page = 0x00;
+ uint8_t status, page = 0x00;
int err = 0;
if (argc > 1) {
@@ -980,8 +1026,8 @@ static int cmd_get_comp(int argc, char *argv[])
printk("\tFeatures 0x%04x\n", net_buf_simple_pull_le16(comp));
while (comp->om_len > 4) {
- u8_t sig, vnd;
- u16_t loc;
+ uint8_t sig, vnd;
+ uint16_t loc;
int i;
loc = net_buf_simple_pull_le16(comp);
@@ -1002,7 +1048,7 @@ static int cmd_get_comp(int argc, char *argv[])
}
for (i = 0; i < sig; i++) {
- u16_t mod_id = net_buf_simple_pull_le16(comp);
+ uint16_t mod_id = net_buf_simple_pull_le16(comp);
printk("\t\t\t0x%04x\n", mod_id);
}
@@ -1014,8 +1060,8 @@ static int cmd_get_comp(int argc, char *argv[])
}
for (i = 0; i < vnd; i++) {
- u16_t cid = net_buf_simple_pull_le16(comp);
- u16_t mod_id = net_buf_simple_pull_le16(comp);
+ uint16_t cid = net_buf_simple_pull_le16(comp);
+ uint16_t mod_id = net_buf_simple_pull_le16(comp);
printk("\t\t\tCompany 0x%04x: 0x%04x\n", cid, mod_id);
}
@@ -1032,13 +1078,13 @@ struct shell_cmd_help cmd_get_comp_help = {
static int cmd_beacon(int argc, char *argv[])
{
- u8_t status;
+ uint8_t status;
int err;
if (argc < 2) {
err = bt_mesh_cfg_beacon_get(net.net_idx, net.dst, &status);
} else {
- u8_t val = str2u8(argv[1]);
+ uint8_t val = str2u8(argv[1]);
err = bt_mesh_cfg_beacon_set(net.net_idx, net.dst, val,
&status);
@@ -1054,19 +1100,49 @@ static int cmd_beacon(int argc, char *argv[])
return 0;
}
+static void print_unprovisioned_beacon(uint8_t uuid[16],
+ bt_mesh_prov_oob_info_t oob_info,
+ uint32_t *uri_hash)
+{
+ char uuid_hex_str[32 + 1];
+
+ bin2hex(uuid, 16, uuid_hex_str, sizeof(uuid_hex_str));
+
+ printk("UUID %s, OOB Info 0x%04x, URI Hash 0x%lx",
+ uuid_hex_str, oob_info,
+ (uri_hash == NULL ? 0 : *uri_hash));
+}
+
+static int cmd_beacon_listen(int argc, char *argv[])
+{
+ uint8_t val = str2u8(argv[1]);
+
+ if (val) {
+ prov.unprovisioned_beacon = print_unprovisioned_beacon;
+ } else {
+ prov.unprovisioned_beacon = NULL;
+ }
+
+ return 0;
+}
+
struct shell_cmd_help cmd_beacon_help = {
NULL, "[val: off, on]", NULL
};
+struct shell_cmd_help cmd_beacon_listen_help = {
+ NULL, "[val: off, on]", NULL
+};
+
static int cmd_ttl(int argc, char *argv[])
{
- u8_t ttl;
+ uint8_t ttl;
int err;
if (argc < 2) {
err = bt_mesh_cfg_ttl_get(net.net_idx, net.dst, &ttl);
} else {
- u8_t val = strtoul(argv[1], NULL, 0);
+ uint8_t val = strtoul(argv[1], NULL, 0);
err = bt_mesh_cfg_ttl_set(net.net_idx, net.dst, val, &ttl);
}
@@ -1087,13 +1163,13 @@ struct shell_cmd_help cmd_ttl_help = {
static int cmd_friend(int argc, char *argv[])
{
- u8_t frnd;
+ uint8_t frnd;
int err;
if (argc < 2) {
err = bt_mesh_cfg_friend_get(net.net_idx, net.dst, &frnd);
} else {
- u8_t val = str2u8(argv[1]);
+ uint8_t val = str2u8(argv[1]);
err = bt_mesh_cfg_friend_set(net.net_idx, net.dst, val, &frnd);
}
@@ -1114,13 +1190,13 @@ struct shell_cmd_help cmd_friend_help = {
static int cmd_gatt_proxy(int argc, char *argv[])
{
- u8_t proxy;
+ uint8_t proxy;
int err;
if (argc < 2) {
err = bt_mesh_cfg_gatt_proxy_get(net.net_idx, net.dst, &proxy);
} else {
- u8_t val = str2u8(argv[1]);
+ uint8_t val = str2u8(argv[1]);
err = bt_mesh_cfg_gatt_proxy_set(net.net_idx, net.dst, val,
&proxy);
@@ -1140,17 +1216,60 @@ struct shell_cmd_help cmd_gatt_proxy_help = {
NULL, "[val: off, on]", NULL
};
+static int cmd_net_transmit(int argc, char *argv[])
+{
+ uint8_t transmit;
+ int err;
+
+ if (argc < 2) {
+ err = bt_mesh_cfg_net_transmit_get(net.net_idx,
+ net.dst, &transmit);
+ } else {
+ if (argc != 3) {
+ printk("Wrong number of input arguments"
+ "(2 arguments are required)");
+ return -EINVAL;
+ }
+
+ uint8_t count, interval, new_transmit;
+
+ count = strtoul(argv[1], NULL, 0);
+ interval = strtoul(argv[2], NULL, 0);
+
+ new_transmit = BT_MESH_TRANSMIT(count, interval);
+
+ err = bt_mesh_cfg_net_transmit_set(net.net_idx, net.dst,
+ new_transmit, &transmit);
+ }
+
+ if (err) {
+ printk("Unable to send network transmit"
+ " Get/Set (err %d)", err);
+ return 0;
+ }
+
+ printk("Transmit 0x%02x (count %u interval %ums)",
+ transmit, BT_MESH_TRANSMIT_COUNT(transmit),
+ BT_MESH_TRANSMIT_INT(transmit));
+
+ return 0;
+}
+
+struct shell_cmd_help cmd_net_transmit_help = {
+ NULL, "[<count: 0-7> <interval: 10-320>]", NULL
+};
+
static int cmd_relay(int argc, char *argv[])
{
- u8_t relay, transmit;
+ uint8_t relay, transmit;
int err;
if (argc < 2) {
err = bt_mesh_cfg_relay_get(net.net_idx, net.dst, &relay,
&transmit);
} else {
- u8_t val = str2u8(argv[1]);
- u8_t count, interval, new_transmit;
+ uint8_t val = str2u8(argv[1]);
+ uint8_t count, interval, new_transmit;
if (val) {
if (argc > 2) {
@@ -1192,9 +1311,10 @@ struct shell_cmd_help cmd_relay_help = {
static int cmd_net_key_add(int argc, char *argv[])
{
- u8_t key_val[16];
- u16_t key_net_idx;
- u8_t status;
+ bool has_key_val = (argc > 2);
+ uint8_t key_val[16];
+ uint16_t key_net_idx;
+ uint8_t status;
int err;
if (argc < 2) {
@@ -1203,7 +1323,7 @@ static int cmd_net_key_add(int argc, char *argv[])
key_net_idx = strtoul(argv[1], NULL, 0);
- if (argc > 2) {
+ if (has_key_val) {
size_t len;
len = hex2bin(argv[3], key_val, sizeof(key_val));
@@ -1212,6 +1332,29 @@ static int cmd_net_key_add(int argc, char *argv[])
memcpy(key_val, default_key, sizeof(key_val));
}
+ if (IS_ENABLED(CONFIG_BT_MESH_CDB)) {
+ struct bt_mesh_cdb_subnet *subnet;
+
+ subnet = bt_mesh_cdb_subnet_get(key_net_idx);
+ if (subnet) {
+ if (has_key_val) {
+ printk("Subnet 0x%03x already has a value", key_net_idx);
+ return 0;
+ }
+
+ memcpy(key_val, subnet->keys[0].net_key, 16);
+ } else {
+ subnet = bt_mesh_cdb_subnet_alloc(key_net_idx);
+ if (!subnet) {
+ printk("No space for subnet in cdb");
+ return 0;
+ }
+
+ memcpy(subnet->keys[0].net_key, key_val, 16);
+ bt_mesh_cdb_subnet_store(subnet);
+ }
+ }
+
err = bt_mesh_cfg_net_key_add(net.net_idx, net.dst, key_net_idx,
key_val, &status);
if (err) {
@@ -1232,11 +1375,67 @@ struct shell_cmd_help cmd_net_key_add_help = {
NULL, "<NetKeyIndex> [val]", NULL
};
+static int cmd_net_key_get(int argc, char *argv[])
+{
+ uint16_t keys[16];
+ size_t cnt;
+ int err, i;
+
+ cnt = ARRAY_SIZE(keys);
+
+ err = bt_mesh_cfg_net_key_get(net.net_idx, net.dst, keys, &cnt);
+ if (err) {
+ printk("Unable to send NetKeyGet (err %d)", err);
+ return 0;
+ }
+
+ printk("NetKeys known by 0x%04x:", net.dst);
+ for (i = 0; i < cnt; i++) {
+ printk("\t0x%03x", keys[i]);
+ }
+
+ return 0;
+}
+
+struct shell_cmd_help cmd_net_key_get_help = {
+ NULL, NULL, NULL
+};
+
+static int cmd_net_key_del(int argc, char *argv[])
+{
+ uint16_t key_net_idx;
+ uint8_t status;
+ int err;
+
+ key_net_idx = strtoul(argv[1], NULL, 0);
+
+ err = bt_mesh_cfg_net_key_del(net.net_idx, net.dst, key_net_idx,
+ &status);
+ if (err) {
+ printk("Unable to send NetKeyDel (err %d)", err);
+ return 0;
+ }
+
+ if (status) {
+ printk("NetKeyDel failed with status 0x%02x",
+ status);
+ } else {
+ printk("NetKey 0x%03x deleted", key_net_idx);
+ }
+
+ return 0;
+}
+
+struct shell_cmd_help cmd_net_key_del_help = {
+ NULL, "<NetKeyIndex>", NULL
+};
+
static int cmd_app_key_add(int argc, char *argv[])
{
- u8_t key_val[16];
- u16_t key_net_idx, key_app_idx;
- u8_t status;
+ uint8_t key_val[16];
+ uint16_t key_net_idx, key_app_idx;
+ bool has_key_val = (argc > 3);
+ uint8_t status;
int err;
if (argc < 3) {
@@ -1246,7 +1445,7 @@ static int cmd_app_key_add(int argc, char *argv[])
key_net_idx = strtoul(argv[1], NULL, 0);
key_app_idx = strtoul(argv[2], NULL, 0);
- if (argc > 3) {
+ if (has_key_val) {
size_t len;
len = hex2bin(argv[3], key_val, sizeof(key_val));
@@ -1255,6 +1454,30 @@ static int cmd_app_key_add(int argc, char *argv[])
memcpy(key_val, default_key, sizeof(key_val));
}
+ if (IS_ENABLED(CONFIG_BT_MESH_CDB)) {
+ struct bt_mesh_cdb_app_key *app_key;
+
+ app_key = bt_mesh_cdb_app_key_get(key_app_idx);
+ if (app_key) {
+ if (has_key_val) {
+ printk("App key 0x%03x already has a value", key_app_idx);
+ return 0;
+ }
+
+ memcpy(key_val, app_key->keys[0].app_key, 16);
+ } else {
+ app_key = bt_mesh_cdb_app_key_alloc(key_net_idx,
+ key_app_idx);
+ if (!app_key) {
+ printk("No space for app key in cdb");
+ return 0;
+ }
+
+ memcpy(app_key->keys[0].app_key, key_val, 16);
+ bt_mesh_cdb_app_key_store(app_key);
+ }
+ }
+
err = bt_mesh_cfg_app_key_add(net.net_idx, net.dst, key_net_idx,
key_app_idx, key_val, &status);
if (err) {
@@ -1276,10 +1499,83 @@ struct shell_cmd_help cmd_app_key_add_help = {
NULL, "<NetKeyIndex> <AppKeyIndex> [val]", NULL
};
+static int cmd_app_key_get(int argc, char *argv[])
+{
+ uint16_t net_idx;
+ uint16_t keys[16];
+ size_t cnt;
+ uint8_t status;
+ int err, i;
+
+ net_idx = strtoul(argv[1], NULL, 0);
+ cnt = ARRAY_SIZE(keys);
+
+ err = bt_mesh_cfg_app_key_get(net.net_idx, net.dst, net_idx, &status,
+ keys, &cnt);
+ if (err) {
+ printk("Unable to send AppKeyGet (err %d)", err);
+ return 0;
+ }
+
+ if (status) {
+ printk("AppKeyGet failed with status 0x%02x",
+ status);
+ return 0;
+ }
+
+ printk(
+ "AppKeys for NetKey 0x%03x known by 0x%04x:", net_idx,
+ net.dst);
+ for (i = 0; i < cnt; i++) {
+ printk("\t0x%03x", keys[i]);
+ }
+
+ return 0;
+}
+
+struct shell_cmd_help cmd_app_key_get_help = {
+ NULL, "<NetKeyIndex>", NULL
+};
+
+static int cmd_app_key_del(int argc, char *argv[])
+{
+ uint16_t key_net_idx, key_app_idx;
+ uint8_t status;
+ int err;
+
+ if (argc < 3) {
+ return -EINVAL;
+ }
+
+ key_net_idx = strtoul(argv[1], NULL, 0);
+ key_app_idx = strtoul(argv[2], NULL, 0);
+
+ err = bt_mesh_cfg_app_key_del(net.net_idx, net.dst, key_net_idx,
+ key_app_idx, &status);
+ if (err) {
+ printk("Unable to send App Key del(err %d)", err);
+ return 0;
+ }
+
+ if (status) {
+ printk("AppKeyDel failed with status 0x%02x",
+ status);
+ } else {
+ printk("AppKey deleted, NetKeyIndex 0x%04x "
+ "AppKeyIndex 0x%04x", key_net_idx, key_app_idx);
+ }
+
+ return 0;
+}
+
+struct shell_cmd_help cmd_app_key_del_help = {
+ NULL, "<NetKeyIndex> <AppKeyIndex>", NULL
+};
+
static int cmd_mod_app_bind(int argc, char *argv[])
{
- u16_t elem_addr, mod_app_idx, mod_id, cid;
- u8_t status;
+ uint16_t elem_addr, mod_app_idx, mod_id, cid;
+ uint8_t status;
int err;
if (argc < 4) {
@@ -1318,10 +1614,107 @@ struct shell_cmd_help cmd_mod_app_bind_help = {
NULL, "<addr> <AppIndex> <Model ID> [Company ID]", NULL
};
+static int cmd_mod_app_unbind(int argc, char *argv[])
+{
+ uint16_t elem_addr, mod_app_idx, mod_id, cid;
+ uint8_t status;
+ int err;
+
+ if (argc < 4) {
+ return -EINVAL;
+ }
+
+ elem_addr = strtoul(argv[1], NULL, 0);
+ mod_app_idx = strtoul(argv[2], NULL, 0);
+ mod_id = strtoul(argv[3], NULL, 0);
+
+ if (argc > 4) {
+ cid = strtoul(argv[4], NULL, 0);
+ err = bt_mesh_cfg_mod_app_unbind_vnd(net.net_idx, net.dst,
+ elem_addr, mod_app_idx,
+ mod_id, cid, &status);
+ } else {
+ err = bt_mesh_cfg_mod_app_unbind(net.net_idx, net.dst,
+ elem_addr, mod_app_idx, mod_id, &status);
+ }
+
+ if (err) {
+ printk("Unable to send Model App Unbind (err %d)",
+ err);
+ return 0;
+ }
+
+ if (status) {
+ printk("Model App Unbind failed with status 0x%02x",
+ status);
+ } else {
+ printk("AppKey successfully unbound");
+ }
+
+ return 0;
+}
+
+struct shell_cmd_help cmd_mod_app_unbind_help = {
+ NULL, "<addr> <AppIndex> <Model ID> [Company ID]", NULL
+};
+
+static int cmd_mod_app_get(int argc,
+ char *argv[])
+{
+ uint16_t elem_addr, mod_id, cid;
+ uint16_t apps[16];
+ uint8_t status;
+ size_t cnt;
+ int err, i;
+
+ elem_addr = strtoul(argv[1], NULL, 0);
+ mod_id = strtoul(argv[2], NULL, 0);
+ cnt = ARRAY_SIZE(apps);
+
+ if (argc > 3) {
+ cid = strtoul(argv[3], NULL, 0);
+ err = bt_mesh_cfg_mod_app_get_vnd(net.net_idx, net.dst,
+ elem_addr, mod_id, cid,
+ &status, apps, &cnt);
+ } else {
+ err = bt_mesh_cfg_mod_app_get(net.net_idx, net.dst, elem_addr,
+ mod_id, &status, apps, &cnt);
+ }
+
+ if (err) {
+ printk("Unable to send Model App Get (err %d)",
+ err);
+ return 0;
+ }
+
+ if (status) {
+ printk("Model App Get failed with status 0x%02x",
+ status);
+ } else {
+ printk(
+ "Apps bound to Element 0x%04x, Model 0x%04x %s:",
+ elem_addr, mod_id, argc > 3 ? argv[3] : "(SIG)");
+
+ if (!cnt) {
+ printk("\tNone.");
+ }
+
+ for (i = 0; i < cnt; i++) {
+ printk("\t0x%04x", apps[i]);
+ }
+ }
+
+ return 0;
+}
+
+struct shell_cmd_help cmd_mod_app_get_help = {
+ NULL, "<elem addr> <Model ID> [Company ID]", NULL
+};
+
static int cmd_mod_sub_add(int argc, char *argv[])
{
- u16_t elem_addr, sub_addr, mod_id, cid;
- u8_t status;
+ uint16_t elem_addr, sub_addr, mod_id, cid;
+ uint8_t status;
int err;
if (argc < 4) {
@@ -1363,8 +1756,8 @@ struct shell_cmd_help cmd_mod_sub_add_help = {
static int cmd_mod_sub_del(int argc, char *argv[])
{
- u16_t elem_addr, sub_addr, mod_id, cid;
- u8_t status;
+ uint16_t elem_addr, sub_addr, mod_id, cid;
+ uint8_t status;
int err;
if (argc < 4) {
@@ -1407,9 +1800,9 @@ struct shell_cmd_help cmd_mod_sub_del_help = {
static int cmd_mod_sub_add_va(int argc, char *argv[])
{
- u16_t elem_addr, sub_addr, mod_id, cid;
- u8_t label[16];
- u8_t status;
+ uint16_t elem_addr, sub_addr, mod_id, cid;
+ uint8_t label[16];
+ uint8_t status;
size_t len;
int err;
@@ -1457,9 +1850,9 @@ struct shell_cmd_help cmd_mod_sub_add_va_help = {
static int cmd_mod_sub_del_va(int argc, char *argv[])
{
- u16_t elem_addr, sub_addr, mod_id, cid;
- u8_t label[16];
- u8_t status;
+ uint16_t elem_addr, sub_addr, mod_id, cid;
+ uint8_t label[16];
+ uint8_t status;
size_t len;
int err;
@@ -1506,10 +1899,64 @@ struct shell_cmd_help cmd_mod_sub_del_va_help = {
NULL, "<elem addr> <Label UUID> <Model ID> [Company ID]", NULL
};
-static int mod_pub_get(u16_t addr, u16_t mod_id, u16_t cid)
+static int cmd_mod_sub_get(int argc,
+ char *argv[])
+{
+ uint16_t elem_addr, mod_id, cid;
+ uint16_t subs[16];
+ uint8_t status;
+ size_t cnt;
+ int err, i;
+
+ elem_addr = strtoul(argv[1], NULL, 0);
+ mod_id = strtoul(argv[2], NULL, 0);
+ cnt = ARRAY_SIZE(subs);
+
+ if (argc > 3) {
+ cid = strtoul(argv[3], NULL, 0);
+ err = bt_mesh_cfg_mod_sub_get_vnd(net.net_idx, net.dst,
+ elem_addr, mod_id, cid,
+ &status, subs, &cnt);
+ } else {
+ err = bt_mesh_cfg_mod_sub_get(net.net_idx, net.dst, elem_addr,
+ mod_id, &status, subs, &cnt);
+ }
+
+ if (err) {
+ printk("Unable to send Model Subscription Get "
+ "(err %d)", err);
+ return 0;
+ }
+
+ if (status) {
+ printk("Model Subscription Get failed with "
+ "status 0x%02x", status);
+ } else {
+ printk(
+ "Model Subscriptions for Element 0x%04x, "
+ "Model 0x%04x %s:",
+ elem_addr, mod_id, argc > 3 ? argv[3] : "(SIG)");
+
+ if (!cnt) {
+ printk("\tNone.");
+ }
+
+ for (i = 0; i < cnt; i++) {
+ printk("\t0x%04x", subs[i]);
+ }
+ }
+
+ return 0;
+}
+
+struct shell_cmd_help cmd_mod_sub_get_help = {
+ NULL, "<elem addr> <Model ID> [Company ID]", NULL
+};
+
+static int mod_pub_get(uint16_t addr, uint16_t mod_id, uint16_t cid)
{
struct bt_mesh_cfg_mod_pub pub;
- u8_t status;
+ uint8_t status;
int err;
if (cid == CID_NVAL) {
@@ -1546,11 +1993,11 @@ static int mod_pub_get(u16_t addr, u16_t mod_id, u16_t cid)
return 0;
}
-static int mod_pub_set(u16_t addr, u16_t mod_id, u16_t cid, char *argv[])
+static int mod_pub_set(uint16_t addr, uint16_t mod_id, uint16_t cid, char *argv[])
{
struct bt_mesh_cfg_mod_pub pub;
- u8_t status, count;
- u16_t interval;
+ uint8_t status, count;
+ uint16_t interval;
int err;
pub.addr = strtoul(argv[0], NULL, 0);
@@ -1598,7 +2045,7 @@ static int mod_pub_set(u16_t addr, u16_t mod_id, u16_t cid, char *argv[])
static int cmd_mod_pub(int argc, char *argv[])
{
- u16_t addr, mod_id, cid;
+ uint16_t addr, mod_id, cid;
if (argc < 3) {
return -EINVAL;
@@ -1650,7 +2097,7 @@ static void hb_sub_print(struct bt_mesh_cfg_hb_sub *sub)
static int hb_sub_get(int argc, char *argv[])
{
struct bt_mesh_cfg_hb_sub sub;
- u8_t status;
+ uint8_t status;
int err;
err = bt_mesh_cfg_hb_sub_get(net.net_idx, net.dst, &sub, &status);
@@ -1672,7 +2119,7 @@ static int hb_sub_get(int argc, char *argv[])
static int hb_sub_set(int argc, char *argv[])
{
struct bt_mesh_cfg_hb_sub sub;
- u8_t status;
+ uint8_t status;
int err;
sub.src = strtoul(argv[1], NULL, 0);
@@ -1715,7 +2162,7 @@ struct shell_cmd_help cmd_hb_sub_help = {
static int hb_pub_get(int argc, char *argv[])
{
struct bt_mesh_cfg_hb_pub pub;
- u8_t status;
+ uint8_t status;
int err;
err = bt_mesh_cfg_hb_pub_get(net.net_idx, net.dst, &pub, &status);
@@ -1742,7 +2189,7 @@ static int hb_pub_get(int argc, char *argv[])
static int hb_pub_set(int argc, char *argv[])
{
struct bt_mesh_cfg_hb_pub pub;
- u8_t status;
+ uint8_t status;
int err;
pub.dst = strtoul(argv[1], NULL, 0);
@@ -1787,7 +2234,7 @@ struct shell_cmd_help cmd_hb_pub_help = {
#endif /* MYNEWT_VAL(BLE_MESH_CFG_CLI) */
-#if MYNEWT_VAL(BLE_MESH_PROV)
+#if MYNEWT_VAL(BLE_MESH_PROV_DEVICE)
static int cmd_pb(bt_mesh_prov_bearer_t bearer, int argc, char *argv[])
{
int err;
@@ -1833,10 +2280,10 @@ static int cmd_pb_adv(int argc, char *argv[])
#if MYNEWT_VAL(BLE_MESH_PROVISIONER)
static int cmd_provision_adv(int argc, char *argv[])
{
- u8_t uuid[16];
- u8_t attention_duration;
- u16_t net_idx;
- u16_t addr;
+ uint8_t uuid[16];
+ uint8_t attention_duration;
+ uint16_t net_idx;
+ uint16_t addr;
size_t len;
int err;
@@ -1871,8 +2318,9 @@ static int cmd_pb_gatt(int argc, char *argv[])
static int cmd_provision(int argc, char *argv[])
{
- u16_t net_idx, addr;
- u32_t iv_index;
+ const uint8_t *net_key = default_key;
+ uint16_t net_idx, addr;
+ uint32_t iv_index;
int err;
if (argc < 3) {
@@ -1888,7 +2336,19 @@ static int cmd_provision(int argc, char *argv[])
iv_index = 0;
}
- err = bt_mesh_provision(default_key, net_idx, 0, iv_index, addr,
+ if (IS_ENABLED(CONFIG_BT_MESH_CDB)) {
+ const struct bt_mesh_cdb_subnet *sub;
+
+ sub = bt_mesh_cdb_subnet_get(net_idx);
+ if (!sub) {
+ printk("No cdb entry for subnet 0x%03x", net_idx);
+ return 0;
+ }
+
+ net_key = sub->keys[sub->kr_flag].net_key;
+ }
+
+ err = bt_mesh_provision(net_key, net_idx, 0, iv_index, addr,
default_key);
if (err) {
printk("Provisioning failed (err %d)\n", err);
@@ -1905,10 +2365,10 @@ struct shell_cmd_help cmd_provision_help = {
static int cmd_fault_get(int argc, char *argv[])
{
- u8_t faults[32];
+ uint8_t faults[32];
size_t fault_count;
- u8_t test_id;
- u16_t cid;
+ uint8_t test_id;
+ uint16_t cid;
int err;
if (argc < 2) {
@@ -1918,8 +2378,8 @@ static int cmd_fault_get(int argc, char *argv[])
cid = strtoul(argv[1], NULL, 0);
fault_count = sizeof(faults);
- err = bt_mesh_health_fault_get(net.net_idx, net.dst, net.app_idx, cid,
- &test_id, faults, &fault_count);
+ err = bt_mesh_health_fault_get(net.dst, net.app_idx, cid, &test_id,
+ faults, &fault_count);
if (err) {
printk("Failed to send Health Fault Get (err %d)\n", err);
} else {
@@ -1935,10 +2395,10 @@ struct shell_cmd_help cmd_fault_get_help = {
static int cmd_fault_clear(int argc, char *argv[])
{
- u8_t faults[32];
+ uint8_t faults[32];
size_t fault_count;
- u8_t test_id;
- u16_t cid;
+ uint8_t test_id;
+ uint16_t cid;
int err;
if (argc < 2) {
@@ -1948,8 +2408,8 @@ static int cmd_fault_clear(int argc, char *argv[])
cid = strtoul(argv[1], NULL, 0);
fault_count = sizeof(faults);
- err = bt_mesh_health_fault_clear(net.net_idx, net.dst, net.app_idx,
- cid, &test_id, faults, &fault_count);
+ err = bt_mesh_health_fault_clear(net.dst, net.app_idx, cid,
+ &test_id, faults, &fault_count);
if (err) {
printk("Failed to send Health Fault Clear (err %d)\n", err);
} else {
@@ -1965,7 +2425,7 @@ struct shell_cmd_help cmd_fault_clear_help = {
static int cmd_fault_clear_unack(int argc, char *argv[])
{
- u16_t cid;
+ uint16_t cid;
int err;
if (argc < 2) {
@@ -1974,8 +2434,8 @@ static int cmd_fault_clear_unack(int argc, char *argv[])
cid = strtoul(argv[1], NULL, 0);
- err = bt_mesh_health_fault_clear(net.net_idx, net.dst, net.app_idx,
- cid, NULL, NULL, NULL);
+ err = bt_mesh_health_fault_clear(net.dst, net.app_idx, cid,
+ NULL, NULL, NULL);
if (err) {
printk("Health Fault Clear Unacknowledged failed (err %d)\n",
err);
@@ -1990,10 +2450,10 @@ struct shell_cmd_help cmd_fault_clear_unack_help = {
static int cmd_fault_test(int argc, char *argv[])
{
- u8_t faults[32];
+ uint8_t faults[32];
size_t fault_count;
- u8_t test_id;
- u16_t cid;
+ uint8_t test_id;
+ uint16_t cid;
int err;
if (argc < 3) {
@@ -2004,8 +2464,8 @@ static int cmd_fault_test(int argc, char *argv[])
test_id = strtoul(argv[2], NULL, 0);
fault_count = sizeof(faults);
- err = bt_mesh_health_fault_test(net.net_idx, net.dst, net.app_idx,
- cid, test_id, faults, &fault_count);
+ err = bt_mesh_health_fault_test(net.dst, net.app_idx, cid,
+ test_id, faults, &fault_count);
if (err) {
printk("Failed to send Health Fault Test (err %d)\n", err);
} else {
@@ -2021,8 +2481,8 @@ struct shell_cmd_help cmd_fault_test_help = {
static int cmd_fault_test_unack(int argc, char *argv[])
{
- u16_t cid;
- u8_t test_id;
+ uint16_t cid;
+ uint8_t test_id;
int err;
if (argc < 3) {
@@ -2032,8 +2492,8 @@ static int cmd_fault_test_unack(int argc, char *argv[])
cid = strtoul(argv[1], NULL, 0);
test_id = strtoul(argv[2], NULL, 0);
- err = bt_mesh_health_fault_test(net.net_idx, net.dst, net.app_idx,
- cid, test_id, NULL, NULL);
+ err = bt_mesh_health_fault_test(net.dst, net.app_idx, cid,
+ test_id, NULL, NULL);
if (err) {
printk("Health Fault Test Unacknowledged failed (err %d)\n",
err);
@@ -2048,11 +2508,10 @@ struct shell_cmd_help cmd_fault_test_unack_help = {
static int cmd_period_get(int argc, char *argv[])
{
- u8_t divisor;
+ uint8_t divisor;
int err;
- err = bt_mesh_health_period_get(net.net_idx, net.dst, net.app_idx,
- &divisor);
+ err = bt_mesh_health_period_get(net.dst, net.app_idx, &divisor);
if (err) {
printk("Failed to send Health Period Get (err %d)\n", err);
} else {
@@ -2064,7 +2523,7 @@ static int cmd_period_get(int argc, char *argv[])
static int cmd_period_set(int argc, char *argv[])
{
- u8_t divisor, updated_divisor;
+ uint8_t divisor, updated_divisor;
int err;
if (argc < 2) {
@@ -2073,8 +2532,8 @@ static int cmd_period_set(int argc, char *argv[])
divisor = strtoul(argv[1], NULL, 0);
- err = bt_mesh_health_period_set(net.net_idx, net.dst, net.app_idx,
- divisor, &updated_divisor);
+ err = bt_mesh_health_period_set(net.dst, net.app_idx, divisor,
+ &updated_divisor);
if (err) {
printk("Failed to send Health Period Set (err %d)\n", err);
} else {
@@ -2090,7 +2549,7 @@ struct shell_cmd_help cmd_period_set_help = {
static int cmd_period_set_unack(int argc, char *argv[])
{
- u8_t divisor;
+ uint8_t divisor;
int err;
if (argc < 2) {
@@ -2099,8 +2558,7 @@ static int cmd_period_set_unack(int argc, char *argv[])
divisor = strtoul(argv[1], NULL, 0);
- err = bt_mesh_health_period_set(net.net_idx, net.dst, net.app_idx,
- divisor, NULL);
+ err = bt_mesh_health_period_set(net.dst, net.app_idx, divisor, NULL);
if (err) {
printk("Failed to send Health Period Set (err %d)\n", err);
}
@@ -2114,11 +2572,11 @@ struct shell_cmd_help cmd_period_set_unack_help = {
static int cmd_attention_get(int argc, char *argv[])
{
- u8_t attention;
+ uint8_t attention;
int err;
- err = bt_mesh_health_attention_get(net.net_idx, net.dst, net.app_idx,
- &attention);
+ err = bt_mesh_health_attention_get(net.dst, net.app_idx,
+ &attention);
if (err) {
printk("Failed to send Health Attention Get (err %d)\n", err);
} else {
@@ -2130,7 +2588,7 @@ static int cmd_attention_get(int argc, char *argv[])
static int cmd_attention_set(int argc, char *argv[])
{
- u8_t attention, updated_attention;
+ uint8_t attention, updated_attention;
int err;
if (argc < 2) {
@@ -2139,8 +2597,8 @@ static int cmd_attention_set(int argc, char *argv[])
attention = strtoul(argv[1], NULL, 0);
- err = bt_mesh_health_attention_set(net.net_idx, net.dst, net.app_idx,
- attention, &updated_attention);
+ err = bt_mesh_health_attention_set(net.dst, net.app_idx, attention,
+ &updated_attention);
if (err) {
printk("Failed to send Health Attention Set (err %d)\n", err);
} else {
@@ -2156,7 +2614,7 @@ struct shell_cmd_help cmd_attention_set_help = {
static int cmd_attention_set_unack(int argc, char *argv[])
{
- u8_t attention;
+ uint8_t attention;
int err;
if (argc < 2) {
@@ -2165,8 +2623,8 @@ static int cmd_attention_set_unack(int argc, char *argv[])
attention = strtoul(argv[1], NULL, 0);
- err = bt_mesh_health_attention_set(net.net_idx, net.dst, net.app_idx,
- attention, NULL);
+ err = bt_mesh_health_attention_set(net.dst, net.app_idx, attention,
+ NULL);
if (err) {
printk("Failed to send Health Attention Set (err %d)\n", err);
}
@@ -2182,8 +2640,8 @@ struct shell_cmd_help cmd_attention_set_unack_help = {
static int cmd_add_fault(int argc, char *argv[])
{
- u8_t fault_id;
- u8_t i;
+ uint8_t fault_id;
+ uint8_t i;
if (argc < 2) {
return -EINVAL;
@@ -2229,8 +2687,8 @@ struct shell_cmd_help cmd_add_fault_help = {
static int cmd_del_fault(int argc, char *argv[])
{
- u8_t fault_id;
- u8_t i;
+ uint8_t fault_id;
+ uint8_t i;
if (argc < 2) {
memset(cur_faults, 0, sizeof(cur_faults));
@@ -2261,10 +2719,337 @@ struct shell_cmd_help cmd_del_fault_help = {
NULL, "[Fault ID]", NULL
};
+#if BLE_MESH_CDB
+struct shell_cmd_help cmd_cdb_create_help = {
+ NULL, "[NetKey]", NULL
+};
+struct shell_cmd_help cmd_cdb_clear_help = {
+ NULL, NULL, NULL
+};
+struct shell_cmd_help cmd_cdb_show_help = {
+ NULL, NULL, NULL
+};
+struct shell_cmd_help cmd_cdb_node_add_help = {
+ NULL, "<UUID> <addr> <num-elem> "
+ "<NetKeyIdx> [DevKey]", NULL
+};
+struct shell_cmd_help cmd_cdb_node_del_help = {
+ NULL, "<addr>", NULL
+};
+struct shell_cmd_help cmd_cdb_subnet_add_help = {
+ NULL, "<NeyKeyIdx> [<NetKey>]", NULL
+};
+struct shell_cmd_help cmd_cdb_subnet_del_help = {
+ NULL, "<NetKeyIdx>", NULL
+};
+struct shell_cmd_help cmd_cdb_app_key_add_help = {
+ NULL, "<NetKeyIdx> <AppKeyIdx> [<AppKey>]", NULL
+};
+struct shell_cmd_help cmd_cdb_app_key_del_help = {
+ NULL, "<AppKeyIdx>", NULL
+};
+
+static int cmd_cdb_create(int argc, char *argv[])
+{
+ uint8_t net_key[16];
+ size_t len;
+ int err;
+
+ if (argc < 2) {
+ bt_rand(net_key, 16);
+ } else {
+ len = hex2bin(argv[1], net_key, sizeof(net_key));
+ memset(net_key + len, 0, sizeof(net_key) - len);
+ }
+
+ err = bt_mesh_cdb_create(net_key);
+ if (err < 0) {
+ printk("Failed to create CDB (err %d)", err);
+ }
+
+ return 0;
+}
+
+static int cmd_cdb_clear(int argc, char *argv[])
+{
+ bt_mesh_cdb_clear();
+
+ printk("Cleared CDB");
+
+ return 0;
+}
+
+static void cdb_print_nodes(void)
+{
+ char key_hex_str[32 + 1], uuid_hex_str[32 + 1];
+ struct bt_mesh_cdb_node *node;
+ int i, total = 0;
+ bool configured;
+
+ printk("Address Elements Flags %-32s DevKey", "UUID");
+
+ for (i = 0; i < ARRAY_SIZE(bt_mesh_cdb.nodes); ++i) {
+ node = &bt_mesh_cdb.nodes[i];
+ if (node->addr == BT_MESH_ADDR_UNASSIGNED) {
+ continue;
+ }
+
+ configured = atomic_test_bit(node->flags,
+ BT_MESH_CDB_NODE_CONFIGURED);
+
+ total++;
+ bin2hex(node->uuid, 16, uuid_hex_str, sizeof(uuid_hex_str));
+ bin2hex(node->dev_key, 16, key_hex_str, sizeof(key_hex_str));
+ printk("0x%04x %-8d %-5s %s %s", node->addr,
+ node->num_elem, configured ? "C" : "-",
+ uuid_hex_str, key_hex_str);
+ }
+
+ printk("> Total nodes: %d", total);
+}
+
+static void cdb_print_subnets(void)
+{
+ struct bt_mesh_cdb_subnet *subnet;
+ char key_hex_str[32 + 1];
+ int i, total = 0;
+
+ printk("NetIdx NetKey");
+
+ for (i = 0; i < ARRAY_SIZE(bt_mesh_cdb.subnets); ++i) {
+ subnet = &bt_mesh_cdb.subnets[i];
+ if (subnet->net_idx == BT_MESH_KEY_UNUSED) {
+ continue;
+ }
+
+ total++;
+ bin2hex(subnet->keys[0].net_key, 16, key_hex_str,
+ sizeof(key_hex_str));
+ printk("0x%03x %s", subnet->net_idx,
+ key_hex_str);
+ }
+
+ printk("> Total subnets: %d", total);
+}
+
+static void cdb_print_app_keys(void)
+{
+ struct bt_mesh_cdb_app_key *app_key;
+ char key_hex_str[32 + 1];
+ int i, total = 0;
+
+ printk("NetIdx AppIdx AppKey");
+
+ for (i = 0; i < ARRAY_SIZE(bt_mesh_cdb.app_keys); ++i) {
+ app_key = &bt_mesh_cdb.app_keys[i];
+ if (app_key->net_idx == BT_MESH_KEY_UNUSED) {
+ continue;
+ }
+
+ total++;
+ bin2hex(app_key->keys[0].app_key, 16, key_hex_str,
+ sizeof(key_hex_str));
+ printk("0x%03x 0x%03x %s",
+ app_key->net_idx, app_key->app_idx, key_hex_str);
+ }
+
+ printk("> Total app-keys: %d", total);
+}
+
+static int cmd_cdb_show(int argc, char *argv[])
+{
+ if (!atomic_test_bit(bt_mesh_cdb.flags, BT_MESH_CDB_VALID)) {
+ printk("No valid networks");
+ return 0;
+ }
+
+ printk("Mesh Network Information");
+ printk("========================");
+
+ cdb_print_nodes();
+ printk("---");
+ cdb_print_subnets();
+ printk("---");
+ cdb_print_app_keys();
+
+ return 0;
+}
+
+static int cmd_cdb_node_add(int argc, char *argv[])
+{
+ struct bt_mesh_cdb_node *node;
+ uint8_t uuid[16], dev_key[16];
+ uint16_t addr, net_idx;
+ uint8_t num_elem;
+ size_t len;
+
+ len = hex2bin(argv[1], uuid, sizeof(uuid));
+ memset(uuid + len, 0, sizeof(uuid) - len);
+
+ addr = strtoul(argv[2], NULL, 0);
+ num_elem = strtoul(argv[3], NULL, 0);
+ net_idx = strtoul(argv[4], NULL, 0);
+
+ if (argc < 6) {
+ bt_rand(dev_key, 16);
+ } else {
+ len = hex2bin(argv[5], dev_key, sizeof(dev_key));
+ memset(dev_key + len, 0, sizeof(dev_key) - len);
+ }
+
+ node = bt_mesh_cdb_node_alloc(uuid, addr, num_elem, net_idx);
+ if (node == NULL) {
+ printk("Failed to allocate node");
+ return 0;
+ }
+
+ memcpy(node->dev_key, dev_key, 16);
+
+ if (IS_ENABLED(CONFIG_SETTINGS)) {
+ bt_mesh_store_cdb_node(node);
+ }
+
+ printk("Added node 0x%04x", addr);
+
+ return 0;
+}
+
+static int cmd_cdb_node_del(int argc, char *argv[])
+{
+ struct bt_mesh_cdb_node *node;
+ uint16_t addr;
+
+ addr = strtoul(argv[1], NULL, 0);
+
+ node = bt_mesh_cdb_node_get(addr);
+ if (node == NULL) {
+ printk("No node with address 0x%04x", addr);
+ return 0;
+ }
+
+ bt_mesh_cdb_node_del(node, true);
+
+ printk("Deleted node 0x%04x", addr);
+
+ return 0;
+}
+
+static int cmd_cdb_subnet_add(int argc,
+ char *argv[])
+{
+ struct bt_mesh_cdb_subnet *sub;
+ uint8_t net_key[16];
+ uint16_t net_idx;
+ size_t len;
+
+ net_idx = strtoul(argv[1], NULL, 0);
+
+ if (argc < 3) {
+ bt_rand(net_key, 16);
+ } else {
+ len = hex2bin(argv[2], net_key, sizeof(net_key));
+ memset(net_key + len, 0, sizeof(net_key) - len);
+ }
+
+ sub = bt_mesh_cdb_subnet_alloc(net_idx);
+ if (sub == NULL) {
+ printk("Could not add subnet");
+ return 0;
+ }
+
+ memcpy(sub->keys[0].net_key, net_key, 16);
+
+ if (IS_ENABLED(CONFIG_SETTINGS)) {
+ bt_mesh_store_cdb_subnet(sub);
+ }
+
+ printk("Added Subnet 0x%03x", net_idx);
+
+ return 0;
+}
+
+static int cmd_cdb_subnet_del(int argc,
+ char *argv[])
+{
+ struct bt_mesh_cdb_subnet *sub;
+ uint16_t net_idx;
+
+ net_idx = strtoul(argv[1], NULL, 0);
+
+ sub = bt_mesh_cdb_subnet_get(net_idx);
+ if (sub == NULL) {
+ printk("No subnet with NetIdx 0x%03x", net_idx);
+ return 0;
+ }
+
+ bt_mesh_cdb_subnet_del(sub, true);
+
+ printk("Deleted subnet 0x%03x", net_idx);
+
+ return 0;
+}
+
+static int cmd_cdb_app_key_add(int argc,
+ char *argv[])
+{
+ struct bt_mesh_cdb_app_key *key;
+ uint16_t net_idx, app_idx;
+ uint8_t app_key[16];
+ size_t len;
+
+ net_idx = strtoul(argv[1], NULL, 0);
+ app_idx = strtoul(argv[2], NULL, 0);
+
+ if (argc < 4) {
+ bt_rand(app_key, 16);
+ } else {
+ len = hex2bin(argv[3], app_key, sizeof(app_key));
+ memset(app_key + len, 0, sizeof(app_key) - len);
+ }
+
+ key = bt_mesh_cdb_app_key_alloc(net_idx, app_idx);
+ if (key == NULL) {
+ printk("Could not add AppKey");
+ return 0;
+ }
+
+ memcpy(key->keys[0].app_key, app_key, 16);
+
+ if (IS_ENABLED(CONFIG_SETTINGS)) {
+ bt_mesh_store_cdb_app_key(key);
+ }
+
+ printk("Added AppKey 0x%03x", app_idx);
+
+ return 0;
+}
+
+static int cmd_cdb_app_key_del(int argc,
+ char *argv[])
+{
+ struct bt_mesh_cdb_app_key *key;
+ uint16_t app_idx;
+
+ app_idx = strtoul(argv[1], NULL, 0);
+
+ key = bt_mesh_cdb_app_key_get(app_idx);
+ if (key == NULL) {
+ printk("No AppKey 0x%03x", app_idx);
+ return 0;
+ }
+
+ bt_mesh_cdb_app_key_del(key, true);
+
+ printk("Deleted AppKey 0x%03x", app_idx);
+
+ return 0;
+}
+#endif
+
#if MYNEWT_VAL(BLE_MESH_SHELL_MODELS)
static int cmd_gen_onoff_get(int argc, char *argv[])
{
- u8_t state;
+ uint8_t state;
int err;
err = bt_mesh_gen_onoff_get(net.net_idx, net.dst, net.app_idx,
@@ -2280,8 +3065,8 @@ static int cmd_gen_onoff_get(int argc, char *argv[])
static int cmd_gen_onoff_set(int argc, char *argv[])
{
- u8_t state;
- u8_t val;
+ uint8_t state;
+ uint8_t val;
int err;
if (argc < 2) {
@@ -2307,7 +3092,7 @@ struct shell_cmd_help cmd_gen_onoff_set_help = {
static int cmd_gen_onoff_set_unack(int argc, char *argv[])
{
- u8_t val;
+ uint8_t val;
int err;
if (argc < 2) {
@@ -2331,7 +3116,7 @@ struct shell_cmd_help cmd_gen_onoff_set_unack_help = {
static int cmd_gen_level_get(int argc, char *argv[])
{
- s16_t state;
+ int16_t state;
int err;
err = bt_mesh_gen_level_get(net.net_idx, net.dst, net.app_idx,
@@ -2347,15 +3132,15 @@ static int cmd_gen_level_get(int argc, char *argv[])
static int cmd_gen_level_set(int argc, char *argv[])
{
- s16_t state;
- s16_t val;
+ int16_t state;
+ int16_t val;
int err;
if (argc < 2) {
return -EINVAL;
}
- val = (s16_t)strtoul(argv[1], NULL, 0);
+ val = (int16_t)strtoul(argv[1], NULL, 0);
err = bt_mesh_gen_level_set(net.net_idx, net.dst, net.app_idx,
val, &state);
@@ -2374,14 +3159,14 @@ struct shell_cmd_help cmd_gen_level_set_help = {
static int cmd_gen_level_set_unack(int argc, char *argv[])
{
- s16_t val;
+ int16_t val;
int err;
if (argc < 2) {
return -EINVAL;
}
- val = (s16_t)strtoul(argv[1], NULL, 0);
+ val = (int16_t)strtoul(argv[1], NULL, 0);
err = bt_mesh_gen_level_set(net.net_idx, net.dst, net.app_idx,
val, NULL);
@@ -2479,7 +3264,7 @@ static const struct shell_cmd mesh_commands[] = {
{
.sc_cmd = "reset",
.sc_cmd_func = cmd_reset,
- .help = NULL,
+ .help = &cmd_reset_help,
},
{
.sc_cmd = "uuid",
@@ -2606,6 +3391,11 @@ static const struct shell_cmd mesh_commands[] = {
.help = &cmd_beacon_help,
},
{
+ .sc_cmd = "beacon-listen",
+ .sc_cmd_func = cmd_beacon_listen,
+ .help = &cmd_beacon_listen_help,
+ },
+ {
.sc_cmd = "ttl",
.sc_cmd_func = cmd_ttl,
.help = &cmd_ttl_help,
@@ -2631,16 +3421,51 @@ static const struct shell_cmd mesh_commands[] = {
.help = &cmd_net_key_add_help,
},
{
+ .sc_cmd = "net-key-get",
+ .sc_cmd_func = cmd_net_key_get,
+ .help = &cmd_net_key_get_help,
+ },
+ {
+ .sc_cmd = "net-key-del",
+ .sc_cmd_func = cmd_net_key_del,
+ .help = &cmd_net_key_del_help,
+ },
+ {
.sc_cmd = "app-key-add",
.sc_cmd_func = cmd_app_key_add,
.help = &cmd_app_key_add_help,
},
{
+ .sc_cmd = "app-key-del",
+ .sc_cmd_func = cmd_app_key_del,
+ .help = &cmd_app_key_del_help,
+ },
+ {
+ .sc_cmd = "app-key-get",
+ .sc_cmd_func = cmd_app_key_get,
+ .help = &cmd_app_key_get_help,
+ },
+ {
+ .sc_cmd = "net-transmit-param",
+ .sc_cmd_func = cmd_net_transmit,
+ .help = &cmd_net_transmit_help,
+ },
+ {
.sc_cmd = "mod-app-bind",
.sc_cmd_func = cmd_mod_app_bind,
.help = &cmd_mod_app_bind_help,
},
{
+ .sc_cmd = "mod-app-get",
+ .sc_cmd_func = cmd_mod_app_get,
+ .help = &cmd_mod_app_get_help,
+ },
+ {
+ .sc_cmd = "mod-app-unbind",
+ .sc_cmd_func = cmd_mod_app_unbind,
+ .help = &cmd_mod_app_unbind_help,
+ },
+ {
.sc_cmd = "mod-pub",
.sc_cmd_func = cmd_mod_pub,
.help = &cmd_mod_pub_help,
@@ -2661,6 +3486,11 @@ static const struct shell_cmd mesh_commands[] = {
.help = &cmd_mod_sub_add_va_help,
},
{
+ .sc_cmd = "mod-sub-get",
+ .sc_cmd_func = cmd_mod_sub_get,
+ .help = &cmd_mod_sub_get_help,
+ },
+ {
.sc_cmd = "mod-sub-del-va",
.sc_cmd_func = cmd_mod_sub_del_va,
.help = &cmd_mod_sub_del_va_help,
@@ -2748,6 +3578,46 @@ static const struct shell_cmd mesh_commands[] = {
.help = &cmd_del_fault_help,
},
+#if MYNEWT_VAL(BLE_MESH_CDB)
+ {
+ .sc_cmd = "cdb-create",
+ .sc_cmd_func = cmd_cdb_create,
+ .help = &cmd_cdb_create_help,
+ },{
+ .sc_cmd = "cdb-clear",
+ .sc_cmd_func = cmd_cdb_clear,
+ .help = &cmd_cdb_clear_help,
+ },{
+ .sc_cmd = "cdb-show",
+ .sc_cmd_func = cmd_cdb_show,
+ .help = &cmd_cdb_show_help,
+ },{
+ .sc_cmd = "cdb-node-add",
+ .sc_cmd_func = cmd_cdb_node_add,
+ .help = &cmd_cdb_node_add_help,
+ },{
+ .sc_cmd = "cdb-node-del",
+ .sc_cmd_func = cmd_cdb_node_del,
+ .help = &cmd_cdb_node_del_help,
+ },{
+ .sc_cmd = "cdb-subnet-add",
+ .sc_cmd_func = cmd_cdb_subnet_add,
+ .help = &cmd_cdb_subnet_add_help,
+ },{
+ .sc_cmd = "cdb-subnet-del",
+ .sc_cmd_func = cmd_cdb_subnet_del,
+ .help = &cmd_cdb_subnet_del_help,
+ },{
+ .sc_cmd = "cdb-app-key-add",
+ .sc_cmd_func = cmd_cdb_app_key_add,
+ .help = &cmd_cdb_app_key_add_help,
+ },{
+ .sc_cmd = "cdb-app-key-add",
+ .sc_cmd_func = cmd_cdb_app_key_del,
+ .help = &cmd_cdb_app_key_del_help,
+ },
+#endif
+
#if MYNEWT_VAL(BLE_MESH_SHELL_MODELS)
/* Generic Client Model Operations */
{
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/subnet.c b/src/libs/mynewt-nimble/nimble/host/mesh/src/subnet.c
new file mode 100644
index 00000000..d6fcfbee
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/subnet.c
@@ -0,0 +1,666 @@
+/*
+ * Copyright (c) 2017 Intel Corporation
+ * Copyright (c) 2020 Nordic Semiconductor ASA
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+#include "syscfg/syscfg.h"
+#define MESH_LOG_MODULE BLE_MESH_NET_KEYS_LOG
+
+#include "log/log.h"
+
+#include "crypto.h"
+#include "adv.h"
+#include "mesh/mesh.h"
+#include "net.h"
+#include "mesh_priv.h"
+#include "lpn.h"
+#include "friend.h"
+#include "proxy.h"
+#include "transport.h"
+#include "access.h"
+#include "foundation.h"
+#include "beacon.h"
+#include "rpl.h"
+#include "settings.h"
+#include "prov.h"
+
+#ifdef CONFIG_BT_MESH_GATT_PROXY
+void (*bt_mesh_subnet_cb_list[5]) (struct bt_mesh_subnet *sub,
+ enum bt_mesh_key_evt evt);
+#else
+void (*bt_mesh_subnet_cb_list[4]) (struct bt_mesh_subnet *sub,
+ enum bt_mesh_key_evt evt);
+#endif
+
+static struct bt_mesh_subnet subnets[CONFIG_BT_MESH_SUBNET_COUNT] = {
+ [0 ... (CONFIG_BT_MESH_SUBNET_COUNT - 1)] = {
+ .net_idx = BT_MESH_KEY_UNUSED,
+ },
+};
+
+static void subnet_evt(struct bt_mesh_subnet *sub, enum bt_mesh_key_evt evt)
+{
+ int i;
+ for (i = 0; i < (sizeof(bt_mesh_subnet_cb_list)/sizeof(void *)); i++) {
+ BT_DBG("%d", i);
+ if (bt_mesh_subnet_cb_list[i]) {
+ bt_mesh_subnet_cb_list[i] (sub, evt);
+ }
+ }
+}
+
+uint8_t bt_mesh_net_flags(struct bt_mesh_subnet *sub)
+{
+ uint8_t flags = 0x00;
+
+ if (sub && (sub->kr_phase == BT_MESH_KR_PHASE_2)) {
+ flags |= BT_MESH_NET_FLAG_KR;
+ }
+
+ if (atomic_test_bit(bt_mesh.flags, BT_MESH_IVU_IN_PROGRESS)) {
+ flags |= BT_MESH_NET_FLAG_IVU;
+ }
+
+ return flags;
+}
+
+static void key_refresh(struct bt_mesh_subnet *sub, uint8_t new_phase)
+{
+ BT_DBG("Phase 0x%02x -> 0x%02x", sub->kr_phase, new_phase);
+
+ switch (new_phase) {
+ /* Added second set of keys */
+ case BT_MESH_KR_PHASE_1:
+ sub->kr_phase = new_phase;
+ subnet_evt(sub, BT_MESH_KEY_UPDATED);
+ break;
+ /* Now using new keys for TX */
+ case BT_MESH_KR_PHASE_2:
+ sub->kr_phase = new_phase;
+ subnet_evt(sub, BT_MESH_KEY_SWAPPED);
+ break;
+ /* Revoking keys */
+ case BT_MESH_KR_PHASE_3:
+ if (sub->kr_phase == BT_MESH_KR_NORMAL) {
+ return;
+ }
+ /* __fallthrough; */
+ case BT_MESH_KR_NORMAL:
+ sub->kr_phase = BT_MESH_KR_NORMAL;
+ memcpy(&sub->keys[0], &sub->keys[1], sizeof(sub->keys[0]));
+ sub->keys[1].valid = 0U;
+ subnet_evt(sub, BT_MESH_KEY_REVOKED);
+ break;
+ }
+
+ if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
+ BT_DBG("Storing Updated NetKey persistently");
+ bt_mesh_store_subnet(sub->net_idx);
+ }
+}
+
+void bt_mesh_kr_update(struct bt_mesh_subnet *sub, bool kr_flag, bool new_key)
+{
+ if (!new_key) {
+ return;
+ }
+
+ if (sub->kr_phase == BT_MESH_KR_PHASE_1) {
+ /* Bluetooth Mesh Profile Specification Section 3.10.4.1:
+ * Can skip phase 2 if we get KR=0 on new key.
+ */
+ key_refresh(sub, (kr_flag ? BT_MESH_KR_PHASE_2 :
+ BT_MESH_KR_PHASE_3));
+ } else if (sub->kr_phase == BT_MESH_KR_PHASE_2 && !kr_flag) {
+ key_refresh(sub, BT_MESH_KR_PHASE_3);
+ }
+}
+
+static struct bt_mesh_subnet *subnet_alloc(uint16_t net_idx)
+{
+ struct bt_mesh_subnet *sub = NULL;
+
+ for (int i = 0; i < ARRAY_SIZE(subnets); i++) {
+ /* Check for already existing subnet */
+ if (subnets[i].net_idx == net_idx) {
+ return &subnets[i];
+ }
+
+ if (!sub && subnets[i].net_idx == BT_MESH_KEY_UNUSED) {
+ sub = &subnets[i];
+ }
+ }
+
+ return sub;
+}
+
+static void subnet_del(struct bt_mesh_subnet *sub)
+{
+ if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
+ bt_mesh_clear_subnet(sub->net_idx);
+ }
+
+ bt_mesh_net_loopback_clear(sub->net_idx);
+
+ subnet_evt(sub, BT_MESH_KEY_DELETED);
+ (void)memset(sub, 0, sizeof(*sub));
+ sub->net_idx = BT_MESH_KEY_UNUSED;
+}
+
+static int msg_cred_create(struct bt_mesh_net_cred *cred, const uint8_t *p,
+ size_t p_len, const uint8_t key[16])
+{
+ return bt_mesh_k2(key, p, p_len, &cred->nid, cred->enc, cred->privacy);
+}
+
+static int net_keys_create(struct bt_mesh_subnet_keys *keys,
+ const uint8_t key[16])
+{
+ uint8_t p = 0;
+ int err;
+
+ err = msg_cred_create(&keys->msg, &p, 1, key);
+ if (err) {
+ BT_ERR("Unable to generate NID, EncKey & PrivacyKey");
+ return err;
+ }
+
+ memcpy(keys->net, key, 16);
+
+ BT_DBG("NID 0x%02x EncKey %s", keys->msg.nid,
+ bt_hex(keys->msg.enc, 16));
+ BT_DBG("PrivacyKey %s", bt_hex(keys->msg.privacy, 16));
+
+ err = bt_mesh_k3(key, keys->net_id);
+ if (err) {
+ BT_ERR("Unable to generate Net ID");
+ return err;
+ }
+
+ BT_DBG("NetID %s", bt_hex(keys->net_id, 8));
+
+#if defined(CONFIG_BT_MESH_GATT_PROXY)
+ err = bt_mesh_identity_key(key, keys->identity);
+ if (err) {
+ BT_ERR("Unable to generate IdentityKey");
+ return err;
+ }
+
+ BT_DBG("IdentityKey %s", bt_hex(keys->identity, 16));
+#endif /* GATT_PROXY */
+
+ err = bt_mesh_beacon_key(key, keys->beacon);
+ if (err) {
+ BT_ERR("Unable to generate beacon key");
+ return err;
+ }
+
+ BT_DBG("BeaconKey %s", bt_hex(keys->beacon, 16));
+
+ keys->valid = 1U;
+
+ return 0;
+}
+
+uint8_t bt_mesh_subnet_add(uint16_t net_idx, const uint8_t key[16])
+{
+ struct bt_mesh_subnet *sub = NULL;
+ int err;
+
+ BT_DBG("0x%03x", net_idx);
+
+ sub = subnet_alloc(net_idx);
+ if (!sub) {
+ return STATUS_INSUFF_RESOURCES;
+ }
+
+ if (sub->net_idx == net_idx) {
+ if (memcmp(key, sub->keys[0].net, 16)) {
+ return STATUS_IDX_ALREADY_STORED;
+ }
+
+ return STATUS_SUCCESS;
+ }
+
+ err = net_keys_create(&sub->keys[0], key);
+ if (err) {
+ return STATUS_UNSPECIFIED;
+ }
+
+ sub->net_idx = net_idx;
+ sub->kr_phase = BT_MESH_KR_NORMAL;
+
+ if (IS_ENABLED(CONFIG_BT_MESH_GATT_PROXY)) {
+ sub->node_id = BT_MESH_NODE_IDENTITY_STOPPED;
+ } else {
+ sub->node_id = BT_MESH_NODE_IDENTITY_NOT_SUPPORTED;
+ }
+
+ subnet_evt(sub, BT_MESH_KEY_ADDED);
+
+ if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
+ BT_DBG("Storing NetKey persistently");
+ bt_mesh_store_subnet(sub->net_idx);
+ }
+
+ return STATUS_SUCCESS;
+}
+
+bool bt_mesh_subnet_exists(uint16_t net_idx)
+{
+ return !!bt_mesh_subnet_get(net_idx);
+}
+
+uint8_t bt_mesh_subnet_update(uint16_t net_idx, const uint8_t key[16])
+{
+ struct bt_mesh_subnet *sub;
+ int err;
+
+ BT_DBG("0x%03x", net_idx);
+
+ sub = bt_mesh_subnet_get(net_idx);
+ if (!sub) {
+ return STATUS_INVALID_NETKEY;
+ }
+
+ /* The node shall successfully process a NetKey Update message on a
+ * valid NetKeyIndex when the NetKey value is different and the Key
+ * Refresh procedure has not been started, or when the NetKey value is
+ * the same in Phase 1. The NetKey Update message shall generate an
+ * error when the node is in Phase 2, or Phase 3.
+ */
+ switch (sub->kr_phase) {
+ case BT_MESH_KR_NORMAL:
+ if (!memcmp(key, sub->keys[0].net, 16)) {
+ return STATUS_IDX_ALREADY_STORED;
+ }
+ break;
+ case BT_MESH_KR_PHASE_1:
+ if (!memcmp(key, sub->keys[1].net, 16)) {
+ return STATUS_SUCCESS;
+ }
+ /* __fallthrough; */
+ case BT_MESH_KR_PHASE_2:
+ case BT_MESH_KR_PHASE_3:
+ return STATUS_CANNOT_UPDATE;
+ }
+
+ err = net_keys_create(&sub->keys[1], key);
+ if (err) {
+ return STATUS_CANNOT_UPDATE;
+ }
+
+ key_refresh(sub, BT_MESH_KR_PHASE_1);
+
+ return STATUS_SUCCESS;
+}
+
+uint8_t bt_mesh_subnet_del(uint16_t net_idx)
+{
+ struct bt_mesh_subnet *sub;
+
+ BT_DBG("0x%03x", net_idx);
+
+ sub = bt_mesh_subnet_get(net_idx);
+ if (!sub) {
+ /* This could be a retry of a previous attempt that had its
+ * response lost, so pretend that it was a success.
+ */
+ return STATUS_INVALID_NETKEY;
+ }
+
+ subnet_del(sub);
+
+ return STATUS_SUCCESS;
+}
+
+int bt_mesh_friend_cred_create(struct bt_mesh_net_cred *cred, uint16_t lpn_addr,
+ uint16_t frnd_addr, uint16_t lpn_counter,
+ uint16_t frnd_counter, const uint8_t key[16])
+{
+ uint8_t p[9];
+
+ p[0] = 0x01;
+ sys_put_be16(lpn_addr, p + 1);
+ sys_put_be16(frnd_addr, p + 3);
+ sys_put_be16(lpn_counter, p + 5);
+ sys_put_be16(frnd_counter, p + 7);
+
+ return msg_cred_create(cred, p, sizeof(p), key);
+}
+
+uint8_t bt_mesh_subnet_kr_phase_set(uint16_t net_idx, uint8_t *phase)
+{
+ /* Table in Bluetooth Mesh Profile Specification Section 4.2.14: */
+ const uint8_t valid_transitions[] = {
+ BIT(BT_MESH_KR_PHASE_3), /* Normal phase: KR is started by key update */
+ BIT(BT_MESH_KR_PHASE_2) | BIT(BT_MESH_KR_PHASE_3), /* Phase 1 */
+ BIT(BT_MESH_KR_PHASE_3), /* Phase 2 */
+ /* Subnet is never in Phase 3 */
+ };
+ struct bt_mesh_subnet *sub;
+
+ BT_DBG("0x%03x", net_idx);
+
+ sub = bt_mesh_subnet_get(net_idx);
+ if (!sub) {
+ *phase = 0x00;
+ return STATUS_INVALID_NETKEY;
+ }
+
+ if (*phase == sub->kr_phase) {
+ return STATUS_SUCCESS;
+ }
+
+ if (sub->kr_phase < ARRAY_SIZE(valid_transitions) &&
+ valid_transitions[sub->kr_phase] & BIT(*phase)) {
+ key_refresh(sub, *phase);
+
+ *phase = sub->kr_phase;
+
+ return STATUS_SUCCESS;
+ }
+
+ BT_WARN("Invalid KR transition: 0x%02x -> 0x%02x", sub->kr_phase,
+ *phase);
+
+ *phase = sub->kr_phase;
+
+ return STATUS_CANNOT_UPDATE;
+}
+
+uint8_t bt_mesh_subnet_kr_phase_get(uint16_t net_idx, uint8_t *phase)
+{
+ struct bt_mesh_subnet *sub;
+
+ sub = bt_mesh_subnet_get(net_idx);
+ if (!sub) {
+ *phase = BT_MESH_KR_NORMAL;
+ return STATUS_INVALID_NETKEY;
+ }
+
+ *phase = sub->kr_phase;
+
+ return STATUS_SUCCESS;
+}
+
+uint8_t bt_mesh_subnet_node_id_set(uint16_t net_idx,
+ enum bt_mesh_feat_state node_id)
+{
+ struct bt_mesh_subnet *sub;
+
+ if (node_id == BT_MESH_FEATURE_NOT_SUPPORTED) {
+ return STATUS_CANNOT_SET;
+ }
+
+ sub = bt_mesh_subnet_get(net_idx);
+ if (!sub) {
+ return STATUS_INVALID_NETKEY;
+ }
+
+ if (!IS_ENABLED(CONFIG_BT_MESH_GATT_PROXY)) {
+ return STATUS_FEAT_NOT_SUPP;
+ }
+
+ if (node_id) {
+ bt_mesh_proxy_identity_start(sub);
+ } else {
+ bt_mesh_proxy_identity_stop(sub);
+ }
+
+ bt_mesh_adv_update();
+
+ return STATUS_SUCCESS;
+}
+
+uint8_t bt_mesh_subnet_node_id_get(uint16_t net_idx,
+ enum bt_mesh_feat_state *node_id)
+{
+ struct bt_mesh_subnet *sub;
+
+ sub = bt_mesh_subnet_get(net_idx);
+ if (!sub) {
+ *node_id = 0x00;
+ return STATUS_INVALID_NETKEY;
+ }
+
+ *node_id = sub->node_id;
+
+ return STATUS_SUCCESS;
+}
+
+ssize_t bt_mesh_subnets_get(uint16_t net_idxs[], size_t max, off_t skip)
+{
+ size_t count = 0;
+
+ for (int i = 0; i < ARRAY_SIZE(subnets); i++) {
+ struct bt_mesh_subnet *sub = &subnets[i];
+
+ if (sub->net_idx == BT_MESH_KEY_UNUSED) {
+ continue;
+ }
+
+ if (skip) {
+ skip--;
+ continue;
+ }
+
+ if (count >= max) {
+ return -ENOMEM;
+ }
+
+ net_idxs[count++] = sub->net_idx;
+ }
+
+ return count;
+}
+
+struct bt_mesh_subnet *bt_mesh_subnet_get(uint16_t net_idx)
+{
+ for (int i = 0; i < ARRAY_SIZE(subnets); i++) {
+ struct bt_mesh_subnet *sub = &subnets[i];
+
+ if (sub->net_idx == net_idx) {
+ return sub;
+ }
+ }
+
+ return NULL;
+}
+
+int bt_mesh_subnet_set(uint16_t net_idx, uint8_t kr_phase,
+ const uint8_t old_key[16], const uint8_t new_key[16])
+{
+ const uint8_t *keys[] = { old_key, new_key };
+ struct bt_mesh_subnet *sub;
+
+ sub = subnet_alloc(net_idx);
+ if (!sub) {
+ return -ENOMEM;
+ }
+
+ if (sub->net_idx == net_idx) {
+ return -EALREADY;
+ }
+
+ for (int i = 0; i < ARRAY_SIZE(keys); i++) {
+ if (!keys[i]) {
+ continue;
+ }
+
+ if (net_keys_create(&sub->keys[i], keys[i])) {
+ return -EIO;
+ }
+ }
+
+ sub->net_idx = net_idx;
+ sub->kr_phase = kr_phase;
+
+ if (IS_ENABLED(CONFIG_BT_MESH_GATT_PROXY)) {
+ sub->node_id = BT_MESH_NODE_IDENTITY_STOPPED;
+ } else {
+ sub->node_id = BT_MESH_NODE_IDENTITY_NOT_SUPPORTED;
+ }
+
+ /* Make sure we have valid beacon data to be sent */
+ bt_mesh_beacon_update(sub);
+
+ return 0;
+}
+
+struct bt_mesh_subnet *bt_mesh_subnet_find(int (*cb)(struct bt_mesh_subnet *sub,
+ void *cb_data),
+ void *cb_data)
+{
+ for (int i = 0; i < ARRAY_SIZE(subnets); i++) {
+ if (subnets[i].net_idx == BT_MESH_KEY_UNUSED) {
+ continue;
+ }
+
+ if (!cb || cb(&subnets[i], cb_data)) {
+ return &subnets[i];
+ }
+ }
+
+ return NULL;
+}
+
+size_t bt_mesh_subnet_foreach(void (*cb)(struct bt_mesh_subnet *sub))
+{
+ size_t count = 0;
+
+ for (int i = 0; i < ARRAY_SIZE(subnets); i++) {
+ if (subnets[i].net_idx == BT_MESH_KEY_UNUSED) {
+ continue;
+ }
+
+ cb(&subnets[i]);
+ count++;
+ }
+
+ return count;
+}
+
+struct bt_mesh_subnet *bt_mesh_subnet_next(struct bt_mesh_subnet *sub)
+{
+ if (sub) {
+ sub++;
+ } else {
+ sub = &subnets[0];
+ }
+
+ for (int i = 0; i < ARRAY_SIZE(subnets); i++, sub++) {
+ /* Roll over once we reach the end */
+ if (sub == &subnets[ARRAY_SIZE(subnets)]) {
+ sub = &subnets[0];
+ }
+
+ if (sub->net_idx != BT_MESH_KEY_UNUSED) {
+ return sub;
+ }
+ }
+
+ return NULL;
+}
+
+void bt_mesh_net_keys_reset(void)
+{
+ int i;
+
+ /* Delete all net keys, which also takes care of all app keys which
+ * are associated with each net key.
+ */
+ for (i = 0; i < ARRAY_SIZE(subnets); i++) {
+ struct bt_mesh_subnet *sub = &subnets[i];
+
+ if (sub->net_idx != BT_MESH_KEY_UNUSED) {
+ subnet_del(sub);
+ }
+ }
+}
+
+bool bt_mesh_net_cred_find(struct bt_mesh_net_rx *rx, struct os_mbuf *in,
+ struct os_mbuf *out,
+ bool (*cb)(struct bt_mesh_net_rx *rx,
+ struct os_mbuf *in,
+ struct os_mbuf *out,
+ const struct bt_mesh_net_cred *cred))
+{
+ int i, j;
+
+ BT_DBG("");
+
+#if MYNEWT_VAL(BLE_MESH_LOW_POWER)
+ if (bt_mesh_lpn_waiting_update()) {
+ rx->sub = bt_mesh.lpn.sub;
+
+ for (j = 0; j < ARRAY_SIZE(bt_mesh.lpn.cred); j++) {
+ if (!rx->sub->keys[j].valid) {
+ continue;
+ }
+
+ if (cb(rx, in, out, &bt_mesh.lpn.cred[j])) {
+ rx->new_key = (j > 0);
+ rx->friend_cred = 1U;
+ rx->ctx.net_idx = rx->sub->net_idx;
+ return true;
+ }
+ }
+
+ /* LPN Should only receive on the friendship credentials when in
+ * a friendship.
+ */
+ return false;
+ }
+#endif
+
+#if MYNEWT_VAL(BLE_MESH_FRIEND)
+ /** Each friendship has unique friendship credentials */
+ for (i = 0; i < ARRAY_SIZE(bt_mesh.frnd); i++) {
+ struct bt_mesh_friend *frnd = &bt_mesh.frnd[i];
+
+ if (!frnd->subnet) {
+ continue;
+ }
+
+ rx->sub = frnd->subnet;
+
+ for (j = 0; j < ARRAY_SIZE(frnd->cred); j++) {
+ if (!rx->sub->keys[j].valid) {
+ continue;
+ }
+
+ if (cb(rx, in, out, &frnd->cred[j])) {
+ rx->new_key = (j > 0);
+ rx->friend_cred = 1U;
+ rx->ctx.net_idx = rx->sub->net_idx;
+ return true;
+ }
+ }
+ }
+#endif
+
+ for (i = 0; i < ARRAY_SIZE(subnets); i++) {
+ rx->sub = &subnets[i];
+ if (rx->sub->net_idx == BT_MESH_KEY_UNUSED) {
+ continue;
+ }
+
+ for (j = 0; j < ARRAY_SIZE(rx->sub->keys); j++) {
+ if (!rx->sub->keys[j].valid) {
+ continue;
+ }
+
+ if (cb(rx, in, out, &rx->sub->keys[j].msg)) {
+ rx->new_key = (j > 0);
+ rx->friend_cred = 0U;
+ rx->ctx.net_idx = rx->sub->net_idx;
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/subnet.h b/src/libs/mynewt-nimble/nimble/host/mesh/src/subnet.h
new file mode 100644
index 00000000..154b5d4e
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/subnet.h
@@ -0,0 +1,197 @@
+/*
+ * Copyright (c) 2020 Nordic Semiconductor ASA
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+#ifndef _BLUETOOTH_MESH_SUBNET_H_
+#define _BLUETOOTH_MESH_SUBNET_H_
+
+#include <stdint.h>
+#include <sys/types.h>
+#include "mesh/glue.h"
+#define BT_MESH_NET_FLAG_KR BIT(0)
+#define BT_MESH_NET_FLAG_IVU BIT(1)
+
+#define BT_MESH_KR_NORMAL 0x00
+#define BT_MESH_KR_PHASE_1 0x01
+#define BT_MESH_KR_PHASE_2 0x02
+#define BT_MESH_KR_PHASE_3 0x03
+
+/** Which of the two subnet.keys should be used for sending. */
+#define SUBNET_KEY_TX_IDX(sub) ((sub)->kr_phase == BT_MESH_KR_PHASE_2)
+
+struct bt_mesh_net_rx;
+enum bt_mesh_key_evt;
+
+/** Network message encryption credentials */
+struct bt_mesh_net_cred {
+ uint8_t nid; /* NID */
+ uint8_t enc[16]; /* EncKey */
+ uint8_t privacy[16]; /* PrivacyKey */
+};
+
+/** Subnet instance. */
+struct bt_mesh_subnet {
+ uint32_t beacon_sent; /* Timestamp of last sent beacon */
+ uint8_t beacons_last; /* Number of beacons during last
+ * observation window
+ */
+ uint8_t beacons_cur; /* Number of beaconds observed during
+ * currently ongoing window.
+ */
+
+ uint8_t beacon_cache[21]; /* Cached last authenticated beacon */
+
+ uint16_t net_idx; /* NetKeyIndex */
+
+ uint8_t kr_phase; /* Key Refresh Phase */
+
+ uint8_t node_id; /* Node Identity State */
+ uint32_t node_id_start; /* Node Identity started timestamp */
+
+ uint8_t auth[8]; /* Beacon Authentication Value */
+
+ struct bt_mesh_subnet_keys {
+ bool valid;
+ uint8_t net[16]; /* NetKey */
+ struct bt_mesh_net_cred msg;
+ uint8_t net_id[8]; /* Network ID */
+ #if defined(CONFIG_BT_MESH_GATT_PROXY)
+ uint8_t identity[16]; /* IdentityKey */
+ #endif
+ uint8_t beacon[16]; /* BeaconKey */
+ } keys[2];
+};
+
+#ifdef CONFIG_BT_MESH_GATT_PROXY
+extern void (*bt_mesh_subnet_cb_list[5]) (struct bt_mesh_subnet *sub,
+ enum bt_mesh_key_evt evt);
+#else
+extern void (*bt_mesh_subnet_cb_list[4]) (struct bt_mesh_subnet *sub,
+ enum bt_mesh_key_evt evt);
+#endif
+
+/** Subnet callback structure. Instantiate with @ref BT_MESH_SUBNET_CB */
+struct bt_mesh_subnet_cb {
+ void (*evt_handler)(struct bt_mesh_subnet *subnet,
+ enum bt_mesh_key_evt evt);
+};
+
+/** @brief Reset all Network keys. */
+void bt_mesh_net_keys_reset(void);
+
+/** @brief Call cb on every valid Subnet until it returns a non-zero value.
+ *
+ * @param cb Callback to call, or NULL to return first valid subnet.
+ * @param cb_data Callback data to pass to callback.
+ *
+ * @return Subnet that returned non-zero value.
+ */
+struct bt_mesh_subnet *bt_mesh_subnet_find(int (*cb)(struct bt_mesh_subnet *sub,
+ void *cb_data),
+ void *cb_data);
+
+/** @brief Iterate through all valid Subnets.
+ *
+ * @param cb Callback to call on every Subnet.
+ *
+ * @returns The number of valid subnets.
+ */
+size_t bt_mesh_subnet_foreach(void (*cb)(struct bt_mesh_subnet *sub));
+
+/** @brief Get the next valid Subnet.
+ *
+ * If there's only one valid Subnet, this will be returned on every call.
+ *
+ * @param sub Previous Subnet, or NULL to get the first valid.
+ *
+ * @returns Gets the next valid Subnet after @c sub, or NULL if there are no
+ * valid Subnets.
+ */
+struct bt_mesh_subnet *bt_mesh_subnet_next(struct bt_mesh_subnet *sub);
+
+/** @brief Get a pointer to the Subnet with the given index.
+ *
+ * @param net_idx Network index to look for.
+ *
+ * @returns Subnet with index @c net_idx, or NULL if no such Subnet is known.
+ */
+struct bt_mesh_subnet *bt_mesh_subnet_get(uint16_t net_idx);
+
+/** @brief Initialize a new Subnet.
+ *
+ * @param net_idx Network index of the Subnet.
+ * @param kr_phase Key refresh phase the Subnet should be in.
+ * @param key The current network key for the Subnet.
+ * @param new_key New network key, if available.
+ *
+ * @returns 0 on success, or (negative) error code on failure.
+ */
+int bt_mesh_subnet_set(uint16_t net_idx, uint8_t kr_phase,
+ const uint8_t key[16], const uint8_t new_key[16]);
+
+/** @brief Create Friendship credentials.
+ *
+ * @param cred Credential object to create.
+ * @param lpn_addr Address of the LPN node in the friendship.
+ * @param frnd_addr Address of the Friend node in the friendship.
+ * @param lpn_counter The LPN's counter parameter.
+ * @param frnd_counter The Friend node's counter parameter.
+ * @param key Network key to create the Friendship credentials for.
+ *
+ * @returns 0 on success, or (negative) error code on failure.
+ */
+int bt_mesh_friend_cred_create(struct bt_mesh_net_cred *cred,
+ uint16_t lpn_addr, uint16_t frnd_addr,
+ uint16_t lpn_counter, uint16_t frnd_counter,
+ const uint8_t key[16]);
+
+/** @brief Iterate through all valid network credentials to decrypt a message.
+ *
+ * @param rx Network RX parameters, passed to the callback.
+ * @param in Input message buffer, passed to the callback.
+ * @param out Output message buffer, passed to the callback.
+ * @param cb Callback to call for each known network credential. Iteration
+ * stops when this callback returns @c true.
+ *
+ * @returns Whether any of the credentials got a @c true return from the
+ * callback.
+ */
+bool bt_mesh_net_cred_find(struct bt_mesh_net_rx *rx, struct os_mbuf *in,
+ struct os_mbuf *out,
+ bool (*cb)(struct bt_mesh_net_rx *rx,
+ struct os_mbuf *in,
+ struct os_mbuf *out,
+ const struct bt_mesh_net_cred *cred));
+
+/** @brief Get the network flags of the given Subnet.
+ *
+ * @param sub Subnet to get the network flags of.
+ *
+ * @returns A bitmap of @ref BT_MESH_NET_FLAG_KR and @ref BT_MESH_NET_FLAG_IVU.
+ */
+uint8_t bt_mesh_net_flags(struct bt_mesh_subnet *sub);
+
+/** @brief Process a Key Refresh event from a beacon.
+ *
+ * @param sub Subnet the Key Refresh was received on.
+ * @param kr_flag Key Refresh flag.
+ * @param new_key Whether the Key Refresh event was received on the new key
+ * set.
+ */
+void bt_mesh_kr_update(struct bt_mesh_subnet *sub, bool kr_flag, bool new_key);
+
+/** @brief Check whether the Subnet has the refreshed keys.
+ *
+ * @param sub Subnet.
+ *
+ * @returns Whether the Subnet's second key is valid.
+ */
+static inline bool
+bt_mesh_subnet_has_new_key(const struct bt_mesh_subnet *sub)
+{
+ return sub->kr_phase != BT_MESH_KR_NORMAL;
+}
+
+#endif /* _BLUETOOTH_MESH_SUBNET_H_ */ \ No newline at end of file
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/testing.c b/src/libs/mynewt-nimble/nimble/host/mesh/src/testing.c
index d0a05376..bde8ff3b 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/src/testing.c
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/testing.c
@@ -13,6 +13,8 @@
#include "mesh/access.h"
#include "net.h"
+#include "app_keys.h"
+#include "rpl.h"
#include "testing.h"
#include "access.h"
#include "foundation.h"
@@ -31,7 +33,7 @@ void bt_test_cb_unregister(struct bt_test_cb *cb)
sys_slist_find_and_remove(&cb_slist, &cb->node);
}
-void bt_test_mesh_net_recv(u8_t ttl, u8_t ctl, u16_t src, u16_t dst,
+void bt_test_mesh_net_recv(uint8_t ttl, uint8_t ctl, uint16_t src, uint16_t dst,
const void *payload, size_t payload_len)
{
struct bt_test_cb *cb;
@@ -44,8 +46,8 @@ void bt_test_mesh_net_recv(u8_t ttl, u8_t ctl, u16_t src, u16_t dst,
}
}
-void bt_test_mesh_model_bound(u16_t addr, struct bt_mesh_model *model,
- u16_t key_idx)
+void bt_test_mesh_model_bound(uint16_t addr, struct bt_mesh_model *model,
+ uint16_t key_idx)
{
struct bt_test_cb *cb;
@@ -56,8 +58,8 @@ void bt_test_mesh_model_bound(u16_t addr, struct bt_mesh_model *model,
}
}
-void bt_test_mesh_model_unbound(u16_t addr, struct bt_mesh_model *model,
- u16_t key_idx)
+void bt_test_mesh_model_unbound(uint16_t addr, struct bt_mesh_model *model,
+ uint16_t key_idx)
{
struct bt_test_cb *cb;
@@ -68,7 +70,7 @@ void bt_test_mesh_model_unbound(u16_t addr, struct bt_mesh_model *model,
}
}
-void bt_test_mesh_prov_invalid_bearer(u8_t opcode)
+void bt_test_mesh_prov_invalid_bearer(uint8_t opcode)
{
struct bt_test_cb *cb;
@@ -90,14 +92,14 @@ void bt_test_mesh_trans_incomp_timer_exp(void)
}
}
-int bt_test_mesh_lpn_group_add(u16_t group)
+int bt_test_mesh_lpn_group_add(uint16_t group)
{
bt_mesh_lpn_group_add(group);
return 0;
}
-int bt_test_mesh_lpn_group_remove(u16_t *groups, size_t groups_count)
+int bt_test_mesh_lpn_group_remove(uint16_t *groups, size_t groups_count)
{
bt_mesh_lpn_group_del(groups, groups_count);
@@ -114,38 +116,38 @@ int bt_test_mesh_rpl_clear(void)
void bt_test_print_credentials(void)
{
int i;
- u8_t nid;
- const u8_t *enc;
- const u8_t *priv;
- struct bt_mesh_subnet *sub;
- struct bt_mesh_app_key *app_key;
+ struct bt_mesh_cdb_subnet *sub;
+ struct bt_mesh_cdb_app_key *app_key;
+ struct bt_mesh_subnet *subnet;
console_printf("IV Index: %08lx\n", (long) bt_mesh.iv_index);
console_printf("Dev key: %s\n", bt_hex(bt_mesh.dev_key, 16));
- for (i = 0; i < MYNEWT_VAL(BLE_MESH_SUBNET_COUNT); ++i)
+ for (i = 0; i < ARRAY_SIZE(bt_mesh_cdb.app_keys); ++i)
{
- if (bt_mesh.app_keys[i].net_idx == BT_MESH_KEY_UNUSED) {
+ app_key = &bt_mesh_cdb.app_keys[i];
+ if (app_key->net_idx == BT_MESH_KEY_UNUSED) {
continue;
}
- sub = &bt_mesh.sub[i];
+ sub = bt_mesh_cdb_subnet_get(i);
console_printf("Subnet: %d\n", i);
console_printf("\tNetKeyIdx: %04x\n",
sub->net_idx);
console_printf("\tNetKey: %s\n",
- bt_hex(sub->keys[sub->kr_flag].net, 16));
+ bt_hex(sub->keys[sub->kr_flag].net_key, 16));
}
- for (i = 0; i < MYNEWT_VAL(BLE_MESH_APP_KEY_COUNT); ++i)
+ for (i = 0; i < ARRAY_SIZE(bt_mesh_cdb.app_keys); ++i)
{
- if (bt_mesh.app_keys[i].net_idx == BT_MESH_KEY_UNUSED) {
+ app_key = &bt_mesh_cdb.app_keys[i];
+ if (app_key->net_idx == BT_MESH_KEY_UNUSED) {
continue;
}
- sub = &bt_mesh.sub[i];
- app_key = &bt_mesh.app_keys[i];
+ sub = bt_mesh_cdb_subnet_get(i);
+ app_key = &bt_mesh_cdb.app_keys[i];
console_printf("AppKey: %d\n", i);
console_printf("\tNetKeyIdx: %04x\n",
@@ -153,28 +155,27 @@ void bt_test_print_credentials(void)
console_printf("\tAppKeyIdx: %04x\n",
app_key->app_idx);
console_printf("\tAppKey: %s\n",
- bt_hex(app_key->keys[sub->kr_flag].val, 16));
+ bt_hex(app_key->keys[sub->kr_flag].app_key, 16));
}
- for (i = 0; i < MYNEWT_VAL(BLE_MESH_SUBNET_COUNT); ++i)
+ for (i = 0; i < ARRAY_SIZE(bt_mesh_cdb.subnets); ++i)
{
- if (bt_mesh.sub[i].net_idx == BT_MESH_KEY_UNUSED) {
+ sub = bt_mesh_cdb_subnet_get(i);
+ app_key = &bt_mesh_cdb.app_keys[i];
+ if (sub[i].net_idx == BT_MESH_KEY_UNUSED) {
continue;
}
- if (friend_cred_get(&bt_mesh.sub[i], BT_MESH_ADDR_UNASSIGNED,
- &nid, &enc, &priv)) {
- return;
- }
+ subnet = bt_mesh_subnet_get(app_key->net_idx);
console_printf("Friend cred: %d\n", i);
console_printf("\tNetKeyIdx: %04x\n",
- bt_mesh.sub[i].net_idx);
- console_printf("\tNID: %02x\n", nid);
+ sub[i].net_idx);
+ console_printf("\tNID: %02x\n", subnet->keys->msg.nid);
console_printf("\tEncKey: %s\n",
- bt_hex(enc, 16));
+ bt_hex(subnet->keys->msg.enc, 16));
console_printf("\tPrivKey: %s\n",
- bt_hex(priv, 16));
+ bt_hex(subnet->keys->msg.privacy, 16));
}
}
@@ -187,7 +188,7 @@ int bt_test_shell_init(void)
#endif
}
-int bt_test_bind_app_key_to_model(struct bt_mesh_model *model, u16_t key_idx, u16_t id)
+int bt_test_bind_app_key_to_model(struct bt_mesh_model *model, uint16_t key_idx, uint16_t id)
{
struct bt_mesh_model *found_model;
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/testing.h b/src/libs/mynewt-nimble/nimble/host/mesh/src/testing.h
index 166a9eea..68f7fd72 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/src/testing.h
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/testing.h
@@ -12,12 +12,12 @@
#include "mesh/glue.h"
#include "mesh/access.h"
-void bt_test_mesh_model_bound(u16_t addr, struct bt_mesh_model *model,
- u16_t key_idx);
-void bt_test_mesh_model_unbound(u16_t addr, struct bt_mesh_model *model,
- u16_t key_idx);
-void bt_test_mesh_prov_invalid_bearer(u8_t opcode);
-void bt_test_mesh_net_recv(u8_t ttl, u8_t ctl, u16_t src, u16_t dst,
+void bt_test_mesh_model_bound(uint16_t addr, struct bt_mesh_model *model,
+ uint16_t key_idx);
+void bt_test_mesh_model_unbound(uint16_t addr, struct bt_mesh_model *model,
+ uint16_t key_idx);
+void bt_test_mesh_prov_invalid_bearer(uint8_t opcode);
+void bt_test_mesh_net_recv(uint8_t ttl, uint8_t ctl, uint16_t src, uint16_t dst,
const void *payload, size_t payload_len);
void bt_test_mesh_trans_incomp_timer_exp(void);
void bt_test_print_credentials(void);
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/transport.c b/src/libs/mynewt-nimble/nimble/host/mesh/src/transport.c
index caf1b4f1..00ccb088 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/src/transport.c
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/transport.c
@@ -13,42 +13,38 @@
#include <string.h>
#include "mesh/mesh.h"
+#include "mesh/glue.h"
#include "mesh_priv.h"
#include "crypto.h"
#include "adv.h"
#include "net.h"
+#include "app_keys.h"
+#include "rpl.h"
#include "lpn.h"
#include "friend.h"
#include "access.h"
#include "foundation.h"
#include "settings.h"
+#include "heartbeat.h"
#include "transport.h"
#include "testing.h"
-#include "nodes.h"
-/* The transport layer needs at least three buffers for itself to avoid
- * deadlocks. Ensure that there are a sufficient number of advertising
- * buffers available compared to the maximum supported outgoing segment
- * count.
- */
-BUILD_ASSERT(CONFIG_BT_MESH_ADV_BUF_COUNT >= (CONFIG_BT_MESH_TX_SEG_MAX + 3));
-
-#define AID_MASK ((u8_t)(BIT_MASK(6)))
+#define AID_MASK ((uint8_t)(BIT_MASK(6)))
#define SEG(data) ((data)[0] >> 7)
#define AKF(data) (((data)[0] >> 6) & 0x01)
#define AID(data) ((data)[0] & AID_MASK)
#define ASZMIC(data) (((data)[1] >> 7) & 1)
-#define APP_MIC_LEN(aszmic) ((aszmic) ? 8 : 4)
+#define APP_MIC_LEN(aszmic) ((aszmic) ? BT_MESH_MIC_LONG : BT_MESH_MIC_SHORT)
#define UNSEG_HDR(akf, aid) ((akf << 6) | (aid & AID_MASK))
#define SEG_HDR(akf, aid) (UNSEG_HDR(akf, aid) | 0x80)
-#define BLOCK_COMPLETE(seg_n) (u32_t)(((u64_t)1 << (seg_n + 1)) - 1)
+#define BLOCK_COMPLETE(seg_n) (uint32_t)(((uint64_t)1 << (seg_n + 1)) - 1)
-#define SEQ_AUTH(iv_index, seq) (((u64_t)iv_index) << 24 | (u64_t)seq)
+#define SEQ_AUTH(iv_index, seq) (((uint64_t)iv_index) << 24 | (uint64_t)seq)
/* Number of retransmit attempts (after the initial transmit) per segment */
#define SEG_RETRANSMIT_ATTEMPTS (MYNEWT_VAL(BLE_MESH_SEG_RETRANSMIT_ATTEMPTS))
@@ -57,59 +53,84 @@ BUILD_ASSERT(CONFIG_BT_MESH_ADV_BUF_COUNT >= (CONFIG_BT_MESH_TX_SEG_MAX + 3));
* We use 400 since 300 is a common send duration for standard HCI, and we
* need to have a timeout that's bigger than that.
*/
-#define SEG_RETRANSMIT_TIMEOUT(tx) (K_MSEC(400) + 50 * (tx)->ttl)
+#define SEG_RETRANSMIT_TIMEOUT_UNICAST(tx) \
+ (MYNEWT_VAL(BLE_MESH_TX_SEG_RETRANS_TIMEOUT_UNICAST) + 50 * (tx)->ttl)
+/* When sending to a group, the messages are not acknowledged, and there's no
+ * reason to delay the repetitions significantly. Delaying by more than 0 ms
+ * to avoid flooding the network.
+ */
+#define SEG_RETRANSMIT_TIMEOUT_GROUP \
+ MYNEWT_VAL(BLE_MESH_TX_SEG_RETRANS_TIMEOUT_GROUP)
+#define SEG_RETRANSMIT_TIMEOUT(tx) \
+ (BT_MESH_ADDR_IS_UNICAST(tx->dst) ? \
+ SEG_RETRANSMIT_TIMEOUT_UNICAST(tx) : \
+ SEG_RETRANSMIT_TIMEOUT_GROUP)
/* How long to wait for available buffers before giving up */
#define BUF_TIMEOUT K_NO_WAIT
static struct seg_tx {
- struct bt_mesh_subnet *sub;
- struct os_mbuf *seg[CONFIG_BT_MESH_TX_SEG_MAX];
- u64_t seq_auth;
- u16_t dst;
- u8_t seg_n:5, /* Last segment index */
- new_key:1; /* New/old key */
- u8_t nack_count; /* Number of unacked segs */
- u8_t ttl;
+ struct bt_mesh_subnet *sub;
+ void *seg[CONFIG_BT_MESH_TX_SEG_MAX];
+ uint64_t seq_auth;
+ uint16_t src;
+ uint16_t dst;
+ uint16_t len;
+ uint8_t hdr;
+ uint8_t xmit;
+ uint8_t seg_n; /* Last segment index */
+ uint8_t seg_o; /* Segment being sent */
+ uint8_t nack_count; /* Number of unacked segs */
+ uint8_t attempts; /* Remaining tx attempts */
+ uint8_t ttl; /* Transmitted TTL value */
+ uint8_t seg_pending; /* Number of segments pending */
+ uint8_t blocked:1, /* Blocked by ongoing tx */
+ ctl:1, /* Control packet */
+ aszmic:1, /* MIC size */
+ started:1, /* Start cb called */
+ sending:1, /* Sending is in progress */
+ friend_cred:1; /* Using Friend credentials */
const struct bt_mesh_send_cb *cb;
- void *cb_data;
- struct k_delayed_work retransmit; /* Retransmit timer */
+ void *cb_data;
+ struct k_delayed_work retransmit; /* Retransmit timer */
} seg_tx[MYNEWT_VAL(BLE_MESH_TX_SEG_MSG_COUNT)];
static struct seg_rx {
struct bt_mesh_subnet *sub;
- u64_t seq_auth;
- u8_t seg_n:5,
- ctl:1,
- in_use:1,
- obo:1;
- u8_t hdr;
- u8_t ttl;
- u16_t src;
- u16_t dst;
- u32_t block;
- u32_t last;
+ void *seg[CONFIG_BT_MESH_RX_SEG_MAX];
+ uint64_t seq_auth;
+ uint16_t src;
+ uint16_t dst;
+ uint16_t len;
+ uint8_t hdr;
+ uint8_t seg_n:5,
+ ctl:1,
+ in_use:1,
+ obo:1;
+ uint8_t ttl;
+ uint32_t block;
+ uint32_t last;
struct k_delayed_work ack;
- struct os_mbuf *buf;
-} seg_rx[MYNEWT_VAL(BLE_MESH_RX_SEG_MSG_COUNT)] = {
- [0 ... (MYNEWT_VAL(BLE_MESH_RX_SEG_MSG_COUNT) - 1)] = { 0 },
-};
+} seg_rx[CONFIG_BT_MESH_RX_SEG_MSG_COUNT];
-static u16_t hb_sub_dst = BT_MESH_ADDR_UNASSIGNED;
+char _k_mem_slab_buffer_[(BT_MESH_APP_SEG_SDU_MAX*CONFIG_BT_MESH_SEG_BUFS)];
-void bt_mesh_set_hb_sub_dst(u16_t addr)
-{
- hb_sub_dst = addr;
-}
+struct k_mem_slab segs = {
+ .num_blocks = CONFIG_BT_MESH_SEG_BUFS,
+ .block_size = BT_MESH_APP_SEG_SDU_MAX,
+ .buffer = _k_mem_slab_buffer_,
+ .free_list = NULL,
+ .num_used = 0
+};
+
+static struct bt_mesh_va virtual_addrs[CONFIG_BT_MESH_LABEL_COUNT];
static int send_unseg(struct bt_mesh_net_tx *tx, struct os_mbuf *sdu,
- const struct bt_mesh_send_cb *cb, void *cb_data)
+ const struct bt_mesh_send_cb *cb, void *cb_data,
+ const uint8_t *ctl_op)
{
struct os_mbuf *buf;
- BT_DBG("src 0x%04x dst 0x%04x app_idx 0x%04x sdu_len %u",
- tx->src, tx->ctx->addr, tx->ctx->app_idx, sdu->om_len);
-
buf = bt_mesh_adv_create(BT_MESH_ADV_DATA, tx->xmit, BUF_TIMEOUT);
if (!buf) {
BT_ERR("Out of network buffers");
@@ -118,7 +139,9 @@ static int send_unseg(struct bt_mesh_net_tx *tx, struct os_mbuf *sdu,
net_buf_reserve(buf, BT_MESH_NET_HDR_LEN);
- if (BT_MESH_IS_DEV_KEY(tx->ctx->app_idx)) {
+ if (ctl_op) {
+ net_buf_add_u8(buf, TRANS_CTL_HDR(*ctl_op, 0));
+ } else if (BT_MESH_IS_DEV_KEY(tx->ctx->app_idx)) {
net_buf_add_u8(buf, UNSEG_HDR(0, 0));
} else {
net_buf_add_u8(buf, UNSEG_HDR(1, tx->aid));
@@ -156,6 +179,15 @@ send:
return bt_mesh_net_send(tx, buf, cb, cb_data);
}
+static inline uint8_t seg_len(bool ctl)
+{
+ if (ctl) {
+ return BT_MESH_CTL_SEG_SDU_MAX;
+ } else {
+ return BT_MESH_APP_SEG_SDU_MAX;
+ }
+}
+
bool bt_mesh_tx_in_progress(void)
{
int i;
@@ -169,6 +201,41 @@ bool bt_mesh_tx_in_progress(void)
return false;
}
+static void seg_tx_done(struct seg_tx *tx, uint8_t seg_idx)
+{
+ k_mem_slab_free(&segs, (void **)&tx->seg[seg_idx]);
+ tx->seg[seg_idx] = NULL;
+ tx->nack_count--;
+}
+
+static bool seg_tx_blocks(struct seg_tx *tx, uint16_t src, uint16_t dst)
+{
+ return (tx->src == src) && (tx->dst == dst);
+}
+
+static void seg_tx_unblock_check(struct seg_tx *tx)
+{
+ struct seg_tx *blocked = NULL;
+ int i;
+
+ /* Unblock the first blocked tx with the same params. */
+ for (i = 0; i < ARRAY_SIZE(seg_tx); ++i) {
+ if (&seg_tx[i] != tx &&
+ seg_tx[i].blocked &&
+ seg_tx_blocks(tx, seg_tx[i].src, seg_tx[i].dst) &&
+ (!blocked || seg_tx[i].seq_auth < blocked->seq_auth)) {
+ blocked = &seg_tx[i];
+ }
+ }
+
+ if (blocked) {
+ BT_DBG("Unblocked 0x%04x",
+ (uint16_t)(blocked->seq_auth & TRANS_SEQ_ZERO_MASK));
+ blocked->blocked = false;
+ k_delayed_work_submit(&blocked->retransmit, 0);
+ }
+}
+
static void seg_tx_reset(struct seg_tx *tx)
{
int i;
@@ -179,22 +246,19 @@ static void seg_tx_reset(struct seg_tx *tx)
tx->cb_data = NULL;
tx->seq_auth = 0;
tx->sub = NULL;
+ tx->src = BT_MESH_ADDR_UNASSIGNED;
tx->dst = BT_MESH_ADDR_UNASSIGNED;
+ tx->blocked = false;
- if (!tx->nack_count) {
- return;
- }
-
- for (i = 0; i <= tx->seg_n; i++) {
+ for (i = 0; i <= tx->seg_n && tx->nack_count; i++) {
if (!tx->seg[i]) {
continue;
}
- net_buf_unref(tx->seg[i]);
- tx->seg[i] = NULL;
+ seg_tx_done(tx, i);
}
- tx->nack_count = 0U;
+ tx->nack_count = 0;
if (atomic_test_and_clear_bit(bt_mesh.flags, BT_MESH_IVU_PENDING)) {
BT_DBG("Proceding with pending IV Update");
@@ -202,41 +266,60 @@ static void seg_tx_reset(struct seg_tx *tx)
/* bt_mesh_net_iv_update() will re-enable the flag if this
* wasn't the only transfer.
*/
- if (bt_mesh_net_iv_update(bt_mesh.iv_index, false)) {
- bt_mesh_net_sec_update(NULL);
- }
+ bt_mesh_net_iv_update(bt_mesh.iv_index, false);
}
}
static inline void seg_tx_complete(struct seg_tx *tx, int err)
{
- if (tx->cb && tx->cb->end) {
- tx->cb->end(err, tx->cb_data);
- }
+ const struct bt_mesh_send_cb *cb = tx->cb;
+ void *cb_data = tx->cb_data;
+
+ seg_tx_unblock_check(tx);
seg_tx_reset(tx);
+
+ if (cb && cb->end) {
+ cb->end(err, cb_data);
+ }
}
-static void seg_first_send_start(u16_t duration, int err, void *user_data)
+static void schedule_retransmit(struct seg_tx *tx)
{
- struct seg_tx *tx = user_data;
+ if (!tx->nack_count) {
+ return;
+ }
- if (tx->cb && tx->cb->start) {
- tx->cb->start(duration, err, tx->cb_data);
+ if (--tx->seg_pending || tx->sending) {
+ return;
}
+
+ BT_DBG("");
+
+ /* If we haven't gone through all the segments for this attempt yet,
+ * (likely because of a buffer allocation failure or because we
+ * called this from inside bt_mesh_net_send), we should continue the
+ * retransmit immediately, as we just freed up a tx buffer.
+ */
+ k_delayed_work_submit(&tx->retransmit,
+ tx->seg_o ? 0 : K_MSEC(SEG_RETRANSMIT_TIMEOUT(tx)));
}
-static void seg_send_start(u16_t duration, int err, void *user_data)
+static void seg_send_start(uint16_t duration, int err, void *user_data)
{
struct seg_tx *tx = user_data;
+ if (!tx->started && tx->cb && tx->cb->start) {
+ tx->cb->start(duration, err, tx->cb_data);
+ tx->started = 1U;
+ }
+
/* If there's an error in transmitting the 'sent' callback will never
* be called. Make sure that we kick the retransmit timer also in this
* case since otherwise we risk the transmission of becoming stale.
*/
if (err) {
- k_delayed_work_submit(&tx->retransmit,
- SEG_RETRANSMIT_TIMEOUT(tx));
+ schedule_retransmit(tx);
}
}
@@ -244,52 +327,107 @@ static void seg_sent(int err, void *user_data)
{
struct seg_tx *tx = user_data;
- k_delayed_work_submit(&tx->retransmit,
- SEG_RETRANSMIT_TIMEOUT(tx));
+ schedule_retransmit(tx);
}
-static const struct bt_mesh_send_cb first_sent_cb = {
- .start = seg_first_send_start,
- .end = seg_sent,
-};
-
static const struct bt_mesh_send_cb seg_sent_cb = {
.start = seg_send_start,
.end = seg_sent,
};
+static void seg_tx_buf_build(struct seg_tx *tx, uint8_t seg_o,
+ struct os_mbuf *buf)
+{
+ uint16_t seq_zero = tx->seq_auth & TRANS_SEQ_ZERO_MASK;
+ uint8_t len = MIN(seg_len(tx->ctl), tx->len - (seg_len(tx->ctl) * seg_o));
+
+ net_buf_simple_add_u8(buf, tx->hdr);
+ net_buf_simple_add_u8(buf, (tx->aszmic << 7) | seq_zero >> 6);
+ net_buf_simple_add_u8(buf, (((seq_zero & 0x3f) << 2) | (seg_o >> 3)));
+ net_buf_simple_add_u8(buf, ((seg_o & 0x07) << 5) | tx->seg_n);
+ net_buf_simple_add_mem(buf, tx->seg[seg_o], len);
+}
+
static void seg_tx_send_unacked(struct seg_tx *tx)
{
- int i, err;
+ if (!tx->nack_count) {
+ return;
+ }
- for (i = 0; i <= tx->seg_n; i++) {
- struct os_mbuf *seg = tx->seg[i];
+ struct bt_mesh_msg_ctx ctx = {
+ .net_idx = tx->sub->net_idx,
+ /* App idx only used by network to detect control messages: */
+ .app_idx = (tx->ctl ? BT_MESH_KEY_UNUSED : 0),
+ .addr = tx->dst,
+ .send_rel = true,
+ .send_ttl = tx->ttl,
+ };
+ struct bt_mesh_net_tx net_tx = {
+ .sub = tx->sub,
+ .ctx = &ctx,
+ .src = tx->src,
+ .xmit = tx->xmit,
+ .friend_cred = tx->friend_cred,
+ .aid = tx->hdr & AID_MASK,
+ };
- if (!seg) {
- continue;
+ if (!tx->attempts) {
+ if (BT_MESH_ADDR_IS_UNICAST(tx->dst)) {
+ BT_ERR("Ran out of retransmit attempts");
+ seg_tx_complete(tx, -ETIMEDOUT);
+ } else {
+ /* Segmented sending to groups doesn't have acks, so
+ * running out of attempts is the expected behavior.
+ */
+ seg_tx_complete(tx, 0);
}
- if (BT_MESH_ADV(seg)->busy) {
- BT_DBG("Skipping segment that's still advertising");
+ return;
+ }
+
+ BT_DBG("SeqZero: 0x%04x Attempts: %u",
+ (uint16_t)(tx->seq_auth & TRANS_SEQ_ZERO_MASK), tx->attempts);
+
+ tx->sending = 1U;
+
+ for (; tx->seg_o <= tx->seg_n; tx->seg_o++) {
+ struct os_mbuf *seg;
+ int err;
+
+ if (!tx->seg[tx->seg_o]) {
continue;
}
- if (!(BT_MESH_ADV(seg)->seg.attempts--)) {
- BT_ERR("Ran out of retransmit attempts");
- seg_tx_complete(tx, -ETIMEDOUT);
- return;
+ seg = bt_mesh_adv_create(BT_MESH_ADV_DATA, tx->xmit,
+ BUF_TIMEOUT);
+ if (!seg) {
+ BT_DBG("Allocating segment failed");
+ goto end;
}
- BT_DBG("resending %u/%u", i, tx->seg_n);
+ net_buf_reserve(seg, BT_MESH_NET_HDR_LEN);
+ seg_tx_buf_build(tx, tx->seg_o, seg);
+
+ tx->seg_pending++;
+
+ BT_DBG("Sending %u/%u", tx->seg_o, tx->seg_n);
- err = bt_mesh_net_resend(tx->sub, seg, tx->new_key,
- &seg_sent_cb, tx);
+ err = bt_mesh_net_send(&net_tx, seg, &seg_sent_cb, tx);
if (err) {
- BT_ERR("Sending segment failed");
- seg_tx_complete(tx, -EIO);
- return;
+ BT_DBG("Sending segment failed");
+ tx->seg_pending--;
+ goto end;
}
}
+ tx->seg_o = 0U;
+ tx->attempts--;
+end:
+ if (!tx->seg_pending) {
+ k_delayed_work_submit(&tx->retransmit,
+ SEG_RETRANSMIT_TIMEOUT(tx));
+ }
+
+ tx->sending = 0U;
}
static void seg_retransmit(struct ble_npl_event *work)
@@ -299,31 +437,24 @@ static void seg_retransmit(struct ble_npl_event *work)
}
static int send_seg(struct bt_mesh_net_tx *net_tx, struct os_mbuf *sdu,
- const struct bt_mesh_send_cb *cb, void *cb_data)
+ const struct bt_mesh_send_cb *cb, void *cb_data,
+ uint8_t *ctl_op)
{
- u8_t seg_hdr, seg_o;
- u16_t seq_zero;
+ bool blocked = false;
struct seg_tx *tx;
+ uint8_t seg_o;
int i;
BT_DBG("src 0x%04x dst 0x%04x app_idx 0x%04x aszmic %u sdu_len %u",
net_tx->src, net_tx->ctx->addr, net_tx->ctx->app_idx,
net_tx->aszmic, sdu->om_len);
- if (sdu->om_len < 1) {
- BT_ERR("Zero-length SDU not allowed");
- return -EINVAL;
- }
-
- if (sdu->om_len > BT_MESH_TX_SDU_MAX) {
- BT_ERR("Not enough segment buffers for length %u", sdu->om_len);
- return -EMSGSIZE;
- }
-
for (tx = NULL, i = 0; i < ARRAY_SIZE(seg_tx); i++) {
- if (!seg_tx[i].nack_count) {
+ if (seg_tx[i].nack_count) {
+ blocked |= seg_tx_blocks(&seg_tx[i], net_tx->src,
+ net_tx->ctx->addr);
+ } else if (!tx) {
tx = &seg_tx[i];
- break;
}
}
@@ -332,31 +463,37 @@ static int send_seg(struct bt_mesh_net_tx *net_tx, struct os_mbuf *sdu,
return -EBUSY;
}
- if (BT_MESH_IS_DEV_KEY(net_tx->ctx->app_idx)) {
- seg_hdr = SEG_HDR(0, 0);
+ if (ctl_op) {
+ tx->hdr = TRANS_CTL_HDR(*ctl_op, 1);
+ } else if (BT_MESH_IS_DEV_KEY(net_tx->ctx->app_idx)) {
+ tx->hdr = SEG_HDR(0, 0);
} else {
- seg_hdr = SEG_HDR(1, net_tx->aid);
+ tx->hdr = SEG_HDR(1, net_tx->aid);
}
- seg_o = 0;
+ tx->src = net_tx->src;
tx->dst = net_tx->ctx->addr;
- tx->seg_n = (sdu->om_len - 1) / 12;
+ tx->seg_n = (sdu->om_len - 1) / seg_len(!!ctl_op);
+ tx->seg_o = 0;
+ tx->len = sdu->om_len;
tx->nack_count = tx->seg_n + 1;
tx->seq_auth = SEQ_AUTH(BT_MESH_NET_IVI_TX, bt_mesh.seq);
tx->sub = net_tx->sub;
- tx->new_key = net_tx->sub->kr_flag;
tx->cb = cb;
tx->cb_data = cb_data;
+ tx->attempts = SEG_RETRANSMIT_ATTEMPTS;
+ tx->seg_pending = 0;
+ tx->xmit = net_tx->xmit;
+ tx->aszmic = net_tx->aszmic;
+ tx->friend_cred = net_tx->friend_cred;
+ tx->blocked = blocked;
+ tx->started = 0;
+ tx->ctl = !!ctl_op;
- if (net_tx->ctx->send_ttl == BT_MESH_TTL_DEFAULT) {
- tx->ttl = bt_mesh_default_ttl_get();
- } else {
- tx->ttl = net_tx->ctx->send_ttl;
- }
+ tx->ttl = net_tx->ctx->send_ttl;
- seq_zero = tx->seq_auth & TRANS_SEQ_ZERO_MASK;
-
- BT_DBG("SeqZero 0x%04x", seq_zero);
+ BT_DBG("SeqZero 0x%04x (segs: %u)",
+ (uint16_t)(tx->seq_auth & TRANS_SEQ_ZERO_MASK), tx->nack_count);
if (IS_ENABLED(CONFIG_BT_MESH_FRIEND) &&
!bt_mesh_friend_queue_has_space(tx->sub->net_idx, net_tx->src,
@@ -370,66 +507,48 @@ static int send_seg(struct bt_mesh_net_tx *net_tx, struct os_mbuf *sdu,
}
for (seg_o = 0; sdu->om_len; seg_o++) {
- struct os_mbuf *seg;
- u16_t len;
+ void *buf;
+ uint16_t len;
int err;
- seg = bt_mesh_adv_create(BT_MESH_ADV_DATA, net_tx->xmit,
- BUF_TIMEOUT);
- if (!seg) {
+ err = k_mem_slab_alloc(&segs, &buf);
+ if (err) {
BT_ERR("Out of segment buffers");
seg_tx_reset(tx);
return -ENOBUFS;
}
- BT_MESH_ADV(seg)->seg.attempts = SEG_RETRANSMIT_ATTEMPTS;
+ len = MIN(sdu->om_len, seg_len(!!ctl_op));
+ memcpy(buf, net_buf_simple_pull_mem(sdu, len), len);
+ BT_DBG("seg %u: %s", seg_o, bt_hex(buf, len));
- net_buf_reserve(seg, BT_MESH_NET_HDR_LEN);
-
- net_buf_add_u8(seg, seg_hdr);
- net_buf_add_u8(seg, (net_tx->aszmic << 7) | seq_zero >> 6);
- net_buf_add_u8(seg, (((seq_zero & 0x3f) << 2) |
- (seg_o >> 3)));
- net_buf_add_u8(seg, ((seg_o & 0x07) << 5) | tx->seg_n);
-
- len = min(sdu->om_len, 12);
- net_buf_add_mem(seg, sdu->om_data, len);
- net_buf_simple_pull(sdu, len);
+ tx->seg[seg_o] = buf;
if (IS_ENABLED(CONFIG_BT_MESH_FRIEND)) {
enum bt_mesh_friend_pdu_type type;
+ struct os_mbuf *seg = NET_BUF_SIMPLE(16);
+ seg_tx_buf_build(tx, seg_o, seg);
+
if (seg_o == tx->seg_n) {
type = BT_MESH_FRIEND_PDU_COMPLETE;
} else {
type = BT_MESH_FRIEND_PDU_PARTIAL;
}
- if (bt_mesh_friend_enqueue_tx(net_tx, type,
- &tx->seq_auth,
- tx->seg_n + 1,
- seg) &&
+ if (bt_mesh_friend_enqueue_tx(
+ net_tx, type, ctl_op ? NULL : &tx->seq_auth,
+ tx->seg_n + 1, seg) &&
BT_MESH_ADDR_IS_UNICAST(net_tx->ctx->addr)) {
/* PDUs for a specific Friend should only go
* out through the Friend Queue.
*/
- net_buf_unref(seg);
- continue;
+ k_mem_slab_free(&segs, &buf);
+ tx->seg[seg_o] = NULL;
}
+ os_mbuf_free_chain(seg);
}
- tx->seg[seg_o] = net_buf_ref(seg);
-
- BT_DBG("Sending %u/%u", seg_o, tx->seg_n);
-
- err = bt_mesh_net_send(net_tx, seg,
- seg_o ? &seg_sent_cb : &first_sent_cb,
- tx);
- if (err) {
- BT_ERR("Sending segment failed");
- seg_tx_reset(tx);
- return err;
- }
}
/* This can happen if segments only went into the Friend Queue */
@@ -441,8 +560,21 @@ static int send_seg(struct bt_mesh_net_tx *net_tx, struct os_mbuf *sdu,
* with the Friend Queue.
*/
send_cb_finalize(cb, cb_data);
+ return 0;
+ }
+
+ if (blocked) {
+ /* Move the sequence number, so we don't end up creating
+ * another segmented transmission with the same SeqZero while
+ * this one is blocked.
+ */
+ bt_mesh_next_seq();
+ BT_DBG("Blocked.");
+ return 0;
}
+ seg_tx_send_unacked(tx);
+
if (IS_ENABLED(CONFIG_BT_MESH_LOW_POWER) &&
bt_mesh_lpn_established()) {
bt_mesh_lpn_poll();
@@ -451,50 +583,75 @@ static int send_seg(struct bt_mesh_net_tx *net_tx, struct os_mbuf *sdu,
return 0;
}
-struct bt_mesh_app_key *bt_mesh_app_key_find(u16_t app_idx)
+static int trans_encrypt(const struct bt_mesh_net_tx *tx, const uint8_t *key,
+ struct os_mbuf *msg)
{
- int i;
-
- for (i = 0; i < ARRAY_SIZE(bt_mesh.app_keys); i++) {
- struct bt_mesh_app_key *key = &bt_mesh.app_keys[i];
+ struct bt_mesh_app_crypto_ctx crypto = {
+ .dev_key = BT_MESH_IS_DEV_KEY(tx->ctx->app_idx),
+ .aszmic = tx->aszmic,
+ .src = tx->src,
+ .dst = tx->ctx->addr,
+ .seq_num = bt_mesh.seq,
+ .iv_index = BT_MESH_NET_IVI_TX,
+ };
- if (key->net_idx != BT_MESH_KEY_UNUSED &&
- key->app_idx == app_idx) {
- return key;
- }
+ if (BT_MESH_ADDR_IS_VIRTUAL(tx->ctx->addr)) {
+ crypto.ad = bt_mesh_va_label_get(tx->ctx->addr);
}
- return NULL;
+ return bt_mesh_app_encrypt(key, &crypto, msg);
}
int bt_mesh_trans_send(struct bt_mesh_net_tx *tx, struct os_mbuf *msg,
const struct bt_mesh_send_cb *cb, void *cb_data)
{
- const u8_t *key;
- u8_t *ad;
- u8_t aid;
+ const uint8_t *key;
+ uint8_t aid;
int err;
+ if (msg->om_len < 1) {
+ BT_ERR("Zero-length SDU not allowed");
+ return -EINVAL;
+ }
+
+ if (msg->om_len > BT_MESH_TX_SDU_MAX) {
+ BT_ERR("Not enough segment buffers for length %u", msg->om_len);
+ return -EMSGSIZE;
+ }
+
if (net_buf_simple_tailroom(msg) < 4) {
BT_ERR("Insufficient tailroom for Transport MIC");
return -EINVAL;
}
- if (msg->om_len > 11) {
- tx->ctx->send_rel = 1;
+ if (tx->ctx->send_ttl == BT_MESH_TTL_DEFAULT) {
+ tx->ctx->send_ttl = bt_mesh_default_ttl_get();
+ } else if (tx->ctx->send_ttl > BT_MESH_TTL_MAX) {
+ BT_ERR("TTL too large (max 127)");
+ return -EINVAL;
+ }
+
+ if (msg->om_len > BT_MESH_SDU_UNSEG_MAX) {
tx->ctx->send_rel = true;
}
+ if (tx->ctx->addr == BT_MESH_ADDR_UNASSIGNED ||
+ (!BT_MESH_ADDR_IS_UNICAST(tx->ctx->addr) &&
+ BT_MESH_IS_DEV_KEY(tx->ctx->app_idx))) {
+ BT_ERR("Invalid destination address");
+ return -EINVAL;
+ }
+
BT_DBG("net_idx 0x%04x app_idx 0x%04x dst 0x%04x", tx->sub->net_idx,
tx->ctx->app_idx, tx->ctx->addr);
BT_DBG("len %u: %s", msg->om_len, bt_hex(msg->om_data, msg->om_len));
- err = bt_mesh_app_key_get(tx->sub, tx->ctx->app_idx,
- tx->ctx->addr, &key, &aid);
+ err = bt_mesh_keys_resolve(tx->ctx, &tx->sub, &key, &aid);
if (err) {
return err;
}
+ tx->xmit = bt_mesh_net_transmit_get();
tx->aid = aid;
if (!tx->ctx->send_rel || net_buf_simple_tailroom(msg) < 8) {
@@ -503,114 +660,79 @@ int bt_mesh_trans_send(struct bt_mesh_net_tx *tx, struct os_mbuf *msg,
tx->aszmic = 1;
}
- if (BT_MESH_ADDR_IS_VIRTUAL(tx->ctx->addr)) {
- ad = bt_mesh_label_uuid_get(tx->ctx->addr);
- } else {
- ad = NULL;
- }
-
- err = bt_mesh_app_encrypt(key, BT_MESH_IS_DEV_KEY(tx->ctx->app_idx),
- tx->aszmic, msg, ad, tx->src, tx->ctx->addr,
- bt_mesh.seq, BT_MESH_NET_IVI_TX);
+ err = trans_encrypt(tx, key, msg);
if (err) {
return err;
}
if (tx->ctx->send_rel) {
- err = send_seg(tx, msg, cb, cb_data);
+ err = send_seg(tx, msg, cb, cb_data, NULL);
} else {
- err = send_unseg(tx, msg, cb, cb_data);
+ err = send_unseg(tx, msg, cb, cb_data, NULL);
}
return err;
}
-static void update_rpl(struct bt_mesh_rpl *rpl, struct bt_mesh_net_rx *rx)
-{
- rpl->src = rx->ctx.addr;
- rpl->seq = rx->seq;
- rpl->old_iv = rx->old_iv;
-
- if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
- bt_mesh_store_rpl(rpl);
- }
-}
-
-/* Check the Replay Protection List for a replay attempt. If non-NULL match
- * parameter is given the RPL slot is returned but it is not immediately
- * updated (needed for segmented messages), whereas if a NULL match is given
- * the RPL is immediately updated (used for unsegmented messages).
- */
-static bool is_replay(struct bt_mesh_net_rx *rx, struct bt_mesh_rpl **match)
+static void seg_rx_assemble(struct seg_rx *rx, struct os_mbuf *buf,
+ uint8_t aszmic)
{
int i;
- /* Don't bother checking messages from ourselves */
- if (rx->net_if == BT_MESH_NET_IF_LOCAL) {
- return false;
- }
+ net_buf_simple_reset(buf);
- /* The RPL is used only for the local node */
- if (!rx->local_match) {
- return false;
+ for (i = 0; i <= rx->seg_n; i++) {
+ net_buf_simple_add_mem(buf, rx->seg[i],
+ MIN(seg_len(rx->ctl),
+ rx->len - (i * seg_len(rx->ctl))));
}
- for (i = 0; i < ARRAY_SIZE(bt_mesh.rpl); i++) {
- struct bt_mesh_rpl *rpl = &bt_mesh.rpl[i];
-
- /* Empty slot */
- if (!rpl->src) {
- if (match) {
- *match = rpl;
- } else {
- update_rpl(rpl, rx);
- }
-
- return false;
- }
+ /* Adjust the length to not contain the MIC at the end */
+ if (!rx->ctl) {
+ buf->om_len -= APP_MIC_LEN(aszmic);
+ }
+}
- /* Existing slot for given address */
- if (rpl->src == rx->ctx.addr) {
- if (rx->old_iv && !rpl->old_iv) {
- return true;
- }
+struct decrypt_ctx {
+ struct bt_mesh_app_crypto_ctx crypto;
+ struct os_mbuf *buf;
+ struct os_mbuf *sdu;
+ struct seg_rx *seg;
+};
- if ((!rx->old_iv && rpl->old_iv) ||
- rpl->seq < rx->seq) {
- if (match) {
- *match = rpl;
- } else {
- update_rpl(rpl, rx);
- }
+static int sdu_try_decrypt(struct bt_mesh_net_rx *rx, const uint8_t key[16],
+ void *cb_data)
+{
+ const struct decrypt_ctx *ctx = cb_data;
- return false;
- } else {
- return true;
- }
- }
+ if (ctx->seg) {
+ seg_rx_assemble(ctx->seg, ctx->buf, ctx->crypto.aszmic);
}
- BT_ERR("RPL is full!");
- return true;
+ net_buf_simple_reset(ctx->sdu);
+
+ return bt_mesh_app_decrypt(key, &ctx->crypto, ctx->buf, ctx->sdu);
}
-static int sdu_recv(struct bt_mesh_net_rx *rx, u32_t seq, u8_t hdr,
- u8_t aszmic, struct os_mbuf *buf)
+static int sdu_recv(struct bt_mesh_net_rx *rx, uint8_t hdr, uint8_t aszmic,
+ struct os_mbuf *buf, struct os_mbuf *sdu,
+ struct seg_rx *seg)
{
- struct os_mbuf *sdu =
- NET_BUF_SIMPLE(MYNEWT_VAL(BLE_MESH_RX_SDU_MAX) - 4);
- u8_t *ad;
- u16_t i;
- int err = 0;
+ struct decrypt_ctx ctx = {
+ .crypto = {
+ .dev_key = !AKF(&hdr),
+ .aszmic = aszmic,
+ .src = rx->ctx.addr,
+ .dst = rx->ctx.recv_dst,
+ .seq_num = seg ? (seg->seq_auth & 0xffffff) : rx->seq,
+ .iv_index = BT_MESH_NET_IVI_RX(rx),
+ },
+ .buf = buf,
+ .sdu = sdu,
+ .seg = seg,
+ };
- BT_DBG("ASZMIC %u AKF %u AID 0x%02x", aszmic, AKF(&hdr), AID(&hdr));
- BT_DBG("len %u: %s", buf->om_len, bt_hex(buf->om_data, buf->om_len));
-
- if (buf->om_len < 1 + APP_MIC_LEN(aszmic)) {
- BT_ERR("Too short SDU + MIC");
- err = -EINVAL;
- goto done;
- }
+ BT_DBG("AKF %u AID 0x%02x", !ctx.crypto.dev_key, AID(&hdr));
if (IS_ENABLED(CONFIG_BT_MESH_FRIEND) && !rx->local_match) {
BT_DBG("Ignoring PDU for LPN 0x%04x of this Friend",
@@ -619,109 +741,26 @@ static int sdu_recv(struct bt_mesh_net_rx *rx, u32_t seq, u8_t hdr,
}
if (BT_MESH_ADDR_IS_VIRTUAL(rx->ctx.recv_dst)) {
- ad = bt_mesh_label_uuid_get(rx->ctx.recv_dst);
- } else {
- ad = NULL;
- }
-
- /* Adjust the length to not contain the MIC at the end */
- buf->om_len -= APP_MIC_LEN(aszmic);
-
- if (!AKF(&hdr)) {
- net_buf_simple_init(sdu, 0);
- err = bt_mesh_app_decrypt(bt_mesh.dev_key, true, aszmic, buf,
- sdu, ad, rx->ctx.addr,
- rx->ctx.recv_dst, seq,
- BT_MESH_NET_IVI_RX(rx));
- if (err) {
- BT_WARN("Unable to decrypt with local DevKey");
- } else {
- rx->ctx.app_idx = BT_MESH_KEY_DEV_LOCAL;
- bt_mesh_model_recv(rx, sdu);
- goto done;
- }
-
- if (IS_ENABLED(CONFIG_BT_MESH_PROVISIONER)) {
- struct bt_mesh_node *node;
-
- /*
- * There is no way of knowing if we should use our
- * local DevKey or the remote DevKey to decrypt the
- * message so we must try both.
- */
-
- node = bt_mesh_node_find(rx->ctx.addr);
- if (node == NULL) {
- BT_ERR("No node found for addr 0x%04x",
- rx->ctx.addr);
- return -EINVAL;
- }
-
- net_buf_simple_init(sdu, 0);
- err = bt_mesh_app_decrypt(node->dev_key, true, aszmic,
- buf, sdu, ad, rx->ctx.addr,
- rx->ctx.recv_dst, seq,
- BT_MESH_NET_IVI_RX(rx));
- if (err) {
- BT_ERR("Unable to decrypt with node DevKey");
- return -EINVAL;
- }
-
- rx->ctx.app_idx = BT_MESH_KEY_DEV_REMOTE;
- bt_mesh_model_recv(rx, sdu);
- return 0;
- }
-
- return -EINVAL;
+ ctx.crypto.ad = bt_mesh_va_label_get(rx->ctx.recv_dst);
}
- for (i = 0; i < ARRAY_SIZE(bt_mesh.app_keys); i++) {
- struct bt_mesh_app_key *key = &bt_mesh.app_keys[i];
- struct bt_mesh_app_keys *keys;
-
- /* Check that this AppKey matches received net_idx */
- if (key->net_idx != rx->sub->net_idx) {
- continue;
- }
-
- if (rx->new_key && key->updated) {
- keys = &key->keys[1];
- } else {
- keys = &key->keys[0];
- }
-
- /* Check that the AppKey ID matches */
- if (AID(&hdr) != keys->id) {
- continue;
- }
-
- net_buf_simple_init(sdu, 0);
- err = bt_mesh_app_decrypt(keys->val, false, aszmic, buf,
- sdu, ad, rx->ctx.addr,
- rx->ctx.recv_dst, seq,
- BT_MESH_NET_IVI_RX(rx));
- if (err) {
- BT_WARN("Unable to decrypt with AppKey 0x%03x",
- key->app_idx);
- continue;
-
- }
-
- rx->ctx.app_idx = key->app_idx;
-
- bt_mesh_model_recv(rx, sdu);
+ rx->ctx.app_idx = bt_mesh_app_key_find(ctx.crypto.dev_key, AID(&hdr),
+ rx, sdu_try_decrypt, &ctx);
+ if (rx->ctx.app_idx == BT_MESH_KEY_UNUSED) {
+ BT_DBG("No matching AppKey");
goto done;
}
- BT_WARN("No matching AppKey");
+ BT_DBG("Decrypted (AppIdx: 0x%03x)", rx->ctx.app_idx);
+
+ bt_mesh_model_recv(rx, sdu);
- err = -EINVAL;
done:
os_mbuf_free_chain(sdu);
- return err;
+ return 0;
}
-static struct seg_tx *seg_tx_lookup(u16_t seq_zero, u8_t obo, u16_t addr)
+static struct seg_tx *seg_tx_lookup(uint16_t seq_zero, uint8_t obo, uint16_t addr)
{
struct seg_tx *tx;
int i;
@@ -751,14 +790,14 @@ static struct seg_tx *seg_tx_lookup(u16_t seq_zero, u8_t obo, u16_t addr)
return NULL;
}
-static int trans_ack(struct bt_mesh_net_rx *rx, u8_t hdr,
- struct os_mbuf *buf, u64_t *seq_auth)
+static int trans_ack(struct bt_mesh_net_rx *rx, uint8_t hdr,
+ struct os_mbuf *buf, uint64_t *seq_auth)
{
struct seg_tx *tx;
unsigned int bit;
- u32_t ack;
- u16_t seq_zero;
- u8_t obo;
+ uint32_t ack;
+ uint16_t seq_zero;
+ uint8_t obo;
if (buf->om_len < 6) {
BT_ERR("Too short ack message");
@@ -787,6 +826,11 @@ static int trans_ack(struct bt_mesh_net_rx *rx, u8_t hdr,
return -EINVAL;
}
+ if (!BT_MESH_ADDR_IS_UNICAST(tx->dst)) {
+ BT_ERR("Received ack for group seg");
+ return -EINVAL;
+ }
+
*seq_auth = tx->seq_auth;
if (!ack) {
@@ -805,9 +849,7 @@ static int trans_ack(struct bt_mesh_net_rx *rx, u8_t hdr,
while ((bit = find_lsb_set(ack))) {
if (tx->seg[bit - 1]) {
BT_DBG("seg %u/%u acked", bit - 1, tx->seg_n);
- net_buf_unref(tx->seg[bit - 1]);
- tx->seg[bit - 1] = NULL;
- tx->nack_count--;
+ seg_tx_done(tx, bit - 1);
}
ack &= ~BIT(bit - 1);
@@ -823,40 +865,10 @@ static int trans_ack(struct bt_mesh_net_rx *rx, u8_t hdr,
return 0;
}
-static int trans_heartbeat(struct bt_mesh_net_rx *rx,
- struct os_mbuf *buf)
-{
- u8_t init_ttl, hops;
- u16_t feat;
-
- if (buf->om_len < 3) {
- BT_ERR("Too short heartbeat message");
- return -EINVAL;
- }
-
- if (rx->ctx.recv_dst != hb_sub_dst) {
- BT_WARN("Ignoring heartbeat to non-subscribed destination");
- return 0;
- }
-
- init_ttl = (net_buf_simple_pull_u8(buf) & 0x7f);
- feat = net_buf_simple_pull_be16(buf);
-
- hops = (init_ttl - rx->ctx.recv_ttl + 1);
-
- BT_DBG("src 0x%04x TTL %u InitTTL %u (%u hop%s) feat 0x%04x",
- rx->ctx.addr, rx->ctx.recv_ttl, init_ttl, hops,
- (hops == 1) ? "" : "s", feat);
-
- bt_mesh_heartbeat(rx->ctx.addr, rx->ctx.recv_dst, hops, feat);
-
- return 0;
-}
-
-static int ctl_recv(struct bt_mesh_net_rx *rx, u8_t hdr,
- struct os_mbuf *buf, u64_t *seq_auth)
+static int ctl_recv(struct bt_mesh_net_rx *rx, uint8_t hdr,
+ struct os_mbuf *buf, uint64_t *seq_auth)
{
- u8_t ctl_op = TRANS_CTL_OP(&hdr);
+ uint8_t ctl_op = TRANS_CTL_OP(&hdr);
BT_DBG("OpCode 0x%02x len %u", ctl_op, buf->om_len);
@@ -864,7 +876,7 @@ static int ctl_recv(struct bt_mesh_net_rx *rx, u8_t hdr,
case TRANS_CTL_OP_ACK:
return trans_ack(rx, hdr, buf, seq_auth);
case TRANS_CTL_OP_HEARTBEAT:
- return trans_heartbeat(rx, buf);
+ return bt_mesh_hb_recv(rx, buf);
}
/* Only acks and heartbeats may need processing without local_match */
@@ -919,9 +931,10 @@ static int ctl_recv(struct bt_mesh_net_rx *rx, u8_t hdr,
}
static int trans_unseg(struct os_mbuf *buf, struct bt_mesh_net_rx *rx,
- u64_t *seq_auth)
+ uint64_t *seq_auth)
{
- u8_t hdr;
+ struct os_mbuf *sdu = NET_BUF_SIMPLE(BT_MESH_SDU_UNSEG_MAX);
+ uint8_t hdr;
BT_DBG("AFK %u AID 0x%02x", AKF(buf->om_data), AID(buf->om_data));
@@ -930,7 +943,7 @@ static int trans_unseg(struct os_mbuf *buf, struct bt_mesh_net_rx *rx,
return -EINVAL;
}
- if (is_replay(rx, NULL)) {
+ if (bt_mesh_rpl_check(rx, NULL)) {
BT_WARN("Replay: src 0x%04x dst 0x%04x seq 0x%06x",
rx->ctx.addr, rx->ctx.recv_dst, (unsigned) rx->seq);
return -EINVAL;
@@ -940,20 +953,23 @@ static int trans_unseg(struct os_mbuf *buf, struct bt_mesh_net_rx *rx,
if (rx->ctl) {
return ctl_recv(rx, hdr, buf, seq_auth);
- } else {
- /* SDUs must match a local element or an LPN of this Friend. */
- if (!rx->local_match && !rx->friend_match) {
- return 0;
- }
+ }
- return sdu_recv(rx, rx->seq, hdr, 0, buf);
+ if (buf->om_len < 1 + APP_MIC_LEN(0)) {
+ BT_ERR("Too short SDU + MIC");
+ return -EINVAL;
}
+
+ /* Adjust the length to not contain the MIC at the end */
+ buf->om_len -= APP_MIC_LEN(0);
+
+ return sdu_recv(rx, hdr, 0, buf, sdu, NULL);
}
-static inline s32_t ack_timeout(struct seg_rx *rx)
+static inline int32_t ack_timeout(struct seg_rx *rx)
{
- s32_t to;
- u8_t ttl;
+ int32_t to;
+ uint8_t ttl;
if (rx->ttl == BT_MESH_TTL_DEFAULT) {
ttl = bt_mesh_default_ttl_get();
@@ -975,45 +991,46 @@ static inline s32_t ack_timeout(struct seg_rx *rx)
return max(to, K_MSEC(400));
}
-int bt_mesh_ctl_send(struct bt_mesh_net_tx *tx, u8_t ctl_op, void *data,
- size_t data_len, u64_t *seq_auth,
- const struct bt_mesh_send_cb *cb, void *cb_data)
+int bt_mesh_ctl_send(struct bt_mesh_net_tx *tx, uint8_t ctl_op, void *data,
+ size_t data_len, const struct bt_mesh_send_cb *cb, void *cb_data)
{
- struct os_mbuf *buf;
+ struct os_mbuf *buf = NET_BUF_SIMPLE(data_len);
- BT_DBG("src 0x%04x dst 0x%04x ttl 0x%02x ctl 0x%02x", tx->src,
- tx->ctx->addr, tx->ctx->send_ttl, ctl_op);
- BT_DBG("len %zu: %s", data_len, bt_hex(data, data_len));
+ net_buf_simple_init_with_data(buf, data, data_len);
- buf = bt_mesh_adv_create(BT_MESH_ADV_DATA, tx->xmit, BUF_TIMEOUT);
- if (!buf) {
- BT_ERR("Out of transport buffers");
- return -ENOBUFS;
+ if (tx->ctx->send_ttl == BT_MESH_TTL_DEFAULT) {
+ tx->ctx->send_ttl = bt_mesh_default_ttl_get();
+ } else if (tx->ctx->send_ttl > BT_MESH_TTL_MAX) {
+ BT_ERR("TTL too large (max 127)");
+ return -EINVAL;
}
- net_buf_reserve(buf, BT_MESH_NET_HDR_LEN);
-
- net_buf_add_u8(buf, TRANS_CTL_HDR(ctl_op, 0));
+ if (data_len > BT_MESH_SDU_UNSEG_MAX) {
+ tx->ctx->send_rel = true;
+ }
- net_buf_add_mem(buf, data, data_len);
+ tx->ctx->app_idx = BT_MESH_KEY_UNUSED;
- if (IS_ENABLED(CONFIG_BT_MESH_FRIEND)) {
- if (bt_mesh_friend_enqueue_tx(tx, BT_MESH_FRIEND_PDU_SINGLE,
- seq_auth, 1, buf) &&
- BT_MESH_ADDR_IS_UNICAST(tx->ctx->addr)) {
- /* PDUs for a specific Friend should only go
- * out through the Friend Queue.
- */
- net_buf_unref(buf);
- return 0;
- }
+ if (tx->ctx->addr == BT_MESH_ADDR_UNASSIGNED ||
+ BT_MESH_ADDR_IS_VIRTUAL(tx->ctx->addr)) {
+ BT_ERR("Invalid destination address");
+ return -EINVAL;
}
- return bt_mesh_net_send(tx, buf, cb, cb_data);
+ BT_DBG("src 0x%04x dst 0x%04x ttl 0x%02x ctl 0x%02x", tx->src,
+ tx->ctx->addr, tx->ctx->send_ttl, ctl_op);
+ BT_DBG("len %zu: %s", data_len, bt_hex(data, data_len));
+
+ if (tx->ctx->send_rel) {
+ return send_seg(tx, buf, cb, cb_data, &ctl_op);
+ } else {
+ return send_unseg(tx, buf, cb, cb_data, &ctl_op);
+ }
+ os_mbuf_free_chain(buf);
}
-static int send_ack(struct bt_mesh_subnet *sub, u16_t src, u16_t dst,
- u8_t ttl, u64_t *seq_auth, u32_t block, u8_t obo)
+static int send_ack(struct bt_mesh_subnet *sub, uint16_t src, uint16_t dst,
+ uint8_t ttl, uint64_t *seq_auth, uint32_t block, uint8_t obo)
{
struct bt_mesh_msg_ctx ctx = {
.net_idx = sub->net_idx,
@@ -1027,8 +1044,8 @@ static int send_ack(struct bt_mesh_subnet *sub, u16_t src, u16_t dst,
.src = obo ? bt_mesh_primary_addr() : src,
.xmit = bt_mesh_net_transmit_get(),
};
- u16_t seq_zero = *seq_auth & TRANS_SEQ_ZERO_MASK;
- u8_t buf[6];
+ uint16_t seq_zero = *seq_auth & TRANS_SEQ_ZERO_MASK;
+ uint8_t buf[6];
BT_DBG("SeqZero 0x%04x Block 0x%08x OBO %u", seq_zero,
(unsigned) block, obo);
@@ -1042,7 +1059,7 @@ static int send_ack(struct bt_mesh_subnet *sub, u16_t src, u16_t dst,
* or virtual address.
*/
if (!BT_MESH_ADDR_IS_UNICAST(src)) {
- BT_WARN("Not sending ack for non-unicast address");
+ BT_DBG("Not sending ack for non-unicast address");
return 0;
}
@@ -1050,11 +1067,13 @@ static int send_ack(struct bt_mesh_subnet *sub, u16_t src, u16_t dst,
sys_put_be32(block, &buf[2]);
return bt_mesh_ctl_send(&tx, TRANS_CTL_OP_ACK, buf, sizeof(buf),
- NULL, NULL, NULL);
+ NULL, NULL);
}
static void seg_rx_reset(struct seg_rx *rx, bool full_reset)
{
+ int i;
+
BT_DBG("rx %p", rx);
k_delayed_work_cancel(&rx->ack);
@@ -1066,6 +1085,15 @@ static void seg_rx_reset(struct seg_rx *rx, bool full_reset)
&rx->seq_auth);
}
+ for (i = 0; i <= rx->seg_n; i++) {
+ if (!rx->seg[i]) {
+ continue;
+ }
+
+ k_mem_slab_free(&segs, &rx->seg[i]);
+ rx->seg[i] = NULL;
+ }
+
rx->in_use = 0;
/* We don't always reset these values since we need to be able to
@@ -1083,6 +1111,7 @@ static void seg_rx_reset(struct seg_rx *rx, bool full_reset)
static void seg_ack(struct ble_npl_event *work)
{
struct seg_rx *rx = ble_npl_event_get_arg(work);
+ int32_t timeout;
BT_DBG("rx %p", rx);
@@ -1100,25 +1129,17 @@ static void seg_ack(struct ble_npl_event *work)
send_ack(rx->sub, rx->dst, rx->src, rx->ttl, &rx->seq_auth,
rx->block, rx->obo);
- k_delayed_work_submit(&rx->ack, ack_timeout(rx));
+ timeout = ack_timeout(rx);
+ k_delayed_work_submit(&rx->ack, K_MSEC(timeout));
}
-static inline u8_t seg_len(bool ctl)
+static inline bool sdu_len_is_ok(bool ctl, uint8_t seg_n)
{
- if (ctl) {
- return 8;
- } else {
- return 12;
- }
-}
-
-static inline bool sdu_len_is_ok(bool ctl, u8_t seg_n)
-{
- return ((seg_n * seg_len(ctl) + 1) <= MYNEWT_VAL(BLE_MESH_RX_SDU_MAX));
+ return (seg_n < CONFIG_BT_MESH_RX_SEG_MAX);
}
static struct seg_rx *seg_rx_find(struct bt_mesh_net_rx *net_rx,
- const u64_t *seq_auth)
+ const uint64_t *seq_auth)
{
int i;
@@ -1155,7 +1176,7 @@ static struct seg_rx *seg_rx_find(struct bt_mesh_net_rx *net_rx,
}
static bool seg_rx_is_valid(struct seg_rx *rx, struct bt_mesh_net_rx *net_rx,
- const u8_t *hdr, u8_t seg_n)
+ const uint8_t *hdr, uint8_t seg_n)
{
if (rx->hdr != *hdr || rx->seg_n != seg_n) {
BT_ERR("Invalid segment for ongoing session");
@@ -1176,11 +1197,19 @@ static bool seg_rx_is_valid(struct seg_rx *rx, struct bt_mesh_net_rx *net_rx,
}
static struct seg_rx *seg_rx_alloc(struct bt_mesh_net_rx *net_rx,
- const u8_t *hdr, const u64_t *seq_auth,
- u8_t seg_n)
+ const uint8_t *hdr, const uint64_t *seq_auth,
+ uint8_t seg_n)
{
int i;
+ /* No race condition on this check, as this function only executes in
+ * the collaborative Bluetooth rx thread:
+ */
+ if (k_mem_slab_num_free_get(&segs) < 1) {
+ BT_WARN("Not enough segments for incoming message");
+ return NULL;
+ }
+
for (i = 0; i < ARRAY_SIZE(seg_rx); i++) {
struct seg_rx *rx = &seg_rx[i];
@@ -1189,7 +1218,6 @@ static struct seg_rx *seg_rx_alloc(struct bt_mesh_net_rx *net_rx,
}
rx->in_use = 1;
- net_buf_simple_init(rx->buf, 0);
rx->sub = net_rx->sub;
rx->ctl = net_rx->ctl;
rx->seq_auth = *seq_auth;
@@ -1210,15 +1238,15 @@ static struct seg_rx *seg_rx_alloc(struct bt_mesh_net_rx *net_rx,
}
static int trans_seg(struct os_mbuf *buf, struct bt_mesh_net_rx *net_rx,
- enum bt_mesh_friend_pdu_type *pdu_type, u64_t *seq_auth,
- u8_t *seg_count)
+ enum bt_mesh_friend_pdu_type *pdu_type, uint64_t *seq_auth,
+ uint8_t *seg_count)
{
struct bt_mesh_rpl *rpl = NULL;
struct seg_rx *rx;
- u8_t *hdr = buf->om_data;
- u16_t seq_zero;
- u8_t seg_n;
- u8_t seg_o;
+ uint8_t *hdr = buf->om_data;
+ uint16_t seq_zero;
+ uint8_t seg_n;
+ uint8_t seg_o;
int err;
if (buf->om_len < 5) {
@@ -1226,7 +1254,7 @@ static int trans_seg(struct os_mbuf *buf, struct bt_mesh_net_rx *net_rx,
return -EINVAL;
}
- if (is_replay(net_rx, &rpl)) {
+ if (bt_mesh_rpl_check(net_rx, &rpl)) {
BT_WARN("Replay: src 0x%04x dst 0x%04x seq 0x%06x",
net_rx->ctx.addr, net_rx->ctx.recv_dst, net_rx->seq);
return -EINVAL;
@@ -1290,14 +1318,14 @@ static int trans_seg(struct os_mbuf *buf, struct bt_mesh_net_rx *net_rx,
}
if (rx->block == BLOCK_COMPLETE(rx->seg_n)) {
- BT_WARN("Got segment for already complete SDU");
+ BT_DBG("Got segment for already complete SDU");
send_ack(net_rx->sub, net_rx->ctx.recv_dst,
net_rx->ctx.addr, net_rx->ctx.send_ttl,
seq_auth, rx->block, rx->obo);
if (rpl) {
- update_rpl(rpl, net_rx);
+ bt_mesh_rpl_update(rpl, net_rx);
}
return -EALREADY;
@@ -1351,7 +1379,7 @@ static int trans_seg(struct os_mbuf *buf, struct bt_mesh_net_rx *net_rx,
found_rx:
if (BIT(seg_o) & rx->block) {
- BT_WARN("Received already received fragment");
+ BT_DBG("Received already received fragment");
return -EALREADY;
}
@@ -1361,11 +1389,11 @@ found_rx:
*/
if (seg_o == seg_n) {
/* Set the expected final buffer length */
- rx->buf->om_len = seg_n * seg_len(rx->ctl) + buf->om_len;
+ rx->len = seg_n * seg_len(rx->ctl) + buf->om_len;
BT_DBG("Target len %u * %u + %u = %u", seg_n, seg_len(rx->ctl),
- buf->om_len, rx->buf->om_len);
+ buf->om_len, rx->len);
- if (rx->buf->om_len > MYNEWT_VAL(BLE_MESH_RX_SDU_MAX)) {
+ if (rx->len > BT_MESH_RX_SDU_MAX) {
BT_ERR("Too large SDU len");
send_ack(net_rx->sub, net_rx->ctx.recv_dst,
net_rx->ctx.addr, net_rx->ctx.send_ttl,
@@ -1385,11 +1413,20 @@ found_rx:
if (!k_delayed_work_remaining_get(&rx->ack) &&
!bt_mesh_lpn_established()) {
- k_delayed_work_submit(&rx->ack, ack_timeout(rx));
+ int32_t timeout = ack_timeout(rx);
+
+ k_delayed_work_submit(&rx->ack, K_MSEC(timeout));
}
- /* Location in buffer can be calculated based on seg_o & rx->ctl */
- memcpy(rx->buf->om_data + (seg_o * seg_len(rx->ctl)), buf->om_data, buf->om_len);
+ /* Allocated segment here */
+ err = k_mem_slab_alloc(&segs, &rx->seg[seg_o]);
+ if (err) {
+ BT_WARN("Unable allocate buffer for Seg %u", seg_o);
+ return -ENOBUFS;
+ }
+
+ os_mbuf_copydata(buf, 0, buf->om_len, rx->seg[seg_o]);
+ BT_DBG("copied %s", bt_hex(rx->seg[seg_o], rx->len));
BT_DBG("Received %u/%u", seg_o, seg_n);
@@ -1404,7 +1441,7 @@ found_rx:
BT_DBG("Complete SDU");
if (rpl) {
- update_rpl(rpl, net_rx);
+ bt_mesh_rpl_update(rpl, net_rx);
}
*pdu_type = BT_MESH_FRIEND_PDU_COMPLETE;
@@ -1414,23 +1451,40 @@ found_rx:
net_rx->ctx.send_ttl, seq_auth, rx->block, rx->obo);
if (net_rx->ctl) {
- err = ctl_recv(net_rx, *hdr, rx->buf, seq_auth);
+ struct os_mbuf *sdu = NET_BUF_SIMPLE(BT_MESH_RX_CTL_MAX);
+ seg_rx_assemble(rx, sdu, 0U);
+ err = ctl_recv(net_rx, *hdr, sdu, seq_auth);
+ } else if (rx->len < 1 + APP_MIC_LEN(ASZMIC(hdr))) {
+ BT_ERR("Too short SDU + MIC");
+ err = -EINVAL;
} else {
- err = sdu_recv(net_rx, (rx->seq_auth & 0xffffff), *hdr,
- ASZMIC(hdr), rx->buf);
+ struct os_mbuf *seg_buf = NET_BUF_SIMPLE(BT_MESH_RX_SDU_MAX);
+ struct os_mbuf *sdu;
+
+ /* Decrypting in place to avoid creating two assembly buffers.
+ * We'll reassemble the buffer from the segments before each
+ * decryption attempt.
+ */
+ net_buf_simple_init(seg_buf, 0);
+
+ sdu = NET_BUF_SIMPLE(rx->len - APP_MIC_LEN(ASZMIC(hdr)));
+ net_buf_simple_init_with_data(
+ sdu, seg_buf->om_data, rx->len - APP_MIC_LEN(ASZMIC(hdr)));
+
+ err = sdu_recv(net_rx, *hdr, ASZMIC(hdr), seg_buf, sdu, rx);
+ os_mbuf_free_chain(seg_buf);
}
seg_rx_reset(rx, false);
-
return err;
}
int bt_mesh_trans_recv(struct os_mbuf *buf, struct bt_mesh_net_rx *rx)
{
- u64_t seq_auth = TRANS_SEQ_AUTH_NVAL;
+ uint64_t seq_auth = TRANS_SEQ_AUTH_NVAL;
enum bt_mesh_friend_pdu_type pdu_type = BT_MESH_FRIEND_PDU_SINGLE;
struct net_buf_simple_state state;
- u8_t seg_count = 0;
+ uint8_t seg_count = 0;
int err;
if (IS_ENABLED(CONFIG_BT_MESH_FRIEND)) {
@@ -1525,28 +1579,43 @@ void bt_mesh_rx_reset(void)
for (i = 0; i < ARRAY_SIZE(seg_rx); i++) {
seg_rx_reset(&seg_rx[i], true);
}
-
- if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
- bt_mesh_clear_rpl();
- } else {
- memset(bt_mesh.rpl, 0, sizeof(bt_mesh.rpl));
- }
}
-void bt_mesh_tx_reset(void)
+void bt_mesh_trans_reset(void)
{
int i;
+ bt_mesh_rx_reset();
+
BT_DBG("");
for (i = 0; i < ARRAY_SIZE(seg_tx); i++) {
seg_tx_reset(&seg_tx[i]);
}
+
+ for (i = 0; i < ARRAY_SIZE(virtual_addrs); i++) {
+ if (virtual_addrs[i].ref) {
+ virtual_addrs[i].ref = 0U;
+ virtual_addrs[i].changed = 1U;
+ }
+ }
+
+ bt_mesh_rpl_clear();
+
+ if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
+ bt_mesh_store_label();
+ }
}
void bt_mesh_trans_init(void)
{
- int i;
+ int i, rc;
+
+ /* We need to initialize memslab free list here */
+ rc = create_free_list(&segs);
+ if (rc) {
+ BT_ERR("Failed to create free memslab list")
+ }
for (i = 0; i < ARRAY_SIZE(seg_tx); i++) {
k_delayed_work_init(&seg_tx[i].retransmit, seg_retransmit);
@@ -1557,112 +1626,124 @@ void bt_mesh_trans_init(void)
* For now we increase MSYS_1_BLOCK_COUNT
*/
for (i = 0; i < ARRAY_SIZE(seg_rx); i++) {
- seg_rx[i].buf = NET_BUF_SIMPLE(MYNEWT_VAL(BLE_MESH_RX_SDU_MAX));
k_delayed_work_init(&seg_rx[i].ack, seg_ack);
k_delayed_work_add_arg(&seg_rx[i].ack, &seg_rx[i]);
}
}
-void bt_mesh_rpl_clear(void)
+struct bt_mesh_va *bt_mesh_va_get(uint16_t index)
{
- BT_DBG("");
- memset(bt_mesh.rpl, 0, sizeof(bt_mesh.rpl));
+ if (index >= ARRAY_SIZE(virtual_addrs)) {
+ return NULL;
+ }
+
+ return &virtual_addrs[index];
}
-void bt_mesh_heartbeat_send(void)
+static inline void va_store(struct bt_mesh_va *store)
{
- struct bt_mesh_cfg_srv *cfg = bt_mesh_cfg_get();
- u16_t feat = 0U;
- struct __packed {
- u8_t init_ttl;
- u16_t feat;
- } hb;
- struct bt_mesh_msg_ctx ctx = {
- .net_idx = cfg->hb_pub.net_idx,
- .app_idx = BT_MESH_KEY_UNUSED,
- .addr = cfg->hb_pub.dst,
- .send_ttl = cfg->hb_pub.ttl,
- };
- struct bt_mesh_net_tx tx = {
- .sub = bt_mesh_subnet_get(cfg->hb_pub.net_idx),
- .ctx = &ctx,
- .src = bt_mesh_model_elem(cfg->model)->addr,
- .xmit = bt_mesh_net_transmit_get(),
- };
-
- /* Do nothing if heartbeat publication is not enabled */
- if (cfg->hb_pub.dst == BT_MESH_ADDR_UNASSIGNED) {
- return;
+ store->changed = 1U;
+ if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
+ bt_mesh_store_label();
}
+}
- hb.init_ttl = cfg->hb_pub.ttl;
+uint8_t bt_mesh_va_add(uint8_t uuid[16], uint16_t *addr)
+{
+ struct bt_mesh_va *va = NULL;
+ int err;
- if (bt_mesh_relay_get() == BT_MESH_RELAY_ENABLED) {
- feat |= BT_MESH_FEAT_RELAY;
- }
+ for (int i = 0; i < ARRAY_SIZE(virtual_addrs); i++) {
+ if (!virtual_addrs[i].ref) {
+ if (!va) {
+ va = &virtual_addrs[i];
+ }
+
+ continue;
+ }
- if (bt_mesh_gatt_proxy_get() == BT_MESH_GATT_PROXY_ENABLED) {
- feat |= BT_MESH_FEAT_PROXY;
+ if (!memcmp(uuid, virtual_addrs[i].uuid,
+ ARRAY_SIZE(virtual_addrs[i].uuid))) {
+ *addr = virtual_addrs[i].addr;
+ virtual_addrs[i].ref++;
+ va_store(&virtual_addrs[i]);
+ return STATUS_SUCCESS;
+ }
}
- if (bt_mesh_friend_get() == BT_MESH_FRIEND_ENABLED) {
- feat |= BT_MESH_FEAT_FRIEND;
+ if (!va) {
+ return STATUS_INSUFF_RESOURCES;
}
- if (bt_mesh_lpn_established()) {
- feat |= BT_MESH_FEAT_LOW_POWER;
+ memcpy(va->uuid, uuid, ARRAY_SIZE(va->uuid));
+ err = bt_mesh_virtual_addr(uuid, &va->addr);
+ if (err) {
+ va->addr = BT_MESH_ADDR_UNASSIGNED;
+ return STATUS_UNSPECIFIED;
}
- hb.feat = sys_cpu_to_be16(feat);
+ va->ref = 1;
+ va_store(va);
- BT_DBG("InitTTL %u feat 0x%04x", cfg->hb_pub.ttl, feat);
+ *addr = va->addr;
- bt_mesh_ctl_send(&tx, TRANS_CTL_OP_HEARTBEAT, &hb, sizeof(hb),
- NULL, NULL, NULL);
+ return STATUS_SUCCESS;
}
-int bt_mesh_app_key_get(const struct bt_mesh_subnet *subnet, u16_t app_idx,
- u16_t addr, const u8_t **key, u8_t *aid)
+uint8_t bt_mesh_va_del(uint8_t uuid[16], uint16_t *addr)
{
- struct bt_mesh_app_key *app_key;
-
- if (app_idx == BT_MESH_KEY_DEV_LOCAL ||
- (app_idx == BT_MESH_KEY_DEV_REMOTE &&
- bt_mesh_elem_find(addr) != NULL)) {
- *aid = 0;
- *key = bt_mesh.dev_key;
- return 0;
- } else if (app_idx == BT_MESH_KEY_DEV_REMOTE) {
- if (!IS_ENABLED(CONFIG_BT_MESH_PROVISIONER)) {
- return -EINVAL;
- }
+ struct bt_mesh_va *va = NULL;
- struct bt_mesh_node *node = bt_mesh_node_find(addr);
- if (!node) {
- return -EINVAL;
+ for (int i = 0; i < ARRAY_SIZE(virtual_addrs); i++) {
+ if (virtual_addrs[i].ref &&
+ !memcmp(uuid, virtual_addrs[i].uuid,
+ ARRAY_SIZE(virtual_addrs[i].uuid))) {
+ va = &virtual_addrs[i];
+ break;
}
+ }
- *key = node->dev_key;
- *aid = 0;
- return 0;
+ if (!va) {
+ return STATUS_CANNOT_REMOVE;
}
- if (!subnet) {
- return -EINVAL;
+ va->ref--;
+ if (addr) {
+ *addr = va->addr;
}
- app_key = bt_mesh_app_key_find(app_idx);
- if (!app_key) {
- return -ENOENT;
+ va_store(va);
+ return STATUS_SUCCESS;
+}
+
+struct bt_mesh_va *bt_mesh_va_find(uint8_t uuid[16])
+{
+ for (int i = 0; i < ARRAY_SIZE(virtual_addrs); i++) {
+ if (virtual_addrs[i].ref &&
+ !memcmp(uuid, virtual_addrs[i].uuid,
+ ARRAY_SIZE(virtual_addrs[i].uuid))) {
+ return &virtual_addrs[i];
+ }
}
- if (subnet->kr_phase == BT_MESH_KR_PHASE_2 && app_key->updated) {
- *key = app_key->keys[1].val;
- *aid = app_key->keys[1].id;
- } else {
- *key = app_key->keys[0].val;
- *aid = app_key->keys[0].id;
+ return NULL;
+}
+
+uint8_t *bt_mesh_va_label_get(uint16_t addr)
+{
+ int i;
+
+ BT_DBG("addr 0x%04x", addr);
+
+ for (i = 0; i < ARRAY_SIZE(virtual_addrs); i++) {
+ if (virtual_addrs[i].ref && virtual_addrs[i].addr == addr) {
+ BT_DBG("Found Label UUID for 0x%04x: %s", addr,
+ bt_hex(virtual_addrs[i].uuid, 16));
+ return virtual_addrs[i].uuid;
+ }
}
- return 0;
+ BT_WARN("No matching Label UUID for 0x%04x", addr);
+
+ return NULL;
}
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/src/transport.h b/src/libs/mynewt-nimble/nimble/host/mesh/src/transport.h
index eff768e9..23be7139 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/src/transport.h
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/src/transport.h
@@ -11,10 +11,12 @@
#define TRANS_SEQ_AUTH_NVAL 0xffffffffffffffff
-#define BT_MESH_TX_SDU_MAX (CONFIG_BT_MESH_TX_SEG_MAX * 12)
+#define BT_MESH_SDU_UNSEG_MAX 11
+#define BT_MESH_CTL_SEG_SDU_MAX 8
+#define BT_MESH_RX_CTL_MAX (CONFIG_BT_MESH_RX_SEG_MAX * BT_MESH_CTL_SEG_SDU_MAX)
-#define TRANS_SEQ_ZERO_MASK ((u16_t)BIT_MASK(13))
-#define TRANS_CTL_OP_MASK ((u8_t)BIT_MASK(7))
+#define TRANS_SEQ_ZERO_MASK ((uint16_t)BIT_MASK(13))
+#define TRANS_CTL_OP_MASK ((uint8_t)BIT_MASK(7))
#define TRANS_CTL_OP(data) ((data)[0] & TRANS_CTL_OP_MASK)
#define TRANS_CTL_HDR(op, seg) ((op & TRANS_CTL_OP_MASK) | (seg << 7))
@@ -31,64 +33,65 @@
#define TRANS_CTL_OP_HEARTBEAT 0x0a
struct bt_mesh_ctl_friend_poll {
- u8_t fsn;
+ uint8_t fsn;
}__attribute__((__packed__));
struct bt_mesh_ctl_friend_update {
- u8_t flags;
- u32_t iv_index;
- u8_t md;
+ uint8_t flags;
+ uint32_t iv_index;
+ uint8_t md;
}__attribute__((__packed__));
struct bt_mesh_ctl_friend_req {
- u8_t criteria;
- u8_t recv_delay;
- u8_t poll_to[3];
- u16_t prev_addr;
- u8_t num_elem;
- u16_t lpn_counter;
+ uint8_t criteria;
+ uint8_t recv_delay;
+ uint8_t poll_to[3];
+ uint16_t prev_addr;
+ uint8_t num_elem;
+ uint16_t lpn_counter;
}__attribute__((__packed__));
struct bt_mesh_ctl_friend_offer {
- u8_t recv_win;
- u8_t queue_size;
- u8_t sub_list_size;
- s8_t rssi;
- u16_t frnd_counter;
+ uint8_t recv_win;
+ uint8_t queue_size;
+ uint8_t sub_list_size;
+ int8_t rssi;
+ uint16_t frnd_counter;
}__attribute__((__packed__));
struct bt_mesh_ctl_friend_clear {
- u16_t lpn_addr;
- u16_t lpn_counter;
+ uint16_t lpn_addr;
+ uint16_t lpn_counter;
}__attribute__((__packed__));
struct bt_mesh_ctl_friend_clear_confirm {
- u16_t lpn_addr;
- u16_t lpn_counter;
+ uint16_t lpn_addr;
+ uint16_t lpn_counter;
}__attribute__((__packed__));
#define BT_MESH_FRIEND_SUB_MIN_LEN (1 + 2)
struct bt_mesh_ctl_friend_sub {
- u8_t xact;
- u16_t addr_list[5];
+ uint8_t xact;
+ uint16_t addr_list[5];
}__attribute__((__packed__));
struct bt_mesh_ctl_friend_sub_confirm {
- u8_t xact;
+ uint8_t xact;
}__attribute__((__packed__));
-void bt_mesh_set_hb_sub_dst(u16_t addr);
-
-struct bt_mesh_app_key *bt_mesh_app_key_find(u16_t app_idx);
+struct bt_mesh_va {
+ uint16_t ref:15,
+ changed:1;
+ uint16_t addr;
+ uint8_t uuid[16];
+};
bool bt_mesh_tx_in_progress(void);
void bt_mesh_rx_reset(void);
-void bt_mesh_tx_reset(void);
-int bt_mesh_ctl_send(struct bt_mesh_net_tx *tx, u8_t ctl_op, void *data,
- size_t data_len, u64_t *seq_auth,
- const struct bt_mesh_send_cb *cb, void *cb_data);
+int bt_mesh_ctl_send(struct bt_mesh_net_tx *tx, uint8_t ctl_op, void *data,
+ size_t data_len, const struct bt_mesh_send_cb *cb, void *cb_data);
int bt_mesh_trans_send(struct bt_mesh_net_tx *tx, struct os_mbuf *msg,
const struct bt_mesh_send_cb *cb, void *cb_data);
@@ -97,9 +100,14 @@ int bt_mesh_trans_recv(struct os_mbuf *buf, struct bt_mesh_net_rx *rx);
void bt_mesh_trans_init(void);
-void bt_mesh_rpl_clear(void);
+void bt_mesh_trans_reset(void);
+
+struct bt_mesh_va *bt_mesh_va_get(uint16_t index);
+
+struct bt_mesh_va *bt_mesh_va_find(uint8_t uuid[16]);
+
+uint8_t bt_mesh_va_add(uint8_t uuid[16], uint16_t *addr);
-void bt_mesh_heartbeat_send(void);
+uint8_t bt_mesh_va_del(uint8_t uuid[16], uint16_t *addr);
-int bt_mesh_app_key_get(const struct bt_mesh_subnet *subnet, u16_t app_idx,
- u16_t addr, const u8_t **key, u8_t *aid);
+uint8_t *bt_mesh_va_label_get(uint16_t addr); \ No newline at end of file
diff --git a/src/libs/mynewt-nimble/nimble/host/mesh/syscfg.yml b/src/libs/mynewt-nimble/nimble/host/mesh/syscfg.yml
index 98632232..cf0c7f75 100644
--- a/src/libs/mynewt-nimble/nimble/host/mesh/syscfg.yml
+++ b/src/libs/mynewt-nimble/nimble/host/mesh/syscfg.yml
@@ -29,17 +29,57 @@ syscfg.defs:
the advertising bearer.
value: 1
+ BLE_MESH_UNPROV_BEACON_INT:
+ description: >
+ This option specifies the interval (in seconds) at which the
+ device sends unprovisioned beacon.
+ value: 5
+
+ BLE_MESH_PB_ADV_RETRANS_TIMEOUT:
+ description: >
+ Timeout value of retransmit provisioning PDUs.
+ value: 500
+
+ BLE_MESH_PROV_DEVICE:
+ description: >
+ Enable this option to allow the device to be provisioned into a mesh network.
+ value: 1
+ restrictions: BLE_MESH_PROV
+
BLE_MESH_PROVISIONER:
description: >
Enable this option to have support for provisioning remote devices.
- value: 0
+ value: 1
restrictions:
- - (BLE_MESH_PROV)
+ - BLE_MESH_PROV
+ - BLE_MESH_PB_ADV
+
+ BLE_MESH_CDB:
+ description: >
+ Mesh Configuration Database [EXPERIMENTAL]
+ value: 0
- BLE_MESH_NODE_COUNT:
+ BLE_MESH_CDB_NODE_COUNT:
description: >
This option specifies how many nodes each network can at most
- save in the provisioning database. Range 1-4096
+ save in the configuration database.
+ value: 1
+
+ BLE_MESH_CDB_SUBNET_COUNT:
+ description: >
+ This option specifies how many subnets that can at most be
+ saved in the configuration database.
+ value: 1
+
+ BLE_MESH_CDB_APP_KEY_COUNT:
+ description: >
+ This option specifies how many application keys that can at most
+ be saved in the configuration database.
+ value: 1
+
+ BLE_MESH_DEBUG_CDB:
+ description:
+ Use this option to enable configuration database debug logs.
value: 1
BLE_MESH_PROXY:
@@ -61,6 +101,19 @@ syscfg.defs:
and a Mesh network.
value: 1
+ BLE_MESH_GATT_PROXY_ENABLED:
+ description: >
+ Controls whether the GATT Proxy feature is enabled by default.
+ Can be changed through runtime configuration.
+ value: 1
+ restrictions: BLE_MESH_GATT_PROXY
+
+ BLE_MESH_DEFAULT_TTL:
+ description: >
+ Controls the default TTL value for outgoing messages. Can be changed
+ through runtime configuration.
+ value: 7
+
BLE_MESH_NODE_ID_TIMEOUT:
description: >
This option determines for how long the local node advertises
@@ -136,6 +189,13 @@ syscfg.defs:
supported outgoing segment count (BT_MESH_TX_SEG_MAX).
value: 6
+ BLE_MESH_ADV_STACK_SIZE:
+ description: >
+ Mesh advertiser thread stack size.
+ NOTE: This is an advanced setting and should not be changed unless
+ absolutely necessary
+ value: 768
+
BLE_MESH_IVU_DIVIDER:
description: >
When the IV Update state enters Normal operation or IV Update
@@ -164,7 +224,7 @@ syscfg.defs:
description: >
Maximum number of simultaneous outgoing multi-segment and/or
reliable messages.
- value: 4
+ value: 1
BLE_MESH_RX_SEG_MSG_COUNT:
description: >
@@ -172,38 +232,79 @@ syscfg.defs:
reliable messages.
value: 2
- BLE_MESH_RX_SDU_MAX:
+ BLE_MESH_SEG_BUFS:
description: >
- Maximum incoming Upper Transport Access PDU length. This
- determines also how many segments incoming segmented messages
- can have. Each segment can contain 12 bytes, so this value should
- be set to a multiple of 12 to avoid wasted memory. The minimum
- requirement is 2 segments (24 bytes) whereas the maximum supported
- by the Mesh specification is 32 segments (384 bytes).
- value: 72
+ The incoming and outgoing segmented messages allocate their
+ segments from the same pool. Each segment is a 12 byte block,
+ and may only be used by one message at the time.
- BLE_MESH_TX_SEG_MAX:
+ Outgoing messages will allocate their segments at the start of the
+ transmission, and release them one by one as soon as they have been
+ acknowledged by the receiver. Incoming messages allocate all their
+ segments at the start of the transaction, and won't release them until
+ the message is fully received.
+ value:
+ 64
+
+ BLE_MESH_RX_SEG_MAX:
description: >
- Maximum number of segments supported for outgoing messages.
+ Maximum number of segments supported for incoming messages.
This value should typically be fine-tuned based on what
models the local node supports, i.e. what's the largest
- message payload that the node needs to be able to send.
+ message payload that the node needs to be able to receive.
This value affects memory and call stack consumption, which
is why the default is lower than the maximum that the
specification would allow (32 segments).
+ The maximum incoming SDU size is 12 times this number (out of
+ which 4 or 8 bytes is used for the Transport Layer MIC). For
+ example, 5 segments means the maximum SDU size is 60 bytes,
+ which leaves 56 bytes for application layer data using a
+ 4-byte MIC and 52 bytes using an 8-byte MIC.
+ value:
+ 3
+
+
+
+ BLE_MESH_TX_SEG_MAX:
+ description: >
+ Maximum number of segments supported for outgoing messages.
+ This value should typically be fine-tuned based on what
+ models the local node supports, i.e. what's the largest
+ message payload that the node needs to be able to send.
+ This value affects memory consumption, which is why the
+ default is lower than the maximum that the specification
+ would allow (32 segments).
+
The maximum outgoing SDU size is 12 times this number (out of
which 4 or 8 bytes is used for the Transport Layer MIC). For
example, 5 segments means the maximum SDU size is 60 bytes,
which leaves 56 bytes for application layer data using a
4-byte MIC and 52 bytes using an 8-byte MIC.
+ value: 3
- Be sure to specify a sufficient number of advertising buffers
- when setting this option to a higher value. There must be at
- least three more advertising buffers (BT_MESH_ADV_BUF_COUNT)
- as there are outgoing segments.
+ BLE_MESH_LOOPBACK_BUFS:
+ description: >
+ The number of buffers allocated for the network loopback mechanism.
+ Loopback is used when the device sends messages to itself.
value: 3
+ BLE_MESH_TX_SEG_RETRANS_COUNT:
+ description: >
+ Maximum number of transport message segment retransmit attempts
+ for outgoing segment message.
+ value: 4
+
+ BLE_MESH_TX_SEG_RETRANS_TIMEOUT_UNICAST:
+ description: >
+ Maximum time of retransmit segment message to unicast address.
+ value: 400
+
+ BLE_MESH_TX_SEG_RETRANS_TIMEOUT_GROUP:
+ description: >
+ Maximum time of retransmit segment message to group address.
+ value: 50
+
BLE_MESH_SEG_RETRANSMIT_ATTEMPTS:
description: >
Number of retransmit attempts (after the initial transmit) per segment
@@ -212,8 +313,56 @@ syscfg.defs:
BLE_MESH_RELAY:
description: >
+ Controls the initial number of retransmissions of original messages,
+ in addition to the first transmission. Can be changed through runtime
+ configuration.
+ value: 2
+
+ BLE_MESH_NETWORK_TRANSMIT_COUNT:
+ description: >
+ Controls the initial number of retransmissions of original messages,
+ in addition to the first transmission. Can be changed through runtime
+ configuration.
+ value: 2
+
+ BLE_MESH_NETWORK_TRANSMIT_INTERVAL:
+ description: >
+ Controls the initial interval between retransmissions of original
+ messages, in milliseconds. Can be changed through runtime
+ configuration.
+ value: 20
+
+ BT_MESH_RELAY:
+ description: >
Support for acting as a Mesh Relay Node.
- value: 0
+ value: 1
+
+ BLE_MESH_RELAY_ENABLED:
+ description: >
+ Controls whether the Mesh Relay feature is enabled by default. Can be
+ changed through runtime configuration.
+ value: 1
+
+ BLE_MESH_RELAY_RETRANSMIT_COUNT:
+ description: >
+ Controls the initial number of retransmissions of relayed messages, in
+ addition to the first transmission. Can be changed through runtime
+ configuration.
+
+ value: 2
+
+ BLE_MESH_RELAY_RETRANSMIT_INTERVAL:
+ description: >
+ Controls the initial interval between retransmissions of relayed
+ messages, in milliseconds. Can be changed through runtime
+ configuration.
+ value: 20
+
+ BLE_MESH_BEACON_ENABLED:
+ description: >
+ Controls whether the Secure network beacon feature is enabled by
+ default. Can be changed through runtime configuration.
+ value: 1
BLE_MESH_LOW_POWER:
description: >
@@ -287,6 +436,16 @@ syscfg.defs:
a value of 300 means 30 seconds.
value: 300
+ BLE_MESH_LPN_POLL_TIMEOUT:
+ description: >
+ PollTimeout timer is used to measure time between two
+ consecutive requests sent by the Low Power node. If no
+ requests are received by the Friend node before the
+ PollTimeout timer expires, then the friendship is considered
+ terminated. The value is in units of 100 milliseconds, so e.g.
+ a value of 300 means 30 seconds.
+ value: 300
+
BLE_MESH_LPN_INIT_POLL_TIMEOUT:
description: >
The initial value of the PollTimeout timer when Friendship
@@ -308,11 +467,23 @@ syscfg.defs:
Maximum number of groups that the LPN can subscribe to.
value: 10
+ BLE_MESH_LPN_SUB_ALL_NODES_ADDR:
+ description: >
+ Automatically subscribe all nodes address when friendship
+ established.
+ value: 1
+
BLE_MESH_FRIEND:
description: >
Enable this option to be able to act as a Friend Node.
value: 0
+ BLE_MESH_FRIEND_ENABLED:
+ description: >
+ Controls whether the Friend feature is enabled by default. Can be
+ changed through runtime configuration.
+ value: 1
+
BLE_MESH_FRIEND_RECV_WIN:
description: >
Receive Window in milliseconds supported by the Friend node.
@@ -336,6 +507,7 @@ syscfg.defs:
with simultaneously.
value: 2
+
BLE_MESH_FRIEND_SEG_RX:
description: >
Number of incomplete segment lists that we track for each LPN
@@ -344,6 +516,7 @@ syscfg.defs:
messages from when the messages are going into the Friend queue.
value: 1
+
BLE_MESH_CFG_CLI:
description: >
Enable support for the configuration client model.
@@ -592,6 +765,51 @@ syscfg.defs:
Minimum level for the BLE Mesh Transport Layer log.
value: 1
+ BLE_MESH_RPL_LOG_MOD:
+ description: >
+ Numeric module ID to use for BLE Mesh Replay protection list messages.
+ value: 22
+ BLE_MESH_RPL_LOG_LVL:
+ description: >
+ Minimum level for the BLE Mesh Replay protection list log.
+ value: 1
+
+ BLE_MESH_NET_KEYS_LOG_MOD:
+ description: >
+ Numeric module ID to use for BLE Mesh Replay protection list messages.
+ value: 23
+ BLE_MESH_NET_KEYS_LOG_LVL:
+ description: >
+ Minimum level for the BLE Mesh Replay protection list log.
+ value: 1
+
+ BLE_MESH_PROV_DEVICE_LOG_MOD:
+ description: >
+ Numeric module ID to use for BLE Mesh Replay protection list messages.
+ value: 24
+ BLE_MESH_PROV_DEVICE_LOG_LVL:
+ description: >
+ Minimum level for the BLE Mesh Replay protection list log.
+ value: 1
+
+ BLE_MESH_PROVISIONER_LOG_MOD:
+ description: >
+ Numeric module ID to use for BLE Mesh Replay protection list messages.
+ value: 25
+ BLE_MESH_PROVISIONER_LOG_LVL:
+ description: >
+ Minimum level for the BLE Mesh Replay protection list log.
+ value: 1
+
+ BLE_MESH_HEARTBEAT_LOG_MOD:
+ description: >
+ Numeric module ID to use for BLE Mesh Replay protection list messages.
+ value: 26
+ BLE_MESH_HEARTBEAT_LOG_LVL:
+ description: >
+ Minimum level for the BLE Mesh Replay protection list log.
+ value: 1
+
syscfg.logs:
BLE_MESH_LOG:
module: MYNEWT_VAL(BLE_MESH_LOG_MOD)
@@ -641,10 +859,30 @@ syscfg.logs:
module: MYNEWT_VAL(BLE_MESH_SETTINGS_LOG_MOD)
level: MYNEWT_VAL(BLE_MESH_SETTINGS_LOG_LVL)
+ BLE_MESH_RPL_LOG:
+ module: MYNEWT_VAL(BLE_MESH_RPL_LOG_MOD)
+ level: MYNEWT_VAL(BLE_MESH_RPL_LOG_LVL)
+
BLE_MESH_TRANS_LOG:
module: MYNEWT_VAL(BLE_MESH_TRANS_LOG_MOD)
level: MYNEWT_VAL(BLE_MESH_TRANS_LOG_LVL)
+ BLE_MESH_NET_KEYS_LOG:
+ module: MYNEWT_VAL(BLE_MESH_NET_KEYS_LOG_MOD)
+ level: MYNEWT_VAL(BLE_MESH_NET_KEYS_LOG_LVL)
+
+ BLE_MESH_PROV_DEVICE_LOG:
+ module: MYNEWT_VAL(BLE_MESH_PROV_DEVICE_LOG_MOD)
+ level: MYNEWT_VAL(BLE_MESH_PROV_DEVICE_LOG_LVL)
+
+ BLE_MESH_PROVISIONER_LOG:
+ module: MYNEWT_VAL(BLE_MESH_PROVISIONER_LOG_MOD)
+ level: MYNEWT_VAL(BLE_MESH_PROVISIONER_LOG_LVL)
+
+ BLE_MESH_HEARTBEAT_LOG:
+ module: MYNEWT_VAL(BLE_MESH_HEARTBEAT_LOG_MOD)
+ level: MYNEWT_VAL(BLE_MESH_HEARTBEAT_LOG_LVL)
+
syscfg.vals.BLE_MESH_SHELL:
BLE_MESH_CFG_CLI: 1
BLE_MESH_HEALTH_CLI: 1
diff --git a/src/libs/mynewt-nimble/nimble/host/pts/tpg/94654-20170317-085122560.tpg b/src/libs/mynewt-nimble/nimble/host/pts/tpg/94654-20170317-085122560.tpg
index f5bb0ce9..3cc985fa 100644
--- a/src/libs/mynewt-nimble/nimble/host/pts/tpg/94654-20170317-085122560.tpg
+++ b/src/libs/mynewt-nimble/nimble/host/pts/tpg/94654-20170317-085122560.tpg
@@ -1,4 +1,4 @@
-<!-- START ENCRYPTED FILE --->
+<!-- START ENCRYPTED FILE --->
M'&/JP\$+#X83?)"[ M2E=\N*7*U 5)JSKT(5#=>@^/#]IP*[GTZ0%0]$F(/$
MEK[V7>349??;!JZJNFZ CK=QGD^FOYV^FU>"DK<@0U*##HV\H9&_%["5IK@1
MA9F,FJO2P^3:4_]04%-0T%9=^XCMWKF"L$[)%)G>_I 0Q?@:H)&1HX)7VY&.
@@ -1023,4 +1023,4 @@ M<74&Z:0BS4[#$;M2_1""EZVO@$B^"0'V'W:7^@-<RY.=,$D<>]G?*\B>0M(-
M6MF1FM+ ?,?3[N*1EI"$AXF#@6P-FU/4\QF?O!&%CE5*6J2'@QDYV?_04-O)
M7Z 6N;C7E_4<F/8XVG7AJ7J1LH.IECZ6%G $HMQ2FZX'!S+=;-"'3%ZWD\!W
L@U91N$5;H(.IY7/\[ +<DK:=41RCLZB8DY:;7E]*"<<2\\K1C(F(AZJX39
-<!-- END ENCRYPTED FILE --->
+<!-- END ENCRYPTED FILE --->
diff --git a/src/libs/mynewt-nimble/nimble/host/pts/tpg/94654-20170317-085441153.pts b/src/libs/mynewt-nimble/nimble/host/pts/tpg/94654-20170317-085441153.pts
index 92507b13..6760d5ec 100644
--- a/src/libs/mynewt-nimble/nimble/host/pts/tpg/94654-20170317-085441153.pts
+++ b/src/libs/mynewt-nimble/nimble/host/pts/tpg/94654-20170317-085441153.pts
@@ -286,4 +286,4 @@
<item><table>7</table><row>3</row></item>
</profile>
</pics>
- </project>
+ </project>
diff --git a/src/libs/mynewt-nimble/nimble/host/services/bas/include/services/bas/ble_svc_bas.h b/src/libs/mynewt-nimble/nimble/host/services/bas/include/services/bas/ble_svc_bas.h
index 2706b5d3..24b9a26c 100644
--- a/src/libs/mynewt-nimble/nimble/host/services/bas/include/services/bas/ble_svc_bas.h
+++ b/src/libs/mynewt-nimble/nimble/host/services/bas/include/services/bas/ble_svc_bas.h
@@ -28,4 +28,6 @@
int ble_svc_bas_battery_level_set(uint8_t level);
+void ble_svc_bas_init(void);
+
#endif
diff --git a/src/libs/mynewt-nimble/nimble/host/services/gap/include/services/gap/ble_svc_gap.h b/src/libs/mynewt-nimble/nimble/host/services/gap/include/services/gap/ble_svc_gap.h
index d7b60df4..707a3bd0 100644
--- a/src/libs/mynewt-nimble/nimble/host/services/gap/include/services/gap/ble_svc_gap.h
+++ b/src/libs/mynewt-nimble/nimble/host/services/gap/include/services/gap/ble_svc_gap.h
@@ -34,6 +34,7 @@ extern "C" {
#define BLE_SVC_GAP_APPEARANCE_GEN_UNKNOWN 0
#define BLE_SVC_GAP_APPEARANCE_GEN_COMPUTER 128
+#define BLE_SVC_GAP_APPEARANCE_GEN_HID 960
#define BLE_SVC_GAP_APPEARANCE_CYC_SPEED_AND_CADENCE_SENSOR 1157
typedef void (ble_svc_gap_chr_changed_fn) (uint16_t uuid);
diff --git a/src/libs/mynewt-nimble/nimble/host/src/ble_att_cmd.c b/src/libs/mynewt-nimble/nimble/host/src/ble_att_cmd.c
index a123c857..81b070f9 100644
--- a/src/libs/mynewt-nimble/nimble/host/src/ble_att_cmd.c
+++ b/src/libs/mynewt-nimble/nimble/host/src/ble_att_cmd.c
@@ -66,11 +66,10 @@ ble_att_tx(uint16_t conn_handle, struct os_mbuf *txom)
ble_hs_lock();
- ble_hs_misc_conn_chan_find_reqd(conn_handle, BLE_L2CAP_CID_ATT, &conn,
- &chan);
- if (chan == NULL) {
+ rc = ble_hs_misc_conn_chan_find_reqd(conn_handle, BLE_L2CAP_CID_ATT, &conn,
+ &chan);
+ if (rc != 0) {
os_mbuf_free_chain(txom);
- rc = BLE_HS_ENOTCONN;
} else {
ble_att_truncate_to_mtu(chan, txom);
rc = ble_l2cap_tx(conn, chan, txom);
diff --git a/src/libs/mynewt-nimble/nimble/host/src/ble_att_svr.c b/src/libs/mynewt-nimble/nimble/host/src/ble_att_svr.c
index 46a71681..be61e4b8 100644
--- a/src/libs/mynewt-nimble/nimble/host/src/ble_att_svr.c
+++ b/src/libs/mynewt-nimble/nimble/host/src/ble_att_svr.c
@@ -1360,7 +1360,7 @@ done:
*att_err = 0;
/* Fill the response base. */
- rsp->batp_length = htole16(sizeof(*data) + prev_attr_len);
+ rsp->batp_length = sizeof(*data) + prev_attr_len;
}
*out_txom = txom;
diff --git a/src/libs/mynewt-nimble/nimble/host/src/ble_eddystone.c b/src/libs/mynewt-nimble/nimble/host/src/ble_eddystone.c
index 7d80d134..eccb3e98 100644
--- a/src/libs/mynewt-nimble/nimble/host/src/ble_eddystone.c
+++ b/src/libs/mynewt-nimble/nimble/host/src/ble_eddystone.c
@@ -76,7 +76,7 @@ ble_eddystone_set_adv_data_gen(struct ble_hs_adv_fields *adv_fields,
if (adv_fields->num_uuids16 > BLE_EDDYSTONE_MAX_UUIDS16) {
return BLE_HS_EINVAL;
}
- if (svc_data_len > BLE_EDDYSTONE_MAX_SVC_DATA_LEN) {
+ if (svc_data_len > (BLE_EDDYSTONE_MAX_SVC_DATA_LEN - BLE_EDDYSTONE_SVC_DATA_BASE_SZ)) {
return BLE_HS_EINVAL;
}
if (adv_fields->num_uuids16 > 0 && !adv_fields->uuids16_is_complete) {
diff --git a/src/libs/mynewt-nimble/nimble/host/src/ble_gap.c b/src/libs/mynewt-nimble/nimble/host/src/ble_gap.c
index e32482e6..bbedc319 100644
--- a/src/libs/mynewt-nimble/nimble/host/src/ble_gap.c
+++ b/src/libs/mynewt-nimble/nimble/host/src/ble_gap.c
@@ -310,14 +310,12 @@ ble_gap_log_conn(uint8_t own_addr_type, const ble_addr_t *peer_addr,
BLE_HS_LOG_ADDR(INFO, peer_addr->val);
}
- /* // NRF LOG support max 6 params in log
BLE_HS_LOG(INFO, " scan_itvl=%d scan_window=%d itvl_min=%d itvl_max=%d "
"latency=%d supervision_timeout=%d min_ce_len=%d "
"max_ce_len=%d own_addr_type=%d",
params->scan_itvl, params->scan_window, params->itvl_min,
params->itvl_max, params->latency, params->supervision_timeout,
params->min_ce_len, params->max_ce_len, own_addr_type);
- */
}
#endif
@@ -341,10 +339,10 @@ ble_gap_log_update(uint16_t conn_handle,
{
BLE_HS_LOG(INFO, "connection parameter update; "
"conn_handle=%d itvl_min=%d itvl_max=%d latency=%d "
- "supervision_timeout=%d min_ce_len=%d max_ce_len=???",
+ "supervision_timeout=%d min_ce_len=%d max_ce_len=%d",
conn_handle, params->itvl_min, params->itvl_max,
params->latency, params->supervision_timeout,
- params->min_ce_len);
+ params->min_ce_len, params->max_ce_len);
}
#endif
@@ -747,7 +745,7 @@ ble_gap_has_client(struct ble_gap_master_state *out_state)
return 0;
}
- return out_state->cb;
+ return out_state->cb != NULL;
}
static void
@@ -932,7 +930,7 @@ ble_gap_master_ticks_until_exp(void)
return 0;
}
-#if !MYNEWT_VAL(BLE_EXT_ADV)
+#if NIMBLE_BLE_ADVERTISE && !MYNEWT_VAL(BLE_EXT_ADV)
static uint32_t
ble_gap_slave_ticks_until_exp(void)
{
@@ -1000,7 +998,7 @@ ble_gap_update_next_exp(int32_t *out_ticks_from_now)
}
-#if MYNEWT_VAL(BLE_ROLE_CENTRAL)
+#if NIMBLE_BLE_SCAN
static void
ble_gap_master_set_timer(uint32_t ticks_from_now)
{
@@ -1022,7 +1020,7 @@ ble_gap_slave_set_timer(uint32_t ticks_from_now)
}
#endif
-#if NIMBLE_BLE_CONNECT
+#if (NIMBLE_BLE_CONNECT || NIMBLE_BLE_SCAN)
/**
* Called when an error is encountered while the master-connection-fsm is
* active.
@@ -1036,12 +1034,22 @@ ble_gap_master_failed(int status)
ble_gap_master_connect_failure(status);
break;
+#if NIMBLE_BLE_SCAN
+ case BLE_GAP_OP_M_DISC:
+ STATS_INC(ble_gap_stats, initiate_fail);
+ ble_gap_disc_complete();
+ ble_gap_master_reset_state();
+ break;
+#endif
+
default:
BLE_HS_DBG_ASSERT(0);
break;
}
}
+#endif
+#if NIMBLE_BLE_CONNECT
static void
ble_gap_update_failed(uint16_t conn_handle, int status)
{
@@ -1239,6 +1247,46 @@ ble_gap_adv_active_instance(uint8_t instance)
return ble_gap_slave[instance].op == BLE_GAP_OP_S_ADV;
}
+/**
+ * Clears advertisement and discovery state. This function is necessary
+ * when the controller loses its active state (e.g. on stack reset).
+ */
+void
+ble_gap_reset_state(int reason)
+{
+ uint16_t conn_handle;
+
+ while (1) {
+ conn_handle = ble_hs_atomic_first_conn_handle();
+ if (conn_handle == BLE_HS_CONN_HANDLE_NONE) {
+ break;
+ }
+
+ ble_gap_conn_broken(conn_handle, reason);
+ }
+
+#if NIMBLE_BLE_ADVERTISE
+#if MYNEWT_VAL(BLE_EXT_ADV)
+ uint8_t i;
+ for (i = 0; i < BLE_ADV_INSTANCES; i++) {
+ if (ble_gap_adv_active_instance(i)) {
+ /* Indicate to application that advertising has stopped. */
+ ble_gap_adv_finished(i, reason, 0, 0);
+ }
+ }
+#else
+ if (ble_gap_adv_active_instance(0)) {
+ /* Indicate to application that advertising has stopped. */
+ ble_gap_adv_finished(0, reason, 0, 0);
+ }
+#endif
+#endif
+
+#if (NIMBLE_BLE_SCAN || NIMBLE_BLE_CONNECT)
+ ble_gap_master_failed(reason);
+#endif
+}
+
#if NIMBLE_BLE_CONNECT
static int
ble_gap_accept_master_conn(void)
@@ -1893,7 +1941,7 @@ ble_gap_master_timer(void)
return BLE_HS_FOREVER;
}
-#if !MYNEWT_VAL(BLE_EXT_ADV)
+#if NIMBLE_BLE_ADVERTISE && !MYNEWT_VAL(BLE_EXT_ADV)
static int32_t
ble_gap_slave_timer(void)
{
@@ -1945,7 +1993,6 @@ ble_gap_update_timer(void)
ble_hs_unlock();
if (entry != NULL) {
- ble_gap_update_notify(conn_handle, BLE_HS_ETIMEOUT);
ble_gap_update_entry_free(entry);
}
} while (entry != NULL);
@@ -1993,7 +2040,7 @@ ble_gap_timer(void)
min_ticks = min(master_ticks, update_ticks);
-#if !MYNEWT_VAL(BLE_EXT_ADV)
+#if NIMBLE_BLE_ADVERTISE && !MYNEWT_VAL(BLE_EXT_ADV)
min_ticks = min(min_ticks, ble_gap_slave_timer());
#endif
@@ -5547,7 +5594,7 @@ ble_gap_unpair_oldest_peer(void)
}
if (num_peers == 0) {
- return 0;
+ return BLE_HS_ENOENT;
}
rc = ble_gap_unpair(&oldest_peer_id_addr);
@@ -5558,6 +5605,36 @@ ble_gap_unpair_oldest_peer(void)
return 0;
}
+int
+ble_gap_unpair_oldest_except(const ble_addr_t *peer_addr)
+{
+ ble_addr_t peer_id_addrs[MYNEWT_VAL(BLE_STORE_MAX_BONDS)];
+ int num_peers;
+ int rc, i;
+
+ rc = ble_store_util_bonded_peers(
+ &peer_id_addrs[0], &num_peers, MYNEWT_VAL(BLE_STORE_MAX_BONDS));
+ if (rc != 0) {
+ return rc;
+ }
+
+ if (num_peers == 0) {
+ return BLE_HS_ENOENT;
+ }
+
+ for (i = 0; i < num_peers; i++) {
+ if (ble_addr_cmp(peer_addr, &peer_id_addrs[i]) != 0) {
+ break;
+ }
+ }
+
+ if (i >= num_peers) {
+ return BLE_HS_ENOMEM;
+ }
+
+ return ble_gap_unpair(&peer_id_addrs[i]);
+}
+
void
ble_gap_passkey_event(uint16_t conn_handle,
struct ble_gap_passkey_params *passkey_params)
@@ -5577,7 +5654,8 @@ ble_gap_passkey_event(uint16_t conn_handle,
}
void
-ble_gap_enc_event(uint16_t conn_handle, int status, int security_restored)
+ble_gap_enc_event(uint16_t conn_handle, int status,
+ int security_restored, int bonded)
{
#if NIMBLE_BLE_SM
struct ble_gap_event event;
@@ -5590,12 +5668,24 @@ ble_gap_enc_event(uint16_t conn_handle, int status, int security_restored)
ble_gap_event_listener_call(&event);
ble_gap_call_conn_event_cb(&event, conn_handle);
- if (status == 0) {
- if (security_restored) {
- ble_gatts_bonding_restored(conn_handle);
- } else {
- ble_gatts_bonding_established(conn_handle);
- }
+ if (status != 0) {
+ return;
+ }
+
+ /* If encryption succeded and encryption has been restored for bonded device,
+ * notify gatt server so it has chance to send notification/indication if needed.
+ */
+ if (security_restored) {
+ ble_gatts_bonding_restored(conn_handle);
+ return;
+ }
+
+ /* If this is fresh pairing and bonding has been established,
+ * notify gatt server about that so previous subscriptions (before bonding)
+ * can be stored.
+ */
+ if (bonded) {
+ ble_gatts_bonding_established(conn_handle);
}
#endif
}
diff --git a/src/libs/mynewt-nimble/nimble/host/src/ble_gap_priv.h b/src/libs/mynewt-nimble/nimble/host/src/ble_gap_priv.h
index ce443198..499823bc 100644
--- a/src/libs/mynewt-nimble/nimble/host/src/ble_gap_priv.h
+++ b/src/libs/mynewt-nimble/nimble/host/src/ble_gap_priv.h
@@ -116,7 +116,7 @@ int ble_gap_rx_l2cap_update_req(uint16_t conn_handle,
struct ble_gap_upd_params *params);
void ble_gap_rx_phy_update_complete(const struct ble_hci_ev_le_subev_phy_update_complete *ev);
void ble_gap_enc_event(uint16_t conn_handle, int status,
- int security_restored);
+ int security_restored, int bonded);
void ble_gap_passkey_event(uint16_t conn_handle,
struct ble_gap_passkey_params *passkey_params);
void ble_gap_notify_rx_event(uint16_t conn_handle, uint16_t attr_handle,
@@ -136,6 +136,7 @@ void ble_gap_preempt(void);
void ble_gap_preempt_done(void);
int ble_gap_terminate_with_conn(struct ble_hs_conn *conn, uint8_t hci_reason);
+void ble_gap_reset_state(int reason);
void ble_gap_conn_broken(uint16_t conn_handle, int reason);
int32_t ble_gap_timer(void);
diff --git a/src/libs/mynewt-nimble/nimble/host/src/ble_hs.c b/src/libs/mynewt-nimble/nimble/host/src/ble_hs.c
index 23ac1d14..731e8155 100644
--- a/src/libs/mynewt-nimble/nimble/host/src/ble_hs.c
+++ b/src/libs/mynewt-nimble/nimble/host/src/ble_hs.c
@@ -361,7 +361,6 @@ ble_hs_sync(void)
static int
ble_hs_reset(void)
{
- uint16_t conn_handle;
int rc;
STATS_INC(ble_hs_stats, reset);
@@ -376,14 +375,8 @@ ble_hs_reset(void)
ble_hs_clear_rx_queue();
- while (1) {
- conn_handle = ble_hs_atomic_first_conn_handle();
- if (conn_handle == BLE_HS_CONN_HANDLE_NONE) {
- break;
- }
-
- ble_gap_conn_broken(conn_handle, ble_hs_reset_reason);
- }
+ /* Clear adverising and scanning states. */
+ ble_gap_reset_state(ble_hs_reset_reason);
/* Clear configured addresses. */
ble_hs_id_reset();
@@ -680,7 +673,7 @@ ble_hs_rx_data(struct os_mbuf *om, void *arg)
/* If flow control is enabled, mark this packet with its corresponding
* connection handle.
*/
- ble_hs_flow_fill_acl_usrhdr(om);
+ ble_hs_flow_track_data_mbuf(om);
rc = ble_mqueue_put(&ble_hs_rx_q, ble_hs_evq, om);
if (rc != 0) {
diff --git a/src/libs/mynewt-nimble/nimble/host/src/ble_hs_conn.c b/src/libs/mynewt-nimble/nimble/host/src/ble_hs_conn.c
index f7edb624..ea89460c 100644
--- a/src/libs/mynewt-nimble/nimble/host/src/ble_hs_conn.c
+++ b/src/libs/mynewt-nimble/nimble/host/src/ble_hs_conn.c
@@ -327,6 +327,7 @@ ble_hs_conn_find_by_addr(const ble_addr_t *addr)
#endif
struct ble_hs_conn *conn;
+ struct ble_hs_conn_addrs addrs;
BLE_HS_DBG_ASSERT(ble_hs_locked_by_cur_task());
@@ -343,6 +344,14 @@ ble_hs_conn_find_by_addr(const ble_addr_t *addr)
if (ble_addr_cmp(&conn->bhc_peer_addr, addr) == 0) {
return conn;
}
+ if (conn->bhc_peer_addr.type < BLE_OWN_ADDR_RPA_PUBLIC_DEFAULT) {
+ continue;
+ }
+ /*If type 0x02 or 0x03 is used, let's double check if address is good */
+ ble_hs_conn_addrs(conn, &addrs);
+ if (ble_addr_cmp(&addrs.peer_id_addr, addr) == 0) {
+ return conn;
+ }
}
}
@@ -472,29 +481,52 @@ ble_hs_conn_timer(void)
int32_t time_diff;
uint16_t conn_handle;
- conn_handle = BLE_HS_CONN_HANDLE_NONE;
- next_exp_in = BLE_HS_FOREVER;
- now = ble_npl_time_get();
+ for (;;) {
+ conn_handle = BLE_HS_CONN_HANDLE_NONE;
+ next_exp_in = BLE_HS_FOREVER;
+ now = ble_npl_time_get();
- ble_hs_lock();
+ ble_hs_lock();
- /* This loop performs one of two tasks:
- * 1. Determine if any connections need to be terminated due to timeout.
- * If so, break out of the loop and terminate the connection. This
- * function will need to be executed again.
- * 2. Otherwise, determine when the next timeout will occur.
- */
- SLIST_FOREACH(conn, &ble_hs_conns, bhc_next) {
- if (!(conn->bhc_flags & BLE_HS_CONN_F_TERMINATING)) {
+ /* This loop performs one of two tasks:
+ * 1. Determine if any connections need to be terminated due to timeout.
+ * If so, break out of the loop and terminate the connection. This
+ * function will need to be executed again.
+ * 2. Otherwise, determine when the next timeout will occur.
+ */
+ SLIST_FOREACH(conn, &ble_hs_conns, bhc_next) {
+ if (!(conn->bhc_flags & BLE_HS_CONN_F_TERMINATING)) {
#if MYNEWT_VAL(BLE_L2CAP_RX_FRAG_TIMEOUT) != 0
- /* Check each connection's rx fragment timer. If too much time
- * passes after a partial packet is received, the connection is
- * terminated.
- */
- if (conn->bhc_rx_chan != NULL) {
- time_diff = conn->bhc_rx_timeout - now;
+ /* Check each connection's rx fragment timer. If too much time
+ * passes after a partial packet is received, the connection is
+ * terminated.
+ */
+ if (conn->bhc_rx_chan != NULL) {
+ time_diff = conn->bhc_rx_timeout - now;
+
+ if (time_diff <= 0) {
+ /* ACL reassembly has timed out. Remember the connection
+ * handle so it can be terminated after the mutex is
+ * unlocked.
+ */
+ conn_handle = conn->bhc_handle;
+ break;
+ }
+
+ /* Determine if this connection is the soonest to time out. */
+ if (time_diff < next_exp_in) {
+ next_exp_in = time_diff;
+ }
+ }
+#endif
+#if BLE_HS_ATT_SVR_QUEUED_WRITE_TMO
+ /* Check each connection's rx queued write timer. If too much
+ * time passes after a prep write is received, the queue is
+ * cleared.
+ */
+ time_diff = ble_att_svr_ticks_until_tmo(&conn->bhc_att_svr, now);
if (time_diff <= 0) {
/* ACL reassembly has timed out. Remember the connection
* handle so it can be terminated after the mutex is
@@ -508,45 +540,22 @@ ble_hs_conn_timer(void)
if (time_diff < next_exp_in) {
next_exp_in = time_diff;
}
- }
#endif
-
-#if BLE_HS_ATT_SVR_QUEUED_WRITE_TMO
- /* Check each connection's rx queued write timer. If too much
- * time passes after a prep write is received, the queue is
- * cleared.
- */
- time_diff = ble_att_svr_ticks_until_tmo(&conn->bhc_att_svr, now);
- if (time_diff <= 0) {
- /* ACL reassembly has timed out. Remember the connection
- * handle so it can be terminated after the mutex is
- * unlocked.
- */
- conn_handle = conn->bhc_handle;
- break;
}
-
- /* Determine if this connection is the soonest to time out. */
- if (time_diff < next_exp_in) {
- next_exp_in = time_diff;
- }
-#endif
}
- }
- ble_hs_unlock();
+ ble_hs_unlock();
- /* If a connection has timed out, terminate it. We need to recursively
- * call this function again to determine when the next timeout is. This
- * is a tail-recursive call, so it should be optimized to execute in the
- * same stack frame.
- */
- if (conn_handle != BLE_HS_CONN_HANDLE_NONE) {
- ble_gap_terminate(conn_handle, BLE_ERR_REM_USER_CONN_TERM);
- return ble_hs_conn_timer();
- }
+ /* If a connection has timed out, terminate it. We need to repeatedly
+ * call this function again to determine when the next timeout is.
+ */
+ if (conn_handle != BLE_HS_CONN_HANDLE_NONE) {
+ ble_gap_terminate(conn_handle, BLE_ERR_REM_USER_CONN_TERM);
+ continue;
+ }
- return next_exp_in;
+ return next_exp_in;
+ }
}
int
diff --git a/src/libs/mynewt-nimble/nimble/host/src/ble_hs_flow.c b/src/libs/mynewt-nimble/nimble/host/src/ble_hs_flow.c
index d224e6ee..2520c854 100644
--- a/src/libs/mynewt-nimble/nimble/host/src/ble_hs_flow.c
+++ b/src/libs/mynewt-nimble/nimble/host/src/ble_hs_flow.c
@@ -40,6 +40,23 @@ static ble_npl_event_fn ble_hs_flow_event_cb;
static struct ble_npl_event ble_hs_flow_ev;
+/* Connection handle associated with each mbuf in ACL pool */
+static uint16_t ble_hs_flow_mbuf_conn_handle[ MYNEWT_VAL(BLE_ACL_BUF_COUNT) ];
+
+static inline int
+ble_hs_flow_mbuf_index(const struct os_mbuf *om)
+{
+ const struct os_mempool *mp = om->om_omp->omp_pool;
+ uintptr_t addr = (uintptr_t)om;
+ int idx;
+
+ idx = (addr - mp->mp_membuf_addr) / mp->mp_block_size;
+
+ BLE_HS_DBG_ASSERT(mp->mp_membuf_addr + idx * mp->mp_block_size == addr);
+
+ return idx;
+}
+
static int
ble_hs_flow_tx_num_comp_pkts(void)
{
@@ -143,18 +160,13 @@ ble_hs_flow_acl_free(struct os_mempool_ext *mpe, void *data, void *arg)
struct ble_hs_conn *conn;
const struct os_mbuf *om;
uint16_t conn_handle;
+ int idx;
int rc;
om = data;
- /* An ACL data packet must be a single mbuf, and it must contain the
- * corresponding connection handle in its user header.
- */
- assert(OS_MBUF_IS_PKTHDR(om));
- assert(OS_MBUF_USRHDR_LEN(om) >= sizeof conn_handle);
-
- /* Copy the connection handle out of the mbuf. */
- memcpy(&conn_handle, OS_MBUF_USRHDR(om), sizeof conn_handle);
+ idx = ble_hs_flow_mbuf_index(om);
+ conn_handle = ble_hs_flow_mbuf_conn_handle[idx];
/* Free the mbuf back to its pool. */
rc = os_memblock_put_from_cb(&mpe->mpe_mp, data);
@@ -190,23 +202,19 @@ ble_hs_flow_connection_broken(uint16_t conn_handle)
}
/**
- * Fills the user header of an incoming data packet. On function return, the
- * header contains the connection handle associated with the sender.
+ * Associates incoming data packet with a connection handle of the sender.
*
* If flow control is disabled, this function is a no-op.
*/
void
-ble_hs_flow_fill_acl_usrhdr(struct os_mbuf *om)
+ble_hs_flow_track_data_mbuf(struct os_mbuf *om)
{
#if MYNEWT_VAL(BLE_HS_FLOW_CTRL)
const struct hci_data_hdr *hdr;
- uint16_t *conn_handle;
-
- BLE_HS_DBG_ASSERT(OS_MBUF_USRHDR_LEN(om) >= sizeof *conn_handle);
- conn_handle = OS_MBUF_USRHDR(om);
+ int idx = ble_hs_flow_mbuf_index(om);
hdr = (void *)om->om_data;
- *conn_handle = BLE_HCI_DATA_HANDLE(hdr->hdh_handle_pb_bc);
+ ble_hs_flow_mbuf_conn_handle[idx] = BLE_HCI_DATA_HANDLE(hdr->hdh_handle_pb_bc);
#endif
}
diff --git a/src/libs/mynewt-nimble/nimble/host/src/ble_hs_flow_priv.h b/src/libs/mynewt-nimble/nimble/host/src/ble_hs_flow_priv.h
index b1aa8c2f..753eaf8f 100644
--- a/src/libs/mynewt-nimble/nimble/host/src/ble_hs_flow_priv.h
+++ b/src/libs/mynewt-nimble/nimble/host/src/ble_hs_flow_priv.h
@@ -26,7 +26,7 @@ extern "C" {
#endif
void ble_hs_flow_connection_broken(uint16_t conn_handle);
-void ble_hs_flow_fill_acl_usrhdr(struct os_mbuf *om);
+void ble_hs_flow_track_data_mbuf(struct os_mbuf *om);
int ble_hs_flow_startup(void);
#ifdef __cplusplus
diff --git a/src/libs/mynewt-nimble/nimble/host/src/ble_hs_hci.c b/src/libs/mynewt-nimble/nimble/host/src/ble_hs_hci.c
index a334a747..ac472a9e 100644
--- a/src/libs/mynewt-nimble/nimble/host/src/ble_hs_hci.c
+++ b/src/libs/mynewt-nimble/nimble/host/src/ble_hs_hci.c
@@ -447,8 +447,8 @@ ble_hs_hci_acl_hdr_prepend(struct os_mbuf *om, uint16_t handle,
struct hci_data_hdr hci_hdr;
struct os_mbuf *om2;
- hci_hdr.hdh_handle_pb_bc =
- ble_hs_hci_util_handle_pb_bc_join(handle, pb_flag, 0);
+ put_le16(&hci_hdr.hdh_handle_pb_bc,
+ ble_hs_hci_util_handle_pb_bc_join(handle, pb_flag, 0));
put_le16(&hci_hdr.hdh_len, OS_MBUF_PKTHDR(om)->omp_len);
om2 = os_mbuf_prepend(om, sizeof hci_hdr);
diff --git a/src/libs/mynewt-nimble/nimble/host/src/ble_hs_misc.c b/src/libs/mynewt-nimble/nimble/host/src/ble_hs_misc.c
index 6c6da467..dfb46b74 100644
--- a/src/libs/mynewt-nimble/nimble/host/src/ble_hs_misc.c
+++ b/src/libs/mynewt-nimble/nimble/host/src/ble_hs_misc.c
@@ -56,7 +56,7 @@ ble_hs_misc_conn_chan_find(uint16_t conn_handle, uint16_t cid,
return rc;
}
-void
+int
ble_hs_misc_conn_chan_find_reqd(uint16_t conn_handle, uint16_t cid,
struct ble_hs_conn **out_conn,
struct ble_l2cap_chan **out_chan)
@@ -66,7 +66,9 @@ ble_hs_misc_conn_chan_find_reqd(uint16_t conn_handle, uint16_t cid,
int rc;
rc = ble_hs_misc_conn_chan_find(conn_handle, cid, &conn, &chan);
- BLE_HS_DBG_ASSERT_EVAL(rc == 0);
+ if (rc != 0) {
+ return rc;
+ }
if (out_conn != NULL) {
*out_conn = conn;
@@ -74,6 +76,8 @@ ble_hs_misc_conn_chan_find_reqd(uint16_t conn_handle, uint16_t cid,
if (out_chan != NULL) {
*out_chan = chan;
}
+
+ return 0;
}
uint8_t
diff --git a/src/libs/mynewt-nimble/nimble/host/src/ble_hs_priv.h b/src/libs/mynewt-nimble/nimble/host/src/ble_hs_priv.h
index 2cad6ef1..538d07a9 100644
--- a/src/libs/mynewt-nimble/nimble/host/src/ble_hs_priv.h
+++ b/src/libs/mynewt-nimble/nimble/host/src/ble_hs_priv.h
@@ -114,9 +114,9 @@ int ble_hs_hci_evt_acl_process(struct os_mbuf *om);
int ble_hs_misc_conn_chan_find(uint16_t conn_handle, uint16_t cid,
struct ble_hs_conn **out_conn,
struct ble_l2cap_chan **out_chan);
-void ble_hs_misc_conn_chan_find_reqd(uint16_t conn_handle, uint16_t cid,
- struct ble_hs_conn **out_conn,
- struct ble_l2cap_chan **out_chan);
+int ble_hs_misc_conn_chan_find_reqd(uint16_t conn_handle, uint16_t cid,
+ struct ble_hs_conn **out_conn,
+ struct ble_l2cap_chan **out_chan);
uint8_t ble_hs_misc_own_addr_type_to_id(uint8_t addr_type);
uint8_t ble_hs_misc_peer_addr_type_to_id(uint8_t addr_type);
int ble_hs_misc_restore_irks(void);
diff --git a/src/libs/mynewt-nimble/nimble/host/src/ble_l2cap_coc.c b/src/libs/mynewt-nimble/nimble/host/src/ble_l2cap_coc.c
index 41a83156..8dc367ed 100644
--- a/src/libs/mynewt-nimble/nimble/host/src/ble_l2cap_coc.c
+++ b/src/libs/mynewt-nimble/nimble/host/src/ble_l2cap_coc.c
@@ -73,7 +73,7 @@ ble_l2cap_coc_create_server(uint16_t psm, uint16_t mtu,
srv = ble_l2cap_coc_srv_alloc();
if (!srv) {
- return BLE_HS_ENOMEM;
+ return BLE_HS_ENOMEM;
}
srv->psm = psm;
@@ -392,6 +392,8 @@ ble_l2cap_event_coc_unstalled(struct ble_l2cap_chan *chan, int status)
chan->cb(&event, chan->cb_arg);
}
+/* WARNING: this function is called from different task contexts. We expect the
+ * host to be locked (ble_hs_lock()) before entering this function! */
static int
ble_l2cap_coc_continue_tx(struct ble_l2cap_chan *chan)
{
@@ -406,6 +408,7 @@ ble_l2cap_coc_continue_tx(struct ble_l2cap_chan *chan)
/* If there is no data to send, just return success */
tx = &chan->coc_tx;
if (!tx->sdu) {
+ ble_hs_unlock();
return 0;
}
@@ -440,6 +443,7 @@ ble_l2cap_coc_continue_tx(struct ble_l2cap_chan *chan)
BLE_HS_LOG(DEBUG, "Sending SDU len=%d\n", OS_MBUF_PKTLEN(tx->sdu));
rc = os_mbuf_append(txom, &l, sizeof(uint16_t));
if (rc) {
+ rc = BLE_HS_ENOMEM;
BLE_HS_LOG(DEBUG, "Could not append data rc=%d", rc);
goto failed;
}
@@ -452,55 +456,63 @@ ble_l2cap_coc_continue_tx(struct ble_l2cap_chan *chan)
rc = os_mbuf_appendfrom(txom, tx->sdu, tx->data_offset,
len - sdu_size_offset);
if (rc) {
+ rc = BLE_HS_ENOMEM;
BLE_HS_LOG(DEBUG, "Could not append data rc=%d", rc);
- goto failed;
+ goto failed;
}
- ble_hs_lock();
conn = ble_hs_conn_find_assert(chan->conn_handle);
rc = ble_l2cap_tx(conn, chan, txom);
- ble_hs_unlock();
if (rc) {
- /* txom is consumed by l2cap */
- txom = NULL;
- goto failed;
+ /* txom is consumed by l2cap */
+ txom = NULL;
+ goto failed;
} else {
- tx->credits --;
+ tx->credits--;
tx->data_offset += len - sdu_size_offset;
}
BLE_HS_LOG(DEBUG, "Sent %d bytes, credits=%d, to send %d bytes \n",
- len, tx->credits, OS_MBUF_PKTLEN(tx->sdu)- tx->data_offset );
+ len, tx->credits, OS_MBUF_PKTLEN(tx->sdu)- tx->data_offset);
if (tx->data_offset == OS_MBUF_PKTLEN(tx->sdu)) {
- BLE_HS_LOG(DEBUG, "Complete package sent\n");
- os_mbuf_free_chain(tx->sdu);
- tx->sdu = 0;
- tx->data_offset = 0;
- if (tx->flags & BLE_L2CAP_COC_FLAG_STALLED) {
- ble_l2cap_event_coc_unstalled(chan, 0);
- tx->flags &= ~BLE_L2CAP_COC_FLAG_STALLED;
- }
- break;
+ BLE_HS_LOG(DEBUG, "Complete package sent\n");
+ os_mbuf_free_chain(tx->sdu);
+ tx->sdu = NULL;
+ tx->data_offset = 0;
+ break;
}
}
if (tx->sdu) {
/* Not complete SDU sent, wait for credits */
tx->flags |= BLE_L2CAP_COC_FLAG_STALLED;
+ ble_hs_unlock();
return BLE_HS_ESTALLED;
}
+ if (tx->flags & BLE_L2CAP_COC_FLAG_STALLED) {
+ tx->flags &= ~BLE_L2CAP_COC_FLAG_STALLED;
+ ble_hs_unlock();
+ ble_l2cap_event_coc_unstalled(chan, 0);
+ } else {
+ ble_hs_unlock();
+ }
+
return 0;
failed:
os_mbuf_free_chain(tx->sdu);
tx->sdu = NULL;
+
os_mbuf_free_chain(txom);
if (tx->flags & BLE_L2CAP_COC_FLAG_STALLED) {
- ble_l2cap_event_coc_unstalled(chan, rc);
tx->flags &= ~BLE_L2CAP_COC_FLAG_STALLED;
+ ble_hs_unlock();
+ ble_l2cap_event_coc_unstalled(chan, rc);
+ } else {
+ ble_hs_unlock();
}
return rc;
@@ -535,7 +547,8 @@ ble_l2cap_coc_le_credits_update(uint16_t conn_handle, uint16_t dcid,
}
chan->coc_tx.credits += credits;
- ble_hs_unlock();
+
+ /* leave the host locked on purpose when ble_l2cap_coc_continue_tx() */
ble_l2cap_coc_continue_tx(chan);
}
@@ -584,18 +597,22 @@ ble_l2cap_coc_send(struct ble_l2cap_chan *chan, struct os_mbuf *sdu_tx)
{
struct ble_l2cap_coc_endpoint *tx;
- tx = &chan->coc_tx;
- if (tx->sdu) {
- return BLE_HS_EBUSY;
- }
+ tx = &chan->coc_tx;
if (OS_MBUF_PKTLEN(sdu_tx) > tx->mtu) {
return BLE_HS_EBADDATA;
}
+ ble_hs_lock();
+ if (tx->sdu) {
+ ble_hs_unlock();
+ return BLE_HS_EBUSY;
+ }
tx->sdu = sdu_tx;
+
+ /* leave the host locked on purpose when ble_l2cap_coc_continue_tx() */
return ble_l2cap_coc_continue_tx(chan);
}
diff --git a/src/libs/mynewt-nimble/nimble/host/src/ble_l2cap_sig.c b/src/libs/mynewt-nimble/nimble/host/src/ble_l2cap_sig.c
index bb4d8a5a..ad81c64a 100644
--- a/src/libs/mynewt-nimble/nimble/host/src/ble_l2cap_sig.c
+++ b/src/libs/mynewt-nimble/nimble/host/src/ble_l2cap_sig.c
@@ -508,8 +508,13 @@ ble_l2cap_sig_update(uint16_t conn_handle,
STATS_INC(ble_l2cap_stats, update_init);
ble_hs_lock();
- ble_hs_misc_conn_chan_find_reqd(conn_handle, BLE_L2CAP_CID_SIG,
- &conn, &chan);
+ rc = ble_hs_misc_conn_chan_find_reqd(conn_handle, BLE_L2CAP_CID_SIG,
+ &conn, &chan);
+ if (rc != 0) {
+ ble_hs_unlock();
+ goto done;
+ }
+
master = conn->bhc_flags & BLE_HS_CONN_F_MASTER;
ble_hs_unlock();
@@ -656,8 +661,8 @@ ble_l2cap_sig_coc_connect_cb(struct ble_l2cap_sig_proc *proc, int status)
continue;
}
- if ((status == 0) && (chan->dcid != 0)) {
- ble_l2cap_event_coc_connected(chan, status);
+ if (chan->dcid != 0) {
+ ble_l2cap_event_coc_connected(chan, 0);
/* Let's forget about connected channel now.
* Not connected will be freed later on.
*/
@@ -859,6 +864,7 @@ ble_l2cap_sig_credit_base_reconfig_rsp_rx(uint16_t conn_handle,
rsp = (struct ble_l2cap_sig_credit_base_reconfig_rsp *)(*om)->om_data;
ble_l2cap_sig_coc_reconfig_cb(proc, (rsp->result > 0) ? BLE_HS_EREJECT : 0);
+ ble_l2cap_sig_proc_free(proc);
return 0;
}
@@ -1061,7 +1067,15 @@ ble_l2cap_sig_credit_base_con_rsp_rx(uint16_t conn_handle,
if (rsp->result) {
rc = ble_l2cap_sig_coc_err2ble_hs_err(le16toh(rsp->result));
- goto done;
+ /* Below results means that some of the channels has not been created
+ * and we have to look closer into the response.
+ * Any other results means that all the connections has been refused.
+ */
+ if ((rsp->result != BLE_L2CAP_COC_ERR_NO_RESOURCES) &&
+ (rsp->result != BLE_L2CAP_COC_ERR_INVALID_SOURCE_CID) &&
+ (rsp->result != BLE_L2CAP_COC_ERR_SOURCE_CID_ALREADY_USED)) {
+ goto done;
+ }
}
ble_hs_lock();
diff --git a/src/libs/mynewt-nimble/nimble/host/src/ble_l2cap_sig_cmd.c b/src/libs/mynewt-nimble/nimble/host/src/ble_l2cap_sig_cmd.c
index 366dde62..510420f0 100644
--- a/src/libs/mynewt-nimble/nimble/host/src/ble_l2cap_sig_cmd.c
+++ b/src/libs/mynewt-nimble/nimble/host/src/ble_l2cap_sig_cmd.c
@@ -28,9 +28,11 @@ ble_l2cap_sig_tx(uint16_t conn_handle, struct os_mbuf *txom)
int rc;
ble_hs_lock();
- ble_hs_misc_conn_chan_find_reqd(conn_handle, BLE_L2CAP_CID_SIG,
- &conn, &chan);
- rc = ble_l2cap_tx(conn, chan, txom);
+ rc = ble_hs_misc_conn_chan_find_reqd(conn_handle, BLE_L2CAP_CID_SIG,
+ &conn, &chan);
+ if (rc == 0) {
+ rc = ble_l2cap_tx(conn, chan, txom);
+ }
ble_hs_unlock();
return rc;
diff --git a/src/libs/mynewt-nimble/nimble/host/src/ble_monitor.c b/src/libs/mynewt-nimble/nimble/host/src/ble_monitor.c
index 6057e7e2..55524f2d 100644
--- a/src/libs/mynewt-nimble/nimble/host/src/ble_monitor.c
+++ b/src/libs/mynewt-nimble/nimble/host/src/ble_monitor.c
@@ -29,7 +29,6 @@
#include <stdarg.h>
#include <stdio.h>
#include <inttypes.h>
-#include <libs/mynewt-nimble/porting/nimble/include/os/os_cputime.h>
#include "os/os.h"
#include "log/log.h"
#if MYNEWT_VAL(BLE_MONITOR_UART)
@@ -162,7 +161,7 @@ update_drop_counters(struct ble_monitor_hdr *failed_hdr)
if (*cnt < UINT8_MAX) {
(*cnt)++;
- ble_npl_callout_reset(&rtt_drops.tmo, OS_TICKS_PER_SEC);
+ ble_npl_callout_reset(&rtt_drops.tmo, portMAX_DELAY);
}
}
diff --git a/src/libs/mynewt-nimble/nimble/host/src/ble_sm.c b/src/libs/mynewt-nimble/nimble/host/src/ble_sm.c
index cfd80fcb..91afb75c 100644
--- a/src/libs/mynewt-nimble/nimble/host/src/ble_sm.c
+++ b/src/libs/mynewt-nimble/nimble/host/src/ble_sm.c
@@ -938,7 +938,7 @@ ble_sm_process_result(uint16_t conn_handle, struct ble_sm_result *res)
if (res->enc_cb) {
BLE_HS_DBG_ASSERT(proc == NULL || rm);
- ble_gap_enc_event(conn_handle, res->app_status, res->restore);
+ ble_gap_enc_event(conn_handle, res->app_status, res->restore, res->bonded);
}
if (res->app_status == 0 &&
@@ -1190,6 +1190,7 @@ ble_sm_enc_event_rx(uint16_t conn_handle, uint8_t evt_status, int encrypted)
ble_hs_unlock();
+ res.bonded = bonded;
ble_sm_process_result(conn_handle, &res);
}
@@ -2425,7 +2426,7 @@ ble_sm_timer(void)
* procedures without reconnect.
*/
while ((proc = STAILQ_FIRST(&exp_list)) != NULL) {
- ble_gap_enc_event(proc->conn_handle, BLE_HS_ETIMEOUT, 0);
+ ble_gap_enc_event(proc->conn_handle, BLE_HS_ETIMEOUT, 0, 0);
STAILQ_REMOVE_HEAD(&exp_list, next);
ble_sm_proc_free(proc);
diff --git a/src/libs/mynewt-nimble/nimble/host/src/ble_sm_alg.c b/src/libs/mynewt-nimble/nimble/host/src/ble_sm_alg.c
index 50fd77ec..148995c8 100644
--- a/src/libs/mynewt-nimble/nimble/host/src/ble_sm_alg.c
+++ b/src/libs/mynewt-nimble/nimble/host/src/ble_sm_alg.c
@@ -68,8 +68,6 @@ ble_sm_alg_encrypt(const uint8_t *key, const uint8_t *plaintext,
swap_buf(tmp, plaintext, 16);
-
-
if (tc_aes_encrypt(enc_data, tmp, &s) == TC_CRYPTO_FAIL) {
return BLE_HS_EUNKNOWN;
}
diff --git a/src/libs/mynewt-nimble/nimble/host/src/ble_sm_cmd.c b/src/libs/mynewt-nimble/nimble/host/src/ble_sm_cmd.c
index 5eef798d..01651f1d 100644
--- a/src/libs/mynewt-nimble/nimble/host/src/ble_sm_cmd.c
+++ b/src/libs/mynewt-nimble/nimble/host/src/ble_sm_cmd.c
@@ -52,12 +52,17 @@ ble_sm_tx(uint16_t conn_handle, struct os_mbuf *txom)
{
struct ble_l2cap_chan *chan;
struct ble_hs_conn *conn;
+ int rc;
BLE_HS_DBG_ASSERT(ble_hs_locked_by_cur_task());
STATS_INC(ble_l2cap_stats, sm_tx);
- ble_hs_misc_conn_chan_find_reqd(conn_handle, BLE_L2CAP_CID_SM,
- &conn, &chan);
- return ble_l2cap_tx(conn, chan, txom);
+ rc = ble_hs_misc_conn_chan_find_reqd(conn_handle, BLE_L2CAP_CID_SM,
+ &conn, &chan);
+ if (rc == 0) {
+ rc = ble_l2cap_tx(conn, chan, txom);
+ }
+
+ return rc;
}
diff --git a/src/libs/mynewt-nimble/nimble/host/src/ble_sm_priv.h b/src/libs/mynewt-nimble/nimble/host/src/ble_sm_priv.h
index 6d5601bf..27e75aa1 100644
--- a/src/libs/mynewt-nimble/nimble/host/src/ble_sm_priv.h
+++ b/src/libs/mynewt-nimble/nimble/host/src/ble_sm_priv.h
@@ -279,10 +279,10 @@ struct ble_sm_result {
uint8_t sm_err;
struct ble_gap_passkey_params passkey_params;
void *state_arg;
- unsigned execute:1;
- unsigned enc_cb:1;
- unsigned persist_keys:1;
- unsigned restore:1;
+ unsigned execute : 1;
+ unsigned enc_cb : 1;
+ unsigned bonded : 1;
+ unsigned restore : 1;
};
#if MYNEWT_VAL(BLE_HS_DEBUG)
diff --git a/src/libs/mynewt-nimble/nimble/host/src/ble_store_util.c b/src/libs/mynewt-nimble/nimble/host/src/ble_store_util.c
index 444cc55d..7de48272 100644
--- a/src/libs/mynewt-nimble/nimble/host/src/ble_store_util.c
+++ b/src/libs/mynewt-nimble/nimble/host/src/ble_store_util.c
@@ -233,13 +233,15 @@ ble_store_util_status_rr(struct ble_store_status_event *event, void *arg)
switch (event->event_code) {
case BLE_STORE_EVENT_OVERFLOW:
switch (event->overflow.obj_type) {
- case BLE_STORE_OBJ_TYPE_OUR_SEC:
- case BLE_STORE_OBJ_TYPE_PEER_SEC:
- case BLE_STORE_OBJ_TYPE_CCCD:
- return ble_gap_unpair_oldest_peer();
-
- default:
- return BLE_HS_EUNKNOWN;
+ case BLE_STORE_OBJ_TYPE_OUR_SEC:
+ case BLE_STORE_OBJ_TYPE_PEER_SEC:
+ return ble_gap_unpair_oldest_peer();
+ case BLE_STORE_OBJ_TYPE_CCCD:
+ /* Try unpairing oldest peer except current peer */
+ return ble_gap_unpair_oldest_except(&event->overflow.value->cccd.peer_addr);
+
+ default:
+ return BLE_HS_EUNKNOWN;
}
case BLE_STORE_EVENT_FULL:
diff --git a/src/libs/mynewt-nimble/nimble/host/store/config/src/ble_store_config.c b/src/libs/mynewt-nimble/nimble/host/store/config/src/ble_store_config.c
index ce60d1fb..cc1d59af 100644
--- a/src/libs/mynewt-nimble/nimble/host/store/config/src/ble_store_config.c
+++ b/src/libs/mynewt-nimble/nimble/host/store/config/src/ble_store_config.c
@@ -23,7 +23,6 @@
#include "sysinit/sysinit.h"
#include "syscfg/syscfg.h"
#include "host/ble_hs.h"
-#include "config/config.h"
#include "base64/base64.h"
#include "store/config/ble_store_config.h"
#include "ble_store_config_priv.h"
diff --git a/src/libs/mynewt-nimble/nimble/host/store/ram/include/store/ram/ble_store_ram.h b/src/libs/mynewt-nimble/nimble/host/store/ram/include/store/ram/ble_store_ram.h
index 842fb5f3..19372f17 100644
--- a/src/libs/mynewt-nimble/nimble/host/store/ram/include/store/ram/ble_store_ram.h
+++ b/src/libs/mynewt-nimble/nimble/host/store/ram/include/store/ram/ble_store_ram.h
@@ -17,6 +17,11 @@
* under the License.
*/
+/* This package has been deprecated and you should
+ * use the store/config package. For a RAM-only BLE store,
+ * use store/config and set BLE_STORE_CONFIG_PERSIST to 0.
+ */
+
#ifndef H_BLE_STORE_RAM_
#define H_BLE_STORE_RAM_
diff --git a/src/libs/mynewt-nimble/nimble/host/store/ram/src/ble_store_ram.c b/src/libs/mynewt-nimble/nimble/host/store/ram/src/ble_store_ram.c
index ab5cdb9f..b912ea47 100644
--- a/src/libs/mynewt-nimble/nimble/host/store/ram/src/ble_store_ram.c
+++ b/src/libs/mynewt-nimble/nimble/host/store/ram/src/ble_store_ram.c
@@ -23,6 +23,11 @@
* contents are lost when the application terminates.
*/
+/* This package has been deprecated and you should
+ * use the store/config package. For a RAM-only BLE store,
+ * use store/config and set BLE_STORE_CONFIG_PERSIST to 0.
+ */
+
#include <inttypes.h>
#include <string.h>
diff --git a/src/libs/mynewt-nimble/nimble/host/store/ram/syscfg.yml b/src/libs/mynewt-nimble/nimble/host/store/ram/syscfg.yml
index 442211dd..91c55fd8 100644
--- a/src/libs/mynewt-nimble/nimble/host/store/ram/syscfg.yml
+++ b/src/libs/mynewt-nimble/nimble/host/store/ram/syscfg.yml
@@ -20,4 +20,13 @@ syscfg.defs:
description: >
Sysinit stage for the RAM BLE store.
value: 500
+ BLE_STORE_RAM_DEPRECATED_FLAG:
+ description: >
+ Package store/ram is deprecated and store/config shall be used with BLE_STORE_CONFIG_PERSIST set to 0
+ value: 0
+ deprecated: 1
+
+
+syscfg.vals:
+ BLE_STORE_RAM_DEPRECATED_FLAG: 1
diff --git a/src/libs/mynewt-nimble/nimble/host/test/src/ble_gap_test.c b/src/libs/mynewt-nimble/nimble/host/test/src/ble_gap_test.c
index 3962bacc..7496e316 100644
--- a/src/libs/mynewt-nimble/nimble/host/test/src/ble_gap_test.c
+++ b/src/libs/mynewt-nimble/nimble/host/test/src/ble_gap_test.c
@@ -2050,70 +2050,6 @@ ble_gap_test_util_update_l2cap(struct ble_gap_upd_params *params,
}
static void
-ble_gap_test_util_update_no_l2cap_tmo(struct ble_gap_upd_params *params,
- int master)
-{
- struct ble_hs_conn *conn;
- int rc;
-
- uint8_t peer_addr[6] = { 1, 2, 3, 4, 5, 6 };
-
- ble_gap_test_util_init();
-
- ble_hs_test_util_create_conn(2, peer_addr, ble_gap_test_util_connect_cb,
- NULL);
-
- if (!master) {
- ble_hs_lock();
- conn = ble_hs_conn_find(2);
- TEST_ASSERT_FATAL(conn != NULL);
- conn->bhc_flags &= ~BLE_HS_CONN_F_MASTER;
- ble_hs_unlock();
- }
-
- /* Erase callback info reported during connection establishment; we only
- * care about updates.
- */
- ble_gap_test_util_reset_cb_info();
-
- TEST_ASSERT(!ble_gap_master_in_progress());
-
- rc = ble_hs_test_util_conn_update(2, params, 0);
- TEST_ASSERT(rc == 0);
- TEST_ASSERT(!ble_gap_master_in_progress());
-
- /* Verify tx of connection update command. */
- ble_gap_test_util_verify_tx_update_conn(params);
-
- /* Ensure no update event reported. */
- TEST_ASSERT(ble_gap_test_event.type == 0xff);
-
- /* Advance 39 seconds; ensure no timeout reported. */
- os_time_advance(39 * OS_TICKS_PER_SEC);
- ble_gap_timer();
- TEST_ASSERT(ble_gap_test_event.type == 0xff);
-
- /* Advance 40th second; ensure timeout reported. */
- os_time_advance(1 * OS_TICKS_PER_SEC);
-
- /* Timeout will result in a terminate HCI command being sent; schedule ack
- * from controller.
- */
- ble_hs_test_util_hci_ack_set_disconnect(0);
-
- ble_gap_timer();
-
- /* Verify terminate was sent. */
- ble_gap_test_util_verify_tx_disconnect();
-
- TEST_ASSERT(ble_gap_test_event.type == BLE_GAP_EVENT_CONN_UPDATE);
- TEST_ASSERT(ble_gap_test_conn_status == BLE_HS_ETIMEOUT);
- TEST_ASSERT(ble_gap_test_conn_desc.conn_handle == 2);
- TEST_ASSERT(memcmp(ble_gap_test_conn_desc.peer_id_addr.val,
- peer_addr, 6) == 0);
-}
-
-static void
ble_gap_test_util_update_l2cap_tmo(struct ble_gap_upd_params *params,
uint8_t hci_status, uint8_t event_status,
int rx_l2cap)
@@ -2982,9 +2918,6 @@ TEST_CASE_SELF(ble_gap_test_case_update_timeout)
.max_ce_len = 456,
};
- /* No L2CAP. */
- ble_gap_test_util_update_no_l2cap_tmo(&params, 1);
-
/* L2CAP - Local unsupported; L2CAP timeout. */
ble_gap_test_util_update_l2cap_tmo(&params, BLE_ERR_UNKNOWN_HCI_CMD, 0, 0);
diff --git a/src/libs/mynewt-nimble/nimble/include/nimble/ble.h b/src/libs/mynewt-nimble/nimble/include/nimble/ble.h
index 3fc2902e..248e8ae8 100644
--- a/src/libs/mynewt-nimble/nimble/include/nimble/ble.h
+++ b/src/libs/mynewt-nimble/nimble/include/nimble/ble.h
@@ -81,7 +81,14 @@ struct ble_mbuf_hdr_rxinfo
#endif
};
-/* Flag definitions for rxinfo */
+/*
+ * Flag definitions for rxinfo
+ *
+ * Note: it's ok to have symbols with the same values as long as they cannot be
+ * set for the same PDU (e.g. one use by scanner, other one used by
+ * connection)
+ */
+#define BLE_MBUF_HDR_F_CONN_CREDIT (0x8000)
#define BLE_MBUF_HDR_F_IGNORED (0x8000)
#define BLE_MBUF_HDR_F_SCAN_REQ_TXD (0x4000)
#define BLE_MBUF_HDR_F_INITA_RESOLVED (0x2000)
diff --git a/src/libs/mynewt-nimble/nimble/include/nimble/hci_common.h b/src/libs/mynewt-nimble/nimble/include/nimble/hci_common.h
index c79abb31..3df8dd66 100644
--- a/src/libs/mynewt-nimble/nimble/include/nimble/hci_common.h
+++ b/src/libs/mynewt-nimble/nimble/include/nimble/hci_common.h
@@ -108,7 +108,7 @@ struct ble_hci_cb_ctlr_to_host_fc_cp {
#define BLE_HCI_OCF_CB_HOST_BUF_SIZE (0x0033)
struct ble_hci_cb_host_buf_size_cp {
uint16_t acl_data_len;
- uint16_t sco_data_len;
+ uint8_t sco_data_len;
uint16_t acl_num;
uint16_t sco_num;
} __attribute__((packed));
@@ -201,6 +201,14 @@ struct ble_hci_le_rd_buf_size_rp {
uint8_t data_packets;
} __attribute__((packed));
+#define BLE_HCI_OCF_LE_RD_BUF_SIZE_V2 (0x0060)
+struct ble_hci_le_rd_buf_size_v2_rp {
+ uint16_t data_len;
+ uint8_t data_packets;
+ uint16_t iso_data_len;
+ uint8_t iso_data_packets;
+} __attribute__((packed));
+
#define BLE_HCI_OCF_LE_RD_LOC_SUPP_FEAT (0x0003)
struct ble_hci_le_rd_loc_supp_feat_rp {
uint64_t features;
@@ -825,6 +833,228 @@ struct ble_hci_le_set_default_periodic_sync_transfer_params_cp {
#define BLE_HCI_OCF_LE_GENERATE_DHKEY_V2 (0x005E)
#define BLE_HCI_OCF_LE_MODIFY_SCA (0x005F)
+#if MYNEWT_VAL(BLE_ISO)
+#define BLE_HCI_OCF_LE_READ_ISO_TX_SYNC (0x0061)
+struct ble_hci_le_read_iso_tx_sync_cp {
+ uint16_t conn_handle;
+} __attribute__((packed));
+
+struct ble_hci_le_read_iso_tx_sync_rp {
+ uint16_t conn_handle;
+ uint16_t packet_seq_num;
+ uint32_t timestamp;
+ uint8_t timeoffset[3];
+} __attribute__((packed));
+
+#define BLE_HCI_LE_SET_CIG_CIS_MAX_NUM (0x1F)
+#define BLE_HCI_OCF_LE_SET_CIG_PARAM (0x0062)
+struct ble_hci_le_cis_params {
+ uint8_t cis_id;
+ uint16_t max_sdu_mtos;
+ uint16_t max_sdu_stom;
+ uint8_t phy_mtos;
+ uint8_t phy_stom;
+ uint8_t rnt_mtos;
+ uint8_t rnt_stom;
+} __attribute__((packed));
+
+struct ble_hci_le_set_cig_params_cp {
+ uint8_t cig_id;
+ uint8_t sdu_interval_mtos[3];
+ uint8_t sdu_interval_stom[3];
+ uint8_t sca;
+ uint8_t packing;
+ uint8_t framing;
+ uint16_t max_latency_mtos;
+ uint16_t max_latency_stom;
+ uint8_t cis_cnt;
+ struct ble_hci_le_cis_params cis_params[0];
+} __attribute__((packed));
+
+struct ble_hci_le_set_cig_params_rp {
+ uint8_t cig_id;
+ uint8_t cis_cnt;
+ uint16_t cis_handle[0];
+} __attribute__((packed));
+
+#if MYNEWT_VAL(BLE_ISO_TEST)
+#define BLE_HCI_OCF_LE_SET_CIG_PARAM_TEST (0x0063)
+struct ble_hci_le_cis_params_test {
+ uint8_t cis_id;
+ uint8_t nse;
+ uint16_t max_sdu_mtos;
+ uint16_t max_sdu_stom;
+ uint16_t max_pdu_mtos;
+ uint16_t max_pdu_stom;
+ uint8_t phy_mtos;
+ uint8_t phy_stom;
+ uint8_t bn_mtos;
+ uint8_t bn_stom;
+} __attribute__((packed));
+
+struct ble_hci_le_set_cig_params_test_cp {
+ uint8_t cig_id;
+ uint8_t sdu_interval_mtos[3];
+ uint8_t sdu_interval_stom[3];
+ uint8_t ft_mtos;
+ uint8_t ft_stom;
+ uint16_t iso_interval;
+ uint8_t sca;
+ uint8_t packing;
+ uint8_t framing;
+ uint8_t cis_cnt;
+ struct ble_hci_le_cis_params_test cis_params[0];
+} __attribute__((packed));
+#endif
+
+#define BLE_HCI_LE_CREATE_CIS_MAX_CIS_NUM (0x1F)
+#define BLE_HCI_OCF_LE_CREATE_CIS (0x0064)
+struct ble_hci_le_create_cis_params {
+ uint16_t cis_handle;
+ uint16_t conn_handle;
+} __attribute__((packed));
+
+struct ble_hci_le_create_cis_cp {
+ uint8_t cis_cnt;
+ struct ble_hci_le_create_cis_params params[0];
+} __attribute__((packed));
+
+#define BLE_HCI_OCF_LE_REMOVE_CIG (0x0065)
+struct ble_hci_le_remove_cig_cp {
+ uint8_t cig_id;
+} __attribute__((packed));
+
+struct ble_hci_le_remove_cig_rp {
+ uint8_t cig_id;
+} __attribute__((packed));
+
+#define BLE_HCI_OCF_LE_ACCEPT_CIS_REQ (0x0066)
+struct ble_hci_le_accept_cis_request_cp {
+ uint16_t cis_handle;
+} __attribute__((packed));
+
+#define BLE_HCI_OCF_LE_REJECT_CIS_REQ (0x0067)
+struct ble_hci_le_reject_cis_request_cp {
+ uint16_t cis_handle;
+ uint8_t reason;
+} __attribute__((packed));
+
+struct ble_hci_le_reject_cis_request_rp {
+ uint16_t conn_handle;
+} __attribute__((packed));
+
+#define BLE_HCI_OCF_LE_CREATE_BIG (0x0068)
+struct ble_hci_le_create_big_cp {
+ uint8_t big_handle;
+ uint8_t adv_handle;
+ uint8_t bis_cnt;
+ uint8_t sdu_interval[3];
+ uint16_t max_sdu;
+ uint16_t max_transport_latency;
+ uint8_t rnt;
+ uint8_t phy;
+ uint8_t packing;
+ uint8_t framing;
+ uint8_t encryption;
+ uint8_t broadcast_code[16];
+} __attribute__((packed));
+
+#if MYNEWT_VAL(BLE_ISO_TEST)
+#define BLE_HCI_OCF_LE_CREATE_BIG_TEST (0x0069)
+struct ble_hci_le_create_big_test_cp {
+ uint8_t big_handle;
+ uint8_t adv_handle;
+ uint8_t bis_cnt;
+ uint8_t sdu_interval[3];
+ uint16_t iso_interval;
+ uint8_t nse;
+ uint16_t max_sdu;
+ uint16_t max_pdu;
+ uint8_t phy;
+ uint8_t packing;
+ uint8_t framing;
+ uint8_t bn;
+ uint8_t irc;
+ uint8_t pto;
+ uint8_t encryption;
+ uint8_t broadcast_code[16];
+} __attribute__((packed));
+#endif
+
+#define BLE_HCI_OCF_LE_TERMINATE_BIG (0x006a)
+struct ble_hci_le_terminate_big_cp {
+ uint8_t big_handle;
+ uint8_t reason;
+} __attribute__((packed));
+
+#define BLE_HCI_LE_BIG_CREATE_SYNC_LEN_MIN (25)
+#define BLE_HCI_OCF_LE_BIG_CREATE_SYNC (0x006b)
+struct ble_hci_le_big_create_sync_cp {
+ uint8_t big_handle;
+ uint16_t sync_handle;
+ uint8_t big_cnt;
+ uint8_t encryption;
+ uint8_t broadcast_code[16];
+ uint8_t mse;
+ uint16_t timeout;
+ uint8_t bis[0];
+} __attribute__((packed));
+
+#define BLE_HCI_OCF_LE_BIG_TERMINATE_SYNC (0x006c)
+struct ble_hci_le_terminate_big_sync_cp {
+ uint8_t big_handle;
+} __attribute__((packed));
+#endif
+
+#define BLE_HCI_OCF_LE_REQ_PEER_SCA (0x006d)
+struct ble_hci_le_request_peer_sca_cp {
+ uint16_t conn_handle;
+} __attribute__((packed));
+
+#if MYNEWT_VAL(BLE_ISO)
+#define BLE_HCI_OCF_LE_SETUP_ISO_DATA_PATH (0x006e)
+struct ble_hci_le_iso_setup_data_path_cp {
+ uint16_t iso_handle;
+ uint8_t direction;
+ uint8_t id;
+ uint8_t codec_id[5];
+ uint8_t controller_delay[3];
+ uint8_t codec_conf_len;
+ uint8_t codec_conf[0];
+} __attribute__((packed));
+
+#define BLE_HCI_LE_REMOVE_INPUT_DATA_PATH_BIT (0x01)
+#define BLE_HCI_LE_REMOVE_OUTPUT_DATA_PATH_BIT (0x02)
+#define BLE_HCI_OCF_LE_REMOVE_ISO_DATA_PATH (0x006f)
+struct ble_hci_le_iso_remove_data_path_cp {
+ uint16_t iso_handle;
+ uint8_t direction;
+} __attribute__((packed));
+
+#if MYNEWT_VAL(BLE_ISO_TEST)
+#define BLE_HCI_OCF_LE_ISO_TRANSMIT_TEST (0x0070)
+struct ble_hci_le_iso_transmit_test_cp {
+ uint16_t iso_handle;
+ uint8_t payload_type;
+} __attribute__((packed));
+
+#define BLE_HCI_OCF_LE_ISO_RECEIVE_TEST (0x0071)
+struct ble_hci_le_iso_receive_test_cp {
+ uint16_t iso_handle;
+} __attribute__((packed));
+
+#define BLE_HCI_OCF_LE_ISO_READ_TEST_COUNTERS (0x0072)
+struct ble_hci_le_iso_read_test_counters_cp {
+ uint16_t iso_handle;
+} __attribute__((packed));
+
+#define BLE_HCI_OCF_LE_ISO_TEST_END (0x0073)
+struct ble_hci_le_iso_test_end_cp {
+ uint16_t iso_handle;
+} __attribute__((packed));
+#endif
+#endif
+
#define BLE_HCI_OCF_LE_SET_HOST_FEAT (0x0074)
struct ble_hci_le_set_host_feat_cp {
uint8_t bit_num;
@@ -1212,7 +1442,7 @@ struct ble_hci_ev_auth_pyld_tmo {
struct ble_hci_ev_vendor_debug {
uint8_t id;
uint8_t data[0];
-}__attribute__((packed));
+} __attribute__((packed));
/* LE sub-event codes */
#define BLE_HCI_LE_SUBEV_CONN_COMPLETE (0x01)
@@ -1444,6 +1674,110 @@ struct ble_hci_ev_le_subev_periodic_adv_sync_transfer {
uint8_t aca;
} __attribute__((packed));
+#define BLE_HCI_LE_SUBEV_CIS_ESTAB (0x19)
+struct ble_hci_ev_le_subev_cis_established {
+ uint8_t subev_code;
+ uint8_t status;
+ uint16_t cis_handle;
+ uint8_t cig_sync_delay[3];
+ uint8_t cis_sync_delay[3];
+ uint8_t trans_latency_mtos[3];
+ uint8_t trans_latency_stom[3];
+ uint8_t phy_mtos;
+ uint8_t phy_stom;
+ uint8_t nse;
+ uint8_t bn_mtos;
+ uint8_t bn_stom;
+ uint8_t ft_mtos;
+ uint8_t ft_stom;
+ uint16_t max_pdu_mtos;
+ uint16_t max_pdu_stom;
+ uint16_t iso_interval;
+} __attribute__((packed));
+
+#define BLE_HCI_LE_SUBEV_CIS_REQUEST (0x1A)
+struct ble_hci_ev_le_subev_cis_request {
+ uint8_t subev_code;
+ uint16_t conn_handle;
+ uint16_t cis_handle;
+ uint8_t cig_id;
+ uint8_t cis_id;
+} __attribute__((packed));
+
+#define BLE_HCI_LE_SUBEV_BIG_COMP (0x1B)
+struct ble_hci_ev_le_subev_big_complete {
+ uint8_t subev_code;
+ uint8_t status;
+ uint8_t big_handle;
+ uint8_t big_sync_delay[3];
+ uint8_t transport_latency[3];
+ uint8_t phy;
+ uint8_t nse;
+ uint8_t bn;
+ uint8_t pto;
+ uint8_t irc;
+ uint16_t max_pdu;
+ uint16_t iso_interval;
+ uint8_t bis_cnt;
+ uint16_t bis[0];
+} __attribute__((packed));
+
+#define BLE_HCI_LE_SUBEV_BIG_TERMINATE_COMP (0x1C)
+struct ble_hci_ev_le_subev_big_terminate_complete {
+ uint8_t subev_code;
+ uint8_t big_handle;
+ uint8_t reason;
+} __attribute__((packed));
+
+#define BLE_HCI_LE_SUBEV_BIG_SYNC_ESTAB (0x1D)
+struct ble_hci_ev_le_subev_big_sync_established {
+ uint8_t subev_code;
+ uint8_t status;
+ uint8_t big_handle;
+ uint8_t transport_latency[3];
+ uint8_t nse;
+ uint8_t bn;
+ uint8_t pto;
+ uint8_t irc;
+ uint16_t max_pdu;
+ uint16_t iso_interval;
+ uint8_t bis_cnt;
+ uint16_t bis_handles[0];
+} __attribute__((packed));
+
+#define BLE_HCI_LE_SUBEV_BIG_SYNC_LOST (0x1E)
+struct ble_hci_ev_le_subev_big_sync_lost {
+ uint8_t subev_code;
+ uint8_t big_handle;
+ uint8_t reason;
+} __attribute__((packed));
+
+#define BLE_HCI_LE_SUBEV_REQ_PEER_SCA_COMP (0x1F)
+struct ble_hci_ev_le_subev_peer_sca_complete {
+ uint8_t subev_code;
+ uint8_t status;
+ uint16_t conn_handle;
+ uint8_t sca;
+} __attribute__((packed));
+
+#define BLE_HCI_LE_SUBEV_BIGINFO_ADV_REPORT (0x22)
+struct ble_hci_ev_le_subev_biginfo_adv_report {
+ uint8_t subev_code;
+ uint16_t sync_handle;
+ uint8_t bis_cnt;
+ uint8_t nse;
+ uint16_t iso_interval;
+ uint8_t bn;
+ uint8_t pto;
+ uint8_t irc;
+ uint16_t max_pdu;
+ uint8_t sdu_interval[3];
+ uint16_t max_sdu;
+ uint8_t phy;
+ uint8_t framing;
+ uint8_t encryption;
+} __attribute__((packed));
+
/* Data buffer overflow event */
#define BLE_HCI_EVENT_ACL_BUF_OVERFLOW (0x01)
diff --git a/src/libs/mynewt-nimble/nimble/syscfg.yml b/src/libs/mynewt-nimble/nimble/syscfg.yml
index 537fd9ba..35a6ef81 100644
--- a/src/libs/mynewt-nimble/nimble/syscfg.yml
+++ b/src/libs/mynewt-nimble/nimble/syscfg.yml
@@ -77,6 +77,19 @@ syscfg.defs:
integer for easy comparison.
range: 50, 51, 52
value: 50
+ BLE_ISO:
+ description: >
+ This enables LE Isochronous Channels as per Bluetooth v5.2
+ value: 0
+ restrictions:
+ - '(BLE_VERSION >= 52) if 1'
+
+ BLE_ISO_TEST:
+ description: >
+ Enables BLE ISO Testing commands
+ value: 0
+ restrictions:
+ - 'BLE_ISO if 1'
# Allow periodic sync transfer only if 5.1 or higher
syscfg.restrictions:
diff --git a/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/.gitignore b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/.gitignore
new file mode 100644
index 00000000..bba9f995
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/.gitignore
@@ -0,0 +1,2 @@
+/src/libble_stack_da1469x.a
+
diff --git a/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/diag/pkg.yml b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/diag/pkg.yml
new file mode 100644
index 00000000..9b9ee83e
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/diag/pkg.yml
@@ -0,0 +1,28 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+pkg.name: nimble/transport/dialog_cmac/cmac_driver/diag
+pkg.description: Default diag configuration for CMAC
+pkg.author: "Apache Mynewt <dev@mynewt.apache.org>"
+pkg.homepage: "http://mynewt.apache.org/"
+pkg.keywords:
+ - dialog
+ - da1469x
+ - cmac
+pkg.apis: dialog_cmac_diag
diff --git a/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/diag/src/cmac_diag.c b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/diag/src/cmac_diag.c
new file mode 100644
index 00000000..4f754706
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/diag/src/cmac_diag.c
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include "syscfg/syscfg.h"
+#include "mcu/mcu.h"
+
+#if MYNEWT_VAL(BLE_HOST)
+void
+cmac_diag_setup_host(void)
+{
+ /* Setup pins for diagnostic signals */
+ mcu_gpio_set_pin_function(42, MCU_GPIO_MODE_OUTPUT, MCU_GPIO_FUNC_CMAC_DIAG0); /* DIAG_0 @ P1.10 */
+ mcu_gpio_set_pin_function(43, MCU_GPIO_MODE_OUTPUT, MCU_GPIO_FUNC_CMAC_DIAG1); /* DIAG_1 @ P1.11 */
+ mcu_gpio_set_pin_function(44, MCU_GPIO_MODE_OUTPUT, MCU_GPIO_FUNC_CMAC_DIAG2); /* DIAG_2 @ P1.12 */
+ mcu_gpio_set_pin_function(24, MCU_GPIO_MODE_OUTPUT, MCU_GPIO_FUNC_CMAC_DIAGX); /* DIAG_3 @ P0.24 */
+ mcu_gpio_set_pin_function(21, MCU_GPIO_MODE_OUTPUT, MCU_GPIO_FUNC_CMAC_DIAGX); /* DIAG_4 @ P0.21 */
+ mcu_gpio_set_pin_function(20, MCU_GPIO_MODE_OUTPUT, MCU_GPIO_FUNC_CMAC_DIAGX); /* DIAG_5 @ P0.20 */
+ mcu_gpio_set_pin_function(19, MCU_GPIO_MODE_OUTPUT, MCU_GPIO_FUNC_CMAC_DIAGX); /* DIAG_6 @ P0.19 */
+ mcu_gpio_set_pin_function(18, MCU_GPIO_MODE_OUTPUT, MCU_GPIO_FUNC_CMAC_DIAGX); /* DIAG_7 @ P0.18 */
+ mcu_gpio_set_pin_function(31, MCU_GPIO_MODE_OUTPUT, MCU_GPIO_FUNC_CMAC_DIAGX); /* DIAG_8 @ P0.31 */
+ mcu_gpio_set_pin_function(30, MCU_GPIO_MODE_OUTPUT, MCU_GPIO_FUNC_CMAC_DIAGX); /* DIAG_9 @ P0.30 */
+ mcu_gpio_set_pin_function(29, MCU_GPIO_MODE_OUTPUT, MCU_GPIO_FUNC_CMAC_DIAGX); /* DIAG_10 @ P0.29 */
+ mcu_gpio_set_pin_function(28, MCU_GPIO_MODE_OUTPUT, MCU_GPIO_FUNC_CMAC_DIAGX); /* DIAG_11 @ P0.28 */
+ mcu_gpio_set_pin_function(27, MCU_GPIO_MODE_OUTPUT, MCU_GPIO_FUNC_CMAC_DIAGX); /* DIAG_12 @ P0.27 */
+ mcu_gpio_set_pin_function(26, MCU_GPIO_MODE_OUTPUT, MCU_GPIO_FUNC_CMAC_DIAGX); /* DIAG_13 @ P0.26 */
+ mcu_gpio_set_pin_function(38, MCU_GPIO_MODE_OUTPUT, MCU_GPIO_FUNC_CMAC_DIAGX); /* DIAG_14 @ P1.06 */
+ mcu_gpio_set_pin_function(41, MCU_GPIO_MODE_OUTPUT, MCU_GPIO_FUNC_CMAC_DIAGX); /* DIAG_15 @ P1.09 */
+}
+#endif
+
+#if MYNEWT_VAL(BLE_CONTROLLER)
+void
+cmac_diag_setup_cmac(void)
+{
+ MCU_DIAG_MAP( 0, 4, DSER);
+ MCU_DIAG_MAP( 1, 6, CMAC_ON_ERROR);
+ MCU_DIAG_MAP( 2, 2, PHY_TX_EN);
+ MCU_DIAG_MAP( 3, 2, PHY_RX_EN);
+ MCU_DIAG_MAP( 4, 2, PHY_TXRX_DATA_COMB);
+ MCU_DIAG_MAP( 5, 2, PHY_TXRX_DATA_EN_COMB);
+ MCU_DIAG_MAP( 6, 5, EV1US_FRAME_START);
+ MCU_DIAG_MAP( 7, 5, EV_BS_START);
+ MCU_DIAG_MAP( 8, 5, EV1C_BS_STOP);
+ MCU_DIAG_MAP( 9, 5, EV1US_PHY_TO_IDLE);
+ MCU_DIAG_MAP(10, 9, CALLBACK_IRQ);
+ MCU_DIAG_MAP(11, 9, FIELD_IRQ);
+ MCU_DIAG_MAP(12, 9, FRAME_IRQ);
+ MCU_DIAG_MAP(13, 3, SLP_TIMER_ACTIVE);
+ MCU_DIAG_MAP(14, 4, SLEEPING);
+ MCU_DIAG_MAP(15, 8, LL_TIMER1_00);
+}
+#endif
diff --git a/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/include/cmac_driver/cmac_diag.h b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/include/cmac_driver/cmac_diag.h
new file mode 100644
index 00000000..dc6ee903
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/include/cmac_driver/cmac_diag.h
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#ifndef __MCU_CMAC_DIAG_H_
+#define __MCU_CMAC_DIAG_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void cmac_diag_setup_host(void);
+void cmac_diag_setup_cmac(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __MCU_CMAC_DIAG_H_ */
diff --git a/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/include/cmac_driver/cmac_host.h b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/include/cmac_driver/cmac_host.h
new file mode 100644
index 00000000..50d86755
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/include/cmac_driver/cmac_host.h
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#ifndef __DA1469X_CMAC_V2_H_
+#define __DA1469X_CMAC_V2_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void cmac_host_init(void);
+void cmac_host_signal2cmac(void);
+void cmac_host_rf_calibrate(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __DA1469X_CMAC_V2_H_ */
diff --git a/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/include/cmac_driver/cmac_shared.h b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/include/cmac_driver/cmac_shared.h
new file mode 100644
index 00000000..90b5827d
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/include/cmac_driver/cmac_shared.h
@@ -0,0 +1,193 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#ifndef __MCU_CMAC_SHARED_H_
+#define __MCU_CMAC_SHARED_H_
+
+#include <stdint.h>
+#include "syscfg/syscfg.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define CMAC_SHARED_MAGIC_CMAC (0x4C6C) /* "lL" */
+#define CMAC_SHARED_MAGIC_SYS (0x5368) /* "hS" */
+
+#define CMAC_SHARED_F_SYS_LPCLK_AVAILABLE (0x0001)
+
+/*
+ * Simple circular buffer for storing random numbers generated by M33
+ * Empty: cmr_in = cmr_out = 0;
+ * Full: cmr_in + 1 = cmr_out
+ *
+ * cmr_in: used by the M33 to add random numbers to the circular buffer.
+ * cmr_out: used by CMAC to retrieve random numbers
+ *
+ * NOTE: cmr_in and cmr_out are indices.
+ */
+#define CMAC_RAND_BUF_ELEMS (16)
+
+struct cmac_rand {
+ int cmr_active;
+ int cmr_in;
+ int cmr_out;
+ uint32_t cmr_buf[CMAC_RAND_BUF_ELEMS];
+};
+
+struct cmac_mbox {
+ uint16_t rd_off;
+ uint16_t wr_off;
+};
+
+struct cmac_dcdc {
+ uint8_t enabled;
+ uint32_t v18;
+ uint32_t v18p;
+ uint32_t vdd;
+ uint32_t v14;
+ uint32_t ctrl1;
+};
+
+struct cmac_trim {
+ uint8_t rfcu_len;
+ uint8_t rfcu_mode1_len;
+ uint8_t rfcu_mode2_len;
+ uint8_t synth_len;
+ uint32_t rfcu[ MYNEWT_VAL(CMAC_TRIM_SIZE_RFCU) ];
+ uint32_t rfcu_mode1[2];
+ uint32_t rfcu_mode2[2];
+ uint32_t synth[ MYNEWT_VAL(CMAC_TRIM_SIZE_SYNTH) ];
+};
+
+#if MYNEWT_VAL(CMAC_DEBUG_DATA_ENABLE)
+struct cmac_debug {
+ int8_t last_rx_rssi;
+ int8_t tx_power_override;
+
+ uint32_t cal_res_1;
+ uint32_t cal_res_2;
+ uint32_t trim_val1_tx_1;
+ uint32_t trim_val1_tx_2;
+ uint32_t trim_val2_tx;
+ uint32_t trim_val2_rx;
+};
+#endif
+
+#if MYNEWT_VAL(CMAC_DEBUG_COREDUMP_ENABLE)
+struct cmac_coredump {
+ uint32_t lr;
+ uint32_t pc;
+ uint32_t assert;
+ const char *assert_file;
+ uint32_t assert_line;
+
+ uint32_t CM_STAT_REG;
+ uint32_t CM_LL_TIMER1_36_10_REG;
+ uint32_t CM_LL_TIMER1_9_0_REG;
+ uint32_t CM_ERROR_REG;
+ uint32_t CM_EXC_STAT_REG;
+};
+#endif
+
+#define CMAC_PENDING_OP_LP_CLK 0x0001
+#define CMAC_PENDING_OP_RF_CAL 0x0002
+
+struct cmac_shared_data {
+ uint16_t magic_cmac;
+ uint16_t magic_sys;
+ uint16_t pending_ops;
+ uint16_t lp_clock_freq; /* LP clock frequency */
+ uint32_t xtal32m_settle_us;/* XTAL32M settling time */
+ struct cmac_mbox mbox_s2c; /* SYS2CMAC mailbox */
+ struct cmac_mbox mbox_c2s; /* CMAC2SYS mailbox */
+ struct cmac_dcdc dcdc; /* DCDC settings */
+ struct cmac_trim trim; /* Trim data */
+ struct cmac_rand rand; /* Random numbers */
+#if MYNEWT_VAL(CMAC_DEBUG_DATA_ENABLE)
+ struct cmac_debug debug; /* Extra debug data */
+#endif
+#if MYNEWT_VAL(CMAC_DEBUG_COREDUMP_ENABLE)
+ struct cmac_coredump coredump;
+#endif
+
+ uint8_t mbox_s2c_buf[ MYNEWT_VAL(CMAC_MBOX_SIZE_S2C) ];
+ uint8_t mbox_c2s_buf[ MYNEWT_VAL(CMAC_MBOX_SIZE_C2S) ];
+};
+
+#if MYNEWT_VAL(BLE_HOST)
+extern volatile struct cmac_shared_data *g_cmac_shared_data;
+#elif MYNEWT_VAL(BLE_CONTROLLER)
+extern volatile struct cmac_shared_data g_cmac_shared_data;
+#endif
+
+/* cmac_mbox */
+typedef int (cmac_mbox_read_cb)(const void *data, uint16_t len);
+typedef void (cmac_mbox_write_notif_cb)(void);
+void cmac_mbox_set_read_cb(cmac_mbox_read_cb *cb);
+void cmac_mbox_set_write_notif_cb(cmac_mbox_write_notif_cb *cb);
+int cmac_mbox_read(void);
+int cmac_mbox_write(const void *data, uint16_t len);
+
+/* cmac_rand */
+typedef void (*cmac_rand_isr_cb_t)(uint8_t rnum);
+void cmac_rand_start(void);
+void cmac_rand_stop(void);
+void cmac_rand_read(void);
+void cmac_rand_write(void);
+void cmac_rand_chk_fill(void);
+int cmac_rand_get_next(void);
+int cmac_rand_is_active(void);
+int cmac_rand_is_full(void);
+void cmac_rand_fill(uint32_t *buf, int num_words);
+void cmac_rand_set_isr_cb(cmac_rand_isr_cb_t cb);
+
+void cmac_shared_init(void);
+void cmac_shared_sync(void);
+
+#if MYNEWT_VAL(BLE_HOST)
+#define CMAC_SHARED_LOCK_VAL 0x40000000
+#elif MYNEWT_VAL(BLE_CONTROLLER)
+#define CMAC_SHARED_LOCK_VAL 0xc0000000
+#endif
+
+static inline void
+cmac_shared_lock(void)
+{
+ volatile uint32_t *bsr_set = (void *)0x50050074;
+ volatile uint32_t *bsr_stat = (void *)0x5005007c;
+
+ while ((*bsr_stat & 0xc0000000) != CMAC_SHARED_LOCK_VAL) {
+ *bsr_set = CMAC_SHARED_LOCK_VAL;
+ }
+}
+
+static inline void
+cmac_shared_unlock(void)
+{
+ volatile uint32_t *bsr_reset = (void *)0x50050078;
+
+ *bsr_reset = CMAC_SHARED_LOCK_VAL;
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __MCU_CMAC_SHARED_H_ */
diff --git a/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/pkg.yml b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/pkg.yml
new file mode 100644
index 00000000..5b4a2129
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/pkg.yml
@@ -0,0 +1,39 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+pkg.name: nimble/transport/dialog_cmac/cmac_driver
+pkg.description: Driver for Dialog CMAC IPC
+pkg.author: "Apache Mynewt <dev@mynewt.apache.org>"
+pkg.homepage: "http://mynewt.apache.org/"
+pkg.keywords:
+ - dialog
+ - da1469x
+ - cmac
+
+pkg.req_apis.CMAC_DEBUG_DIAG_ENABLE:
+ - dialog_cmac_diag
+
+pkg.ign_files.BLE_CONTROLLER:
+ - cmac_host.c
+
+pkg.post_link_cmds.BLE_CONTROLLER:
+ scripts/create_cmac_bin.sh: 100
+
+pkg.pre_link_cmds.BLE_HOST:
+ scripts/build_libcmac.sh: 100
diff --git a/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/scripts/build_libcmac.sh b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/scripts/build_libcmac.sh
new file mode 100755
index 00000000..bbc822aa
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/scripts/build_libcmac.sh
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+NEWT=${MYNEWT_NEWT_PATH}
+OBJCOPY=${MYNEWT_OBJCOPY_PATH}
+AR=${MYNEWT_AR_PATH}
+LIBCMAC_A=${MYNEWT_USER_SRC_DIR}/libcmac.a
+
+export WORK_DIR=${MYNEWT_USER_WORK_DIR}
+export BASENAME_ROM=cmac.rom
+export BASENAME_RAM=cmac.ram
+
+if [ ${MYNEWT_VAL_CMAC_IMAGE_SINGLE} -eq 0 ]; then
+ # Create empty binary for ROM image (1 byte required for objcopy)
+ truncate -s 1 ${WORK_DIR}/${BASENAME_ROM}.bin
+ # Create fixed size RAM image
+ truncate -s ${MYNEWT_VAL_CMAC_IMAGE_RAM_SIZE} ${WORK_DIR}/${BASENAME_RAM}.bin
+else
+ ${NEWT} build ${MYNEWT_VAL_CMAC_IMAGE_TARGET_NAME}
+fi
+
+cd ${WORK_DIR}
+
+# Convert both binaries to objects and create archive to link
+${OBJCOPY} -I binary -O elf32-littlearm -B armv8-m.main \
+ --rename-section .data=.libcmac.rom ${BASENAME_ROM}.bin ${BASENAME_ROM}.o
+${OBJCOPY} -I binary -O elf32-littlearm -B armv8-m.main \
+ --rename-section .data=.libcmac.ram ${BASENAME_RAM}.bin ${BASENAME_RAM}.o
+${AR} -rcs ${LIBCMAC_A} ${BASENAME_ROM}.o ${BASENAME_RAM}.o
diff --git a/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/scripts/create_cmac_bin.sh b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/scripts/create_cmac_bin.sh
new file mode 100755
index 00000000..954d0860
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/scripts/create_cmac_bin.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+OBJCOPY=${MYNEWT_OBJCOPY_PATH}
+ELF=${MYNEWT_APP_BIN_DIR}/blehci.elf
+
+cd ${WORK_DIR}
+
+# Strip .ram section from ROM image
+${OBJCOPY} -R .ram -O binary ${ELF} ${BASENAME_ROM}.bin
+# RAM image is the same as binary created by newt
+cp ${ELF}.bin ${BASENAME_RAM}.bin
+
+# Create a copy of ROM image to flash to partition, if required
+cp ${BASENAME_ROM}.bin ${ELF}.rom.bin
diff --git a/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/src/cmac_host.c b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/src/cmac_host.c
new file mode 100644
index 00000000..df81c582
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/src/cmac_host.c
@@ -0,0 +1,326 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include <assert.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <string.h>
+#include "syscfg/syscfg.h"
+#include "sysflash/sysflash.h"
+#include "os/os.h"
+#include "mcu/mcu.h"
+#include "mcu/cmsis_nvic.h"
+#include "mcu/da1469x_hal.h"
+#include "mcu/da1469x_lpclk.h"
+#include "mcu/da1469x_clock.h"
+#include "mcu/da1469x_trimv.h"
+#include "mcu/da1469x_pdc.h"
+#include "cmac_driver/cmac_host.h"
+#include "cmac_driver/cmac_shared.h"
+#include "cmac_driver/cmac_diag.h"
+#include "trng/trng.h"
+#if MYNEWT_VAL(CMAC_DEBUG_COREDUMP_ENABLE)
+#include "console/console.h"
+#endif
+
+/* CMAC data */
+extern char _binary_cmac_rom_bin_start[];
+extern char _binary_cmac_rom_bin_end;
+extern char _binary_cmac_ram_bin_start[];
+extern char _binary_cmac_ram_bin_end;
+
+struct cmac_image_info {
+ uint32_t magic;
+ uint32_t size_rom;
+ uint32_t size_ram;
+ uint32_t offset_data;
+ uint32_t offset_shared;
+};
+
+/* PDC entry for waking up CMAC */
+static int8_t g_cmac_host_pdc_sys2cmac;
+/* PDC entry for waking up M33 */
+static int8_t g_cmac_host_pdc_cmac2sys;
+
+static void cmac_host_rand_fill(struct os_event *ev);
+static struct os_event g_cmac_host_rand_ev = {
+ .ev_cb = cmac_host_rand_fill
+};
+
+static void cmac_host_rand_chk_fill(void);
+
+static void
+cmac2sys_isr(void)
+{
+#if MYNEWT_VAL(CMAC_DEBUG_COREDUMP_ENABLE)
+ volatile struct cmac_coredump *cd = &g_cmac_shared_data->coredump;
+ const char *assert_file;
+#endif
+
+ os_trace_isr_enter();
+
+ /* Clear CMAC2SYS interrupt */
+ *(volatile uint32_t *)0x40002000 = 2;
+
+ cmac_mbox_read();
+
+ if (*(volatile uint32_t *)0x40002000 & 0x1c00) {
+#if MYNEWT_VAL(CMAC_DEBUG_COREDUMP_ENABLE)
+ console_blocking_mode();
+ console_printf("CMAC error (0x%08lx)\n", *(volatile uint32_t *)0x40002000);
+ console_printf(" lr:0x%08lx pc:0x%08lx\n", cd->lr, cd->pc);
+ if (cd->assert) {
+ console_printf(" assert:0x%08lx\n", cd->assert);
+ if (cd->assert_file) {
+ /* Need to translate pointer from M0 code segment to M33 data */
+ assert_file = cd->assert_file + MCU_MEM_SYSRAM_START_ADDRESS +
+ MEMCTRL->CMI_CODE_BASE_REG;
+ console_printf(" %s:%d\n",
+ assert_file, (unsigned)cd->assert_line);
+ }
+ }
+ console_printf(" 0x%08lx CM_ERROR_REG\n", cd->CM_ERROR_REG);
+ console_printf(" 0x%08lx CM_EXC_STAT_REG\n", cd->CM_EXC_STAT_REG);
+ console_printf(" 0x%08lx CM_LL_TIMER1_36_10_REG\n", cd->CM_LL_TIMER1_36_10_REG);
+ console_printf(" 0x%08lx CM_LL_TIMER1_9_0_REG\n", cd->CM_LL_TIMER1_9_0_REG);
+
+ /* Spin if debugger is connected to CMAC to avoid resetting it */
+ if (cd->CM_STAT_REG & 0x20) {
+ for (;;);
+ }
+#endif
+ /* XXX CMAC is in error state, need to recover */
+ assert(0);
+ return;
+ }
+
+ cmac_host_rand_chk_fill();
+
+ os_trace_isr_exit();
+}
+
+static void
+cmac_host_rand_fill(struct os_event *ev)
+{
+ size_t num_bytes;
+ struct trng_dev *trng;
+ uint32_t *rnum;
+ uint32_t rnums[CMAC_RAND_BUF_ELEMS];
+
+ /* Check if full */
+ if (!cmac_rand_is_active() || cmac_rand_is_full()) {
+ return;
+ }
+
+ assert(ev->ev_arg != NULL);
+
+ /* Fill buffer with random numbers even though we may not use all of them */
+ trng = ev->ev_arg;
+ rnum = &rnums[0];
+ num_bytes = trng_read(trng, rnum, CMAC_RAND_BUF_ELEMS * sizeof(uint32_t));
+
+ cmac_rand_fill(rnum, num_bytes / 4);
+ cmac_host_signal2cmac();
+}
+
+static void
+cmac_host_rand_chk_fill(void)
+{
+ if (cmac_rand_is_active() && !cmac_rand_is_full()) {
+ os_eventq_put(os_eventq_dflt_get(), &g_cmac_host_rand_ev);
+ }
+}
+
+void
+cmac_host_signal2cmac(void)
+{
+ da1469x_pdc_set(g_cmac_host_pdc_sys2cmac);
+}
+
+static void
+cmac_host_lpclk_cb(uint32_t freq)
+{
+ /* No need to wakeup CMAC if LP clock frequency did not change */
+ if (g_cmac_shared_data->lp_clock_freq == freq) {
+ return;
+ }
+
+ cmac_shared_lock();
+ g_cmac_shared_data->lp_clock_freq = freq;
+ g_cmac_shared_data->pending_ops |= CMAC_PENDING_OP_LP_CLK;
+ cmac_shared_unlock();
+
+ cmac_host_signal2cmac();
+}
+
+#if MYNEWT_VAL(CMAC_DEBUG_HOST_PRINT_ENABLE)
+static void
+cmac_host_print_trim(const char *name, const uint32_t *tv, unsigned len)
+{
+ console_printf("[CMAC] Trim values for '%s'\n", name);
+
+ while (len) {
+ console_printf(" 0x%08x = 0x%08x\n", (unsigned)tv[0], (unsigned)tv[1]);
+ len -= 2;
+ tv += 2;
+ }
+}
+#endif
+
+void
+cmac_host_rf_calibrate(void)
+{
+ cmac_shared_lock();
+ g_cmac_shared_data->pending_ops |= CMAC_PENDING_OP_RF_CAL;
+ cmac_shared_unlock();
+
+ cmac_host_signal2cmac();
+}
+
+void
+cmac_host_init(void)
+{
+ struct trng_dev *trng;
+ struct cmac_image_info ii;
+ uint32_t cmac_rom_size;
+ uint32_t cmac_ram_size;
+#if !MYNEWT_VAL(CMAC_IMAGE_SINGLE)
+ const struct flash_area *fa;
+ int rc;
+#endif
+ struct cmac_trim *trim;
+
+ /* Get trng os device */
+ trng = (struct trng_dev *) os_dev_open("trng", OS_TIMEOUT_NEVER, NULL);
+ assert(trng);
+ g_cmac_host_rand_ev.ev_arg = trng;
+
+#if MYNEWT_VAL(CMAC_DEBUG_DIAG_ENABLE)
+ cmac_diag_setup_host();
+#endif
+
+#if MYNEWT_VAL(CMAC_DEBUG_SWD_ENABLE)
+ /* Enable CMAC debugger */
+ CRG_TOP->SYS_CTRL_REG |= 0x40; /* CRG_TOP_SYS_CTRL_REG_CMAC_DEBUGGER_ENABLE_Msk */
+#endif
+
+ /*
+ * Add PDC entry to wake up CMAC from M33
+ *
+ * XXX if MCU_DEBUG_GPIO_DEEP_SLEEP is enabled on CMAC, this should also
+ * enable PD_COM so CMAC can access GPIOs after wake up
+ */
+ g_cmac_host_pdc_sys2cmac = da1469x_pdc_add(MCU_PDC_TRIGGER_MAC_TIMER,
+ MCU_PDC_MASTER_CMAC,
+ MCU_PDC_EN_XTAL);
+ da1469x_pdc_set(g_cmac_host_pdc_sys2cmac);
+ da1469x_pdc_ack(g_cmac_host_pdc_sys2cmac);
+
+ /* Add PDC entry to wake up M33 from CMAC, if does not exist yet */
+ g_cmac_host_pdc_cmac2sys = da1469x_pdc_find(MCU_PDC_TRIGGER_COMBO,
+ MCU_PDC_MASTER_M33, 0);
+ if (g_cmac_host_pdc_cmac2sys < 0) {
+ g_cmac_host_pdc_cmac2sys = da1469x_pdc_add(MCU_PDC_TRIGGER_COMBO,
+ MCU_PDC_MASTER_M33,
+ MCU_PDC_EN_XTAL);
+ da1469x_pdc_set(g_cmac_host_pdc_cmac2sys);
+ da1469x_pdc_ack(g_cmac_host_pdc_cmac2sys);
+ }
+
+ /* Setup CMAC2SYS interrupt */
+ NVIC_SetVector(CMAC2SYS_IRQn, (uint32_t)cmac2sys_isr);
+ NVIC_SetPriority(CMAC2SYS_IRQn, MYNEWT_VAL(CMAC_CMAC2SYS_IRQ_PRIORITY));
+ NVIC_DisableIRQ(CMAC2SYS_IRQn);
+
+ /* Enable Radio LDO */
+ CRG_TOP->POWER_CTRL_REG |= CRG_TOP_POWER_CTRL_REG_LDO_RADIO_ENABLE_Msk;
+
+ /* Enable CMAC, but keep it in reset */
+ CRG_TOP->CLK_RADIO_REG = (1 << CRG_TOP_CLK_RADIO_REG_RFCU_ENABLE_Pos) |
+ (1 << CRG_TOP_CLK_RADIO_REG_CMAC_SYNCH_RESET_Pos) |
+ (0 << CRG_TOP_CLK_RADIO_REG_CMAC_CLK_SEL_Pos) |
+ (1 << CRG_TOP_CLK_RADIO_REG_CMAC_CLK_ENABLE_Pos) |
+ (0 << CRG_TOP_CLK_RADIO_REG_CMAC_DIV_Pos);
+
+ /* Calculate size of ROM and RAM area */
+ cmac_rom_size = &_binary_cmac_rom_bin_end - &_binary_cmac_rom_bin_start[0];
+ cmac_ram_size = &_binary_cmac_ram_bin_end - &_binary_cmac_ram_bin_start[0];
+
+ /* Load image header and check if image can be loaded */
+#if MYNEWT_VAL(CMAC_IMAGE_SINGLE)
+ memcpy(&ii, &_binary_cmac_rom_bin_start[128], sizeof(ii));
+#else
+ rc = flash_area_open(FLASH_AREA_IMAGE_1, &fa);
+ assert(rc == 0);
+ rc = flash_area_read(fa, 128, &ii, sizeof(ii));
+ assert(rc == 0);
+#endif
+
+ assert(ii.magic == 0xC3ACC3AC);
+ assert(ii.size_rom == cmac_rom_size);
+ assert(ii.size_ram <= cmac_ram_size);
+
+ /* Copy CMAC image to RAM */
+#if MYNEWT_VAL(CMAC_IMAGE_SINGLE)
+ memset(&_binary_cmac_ram_bin_start, 0xaa, cmac_ram_size);
+ memcpy(&_binary_cmac_ram_bin_start, &_binary_cmac_rom_bin_start, ii.size_rom);
+#else
+ memset(&_binary_cmac_ram_bin_start, 0xaa, cmac_ram_size);
+ rc = flash_area_read(fa, 0, &_binary_cmac_ram_bin_start, ii.size_rom);
+ assert(rc == 0);
+#endif
+
+ /* Setup CMAC memory addresses */
+ MEMCTRL->CMI_CODE_BASE_REG = (uint32_t)&_binary_cmac_ram_bin_start;
+ MEMCTRL->CMI_DATA_BASE_REG = MEMCTRL->CMI_CODE_BASE_REG + ii.offset_data;
+ MEMCTRL->CMI_SHARED_BASE_REG = MEMCTRL->CMI_CODE_BASE_REG + ii.offset_shared;
+ MEMCTRL->CMI_END_REG = MEMCTRL->CMI_CODE_BASE_REG + ii.size_ram - 1;
+
+ /* Initialize shared memory */
+ cmac_shared_init();
+
+ trim = (struct cmac_trim *)&g_cmac_shared_data->trim;
+ trim->rfcu_len = da1469x_trimv_group_read(6, trim->rfcu, ARRAY_SIZE(trim->rfcu));
+ trim->rfcu_mode1_len = da1469x_trimv_group_read(8, trim->rfcu_mode1, ARRAY_SIZE(trim->rfcu_mode1));
+ trim->rfcu_mode2_len = da1469x_trimv_group_read(10, trim->rfcu_mode2, ARRAY_SIZE(trim->rfcu_mode2));
+ trim->synth_len = da1469x_trimv_group_read(7, trim->synth, ARRAY_SIZE(trim->synth));
+
+#if MYNEWT_VAL(CMAC_DEBUG_HOST_PRINT_ENABLE)
+ cmac_host_print_trim("rfcu", trim->rfcu, trim->rfcu_len);
+ cmac_host_print_trim("rfcu_mode1", trim->rfcu_mode1, trim->rfcu_mode1_len);
+ cmac_host_print_trim("rfcu_mode2", trim->rfcu_mode2, trim->rfcu_mode2_len);
+ cmac_host_print_trim("synth", trim->synth, trim->synth_len);
+#endif
+
+ /* Release CMAC from reset and sync */
+ CRG_TOP->CLK_RADIO_REG &= ~CRG_TOP_CLK_RADIO_REG_CMAC_SYNCH_RESET_Msk;
+ cmac_shared_sync();
+
+ da1469x_lpclk_register_cmac_cb(cmac_host_lpclk_cb);
+
+#if MYNEWT_VAL(CMAC_DEBUG_HOST_PRINT_ENABLE) && MYNEWT_VAL(CMAC_DEBUG_DATA_ENABLE)
+ /* Trim values are calculated on RF init, so are valid after synced with CMAC */
+ console_printf("[CMAC] Calculated trim_val1: 1=0x%08x 2=0x%08x\n",
+ (unsigned)g_cmac_shared_data->debug.trim_val1_tx_1,
+ (unsigned)g_cmac_shared_data->debug.trim_val1_tx_2);
+ console_printf("[CMAC] Calculated trim_val2: tx=0x%08x rx=0x%08x\n",
+ (unsigned)g_cmac_shared_data->debug.trim_val2_tx,
+ (unsigned)g_cmac_shared_data->debug.trim_val2_rx);
+#endif
+}
diff --git a/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/src/cmac_mbox.c b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/src/cmac_mbox.c
new file mode 100644
index 00000000..9594dbe9
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/src/cmac_mbox.c
@@ -0,0 +1,162 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include <assert.h>
+#include <cmac_driver/cmac_shared.h>
+#include <string.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include "syscfg/syscfg.h"
+#include "mcu/mcu.h"
+#include "os/os_arch.h"
+#include "os/os.h"
+
+#ifndef min
+#define min(_a, _b) ((_a) < (_b) ? (_a) : (_b))
+#endif
+
+static cmac_mbox_read_cb *g_cmac_mbox_read_cb;
+static cmac_mbox_write_notif_cb *g_cmac_mbox_write_notif_cb;
+
+void
+cmac_mbox_set_read_cb(cmac_mbox_read_cb *cb)
+{
+ g_cmac_mbox_read_cb = cb;
+}
+
+void
+cmac_mbox_set_write_notif_cb(cmac_mbox_write_notif_cb *cb)
+{
+ g_cmac_mbox_write_notif_cb = cb;
+}
+
+int
+cmac_mbox_read(void)
+{
+#if MYNEWT_VAL(BLE_HOST)
+ volatile struct cmac_mbox *mbox = &g_cmac_shared_data->mbox_c2s;
+ uint8_t *mbox_buf = (uint8_t *)&g_cmac_shared_data->mbox_c2s_buf;
+ const uint16_t mbox_size = MYNEWT_VAL(CMAC_MBOX_SIZE_C2S);
+#else
+ volatile struct cmac_mbox *mbox = &g_cmac_shared_data.mbox_s2c;
+ uint8_t *mbox_buf = (uint8_t *)&g_cmac_shared_data.mbox_s2c_buf;
+ const uint16_t mbox_size = MYNEWT_VAL(CMAC_MBOX_SIZE_S2C);
+#endif
+ uint16_t rd_off;
+ uint16_t wr_off;
+ uint16_t chunk;
+ int len = 0;
+
+ if (!g_cmac_mbox_read_cb) {
+ return 0;
+ }
+
+ do {
+ rd_off = mbox->rd_off;
+ wr_off = mbox->wr_off;
+
+ if (rd_off <= wr_off) {
+ chunk = wr_off - rd_off;
+ } else {
+ chunk = mbox_size - rd_off;
+ }
+
+ while (chunk) {
+ len = g_cmac_mbox_read_cb(&mbox_buf[rd_off], chunk);
+ if (len < 0) {
+ break;
+ }
+
+ rd_off += len;
+ chunk -= len;
+ }
+
+ mbox->rd_off = rd_off == mbox_size ? 0 : rd_off;
+ } while ((mbox->rd_off != mbox->wr_off) && (len >= 0));
+
+ return 0;
+}
+
+int
+cmac_mbox_write(const void *data, uint16_t len)
+{
+#if MYNEWT_VAL(BLE_HOST)
+ volatile struct cmac_mbox *mbox = &g_cmac_shared_data->mbox_s2c;
+ uint8_t *mbox_buf = (uint8_t *)&g_cmac_shared_data->mbox_s2c_buf;
+ const uint16_t mbox_size = MYNEWT_VAL(CMAC_MBOX_SIZE_S2C);
+#else
+ volatile struct cmac_mbox *mbox = &g_cmac_shared_data.mbox_c2s;
+ uint8_t *mbox_buf = (uint8_t *)&g_cmac_shared_data.mbox_c2s_buf;
+ const uint16_t mbox_size = MYNEWT_VAL(CMAC_MBOX_SIZE_C2S);
+#endif
+ uint16_t rd_off;
+ uint16_t wr_off;
+ uint16_t max_wr;
+ uint16_t chunk;
+
+ while (len) {
+ rd_off = mbox->rd_off;
+ wr_off = mbox->wr_off;
+
+ /*
+ * Calculate maximum length to write, i.e. up to end of buffer or stop
+ * before rd_off to be able to detect full queue.
+ */
+ if (rd_off > wr_off) {
+ /*
+ * |0|1|2|3|4|5|6|7|
+ * | | | |W| | |R| |
+ * `---^
+ */
+ max_wr = rd_off - wr_off - 1;
+ } else if (rd_off == 0) {
+ /*
+ * |0|1|2|3|4|5|6|7|
+ * |R| | |W| | | | |
+ * `-------^
+ */
+ max_wr = mbox_size - wr_off - 1;
+ } else {
+ /*
+ * |0|1|2|3|4|5|6|7|
+ * | |R| |W| | | | |
+ * `---------^
+ */
+ max_wr = mbox_size - wr_off;
+ }
+
+ chunk = min(len, max_wr);
+
+ if (chunk == 0) {
+ continue;
+ }
+
+ memcpy(&mbox_buf[wr_off], data, chunk);
+
+ wr_off += chunk;
+ mbox->wr_off = wr_off == mbox_size ? 0 : wr_off;
+
+ g_cmac_mbox_write_notif_cb();
+
+ len -= chunk;
+ data = (uint8_t *)data + chunk;
+ }
+
+ return 0;
+}
diff --git a/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/src/cmac_rand.c b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/src/cmac_rand.c
new file mode 100644
index 00000000..67a315f9
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/src/cmac_rand.c
@@ -0,0 +1,145 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include <assert.h>
+#include <cmac_driver/cmac_shared.h>
+#include <string.h>
+#include <stdbool.h>
+#include "syscfg/syscfg.h"
+#include "mcu/mcu.h"
+#include "os/os_arch.h"
+#include "os/os.h"
+
+#if MYNEWT_VAL(BLE_HOST)
+int
+cmac_rand_is_active(void)
+{
+ return g_cmac_shared_data->rand.cmr_active;
+}
+
+int
+cmac_rand_is_full(void)
+{
+ int next;
+ bool rc;
+
+ next = cmac_rand_get_next();
+ if (next == g_cmac_shared_data->rand.cmr_out) {
+ rc = 1;
+ } else {
+ rc = 0;
+ }
+ return rc;
+}
+
+int
+cmac_rand_get_next(void)
+{
+ int next;
+
+ /* If active and not full, put event on queue to get random numbers */
+ next = g_cmac_shared_data->rand.cmr_in + 1;
+ if (next == CMAC_RAND_BUF_ELEMS) {
+ next = 0;
+ }
+ return next;
+}
+
+void
+cmac_rand_fill(uint32_t *buf, int num_words)
+{
+ int next;
+
+ /* XXX: if words is 0, is it possible we could get into a state
+ where we are waiting for random numbers but M33 does not know it
+ has to fill any? */
+
+ /* NOTE: we already know the buffer is not full first time through */
+ next = g_cmac_shared_data->rand.cmr_in;
+ while (num_words) {
+ g_cmac_shared_data->rand.cmr_buf[next] = buf[0];
+ next = cmac_rand_get_next();
+ g_cmac_shared_data->rand.cmr_in = next;
+ next = cmac_rand_get_next();
+ if (next == g_cmac_shared_data->rand.cmr_out) {
+ break;
+ }
+ --num_words;
+ ++buf;
+ }
+}
+#endif
+
+#if MYNEWT_VAL(BLE_CONTROLLER)
+static cmac_rand_isr_cb_t g_cmac_rand_isr_cb;
+
+void
+cmac_rand_set_isr_cb(cmac_rand_isr_cb_t cb)
+{
+ g_cmac_rand_isr_cb = cb;
+}
+
+void
+cmac_rand_start(void)
+{
+ g_cmac_shared_data.rand.cmr_active = 1;
+}
+
+void
+cmac_rand_stop(void)
+{
+ g_cmac_shared_data.rand.cmr_active = 0;
+}
+
+/**
+ * cmac rnum read
+ *
+ * Called during the system to cmac isr to take random numbers
+ * from shared memory into the BLE stack.
+ */
+void
+cmac_rand_read(void)
+{
+ uint8_t bytes_left;
+ uint32_t rnum;
+
+ /* Just leave if no callback. */
+ if (g_cmac_rand_isr_cb == NULL) {
+ return;
+ }
+
+ bytes_left = 0;
+ while (g_cmac_shared_data.rand.cmr_active) {
+ if (bytes_left) {
+ --bytes_left;
+ rnum >>= 8;
+ } else if (g_cmac_shared_data.rand.cmr_out != g_cmac_shared_data.rand.cmr_in) {
+ bytes_left = 3;
+ rnum = g_cmac_shared_data.rand.cmr_buf[g_cmac_shared_data.rand.cmr_out];
+ ++g_cmac_shared_data.rand.cmr_out;
+ if (g_cmac_shared_data.rand.cmr_out == CMAC_RAND_BUF_ELEMS) {
+ g_cmac_shared_data.rand.cmr_out = 0;
+ }
+ } else {
+ break;
+ }
+ (*g_cmac_rand_isr_cb)((uint8_t)rnum);
+ }
+}
+#endif
diff --git a/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/src/cmac_shared.c b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/src/cmac_shared.c
new file mode 100644
index 00000000..24640ca4
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/src/cmac_shared.c
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include "syscfg/syscfg.h"
+#if MYNEWT_VAL(BLE_CONTROLLER) && !MYNEWT_VAL(MCU_DEBUG_DSER_CMAC_SHARED)
+#define MCU_DIAG_SER_DISABLE
+#endif
+
+#include <assert.h>
+#include <string.h>
+#include <stdbool.h>
+#include "mcu/mcu.h"
+#include <cmac_driver/cmac_shared.h>
+#include "os/os_arch.h"
+#include "os/os.h"
+
+#ifndef min
+#define min(_a, _b) ((_a) < (_b) ? (_a) : (_b))
+#endif
+
+#if MYNEWT_VAL(BLE_HOST)
+volatile struct cmac_shared_data *g_cmac_shared_data;
+#include "mcu/da1469x_clock.h"
+#define MCU_DIAG_SER(_x)
+#elif MYNEWT_VAL(BLE_CONTROLLER)
+volatile struct cmac_shared_data g_cmac_shared_data __attribute__((section(".shdata")));
+#endif
+
+void
+cmac_shared_init(void)
+{
+#if MYNEWT_VAL(BLE_HOST)
+ g_cmac_shared_data = (void *)(MCU_MEM_SYSRAM_START_ADDRESS +
+ MEMCTRL->CMI_SHARED_BASE_REG);
+
+ memset((void *)g_cmac_shared_data, 0, sizeof(*g_cmac_shared_data));
+
+ g_cmac_shared_data->xtal32m_settle_us = MYNEWT_VAL(MCU_CLOCK_XTAL32M_SETTLE_TIME_US);
+
+ g_cmac_shared_data->dcdc.enabled = DCDC->DCDC_CTRL1_REG & DCDC_DCDC_CTRL1_REG_DCDC_ENABLE_Msk;
+ if (g_cmac_shared_data->dcdc.enabled) {
+ g_cmac_shared_data->dcdc.v18 = DCDC->DCDC_V18_REG;
+ g_cmac_shared_data->dcdc.v18p = DCDC->DCDC_V18P_REG;
+ g_cmac_shared_data->dcdc.vdd = DCDC->DCDC_VDD_REG;
+ g_cmac_shared_data->dcdc.v14 = DCDC->DCDC_V14_REG;
+ g_cmac_shared_data->dcdc.ctrl1 = DCDC->DCDC_CTRL1_REG;
+ }
+
+#if MYNEWT_VAL(CMAC_DEBUG_DATA_ENABLE)
+ g_cmac_shared_data->debug.tx_power_override = INT8_MAX;
+#endif
+#endif
+}
+
+
+void
+cmac_shared_sync(void)
+{
+ /*
+ * We need to guarantee proper order of initialization here, i.e. SYS has
+ * to wait until CMAC finished initialization as otherwise host may start
+ * sending HCI packets which will timeout as there is no one to read them.
+ */
+#if MYNEWT_VAL(BLE_HOST)
+ assert(g_cmac_shared_data->magic_sys == 0);
+
+ while (g_cmac_shared_data->magic_cmac != CMAC_SHARED_MAGIC_CMAC);
+ g_cmac_shared_data->magic_sys = CMAC_SHARED_MAGIC_SYS;
+
+ NVIC_EnableIRQ(CMAC2SYS_IRQn);
+#endif
+
+#if MYNEWT_VAL(BLE_CONTROLLER)
+ assert(g_cmac_shared_data.magic_cmac == 0);
+
+ g_cmac_shared_data.magic_cmac = CMAC_SHARED_MAGIC_CMAC;
+ while (g_cmac_shared_data.magic_sys != CMAC_SHARED_MAGIC_SYS);
+
+ NVIC_SetPriority(SYS2CMAC_IRQn, 3);
+ NVIC_EnableIRQ(SYS2CMAC_IRQn);
+#endif
+}
diff --git a/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/syscfg.yml b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/syscfg.yml
new file mode 100644
index 00000000..a382c424
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/cmac_driver/syscfg.yml
@@ -0,0 +1,104 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+syscfg.defs:
+ CMAC_MBOX_SIZE_S2C:
+ description: >
+ Size of mailbox for SYS to CMAC data. The size
+ value should be power of 2 to allow for better
+ code optimization.
+ value: 128
+ CMAC_MBOX_SIZE_C2S:
+ description: >
+ Size of mailbox for CMAC to SYS data. The size
+ value should be power of 2 to allow for better
+ code optimization.
+ value: 128
+
+ CMAC_TRIM_SIZE_RFCU:
+ description: >
+ Size of trim values for RFCU. This is maximum
+ number of trim values that can be read from
+ OTP and applied, all excessive values will be
+ discarded.
+ value: 10
+ CMAC_TRIM_SIZE_SYNTH:
+ description: >
+ Size of trim values for RFCU. This is maximum
+ number of trim values that can be read from
+ OTP and applied, all excessive values will be
+ discarded.
+ value: 10
+
+ CMAC_DEBUG_SWD_ENABLE:
+ description: >
+ Enable CMAC SWD interface.
+ value: 0
+ CMAC_DEBUG_DIAG_ENABLE:
+ description: >
+ Enable CMAC diagnostic lines.
+ value: 0
+ CMAC_DEBUG_DATA_ENABLE:
+ description: >
+ Enable extra debugging data in shared segment.
+ value: 0
+ CMAC_DEBUG_COREDUMP_ENABLE:
+ description: >
+ Enable dumping CMAC registers to shared segment
+ on fault.
+ value: 1
+ CMAC_DEBUG_HOST_PRINT_ENABLE:
+ description: >
+ Enable some debug printouts to console from host side.
+ This will dump some settings during startup, useful to
+ check what is loaded to CMAC via shared data.
+ value: 0
+
+ CMAC_IMAGE_SINGLE:
+ description: >
+ When enable, CMAC binary is linked with application image
+ creating a single image build. See CMAC_IMAGE_TARGET_NAME.
+ When disabled, CMAC binary is built and flashed separately
+ to flash partition. See CMAC_IMAGE_PARTITION.
+ value: 1
+ CMAC_IMAGE_TARGET_NAME:
+ description: >
+ Target name to build for CMAC binary for single image build.
+ value: "@apache-mynewt-nimble/targets/dialog_cmac"
+ CMAC_IMAGE_PARTITION:
+ description: >
+ Flash partition to load CMAC binary from if single image build
+ is disabled.
+ value: FLASH_AREA_IMAGE_1
+ CMAC_IMAGE_RAM_SIZE:
+ description: >
+ Size of RAM area in bytes reserved for CMAC if single image
+ build is disabled. Unit suffix (K, M) is allowed.
+ Note: for single image build this setting is not applicable
+ since proper RAM area size is automatically calculated from
+ CMAC binary.
+ value: 128K
+
+ CMAC_CMAC2SYS_IRQ_PRIORITY:
+ description: >
+ The priority of the CMAC2SYS IRQ. Default is 0, or highest
+ priority.
+ value: 0
+
+syscfg.restrictions.BLE_HOST:
+ - TRNG
diff --git a/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/pkg.yml b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/pkg.yml
new file mode 100644
index 00000000..ef8fc1ee
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/pkg.yml
@@ -0,0 +1,36 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+pkg.name: nimble/transport/dialog_cmac
+pkg.description: HCI H4 transport for Dialog CMAC
+pkg.author: "Apache Mynewt <dev@mynewt.apache.org>"
+pkg.homepage: "http://mynewt.apache.org/"
+pkg.keywords:
+ - ble
+ - bluetooth
+
+pkg.deps:
+ - nimble
+ - nimble/transport/dialog_cmac/cmac_driver
+
+pkg.apis:
+ - ble_transport
+
+pkg.init:
+ ble_hci_cmac_init: 100
diff --git a/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/src/ble_hci_cmac_common.c b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/src/ble_hci_cmac_common.c
new file mode 100644
index 00000000..665b6216
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/src/ble_hci_cmac_common.c
@@ -0,0 +1,194 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include <assert.h>
+#include <string.h>
+
+#include "syscfg/syscfg.h"
+#include "os/mynewt.h"
+#include "nimble/ble.h"
+#include "nimble/ble_hci_trans.h"
+#include "nimble/hci_common.h"
+#include "ble_hci_cmac_priv.h"
+
+/*
+ * If controller-to-host flow control is enabled we need to hold an extra command
+ * buffer for HCI_Host_Number_Of_Completed_Packets which can be sent at any time.
+ */
+#if MYNEWT_VAL(BLE_HS_FLOW_CTRL) || MYNEWT_VAL(BLE_LL_CFG_FEAT_CTRL_TO_HOST_FLOW_CONTROL)
+#define HCI_CMD_COUNT 2
+#else
+#define HCI_CMD_COUNT 1
+#endif
+
+#define POOL_ACL_BLOCK_SIZE OS_ALIGN(MYNEWT_VAL(BLE_ACL_BUF_SIZE) + \
+ BLE_MBUF_MEMBLOCK_OVERHEAD + \
+ BLE_HCI_DATA_HDR_SZ, OS_ALIGNMENT)
+
+static uint8_t ble_hci_pool_cmd_mempool_buf[
+ OS_MEMPOOL_BYTES(HCI_CMD_COUNT, BLE_HCI_TRANS_CMD_SZ)];
+static struct os_mempool ble_hci_pool_cmd_mempool;
+
+static uint8_t ble_hci_pool_evt_hi_mempool_buf[
+ OS_MEMPOOL_BYTES(MYNEWT_VAL(BLE_HCI_EVT_HI_BUF_COUNT),
+ MYNEWT_VAL(BLE_HCI_EVT_BUF_SIZE))];
+static struct os_mempool ble_hci_pool_evt_hi_mempool;
+
+static uint8_t ble_hci_pool_evt_lo_mempool_buf[
+ OS_MEMPOOL_BYTES(MYNEWT_VAL(BLE_HCI_EVT_LO_BUF_COUNT),
+ MYNEWT_VAL(BLE_HCI_EVT_BUF_SIZE))];
+static struct os_mempool ble_hci_pool_evt_lo_mempool;
+
+static uint8_t ble_hci_pool_acl_mempool_buf[
+ OS_MEMPOOL_BYTES(MYNEWT_VAL(BLE_ACL_BUF_COUNT),
+ POOL_ACL_BLOCK_SIZE)];
+static struct os_mempool_ext ble_hci_pool_acl_mempool;
+static struct os_mbuf_pool ble_hci_pool_acl_mbuf_pool;
+
+__attribute__((weak)) void ble_hci_trans_notify_free(void);
+
+static os_mempool_put_fn *g_ble_hci_pool_acl_mempool_put_cb;
+static void *g_ble_hci_pool_acl_mempool_put_arg;
+
+int
+ble_hci_trans_reset(void)
+{
+ return 0;
+}
+
+uint8_t *
+ble_hci_trans_buf_alloc(int type)
+{
+ uint8_t *buf;
+
+ switch (type) {
+ case BLE_HCI_TRANS_BUF_CMD:
+ buf = os_memblock_get(&ble_hci_pool_cmd_mempool);
+ break;
+ case BLE_HCI_TRANS_BUF_EVT_HI:
+ buf = os_memblock_get(&ble_hci_pool_evt_hi_mempool);
+ if (buf) {
+ break;
+ }
+ /* no break */
+ case BLE_HCI_TRANS_BUF_EVT_LO:
+ buf = os_memblock_get(&ble_hci_pool_evt_lo_mempool);
+ break;
+ default:
+ assert(0);
+ buf = NULL;
+ }
+
+ return buf;
+}
+
+void
+ble_hci_trans_buf_free(uint8_t *buf)
+{
+ int rc;
+
+ if (os_memblock_from(&ble_hci_pool_cmd_mempool, buf)) {
+ rc = os_memblock_put(&ble_hci_pool_cmd_mempool, buf);
+ assert(rc == 0);
+ } else if (os_memblock_from(&ble_hci_pool_evt_hi_mempool, buf)) {
+ rc = os_memblock_put(&ble_hci_pool_evt_hi_mempool, buf);
+ assert(rc == 0);
+ } else {
+ assert(os_memblock_from(&ble_hci_pool_evt_lo_mempool, buf));
+ rc = os_memblock_put(&ble_hci_pool_evt_lo_mempool, buf);
+ assert(rc == 0);
+ }
+
+ ble_hci_trans_notify_free();
+}
+
+struct os_mbuf *
+ble_hci_cmac_alloc_acl_mbuf(void)
+{
+ return os_mbuf_get_pkthdr(&ble_hci_pool_acl_mbuf_pool,
+ sizeof(struct ble_mbuf_hdr));
+}
+
+static os_error_t
+ble_hci_cmac_free_acl_cb(struct os_mempool_ext *mpe, void *data, void *arg)
+{
+ int rc;
+
+ if (g_ble_hci_pool_acl_mempool_put_cb) {
+ rc = g_ble_hci_pool_acl_mempool_put_cb(mpe, data,
+ g_ble_hci_pool_acl_mempool_put_arg);
+ } else {
+ rc = os_memblock_put_from_cb(&mpe->mpe_mp, data);
+ }
+
+ if (rc != 0) {
+ return rc;
+ }
+
+ ble_hci_trans_notify_free();
+
+ return 0;
+}
+
+
+int
+ble_hci_trans_set_acl_free_cb(os_mempool_put_fn *cb, void *arg)
+{
+ g_ble_hci_pool_acl_mempool_put_cb = cb;
+ g_ble_hci_pool_acl_mempool_put_arg = arg;
+
+ return 0;
+}
+
+void
+ble_hci_cmac_init(void)
+{
+ int rc;
+
+ SYSINIT_ASSERT_ACTIVE();
+
+ rc = os_mempool_init(&ble_hci_pool_cmd_mempool,
+ HCI_CMD_COUNT, BLE_HCI_TRANS_CMD_SZ,
+ ble_hci_pool_cmd_mempool_buf, "ble_hci_cmd");
+ SYSINIT_PANIC_ASSERT(rc == 0);
+
+ rc = os_mempool_init(&ble_hci_pool_evt_hi_mempool,
+ MYNEWT_VAL(BLE_HCI_EVT_HI_BUF_COUNT),
+ MYNEWT_VAL(BLE_HCI_EVT_BUF_SIZE),
+ ble_hci_pool_evt_hi_mempool_buf, "ble_hci_evt_hi");
+ SYSINIT_PANIC_ASSERT(rc == 0);
+
+ rc = os_mempool_init(&ble_hci_pool_evt_lo_mempool,
+ MYNEWT_VAL(BLE_HCI_EVT_LO_BUF_COUNT),
+ MYNEWT_VAL(BLE_HCI_EVT_BUF_SIZE),
+ ble_hci_pool_evt_lo_mempool_buf, "ble_hci_evt_lo");
+ SYSINIT_PANIC_ASSERT(rc == 0);
+
+ rc = os_mempool_ext_init(&ble_hci_pool_acl_mempool,
+ MYNEWT_VAL(BLE_ACL_BUF_COUNT), POOL_ACL_BLOCK_SIZE,
+ ble_hci_pool_acl_mempool_buf, "ble_hci_acl");
+ SYSINIT_PANIC_ASSERT(rc == 0);
+
+ rc = os_mbuf_pool_init(&ble_hci_pool_acl_mbuf_pool,
+ &ble_hci_pool_acl_mempool.mpe_mp, POOL_ACL_BLOCK_SIZE,
+ MYNEWT_VAL(BLE_ACL_BUF_COUNT));
+ SYSINIT_PANIC_ASSERT(rc == 0);
+
+ ble_hci_pool_acl_mempool.mpe_put_cb = ble_hci_cmac_free_acl_cb;
+}
diff --git a/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/src/ble_hci_cmac_hs.c b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/src/ble_hci_cmac_hs.c
new file mode 100644
index 00000000..1164fe71
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/src/ble_hci_cmac_hs.c
@@ -0,0 +1,153 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include <assert.h>
+#include <string.h>
+#include "syscfg/syscfg.h"
+
+#if MYNEWT_VAL(BLE_HOST)
+
+#include "cmac_driver/cmac_shared.h"
+#include "cmac_driver/cmac_host.h"
+#include "nimble/ble_hci_trans.h"
+#include "os/os_mbuf.h"
+#include "ble_hci_trans_h4.h"
+#include "ble_hci_cmac_priv.h"
+
+struct ble_hci_cmac_hs_api {
+ ble_hci_trans_rx_cmd_fn *evt_cb;
+ void *evt_arg;
+ ble_hci_trans_rx_acl_fn *acl_cb;
+ void *acl_arg;
+};
+
+static struct ble_hci_cmac_hs_api g_ble_hci_cmac_hs_api;
+static struct ble_hci_trans_h4_rx_state g_ble_hci_cmac_hs_rx_state;
+static bool g_ble_hci_cmac_hs_read_err;
+
+static int
+ble_hci_cmac_hs_frame_cb(uint8_t pkt_type, void *data)
+{
+ int rc;
+
+ switch (pkt_type) {
+ case BLE_HCI_TRANS_H4_PKT_TYPE_ACL:
+ rc = g_ble_hci_cmac_hs_api.acl_cb(data, g_ble_hci_cmac_hs_api.acl_arg);
+ break;
+ case BLE_HCI_TRANS_H4_PKT_TYPE_EVT:
+ rc = g_ble_hci_cmac_hs_api.evt_cb(data, g_ble_hci_cmac_hs_api.evt_arg);
+ break;
+ default:
+ assert(0);
+ break;
+ }
+
+ return rc;
+}
+
+static int
+ble_hci_cmac_hs_mbox_read_cb(const void *data, uint16_t len)
+{
+ int rlen;
+ os_sr_t sr;
+
+ rlen = ble_hci_trans_h4_rx(&g_ble_hci_cmac_hs_rx_state, data, len,
+ ble_hci_cmac_hs_frame_cb);
+ if (rlen < 0) {
+ /*
+ * There was oom error, we need to wait for buffer to be freed and
+ * trigger another read.
+ */
+ OS_ENTER_CRITICAL(sr);
+ g_ble_hci_cmac_hs_read_err = true;
+ OS_EXIT_CRITICAL(sr);
+ }
+
+ return rlen;
+}
+
+static void
+ble_hci_cmac_hs_mbox_write_notif_cb(void)
+{
+ cmac_host_signal2cmac();
+}
+
+int
+ble_hci_trans_hs_cmd_tx(uint8_t *cmd)
+{
+ uint8_t pkt_type = BLE_HCI_TRANS_H4_PKT_TYPE_CMD;
+
+ cmac_mbox_write(&pkt_type, sizeof(pkt_type));
+ cmac_mbox_write(cmd, cmd[2] + 3);
+
+ ble_hci_trans_buf_free(cmd);
+
+ return 0;
+}
+
+int
+ble_hci_trans_hs_acl_tx(struct os_mbuf *om)
+{
+ uint8_t pkt_type = BLE_HCI_TRANS_H4_PKT_TYPE_ACL;
+ struct os_mbuf *om_next;
+
+ cmac_mbox_write(&pkt_type, sizeof(pkt_type));
+
+ while (om) {
+ om_next = SLIST_NEXT(om, om_next);
+
+ cmac_mbox_write(om->om_data, om->om_len);
+
+ os_mbuf_free(om);
+ om = om_next;
+ }
+
+ return 0;
+}
+
+void
+ble_hci_trans_notify_free(void)
+{
+ os_sr_t sr;
+
+ OS_ENTER_CRITICAL(sr);
+ if (g_ble_hci_cmac_hs_read_err) {
+ g_ble_hci_cmac_hs_read_err = false;
+ /* Just trigger an interrupt, it will trigger read */
+ NVIC_SetPendingIRQ(CMAC2SYS_IRQn);
+ }
+ OS_EXIT_CRITICAL(sr);
+}
+
+void
+ble_hci_trans_cfg_hs(ble_hci_trans_rx_cmd_fn *evt_cb, void *evt_arg,
+ ble_hci_trans_rx_acl_fn *acl_cb, void *acl_arg)
+{
+ g_ble_hci_cmac_hs_api.evt_cb = evt_cb;
+ g_ble_hci_cmac_hs_api.evt_arg = evt_arg;
+ g_ble_hci_cmac_hs_api.acl_cb = acl_cb;
+ g_ble_hci_cmac_hs_api.acl_arg = acl_arg;
+
+ /* We can now handle data from CMAC, initialize it */
+ cmac_mbox_set_read_cb(ble_hci_cmac_hs_mbox_read_cb);
+ cmac_mbox_set_write_notif_cb(ble_hci_cmac_hs_mbox_write_notif_cb);
+ cmac_host_init();
+}
+
+#endif
diff --git a/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/src/ble_hci_cmac_ll.c b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/src/ble_hci_cmac_ll.c
new file mode 100644
index 00000000..3531529c
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/src/ble_hci_cmac_ll.c
@@ -0,0 +1,141 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include "syscfg/syscfg.h"
+
+#if MYNEWT_VAL(BLE_CONTROLLER)
+
+#if !MYNEWT_VAL(MCU_DEBUG_DSER_BLE_HCI_CMAC_LL)
+#define MCU_DIAG_SER_DISABLE
+#endif
+
+#include <assert.h>
+#include <string.h>
+#include "mcu/mcu.h"
+#include "cmac_driver/cmac_shared.h"
+#include "nimble/ble_hci_trans.h"
+#include "os/os_mbuf.h"
+#include "ble_hci_trans_h4.h"
+#include "ble_hci_cmac_priv.h"
+
+struct ble_hci_cmac_ll_api {
+ ble_hci_trans_rx_cmd_fn *cmd_cb;
+ void *cmd_arg;
+ ble_hci_trans_rx_acl_fn *acl_cb;
+ void *acl_arg;
+};
+
+static struct ble_hci_cmac_ll_api g_ble_hci_cmac_ll_api;
+static struct ble_hci_trans_h4_rx_state g_ble_hci_cmac_ll_rx_state;
+
+static int
+ble_hci_cmac_ll_frame_cb(uint8_t pkt_type, void *data)
+{
+ int rc;
+
+ MCU_DIAG_SER('F');
+
+ switch (pkt_type) {
+ case BLE_HCI_TRANS_H4_PKT_TYPE_CMD:
+ rc = g_ble_hci_cmac_ll_api.cmd_cb(data, g_ble_hci_cmac_ll_api.cmd_arg);
+ break;
+ case BLE_HCI_TRANS_H4_PKT_TYPE_ACL:
+ rc = g_ble_hci_cmac_ll_api.acl_cb(data, g_ble_hci_cmac_ll_api.acl_arg);
+ break;
+ default:
+ assert(0);
+ break;
+ }
+
+ return rc;
+}
+
+static int
+ble_hci_cmac_ll_mbox_read_cb(const void *data, uint16_t len)
+{
+ int rlen;
+
+ MCU_DIAG_SER('R');
+ rlen = ble_hci_trans_h4_rx(&g_ble_hci_cmac_ll_rx_state, data, len,
+ ble_hci_cmac_ll_frame_cb);
+
+ /* There should be no oom on LL side due to flow control used */
+ assert(rlen >= 0);
+
+ return rlen;
+}
+
+static void
+ble_hci_cmac_ll_mbox_write_notif_cb(void)
+{
+ MCU_DIAG_SER('W');
+ CMAC->CM_EV_SET_REG = CMAC_CM_EV_SET_REG_EV1C_CMAC2SYS_IRQ_SET_Msk;
+}
+
+int
+ble_hci_trans_ll_evt_tx(uint8_t *evt)
+{
+ uint8_t pkt_type = BLE_HCI_TRANS_H4_PKT_TYPE_EVT;
+
+ cmac_mbox_write(&pkt_type, sizeof(pkt_type));
+ cmac_mbox_write(evt, evt[1] + 2);
+
+ ble_hci_trans_buf_free(evt);
+
+ return 0;
+}
+
+int
+ble_hci_trans_ll_acl_tx(struct os_mbuf *om)
+{
+ uint8_t pkt_type = BLE_HCI_TRANS_H4_PKT_TYPE_ACL;
+ struct os_mbuf *om_next;
+
+ cmac_mbox_write(&pkt_type, sizeof(pkt_type));
+
+ while (om) {
+ om_next = SLIST_NEXT(om, om_next);
+
+ cmac_mbox_write(om->om_data, om->om_len);
+
+ os_mbuf_free(om);
+ om = om_next;
+ }
+
+ return 0;
+}
+
+void
+ble_hci_trans_cfg_ll(ble_hci_trans_rx_cmd_fn *cmd_cb, void *cmd_arg,
+ ble_hci_trans_rx_acl_fn *acl_cb, void *acl_arg)
+{
+ g_ble_hci_cmac_ll_api.cmd_cb = cmd_cb;
+ g_ble_hci_cmac_ll_api.cmd_arg = cmd_arg;
+ g_ble_hci_cmac_ll_api.acl_cb = acl_cb;
+ g_ble_hci_cmac_ll_api.acl_arg = acl_arg;
+
+ /* Setup callbacks for mailboxes */
+ cmac_mbox_set_read_cb(ble_hci_cmac_ll_mbox_read_cb);
+ cmac_mbox_set_write_notif_cb(ble_hci_cmac_ll_mbox_write_notif_cb);
+
+ /* Synchronize with SYS */
+ cmac_shared_sync();
+}
+
+#endif
diff --git a/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/src/ble_hci_cmac_priv.h b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/src/ble_hci_cmac_priv.h
new file mode 100644
index 00000000..451053c3
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/src/ble_hci_cmac_priv.h
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#ifndef _BLE_HCI_CMAC_PRIV_H_
+#define _BLE_HCI_CMAC_PRIV_H_
+
+#include "os/os_mbuf.h"
+
+struct os_mbuf *ble_hci_cmac_alloc_acl_mbuf(void);
+
+void ble_hci_trans_notify_free(void);
+
+#endif /* _BLE_HCI_CMAC_PRIV_H_ */
diff --git a/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/src/ble_hci_trans_h4.c b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/src/ble_hci_trans_h4.c
new file mode 100644
index 00000000..74da3912
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/src/ble_hci_trans_h4.c
@@ -0,0 +1,332 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include <assert.h>
+#include <stdbool.h>
+#include <string.h>
+#include "syscfg/syscfg.h"
+#include "os/os_mbuf.h"
+#include "nimble/ble_hci_trans.h"
+#include "nimble/hci_common.h"
+#include "ble_hci_trans_h4.h"
+#include "ble_hci_cmac_priv.h"
+
+#define RXS_STATE_W4_PKT_TYPE 0
+#define RXS_STATE_W4_HEADER 1
+#define RXS_STATE_W4_PAYLOAD 2
+#define RXS_STATE_COMPLETED 3
+
+struct input_buffer {
+ const uint8_t *buf;
+ uint16_t len;
+};
+
+static int
+ble_hci_trans_h4_ib_adjust(struct input_buffer *ib, uint16_t len)
+{
+ assert(ib->len >= len);
+
+ ib->buf += len;
+ ib->len -= len;
+
+ return len;
+}
+
+static void
+ble_hci_trans_h4_rxs_start(struct ble_hci_trans_h4_rx_state *rxs, uint8_t pkt_type)
+{
+ rxs->pkt_type = pkt_type;
+ rxs->len = 0;
+ rxs->expected_len = 0;
+
+ switch (rxs->pkt_type) {
+#if MYNEWT_VAL(BLE_CONTROLLER)
+ case BLE_HCI_TRANS_H4_PKT_TYPE_CMD:
+ rxs->min_len = 3;
+ break;
+#endif
+ case BLE_HCI_TRANS_H4_PKT_TYPE_ACL:
+ rxs->min_len = 4;
+ break;
+#if MYNEWT_VAL(BLE_HOST)
+ case BLE_HCI_TRANS_H4_PKT_TYPE_EVT:
+ rxs->min_len = 2;
+ break;
+#endif
+ default:
+ /* XXX sync loss */
+ assert(0);
+ break;
+ }
+}
+
+static int
+ble_hci_trans_h4_pull_min_len(struct ble_hci_trans_h4_rx_state *rxs,
+ struct input_buffer *ib)
+{
+ uint16_t len;
+
+ len = min(ib->len, rxs->min_len - rxs->len);
+ memcpy(&rxs->hdr[rxs->len], ib->buf, len);
+
+ rxs->len += len;
+ ble_hci_trans_h4_ib_adjust(ib, len);
+
+ return rxs->len != rxs->min_len;
+}
+
+static int
+ble_hci_trans_h4_rx_state_w4_header(struct ble_hci_trans_h4_rx_state *rxs,
+ struct input_buffer *ib)
+{
+#if MYNEWT_VAL(BLE_HOST)
+ int pool;
+#endif
+ int rc;
+
+ rc = ble_hci_trans_h4_pull_min_len(rxs, ib);
+ if (rc) {
+ /* need more data */
+ return 1;
+ }
+
+ switch (rxs->pkt_type) {
+#if MYNEWT_VAL(BLE_CONTROLLER)
+ case BLE_HCI_TRANS_H4_PKT_TYPE_CMD:
+ rxs->buf = ble_hci_trans_buf_alloc(BLE_HCI_TRANS_BUF_CMD);
+ if (!rxs->buf) {
+ return -1;
+ }
+
+ memcpy(rxs->buf, rxs->hdr, rxs->len);
+ rxs->expected_len = rxs->hdr[2] + 3;
+ break;
+#endif
+ case BLE_HCI_TRANS_H4_PKT_TYPE_ACL:
+ rxs->om = ble_hci_cmac_alloc_acl_mbuf();
+ if (!rxs->om) {
+ return -1;
+ }
+
+ os_mbuf_append(rxs->om, rxs->hdr, rxs->len);
+ rxs->expected_len = get_le16(&rxs->hdr[2]) + 4;
+ break;
+#if MYNEWT_VAL(BLE_HOST)
+ case BLE_HCI_TRANS_H4_PKT_TYPE_EVT:
+ pool = BLE_HCI_TRANS_BUF_EVT_HI;
+ if (rxs->hdr[0] == BLE_HCI_EVCODE_LE_META) {
+ /* For LE Meta event we need 3 bytes to parse header */
+ rxs->min_len = 3;
+ rc = ble_hci_trans_h4_pull_min_len(rxs, ib);
+ if (rc) {
+ /* need more data */
+ return 1;
+ }
+
+ /* Advertising reports shall be allocated from low-prio pool */
+ if ((rxs->hdr[2] == BLE_HCI_LE_SUBEV_ADV_RPT) ||
+ (rxs->hdr[2] == BLE_HCI_LE_SUBEV_EXT_ADV_RPT)) {
+ pool = BLE_HCI_TRANS_BUF_EVT_LO;
+ }
+ }
+
+ /*
+ * XXX Events originally allocated from hi-pool can use lo-pool as
+ * fallback and cannot be dropped. Events allocated from lo-pool
+ * can be dropped to avoid oom while scanning which means that
+ * any advertising or extended advertising report can be silently
+ * discarded by transport. While this is perfectly fine for legacy
+ * advertising, for extended advertising it means we can drop start
+ * or end of chain report and host won't be able to reassemble
+ * chain properly... so just need to make sure pool on host side is
+ * large enough to catch up with controller.
+ */
+ rxs->buf = ble_hci_trans_buf_alloc(pool);
+ if (!rxs->buf && pool == BLE_HCI_TRANS_BUF_EVT_HI) {
+ rxs->buf = ble_hci_trans_buf_alloc(BLE_HCI_TRANS_BUF_EVT_LO);
+ if (!rxs->buf) {
+ return -1;
+ }
+ }
+
+ if (rxs->buf) {
+ memcpy(rxs->buf, rxs->hdr, rxs->len);
+ }
+
+ rxs->expected_len = rxs->hdr[1] + 2;
+ break;
+#endif
+ default:
+ assert(0);
+ break;
+ }
+
+ return 0;
+}
+
+static int
+ble_hci_trans_h4_rx_state_w4_payload(struct ble_hci_trans_h4_rx_state *rxs,
+ struct input_buffer *ib)
+{
+ uint16_t mbuf_len;
+ uint16_t len;
+ int rc;
+
+ len = min(ib->len, rxs->expected_len - rxs->len);
+
+ switch (rxs->pkt_type) {
+#if MYNEWT_VAL(BLE_CONTROLLER)
+ case BLE_HCI_TRANS_H4_PKT_TYPE_CMD:
+#endif
+#if MYNEWT_VAL(BLE_HOST)
+ case BLE_HCI_TRANS_H4_PKT_TYPE_EVT:
+#endif
+ if (rxs->buf) {
+ memcpy(&rxs->buf[rxs->len], ib->buf, len);
+ }
+ break;
+ case BLE_HCI_TRANS_H4_PKT_TYPE_ACL:
+ assert(rxs->om);
+
+ mbuf_len = OS_MBUF_PKTLEN(rxs->om);
+ rc = os_mbuf_append(rxs->om, ib->buf, len);
+ if (rc) {
+ /*
+ * Some data may already be appended so need to adjust rxs only by
+ * the size of appended data.
+ */
+ len = OS_MBUF_PKTLEN(rxs->om) - mbuf_len;
+ rxs->len += len;
+ ble_hci_trans_h4_ib_adjust(ib, len);
+
+ return -1;
+ }
+ break;
+ default:
+ assert(0);
+ break;
+ }
+
+ rxs->len += len;
+ ble_hci_trans_h4_ib_adjust(ib, len);
+
+ /* return 1 if need more data */
+ return rxs->len != rxs->expected_len;
+}
+
+static void
+ble_hci_trans_h4_rx_state_completed(struct ble_hci_trans_h4_rx_state *rxs,
+ ble_hci_trans_h4_frame_cb *frame_cb)
+{
+ int rc;
+
+ switch (rxs->pkt_type) {
+#if MYNEWT_VAL(BLE_CONTROLLER)
+ case BLE_HCI_TRANS_H4_PKT_TYPE_CMD:
+#endif
+#if MYNEWT_VAL(BLE_HOST)
+ case BLE_HCI_TRANS_H4_PKT_TYPE_EVT:
+#endif
+ if (rxs->buf) {
+ rc = frame_cb(rxs->pkt_type, rxs->buf);
+ if (rc != 0) {
+ ble_hci_trans_buf_free(rxs->buf);
+ }
+ rxs->buf = NULL;
+ }
+ break;
+ case BLE_HCI_TRANS_H4_PKT_TYPE_ACL:
+ if (rxs->om) {
+ rc = frame_cb(rxs->pkt_type, rxs->om);
+ if (rc != 0) {
+ os_mbuf_free_chain(rxs->om);
+ }
+ rxs->om = NULL;
+ }
+ break;
+ default:
+ assert(0);
+ break;
+ }
+}
+
+int
+ble_hci_trans_h4_rx(struct ble_hci_trans_h4_rx_state *rxs, const uint8_t *buf,
+ uint16_t len, ble_hci_trans_h4_frame_cb *frame_cb)
+{
+ struct input_buffer ib = {
+ .buf = buf,
+ .len = len,
+ };
+ int rc = 0;
+
+ while (ib.len && (rc >= 0)) {
+ rc = 0;
+ switch (rxs->state) {
+ case RXS_STATE_W4_PKT_TYPE:
+ ble_hci_trans_h4_rxs_start(rxs, ib.buf[0]);
+ ble_hci_trans_h4_ib_adjust(&ib, 1);
+ rxs->state = RXS_STATE_W4_HEADER;
+ /* no break */
+
+ case RXS_STATE_W4_HEADER:
+ rc = ble_hci_trans_h4_rx_state_w4_header(rxs, &ib);
+ if (rc) {
+ break;
+ }
+ rxs->state = RXS_STATE_W4_PAYLOAD;
+ /* no break */
+
+ case RXS_STATE_W4_PAYLOAD:
+ rc = ble_hci_trans_h4_rx_state_w4_payload(rxs, &ib);
+ if (rc) {
+ break;
+ }
+ rxs->state = RXS_STATE_COMPLETED;
+ /* no break */
+
+ case RXS_STATE_COMPLETED:
+ ble_hci_trans_h4_rx_state_completed(rxs, frame_cb);
+ rxs->state = RXS_STATE_W4_PKT_TYPE;
+ break;
+
+ default:
+ assert(0);
+ /* consume all remaining data */
+ ble_hci_trans_h4_ib_adjust(&ib, ib.len);
+ break;
+ }
+ }
+
+ /*
+ * Calculate consumed bytes
+ *
+ * Note: we should always consume some bytes unless there is an oom error.
+ * It's also possible that we have an oom error but already consumed some
+ * data, in such case just return success and error will be returned on next
+ * pass.
+ */
+ len = len - ib.len;
+ if (len == 0) {
+ assert(rc < 0);
+ return -1;
+ }
+
+ return len;
+}
diff --git a/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/src/ble_hci_trans_h4.h b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/src/ble_hci_trans_h4.h
new file mode 100644
index 00000000..5b83f6b0
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/src/ble_hci_trans_h4.h
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#ifndef _BLE_HCI_TRANS_H4_H_
+#define _BLE_HCI_TRANS_H4_H_
+
+#include <stdint.h>
+
+#define BLE_HCI_TRANS_H4_PKT_TYPE_NONE 0x00
+#define BLE_HCI_TRANS_H4_PKT_TYPE_CMD 0x01
+#define BLE_HCI_TRANS_H4_PKT_TYPE_ACL 0x02
+#define BLE_HCI_TRANS_H4_PKT_TYPE_EVT 0x04
+
+struct ble_hci_trans_h4_rx_state {
+ uint8_t state;
+ uint8_t pkt_type;
+ uint8_t min_len;
+ uint16_t len;
+ uint16_t expected_len;
+ uint8_t hdr[4];
+ union {
+ uint8_t *buf;
+ struct os_mbuf *om;
+ };
+};
+
+typedef int (ble_hci_trans_h4_frame_cb)(uint8_t pkt_type, void *data);
+
+int ble_hci_trans_h4_rx(struct ble_hci_trans_h4_rx_state *rxs,
+ const uint8_t *buf, uint16_t len,
+ ble_hci_trans_h4_frame_cb *frame_cb);
+
+#endif /* _BLE_HCI_TRANS_H4_H_ */
diff --git a/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/syscfg.yml b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/syscfg.yml
new file mode 100644
index 00000000..c44773ef
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/transport/dialog_cmac/syscfg.yml
@@ -0,0 +1,43 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+syscfg.defs:
+ BLE_HCI_EVT_HI_BUF_COUNT:
+ description: 'Number of high-priority event buffers.'
+ value: 2
+
+ BLE_HCI_EVT_LO_BUF_COUNT:
+ description: 'Number of low-priority event buffers.'
+ value: 8
+
+ BLE_HCI_EVT_BUF_SIZE:
+ description: 'Size of each event buffer, in bytes.'
+ value: 70
+
+ BLE_ACL_BUF_COUNT:
+ description: 'The number of ACL data buffers'
+ value: 4
+
+ BLE_ACL_BUF_SIZE:
+ description: >
+ This is the maximum size of the data portion of HCI ACL data
+ packets. It does not include the HCI data header (of 4 bytes).
+ value: 255
+
+syscfg.vals.'BLE_EXT_ADV || BLE_LL_CFG_FEAT_LL_EXT_ADV':
+ BLE_HCI_EVT_BUF_SIZE: 257
diff --git a/src/libs/mynewt-nimble/nimble/transport/emspi/src/ble_hci_emspi.c b/src/libs/mynewt-nimble/nimble/transport/emspi/src/ble_hci_emspi.c
index 61c0c9cb..61fe96b2 100644
--- a/src/libs/mynewt-nimble/nimble/transport/emspi/src/ble_hci_emspi.c
+++ b/src/libs/mynewt-nimble/nimble/transport/emspi/src/ble_hci_emspi.c
@@ -295,15 +295,7 @@ done:
static struct os_mbuf *
ble_hci_trans_acl_buf_alloc(void)
{
- uint8_t usrhdr_len;
-
-#if MYNEWT_VAL(BLE_HS_FLOW_CTRL)
- usrhdr_len = BLE_MBUF_HS_HDR_LEN;
-#else
- usrhdr_len = 0;
-#endif
-
- return os_mbuf_get_pkthdr(&ble_hci_emspi_acl_mbuf_pool, usrhdr_len);
+ return os_mbuf_get_pkthdr(&ble_hci_emspi_acl_mbuf_pool, 0);
}
/**
diff --git a/src/libs/mynewt-nimble/nimble/transport/nrf5340/pkg.yml b/src/libs/mynewt-nimble/nimble/transport/nrf5340/pkg.yml
new file mode 100644
index 00000000..4db567c8
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/transport/nrf5340/pkg.yml
@@ -0,0 +1,38 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+pkg.name: nimble/transport/nrf5340
+pkg.description: HCI transport for nRF5340
+pkg.author: "Apache Mynewt <dev@mynewt.apache.org>"
+pkg.homepage: "http://mynewt.apache.org/"
+pkg.keywords:
+ - ble
+ - bluetooth
+ - nrf5340
+
+pkg.deps:
+ - "@apache-mynewt-nimble/nimble"
+ - "@apache-mynewt-core/kernel/os"
+ - "@apache-mynewt-core/hw/drivers/ipc_nrf5340"
+
+pkg.apis:
+ - ble_transport
+
+pkg.init:
+ nrf5340_ble_hci_init: 'MYNEWT_VAL(BLE_TRANS_NRF5340_SYSINIT_STAGE)'
diff --git a/src/libs/mynewt-nimble/nimble/transport/nrf5340/src/nrf5340_ble_hci.c b/src/libs/mynewt-nimble/nimble/transport/nrf5340/src/nrf5340_ble_hci.c
new file mode 100644
index 00000000..3f113e11
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/transport/nrf5340/src/nrf5340_ble_hci.c
@@ -0,0 +1,426 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include <assert.h>
+#include <string.h>
+#include <os/mynewt.h>
+#include <nimble/ble.h>
+#include <nimble/ble_hci_trans.h>
+#include <nimble/hci_common.h>
+#include <ipc_nrf5340/ipc_nrf5340.h>
+
+#define HCI_PKT_NONE 0x00
+#define HCI_PKT_CMD 0x01
+#define HCI_PKT_ACL 0x02
+#define HCI_PKT_EVT 0x04
+
+#define POOL_ACL_BLOCK_SIZE OS_ALIGN(MYNEWT_VAL(BLE_ACL_BUF_SIZE) + \
+ BLE_MBUF_MEMBLOCK_OVERHEAD + \
+ BLE_HCI_DATA_HDR_SZ, OS_ALIGNMENT)
+
+#if MYNEWT_VAL(BLE_CONTROLLER)
+#define IPC_TX_CHANNEL 0
+#define IPC_RX_CHANNEL 1
+#endif
+
+#if MYNEWT_VAL(BLE_HOST)
+#define IPC_TX_CHANNEL 1
+#define IPC_RX_CHANNEL 0
+#endif
+
+struct nrf5340_ble_hci_api {
+#if MYNEWT_VAL(BLE_CONTROLLER)
+ ble_hci_trans_rx_cmd_fn *cmd_cb;
+ void *cmd_arg;
+#endif
+#if MYNEWT_VAL(BLE_HOST)
+ ble_hci_trans_rx_cmd_fn *evt_cb;
+ void *evt_arg;
+#endif
+ ble_hci_trans_rx_acl_fn *acl_cb;
+ void *acl_arg;
+};
+
+struct nrf5340_ble_hci_rx_data {
+ uint8_t type;
+ uint8_t hdr[4];
+ uint16_t len;
+ uint16_t expected_len;
+ union {
+ uint8_t *buf;
+ struct os_mbuf *om;
+ };
+};
+
+struct nrf5340_ble_hci_pool_cmd {
+ uint8_t cmd[BLE_HCI_TRANS_CMD_SZ];
+ bool allocated;
+};
+
+/* (Pseudo)pool for HCI commands */
+static struct nrf5340_ble_hci_pool_cmd nrf5340_ble_hci_pool_cmd;
+
+/* Pools for HCI events (high and low priority) */
+static uint8_t nrf5340_ble_hci_pool_evt_hi_buf[OS_MEMPOOL_BYTES(
+ MYNEWT_VAL(BLE_HCI_EVT_HI_BUF_COUNT),
+ MYNEWT_VAL(BLE_HCI_EVT_BUF_SIZE))];
+static struct os_mempool nrf5340_ble_hci_pool_evt_hi;
+static uint8_t nrf5340_ble_hci_pool_evt_lo_buf[OS_MEMPOOL_BYTES(
+ MYNEWT_VAL(BLE_HCI_EVT_LO_BUF_COUNT),
+ MYNEWT_VAL(BLE_HCI_EVT_BUF_SIZE))];
+static struct os_mempool nrf5340_ble_hci_pool_evt_lo;
+
+/* Pool for ACL data */
+static uint8_t nrf5340_ble_hci_pool_acl_buf[OS_MEMPOOL_BYTES(
+ MYNEWT_VAL(BLE_ACL_BUF_COUNT),
+ POOL_ACL_BLOCK_SIZE)];
+static struct os_mempool nrf5340_ble_hci_pool_acl;
+static struct os_mbuf_pool nrf5340_ble_hci_pool_acl_mbuf;
+
+/* Interface to host/ll */
+static struct nrf5340_ble_hci_api nrf5340_ble_hci_api;
+
+/* State of RX currently in progress (needs to reassemble frame) */
+static struct nrf5340_ble_hci_rx_data nrf5340_ble_hci_rx_data;
+
+int
+ble_hci_trans_reset(void)
+{
+ /* XXX Should we do something with RF and/or BLE core? */
+ return 0;
+}
+
+static int
+ble_hci_trans_acl_tx(struct os_mbuf *om)
+{
+ uint8_t ind = HCI_PKT_ACL;
+ struct os_mbuf *x;
+ int rc;
+
+ rc = ipc_nrf5340_send(IPC_TX_CHANNEL, &ind, 1);
+ if (rc == 0) {
+ x = om;
+ while (x) {
+ rc = ipc_nrf5340_send(IPC_TX_CHANNEL, x->om_data, x->om_len);
+ if (rc < 0) {
+ break;
+ }
+ x = SLIST_NEXT(x, om_next);
+ }
+ }
+
+ os_mbuf_free_chain(om);
+
+ return (rc < 0) ? BLE_ERR_MEM_CAPACITY : 0;
+}
+
+#if MYNEWT_VAL(BLE_CONTROLLER)
+void
+ble_hci_trans_cfg_ll(ble_hci_trans_rx_cmd_fn *cmd_cb, void *cmd_arg,
+ ble_hci_trans_rx_acl_fn *acl_cb, void *acl_arg)
+{
+ nrf5340_ble_hci_api.cmd_cb = cmd_cb;
+ nrf5340_ble_hci_api.cmd_arg = cmd_arg;
+ nrf5340_ble_hci_api.acl_cb = acl_cb;
+ nrf5340_ble_hci_api.acl_arg = acl_arg;
+}
+
+int
+ble_hci_trans_ll_evt_tx(uint8_t *hci_ev)
+{
+ uint8_t ind = HCI_PKT_EVT;
+ int len = 2 + hci_ev[1];
+ int rc;
+
+ rc = ipc_nrf5340_send(IPC_TX_CHANNEL, &ind, 1);
+ if (rc == 0) {
+ rc = ipc_nrf5340_send(IPC_TX_CHANNEL, hci_ev, len);
+ }
+
+ ble_hci_trans_buf_free(hci_ev);
+
+ return (rc < 0) ? BLE_ERR_MEM_CAPACITY : 0;
+}
+
+int
+ble_hci_trans_ll_acl_tx(struct os_mbuf *om)
+{
+ return ble_hci_trans_acl_tx(om);
+}
+#endif
+
+#if MYNEWT_VAL(BLE_HOST)
+void
+ble_hci_trans_cfg_hs(ble_hci_trans_rx_cmd_fn *evt_cb, void *evt_arg,
+ ble_hci_trans_rx_acl_fn *acl_cb, void *acl_arg)
+{
+ nrf5340_ble_hci_api.evt_cb = evt_cb;
+ nrf5340_ble_hci_api.evt_arg = evt_arg;
+ nrf5340_ble_hci_api.acl_cb = acl_cb;
+ nrf5340_ble_hci_api.acl_arg = acl_arg;
+}
+
+int
+ble_hci_trans_hs_cmd_tx(uint8_t *cmd)
+{
+ uint8_t ind = HCI_PKT_CMD;
+ int len = 3 + cmd[2];
+ int rc;
+
+ rc = ipc_nrf5340_send(IPC_TX_CHANNEL, &ind, 1);
+ if (rc == 0) {
+ rc = ipc_nrf5340_send(IPC_TX_CHANNEL, cmd, len);
+ }
+
+ ble_hci_trans_buf_free(cmd);
+
+ return (rc < 0) ? BLE_ERR_MEM_CAPACITY : 0;
+}
+
+int
+ble_hci_trans_hs_acl_tx(struct os_mbuf *om)
+{
+ return ble_hci_trans_acl_tx(om);
+}
+#endif
+
+uint8_t *
+ble_hci_trans_buf_alloc(int type)
+{
+ uint8_t *buf;
+
+ switch (type) {
+ case BLE_HCI_TRANS_BUF_CMD:
+ assert(!nrf5340_ble_hci_pool_cmd.allocated);
+ nrf5340_ble_hci_pool_cmd.allocated = 1;
+ buf = nrf5340_ble_hci_pool_cmd.cmd;
+ break;
+ case BLE_HCI_TRANS_BUF_EVT_HI:
+ buf = os_memblock_get(&nrf5340_ble_hci_pool_evt_hi);
+ if (buf) {
+ break;
+ }
+ /* no break */
+ case BLE_HCI_TRANS_BUF_EVT_LO:
+ buf = os_memblock_get(&nrf5340_ble_hci_pool_evt_lo);
+ break;
+ default:
+ assert(0);
+ buf = NULL;
+ }
+
+ return buf;
+}
+
+void
+ble_hci_trans_buf_free(uint8_t *buf)
+{
+ int rc;
+
+ if (buf == nrf5340_ble_hci_pool_cmd.cmd) {
+ assert(nrf5340_ble_hci_pool_cmd.allocated);
+ nrf5340_ble_hci_pool_cmd.allocated = 0;
+ } else if (os_memblock_from(&nrf5340_ble_hci_pool_evt_hi, buf)) {
+ rc = os_memblock_put(&nrf5340_ble_hci_pool_evt_hi, buf);
+ assert(rc == 0);
+ } else {
+ assert(os_memblock_from(&nrf5340_ble_hci_pool_evt_lo, buf));
+ rc = os_memblock_put(&nrf5340_ble_hci_pool_evt_lo, buf);
+ assert(rc == 0);
+ }
+}
+
+static void
+nrf5340_ble_hci_trans_rx_process(int channel)
+{
+ struct nrf5340_ble_hci_rx_data *rxd = &nrf5340_ble_hci_rx_data;
+#if MYNEWT_VAL(BLE_HOST)
+ int pool = BLE_HCI_TRANS_BUF_EVT_HI;
+#endif
+ int rc;
+
+ switch (rxd->type) {
+ case HCI_PKT_NONE:
+ ipc_nrf5340_read(channel, &rxd->type, 1);
+ rxd->len = 0;
+ rxd->expected_len = 0;
+
+#if MYNEWT_VAL(BLE_CONTROLLER)
+ assert((rxd->type == HCI_PKT_ACL) || (rxd->type = HCI_PKT_CMD));
+#endif
+#if MYNEWT_VAL(BLE_HOST)
+ assert((rxd->type == HCI_PKT_ACL) || (rxd->type = HCI_PKT_EVT));
+#endif
+ break;
+#if MYNEWT_VAL(BLE_CONTROLLER)
+ case HCI_PKT_CMD:
+ /* commands are sent complete over IPC */
+ rxd->len = ipc_nrf5340_read(channel, rxd->hdr, 3);
+ assert(rxd->len == 3);
+
+ rxd->buf = ble_hci_trans_buf_alloc(BLE_HCI_TRANS_BUF_CMD);
+ memcpy(rxd->buf, rxd->hdr, rxd->len);
+
+ rxd->len += ipc_nrf5340_read(channel, &rxd->buf[rxd->len], rxd->hdr[2]);
+ assert(rxd->len == 3 + rxd->hdr[2]);
+
+ rc = nrf5340_ble_hci_api.cmd_cb(rxd->buf, nrf5340_ble_hci_api.cmd_arg);
+ if (rc != 0) {
+ ble_hci_trans_buf_free(rxd->buf);
+ }
+
+ rxd->type = HCI_PKT_NONE;
+ break;
+#endif
+#if MYNEWT_VAL(BLE_HOST)
+ case HCI_PKT_EVT:
+ /* events are sent complete over IPC */
+ rxd->len = ipc_nrf5340_read(channel, rxd->hdr, 2);
+ assert(rxd->len == 2);
+
+ if (rxd->hdr[0] == BLE_HCI_EVCODE_LE_META) {
+ /* For LE Meta event we need 3 bytes to parse header */
+ rxd->len += ipc_nrf5340_read(channel, rxd->hdr + 2, 1);
+ assert(rxd->len == 3);
+
+ /* Advertising reports shall be allocated from low-prio pool */
+ if ((rxd->hdr[2] == BLE_HCI_LE_SUBEV_ADV_RPT) ||
+ (rxd->hdr[2] == BLE_HCI_LE_SUBEV_EXT_ADV_RPT)) {
+ pool = BLE_HCI_TRANS_BUF_EVT_LO;
+ }
+ }
+
+ rxd->buf = ble_hci_trans_buf_alloc(pool);
+ if (!rxd->buf) {
+ /*
+ * Only care about valid buffer when shall be allocated from
+ * high-prio pool, otherwise NULL is fine and we'll just skip
+ * this event.
+ */
+ if (pool != BLE_HCI_TRANS_BUF_EVT_LO) {
+ rxd->buf = ble_hci_trans_buf_alloc(BLE_HCI_TRANS_BUF_EVT_LO);
+ }
+ }
+
+ rxd->expected_len = 2 + rxd->hdr[1];
+
+ if (rxd->buf) {
+ memcpy(rxd->buf, rxd->hdr, rxd->len);
+
+ rxd->len += ipc_nrf5340_read(channel, &rxd->buf[rxd->len],
+ rxd->expected_len - rxd->len);
+ assert(rxd->expected_len == rxd->len);
+
+ rc = nrf5340_ble_hci_api.evt_cb(rxd->buf,
+ nrf5340_ble_hci_api.evt_arg);
+ if (rc != 0) {
+ ble_hci_trans_buf_free(rxd->buf);
+ }
+ } else {
+ rxd->len += ipc_nrf5340_consume(channel,
+ rxd->expected_len - rxd->len);
+ assert(rxd->expected_len == rxd->len);
+ }
+
+ rxd->type = HCI_PKT_NONE;
+ break;
+#endif
+ case HCI_PKT_ACL:
+ if (rxd->len < 4) {
+ rxd->len += ipc_nrf5340_read(channel, rxd->hdr, 4 - rxd->len);
+
+ if (rxd->len < 4) {
+ break;
+ }
+ }
+
+ /* Parse header and allocate proper buffer if not done yet */
+ if (rxd->expected_len == 0) {
+ rxd->om = os_mbuf_get_pkthdr(&nrf5340_ble_hci_pool_acl_mbuf,
+ sizeof(struct ble_mbuf_hdr));
+ if (!rxd->om) {
+ /* not much we can do here... */
+ assert(0);
+ }
+
+ os_mbuf_append(rxd->om, rxd->hdr, rxd->len);
+ rxd->expected_len = get_le16(&rxd->hdr[2]) + 4;
+ }
+
+ if (rxd->len != rxd->expected_len) {
+ rxd->len += ipc_nrf5340_read_om(channel, rxd->om,
+ rxd->expected_len - rxd->len);
+ }
+
+ if (rxd->len == rxd->expected_len) {
+ rc = nrf5340_ble_hci_api.acl_cb(rxd->om,
+ nrf5340_ble_hci_api.acl_arg);
+ if (rc != 0) {
+ os_mbuf_free_chain(rxd->om);
+ }
+ rxd->type = HCI_PKT_NONE;
+ }
+ break;
+ default:
+ assert(0);
+ break;
+ }
+}
+
+static void
+nrf5340_ble_hci_trans_rx(int channel, void *user_data)
+{
+ while (ipc_nrf5340_available(channel) > 0) {
+ nrf5340_ble_hci_trans_rx_process(channel);
+ }
+}
+
+void
+nrf5340_ble_hci_init(void)
+{
+ int rc;
+
+ SYSINIT_ASSERT_ACTIVE();
+
+ rc = os_mempool_init(&nrf5340_ble_hci_pool_acl, MYNEWT_VAL(BLE_ACL_BUF_COUNT),
+ POOL_ACL_BLOCK_SIZE, nrf5340_ble_hci_pool_acl_buf,
+ "nrf5340_ble_hci_pool_acl");
+ SYSINIT_PANIC_ASSERT(rc == 0);
+
+ rc = os_mbuf_pool_init(&nrf5340_ble_hci_pool_acl_mbuf,
+ &nrf5340_ble_hci_pool_acl, POOL_ACL_BLOCK_SIZE,
+ MYNEWT_VAL(BLE_ACL_BUF_COUNT));
+ SYSINIT_PANIC_ASSERT(rc == 0);
+
+ rc = os_mempool_init(&nrf5340_ble_hci_pool_evt_hi,
+ MYNEWT_VAL(BLE_HCI_EVT_HI_BUF_COUNT),
+ MYNEWT_VAL(BLE_HCI_EVT_BUF_SIZE),
+ nrf5340_ble_hci_pool_evt_hi_buf,
+ "nrf5340_ble_hci_pool_evt_hi");
+ SYSINIT_PANIC_ASSERT(rc == 0);
+
+ rc = os_mempool_init(&nrf5340_ble_hci_pool_evt_lo,
+ MYNEWT_VAL(BLE_HCI_EVT_LO_BUF_COUNT),
+ MYNEWT_VAL(BLE_HCI_EVT_BUF_SIZE),
+ nrf5340_ble_hci_pool_evt_lo_buf,
+ "nrf5340_ble_hci_pool_evt_lo");
+ SYSINIT_PANIC_ASSERT(rc == 0);
+
+ ipc_nrf5340_recv(IPC_RX_CHANNEL, nrf5340_ble_hci_trans_rx, NULL);
+}
diff --git a/src/libs/mynewt-nimble/nimble/transport/nrf5340/syscfg.yml b/src/libs/mynewt-nimble/nimble/transport/nrf5340/syscfg.yml
new file mode 100644
index 00000000..1417bbc0
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/transport/nrf5340/syscfg.yml
@@ -0,0 +1,51 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+syscfg.defs:
+ BLE_HCI_EVT_HI_BUF_COUNT:
+ description: 'Number of high-priority event buffers.'
+ value: 2
+
+ BLE_HCI_EVT_LO_BUF_COUNT:
+ description: 'Number of low-priority event buffers.'
+ value: 8
+
+ BLE_HCI_EVT_BUF_SIZE:
+ description: 'Size of each event buffer, in bytes.'
+ value: 70
+
+ BLE_ACL_BUF_COUNT:
+ description: 'The number of ACL data buffers'
+ value: 4
+
+ BLE_ACL_BUF_SIZE:
+ description: >
+ This is the maximum size of the data portion of HCI ACL data
+ packets. It does not include the HCI data header (of 4 bytes).
+ value: 255
+
+ BLE_TRANS_NRF5340_SYSINIT_STAGE:
+ description: >
+ Sysinit stage for the RAM BLE transport.
+ value: 100
+
+syscfg.vals.BLE_EXT_ADV:
+ BLE_HCI_EVT_BUF_SIZE: 257
+
+syscfg.restrictions:
+ - '!(BLE_HOST && BLE_CONTROLLER)'
diff --git a/src/libs/mynewt-nimble/nimble/transport/pkg.yml b/src/libs/mynewt-nimble/nimble/transport/pkg.yml
index 2bc4ac29..8174286d 100644
--- a/src/libs/mynewt-nimble/nimble/transport/pkg.yml
+++ b/src/libs/mynewt-nimble/nimble/transport/pkg.yml
@@ -43,3 +43,12 @@ pkg.deps.'BLE_HCI_TRANSPORT == "uart"':
pkg.deps.'BLE_HCI_TRANSPORT == "da1469x"':
- nimble/transport/da1469x
+
+pkg.deps.'BLE_HCI_TRANSPORT == "dialog_cmac"':
+ - nimble/transport/dialog_cmac
+
+pkg.deps.'BLE_HCI_TRANSPORT == "usb"':
+ - nimble/transport/usb
+
+pkg.deps.'BLE_HCI_TRANSPORT == "nrf5340"':
+ - nimble/transport/nrf5340
diff --git a/src/libs/mynewt-nimble/nimble/transport/socket/src/ble_hci_socket.c b/src/libs/mynewt-nimble/nimble/transport/socket/src/ble_hci_socket.c
index 863d0fbb..44de8fed 100644
--- a/src/libs/mynewt-nimble/nimble/transport/socket/src/ble_hci_socket.c
+++ b/src/libs/mynewt-nimble/nimble/transport/socket/src/ble_hci_socket.c
@@ -53,19 +53,22 @@
#if MYNEWT_VAL(BLE_SOCK_USE_LINUX_BLUE)
#include <sys/errno.h>
-#define BTPROTO_HCI 1
-#define HCI_CHANNEL_RAW 0
-#define HCI_CHANNEL_USER 1
-#define HCIDEVUP _IOW('H', 201, int)
-#define HCIDEVDOWN _IOW('H', 202, int)
-#define HCIDEVRESET _IOW('H', 203, int)
-#define HCIGETDEVLIST _IOR('H', 210, int)
+#define BTPROTO_HCI 1
+#define HCI_CHANNEL_RAW 0
+#define HCI_CHANNEL_USER 1
+#define HCIDEVUP _IOW('H', 201, int)
+#define HCIDEVDOWN _IOW('H', 202, int)
+#define HCIDEVRESET _IOW('H', 203, int)
+#define HCIGETDEVLIST _IOR('H', 210, int)
struct sockaddr_hci {
- sa_family_t hci_family;
- unsigned short hci_dev;
- unsigned short hci_channel;
+ sa_family_t hci_family;
+ unsigned short hci_dev;
+ unsigned short hci_channel;
};
+#elif MYNEWT_VAL(BLE_SOCK_USE_NUTTX)
+#include <errno.h>
+#include <netpacket/bluetooth.h>
#endif
#include <fcntl.h>
@@ -205,6 +208,8 @@ static struct ble_hci_sock_state {
static int s_ble_hci_device = MYNEWT_VAL(BLE_SOCK_TCP_PORT);
#elif MYNEWT_VAL(BLE_SOCK_USE_LINUX_BLUE)
static int s_ble_hci_device = MYNEWT_VAL(BLE_SOCK_LINUX_DEV);
+#elif MYNEWT_VAL(BLE_SOCK_USE_NUTTX)
+static int s_ble_hci_device = 0;
#endif
/**
@@ -227,6 +232,7 @@ ble_hci_trans_acl_buf_alloc(void)
return m;
}
+#if MYNEWT_VAL(BLE_SOCK_USE_LINUX_BLUE)
static int
ble_hci_sock_acl_tx(struct os_mbuf *om)
{
@@ -268,10 +274,66 @@ ble_hci_sock_acl_tx(struct os_mbuf *om)
}
return 0;
}
+#elif MYNEWT_VAL(BLE_SOCK_USE_NUTTX)
+static int
+ble_hci_sock_acl_tx(struct os_mbuf *om)
+{
+ size_t len;
+ uint8_t *buf;
+ int i;
+ struct os_mbuf *m;
+ struct sockaddr_hci addr;
+
+ addr.hci_family = AF_BLUETOOTH;
+ addr.hci_channel = HCI_CHANNEL_RAW;
+ addr.hci_dev = 0;
+
+ memcpy(&addr, &addr, sizeof(struct sockaddr_hci));
+
+ len = 1;
+
+ for (m = om; m; m = SLIST_NEXT(m, om_next)) {
+ len += m->om_len;
+ }
+
+ buf = (uint8_t *)malloc(len);
+
+ buf[0] = BLE_HCI_UART_H4_ACL;
+ i = 1;
+ for (m = om; m; m = SLIST_NEXT(m, om_next)) {
+ memcpy(&buf[i], m->om_data, m->om_len);
+ i += m->om_len;
+ }
+
+ STATS_INC(hci_sock_stats, omsg);
+ STATS_INC(hci_sock_stats, oacl);
+ STATS_INCN(hci_sock_stats, obytes, OS_MBUF_PKTLEN(om) + 1);
+
+ i = sendto(ble_hci_sock_state.sock, buf, len, 0,
+ (struct sockaddr *)&addr, sizeof(struct sockaddr_hci));
+
+ free(buf);
+
+ os_mbuf_free_chain(om);
+ if (i != OS_MBUF_PKTLEN(om) + 1) {
+ if (i < 0) {
+ dprintf(1, "sendto() failed : %d\n", errno);
+ } else {
+ dprintf(1, "sendto() partial write: %d\n", i);
+ }
+ STATS_INC(hci_sock_stats, oerr);
+ return BLE_ERR_MEM_CAPACITY;
+ }
+ return 0;
+}
+#endif
+
+#if MYNEWT_VAL(BLE_SOCK_USE_LINUX_BLUE)
static int
ble_hci_sock_cmdevt_tx(uint8_t *hci_ev, uint8_t h4_type)
{
+ uint8_t btaddr[6];
struct msghdr msg;
struct iovec iov[8];
int len;
@@ -316,6 +378,57 @@ ble_hci_sock_cmdevt_tx(uint8_t *hci_ev, uint8_t h4_type)
return 0;
}
+#elif MYNEWT_VAL(BLE_SOCK_USE_NUTTX)
+static int
+ble_hci_sock_cmdevt_tx(uint8_t *hci_ev, uint8_t h4_type)
+{
+ uint8_t *buf;
+ size_t len;
+ struct sockaddr_hci addr;
+ int i;
+
+ addr.hci_family = AF_BLUETOOTH;
+ addr.hci_channel = HCI_CHANNEL_RAW;
+ addr.hci_dev = 0;
+
+ memcpy(&addr, &addr, sizeof(struct sockaddr_hci));
+
+ if (h4_type == BLE_HCI_UART_H4_CMD) {
+ len = sizeof(struct ble_hci_cmd) + hci_ev[2];
+ STATS_INC(hci_sock_stats, ocmd);
+ } else if (h4_type == BLE_HCI_UART_H4_EVT) {
+ len = sizeof(struct ble_hci_ev) + hci_ev[1];
+ STATS_INC(hci_sock_stats, oevt);
+ } else {
+ assert(0);
+ }
+
+ STATS_INC(hci_sock_stats, omsg);
+ STATS_INCN(hci_sock_stats, obytes, len + 1);
+
+ buf = (uint8_t *)malloc(len + 1);
+
+ buf[0] = h4_type;
+ memcpy(&buf[1], hci_ev, len);
+
+ i = sendto(ble_hci_sock_state.sock, buf, len + 1, 0,
+ (struct sockaddr *)&addr, sizeof(struct sockaddr_hci));
+
+ free(buf);
+ ble_hci_trans_buf_free(hci_ev);
+ if (i != len + 1) {
+ if (i < 0) {
+ dprintf(1, "sendto() failed : %d\n", errno);
+ } else {
+ dprintf(1, "sendto() partial write: %d\n", i);
+ }
+ STATS_INC(hci_sock_stats, oerr);
+ return BLE_ERR_MEM_CAPACITY;
+ }
+
+ return 0;
+}
+#endif
static int
ble_hci_sock_rx_msg(void)
@@ -427,6 +540,7 @@ ble_hci_sock_rx_msg(void)
STATS_INC(hci_sock_stats, ierr);
break;
}
+
memmove(bhss->rx_data, &bhss->rx_data[len], bhss->rx_off - len);
bhss->rx_off -= len;
}
@@ -540,7 +654,7 @@ ble_hci_sock_config(void)
rc = bind(s, (struct sockaddr *)&shci, sizeof(shci));
if (rc) {
- dprintf(1, "bind() failed %d\n", errno);
+ dprintf(1, "bind() failed %d hci%d\n", errno, shci.hci_dev);
goto err;
}
@@ -565,7 +679,54 @@ err:
}
return BLE_ERR_HW_FAIL;
}
+#elif MYNEWT_VAL(BLE_SOCK_USE_NUTTX)
+static int
+ble_hci_sock_config(void)
+{
+ struct sockaddr_hci shci;
+ int s;
+ int rc;
+ ble_npl_time_t timeout;
+
+ memset(&shci, 0, sizeof(shci));
+ shci.hci_family = AF_BLUETOOTH;
+ shci.hci_dev = 0;
+ shci.hci_channel = HCI_CHANNEL_RAW;
+
+ if (ble_hci_sock_state.sock >= 0) {
+ close(ble_hci_sock_state.sock);
+ ble_hci_sock_state.sock = -1;
+ }
+
+ s = socket(PF_BLUETOOTH, SOCK_RAW, BTPROTO_HCI);
+ if (s < 0) {
+ dprintf(1, "socket() failed %d\n", errno);
+ goto err;
+ }
+
+ rc = bind(s, (struct sockaddr *)&shci, sizeof(shci));
+ if (rc) {
+ dprintf(1, "bind() failed %d hci%d\n", errno, shci.hci_dev);
+ goto err;
+ }
+
+ ble_hci_sock_state.sock = s;
+
+ rc = ble_npl_time_ms_to_ticks(10, &timeout);
+ if (rc) {
+ goto err;
+ }
+ ble_npl_callout_reset(&ble_hci_sock_state.timer, timeout);
+
+ return 0;
+err:
+ if (s >= 0) {
+ close(s);
+ }
+ return BLE_ERR_HW_FAIL;
+}
#endif
+
/**
* Sends an HCI event from the controller to the host.
*
diff --git a/src/libs/mynewt-nimble/nimble/transport/syscfg.yml b/src/libs/mynewt-nimble/nimble/transport/syscfg.yml
index 137d6e94..5bec6adf 100644
--- a/src/libs/mynewt-nimble/nimble/transport/syscfg.yml
+++ b/src/libs/mynewt-nimble/nimble/transport/syscfg.yml
@@ -26,13 +26,16 @@ syscfg.defs:
value: builtin
restrictions: $notnull
choices:
- - builtin # Built-in NimBLE controller and RAM transport
- - custom # Custom transport, has to be included manually by user
- - ram # RAM transport
- - uart # UART HCI H4 transport
- - socket # Socket transport (for native builds)
- - emspi # SPI transport for EM Microelectionic controllers
- - da1469x # Dialog DA1469x integrated controller
+ - builtin # Built-in NimBLE controller and RAM transport
+ - custom # Custom transport, has to be included manually by user
+ - ram # RAM transport
+ - uart # UART HCI H4 transport
+ - socket # Socket transport (for native builds)
+ - emspi # SPI transport for EM Microelectionic controllers
+ - da1469x # Dialog DA1469x integrated controller
+ - dialog_cmac # Dialog CMAC via shared memory
+ - usb # USB
+ - nrf5340 # nRF5340
# Deprecated settings
BLE_HCI_TRANSPORT_NIMBLE_BUILTIN:
diff --git a/src/libs/mynewt-nimble/nimble/transport/uart/src/ble_hci_uart.c b/src/libs/mynewt-nimble/nimble/transport/uart/src/ble_hci_uart.c
index ac6af28e..cbb6dd42 100644
--- a/src/libs/mynewt-nimble/nimble/transport/uart/src/ble_hci_uart.c
+++ b/src/libs/mynewt-nimble/nimble/transport/uart/src/ble_hci_uart.c
@@ -195,8 +195,6 @@ ble_hci_trans_acl_buf_alloc(void)
#if MYNEWT_VAL(BLE_CONTROLLER)
usrhdr_len = sizeof(struct ble_mbuf_hdr);
-#elif MYNEWT_VAL(BLE_HS_FLOW_CTRL)
- usrhdr_len = BLE_MBUF_HS_HDR_LEN;
#else
usrhdr_len = 0;
#endif
diff --git a/src/libs/mynewt-nimble/nimble/transport/usb/pkg.yml b/src/libs/mynewt-nimble/nimble/transport/usb/pkg.yml
new file mode 100644
index 00000000..49317c97
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/transport/usb/pkg.yml
@@ -0,0 +1,39 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+pkg.name: nimble/transport/usb
+pkg.description: Provides HCI transport over USB interface
+pkg.author: "Apache Mynewt <dev@mynewt.apache.org>"
+pkg.homepage: "http://mynewt.apache.org/"
+pkg.keywords:
+ - ble
+ - bluetooth
+ - usb
+
+pkg.deps:
+ - "@apache-mynewt-core/hw/hal"
+ - "@apache-mynewt-core/kernel/os"
+ - "@apache-mynewt-core/util/mem"
+ - nimble
+
+pkg.apis:
+ - ble_transport
+
+pkg.init:
+ ble_hci_usb_init: 'MYNEWT_VAL(BLE_TRANS_USB_SYSINIT_STAGE)'
diff --git a/src/libs/mynewt-nimble/nimble/transport/usb/src/ble_hci_usb.c b/src/libs/mynewt-nimble/nimble/transport/usb/src/ble_hci_usb.c
new file mode 100644
index 00000000..55c91f22
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/transport/usb/src/ble_hci_usb.c
@@ -0,0 +1,410 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include <assert.h>
+#include <stddef.h>
+#include "syscfg/syscfg.h"
+#include "sysinit/sysinit.h"
+#include "os/os.h"
+#include "mem/mem.h"
+
+#include "nimble/ble.h"
+#include "nimble/ble_hci_trans.h"
+#include "nimble/hci_common.h"
+
+#include <class/bth/bth_device.h>
+
+/*
+ * The MBUF payload size must accommodate the HCI data header size plus the
+ * maximum ACL data packet length. The ACL block size is the size of the
+ * mbufs we will allocate.
+ */
+#define ACL_BLOCK_SIZE OS_ALIGN(MYNEWT_VAL(BLE_ACL_BUF_SIZE) \
+ + BLE_MBUF_MEMBLOCK_OVERHEAD \
+ + BLE_HCI_DATA_HDR_SZ, OS_ALIGNMENT)
+
+struct usb_ble_hci_pool_cmd {
+ uint8_t cmd[BLE_HCI_TRANS_CMD_SZ];
+ bool allocated;
+};
+
+/* (Pseudo)pool for HCI commands */
+static struct usb_ble_hci_pool_cmd usb_ble_hci_pool_cmd;
+
+static ble_hci_trans_rx_cmd_fn *ble_hci_usb_rx_cmd_ll_cb;
+static void *ble_hci_usb_rx_cmd_ll_arg;
+
+static ble_hci_trans_rx_acl_fn *ble_hci_usb_rx_acl_ll_cb;
+static void *ble_hci_usb_rx_acl_ll_arg;
+
+static struct os_mempool ble_hci_usb_evt_hi_pool;
+static os_membuf_t ble_hci_usb_evt_hi_buf[
+ OS_MEMPOOL_SIZE(MYNEWT_VAL(BLE_HCI_EVT_HI_BUF_COUNT),
+ MYNEWT_VAL(BLE_HCI_EVT_BUF_SIZE))
+];
+
+static struct os_mempool ble_hci_usb_evt_lo_pool;
+static os_membuf_t ble_hci_usb_evt_lo_buf[
+ OS_MEMPOOL_SIZE(MYNEWT_VAL(BLE_HCI_EVT_LO_BUF_COUNT),
+ MYNEWT_VAL(BLE_HCI_EVT_BUF_SIZE))
+];
+
+static uint8_t ble_hci_pool_acl_mempool_buf[
+ OS_MEMPOOL_BYTES(MYNEWT_VAL(BLE_ACL_BUF_COUNT),
+ ACL_BLOCK_SIZE)];
+static struct os_mempool ble_hci_pool_acl_mempool;
+static struct os_mbuf_pool ble_hci_pool_acl_mbuf_pool;
+
+static struct os_mbuf *incoming_acl_data;
+
+static struct os_mbuf *
+ble_hci_trans_acl_buf_alloc(void)
+{
+ struct os_mbuf *m;
+
+ m = os_mbuf_get_pkthdr(&ble_hci_pool_acl_mbuf_pool,
+ sizeof(struct ble_mbuf_hdr));
+ return m;
+}
+
+void
+ble_hci_trans_cfg_ll(ble_hci_trans_rx_cmd_fn *cmd_cb,
+ void *cmd_arg,
+ ble_hci_trans_rx_acl_fn *acl_cb,
+ void *acl_arg)
+{
+ ble_hci_usb_rx_cmd_ll_cb = cmd_cb;
+ ble_hci_usb_rx_cmd_ll_arg = cmd_arg;
+ ble_hci_usb_rx_acl_ll_cb = acl_cb;
+ ble_hci_usb_rx_acl_ll_arg = acl_arg;
+}
+
+#define BLE_HCI_USB_EVT_COUNT \
+ (MYNEWT_VAL(BLE_HCI_EVT_HI_BUF_COUNT) + MYNEWT_VAL(BLE_HCI_EVT_LO_BUF_COUNT))
+
+/**
+ * A packet to be sent over the USB. This can be a command, an event, or ACL
+ * data.
+ */
+struct ble_hci_pkt {
+ STAILQ_ENTRY(ble_hci_pkt) next;
+ void *data;
+};
+
+static struct os_mempool ble_hci_pkt_pool;
+static os_membuf_t ble_hci_pkt_buf[
+ OS_MEMPOOL_SIZE(BLE_HCI_USB_EVT_COUNT + 1 +
+ MYNEWT_VAL(BLE_HCI_ACL_OUT_COUNT),
+ sizeof(struct ble_hci_pkt))];
+
+struct tx_queue {
+ STAILQ_HEAD(, ble_hci_pkt) queue;
+};
+
+static struct tx_queue ble_hci_tx_acl_queue = {STAILQ_HEAD_INITIALIZER(ble_hci_tx_acl_queue.queue)};
+static struct tx_queue ble_hci_tx_evt_queue = { STAILQ_HEAD_INITIALIZER(ble_hci_tx_evt_queue.queue) };
+
+/*
+ * TinyUSB callbacks.
+ */
+void
+tud_bt_acl_data_sent_cb(uint16_t sent_bytes)
+{
+ struct os_mbuf *om;
+ struct ble_hci_pkt *curr_acl;
+ struct ble_hci_pkt *next_acl;
+ os_sr_t sr;
+
+ OS_ENTER_CRITICAL(sr);
+ curr_acl = STAILQ_FIRST(&ble_hci_tx_acl_queue.queue);
+ OS_EXIT_CRITICAL(sr);
+
+ assert(curr_acl != NULL);
+ om = curr_acl->data;
+ assert(om != NULL && om->om_len >= sent_bytes);
+ os_mbuf_adj(om, sent_bytes);
+
+ while (om != NULL && om->om_len == 0) {
+ curr_acl->data = SLIST_NEXT(om, om_next);
+ os_mbuf_free(om);
+ om = curr_acl->data;
+ }
+
+ if (om == NULL) {
+ OS_ENTER_CRITICAL(sr);
+ STAILQ_REMOVE_HEAD(&ble_hci_tx_acl_queue.queue, next);
+ next_acl = STAILQ_FIRST(&ble_hci_tx_acl_queue.queue);
+ OS_EXIT_CRITICAL(sr);
+ os_memblock_put(&ble_hci_pkt_pool, curr_acl);
+ if (next_acl != NULL) {
+ om = next_acl->data;
+ }
+ }
+
+ if (om != NULL) {
+ tud_bt_acl_data_send(om->om_data, om->om_len);
+ }
+}
+
+void
+tud_bt_event_sent_cb(uint16_t sent_bytes)
+{
+ struct ble_hci_pkt *curr_evt;
+ struct ble_hci_pkt *next_evt;
+ uint8_t *hci_ev;
+ os_sr_t sr;
+
+ OS_ENTER_CRITICAL(sr);
+ curr_evt = STAILQ_FIRST(&ble_hci_tx_evt_queue.queue);
+ OS_EXIT_CRITICAL(sr);
+ assert(curr_evt != NULL);
+ hci_ev = curr_evt->data;
+
+ assert(hci_ev != NULL && hci_ev[1] + sizeof(struct ble_hci_ev) == sent_bytes);
+
+ ble_hci_trans_buf_free(hci_ev);
+
+ OS_ENTER_CRITICAL(sr);
+ STAILQ_REMOVE_HEAD(&ble_hci_tx_evt_queue.queue, next);
+ next_evt = STAILQ_FIRST(&ble_hci_tx_evt_queue.queue);
+ OS_EXIT_CRITICAL(sr);
+ os_memblock_put(&ble_hci_pkt_pool, curr_evt);
+
+ if (next_evt != NULL) {
+ hci_ev = next_evt->data;
+ tud_bt_event_send(hci_ev, hci_ev[1] + sizeof(struct ble_hci_ev));
+ }
+}
+
+void
+tud_bt_acl_data_received_cb(void *acl_data, uint16_t data_len)
+{
+ uint8_t *data;
+ uint32_t len;
+ struct os_mbuf *om = incoming_acl_data;
+ int rc;
+
+ if (om == NULL) {
+ om = ble_hci_trans_acl_buf_alloc();
+ assert(om != NULL);
+ }
+ assert(om->om_len + data_len <= MYNEWT_VAL(BLE_ACL_BUF_SIZE) + BLE_HCI_DATA_HDR_SZ);
+
+ os_mbuf_append(om, acl_data, data_len);
+ incoming_acl_data = om;
+ if (om->om_len > BLE_HCI_DATA_HDR_SZ) {
+ data = incoming_acl_data->om_data;
+ len = data[2] + (data[3] << 8) + BLE_HCI_DATA_HDR_SZ;
+ if (len >= incoming_acl_data->om_len) {
+ incoming_acl_data = NULL;
+ rc = ble_hci_usb_rx_acl_ll_cb(om, ble_hci_usb_rx_acl_ll_arg);
+ (void)rc;
+ }
+ }
+}
+
+void
+tud_bt_hci_cmd_cb(void *hci_cmd, size_t cmd_len)
+{
+ uint8_t *buf;
+ int rc = -1;
+
+ assert(ble_hci_usb_rx_cmd_ll_cb);
+ if (ble_hci_usb_rx_cmd_ll_cb) {
+ buf = ble_hci_trans_buf_alloc(BLE_HCI_TRANS_BUF_CMD);
+ assert(buf != NULL);
+ memcpy(buf, hci_cmd, cmd_len);
+
+ rc = ble_hci_usb_rx_cmd_ll_cb(buf, ble_hci_usb_rx_cmd_ll_arg);
+ }
+
+ if (rc != 0) {
+ ble_hci_trans_buf_free(buf);
+ }
+}
+
+static int
+ble_hci_trans_ll_tx(struct tx_queue *queue, struct os_mbuf *om)
+{
+ struct ble_hci_pkt *pkt;
+ os_sr_t sr;
+ bool first;
+
+ /* If this packet is zero length, just free it */
+ if (OS_MBUF_PKTLEN(om) == 0) {
+ os_mbuf_free_chain(om);
+ return 0;
+ }
+
+ pkt = os_memblock_get(&ble_hci_pkt_pool);
+ if (pkt == NULL) {
+ os_mbuf_free_chain(om);
+ return BLE_ERR_MEM_CAPACITY;
+ }
+
+ pkt->data = om;
+ OS_ENTER_CRITICAL(sr);
+ first = STAILQ_EMPTY(&queue->queue);
+ STAILQ_INSERT_TAIL(&queue->queue, pkt, next);
+ OS_EXIT_CRITICAL(sr);
+ if (first) {
+ tud_bt_acl_data_send(om->om_data, om->om_len);
+ }
+
+ return 0;
+}
+
+int
+ble_hci_trans_ll_acl_tx(struct os_mbuf *om)
+{
+ return ble_hci_trans_ll_tx(&ble_hci_tx_acl_queue, om);
+}
+
+int
+ble_hci_trans_ll_evt_tx(uint8_t *hci_ev)
+{
+ struct ble_hci_pkt *pkt;
+ os_sr_t sr;
+ bool first;
+
+ assert(hci_ev != NULL);
+
+ pkt = os_memblock_get(&ble_hci_pkt_pool);
+ if (pkt == NULL) {
+ ble_hci_trans_buf_free(hci_ev);
+ return BLE_ERR_MEM_CAPACITY;
+ }
+
+ pkt->data = hci_ev;
+ OS_ENTER_CRITICAL(sr);
+ first = STAILQ_EMPTY(&ble_hci_tx_evt_queue.queue);
+ STAILQ_INSERT_TAIL(&ble_hci_tx_evt_queue.queue, pkt, next);
+ OS_EXIT_CRITICAL(sr);
+ if (first) {
+ tud_bt_event_send(hci_ev, hci_ev[1] + sizeof(struct ble_hci_ev));
+ }
+
+ return 0;
+}
+
+uint8_t *
+ble_hci_trans_buf_alloc(int type)
+{
+ uint8_t *buf;
+
+ switch (type) {
+ case BLE_HCI_TRANS_BUF_CMD:
+ assert(!usb_ble_hci_pool_cmd.allocated);
+ usb_ble_hci_pool_cmd.allocated = 1;
+ buf = usb_ble_hci_pool_cmd.cmd;
+ break;
+
+ case BLE_HCI_TRANS_BUF_EVT_HI:
+ buf = os_memblock_get(&ble_hci_usb_evt_hi_pool);
+ if (buf == NULL) {
+ /* If no high-priority event buffers remain, try to grab a
+ * low-priority one.
+ */
+ buf = ble_hci_trans_buf_alloc(BLE_HCI_TRANS_BUF_EVT_LO);
+ }
+ break;
+
+ case BLE_HCI_TRANS_BUF_EVT_LO:
+ buf = os_memblock_get(&ble_hci_usb_evt_lo_pool);
+ break;
+
+ default:
+ assert(0);
+ buf = NULL;
+ }
+
+ return buf;
+}
+
+void
+ble_hci_trans_buf_free(uint8_t *buf)
+{
+ int rc;
+
+ /* XXX: this may look a bit odd, but the controller uses the command
+ * buffer to send back the command complete/status as an immediate
+ * response to the command. This was done to insure that the controller
+ * could always send back one of these events when a command was received.
+ * Thus, we check to see which pool the buffer came from so we can free
+ * it to the appropriate pool
+ */
+ if (os_memblock_from(&ble_hci_usb_evt_hi_pool, buf)) {
+ rc = os_memblock_put(&ble_hci_usb_evt_hi_pool, buf);
+ assert(rc == 0);
+ } else if (os_memblock_from(&ble_hci_usb_evt_lo_pool, buf)) {
+ rc = os_memblock_put(&ble_hci_usb_evt_lo_pool, buf);
+ assert(rc == 0);
+ } else {
+ assert(usb_ble_hci_pool_cmd.allocated);
+ usb_ble_hci_pool_cmd.allocated = 0;
+ }
+ (void)rc;
+}
+
+int
+ble_hci_trans_reset(void)
+{
+ return 0;
+}
+
+void
+ble_hci_usb_init(void)
+{
+ int rc;
+
+ /* Ensure this function only gets called by sysinit. */
+ SYSINIT_ASSERT_ACTIVE();
+
+ rc = mem_init_mbuf_pool(ble_hci_pool_acl_mempool_buf, &ble_hci_pool_acl_mempool, &ble_hci_pool_acl_mbuf_pool,
+ MYNEWT_VAL(BLE_ACL_BUF_COUNT), ACL_BLOCK_SIZE, "ble_hci_acl");
+ SYSINIT_PANIC_ASSERT(rc == 0);
+
+ rc = os_mempool_init(&ble_hci_usb_evt_hi_pool,
+ MYNEWT_VAL(BLE_HCI_EVT_HI_BUF_COUNT),
+ MYNEWT_VAL(BLE_HCI_EVT_BUF_SIZE),
+ ble_hci_usb_evt_hi_buf,
+ "ble_hci_usb_evt_hi_pool");
+ SYSINIT_PANIC_ASSERT(rc == 0);
+
+ rc = os_mempool_init(&ble_hci_usb_evt_lo_pool,
+ MYNEWT_VAL(BLE_HCI_EVT_LO_BUF_COUNT),
+ MYNEWT_VAL(BLE_HCI_EVT_BUF_SIZE),
+ ble_hci_usb_evt_lo_buf,
+ "ble_hci_usb_evt_lo_pool");
+ SYSINIT_PANIC_ASSERT(rc == 0);
+
+ /*
+ * Create memory pool of packet list nodes. NOTE: the number of these
+ * buffers should be, at least, the total number of event buffers (hi
+ * and lo), the number of command buffers (currently 1) and the total
+ * number of buffers that the controller could possibly hand to the host.
+ */
+ rc = os_mempool_init(&ble_hci_pkt_pool,
+ BLE_HCI_USB_EVT_COUNT + 1 +
+ MYNEWT_VAL(BLE_HCI_ACL_OUT_COUNT),
+ sizeof (struct ble_hci_pkt),
+ ble_hci_pkt_buf,
+ "ble_hci_usb_pkt_pool");
+ SYSINIT_PANIC_ASSERT(rc == 0);
+}
diff --git a/src/libs/mynewt-nimble/nimble/transport/usb/syscfg.yml b/src/libs/mynewt-nimble/nimble/transport/usb/syscfg.yml
new file mode 100644
index 00000000..ebc261a2
--- /dev/null
+++ b/src/libs/mynewt-nimble/nimble/transport/usb/syscfg.yml
@@ -0,0 +1,57 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+syscfg.defs:
+ BLE_HCI_EVT_BUF_SIZE:
+ description: 'The size of the allocated event buffers'
+ value: 70
+ BLE_HCI_EVT_HI_BUF_COUNT:
+ description: 'The number of high priority event buffers'
+ value: 8
+ BLE_HCI_EVT_LO_BUF_COUNT:
+ description: 'The number of low priority event buffers'
+ value: 8
+ BLE_ACL_BUF_COUNT:
+ description: 'The number of ACL data buffers'
+ value: 12
+ BLE_ACL_BUF_SIZE:
+ description: >
+ This is the maximum size of the data portion of HCI ACL data
+ packets. It does not include the HCI data header (of 4 bytes).
+ value: 255
+
+ BLE_HCI_ACL_OUT_COUNT:
+ description: >
+ This count is used in creating a pool of elements used by the
+ code to enqueue various elements. In the case of the controller
+ only HCI, this number should be equal to the number of mbufs in
+ the msys pool. For host only, it is really dependent on the
+ number of ACL buffers that the controller tells the host it
+ has.
+ value: 12
+
+ BLE_TRANS_USB_SYSINIT_STAGE:
+ description: >
+ Sysinit stage for the USB BLE transport.
+ value: 500
+
+syscfg.vals.BLE_EXT_ADV:
+ BLE_HCI_EVT_BUF_SIZE: 257
+
+syscfg.restrictions:
+ - '!BLE_HOST'
diff --git a/src/libs/mynewt-nimble/porting/examples/linux/include/logcfg/logcfg.h b/src/libs/mynewt-nimble/porting/examples/linux/include/logcfg/logcfg.h
index e21a3ae5..837cdeac 100644
--- a/src/libs/mynewt-nimble/porting/examples/linux/include/logcfg/logcfg.h
+++ b/src/libs/mynewt-nimble/porting/examples/linux/include/logcfg/logcfg.h
@@ -1,5 +1,5 @@
/**
- * This file was generated by Apache newt version: 1.8.0-dev
+ * This file was generated by Apache newt version: 1.9.0-dev
*/
#ifndef H_MYNEWT_LOGCFG_
diff --git a/src/libs/mynewt-nimble/porting/examples/linux/include/syscfg/syscfg.h b/src/libs/mynewt-nimble/porting/examples/linux/include/syscfg/syscfg.h
index 7e9bfcac..99939f2b 100644
--- a/src/libs/mynewt-nimble/porting/examples/linux/include/syscfg/syscfg.h
+++ b/src/libs/mynewt-nimble/porting/examples/linux/include/syscfg/syscfg.h
@@ -1,5 +1,5 @@
/**
- * This file was generated by Apache newt version: 1.8.0-dev
+ * This file was generated by Apache newt version: 1.9.0-dev
*/
#ifndef H_MYNEWT_SYSCFG_
@@ -15,8 +15,6 @@
#define MYNEWT_VAL(_name) MYNEWT_VAL_ ## _name
#define MYNEWT_VAL_CHOICE(_name, _val) MYNEWT_VAL_ ## _name ## __ ## _val
-
-
/*** @apache-mynewt-core/crypto/tinycrypt */
#ifndef MYNEWT_VAL_TINYCRYPT_SYSINIT_STAGE
#define MYNEWT_VAL_TINYCRYPT_SYSINIT_STAGE (200)
@@ -297,7 +295,7 @@
#define MYNEWT_VAL_LOG_FCB_SLOT1 (0)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/linux (defined by @apache-mynewt-core/sys/log/stub) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/linux (defined by @apache-mynewt-core/sys/log/stub) */
#ifndef MYNEWT_VAL_LOG_LEVEL
#define MYNEWT_VAL_LOG_LEVEL (0)
#endif
@@ -368,6 +366,14 @@
#define MYNEWT_VAL_BLE_EXT_ADV_MAX_SIZE (31)
#endif
+#ifndef MYNEWT_VAL_BLE_ISO
+#define MYNEWT_VAL_BLE_ISO (0)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_ISO_TEST
+#define MYNEWT_VAL_BLE_ISO_TEST (0)
+#endif
+
#ifndef MYNEWT_VAL_BLE_MAX_CONNECTIONS
#define MYNEWT_VAL_BLE_MAX_CONNECTIONS (1)
#endif
@@ -945,12 +951,12 @@
#define MYNEWT_VAL_BLE_SOCK_LINUX_DEV (0)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/linux (defined by @apache-mynewt-nimble/nimble/transport/socket) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/linux (defined by @apache-mynewt-nimble/nimble/transport/socket) */
#ifndef MYNEWT_VAL_BLE_SOCK_STACK_SIZE
#define MYNEWT_VAL_BLE_SOCK_STACK_SIZE (1028)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/linux (defined by @apache-mynewt-nimble/nimble/transport/socket) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/linux (defined by @apache-mynewt-nimble/nimble/transport/socket) */
#ifndef MYNEWT_VAL_BLE_SOCK_TASK_PRIO
#define MYNEWT_VAL_BLE_SOCK_TASK_PRIO (3)
#endif
@@ -959,12 +965,12 @@
#define MYNEWT_VAL_BLE_SOCK_TCP_PORT (14433)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/linux (defined by @apache-mynewt-nimble/nimble/transport/socket) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/linux (defined by @apache-mynewt-nimble/nimble/transport/socket) */
#ifndef MYNEWT_VAL_BLE_SOCK_USE_LINUX_BLUE
#define MYNEWT_VAL_BLE_SOCK_USE_LINUX_BLUE (1)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/linux (defined by @apache-mynewt-nimble/nimble/transport/socket) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/linux (defined by @apache-mynewt-nimble/nimble/transport/socket) */
#ifndef MYNEWT_VAL_BLE_SOCK_USE_TCP
#define MYNEWT_VAL_BLE_SOCK_USE_TCP (0)
#endif
diff --git a/src/libs/mynewt-nimble/porting/examples/linux/include/sysflash/sysflash.h b/src/libs/mynewt-nimble/porting/examples/linux/include/sysflash/sysflash.h
index 413cb267..ab1341b2 100644
--- a/src/libs/mynewt-nimble/porting/examples/linux/include/sysflash/sysflash.h
+++ b/src/libs/mynewt-nimble/porting/examples/linux/include/sysflash/sysflash.h
@@ -1,5 +1,5 @@
/**
- * This file was generated by Apache newt version: 1.8.0-dev
+ * This file was generated by Apache newt version: 1.9.0-dev
*/
#ifndef H_MYNEWT_SYSFLASH_
diff --git a/src/libs/mynewt-nimble/porting/examples/linux_blemesh/ble.c b/src/libs/mynewt-nimble/porting/examples/linux_blemesh/ble.c
index 22a9e71d..deaef5a4 100644
--- a/src/libs/mynewt-nimble/porting/examples/linux_blemesh/ble.c
+++ b/src/libs/mynewt-nimble/porting/examples/linux_blemesh/ble.c
@@ -40,26 +40,6 @@ static int recent_test_id = STANDARD_TEST_ID;
static bool has_reg_fault = true;
-static struct bt_mesh_cfg_srv cfg_srv = {
- .relay = BT_MESH_RELAY_ENABLED,
- .beacon = BT_MESH_BEACON_ENABLED,
-#if MYNEWT_VAL(BLE_MESH_FRIEND)
- .frnd = BT_MESH_FRIEND_ENABLED,
-#else
- .frnd = BT_MESH_FRIEND_NOT_SUPPORTED ,
-#endif
-#if MYNEWT_VAL(BLE_MESH_GATT_PROXY)
- .gatt_proxy = BT_MESH_GATT_PROXY_ENABLED,
-#else
- .gatt_proxy = BT_MESH_GATT_PROXY_NOT_SUPPORTED,
-#endif
- .default_ttl = 7,
-
- /* 3 transmissions with 20ms interval */
- .net_transmit = BT_MESH_TRANSMIT(2, 20),
- .relay_retransmit = BT_MESH_TRANSMIT(2, 20),
-};
-
static int
fault_get_cur(struct bt_mesh_model *model,
uint8_t *test_id,
@@ -323,7 +303,7 @@ static const struct bt_mesh_model_op gen_level_op[] = {
};
static struct bt_mesh_model root_models[] = {
- BT_MESH_MODEL_CFG_SRV(&cfg_srv),
+ BT_MESH_MODEL_CFG_SRV,
BT_MESH_MODEL_HEALTH_SRV(&health_srv, &health_pub),
BT_MESH_MODEL(BT_MESH_MODEL_ID_GEN_ONOFF_SRV, gen_onoff_op,
&gen_onoff_pub, NULL),
@@ -381,7 +361,7 @@ static int output_number(bt_mesh_output_action_t action, uint32_t number)
return 0;
}
-static void prov_complete(u16_t net_idx, u16_t addr)
+static void prov_complete(uint16_t net_idx, uint16_t addr)
{
console_printf("Local node provisioned, primary address 0x%04x\n", addr);
}
diff --git a/src/libs/mynewt-nimble/porting/examples/linux_blemesh/include/logcfg/logcfg.h b/src/libs/mynewt-nimble/porting/examples/linux_blemesh/include/logcfg/logcfg.h
index 7404dbb4..798418da 100644
--- a/src/libs/mynewt-nimble/porting/examples/linux_blemesh/include/logcfg/logcfg.h
+++ b/src/libs/mynewt-nimble/porting/examples/linux_blemesh/include/logcfg/logcfg.h
@@ -1,5 +1,5 @@
/**
- * This file was generated by Apache newt version: 1.8.0-dev
+ * This file was generated by Apache newt version: 1.9.0-dev
*/
#ifndef H_MYNEWT_LOGCFG_
@@ -106,6 +106,34 @@
#define BLE_MESH_TRANS_LOG_CRITICAL(...) MODLOG_CRITICAL(21, __VA_ARGS__)
#define BLE_MESH_TRANS_LOG_DISABLED(...) MODLOG_DISABLED(21, __VA_ARGS__)
+#define BLE_MESH_RPL_LOG_DEBUG(...) IGNORE(__VA_ARGS__)
+#define BLE_MESH_RPL_LOG_INFO(...) MODLOG_INFO(22, __VA_ARGS__)
+#define BLE_MESH_RPL_LOG_WARN(...) MODLOG_WARN(22, __VA_ARGS__)
+#define BLE_MESH_RPL_LOG_ERROR(...) MODLOG_ERROR(22, __VA_ARGS__)
+#define BLE_MESH_RPL_LOG_CRITICAL(...) MODLOG_CRITICAL(22, __VA_ARGS__)
+#define BLE_MESH_RPL_LOG_DISABLED(...) MODLOG_DISABLED(22, __VA_ARGS__)
+
+#define BLE_MESH_NET_KEYS_LOG_DEBUG(...) IGNORE(__VA_ARGS__)
+#define BLE_MESH_NET_KEYS_LOG_INFO(...) MODLOG_INFO(23, __VA_ARGS__)
+#define BLE_MESH_NET_KEYS_LOG_WARN(...) MODLOG_WARN(23, __VA_ARGS__)
+#define BLE_MESH_NET_KEYS_LOG_ERROR(...) MODLOG_ERROR(23, __VA_ARGS__)
+#define BLE_MESH_NET_KEYS_LOG_CRITICAL(...) MODLOG_CRITICAL(23, __VA_ARGS__)
+#define BLE_MESH_NET_KEYS_LOG_DISABLED(...) MODLOG_DISABLED(23, __VA_ARGS__)
+
+#define BLE_MESH_PROV_DEVICE_LOG_DEBUG(...) IGNORE(__VA_ARGS__)
+#define BLE_MESH_PROV_DEVICE_LOG_INFO(...) MODLOG_INFO(24, __VA_ARGS__)
+#define BLE_MESH_PROV_DEVICE_LOG_WARN(...) MODLOG_WARN(24, __VA_ARGS__)
+#define BLE_MESH_PROV_DEVICE_LOG_ERROR(...) MODLOG_ERROR(24, __VA_ARGS__)
+#define BLE_MESH_PROV_DEVICE_LOG_CRITICAL(...) MODLOG_CRITICAL(24, __VA_ARGS__)
+#define BLE_MESH_PROV_DEVICE_LOG_DISABLED(...) MODLOG_DISABLED(24, __VA_ARGS__)
+
+#define BLE_MESH_HEARTBEAT_LOG_DEBUG(...) IGNORE(__VA_ARGS__)
+#define BLE_MESH_HEARTBEAT_LOG_INFO(...) MODLOG_INFO(25, __VA_ARGS__)
+#define BLE_MESH_HEARTBEAT_LOG_WARN(...) MODLOG_WARN(25, __VA_ARGS__)
+#define BLE_MESH_HEARTBEAT_LOG_ERROR(...) MODLOG_ERROR(25, __VA_ARGS__)
+#define BLE_MESH_HEARTBEAT_LOG_CRITICAL(...) MODLOG_CRITICAL(25, __VA_ARGS__)
+#define BLE_MESH_HEARTBEAT_LOG_DISABLED(...) MODLOG_DISABLED(25, __VA_ARGS__)
+
#define DFLT_LOG_DEBUG(...) IGNORE(__VA_ARGS__)
#define DFLT_LOG_INFO(...) MODLOG_INFO(0, __VA_ARGS__)
#define DFLT_LOG_WARN(...) MODLOG_WARN(0, __VA_ARGS__)
diff --git a/src/libs/mynewt-nimble/porting/examples/linux_blemesh/include/syscfg/syscfg.h b/src/libs/mynewt-nimble/porting/examples/linux_blemesh/include/syscfg/syscfg.h
index 24ad0c58..9aac1068 100644
--- a/src/libs/mynewt-nimble/porting/examples/linux_blemesh/include/syscfg/syscfg.h
+++ b/src/libs/mynewt-nimble/porting/examples/linux_blemesh/include/syscfg/syscfg.h
@@ -1,5 +1,5 @@
/**
- * This file was generated by Apache newt version: 1.8.0-dev
+ * This file was generated by Apache newt version: 1.9.0-dev
*/
#ifndef H_MYNEWT_SYSCFG_
@@ -15,8 +15,6 @@
#define MYNEWT_VAL(_name) MYNEWT_VAL_ ## _name
#define MYNEWT_VAL_CHOICE(_name, _val) MYNEWT_VAL_ ## _name ## __ ## _val
-
-
/*** @apache-mynewt-core/crypto/tinycrypt */
#ifndef MYNEWT_VAL_TINYCRYPT_SYSINIT_STAGE
#define MYNEWT_VAL_TINYCRYPT_SYSINIT_STAGE (200)
@@ -56,7 +54,7 @@
#define MYNEWT_VAL_FLOAT_USER (0)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-core/kernel/os) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/linux_blemesh (defined by @apache-mynewt-core/kernel/os) */
#ifndef MYNEWT_VAL_MSYS_1_BLOCK_COUNT
#define MYNEWT_VAL_MSYS_1_BLOCK_COUNT (80)
#endif
@@ -298,7 +296,7 @@
#define MYNEWT_VAL_LOG_FCB_SLOT1 (0)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-core/sys/log/stub) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/linux_blemesh (defined by @apache-mynewt-core/sys/log/stub) */
#ifndef MYNEWT_VAL_LOG_LEVEL
#define MYNEWT_VAL_LOG_LEVEL (0)
#endif
@@ -369,6 +367,14 @@
#define MYNEWT_VAL_BLE_EXT_ADV_MAX_SIZE (31)
#endif
+#ifndef MYNEWT_VAL_BLE_ISO
+#define MYNEWT_VAL_BLE_ISO (0)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_ISO_TEST
+#define MYNEWT_VAL_BLE_ISO_TEST (0)
+#endif
+
#ifndef MYNEWT_VAL_BLE_MAX_CONNECTIONS
#define MYNEWT_VAL_BLE_MAX_CONNECTIONS (1)
#endif
@@ -650,7 +656,7 @@
#define MYNEWT_VAL_BLE_L2CAP_SIG_MAX_PROCS (1)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host) */
#ifndef MYNEWT_VAL_BLE_MESH
#define MYNEWT_VAL_BLE_MESH (1)
#endif
@@ -757,7 +763,7 @@
#define MYNEWT_VAL_BLE_MESH_ACCESS_LOG_MOD (10)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
#ifndef MYNEWT_VAL_BLE_MESH_ADV_BUF_COUNT
#define MYNEWT_VAL_BLE_MESH_ADV_BUF_COUNT (20)
#endif
@@ -774,7 +780,7 @@
#define MYNEWT_VAL_BLE_MESH_ADV_TASK_PRIO (9)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
#ifndef MYNEWT_VAL_BLE_MESH_APP_KEY_COUNT
#define MYNEWT_VAL_BLE_MESH_APP_KEY_COUNT (4)
#endif
@@ -787,7 +793,7 @@
#define MYNEWT_VAL_BLE_MESH_BEACON_LOG_MOD (12)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
#ifndef MYNEWT_VAL_BLE_MESH_CFG_CLI
#define MYNEWT_VAL_BLE_MESH_CFG_CLI (1)
#endif
@@ -812,7 +818,7 @@
#define MYNEWT_VAL_BLE_MESH_DEV_UUID (((uint8_t[16]){0x11, 0x22, 0}))
#endif
-/* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
#ifndef MYNEWT_VAL_BLE_MESH_FRIEND
#define MYNEWT_VAL_BLE_MESH_FRIEND (1)
#endif
@@ -845,7 +851,7 @@
#define MYNEWT_VAL_BLE_MESH_FRIEND_SUB_LIST_SIZE (3)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
#ifndef MYNEWT_VAL_BLE_MESH_GATT_PROXY
#define MYNEWT_VAL_BLE_MESH_GATT_PROXY (1)
#endif
@@ -858,12 +864,12 @@
#define MYNEWT_VAL_BLE_MESH_IVU_DIVIDER (4)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
#ifndef MYNEWT_VAL_BLE_MESH_IV_UPDATE_TEST
#define MYNEWT_VAL_BLE_MESH_IV_UPDATE_TEST (1)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
#ifndef MYNEWT_VAL_BLE_MESH_LABEL_COUNT
#define MYNEWT_VAL_BLE_MESH_LABEL_COUNT (2)
#endif
@@ -876,7 +882,7 @@
#define MYNEWT_VAL_BLE_MESH_LOG_MOD (9)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
#ifndef MYNEWT_VAL_BLE_MESH_LOW_POWER
#define MYNEWT_VAL_BLE_MESH_LOW_POWER (1)
#endif
@@ -889,7 +895,7 @@
#define MYNEWT_VAL_BLE_MESH_LOW_POWER_LOG_MOD (15)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
#ifndef MYNEWT_VAL_BLE_MESH_LPN_AUTO
#define MYNEWT_VAL_BLE_MESH_LPN_AUTO (0)
#endif
@@ -906,6 +912,10 @@
#define MYNEWT_VAL_BLE_MESH_LPN_GROUPS (10)
#endif
+#ifndef MYNEWT_VAL_BLE_MESH_LPN_SUB_ALL_NODES_ADDR
+#define MYNEWT_VAL_BLE_MESH_LPN_SUB_ALL_NODES_ADDR (1)
+#endif
+
#ifndef MYNEWT_VAL_BLE_MESH_LPN_INIT_POLL_TIMEOUT
#define MYNEWT_VAL_BLE_MESH_LPN_INIT_POLL_TIMEOUT (MYNEWT_VAL_BLE_MESH_LPN_POLL_TIMEOUT)
#endif
@@ -942,7 +952,7 @@
#define MYNEWT_VAL_BLE_MESH_MODEL_EXTENSIONS (0)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
#ifndef MYNEWT_VAL_BLE_MESH_MODEL_GROUP_COUNT
#define MYNEWT_VAL_BLE_MESH_MODEL_GROUP_COUNT (2)
#endif
@@ -995,17 +1005,17 @@
#define MYNEWT_VAL_BLE_MESH_OOB_OUTPUT_SIZE (4)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
#ifndef MYNEWT_VAL_BLE_MESH_PB_ADV
#define MYNEWT_VAL_BLE_MESH_PB_ADV (1)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
#ifndef MYNEWT_VAL_BLE_MESH_PB_GATT
#define MYNEWT_VAL_BLE_MESH_PB_GATT (1)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
#ifndef MYNEWT_VAL_BLE_MESH_PROV
#define MYNEWT_VAL_BLE_MESH_PROV (1)
#endif
@@ -1014,6 +1024,22 @@
#define MYNEWT_VAL_BLE_MESH_PROVISIONER (0)
#endif
+#ifndef MYNEWT_VAL_BLE_MESH_CDB
+#define MYNEWT_VAL_BLE_MESH_CDB (0)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_MESH_CDB_SUBNET_COUNT
+#define MYNEWT_VAL_BLE_MESH_CDB_SUBNET_COUNT (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_MESH_CDB_NODE_COUNT
+#define MYNEWT_VAL_BLE_MESH_CDB_NODE_COUNT (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_MESH_CDB_APP_KEY_COUNT
+#define MYNEWT_VAL_BLE_MESH_CDB_APP_KEY_COUNT (1)
+#endif
+
#ifndef MYNEWT_VAL_BLE_MESH_PROV_LOG_LVL
#define MYNEWT_VAL_BLE_MESH_PROV_LOG_LVL (1)
#endif
@@ -1039,7 +1065,7 @@
#define MYNEWT_VAL_BLE_MESH_PROXY_LOG_MOD (19)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
#ifndef MYNEWT_VAL_BLE_MESH_RELAY
#define MYNEWT_VAL_BLE_MESH_RELAY (1)
#endif
@@ -1048,8 +1074,12 @@
#define MYNEWT_VAL_BLE_MESH_RPL_STORE_TIMEOUT (5)
#endif
-#ifndef MYNEWT_VAL_BLE_MESH_RX_SDU_MAX
-#define MYNEWT_VAL_BLE_MESH_RX_SDU_MAX (72)
+#ifndef MYNEWT_VAL_BLE_MESH_SEG_BUFS
+#define MYNEWT_VAL_BLE_MESH_SEG_BUFS (72)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_MESH_RX_SEG_MAX
+#define MYNEWT_VAL_BLE_MESH_RX_SEG_MAX (3)
#endif
#ifndef MYNEWT_VAL_BLE_MESH_RX_SEG_MSG_COUNT
@@ -1064,7 +1094,7 @@
#define MYNEWT_VAL_BLE_MESH_SEQ_STORE_RATE (128)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
#ifndef MYNEWT_VAL_BLE_MESH_SETTINGS
#define MYNEWT_VAL_BLE_MESH_SETTINGS (0)
#endif
@@ -1077,7 +1107,7 @@
#define MYNEWT_VAL_BLE_MESH_SETTINGS_LOG_MOD (20)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
#ifndef MYNEWT_VAL_BLE_MESH_SHELL
#define MYNEWT_VAL_BLE_MESH_SHELL (0)
#endif
@@ -1090,7 +1120,7 @@
#define MYNEWT_VAL_BLE_MESH_STORE_TIMEOUT (2)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
#ifndef MYNEWT_VAL_BLE_MESH_SUBNET_COUNT
#define MYNEWT_VAL_BLE_MESH_SUBNET_COUNT (2)
#endif
@@ -1103,7 +1133,7 @@
#define MYNEWT_VAL_BLE_MESH_SYSINIT_STAGE_SHELL (1000)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
#ifndef MYNEWT_VAL_BLE_MESH_TESTING
#define MYNEWT_VAL_BLE_MESH_TESTING (1)
#endif
@@ -1116,15 +1146,88 @@
#define MYNEWT_VAL_BLE_MESH_TRANS_LOG_MOD (21)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
+#ifndef MYNEWT_VAL_BLE_MESH_RPL_LOG_LVL
+#define MYNEWT_VAL_BLE_MESH_RPL_LOG_LVL (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_MESH_RPL_LOG_MOD
+#define MYNEWT_VAL_BLE_MESH_RPL_LOG_MOD (22)
+#endif
+
+/* Overridden by @apache-mynewt-nimble/porting/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */
#ifndef MYNEWT_VAL_BLE_MESH_TX_SEG_MAX
#define MYNEWT_VAL_BLE_MESH_TX_SEG_MAX (6)
#endif
+#ifndef MYNEWT_VAL_BLE_MESH_RX_SEG_MSG_COUNT
+#define MYNEWT_VAL_BLE_MESH_RX_SEG_MSG_COUNT (3)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_MESH_UNPROV_BEACON_INT
+#define MYNEWT_VAL_BLE_MESH_UNPROV_BEACON_INT (5)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_MESH_PB_ADV_RETRANS_TIMEOUT
+#define MYNEWT_VAL_BLE_MESH_PB_ADV_RETRANS_TIMEOUT (500)
+#endif
+
#ifndef MYNEWT_VAL_BLE_MESH_TX_SEG_MSG_COUNT
#define MYNEWT_VAL_BLE_MESH_TX_SEG_MSG_COUNT (4)
#endif
+#ifndef MYNEWT_VAL_BLE_MESH_TX_SEG_RETRANS_COUNT
+#define MYNEWT_VAL_BLE_MESH_TX_SEG_RETRANS_COUNT (4)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_MESH_TX_SEG_RETRANS_TIMEOUT_UNICAST
+#define MYNEWT_VAL_BLE_MESH_TX_SEG_RETRANS_TIMEOUT_UNICAST (400)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_MESH_TX_SEG_RETRANS_TIMEOUT_GROUP
+#define MYNEWT_VAL_BLE_MESH_TX_SEG_RETRANS_TIMEOUT_GROUP (50)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_MESH_LOOPBACK_BUFS
+#define MYNEWT_VAL_BLE_MESH_LOOPBACK_BUFS (3)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_MESH_DEFAULT_TTL
+#define MYNEWT_VAL_BLE_MESH_DEFAULT_TTL (7)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_MESH_NETWORK_TRANSMIT_COUNT
+#define MYNEWT_VAL_BLE_MESH_NETWORK_TRANSMIT_COUNT (2)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_MESH_NETWORK_TRANSMIT_INTERVAL
+#define MYNEWT_VAL_BLE_MESH_NETWORK_TRANSMIT_INTERVAL (20)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_MESH_RELAY_RETRANSMIT_COUNT
+#define MYNEWT_VAL_BLE_MESH_RELAY_RETRANSMIT_COUNT (2)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_MESH_BEACON_ENABLED
+#define MYNEWT_VAL_BLE_MESH_BEACON_ENABLED (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_MESH_GATT_PROXY_ENABLED
+#define MYNEWT_VAL_BLE_MESH_GATT_PROXY_ENABLED (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_MESH_FRIEND_ENABLED
+#define MYNEWT_VAL_BLE_MESH_FRIEND_ENABLED (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_MESH_RELAY_ENABLED
+#define MYNEWT_VAL_BLE_MESH_RELAY_ENABLED (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_MESH_RELAY_RETRANSMIT_INTERVAL
+#define MYNEWT_VAL_BLE_MESH_RELAY_RETRANSMIT_INTERVAL (20)
+#endif
+
/*** @apache-mynewt-nimble/nimble/host/services/ans */
#ifndef MYNEWT_VAL_BLE_SVC_ANS_NEW_ALERT_CAT
#define MYNEWT_VAL_BLE_SVC_ANS_NEW_ALERT_CAT (0)
@@ -1325,12 +1428,12 @@
#define MYNEWT_VAL_BLE_SOCK_LINUX_DEV (0)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/transport/socket) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/transport/socket) */
#ifndef MYNEWT_VAL_BLE_SOCK_STACK_SIZE
#define MYNEWT_VAL_BLE_SOCK_STACK_SIZE (1028)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/transport/socket) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/transport/socket) */
#ifndef MYNEWT_VAL_BLE_SOCK_TASK_PRIO
#define MYNEWT_VAL_BLE_SOCK_TASK_PRIO (3)
#endif
@@ -1339,12 +1442,12 @@
#define MYNEWT_VAL_BLE_SOCK_TCP_PORT (14433)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/transport/socket) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/transport/socket) */
#ifndef MYNEWT_VAL_BLE_SOCK_USE_LINUX_BLUE
#define MYNEWT_VAL_BLE_SOCK_USE_LINUX_BLUE (1)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/transport/socket) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/transport/socket) */
#ifndef MYNEWT_VAL_BLE_SOCK_USE_TCP
#define MYNEWT_VAL_BLE_SOCK_USE_TCP (0)
#endif
diff --git a/src/libs/mynewt-nimble/porting/examples/linux_blemesh/include/sysflash/sysflash.h b/src/libs/mynewt-nimble/porting/examples/linux_blemesh/include/sysflash/sysflash.h
index 413cb267..ab1341b2 100644
--- a/src/libs/mynewt-nimble/porting/examples/linux_blemesh/include/sysflash/sysflash.h
+++ b/src/libs/mynewt-nimble/porting/examples/linux_blemesh/include/sysflash/sysflash.h
@@ -1,5 +1,5 @@
/**
- * This file was generated by Apache newt version: 1.8.0-dev
+ * This file was generated by Apache newt version: 1.9.0-dev
*/
#ifndef H_MYNEWT_SYSFLASH_
diff --git a/src/libs/mynewt-nimble/porting/examples/nuttx/Make.defs b/src/libs/mynewt-nimble/porting/examples/nuttx/Make.defs
new file mode 100644
index 00000000..f35d428e
--- /dev/null
+++ b/src/libs/mynewt-nimble/porting/examples/nuttx/Make.defs
@@ -0,0 +1,58 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+# * http://www.apache.org/licenses/LICENSE-2.0
+# * Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# Configure NimBLE variables
+NIMBLE_CFG_TINYCRYPT := 1
+
+# Skip files that don't build for this port
+NIMBLE_IGNORE := $(NIMBLE_ROOT)/porting/nimble/src/hal_timer.c \
+ $(NIMBLE_ROOT)/porting/nimble/src/os_cputime.c \
+ $(NIMBLE_ROOT)/porting/nimble/src/os_cputime_pwr2.c
+
+include $(NIMBLE_ROOT)/porting/nimble/Makefile.defs
+
+CSRCS := $(NIMBLE_SRC)
+
+# Source files for NPL OSAL
+CSRCS += \
+ $(wildcard $(NIMBLE_ROOT)/porting/npl/nuttx/src/*.c) \
+ $(wildcard $(NIMBLE_ROOT)/nimble/transport/socket/src/*.c) \
+ $(TINYCRYPT_SRC)
+
+# Source files for demo app
+CSRCS += $(NIMBLE_ROOT)/porting/examples/nuttx/ble.c
+
+MAINSRC = $(NIMBLE_ROOT)/porting/examples/nuttx/main.c
+
+# Add NPL and all NimBLE directories to include paths
+INC = \
+ $(wildcard $(NIMBLE_ROOT)/porting/examples/nuttx/include) \
+ $(NIMBLE_ROOT)/porting/npl/nuttx/include \
+ $(NIMBLE_ROOT)/nimble/transport/socket/include \
+ $(NIMBLE_INCLUDE) \
+ $(TINYCRYPT_INCLUDE)
+
+INCLUDES := $(addprefix -I, $(INC))
+
+CFLAGS += \
+ $(NIMBLE_CFLAGS) \
+ $(INCLUDES) \
+ $(TINYCRYPT_CFLAGS) \
+ -DNIMBLE_CFG_CONTROLLER=0 -DOS_CFG_ALIGN_4=4 -DOS_CFG_ALIGNMENT=4 \
+ -Ddefault_RNG_defined=0
+
+PROGNAME=nimble
diff --git a/src/libs/mynewt-nimble/porting/examples/nuttx/ble.c b/src/libs/mynewt-nimble/porting/examples/nuttx/ble.c
new file mode 100644
index 00000000..da7bdecc
--- /dev/null
+++ b/src/libs/mynewt-nimble/porting/examples/nuttx/ble.c
@@ -0,0 +1,118 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include <assert.h>
+#include <stdbool.h>
+#include <stdint.h>
+
+#include "nimble/nimble_port.h"
+#include "host/ble_hs.h"
+#include "host/util/util.h"
+#include "services/gap/ble_svc_gap.h"
+
+static const char gap_name[] = "nimble";
+
+static uint8_t own_addr_type;
+
+static void start_advertise(void);
+
+static void
+put_ad(uint8_t ad_type, uint8_t ad_len, const void *ad, uint8_t *buf,
+ uint8_t *len)
+{
+ buf[(*len)++] = ad_len + 1;
+ buf[(*len)++] = ad_type;
+
+ memcpy(&buf[*len], ad, ad_len);
+
+ *len += ad_len;
+}
+
+static void
+update_ad(void)
+{
+ uint8_t ad[BLE_HS_ADV_MAX_SZ];
+ uint8_t ad_len = 0;
+ uint8_t ad_flags = BLE_HS_ADV_F_DISC_GEN | BLE_HS_ADV_F_BREDR_UNSUP;
+
+ put_ad(BLE_HS_ADV_TYPE_FLAGS, 1, &ad_flags, ad, &ad_len);
+ put_ad(BLE_HS_ADV_TYPE_COMP_NAME, sizeof(gap_name), gap_name, ad, &ad_len);
+
+ ble_gap_adv_set_data(ad, ad_len);
+}
+
+static int
+gap_event_cb(struct ble_gap_event *event, void *arg)
+{
+ switch (event->type) {
+ case BLE_GAP_EVENT_CONNECT:
+ if (event->connect.status) {
+ start_advertise();
+ }
+ break;
+
+ case BLE_GAP_EVENT_DISCONNECT:
+ start_advertise();
+ break;
+ }
+
+ return 0;
+}
+
+static void
+start_advertise(void)
+{
+ struct ble_gap_adv_params advp;
+ int rc;
+
+ printf("advertise\n");
+
+ update_ad();
+
+ memset(&advp, 0, sizeof advp);
+ advp.conn_mode = BLE_GAP_CONN_MODE_UND;
+ advp.disc_mode = BLE_GAP_DISC_MODE_GEN;
+ rc = ble_gap_adv_start(own_addr_type, NULL, BLE_HS_FOREVER,
+ &advp, gap_event_cb, NULL);
+ assert(rc == 0);
+}
+
+static void
+app_ble_sync_cb(void)
+{
+ int rc;
+
+ rc = ble_hs_util_ensure_addr(0);
+ assert(rc == 0);
+
+ rc = ble_hs_id_infer_auto(0, &own_addr_type);
+ assert(rc == 0);
+
+ start_advertise();
+}
+
+void
+nimble_host_task(void *param)
+{
+ ble_hs_cfg.sync_cb = app_ble_sync_cb;
+
+ ble_svc_gap_device_name_set(gap_name);
+
+ nimble_port_run();
+}
diff --git a/src/libs/mynewt-nimble/porting/examples/nuttx/include/logcfg/logcfg.h b/src/libs/mynewt-nimble/porting/examples/nuttx/include/logcfg/logcfg.h
new file mode 100644
index 00000000..837cdeac
--- /dev/null
+++ b/src/libs/mynewt-nimble/porting/examples/nuttx/include/logcfg/logcfg.h
@@ -0,0 +1,32 @@
+/**
+ * This file was generated by Apache newt version: 1.9.0-dev
+ */
+
+#ifndef H_MYNEWT_LOGCFG_
+#define H_MYNEWT_LOGCFG_
+
+#include "modlog/modlog.h"
+#include "log_common/log_common.h"
+
+#define BLE_HS_LOG_DEBUG(...) IGNORE(__VA_ARGS__)
+#define BLE_HS_LOG_INFO(...) MODLOG_INFO(4, __VA_ARGS__)
+#define BLE_HS_LOG_WARN(...) MODLOG_WARN(4, __VA_ARGS__)
+#define BLE_HS_LOG_ERROR(...) MODLOG_ERROR(4, __VA_ARGS__)
+#define BLE_HS_LOG_CRITICAL(...) MODLOG_CRITICAL(4, __VA_ARGS__)
+#define BLE_HS_LOG_DISABLED(...) MODLOG_DISABLED(4, __VA_ARGS__)
+
+#define DFLT_LOG_DEBUG(...) IGNORE(__VA_ARGS__)
+#define DFLT_LOG_INFO(...) MODLOG_INFO(0, __VA_ARGS__)
+#define DFLT_LOG_WARN(...) MODLOG_WARN(0, __VA_ARGS__)
+#define DFLT_LOG_ERROR(...) MODLOG_ERROR(0, __VA_ARGS__)
+#define DFLT_LOG_CRITICAL(...) MODLOG_CRITICAL(0, __VA_ARGS__)
+#define DFLT_LOG_DISABLED(...) MODLOG_DISABLED(0, __VA_ARGS__)
+
+#define MFG_LOG_DEBUG(...) IGNORE(__VA_ARGS__)
+#define MFG_LOG_INFO(...) IGNORE(__VA_ARGS__)
+#define MFG_LOG_WARN(...) IGNORE(__VA_ARGS__)
+#define MFG_LOG_ERROR(...) IGNORE(__VA_ARGS__)
+#define MFG_LOG_CRITICAL(...) IGNORE(__VA_ARGS__)
+#define MFG_LOG_DISABLED(...) MODLOG_DISABLED(128, __VA_ARGS__)
+
+#endif
diff --git a/src/libs/mynewt-nimble/porting/examples/nuttx/include/syscfg/syscfg.h b/src/libs/mynewt-nimble/porting/examples/nuttx/include/syscfg/syscfg.h
new file mode 100644
index 00000000..ff73312e
--- /dev/null
+++ b/src/libs/mynewt-nimble/porting/examples/nuttx/include/syscfg/syscfg.h
@@ -0,0 +1,1074 @@
+/**
+ * This file was generated by Apache newt version: 1.9.0-dev
+ */
+
+#ifndef H_MYNEWT_SYSCFG_
+#define H_MYNEWT_SYSCFG_
+
+/**
+ * This macro exists to ensure code includes this header when needed. If code
+ * checks the existence of a setting directly via ifdef without including this
+ * header, the setting macro will silently evaluate to 0. In contrast, an
+ * attempt to use these macros without including this header will result in a
+ * compiler error.
+ */
+#define MYNEWT_VAL(_name) MYNEWT_VAL_ ## _name
+#define MYNEWT_VAL_CHOICE(_name, _val) MYNEWT_VAL_ ## _name ## __ ## _val
+
+
+/*** Repository @apache-mynewt-core info */
+#ifndef MYNEWT_VAL_REPO_HASH_APACHE_MYNEWT_CORE
+#define MYNEWT_VAL_REPO_HASH_APACHE_MYNEWT_CORE ("4d75fc41bd7ead84638ebbfad4841d5effb296dd")
+#endif
+
+#ifndef MYNEWT_VAL_REPO_VERSION_APACHE_MYNEWT_CORE
+#define MYNEWT_VAL_REPO_VERSION_APACHE_MYNEWT_CORE ("0.0.1")
+#endif
+
+/*** Repository @apache-mynewt-mcumgr info */
+#ifndef MYNEWT_VAL_REPO_HASH_APACHE_MYNEWT_MCUMGR
+#define MYNEWT_VAL_REPO_HASH_APACHE_MYNEWT_MCUMGR ("8d087a7e0e5485394419d10051606c92d68d2111")
+#endif
+
+#ifndef MYNEWT_VAL_REPO_VERSION_APACHE_MYNEWT_MCUMGR
+#define MYNEWT_VAL_REPO_VERSION_APACHE_MYNEWT_MCUMGR ("0.0.0")
+#endif
+
+/*** Repository @apache-mynewt-nimble info */
+#ifndef MYNEWT_VAL_REPO_HASH_APACHE_MYNEWT_NIMBLE
+#define MYNEWT_VAL_REPO_HASH_APACHE_MYNEWT_NIMBLE ("37dceb35df57ff41a6c31f79290512df2fde7064")
+#endif
+
+#ifndef MYNEWT_VAL_REPO_VERSION_APACHE_MYNEWT_NIMBLE
+#define MYNEWT_VAL_REPO_VERSION_APACHE_MYNEWT_NIMBLE ("0.0.0")
+#endif
+
+/*** Repository @mcuboot info */
+#ifndef MYNEWT_VAL_REPO_HASH_MCUBOOT
+#define MYNEWT_VAL_REPO_HASH_MCUBOOT ("03d96ad1f6dd77d47ffca72ade9377acb8559115-dirty")
+#endif
+
+#ifndef MYNEWT_VAL_REPO_VERSION_MCUBOOT
+#define MYNEWT_VAL_REPO_VERSION_MCUBOOT ("0.0.0")
+#endif
+
+/*** Repository @my_project info */
+#ifndef MYNEWT_VAL_REPO_HASH_MY_PROJECT
+#define MYNEWT_VAL_REPO_HASH_MY_PROJECT ("37dceb35df57ff41a6c31f79290512df2fde7064")
+#endif
+
+#ifndef MYNEWT_VAL_REPO_VERSION_MY_PROJECT
+#define MYNEWT_VAL_REPO_VERSION_MY_PROJECT ("0.0.0")
+#endif
+
+
+
+/*** @apache-mynewt-core/crypto/tinycrypt */
+#ifndef MYNEWT_VAL_TINYCRYPT_SYSINIT_STAGE
+#define MYNEWT_VAL_TINYCRYPT_SYSINIT_STAGE (200)
+#endif
+
+#ifndef MYNEWT_VAL_TINYCRYPT_UECC_RNG_TRNG_DEV_NAME
+#define MYNEWT_VAL_TINYCRYPT_UECC_RNG_TRNG_DEV_NAME ("trng")
+#endif
+
+#ifndef MYNEWT_VAL_TINYCRYPT_UECC_RNG_USE_TRNG
+#define MYNEWT_VAL_TINYCRYPT_UECC_RNG_USE_TRNG (0)
+#endif
+
+/*** @apache-mynewt-core/hw/hal */
+#ifndef MYNEWT_VAL_HAL_ENABLE_SOFTWARE_BREAKPOINTS
+#define MYNEWT_VAL_HAL_ENABLE_SOFTWARE_BREAKPOINTS (1)
+#endif
+
+#ifndef MYNEWT_VAL_HAL_FLASH_VERIFY_BUF_SZ
+#define MYNEWT_VAL_HAL_FLASH_VERIFY_BUF_SZ (16)
+#endif
+
+#ifndef MYNEWT_VAL_HAL_FLASH_VERIFY_ERASES
+#define MYNEWT_VAL_HAL_FLASH_VERIFY_ERASES (0)
+#endif
+
+#ifndef MYNEWT_VAL_HAL_FLASH_VERIFY_WRITES
+#define MYNEWT_VAL_HAL_FLASH_VERIFY_WRITES (0)
+#endif
+
+#ifndef MYNEWT_VAL_HAL_SYSTEM_RESET_CB
+#define MYNEWT_VAL_HAL_SYSTEM_RESET_CB (0)
+#endif
+
+/*** @apache-mynewt-core/kernel/os */
+#ifndef MYNEWT_VAL_FLOAT_USER
+#define MYNEWT_VAL_FLOAT_USER (0)
+#endif
+
+#ifndef MYNEWT_VAL_MSYS_1_BLOCK_COUNT
+#define MYNEWT_VAL_MSYS_1_BLOCK_COUNT (12)
+#endif
+
+#ifndef MYNEWT_VAL_MSYS_1_BLOCK_SIZE
+#define MYNEWT_VAL_MSYS_1_BLOCK_SIZE (292)
+#endif
+
+#ifndef MYNEWT_VAL_MSYS_1_SANITY_MIN_COUNT
+#define MYNEWT_VAL_MSYS_1_SANITY_MIN_COUNT (0)
+#endif
+
+#ifndef MYNEWT_VAL_MSYS_2_BLOCK_COUNT
+#define MYNEWT_VAL_MSYS_2_BLOCK_COUNT (0)
+#endif
+
+#ifndef MYNEWT_VAL_MSYS_2_BLOCK_SIZE
+#define MYNEWT_VAL_MSYS_2_BLOCK_SIZE (0)
+#endif
+
+#ifndef MYNEWT_VAL_MSYS_2_SANITY_MIN_COUNT
+#define MYNEWT_VAL_MSYS_2_SANITY_MIN_COUNT (0)
+#endif
+
+#ifndef MYNEWT_VAL_MSYS_SANITY_TIMEOUT
+#define MYNEWT_VAL_MSYS_SANITY_TIMEOUT (60000)
+#endif
+
+#ifndef MYNEWT_VAL_OS_ASSERT_CB
+#define MYNEWT_VAL_OS_ASSERT_CB (0)
+#endif
+
+#ifndef MYNEWT_VAL_OS_CLI
+#define MYNEWT_VAL_OS_CLI (0)
+#endif
+
+#ifndef MYNEWT_VAL_OS_COREDUMP
+#define MYNEWT_VAL_OS_COREDUMP (0)
+#endif
+
+#ifndef MYNEWT_VAL_OS_CPUTIME_FREQ
+#define MYNEWT_VAL_OS_CPUTIME_FREQ (1000000)
+#endif
+
+#ifndef MYNEWT_VAL_OS_CPUTIME_TIMER_NUM
+#define MYNEWT_VAL_OS_CPUTIME_TIMER_NUM (0)
+#endif
+
+#ifndef MYNEWT_VAL_OS_CRASH_FILE_LINE
+#define MYNEWT_VAL_OS_CRASH_FILE_LINE (0)
+#endif
+
+#ifndef MYNEWT_VAL_OS_CRASH_LOG
+#define MYNEWT_VAL_OS_CRASH_LOG (0)
+#endif
+
+#ifndef MYNEWT_VAL_OS_CRASH_RESTORE_REGS
+#define MYNEWT_VAL_OS_CRASH_RESTORE_REGS (0)
+#endif
+
+#ifndef MYNEWT_VAL_OS_CRASH_STACKTRACE
+#define MYNEWT_VAL_OS_CRASH_STACKTRACE (0)
+#endif
+
+#ifndef MYNEWT_VAL_OS_CTX_SW_STACK_CHECK
+#define MYNEWT_VAL_OS_CTX_SW_STACK_CHECK (0)
+#endif
+
+#ifndef MYNEWT_VAL_OS_CTX_SW_STACK_GUARD
+#define MYNEWT_VAL_OS_CTX_SW_STACK_GUARD (4)
+#endif
+
+#ifndef MYNEWT_VAL_OS_DEBUG_MODE
+#define MYNEWT_VAL_OS_DEBUG_MODE (0)
+#endif
+
+#ifndef MYNEWT_VAL_OS_EVENTQ_DEBUG
+#define MYNEWT_VAL_OS_EVENTQ_DEBUG (0)
+#endif
+
+#ifndef MYNEWT_VAL_OS_EVENTQ_MONITOR
+#define MYNEWT_VAL_OS_EVENTQ_MONITOR (0)
+#endif
+
+#ifndef MYNEWT_VAL_OS_IDLE_TICKLESS_MS_MAX
+#define MYNEWT_VAL_OS_IDLE_TICKLESS_MS_MAX (600000)
+#endif
+
+#ifndef MYNEWT_VAL_OS_IDLE_TICKLESS_MS_MIN
+#define MYNEWT_VAL_OS_IDLE_TICKLESS_MS_MIN (100)
+#endif
+
+#ifndef MYNEWT_VAL_OS_MAIN_STACK_SIZE
+#define MYNEWT_VAL_OS_MAIN_STACK_SIZE (1024)
+#endif
+
+#ifndef MYNEWT_VAL_OS_MAIN_TASK_PRIO
+#define MYNEWT_VAL_OS_MAIN_TASK_PRIO (127)
+#endif
+
+#ifndef MYNEWT_VAL_OS_MAIN_TASK_SANITY_ITVL_MS
+#define MYNEWT_VAL_OS_MAIN_TASK_SANITY_ITVL_MS (0)
+#endif
+
+#ifndef MYNEWT_VAL_OS_MEMPOOL_CHECK
+#define MYNEWT_VAL_OS_MEMPOOL_CHECK (0)
+#endif
+
+#ifndef MYNEWT_VAL_OS_MEMPOOL_GUARD
+#define MYNEWT_VAL_OS_MEMPOOL_GUARD (0)
+#endif
+
+#ifndef MYNEWT_VAL_OS_MEMPOOL_POISON
+#define MYNEWT_VAL_OS_MEMPOOL_POISON (0)
+#endif
+
+#ifndef MYNEWT_VAL_OS_SCHEDULING
+#define MYNEWT_VAL_OS_SCHEDULING (1)
+#endif
+
+#ifndef MYNEWT_VAL_OS_SYSINIT_STAGE
+#define MYNEWT_VAL_OS_SYSINIT_STAGE (0)
+#endif
+
+#ifndef MYNEWT_VAL_OS_SYSVIEW
+#define MYNEWT_VAL_OS_SYSVIEW (0)
+#endif
+
+#ifndef MYNEWT_VAL_OS_SYSVIEW_TRACE_CALLOUT
+#define MYNEWT_VAL_OS_SYSVIEW_TRACE_CALLOUT (1)
+#endif
+
+#ifndef MYNEWT_VAL_OS_SYSVIEW_TRACE_EVENTQ
+#define MYNEWT_VAL_OS_SYSVIEW_TRACE_EVENTQ (1)
+#endif
+
+#ifndef MYNEWT_VAL_OS_SYSVIEW_TRACE_MBUF
+#define MYNEWT_VAL_OS_SYSVIEW_TRACE_MBUF (0)
+#endif
+
+#ifndef MYNEWT_VAL_OS_SYSVIEW_TRACE_MEMPOOL
+#define MYNEWT_VAL_OS_SYSVIEW_TRACE_MEMPOOL (0)
+#endif
+
+#ifndef MYNEWT_VAL_OS_SYSVIEW_TRACE_MUTEX
+#define MYNEWT_VAL_OS_SYSVIEW_TRACE_MUTEX (1)
+#endif
+
+#ifndef MYNEWT_VAL_OS_SYSVIEW_TRACE_SEM
+#define MYNEWT_VAL_OS_SYSVIEW_TRACE_SEM (1)
+#endif
+
+#ifndef MYNEWT_VAL_OS_TASK_RUN_TIME_CPUTIME
+#define MYNEWT_VAL_OS_TASK_RUN_TIME_CPUTIME (0)
+#endif
+
+#ifndef MYNEWT_VAL_OS_TIME_DEBUG
+#define MYNEWT_VAL_OS_TIME_DEBUG (0)
+#endif
+
+#ifndef MYNEWT_VAL_OS_WATCHDOG_MONITOR
+#define MYNEWT_VAL_OS_WATCHDOG_MONITOR (0)
+#endif
+
+#ifndef MYNEWT_VAL_SANITY_INTERVAL
+#define MYNEWT_VAL_SANITY_INTERVAL (15000)
+#endif
+
+#ifndef MYNEWT_VAL_WATCHDOG_INTERVAL
+#define MYNEWT_VAL_WATCHDOG_INTERVAL (30000)
+#endif
+
+/*** @apache-mynewt-core/sys/console/stub */
+#ifndef MYNEWT_VAL_CONSOLE_UART_BAUD
+#define MYNEWT_VAL_CONSOLE_UART_BAUD (115200)
+#endif
+
+#ifndef MYNEWT_VAL_CONSOLE_UART_DEV
+#define MYNEWT_VAL_CONSOLE_UART_DEV ("uart0")
+#endif
+
+#ifndef MYNEWT_VAL_CONSOLE_UART_FLOW_CONTROL
+#define MYNEWT_VAL_CONSOLE_UART_FLOW_CONTROL (UART_FLOW_CTL_NONE)
+#endif
+
+/*** @apache-mynewt-core/sys/flash_map */
+#ifndef MYNEWT_VAL_FLASH_MAP_MAX_AREAS
+#define MYNEWT_VAL_FLASH_MAP_MAX_AREAS (10)
+#endif
+
+#ifndef MYNEWT_VAL_FLASH_MAP_SYSINIT_STAGE
+#define MYNEWT_VAL_FLASH_MAP_SYSINIT_STAGE (2)
+#endif
+
+/*** @apache-mynewt-core/sys/log/common */
+#ifndef MYNEWT_VAL_DFLT_LOG_LVL
+#define MYNEWT_VAL_DFLT_LOG_LVL (1)
+#endif
+
+#ifndef MYNEWT_VAL_DFLT_LOG_MOD
+#define MYNEWT_VAL_DFLT_LOG_MOD (0)
+#endif
+
+#ifndef MYNEWT_VAL_LOG_GLOBAL_IDX
+#define MYNEWT_VAL_LOG_GLOBAL_IDX (1)
+#endif
+
+/*** @apache-mynewt-core/sys/log/modlog */
+#ifndef MYNEWT_VAL_MODLOG_CONSOLE_DFLT
+#define MYNEWT_VAL_MODLOG_CONSOLE_DFLT (1)
+#endif
+
+#ifndef MYNEWT_VAL_MODLOG_LOG_MACROS
+#define MYNEWT_VAL_MODLOG_LOG_MACROS (0)
+#endif
+
+#ifndef MYNEWT_VAL_MODLOG_MAX_MAPPINGS
+#define MYNEWT_VAL_MODLOG_MAX_MAPPINGS (16)
+#endif
+
+#ifndef MYNEWT_VAL_MODLOG_MAX_PRINTF_LEN
+#define MYNEWT_VAL_MODLOG_MAX_PRINTF_LEN (128)
+#endif
+
+#ifndef MYNEWT_VAL_MODLOG_SYSINIT_STAGE
+#define MYNEWT_VAL_MODLOG_SYSINIT_STAGE (100)
+#endif
+
+/*** @apache-mynewt-core/sys/log/stub */
+#ifndef MYNEWT_VAL_LOG_CONSOLE
+#define MYNEWT_VAL_LOG_CONSOLE (1)
+#endif
+
+#ifndef MYNEWT_VAL_LOG_FCB
+#define MYNEWT_VAL_LOG_FCB (0)
+#endif
+
+#ifndef MYNEWT_VAL_LOG_FCB_SLOT1
+#define MYNEWT_VAL_LOG_FCB_SLOT1 (0)
+#endif
+
+/* Overridden by @apache-mynewt-nimble/porting/targets/nuttx (defined by @apache-mynewt-core/sys/log/stub) */
+#ifndef MYNEWT_VAL_LOG_LEVEL
+#define MYNEWT_VAL_LOG_LEVEL (2)
+#endif
+
+/*** @apache-mynewt-core/sys/mfg */
+#ifndef MYNEWT_VAL_MFG_LOG_LVL
+#define MYNEWT_VAL_MFG_LOG_LVL (15)
+#endif
+
+#ifndef MYNEWT_VAL_MFG_LOG_MODULE
+#define MYNEWT_VAL_MFG_LOG_MODULE (128)
+#endif
+
+#ifndef MYNEWT_VAL_MFG_MAX_MMRS
+#define MYNEWT_VAL_MFG_MAX_MMRS (2)
+#endif
+
+#ifndef MYNEWT_VAL_MFG_SYSINIT_STAGE
+#define MYNEWT_VAL_MFG_SYSINIT_STAGE (100)
+#endif
+
+/*** @apache-mynewt-core/sys/sys */
+#ifndef MYNEWT_VAL_DEBUG_PANIC_ENABLED
+#define MYNEWT_VAL_DEBUG_PANIC_ENABLED (1)
+#endif
+
+/*** @apache-mynewt-core/sys/sysdown */
+#ifndef MYNEWT_VAL_SYSDOWN_CONSTRAIN_DOWN
+#define MYNEWT_VAL_SYSDOWN_CONSTRAIN_DOWN (1)
+#endif
+
+#ifndef MYNEWT_VAL_SYSDOWN_PANIC_FILE_LINE
+#define MYNEWT_VAL_SYSDOWN_PANIC_FILE_LINE (0)
+#endif
+
+#ifndef MYNEWT_VAL_SYSDOWN_PANIC_MESSAGE
+#define MYNEWT_VAL_SYSDOWN_PANIC_MESSAGE (0)
+#endif
+
+#ifndef MYNEWT_VAL_SYSDOWN_TIMEOUT_MS
+#define MYNEWT_VAL_SYSDOWN_TIMEOUT_MS (10000)
+#endif
+
+/*** @apache-mynewt-core/sys/sysinit */
+#ifndef MYNEWT_VAL_SYSINIT_CONSTRAIN_INIT
+#define MYNEWT_VAL_SYSINIT_CONSTRAIN_INIT (1)
+#endif
+
+#ifndef MYNEWT_VAL_SYSINIT_PANIC_FILE_LINE
+#define MYNEWT_VAL_SYSINIT_PANIC_FILE_LINE (0)
+#endif
+
+#ifndef MYNEWT_VAL_SYSINIT_PANIC_MESSAGE
+#define MYNEWT_VAL_SYSINIT_PANIC_MESSAGE (0)
+#endif
+
+/*** @apache-mynewt-core/util/rwlock */
+#ifndef MYNEWT_VAL_RWLOCK_DEBUG
+#define MYNEWT_VAL_RWLOCK_DEBUG (0)
+#endif
+
+/*** @apache-mynewt-nimble/nimble */
+#ifndef MYNEWT_VAL_BLE_EXT_ADV
+#define MYNEWT_VAL_BLE_EXT_ADV (0)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_EXT_ADV_MAX_SIZE
+#define MYNEWT_VAL_BLE_EXT_ADV_MAX_SIZE (31)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_ISO
+#define MYNEWT_VAL_BLE_ISO (0)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_ISO_TEST
+#define MYNEWT_VAL_BLE_ISO_TEST (0)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_MAX_CONNECTIONS
+#define MYNEWT_VAL_BLE_MAX_CONNECTIONS (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_MAX_PERIODIC_SYNCS
+#define MYNEWT_VAL_BLE_MAX_PERIODIC_SYNCS (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_MULTI_ADV_INSTANCES
+#define MYNEWT_VAL_BLE_MULTI_ADV_INSTANCES (0)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_PERIODIC_ADV
+#define MYNEWT_VAL_BLE_PERIODIC_ADV (0)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_PERIODIC_ADV_SYNC_TRANSFER
+#define MYNEWT_VAL_BLE_PERIODIC_ADV_SYNC_TRANSFER (0)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_ROLE_BROADCASTER
+#define MYNEWT_VAL_BLE_ROLE_BROADCASTER (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_ROLE_CENTRAL
+#define MYNEWT_VAL_BLE_ROLE_CENTRAL (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_ROLE_OBSERVER
+#define MYNEWT_VAL_BLE_ROLE_OBSERVER (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_ROLE_PERIPHERAL
+#define MYNEWT_VAL_BLE_ROLE_PERIPHERAL (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_VERSION
+#define MYNEWT_VAL_BLE_VERSION (50)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_WHITELIST
+#define MYNEWT_VAL_BLE_WHITELIST (1)
+#endif
+
+/*** @apache-mynewt-nimble/nimble/host */
+#ifndef MYNEWT_VAL_BLE_ATT_PREFERRED_MTU
+#define MYNEWT_VAL_BLE_ATT_PREFERRED_MTU (256)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_ATT_SVR_FIND_INFO
+#define MYNEWT_VAL_BLE_ATT_SVR_FIND_INFO (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_ATT_SVR_FIND_TYPE
+#define MYNEWT_VAL_BLE_ATT_SVR_FIND_TYPE (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_ATT_SVR_INDICATE
+#define MYNEWT_VAL_BLE_ATT_SVR_INDICATE (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_ATT_SVR_MAX_PREP_ENTRIES
+#define MYNEWT_VAL_BLE_ATT_SVR_MAX_PREP_ENTRIES (64)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_ATT_SVR_NOTIFY
+#define MYNEWT_VAL_BLE_ATT_SVR_NOTIFY (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_ATT_SVR_QUEUED_WRITE
+#define MYNEWT_VAL_BLE_ATT_SVR_QUEUED_WRITE (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_ATT_SVR_QUEUED_WRITE_TMO
+#define MYNEWT_VAL_BLE_ATT_SVR_QUEUED_WRITE_TMO (30000)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_ATT_SVR_READ
+#define MYNEWT_VAL_BLE_ATT_SVR_READ (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_ATT_SVR_READ_BLOB
+#define MYNEWT_VAL_BLE_ATT_SVR_READ_BLOB (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_ATT_SVR_READ_GROUP_TYPE
+#define MYNEWT_VAL_BLE_ATT_SVR_READ_GROUP_TYPE (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_ATT_SVR_READ_MULT
+#define MYNEWT_VAL_BLE_ATT_SVR_READ_MULT (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_ATT_SVR_READ_TYPE
+#define MYNEWT_VAL_BLE_ATT_SVR_READ_TYPE (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_ATT_SVR_SIGNED_WRITE
+#define MYNEWT_VAL_BLE_ATT_SVR_SIGNED_WRITE (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_ATT_SVR_WRITE
+#define MYNEWT_VAL_BLE_ATT_SVR_WRITE (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_ATT_SVR_WRITE_NO_RSP
+#define MYNEWT_VAL_BLE_ATT_SVR_WRITE_NO_RSP (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_GAP_MAX_PENDING_CONN_PARAM_UPDATE
+#define MYNEWT_VAL_BLE_GAP_MAX_PENDING_CONN_PARAM_UPDATE (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_GATT_DISC_ALL_CHRS
+#define MYNEWT_VAL_BLE_GATT_DISC_ALL_CHRS (MYNEWT_VAL_BLE_ROLE_CENTRAL)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_GATT_DISC_ALL_DSCS
+#define MYNEWT_VAL_BLE_GATT_DISC_ALL_DSCS (MYNEWT_VAL_BLE_ROLE_CENTRAL)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_GATT_DISC_ALL_SVCS
+#define MYNEWT_VAL_BLE_GATT_DISC_ALL_SVCS (MYNEWT_VAL_BLE_ROLE_CENTRAL)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_GATT_DISC_CHR_UUID
+#define MYNEWT_VAL_BLE_GATT_DISC_CHR_UUID (MYNEWT_VAL_BLE_ROLE_CENTRAL)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_GATT_DISC_SVC_UUID
+#define MYNEWT_VAL_BLE_GATT_DISC_SVC_UUID (MYNEWT_VAL_BLE_ROLE_CENTRAL)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_GATT_FIND_INC_SVCS
+#define MYNEWT_VAL_BLE_GATT_FIND_INC_SVCS (MYNEWT_VAL_BLE_ROLE_CENTRAL)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_GATT_INDICATE
+#define MYNEWT_VAL_BLE_GATT_INDICATE (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_GATT_MAX_PROCS
+#define MYNEWT_VAL_BLE_GATT_MAX_PROCS (4)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_GATT_NOTIFY
+#define MYNEWT_VAL_BLE_GATT_NOTIFY (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_GATT_READ
+#define MYNEWT_VAL_BLE_GATT_READ (MYNEWT_VAL_BLE_ROLE_CENTRAL)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_GATT_READ_LONG
+#define MYNEWT_VAL_BLE_GATT_READ_LONG (MYNEWT_VAL_BLE_ROLE_CENTRAL)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_GATT_READ_MAX_ATTRS
+#define MYNEWT_VAL_BLE_GATT_READ_MAX_ATTRS (8)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_GATT_READ_MULT
+#define MYNEWT_VAL_BLE_GATT_READ_MULT (MYNEWT_VAL_BLE_ROLE_CENTRAL)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_GATT_READ_UUID
+#define MYNEWT_VAL_BLE_GATT_READ_UUID (MYNEWT_VAL_BLE_ROLE_CENTRAL)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_GATT_RESUME_RATE
+#define MYNEWT_VAL_BLE_GATT_RESUME_RATE (1000)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_GATT_SIGNED_WRITE
+#define MYNEWT_VAL_BLE_GATT_SIGNED_WRITE (MYNEWT_VAL_BLE_ROLE_CENTRAL)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_GATT_WRITE
+#define MYNEWT_VAL_BLE_GATT_WRITE (MYNEWT_VAL_BLE_ROLE_CENTRAL)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_GATT_WRITE_LONG
+#define MYNEWT_VAL_BLE_GATT_WRITE_LONG (MYNEWT_VAL_BLE_ROLE_CENTRAL)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_GATT_WRITE_MAX_ATTRS
+#define MYNEWT_VAL_BLE_GATT_WRITE_MAX_ATTRS (4)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_GATT_WRITE_NO_RSP
+#define MYNEWT_VAL_BLE_GATT_WRITE_NO_RSP (MYNEWT_VAL_BLE_ROLE_CENTRAL)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_GATT_WRITE_RELIABLE
+#define MYNEWT_VAL_BLE_GATT_WRITE_RELIABLE (MYNEWT_VAL_BLE_ROLE_CENTRAL)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_HOST
+#define MYNEWT_VAL_BLE_HOST (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_HS_AUTO_START
+#define MYNEWT_VAL_BLE_HS_AUTO_START (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_HS_DEBUG
+#define MYNEWT_VAL_BLE_HS_DEBUG (0)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_HS_FLOW_CTRL
+#define MYNEWT_VAL_BLE_HS_FLOW_CTRL (0)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_HS_FLOW_CTRL_ITVL
+#define MYNEWT_VAL_BLE_HS_FLOW_CTRL_ITVL (1000)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_HS_FLOW_CTRL_THRESH
+#define MYNEWT_VAL_BLE_HS_FLOW_CTRL_THRESH (2)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_HS_FLOW_CTRL_TX_ON_DISCONNECT
+#define MYNEWT_VAL_BLE_HS_FLOW_CTRL_TX_ON_DISCONNECT (0)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_HS_LOG_LVL
+#define MYNEWT_VAL_BLE_HS_LOG_LVL (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_HS_LOG_MOD
+#define MYNEWT_VAL_BLE_HS_LOG_MOD (4)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_HS_PHONY_HCI_ACKS
+#define MYNEWT_VAL_BLE_HS_PHONY_HCI_ACKS (0)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_HS_REQUIRE_OS
+#define MYNEWT_VAL_BLE_HS_REQUIRE_OS (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_HS_STOP_ON_SHUTDOWN
+#define MYNEWT_VAL_BLE_HS_STOP_ON_SHUTDOWN (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_HS_STOP_ON_SHUTDOWN_TIMEOUT
+#define MYNEWT_VAL_BLE_HS_STOP_ON_SHUTDOWN_TIMEOUT (2000)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_HS_SYSINIT_STAGE
+#define MYNEWT_VAL_BLE_HS_SYSINIT_STAGE (200)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_L2CAP_COC_MAX_NUM
+#define MYNEWT_VAL_BLE_L2CAP_COC_MAX_NUM (0)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_L2CAP_COC_MPS
+#define MYNEWT_VAL_BLE_L2CAP_COC_MPS (MYNEWT_VAL_MSYS_1_BLOCK_SIZE-8)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_L2CAP_ENHANCED_COC
+#define MYNEWT_VAL_BLE_L2CAP_ENHANCED_COC (0)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_L2CAP_JOIN_RX_FRAGS
+#define MYNEWT_VAL_BLE_L2CAP_JOIN_RX_FRAGS (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_L2CAP_MAX_CHANS
+#define MYNEWT_VAL_BLE_L2CAP_MAX_CHANS (3*MYNEWT_VAL_BLE_MAX_CONNECTIONS)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_L2CAP_RX_FRAG_TIMEOUT
+#define MYNEWT_VAL_BLE_L2CAP_RX_FRAG_TIMEOUT (30000)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_L2CAP_SIG_MAX_PROCS
+#define MYNEWT_VAL_BLE_L2CAP_SIG_MAX_PROCS (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_MESH
+#define MYNEWT_VAL_BLE_MESH (0)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_MONITOR_CONSOLE_BUFFER_SIZE
+#define MYNEWT_VAL_BLE_MONITOR_CONSOLE_BUFFER_SIZE (128)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_MONITOR_RTT
+#define MYNEWT_VAL_BLE_MONITOR_RTT (0)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_MONITOR_RTT_BUFFERED
+#define MYNEWT_VAL_BLE_MONITOR_RTT_BUFFERED (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_MONITOR_RTT_BUFFER_NAME
+#define MYNEWT_VAL_BLE_MONITOR_RTT_BUFFER_NAME ("btmonitor")
+#endif
+
+#ifndef MYNEWT_VAL_BLE_MONITOR_RTT_BUFFER_SIZE
+#define MYNEWT_VAL_BLE_MONITOR_RTT_BUFFER_SIZE (256)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_MONITOR_UART
+#define MYNEWT_VAL_BLE_MONITOR_UART (0)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_MONITOR_UART_BAUDRATE
+#define MYNEWT_VAL_BLE_MONITOR_UART_BAUDRATE (1000000)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_MONITOR_UART_BUFFER_SIZE
+#define MYNEWT_VAL_BLE_MONITOR_UART_BUFFER_SIZE (64)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_MONITOR_UART_DEV
+#define MYNEWT_VAL_BLE_MONITOR_UART_DEV ("uart0")
+#endif
+
+#ifndef MYNEWT_VAL_BLE_RPA_TIMEOUT
+#define MYNEWT_VAL_BLE_RPA_TIMEOUT (300)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_SM_BONDING
+#define MYNEWT_VAL_BLE_SM_BONDING (0)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_SM_IO_CAP
+#define MYNEWT_VAL_BLE_SM_IO_CAP (BLE_HS_IO_NO_INPUT_OUTPUT)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_SM_KEYPRESS
+#define MYNEWT_VAL_BLE_SM_KEYPRESS (0)
+#endif
+
+/* Overridden by @apache-mynewt-nimble/porting/targets/nuttx (defined by @apache-mynewt-nimble/nimble/host) */
+#ifndef MYNEWT_VAL_BLE_SM_LEGACY
+#define MYNEWT_VAL_BLE_SM_LEGACY (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_SM_MAX_PROCS
+#define MYNEWT_VAL_BLE_SM_MAX_PROCS (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_SM_MITM
+#define MYNEWT_VAL_BLE_SM_MITM (0)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_SM_OOB_DATA_FLAG
+#define MYNEWT_VAL_BLE_SM_OOB_DATA_FLAG (0)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_SM_OUR_KEY_DIST
+#define MYNEWT_VAL_BLE_SM_OUR_KEY_DIST (0)
+#endif
+
+/* Overridden by @apache-mynewt-nimble/porting/targets/nuttx (defined by @apache-mynewt-nimble/nimble/host) */
+#ifndef MYNEWT_VAL_BLE_SM_SC
+#define MYNEWT_VAL_BLE_SM_SC (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_SM_SC_DEBUG_KEYS
+#define MYNEWT_VAL_BLE_SM_SC_DEBUG_KEYS (0)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_SM_THEIR_KEY_DIST
+#define MYNEWT_VAL_BLE_SM_THEIR_KEY_DIST (0)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_STORE_MAX_BONDS
+#define MYNEWT_VAL_BLE_STORE_MAX_BONDS (3)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_STORE_MAX_CCCDS
+#define MYNEWT_VAL_BLE_STORE_MAX_CCCDS (8)
+#endif
+
+/*** @apache-mynewt-nimble/nimble/host/services/ans */
+#ifndef MYNEWT_VAL_BLE_SVC_ANS_NEW_ALERT_CAT
+#define MYNEWT_VAL_BLE_SVC_ANS_NEW_ALERT_CAT (0)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_SVC_ANS_SYSINIT_STAGE
+#define MYNEWT_VAL_BLE_SVC_ANS_SYSINIT_STAGE (303)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_SVC_ANS_UNR_ALERT_CAT
+#define MYNEWT_VAL_BLE_SVC_ANS_UNR_ALERT_CAT (0)
+#endif
+
+/*** @apache-mynewt-nimble/nimble/host/services/bas */
+#ifndef MYNEWT_VAL_BLE_SVC_BAS_BATTERY_LEVEL_NOTIFY_ENABLE
+#define MYNEWT_VAL_BLE_SVC_BAS_BATTERY_LEVEL_NOTIFY_ENABLE (1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_SVC_BAS_BATTERY_LEVEL_READ_PERM
+#define MYNEWT_VAL_BLE_SVC_BAS_BATTERY_LEVEL_READ_PERM (0)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_SVC_BAS_SYSINIT_STAGE
+#define MYNEWT_VAL_BLE_SVC_BAS_SYSINIT_STAGE (303)
+#endif
+
+/*** @apache-mynewt-nimble/nimble/host/services/dis */
+#ifndef MYNEWT_VAL_BLE_SVC_DIS_DEFAULT_READ_PERM
+#define MYNEWT_VAL_BLE_SVC_DIS_DEFAULT_READ_PERM (-1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_SVC_DIS_FIRMWARE_REVISION_DEFAULT
+#define MYNEWT_VAL_BLE_SVC_DIS_FIRMWARE_REVISION_DEFAULT (NULL)
+#endif
+
+/* Value copied from BLE_SVC_DIS_DEFAULT_READ_PERM */
+#ifndef MYNEWT_VAL_BLE_SVC_DIS_FIRMWARE_REVISION_READ_PERM
+#define MYNEWT_VAL_BLE_SVC_DIS_FIRMWARE_REVISION_READ_PERM (-1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_SVC_DIS_HARDWARE_REVISION_DEFAULT
+#define MYNEWT_VAL_BLE_SVC_DIS_HARDWARE_REVISION_DEFAULT (NULL)
+#endif
+
+/* Value copied from BLE_SVC_DIS_DEFAULT_READ_PERM */
+#ifndef MYNEWT_VAL_BLE_SVC_DIS_HARDWARE_REVISION_READ_PERM
+#define MYNEWT_VAL_BLE_SVC_DIS_HARDWARE_REVISION_READ_PERM (-1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_SVC_DIS_MANUFACTURER_NAME_DEFAULT
+#define MYNEWT_VAL_BLE_SVC_DIS_MANUFACTURER_NAME_DEFAULT (NULL)
+#endif
+
+/* Value copied from BLE_SVC_DIS_DEFAULT_READ_PERM */
+#ifndef MYNEWT_VAL_BLE_SVC_DIS_MANUFACTURER_NAME_READ_PERM
+#define MYNEWT_VAL_BLE_SVC_DIS_MANUFACTURER_NAME_READ_PERM (-1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_SVC_DIS_MODEL_NUMBER_DEFAULT
+#define MYNEWT_VAL_BLE_SVC_DIS_MODEL_NUMBER_DEFAULT ("Apache Mynewt NimBLE")
+#endif
+
+#ifndef MYNEWT_VAL_BLE_SVC_DIS_MODEL_NUMBER_READ_PERM
+#define MYNEWT_VAL_BLE_SVC_DIS_MODEL_NUMBER_READ_PERM (0)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_SVC_DIS_SERIAL_NUMBER_DEFAULT
+#define MYNEWT_VAL_BLE_SVC_DIS_SERIAL_NUMBER_DEFAULT (NULL)
+#endif
+
+/* Value copied from BLE_SVC_DIS_DEFAULT_READ_PERM */
+#ifndef MYNEWT_VAL_BLE_SVC_DIS_SERIAL_NUMBER_READ_PERM
+#define MYNEWT_VAL_BLE_SVC_DIS_SERIAL_NUMBER_READ_PERM (-1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_SVC_DIS_SOFTWARE_REVISION_DEFAULT
+#define MYNEWT_VAL_BLE_SVC_DIS_SOFTWARE_REVISION_DEFAULT (NULL)
+#endif
+
+/* Value copied from BLE_SVC_DIS_DEFAULT_READ_PERM */
+#ifndef MYNEWT_VAL_BLE_SVC_DIS_SOFTWARE_REVISION_READ_PERM
+#define MYNEWT_VAL_BLE_SVC_DIS_SOFTWARE_REVISION_READ_PERM (-1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_SVC_DIS_SYSINIT_STAGE
+#define MYNEWT_VAL_BLE_SVC_DIS_SYSINIT_STAGE (303)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_SVC_DIS_SYSTEM_ID_DEFAULT
+#define MYNEWT_VAL_BLE_SVC_DIS_SYSTEM_ID_DEFAULT (NULL)
+#endif
+
+/* Value copied from BLE_SVC_DIS_DEFAULT_READ_PERM */
+#ifndef MYNEWT_VAL_BLE_SVC_DIS_SYSTEM_ID_READ_PERM
+#define MYNEWT_VAL_BLE_SVC_DIS_SYSTEM_ID_READ_PERM (-1)
+#endif
+
+/*** @apache-mynewt-nimble/nimble/host/services/gap */
+#ifndef MYNEWT_VAL_BLE_SVC_GAP_APPEARANCE
+#define MYNEWT_VAL_BLE_SVC_GAP_APPEARANCE (0)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_SVC_GAP_APPEARANCE_WRITE_PERM
+#define MYNEWT_VAL_BLE_SVC_GAP_APPEARANCE_WRITE_PERM (-1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_SVC_GAP_CENTRAL_ADDRESS_RESOLUTION
+#define MYNEWT_VAL_BLE_SVC_GAP_CENTRAL_ADDRESS_RESOLUTION (-1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_SVC_GAP_DEVICE_NAME
+#define MYNEWT_VAL_BLE_SVC_GAP_DEVICE_NAME ("nimble")
+#endif
+
+#ifndef MYNEWT_VAL_BLE_SVC_GAP_DEVICE_NAME_MAX_LENGTH
+#define MYNEWT_VAL_BLE_SVC_GAP_DEVICE_NAME_MAX_LENGTH (31)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_SVC_GAP_DEVICE_NAME_WRITE_PERM
+#define MYNEWT_VAL_BLE_SVC_GAP_DEVICE_NAME_WRITE_PERM (-1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_SVC_GAP_PPCP_MAX_CONN_INTERVAL
+#define MYNEWT_VAL_BLE_SVC_GAP_PPCP_MAX_CONN_INTERVAL (0)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_SVC_GAP_PPCP_MIN_CONN_INTERVAL
+#define MYNEWT_VAL_BLE_SVC_GAP_PPCP_MIN_CONN_INTERVAL (0)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_SVC_GAP_PPCP_SLAVE_LATENCY
+#define MYNEWT_VAL_BLE_SVC_GAP_PPCP_SLAVE_LATENCY (0)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_SVC_GAP_PPCP_SUPERVISION_TMO
+#define MYNEWT_VAL_BLE_SVC_GAP_PPCP_SUPERVISION_TMO (0)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_SVC_GAP_SYSINIT_STAGE
+#define MYNEWT_VAL_BLE_SVC_GAP_SYSINIT_STAGE (301)
+#endif
+
+/*** @apache-mynewt-nimble/nimble/host/services/gatt */
+#ifndef MYNEWT_VAL_BLE_SVC_GATT_SYSINIT_STAGE
+#define MYNEWT_VAL_BLE_SVC_GATT_SYSINIT_STAGE (302)
+#endif
+
+/*** @apache-mynewt-nimble/nimble/host/services/ias */
+#ifndef MYNEWT_VAL_BLE_SVC_IAS_SYSINIT_STAGE
+#define MYNEWT_VAL_BLE_SVC_IAS_SYSINIT_STAGE (303)
+#endif
+
+/*** @apache-mynewt-nimble/nimble/host/services/ipss */
+#ifndef MYNEWT_VAL_BLE_SVC_IPSS_SYSINIT_STAGE
+#define MYNEWT_VAL_BLE_SVC_IPSS_SYSINIT_STAGE (303)
+#endif
+
+/*** @apache-mynewt-nimble/nimble/host/services/lls */
+#ifndef MYNEWT_VAL_BLE_SVC_LLS_SYSINIT_STAGE
+#define MYNEWT_VAL_BLE_SVC_LLS_SYSINIT_STAGE (303)
+#endif
+
+/*** @apache-mynewt-nimble/nimble/host/services/tps */
+#ifndef MYNEWT_VAL_BLE_SVC_TPS_SYSINIT_STAGE
+#define MYNEWT_VAL_BLE_SVC_TPS_SYSINIT_STAGE (303)
+#endif
+
+/*** @apache-mynewt-nimble/nimble/transport/socket */
+#ifndef MYNEWT_VAL_BLE_ACL_BUF_COUNT
+#define MYNEWT_VAL_BLE_ACL_BUF_COUNT (24)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_ACL_BUF_SIZE
+#define MYNEWT_VAL_BLE_ACL_BUF_SIZE (255)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_HCI_ACL_OUT_COUNT
+#define MYNEWT_VAL_BLE_HCI_ACL_OUT_COUNT (12)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_HCI_EVT_BUF_SIZE
+#define MYNEWT_VAL_BLE_HCI_EVT_BUF_SIZE (70)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_HCI_EVT_HI_BUF_COUNT
+#define MYNEWT_VAL_BLE_HCI_EVT_HI_BUF_COUNT (8)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_HCI_EVT_LO_BUF_COUNT
+#define MYNEWT_VAL_BLE_HCI_EVT_LO_BUF_COUNT (8)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_SOCK_CLI_SYSINIT_STAGE
+#define MYNEWT_VAL_BLE_SOCK_CLI_SYSINIT_STAGE (500)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_SOCK_LINUX_DEV
+#define MYNEWT_VAL_BLE_SOCK_LINUX_DEV (0)
+#endif
+
+/* Overridden by @apache-mynewt-nimble/porting/targets/nuttx (defined by @apache-mynewt-nimble/nimble/transport/socket) */
+#ifndef MYNEWT_VAL_BLE_SOCK_STACK_SIZE
+#define MYNEWT_VAL_BLE_SOCK_STACK_SIZE (1028)
+#endif
+
+/* Overridden by @apache-mynewt-nimble/porting/targets/nuttx (defined by @apache-mynewt-nimble/nimble/transport/socket) */
+#ifndef MYNEWT_VAL_BLE_SOCK_TASK_PRIO
+#define MYNEWT_VAL_BLE_SOCK_TASK_PRIO (3)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_SOCK_TCP_PORT
+#define MYNEWT_VAL_BLE_SOCK_TCP_PORT (14433)
+#endif
+
+/* Overridden by @apache-mynewt-nimble/porting/targets/nuttx (defined by @apache-mynewt-nimble/nimble/transport/socket) */
+#ifndef MYNEWT_VAL_BLE_SOCK_USE_LINUX_BLUE
+#define MYNEWT_VAL_BLE_SOCK_USE_LINUX_BLUE (0)
+#endif
+
+/* Overridden by @apache-mynewt-nimble/porting/targets/nuttx (defined by @apache-mynewt-nimble/nimble/transport/socket) */
+#ifndef MYNEWT_VAL_BLE_SOCK_USE_NUTTX
+#define MYNEWT_VAL_BLE_SOCK_USE_NUTTX (1)
+#endif
+
+/* Overridden by @apache-mynewt-nimble/porting/targets/nuttx (defined by @apache-mynewt-nimble/nimble/transport/socket) */
+#ifndef MYNEWT_VAL_BLE_SOCK_USE_TCP
+#define MYNEWT_VAL_BLE_SOCK_USE_TCP (0)
+#endif
+
+/*** newt */
+#ifndef MYNEWT_VAL_APP_NAME
+#define MYNEWT_VAL_APP_NAME ("dummy_app")
+#endif
+
+#ifndef MYNEWT_VAL_APP_dummy_app
+#define MYNEWT_VAL_APP_dummy_app (1)
+#endif
+
+#ifndef MYNEWT_VAL_ARCH_NAME
+#define MYNEWT_VAL_ARCH_NAME ("dummy")
+#endif
+
+#ifndef MYNEWT_VAL_ARCH_dummy
+#define MYNEWT_VAL_ARCH_dummy (1)
+#endif
+
+#ifndef MYNEWT_VAL_BSP_NAME
+#define MYNEWT_VAL_BSP_NAME ("dummy_bsp")
+#endif
+
+#ifndef MYNEWT_VAL_BSP_dummy_bsp
+#define MYNEWT_VAL_BSP_dummy_bsp (1)
+#endif
+
+#ifndef MYNEWT_VAL_NEWT_FEATURE_LOGCFG
+#define MYNEWT_VAL_NEWT_FEATURE_LOGCFG (1)
+#endif
+
+#ifndef MYNEWT_VAL_NEWT_FEATURE_SYSDOWN
+#define MYNEWT_VAL_NEWT_FEATURE_SYSDOWN (1)
+#endif
+
+#ifndef MYNEWT_VAL_TARGET_NAME
+#define MYNEWT_VAL_TARGET_NAME ("nuttx")
+#endif
+
+#ifndef MYNEWT_VAL_TARGET_nuttx
+#define MYNEWT_VAL_TARGET_nuttx (1)
+#endif
+
+#endif
diff --git a/src/libs/mynewt-nimble/porting/examples/nuttx/include/sysflash/sysflash.h b/src/libs/mynewt-nimble/porting/examples/nuttx/include/sysflash/sysflash.h
new file mode 100644
index 00000000..ab1341b2
--- /dev/null
+++ b/src/libs/mynewt-nimble/porting/examples/nuttx/include/sysflash/sysflash.h
@@ -0,0 +1,24 @@
+/**
+ * This file was generated by Apache newt version: 1.9.0-dev
+ */
+
+#ifndef H_MYNEWT_SYSFLASH_
+#define H_MYNEWT_SYSFLASH_
+
+#include "flash_map/flash_map.h"
+
+/**
+ * This flash map definition is used for two purposes:
+ * 1. To locate the meta area, which contains the true flash map definition.
+ * 2. As a fallback in case the meta area cannot be read from flash.
+ */
+extern const struct flash_area sysflash_map_dflt[6];
+
+#define FLASH_AREA_BOOTLOADER 0
+#define FLASH_AREA_IMAGE_0 1
+#define FLASH_AREA_IMAGE_1 2
+#define FLASH_AREA_IMAGE_SCRATCH 3
+#define FLASH_AREA_REBOOT_LOG 16
+#define FLASH_AREA_NFFS 17
+
+#endif
diff --git a/src/libs/mynewt-nimble/porting/examples/nuttx/main.c b/src/libs/mynewt-nimble/porting/examples/nuttx/main.c
new file mode 100644
index 00000000..acfc9fcd
--- /dev/null
+++ b/src/libs/mynewt-nimble/porting/examples/nuttx/main.c
@@ -0,0 +1,124 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include <nuttx/config.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+
+#include <pthread.h>
+#include "nimble/nimble_npl.h"
+#include "nimble/nimble_port.h"
+
+#include "services/gap/ble_svc_gap.h"
+#include "services/gatt/ble_svc_gatt.h"
+#include "services/ans/ble_svc_ans.h"
+#include "services/ias/ble_svc_ias.h"
+#include "services/lls/ble_svc_lls.h"
+#include "services/tps/ble_svc_tps.h"
+
+static struct ble_npl_task s_task_host;
+static struct ble_npl_task s_task_hci;
+
+void nimble_host_task(void *param);
+void ble_hci_sock_ack_handler(void *param);
+void ble_hci_sock_init(void);
+void ble_hci_sock_set_device(int dev);
+void ble_store_ram_init(void);
+
+#define TASK_DEFAULT_PRIORITY 1
+#define TASK_DEFAULT_STACK NULL
+#define TASK_DEFAULT_STACK_SIZE 400
+
+void *ble_hci_sock_task(void *param)
+{
+ printf("hci sock task\n");
+ ble_hci_sock_ack_handler(param);
+ return NULL;
+}
+
+void *ble_host_task(void *param)
+{
+ printf("host task\n");
+ nimble_host_task(param);
+ return NULL;
+}
+
+int main(int argc, char *argv[])
+{
+ int ret = 0;
+
+ /* allow to specify custom hci */
+ if (argc > 1) {
+ ble_hci_sock_set_device(atoi(argv[1]));
+ }
+
+ printf("hci init\n");
+ ble_hci_sock_init();
+ printf("port init\n");
+ nimble_port_init();
+
+ /* This example provides GATT Alert service */
+ printf("gap init\n");
+ ble_svc_gap_init();
+ printf("gatt init\n");
+ ble_svc_gatt_init();
+ printf("ans init\n");
+ ble_svc_ans_init();
+ printf("ias init\n");
+ ble_svc_ias_init();
+ printf("lls init\n");
+ ble_svc_lls_init();
+ printf("tps init\n");
+ ble_svc_tps_init();
+
+ /* XXX Need to have template for store */
+ ble_store_ram_init();
+
+ printf("hci_sock task init\n");
+ ret = ble_npl_task_init(&s_task_hci, "hci_sock", ble_hci_sock_task,
+ NULL, TASK_DEFAULT_PRIORITY, BLE_NPL_TIME_FOREVER,
+ TASK_DEFAULT_STACK, TASK_DEFAULT_STACK_SIZE);
+
+ if (ret != 0)
+ {
+ fprintf(stderr, "error starting hci task: %i\n", ret);
+ }
+
+ /* Create task which handles default event queue for host stack. */
+ printf("ble_host task init\n");
+ ret = ble_npl_task_init(&s_task_host, "ble_host", ble_host_task,
+ NULL, TASK_DEFAULT_PRIORITY, BLE_NPL_TIME_FOREVER,
+ TASK_DEFAULT_STACK, TASK_DEFAULT_STACK_SIZE);
+
+
+ if (ret != 0)
+ {
+ fprintf(stderr, "error starting ble task: %i\n", ret);
+ }
+
+ while (true)
+ {
+ usleep(100);
+ //pause();
+ }
+ return 0;
+}
diff --git a/src/libs/mynewt-nimble/porting/nimble/Makefile.defs b/src/libs/mynewt-nimble/porting/nimble/Makefile.defs
index ffb531fb..5bab893f 100644
--- a/src/libs/mynewt-nimble/porting/nimble/Makefile.defs
+++ b/src/libs/mynewt-nimble/porting/nimble/Makefile.defs
@@ -30,6 +30,7 @@ NIMBLE_INCLUDE := \
$(NIMBLE_ROOT)/nimble/host/services/gap/include \
$(NIMBLE_ROOT)/nimble/host/services/gatt/include \
$(NIMBLE_ROOT)/nimble/host/services/ias/include \
+ $(NIMBLE_ROOT)/nimble/host/services/dis/include \
$(NIMBLE_ROOT)/nimble/host/services/lls/include \
$(NIMBLE_ROOT)/nimble/host/services/tps/include \
$(NIMBLE_ROOT)/nimble/host/store/ram/include \
@@ -46,6 +47,7 @@ NIMBLE_SRC := \
$(filter-out $(NIMBLE_IGNORE), $(wildcard $(NIMBLE_ROOT)/nimble/host/services/bas/src/*.c)) \
$(filter-out $(NIMBLE_IGNORE), $(wildcard $(NIMBLE_ROOT)/nimble/host/services/gap/src/*.c)) \
$(filter-out $(NIMBLE_IGNORE), $(wildcard $(NIMBLE_ROOT)/nimble/host/services/gatt/src/*.c)) \
+ $(filter-out $(NIMBLE_IGNORE), $(wildcard $(NIMBLE_ROOT)/nimble/host/services/dis/src/*.c)) \
$(filter-out $(NIMBLE_IGNORE), $(wildcard $(NIMBLE_ROOT)/nimble/host/services/ias/src/*.c)) \
$(filter-out $(NIMBLE_IGNORE), $(wildcard $(NIMBLE_ROOT)/nimble/host/services/lls/src/*.c)) \
$(filter-out $(NIMBLE_IGNORE), $(wildcard $(NIMBLE_ROOT)/nimble/host/services/tps/src/*.c)) \
diff --git a/src/libs/mynewt-nimble/porting/nimble/include/log/log.h b/src/libs/mynewt-nimble/porting/nimble/include/log/log.h
index 004667cc..b50c5b17 100644
--- a/src/libs/mynewt-nimble/porting/nimble/include/log/log.h
+++ b/src/libs/mynewt-nimble/porting/nimble/include/log/log.h
@@ -30,11 +30,13 @@ log_dummy(void *log, ...)
(void)log;
}
-#define LOG_DEBUG(_log, _mod, ...) NRF_LOG_DEBUG(## __VA_ARGS__)
+#if MYNEWT
+#define LOG_DEBUG(_log, _mod, ...) log_dummy(_log, ## __VA_ARGS__)
#define LOG_INFO(_log, _mod, ...) log_dummy(_log, ## __VA_ARGS__)
#define LOG_WARN(_log, _mod, ...) log_dummy(_log, ## __VA_ARGS__)
#define LOG_ERROR(_log, _mod, ...) log_dummy(_log, ## __VA_ARGS__)
#define LOG_CRITICAL(_log, _mod, ...) log_dummy(_log, ## __VA_ARGS__)
+#endif
struct log {
};
diff --git a/src/libs/mynewt-nimble/porting/nimble/include/log_common/log_common.h b/src/libs/mynewt-nimble/porting/nimble/include/log_common/log_common.h
index 106d02d7..ed590b6b 100644
--- a/src/libs/mynewt-nimble/porting/nimble/include/log_common/log_common.h
+++ b/src/libs/mynewt-nimble/porting/nimble/include/log_common/log_common.h
@@ -20,20 +20,123 @@
#ifndef H_LOG_COMMON_
#define H_LOG_COMMON_
+#include <stdint.h>
#include "log_common/ignore.h"
#ifdef __cplusplus
extern "C" {
#endif
+struct log;
+
+#define LOG_VERSION_V3 3
+
+#define LOG_TYPE_STREAM (0)
+#define LOG_TYPE_MEMORY (1)
+#define LOG_TYPE_STORAGE (2)
+
#define LOG_LEVEL_DEBUG (0)
#define LOG_LEVEL_INFO (1)
#define LOG_LEVEL_WARN (2)
#define LOG_LEVEL_ERROR (3)
#define LOG_LEVEL_CRITICAL (4)
-/* Up to 7 custom log levels. */
+/* Up to 10 custom log levels. */
#define LOG_LEVEL_MAX (15)
+#define LOG_LEVEL_STR(level) \
+ (LOG_LEVEL_DEBUG == level ? "DEBUG" :\
+ (LOG_LEVEL_INFO == level ? "INFO" :\
+ (LOG_LEVEL_WARN == level ? "WARN" :\
+ (LOG_LEVEL_ERROR == level ? "ERROR" :\
+ (LOG_LEVEL_CRITICAL == level ? "CRITICAL" :\
+ "UNKNOWN")))))
+
+/* XXX: These module IDs are defined for backwards compatibility. Application
+ * code should use the syscfg settings directly. These defines will be removed
+ * in a future release.
+ */
+#define LOG_MODULE_DEFAULT 0
+#define LOG_MODULE_OS 1
+#define LOG_MODULE_NEWTMGR 2
+#define LOG_MODULE_NIMBLE_CTLR 3
+#define LOG_MODULE_NIMBLE_HOST 4
+#define LOG_MODULE_NFFS 5
+#define LOG_MODULE_REBOOT 6
+#define LOG_MODULE_IOTIVITY 7
+#define LOG_MODULE_TEST 8
+
+#define LOG_MODULE_PERUSER 64
+#define LOG_MODULE_MAX (255)
+
+#define LOG_ETYPE_STRING (0)
+#define LOG_ETYPE_CBOR (1)
+#define LOG_ETYPE_BINARY (2)
+
+/* UTC Timestamp for Jan 2016 00:00:00 */
+#define UTC01_01_2016 1451606400
+
+#define LOG_NAME_MAX_LEN (64)
+
+#ifndef MYNEWT_VAL_LOG_LEVEL
+#define LOG_SYSLEVEL ((uint8_t)LOG_LEVEL_MAX)
+#else
+#define LOG_SYSLEVEL ((uint8_t)MYNEWT_VAL_LOG_LEVEL)
+#endif
+
+/**
+ * @brief Determines if a log module will accept an entry with a given level.
+ *
+ * A log entry is only accepted if its level is less than or equal to both:
+ * o Global log level setting (LOG_LEVEL), and
+ * o The specified module log level
+ *
+ * @param mod_level The module's minimum log level.
+ * @param entry_level The level of the entry to be logged.
+ *
+ * @return true if the entry would be logged;
+ * false otherwise.
+ */
+#define LOG_MOD_LEVEL_IS_ACTIVE(mod_level, entry_level) \
+ (LOG_LEVEL <= (entry_level) && (mod_level) <= (entry_level))
+
+/* Newtmgr Log opcodes */
+#define LOGS_NMGR_OP_READ (0)
+#define LOGS_NMGR_OP_CLEAR (1)
+#define LOGS_NMGR_OP_APPEND (2)
+#define LOGS_NMGR_OP_MODULE_LIST (3)
+#define LOGS_NMGR_OP_LEVEL_LIST (4)
+#define LOGS_NMGR_OP_LOGS_LIST (5)
+#define LOGS_NMGR_OP_SET_WATERMARK (6)
+#define LOGS_NMGR_OP_MODLEVEL (8)
+
+#define LOG_PRINTF_MAX_ENTRY_LEN (128)
+
+/* Global log info */
+struct log_info {
+#if MYNEWT_VAL(LOG_GLOBAL_IDX)
+ uint32_t li_next_index;
+#endif
+ uint8_t li_version;
+};
+
+extern struct log_info g_log_info;
+
+/** @typedef log_append_cb
+ * @brief Callback that is executed each time the corresponding log is appended
+ * to.
+ *
+ * @param log The log that was just appended to.
+ * @param idx The index of newly appended log entry.
+ */
+typedef void log_append_cb(struct log *log, uint32_t idx);
+
+/** @typdef log_notify_rotate_cb
+ * @brief Callback that is executed each time we are about to rotate a log.
+ *
+ * @param log The log that is about to rotate
+ */
+typedef void log_notify_rotate_cb(const struct log *log);
+
#ifdef __cplusplus
}
#endif
diff --git a/src/libs/mynewt-nimble/porting/nimble/include/logcfg/logcfg.h b/src/libs/mynewt-nimble/porting/nimble/include/logcfg/logcfg.h
index 983f419f..837cdeac 100644
--- a/src/libs/mynewt-nimble/porting/nimble/include/logcfg/logcfg.h
+++ b/src/libs/mynewt-nimble/porting/nimble/include/logcfg/logcfg.h
@@ -1,5 +1,5 @@
/**
- * This file was generated by Apache newt version: 1.8.0-dev
+ * This file was generated by Apache newt version: 1.9.0-dev
*/
#ifndef H_MYNEWT_LOGCFG_
@@ -7,24 +7,14 @@
#include "modlog/modlog.h"
#include "log_common/log_common.h"
-#include <libraries/log/nrf_log.h>
-#if 1
-#define BLE_HS_LOG_DEBUG(...) NRF_LOG_DEBUG(__VA_ARGS__)
-#define BLE_HS_LOG_INFO(...) NRF_LOG_INFO(__VA_ARGS__)
-#define BLE_HS_LOG_WARN(...) NRF_LOG_WARNING( __VA_ARGS__)
-#define BLE_HS_LOG_ERROR(...) NRF_LOG_ERROR(__VA_ARGS__)
-#define BLE_HS_LOG_CRITICAL(...) NRF_LOG_ERROR(__VA_ARGS__)
-#define BLE_HS_LOG_DISABLED(...) MODLOG_DISABLED(4, __VA_ARGS__)
-#endif
-#if 0
#define BLE_HS_LOG_DEBUG(...) IGNORE(__VA_ARGS__)
#define BLE_HS_LOG_INFO(...) MODLOG_INFO(4, __VA_ARGS__)
#define BLE_HS_LOG_WARN(...) MODLOG_WARN(4, __VA_ARGS__)
#define BLE_HS_LOG_ERROR(...) MODLOG_ERROR(4, __VA_ARGS__)
#define BLE_HS_LOG_CRITICAL(...) MODLOG_CRITICAL(4, __VA_ARGS__)
#define BLE_HS_LOG_DISABLED(...) MODLOG_DISABLED(4, __VA_ARGS__)
-#endif
+
#define DFLT_LOG_DEBUG(...) IGNORE(__VA_ARGS__)
#define DFLT_LOG_INFO(...) MODLOG_INFO(0, __VA_ARGS__)
#define DFLT_LOG_WARN(...) MODLOG_WARN(0, __VA_ARGS__)
diff --git a/src/libs/mynewt-nimble/porting/nimble/include/modlog/modlog.h b/src/libs/mynewt-nimble/porting/nimble/include/modlog/modlog.h
index 29b1e8f0..03904610 100644
--- a/src/libs/mynewt-nimble/porting/nimble/include/modlog/modlog.h
+++ b/src/libs/mynewt-nimble/porting/nimble/include/modlog/modlog.h
@@ -22,6 +22,7 @@
#include <stdio.h>
+#include "log_common/log_common.h"
#include "log/log.h"
#define MODLOG_MODULE_DFLT 255
diff --git a/src/libs/mynewt-nimble/porting/nimble/include/syscfg/syscfg.h b/src/libs/mynewt-nimble/porting/nimble/include/syscfg/syscfg.h
index 6efa3f28..94b72cb6 100644
--- a/src/libs/mynewt-nimble/porting/nimble/include/syscfg/syscfg.h
+++ b/src/libs/mynewt-nimble/porting/nimble/include/syscfg/syscfg.h
@@ -1,5 +1,5 @@
/**
- * This file was generated by Apache newt version: 1.8.0-dev
+ * This file was generated by Apache newt version: 1.9.0-dev
*/
#ifndef H_MYNEWT_SYSCFG_
@@ -15,10 +15,6 @@
#define MYNEWT_VAL(_name) MYNEWT_VAL_ ## _name
#define MYNEWT_VAL_CHOICE(_name, _val) MYNEWT_VAL_ ## _name ## __ ## _val
-#ifndef OS_TICKS_PER_SEC
-#define OS_TICKS_PER_SEC 1024
-#endif
-
/*** @apache-mynewt-core/crypto/tinycrypt */
#ifndef MYNEWT_VAL_TINYCRYPT_SYSINIT_STAGE
#define MYNEWT_VAL_TINYCRYPT_SYSINIT_STAGE (200)
@@ -369,6 +365,14 @@
#define MYNEWT_VAL_BLE_EXT_ADV_MAX_SIZE (31)
#endif
+#ifndef MYNEWT_VAL_BLE_ISO
+#define MYNEWT_VAL_BLE_ISO (0)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_ISO_TEST
+#define MYNEWT_VAL_BLE_ISO_TEST (0)
+#endif
+
#ifndef MYNEWT_VAL_BLE_MAX_CONNECTIONS
#define MYNEWT_VAL_BLE_MAX_CONNECTIONS (1)
#endif
@@ -1264,4 +1268,10 @@
#define MYNEWT_VAL_TIMER_5 (1)
#endif
+/* Value copied from BLE_LL_OUR_SCA */
+#ifndef MYNEWT_VAL_BLE_LL_SCA
+#define MYNEWT_VAL_BLE_LL_SCA (60)
+#endif
+
+
#endif
diff --git a/src/libs/mynewt-nimble/porting/nimble/include/sysflash/sysflash.h b/src/libs/mynewt-nimble/porting/nimble/include/sysflash/sysflash.h
index 413cb267..ab1341b2 100644
--- a/src/libs/mynewt-nimble/porting/nimble/include/sysflash/sysflash.h
+++ b/src/libs/mynewt-nimble/porting/nimble/include/sysflash/sysflash.h
@@ -1,5 +1,5 @@
/**
- * This file was generated by Apache newt version: 1.8.0-dev
+ * This file was generated by Apache newt version: 1.9.0-dev
*/
#ifndef H_MYNEWT_SYSFLASH_
diff --git a/src/libs/mynewt-nimble/porting/nimble/src/nimble_port.c b/src/libs/mynewt-nimble/porting/nimble/src/nimble_port.c
index ff350a89..06b5f6df 100644
--- a/src/libs/mynewt-nimble/porting/nimble/src/nimble_port.c
+++ b/src/libs/mynewt-nimble/porting/nimble/src/nimble_port.c
@@ -24,34 +24,28 @@
#include "nimble/nimble_port.h"
#if NIMBLE_CFG_CONTROLLER
#include "controller/ble_ll.h"
+#include "transport/ram/ble_hci_ram.h"
#endif
static struct ble_npl_eventq g_eventq_dflt;
+extern void os_msys_init(void);
+
void
nimble_port_init(void)
{
- void os_msys_init(void);
- void ble_store_ram_init(void);
-#if NIMBLE_CFG_CONTROLLER
- void ble_hci_ram_init(void);
-#endif
-
/* Initialize default event queue */
ble_npl_eventq_init(&g_eventq_dflt);
-
+ /* Initialize the global memory pool */
os_msys_init();
-
+ /* Initialize the host */
ble_hs_init();
- /* XXX Need to have template for store */
- ble_store_ram_init();
-
#if NIMBLE_CFG_CONTROLLER
+ ble_hci_ram_init();
hal_timer_init(5, NULL);
os_cputime_init(32768);
ble_ll_init();
- ble_hci_ram_init();
#endif
}
diff --git a/src/libs/mynewt-nimble/porting/npl/freertos/include/nimble/nimble_npl_os.h b/src/libs/mynewt-nimble/porting/npl/freertos/include/nimble/nimble_npl_os.h
index d8810f35..545be0f4 100644
--- a/src/libs/mynewt-nimble/porting/npl/freertos/include/nimble/nimble_npl_os.h
+++ b/src/libs/mynewt-nimble/porting/npl/freertos/include/nimble/nimble_npl_os.h
@@ -282,14 +282,12 @@ static inline uint32_t
ble_npl_hw_enter_critical(void)
{
//vPortEnterCritical();
-
return npl_freertos_hw_enter_critical();
}
static inline void
ble_npl_hw_exit_critical(uint32_t ctx)
{
- // vPortExitCritical();
npl_freertos_hw_exit_critical(ctx);
}
diff --git a/src/libs/mynewt-nimble/porting/npl/freertos/src/nimble_port_freertos.c b/src/libs/mynewt-nimble/porting/npl/freertos/src/nimble_port_freertos.c
index 64196b36..8ee3475a 100644
--- a/src/libs/mynewt-nimble/porting/npl/freertos/src/nimble_port_freertos.c
+++ b/src/libs/mynewt-nimble/porting/npl/freertos/src/nimble_port_freertos.c
@@ -37,7 +37,7 @@ nimble_port_freertos_init(TaskFunction_t host_task_fn)
* provided by NimBLE and in case of FreeRTOS it does not need to be wrapped
* since it has compatible prototype.
*/
- xTaskCreate(nimble_port_ll_task_func, "ll", configMINIMAL_STACK_SIZE + 100,
+ xTaskCreate(nimble_port_ll_task_func, "ll", configMINIMAL_STACK_SIZE + 400,
NULL, configMAX_PRIORITIES - 1, &ll_task_h);
#endif
@@ -46,6 +46,6 @@ nimble_port_freertos_init(TaskFunction_t host_task_fn)
* have separate task for NimBLE host, but since something needs to handle
* default queue it is just easier to make separate task which does this.
*/
- xTaskCreate(host_task_fn, "ble", configMINIMAL_STACK_SIZE + 200,
+ xTaskCreate(host_task_fn, "ble", configMINIMAL_STACK_SIZE + 400,
NULL, tskIDLE_PRIORITY + 1, &host_task_h);
}
diff --git a/src/libs/mynewt-nimble/porting/npl/freertos/src/npl_os_freertos.c b/src/libs/mynewt-nimble/porting/npl/freertos/src/npl_os_freertos.c
index eb3b4c99..875521ab 100644
--- a/src/libs/mynewt-nimble/porting/npl/freertos/src/npl_os_freertos.c
+++ b/src/libs/mynewt-nimble/porting/npl/freertos/src/npl_os_freertos.c
@@ -268,16 +268,12 @@ void
npl_freertos_callout_init(struct ble_npl_callout *co, struct ble_npl_eventq *evq,
ble_npl_event_fn *ev_cb, void *ev_arg)
{
- // I added this 'if' because nimble seems to never delete the timers. I assume it wants to recycle them.
- // This condition ensure that a new timer is created only if 'co' points to an uninitialized structure.
- // If the struct contains an existing timer, no new timer is created, which prevent a significant memory leak.
- // TODO Ensure that this workaround is valid and does not generate bad side-effect.
if(co->handle == NULL) {
memset(co, 0, sizeof(*co));
co->handle = xTimerCreate("co", 1, pdFALSE, co, os_callout_timer_cb);
+ }
co->evq = evq;
ble_npl_event_init(&co->ev, ev_cb, ev_arg);
- }
}
ble_npl_error_t
diff --git a/src/libs/mynewt-nimble/porting/npl/nuttx/include/console/console.h b/src/libs/mynewt-nimble/porting/npl/nuttx/include/console/console.h
new file mode 100644
index 00000000..0f65d475
--- /dev/null
+++ b/src/libs/mynewt-nimble/porting/npl/nuttx/include/console/console.h
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#ifndef __CONSOLE_H__
+#define __CONSOLE_H__
+
+#include <nuttx/config.h>
+#include <stdio.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define console_printf(_fmt, ...) printf(_fmt, ##__VA_ARGS__)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CONSOLE_H__ */
diff --git a/src/libs/mynewt-nimble/porting/npl/nuttx/include/modlog/modlog.h b/src/libs/mynewt-nimble/porting/npl/nuttx/include/modlog/modlog.h
new file mode 100644
index 00000000..5e51b501
--- /dev/null
+++ b/src/libs/mynewt-nimble/porting/npl/nuttx/include/modlog/modlog.h
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#ifndef H_MODLOG_
+#define H_MODLOG_
+
+#include <stdio.h>
+#include <stdint.h>
+
+#include "log_common/log_common.h"
+
+#define MODLOG_MODULE_DFLT 255
+
+#if MYNEWT_VAL(LOG_LEVEL) <= LOG_LEVEL_DEBUG || defined __DOXYGEN__
+#define MODLOG_DEBUG(ml_mod_, ml_msg_, ...) \
+ printf((ml_msg_), ##__VA_ARGS__)
+#else
+#define MODLOG_DEBUG(ml_mod_, ...) IGNORE(__VA_ARGS__)
+#endif
+
+#if MYNEWT_VAL(LOG_LEVEL) <= LOG_LEVEL_INFO || defined __DOXYGEN__
+#define MODLOG_INFO(ml_mod_, ml_msg_, ...) \
+ printf((ml_msg_), ##__VA_ARGS__)
+#else
+#define MODLOG_INFO(ml_mod_, ...) IGNORE(__VA_ARGS__)
+#endif
+
+#if MYNEWT_VAL(LOG_LEVEL) <= LOG_LEVEL_WARN || defined __DOXYGEN__
+#define MODLOG_WARN(ml_mod_, ml_msg_, ...) \
+ printf((ml_msg_), ##__VA_ARGS__)
+#else
+#define MODLOG_WARN(ml_mod_, ...) IGNORE(__VA_ARGS__)
+#endif
+
+#if MYNEWT_VAL(LOG_LEVEL) <= LOG_LEVEL_ERROR || defined __DOXYGEN__
+#define MODLOG_ERROR(ml_mod_, ml_msg_, ...) \
+ printf((ml_msg_), ##__VA_ARGS__)
+#else
+#define MODLOG_ERROR(ml_mod_, ...) IGNORE(__VA_ARGS__)
+#endif
+
+#if MYNEWT_VAL(LOG_LEVEL) <= LOG_LEVEL_CRITICAL || defined __DOXYGEN__
+#define MODLOG_CRITICAL(ml_mod_, ml_msg_, ...) \
+ printf((ml_msg_), ##__VA_ARGS__)
+#else
+#define MODLOG_CRITICAL(ml_mod_, ...) IGNORE(__VA_ARGS__)
+#endif
+
+#define MODLOG(ml_lvl_, ml_mod_, ...) \
+ MODLOG_ ## ml_lvl_((ml_mod_), __VA_ARGS__)
+
+#endif
diff --git a/src/libs/mynewt-nimble/porting/npl/nuttx/include/nimble/nimble_npl_os.h b/src/libs/mynewt-nimble/porting/npl/nuttx/include/nimble/nimble_npl_os.h
new file mode 100644
index 00000000..0f765f5a
--- /dev/null
+++ b/src/libs/mynewt-nimble/porting/npl/nuttx/include/nimble/nimble_npl_os.h
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#ifndef _NIMBLE_NPL_OS_H_
+#define _NIMBLE_NPL_OS_H_
+
+#include <nuttx/config.h>
+#include <assert.h>
+#include <stdint.h>
+#include <string.h>
+
+#include "os_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define BLE_NPL_OS_ALIGNMENT 4
+
+#define BLE_NPL_TIME_FOREVER INT32_MAX
+
+#define SYSINIT_PANIC_MSG(msg) { fprintf(stderr, "%s\n", msg); abort(); }
+
+#define SYSINIT_PANIC_ASSERT_MSG(rc, msg) do \
+{ \
+ if (!(rc)) { \
+ SYSINIT_PANIC_MSG(msg); \
+ } \
+} while (0)
+
+#ifdef __cplusplus
+}
+#endif
+
+/* Define some variables since nimBLE is designed to be built ignoring
+ * undefined macros and we do not ignore warnings on NuttX.
+ *
+ * Note: MYNEWT will give undefined warning, but some parts of the code
+ * interpret !defined(MYNEWT) as MYNEWT=0, so we shouldn't define it to zero
+ * either.
+ *
+ * Note 2: default_RNG_defined could probably set to 1 but this requires
+ * testing
+ */
+
+#define MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_PRIVACY 0
+#define MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_EXT_ADV 0
+#define MYNEWT_VAL_BLE_LL_DTM_EXTENSIONS 0
+#define MYNEWT_VAL_BLE_CONTROLLER 0
+#define default_RNG_defined 0
+#define BLETEST_THROUGHPUT_TEST 0
+#define MYNEWT_VAL_TRNG 0
+#define MYNEWT_VAL_SELFTEST 0
+
+#endif /* _NPL_H_ */
diff --git a/src/libs/mynewt-nimble/porting/npl/nuttx/include/nimble/os_types.h b/src/libs/mynewt-nimble/porting/npl/nuttx/include/nimble/os_types.h
new file mode 100644
index 00000000..93d52891
--- /dev/null
+++ b/src/libs/mynewt-nimble/porting/npl/nuttx/include/nimble/os_types.h
@@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#ifndef _NPL_OS_TYPES_H
+#define _NPL_OS_TYPES_H
+
+#include <nuttx/config.h>
+#include <time.h>
+#include <signal.h>
+#include <stdbool.h>
+#include <pthread.h>
+#include <semaphore.h>
+#include <sched.h>
+#include <mqueue.h>
+
+/* The highest and lowest task priorities */
+#define OS_TASK_PRI_HIGHEST (sched_get_priority_max(SCHED_RR))
+#define OS_TASK_PRI_LOWEST (sched_get_priority_min(SCHED_RR))
+
+typedef uint32_t ble_npl_time_t;
+typedef int32_t ble_npl_stime_t;
+
+//typedef int os_sr_t;
+typedef int ble_npl_stack_t;
+
+
+struct ble_npl_event {
+ uint8_t ev_queued;
+ ble_npl_event_fn *ev_cb;
+ void *ev_arg;
+};
+
+struct ble_npl_eventq {
+ mqd_t mq;
+};
+
+struct ble_npl_callout {
+ struct ble_npl_event c_ev;
+ struct ble_npl_eventq *c_evq;
+ uint32_t c_ticks;
+ timer_t c_timer;
+ bool c_active;
+};
+
+struct ble_npl_mutex {
+ pthread_mutex_t lock;
+ pthread_mutexattr_t attr;
+ struct timespec wait;
+};
+
+struct ble_npl_sem {
+ sem_t lock;
+};
+
+struct ble_npl_task {
+ pthread_t handle;
+ pthread_attr_t attr;
+ struct sched_param param;
+ const char* name;
+};
+
+typedef void *(*ble_npl_task_func_t)(void *);
+
+int ble_npl_task_init(struct ble_npl_task *t, const char *name, ble_npl_task_func_t func,
+ void *arg, uint8_t prio, ble_npl_time_t sanity_itvl,
+ ble_npl_stack_t *stack_bottom, uint16_t stack_size);
+
+int ble_npl_task_remove(struct ble_npl_task *t);
+
+uint8_t ble_npl_task_count(void);
+
+void ble_npl_task_yield(void);
+
+#endif // _NPL_OS_TYPES_H
diff --git a/src/libs/mynewt-nimble/porting/npl/nuttx/src/os_atomic.c b/src/libs/mynewt-nimble/porting/npl/nuttx/src/os_atomic.c
new file mode 100644
index 00000000..ceededb2
--- /dev/null
+++ b/src/libs/mynewt-nimble/porting/npl/nuttx/src/os_atomic.c
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include <nuttx/config.h>
+#include <stdint.h>
+#include <pthread.h>
+
+#include "nimble/nimble_npl.h"
+
+static pthread_mutex_t s_mutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
+
+uint32_t
+ble_npl_hw_enter_critical(void)
+{
+ pthread_mutex_lock(&s_mutex);
+ return 0;
+}
+
+void
+ble_npl_hw_exit_critical(uint32_t ctx)
+{
+ pthread_mutex_unlock(&s_mutex);
+}
diff --git a/src/libs/mynewt-nimble/porting/npl/nuttx/src/os_callout.c b/src/libs/mynewt-nimble/porting/npl/nuttx/src/os_callout.c
new file mode 100644
index 00000000..affa1c2d
--- /dev/null
+++ b/src/libs/mynewt-nimble/porting/npl/nuttx/src/os_callout.c
@@ -0,0 +1,166 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include <nuttx/config.h>
+#include <assert.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <string.h>
+
+#include <time.h>
+#include <signal.h>
+
+#include "nimble/nimble_npl.h"
+
+static void
+ble_npl_callout_timer_cb(union sigval sv)
+{
+ struct ble_npl_callout *c = (struct ble_npl_callout *)sv.sival_ptr;
+ assert(c);
+
+ if (c->c_evq) {
+ ble_npl_eventq_put(c->c_evq, &c->c_ev);
+ } else {
+ c->c_ev.ev_cb(&c->c_ev);
+ }
+}
+
+void
+ble_npl_callout_init(struct ble_npl_callout *c,
+ struct ble_npl_eventq *evq,
+ ble_npl_event_fn *ev_cb,
+ void *ev_arg)
+{
+ struct sigevent event;
+
+ /* Initialize the callout. */
+ memset(c, 0, sizeof(*c));
+ c->c_ev.ev_cb = ev_cb;
+ c->c_ev.ev_arg = ev_arg;
+ c->c_evq = evq;
+ c->c_active = false;
+
+ event.sigev_notify = SIGEV_THREAD;
+ event.sigev_value.sival_ptr = c; // put callout obj in signal args
+ event.sigev_notify_function = ble_npl_callout_timer_cb;
+ event.sigev_notify_attributes = NULL;
+
+ timer_create(CLOCK_REALTIME, &event, &c->c_timer);
+}
+
+bool
+ble_npl_callout_is_active(struct ble_npl_callout *c)
+{
+ /* TODO: seek native posix method to determine whether timer_t is active.
+ TODO: fix bug where one-shot timer is still active after fired. */
+
+ return c->c_active;
+}
+
+int
+ble_npl_callout_inited(struct ble_npl_callout *c)
+{
+ return (c->c_timer != NULL);
+}
+
+ble_npl_error_t
+ble_npl_callout_reset(struct ble_npl_callout *c,
+ ble_npl_time_t ticks)
+{
+ struct itimerspec its;
+
+ if (ticks < 0) {
+ return BLE_NPL_EINVAL;
+ }
+
+ if (ticks == 0) {
+ ticks = 1;
+ }
+
+ c->c_ticks = ble_npl_time_get() + ticks;
+
+ its.it_interval.tv_sec = 0;
+ its.it_interval.tv_nsec = 0; /* one shot */
+ its.it_value.tv_sec = (ticks / 1000);
+ its.it_value.tv_nsec = (ticks % 1000) * 1000000; /* expiration */
+ its.it_value.tv_nsec %= 1000000000;
+ c->c_active = true;
+ timer_settime(c->c_timer, 0, &its, NULL);
+
+ return BLE_NPL_OK;
+}
+
+int
+ble_npl_callout_queued(struct ble_npl_callout *c)
+{
+ struct itimerspec its;
+ timer_gettime(c->c_timer, &its);
+
+ return ((its.it_value.tv_sec > 0) ||
+ (its.it_value.tv_nsec > 0));
+}
+
+void
+ble_npl_callout_stop(struct ble_npl_callout *c)
+{
+ if (!ble_npl_callout_inited(c)) {
+ return;
+ }
+
+ struct itimerspec its;
+ its.it_interval.tv_sec = 0;
+ its.it_interval.tv_nsec = 0;
+ its.it_value.tv_sec = 0;
+ its.it_value.tv_nsec = 0;
+ timer_settime(c->c_timer, 0, &its, NULL);
+ c->c_active = false;
+}
+
+ble_npl_time_t
+ble_npl_callout_get_ticks(struct ble_npl_callout *co)
+{
+ return co->c_ticks;
+}
+
+void
+ble_npl_callout_set_arg(struct ble_npl_callout *co, void *arg)
+{
+ co->c_ev.ev_arg = arg;
+}
+
+uint32_t
+ble_npl_callout_remaining_ticks(struct ble_npl_callout *co,
+ ble_npl_time_t now)
+{
+ ble_npl_time_t rt;
+ uint32_t exp;
+
+ struct itimerspec its;
+ timer_gettime(co->c_timer, &its);
+
+ exp = its.it_value.tv_sec * 1000;
+
+ if (exp > now) {
+ rt = exp - now;
+ } else {
+ rt = 0;
+ }
+
+ return rt;
+}
diff --git a/src/libs/mynewt-nimble/porting/npl/nuttx/src/os_eventq.c b/src/libs/mynewt-nimble/porting/npl/nuttx/src/os_eventq.c
new file mode 100644
index 00000000..815b0969
--- /dev/null
+++ b/src/libs/mynewt-nimble/porting/npl/nuttx/src/os_eventq.c
@@ -0,0 +1,177 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include <nuttx/config.h>
+#include <assert.h>
+#include <stdint.h>
+#include <string.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "nimble/nimble_npl.h"
+
+static struct ble_npl_eventq dflt_evq =
+{
+ .mq = (mqd_t)-1
+};
+
+int qnum = 0;
+
+struct ble_npl_eventq *
+ble_npl_eventq_dflt_get(void)
+{
+ return &dflt_evq;
+}
+
+void
+ble_npl_eventq_init(struct ble_npl_eventq *evq)
+{
+ char path[PATH_MAX];
+ struct mq_attr attr;
+ attr.mq_maxmsg = 16;
+ attr.mq_msgsize = sizeof(struct ble_npl_event*);
+ attr.mq_flags = 0;
+
+ qnum++;
+ sprintf(path, "/nimbleq%i", qnum);
+ evq->mq = mq_open(path, O_CREAT | O_RDWR, 0, &attr);
+ DEBUGASSERT((intptr_t)evq->mq >= 0);
+}
+
+bool
+ble_npl_eventq_is_empty(struct ble_npl_eventq *evq)
+{
+ struct mq_attr attr;
+ mq_getattr(evq->mq, &attr);
+
+ return (attr.mq_curmsgs == 0);
+}
+
+int
+ble_npl_eventq_inited(const struct ble_npl_eventq *evq)
+{
+ return (evq->mq != ((mqd_t)-1));
+}
+
+void
+ble_npl_eventq_put(struct ble_npl_eventq *evq, struct ble_npl_event *ev)
+{
+ if (ev->ev_queued)
+ {
+ return;
+ }
+
+ ev->ev_queued = 1;
+ mq_send(evq->mq, (const char*)&ev, sizeof(ev), 0);
+}
+
+struct ble_npl_event *
+ble_npl_eventq_get(struct ble_npl_eventq *evq,
+ ble_npl_time_t tmo)
+{
+ struct ble_npl_event *ev = NULL;
+
+ if (tmo == BLE_NPL_TIME_FOREVER)
+ {
+ do
+ {
+ mq_receive(evq->mq, (char*)&ev, sizeof(ev), NULL);
+ } while (ev && ev->ev_queued == 0);
+ }
+ else
+ {
+ struct timespec now, t;
+
+ clock_gettime(CLOCK_REALTIME, &now);
+
+ t.tv_sec += tmo / USEC_PER_SEC;
+ t.tv_nsec = (tmo - t.tv_sec) * NSEC_PER_MSEC;
+ clock_timespec_add(&now, &t, &t);
+
+ do
+ {
+ mq_timedreceive(evq->mq, (char*)&ev, sizeof(ev), NULL, &t);
+ } while (ev && ev->ev_queued == 0);
+ }
+
+ if (ev) {
+ ev->ev_queued = 0;
+ }
+
+ return ev;
+}
+
+void
+ble_npl_eventq_run(struct ble_npl_eventq *evq)
+{
+ struct ble_npl_event *ev;
+
+ ev = ble_npl_eventq_get(evq, BLE_NPL_TIME_FOREVER);
+ ble_npl_event_run(ev);
+}
+
+
+// ========================================================================
+// Event Implementation
+// ========================================================================
+
+void
+ble_npl_event_init(struct ble_npl_event *ev, ble_npl_event_fn *fn,
+ void *arg)
+{
+ memset(ev, 0, sizeof(*ev));
+ ev->ev_cb = fn;
+ ev->ev_arg = arg;
+}
+
+bool
+ble_npl_event_is_queued(struct ble_npl_event *ev)
+{
+ return ev->ev_queued;
+}
+
+void *
+ble_npl_event_get_arg(struct ble_npl_event *ev)
+{
+ return ev->ev_arg;
+}
+
+void
+ble_npl_event_set_arg(struct ble_npl_event *ev, void *arg)
+{
+ ev->ev_arg = arg;
+}
+
+void
+ble_npl_event_run(struct ble_npl_event *ev)
+{
+ assert(ev->ev_cb != NULL);
+
+ ev->ev_cb(ev);
+}
+
+void
+ble_npl_eventq_remove(struct ble_npl_eventq *evq, struct ble_npl_event *ev)
+{
+ /* we simply mark the event as unqueued. we will ignore these elements
+ * when receiving from the queue */
+
+ ev->ev_queued = 0;
+}
diff --git a/src/libs/mynewt-nimble/porting/npl/nuttx/src/os_mutex.c b/src/libs/mynewt-nimble/porting/npl/nuttx/src/os_mutex.c
new file mode 100644
index 00000000..0c43f369
--- /dev/null
+++ b/src/libs/mynewt-nimble/porting/npl/nuttx/src/os_mutex.c
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include <nuttx/config.h>
+#include <errno.h>
+#include <pthread.h>
+
+#include "os/os.h"
+#include "nimble/nimble_npl.h"
+
+ble_npl_error_t
+ble_npl_mutex_init(struct ble_npl_mutex *mu)
+{
+ if (!mu) {
+ return BLE_NPL_INVALID_PARAM;
+ }
+
+ pthread_mutexattr_init(&mu->attr);
+ pthread_mutexattr_settype(&mu->attr, PTHREAD_MUTEX_RECURSIVE);
+ pthread_mutex_init(&mu->lock, &mu->attr);
+
+ return BLE_NPL_OK;
+}
+
+ble_npl_error_t
+ble_npl_mutex_release(struct ble_npl_mutex *mu)
+{
+ if (!mu) {
+ return BLE_NPL_INVALID_PARAM;
+ }
+
+ if (pthread_mutex_unlock(&mu->lock)) {
+ return BLE_NPL_BAD_MUTEX;
+ }
+
+ return BLE_NPL_OK;
+}
+
+ble_npl_error_t
+ble_npl_mutex_pend(struct ble_npl_mutex *mu, uint32_t timeout)
+{
+ int err;
+
+ if (!mu) {
+ return BLE_NPL_INVALID_PARAM;
+ }
+
+ if (timeout == BLE_NPL_TIME_FOREVER) {
+ err = pthread_mutex_lock(&mu->lock);
+ } else {
+ err = clock_gettime(CLOCK_REALTIME, &mu->wait);
+ if (err) {
+ return BLE_NPL_ERROR;
+ }
+
+ mu->wait.tv_sec += timeout / 1000;
+ mu->wait.tv_nsec += (timeout % 1000) * 1000000;
+
+ err = pthread_mutex_timedlock(&mu->lock, &mu->wait);
+ if (err == ETIMEDOUT) {
+ return BLE_NPL_TIMEOUT;
+ }
+ }
+
+ return (err) ? BLE_NPL_ERROR : BLE_NPL_OK;
+}
diff --git a/src/libs/mynewt-nimble/porting/npl/nuttx/src/os_sem.c b/src/libs/mynewt-nimble/porting/npl/nuttx/src/os_sem.c
new file mode 100644
index 00000000..91a70964
--- /dev/null
+++ b/src/libs/mynewt-nimble/porting/npl/nuttx/src/os_sem.c
@@ -0,0 +1,100 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include <nuttx/config.h>
+#include <assert.h>
+#include <errno.h>
+#include <semaphore.h>
+
+#include "os/os.h"
+#include "nimble/nimble_npl.h"
+
+ble_npl_error_t
+ble_npl_sem_init(struct ble_npl_sem *sem, uint16_t tokens)
+{
+ if (!sem) {
+ return BLE_NPL_INVALID_PARAM;
+ }
+
+ sem_init(&sem->lock, 0, tokens);
+
+ return BLE_NPL_OK;
+}
+
+ble_npl_error_t
+ble_npl_sem_release(struct ble_npl_sem *sem)
+{
+ int err;
+
+ if (!sem) {
+ return BLE_NPL_INVALID_PARAM;
+ }
+
+ err = sem_post(&sem->lock);
+
+ return (err) ? BLE_NPL_ERROR : BLE_NPL_OK;
+}
+
+ble_npl_error_t
+ble_npl_sem_pend(struct ble_npl_sem *sem, uint32_t timeout)
+{
+ int err = 0;
+ struct timespec wait;
+
+ if (!sem) {
+ return BLE_NPL_INVALID_PARAM;
+ }
+
+ if (timeout == BLE_NPL_TIME_FOREVER) {
+ err = sem_wait(&sem->lock);
+ } else {
+ err = clock_gettime(CLOCK_REALTIME, &wait);
+ if (err) {
+ return BLE_NPL_ERROR;
+ }
+
+ wait.tv_sec += timeout / 1000;
+ wait.tv_nsec += (timeout % 1000) * 1000000;
+
+ err = sem_timedwait(&sem->lock, &wait);
+ if (err && errno == ETIMEDOUT) {
+ return BLE_NPL_TIMEOUT;
+ }
+ }
+
+ return (err) ? BLE_NPL_ERROR : BLE_NPL_OK;
+}
+
+uint16_t
+ble_npl_sem_get_count(struct ble_npl_sem *sem)
+{
+ int count;
+
+ assert(sem);
+ assert(&sem->lock);
+ sem_getvalue(&sem->lock, &count);
+
+ /* NuttX can return negative value, return 0 in that case */
+
+ if (count < 0) {
+ count = 0;
+ }
+
+ return count;
+}
diff --git a/src/libs/mynewt-nimble/porting/npl/nuttx/src/os_task.c b/src/libs/mynewt-nimble/porting/npl/nuttx/src/os_task.c
new file mode 100644
index 00000000..2e020236
--- /dev/null
+++ b/src/libs/mynewt-nimble/porting/npl/nuttx/src/os_task.c
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include <nuttx/config.h>
+#include "os/os.h"
+#include "nimble/nimble_npl.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Initialize a task.
+ *
+ * This function initializes the task structure pointed to by t,
+ * clearing and setting it's stack pointer, provides sane defaults
+ * and sets the task as ready to run, and inserts it into the operating
+ * system scheduler.
+ *
+ * @param t The task to initialize
+ * @param name The name of the task to initialize
+ * @param func The task function to call
+ * @param arg The argument to pass to this task function
+ * @param prio The priority at which to run this task
+ * @param sanity_itvl The time at which this task should check in with the
+ * sanity task. OS_WAIT_FOREVER means never check in
+ * here.
+ * @param stack_bottom A pointer to the bottom of a task's stack
+ * @param stack_size The overall size of the task's stack.
+ *
+ * @return 0 on success, non-zero on failure.
+ */
+int
+ble_npl_task_init(struct ble_npl_task *t, const char *name, ble_npl_task_func_t func,
+ void *arg, uint8_t prio, ble_npl_time_t sanity_itvl,
+ ble_npl_stack_t *stack_bottom, uint16_t stack_size)
+{
+ int err;
+ if ((t == NULL) || (func == NULL)) {
+ return OS_INVALID_PARM;
+ }
+
+ err = pthread_attr_init(&t->attr);
+ if (err) return err;
+ err = pthread_attr_getschedparam (&t->attr, &t->param);
+ if (err) return err;
+ err = pthread_attr_setschedpolicy(&t->attr, SCHED_RR);
+ if (err) return err;
+ t->param.sched_priority = prio;
+ err = pthread_attr_setschedparam (&t->attr, &t->param);
+ if (err) return err;
+
+ t->name = name;
+ err = pthread_create(&t->handle, &t->attr, func, arg);
+
+ return err;
+}
+
+/*
+ * Removes specified task
+ * XXX
+ * NOTE: This interface is currently experimental and not ready for common use
+ */
+int
+ble_npl_task_remove(struct ble_npl_task *t)
+{
+ return pthread_cancel(t->handle);
+}
+
+/**
+ * Return the number of tasks initialized.
+ *
+ * @return number of tasks initialized
+ */
+uint8_t
+ble_npl_task_count(void)
+{
+ return 0;
+}
+
+void *
+ble_npl_get_current_task_id(void)
+{
+ return (void *)(uintptr_t)pthread_self();
+}
+
+bool
+ble_npl_os_started(void)
+{
+ return true;
+}
+
+void
+ble_npl_task_yield(void)
+{
+ pthread_yield();
+}
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/src/libs/mynewt-nimble/porting/npl/nuttx/src/os_time.c b/src/libs/mynewt-nimble/porting/npl/nuttx/src/os_time.c
new file mode 100644
index 00000000..99b4c912
--- /dev/null
+++ b/src/libs/mynewt-nimble/porting/npl/nuttx/src/os_time.c
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include <nuttx/config.h>
+#include <assert.h>
+#include <stdint.h>
+#include <string.h>
+#include "os/os.h"
+#include "nimble/nimble_npl.h"
+
+#include <unistd.h>
+#include <time.h>
+
+/**
+ * Return ticks [ms] since system start as uint32_t.
+ */
+ble_npl_time_t
+ble_npl_time_get(void)
+{
+ struct timespec now;
+ if (clock_gettime(CLOCK_MONOTONIC, &now)) {
+ return 0;
+ }
+ return now.tv_sec * 1000.0 + now.tv_nsec / 1000000.0;
+}
+
+
+ble_npl_error_t
+ble_npl_time_ms_to_ticks(uint32_t ms, ble_npl_time_t *out_ticks)
+{
+ *out_ticks = ms;
+
+ return BLE_NPL_OK;
+}
+
+
+ble_npl_error_t
+ble_npl_time_ticks_to_ms(ble_npl_time_t ticks, uint32_t *out_ms)
+{
+ *out_ms = ticks;
+
+ return BLE_NPL_OK;
+}
+
+ble_npl_time_t
+ble_npl_time_ms_to_ticks32(uint32_t ms)
+{
+ return ms;
+}
+
+uint32_t
+ble_npl_time_ticks_to_ms32(ble_npl_time_t ticks)
+{
+ return ticks;
+}
+
+void
+ble_npl_time_delay(ble_npl_time_t ticks)
+{
+ struct timespec sleep_time;
+ long ms = ble_npl_time_ticks_to_ms32(ticks);
+ uint32_t s = ms / 1000;
+
+ ms -= s * 1000;
+ sleep_time.tv_sec = s;
+ sleep_time.tv_nsec = ms * 1000000;
+
+ nanosleep(&sleep_time, NULL);
+}
diff --git a/src/libs/mynewt-nimble/porting/npl/nuttx/src/wqueue.h b/src/libs/mynewt-nimble/porting/npl/nuttx/src/wqueue.h
new file mode 100644
index 00000000..7821eacd
--- /dev/null
+++ b/src/libs/mynewt-nimble/porting/npl/nuttx/src/wqueue.h
@@ -0,0 +1,104 @@
+/*
+ wqueue.h
+ Worker thread queue based on the Standard C++ library list
+ template class.
+ ------------------------------------------
+ Copyright (c) 2013 Vic Hargrave
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+// https://vichargrave.github.io/articles/2013-01/multithreaded-work-queue-in-cpp
+// https://github.com/vichargrave/wqueue/blob/master/wqueue.h
+
+
+#ifndef __wqueue_h__
+#define __wqueue_h__
+
+#include <nuttx/config.h>
+#include <pthread.h>
+#include <queue.h>
+
+struct wqueue_s
+{
+ dq_queue_s m_queue;
+ pthread_mutex_t m_mutex;
+ pthread_mutexattr_t m_mutex_attr;
+ pthread_cond_t m_condv;
+};
+
+using namespace std;
+
+template <typename T> class wqueue
+{
+ dq_queue_s m_queue;
+ pthread_mutex_t m_mutex;
+ pthread_mutexattr_t m_mutex_attr;
+ pthread_cond_t m_condv;
+
+public:
+ wqueue()
+ {
+ dq_init(m_queue);
+ pthread_mutexattr_init(&m_mutex_attr);
+ pthread_mutexattr_settype(&m_mutex_attr, PTHREAD_MUTEX_RECURSIVE);
+ pthread_mutex_init(&m_mutex, &m_mutex_attr);
+ pthread_cond_init(&m_condv, NULL);
+ }
+
+ ~wqueue() {
+ pthread_mutex_destroy(&m_mutex);
+ pthread_cond_destroy(&m_condv);
+ }
+
+ void put(T item) {
+ dq_entry_t* entry = malloc(sizeof(T));
+
+ pthread_mutex_lock(&m_mutex);
+ dq_addlast(entry, &m_queue);
+ m_queue.push_back(item);
+ pthread_cond_signal(&m_condv);
+ pthread_mutex_unlock(&m_mutex);
+ }
+
+ T get(uint32_t tmo) {
+ pthread_mutex_lock(&m_mutex);
+ if (tmo) {
+ while (m_queue.size() == 0) {
+ pthread_cond_wait(&m_condv, &m_mutex);
+ }
+ }
+
+ T item = NULL;
+
+ if (m_queue.size() != 0) {
+ item = m_queue.front();
+ m_queue.pop_front();
+ }
+
+ pthread_mutex_unlock(&m_mutex);
+ return item;
+ }
+
+ void remove(T item) {
+ pthread_mutex_lock(&m_mutex);
+ m_queue.remove(item);
+ pthread_mutex_unlock(&m_mutex);
+ }
+
+ int size() {
+ pthread_mutex_lock(&m_mutex);
+ int size = m_queue.size();
+ pthread_mutex_unlock(&m_mutex);
+ return size;
+ }
+};
+
+#endif
diff --git a/src/libs/mynewt-nimble/porting/npl/nuttx/test/Make.defs b/src/libs/mynewt-nimble/porting/npl/nuttx/test/Make.defs
new file mode 100644
index 00000000..a4bdce16
--- /dev/null
+++ b/src/libs/mynewt-nimble/porting/npl/nuttx/test/Make.defs
@@ -0,0 +1,58 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+# * http://www.apache.org/licenses/LICENSE-2.0
+# * Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+CFLAGS += \
+ -I. \
+ -I$(NIMBLE_ROOT)/nimble/include \
+ -I$(NIMBLE_ROOT)/porting/npl/nuttx/include \
+ -I$(NIMBLE_ROOT)/porting/npl/nuttx/src \
+ -I$(NIMBLE_ROOT)/porting/nimble/include
+
+OSAL_PATH = $(NIMBLE_ROOT)/porting/npl/nuttx/src
+
+CSRCS = $(wildcard $(OSAL_PATH)/*.c) \
+ $(wildcard $(OSAL_PATH)/*.cc) \
+ $(NIMBLE_ROOT)/porting/nimble/src/os_mempool.c
+
+CXXOBJS += $($(wildcard *.cxx):$(CXXEXT)=$(SUFFIX)$(OBJEXT))
+
+CFLAGS += -DNIMBLE_CFG_CONTROLLER=0 -DOS_CFG_ALIGN_4=4 -DOS_CFG_ALIGNMENT=4
+
+DEPPATH += --dep-path $(NIMBLE_ROOT)/porting/npl/nuttx/test
+VPATH += :$(NIMBLE_ROOT)/porting/npl/nuttx/test
+VPATH += :$(NIMBLE_ROOT)/porting/nimble/src
+VPATH += :$(OSAL_PATH)
+
+PROGNAME = test_npl_task test_npl_eventq test_npl_callout test_npl_sem
+MAINSRC = $(wildcard $(NIMBLE_ROOT)/porting/npl/nuttx/test/*.c)
+
+clean::
+ (cd $(NIMBLE_ROOT)/porting/npl/nuttx/test && rm -f *.o)
+ (cd $(NIMBLE_ROOT)/porting/nimble/src && rm -f *.o)
+ (cd $(OSAL_PATH) && rm -f *.o)
+
+test_npl_task.exe: test_npl_task.o $(OBJS)
+ $(LD) -o $@ $^ $(LDFLAGS) $(LIBS)
+
+test_npl_eventq.exe: test_npl_eventq.o $(OBJS)
+ $(LD) -o $@ $^ $(LDFLAGS) $(LIBS)
+
+test_npl_callout.exe: test_npl_callout.o $(OBJS)
+ $(LD) -o $@ $^ $(LDFLAGS) $(LIBS)
+
+test_npl_sem.exe: test_npl_sem.o $(OBJS)
+ $(LD) -o $@ $^ $(LDFLAGS) $(LIBS)
diff --git a/src/libs/mynewt-nimble/porting/npl/nuttx/test/test_npl_callout.c b/src/libs/mynewt-nimble/porting/npl/nuttx/test/test_npl_callout.c
new file mode 100644
index 00000000..d04303f8
--- /dev/null
+++ b/src/libs/mynewt-nimble/porting/npl/nuttx/test/test_npl_callout.c
@@ -0,0 +1,116 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ Unit tests for the ble_npl_callout api:
+
+ void ble_npl_callout_init(struct ble_npl_callout *cf, struct ble_npl_eventq *evq,
+ ble_npl_event_fn *ev_cb, void *ev_arg);
+ int ble_npl_callout_reset(struct ble_npl_callout *, int32_t);
+ int ble_npl_callout_queued(struct ble_npl_callout *c);
+ void ble_npl_callout_stop(struct ble_npl_callout *c);
+*/
+
+#include "test_util.h"
+#include "nimble/nimble_npl.h"
+
+#define TEST_ARGS_VALUE (55)
+#define TEST_INTERVAL (100)
+
+static bool s_tests_running = true;
+static struct ble_npl_task s_task;
+static struct ble_npl_callout s_callout;
+static int s_callout_args = TEST_ARGS_VALUE;
+
+static struct ble_npl_eventq s_eventq;
+
+
+void on_callout(struct ble_npl_event *ev)
+{
+ VerifyOrQuit(ev->ev_arg == &s_callout_args,
+ "callout: wrong args passed");
+
+ VerifyOrQuit(*(int*)ev->ev_arg == TEST_ARGS_VALUE,
+ "callout: args corrupted");
+
+ s_tests_running = false;
+}
+
+/**
+ * ble_npl_callout_init(struct ble_npl_callout *c, struct ble_npl_eventq *evq,
+ * ble_npl_event_fn *ev_cb, void *ev_arg)
+ */
+int test_init(void)
+{
+ ble_npl_callout_init(&s_callout,
+ &s_eventq,
+ on_callout,
+ &s_callout_args);
+ return PASS;
+}
+
+int test_queued(void)
+{
+ //VerifyOrQuit(ble_npl_callout_queued(&s_callout),
+ // "callout: not queued when expected");
+ return PASS;
+}
+
+int test_reset(void)
+{
+ return ble_npl_callout_reset(&s_callout, TEST_INTERVAL);
+}
+
+int test_stop(void)
+{
+ return PASS;
+}
+
+
+/**
+ * ble_npl_callout_init(struct ble_npl_callout *c, struct ble_npl_eventq *evq,
+ * ble_npl_event_fn *ev_cb, void *ev_arg)
+ */
+void *test_task_run(void *args)
+{
+ SuccessOrQuit(test_init(), "callout_init failed");
+ SuccessOrQuit(test_queued(), "callout_queued failed");
+ SuccessOrQuit(test_reset(), "callout_reset failed");
+
+ while (s_tests_running)
+ {
+ ble_npl_eventq_run(&s_eventq);
+ }
+
+ printf("All tests passed\n");
+ exit(PASS);
+
+ return NULL;
+}
+
+int main(void)
+{
+ ble_npl_eventq_init(&s_eventq);
+
+ SuccessOrQuit(ble_npl_task_init(&s_task, "s_task", test_task_run,
+ NULL, 1, 0, NULL, 0),
+ "task: error initializing");
+
+ while (1) {}
+}
diff --git a/src/libs/mynewt-nimble/porting/npl/nuttx/test/test_npl_eventq.c b/src/libs/mynewt-nimble/porting/npl/nuttx/test/test_npl_eventq.c
new file mode 100644
index 00000000..f0c362b9
--- /dev/null
+++ b/src/libs/mynewt-nimble/porting/npl/nuttx/test/test_npl_eventq.c
@@ -0,0 +1,131 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ Unit tests for the ble_npl_eventq api:
+
+ void ble_npl_eventq_init(struct ble_npl_eventq *);
+ void ble_npl_eventq_put(struct ble_npl_eventq *, struct ble_npl_event *);
+ struct ble_npl_event *ble_npl_eventq_get_no_wait(struct ble_npl_eventq *evq);
+ struct ble_npl_event *ble_npl_eventq_get(struct ble_npl_eventq *);
+ void ble_npl_eventq_run(struct ble_npl_eventq *evq);
+ struct ble_npl_event *ble_npl_eventq_poll(struct ble_npl_eventq **, int, ble_npl_time_t);
+ void ble_npl_eventq_remove(struct ble_npl_eventq *, struct ble_npl_event *);
+ struct ble_npl_eventq *ble_npl_eventq_dflt_get(void);
+*/
+
+#include <assert.h>
+#include <pthread.h>
+#include "test_util.h"
+#include "nimble/nimble_npl.h"
+
+#define TEST_ARGS_VALUE (55)
+#define TEST_STACK_SIZE (1024)
+
+static bool s_tests_running = true;
+static struct ble_npl_task s_task_runner;
+static struct ble_npl_task s_task_dispatcher;
+
+static struct ble_npl_eventq s_eventq;
+static struct ble_npl_event s_event;
+static int s_event_args = TEST_ARGS_VALUE;
+
+
+void on_event(struct ble_npl_event *ev)
+{
+ VerifyOrQuit(ev->ev_arg == &s_event_args,
+ "callout: wrong args passed");
+
+ VerifyOrQuit(*(int*)ev->ev_arg == TEST_ARGS_VALUE,
+ "callout: args corrupted");
+
+ s_tests_running = false;
+}
+
+int test_init(void)
+{
+ //VerifyOrQuit(!ble_npl_eventq_inited(&s_eventq), "eventq: empty q initialized");
+ ble_npl_eventq_init(&s_eventq);
+ //VerifyOrQuit(ble_npl_eventq_inited(&s_eventq), "eventq: not initialized");
+
+ return PASS;
+}
+
+int test_run(void)
+{
+ while (s_tests_running)
+ {
+ ble_npl_eventq_run(&s_eventq);
+ }
+
+ return PASS;
+}
+
+int test_put(void)
+{
+ s_event.ev_cb = on_event;
+ s_event.ev_arg = &s_event_args;
+ ble_npl_eventq_put(&s_eventq, &s_event);
+ return PASS;
+}
+
+int test_get_no_wait(void)
+{
+ //struct ble_npl_event *ev = ble_npl_eventq_get_no_wait(&s_eventq);
+ return FAIL;
+}
+
+int test_get(void)
+{
+ struct ble_npl_event *ev = ble_npl_eventq_get(&s_eventq,
+ BLE_NPL_TIME_FOREVER);
+
+ VerifyOrQuit(ev == &s_event,
+ "callout: wrong event passed");
+
+ return PASS;
+}
+
+
+void *task_test_runner(void *args)
+{
+ int count = 1000000000;
+
+ SuccessOrQuit(test_init(), "eventq_init failed");
+ SuccessOrQuit(test_put(), "eventq_put failed");
+ SuccessOrQuit(test_get(), "eventq_get failed");
+ SuccessOrQuit(test_put(), "eventq_put failed");
+ SuccessOrQuit(test_run(), "eventq_run failed");
+
+ printf("All tests passed\n");
+ exit(PASS);
+
+ return NULL;
+}
+
+int main(void)
+{
+ SuccessOrQuit(ble_npl_task_init(&s_task_runner,
+ "task_test_runner",
+ task_test_runner,
+ NULL, 1, 0, NULL, 0),
+ "task: error initializing");
+
+ while (1) {}
+}
diff --git a/src/libs/mynewt-nimble/porting/npl/nuttx/test/test_npl_mempool.c b/src/libs/mynewt-nimble/porting/npl/nuttx/test/test_npl_mempool.c
new file mode 100644
index 00000000..2dac0bb1
--- /dev/null
+++ b/src/libs/mynewt-nimble/porting/npl/nuttx/test/test_npl_mempool.c
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include "test_util.h"
+#include "nimble/nimble_npl.h"
+
+#define TEST_MEMPOOL_BLOCKS 4
+#define TEST_MEMPOOL_BLOCK_SIZE 128
+
+static struct ble_npl_mempool s_mempool;
+
+static os_membuf_t s_mempool_mem[OS_MEMPOOL_SIZE(TEST_MEMPOOL_BLOCKS,
+ TEST_MEMPOOL_BLOCK_SIZE)];
+
+static void *s_memblock[TEST_MEMPOOL_BLOCKS];
+
+/**
+ * Unit test for initializing a mempool.
+ *
+ * ble_npl_error_t ble_npl_mempool_init(struct ble_npl_mempool *mp, int blocks,
+ * int block_size, void *membuf, char *name);
+ *
+ */
+int test_init(void)
+{
+ int err;
+ err = ble_npl_mempool_init(NULL,
+ TEST_MEMPOOL_BLOCKS,
+ TEST_MEMPOOL_BLOCK_SIZE,
+ NULL,
+ "Null mempool");
+ VerifyOrQuit(err, "ble_npl_mempool_init accepted NULL parameters.");
+
+ err = ble_npl_mempool_init(&s_mempool,
+ TEST_MEMPOOL_BLOCKS,
+ TEST_MEMPOOL_BLOCK_SIZE,
+ s_mempool_mem,
+ "s_mempool");
+ return err;
+}
+
+/**
+ * Test integrity check of a mempool.
+ *
+ * bool ble_npl_mempool_is_sane(const struct ble_npl_mempool *mp);
+ */
+int test_is_sane(void)
+{
+ return (ble_npl_mempool_is_sane(&s_mempool)) ? PASS : FAIL;
+}
+
+/**
+ * Test getting a memory block from the pool, putting it back,
+ * and checking if it is still valid.
+ *
+ * void *ble_npl_memblock_get(struct ble_npl_mempool *mp);
+ *
+ * ble_npl_error_t ble_npl_memblock_put(struct ble_npl_mempool *mp, void *block_addr);
+ *
+ * int ble_npl_memblock_from(const struct ble_npl_mempool *mp, const void *block_addr);
+ */
+int test_stress(void)
+{
+ int loops = 3;
+ while(loops--)
+ {
+ for (int i = 0; i < 4; i++)
+ {
+ s_memblock[i] = ble_npl_memblock_get(&s_mempool);
+ VerifyOrQuit(ble_npl_memblock_from(&s_mempool, s_memblock[i]),
+ "ble_npl_memblock_get return invalid block.");
+ }
+
+
+ for (int i = 0; i < 4; i++)
+ {
+ SuccessOrQuit(ble_npl_memblock_put(&s_mempool, s_memblock[i]),
+ "ble_npl_memblock_put refused to take valid block.");
+ //VerifyOrQuit(!ble_npl_memblock_from(&s_mempool, s_memblock[i]),
+ // "Block still valid after ble_npl_memblock_put.");
+ }
+
+ }
+ return PASS;
+}
+
+int main(void)
+{
+ SuccessOrQuit(test_init(), "Failed: ble_npl_mempool_init");
+ SuccessOrQuit(test_is_sane(), "Failed: ble_npl_mempool_is_sane");
+ SuccessOrQuit(test_stress(), "Failed: ble_npl_mempool stree test");
+ SuccessOrQuit(test_is_sane(), "Failed: ble_npl_mempool_is_sane");
+ printf("All tests passed\n");
+ return PASS;
+}
diff --git a/src/libs/mynewt-nimble/porting/npl/nuttx/test/test_npl_sem.c b/src/libs/mynewt-nimble/porting/npl/nuttx/test/test_npl_sem.c
new file mode 100644
index 00000000..b62f8e2a
--- /dev/null
+++ b/src/libs/mynewt-nimble/porting/npl/nuttx/test/test_npl_sem.c
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ Unit tests for the Semaphore api (ble_npl_sem):
+
+ ble_npl_error_t ble_npl_sem_init(struct ble_npl_sem *sem, uint16_t tokens);
+ ble_npl_error_t ble_npl_sem_release(struct ble_npl_sem *sem);
+ ble_npl_error_t ble_npl_sem_pend(struct ble_npl_sem *sem, uint32_t timeout);
+ uint16_t ble_npl_sem_get_count(struct ble_npl_sem *sem);
+*/
+
+#include "test_util.h"
+#include "nimble/nimble_npl.h"
+//#include "os/os.h"
+
+#define TEST_ITERATIONS 10
+
+#define TASK1_PRIO 1
+#define TASK2_PRIO 1
+
+#define TASK1_STACK_SIZE 1028
+#define TASK2_STACK_SIZE 1028
+
+static struct ble_npl_task task1;
+static struct ble_npl_task task2;
+
+static ble_npl_stack_t task1_stack[TASK1_STACK_SIZE];
+static ble_npl_stack_t task2_stack[TASK2_STACK_SIZE];
+
+struct ble_npl_sem task1_sem;
+struct ble_npl_sem task2_sem;
+
+/* Task 1 handler function */
+void *
+task1_handler(void *arg)
+{
+ for (int i = 0; i < TEST_ITERATIONS; i++)
+ {
+ /* Release semaphore to task 2 */
+ SuccessOrQuit(ble_npl_sem_release(&task1_sem),
+ "ble_npl_sem_release: error releasing task2_sem.");
+
+ /* Wait for semaphore from task 2 */
+ SuccessOrQuit(ble_npl_sem_pend(&task2_sem, BLE_NPL_TIME_FOREVER),
+ "ble_npl_sem_pend: error waiting for task2_sem.");
+ }
+
+ printf("All tests passed\n");
+ exit(PASS);
+
+ return NULL;
+}
+
+/* Task 2 handler function */
+void *
+task2_handler(void *arg)
+{
+ while(1)
+ {
+ /* Wait for semaphore from task1 */
+ SuccessOrQuit(ble_npl_sem_pend(&task1_sem, BLE_NPL_TIME_FOREVER),
+ "ble_npl_sem_pend: error waiting for task1_sem.");
+
+ /* Release task2 semaphore */
+ SuccessOrQuit(ble_npl_sem_release(&task2_sem),
+ "ble_npl_sem_release: error releasing task1_sem.");
+ }
+
+ return NULL;
+}
+
+
+/* Initialize task 1 exposed data objects */
+void
+task1_init(void)
+{
+ /* Initialize task1 semaphore */
+ SuccessOrQuit(ble_npl_sem_init(&task1_sem, 0),
+ "ble_npl_sem_init: task1 returned error.");
+}
+
+/* Initialize task 2 exposed data objects */
+void
+task2_init(void)
+{
+ /* Initialize task1 semaphore */
+ SuccessOrQuit(ble_npl_sem_init(&task2_sem, 0),
+ "ble_npl_sem_init: task2 returned error.");
+}
+
+/**
+ * init_app_tasks
+ *
+ * This function performs initializations that are required before tasks run.
+ *
+ * @return int 0 success; error otherwise.
+ */
+static int
+init_app_tasks(void)
+{
+ /*
+ * Call task specific initialization functions to initialize any shared objects
+ * before initializing the tasks with the OS.
+ */
+ task1_init();
+ task2_init();
+
+ /*
+ * Initialize tasks 1 and 2 with the OS.
+ */
+ ble_npl_task_init(&task1, "task1", task1_handler, NULL, TASK1_PRIO,
+ BLE_NPL_TIME_FOREVER, task1_stack, TASK1_STACK_SIZE);
+
+ ble_npl_task_init(&task2, "task2", task2_handler, NULL, TASK2_PRIO,
+ BLE_NPL_TIME_FOREVER, task2_stack, TASK2_STACK_SIZE);
+
+ return 0;
+}
+
+/**
+ * main
+ *
+ * The main function for the application. This function initializes the system and packages,
+ * calls the application specific task initialization function, then waits and dispatches
+ * events from the OS default event queue in an infinite loop.
+ */
+int
+main(int argc, char **arg)
+{
+ /* Initialize application specific tasks */
+ init_app_tasks();
+
+ while (1)
+ {
+ ble_npl_eventq_run(ble_npl_eventq_dflt_get());
+ }
+ /* main never returns */
+}
diff --git a/src/libs/mynewt-nimble/porting/npl/nuttx/test/test_npl_task.c b/src/libs/mynewt-nimble/porting/npl/nuttx/test/test_npl_task.c
new file mode 100644
index 00000000..66310cd7
--- /dev/null
+++ b/src/libs/mynewt-nimble/porting/npl/nuttx/test/test_npl_task.c
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include "test_util.h"
+#include "nimble/nimble_npl.h"
+
+#include <pthread.h>
+
+#define TASK0_ARG 55
+#define TASK1_ARG 66
+
+static struct ble_npl_task s_task[2];
+static int s_task_arg[2] =
+{
+ TASK0_ARG, TASK1_ARG
+};
+
+
+void *task0_run(void *args)
+{
+ int i = 10000;
+ VerifyOrQuit(args == &s_task_arg[0], "Wrong args passed to task0");
+
+ while (i--)
+ {
+ }
+
+ return NULL;
+}
+
+void *task1_run(void *args)
+{
+ int i = 10000;
+ VerifyOrQuit(args == &s_task_arg[1], "Wrong args passed to task0");
+
+ while (i--)
+ {
+ }
+
+ printf("All tests passed\n");
+ exit(PASS);
+
+ return NULL;
+}
+
+/**
+ * Unit test for initializing a task.
+ *
+ * int ble_npl_task_init(struct ble_npl_task *t, const char *name, ble_npl_task_func_t func,
+ * void *arg, uint8_t prio, ble_npl_time_t sanity_itvl,
+ * ble_npl_stack_t *stack_bottom, uint16_t stack_size)
+ *
+ */
+int test_init(void)
+{
+ int err;
+ err = ble_npl_task_init(NULL,
+ "Null task",
+ NULL, NULL, 1, 0, NULL, 0);
+ VerifyOrQuit(err, "ble_npl_task_init accepted NULL parameters.");
+
+ err = ble_npl_task_init(&s_task[0],
+ "s_task[0]",
+ task0_run, &s_task_arg[0], 1, 0, NULL, 0);
+ SuccessOrQuit(err, "ble_npl_task_init failed.");
+
+ err = ble_npl_task_init(&s_task[1],
+ "s_task[1]",
+ task1_run, &s_task_arg[1], 1, 0, NULL, 0);
+
+ return err;
+}
+
+int main(void)
+{
+ int ret = PASS;
+ SuccessOrQuit(test_init(), "Failed: ble_npl_task_init");
+
+ pthread_exit(&ret);
+
+ return ret;
+}
diff --git a/src/libs/mynewt-nimble/porting/npl/nuttx/test/test_util.h b/src/libs/mynewt-nimble/porting/npl/nuttx/test/test_util.h
new file mode 100644
index 00000000..90985c3f
--- /dev/null
+++ b/src/libs/mynewt-nimble/porting/npl/nuttx/test/test_util.h
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#ifndef _TEST_UTIL_H_
+#define _TEST_UTIL_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#define PASS (0)
+#define FAIL (-1)
+
+#define SuccessOrQuit(ERR, MSG) \
+ do { \
+ if ((ERR)) \
+ { \
+ fprintf(stderr, "\nFAILED %s:%d - %s\n", __FUNCTION__, __LINE__, MSG); \
+ exit(-1); \
+ } \
+ } while (false)
+
+#define VerifyOrQuit(TST, MSG) \
+ do { \
+ if (!(TST)) \
+ { \
+ fprintf(stderr, "\nFAILED %s:%d - %s\n", __FUNCTION__, __LINE__, MSG); \
+ exit(-1); \
+ } \
+ } while (false)
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TEST_UTIL_H_ */
diff --git a/src/libs/mynewt-nimble/porting/npl/riot/include/logcfg/logcfg.h b/src/libs/mynewt-nimble/porting/npl/riot/include/logcfg/logcfg.h
index e21a3ae5..837cdeac 100644
--- a/src/libs/mynewt-nimble/porting/npl/riot/include/logcfg/logcfg.h
+++ b/src/libs/mynewt-nimble/porting/npl/riot/include/logcfg/logcfg.h
@@ -1,5 +1,5 @@
/**
- * This file was generated by Apache newt version: 1.8.0-dev
+ * This file was generated by Apache newt version: 1.9.0-dev
*/
#ifndef H_MYNEWT_LOGCFG_
diff --git a/src/libs/mynewt-nimble/porting/npl/riot/include/syscfg/syscfg.h b/src/libs/mynewt-nimble/porting/npl/riot/include/syscfg/syscfg.h
index e78ebe0a..816f410a 100644
--- a/src/libs/mynewt-nimble/porting/npl/riot/include/syscfg/syscfg.h
+++ b/src/libs/mynewt-nimble/porting/npl/riot/include/syscfg/syscfg.h
@@ -1,5 +1,5 @@
/**
- * This file was generated by Apache newt version: 1.8.0-dev
+ * This file was generated by Apache newt version: 1.9.0-dev
*/
#ifndef H_MYNEWT_SYSCFG_
@@ -15,8 +15,6 @@
#define MYNEWT_VAL(_name) MYNEWT_VAL_ ## _name
#define MYNEWT_VAL_CHOICE(_name, _val) MYNEWT_VAL_ ## _name ## __ ## _val
-
-
/*** @apache-mynewt-core/compiler/arm-none-eabi-m4 */
#ifndef MYNEWT_VAL_HARDFLOAT
#define MYNEWT_VAL_HARDFLOAT (0)
@@ -167,6 +165,10 @@
#define MYNEWT_VAL_NFC_PINS_AS_GPIO (1)
#endif
+#ifndef MYNEWT_VAL_OS_TICKS_PER_SEC
+#define MYNEWT_VAL_OS_TICKS_PER_SEC (128)
+#endif
+
#ifndef MYNEWT_VAL_PWM_0
#define MYNEWT_VAL_PWM_0 (0)
#endif
@@ -357,6 +359,10 @@
#undef MYNEWT_VAL_SPI_3_MASTER_PIN_SCK
+#ifndef MYNEWT_VAL_TEMP
+#define MYNEWT_VAL_TEMP (0)
+#endif
+
/* Overridden by @apache-mynewt-core/hw/bsp/nordic_pca10056 (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */
#ifndef MYNEWT_VAL_TIMER_0
#define MYNEWT_VAL_TIMER_0 (0)
@@ -427,7 +433,7 @@
#undef MYNEWT_VAL_UART_1_PIN_TX
-/* Overridden by @apache-mynewt-nimble/targets/riot (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/riot (defined by @apache-mynewt-core/hw/mcu/nordic/nrf52xxx) */
#ifndef MYNEWT_VAL_XTAL_32768
#define MYNEWT_VAL_XTAL_32768 (1)
#endif
@@ -445,12 +451,12 @@
#define MYNEWT_VAL_FLOAT_USER (0)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/riot (defined by @apache-mynewt-core/kernel/os) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/riot (defined by @apache-mynewt-core/kernel/os) */
#ifndef MYNEWT_VAL_MSYS_1_BLOCK_COUNT
#define MYNEWT_VAL_MSYS_1_BLOCK_COUNT (5)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/riot (defined by @apache-mynewt-core/kernel/os) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/riot (defined by @apache-mynewt-core/kernel/os) */
#ifndef MYNEWT_VAL_MSYS_1_BLOCK_SIZE
#define MYNEWT_VAL_MSYS_1_BLOCK_SIZE (88)
#endif
@@ -769,11 +775,19 @@
#define MYNEWT_VAL_BLE_EXT_ADV_MAX_SIZE (31)
#endif
+#ifndef MYNEWT_VAL_BLE_ISO
+#define MYNEWT_VAL_BLE_ISO (0)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_ISO_TEST
+#define MYNEWT_VAL_BLE_ISO_TEST (0)
+#endif
+
#ifndef MYNEWT_VAL_BLE_MAX_CONNECTIONS
#define MYNEWT_VAL_BLE_MAX_CONNECTIONS (1)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/riot (defined by @apache-mynewt-nimble/nimble) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/riot (defined by @apache-mynewt-nimble/nimble) */
#ifndef MYNEWT_VAL_BLE_MAX_PERIODIC_SYNCS
#define MYNEWT_VAL_BLE_MAX_PERIODIC_SYNCS (0)
#endif
@@ -823,7 +837,7 @@
#define MYNEWT_VAL_BLE_DEVICE (1)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/riot (defined by @apache-mynewt-nimble/nimble/controller) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/riot (defined by @apache-mynewt-nimble/nimble/controller) */
#ifndef MYNEWT_VAL_BLE_HW_WHITELIST_ENABLE
#define MYNEWT_VAL_BLE_HW_WHITELIST_ENABLE (0)
#endif
@@ -836,7 +850,11 @@
#define MYNEWT_VAL_BLE_LL_CFG_FEAT_CONN_PARAM_REQ (1)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/riot (defined by @apache-mynewt-nimble/nimble/controller) */
+#ifndef MYNEWT_VAL_BLE_LL_CFG_FEAT_CTRL_TO_HOST_FLOW_CONTROL
+#define MYNEWT_VAL_BLE_LL_CFG_FEAT_CTRL_TO_HOST_FLOW_CONTROL (0)
+#endif
+
+/* Overridden by @apache-mynewt-nimble/porting/targets/riot (defined by @apache-mynewt-nimble/nimble/controller) */
#ifndef MYNEWT_VAL_BLE_LL_CFG_FEAT_DATA_LEN_EXT
#define MYNEWT_VAL_BLE_LL_CFG_FEAT_DATA_LEN_EXT (0)
#endif
@@ -849,12 +867,12 @@
#define MYNEWT_VAL_BLE_LL_CFG_FEAT_LE_CODED_PHY (0)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/riot (defined by @apache-mynewt-nimble/nimble/controller) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/riot (defined by @apache-mynewt-nimble/nimble/controller) */
#ifndef MYNEWT_VAL_BLE_LL_CFG_FEAT_LE_CSA2
#define MYNEWT_VAL_BLE_LL_CFG_FEAT_LE_CSA2 (1)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/riot (defined by @apache-mynewt-nimble/nimble/controller) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/riot (defined by @apache-mynewt-nimble/nimble/controller) */
#ifndef MYNEWT_VAL_BLE_LL_CFG_FEAT_LE_ENCRYPTION
#define MYNEWT_VAL_BLE_LL_CFG_FEAT_LE_ENCRYPTION (0)
#endif
@@ -868,6 +886,16 @@
#define MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_EXT_ADV (0)
#endif
+/* Value copied from BLE_ISO */
+#ifndef MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_ISO
+#define MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_ISO (0)
+#endif
+
+/* Value copied from BLE_ISO_TEST */
+#ifndef MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_ISO_TEST
+#define MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_ISO_TEST (0)
+#endif
+
/* Value copied from BLE_PERIODIC_ADV */
#ifndef MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_PERIODIC_ADV
#define MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_PERIODIC_ADV (0)
@@ -888,16 +916,20 @@
#define MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_PERIODIC_ADV_SYNC_TRANSFER (0)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/riot (defined by @apache-mynewt-nimble/nimble/controller) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/riot (defined by @apache-mynewt-nimble/nimble/controller) */
#ifndef MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_PRIVACY
#define MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_PRIVACY (0)
#endif
+#ifndef MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_SCA_UPDATE
+#define MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_SCA_UPDATE (0)
+#endif
+
#ifndef MYNEWT_VAL_BLE_LL_CFG_FEAT_SLAVE_INIT_FEAT_XCHG
#define MYNEWT_VAL_BLE_LL_CFG_FEAT_SLAVE_INIT_FEAT_XCHG (1)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/riot (defined by @apache-mynewt-nimble/nimble/controller) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/riot (defined by @apache-mynewt-nimble/nimble/controller) */
#ifndef MYNEWT_VAL_BLE_LL_CONN_INIT_MAX_TX_BYTES
#define MYNEWT_VAL_BLE_LL_CONN_INIT_MAX_TX_BYTES (MYNEWT_VAL_BLE_LL_MAX_PKT_SIZE)
#endif
@@ -910,12 +942,20 @@
#define MYNEWT_VAL_BLE_LL_CONN_INIT_SLOTS (4)
#endif
-#ifndef MYNEWT_VAL_BLE_LL_DBG_HCI_CMD_PIN
-#define MYNEWT_VAL_BLE_LL_DBG_HCI_CMD_PIN (-1)
+#ifndef MYNEWT_VAL_BLE_LL_DEBUG_GPIO_HCI_CMD
+#define MYNEWT_VAL_BLE_LL_DEBUG_GPIO_HCI_CMD (-1)
#endif
-#ifndef MYNEWT_VAL_BLE_LL_DBG_HCI_EV_PIN
-#define MYNEWT_VAL_BLE_LL_DBG_HCI_EV_PIN (-1)
+#ifndef MYNEWT_VAL_BLE_LL_DEBUG_GPIO_HCI_EV
+#define MYNEWT_VAL_BLE_LL_DEBUG_GPIO_HCI_EV (-1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_LL_DEBUG_GPIO_SCHED_ITEM_CB
+#define MYNEWT_VAL_BLE_LL_DEBUG_GPIO_SCHED_ITEM_CB (-1)
+#endif
+
+#ifndef MYNEWT_VAL_BLE_LL_DEBUG_GPIO_SCHED_RUN
+#define MYNEWT_VAL_BLE_LL_DEBUG_GPIO_SCHED_RUN (-1)
#endif
#ifndef MYNEWT_VAL_BLE_LL_DIRECT_TEST_MODE
@@ -980,6 +1020,11 @@
#define MYNEWT_VAL_BLE_LL_RNG_BUFSIZE (32)
#endif
+/* Value copied from BLE_LL_OUR_SCA */
+#ifndef MYNEWT_VAL_BLE_LL_SCA
+#define MYNEWT_VAL_BLE_LL_SCA (60)
+#endif
+
#ifndef MYNEWT_VAL_BLE_LL_SCHED_AUX_CHAIN_MAFS_DELAY
#define MYNEWT_VAL_BLE_LL_SCHED_AUX_CHAIN_MAFS_DELAY (0)
#endif
@@ -1000,12 +1045,12 @@
#define MYNEWT_VAL_BLE_LL_STRICT_CONN_SCHEDULING (0)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/riot (defined by @apache-mynewt-nimble/nimble/controller) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/riot (defined by @apache-mynewt-nimble/nimble/controller) */
#ifndef MYNEWT_VAL_BLE_LL_SUPP_MAX_RX_BYTES
#define MYNEWT_VAL_BLE_LL_SUPP_MAX_RX_BYTES (MYNEWT_VAL_BLE_LL_MAX_PKT_SIZE)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/riot (defined by @apache-mynewt-nimble/nimble/controller) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/riot (defined by @apache-mynewt-nimble/nimble/controller) */
#ifndef MYNEWT_VAL_BLE_LL_SUPP_MAX_TX_BYTES
#define MYNEWT_VAL_BLE_LL_SUPP_MAX_TX_BYTES (MYNEWT_VAL_BLE_LL_MAX_PKT_SIZE)
#endif
@@ -1372,7 +1417,7 @@
#define MYNEWT_VAL_BLE_SM_KEYPRESS (0)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/riot (defined by @apache-mynewt-nimble/nimble/host) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/riot (defined by @apache-mynewt-nimble/nimble/host) */
#ifndef MYNEWT_VAL_BLE_SM_LEGACY
#define MYNEWT_VAL_BLE_SM_LEGACY (0)
#endif
@@ -1393,7 +1438,7 @@
#define MYNEWT_VAL_BLE_SM_OUR_KEY_DIST (0)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/riot (defined by @apache-mynewt-nimble/nimble/host) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/riot (defined by @apache-mynewt-nimble/nimble/host) */
#ifndef MYNEWT_VAL_BLE_SM_SC
#define MYNEWT_VAL_BLE_SM_SC (0)
#endif
@@ -1465,9 +1510,9 @@
#endif
/*** @apache-mynewt-nimble/nimble/transport/ram */
-/* Overridden by @apache-mynewt-nimble/targets/riot (defined by @apache-mynewt-nimble/nimble/transport/ram) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/riot (defined by @apache-mynewt-nimble/nimble/transport/ram) */
#ifndef MYNEWT_VAL_BLE_ACL_BUF_COUNT
-#define MYNEWT_VAL_BLE_ACL_BUF_COUNT (4)
+#define MYNEWT_VAL_BLE_ACL_BUF_COUNT (24)
#endif
#ifndef MYNEWT_VAL_BLE_ACL_BUF_SIZE
@@ -1478,7 +1523,7 @@
#define MYNEWT_VAL_BLE_HCI_EVT_BUF_SIZE (70)
#endif
-/* Overridden by @apache-mynewt-nimble/targets/riot (defined by @apache-mynewt-nimble/nimble/transport/ram) */
+/* Overridden by @apache-mynewt-nimble/porting/targets/riot (defined by @apache-mynewt-nimble/nimble/transport/ram) */
#ifndef MYNEWT_VAL_BLE_HCI_EVT_HI_BUF_COUNT
#define MYNEWT_VAL_BLE_HCI_EVT_HI_BUF_COUNT (2)
#endif
diff --git a/src/libs/mynewt-nimble/porting/npl/riot/include/sysflash/sysflash.h b/src/libs/mynewt-nimble/porting/npl/riot/include/sysflash/sysflash.h
index 413cb267..ab1341b2 100644
--- a/src/libs/mynewt-nimble/porting/npl/riot/include/sysflash/sysflash.h
+++ b/src/libs/mynewt-nimble/porting/npl/riot/include/sysflash/sysflash.h
@@ -1,5 +1,5 @@
/**
- * This file was generated by Apache newt version: 1.8.0-dev
+ * This file was generated by Apache newt version: 1.9.0-dev
*/
#ifndef H_MYNEWT_SYSFLASH_
diff --git a/src/libs/mynewt-nimble/porting/targets/linux/pkg.yml b/src/libs/mynewt-nimble/porting/targets/linux/pkg.yml
index f1159d4a..c819a83c 100644
--- a/src/libs/mynewt-nimble/porting/targets/linux/pkg.yml
+++ b/src/libs/mynewt-nimble/porting/targets/linux/pkg.yml
@@ -16,7 +16,7 @@
# under the License.
#
-pkg.name: "targets/linux"
+pkg.name: "porting/targets/linux"
pkg.type: "target"
pkg.description: This target is used to generate syscfg.h file and other artifacts for linux example app.
pkg.author:
diff --git a/src/libs/mynewt-nimble/porting/targets/linux_blemesh/pkg.yml b/src/libs/mynewt-nimble/porting/targets/linux_blemesh/pkg.yml
index c3149333..3cbe09a4 100644
--- a/src/libs/mynewt-nimble/porting/targets/linux_blemesh/pkg.yml
+++ b/src/libs/mynewt-nimble/porting/targets/linux_blemesh/pkg.yml
@@ -16,7 +16,7 @@
# under the License.
#
-pkg.name: "targets/linux_blemesh"
+pkg.name: "porting/targets/linux_blemesh"
pkg.type: "target"
pkg.description: This target is used to generate syscfg.h file and other artifacts for linux_blemesh example app.
pkg.author:
diff --git a/src/libs/mynewt-nimble/porting/targets/nuttx/pkg.yml b/src/libs/mynewt-nimble/porting/targets/nuttx/pkg.yml
new file mode 100644
index 00000000..e105cd63
--- /dev/null
+++ b/src/libs/mynewt-nimble/porting/targets/nuttx/pkg.yml
@@ -0,0 +1,40 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+pkg.name: "porting/targets/nuttx"
+pkg.type: "target"
+pkg.description: This target is used to generate syscfg.h file and other artifacts for nuttx example app.
+pkg.author:
+pkg.homepage:
+
+pkg.deps:
+- "@apache-mynewt-core/kernel/os"
+- "@apache-mynewt-core/sys/console/stub"
+- "@apache-mynewt-core/sys/log/stub"
+- "@apache-mynewt-core/sys/stats/stub"
+- "@apache-mynewt-nimble/nimble/host"
+- "@apache-mynewt-nimble/nimble/transport/socket"
+- "@apache-mynewt-nimble/nimble/host/services/ans"
+- "@apache-mynewt-nimble/nimble/host/services/bas"
+- "@apache-mynewt-nimble/nimble/host/services/dis"
+- "@apache-mynewt-nimble/nimble/host/services/gap"
+- "@apache-mynewt-nimble/nimble/host/services/gatt"
+- "@apache-mynewt-nimble/nimble/host/services/ias"
+- "@apache-mynewt-nimble/nimble/host/services/ipss"
+- "@apache-mynewt-nimble/nimble/host/services/lls"
+- "@apache-mynewt-nimble/nimble/host/services/tps"
diff --git a/src/libs/mynewt-nimble/porting/targets/nuttx/syscfg.yml b/src/libs/mynewt-nimble/porting/targets/nuttx/syscfg.yml
new file mode 100644
index 00000000..fdfa7b59
--- /dev/null
+++ b/src/libs/mynewt-nimble/porting/targets/nuttx/syscfg.yml
@@ -0,0 +1,28 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+syscfg.vals:
+ BLE_SOCK_USE_TCP: 0
+ BLE_SOCK_USE_NUTTX: 1
+ BLE_SOCK_TASK_PRIO: 3
+ BLE_SOCK_STACK_SIZE: 1028
+ BLE_LL_CFG_FEAT_LL_PRIVACY: 0
+ LOG_LEVEL: 2
+ BLE_SM_LEGACY: 1
+ BLE_SM_SC: 1
+
diff --git a/src/libs/mynewt-nimble/porting/targets/nuttx/target.yml b/src/libs/mynewt-nimble/porting/targets/nuttx/target.yml
new file mode 100644
index 00000000..9ab4152c
--- /dev/null
+++ b/src/libs/mynewt-nimble/porting/targets/nuttx/target.yml
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+target.app: "porting/targets/dummy_app"
+target.bsp: "porting/targets/dummy_bsp"
+target.build_profile: "debug"
diff --git a/src/libs/mynewt-nimble/porting/targets/porting_default/pkg.yml b/src/libs/mynewt-nimble/porting/targets/porting_default/pkg.yml
index f7319c25..44a34ba0 100644
--- a/src/libs/mynewt-nimble/porting/targets/porting_default/pkg.yml
+++ b/src/libs/mynewt-nimble/porting/targets/porting_default/pkg.yml
@@ -16,7 +16,7 @@
# under the License.
#
-pkg.name: "targets/porting_default"
+pkg.name: "porting/targets/porting_default"
pkg.type: "target"
pkg.description: This target is used to generate syscfg.h file and other artifacts for default Nimble port includes.
pkg.author:
diff --git a/src/libs/mynewt-nimble/porting/targets/riot/pkg.yml b/src/libs/mynewt-nimble/porting/targets/riot/pkg.yml
index b6610c30..7d1a3243 100644
--- a/src/libs/mynewt-nimble/porting/targets/riot/pkg.yml
+++ b/src/libs/mynewt-nimble/porting/targets/riot/pkg.yml
@@ -16,7 +16,7 @@
# under the License.
#
-pkg.name: "targets/riot"
+pkg.name: "porting/targets/riot"
pkg.type: "target"
pkg.description: This target is used to generate syscfg.h file and other artifacts for RIOT Nimble port.
pkg.author:
diff --git a/src/libs/mynewt-nimble/porting/targets/riot/syscfg.yml b/src/libs/mynewt-nimble/porting/targets/riot/syscfg.yml
index 7bbb57fe..d6ee102b 100644
--- a/src/libs/mynewt-nimble/porting/targets/riot/syscfg.yml
+++ b/src/libs/mynewt-nimble/porting/targets/riot/syscfg.yml
@@ -17,7 +17,7 @@
#
syscfg.vals:
- BLE_ACL_BUF_COUNT: 4
+ BLE_ACL_BUF_COUNT: 24
BLE_HCI_EVT_HI_BUF_COUNT: 2
BLE_HW_WHITELIST_ENABLE: 0
BLE_LL_CFG_FEAT_DATA_LEN_EXT: 0
diff --git a/src/libs/mynewt-nimble/porting/update_generated_files.sh b/src/libs/mynewt-nimble/porting/update_generated_files.sh
index c01dddd2..6309ed2b 100755
--- a/src/libs/mynewt-nimble/porting/update_generated_files.sh
+++ b/src/libs/mynewt-nimble/porting/update_generated_files.sh
@@ -23,6 +23,7 @@ if [ ! -f "project.yml" ]; then
fi
declare -A targets=(
+ ["nuttx"]="repos/apache-mynewt-nimble/porting/examples/nuttx/"
["linux"]="repos/apache-mynewt-nimble/porting/examples/linux/"
["linux_blemesh"]="repos/apache-mynewt-nimble/porting/examples/linux_blemesh/"
["porting_default"]="repos/apache-mynewt-nimble/porting/nimble"
@@ -31,6 +32,11 @@ declare -A targets=(
for target in "${!targets[@]}"; do
echo "Updating target $target"
- newt build "$target" > /dev/null 2>&1
- cp "bin/@apache-mynewt-nimble/targets/${target}/generated/include" "${targets[$target]}" -r
+ newt build "@apache-mynewt-nimble/porting/targets/$target" > /dev/null 2>&1
+ cp "bin/@apache-mynewt-nimble/porting/targets/${target}/generated/include" "${targets[$target]}" -r
+ # Remove repo version and hash MYNEWT_VALS as it doesn't make much sense to commit them and they
+ # defeat the purpose of this script.
+ find "${targets[$target]}/include" -type f -name 'syscfg.h' -exec sed -i '/MYNEWT_VAL_REPO_*/,/#endif/d' {} \;
+ find "${targets[$target]}/include" -type f -name 'syscfg.h' -exec sed -i '/\/\*\*\* Repository/,/\*\//d' {} \;
+ find "${targets[$target]}/include" -type f -name 'syscfg.h' -exec sed -i '$!N;/^\n$/{$q;D;};P;D;' {} \;
done
diff --git a/src/libs/mynewt-nimble/targets/dialog_cmac/pkg.yml b/src/libs/mynewt-nimble/targets/dialog_cmac/pkg.yml
new file mode 100644
index 00000000..31242b20
--- /dev/null
+++ b/src/libs/mynewt-nimble/targets/dialog_cmac/pkg.yml
@@ -0,0 +1,5 @@
+pkg.name: targets/dialog_cmac
+pkg.type: target
+pkg.description: Sample target for BLE controller on Dialog CMAC
+pkg.author: "Apache Mynewt <dev@mynewt.apache.org>"
+pkg.homepage: "http://mynewt.apache.org/"
diff --git a/src/libs/mynewt-nimble/targets/dialog_cmac/syscfg.yml b/src/libs/mynewt-nimble/targets/dialog_cmac/syscfg.yml
new file mode 100644
index 00000000..2f4d3348
--- /dev/null
+++ b/src/libs/mynewt-nimble/targets/dialog_cmac/syscfg.yml
@@ -0,0 +1,16 @@
+syscfg.vals:
+ MCU_DEEP_SLEEP: 1
+ MCU_SLP_TIMER: 1
+ MCU_SLP_TIMER_32K_ONLY: 1
+
+ BLE_HCI_TRANSPORT: dialog_cmac
+
+ # LL recommended settings (decreasing timing values is not recommended)
+ BLE_LL_CFG_FEAT_CTRL_TO_HOST_FLOW_CONTROL: 1
+ BLE_LL_CONN_INIT_MIN_WIN_OFFSET: 2
+ BLE_LL_RFMGMT_ENABLE_TIME: 20
+ BLE_LL_SCHED_AUX_MAFS_DELAY: 150
+ BLE_LL_SCHED_AUX_CHAIN_MAFS_DELAY: 150
+
+ # NOTE: set public address in target settings
+ # BLE_PUBLIC_DEV_ADDR: "(uint8_t[6]){0xff, 0xff, 0xff, 0xff, 0xff, 0xff}"
diff --git a/src/libs/mynewt-nimble/targets/dialog_cmac/target.yml b/src/libs/mynewt-nimble/targets/dialog_cmac/target.yml
new file mode 100644
index 00000000..e3ca85cd
--- /dev/null
+++ b/src/libs/mynewt-nimble/targets/dialog_cmac/target.yml
@@ -0,0 +1,3 @@
+target.app: "@apache-mynewt-nimble/apps/blehci"
+target.bsp: "@apache-mynewt-core/hw/bsp/dialog_cmac"
+target.build_profile: speed
diff --git a/src/main.cpp b/src/main.cpp
index 56bc35bc..03cb1687 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -30,6 +30,7 @@
#include "components/battery/BatteryController.h"
#include "components/ble/BleController.h"
#include "components/ble/NotificationManager.h"
+#include "components/motor/MotorController.h"
#include "components/datetime/DateTimeController.h"
#include "drivers/Spi.h"
#include "drivers/SpiMaster.h"
@@ -107,7 +108,7 @@ void ble_manager_set_ble_disconnection_callback(void (*disconnection)());
static constexpr uint8_t pinTouchIrq = 28;
std::unique_ptr<Pinetime::System::SystemTask> systemTask;
-Pinetime::Controllers::NotificationManager notificationManager;
+Pinetime::Controllers::MotorController motorController;
void nrfx_gpiote_evt_handler(nrfx_gpiote_pin_t pin, nrf_gpiote_polarity_t action) {
if(pin == pinTouchIrq) {
@@ -251,7 +252,7 @@ int main(void) {
debounceTimer = xTimerCreate ("debounceTimer", 200, pdFALSE, (void *) 0, DebounceTimerCallback);
systemTask.reset(new Pinetime::System::SystemTask(spi, lcd, spiNorFlash, twiMaster, touchPanel, lvgl, batteryController, bleController,
- dateTimeController, notificationManager, heartRateSensor));
+ dateTimeController, motorController, heartRateSensor));
systemTask->Start();
nimble_port_init();
diff --git a/src/systemtask/SystemTask.cpp b/src/systemtask/SystemTask.cpp
index 11379fd3..a4f2b14a 100644
--- a/src/systemtask/SystemTask.cpp
+++ b/src/systemtask/SystemTask.cpp
@@ -39,14 +39,14 @@ SystemTask::SystemTask(Drivers::SpiMaster &spi, Drivers::St7789 &lcd,
Components::LittleVgl &lvgl,
Controllers::Battery &batteryController, Controllers::Ble &bleController,
Controllers::DateTime &dateTimeController,
- Pinetime::Controllers::NotificationManager& notificationManager,
+ Pinetime::Controllers::MotorController& motorController,
Pinetime::Drivers::Hrs3300& heartRateSensor) :
spi{spi}, lcd{lcd}, spiNorFlash{spiNorFlash},
twiMaster{twiMaster}, touchPanel{touchPanel}, lvgl{lvgl}, batteryController{batteryController},
heartRateController{*this},
bleController{bleController}, dateTimeController{dateTimeController},
- watchdog{}, watchdogView{watchdog}, notificationManager{notificationManager},
- heartRateSensor{heartRateSensor},
+ watchdog{}, watchdogView{watchdog},
+ motorController{motorController}, heartRateSensor{heartRateSensor},
nimbleController(*this, bleController,dateTimeController, notificationManager, batteryController, spiNorFlash, heartRateController) {
systemTasksMsgQueue = xQueueCreate(10, 1);
}
@@ -79,9 +79,12 @@ void SystemTask::Work() {
twiMaster.Init();
touchPanel.Init();
batteryController.Init();
+ motorController.Init();
+
displayApp.reset(new Pinetime::Applications::DisplayApp(lcd, lvgl, touchPanel, batteryController, bleController,
- dateTimeController, watchdogView, *this, notificationManager, heartRateController));
+ dateTimeController, watchdogView, *this, notificationManager,
+ heartRateController));
displayApp->Start();
batteryController.Update();
@@ -158,6 +161,7 @@ void SystemTask::Work() {
break;
case Messages::OnNewNotification:
if(isSleeping && !isWakingUp) GoToRunning();
+ if(notificationManager.IsVibrationEnabled()) motorController.SetDuration(35);
displayApp->PushMessage(Pinetime::Applications::Display::Messages::NewNotification);
break;
case Messages::BleConnected:
diff --git a/src/systemtask/SystemTask.h b/src/systemtask/SystemTask.h
index 5585f0df..eadbc72d 100644
--- a/src/systemtask/SystemTask.h
+++ b/src/systemtask/SystemTask.h
@@ -12,7 +12,7 @@
#include "components/battery/BatteryController.h"
#include "components/ble/NimbleController.h"
#include "components/ble/NotificationManager.h"
-
+#include "components/motor/MotorController.h"
#ifdef PINETIME_IS_RECOVERY
#include "displayapp/DisplayAppRecovery.h"
#include "displayapp/DummyLittleVgl.h"
@@ -35,7 +35,7 @@ namespace Pinetime {
namespace System {
class SystemTask {
public:
- enum class Messages {GoToSleep, GoToRunning, OnNewTime, OnNewNotification, BleConnected,
+ enum class Messages {GoToSleep, GoToRunning, OnNewTime, OnNewNotification, OnNewCall, BleConnected,
BleFirmwareUpdateStarted, BleFirmwareUpdateFinished, OnTouchEvent, OnButtonEvent, OnDisplayTaskSleeping
};
@@ -45,7 +45,7 @@ namespace Pinetime {
Components::LittleVgl &lvgl,
Controllers::Battery &batteryController, Controllers::Ble &bleController,
Controllers::DateTime &dateTimeController,
- Pinetime::Controllers::NotificationManager& manager,
+ Pinetime::Controllers::MotorController& motorController,
Pinetime::Drivers::Hrs3300& heartRateSensor);
@@ -81,7 +81,8 @@ namespace Pinetime {
std::atomic<bool> isWakingUp{false};
Pinetime::Drivers::Watchdog watchdog;
Pinetime::Drivers::WatchdogView watchdogView;
- Pinetime::Controllers::NotificationManager& notificationManager;
+ Pinetime::Controllers::NotificationManager notificationManager;
+ Pinetime::Controllers::MotorController& motorController;
Pinetime::Drivers::Hrs3300& heartRateSensor;
Pinetime::Controllers::NimbleController nimbleController;
Controllers::BrightnessController brightnessController;