├── CHANGELOG.md ├── README.md ├── embedded ├── CMSIS │ ├── Core │ │ └── Include │ │ │ ├── cmsis_armcc.h │ │ │ ├── cmsis_armclang.h │ │ │ ├── cmsis_compiler.h │ │ │ ├── cmsis_gcc.h │ │ │ ├── cmsis_iccarm.h │ │ │ ├── cmsis_version.h │ │ │ ├── core_armv8mbl.h │ │ │ ├── core_armv8mml.h │ │ │ ├── core_cm0.h │ │ │ ├── core_cm0plus.h │ │ │ ├── core_cm1.h │ │ │ ├── core_cm23.h │ │ │ ├── core_cm3.h │ │ │ ├── core_cm33.h │ │ │ ├── core_cm4.h │ │ │ ├── core_cm7.h │ │ │ ├── core_sc000.h │ │ │ ├── core_sc300.h │ │ │ ├── mpu_armv7.h │ │ │ ├── mpu_armv8.h │ │ │ └── tz_context.h │ └── Device │ │ └── ST │ │ └── STM32L4xx │ │ ├── Include │ │ ├── stm32l476xx.h │ │ ├── stm32l4xx.h │ │ └── system_stm32l4xx.h │ │ └── Source │ │ ├── arm │ │ └── startup_stm32l476xx.s │ │ ├── gcc │ │ └── startup_stm32l476xx.s │ │ └── system_stm32l4xx.c ├── Makefile ├── STM32L4xx_HAL_Driver │ ├── Inc │ │ ├── Legacy │ │ │ ├── stm32_hal_legacy.h │ │ │ └── stm32l4xx_hal_can_legacy.h │ │ ├── stm32_assert_template.h │ │ ├── stm32l4xx_hal.h │ │ ├── stm32l4xx_hal_adc.h │ │ ├── stm32l4xx_hal_adc_ex.h │ │ ├── stm32l4xx_hal_can.h │ │ ├── stm32l4xx_hal_comp.h │ │ ├── stm32l4xx_hal_conf_template.h │ │ ├── stm32l4xx_hal_cortex.h │ │ ├── stm32l4xx_hal_crc.h │ │ ├── stm32l4xx_hal_crc_ex.h │ │ ├── stm32l4xx_hal_cryp.h │ │ ├── stm32l4xx_hal_cryp_ex.h │ │ ├── stm32l4xx_hal_dac.h │ │ ├── stm32l4xx_hal_dac_ex.h │ │ ├── stm32l4xx_hal_dcmi.h │ │ ├── stm32l4xx_hal_def.h │ │ ├── stm32l4xx_hal_dfsdm.h │ │ ├── stm32l4xx_hal_dfsdm_ex.h │ │ ├── stm32l4xx_hal_dma.h │ │ ├── stm32l4xx_hal_dma2d.h │ │ ├── stm32l4xx_hal_dma_ex.h │ │ ├── stm32l4xx_hal_dsi.h │ │ ├── stm32l4xx_hal_exti.h │ │ ├── stm32l4xx_hal_firewall.h │ │ ├── stm32l4xx_hal_flash.h │ │ ├── stm32l4xx_hal_flash_ex.h │ │ ├── stm32l4xx_hal_flash_ramfunc.h │ │ ├── stm32l4xx_hal_gfxmmu.h │ │ ├── stm32l4xx_hal_gpio.h │ │ ├── stm32l4xx_hal_gpio_ex.h │ │ ├── stm32l4xx_hal_hash.h │ │ ├── stm32l4xx_hal_hash_ex.h │ │ ├── stm32l4xx_hal_hcd.h │ │ ├── stm32l4xx_hal_i2c.h │ │ ├── stm32l4xx_hal_i2c_ex.h │ │ ├── stm32l4xx_hal_irda.h │ │ ├── stm32l4xx_hal_irda_ex.h │ │ ├── stm32l4xx_hal_iwdg.h │ │ ├── stm32l4xx_hal_lcd.h │ │ ├── stm32l4xx_hal_lptim.h │ │ ├── stm32l4xx_hal_ltdc.h │ │ ├── stm32l4xx_hal_ltdc_ex.h │ │ ├── stm32l4xx_hal_mmc.h │ │ ├── stm32l4xx_hal_mmc_ex.h │ │ ├── stm32l4xx_hal_nand.h │ │ ├── stm32l4xx_hal_nor.h │ │ ├── stm32l4xx_hal_opamp.h │ │ ├── stm32l4xx_hal_opamp_ex.h │ │ ├── stm32l4xx_hal_ospi.h │ │ ├── stm32l4xx_hal_pcd.h │ │ ├── stm32l4xx_hal_pcd_ex.h │ │ ├── stm32l4xx_hal_pka.h │ │ ├── stm32l4xx_hal_pssi.h │ │ ├── stm32l4xx_hal_pwr.h │ │ ├── stm32l4xx_hal_pwr_ex.h │ │ ├── stm32l4xx_hal_qspi.h │ │ ├── stm32l4xx_hal_rcc.h │ │ ├── stm32l4xx_hal_rcc_ex.h │ │ ├── stm32l4xx_hal_rng.h │ │ ├── stm32l4xx_hal_rng_ex.h │ │ ├── stm32l4xx_hal_rtc.h │ │ ├── stm32l4xx_hal_rtc_ex.h │ │ ├── stm32l4xx_hal_sai.h │ │ ├── stm32l4xx_hal_sai_ex.h │ │ ├── stm32l4xx_hal_sd.h │ │ ├── stm32l4xx_hal_sd_ex.h │ │ ├── stm32l4xx_hal_smartcard.h │ │ ├── stm32l4xx_hal_smartcard_ex.h │ │ ├── stm32l4xx_hal_smbus.h │ │ ├── stm32l4xx_hal_spi.h │ │ ├── stm32l4xx_hal_spi_ex.h │ │ ├── stm32l4xx_hal_sram.h │ │ ├── stm32l4xx_hal_swpmi.h │ │ ├── stm32l4xx_hal_tim.h │ │ ├── stm32l4xx_hal_tim_ex.h │ │ ├── stm32l4xx_hal_tsc.h │ │ ├── stm32l4xx_hal_uart.h │ │ ├── stm32l4xx_hal_uart_ex.h │ │ ├── stm32l4xx_hal_usart.h │ │ ├── stm32l4xx_hal_usart_ex.h │ │ ├── stm32l4xx_hal_wwdg.h │ │ ├── stm32l4xx_ll_adc.h │ │ ├── stm32l4xx_ll_bus.h │ │ ├── stm32l4xx_ll_comp.h │ │ ├── stm32l4xx_ll_cortex.h │ │ ├── stm32l4xx_ll_crc.h │ │ ├── stm32l4xx_ll_crs.h │ │ ├── stm32l4xx_ll_dac.h │ │ ├── stm32l4xx_ll_dma.h │ │ ├── stm32l4xx_ll_dma2d.h │ │ ├── stm32l4xx_ll_dmamux.h │ │ ├── stm32l4xx_ll_exti.h │ │ ├── stm32l4xx_ll_fmc.h │ │ ├── stm32l4xx_ll_gpio.h │ │ ├── stm32l4xx_ll_i2c.h │ │ ├── stm32l4xx_ll_iwdg.h │ │ ├── stm32l4xx_ll_lptim.h │ │ ├── stm32l4xx_ll_lpuart.h │ │ ├── stm32l4xx_ll_opamp.h │ │ ├── stm32l4xx_ll_pka.h │ │ ├── stm32l4xx_ll_pwr.h │ │ ├── stm32l4xx_ll_rcc.h │ │ ├── stm32l4xx_ll_rng.h │ │ ├── stm32l4xx_ll_rtc.h │ │ ├── stm32l4xx_ll_sdmmc.h │ │ ├── stm32l4xx_ll_spi.h │ │ ├── stm32l4xx_ll_swpmi.h │ │ ├── stm32l4xx_ll_system.h │ │ ├── stm32l4xx_ll_tim.h │ │ ├── stm32l4xx_ll_usart.h │ │ ├── stm32l4xx_ll_usb.h │ │ ├── stm32l4xx_ll_utils.h │ │ └── stm32l4xx_ll_wwdg.h │ ├── Release_Notes.html │ ├── Src │ │ ├── Legacy │ │ │ └── stm32l4xx_hal_can.c │ │ ├── stm32l4xx_hal.c │ │ ├── stm32l4xx_hal_adc.c │ │ ├── stm32l4xx_hal_adc_ex.c │ │ ├── stm32l4xx_hal_can.c │ │ ├── stm32l4xx_hal_comp.c │ │ ├── stm32l4xx_hal_cortex.c │ │ ├── stm32l4xx_hal_crc.c │ │ ├── stm32l4xx_hal_crc_ex.c │ │ ├── stm32l4xx_hal_cryp.c │ │ ├── stm32l4xx_hal_cryp_ex.c │ │ ├── stm32l4xx_hal_dac.c │ │ ├── stm32l4xx_hal_dac_ex.c │ │ ├── stm32l4xx_hal_dcmi.c │ │ ├── stm32l4xx_hal_dfsdm.c │ │ ├── stm32l4xx_hal_dfsdm_ex.c │ │ ├── stm32l4xx_hal_dma.c │ │ ├── stm32l4xx_hal_dma2d.c │ │ ├── stm32l4xx_hal_dma_ex.c │ │ ├── stm32l4xx_hal_dsi.c │ │ ├── stm32l4xx_hal_exti.c │ │ ├── stm32l4xx_hal_firewall.c │ │ ├── stm32l4xx_hal_flash.c │ │ ├── stm32l4xx_hal_flash_ex.c │ │ ├── stm32l4xx_hal_flash_ramfunc.c │ │ ├── stm32l4xx_hal_gfxmmu.c │ │ ├── stm32l4xx_hal_gpio.c │ │ ├── stm32l4xx_hal_hash.c │ │ ├── stm32l4xx_hal_hash_ex.c │ │ ├── stm32l4xx_hal_hcd.c │ │ ├── stm32l4xx_hal_i2c.c │ │ ├── stm32l4xx_hal_i2c_ex.c │ │ ├── stm32l4xx_hal_irda.c │ │ ├── stm32l4xx_hal_iwdg.c │ │ ├── stm32l4xx_hal_lcd.c │ │ ├── stm32l4xx_hal_lptim.c │ │ ├── stm32l4xx_hal_ltdc.c │ │ ├── stm32l4xx_hal_ltdc_ex.c │ │ ├── stm32l4xx_hal_mmc.c │ │ ├── stm32l4xx_hal_mmc_ex.c │ │ ├── stm32l4xx_hal_msp_template.c │ │ ├── stm32l4xx_hal_nand.c │ │ ├── stm32l4xx_hal_nor.c │ │ ├── stm32l4xx_hal_opamp.c │ │ ├── stm32l4xx_hal_opamp_ex.c │ │ ├── stm32l4xx_hal_ospi.c │ │ ├── stm32l4xx_hal_pcd.c │ │ ├── stm32l4xx_hal_pcd_ex.c │ │ ├── stm32l4xx_hal_pka.c │ │ ├── stm32l4xx_hal_pssi.c │ │ ├── stm32l4xx_hal_pwr.c │ │ ├── stm32l4xx_hal_pwr_ex.c │ │ ├── stm32l4xx_hal_qspi.c │ │ ├── stm32l4xx_hal_rcc.c │ │ ├── stm32l4xx_hal_rcc_ex.c │ │ ├── stm32l4xx_hal_rng.c │ │ ├── stm32l4xx_hal_rng_ex.c │ │ ├── stm32l4xx_hal_rtc.c │ │ ├── stm32l4xx_hal_rtc_ex.c │ │ ├── stm32l4xx_hal_sai.c │ │ ├── stm32l4xx_hal_sai_ex.c │ │ ├── stm32l4xx_hal_sd.c │ │ ├── stm32l4xx_hal_sd_ex.c │ │ ├── stm32l4xx_hal_smartcard.c │ │ ├── stm32l4xx_hal_smartcard_ex.c │ │ ├── stm32l4xx_hal_smbus.c │ │ ├── stm32l4xx_hal_spi.c │ │ ├── stm32l4xx_hal_spi_ex.c │ │ ├── stm32l4xx_hal_sram.c │ │ ├── stm32l4xx_hal_swpmi.c │ │ ├── stm32l4xx_hal_tim.c │ │ ├── stm32l4xx_hal_tim_ex.c │ │ ├── stm32l4xx_hal_timebase_tim_template.c │ │ ├── stm32l4xx_hal_tsc.c │ │ ├── stm32l4xx_hal_uart.c │ │ ├── stm32l4xx_hal_uart_ex.c │ │ ├── stm32l4xx_hal_usart.c │ │ ├── stm32l4xx_hal_usart_ex.c │ │ ├── stm32l4xx_hal_wwdg.c │ │ ├── stm32l4xx_ll_adc.c │ │ ├── stm32l4xx_ll_comp.c │ │ ├── stm32l4xx_ll_crc.c │ │ ├── stm32l4xx_ll_crs.c │ │ ├── stm32l4xx_ll_dac.c │ │ ├── stm32l4xx_ll_dma.c │ │ ├── stm32l4xx_ll_dma2d.c │ │ ├── stm32l4xx_ll_exti.c │ │ ├── stm32l4xx_ll_fmc.c │ │ ├── stm32l4xx_ll_gpio.c │ │ ├── stm32l4xx_ll_i2c.c │ │ ├── stm32l4xx_ll_lptim.c │ │ ├── stm32l4xx_ll_lpuart.c │ │ ├── stm32l4xx_ll_opamp.c │ │ ├── stm32l4xx_ll_pka.c │ │ ├── stm32l4xx_ll_pwr.c │ │ ├── stm32l4xx_ll_rcc.c │ │ ├── stm32l4xx_ll_rng.c │ │ ├── stm32l4xx_ll_rtc.c │ │ ├── stm32l4xx_ll_sdmmc.c │ │ ├── stm32l4xx_ll_spi.c │ │ ├── stm32l4xx_ll_swpmi.c │ │ ├── stm32l4xx_ll_tim.c │ │ ├── stm32l4xx_ll_usart.c │ │ ├── stm32l4xx_ll_usb.c │ │ └── stm32l4xx_ll_utils.c │ └── _htmresc │ │ ├── mini-st.css │ │ └── st_logo.png ├── application │ ├── inc │ │ ├── configuration.h │ │ ├── timer_interface_implementation.h │ │ ├── version.h │ │ └── version_file.h │ └── src │ │ ├── lr1110_hal.c │ │ ├── lr1110_modem_hal.c │ │ ├── main.cpp │ │ └── timer_interface_implementation.cpp ├── communication │ ├── inc │ │ ├── communication_demo.h │ │ ├── communication_field_test.h │ │ ├── communication_interface.h │ │ ├── communication_manager.h │ │ ├── communication_print_only.h │ │ └── communication_utils.h │ └── src │ │ ├── communication_demo.cpp │ │ ├── communication_field_test.cpp │ │ ├── communication_interface.cpp │ │ ├── communication_manager.cpp │ │ ├── communication_print_only.cpp │ │ └── communication_utils.cpp ├── connectivity │ ├── inc │ │ ├── connectivity_conversions.h │ │ ├── connectivity_manager_interface.h │ │ ├── connectivity_manager_modem.h │ │ └── connectivity_manager_transceiver.h │ └── src │ │ ├── connectivity_conversions.cpp │ │ ├── connectivity_manager_interface.cpp │ │ ├── connectivity_manager_modem.cpp │ │ └── connectivity_manager_transceiver.cpp ├── demo │ ├── inc │ │ ├── antenna_selector_interface.h │ │ ├── demo_configuration.h │ │ ├── demo_file_upload_assets.h │ │ ├── demo_gnss_types.h │ │ ├── demo_interface.h │ │ ├── demo_manager_interface.h │ │ ├── demo_manager_modem.h │ │ ├── demo_manager_transceiver.h │ │ ├── demo_modem_file_upload.h │ │ ├── demo_modem_gnss_assisted.h │ │ ├── demo_modem_gnss_autonomous.h │ │ ├── demo_modem_gnss_interface.h │ │ ├── demo_modem_interface.h │ │ ├── demo_modem_radio_converters.h │ │ ├── demo_modem_radio_rx_continuous.h │ │ ├── demo_modem_radio_tx_continuous.h │ │ ├── demo_modem_radio_tx_cw.h │ │ ├── demo_modem_temperature.h │ │ ├── demo_modem_wifi.h │ │ ├── demo_per_results.h │ │ ├── demo_transceiver_gnss_assisted.h │ │ ├── demo_transceiver_gnss_autonomous.h │ │ ├── demo_transceiver_gnss_interface.h │ │ ├── demo_transceiver_interface.h │ │ ├── demo_transceiver_radio_interface.h │ │ ├── demo_transceiver_radio_per.h │ │ ├── demo_transceiver_radio_ping_pong.h │ │ ├── demo_transceiver_radio_tx_cw.h │ │ ├── demo_transceiver_wifi_country_code.h │ │ ├── demo_transceiver_wifi_interface.h │ │ ├── demo_transceiver_wifi_scan.h │ │ ├── demo_wifi_types.h │ │ ├── environment_interface.h │ │ ├── interruption_interface.h │ │ ├── interruption_irq.h │ │ ├── interruption_modem.h │ │ ├── signaling_interface.h │ │ └── timer_interface.h │ └── src │ │ ├── demo_interface.cpp │ │ ├── demo_manager_interface.cpp │ │ ├── demo_manager_modem.cpp │ │ ├── demo_manager_transceiver.cpp │ │ ├── demo_modem_file_upload.cpp │ │ ├── demo_modem_gnss_assisted.cpp │ │ ├── demo_modem_gnss_autonomous.cpp │ │ ├── demo_modem_gnss_interface.cpp │ │ ├── demo_modem_interface.cpp │ │ ├── demo_modem_radio_converters.cpp │ │ ├── demo_modem_radio_rx_continuous.cpp │ │ ├── demo_modem_radio_tx_continuous.cpp │ │ ├── demo_modem_radio_tx_cw.cpp │ │ ├── demo_modem_temperature.cpp │ │ ├── demo_modem_wifi.cpp │ │ ├── demo_transceiver_gnss_assisted.cpp │ │ ├── demo_transceiver_gnss_autonomous.cpp │ │ ├── demo_transceiver_gnss_interface.cpp │ │ ├── demo_transceiver_interface.cpp │ │ ├── demo_transceiver_radio_interface.cpp │ │ ├── demo_transceiver_radio_per.cpp │ │ ├── demo_transceiver_radio_ping_pong.cpp │ │ ├── demo_transceiver_radio_tx_cw.cpp │ │ ├── demo_transceiver_wifi_country_code.cpp │ │ ├── demo_transceiver_wifi_interface.cpp │ │ ├── demo_transceiver_wifi_scan.cpp │ │ ├── environment_interface.cpp │ │ ├── interruption_irq.cpp │ │ └── interruption_modem.cpp ├── device │ ├── inc │ │ ├── application_server_interpreter.h │ │ ├── device_interface.h │ │ ├── device_modem.h │ │ └── device_transceiver.h │ └── src │ │ ├── application_server_interpreter.cpp │ │ ├── device_interface.cpp │ │ ├── device_modem.cpp │ │ └── device_transceiver.cpp ├── display_touch │ ├── inc │ │ ├── display.h │ │ └── touch.h │ └── src │ │ ├── display.c │ │ └── touch.c ├── gcc │ ├── STM32L476RGTx_FLASH.ld │ ├── redirect.c │ └── usart_redirect.c ├── gui │ ├── inc │ │ ├── gui.h │ │ ├── guiAbout.h │ │ ├── guiCommon.h │ │ ├── guiConfigGnss.h │ │ ├── guiConfigGnssAssistancePosition.h │ │ ├── guiConfigRadioTestModes.h │ │ ├── guiConfigWifi.h │ │ ├── guiConnectivity.h │ │ ├── guiEui.h │ │ ├── guiFileUpload.h │ │ ├── guiFormat.h │ │ ├── guiMenu.h │ │ ├── guiMenuCommon.h │ │ ├── guiMenuDemo.h │ │ ├── guiMenuGeolocDemo.h │ │ ├── guiMenuRadioDemo.h │ │ ├── guiMenuRadioTestModes.h │ │ ├── guiRadioPer.h │ │ ├── guiRadioPingPong.h │ │ ├── guiRadioTxCw.h │ │ ├── guiResultsGnss.h │ │ ├── guiResultsWifi.h │ │ ├── guiSplashScreen.h │ │ ├── guiTemperature.h │ │ ├── guiTestGnss.h │ │ ├── guiTestWifi.h │ │ ├── lv_conf.h │ │ ├── lv_port_disp.h │ │ ├── lv_port_indev.h │ │ └── semtech_logo.h │ └── src │ │ ├── gui.cpp │ │ ├── guiAbout.cpp │ │ ├── guiCommon.cpp │ │ ├── guiConfigGnss.cpp │ │ ├── guiConfigGnssAssistancePosition.cpp │ │ ├── guiConfigRadioTestModes.cpp │ │ ├── guiConfigWifi.cpp │ │ ├── guiConnectivity.cpp │ │ ├── guiEui.cpp │ │ ├── guiFileUpload.cpp │ │ ├── guiMenu.cpp │ │ ├── guiMenuCommon.cpp │ │ ├── guiMenuDemo.cpp │ │ ├── guiMenuGeolocDemo.cpp │ │ ├── guiMenuRadioDemo.cpp │ │ ├── guiMenuRadioTestModes.cpp │ │ ├── guiRadioPer.cpp │ │ ├── guiRadioPingPong.cpp │ │ ├── guiRadioTxCw.cpp │ │ ├── guiResultsGnss.cpp │ │ ├── guiResultsWifi.cpp │ │ ├── guiSplashScreen.cpp │ │ ├── guiTemperature.cpp │ │ ├── guiTestGnss.cpp │ │ ├── guiTestWifi.cpp │ │ ├── lv_port_disp.c │ │ ├── lv_port_indev.c │ │ └── semtech_logo.c ├── hci │ ├── Command │ │ ├── Inc │ │ │ ├── com_code.h │ │ │ ├── command_base.h │ │ │ ├── command_check_almanac_update.h │ │ │ ├── command_factory.h │ │ │ ├── command_fetch_result.h │ │ │ ├── command_get_almanac_dates.h │ │ │ ├── command_get_version.h │ │ │ ├── command_interface.h │ │ │ ├── command_reset.h │ │ │ ├── command_set_date_loc.h │ │ │ ├── command_start_demo.h │ │ │ ├── command_status.h │ │ │ ├── command_update_almanac.h │ │ │ └── field_test_log.h │ │ └── Src │ │ │ ├── command_base.cpp │ │ │ ├── command_check_almanac_update.cpp │ │ │ ├── command_factory.cpp │ │ │ ├── command_fetch_result.cpp │ │ │ ├── command_get_almanac_dates.cpp │ │ │ ├── command_get_version.cpp │ │ │ ├── command_reset.cpp │ │ │ ├── command_set_date_loc.cpp │ │ │ ├── command_start_demo.cpp │ │ │ ├── command_status.cpp │ │ │ ├── command_update_almanac.cpp │ │ │ └── field_test_log.cpp │ ├── callback.h │ ├── hci.cpp │ └── hci.h ├── keil │ └── lr1110_evk.uvprojx ├── lr1110_driver │ ├── CHANGELOG.md │ ├── LICENSE.txt │ ├── README.md │ └── src │ │ ├── lr1110_bootloader.c │ │ ├── lr1110_bootloader.h │ │ ├── lr1110_bootloader_types.h │ │ ├── lr1110_crypto_engine.c │ │ ├── lr1110_crypto_engine.h │ │ ├── lr1110_crypto_engine_types.h │ │ ├── lr1110_driver_version.c │ │ ├── lr1110_driver_version.h │ │ ├── lr1110_gnss.c │ │ ├── lr1110_gnss.h │ │ ├── lr1110_gnss_types.h │ │ ├── lr1110_hal.h │ │ ├── lr1110_radio.c │ │ ├── lr1110_radio.h │ │ ├── lr1110_radio_timings.c │ │ ├── lr1110_radio_timings.h │ │ ├── lr1110_radio_types.h │ │ ├── lr1110_regmem.c │ │ ├── lr1110_regmem.h │ │ ├── lr1110_system.c │ │ ├── lr1110_system.h │ │ ├── lr1110_system_types.h │ │ ├── lr1110_types.h │ │ ├── lr1110_wifi.c │ │ ├── lr1110_wifi.h │ │ └── lr1110_wifi_types.h ├── lr1110_modem_driver │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ └── src │ │ ├── lr1110_bootloader.c │ │ ├── lr1110_bootloader.h │ │ ├── lr1110_bootloader_types.h │ │ ├── lr1110_hal.h │ │ ├── lr1110_modem_common.h │ │ ├── lr1110_modem_driver_version.c │ │ ├── lr1110_modem_driver_version.h │ │ ├── lr1110_modem_gnss.c │ │ ├── lr1110_modem_gnss.h │ │ ├── lr1110_modem_hal.h │ │ ├── lr1110_modem_helper.c │ │ ├── lr1110_modem_helper.h │ │ ├── lr1110_modem_lorawan.c │ │ ├── lr1110_modem_lorawan.h │ │ ├── lr1110_modem_system.c │ │ ├── lr1110_modem_system.h │ │ ├── lr1110_modem_wifi.c │ │ ├── lr1110_modem_wifi.h │ │ └── lr1110_types.h ├── lvgl │ ├── .clang-format │ ├── .editorconfig │ ├── .github │ │ ├── FUNDING.yml │ │ ├── ISSUE_TEMPLATE │ │ │ ├── all-other-issues.md │ │ │ └── bug-report.md │ │ └── stale.yml │ ├── .gitignore │ ├── .gitmodules │ ├── LICENCE.txt │ ├── README.md │ ├── docs │ │ ├── CODE_OF_CONDUCT.md │ │ ├── CODING_STYLE.md │ │ └── CONTRIBUTING.md │ ├── library.json │ ├── lv_conf_template.h │ ├── lvgl.h │ ├── lvgl.mk │ ├── porting │ │ ├── lv_port_disp_template.c │ │ ├── lv_port_disp_template.h │ │ ├── lv_port_fs_template.c │ │ ├── lv_port_fs_template.h │ │ ├── lv_port_indev_template.c │ │ └── lv_port_indev_template.h │ ├── scripts │ │ ├── Doxyfile │ │ ├── built_in_font │ │ │ ├── FontAwesome5-Solid+Brands+Regular.woff │ │ │ ├── Roboto-Regular.woff │ │ │ └── built_in_font_gen.py │ │ ├── clang-formatter.sh │ │ ├── cppcheck_run.sh │ │ └── lv_conf_checker.py │ └── src │ │ ├── lv_conf_checker.h │ │ ├── lv_core │ │ ├── lv_core.mk │ │ ├── lv_debug.c │ │ ├── lv_debug.h │ │ ├── lv_disp.c │ │ ├── lv_disp.h │ │ ├── lv_group.c │ │ ├── lv_group.h │ │ ├── lv_indev.c │ │ ├── lv_indev.h │ │ ├── lv_obj.c │ │ ├── lv_obj.h │ │ ├── lv_refr.c │ │ ├── lv_refr.h │ │ ├── lv_style.c │ │ └── lv_style.h │ │ ├── lv_draw │ │ ├── lv_draw.c │ │ ├── lv_draw.h │ │ ├── lv_draw.mk │ │ ├── lv_draw_arc.c │ │ ├── lv_draw_arc.h │ │ ├── lv_draw_basic.c │ │ ├── lv_draw_basic.h │ │ ├── lv_draw_img.c │ │ ├── lv_draw_img.h │ │ ├── lv_draw_label.c │ │ ├── lv_draw_label.h │ │ ├── lv_draw_line.c │ │ ├── lv_draw_line.h │ │ ├── lv_draw_rect.c │ │ ├── lv_draw_rect.h │ │ ├── lv_draw_triangle.c │ │ ├── lv_draw_triangle.h │ │ ├── lv_img_cache.c │ │ ├── lv_img_cache.h │ │ ├── lv_img_decoder.c │ │ └── lv_img_decoder.h │ │ ├── lv_font │ │ ├── lv_font.c │ │ ├── lv_font.h │ │ ├── lv_font.mk │ │ ├── lv_font_fmt_txt.c │ │ ├── lv_font_fmt_txt.h │ │ ├── lv_font_roboto_12.c │ │ ├── lv_font_roboto_12_subpx.c │ │ ├── lv_font_roboto_16.c │ │ ├── lv_font_roboto_22.c │ │ ├── lv_font_roboto_28.c │ │ ├── lv_font_roboto_28_compressed.c │ │ ├── lv_font_unscii_8.c │ │ └── lv_symbol_def.h │ │ ├── lv_hal │ │ ├── lv_hal.h │ │ ├── lv_hal.mk │ │ ├── lv_hal_disp.c │ │ ├── lv_hal_disp.h │ │ ├── lv_hal_indev.c │ │ ├── lv_hal_indev.h │ │ ├── lv_hal_tick.c │ │ └── lv_hal_tick.h │ │ ├── lv_misc │ │ ├── lv_anim.c │ │ ├── lv_anim.h │ │ ├── lv_area.c │ │ ├── lv_area.h │ │ ├── lv_async.c │ │ ├── lv_async.h │ │ ├── lv_bidi.c │ │ ├── lv_bidi.h │ │ ├── lv_circ.c │ │ ├── lv_circ.h │ │ ├── lv_color.c │ │ ├── lv_color.h │ │ ├── lv_fs.c │ │ ├── lv_fs.h │ │ ├── lv_gc.c │ │ ├── lv_gc.h │ │ ├── lv_ll.c │ │ ├── lv_ll.h │ │ ├── lv_log.c │ │ ├── lv_log.h │ │ ├── lv_math.c │ │ ├── lv_math.h │ │ ├── lv_mem.c │ │ ├── lv_mem.h │ │ ├── lv_misc.mk │ │ ├── lv_printf.c │ │ ├── lv_printf.h │ │ ├── lv_task.c │ │ ├── lv_task.h │ │ ├── lv_templ.c │ │ ├── lv_templ.h │ │ ├── lv_txt.c │ │ ├── lv_txt.h │ │ ├── lv_types.h │ │ ├── lv_utils.c │ │ └── lv_utils.h │ │ ├── lv_objx │ │ ├── lv_arc.c │ │ ├── lv_arc.h │ │ ├── lv_bar.c │ │ ├── lv_bar.h │ │ ├── lv_btn.c │ │ ├── lv_btn.h │ │ ├── lv_btnm.c │ │ ├── lv_btnm.h │ │ ├── lv_calendar.c │ │ ├── lv_calendar.h │ │ ├── lv_canvas.c │ │ ├── lv_canvas.h │ │ ├── lv_cb.c │ │ ├── lv_cb.h │ │ ├── lv_chart.c │ │ ├── lv_chart.h │ │ ├── lv_cont.c │ │ ├── lv_cont.h │ │ ├── lv_cpicker.c │ │ ├── lv_cpicker.h │ │ ├── lv_ddlist.c │ │ ├── lv_ddlist.h │ │ ├── lv_gauge.c │ │ ├── lv_gauge.h │ │ ├── lv_img.c │ │ ├── lv_img.h │ │ ├── lv_imgbtn.c │ │ ├── lv_imgbtn.h │ │ ├── lv_kb.c │ │ ├── lv_kb.h │ │ ├── lv_label.c │ │ ├── lv_label.h │ │ ├── lv_led.c │ │ ├── lv_led.h │ │ ├── lv_line.c │ │ ├── lv_line.h │ │ ├── lv_list.c │ │ ├── lv_list.h │ │ ├── lv_lmeter.c │ │ ├── lv_lmeter.h │ │ ├── lv_mbox.c │ │ ├── lv_mbox.h │ │ ├── lv_objx.mk │ │ ├── lv_objx_templ.c │ │ ├── lv_objx_templ.h │ │ ├── lv_page.c │ │ ├── lv_page.h │ │ ├── lv_preload.c │ │ ├── lv_preload.h │ │ ├── lv_roller.c │ │ ├── lv_roller.h │ │ ├── lv_slider.c │ │ ├── lv_slider.h │ │ ├── lv_spinbox.c │ │ ├── lv_spinbox.h │ │ ├── lv_sw.c │ │ ├── lv_sw.h │ │ ├── lv_ta.c │ │ ├── lv_ta.h │ │ ├── lv_table.c │ │ ├── lv_table.h │ │ ├── lv_tabview.c │ │ ├── lv_tabview.h │ │ ├── lv_tileview.c │ │ ├── lv_tileview.h │ │ ├── lv_win.c │ │ └── lv_win.h │ │ ├── lv_themes │ │ ├── lv_theme.c │ │ ├── lv_theme.h │ │ ├── lv_theme_alien.c │ │ ├── lv_theme_alien.h │ │ ├── lv_theme_default.c │ │ ├── lv_theme_default.h │ │ ├── lv_theme_material.c │ │ ├── lv_theme_material.h │ │ ├── lv_theme_mono.c │ │ ├── lv_theme_mono.h │ │ ├── lv_theme_nemo.c │ │ ├── lv_theme_nemo.h │ │ ├── lv_theme_night.c │ │ ├── lv_theme_night.h │ │ ├── lv_theme_templ.c │ │ ├── lv_theme_templ.h │ │ ├── lv_theme_zen.c │ │ ├── lv_theme_zen.h │ │ └── lv_themes.mk │ │ └── lv_version.h ├── peripherals │ ├── inc │ │ └── lis2de12.h │ └── src │ │ └── lis2de12.c ├── supervisor │ ├── inc │ │ └── supervisor.h │ └── src │ │ └── supervisor.cpp ├── system │ ├── inc │ │ ├── system.h │ │ ├── system_clock.h │ │ ├── system_gpio.h │ │ ├── system_i2c.h │ │ ├── system_it.h │ │ ├── system_lptim.h │ │ ├── system_spi.h │ │ ├── system_time.h │ │ └── system_uart.h │ └── src │ │ ├── system.c │ │ ├── system_clock.c │ │ ├── system_gpio.c │ │ ├── system_i2c.c │ │ ├── system_it.c │ │ ├── system_lptim.c │ │ ├── system_spi.c │ │ ├── system_time.c │ │ ├── system_uart.c │ │ └── system_uart_retarget.c └── version.mk └── host ├── MANIFEST.in ├── README.md ├── doc ├── Makefile ├── install_instructions.md └── metadata.yaml ├── lr1110evk ├── AppConfiguration.py ├── BaseTypes │ ├── Coordinate.py │ ├── MultiFrameGnss.py │ ├── NmeaFrame.py │ ├── ScannedGnss.py │ ├── ScannedMacAddress.py │ ├── Version.py │ ├── WifiChannels.py │ └── __init__.py ├── FieldTestPost │ ├── Core │ │ ├── ExternalCoordinate.py │ │ ├── FileReader.py │ │ ├── GeoLocServiceClientBase.py │ │ ├── Geocoding.py │ │ ├── GnssSolvingStrategy.py │ │ ├── RequestBase.py │ │ ├── RequestSender.py │ │ ├── ResponseBase.py │ │ └── __init__.py │ ├── WiFiAnalyzis │ │ ├── WiFiAnalyzis.py │ │ └── __init__.py │ ├── __init__.py │ └── __main__.py ├── Job │ ├── Executor.py │ ├── GnssDateLocBuilder.py │ ├── Job.py │ ├── JobExecutor.py │ ├── JobJsonValidator.py │ ├── JobReader.py │ ├── KmlExport.py │ ├── Logger.py │ ├── UpdateAlmanacJob.py │ └── __init__.py ├── SerialExchange │ ├── Commands │ │ ├── CommandBase.py │ │ ├── CommandCheckAlmanacUpdate.py │ │ ├── CommandFetchResults.py │ │ ├── CommandGetAlmanacDates.py │ │ ├── CommandGetVersion.py │ │ ├── CommandReset.py │ │ ├── CommandSetDateLoc.py │ │ ├── CommandStart.py │ │ ├── CommandStatus.py │ │ ├── CommandUpdateAlmanac.py │ │ └── __init__.py │ ├── CommunicationHandler.py │ ├── DemoVcpReader.py │ ├── Responses │ │ ├── ResponseAlmanacDates.py │ │ ├── ResponseBase.py │ │ ├── ResponseCheckAlmanacUpdate.py │ │ ├── ResponseConfigureAck.py │ │ ├── ResponseEvent.py │ │ ├── ResponseFetchResult.py │ │ ├── ResponseGnssAssistedResult.py │ │ ├── ResponseGnssAutonomous.py │ │ ├── ResponseLog.py │ │ ├── ResponseResetAck.py │ │ ├── ResponseSetDateLocAck.py │ │ ├── ResponseStartAck.py │ │ ├── ResponseStatus.py │ │ ├── ResponseUpdateAlmanac.py │ │ ├── ResponseVersion.py │ │ ├── ResponseWifiResult.py │ │ └── __init__.py │ ├── SerialHandler.py │ ├── SerialHandlerConnectionTest.py │ └── __init__.py ├── Tools │ ├── KmlGenerator │ │ ├── KmlGenerator.py │ │ ├── __init__.py │ │ └── __main__.py │ └── __init__.py ├── __init__.py ├── __main__.py ├── assets │ ├── geocoding_components.yaml │ ├── job_drive_test_gnss_single.json │ └── jobs.json └── main_almanac_update.py └── setup.py /README.md: -------------------------------------------------------------------------------- 1 | # LR1110 evaluation kit - demonstration application 2 | 3 | ## Introduction 4 | 5 | This project is a demonstrator application for LR1110 Transceiver and LoRa Basics Modem-E. 6 | 7 | It provides embedded example code in `embedded/` folder and companion software tools in `host/` folder. 8 | The companion tools are to be used specifically with LR1110 Transceiver, except `AlmanacUpdate` that can be used with both LR1110 Transceiver and LoRa Basics Modem-E. 9 | 10 | Additional assets can be found in [the Wiki](https://github.com/Lora-net/lr1110_evk_demo_app/wiki/home) (software packages, command tool, etc.). 11 | 12 | ## Applicative Host 13 | 14 | This project needs an applicative companion software to be running on a computer. 15 | 16 | This section describes the steps to build/install/use it. 17 | 18 | ### Build & Install 19 | 20 | To build the host softwares, proceed as follow: 21 | 22 | ```bash 23 | $ cd $TOP_DIR/host 24 | $ python ./setup.py sdist # Build the source distribution archive 25 | $ python -m pip install dist/.tar.gz # Install the previously built source distribution 26 | ``` 27 | 28 | ### Usage 29 | 30 | For the demo mode, the applicative companion software is `Lr1110Demo` that is called as follow: 31 | 32 | ```bash 33 | $ Lr1110Demo -p -b 921600 -r 34 | ``` 35 | 36 | In case of need, a short help page is available: 37 | 38 | ```bash 39 | $ Lr1110Demo --help 40 | ``` 41 | 42 | ### AlmanacUpdate Usage 43 | 44 | The `AlmanacUpdate` command line program is to be used to execute a full almanac update operation for both LR1110 Transceiver and LoRa Basics Modem-E. 45 | 46 | It can use almanac coming either from a DAS server or from a GLS server (default is DAS server). 47 | 48 | To use it, execute the following in a command line: 49 | 50 | ```bash 51 | $ AlmanacUpdate -h 52 | # Display the help message with all possible flags 53 | 54 | $ AlmanacUpdate -d 55 | # Update the almanac of an EVK connected on using DAS server 56 | 57 | $ AlmanacUpdate -g -d 58 | # Update the almanac using GLS server 59 | ``` 60 | 61 | A correct execution of the almanac update operation is determined by the trace being terminated with message *Check terminated*. 62 | -------------------------------------------------------------------------------- /embedded/CMSIS/Core/Include/cmsis_version.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************//** 2 | * @file cmsis_version.h 3 | * @brief CMSIS Core(M) Version definitions 4 | * @version V5.0.2 5 | * @date 19. April 2017 6 | ******************************************************************************/ 7 | /* 8 | * Copyright (c) 2009-2017 ARM Limited. All rights reserved. 9 | * 10 | * SPDX-License-Identifier: Apache-2.0 11 | * 12 | * Licensed under the Apache License, Version 2.0 (the License); you may 13 | * not use this file except in compliance with the License. 14 | * You may obtain a copy of the License at 15 | * 16 | * www.apache.org/licenses/LICENSE-2.0 17 | * 18 | * Unless required by applicable law or agreed to in writing, software 19 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT 20 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | * See the License for the specific language governing permissions and 22 | * limitations under the License. 23 | */ 24 | 25 | #if defined ( __ICCARM__ ) 26 | #pragma system_include /* treat file as system include file for MISRA check */ 27 | #elif defined (__clang__) 28 | #pragma clang system_header /* treat file as system include file */ 29 | #endif 30 | 31 | #ifndef __CMSIS_VERSION_H 32 | #define __CMSIS_VERSION_H 33 | 34 | /* CMSIS Version definitions */ 35 | #define __CM_CMSIS_VERSION_MAIN ( 5U) /*!< [31:16] CMSIS Core(M) main version */ 36 | #define __CM_CMSIS_VERSION_SUB ( 1U) /*!< [15:0] CMSIS Core(M) sub version */ 37 | #define __CM_CMSIS_VERSION ((__CM_CMSIS_VERSION_MAIN << 16U) | \ 38 | __CM_CMSIS_VERSION_SUB ) /*!< CMSIS Core(M) version number */ 39 | #endif 40 | -------------------------------------------------------------------------------- /embedded/CMSIS/Device/ST/STM32L4xx/Include/stm32l476xx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lora-net/lr1110_evk_demo_app/f46c2234c53f290a5e9fcedc41d177159d04eb68/embedded/CMSIS/Device/ST/STM32L4xx/Include/stm32l476xx.h -------------------------------------------------------------------------------- /embedded/CMSIS/Device/ST/STM32L4xx/Include/stm32l4xx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lora-net/lr1110_evk_demo_app/f46c2234c53f290a5e9fcedc41d177159d04eb68/embedded/CMSIS/Device/ST/STM32L4xx/Include/stm32l4xx.h -------------------------------------------------------------------------------- /embedded/STM32L4xx_HAL_Driver/Inc/stm32_assert_template.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32_assert.h 4 | * @author MCD Application Team 5 | * @brief STM32 assert template file. 6 | * This file should be copied to the application folder and renamed 7 | * to stm32_assert.h. 8 | ****************************************************************************** 9 | * @attention 10 | * 11 | *

© Copyright (c) 2017 STMicroelectronics. 12 | * All rights reserved.

13 | * 14 | * This software component is licensed by ST under BSD 3-Clause license, 15 | * the "License"; You may not use this file except in compliance with the 16 | * License. You may obtain a copy of the License at: 17 | * opensource.org/licenses/BSD-3-Clause 18 | * 19 | ****************************************************************************** 20 | */ 21 | 22 | /* Define to prevent recursive inclusion -------------------------------------*/ 23 | #ifndef STM32_ASSERT_H 24 | #define STM32_ASSERT_H 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | /* Exported types ------------------------------------------------------------*/ 31 | /* Exported constants --------------------------------------------------------*/ 32 | /* Includes ------------------------------------------------------------------*/ 33 | /* Exported macro ------------------------------------------------------------*/ 34 | #ifdef USE_FULL_ASSERT 35 | /** 36 | * @brief The assert_param macro is used for function's parameters check. 37 | * @param expr: If expr is false, it calls assert_failed function 38 | * which reports the name of the source file and the source 39 | * line number of the call that failed. 40 | * If expr is true, it returns no value. 41 | * @retval None 42 | */ 43 | #define assert_param(expr) ((expr) ? (void)0U : assert_failed((char *)__FILE__, __LINE__)) 44 | /* Exported functions ------------------------------------------------------- */ 45 | void assert_failed(char *file, uint32_t line); 46 | #else 47 | #define assert_param(expr) ((void)0U) 48 | #endif /* USE_FULL_ASSERT */ 49 | 50 | #ifdef __cplusplus 51 | } 52 | #endif 53 | 54 | #endif /* STM32_ASSERT_H */ 55 | 56 | 57 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 58 | -------------------------------------------------------------------------------- /embedded/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_spi_ex.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32l4xx_hal_spi_ex.h 4 | * @author MCD Application Team 5 | * @brief Header file of SPI HAL Extended module. 6 | ****************************************************************************** 7 | * @attention 8 | * 9 | *

© Copyright (c) 2017 STMicroelectronics. 10 | * All rights reserved.

11 | * 12 | * This software component is licensed by ST under BSD 3-Clause license, 13 | * the "License"; You may not use this file except in compliance with the 14 | * License. You may obtain a copy of the License at: 15 | * opensource.org/licenses/BSD-3-Clause 16 | * 17 | ****************************************************************************** 18 | */ 19 | 20 | /* Define to prevent recursive inclusion -------------------------------------*/ 21 | #ifndef STM32L4xx_HAL_SPI_EX_H 22 | #define STM32L4xx_HAL_SPI_EX_H 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "stm32l4xx_hal_def.h" 30 | 31 | /** @addtogroup STM32L4xx_HAL_Driver 32 | * @{ 33 | */ 34 | 35 | /** @addtogroup SPIEx 36 | * @{ 37 | */ 38 | 39 | /* Exported types ------------------------------------------------------------*/ 40 | /* Exported constants --------------------------------------------------------*/ 41 | /* Exported macros -----------------------------------------------------------*/ 42 | /* Exported functions --------------------------------------------------------*/ 43 | /** @addtogroup SPIEx_Exported_Functions 44 | * @{ 45 | */ 46 | 47 | /* Initialization and de-initialization functions ****************************/ 48 | /* IO operation functions *****************************************************/ 49 | /** @addtogroup SPIEx_Exported_Functions_Group1 50 | * @{ 51 | */ 52 | HAL_StatusTypeDef HAL_SPIEx_FlushRxFifo(SPI_HandleTypeDef *hspi); 53 | /** 54 | * @} 55 | */ 56 | 57 | /** 58 | * @} 59 | */ 60 | 61 | /** 62 | * @} 63 | */ 64 | 65 | /** 66 | * @} 67 | */ 68 | 69 | #ifdef __cplusplus 70 | } 71 | #endif 72 | 73 | #endif /* STM32L4xx_HAL_SPI_EX_H */ 74 | 75 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 76 | -------------------------------------------------------------------------------- /embedded/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cryp.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lora-net/lr1110_evk_demo_app/f46c2234c53f290a5e9fcedc41d177159d04eb68/embedded/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cryp.c -------------------------------------------------------------------------------- /embedded/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_swpmi.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lora-net/lr1110_evk_demo_app/f46c2234c53f290a5e9fcedc41d177159d04eb68/embedded/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_swpmi.c -------------------------------------------------------------------------------- /embedded/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_wwdg.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lora-net/lr1110_evk_demo_app/f46c2234c53f290a5e9fcedc41d177159d04eb68/embedded/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_wwdg.c -------------------------------------------------------------------------------- /embedded/STM32L4xx_HAL_Driver/_htmresc/st_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lora-net/lr1110_evk_demo_app/f46c2234c53f290a5e9fcedc41d177159d04eb68/embedded/STM32L4xx_HAL_Driver/_htmresc/st_logo.png -------------------------------------------------------------------------------- /embedded/application/inc/timer_interface_implementation.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file timer_interface_implementation.cpp 3 | * 4 | * @brief Definition of the timer interface. 5 | * 6 | * Revised BSD License 7 | * Copyright Semtech Corporation 2020. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions are met: 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * * Neither the name of the Semtech corporation nor the 17 | * names of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef __TIMER_INTERFACE_IMPLEMENTATION_H__ 33 | #define __TIMER_INTERFACE_IMPLEMENTATION_H__ 34 | 35 | #include "timer_interface.h" 36 | 37 | class Timer : public TimerInterface 38 | { 39 | public: 40 | Timer( ); 41 | virtual ~Timer( ); 42 | 43 | void set_and_start( uint32_t timeout_in_ms ); 44 | bool is_timer_elapsed( ); 45 | void clear_timer( ); 46 | static void has_elapsed( ); 47 | 48 | static bool timer_elapsed; 49 | }; 50 | 51 | #endif // __TIMER_INTERFACE_IMPLEMENTATION_H__ -------------------------------------------------------------------------------- /embedded/application/inc/version_file.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file version.h 3 | * 4 | * @brief Placeholder for version number definition. 5 | * 6 | * Revised BSD License 7 | * Copyright Semtech Corporation 2020. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions are met: 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * * Neither the name of the Semtech corporation nor the 17 | * names of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef VERSION_H 33 | #define VERSION_H 34 | 35 | #define VERSION "v3.2.0" 36 | 37 | #endif // VERSION_H -------------------------------------------------------------------------------- /embedded/demo/inc/antenna_selector_interface.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file antenna_selector_interface.h 3 | * 4 | * @brief Interface definition to select RF antennas. 5 | * 6 | * Revised BSD License 7 | * Copyright Semtech Corporation 2020. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions are met: 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * * Neither the name of the Semtech corporation nor the 17 | * names of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef __ANTENNA_SELECTOR_INTERFACE_H__ 33 | #define __ANTENNA_SELECTOR_INTERFACE_H__ 34 | 35 | class AntennaSelectorInterface 36 | { 37 | public: 38 | AntennaSelectorInterface( ){}; 39 | virtual ~AntennaSelectorInterface( ){}; 40 | 41 | virtual void SelectAntenna1( ) = 0; 42 | virtual void SelectAntenna2( ) = 0; 43 | }; 44 | 45 | #endif // __ANTENNA_SELECTOR_INTERFACE_H__ 46 | -------------------------------------------------------------------------------- /embedded/demo/inc/demo_modem_radio_converters.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file demo_modem_radio_converters.h 3 | * 4 | * @brief Declaration of the modem radio convertion methods. 5 | * 6 | * Revised BSD License 7 | * Copyright Semtech Corporation 2020. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions are met: 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * * Neither the name of the Semtech corporation nor the 17 | * names of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef __DEMO_MODEM_RADIO_CONVERTERS_H__ 33 | #define __DEMO_MODEM_RADIO_CONVERTERS_H__ 34 | 35 | #include "demo_configuration.h" 36 | 37 | class DemoModemRadioConverters 38 | { 39 | public: 40 | static bool convert_radio_setting_sf( lr1110_radio_lora_sf_t sf_setting, lr1110_modem_tst_mode_sf_t* sf_test ); 41 | static bool convert_radio_setting_bw( lr1110_radio_lora_bw_t bw_setting, lr1110_modem_tst_mode_bw_t* bw_test ); 42 | static bool convert_radio_setting_cr( lr1110_radio_lora_cr_t cr_setting, lr1110_modem_tst_mode_cr_t* cr_test ); 43 | }; 44 | 45 | #endif // __DEMO_MODEM_RADIO_CONVERTERS_H__ -------------------------------------------------------------------------------- /embedded/demo/inc/demo_per_results.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file demo_per_results.h 3 | * 4 | * @brief Definition of the PER result structure for demonstrations. 5 | * 6 | * Revised BSD License 7 | * Copyright Semtech Corporation 2020. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions are met: 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * * Neither the name of the Semtech corporation nor the 17 | * names of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef __DEMO_PER_INTERFACE_H__ 33 | #define __DEMO_PER_INTERFACE_H__ 34 | 35 | #include 36 | typedef struct 37 | { 38 | uint32_t count_rx_correct_packet; 39 | uint32_t count_rx_wrong_packet; 40 | uint32_t count_tx; 41 | uint32_t count_rx_timeout; 42 | int8_t last_rssi; 43 | } demo_radio_per_results_t; 44 | 45 | #endif // __DEMO_PER_INTERFACE_H__ -------------------------------------------------------------------------------- /embedded/demo/inc/interruption_interface.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file interruption_interface.h 3 | * 4 | * @brief Definition of the interruption interface class. 5 | * 6 | * Revised BSD License 7 | * Copyright Semtech Corporation 2020. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions are met: 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * * Neither the name of the Semtech corporation nor the 17 | * names of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef __INTERRUPTION_INTERFACE_H__ 33 | #define __INTERRUPTION_INTERFACE_H__ 34 | 35 | class InterruptionInterface 36 | { 37 | public: 38 | virtual bool is_wifi_interruption( ) const = 0; 39 | virtual bool is_gnss_interruption( ) const = 0; 40 | virtual bool is_radio_interruption( ) const = 0; 41 | }; 42 | 43 | #endif // __INTERRUPTION_INTERFACE_H__ -------------------------------------------------------------------------------- /embedded/demo/inc/interruption_modem.h: -------------------------------------------------------------------------------- 1 | #ifndef __INTERRUPTION_MODEM_H__ 2 | #define __INTERRUPTION_MODEM_H__ 3 | 4 | #include "interruption_interface.h" 5 | #include "lr1110_modem_lorawan.h" 6 | 7 | class InterruptionModem : public InterruptionInterface 8 | { 9 | public: 10 | InterruptionModem( ); 11 | bool is_wifi_interruption( ) const override; 12 | bool is_gnss_interruption( ) const override; 13 | bool is_radio_interruption( ) const override; 14 | 15 | lr1110_modem_event_fields_t GetEvent( ) const; 16 | void SetEvent( const lr1110_modem_event_fields_t& _event ); 17 | 18 | private: 19 | lr1110_modem_event_fields_t event; 20 | }; 21 | 22 | #endif // __INTERRUPTION_MODEM_H__ -------------------------------------------------------------------------------- /embedded/demo/inc/signaling_interface.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file signaling_interface.h 3 | * 4 | * @brief Interface definition for interactions with signaling components 5 | * (LED, etc.) 6 | * 7 | * Revised BSD License 8 | * Copyright Semtech Corporation 2020. All rights reserved. 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions are met: 12 | * * Redistributions of source code must retain the above copyright 13 | * notice, this list of conditions and the following disclaimer. 14 | * * Redistributions in binary form must reproduce the above copyright 15 | * notice, this list of conditions and the following disclaimer in the 16 | * documentation and/or other materials provided with the distribution. 17 | * * Neither the name of the Semtech corporation nor the 18 | * names of its contributors may be used to endorse or promote products 19 | * derived from this software without specific prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 25 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 26 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 28 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | 33 | #ifndef __SIGNALING_INTERFACE_H__ 34 | #define __SIGNALING_INTERFACE_H__ 35 | 36 | class SignalingInterface 37 | { 38 | public: 39 | SignalingInterface( ){}; 40 | virtual ~SignalingInterface( ){}; 41 | 42 | virtual void StartCapture( ) = 0; 43 | virtual void StopCapture( ) = 0; 44 | virtual void Tx( ) = 0; 45 | virtual void Rx( ) = 0; 46 | virtual void StartContinuousTx( ) = 0; 47 | virtual void StopContinuousTx( ) = 0; 48 | }; 49 | 50 | #endif // __SIGNALING_INTERFACE_H__ 51 | -------------------------------------------------------------------------------- /embedded/demo/inc/timer_interface.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file timer_interface.h 3 | * 4 | * @brief Interface definition for interactions with timer 5 | * 6 | * Revised BSD License 7 | * Copyright Semtech Corporation 2020. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions are met: 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * * Neither the name of the Semtech corporation nor the 17 | * names of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef __TIMER_INTERFACE_H__ 33 | #define __TIMER_INTERFACE_H__ 34 | 35 | #include 36 | #include 37 | 38 | class TimerInterface 39 | { 40 | public: 41 | TimerInterface( ){}; 42 | virtual ~TimerInterface( ){}; 43 | 44 | virtual void set_and_start( uint32_t timeout_in_ms ) = 0; 45 | virtual bool is_timer_elapsed( ) = 0; 46 | virtual void clear_timer( ) = 0; 47 | }; 48 | 49 | #endif // __TIMER_INTERFACE_H__ 50 | -------------------------------------------------------------------------------- /embedded/demo/src/interruption_modem.cpp: -------------------------------------------------------------------------------- 1 | #include "interruption_modem.h" 2 | 3 | InterruptionModem::InterruptionModem( ) : event( ) {} 4 | 5 | bool InterruptionModem::is_wifi_interruption( ) const 6 | { 7 | return this->event.event_type == LR1110_MODEM_LORAWAN_EVENT_WIFI_SCAN_DONE; 8 | } 9 | 10 | bool InterruptionModem::is_gnss_interruption( ) const 11 | { 12 | return this->event.event_type == LR1110_MODEM_LORAWAN_EVENT_GNSS_SCAN_DONE; 13 | } 14 | 15 | bool InterruptionModem::is_radio_interruption( ) const 16 | { 17 | // We set to true the radio interruption whatever the event was, expect if it was Wi-Fi or GNSS 18 | return ( !this->is_gnss_interruption( ) && !this->is_wifi_interruption( ) ); 19 | } 20 | 21 | lr1110_modem_event_fields_t InterruptionModem::GetEvent( ) const { return this->event; } 22 | 23 | void InterruptionModem::SetEvent( const lr1110_modem_event_fields_t& _event ) { this->event = _event; } 24 | -------------------------------------------------------------------------------- /embedded/device/inc/application_server_interpreter.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file application_server_interpreter.h 3 | * 4 | * @brief Definition of application server interpreter 5 | * 6 | * Revised BSD License 7 | * Copyright Semtech Corporation 2020. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions are met: 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * * Neither the name of the Semtech corporation nor the 17 | * names of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef APPLICATION_SERVER_INTEPRETER_H 33 | #define APPLICATION_SERVER_INTEPRETER_H 34 | 35 | #include 36 | 37 | typedef enum 38 | { 39 | APPLICATION_SERVER_NO_EVENT, 40 | APPLICATION_SERVER_ERROR, 41 | APPLICATION_SERVER_LED_ON, 42 | APPLICATION_SERVER_LED_OFF, 43 | APPLICATION_SERVER_LED_TOGGLE, 44 | } ApplicationServerEvent_t; 45 | 46 | class ApplicationServerInterpreter 47 | { 48 | public: 49 | ApplicationServerEvent_t parseFrame( const uint8_t* frame, uint16_t frame_length ); 50 | }; 51 | 52 | #endif // APPLICATION_SERVER_INTEPRETER_H -------------------------------------------------------------------------------- /embedded/device/src/device_interface.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * @file device_base.cpp 3 | * 4 | * @brief Implementation of device base class. 5 | * 6 | * Revised BSD License 7 | * Copyright Semtech Corporation 2020. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions are met: 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * * Neither the name of the Semtech corporation nor the 17 | * names of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #include "device_interface.h" 33 | 34 | DeviceInterface::DeviceInterface( radio_t* radio, EnvironmentInterface* environment ) 35 | : radio( radio ), environment( environment ) 36 | { 37 | } 38 | 39 | DeviceEvent_t DeviceInterface::Runtime( ) 40 | { 41 | if( this->HasAssistedLocationUpdated( ) ) 42 | { 43 | return DEVICE_EVENT_ASSISTANCE_LOCATION_UPDATED; 44 | } 45 | else if( this->HasApplicationServerEvent( ) ) 46 | { 47 | return DEVICE_EVENT_APPLICATION_SERVER; 48 | } 49 | else 50 | { 51 | return DEVICE_EVENT_NONE; 52 | } 53 | } 54 | 55 | radio_t* DeviceInterface::GetRadio( ) const { return this->radio; } 56 | -------------------------------------------------------------------------------- /embedded/display_touch/inc/display.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file display.h 3 | * 4 | * \brief 5 | * 6 | * Revised BSD License 7 | * Copyright Semtech Corporation 2020. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions are met: 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * * Neither the name of the Semtech corporation nor the 17 | * names of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef __DISPLAY_H 33 | #define __DISPLAY_H 34 | 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | void display_init( void ); 40 | 41 | void display_send_command( const uint8_t command ); 42 | void display_send_data( const uint16_t data ); 43 | 44 | #ifdef __cplusplus 45 | } 46 | #endif 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /embedded/display_touch/inc/touch.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file touch.h 3 | * 4 | * \brief 5 | * 6 | * Revised BSD License 7 | * Copyright Semtech Corporation 2020. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions are met: 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * * Neither the name of the Semtech corporation nor the 17 | * names of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef __TOUCH_H__ 33 | #define __TOUCH_H__ 34 | 35 | #include 36 | #include "stdbool.h" 37 | 38 | #ifdef __cplusplus 39 | extern "C" { 40 | #endif 41 | 42 | void touch_init( void ); 43 | 44 | uint8_t touch_read_register( uint8_t reg ); 45 | 46 | void touch_write_register( uint8_t reg, uint8_t val ); 47 | 48 | bool touch_is_touched( void ); 49 | 50 | void readTouchData( uint16_t* posX, uint16_t* posY, bool* touching ); 51 | 52 | long map( long x, long in_min, long in_max, long out_min, long out_max ); 53 | 54 | #ifdef __cplusplus 55 | } 56 | #endif 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /embedded/gcc/STM32L476RGTx_FLASH.ld: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lora-net/lr1110_evk_demo_app/f46c2234c53f290a5e9fcedc41d177159d04eb68/embedded/gcc/STM32L476RGTx_FLASH.ld -------------------------------------------------------------------------------- /embedded/gcc/redirect.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file redirect.c 3 | * 4 | * @brief Implementation of the GCC printf/scanf redirection 5 | * 6 | * Revised BSD License 7 | * Copyright Semtech Corporation 2020. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions are met: 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * * Neither the name of the Semtech corporation nor the 17 | * names of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #include 33 | #include 34 | 35 | extern int __io_putchar( int ch ); 36 | extern int __io_getchar( void ); 37 | 38 | int _read( int file, char* data, int len ) 39 | { 40 | for( int index = 0; index < len; index++ ) 41 | { 42 | data[index] = __io_getchar( ); 43 | } 44 | 45 | return len; 46 | } 47 | 48 | int _write( int file, char* data, int len ) 49 | { 50 | for( int index = 0; index < len; index++ ) 51 | { 52 | __io_putchar( data[index] ); 53 | } 54 | return len; 55 | } -------------------------------------------------------------------------------- /embedded/gcc/usart_redirect.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file usart_redirect.c 3 | * 4 | * @brief Implementation of the printf/scanf redirection to system uart calls 5 | * 6 | * Revised BSD License 7 | * Copyright Semtech Corporation 2020. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions are met: 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * * Neither the name of the Semtech corporation nor the 17 | * names of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #include "system_uart.h" 33 | 34 | int __io_putchar( int ch ) { return system_uart_send_char( ch ); } 35 | int __io_getchar( void ) { return system_uart_receive_char( ); } 36 | -------------------------------------------------------------------------------- /embedded/gui/inc/guiAbout.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file guiAbout.h 3 | * 4 | * @brief Definition of the gui about page. 5 | * 6 | * Revised BSD License 7 | * Copyright Semtech Corporation 2020. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions are met: 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * * Neither the name of the Semtech corporation nor the 17 | * names of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef __GUI_ABOUT_H__ 33 | #define __GUI_ABOUT_H__ 34 | 35 | #include "guiCommon.h" 36 | #include "lvgl.h" 37 | #include "version.h" 38 | 39 | class GuiAbout : public GuiCommon 40 | { 41 | public: 42 | GuiAbout( version_handler_t* version_handler ); 43 | virtual ~GuiAbout( ); 44 | 45 | static void callback( lv_obj_t* obj, lv_event_t event ); 46 | 47 | private: 48 | lv_obj_t* btn_back; 49 | version_handler_t* version_handler; 50 | }; 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /embedded/gui/inc/guiMenuCommon.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file guiMenuCommon.h 3 | * 4 | * @brief Definition of the gui common menu page. 5 | * 6 | * Revised BSD License 7 | * Copyright Semtech Corporation 2020. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions are met: 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * * Neither the name of the Semtech corporation nor the 17 | * names of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef __GUI_COMMON_MENU_H__ 33 | #define __GUI_COMMON_MENU_H__ 34 | 35 | #include "guiCommon.h" 36 | 37 | class GuiMenuCommon : public GuiCommon 38 | { 39 | public: 40 | GuiMenuCommon( guiPageType_t pageType ); 41 | virtual ~GuiMenuCommon( ); 42 | 43 | void createTestEntry( uint8_t index, lv_obj_t** lbl, lv_obj_t** btn, lv_obj_t** lbl_btn, const char* lbl_name, 44 | bool is_clickable, lv_event_cb_t event_cb ); 45 | }; 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /embedded/gui/inc/guiMenuDemo.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file guiMenuDemo.h 3 | * 4 | * @brief Definition of the gui demo menu page. 5 | * 6 | * Revised BSD License 7 | * Copyright Semtech Corporation 2020. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions are met: 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * * Neither the name of the Semtech corporation nor the 17 | * names of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef __GUI_MENU_DEMO_H__ 33 | #define __GUI_MENU_DEMO_H__ 34 | 35 | #include "guiMenuCommon.h" 36 | #include "version.h" 37 | 38 | class GuiMenuDemo : public GuiMenuCommon 39 | { 40 | public: 41 | GuiMenuDemo( version_handler_t* version_handler ); 42 | virtual ~GuiMenuDemo( ); 43 | 44 | static void callback( lv_obj_t* obj, lv_event_t event ); 45 | 46 | private: 47 | lv_obj_t* lbl_geoloc_demo_menu; 48 | lv_obj_t* btn_geoloc_demo_menu; 49 | lv_obj_t* lbl_btn_geoloc_demo_menu; 50 | lv_obj_t* lbl_radio_demo_menu; 51 | lv_obj_t* btn_radio_demo_menu; 52 | lv_obj_t* lbl_btn_radio_demo_menu; 53 | lv_obj_t* btn_back; 54 | }; 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /embedded/gui/inc/guiSplashScreen.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file guiSplashScreen.h 3 | * 4 | * @brief Definition of the gui splash screen page. 5 | * 6 | * Revised BSD License 7 | * Copyright Semtech Corporation 2020. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions are met: 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * * Neither the name of the Semtech corporation nor the 17 | * names of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef __GUI_SPLASH_SCREEN_H__ 33 | #define __GUI_SPLASH_SCREEN_H__ 34 | 35 | #include "guiCommon.h" 36 | #include "version.h" 37 | #include "lvgl.h" 38 | 39 | class GuiSplashScreen : public GuiCommon 40 | { 41 | public: 42 | GuiSplashScreen( version_handler_t* version_handler ); 43 | virtual ~GuiSplashScreen( ); 44 | 45 | static void callback( lv_obj_t* obj, lv_event_t event ); 46 | 47 | private: 48 | lv_obj_t* btn_continue; 49 | lv_obj_t* btn_about; 50 | }; 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /embedded/gui/inc/lv_port_disp.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_port_disp_templ.h 3 | * 4 | */ 5 | 6 | /*Copy this file as "lv_port_disp.h" and set this value to "1" to enable 7 | * content*/ 8 | #if 1 9 | 10 | #ifndef LV_PORT_DISP_TEMPL_H 11 | #define LV_PORT_DISP_TEMPL_H 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | /********************* 18 | * INCLUDES 19 | *********************/ 20 | #include "lvgl.h" 21 | 22 | /********************* 23 | * DEFINES 24 | *********************/ 25 | 26 | /********************** 27 | * TYPEDEFS 28 | **********************/ 29 | 30 | /********************** 31 | * GLOBAL PROTOTYPES 32 | **********************/ 33 | 34 | void lv_port_disp_init( void ); 35 | 36 | /********************** 37 | * MACROS 38 | **********************/ 39 | 40 | #ifdef __cplusplus 41 | } /* extern "C" */ 42 | #endif 43 | 44 | #endif /*LV_PORT_DISP_TEMPL_H*/ 45 | 46 | #endif /*Disable/Enable content*/ 47 | -------------------------------------------------------------------------------- /embedded/gui/inc/lv_port_indev.h: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * @file lv_port_indev.h 4 | * 5 | */ 6 | 7 | /*Copy this file as "lv_port_indev.h" and set this value to "1" to enable 8 | * content*/ 9 | #if 1 10 | 11 | #ifndef LV_PORT_INDEV_H 12 | #define LV_PORT_INDEV_H 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | /********************* 19 | * INCLUDES 20 | *********************/ 21 | #include "lvgl.h" 22 | 23 | /********************* 24 | * DEFINES 25 | *********************/ 26 | 27 | /********************** 28 | * TYPEDEFS 29 | **********************/ 30 | 31 | /********************** 32 | * GLOBAL PROTOTYPES 33 | **********************/ 34 | 35 | void lv_port_indev_init( void ); 36 | 37 | /********************** 38 | * MACROS 39 | **********************/ 40 | 41 | #ifdef __cplusplus 42 | } /* extern "C" */ 43 | #endif 44 | 45 | #endif /*LV_PORT_INDEV_H*/ 46 | 47 | #endif /*Disable/Enable content*/ 48 | -------------------------------------------------------------------------------- /embedded/gui/inc/semtech_logo.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file semtech_logo.h 3 | * 4 | * @brief Definition of the semtech logo. 5 | * 6 | * Revised BSD License 7 | * Copyright Semtech Corporation 2020. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions are met: 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * * Neither the name of the Semtech corporation nor the 17 | * names of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef SEMTECH_LOGO 33 | #define SEMTECH_LOGO 34 | 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | #include "lvgl.h" 40 | 41 | #ifndef LV_ATTRIBUTE_MEM_ALIGN 42 | #define LV_ATTRIBUTE_MEM_ALIGN 43 | #endif 44 | 45 | #ifndef LV_ATTRIBUTE_IMG_TEST 46 | #define LV_ATTRIBUTE_IMG_TEST 47 | #endif 48 | 49 | extern const lv_img_dsc_t semtech_logo; 50 | 51 | #ifdef __cplusplus 52 | } 53 | #endif 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /embedded/hci/Command/Inc/com_code.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file com_code.h 3 | * 4 | * @brief Definitions of the command codes. 5 | * 6 | * Revised BSD License 7 | * Copyright Semtech Corporation 2020. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions are met: 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * * Neither the name of the Semtech corporation nor the 17 | * names of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef __COM_CODE_H__ 33 | #define __COM_CODE_H__ 34 | 35 | #define COM_CODE_STATUS ( 0 ) 36 | #define COM_CODE_START ( 1 ) 37 | #define COM_CODE_CONFIGURE ( 2 ) 38 | #define COM_CODE_FETCH_RESULT ( 3 ) 39 | #define COM_CODE_RESET ( 4 ) 40 | #define COM_CODE_SET_DATE_LOC ( 5 ) 41 | #define COM_CODE_GET_VERSION ( 6 ) 42 | #define COM_CODE_GET_ALMANAC_DATES ( 7 ) 43 | #define COM_CODE_UPDATE_ALMANAC ( 8 ) 44 | #define COM_CODE_CHECK_ALMANAC_UPDATE ( 9 ) 45 | 46 | #define RESP_CODE_EVENT ( 0x80 ) 47 | #define RESP_CODE_WIFI_RESULT ( 0x81 ) 48 | #define RESP_CODE_GNSS_AUTONOMOUS_RESULT ( 0x82 ) 49 | #define RESP_CODE_GNSS_ASSISTED_RESULT ( 0x83 ) 50 | #define LOG_RESPONSE_CODE ( 0x84 ) 51 | #define ERROR_CODE_EVENT ( 0x90 ) 52 | 53 | #endif // __COM_CODE_H__ 54 | -------------------------------------------------------------------------------- /embedded/hci/Command/Inc/command_check_almanac_update.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file command_check_almanac_update.h 3 | * 4 | * @brief Definitions of the HCI command that check almanac update class. 5 | * 6 | * Revised BSD License 7 | * Copyright Semtech Corporation 2020. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions are met: 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * * Neither the name of the Semtech corporation nor the 17 | * names of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef __COMMAND_CHECK_ALMANAC_UPDATE_H__ 33 | #define __COMMAND_CHECK_ALMANAC_UPDATE_H__ 34 | 35 | #include "command_base.h" 36 | 37 | class CommandCheckAlmanacUpdate : public CommandBase 38 | { 39 | public: 40 | CommandCheckAlmanacUpdate( DeviceInterface* device, Hci& hci ); 41 | virtual ~CommandCheckAlmanacUpdate( ); 42 | 43 | virtual uint16_t GetComCode( ); 44 | virtual bool ConfigureFromPayload( const uint8_t* buffer, const uint16_t buffer_size ); 45 | virtual bool Job( ); 46 | 47 | private: 48 | uint32_t expected_crc; 49 | }; 50 | 51 | #endif // __COMMAND_CHECK_ALMANAC_UPDATE_H__ -------------------------------------------------------------------------------- /embedded/hci/Command/Inc/command_reset.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file command_reset.h 3 | * 4 | * @brief Definitions of the HCI command reset class. 5 | * 6 | * Revised BSD License 7 | * Copyright Semtech Corporation 2020. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions are met: 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * * Neither the name of the Semtech corporation nor the 17 | * names of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef __COMMAND_RESET_H__ 33 | #define __COMMAND_RESET_H__ 34 | 35 | #include "command_base.h" 36 | #include "hci.h" 37 | 38 | class CommandReset : public CommandBase 39 | { 40 | public: 41 | explicit CommandReset( DeviceInterface* device, Hci& hci ); 42 | virtual ~CommandReset( ); 43 | 44 | virtual uint16_t GetComCode( ); 45 | virtual bool ConfigureFromPayload( const uint8_t* buffer, const uint16_t buffer_size ); 46 | virtual bool Job( ); 47 | 48 | private: 49 | Hci* hci; 50 | }; 51 | 52 | #endif // __COMMAND_RESET_H__ 53 | -------------------------------------------------------------------------------- /embedded/hci/Command/Inc/command_set_date_loc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file command_set_date_loc.h 3 | * 4 | * @brief Definitions of the HCI command to set date and location class. 5 | * 6 | * Revised BSD License 7 | * Copyright Semtech Corporation 2020. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions are met: 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * * Neither the name of the Semtech corporation nor the 17 | * names of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef __COMMAND_SET_DATE_LOC_H__ 33 | #define __COMMAND_SET_DATE_LOC_H__ 34 | 35 | #include "command_base.h" 36 | #include "environment_interface.h" 37 | 38 | class CommandSetDateLoc : public CommandBase 39 | { 40 | public: 41 | CommandSetDateLoc( DeviceInterface* device, Hci& hci, EnvironmentInterface& environment ); 42 | virtual ~CommandSetDateLoc( ); 43 | 44 | virtual uint16_t GetComCode( ); 45 | virtual bool ConfigureFromPayload( const uint8_t* buffer, const uint16_t buffer_size ); 46 | virtual bool Job( ); 47 | 48 | private: 49 | EnvironmentInterface& environment; 50 | }; 51 | 52 | #endif // __COMMAND_SET_DATE_LOC_H__ 53 | -------------------------------------------------------------------------------- /embedded/hci/Command/Inc/command_status.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file command_status.h 3 | * 4 | * @brief Definitions of the HCI command to get status class. 5 | * 6 | * Revised BSD License 7 | * Copyright Semtech Corporation 2020. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions are met: 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * * Neither the name of the Semtech corporation nor the 17 | * names of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef __COMMAND_STATUS_H__ 33 | #define __COMMAND_STATUS_H__ 34 | 35 | #include "command_interface.h" 36 | #include "hci.h" 37 | 38 | class CommandStatus : public CommandInterface 39 | { 40 | public: 41 | explicit CommandStatus( Hci& hci ); 42 | virtual ~CommandStatus( ); 43 | 44 | virtual uint16_t GetComCode( ); 45 | virtual bool ConfigureFromPayload( const uint8_t* buffer, const uint16_t buffer_size ); 46 | virtual CommandEvent_t Execute( ); 47 | 48 | private: 49 | Hci* hci; 50 | }; 51 | 52 | #endif // __COMMAND_STATUS_H__ 53 | -------------------------------------------------------------------------------- /embedded/hci/Command/Inc/command_update_almanac.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file command_update_almanac.h 3 | * 4 | * @brief Definitions of the HCI command to update almanac class. 5 | * 6 | * Revised BSD License 7 | * Copyright Semtech Corporation 2020. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions are met: 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * * Neither the name of the Semtech corporation nor the 17 | * names of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef __COMMAND_UPDATE_ALMANAC_H__ 33 | #define __COMMAND_UPDATE_ALMANAC_H__ 34 | 35 | #include "command_base.h" 36 | #include "hci.h" 37 | 38 | #define COMMAND_UPDATE_ALMANAC_BUFFER_SIZE ( 20 ) 39 | 40 | class CommandUpdateAlmanac : public CommandBase 41 | { 42 | public: 43 | CommandUpdateAlmanac( DeviceInterface* device, Hci& hci ); 44 | virtual ~CommandUpdateAlmanac( ); 45 | 46 | virtual uint16_t GetComCode( ); 47 | virtual bool ConfigureFromPayload( const uint8_t* buffer, const uint16_t buffer_size ); 48 | virtual bool Job( ); 49 | 50 | private: 51 | uint8_t almanac_buffer[COMMAND_UPDATE_ALMANAC_BUFFER_SIZE]; 52 | }; 53 | 54 | #endif // __COMMAND_UPDATE_ALMANAC_H__ -------------------------------------------------------------------------------- /embedded/hci/Command/Inc/field_test_log.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file field_test_log.h 3 | * 4 | * @brief Definitions of the HCI field test log singleton class. 5 | * 6 | * Revised BSD License 7 | * Copyright Semtech Corporation 2020. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions are met: 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * * Neither the name of the Semtech corporation nor the 17 | * names of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef __LOG_H__ 33 | #define __LOG_H__ 34 | 35 | #include 36 | #include "hci.h" 37 | 38 | class FieldTestLog 39 | { 40 | public: 41 | static FieldTestLog* GetOrCreateInstance( Hci& hci ); 42 | virtual ~FieldTestLog( ); 43 | static void TrySendLog( const char* fmt, ... ); 44 | static void vTrySendLog( const char* fmt, va_list args ); 45 | 46 | protected: 47 | explicit FieldTestLog( Hci& hci ); 48 | void SendLog( const uint8_t* buffer, const uint16_t buffer_size ); 49 | 50 | private: 51 | Hci& hci; 52 | static FieldTestLog* instance; 53 | }; 54 | 55 | #endif // __LOG_H__ 56 | -------------------------------------------------------------------------------- /embedded/hci/Command/Src/command_reset.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * @file command_reset.cpp 3 | * 4 | * @brief Implementation of the HCI reset command class. 5 | * 6 | * Revised BSD License 7 | * Copyright Semtech Corporation 2020. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions are met: 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * * Neither the name of the Semtech corporation nor the 17 | * names of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #include "command_reset.h" 33 | #include "com_code.h" 34 | 35 | CommandReset::CommandReset( DeviceInterface* device, Hci& hci ) : CommandBase( device, hci ) {} 36 | 37 | CommandReset::~CommandReset( ) {} 38 | 39 | uint16_t CommandReset::GetComCode( ) { return COM_CODE_RESET; } 40 | 41 | bool CommandReset::ConfigureFromPayload( const uint8_t* buffer, const uint16_t buffer_size ) 42 | { 43 | return ( buffer_size == 0 ) ? true : false; 44 | } 45 | 46 | bool CommandReset::Job( ) 47 | { 48 | this->SetEventResetDemo( ); 49 | return true; 50 | } 51 | -------------------------------------------------------------------------------- /embedded/hci/callback.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file callback.h 3 | * 4 | * @brief Definition of callback struct. 5 | * 6 | * Revised BSD License 7 | * Copyright Semtech Corporation 2020. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions are met: 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * * Neither the name of the Semtech corporation nor the 17 | * names of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef __CALLBACK_H__ 33 | #define __CALLBACK_H__ 34 | 35 | #include 36 | 37 | typedef struct 38 | { 39 | void* object; 40 | void ( *callback )( void* ); 41 | } Callback_t; 42 | 43 | bool CALLBACK_CallIfNotNull( Callback_t* callback ); 44 | 45 | #endif // __CALLBACK_H__ 46 | -------------------------------------------------------------------------------- /embedded/lr1110_driver/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The Clear BSD License 2 | Copyright Semtech Corporation 2021. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted (subject to the limitations in the disclaimer 6 | below) provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the Semtech corporation nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY 17 | THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 18 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT 19 | NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 20 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE 21 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /embedded/lr1110_driver/README.md: -------------------------------------------------------------------------------- 1 | # LR1110_driver project 2 | 3 | This package proposes an implementation in C of the driver for **LR1110** radio component. 4 | 5 | ## Components 6 | 7 | The driver is split in several components: 8 | 9 | - Bootloader 10 | - Register / memory access 11 | - System configuration 12 | - Radio 13 | - Wi-Fi Passive Scanning 14 | - GNSS Scan Scanning 15 | - Crypto engine 16 | 17 | ### Bootloader 18 | 19 | This component is used to update the firmware. 20 | 21 | ### Register / memory access 22 | 23 | This component is used to read / write data from registers or internal memory. 24 | 25 | ### System configuration 26 | 27 | This component is used to interact with system-wide parameters like clock sources, integrated RF switches, etc. 28 | 29 | ### Radio 30 | 31 | This component is used to send / receive data through the different modems (LoRa and GFSK) or perform a LoRa CAD (Channel Activity Detection). Parameters like power amplifier selection, output power and fallback modes are also accessible through this component. 32 | 33 | ### Wi-Fi Passive Scanning 34 | 35 | This component is used to configure and initiate the passive scanning of the Wi-Fi signals that can be shared to request a geolocation. 36 | 37 | ### GNSS Scanning 38 | 39 | This component is used to configure and initiate the acquisition of GNSS signals that can be shared to request a geolocation. 40 | 41 | ### Crypto engine 42 | 43 | This component is used to set and derive keys in the internal keychain and perform cryptographic operations with the integrated hardware accelerator. 44 | 45 | ## Structure 46 | 47 | Each component is based on different files: 48 | 49 | - lr1110_component.c: implementation of the functions related to component 50 | - lr1110_component.h: declarations of the functions related to component 51 | - lr1110_component_types.h: type definitions related to components 52 | 53 | ## HAL 54 | 55 | The HAL (Hardware Abstraction Layer) is a collection of functions that the user shall implement to write platform-dependant calls to the host. The list of functions is the following: 56 | 57 | - lr1110_hal_reset() 58 | - lr1110_hal_wakeup() 59 | - lr1110_hal_write() 60 | - lr1110_hal_read() 61 | - lr1110_hal_direct_read() 62 | -------------------------------------------------------------------------------- /embedded/lr1110_modem_driver/LICENSE: -------------------------------------------------------------------------------- 1 | Revised BSD License 2 | Copyright Semtech Corporation 2020. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | * Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | * Neither the name of the Semtech corporation nor the 12 | names of its contributors may be used to endorse or promote products 13 | derived from this software without specific prior written permission. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 19 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /embedded/lr1110_modem_driver/README.md: -------------------------------------------------------------------------------- 1 | # lr1110_modem_sw_library 2 | 3 | This project proposes an implementation in C of the drivers for LR1110 modem: 4 | 5 | LoRaWAN communication 6 | Wi-Fi Sniff 7 | GNSS Sniff 8 | 9 | It does not involve any state machine or high level API. 10 | 11 | # LR1110_modem_driver project 12 | 13 | This package proposes an implementation in C of the driver for **LR1110** modem radio component. 14 | 15 | ## Components 16 | 17 | The driver is splitted in several components: 18 | 19 | - Bootloader 20 | - System configuration & Register / memory access 21 | - LoRaWAN 22 | - Wi-Fi Passive Scanning 23 | - GNSS Scan Scanning 24 | 25 | ### Bootloader 26 | 27 | This component is used to update the firmware. 28 | 29 | ### System configuration & Register / memory access 30 | 31 | This component is used to interact with system-wide parameters like clock sources, integrated RF switches, etc and read / write data from registers or internal memory. 32 | 33 | ### LoRaWAN 34 | 35 | This component is used to send / receive data through LoRaWAN. 36 | 37 | ### Wi-Fi Passive Scanning 38 | 39 | This component is used to configure and initiate the passive scanning of the Wi-Fi signals that can be shared to request a geolocation. 40 | 41 | ### GNSS Scanning 42 | 43 | This component is used to configure and initiate the acquisition of GNSS signals that can be shared to request a geolocation. 44 | 45 | ## HAL 46 | 47 | The HAL (Hardware Abstraction Layer) is a collection of functions that the user shall implement to write platform-dependant calls to the host. The list of functions is the following: 48 | 49 | - lr1110_hal_reset 50 | - lr1110_hal_wakeup 51 | - lr1110_hal_write 52 | - lr1110_hal_read 53 | - lr1110_hal_write_read 54 | 55 | - lr1110_modem_hal_reset 56 | - lr1110_modem_hal_wakeup 57 | - lr1110_modem_hal_write 58 | - lr1110_modem_hal_read 59 | - lr1110_modem_hal_write_read 60 | -------------------------------------------------------------------------------- /embedded/lvgl/.editorconfig: -------------------------------------------------------------------------------- 1 | [*.{c,h}] 2 | indent_style = space 3 | indent_size = 4 4 | end_of_line = lf 5 | insert_final_newline = true 6 | trim_trailing_whitespace = true 7 | 8 | -------------------------------------------------------------------------------- /embedded/lvgl/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | custom: ["https://littlevgl.com/donate"] 2 | -------------------------------------------------------------------------------- /embedded/lvgl/.github/ISSUE_TEMPLATE/all-other-issues.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: All other issues 3 | about: Questions and enhancement requests should go to the forum. 4 | title: '' 5 | labels: not-template 6 | assignees: '' 7 | 8 | --- 9 | 10 | # All enhancement requests or questions should be directed to the Forum. 11 | 12 | 13 | We use GitHub issues for development related discussions. 14 | Please use the [forum](https://forum.littlevgl.com/) to ask questions. 15 | -------------------------------------------------------------------------------- /embedded/lvgl/.github/ISSUE_TEMPLATE/bug-report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | > # Important: issues that don't use this template will be ignored/closed. 11 | 12 | **Describe the bug** 13 | 14 | A clear and concise description of what the bug is. 15 | 16 | **To Reproduce** 17 | 18 | Please provide a small, independent code sample that can be used to reproduce the issue. Ideally this should work in the PC simulator unless the problem is specific to one platform. 19 | 20 | **Expected behavior** 21 | 22 | A clear and concise description of what you expected to happen. 23 | 24 | **Screenshots** 25 | If applicable, add screenshots to help explain your problem. 26 | 27 | **Additional context** 28 | 29 | Add any other context about the problem here. 30 | -------------------------------------------------------------------------------- /embedded/lvgl/.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Number of days of inactivity before an issue becomes stale 2 | daysUntilStale: 21 3 | # Number of days of inactivity before a stale issue is closed 4 | daysUntilClose: 7 5 | # Issues with these labels will never be considered stale 6 | exemptLabels: 7 | - architecture 8 | - pinned 9 | # Label to use when marking an issue as stale 10 | staleLabel: stale 11 | # Comment to post when marking an issue as stale. Set to `false` to disable 12 | markComment: > 13 | This issue or pull request has been automatically marked as stale because it has not had 14 | recent activity. It will be closed if no further activity occurs. Thank you 15 | for your contributions. 16 | # Comment to post when closing a stale issue. Set to `false` to disable 17 | closeComment: false 18 | -------------------------------------------------------------------------------- /embedded/lvgl/.gitignore: -------------------------------------------------------------------------------- 1 | **/*.o 2 | **/*.swp 3 | **/*.swo 4 | tags 5 | docs/api_doc 6 | -------------------------------------------------------------------------------- /embedded/lvgl/.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lora-net/lr1110_evk_demo_app/f46c2234c53f290a5e9fcedc41d177159d04eb68/embedded/lvgl/.gitmodules -------------------------------------------------------------------------------- /embedded/lvgl/LICENCE.txt: -------------------------------------------------------------------------------- 1 | MIT licence 2 | Copyright (c) 2016 Gábor Kiss-Vámosi 3 | 4 | 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: 5 | 6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 7 | 8 | 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. 9 | -------------------------------------------------------------------------------- /embedded/lvgl/library.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lvgl", 3 | "version": "6.1.1", 4 | "keywords": "graphics, gui, embedded, littlevgl", 5 | "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.", 6 | "repository": 7 | { 8 | "type": "git", 9 | "url": "https://github.com/littlevgl/lvgl.git" 10 | }, 11 | "build": { 12 | "includeDir": "." 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /embedded/lvgl/lvgl.mk: -------------------------------------------------------------------------------- 1 | include $(LVGL_DIR)/lvgl/src/lv_core/lv_core.mk 2 | include $(LVGL_DIR)/lvgl/src/lv_hal/lv_hal.mk 3 | include $(LVGL_DIR)/lvgl/src/lv_objx/lv_objx.mk 4 | include $(LVGL_DIR)/lvgl/src/lv_font/lv_font.mk 5 | include $(LVGL_DIR)/lvgl/src/lv_misc/lv_misc.mk 6 | include $(LVGL_DIR)/lvgl/src/lv_themes/lv_themes.mk 7 | include $(LVGL_DIR)/lvgl/src/lv_draw/lv_draw.mk 8 | 9 | -------------------------------------------------------------------------------- /embedded/lvgl/porting/lv_port_disp_template.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_port_disp_templ.h 3 | * 4 | */ 5 | 6 | /*Copy this file as "lv_port_disp.h" and set this value to "1" to enable content*/ 7 | #if 0 8 | 9 | #ifndef LV_PORT_DISP_TEMPL_H 10 | #define LV_PORT_DISP_TEMPL_H 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | /********************* 17 | * INCLUDES 18 | *********************/ 19 | #include "lvgl/lvgl.h" 20 | 21 | /********************* 22 | * DEFINES 23 | *********************/ 24 | 25 | /********************** 26 | * TYPEDEFS 27 | **********************/ 28 | 29 | /********************** 30 | * GLOBAL PROTOTYPES 31 | **********************/ 32 | 33 | /********************** 34 | * MACROS 35 | **********************/ 36 | 37 | 38 | #ifdef __cplusplus 39 | } /* extern "C" */ 40 | #endif 41 | 42 | #endif /*LV_PORT_DISP_TEMPL_H*/ 43 | 44 | #endif /*Disable/Enable content*/ 45 | -------------------------------------------------------------------------------- /embedded/lvgl/porting/lv_port_fs_template.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_port_fs_templ.h 3 | * 4 | */ 5 | 6 | /*Copy this file as "lv_port_fs.h" and set this value to "1" to enable content*/ 7 | #if 0 8 | 9 | #ifndef LV_PORT_FS_TEMPL_H 10 | #define LV_PORT_FS_TEMPL_H 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | /********************* 17 | * INCLUDES 18 | *********************/ 19 | #include "lvgl/lvgl.h" 20 | 21 | /********************* 22 | * DEFINES 23 | *********************/ 24 | 25 | /********************** 26 | * TYPEDEFS 27 | **********************/ 28 | 29 | /********************** 30 | * GLOBAL PROTOTYPES 31 | **********************/ 32 | 33 | /********************** 34 | * MACROS 35 | **********************/ 36 | 37 | 38 | #ifdef __cplusplus 39 | } /* extern "C" */ 40 | #endif 41 | 42 | #endif /*LV_PORT_FS_TEMPL_H*/ 43 | 44 | #endif /*Disable/Enable content*/ 45 | -------------------------------------------------------------------------------- /embedded/lvgl/porting/lv_port_indev_template.h: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * @file lv_port_indev_templ.h 4 | * 5 | */ 6 | 7 | /*Copy this file as "lv_port_indev.h" and set this value to "1" to enable content*/ 8 | #if 0 9 | 10 | #ifndef LV_PORT_INDEV_TEMPL_H 11 | #define LV_PORT_INDEV_TEMPL_H 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | /********************* 18 | * INCLUDES 19 | *********************/ 20 | #include "lvgl/lvgl.h" 21 | 22 | /********************* 23 | * DEFINES 24 | *********************/ 25 | 26 | /********************** 27 | * TYPEDEFS 28 | **********************/ 29 | 30 | /********************** 31 | * GLOBAL PROTOTYPES 32 | **********************/ 33 | 34 | /********************** 35 | * MACROS 36 | **********************/ 37 | 38 | 39 | #ifdef __cplusplus 40 | } /* extern "C" */ 41 | #endif 42 | 43 | #endif /*LV_PORT_INDEV_TEMPL_H*/ 44 | 45 | #endif /*Disable/Enable content*/ 46 | -------------------------------------------------------------------------------- /embedded/lvgl/scripts/built_in_font/FontAwesome5-Solid+Brands+Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lora-net/lr1110_evk_demo_app/f46c2234c53f290a5e9fcedc41d177159d04eb68/embedded/lvgl/scripts/built_in_font/FontAwesome5-Solid+Brands+Regular.woff -------------------------------------------------------------------------------- /embedded/lvgl/scripts/built_in_font/Roboto-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lora-net/lr1110_evk_demo_app/f46c2234c53f290a5e9fcedc41d177159d04eb68/embedded/lvgl/scripts/built_in_font/Roboto-Regular.woff -------------------------------------------------------------------------------- /embedded/lvgl/scripts/built_in_font/built_in_font_gen.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | from argparse import RawTextHelpFormatter 3 | import os 4 | import sys 5 | 6 | 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 7 | Example: python built_in_font_gen.py --size 16 -o lv_font_roboto_16.c --bpp 4 -r 0x20-0x7F""", formatter_class=RawTextHelpFormatter) 8 | parser.add_argument('-s', '--size', 9 | type=int, 10 | metavar = 'px', 11 | nargs='?', 12 | help='Size of the font in px') 13 | parser.add_argument('--bpp', 14 | type=int, 15 | metavar = '1,2,4', 16 | nargs='?', 17 | help='Bit per pixel') 18 | parser.add_argument('-r', '--range', 19 | nargs='+', 20 | metavar = 'start-end', 21 | default='0x20-0x7F', 22 | help='Ranges and/or characters to include. Default is 0x20-7F (ASCII). E.g. -r 0x20-0x7F, 0x200, 324') 23 | parser.add_argument('--font', 24 | metavar = 'file', 25 | nargs='?', 26 | default='Roboto-Regular.woff', 27 | help='A TTF or WOFF file') 28 | parser.add_argument('-o', '--output', 29 | nargs='?', 30 | metavar='file', 31 | help='Output file name. E.g. my_font_20.c') 32 | parser.add_argument('--compressed', action='store_true', 33 | help='Compress the bitmaps') 34 | 35 | args = parser.parse_args() 36 | 37 | if args.compressed == False: 38 | compr = "--no-compress --no-prefilter" 39 | else: 40 | compr = "" 41 | 42 | #Built in symbols 43 | 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" 44 | 45 | #Run the command 46 | 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) 47 | os.system(cmd) 48 | -------------------------------------------------------------------------------- /embedded/lvgl/scripts/clang-formatter.sh: -------------------------------------------------------------------------------- 1 | clang-format-7 -style=file ../src/lv_core/*.c -i 2 | clang-format-7 -style=file ../src/lv_draw/*.c -i 3 | clang-format-7 -style=file ../src/lv_hal/*.c -i 4 | clang-format-7 -style=file ../src/lv_misc/*.c -i 5 | clang-format-7 -style=file ../src/lv_objx/*.c -i 6 | clang-format-7 -style=file ../src/lv_themes/*.c -i 7 | 8 | clang-format-7 -style=file ../src/lv_core/*.h -i 9 | clang-format-7 -style=file ../src/lv_draw/*.h -i 10 | clang-format-7 -style=file ../src/lv_hal/*.h -i 11 | clang-format-7 -style=file ../src/lv_misc/*.h -i 12 | clang-format-7 -style=file ../src/lv_objx/*.h -i 13 | clang-format-7 -style=file ../src/lv_themes/*.h -i 14 | -------------------------------------------------------------------------------- /embedded/lvgl/scripts/cppcheck_run.sh: -------------------------------------------------------------------------------- 1 | cppcheck --template="{severity}\t{file}:{line}\t{id}: {message}" --enable=all ../src/ --output-file=cppcheck_res.txt --suppress=unusedFunction --suppress=preprocessorErrorDirective --force 2 | 3 | -------------------------------------------------------------------------------- /embedded/lvgl/scripts/lv_conf_checker.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3.6 2 | 3 | ''' 4 | Generates a checker file for lv_conf.h from lv_conf_templ.h define all the not defined values 5 | ''' 6 | 7 | 8 | import re 9 | 10 | fin = open("../lv_conf_template.h", "r") 11 | fout = open("../src/lv_conf_checker.h", "w") 12 | 13 | 14 | fout.write( 15 | '''/** 16 | * GENERATED FILE, DO NOT EDIT IT! 17 | * @file lv_conf_checker.h 18 | * Make sure all the defines of lv_conf.h have a default value 19 | **/ 20 | 21 | #ifndef LV_CONF_CHECKER_H 22 | #define LV_CONF_CHECKER_H 23 | ''' 24 | ) 25 | 26 | started = 0 27 | 28 | for i in fin.read().splitlines(): 29 | if not started: 30 | if '#define LV_CONF_H' in i: 31 | started = 1 32 | continue 33 | else: 34 | continue 35 | 36 | if '/*--END OF LV_CONF_H--*/' in i: break 37 | 38 | r = re.search(r'^ *# *define ([^\s]+).*$', i) 39 | 40 | if r: 41 | line = re.sub('\(.*?\)', '', r[1], 1) #remove parentheses from macros 42 | fout.write( 43 | f'#ifndef {line}\n' 44 | f'{i}\n' 45 | '#endif\n' 46 | ) 47 | elif re.search('^ *typedef .*;.*$', i): 48 | continue #ignore typedefs to avoide redeclaration 49 | else: 50 | fout.write(f'{i}\n') 51 | 52 | 53 | fout.write( 54 | ''' 55 | #endif /*LV_CONF_CHECKER_H*/ 56 | ''' 57 | ) 58 | 59 | fin.close() 60 | fout.close() 61 | -------------------------------------------------------------------------------- /embedded/lvgl/src/lv_core/lv_core.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_group.c 2 | CSRCS += lv_indev.c 3 | CSRCS += lv_disp.c 4 | CSRCS += lv_obj.c 5 | CSRCS += lv_refr.c 6 | CSRCS += lv_style.c 7 | CSRCS += lv_debug.c 8 | 9 | DEPPATH += --dep-path $(LVGL_DIR)/lvgl/src/lv_core 10 | VPATH += :$(LVGL_DIR)/lvgl/src/lv_core 11 | 12 | CFLAGS += "-I$(LVGL_DIR)/lvgl/src/lv_core" 13 | -------------------------------------------------------------------------------- /embedded/lvgl/src/lv_draw/lv_draw.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_draw_basic.c 2 | CSRCS += lv_draw.c 3 | CSRCS += lv_draw_rect.c 4 | CSRCS += lv_draw_label.c 5 | CSRCS += lv_draw_line.c 6 | CSRCS += lv_draw_img.c 7 | CSRCS += lv_draw_arc.c 8 | CSRCS += lv_draw_triangle.c 9 | CSRCS += lv_img_decoder.c 10 | CSRCS += lv_img_cache.c 11 | 12 | DEPPATH += --dep-path $(LVGL_DIR)/lvgl/src/lv_draw 13 | VPATH += :$(LVGL_DIR)/lvgl/src/lv_draw 14 | 15 | CFLAGS += "-I$(LVGL_DIR)lvgl/src/lv_draw" 16 | -------------------------------------------------------------------------------- /embedded/lvgl/src/lv_draw/lv_draw_arc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_draw_arc.h 3 | * 4 | */ 5 | 6 | #ifndef LV_DRAW_ARC_H 7 | #define LV_DRAW_ARC_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "lv_draw.h" 17 | 18 | /********************* 19 | * DEFINES 20 | *********************/ 21 | 22 | /********************** 23 | * TYPEDEFS 24 | **********************/ 25 | 26 | /********************** 27 | * GLOBAL PROTOTYPES 28 | **********************/ 29 | 30 | /** 31 | * Draw an arc. (Can draw pie too with great thickness.) 32 | * @param center_x the x coordinate of the center of the arc 33 | * @param center_y the y coordinate of the center of the arc 34 | * @param radius the radius of the arc 35 | * @param mask the arc will be drawn only in this mask 36 | * @param start_angle the start angle of the arc (0 deg on the bottom, 90 deg on the right) 37 | * @param end_angle the end angle of the arc 38 | * @param style style of the arc (`body.thickness`, `body.main_color`, `body.opa` is used) 39 | * @param opa_scale scale down all opacities by the factor 40 | */ 41 | void lv_draw_arc(lv_coord_t center_x, lv_coord_t center_y, uint16_t radius, const lv_area_t * mask, 42 | uint16_t start_angle, uint16_t end_angle, const lv_style_t * style, lv_opa_t opa_scale); 43 | 44 | /********************** 45 | * MACROS 46 | **********************/ 47 | 48 | #ifdef __cplusplus 49 | } /* extern "C" */ 50 | #endif 51 | 52 | #endif /*LV_DRAW_ARC*/ 53 | -------------------------------------------------------------------------------- /embedded/lvgl/src/lv_draw/lv_draw_line.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_draw_line.h 3 | * 4 | */ 5 | 6 | #ifndef LV_DRAW_LINE_H 7 | #define LV_DRAW_LINE_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | /********************* 18 | * DEFINES 19 | *********************/ 20 | 21 | /********************** 22 | * TYPEDEFS 23 | **********************/ 24 | 25 | /********************** 26 | * GLOBAL PROTOTYPES 27 | **********************/ 28 | 29 | /** 30 | * Draw a line 31 | * @param point1 first point of the line 32 | * @param point2 second point of the line 33 | * @param mask the line will be drawn only on this area 34 | * @param style pointer to a line's style 35 | * @param opa_scale scale down all opacities by the factor 36 | */ 37 | void lv_draw_line(const lv_point_t * point1, const lv_point_t * point2, const lv_area_t * mask, 38 | const lv_style_t * style, lv_opa_t opa_scale); 39 | 40 | /********************** 41 | * MACROS 42 | **********************/ 43 | 44 | #ifdef __cplusplus 45 | } /* extern "C" */ 46 | #endif 47 | 48 | #endif /*LV_DRAW_LINE_H*/ 49 | -------------------------------------------------------------------------------- /embedded/lvgl/src/lv_draw/lv_draw_rect.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_draw_rect.h 3 | * 4 | */ 5 | 6 | #ifndef LV_DRAW_RECT_H 7 | #define LV_DRAW_RECT_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "lv_draw.h" 17 | 18 | /********************* 19 | * DEFINES 20 | *********************/ 21 | 22 | /********************** 23 | * TYPEDEFS 24 | **********************/ 25 | 26 | /********************** 27 | * GLOBAL PROTOTYPES 28 | **********************/ 29 | 30 | /** 31 | * Draw a rectangle 32 | * @param coords the coordinates of the rectangle 33 | * @param mask the rectangle will be drawn only in this mask 34 | * @param style pointer to a style 35 | * @param opa_scale scale down all opacities by the factor 36 | */ 37 | void lv_draw_rect(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale); 38 | 39 | /********************** 40 | * MACROS 41 | **********************/ 42 | 43 | #ifdef __cplusplus 44 | } /* extern "C" */ 45 | #endif 46 | 47 | #endif /*LV_DRAW_RECT_H*/ 48 | -------------------------------------------------------------------------------- /embedded/lvgl/src/lv_draw/lv_draw_triangle.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_draw_triangle.h 3 | * 4 | */ 5 | 6 | #ifndef LV_DRAW_TRIANGLE_H 7 | #define LV_DRAW_TRIANGLE_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "lv_draw.h" 17 | 18 | /********************* 19 | * DEFINES 20 | *********************/ 21 | 22 | /********************** 23 | * TYPEDEFS 24 | **********************/ 25 | 26 | /********************** 27 | * GLOBAL PROTOTYPES 28 | **********************/ 29 | 30 | /** 31 | * 32 | * @param points pointer to an array with 3 points 33 | * @param mask the triangle will be drawn only in this mask 34 | * @param style style for of the triangle 35 | * @param opa_scale scale down all opacities by the factor (0..255) 36 | */ 37 | void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale); 38 | 39 | /** 40 | * Draw a polygon from triangles. Only convex polygons are supported 41 | * @param points an array of points 42 | * @param point_cnt number of points 43 | * @param mask polygon will be drawn only in this mask 44 | * @param style style of the polygon 45 | * @param opa_scale scale down all opacities by the factor (0..255) 46 | */ 47 | void lv_draw_polygon(const lv_point_t * points, uint32_t point_cnt, const lv_area_t * mask, const lv_style_t * style, 48 | lv_opa_t opa_scale); 49 | 50 | /********************** 51 | * MACROS 52 | **********************/ 53 | 54 | #ifdef __cplusplus 55 | } /* extern "C" */ 56 | #endif 57 | 58 | #endif /*LV_DRAW_TRIANGLE_H*/ 59 | -------------------------------------------------------------------------------- /embedded/lvgl/src/lv_font/lv_font.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_font.c 3 | * 4 | */ 5 | 6 | /********************* 7 | * INCLUDES 8 | *********************/ 9 | 10 | #include "lv_font.h" 11 | #include "../lv_misc/lv_utils.h" 12 | #include "../lv_misc/lv_log.h" 13 | 14 | /********************* 15 | * DEFINES 16 | *********************/ 17 | 18 | /********************** 19 | * TYPEDEFS 20 | **********************/ 21 | 22 | /********************** 23 | * STATIC PROTOTYPES 24 | **********************/ 25 | 26 | /********************** 27 | * STATIC VARIABLES 28 | **********************/ 29 | 30 | /********************** 31 | * GLOBAL PROTOTYPES 32 | **********************/ 33 | 34 | /********************** 35 | * MACROS 36 | **********************/ 37 | 38 | /********************** 39 | * GLOBAL FUNCTIONS 40 | **********************/ 41 | 42 | /** 43 | * Return with the bitmap of a font. 44 | * @param font_p pointer to a font 45 | * @param letter an UNICODE character code 46 | * @return pointer to the bitmap of the letter 47 | */ 48 | const uint8_t * lv_font_get_glyph_bitmap(const lv_font_t * font_p, uint32_t letter) 49 | { 50 | return font_p->get_glyph_bitmap(font_p, letter); 51 | } 52 | 53 | /** 54 | * Get the descriptor of a glyph 55 | * @param font_p pointer to font 56 | * @param dsc_out store the result descriptor here 57 | * @param letter an UNICODE letter code 58 | * @return true: descriptor is successfully loaded into `dsc_out`. 59 | * false: the letter was not found, no data is loaded to `dsc_out` 60 | */ 61 | 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) 62 | { 63 | return font_p->get_glyph_dsc(font_p, dsc_out, letter, letter_next); 64 | } 65 | 66 | /** 67 | * Get the width of a glyph with kerning 68 | * @param font pointer to a font 69 | * @param letter an UNICODE letter 70 | * @param letter_next the next letter after `letter`. Used for kerning 71 | * @return the width of the glyph 72 | */ 73 | uint16_t lv_font_get_glyph_width(const lv_font_t * font, uint32_t letter, uint32_t letter_next) 74 | { 75 | lv_font_glyph_dsc_t g; 76 | bool ret; 77 | ret = lv_font_get_glyph_dsc(font, &g, letter, letter_next); 78 | if(ret) return g.adv_w; 79 | else return 0; 80 | } 81 | 82 | /********************** 83 | * STATIC FUNCTIONS 84 | **********************/ 85 | -------------------------------------------------------------------------------- /embedded/lvgl/src/lv_font/lv_font.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_font.c 2 | CSRCS += lv_font_fmt_txt.c 3 | CSRCS += lv_font_roboto_12.c 4 | CSRCS += lv_font_roboto_16.c 5 | CSRCS += lv_font_roboto_22.c 6 | CSRCS += lv_font_roboto_28.c 7 | CSRCS += lv_font_unscii_8.c 8 | 9 | DEPPATH += --dep-path $(LVGL_DIR)/lvgl/src/lv_font 10 | VPATH += :$(LVGL_DIR)/lvgl/src/lv_font 11 | 12 | CFLAGS += "-I$(LVGL_DIR)/lvgl/src/lv_font" 13 | -------------------------------------------------------------------------------- /embedded/lvgl/src/lv_hal/lv_hal.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_hal.h 3 | * 4 | */ 5 | 6 | #ifndef LV_HAL_H 7 | #define LV_HAL_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "lv_hal_disp.h" 17 | #include "lv_hal_indev.h" 18 | #include "lv_hal_tick.h" 19 | 20 | /********************* 21 | * DEFINES 22 | *********************/ 23 | 24 | /********************** 25 | * TYPEDEFS 26 | **********************/ 27 | 28 | /********************** 29 | * GLOBAL PROTOTYPES 30 | **********************/ 31 | 32 | /********************** 33 | * MACROS 34 | **********************/ 35 | 36 | #ifdef __cplusplus 37 | } /* extern "C" */ 38 | #endif 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /embedded/lvgl/src/lv_hal/lv_hal.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_hal_disp.c 2 | CSRCS += lv_hal_indev.c 3 | CSRCS += lv_hal_tick.c 4 | 5 | DEPPATH += --dep-path $(LVGL_DIR)/lvgl/src/lv_hal 6 | VPATH += :$(LVGL_DIR)/lvgl/src/lv_hal 7 | 8 | CFLAGS += "-I$(LVGL_DIR)/lvgl/src/lv_hal" 9 | -------------------------------------------------------------------------------- /embedded/lvgl/src/lv_hal/lv_hal_tick.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_hal_tick.h 3 | * Provide access to the system tick with 1 millisecond resolution 4 | */ 5 | 6 | #ifndef LV_HAL_TICK_H 7 | #define LV_HAL_TICK_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lv_conf.h" 18 | #else 19 | #include "../../../lv_conf.h" 20 | #endif 21 | #include 22 | #include 23 | 24 | /********************* 25 | * DEFINES 26 | *********************/ 27 | #ifndef LV_ATTRIBUTE_TICK_INC 28 | #define LV_ATTRIBUTE_TICK_INC 29 | #endif 30 | 31 | /********************** 32 | * TYPEDEFS 33 | **********************/ 34 | 35 | /********************** 36 | * GLOBAL PROTOTYPES 37 | **********************/ 38 | 39 | //! @cond Doxygen_Suppress 40 | 41 | /** 42 | * You have to call this function periodically 43 | * @param tick_period the call period of this function in milliseconds 44 | */ 45 | LV_ATTRIBUTE_TICK_INC void lv_tick_inc(uint32_t tick_period); 46 | 47 | //! @endcond 48 | 49 | /** 50 | * Get the elapsed milliseconds since start up 51 | * @return the elapsed milliseconds 52 | */ 53 | uint32_t lv_tick_get(void); 54 | 55 | /** 56 | * Get the elapsed milliseconds since a previous time stamp 57 | * @param prev_tick a previous time stamp (return value of systick_get() ) 58 | * @return the elapsed milliseconds since 'prev_tick' 59 | */ 60 | uint32_t lv_tick_elaps(uint32_t prev_tick); 61 | 62 | /********************** 63 | * MACROS 64 | **********************/ 65 | 66 | #ifdef __cplusplus 67 | } /* extern "C" */ 68 | #endif 69 | 70 | #endif /*LV_HAL_TICK_H*/ 71 | -------------------------------------------------------------------------------- /embedded/lvgl/src/lv_misc/lv_async.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_async.c 3 | * 4 | */ 5 | 6 | /********************* 7 | * INCLUDES 8 | *********************/ 9 | 10 | #include "lv_async.h" 11 | 12 | /********************* 13 | * DEFINES 14 | *********************/ 15 | 16 | /********************** 17 | * TYPEDEFS 18 | **********************/ 19 | 20 | /********************** 21 | * STATIC PROTOTYPES 22 | **********************/ 23 | 24 | static void lv_async_task_cb(lv_task_t *task); 25 | 26 | /********************** 27 | * STATIC VARIABLES 28 | **********************/ 29 | 30 | /********************** 31 | * MACROS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL FUNCTIONS 36 | **********************/ 37 | 38 | lv_res_t lv_async_call(lv_async_cb_t async_xcb, void * user_data) 39 | { 40 | /*Allocate an info structure */ 41 | lv_async_info_t *info = lv_mem_alloc(sizeof(lv_async_info_t)); 42 | 43 | if(info == NULL) 44 | return LV_RES_INV; 45 | 46 | /* Create a new task */ 47 | /* Use highest priority so that it will run before a refresh */ 48 | lv_task_t *task = lv_task_create(lv_async_task_cb, 0, LV_TASK_PRIO_HIGHEST, info); 49 | 50 | if(task == NULL) { 51 | lv_mem_free(info); 52 | return LV_RES_INV; 53 | } 54 | 55 | info->cb = async_xcb; 56 | info->user_data = user_data; 57 | 58 | /* Set the task's user data */ 59 | task->user_data = info; 60 | lv_task_once(task); 61 | return LV_RES_OK; 62 | } 63 | 64 | /********************** 65 | * STATIC FUNCTIONS 66 | **********************/ 67 | 68 | static void lv_async_task_cb(lv_task_t *task) 69 | { 70 | lv_async_info_t *info = (lv_async_info_t *)task->user_data; 71 | 72 | info->cb(info->user_data); 73 | 74 | lv_mem_free(info); 75 | } 76 | -------------------------------------------------------------------------------- /embedded/lvgl/src/lv_misc/lv_async.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_async.h 3 | * 4 | */ 5 | 6 | #ifndef LV_ASYNC_H 7 | #define LV_ASYNC_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | #include "lv_task.h" 18 | #include "lv_types.h" 19 | 20 | /********************* 21 | * DEFINES 22 | *********************/ 23 | 24 | /********************** 25 | * TYPEDEFS 26 | **********************/ 27 | 28 | /** 29 | * Type for async callback. 30 | */ 31 | typedef void (*lv_async_cb_t)(void *); 32 | 33 | typedef struct _lv_async_info_t { 34 | lv_async_cb_t cb; 35 | void *user_data; 36 | } lv_async_info_t; 37 | 38 | struct _lv_obj_t; 39 | 40 | /********************** 41 | * GLOBAL PROTOTYPES 42 | **********************/ 43 | 44 | /** 45 | * Call an asynchronous function the next time lv_task_handler() is run. This function is likely to return 46 | * **before** the call actually happens! 47 | * @param task_xcb a callback which is the task itself. 48 | * (the 'x' in the argument name indicates that its not a fully generic function because it not follows 49 | * the `func_name(object, callback, ...)` convention) 50 | * @param user_data custom parameter 51 | */ 52 | lv_res_t lv_async_call(lv_async_cb_t async_xcb, void * user_data); 53 | 54 | /********************** 55 | * MACROS 56 | **********************/ 57 | 58 | #ifdef __cplusplus 59 | } /* extern "C" */ 60 | #endif 61 | 62 | #endif /*LV_TEMPL_H*/ 63 | -------------------------------------------------------------------------------- /embedded/lvgl/src/lv_misc/lv_bidi.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_bifi.h 3 | * 4 | */ 5 | 6 | #ifndef LV_BIDI_H 7 | #define LV_BIDI_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lv_conf.h" 18 | #else 19 | #include "../../../lv_conf.h" 20 | #endif 21 | 22 | #include 23 | #include 24 | 25 | /********************* 26 | * DEFINES 27 | *********************/ 28 | /* Special non printable strong characters. 29 | * They can be inserted to texts to affect the run's direction*/ 30 | #define LV_BIDI_LRO "\xE2\x80\xAD" /*U+202D*/ 31 | #define LV_BIDI_RLO "\xE2\x80\xAE" /*U+202E*/ 32 | 33 | /********************** 34 | * TYPEDEFS 35 | **********************/ 36 | enum 37 | { 38 | /*The first 4 values are stored in `lv_obj_t` on 2 bits*/ 39 | LV_BIDI_DIR_LTR = 0x00, 40 | LV_BIDI_DIR_RTL = 0x01, 41 | LV_BIDI_DIR_AUTO = 0x02, 42 | LV_BIDI_DIR_INHERIT = 0x03, 43 | 44 | LV_BIDI_DIR_NEUTRAL = 0x20, 45 | LV_BIDI_DIR_WEAK = 0x21, 46 | }; 47 | 48 | typedef uint8_t lv_bidi_dir_t; 49 | 50 | /********************** 51 | * GLOBAL PROTOTYPES 52 | **********************/ 53 | #if LV_USE_BIDI 54 | 55 | void lv_bidi_process(const char * str_in, char * str_out, lv_bidi_dir_t base_dir); 56 | 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); 57 | uint32_t lv_bidi_get_next_paragraph(const char * txt); 58 | lv_bidi_dir_t lv_bidi_detect_base_dir(const char * txt); 59 | lv_bidi_dir_t lv_bidi_get_letter_dir(uint32_t letter); 60 | bool lv_bidi_letter_is_weak(uint32_t letter); 61 | bool lv_bidi_letter_is_rtl(uint32_t letter); 62 | bool lv_bidi_letter_is_neutral(uint32_t letter); 63 | 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); 64 | 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); 65 | 66 | /********************** 67 | * MACROS 68 | **********************/ 69 | 70 | #endif /*LV_USE_BIDI*/ 71 | 72 | #ifdef __cplusplus 73 | } /* extern "C" */ 74 | #endif 75 | 76 | #endif /*LV_BIDI_H*/ 77 | -------------------------------------------------------------------------------- /embedded/lvgl/src/lv_misc/lv_circ.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_circ.c 3 | * Circle drawing algorithm (with Bresenham) 4 | * Only a 1/8 circle is calculated. Use CIRC_OCT1_X, CIRC_OCT1_Y macros to get 5 | * the other octets. 6 | */ 7 | 8 | /********************* 9 | * INCLUDES 10 | *********************/ 11 | #include "lv_circ.h" 12 | 13 | /********************* 14 | * DEFINES 15 | *********************/ 16 | 17 | /********************** 18 | * TYPEDEFS 19 | **********************/ 20 | 21 | /********************** 22 | * STATIC PROTOTYPES 23 | **********************/ 24 | 25 | /********************** 26 | * STATIC VARIABLES 27 | **********************/ 28 | 29 | /********************** 30 | * MACROS 31 | **********************/ 32 | 33 | /********************** 34 | * GLOBAL FUNCTIONS 35 | **********************/ 36 | 37 | /** 38 | * Initialize the circle drawing 39 | * @param c pointer to a point. The coordinates will be calculated here 40 | * @param tmp point to a variable. It will store temporary data 41 | * @param radius radius of the circle 42 | */ 43 | void lv_circ_init(lv_point_t * c, lv_coord_t * tmp, lv_coord_t radius) 44 | { 45 | c->x = radius; 46 | c->y = 0; 47 | *tmp = 1 - radius; 48 | } 49 | 50 | /** 51 | * Test the circle drawing is ready or not 52 | * @param c same as in circ_init 53 | * @return true if the circle is not ready yet 54 | */ 55 | bool lv_circ_cont(lv_point_t * c) 56 | { 57 | return c->y <= c->x ? true : false; 58 | } 59 | 60 | /** 61 | * Get the next point from the circle 62 | * @param c same as in circ_init. The next point stored here. 63 | * @param tmp same as in circ_init. 64 | */ 65 | void lv_circ_next(lv_point_t * c, lv_coord_t * tmp) 66 | { 67 | c->y++; 68 | 69 | if(*tmp <= 0) { 70 | (*tmp) += 2 * c->y + 1; /*Change in decision criterion for y -> y+1*/ 71 | } else { 72 | c->x--; 73 | (*tmp) += 2 * (c->y - c->x) + 1; /*Change for y -> y+1, x -> x-1*/ 74 | } 75 | } 76 | 77 | /********************** 78 | * STATIC FUNCTIONS 79 | **********************/ 80 | -------------------------------------------------------------------------------- /embedded/lvgl/src/lv_misc/lv_circ.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_circ.h 3 | * 4 | */ 5 | 6 | #ifndef LV_CIRC_H 7 | #define LV_CIRC_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include 17 | #include "lv_area.h" 18 | 19 | /********************* 20 | * DEFINES 21 | *********************/ 22 | #define LV_CIRC_OCT1_X(p) (p.x) 23 | #define LV_CIRC_OCT1_Y(p) (p.y) 24 | #define LV_CIRC_OCT2_X(p) (p.y) 25 | #define LV_CIRC_OCT2_Y(p) (p.x) 26 | #define LV_CIRC_OCT3_X(p) (-p.y) 27 | #define LV_CIRC_OCT3_Y(p) (p.x) 28 | #define LV_CIRC_OCT4_X(p) (-p.x) 29 | #define LV_CIRC_OCT4_Y(p) (p.y) 30 | #define LV_CIRC_OCT5_X(p) (-p.x) 31 | #define LV_CIRC_OCT5_Y(p) (-p.y) 32 | #define LV_CIRC_OCT6_X(p) (-p.y) 33 | #define LV_CIRC_OCT6_Y(p) (-p.x) 34 | #define LV_CIRC_OCT7_X(p) (p.y) 35 | #define LV_CIRC_OCT7_Y(p) (-p.x) 36 | #define LV_CIRC_OCT8_X(p) (p.x) 37 | #define LV_CIRC_OCT8_Y(p) (-p.y) 38 | 39 | /********************** 40 | * TYPEDEFS 41 | **********************/ 42 | 43 | /********************** 44 | * GLOBAL PROTOTYPES 45 | **********************/ 46 | 47 | /** 48 | * Initialize the circle drawing 49 | * @param c pointer to a point. The coordinates will be calculated here 50 | * @param tmp point to a variable. It will store temporary data 51 | * @param radius radius of the circle 52 | */ 53 | void lv_circ_init(lv_point_t * c, lv_coord_t * tmp, lv_coord_t radius); 54 | 55 | /** 56 | * Test the circle drawing is ready or not 57 | * @param c same as in circ_init 58 | * @return true if the circle is not ready yet 59 | */ 60 | bool lv_circ_cont(lv_point_t * c); 61 | 62 | /** 63 | * Get the next point from the circle 64 | * @param c same as in circ_init. The next point stored here. 65 | * @param tmp same as in circ_init. 66 | */ 67 | void lv_circ_next(lv_point_t * c, lv_coord_t * tmp); 68 | 69 | /********************** 70 | * MACROS 71 | **********************/ 72 | 73 | #ifdef __cplusplus 74 | } /* extern "C" */ 75 | #endif 76 | 77 | #endif 78 | -------------------------------------------------------------------------------- /embedded/lvgl/src/lv_misc/lv_gc.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_gc.c 3 | * 4 | */ 5 | 6 | /********************* 7 | * INCLUDES 8 | *********************/ 9 | 10 | #include "lv_gc.h" 11 | #include "string.h" 12 | 13 | #if defined(LV_GC_INCLUDE) 14 | #include LV_GC_INCLUDE 15 | #endif /* LV_ENABLE_GC */ 16 | 17 | /********************* 18 | * DEFINES 19 | *********************/ 20 | 21 | /********************** 22 | * TYPEDEFS 23 | **********************/ 24 | 25 | /********************** 26 | * STATIC PROTOTYPES 27 | **********************/ 28 | 29 | /********************** 30 | * STATIC VARIABLES 31 | **********************/ 32 | #if(!defined(LV_ENABLE_GC)) || LV_ENABLE_GC == 0 33 | LV_ROOTS 34 | #endif /* LV_ENABLE_GC */ 35 | /********************** 36 | * MACROS 37 | **********************/ 38 | 39 | /********************** 40 | * GLOBAL FUNCTIONS 41 | **********************/ 42 | 43 | void lv_gc_clear_roots(void) 44 | { 45 | #define LV_CLEAR_ROOT(root_type, root_name) memset(&LV_GC_ROOT(root_name), 0, sizeof(LV_GC_ROOT(root_name))); 46 | LV_ITERATE_ROOTS(LV_CLEAR_ROOT) 47 | } 48 | 49 | /********************** 50 | * STATIC FUNCTIONS 51 | **********************/ 52 | -------------------------------------------------------------------------------- /embedded/lvgl/src/lv_misc/lv_gc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_gc.h 3 | * 4 | */ 5 | 6 | #ifndef LV_GC_H 7 | #define LV_GC_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | #ifdef LV_CONF_INCLUDE_SIMPLE 18 | #include "lv_conf.h" 19 | #else 20 | #include "../../../lv_conf.h" 21 | #endif 22 | 23 | #include 24 | #include 25 | #include "lv_mem.h" 26 | #include "lv_ll.h" 27 | #include "../lv_draw/lv_img_cache.h" 28 | 29 | /********************* 30 | * DEFINES 31 | *********************/ 32 | 33 | #define LV_ITERATE_ROOTS(f) \ 34 | f(lv_ll_t, _lv_task_ll) /*Linked list to store the lv_tasks*/ \ 35 | f(lv_ll_t, _lv_disp_ll) /*Linked list of screens*/ \ 36 | f(lv_ll_t, _lv_indev_ll) /*Linked list of screens*/ \ 37 | f(lv_ll_t, _lv_drv_ll) \ 38 | f(lv_ll_t, _lv_file_ll) \ 39 | f(lv_ll_t, _lv_anim_ll) \ 40 | f(lv_ll_t, _lv_group_ll) \ 41 | f(lv_ll_t, _lv_img_defoder_ll) \ 42 | f(lv_img_cache_entry_t*, _lv_img_cache_array) \ 43 | f(void*, _lv_task_act) \ 44 | f(void*, _lv_draw_buf) 45 | 46 | #define LV_DEFINE_ROOT(root_type, root_name) root_type root_name; 47 | #define LV_ROOTS LV_ITERATE_ROOTS(LV_DEFINE_ROOT) 48 | 49 | #if LV_ENABLE_GC == 1 50 | #if LV_MEM_CUSTOM != 1 51 | #error "GC requires CUSTOM_MEM" 52 | #endif /* LV_MEM_CUSTOM */ 53 | #else /* LV_ENABLE_GC */ 54 | #define LV_GC_ROOT(x) x 55 | #define LV_EXTERN_ROOT(root_type, root_name) extern root_type root_name; 56 | LV_ITERATE_ROOTS(LV_EXTERN_ROOT) 57 | #endif /* LV_ENABLE_GC */ 58 | 59 | /********************** 60 | * TYPEDEFS 61 | **********************/ 62 | 63 | /********************** 64 | * GLOBAL PROTOTYPES 65 | **********************/ 66 | 67 | void lv_gc_clear_roots(void); 68 | 69 | /********************** 70 | * MACROS 71 | **********************/ 72 | 73 | #ifdef __cplusplus 74 | } /* extern "C" */ 75 | #endif 76 | 77 | #endif /*LV_GC_H*/ 78 | -------------------------------------------------------------------------------- /embedded/lvgl/src/lv_misc/lv_log.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_log.c 3 | * 4 | */ 5 | 6 | /********************* 7 | * INCLUDES 8 | *********************/ 9 | #include "lv_log.h" 10 | #if LV_USE_LOG 11 | 12 | #if LV_LOG_PRINTF 13 | #include 14 | #endif 15 | 16 | /********************* 17 | * DEFINES 18 | *********************/ 19 | 20 | /********************** 21 | * TYPEDEFS 22 | **********************/ 23 | 24 | /********************** 25 | * STATIC PROTOTYPES 26 | **********************/ 27 | 28 | /********************** 29 | * STATIC VARIABLES 30 | **********************/ 31 | static lv_log_print_g_cb_t custom_print_cb; 32 | 33 | /********************** 34 | * MACROS 35 | **********************/ 36 | 37 | /********************** 38 | * GLOBAL FUNCTIONS 39 | **********************/ 40 | 41 | /** 42 | * Register custom print/write function to call when a log is added. 43 | * It can format its "File path", "Line number" and "Description" as required 44 | * and send the formatted log message to a consol or serial port. 45 | * @param print_cb a function pointer to print a log 46 | */ 47 | void lv_log_register_print_cb(lv_log_print_g_cb_t print_cb) 48 | { 49 | custom_print_cb = print_cb; 50 | } 51 | 52 | /** 53 | * Add a log 54 | * @param level the level of log. (From `lv_log_level_t` enum) 55 | * @param file name of the file when the log added 56 | * @param line line number in the source code where the log added 57 | * @param dsc description of the log 58 | */ 59 | void lv_log_add(lv_log_level_t level, const char * file, int line, const char * dsc) 60 | { 61 | if(level >= _LV_LOG_LEVEL_NUM) return; /*Invalid level*/ 62 | 63 | if(level >= LV_LOG_LEVEL) { 64 | 65 | #if LV_LOG_PRINTF 66 | static const char * lvl_prefix[] = {"Trace", "Info", "Warn", "Error"}; 67 | printf("%s: %s \t(%s #%d)\n", lvl_prefix[level], dsc, file, line); 68 | #else 69 | if(custom_print_cb) custom_print_cb(level, file, line, dsc); 70 | #endif 71 | } 72 | } 73 | 74 | /********************** 75 | * STATIC FUNCTIONS 76 | **********************/ 77 | 78 | #endif /*LV_USE_LOG*/ 79 | -------------------------------------------------------------------------------- /embedded/lvgl/src/lv_misc/lv_math.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file math_base.h 3 | * 4 | */ 5 | 6 | #ifndef LV_MATH_H 7 | #define LV_MATH_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include 17 | 18 | /********************* 19 | * DEFINES 20 | *********************/ 21 | #define LV_MATH_MIN(a, b) ((a) < (b) ? (a) : (b)) 22 | #define LV_MATH_MAX(a, b) ((a) > (b) ? (a) : (b)) 23 | #define LV_MATH_ABS(x) ((x) > 0 ? (x) : (-(x))) 24 | 25 | #define LV_TRIGO_SIN_MAX 32767 26 | #define LV_TRIGO_SHIFT 15 /**< >> LV_TRIGO_SHIFT to normalize*/ 27 | 28 | #define LV_BEZIER_VAL_MAX 1024 /**< Max time in Bezier functions (not [0..1] to use integers) */ 29 | #define LV_BEZIER_VAL_SHIFT 10 /**< log2(LV_BEZIER_VAL_MAX): used to normalize up scaled values*/ 30 | 31 | /********************** 32 | * TYPEDEFS 33 | **********************/ 34 | 35 | /********************** 36 | * GLOBAL PROTOTYPES 37 | **********************/ 38 | 39 | /** 40 | * Return with sinus of an angle 41 | * @param angle 42 | * @return sinus of 'angle'. sin(-90) = -32767, sin(90) = 32767 43 | */ 44 | int16_t lv_trigo_sin(int16_t angle); 45 | 46 | /** 47 | * Calculate a value of a Cubic Bezier function. 48 | * @param t time in range of [0..LV_BEZIER_VAL_MAX] 49 | * @param u0 start values in range of [0..LV_BEZIER_VAL_MAX] 50 | * @param u1 control value 1 values in range of [0..LV_BEZIER_VAL_MAX] 51 | * @param u2 control value 2 in range of [0..LV_BEZIER_VAL_MAX] 52 | * @param u3 end values in range of [0..LV_BEZIER_VAL_MAX] 53 | * @return the value calculated from the given parameters in range of [0..LV_BEZIER_VAL_MAX] 54 | */ 55 | int32_t lv_bezier3(uint32_t t, int32_t u0, int32_t u1, int32_t u2, int32_t u3); 56 | 57 | /** 58 | * Calculate the atan2 of a vector. 59 | * @param x 60 | * @param y 61 | * @return the angle in degree calculated from the given parameters in range of [0..360] 62 | */ 63 | uint16_t lv_atan2(int x, int y); 64 | 65 | /** 66 | * Calculate the integer square root of a number. 67 | * @param num 68 | * @return square root of 'num' 69 | */ 70 | uint32_t lv_sqrt(uint32_t num); 71 | 72 | /********************** 73 | * MACROS 74 | **********************/ 75 | 76 | #ifdef __cplusplus 77 | } /* extern "C" */ 78 | #endif 79 | 80 | #endif 81 | -------------------------------------------------------------------------------- /embedded/lvgl/src/lv_misc/lv_misc.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_circ.c 2 | CSRCS += lv_area.c 3 | CSRCS += lv_task.c 4 | CSRCS += lv_fs.c 5 | CSRCS += lv_anim.c 6 | CSRCS += lv_mem.c 7 | CSRCS += lv_ll.c 8 | CSRCS += lv_color.c 9 | CSRCS += lv_txt.c 10 | CSRCS += lv_math.c 11 | CSRCS += lv_log.c 12 | CSRCS += lv_gc.c 13 | CSRCS += lv_utils.c 14 | CSRCS += lv_async.c 15 | CSRCS += lv_printf.c 16 | CSRCS += lv_bidi.c 17 | 18 | 19 | DEPPATH += --dep-path $(LVGL_DIR)/lvgl/src/lv_misc 20 | VPATH += :$(LVGL_DIR)/lvgl/src/lv_misc 21 | 22 | CFLAGS += "-I$(LVGL_DIR)/lvgl/src/lv_misc" 23 | -------------------------------------------------------------------------------- /embedded/lvgl/src/lv_misc/lv_templ.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_templ.c 3 | * 4 | */ 5 | 6 | /********************* 7 | * INCLUDES 8 | *********************/ 9 | 10 | /********************* 11 | * DEFINES 12 | *********************/ 13 | 14 | /********************** 15 | * TYPEDEFS 16 | **********************/ 17 | 18 | /* This typedef exists purely to keep -Wpedantic happy when the file is empty. */ 19 | /* It can be removed. */ 20 | typedef int keep_pedantic_happy; 21 | 22 | /********************** 23 | * STATIC PROTOTYPES 24 | **********************/ 25 | 26 | /********************** 27 | * STATIC VARIABLES 28 | **********************/ 29 | 30 | /********************** 31 | * MACROS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL FUNCTIONS 36 | **********************/ 37 | 38 | /********************** 39 | * STATIC FUNCTIONS 40 | **********************/ 41 | -------------------------------------------------------------------------------- /embedded/lvgl/src/lv_misc/lv_templ.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_templ.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEMPL_H 7 | #define LV_TEMPL_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | /********************* 18 | * DEFINES 19 | *********************/ 20 | 21 | /********************** 22 | * TYPEDEFS 23 | **********************/ 24 | 25 | /********************** 26 | * GLOBAL PROTOTYPES 27 | **********************/ 28 | 29 | /********************** 30 | * MACROS 31 | **********************/ 32 | 33 | #ifdef __cplusplus 34 | } /* extern "C" */ 35 | #endif 36 | 37 | #endif /*LV_TEMPL_H*/ 38 | -------------------------------------------------------------------------------- /embedded/lvgl/src/lv_misc/lv_types.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_types.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TYPES_H 7 | #define LV_TYPES_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | /********************* 18 | * DEFINES 19 | *********************/ 20 | // Check windows 21 | #ifdef _WIN64 22 | #define LV_ARCH_64 23 | #endif 24 | 25 | // Check GCC 26 | #ifdef __GNUC__ 27 | #if defined(__x86_64__) || defined(__ppc64__) 28 | #define LV_ARCH_64 29 | #endif 30 | #endif 31 | 32 | /********************** 33 | * TYPEDEFS 34 | **********************/ 35 | 36 | /** 37 | * LittlevGL error codes. 38 | */ 39 | enum { 40 | LV_RES_INV = 0, /*Typically indicates that the object is deleted (become invalid) in the action 41 | function or an operation was failed*/ 42 | LV_RES_OK, /*The object is valid (no deleted) after the action*/ 43 | }; 44 | typedef uint8_t lv_res_t; 45 | 46 | #ifdef LV_ARCH_64 47 | typedef uint64_t lv_uintptr_t; 48 | #else 49 | typedef uint32_t lv_uintptr_t; 50 | #endif 51 | 52 | /********************** 53 | * GLOBAL PROTOTYPES 54 | **********************/ 55 | 56 | /********************** 57 | * MACROS 58 | **********************/ 59 | 60 | #ifdef __cplusplus 61 | } /* extern "C" */ 62 | #endif 63 | 64 | #endif /*LV_TYPES_H*/ 65 | -------------------------------------------------------------------------------- /embedded/lvgl/src/lv_misc/lv_utils.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_utils.h 3 | * 4 | */ 5 | 6 | #ifndef LV_UTILS_H 7 | #define LV_UTILS_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include 17 | #include 18 | 19 | /********************* 20 | * DEFINES 21 | *********************/ 22 | 23 | /********************** 24 | * TYPEDEFS 25 | **********************/ 26 | 27 | /********************** 28 | * GLOBAL PROTOTYPES 29 | **********************/ 30 | /** 31 | * Convert a number to string 32 | * @param num a number 33 | * @param buf pointer to a `char` buffer. The result will be stored here (max 10 elements) 34 | * @return same as `buf` (just for convenience) 35 | */ 36 | char * lv_utils_num_to_str(int32_t num, char * buf); 37 | 38 | /** Searches base[0] to base[n - 1] for an item that matches *key. 39 | * 40 | * @note The function cmp must return negative if its first 41 | * argument (the search key) is less that its second (a table entry), 42 | * zero if equal, and positive if greater. 43 | * 44 | * @note Items in the array must be in ascending order. 45 | * 46 | * @param key Pointer to item being searched for 47 | * @param base Pointer to first element to search 48 | * @param n Number of elements 49 | * @param size Size of each element 50 | * @param cmp Pointer to comparison function (see #lv_font_codeCompare as a comparison function 51 | * example) 52 | * 53 | * @return a pointer to a matching item, or NULL if none exists. 54 | */ 55 | void * lv_utils_bsearch(const void * key, const void * base, uint32_t n, uint32_t size, 56 | int32_t (*cmp)(const void * pRef, const void * pElement)); 57 | 58 | /********************** 59 | * MACROS 60 | **********************/ 61 | 62 | #ifdef __cplusplus 63 | } /* extern "C" */ 64 | #endif 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /embedded/lvgl/src/lv_objx/lv_objx.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_arc.c 2 | CSRCS += lv_bar.c 3 | CSRCS += lv_cb.c 4 | CSRCS += lv_cpicker.c 5 | CSRCS += lv_ddlist.c 6 | CSRCS += lv_kb.c 7 | CSRCS += lv_line.c 8 | CSRCS += lv_mbox.c 9 | CSRCS += lv_preload.c 10 | CSRCS += lv_roller.c 11 | CSRCS += lv_table.c 12 | CSRCS += lv_tabview.c 13 | CSRCS += lv_tileview.c 14 | CSRCS += lv_btn.c 15 | CSRCS += lv_calendar.c 16 | CSRCS += lv_chart.c 17 | CSRCS += lv_canvas.c 18 | CSRCS += lv_gauge.c 19 | CSRCS += lv_label.c 20 | CSRCS += lv_list.c 21 | CSRCS += lv_slider.c 22 | CSRCS += lv_ta.c 23 | CSRCS += lv_spinbox.c 24 | CSRCS += lv_btnm.c 25 | CSRCS += lv_cont.c 26 | CSRCS += lv_img.c 27 | CSRCS += lv_imgbtn.c 28 | CSRCS += lv_led.c 29 | CSRCS += lv_lmeter.c 30 | CSRCS += lv_page.c 31 | CSRCS += lv_sw.c 32 | CSRCS += lv_win.c 33 | 34 | DEPPATH += --dep-path $(LVGL_DIR)/lvgl/src/lv_objx 35 | VPATH += :$(LVGL_DIR)/lvgl/src/lv_objx 36 | 37 | CFLAGS += "-I$(LVGL_DIR)/lvgl/src/lv_objx" 38 | -------------------------------------------------------------------------------- /embedded/lvgl/src/lv_themes/lv_theme_alien.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_theme_alien.h 3 | * 4 | */ 5 | 6 | #ifndef LV_THEME_ALIEN_H 7 | #define LV_THEME_ALIEN_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lv_conf.h" 18 | #else 19 | #include "../../../lv_conf.h" 20 | #endif 21 | 22 | #if LV_USE_THEME_ALIEN 23 | 24 | /********************* 25 | * DEFINES 26 | *********************/ 27 | 28 | /********************** 29 | * TYPEDEFS 30 | **********************/ 31 | 32 | /********************** 33 | * GLOBAL PROTOTYPES 34 | **********************/ 35 | 36 | /** 37 | * Initialize the alien theme 38 | * @param hue [0..360] hue value from HSV color space to define the theme's base color 39 | * @param font pointer to a font (NULL to use the default) 40 | * @return pointer to the initialized theme 41 | */ 42 | lv_theme_t * lv_theme_alien_init(uint16_t hue, lv_font_t * font); 43 | /** 44 | * Get a pointer to the theme 45 | * @return pointer to the theme 46 | */ 47 | lv_theme_t * lv_theme_get_alien(void); 48 | 49 | /********************** 50 | * MACROS 51 | **********************/ 52 | 53 | #endif 54 | 55 | #ifdef __cplusplus 56 | } /* extern "C" */ 57 | #endif 58 | 59 | #endif /*LV_THEME_ALIEN_H*/ 60 | -------------------------------------------------------------------------------- /embedded/lvgl/src/lv_themes/lv_theme_default.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_theme_default.h 3 | * 4 | */ 5 | 6 | #ifndef LV_THEME_DEFAULT_H 7 | #define LV_THEME_DEFAULT_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lv_conf.h" 18 | #else 19 | #include "../../../lv_conf.h" 20 | #endif 21 | 22 | #if LV_USE_THEME_DEFAULT 23 | 24 | /********************* 25 | * DEFINES 26 | *********************/ 27 | 28 | /********************** 29 | * TYPEDEFS 30 | **********************/ 31 | 32 | /********************** 33 | * GLOBAL PROTOTYPES 34 | **********************/ 35 | 36 | /** 37 | * Initialize the default theme 38 | * @param hue [0..360] hue value from HSV color space to define the theme's base color 39 | * @param font pointer to a font (NULL to use the default) 40 | * @return pointer to the initialized theme 41 | */ 42 | lv_theme_t * lv_theme_default_init(uint16_t hue, lv_font_t * font); 43 | 44 | /** 45 | * Get a pointer to the theme 46 | * @return pointer to the theme 47 | */ 48 | lv_theme_t * lv_theme_get_default(void); 49 | 50 | /********************** 51 | * MACROS 52 | **********************/ 53 | 54 | #endif 55 | 56 | #ifdef __cplusplus 57 | } /* extern "C" */ 58 | #endif 59 | 60 | #endif /*LV_THEME_TEMPL_H*/ 61 | -------------------------------------------------------------------------------- /embedded/lvgl/src/lv_themes/lv_theme_material.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_theme_material.h 3 | * 4 | */ 5 | 6 | #ifndef LV_THEME_MATERIAL_H 7 | #define LV_THEME_MATERIAL_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lv_conf.h" 18 | #else 19 | #include "../../../lv_conf.h" 20 | #endif 21 | 22 | #if LV_USE_THEME_MATERIAL 23 | 24 | /********************* 25 | * DEFINES 26 | *********************/ 27 | 28 | /********************** 29 | * TYPEDEFS 30 | **********************/ 31 | 32 | /********************** 33 | * GLOBAL PROTOTYPES 34 | **********************/ 35 | 36 | /** 37 | * Initialize the material theme 38 | * @param hue [0..360] hue value from HSV color space to define the theme's base color 39 | * @param font pointer to a font (NULL to use the default) 40 | * @return pointer to the initialized theme 41 | */ 42 | lv_theme_t * lv_theme_material_init(uint16_t hue, lv_font_t * font); 43 | 44 | /** 45 | * Get a pointer to the theme 46 | * @return pointer to the theme 47 | */ 48 | lv_theme_t * lv_theme_get_material(void); 49 | 50 | /********************** 51 | * MACROS 52 | **********************/ 53 | 54 | #endif 55 | 56 | #ifdef __cplusplus 57 | } /* extern "C" */ 58 | #endif 59 | 60 | #endif /*LV_THEME_MATERIAL_H*/ 61 | -------------------------------------------------------------------------------- /embedded/lvgl/src/lv_themes/lv_theme_mono.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_theme_mono.h 3 | * 4 | */ 5 | 6 | #ifndef LV_THEME_MONO_H 7 | #define LV_THEME_MONO_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lv_conf.h" 18 | #else 19 | #include "../../../lv_conf.h" 20 | #endif 21 | 22 | #if LV_USE_THEME_MONO 23 | 24 | /********************* 25 | * DEFINES 26 | *********************/ 27 | 28 | /********************** 29 | * TYPEDEFS 30 | **********************/ 31 | 32 | /********************** 33 | * GLOBAL PROTOTYPES 34 | **********************/ 35 | 36 | /** 37 | * Initialize the mono theme 38 | * @param hue [0..360] hue value from HSV color space to define the theme's base color 39 | * @param font pointer to a font (NULL to use the default) 40 | * @return pointer to the initialized theme 41 | */ 42 | lv_theme_t * lv_theme_mono_init(uint16_t hue, lv_font_t * font); 43 | 44 | /** 45 | * Get a pointer to the theme 46 | * @return pointer to the theme 47 | */ 48 | lv_theme_t * lv_theme_get_mono(void); 49 | 50 | /********************** 51 | * MACROS 52 | **********************/ 53 | 54 | #endif 55 | 56 | #ifdef __cplusplus 57 | } /* extern "C" */ 58 | #endif 59 | 60 | #endif /*LV_THEME_MONO_H*/ 61 | -------------------------------------------------------------------------------- /embedded/lvgl/src/lv_themes/lv_theme_nemo.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_theme_nemo.h 3 | * 4 | */ 5 | 6 | #ifndef LV_THEME_NEMO_H 7 | #define LV_THEME_NEMO_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lv_conf.h" 18 | #else 19 | #include "../../../lv_conf.h" 20 | #endif 21 | 22 | #if LV_USE_THEME_NEMO 23 | 24 | /********************* 25 | * DEFINES 26 | *********************/ 27 | 28 | /********************** 29 | * TYPEDEFS 30 | **********************/ 31 | 32 | /********************** 33 | * GLOBAL PROTOTYPES 34 | **********************/ 35 | 36 | /** 37 | * Initialize the material theme 38 | * @param hue [0..360] hue value from HSV color space to define the theme's base color 39 | * @param font pointer to a font (NULL to use the default) 40 | * @return pointer to the initialized theme 41 | */ 42 | lv_theme_t * lv_theme_nemo_init(uint16_t hue, lv_font_t * font); 43 | 44 | /** 45 | * Get a pointer to the theme 46 | * @return pointer to the theme 47 | */ 48 | lv_theme_t * lv_theme_get_nemo(void); 49 | 50 | /********************** 51 | * MACROS 52 | **********************/ 53 | 54 | #endif 55 | 56 | #ifdef __cplusplus 57 | } /* extern "C" */ 58 | #endif 59 | 60 | #endif /*LV_THEME_NEMO_H*/ 61 | -------------------------------------------------------------------------------- /embedded/lvgl/src/lv_themes/lv_theme_night.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_theme_night.h 3 | * 4 | */ 5 | 6 | #ifndef LV_THEME_NIGHT_H 7 | #define LV_THEME_NIGHT_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lv_conf.h" 18 | #else 19 | #include "../../../lv_conf.h" 20 | #endif 21 | 22 | #if LV_USE_THEME_NIGHT 23 | 24 | /********************* 25 | * DEFINES 26 | *********************/ 27 | 28 | /********************** 29 | * TYPEDEFS 30 | **********************/ 31 | 32 | /********************** 33 | * GLOBAL PROTOTYPES 34 | **********************/ 35 | 36 | /** 37 | * Initialize the night theme 38 | * @param hue [0..360] hue value from HSV color space to define the theme's base color 39 | * @param font pointer to a font (NULL to use the default) 40 | * @return pointer to the initialized theme 41 | */ 42 | lv_theme_t * lv_theme_night_init(uint16_t hue, lv_font_t * font); 43 | 44 | /** 45 | * Get a pointer to the theme 46 | * @return pointer to the theme 47 | */ 48 | lv_theme_t * lv_theme_get_night(void); 49 | 50 | /********************** 51 | * MACROS 52 | **********************/ 53 | 54 | #endif 55 | 56 | #ifdef __cplusplus 57 | } /* extern "C" */ 58 | #endif 59 | 60 | #endif /*LV_THEME_NIGHT_H*/ 61 | -------------------------------------------------------------------------------- /embedded/lvgl/src/lv_themes/lv_theme_templ.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_theme_templ.h 3 | * 4 | */ 5 | 6 | #ifndef LV_THEME_TEMPL_H 7 | #define LV_THEME_TEMPL_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lv_conf.h" 18 | #else 19 | #include "../../../lv_conf.h" 20 | #endif 21 | 22 | #if LV_USE_THEME_TEMPL 23 | 24 | /********************* 25 | * DEFINES 26 | *********************/ 27 | 28 | /********************** 29 | * TYPEDEFS 30 | **********************/ 31 | 32 | /********************** 33 | * GLOBAL PROTOTYPES 34 | **********************/ 35 | 36 | /** 37 | * Initialize the templ theme 38 | * @param hue [0..360] hue value from HSV color space to define the theme's base color 39 | * @param font pointer to a font (NULL to use the default) 40 | * @return pointer to the initialized theme 41 | */ 42 | lv_theme_t * lv_theme_templ_init(uint16_t hue, lv_font_t * font); 43 | 44 | /** 45 | * Get a pointer to the theme 46 | * @return pointer to the theme 47 | */ 48 | lv_theme_t * lv_theme_get_templ(void); 49 | 50 | /********************** 51 | * MACROS 52 | **********************/ 53 | 54 | #endif 55 | 56 | #ifdef __cplusplus 57 | } /* extern "C" */ 58 | #endif 59 | 60 | #endif /*LV_THEME_TEMPL_H*/ 61 | -------------------------------------------------------------------------------- /embedded/lvgl/src/lv_themes/lv_theme_zen.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_theme_zen.h 3 | * 4 | */ 5 | 6 | #ifndef LV_THEME_ZEN_H 7 | #define LV_THEME_ZEN_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lv_conf.h" 18 | #else 19 | #include "../../../lv_conf.h" 20 | #endif 21 | 22 | #if LV_USE_THEME_ZEN 23 | 24 | /********************* 25 | * DEFINES 26 | *********************/ 27 | 28 | /********************** 29 | * TYPEDEFS 30 | **********************/ 31 | 32 | /********************** 33 | * GLOBAL PROTOTYPES 34 | **********************/ 35 | 36 | /** 37 | * Initialize the zen theme 38 | * @param hue [0..360] hue value from HSV color space to define the theme's base color 39 | * @param font pointer to a font (NULL to use the default) 40 | * @return pointer to the initialized theme 41 | */ 42 | lv_theme_t * lv_theme_zen_init(uint16_t hue, lv_font_t * font); 43 | 44 | /** 45 | * Get a pointer to the theme 46 | * @return pointer to the theme 47 | */ 48 | lv_theme_t * lv_theme_get_zen(void); 49 | 50 | /********************** 51 | * MACROS 52 | **********************/ 53 | 54 | #endif 55 | 56 | #ifdef __cplusplus 57 | } /* extern "C" */ 58 | #endif 59 | 60 | #endif /*LV_THEME_ZEN_H*/ 61 | -------------------------------------------------------------------------------- /embedded/lvgl/src/lv_themes/lv_themes.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_theme_alien.c 2 | CSRCS += lv_theme.c 3 | CSRCS += lv_theme_default.c 4 | CSRCS += lv_theme_night.c 5 | CSRCS += lv_theme_templ.c 6 | CSRCS += lv_theme_zen.c 7 | CSRCS += lv_theme_material.c 8 | CSRCS += lv_theme_nemo.c 9 | CSRCS += lv_theme_mono.c 10 | 11 | DEPPATH += --dep-path $(LVGL_DIR)/lvgl/src/lv_themes 12 | VPATH += :$(LVGL_DIR)/lvgl/src/lv_themes 13 | 14 | CFLAGS += "-I$(LVGL_DIR)/lvgl/src/lv_themes" 15 | -------------------------------------------------------------------------------- /embedded/lvgl/src/lv_version.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_version.h 3 | * 4 | */ 5 | 6 | #ifndef LV_VERSION_H 7 | #define LV_VERSION_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | /*Current version of LittlevGL*/ 17 | #define LVGL_VERSION_MAJOR 6 18 | #define LVGL_VERSION_MINOR 1 19 | #define LVGL_VERSION_PATCH 1 20 | #define LVGL_VERSION_INFO "" 21 | 22 | 23 | /********************* 24 | * DEFINES 25 | *********************/ 26 | 27 | /********************** 28 | * TYPEDEFS 29 | **********************/ 30 | 31 | /********************** 32 | * GLOBAL PROTOTYPES 33 | **********************/ 34 | 35 | /********************** 36 | * MACROS 37 | **********************/ 38 | /** Gives 1 if the x.y.z version is supported in the current version 39 | * Usage: 40 | * 41 | * - Require v6 42 | * #if LV_VERSION_CHECK(6,0,0) 43 | * new_func_in_v6(); 44 | * #endif 45 | * 46 | * 47 | * - Require at least v5.3 48 | * #if LV_VERSION_CHECK(5,3,0) 49 | * new_feature_from_v5_3(); 50 | * #endif 51 | * 52 | * 53 | * - Require v5.3.2 bugfixes 54 | * #if LV_VERSION_CHECK(5,3,2) 55 | * bugfix_in_v5_3_2(); 56 | * #endif 57 | * 58 | * */ 59 | #define LV_VERSION_CHECK(x,y,z) (x == LVGL_VERSION_MAJOR && (y < LVGL_VERSION_MINOR || (y == LVGL_VERSION_MINOR && z <= LVGL_VERSION_PATCH))) 60 | 61 | 62 | #ifdef __cplusplus 63 | } /* extern "C" */ 64 | #endif 65 | 66 | #endif /*LV_VERSION_H*/ 67 | -------------------------------------------------------------------------------- /embedded/system/inc/system.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file system.h 3 | * 4 | * @brief MCU system-related functions header 5 | * 6 | * Revised BSD License 7 | * Copyright Semtech Corporation 2020. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions are met: 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * * Neither the name of the Semtech corporation nor the 17 | * names of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef __SYSTEM_H 33 | #define __SYSTEM_H 34 | 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | #include "system_clock.h" 40 | #include "system_gpio.h" 41 | #include "system_spi.h" 42 | #include "system_uart.h" 43 | #include "system_i2c.h" 44 | #include "system_time.h" 45 | #include "system_lptim.h" 46 | 47 | void system_init( void ); 48 | 49 | #endif 50 | 51 | #ifdef __cplusplus 52 | } 53 | #endif 54 | -------------------------------------------------------------------------------- /embedded/system/inc/system_clock.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file system_clock.h 3 | * 4 | * @brief MCU clock-related functions header file 5 | * 6 | * Revised BSD License 7 | * Copyright Semtech Corporation 2020. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions are met: 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * * Neither the name of the Semtech corporation nor the 17 | * names of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef _SYSTEM_CLOCK_H 33 | #define _SYSTEM_CLOCK_H 34 | 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | void system_clock_init( void ); 40 | 41 | #ifdef __cplusplus 42 | } 43 | #endif 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /embedded/system/inc/system_i2c.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file system_i2c.h 3 | * 4 | * @brief MCU I2C-related function headers 5 | * 6 | * Revised BSD License 7 | * Copyright Semtech Corporation 2020. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions are met: 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * * Neither the name of the Semtech corporation nor the 17 | * names of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef __i2c_H 33 | #define __i2c_H 34 | 35 | #include 36 | 37 | #include "stm32l476xx.h" 38 | #include "stm32l4xx_ll_bus.h" 39 | #include "stm32l4xx_ll_gpio.h" 40 | #include "stm32l4xx_ll_i2c.h" 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | void system_i2c_init( void ); 47 | void system_i2c_write( const uint8_t address, const uint8_t* buffer_in, const uint8_t length, const bool repeated ); 48 | void system_i2c_read( const uint8_t address, uint8_t* buffer_out, const uint8_t length, const bool repeated ); 49 | 50 | #ifdef __cplusplus 51 | } 52 | #endif 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /embedded/system/inc/system_lptim.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file system_lptim.h 3 | * 4 | * @brief MCU low-power timer related functions header 5 | * 6 | * Revised BSD License 7 | * Copyright Semtech Corporation 2020. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions are met: 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * * Neither the name of the Semtech corporation nor the 17 | * names of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef __SYSTEM_LPTIM_H__ 33 | #define __SYSTEM_LPTIM_H__ 34 | 35 | #include "stdint.h" 36 | #include "stm32l4xx_ll_lptim.h" 37 | 38 | #ifdef __cplusplus 39 | extern "C" { 40 | #endif 41 | 42 | void system_lptim_init( ); 43 | void system_lptim_set_and_run( uint32_t ticks ); 44 | 45 | #ifdef __cplusplus 46 | } 47 | #endif 48 | 49 | #endif -------------------------------------------------------------------------------- /embedded/system/inc/system_spi.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file system_spi.c 3 | * 4 | * @brief MCU SPI-related functions header file 5 | * 6 | * Revised BSD License 7 | * Copyright Semtech Corporation 2020. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions are met: 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * * Neither the name of the Semtech corporation nor the 17 | * names of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef _SYSTEM_SPI_H 33 | #define _SYSTEM_SPI_H 34 | 35 | #include "stm32l4xx_ll_bus.h" 36 | #include "stm32l4xx_ll_gpio.h" 37 | #include "stm32l4xx_ll_spi.h" 38 | 39 | #include 40 | 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif 44 | 45 | void system_spi_init( void ); 46 | 47 | void system_spi_write( SPI_TypeDef* spi, const uint8_t* buffer, uint16_t length ); 48 | void system_spi_read( SPI_TypeDef* spi, uint8_t* buffer, uint16_t length ); 49 | void system_spi_write_read( SPI_TypeDef* spi, const uint8_t* cbuffer, uint8_t* rbuffer, uint16_t length ); 50 | void system_spi_read_with_dummy_byte( SPI_TypeDef* spi, uint8_t* buffer, uint16_t length, uint8_t dummy_byte ); 51 | 52 | #ifdef __cplusplus 53 | } 54 | #endif 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /embedded/system/inc/system_time.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file system_time.h 3 | * 4 | * @brief MCU time-related functions header 5 | * 6 | * Revised BSD License 7 | * Copyright Semtech Corporation 2020. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions are met: 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * * Neither the name of the Semtech corporation nor the 17 | * names of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef __SYSTEM_TIME__ 33 | #define __SYSTEM_TIME__ 34 | 35 | #include 36 | 37 | #ifdef __cplusplus 38 | extern "C" { 39 | #endif 40 | 41 | void system_time_init( void ); 42 | void system_time_wait_ms( uint32_t time_in_ms ); 43 | void system_time_IncreaseTicker( void ); 44 | uint32_t system_time_GetTicker( void ); 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | 50 | #endif // __SYSTEM_TIME__ 51 | -------------------------------------------------------------------------------- /embedded/system/src/system.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file system.c 3 | * 4 | * @brief MCU system-related functions 5 | * 6 | * Revised BSD License 7 | * Copyright Semtech Corporation 2020. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions are met: 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * * Neither the name of the Semtech corporation nor the 17 | * names of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #include "system.h" 33 | 34 | void system_init( void ) 35 | { 36 | system_clock_init( ); 37 | system_gpio_init( ); 38 | system_spi_init( ); 39 | system_i2c_init( ); 40 | system_time_init( ); 41 | system_uart_init( ); 42 | system_lptim_init( ); 43 | } 44 | -------------------------------------------------------------------------------- /embedded/system/src/system_time.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file system_time.c 3 | * 4 | * @brief MCU time-related functions implementation. 5 | * 6 | * Revised BSD License 7 | * Copyright Semtech Corporation 2020. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions are met: 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * * Neither the name of the Semtech corporation nor the 17 | * names of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #include "system_time.h" 33 | #include "stm32l4xx_ll_cortex.h" 34 | #include "stm32l4xx_ll_utils.h" 35 | 36 | volatile static uint32_t ticker = 0; 37 | 38 | void system_time_init( void ) { LL_SYSTICK_EnableIT( ); } 39 | 40 | void system_time_wait_ms( uint32_t time_in_ms ) { LL_mDelay( time_in_ms ); } 41 | 42 | void system_time_IncreaseTicker( void ) { ticker++; } 43 | 44 | uint32_t system_time_GetTicker( void ) { return ticker; } 45 | -------------------------------------------------------------------------------- /embedded/system/src/system_uart_retarget.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file system_uart_retarget.c 3 | * 4 | * @brief Uart retarget implementation. 5 | * 6 | * Revised BSD License 7 | * Copyright Semtech Corporation 2020. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions are met: 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * * Neither the name of the Semtech corporation nor the 17 | * names of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #include "system_uart.h" 33 | 34 | int stdout_init( void ) { return ( 0 ); } 35 | 36 | int stdout_putchar( int ch ) { return system_uart_send_char( ch ); } 37 | 38 | int stdout_getchar( void ) { return system_uart_receive_char( ); } 39 | -------------------------------------------------------------------------------- /embedded/version.mk: -------------------------------------------------------------------------------- 1 | VERSION=v3.2.0 -------------------------------------------------------------------------------- /host/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include lr1110evk/assets/geocoding_components.yaml 2 | include lr1110evk/assets/jobs.json 3 | include lr1110evk/assets/job_drive_test_gnss_single.json -------------------------------------------------------------------------------- /host/doc/Makefile: -------------------------------------------------------------------------------- 1 | PANDOC = pandoc 2 | RM = rm -f 3 | METADATA_FILE = metadata.yaml 4 | PDF_FILE = install_instructions.pdf jobs_json.pdf 5 | DOCX_FILE = install_instructions.docx jobs_json.docx 6 | TARGET_FILES = ${PDF_FILE} ${DOCX_FILE} 7 | 8 | .phony: clean pdf docx 9 | 10 | all: install_instructions.pdf install_instructions.docx 11 | 12 | jobs_doc : jobs_json.pdf jobs_json.docx 13 | 14 | pdf: ${PDF_FILE} 15 | 16 | docx: ${DOCX_FILE} 17 | 18 | %.docx:%.md 19 | ${PANDOC} -o $@ -s $< 20 | 21 | %.pdf:%.md ${METADATA_FILE} 22 | ${PANDOC} --pdf-engine=xelatex -o $@ -s $^ 23 | 24 | jobs_json.html: jobs.schema.json 25 | generate-schema-doc --no-copy-css --no-copy-js $^ $@ 26 | 27 | jobs_json.md: jobs_json.html 28 | ${PANDOC} -o $@ $^ 29 | 30 | jobs.schema.json: 31 | Lr1110FieldTest -j > $@ 32 | 33 | clean: 34 | ${RM} ${TARGET_FILES} jobs_json.html jobs_json.md -------------------------------------------------------------------------------- /host/doc/metadata.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | header-includes: 3 | - | 4 | ```{=latex} 5 | \usepackage{fvextra} 6 | \DefineVerbatimEnvironment{Highlighting}{Verbatim}{breaklines,breakanywhere=true,commandchars=\\\{\}} 7 | ``` 8 | ... 9 | -------------------------------------------------------------------------------- /host/lr1110evk/BaseTypes/__init__.py: -------------------------------------------------------------------------------- 1 | from .Coordinate import Coordinate 2 | from .ScannedGnss import ( 3 | ScannedGnss, 4 | ScannedGnssMalformedCsvLineException, 5 | ScannedGnssException, 6 | ) 7 | from .ScannedMacAddress import ( 8 | ScannedMacAddress, 9 | WifiChannels, 10 | ScannedMacAddressMalformedCsvLineException, 11 | ) 12 | from .Version import Version, VersionException 13 | from .NmeaFrame import ( 14 | NmeaFrame, 15 | NmeaException, 16 | NmeaWrongChecksumException, 17 | NmeaFrameUnknownSentenceType, 18 | NmeaParseError, 19 | ) 20 | from .MultiFrameGnss import ( 21 | SlidingMultiFrameGnss, 22 | GroupingMultiFrameGnss, 23 | SingleFrameGnss, 24 | MultiFrameGnssBase, 25 | GroupingMultiFrameNotEnoughNavException, 26 | ) 27 | -------------------------------------------------------------------------------- /host/lr1110evk/FieldTestPost/Core/GnssSolvingStrategy.py: -------------------------------------------------------------------------------- 1 | from .RequestBase import ( 2 | RequestGnssGls, 3 | RequestGnssMultiFrameGls, 4 | ) 5 | from lr1110evk.BaseTypes import ( 6 | GroupingMultiFrameGnss, 7 | MultiFrameGnssBase, 8 | SingleFrameGnss, 9 | SlidingMultiFrameGnss, 10 | ScannedGnss, 11 | ) 12 | 13 | 14 | class GnssSolvingStrategyBase: 15 | def get_container(self) -> MultiFrameGnssBase: 16 | raise NotImplementedError 17 | 18 | def build_request(self): 19 | raise NotImplementedError 20 | 21 | 22 | class GnssSingleSolvingStrategy(GnssSolvingStrategyBase): 23 | def __init__(self): 24 | super().__init__() 25 | self.container = SingleFrameGnss() 26 | 27 | def get_container(self): 28 | return self.container 29 | 30 | def build_request(self): 31 | scanned_message = self.container.get_navs()[0] 32 | return RequestGnssGls( 33 | payload=scanned_message.nav_message, 34 | timestamp=scanned_message.instant_scan, 35 | ) 36 | 37 | 38 | class GnssMultiFrameStrategyBase(GnssSolvingStrategyBase): 39 | def build_request(self): 40 | nav_messages = self.container.get_navs() 41 | return RequestGnssMultiFrameGls(nav_messages=nav_messages) 42 | 43 | 44 | class GnssMultiFrameSlidingStrategy(GnssMultiFrameStrategyBase): 45 | def __init__(self, depth): 46 | super().__init__() 47 | self.container = SlidingMultiFrameGnss(depth=depth) 48 | 49 | def get_container(self): 50 | return self.container 51 | 52 | 53 | class GnssMultiFrameGroupingStrategy(GnssMultiFrameStrategyBase): 54 | def __init__(self, max_length): 55 | super().__init__() 56 | self.container = GroupingMultiFrameGnss(max_length=max_length) 57 | 58 | def get_container(self): 59 | return self.container 60 | -------------------------------------------------------------------------------- /host/lr1110evk/FieldTestPost/Core/__init__.py: -------------------------------------------------------------------------------- 1 | from .FileReader import FileReader 2 | from .RequestSender import ( 3 | RequestSender, 4 | NoNavMessageException, 5 | SolverContactException, 6 | ) 7 | from .GeoLocServiceClientBase import ( 8 | GeoLocServiceClientGnss, 9 | GeoLocServiceClientMultiFrameGnss, 10 | GeoLocServiceClientWifi, 11 | GeoLocServiceBadResponseStatus, 12 | GeoLocServiceTimeoutException, 13 | GeoLocServiceClientBaseException, 14 | ) 15 | from .ExternalCoordinate import ExternalCoordinate 16 | from .ResponseBase import ( 17 | ResponseNoCoordinateException, 18 | ResponseBase, 19 | ResponseBaseException, 20 | ) 21 | from .RequestBase import RequestGnssGls, RequestWifiGls, RequestGnssMultiFrameGls 22 | from .GnssSolvingStrategy import ( 23 | GnssSingleSolvingStrategy, 24 | GnssMultiFrameSlidingStrategy, 25 | GnssMultiFrameGroupingStrategy, 26 | ) 27 | -------------------------------------------------------------------------------- /host/lr1110evk/FieldTestPost/WiFiAnalyzis/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lora-net/lr1110_evk_demo_app/f46c2234c53f290a5e9fcedc41d177159d04eb68/host/lr1110evk/FieldTestPost/WiFiAnalyzis/__init__.py -------------------------------------------------------------------------------- /host/lr1110evk/FieldTestPost/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lora-net/lr1110_evk_demo_app/f46c2234c53f290a5e9fcedc41d177159d04eb68/host/lr1110evk/FieldTestPost/__init__.py -------------------------------------------------------------------------------- /host/lr1110evk/Job/__init__.py: -------------------------------------------------------------------------------- 1 | from .Job import Job 2 | from .Executor import Executor, ExecutorCriticalException 3 | from .JobExecutor import JobExecutor, JobExecutorException 4 | from .JobReader import JobReader 5 | from .Logger import Logger, LoggerException, ResultLogger 6 | from .JobJsonValidator import JobValidator 7 | from .UpdateAlmanacJob import ( 8 | UpdateAlmanacCheckFailure, 9 | UpdateAlmanacDownloadFailure, 10 | UpdateAlmanacWrongResponseException, 11 | UpdateAlmanacJob, 12 | ) 13 | -------------------------------------------------------------------------------- /host/lr1110evk/SerialExchange/Commands/CommandCheckAlmanacUpdate.py: -------------------------------------------------------------------------------- 1 | """ 2 | Define check almanac update serial command class 3 | 4 | Revised BSD License 5 | Copyright Semtech Corporation 2020. All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are met: 9 | * Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | * Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | * Neither the name of the Semtech corporation nor the 15 | names of its contributors may be used to endorse or promote products 16 | derived from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 22 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | """ 29 | 30 | from .CommandBase import CommandBase 31 | 32 | 33 | class CommandCheckAlmanacUpdate(CommandBase): 34 | def __init__(self, expected_crc: int): 35 | self.expected_crc = expected_crc 36 | 37 | def payload_to_bytes(self): 38 | return self.expected_crc.to_bytes(length=4, byteorder="little") 39 | 40 | @staticmethod 41 | def get_com_code(): 42 | return b"\x09\x00" 43 | -------------------------------------------------------------------------------- /host/lr1110evk/SerialExchange/Commands/CommandFetchResults.py: -------------------------------------------------------------------------------- 1 | """ 2 | Define fetch results serial command class 3 | 4 | Revised BSD License 5 | Copyright Semtech Corporation 2020. All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are met: 9 | * Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | * Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | * Neither the name of the Semtech corporation nor the 15 | names of its contributors may be used to endorse or promote products 16 | derived from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 22 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | """ 29 | 30 | from .CommandBase import CommandBase 31 | 32 | 33 | class CommandFetchResults(CommandBase): 34 | def __init__(self): 35 | super().__init__() 36 | 37 | @staticmethod 38 | def get_com_code(): 39 | return b"\x03\x00" 40 | 41 | def payload_to_bytes(self): 42 | return b"" 43 | -------------------------------------------------------------------------------- /host/lr1110evk/SerialExchange/Commands/CommandGetAlmanacDates.py: -------------------------------------------------------------------------------- 1 | """ 2 | Define get almanac date serial command class 3 | 4 | Revised BSD License 5 | Copyright Semtech Corporation 2020. All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are met: 9 | * Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | * Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | * Neither the name of the Semtech corporation nor the 15 | names of its contributors may be used to endorse or promote products 16 | derived from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 22 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | """ 29 | 30 | from .CommandBase import CommandBase 31 | 32 | 33 | class CommandGetAlmanacDates(CommandBase): 34 | def __init__(self): 35 | pass 36 | 37 | @staticmethod 38 | def get_com_code(): 39 | return b"\x07\x00" 40 | 41 | def payload_to_bytes(self): 42 | return b"" 43 | -------------------------------------------------------------------------------- /host/lr1110evk/SerialExchange/Commands/CommandGetVersion.py: -------------------------------------------------------------------------------- 1 | """ 2 | Define get version serial command class 3 | 4 | Revised BSD License 5 | Copyright Semtech Corporation 2020. All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are met: 9 | * Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | * Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | * Neither the name of the Semtech corporation nor the 15 | names of its contributors may be used to endorse or promote products 16 | derived from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 22 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | """ 29 | 30 | from .CommandBase import CommandBase 31 | 32 | 33 | class CommandGetVersion(CommandBase): 34 | def __init__(self): 35 | pass 36 | 37 | @staticmethod 38 | def get_com_code(): 39 | return b"\x06\x00" 40 | 41 | def payload_to_bytes(self): 42 | return b"" 43 | -------------------------------------------------------------------------------- /host/lr1110evk/SerialExchange/Commands/CommandReset.py: -------------------------------------------------------------------------------- 1 | """ 2 | Define reset serial command class 3 | 4 | Revised BSD License 5 | Copyright Semtech Corporation 2020. All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are met: 9 | * Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | * Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | * Neither the name of the Semtech corporation nor the 15 | names of its contributors may be used to endorse or promote products 16 | derived from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 22 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | """ 29 | 30 | from .CommandBase import CommandBase 31 | 32 | 33 | class CommandReset(CommandBase): 34 | def __init__(self): 35 | pass 36 | 37 | @staticmethod 38 | def get_com_code(): 39 | return b"\x04\x00" 40 | 41 | def payload_to_bytes(self): 42 | return b"" 43 | -------------------------------------------------------------------------------- /host/lr1110evk/SerialExchange/Commands/CommandStatus.py: -------------------------------------------------------------------------------- 1 | """ 2 | Define get status serial command class 3 | 4 | Revised BSD License 5 | Copyright Semtech Corporation 2020. All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are met: 9 | * Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | * Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | * Neither the name of the Semtech corporation nor the 15 | names of its contributors may be used to endorse or promote products 16 | derived from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 22 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | """ 29 | 30 | from .CommandBase import CommandBase 31 | 32 | 33 | class CommandStatus(CommandBase): 34 | def __init__(self): 35 | pass 36 | 37 | @staticmethod 38 | def get_com_code(): 39 | return b"\x00\x00" 40 | 41 | def payload_to_bytes(self): 42 | return b"" 43 | -------------------------------------------------------------------------------- /host/lr1110evk/SerialExchange/Commands/CommandUpdateAlmanac.py: -------------------------------------------------------------------------------- 1 | """ 2 | Define update almanac serial command class 3 | 4 | Revised BSD License 5 | Copyright Semtech Corporation 2020. All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are met: 9 | * Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | * Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | * Neither the name of the Semtech corporation nor the 15 | names of its contributors may be used to endorse or promote products 16 | derived from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 22 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | """ 29 | 30 | from .CommandBase import CommandBase 31 | 32 | 33 | class CommandUpdateAlmanac(CommandBase): 34 | def __init__(self, almanac: bytes): 35 | self.almanac_bytestream = almanac 36 | 37 | def payload_to_bytes(self): 38 | return self.almanac_bytestream 39 | 40 | @staticmethod 41 | def get_com_code(): 42 | return b"\x08\x00" 43 | -------------------------------------------------------------------------------- /host/lr1110evk/SerialExchange/Commands/__init__.py: -------------------------------------------------------------------------------- 1 | from .CommandFetchResults import CommandFetchResults 2 | from .CommandReset import CommandReset 3 | from .CommandSetDateLoc import CommandSetDateLoc 4 | from .CommandStart import ( 5 | CommandStartWifiScan, 6 | CommandStartWifiCountryCode, 7 | CommandStartGnssAutonomous, 8 | CommandStartGnssAssisted, 9 | GnssOption, 10 | GnssCaptureMode, 11 | GnssConstellation, 12 | WifiMode, 13 | WifiEnableMode, 14 | GnssAntennaSelection, 15 | ) 16 | from .CommandStatus import CommandStatus 17 | from .CommandGetVersion import CommandGetVersion 18 | from .CommandGetAlmanacDates import CommandGetAlmanacDates 19 | from .CommandUpdateAlmanac import CommandUpdateAlmanac 20 | from .CommandCheckAlmanacUpdate import CommandCheckAlmanacUpdate 21 | -------------------------------------------------------------------------------- /host/lr1110evk/SerialExchange/Responses/ResponseCheckAlmanacUpdate.py: -------------------------------------------------------------------------------- 1 | """ 2 | Define check almanac serial response class 3 | 4 | Revised BSD License 5 | Copyright Semtech Corporation 2020. All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are met: 9 | * Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | * Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | * Neither the name of the Semtech corporation nor the 15 | names of its contributors may be used to endorse or promote products 16 | derived from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 22 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | """ 29 | 30 | from .ResponseBase import ResponseAck 31 | 32 | 33 | class ResponseCheckAlmanacUpdate(ResponseAck): 34 | def __init__(self, receive_time, ack_status): 35 | super().__init__(receive_time, ack_status) 36 | 37 | @classmethod 38 | def get_response_code(cls): 39 | return b"\x09\x00" 40 | -------------------------------------------------------------------------------- /host/lr1110evk/SerialExchange/Responses/ResponseConfigureAck.py: -------------------------------------------------------------------------------- 1 | """ 2 | Define configuration serial response class 3 | 4 | Revised BSD License 5 | Copyright Semtech Corporation 2020. All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are met: 9 | * Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | * Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | * Neither the name of the Semtech corporation nor the 15 | names of its contributors may be used to endorse or promote products 16 | derived from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 22 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | """ 29 | 30 | from .ResponseBase import ResponseAck 31 | 32 | 33 | class ResponseConfigureAck(ResponseAck): 34 | def __init__(self, receive_time, ack_status): 35 | super().__init__(receive_time, ack_status) 36 | 37 | @classmethod 38 | def get_response_code(cls): 39 | return b"\x02\x00" 40 | -------------------------------------------------------------------------------- /host/lr1110evk/SerialExchange/Responses/ResponseEvent.py: -------------------------------------------------------------------------------- 1 | """ 2 | Define serial event class 3 | 4 | Revised BSD License 5 | Copyright Semtech Corporation 2020. All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are met: 9 | * Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | * Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | * Neither the name of the Semtech corporation nor the 15 | names of its contributors may be used to endorse or promote products 16 | derived from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 22 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | """ 29 | 30 | from .ResponseBase import ResponseBase 31 | 32 | 33 | class ResponseEvent(ResponseBase): 34 | def __init__(self, reception_time): 35 | self.reception_time = reception_time 36 | 37 | @classmethod 38 | def get_response_code(cls): 39 | return b"\x80\x00" 40 | 41 | @classmethod 42 | def from_response_raw(cls, response_raw): 43 | receive_time = response_raw.receive_time 44 | return ResponseEvent(reception_time=receive_time) 45 | 46 | def __str__(self): 47 | return "Event" 48 | -------------------------------------------------------------------------------- /host/lr1110evk/SerialExchange/Responses/ResponseLog.py: -------------------------------------------------------------------------------- 1 | """ 2 | Define information logging serial response class 3 | 4 | Revised BSD License 5 | Copyright Semtech Corporation 2020. All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are met: 9 | * Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | * Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | * Neither the name of the Semtech corporation nor the 15 | names of its contributors may be used to endorse or promote products 16 | derived from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 22 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | """ 29 | 30 | from .ResponseBase import ResponseBase 31 | 32 | 33 | class ResponseLog(ResponseBase): 34 | def __init__(self, reception_time, message): 35 | self.reception_time = reception_time 36 | self.message = message 37 | 38 | @classmethod 39 | def get_response_code(cls): 40 | return b"\x84\x00" 41 | 42 | @classmethod 43 | def from_response_raw(cls, response_raw): 44 | receive_time = response_raw.receive_time 45 | message = str(response_raw.payload_bytes) 46 | response_log = ResponseLog(reception_time=receive_time, message=message) 47 | return response_log 48 | -------------------------------------------------------------------------------- /host/lr1110evk/SerialExchange/Responses/ResponseResetAck.py: -------------------------------------------------------------------------------- 1 | """ 2 | Define reset serial response class 3 | 4 | Revised BSD License 5 | Copyright Semtech Corporation 2020. All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are met: 9 | * Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | * Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | * Neither the name of the Semtech corporation nor the 15 | names of its contributors may be used to endorse or promote products 16 | derived from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 22 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | """ 29 | 30 | from .ResponseBase import ResponseAck 31 | 32 | 33 | class ResponseReset(ResponseAck): 34 | def __init__(self, receive_time, ack_status): 35 | super().__init__(receive_time, ack_status) 36 | 37 | @classmethod 38 | def get_response_code(cls): 39 | return b"\x04\x00" 40 | -------------------------------------------------------------------------------- /host/lr1110evk/SerialExchange/Responses/ResponseSetDateLocAck.py: -------------------------------------------------------------------------------- 1 | """ 2 | Define GNSS date and location serial response class 3 | 4 | Revised BSD License 5 | Copyright Semtech Corporation 2020. All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are met: 9 | * Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | * Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | * Neither the name of the Semtech corporation nor the 15 | names of its contributors may be used to endorse or promote products 16 | derived from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 22 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | """ 29 | 30 | from .ResponseBase import ResponseAck 31 | 32 | 33 | class ResponseSetDateLoc(ResponseAck): 34 | def __init__(self, receive_time, ack_status): 35 | super().__init__(receive_time, ack_status) 36 | 37 | @classmethod 38 | def get_response_code(cls): 39 | return b"\x05\x00" 40 | -------------------------------------------------------------------------------- /host/lr1110evk/SerialExchange/Responses/ResponseStartAck.py: -------------------------------------------------------------------------------- 1 | """ 2 | Define job start serial response class 3 | 4 | Revised BSD License 5 | Copyright Semtech Corporation 2020. All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are met: 9 | * Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | * Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | * Neither the name of the Semtech corporation nor the 15 | names of its contributors may be used to endorse or promote products 16 | derived from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 22 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | """ 29 | 30 | from .ResponseBase import ResponseAck 31 | 32 | 33 | class ResponseStartAck(ResponseAck): 34 | def __init__(self, receive_time, ack_status): 35 | super().__init__(receive_time, ack_status) 36 | 37 | @classmethod 38 | def get_response_code(cls): 39 | return b"\x01\x00" 40 | -------------------------------------------------------------------------------- /host/lr1110evk/SerialExchange/Responses/ResponseUpdateAlmanac.py: -------------------------------------------------------------------------------- 1 | """ 2 | Define update almanac serial response class 3 | 4 | Revised BSD License 5 | Copyright Semtech Corporation 2020. All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are met: 9 | * Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | * Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | * Neither the name of the Semtech corporation nor the 15 | names of its contributors may be used to endorse or promote products 16 | derived from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY 22 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | """ 29 | 30 | from .ResponseBase import ResponseAck 31 | 32 | 33 | class ResponseUpdateAlmanac(ResponseAck): 34 | def __init__(self, receive_time, ack_status): 35 | super().__init__(receive_time, ack_status) 36 | 37 | @classmethod 38 | def get_response_code(cls): 39 | return b"\x08\x00" 40 | -------------------------------------------------------------------------------- /host/lr1110evk/SerialExchange/Responses/__init__.py: -------------------------------------------------------------------------------- 1 | from .ResponseBase import ResponseRaw 2 | from .ResponseGnssAutonomous import ResponseGnssAutonomousResult 3 | from .ResponseResetAck import ResponseReset 4 | from .ResponseConfigureAck import ResponseConfigureAck 5 | from .ResponseEvent import ResponseEvent 6 | from .ResponseFetchResult import ResponseFetchResult 7 | from .ResponseGnssAssistedResult import ResponseGnssAssistedResult 8 | from .ResponseLog import ResponseLog 9 | from .ResponseSetDateLocAck import ResponseSetDateLoc 10 | from .ResponseStartAck import ResponseStartAck 11 | from .ResponseStatus import ResponseStatus 12 | from .ResponseWifiResult import ResponseWifiResult 13 | from .ResponseVersion import ResponseVersion 14 | from .ResponseAlmanacDates import ResponseAlmanacDates 15 | from .ResponseUpdateAlmanac import ResponseUpdateAlmanac 16 | from .ResponseCheckAlmanacUpdate import ResponseCheckAlmanacUpdate 17 | -------------------------------------------------------------------------------- /host/lr1110evk/SerialExchange/__init__.py: -------------------------------------------------------------------------------- 1 | from .Commands import ( 2 | GnssOption, 3 | GnssCaptureMode, 4 | GnssAntennaSelection, 5 | GnssConstellation, 6 | WifiMode, 7 | WifiEnableMode, 8 | CommandFetchResults, 9 | CommandReset, 10 | CommandSetDateLoc, 11 | CommandStartWifiScan, 12 | CommandStartWifiCountryCode, 13 | CommandStartGnssAutonomous, 14 | CommandStartGnssAssisted, 15 | CommandStatus, 16 | CommandGetVersion, 17 | CommandGetAlmanacDates, 18 | CommandUpdateAlmanac, 19 | CommandCheckAlmanacUpdate, 20 | ) 21 | from .Responses import ( 22 | ResponseRaw, 23 | ResponseGnssAutonomousResult, 24 | ResponseReset, 25 | ResponseConfigureAck, 26 | ResponseEvent, 27 | ResponseFetchResult, 28 | ResponseGnssAssistedResult, 29 | ResponseLog, 30 | ResponseSetDateLoc, 31 | ResponseStartAck, 32 | ResponseStatus, 33 | ResponseWifiResult, 34 | ResponseVersion, 35 | ResponseAlmanacDates, 36 | ResponseUpdateAlmanac, 37 | ResponseCheckAlmanacUpdate, 38 | ) 39 | from .SerialHandler import ( 40 | SerialHandler, 41 | SerialHanlerEmbeddedNotSetException, 42 | ) 43 | from .CommunicationHandler import ( 44 | CommunicationHandler, 45 | CommunicationHandlerException, 46 | CommunicationHandlerNoResponse, 47 | CommunicationHandlerSerialNotListeningException, 48 | ) 49 | -------------------------------------------------------------------------------- /host/lr1110evk/Tools/KmlGenerator/__init__.py: -------------------------------------------------------------------------------- 1 | from .KmlGenerator import ( 2 | KmlGenerator, 3 | KmlGeneratorUnknownLineTypeException, 4 | KmlGeneratorUnknownLocationTypeException, 5 | ) 6 | -------------------------------------------------------------------------------- /host/lr1110evk/Tools/KmlGenerator/__main__.py: -------------------------------------------------------------------------------- 1 | from lr1110evk.Tools import KmlGenerator 2 | from argparse import ArgumentParser 3 | import pkg_resources 4 | 5 | 6 | def main(): 7 | version = pkg_resources.get_distribution("lr1110evk").version 8 | parser = ArgumentParser( 9 | description="Tool to generate a KML file from Node-Red Application Server output file" 10 | ) 11 | parser.add_argument( 12 | "serverFile", 13 | help="File containing the localisation solved from Application Server", 14 | ) 15 | parser.add_argument("outputKmlFile", help="File to write") 16 | parser.add_argument( 17 | "--verbose", "-v", help="Verbose", action="store_true", default=False 18 | ) 19 | parser.add_argument("--version", action="version", version=version) 20 | args = parser.parse_args() 21 | 22 | kml_generator = KmlGenerator( 23 | input_filename=args.serverFile, kml_output_file=args.outputKmlFile 24 | ) 25 | kml_generator.interpret_file() 26 | 27 | print( 28 | "Number of line successfully interpreted: {}".format( 29 | kml_generator.success_interpret_line_counter 30 | ) 31 | ) 32 | print( 33 | "Number of line failed to be interpreted: {}".format( 34 | kml_generator.failed_interpret_line_counter 35 | ) 36 | ) 37 | -------------------------------------------------------------------------------- /host/lr1110evk/Tools/__init__.py: -------------------------------------------------------------------------------- 1 | from .KmlGenerator import KmlGenerator 2 | -------------------------------------------------------------------------------- /host/lr1110evk/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Lora-net/lr1110_evk_demo_app/f46c2234c53f290a5e9fcedc41d177159d04eb68/host/lr1110evk/__init__.py -------------------------------------------------------------------------------- /host/lr1110evk/assets/geocoding_components.yaml: -------------------------------------------------------------------------------- 1 | # From https://github.com/OpenCageData/address-formatting/blob/master/conf/components.yaml 2 | # ordered list, smallest to largest 3 | name: house_number 4 | aliases: 5 | - street_number 6 | --- 7 | name: house 8 | aliases: 9 | - building 10 | - public_building 11 | --- 12 | name: road 13 | aliases: 14 | - footway 15 | - street 16 | - street_name 17 | - residential 18 | - path 19 | - pedestrian 20 | - road_reference 21 | - road_reference_intl 22 | --- 23 | name: village 24 | aliases: 25 | - hamlet 26 | - locality 27 | - croft 28 | --- 29 | name: neighbourhood 30 | aliases: 31 | - suburb 32 | - city_district 33 | - district 34 | - quarter 35 | - houses 36 | - subdivision 37 | --- 38 | name: city 39 | aliases: 40 | - town 41 | - municipality 42 | --- 43 | name: county 44 | aliases: 45 | - local_administrative_area 46 | - county_code 47 | --- 48 | name: postcode 49 | --- 50 | name: state_district 51 | --- 52 | name: state 53 | aliases: 54 | - province 55 | - state_code 56 | --- 57 | name: region 58 | --- 59 | name: island 60 | --- 61 | name: country 62 | aliases: 63 | - country_name 64 | --- 65 | name: country_code 66 | --- 67 | name: continent -------------------------------------------------------------------------------- /host/lr1110evk/assets/job_drive_test_gnss_single.json: -------------------------------------------------------------------------------- 1 | { 2 | "infinite_loops": true, 3 | "scan_interval": 10, 4 | "jobs": [ 5 | { 6 | "name": "GPS and Beidou assisted legacy NAV single", 7 | "n_iterations": 1, 8 | "n_scan_iteration": 1, 9 | "reset_before_job_start": false, 10 | "gnss_assisted_option": "best_effort", 11 | "gnss_assisted_capture_mode": "mode_0_legacy", 12 | "gnss_assisted_nb_satellite": 0, 13 | "gnss_assisted_antenna_selection": "no_selection", 14 | "gnss_assisted_constellations": [ 15 | "gps", "beidou" 16 | ], 17 | "assisted_coordinate": { 18 | "latitude": 0, 19 | "longitude": 0, 20 | "altitude": 0 21 | } 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /host/lr1110evk/assets/jobs.json: -------------------------------------------------------------------------------- 1 | { 2 | "infinite_loops": true, 3 | "scan_interval": 10, 4 | "jobs": [ 5 | { 6 | "name": "WiFi Scan", 7 | "n_iterations": 1, 8 | "reset_before_job_start": false, 9 | "wifi_channels": [ 10 | "CHANNEL_1", 11 | "CHANNEL_6", 12 | "CHANNEL_11" 13 | ], 14 | "wifi_types": [ 15 | "TYPE_B" 16 | ], 17 | "wifi_nbr_retrial": 10, 18 | "wifi_max_result_per_scan": 5, 19 | "wifi_timeout": 110, 20 | "wifi_mode": "beacon_and_packet", 21 | "wifi_api": "wifi_scan", 22 | "wifi_abort_on_timeout": true 23 | }, 24 | { 25 | "name": "GNSS autonomous", 26 | "n_iterations": 1, 27 | "n_scan_iteration": 1, 28 | "reset_before_job_start": false, 29 | "gnss_autonomous_option": "best_effort", 30 | "gnss_autonomous_capture_mode": "mode_0_legacy", 31 | "gnss_autonomous_nb_satellite": 0, 32 | "gnss_autonomous_antenna_selection": "no_selection", 33 | "gnss_autonomous_constellations": [ 34 | "gps" 35 | ] 36 | }, 37 | { 38 | "name": "GNSS assisted NAV2 multi", 39 | "n_iterations": 1, 40 | "n_scan_iteration": 1, 41 | "reset_before_job_start": false, 42 | "gnss_assisted_option": "best_effort", 43 | "gnss_assisted_capture_mode": "mode_3_with_5_fast", 44 | "gnss_assisted_nb_satellite": 0, 45 | "gnss_assisted_antenna_selection": "no_selection", 46 | "gnss_assisted_constellations": [ 47 | "gps" 48 | ], 49 | "assisted_coordinate": { 50 | "latitude": 45.208091, 51 | "longitude": 5.778892, 52 | "altitude": 0 53 | } 54 | } 55 | ] 56 | } -------------------------------------------------------------------------------- /host/setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup, find_packages 2 | 3 | PACKAGE_NAME = "lr1110evk" 4 | 5 | setup( 6 | name=PACKAGE_NAME, 7 | version="v3.2.0", 8 | include_package_data=True, 9 | packages=find_packages(), 10 | author="Semtech", 11 | install_requires=[ 12 | "pyserial", 13 | "pyyaml", 14 | "requests", 15 | "jsl", 16 | "jsonschema", 17 | "pynmea2", 18 | ], 19 | description="Computer companion software for lr1110 EVK project", 20 | entry_points={ 21 | "console_scripts": [ 22 | "Lr1110FieldTest = lr1110evk.__main__:drive_field_tests", 23 | "FieldTestPost = lr1110evk.FieldTestPost.__main__:post_analyzis_fetch_results", 24 | "Lr1110Demo = lr1110evk.__main__:entry_point_demo", 25 | "NavParser = lr1110evk.NavParserFile.__main__:entry_point_nav_parser_file", 26 | "UsbConnectionCheck = lr1110evk.SerialExchange.SerialHandlerConnectionTest:entry_point_connection_tester", 27 | "AlmanacUpdate = lr1110evk.main_almanac_update:entry_point_update_almanac", 28 | "KmlGenerator = lr1110evk.Tools.KmlGenerator.__main__:main", 29 | ] 30 | }, 31 | ) 32 | --------------------------------------------------------------------------------