├── BUILD.md
├── ComTool
├── ComTool.sln
├── ComTool
│ ├── App.config
│ ├── ComTool.csproj
│ ├── FormMain.Designer.cs
│ ├── FormMain.cs
│ ├── FormMain.resx
│ ├── Program.cs
│ └── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
├── LICENCE
└── readme.md
├── ComTool_Binary
├── ComTool.exe
├── LICENCE
└── readme.md
├── LICENCE
├── Linux
└── etc
│ └── udev
│ └── rules.d
│ ├── Fedora
│ └── readme.txt
│ ├── Ubuntu
│ └── 99-gd77.rules
│ └── archlinux
│ └── 99-gd77.rules
├── OpenGD77CommDriver
├── install_OpenGD77_comm_driver.bat
└── wdi-simple.exe
├── README.md
├── docs
├── OpenGD77 Quick Guide Graphic.jpg
├── OpenGD77 Quick Guide Graphic_CN.jpg
├── OpenGD77_User_Guide.md
├── OpenGD77_User_Guide.pdf
├── OpenGD77_User_Guide_CN.html
├── OpenGD77_User_Guide_CN.md
├── OpenGD77_User_Guide_CN.pdf
├── archive
│ ├── .gitkeep
│ ├── Open GD77 User Guide.docx
│ ├── Open GD77 User Guide.pdf
│ └── OpenGD77 User Guide.pdf
├── build_pdf_doc.sh
├── data_sheets
│ ├── 20190317_155845.jpg
│ ├── 20190317_155925.jpg
│ ├── 20190317_160448.jpg
│ ├── ALPU-MP_datasheet_v2.16.pdf
│ ├── AT1846S
│ │ ├── AT1846S-Datasheet-0.3.pdf
│ │ ├── AT1846S-ProgrammingGuide-1.4.pdf
│ │ ├── RDA1846S_SCH_for_customer.pdf
│ │ ├── RDA1846S_SQ_algorithmic_introduction.pdf
│ │ ├── RDA1846S_datasheet_v0.1.pdf
│ │ ├── RDA1846S_programming_guide_1.2.pdf
│ │ ├── RDA1846S_register_table_20111008.xls
│ │ └── RDA1846_Programming_manual.pdf
│ ├── Atmel-8720-SEEPROM-AT24C512C-Datasheet.pdf
│ ├── C6000
│ │ ├── HR-C6000 Registers_G4EML.docx
│ │ ├── HRC6000_VK3KYY.docx
│ │ ├── HR_C6000_chinese.docx
│ │ ├── HR_C6000_simple.pdf
│ │ ├── HR_C6000_translated.odt
│ │ ├── HR_C6000_translated.pdf
│ │ ├── HR_C6000_updated_chinese.pdf
│ │ └── HR_C6000_updated_chinese_translated_english.pdf
│ ├── C7000
│ │ ├── HR_C7000 Software Application Manual (Chip User Guide V2).pdf
│ │ └── HR_C7000_User Manual.pdf
│ ├── DMR_spec_ts_10236101v020201p.pdf
│ ├── MK22
│ │ ├── K22 FLASH - AN4835.pdf
│ │ ├── K22 Flash security - AN4507.pdf
│ │ ├── MK22FN512VLL12.pdf
│ │ └── NXP_K22P121M120SF7RM.pdf
│ ├── RDA5802E
│ │ ├── RDA5802E.pdf
│ │ └── readme.md
│ ├── UC1701_datasheet.pdf
│ └── W25Q80BV.pdf
├── latex_preamble.tex
├── media
│ ├── Backup-01.png
│ ├── Backup-02.png
│ ├── DM-1801-Cheatsheet-01.svg
│ ├── Firmware_loader-01.png
│ ├── Firmware_loader-02.png
│ ├── Firmware_loader-03.png
│ ├── GD77-Cheatsheet-01.svg
│ ├── OpenGD77-logo.png
│ ├── OpenGD77-logo.svg
│ ├── OpenRD5R_controlkeys.jpg
│ ├── PTT-layout.png
│ ├── RadioButtonsHSs.jpg
│ ├── RadioButtons_CN.jpg
│ ├── accept-call.png
│ ├── all-channels-channel-screen.png
│ ├── all-channels.png
│ ├── battery-graph-fill.png
│ ├── battery-graph-line.png
│ ├── battery-graph.png
│ ├── battery-level.png
│ ├── battery.png
│ ├── callsign-and-name.png
│ ├── changing-zones.png
│ ├── channel-and-zone.png
│ ├── channel-details.png
│ ├── channel-quick-menu.png
│ ├── contact-selection.png
│ ├── cps-TGlists.png
│ ├── cps-band-limits.png
│ ├── cps-channel-rx-grouplist.png
│ ├── cps-channel-tglist.png
│ ├── cps-dmr-ids.png
│ ├── cps-opengd77-support.png
│ ├── cps-tg-contacts.png
│ ├── credits.png
│ ├── ctcss-tone.png
│ ├── device-manager-ports.png
│ ├── display-options.png
│ ├── dmr-mic-level.png
│ ├── dmr-screen.png
│ ├── firmware-info.png
│ ├── frequency-entry.png
│ ├── goto-channel-number.png
│ ├── hotspot-connections.jpg
│ ├── hotspot-mode.jpg
│ ├── hotspot-rx.jpg
│ ├── hotspot-tx.png
│ ├── keypad-and-ptt-locked.png
│ ├── last-heard.png
│ ├── lock-screen.png
│ ├── main-menu.png
│ ├── menu-options.png
│ ├── menu-roadmap-1.png
│ ├── menu-roadmap-2.png
│ ├── menu-roadmap-3.png
│ ├── options-screen.png
│ ├── pistar-configuration.png
│ ├── private-call-entry.png
│ ├── private-call-selection.png
│ ├── private-call.png
│ ├── rssi.png
│ ├── signal-meter.png
│ ├── sound-options.png
│ ├── squelch.png
│ ├── talker-alias-data.png
│ ├── talker-alias.png
│ ├── talkgroup-and-dmr-id.png
│ ├── talkgroup-entry.png
│ ├── talkgroup-inverse-video.png
│ ├── talkgroup-manually-entered.png
│ ├── talkgroup-override.png
│ ├── temperature.png
│ ├── text-entry.png
│ ├── timeout.png
│ ├── user-dmr-id.png
│ ├── vfo-quick-menu.png
│ ├── vfo-scan-limits.png
│ ├── vfo-scan-screen.png
│ ├── vfo-screen.png
│ └── zones.png
└── technical_documents
│ ├── codec
│ ├── Multiband Excitation Vocoder.pdf
│ ├── TIA-102.BABA Project 25 IMBE Vocoder Description.pdf
│ ├── TIA-102.BABA-1 P25 Half Rate Vocoder Addendum .pdf
│ └── TIA-102.BABC Vocoder Reference Test.pdf
│ └── dmr
│ ├── TS 102 361-1.pdf
│ ├── TS 102 361-2.pdf
│ ├── TS 102 361-3.pdf
│ └── TS 102 361-4.pdf
├── firmware
├── .cproject
├── .gitignore
├── .project
├── CMSIS
│ ├── arm_common_tables.h
│ ├── arm_const_structs.h
│ ├── arm_math.h
│ ├── 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_cm4.h
│ ├── mpu_armv7.h
│ └── mpu_armv8.h
├── LICENCE
├── Makefile
├── amazon-freertos
│ ├── FreeRTOS
│ │ ├── event_groups.c
│ │ ├── list.c
│ │ ├── portable
│ │ │ ├── fsl_tickless_generic.h
│ │ │ ├── fsl_tickless_systick.c
│ │ │ ├── heap_1.c
│ │ │ ├── heap_2.c
│ │ │ ├── heap_3.c
│ │ │ ├── heap_4.c
│ │ │ ├── heap_5.c
│ │ │ ├── port.c
│ │ │ └── portmacro.h
│ │ ├── queue.c
│ │ ├── stream_buffer.c
│ │ ├── tasks.c
│ │ └── timers.c
│ ├── include
│ │ ├── FreeRTOS.h
│ │ ├── deprecated_definitions.h
│ │ ├── event_groups.h
│ │ ├── freertos_tasks_c_additions.h
│ │ ├── list.h
│ │ ├── message_buffer.h
│ │ ├── mpu_wrappers.h
│ │ ├── portable.h
│ │ ├── projdefs.h
│ │ ├── queue.h
│ │ ├── semphr.h
│ │ ├── stack_macros.h
│ │ ├── stream_buffer.h
│ │ ├── task.h
│ │ └── timers.h
│ └── license
│ │ └── LICENSE
├── board
│ ├── clock_config.c
│ └── clock_config.h
├── device
│ ├── MK22F51212.h
│ ├── MK22F51212_features.h
│ ├── fsl_device_registers.h
│ ├── system_MK22F51212.c
│ └── system_MK22F51212.h
├── drivers
│ ├── fsl_adc16.c
│ ├── fsl_adc16.h
│ ├── fsl_clock.c
│ ├── fsl_clock.h
│ ├── fsl_common.c
│ ├── fsl_common.h
│ ├── fsl_dac.c
│ ├── fsl_dac.h
│ ├── fsl_dmamux.c
│ ├── fsl_dmamux.h
│ ├── fsl_dspi.c
│ ├── fsl_dspi.h
│ ├── fsl_edma.c
│ ├── fsl_edma.h
│ ├── fsl_ftm.c
│ ├── fsl_ftm.h
│ ├── fsl_gpio.c
│ ├── fsl_gpio.h
│ ├── fsl_i2c.c
│ ├── fsl_i2c.h
│ ├── fsl_pit.c
│ ├── fsl_pit.h
│ ├── fsl_pmc.c
│ ├── fsl_pmc.h
│ ├── fsl_port.h
│ ├── fsl_rcm.c
│ ├── fsl_rcm.h
│ ├── fsl_sai.c
│ ├── fsl_sai.h
│ ├── fsl_sai_edma.c
│ ├── fsl_sai_edma.h
│ ├── fsl_smc.c
│ ├── fsl_smc.h
│ ├── fsl_wdog.c
│ └── fsl_wdog.h
├── include
│ ├── FreeRTOSConfig.h
│ ├── dmr_codec
│ │ ├── codec.h
│ │ └── mbelib.h
│ ├── functions
│ │ ├── calibration.h
│ │ ├── codeplug.h
│ │ ├── rxPowerSaving.h
│ │ ├── settings.h
│ │ ├── sound.h
│ │ ├── ticks.h
│ │ ├── trx.h
│ │ ├── voicePrompts.h
│ │ └── vox.h
│ ├── hardware
│ │ ├── AT1846S.h
│ │ ├── EEPROM.h
│ │ ├── HR-C6000.h
│ │ ├── SPI_Flash.h
│ │ ├── UC1701.h
│ │ ├── UC1701_charset.h
│ │ └── UC1701_charset_JA.h
│ ├── hotspot
│ │ ├── BPTC19696.h
│ │ ├── CRC.h
│ │ ├── DMREmbeddedData.h
│ │ ├── DMRFullLC.h
│ │ ├── DMRLC.h
│ │ ├── DMRShortLC.h
│ │ ├── DMRSlotType.h
│ │ ├── Hamming.h
│ │ ├── QR1676.h
│ │ ├── RS129.h
│ │ ├── dmrDefines.h
│ │ ├── dmrUtils.h
│ │ └── uiHotspot.h
│ ├── interfaces
│ │ ├── adc.h
│ │ ├── clockManager.h
│ │ ├── dac.h
│ │ ├── fsl_notifier.h
│ │ ├── gpio.h
│ │ ├── hr-c6000_spi.h
│ │ ├── i2c.h
│ │ ├── i2s.h
│ │ ├── interrupts.h
│ │ ├── pit.h
│ │ └── wdog.h
│ ├── io
│ │ ├── LEDs.h
│ │ ├── buttons.h
│ │ ├── display.h
│ │ ├── keyboard.h
│ │ └── rotary_switch.h
│ ├── main.h
│ ├── usb
│ │ ├── usb_com.h
│ │ ├── usb_device_config.h
│ │ ├── usb_device_descriptor.h
│ │ └── virtual_com.h
│ ├── user_interface
│ │ ├── languages
│ │ │ ├── catalan.h
│ │ │ ├── czech.h
│ │ │ ├── danish.h
│ │ │ ├── dutch.h
│ │ │ ├── english.h
│ │ │ ├── finnish.h
│ │ │ ├── french.h
│ │ │ ├── german.h
│ │ │ ├── italian.h
│ │ │ ├── japanese.h
│ │ │ ├── polish.h
│ │ │ ├── portugues_brazil.h
│ │ │ ├── portuguese.h
│ │ │ ├── slovenian.h
│ │ │ ├── spanish.h
│ │ │ └── turkish.h
│ │ ├── menuSystem.h
│ │ ├── uiGlobals.h
│ │ ├── uiLocalisation.h
│ │ └── uiUtilities.h
│ └── utils.h
├── linkerdata
│ ├── codec_dat_files_creator.exe
│ ├── disclaimer.txt
│ └── readme.txt
├── linkerscripts
│ ├── firmware.ld
│ ├── firmware_library.ld
│ ├── firmware_library_newlib.ld
│ ├── firmware_memory.ld
│ └── firmware_newlib.ld
├── osa
│ ├── usb_osa.h
│ ├── usb_osa_freertos.c
│ └── usb_osa_freertos.h
├── readme.md
├── source
│ ├── SeggerRTT
│ │ ├── License.txt
│ │ ├── README.txt
│ │ ├── RTT
│ │ │ ├── SEGGER_RTT.c
│ │ │ ├── SEGGER_RTT.h
│ │ │ ├── SEGGER_RTT_Conf.h
│ │ │ └── SEGGER_RTT_printf.c
│ │ └── Syscalls
│ │ │ └── SEGGER_RTT_Syscalls_GCC.c
│ ├── dmr_codec
│ │ ├── codec.c
│ │ ├── codec_bin.S
│ │ └── mbelib.c
│ ├── firmware.c
│ ├── functions
│ │ ├── calibration.c
│ │ ├── codeplug.c
│ │ ├── rxPowerSaving.c
│ │ ├── settings.c
│ │ ├── sound.c
│ │ ├── ticks.c
│ │ ├── trx.c
│ │ ├── voicePrompts.c
│ │ └── vox.c
│ ├── hardware
│ │ ├── AT1846S.c
│ │ ├── EEPROM.c
│ │ ├── HR-C6000.c
│ │ ├── SPI_Flash.c
│ │ ├── UC1701.c
│ │ └── UC1701_transfer.c
│ ├── hotspot
│ │ ├── BPTC19696.c
│ │ ├── CRC.c
│ │ ├── DMREmbeddedData.c
│ │ ├── DMRFullLC.c
│ │ ├── DMRLC.c
│ │ ├── DMRShortLC.c
│ │ ├── DMRSlotType.c
│ │ ├── Hamming.c
│ │ ├── QR1676.c
│ │ ├── RS129.c
│ │ ├── dmrDefines.c
│ │ ├── dmrUtils.c
│ │ └── uiHotspot.c
│ ├── interfaces
│ │ ├── adc.c
│ │ ├── clockManager.c
│ │ ├── dac.c
│ │ ├── fsl_notifier.c
│ │ ├── gpio.c
│ │ ├── i2c.c
│ │ ├── i2s.c
│ │ ├── interrupts.c
│ │ ├── pit.c
│ │ ├── spi.c
│ │ └── wdog.c
│ ├── io
│ │ ├── LEDs.c
│ │ ├── buttons.c
│ │ ├── display.c
│ │ ├── keyboard.c
│ │ └── rotary_switch.c
│ ├── main.c
│ ├── semihost_hardfault.c
│ ├── usb
│ │ ├── usb_com.c
│ │ ├── usb_device_descriptor.c
│ │ └── virtual_com.c
│ └── user_interface
│ │ ├── menuChannelDetails.c
│ │ ├── menuContactDetails.c
│ │ ├── menuContactList.c
│ │ ├── menuCredits.c
│ │ ├── menuDisplayMenuList.c
│ │ ├── menuDisplayOptions.c
│ │ ├── menuFirmwareInfoScreen.c
│ │ ├── menuLanguage.c
│ │ ├── menuLastHeard.c
│ │ ├── menuOptions.c
│ │ ├── menuRSSIScreen.c
│ │ ├── menuRadioInfos.c
│ │ ├── menuSoundOptions.c
│ │ ├── menuSystem.c
│ │ ├── menuZoneList.c
│ │ ├── uiCPS.c
│ │ ├── uiChannelMode.c
│ │ ├── uiGlobals.c
│ │ ├── uiLocalisation.c
│ │ ├── uiLockScreen.c
│ │ ├── uiMessageBox.c
│ │ ├── uiPowerOff.c
│ │ ├── uiPrivateCall.c
│ │ ├── uiSplashScreen.c
│ │ ├── uiTxScreen.c
│ │ ├── uiTxTgPcContactOwnId.c
│ │ ├── uiUtilities.c
│ │ └── uiVFOMode.c
├── startup
│ └── startup_mk22f51212.c
├── tools
│ ├── FirmwareLoader
│ ├── FirmwareLoader-Linux.exe
│ ├── FirmwareLoader.exe
│ ├── LibUsbDotNet.dll
│ ├── Newtonsoft.Json.dll
│ ├── bin2sgl
│ ├── bin2sgl.Darwin
│ ├── bin2sgl.Linux
│ ├── bin2sgl.exe
│ └── disclaimer.txt
└── usb
│ ├── device
│ ├── class
│ │ ├── usb_device_audio.c
│ │ ├── usb_device_audio.h
│ │ ├── usb_device_ccid.c
│ │ ├── usb_device_ccid.h
│ │ ├── usb_device_cdc_acm.c
│ │ ├── usb_device_cdc_acm.h
│ │ ├── usb_device_cdc_rndis.c
│ │ ├── usb_device_cdc_rndis.h
│ │ ├── usb_device_class.c
│ │ ├── usb_device_class.h
│ │ ├── usb_device_hid.c
│ │ ├── usb_device_hid.h
│ │ ├── usb_device_msc.c
│ │ ├── usb_device_msc.h
│ │ ├── usb_device_msc_ufi.c
│ │ ├── usb_device_msc_ufi.h
│ │ ├── usb_device_phdc.c
│ │ ├── usb_device_phdc.h
│ │ ├── usb_device_printer.c
│ │ ├── usb_device_printer.h
│ │ ├── usb_device_video.c
│ │ └── usb_device_video.h
│ ├── include
│ │ └── usb_device.h
│ └── source
│ │ ├── ehci
│ │ ├── usb_device_ehci.c
│ │ └── usb_device_ehci.h
│ │ ├── khci
│ │ ├── usb_device_khci.c
│ │ └── usb_device_khci.h
│ │ ├── lpcip3511
│ │ ├── usb_device_lpcip3511.c
│ │ └── usb_device_lpcip3511.h
│ │ ├── usb_device_ch9.c
│ │ ├── usb_device_ch9.h
│ │ ├── usb_device_dci.c
│ │ └── usb_device_dci.h
│ ├── include
│ ├── usb.h
│ ├── usb_misc.h
│ └── usb_spec.h
│ └── phy
│ ├── usb_phy.c
│ └── usb_phy.h
├── firmware_binaries
├── LICENCE
├── firmware.txt
└── readme.md
└── tools
├── Python
├── FirmwareLoader
│ └── gd-77_firmware_loader.py
└── ScreenGrabber
│ └── gd-77_screen_grabber.py
├── bin2sgl
├── .gitignore
├── .vs
│ └── bin2sgl
│ │ └── v15
│ │ └── Server
│ │ └── sqlite3
│ │ ├── db.lock
│ │ └── storage.ide
├── bin2sgl.sln
├── bin2sgl
│ ├── App.config
│ ├── DataArrays.cs
│ ├── Program.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── bin2sgl.c
│ ├── bin2sgl.csproj
│ └── bin2sgl.csproj.user
├── disclaimer.txt
├── exe
│ └── bin2sgl.exe
└── readme.md
├── codec_dat_files_creator
└── codec_dat_files_creator.c
├── compiled_versions
├── FirmwareLoader
├── FirmwareLoader-Linux.exe
├── FirmwareLoader.exe
├── LibUsbDotNet.dll
├── Newtonsoft.Json.dll
├── bin2sgl
├── bin2sgl.Darwin
├── bin2sgl.Linux
├── bin2sgl.exe
└── disclaimer.txt
├── firmware_loader
├── .gitignore
├── App.config
├── DataTable.cs
├── FirmwareLoader.cs
├── FirmwareLoader.csproj
├── FirmwareLoader.sln
├── FirmwareLoaderReleasesList.Designer.cs
├── FirmwareLoaderReleasesList.cs
├── FirmwareLoaderReleasesList.resx
├── FirmwareLoader_LibUsbDotNet.csproj
├── FirmwareLoader_LibUsbDotNet.sln
├── FrmProgress.Designer.cs
├── FrmProgress.cs
├── FrmProgress.resx
├── LibUsbDotNet.dll
├── MainForm.Designer.cs
├── MainForm.cs
├── MainForm.resx
├── Program.cs
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
├── Resources
│ └── Icon.ico
├── UsbLib
│ ├── DataRecievedEventArgs.cs
│ ├── DataRecievedEventHandler.cs
│ ├── DataSendEventArgs.cs
│ ├── DataSendEventHandler.cs
│ ├── GException0.cs
│ ├── HIDDevice.cs
│ ├── InputReport.cs
│ ├── OutputReport.cs
│ ├── Report.cs
│ ├── SpecifiedDevice.cs
│ ├── SpecifiedInputReport.cs
│ ├── SpecifiedOutputReport.cs
│ └── Win32Usb.cs
├── UsbLibDotNetHIDDevice.cs
├── packages.config
├── packages
│ └── Newtonsoft.Json.12.0.3
│ │ ├── .signature.p7s
│ │ ├── LICENSE.md
│ │ ├── Newtonsoft.Json.12.0.3.nupkg
│ │ ├── lib
│ │ ├── net20
│ │ │ ├── Newtonsoft.Json.dll
│ │ │ └── Newtonsoft.Json.xml
│ │ ├── net35
│ │ │ ├── Newtonsoft.Json.dll
│ │ │ └── Newtonsoft.Json.xml
│ │ ├── net40
│ │ │ ├── Newtonsoft.Json.dll
│ │ │ └── Newtonsoft.Json.xml
│ │ ├── net45
│ │ │ ├── Newtonsoft.Json.dll
│ │ │ └── Newtonsoft.Json.xml
│ │ ├── netstandard1.0
│ │ │ ├── Newtonsoft.Json.dll
│ │ │ └── Newtonsoft.Json.xml
│ │ ├── netstandard1.3
│ │ │ ├── Newtonsoft.Json.dll
│ │ │ └── Newtonsoft.Json.xml
│ │ ├── netstandard2.0
│ │ │ ├── Newtonsoft.Json.dll
│ │ │ └── Newtonsoft.Json.xml
│ │ ├── portable-net40+sl5+win8+wp8+wpa81
│ │ │ ├── Newtonsoft.Json.dll
│ │ │ └── Newtonsoft.Json.xml
│ │ └── portable-net45+win8+wp8+wpa81
│ │ │ ├── Newtonsoft.Json.dll
│ │ │ └── Newtonsoft.Json.xml
│ │ └── packageIcon.png
└── readme.md
├── font_tools
├── GFXfont_converter
│ ├── converter.c
│ ├── gfxfont.h
│ ├── roboto_cond_bold_12.h
│ ├── roboto_medium_12.h
│ ├── roboto_mono_13.h
│ ├── roboto_mono_bold_14.h
│ ├── roboto_mono_bold_26.h
│ └── roboto_mono_light_14.h
├── HOWTO.txt
└── font_converter
│ ├── Makefile
│ ├── UC1701_font_SaM.sh
│ ├── UC1701_font_tool.c
│ └── UC1701_font_tool.exe
└── patched_bootloaders
├── DM1801_patched_bootloader.bin
├── GD77_patched_bootloader.bin
├── RD5R_bootloader_patched.bin
├── gd77S_bootloader_patched.bin
└── readme.md
/ComTool/ComTool.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.28307.329
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComTool", "ComTool\ComTool.csproj", "{4EB44381-ED5D-4AE4-8921-377DD139120D}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {4EB44381-ED5D-4AE4-8921-377DD139120D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {4EB44381-ED5D-4AE4-8921-377DD139120D}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {4EB44381-ED5D-4AE4-8921-377DD139120D}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {4EB44381-ED5D-4AE4-8921-377DD139120D}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {F9C7FD44-1237-42A5-B357-31018F96119B}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/ComTool/ComTool/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/ComTool/ComTool/Program.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C)2019 Kai Ludwig, DG4KLU
3 | *
4 | * This program is free software; you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation; either version 2 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 | */
18 |
19 | using System;
20 | using System.Collections.Generic;
21 | using System.Linq;
22 | using System.Threading.Tasks;
23 | using System.Windows.Forms;
24 |
25 | namespace ComTool
26 | {
27 | static class Program
28 | {
29 | ///
30 | /// Der Haupteinstiegspunkt für die Anwendung.
31 | ///
32 | [STAThread]
33 | static void Main()
34 | {
35 | Application.EnableVisualStyles();
36 | Application.SetCompatibleTextRenderingDefault(false);
37 | Application.Run(new FormMain());
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/ComTool/ComTool/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // Allgemeine Informationen über eine Assembly werden über die folgenden
6 | // Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
7 | // die einer Assembly zugeordnet sind.
8 | [assembly: AssemblyTitle("ComTool")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("ComTool")]
13 | [assembly: AssemblyCopyright("Copyright © 2019")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
18 | // für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
19 | // COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
20 | [assembly: ComVisible(false)]
21 |
22 | // Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
23 | [assembly: Guid("4eb44381-ed5d-4ae4-8921-377dd139120d")]
24 |
25 | // Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
26 | //
27 | // Hauptversion
28 | // Nebenversion
29 | // Buildnummer
30 | // Revision
31 | //
32 | // Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
33 | // übernehmen, indem Sie "*" eingeben:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/ComTool/ComTool/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // Dieser Code wurde von einem Tool generiert.
4 | // Laufzeitversion:4.0.30319.42000
5 | //
6 | // Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
7 | // der Code erneut generiert wird.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace ComTool.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/ComTool/ComTool/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ComTool/readme.md:
--------------------------------------------------------------------------------
1 | This software is licenced under the GPL v2 and is intended for amateur and educational use only.
2 |
3 | Use of this software for commercial purposes is strictly forbidden.
4 |
5 | -----------------------------------------
6 |
7 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
8 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
9 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
10 | EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
12 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
13 | OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
14 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
15 | OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
16 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17 |
--------------------------------------------------------------------------------
/ComTool_Binary/ComTool.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/ComTool_Binary/ComTool.exe
--------------------------------------------------------------------------------
/ComTool_Binary/readme.md:
--------------------------------------------------------------------------------
1 | This software is licenced under the GPL v2 and is intended for amateur and educational use only.
2 |
3 | Use of this software for commercial purposes is strictly forbidden.
4 |
5 | -----------------------------------------
6 |
7 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
8 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
9 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
10 | EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
12 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
13 | OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
14 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
15 | OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
16 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17 |
--------------------------------------------------------------------------------
/Linux/etc/udev/rules.d/Fedora/readme.txt:
--------------------------------------------------------------------------------
1 | From OH1KH:
2 |
3 | Add the following lines to /etc/udev/rules.d/92-persistent-usb.rules:
4 |
5 | # Radioddity
6 | SUBSYSTEM=="usb", ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="0073", MODE="666"
7 | ACTION=="add", SUBSYSTEM=="tty", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0094", SYMLINK+="OpenGD77"
8 |
--------------------------------------------------------------------------------
/Linux/etc/udev/rules.d/Ubuntu/99-gd77.rules:
--------------------------------------------------------------------------------
1 | # USB rules for GD-77
2 | # Place this in /etc/udev/rules.d/ to let all users talk to the radios by USB.
3 |
4 | #
5 | SUBSYSTEM=="usb", ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="0073", MODE="0666", GROUP="plugdev"
6 |
7 | # HIDAPI/libusb
8 | SUBSYSTEM=="usb", ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="0073", MODE="0666", GROUP="plugdev"
9 | SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0094", MODE="0666", GROUP="plugdev"
10 |
11 | # HIDAPI/hidraw
12 | KERNEL=="hidraw*", ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="0073", MODE="0666", GROUP="plugdev"
13 | KERNEL=="hidraw*", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0094", MODE="0666", GROUP="plugdev"
14 |
15 | # HIDAPI/hiddev
16 | ## We need to unbind this device, otherwise LibUsb will fail to SetConfiguration() and ClaimInterface()
17 | # For Bootloader (usbhid)
18 | KERNEL=="hiddev*", ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="0073", MODE="0666", GROUP="plugdev", RUN+="/bin/bash -c 'ID=$(IFS=/; read -a array <<< %p; echo ${array[-3]}); echo $ID > /sys/bus/usb/drivers/usbhid/unbind'"
19 |
20 | # OpenGD77
21 | KERNEL=="ttyACM[0-9]*", SUBSYSTEM=="tty", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0094", MODE="0666", GROUP="dialout", SYMLINK+="OpenGD77"
22 |
--------------------------------------------------------------------------------
/Linux/etc/udev/rules.d/archlinux/99-gd77.rules:
--------------------------------------------------------------------------------
1 | # you need to add your user to usbmux group firstly and optionaly to the uucp (no needed for firmware update)
2 | # sudo gpasswd -a $YORUSERNAME usbmux
3 | # sudo gpasswd -a $YORUSERNAME uucp
4 | #
5 | # USB rules for GD-77
6 | # Place this in /etc/udev/rules.d/ to let all users talk to the radios by USB.
7 |
8 | #
9 | SUBSYSTEM=="usb", ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="0073", MODE="0666", GROUP="usbmux"
10 |
11 | # HIDAPI/libusb
12 | SUBSYSTEM=="usb", ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="0073", MODE="0666", GROUP="usbmux"
13 | SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0094", MODE="0666", GROUP="usbmux"
14 |
15 | # HIDAPI/hidraw
16 | KERNEL=="hidraw*", ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="0073", MODE="0666", GROUP="usbmux"
17 | KERNEL=="hidraw*", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0094", MODE="0666", GROUP="usbmux"
18 |
19 | # HIDAPI/hiddev
20 | ## We need to unbind this device, otherwise LibUsb will fail to SetConfiguration() and ClaimInterface()
21 | # For Bootloader (usbhid)
22 | KERNEL=="hiddev*", ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="0073", MODE="0666", GROUP="usbmux", RUN+="/bin/bash -c 'ID=$(IFS=/; read -a array <<< %p; echo ${array[-3]}); echo $ID > /sys/bus/usb/drivers/usbhid/unbind'"
23 |
24 | # OpenGD77
25 | KERNEL=="ttyACM[0-9]*", SUBSYSTEM=="tty", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0094", MODE="0666", GROUP="uucp", SYMLINK+="OpenGD77"
26 |
--------------------------------------------------------------------------------
/OpenGD77CommDriver/install_OpenGD77_comm_driver.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 | echo Installing OpenGD77 Serial driver...
3 | "%~dp0wdi-simple" --vid 0x01FC9 --pid 0x0094 --type 3 --name "OpenGD77" --dest "%~dp0OpenGD77-serial-driver-files"
4 | echo.
5 | pause
--------------------------------------------------------------------------------
/OpenGD77CommDriver/wdi-simple.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/OpenGD77CommDriver/wdi-simple.exe
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # OpenGD77
2 | Firmware for DMR transceivers using the NXP MK22 MCU, AT1846S RF chip and HR-C6000 DMR chipset. This includes the Radioddiy GD-77, Radioddity GD-77s, Baofeng DM-1801 and Baofeng RD-5R.
3 |
4 | This repo began as a fork of rogerclarkmelborune/OpenGD77, which has since been deleted. It contains the latest known publicly-released code.
5 |
6 | # Project status
7 | Development of OpenGD77 appears to have resumed, with firmware and code being released at https://www.opengd77.com/downloads/. The authors have unfortunately chosen not to publish the new code on GitHub. The sole purpose of this repository is therefore to preserve the code.
8 |
9 | The firmware generated by this project includes binary code from the official Radioddity firmware. The CODEC from the original binary is re-used to avoid intellectual property infringement. Distributing the resulting binary is therefore problematic from a intellectual property perspective.
10 |
11 | # Building
12 | Please see BUILD.md for toolchain and build instructions.
13 |
14 | # Credits
15 | Originally conceived by Kai DG4KLU.
16 | Further development by Roger VK3KYY, latterly assisted by Daniel F1RMB, Alex DL4LEX, Colin G4EML and many others.
17 | RD-5R initial development by EW1ADG
18 |
19 | Special thanks to Jason VK7ZJA for his work on the memory map and RF hardware of the GD-77
20 | Also thanks for Ian DJ0HF for his work coordinating the requirements of blind and visually impaired operators.
21 |
22 | Thanks also to all the translation contributors including:
23 |
24 | CT4TX, CT1HSN
25 |
26 | DG3GSP, DL4LEX
27 |
28 | EA3IGM, EA5SW
29 |
30 | EA3IGM, EA5SW, EB3AM, EA3BIL
31 |
32 | F1CXG, F1RMB
33 |
34 | IU4LEG, IZ2EIB
35 |
36 | JE4SMQ
37 |
38 | OH1E
39 |
40 | OK2HAD
41 |
42 | ON7LDS
43 |
44 | OZ1MAX
45 |
46 | PU4RON
47 |
48 | SQ7PTE
49 |
50 | TA5AYX
51 |
52 | # License
53 | This software is licensed under the GPL v2 and is intended for Amateur Radio and educational use only.
54 |
55 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
56 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
57 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
58 | EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
59 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
60 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
61 | OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
62 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
63 | OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
64 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
65 |
--------------------------------------------------------------------------------
/docs/OpenGD77 Quick Guide Graphic.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/OpenGD77 Quick Guide Graphic.jpg
--------------------------------------------------------------------------------
/docs/OpenGD77 Quick Guide Graphic_CN.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/OpenGD77 Quick Guide Graphic_CN.jpg
--------------------------------------------------------------------------------
/docs/OpenGD77_User_Guide.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/OpenGD77_User_Guide.pdf
--------------------------------------------------------------------------------
/docs/OpenGD77_User_Guide_CN.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/OpenGD77_User_Guide_CN.pdf
--------------------------------------------------------------------------------
/docs/archive/.gitkeep:
--------------------------------------------------------------------------------
1 | #New Folder
2 |
--------------------------------------------------------------------------------
/docs/archive/Open GD77 User Guide.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/archive/Open GD77 User Guide.docx
--------------------------------------------------------------------------------
/docs/archive/Open GD77 User Guide.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/archive/Open GD77 User Guide.pdf
--------------------------------------------------------------------------------
/docs/archive/OpenGD77 User Guide.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/archive/OpenGD77 User Guide.pdf
--------------------------------------------------------------------------------
/docs/build_pdf_doc.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 |
4 | cat OpenGD77_User_Guide.md | sed -e 's/
<\/div>/\\pagebreak/g' -e 's//{ \1 }/g' -e 's//\\newline/g' -e 's/
\(.*\)<\/sup>/\\textsuperscript{\1}/g' -e 's/\(.*\)<\/sub>/\\textsubscript{\1}/g' > OpenGD77_User_Guide-workingcopy.md
5 | pandoc \
6 | -H latex_preamble.tex \
7 | -V linkcolor:blue \
8 | -V geometry:a4paper \
9 | -V geometry:margin=1.5cm \
10 | -V mainfont="DejaVu Serif" \
11 | -V monofont="DejaVu Sans Mono" \
12 | -V fontsize="12pt" \
13 | --columns=16 \
14 | -V pagestyle=empty \
15 | --self-contained \
16 | -t latex -i OpenGD77_User_Guide-workingcopy.md -o OpenGD77_User_Guide.pdf
17 | rm -f OpenGD77_User_Guide-workingcopy.md
18 |
19 | exit 0
20 |
--------------------------------------------------------------------------------
/docs/data_sheets/20190317_155845.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/data_sheets/20190317_155845.jpg
--------------------------------------------------------------------------------
/docs/data_sheets/20190317_155925.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/data_sheets/20190317_155925.jpg
--------------------------------------------------------------------------------
/docs/data_sheets/20190317_160448.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/data_sheets/20190317_160448.jpg
--------------------------------------------------------------------------------
/docs/data_sheets/ALPU-MP_datasheet_v2.16.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/data_sheets/ALPU-MP_datasheet_v2.16.pdf
--------------------------------------------------------------------------------
/docs/data_sheets/AT1846S/AT1846S-Datasheet-0.3.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/data_sheets/AT1846S/AT1846S-Datasheet-0.3.pdf
--------------------------------------------------------------------------------
/docs/data_sheets/AT1846S/AT1846S-ProgrammingGuide-1.4.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/data_sheets/AT1846S/AT1846S-ProgrammingGuide-1.4.pdf
--------------------------------------------------------------------------------
/docs/data_sheets/AT1846S/RDA1846S_SCH_for_customer.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/data_sheets/AT1846S/RDA1846S_SCH_for_customer.pdf
--------------------------------------------------------------------------------
/docs/data_sheets/AT1846S/RDA1846S_SQ_algorithmic_introduction.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/data_sheets/AT1846S/RDA1846S_SQ_algorithmic_introduction.pdf
--------------------------------------------------------------------------------
/docs/data_sheets/AT1846S/RDA1846S_datasheet_v0.1.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/data_sheets/AT1846S/RDA1846S_datasheet_v0.1.pdf
--------------------------------------------------------------------------------
/docs/data_sheets/AT1846S/RDA1846S_programming_guide_1.2.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/data_sheets/AT1846S/RDA1846S_programming_guide_1.2.pdf
--------------------------------------------------------------------------------
/docs/data_sheets/AT1846S/RDA1846S_register_table_20111008.xls:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/data_sheets/AT1846S/RDA1846S_register_table_20111008.xls
--------------------------------------------------------------------------------
/docs/data_sheets/AT1846S/RDA1846_Programming_manual.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/data_sheets/AT1846S/RDA1846_Programming_manual.pdf
--------------------------------------------------------------------------------
/docs/data_sheets/Atmel-8720-SEEPROM-AT24C512C-Datasheet.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/data_sheets/Atmel-8720-SEEPROM-AT24C512C-Datasheet.pdf
--------------------------------------------------------------------------------
/docs/data_sheets/C6000/HR-C6000 Registers_G4EML.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/data_sheets/C6000/HR-C6000 Registers_G4EML.docx
--------------------------------------------------------------------------------
/docs/data_sheets/C6000/HRC6000_VK3KYY.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/data_sheets/C6000/HRC6000_VK3KYY.docx
--------------------------------------------------------------------------------
/docs/data_sheets/C6000/HR_C6000_chinese.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/data_sheets/C6000/HR_C6000_chinese.docx
--------------------------------------------------------------------------------
/docs/data_sheets/C6000/HR_C6000_simple.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/data_sheets/C6000/HR_C6000_simple.pdf
--------------------------------------------------------------------------------
/docs/data_sheets/C6000/HR_C6000_translated.odt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/data_sheets/C6000/HR_C6000_translated.odt
--------------------------------------------------------------------------------
/docs/data_sheets/C6000/HR_C6000_translated.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/data_sheets/C6000/HR_C6000_translated.pdf
--------------------------------------------------------------------------------
/docs/data_sheets/C6000/HR_C6000_updated_chinese.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/data_sheets/C6000/HR_C6000_updated_chinese.pdf
--------------------------------------------------------------------------------
/docs/data_sheets/C6000/HR_C6000_updated_chinese_translated_english.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/data_sheets/C6000/HR_C6000_updated_chinese_translated_english.pdf
--------------------------------------------------------------------------------
/docs/data_sheets/C7000/HR_C7000 Software Application Manual (Chip User Guide V2).pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/data_sheets/C7000/HR_C7000 Software Application Manual (Chip User Guide V2).pdf
--------------------------------------------------------------------------------
/docs/data_sheets/C7000/HR_C7000_User Manual.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/data_sheets/C7000/HR_C7000_User Manual.pdf
--------------------------------------------------------------------------------
/docs/data_sheets/DMR_spec_ts_10236101v020201p.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/data_sheets/DMR_spec_ts_10236101v020201p.pdf
--------------------------------------------------------------------------------
/docs/data_sheets/MK22/K22 FLASH - AN4835.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/data_sheets/MK22/K22 FLASH - AN4835.pdf
--------------------------------------------------------------------------------
/docs/data_sheets/MK22/K22 Flash security - AN4507.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/data_sheets/MK22/K22 Flash security - AN4507.pdf
--------------------------------------------------------------------------------
/docs/data_sheets/MK22/MK22FN512VLL12.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/data_sheets/MK22/MK22FN512VLL12.pdf
--------------------------------------------------------------------------------
/docs/data_sheets/MK22/NXP_K22P121M120SF7RM.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/data_sheets/MK22/NXP_K22P121M120SF7RM.pdf
--------------------------------------------------------------------------------
/docs/data_sheets/RDA5802E/RDA5802E.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/data_sheets/RDA5802E/RDA5802E.pdf
--------------------------------------------------------------------------------
/docs/data_sheets/RDA5802E/readme.md:
--------------------------------------------------------------------------------
1 | The Baofeng DM-5R and RD-5R have a FM broadcast receiver chip in them.
2 |
3 | However the markings on the chip are not of the RDA5802, and the chip does not appear to be a RDA5802
4 | Hence this datasheet has only been added as a general reference to broadcast FM receiver chips.
5 |
6 | The chip in that is in the radio is connected to the same I2C bus as the AT1846 and the EEPROM, and is on the same address as
7 | the RDA5802, but the chip does not resond with the correct ID code.
8 |
9 | I think it returns ID code 0x02 when it should return 0x58
10 |
11 | Also reading some other registers in the chip, do not return the default values that a RDA5802 would return.
12 |
--------------------------------------------------------------------------------
/docs/data_sheets/UC1701_datasheet.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/data_sheets/UC1701_datasheet.pdf
--------------------------------------------------------------------------------
/docs/data_sheets/W25Q80BV.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/data_sheets/W25Q80BV.pdf
--------------------------------------------------------------------------------
/docs/latex_preamble.tex:
--------------------------------------------------------------------------------
1 | \usepackage{enumitem}
2 | \setlistdepth{9}
3 |
4 | \setlist[itemize,1]{label=$\bullet$}
5 | \setlist[itemize,2]{label=$\circ$}
6 | \setlist[itemize,3]{label=$\hbox{\rule{.6ex}{.6ex}}$}
7 | \setlist[itemize,4]{label=-}
8 | \setlist[itemize,5]{label=$\cdot$}
9 | \setlist[itemize,6]{label=$\triangleright$}
10 | \setlist[itemize,7]{label=$\odot$}
11 | \setlist[itemize,8]{label=$\rightarrow$}
12 | \setlist[itemize,9]{label=$\otimes$}
13 |
14 | \renewlist{itemize}{itemize}{9}
15 |
16 | \usepackage{sectsty}
17 | %%\sectionfont{\clearpage}
18 | %%\sectionfont{\underline\clearpage}
19 | \sectionfont{\LARGE\clearpage}
20 |
21 | \usepackage{float}
22 | \let\origfigure\figure
23 | \let\endorigfigure\endfigure
24 | \renewenvironment{figure}[1][2] {
25 | \expandafter\origfigure\expandafter[H]
26 | } {
27 | \endorigfigure
28 | }
29 |
30 | \usepackage{caption}
31 | \captionsetup[figure]{labelformat=empty}
32 |
--------------------------------------------------------------------------------
/docs/media/Backup-01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/Backup-01.png
--------------------------------------------------------------------------------
/docs/media/Backup-02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/Backup-02.png
--------------------------------------------------------------------------------
/docs/media/Firmware_loader-01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/Firmware_loader-01.png
--------------------------------------------------------------------------------
/docs/media/Firmware_loader-02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/Firmware_loader-02.png
--------------------------------------------------------------------------------
/docs/media/Firmware_loader-03.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/Firmware_loader-03.png
--------------------------------------------------------------------------------
/docs/media/OpenGD77-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/OpenGD77-logo.png
--------------------------------------------------------------------------------
/docs/media/OpenRD5R_controlkeys.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/OpenRD5R_controlkeys.jpg
--------------------------------------------------------------------------------
/docs/media/PTT-layout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/PTT-layout.png
--------------------------------------------------------------------------------
/docs/media/RadioButtonsHSs.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/RadioButtonsHSs.jpg
--------------------------------------------------------------------------------
/docs/media/RadioButtons_CN.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/RadioButtons_CN.jpg
--------------------------------------------------------------------------------
/docs/media/accept-call.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/accept-call.png
--------------------------------------------------------------------------------
/docs/media/all-channels-channel-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/all-channels-channel-screen.png
--------------------------------------------------------------------------------
/docs/media/all-channels.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/all-channels.png
--------------------------------------------------------------------------------
/docs/media/battery-graph-fill.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/battery-graph-fill.png
--------------------------------------------------------------------------------
/docs/media/battery-graph-line.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/battery-graph-line.png
--------------------------------------------------------------------------------
/docs/media/battery-graph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/battery-graph.png
--------------------------------------------------------------------------------
/docs/media/battery-level.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/battery-level.png
--------------------------------------------------------------------------------
/docs/media/battery.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/battery.png
--------------------------------------------------------------------------------
/docs/media/callsign-and-name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/callsign-and-name.png
--------------------------------------------------------------------------------
/docs/media/changing-zones.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/changing-zones.png
--------------------------------------------------------------------------------
/docs/media/channel-and-zone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/channel-and-zone.png
--------------------------------------------------------------------------------
/docs/media/channel-details.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/channel-details.png
--------------------------------------------------------------------------------
/docs/media/channel-quick-menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/channel-quick-menu.png
--------------------------------------------------------------------------------
/docs/media/contact-selection.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/contact-selection.png
--------------------------------------------------------------------------------
/docs/media/cps-TGlists.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/cps-TGlists.png
--------------------------------------------------------------------------------
/docs/media/cps-band-limits.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/cps-band-limits.png
--------------------------------------------------------------------------------
/docs/media/cps-channel-rx-grouplist.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/cps-channel-rx-grouplist.png
--------------------------------------------------------------------------------
/docs/media/cps-channel-tglist.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/cps-channel-tglist.png
--------------------------------------------------------------------------------
/docs/media/cps-dmr-ids.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/cps-dmr-ids.png
--------------------------------------------------------------------------------
/docs/media/cps-opengd77-support.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/cps-opengd77-support.png
--------------------------------------------------------------------------------
/docs/media/cps-tg-contacts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/cps-tg-contacts.png
--------------------------------------------------------------------------------
/docs/media/credits.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/credits.png
--------------------------------------------------------------------------------
/docs/media/ctcss-tone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/ctcss-tone.png
--------------------------------------------------------------------------------
/docs/media/device-manager-ports.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/device-manager-ports.png
--------------------------------------------------------------------------------
/docs/media/display-options.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/display-options.png
--------------------------------------------------------------------------------
/docs/media/dmr-mic-level.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/dmr-mic-level.png
--------------------------------------------------------------------------------
/docs/media/dmr-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/dmr-screen.png
--------------------------------------------------------------------------------
/docs/media/firmware-info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/firmware-info.png
--------------------------------------------------------------------------------
/docs/media/frequency-entry.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/frequency-entry.png
--------------------------------------------------------------------------------
/docs/media/goto-channel-number.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/goto-channel-number.png
--------------------------------------------------------------------------------
/docs/media/hotspot-connections.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/hotspot-connections.jpg
--------------------------------------------------------------------------------
/docs/media/hotspot-mode.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/hotspot-mode.jpg
--------------------------------------------------------------------------------
/docs/media/hotspot-rx.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/hotspot-rx.jpg
--------------------------------------------------------------------------------
/docs/media/hotspot-tx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/hotspot-tx.png
--------------------------------------------------------------------------------
/docs/media/keypad-and-ptt-locked.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/keypad-and-ptt-locked.png
--------------------------------------------------------------------------------
/docs/media/last-heard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/last-heard.png
--------------------------------------------------------------------------------
/docs/media/lock-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/lock-screen.png
--------------------------------------------------------------------------------
/docs/media/main-menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/main-menu.png
--------------------------------------------------------------------------------
/docs/media/menu-options.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/menu-options.png
--------------------------------------------------------------------------------
/docs/media/menu-roadmap-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/menu-roadmap-1.png
--------------------------------------------------------------------------------
/docs/media/menu-roadmap-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/menu-roadmap-2.png
--------------------------------------------------------------------------------
/docs/media/menu-roadmap-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/menu-roadmap-3.png
--------------------------------------------------------------------------------
/docs/media/options-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/options-screen.png
--------------------------------------------------------------------------------
/docs/media/pistar-configuration.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/pistar-configuration.png
--------------------------------------------------------------------------------
/docs/media/private-call-entry.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/private-call-entry.png
--------------------------------------------------------------------------------
/docs/media/private-call-selection.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/private-call-selection.png
--------------------------------------------------------------------------------
/docs/media/private-call.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/private-call.png
--------------------------------------------------------------------------------
/docs/media/rssi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/rssi.png
--------------------------------------------------------------------------------
/docs/media/signal-meter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/signal-meter.png
--------------------------------------------------------------------------------
/docs/media/sound-options.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/sound-options.png
--------------------------------------------------------------------------------
/docs/media/squelch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/squelch.png
--------------------------------------------------------------------------------
/docs/media/talker-alias-data.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/talker-alias-data.png
--------------------------------------------------------------------------------
/docs/media/talker-alias.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/talker-alias.png
--------------------------------------------------------------------------------
/docs/media/talkgroup-and-dmr-id.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/talkgroup-and-dmr-id.png
--------------------------------------------------------------------------------
/docs/media/talkgroup-entry.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/talkgroup-entry.png
--------------------------------------------------------------------------------
/docs/media/talkgroup-inverse-video.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/talkgroup-inverse-video.png
--------------------------------------------------------------------------------
/docs/media/talkgroup-manually-entered.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/talkgroup-manually-entered.png
--------------------------------------------------------------------------------
/docs/media/talkgroup-override.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/talkgroup-override.png
--------------------------------------------------------------------------------
/docs/media/temperature.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/temperature.png
--------------------------------------------------------------------------------
/docs/media/text-entry.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/text-entry.png
--------------------------------------------------------------------------------
/docs/media/timeout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/timeout.png
--------------------------------------------------------------------------------
/docs/media/user-dmr-id.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/user-dmr-id.png
--------------------------------------------------------------------------------
/docs/media/vfo-quick-menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/vfo-quick-menu.png
--------------------------------------------------------------------------------
/docs/media/vfo-scan-limits.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/vfo-scan-limits.png
--------------------------------------------------------------------------------
/docs/media/vfo-scan-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/vfo-scan-screen.png
--------------------------------------------------------------------------------
/docs/media/vfo-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/vfo-screen.png
--------------------------------------------------------------------------------
/docs/media/zones.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/media/zones.png
--------------------------------------------------------------------------------
/docs/technical_documents/codec/Multiband Excitation Vocoder.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/technical_documents/codec/Multiband Excitation Vocoder.pdf
--------------------------------------------------------------------------------
/docs/technical_documents/codec/TIA-102.BABA Project 25 IMBE Vocoder Description.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/technical_documents/codec/TIA-102.BABA Project 25 IMBE Vocoder Description.pdf
--------------------------------------------------------------------------------
/docs/technical_documents/codec/TIA-102.BABA-1 P25 Half Rate Vocoder Addendum .pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/technical_documents/codec/TIA-102.BABA-1 P25 Half Rate Vocoder Addendum .pdf
--------------------------------------------------------------------------------
/docs/technical_documents/codec/TIA-102.BABC Vocoder Reference Test.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/technical_documents/codec/TIA-102.BABC Vocoder Reference Test.pdf
--------------------------------------------------------------------------------
/docs/technical_documents/dmr/TS 102 361-1.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/technical_documents/dmr/TS 102 361-1.pdf
--------------------------------------------------------------------------------
/docs/technical_documents/dmr/TS 102 361-2.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/technical_documents/dmr/TS 102 361-2.pdf
--------------------------------------------------------------------------------
/docs/technical_documents/dmr/TS 102 361-3.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/technical_documents/dmr/TS 102 361-3.pdf
--------------------------------------------------------------------------------
/docs/technical_documents/dmr/TS 102 361-4.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/docs/technical_documents/dmr/TS 102 361-4.pdf
--------------------------------------------------------------------------------
/firmware/.gitignore:
--------------------------------------------------------------------------------
1 | /Debug_GD-*
2 | /JA_Debug_*
--------------------------------------------------------------------------------
/firmware/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | firmware
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.xtext.ui.shared.xtextBuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.cdt.managedbuilder.core.genmakebuilder
15 | clean,full,incremental,
16 |
17 |
18 |
19 |
20 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder
21 | full,incremental,
22 |
23 |
24 |
25 |
26 |
27 | org.eclipse.cdt.core.cnature
28 | com.nxp.mcuxpresso.core.datamodels.sdkNature
29 | org.eclipse.cdt.managedbuilder.core.managedBuildNature
30 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature
31 | org.eclipse.xtext.ui.shared.xtextNature
32 |
33 |
34 |
--------------------------------------------------------------------------------
/firmware/CMSIS/arm_const_structs.h:
--------------------------------------------------------------------------------
1 | /* ----------------------------------------------------------------------
2 | * Project: CMSIS DSP Library
3 | * Title: arm_const_structs.h
4 | * Description: Constant structs that are initialized for user convenience.
5 | * For example, some can be given as arguments to the arm_cfft_f32() function.
6 | *
7 | * $Date: 27. January 2017
8 | * $Revision: V.1.5.1
9 | *
10 | * Target Processor: Cortex-M cores
11 | * -------------------------------------------------------------------- */
12 | /*
13 | * Copyright (C) 2010-2017 ARM Limited or its affiliates. All rights reserved.
14 | *
15 | * SPDX-License-Identifier: Apache-2.0
16 | *
17 | * Licensed under the Apache License, Version 2.0 (the License); you may
18 | * not use this file except in compliance with the License.
19 | * You may obtain a copy of the License at
20 | *
21 | * www.apache.org/licenses/LICENSE-2.0
22 | *
23 | * Unless required by applicable law or agreed to in writing, software
24 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
25 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26 | * See the License for the specific language governing permissions and
27 | * limitations under the License.
28 | */
29 |
30 | #ifndef _ARM_CONST_STRUCTS_H
31 | #define _ARM_CONST_STRUCTS_H
32 |
33 | #include "arm_math.h"
34 | #include "arm_common_tables.h"
35 |
36 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len16;
37 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len32;
38 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len64;
39 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len128;
40 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len256;
41 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len512;
42 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len1024;
43 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len2048;
44 | extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len4096;
45 |
46 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len16;
47 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len32;
48 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len64;
49 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len128;
50 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len256;
51 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len512;
52 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len1024;
53 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len2048;
54 | extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len4096;
55 |
56 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len16;
57 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len32;
58 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len64;
59 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len128;
60 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len256;
61 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len512;
62 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len1024;
63 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len2048;
64 | extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len4096;
65 |
66 | #endif
67 |
--------------------------------------------------------------------------------
/firmware/CMSIS/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 |
--------------------------------------------------------------------------------
/firmware/amazon-freertos/license/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 Amazon Web Services
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/firmware/device/fsl_device_registers.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2016 Freescale Semiconductor, Inc.
3 | * Copyright 2016-2018 NXP
4 | *
5 | * SPDX-License-Identifier: BSD-3-Clause
6 | *
7 | */
8 |
9 | #ifndef __FSL_DEVICE_REGISTERS_H__
10 | #define __FSL_DEVICE_REGISTERS_H__
11 |
12 | /*
13 | * Include the cpu specific register header files.
14 | *
15 | * The CPU macro should be declared in the project or makefile.
16 | */
17 | #if (defined(CPU_MK22FN512CAP12) || defined(CPU_MK22FN512VDC12) || defined(CPU_MK22FN512VFX12) || \
18 | defined(CPU_MK22FN512VLH12) || defined(CPU_MK22FN512VLL12) || defined(CPU_MK22FN512VMP12))
19 |
20 | #define K22F51212_SERIES
21 |
22 | /* CMSIS-style register definitions */
23 | #include "MK22F51212.h"
24 | /* CPU specific feature definitions */
25 | #include "MK22F51212_features.h"
26 |
27 | #else
28 | #error "No valid CPU defined!"
29 | #endif
30 |
31 | #endif /* __FSL_DEVICE_REGISTERS_H__ */
32 |
33 | /*******************************************************************************
34 | * EOF
35 | ******************************************************************************/
36 |
--------------------------------------------------------------------------------
/firmware/drivers/fsl_dmamux.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2015, Freescale Semiconductor, Inc.
3 | * Copyright 2016-2017 NXP
4 | * All rights reserved.
5 | *
6 | * SPDX-License-Identifier: BSD-3-Clause
7 | */
8 |
9 | #include "fsl_dmamux.h"
10 |
11 | /*******************************************************************************
12 | * Definitions
13 | ******************************************************************************/
14 |
15 | /* Component ID definition, used by tools. */
16 | #ifndef FSL_COMPONENT_ID
17 | #define FSL_COMPONENT_ID "platform.drivers.dmamux"
18 | #endif
19 |
20 | /*******************************************************************************
21 | * Prototypes
22 | ******************************************************************************/
23 |
24 | /*!
25 | * @brief Get instance number for DMAMUX.
26 | *
27 | * @param base DMAMUX peripheral base address.
28 | */
29 | static uint32_t DMAMUX_GetInstance(DMAMUX_Type *base);
30 |
31 | /*******************************************************************************
32 | * Variables
33 | ******************************************************************************/
34 |
35 | /*! @brief Array to map DMAMUX instance number to base pointer. */
36 | static DMAMUX_Type *const s_dmamuxBases[] = DMAMUX_BASE_PTRS;
37 |
38 | #if !(defined(FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL) && FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL)
39 | /*! @brief Array to map DMAMUX instance number to clock name. */
40 | static const clock_ip_name_t s_dmamuxClockName[] = DMAMUX_CLOCKS;
41 | #endif /* FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL */
42 |
43 | /*******************************************************************************
44 | * Code
45 | ******************************************************************************/
46 | static uint32_t DMAMUX_GetInstance(DMAMUX_Type *base)
47 | {
48 | uint32_t instance;
49 |
50 | /* Find the instance index from base address mappings. */
51 | for (instance = 0; instance < ARRAY_SIZE(s_dmamuxBases); instance++)
52 | {
53 | if (s_dmamuxBases[instance] == base)
54 | {
55 | break;
56 | }
57 | }
58 |
59 | assert(instance < ARRAY_SIZE(s_dmamuxBases));
60 |
61 | return instance;
62 | }
63 |
64 | /*!
65 | * brief Initializes the DMAMUX peripheral.
66 | *
67 | * This function ungates the DMAMUX clock.
68 | *
69 | * param base DMAMUX peripheral base address.
70 | *
71 | */
72 | void DMAMUX_Init(DMAMUX_Type *base)
73 | {
74 | #if !(defined(FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL) && FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL)
75 | CLOCK_EnableClock(s_dmamuxClockName[DMAMUX_GetInstance(base)]);
76 | #endif /* FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL */
77 | }
78 |
79 | /*!
80 | * brief Deinitializes the DMAMUX peripheral.
81 | *
82 | * This function gates the DMAMUX clock.
83 | *
84 | * param base DMAMUX peripheral base address.
85 | */
86 | void DMAMUX_Deinit(DMAMUX_Type *base)
87 | {
88 | #if !(defined(FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL) && FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL)
89 | CLOCK_DisableClock(s_dmamuxClockName[DMAMUX_GetInstance(base)]);
90 | #endif /* FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL */
91 | }
92 |
--------------------------------------------------------------------------------
/firmware/drivers/fsl_rcm.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2015, Freescale Semiconductor, Inc.
3 | * Copyright 2016-2017 NXP
4 | * All rights reserved.
5 | *
6 | * SPDX-License-Identifier: BSD-3-Clause
7 | */
8 |
9 | #include "fsl_rcm.h"
10 |
11 | /* Component ID definition, used by tools. */
12 | #ifndef FSL_COMPONENT_ID
13 | #define FSL_COMPONENT_ID "platform.drivers.rcm"
14 | #endif
15 |
16 | /*!
17 | * brief Configures the reset pin filter.
18 | *
19 | * This function sets the reset pin filter including the filter source, filter
20 | * width, and so on.
21 | *
22 | * param base RCM peripheral base address.
23 | * param config Pointer to the configuration structure.
24 | */
25 | void RCM_ConfigureResetPinFilter(RCM_Type *base, const rcm_reset_pin_filter_config_t *config)
26 | {
27 | assert(NULL != config);
28 |
29 | #if (defined(FSL_FEATURE_RCM_REG_WIDTH) && (FSL_FEATURE_RCM_REG_WIDTH == 32))
30 | uint32_t reg;
31 |
32 | reg = (((uint32_t)config->enableFilterInStop << RCM_RPC_RSTFLTSS_SHIFT) | (uint32_t)config->filterInRunWait);
33 | if (config->filterInRunWait == kRCM_FilterBusClock)
34 | {
35 | reg |= ((uint32_t)config->busClockFilterCount << RCM_RPC_RSTFLTSEL_SHIFT);
36 | }
37 | base->RPC = reg;
38 | #else
39 | base->RPFC = (((uint8_t)config->enableFilterInStop << RCM_RPFC_RSTFLTSS_SHIFT) | (uint8_t)config->filterInRunWait);
40 | if (config->filterInRunWait == kRCM_FilterBusClock)
41 | {
42 | base->RPFW = config->busClockFilterCount;
43 | }
44 | #endif /* FSL_FEATURE_RCM_REG_WIDTH */
45 | }
46 |
47 | #if (defined(FSL_FEATURE_RCM_HAS_BOOTROM) && FSL_FEATURE_RCM_HAS_BOOTROM)
48 | /*!
49 | * brief Forces the boot from ROM.
50 | *
51 | * This function forces booting from ROM during all subsequent system resets.
52 | *
53 | * param base RCM peripheral base address.
54 | * param config Boot configuration.
55 | */
56 | void RCM_SetForceBootRomSource(RCM_Type *base, rcm_boot_rom_config_t config)
57 | {
58 | uint32_t reg;
59 |
60 | reg = base->FM;
61 | reg &= ~RCM_FM_FORCEROM_MASK;
62 | reg |= ((uint32_t)config << RCM_FM_FORCEROM_SHIFT);
63 | base->FM = reg;
64 | }
65 | #endif /* #if FSL_FEATURE_RCM_HAS_BOOTROM */
66 |
--------------------------------------------------------------------------------
/firmware/include/dmr_codec/codec.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C)2019 Kai Ludwig, DG4KLU
3 | *
4 | * This program is free software; you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation; either version 2 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 | */
18 |
19 | #ifndef _OPENGD77_CODEC_H_
20 | #define _OPENGD77_CODEC_H_
21 |
22 | #include "hardware/HR-C6000.h"
23 |
24 | #include "functions/sound.h"
25 | #include "dmr_codec/mbelib.h"
26 |
27 | #define QUAUX(X) #X
28 | #define QU(X) QUAUX(X)
29 |
30 | #define AMBE_DECODE 0x00054319;
31 | #define AMBE_ENCODE 0x00053E70;
32 | #define AMBE_ENCODE_ECC 0x00054228;
33 |
34 | void codecInit(void);
35 | void codecInitInternalBuffers(void);
36 | void codecDecode(uint8_t *indata_ptr, int numbBlocks);
37 | void codecEncode(uint8_t *outdata_ptr, int numbBlocks);
38 | void codecEncodeBlock(uint8_t *outdata_ptr);
39 |
40 | #endif /* _OPENGD77_CODEC_H_ */
41 |
--------------------------------------------------------------------------------
/firmware/include/dmr_codec/mbelib.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 mbelib Author
3 | * GPG Key ID: 0xEA5EFE2C (9E7A 5527 9CDC EBF7 BF1B D772 4F98 E863 EA5E FE2C)
4 | *
5 | * This program is free software; you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation; either version 2 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program; if not, write to the Free Software
17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 | */
19 |
20 | #ifndef _OPENGD77_MBELIB_H_
21 | #define _OPENGD77_MBELIB_H_
22 |
23 | #include
24 | #include
25 |
26 | void mbe_checkGolayBlock(long int *block);
27 | int mbe_golay2312(char *in, char *out);
28 | int mbe_eccAmbe3600x2450C0(char ambe_fr[4][24]);
29 | int mbe_eccAmbe3600x2450Data(char ambe_fr[4][24], char *ambe_d);
30 | void mbe_demodulateAmbe3600x2450Data(char ambe_fr[4][24]);
31 | void prepare_framedata(uint8_t *indata, char *ambe_d, int *errs, int *errs2);
32 |
33 | #endif /* _OPENGD77_MBELIB_H_ */
34 |
--------------------------------------------------------------------------------
/firmware/include/functions/calibration.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C)2019 Roger Clark. VK3KYY / G4KYF
3 | * and Kai Ludwig, DG4KLU
4 | *
5 | * This program is free software; you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation; either version 2 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program; if not, write to the Free Software
17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 | */
19 | #ifndef _OPENGD77_CALIBRATION_H_
20 | #define _OPENGD77_CALIBRATION_H_
21 |
22 | #include "hardware/SPI_Flash.h"
23 |
24 | typedef enum
25 | {
26 | CalibrationBandUHF,
27 | CalibrationBandVHF,
28 | CalibrationBandMAX
29 | } CalibrationBand_t;
30 |
31 | typedef enum
32 | {
33 | CalibrationSection_DACDATA_SHIFT,
34 | CalibrationSection_TWOPOINT_MOD,
35 | CalibrationSection_Q_MOD2_OFFSET,
36 | CalibrationSection_PHASE_REDUCE,
37 | CalibrationSection_PGA_GAIN,
38 | CalibrationSection_VOICE_GAIN_TX,
39 | CalibrationSection_GAIN_TX,
40 | CalibrationSection_PADRV_IBIT,
41 | CalibrationSection_XMITTER_DEV_WIDEBAND,
42 | CalibrationSection_XMITTER_DEV_NARROWBAND,
43 | CalibrationSection_DEV_TONE,
44 | CalibrationSection_DAC_VGAIN_ANALOG,
45 | CalibrationSection_VOLUME_ANALOG,
46 | CalibrationSection_NOISE1_TH_WIDEBAND,
47 | CalibrationSection_NOISE1_TH_NARROWBAND,
48 | CalibrationSection_NOISE2_TH_WIDEBAND,
49 | CalibrationSection_NOISE2_TH_NARROWBAND,
50 | CalibrationSection_RSSI3_TH_WIDEBAND,
51 | CalibrationSection_RSSI3_TH_NARROWBAND,
52 | CalibrationSection_SQUELCH_TH
53 | } CalibrationSection_t;
54 |
55 | typedef struct
56 | {
57 | uint16_t offset;
58 | uint16_t mod;
59 |
60 | union
61 | {
62 | uint16_t value;
63 | uint8_t bytes[2];
64 | };
65 | } CalibrationDataResult_t;
66 |
67 |
68 | typedef struct calibrationPowerValues
69 | {
70 | uint32_t lowPower;
71 | uint32_t highPower;
72 | } calibrationPowerValues_t;
73 |
74 | typedef struct calibrationRSSIMeter
75 | {
76 | uint8_t minVal;
77 | uint8_t rangeVal;
78 | } calibrationRSSIMeter_t;
79 |
80 | typedef struct deviationToneStruct
81 | {
82 | uint8_t dtmf;
83 | uint8_t tone;
84 | uint8_t ctcss_wide;
85 | uint8_t ctcss_narrow;
86 | uint8_t dcs_wide;
87 | uint8_t dcs_narrow;
88 | } deviationToneStruct_t;
89 |
90 | extern const int MAX_PA_DAC_VALUE;
91 |
92 |
93 | bool calibrationInit(void);
94 | bool calibrationGetSectionData(CalibrationBand_t band, CalibrationSection_t section, CalibrationDataResult_t *o);
95 | void calibrationGetPowerForFrequency(int freq, calibrationPowerValues_t *powerSettings);
96 | bool calibrationGetRSSIMeterParams(calibrationRSSIMeter_t *rssiMeterValues);
97 | bool calibrationCheckAndCopyToCommonLocation(bool forceReload);
98 |
99 | #endif
100 |
--------------------------------------------------------------------------------
/firmware/include/functions/rxPowerSaving.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C)2021 Roger Clark. VK3KYY / G4KYF
3 | */
4 |
5 | #ifndef _ECOLEVELS_H_
6 | #define _ECOLEVELS_H_
7 |
8 | #include
9 | #include
10 | #include "user_interface/menuSystem.h"
11 |
12 | typedef enum
13 | { ECOPHASE_POWERSAVE_INACTIVE = 0,
14 | ECHOPHASE_POWERSAVE_ENTRY,
15 | ECOPHASE_POWERSAVE_ACTIVE___RX_IS_ON,
16 | ECOPHASE_POWERSAVE_ACTIVE___RX_IS_OFF
17 | } ecoPhase_t;
18 |
19 | void rxPowerSavingTick(uiEvent_t *ev, bool hasSignal);
20 | void rxPowerSavingSetLevel(int newLevel);
21 | void rxPowerSavingSetState(ecoPhase_t newState);
22 | bool rxPowerSavingIsRxOn(void);
23 | int rxPowerSavingGetLevel(void);
24 | #endif
25 |
--------------------------------------------------------------------------------
/firmware/include/functions/ticks.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C)2019 Kai Ludwig, DG4KLU
3 | *
4 | * This program is free software; you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation; either version 2 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 | */
18 | #ifndef _OPENGD77_TICKS_H_
19 | #define _OPENGD77_TICKS_H_
20 |
21 | #include
22 | #include
23 | #include
24 |
25 | #include
26 | #include
27 |
28 | typedef void (*timerCallback_t)(void);
29 |
30 | uint32_t fw_millis(void);
31 | bool addTimerCallback(timerCallback_t funPtr, uint32_t delayIn_mS, bool updateExistingCallbackTime);
32 | void handleTimerCallbacks(void);
33 |
34 |
35 | #endif /* _OPENGD77_TICKS_H_ */
36 |
37 |
--------------------------------------------------------------------------------
/firmware/include/functions/vox.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C)2020 Kai Ludwig, DG4KLU
3 | * and Roger Clark, VK3KYY / G4KYF
4 | * and Daniel Caujolle-Bert, F1RMB
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 2 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 | */
20 |
21 | #ifndef _OPENGD77_VOX_H_
22 | #define _OPENGD77_VOX_H_
23 |
24 | #include
25 | #include
26 |
27 | void voxInit(void);
28 | void voxSetParameters(uint8_t threshold, uint8_t tailHalfSecond);
29 | bool voxIsEnabled(void);
30 | bool voxIsTriggered(void);
31 | void voxReset(void);
32 | void voxTick(void);
33 |
34 | #endif /* _OPENGD77_VOX_H_ */
35 |
--------------------------------------------------------------------------------
/firmware/include/hardware/AT1846S.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C)2019 Kai Ludwig, DG4KLU
3 | *
4 | * This program is free software; you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation; either version 2 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 | */
18 |
19 | #ifndef _OPENGD77_AT1846S_H_
20 | #define _OPENGD77_AT1846S_H_
21 |
22 | #include
23 | #include
24 | #include "interfaces/i2c.h"
25 |
26 | #define AT1846_BYTES_PER_COMMAND 3
27 | #define BANDWIDTH_12P5KHZ false
28 | #define BANDWIDTH_25KHZ true
29 |
30 | #define AT1846_VOICE_CHANNEL_NONE 0x00
31 | #define AT1846_VOICE_CHANNEL_TONE1 0x10
32 | #define AT1846_VOICE_CHANNEL_TONE2 0x20
33 | #define AT1846_VOICE_CHANNEL_DTMF 0x30
34 | #define AT1846_VOICE_CHANNEL_MIC 0x40
35 |
36 | void AT1846Init(void);
37 | void AT1846Postinit(void);
38 | void AT1846SetBandwidth(void);
39 | void AT1846SetMode(void);
40 | void AT1846ReadVoxAndMicStrength(void);
41 | void AT1846ReadRSSIAndNoise(void);
42 | int AT1846SetClearReg2byteWithMask(uint8_t reg, uint8_t mask1, uint8_t mask2, uint8_t val1, uint8_t val2);
43 | status_t AT1846SWriteReg2byte(uint8_t reg, uint8_t val1, uint8_t val2);
44 | status_t AT1846SReadReg2byte(uint8_t reg, uint8_t *val1, uint8_t *val2);
45 |
46 | #endif /* _OPENGD77_AT1846S_H_ */
47 |
--------------------------------------------------------------------------------
/firmware/include/hardware/EEPROM.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C)2019 Roger Clark. VK3KYY / G4KYF
3 | *
4 | * This program is free software; you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation; either version 2 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 | */
18 |
19 | #ifndef _OPENGD77_EEPROM_H_
20 | #define _OPENGD77_EEPROM_H_
21 |
22 | #include
23 | #include
24 | #include
25 | #include "interfaces/i2c.h"
26 |
27 | bool EEPROM_Read(int address,uint8_t *buf, int size);
28 | bool EEPROM_Write(int address,uint8_t *buf, int size);
29 |
30 | #endif /* _OPENGD77_EEPROM_H_ */
31 |
--------------------------------------------------------------------------------
/firmware/include/hardware/HR-C6000.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C)2019 Kai Ludwig, DG4KLU
3 | *
4 | * This program is free software; you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation; either version 2 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 | */
18 |
19 | #ifndef _OPENGD77_HR_C6000_H_
20 | #define _OPENGD77_HR_C6000_H_
21 |
22 | #include
23 | #include
24 |
25 | #include "io/keyboard.h"
26 |
27 | #include "interfaces/hr-c6000_spi.h"
28 | #include "usb/usb_com.h"
29 |
30 | #include "dmr_codec/codec.h"
31 |
32 |
33 | #define DMR_FRAME_BUFFER_SIZE 64
34 |
35 | extern const uint8_t TG_CALL_FLAG;
36 | extern const uint8_t PC_CALL_FLAG;
37 | extern volatile int slot_state;
38 | extern volatile uint8_t DMR_frame_buffer[DMR_FRAME_BUFFER_SIZE];
39 | extern volatile bool updateLastHeard;
40 | extern volatile int dmrMonitorCapturedTS;
41 | extern char talkAliasText[33];
42 | extern volatile uint32_t readDMRRSSI;
43 |
44 | enum DMR_SLOT_STATE { DMR_STATE_IDLE, DMR_STATE_RX_1, DMR_STATE_RX_2, DMR_STATE_RX_END,
45 | DMR_STATE_TX_START_1, DMR_STATE_TX_START_2, DMR_STATE_TX_START_3, DMR_STATE_TX_START_4, DMR_STATE_TX_START_5,
46 | DMR_STATE_TX_1, DMR_STATE_TX_2, DMR_STATE_TX_END_1, DMR_STATE_TX_END_2, DMR_STATE_TX_END_3_RMO, DMR_STATE_TX_END_3_DMO,
47 | DMR_STATE_REPEATER_WAKE_1, DMR_STATE_REPEATER_WAKE_2, DMR_STATE_REPEATER_WAKE_3,
48 | DMR_STATE_REPEATER_WAKE_FAIL_1, DMR_STATE_REPEATER_WAKE_FAIL_2 };
49 |
50 | enum WakingMode { WAKING_MODE_NONE, WAKING_MODE_WAITING, WAKING_MODE_FAILED };
51 |
52 | void HRC6000_init(void);
53 | void PORTC_IRQHandler(void);
54 | void init_HR_C6000_interrupts(void);
55 | void init_digital_state(void);
56 | void init_digital_DMR_RX(void);
57 | void reset_timeslot_detection(void);
58 | void init_digital(void);
59 | void terminate_digital(void);
60 | void init_hrc6000_task(void);
61 | void fw_hrc6000_task(void *data);
62 | void tick_HR_C6000(void);
63 |
64 | void clearIsWakingState(void);
65 | int getIsWakingState(void);
66 | void clearActiveDMRID(void);
67 | void setMicGainDMR(uint8_t gain);
68 | bool checkTalkGroupFilter(void);
69 |
70 | int HRC6000GetReceivedTgOrPcId(void);
71 | int HRC6000GetReceivedSrcId(void);
72 | void HRC6000ClearTimecodeSynchronisation(void);
73 | void HRC6000SetCCFilterMode(bool enable);
74 |
75 | #endif /* _OPENGD77_HR_C6000_H_ */
76 |
--------------------------------------------------------------------------------
/firmware/include/hardware/SPI_Flash.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C)2019 Roger Clark. VK3KYY / G4KYF
3 | *
4 | * This program is free software; you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation; either version 2 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 | */
18 |
19 | #ifndef _OPENGD77_SPI_FLASH_H_
20 | #define _OPENGD77_SPI_FLASH_H_
21 |
22 | #include
23 | #include
24 | #include
25 |
26 |
27 | extern uint8_t SPI_Flash_sectorbuffer[4096];
28 |
29 | // Public functions
30 | bool SPI_Flash_init(void);
31 | bool SPI_Flash_read(uint32_t addrress,uint8_t *buf,int size);
32 | bool SPI_Flash_write(uint32_t addr, uint8_t *dataBuf, int size);
33 | bool SPI_Flash_writePage(uint32_t address,uint8_t *dataBuf);// page is 256 bytes
34 | bool SPI_Flash_eraseSector(uint32_t address);// sector is 16 pages = 4k bytes
35 | int SPI_Flash_readManufacturer(void);// Not necessarily Winbond !
36 | int SPI_Flash_readPartID(void);// Should be 4014 for 1M or 4017 for 8M
37 | int SPI_Flash_readStatusRegister(void);// May come in handy
38 |
39 | #endif /* _OPENGD77_SPI_FLASH_H_ */
40 |
--------------------------------------------------------------------------------
/firmware/include/hotspot/BPTC19696.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015,2016 by Jonathan Naylor G4KLX
3 | *
4 | * Ported to OpenGD77 by Roger Clark VK3KYY / G4KYF
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 2 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 | */
20 | #ifndef _OPENGD77_BPTC19696_H_
21 | #define _OPENGD77_BPTC19696_H_
22 |
23 | #include
24 | #include
25 |
26 | void BPTC19696_decode(const unsigned char *in, unsigned char *out);
27 | void BPTC19696_encode(const unsigned char *in, unsigned char *out);
28 | void BPTC19696_init(void);
29 |
30 | #endif
31 |
--------------------------------------------------------------------------------
/firmware/include/hotspot/CRC.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C)2019-2020 Roger Clark. VK3KYY / G4KYF
3 | *
4 | * This program is free software; you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation; either version 2 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 | */
18 | #ifndef _OPENGD77_CRC_H_
19 | #define _OPENGD77_CRC_H_
20 |
21 | #include
22 | #include
23 |
24 | bool CRC_checkFiveBit(bool *in, unsigned int tcrc);
25 | void CRC_encodeFiveBit(const bool *in, unsigned int *tcrc);
26 |
27 | void CRC_addCCITT161(unsigned char *in, unsigned int length);
28 | void CRC_addCCITT162(unsigned char *in, unsigned int length);
29 |
30 | bool CRC_checkCCITT161(const unsigned char *in, unsigned int length);
31 | bool CRC_checkCCITT162(const unsigned char *in, unsigned int length);
32 |
33 | unsigned char CRC_crc8(const unsigned char *in, unsigned int length);
34 |
35 |
36 | #endif
37 |
--------------------------------------------------------------------------------
/firmware/include/hotspot/DMREmbeddedData.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015,2016 by Jonathan Naylor G4KLX
3 | *
4 | * Ported to OpenGD77 by Roger Clark VK3KYY / G4KYF
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 2 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 | */
20 |
21 | #ifndef _OPENGD77_DMREMBEDDED_DATA_H_
22 | #define _OPENGD77_DMREMBEDDED_DATA_H_
23 |
24 | #include "hotspot/DMRLC.h"
25 |
26 | void DMREmbeddedData_setLC(const DMRLC_T *lc);
27 | unsigned char DMREmbeddedData_getData(unsigned char *data, unsigned char n);
28 | void DMREmbeddedData_initEmbeddedDataBuffers(void);
29 | bool DMREmbeddedData_addData(const unsigned char *data, unsigned char lcss);
30 | unsigned char DMREmbeddedData_getData(unsigned char *data, unsigned char n);
31 | bool DMREmbeddedData_getLC(DMRLC_T *lc);
32 | int DMREmbeddedData_getFLCO(void);
33 | bool DMREmbeddedData_getRawData(unsigned char *data);
34 |
35 | #endif
36 |
--------------------------------------------------------------------------------
/firmware/include/hotspot/DMRFullLC.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015,2016 by Jonathan Naylor G4KLX
3 | *
4 | * Ported to OpenGD77 by Roger Clark VK3KYY / G4KYF
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 2 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 | */
20 |
21 | #ifndef _OPENGD77_DMRFULLLC_H_
22 | #define _OPENGD77_DMRFULLLC_H_
23 |
24 | #include "hotspot/dmrDefines.h"
25 | #include "hotspot/DMRLC.h"
26 |
27 | bool DMRFullLC_decode(const unsigned char* data, unsigned char type, DMRLC_T *lc);
28 | bool DMRFullLC_encode(DMRLC_T *lc, unsigned char *data, unsigned char type);
29 |
30 | #endif
31 |
--------------------------------------------------------------------------------
/firmware/include/hotspot/DMRLC.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015,2016 by Jonathan Naylor G4KLX
3 | *
4 | * Ported to OpenGD77 by Roger Clark VK3KYY / G4KYF
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 2 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 | */
20 |
21 | #ifndef _OPENGD77_DMRLC_H_
22 | #define _OPENGD77_DMRLC_H_
23 |
24 | #include "hotspot/dmrDefines.h"
25 |
26 | typedef struct DMRLC
27 | {
28 | bool PF;
29 | bool R;
30 | int FLCO;
31 | uint8_t FID;
32 | uint8_t options;
33 | uint32_t srcId;
34 | uint32_t dstId;
35 | uint8_t rawData[12];
36 | } DMRLC_T;
37 |
38 | void DMRLC3(int flco, unsigned int srcId, unsigned int dstId, DMRLC_T *lc);
39 | void DMRLCfromBytes(const unsigned char *bytes, DMRLC_T *lc);
40 | void DMRLCfromBits(const bool *bits, DMRLC_T *lc);
41 |
42 | void DMRLC_getDataFromBytes(unsigned char *bytes, const DMRLC_T *lc);
43 | void DMRLC_getDataFromBits(bool *bits, const DMRLC_T *lc);
44 |
45 | #endif
46 |
--------------------------------------------------------------------------------
/firmware/include/hotspot/DMRShortLC.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015,2016 by Jonathan Naylor G4KLX
3 | *
4 | * This program is free software; you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation; either version 2 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 | */
18 |
19 | #ifndef _OPENGD77_DMRSHORTLC_H_
20 | #define _OPENGD77_DMRSHORTLC_H_
21 |
22 | #include "hotspot/dmrDefines.h"
23 | #include "hotspot/DMRLC.h"
24 |
25 | bool DMRShortLC_decode(const unsigned char *in, unsigned char *out);
26 | void DMRShortLC_encode(const unsigned char *in, unsigned char *out);
27 |
28 | #endif
29 |
--------------------------------------------------------------------------------
/firmware/include/hotspot/DMRSlotType.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015,2016 by Jonathan Naylor G4KLX
3 | *
4 | * Ported to OpenGD77 by Roger Clark VK3KYY / G4KYF
5 | * Note.
6 | * This file is from MMDVM_HS not MMDVMHost.
7 | * It seems to be a modified version of CDMRSlot in MMDVMHost where external references to the encoding table etc
8 | * have been combined inside this file.
9 | *
10 | * This program is free software; you can redistribute it and/or modify
11 | * it under the terms of the GNU General Public License as published by
12 | * the Free Software Foundation; either version 2 of the License, or
13 | * (at your option) any later version.
14 | *
15 | * This program is distributed in the hope that it will be useful,
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 | * GNU General Public License for more details.
19 | *
20 | * You should have received a copy of the GNU General Public License
21 | * along with this program; if not, write to the Free Software
22 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 | */
24 |
25 | #ifndef _OPENGD77_DMRSLOTTYPE_H_
26 | #define _OPENGD77_DMRSLOTTYPE_H_
27 |
28 | #include
29 | #include
30 |
31 | void DMRSlotType_decode(const uint8_t *frame, uint32_t *colorCode, uint32_t *dataType);
32 | void DMRSlotType_encode(uint32_t colorCode, uint32_t dataType, uint8_t *frame);
33 |
34 | #endif
35 |
--------------------------------------------------------------------------------
/firmware/include/hotspot/Hamming.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015,2016 by Jonathan Naylor G4KLX
3 | *
4 | * Ported to OpenGD77 by Roger Clark VK3KYY / G4KYF
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 2 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 | */
20 | #ifndef _OPENGD77_HAMMING_H_
21 | #define _OPENGD77_HAMMING_H_
22 |
23 | #include
24 | #include
25 |
26 | void Hamming_encode15113_1(bool *d);
27 | bool Hamming_decode15113_1(bool *d);
28 |
29 | void Hamming_encode15113_2(bool *d);
30 | bool Hamming_decode15113_2(bool *d);
31 |
32 | void Hamming_encode1393(bool *d);
33 | bool Hamming_decode1393(bool *d);
34 |
35 | void Hamming_encode1063(bool *d);
36 | bool Hamming_decode1063(bool *d);
37 |
38 | void Hamming_encode16114(bool *d);
39 | bool Hamming_decode16114(bool *d);
40 |
41 | void Hamming_encode17123(bool *d);
42 | bool Hamming_decode17123(bool *d);
43 |
44 | #endif
45 |
--------------------------------------------------------------------------------
/firmware/include/hotspot/QR1676.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015,2016 by Jonathan Naylor G4KLX
3 | *
4 | * Ported to OpenGD77 by Roger Clark VK3KYY / G4KYF
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 2 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 | */
20 | #ifndef _OPENGD77_QR1676_H_
21 | #define _OPENGD77_QR1676_H_
22 |
23 |
24 | void CQR1676_encode(unsigned char *data);
25 | unsigned char CQR1676_decode(const unsigned char *data);
26 |
27 | #endif
28 |
--------------------------------------------------------------------------------
/firmware/include/hotspot/RS129.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015,2016 by Jonathan Naylor G4KLX
3 | *
4 | * Ported to OpenGD77 by Roger Clark VK3KYY / G4KYF
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 2 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 | */
20 | #ifndef _OPENGD77_RS129_H_
21 | #define _OPENGD77_RS129_H_
22 |
23 | #include
24 | #include
25 |
26 | bool RS129_check(const unsigned char *in);
27 | void RS129_encode(const unsigned char *msg, unsigned int nbytes, unsigned char *parity);
28 |
29 | #endif
30 |
--------------------------------------------------------------------------------
/firmware/include/hotspot/dmrUtils.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015,2016 by Jonathan Naylor G4KLX
3 | *
4 | * Ported to OpenGD77 by Roger Clark VK3KYY / G4KYF
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 2 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 | */
20 | #ifndef _OPENGD77_DMRUTILS_H_
21 | #define _OPENGD77_DMRUTILS_H_
22 |
23 | #include
24 | #include
25 |
26 | void dmrUtils_byteToBitsBE(unsigned char byte, bool *bits);
27 | void dmrUtils_byteToBitsLE(unsigned char byte, bool *bits);
28 |
29 | void dmrUtils_bitsToByteBE(const bool *bits, uint8_t *out);
30 | void dmrUtils_bitsToByteLE(const bool *bits, uint8_t *out);
31 |
32 | unsigned int dmrUtils_compare(const unsigned char *bytes1, const unsigned char *bytes2, unsigned int length);
33 |
34 | #endif
35 |
--------------------------------------------------------------------------------
/firmware/include/hotspot/uiHotspot.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C)2019 Roger Clark. VK3KYY / G4KYF
3 | *
4 | * This program is free software; you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation; either version 2 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 | */
18 | #ifndef _OPENGD77_HOTSPOT_H_
19 | #define _OPENGD77_HOTSPOT_H_
20 |
21 | #include "main.h"
22 |
23 | void hotspotRxFrameHandler(uint8_t *frameBuf);
24 |
25 | enum HOTSPOT_RX_STATE { HOTSPOT_RX_IDLE, HOTSPOT_RX_START, HOTSPOT_RX_START_LATE, HOTSPOT_RX_AUDIO_FRAME,
26 | HOTSPOT_RX_STOP, HOTSPOT_RX_IDLE_OR_REPEAT, HOTSPOT_RX_UNKNOWN };
27 |
28 | #endif
29 |
--------------------------------------------------------------------------------
/firmware/include/interfaces/adc.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C)2019 Kai Ludwig, DG4KLU
3 | *
4 | * This program is free software; you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation; either version 2 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 | */
18 |
19 | #ifndef _OPENGD77_ADC_H_
20 | #define _OPENGD77_ADC_H_
21 |
22 | #include
23 | #include
24 | #include "fsl_adc16.h"
25 |
26 | #define NO_ADC_CHANNEL_OVERRIDE 0
27 |
28 | extern const int CUTOFF_VOLTAGE_UPPER_HYST;
29 | extern const int CUTOFF_VOLTAGE_LOWER_HYST;
30 | extern const int BATTERY_MAX_VOLTAGE;
31 | extern const int TEMPERATURE_DECIMAL_RESOLUTION;
32 |
33 | void adcTriggerConversion(int channelOverride);
34 | void adcInit(void);
35 | void ADC0_IRQHandler(void);
36 | int adcGetBatteryVoltage(void);
37 | int getVOX(void);
38 | int getTemperature(void);
39 |
40 |
41 | #endif /* _OPENGD77_ADC_H_ */
42 |
--------------------------------------------------------------------------------
/firmware/include/interfaces/dac.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C)2019 Kai Ludwig, DG4KLU
3 | *
4 | * This program is free software; you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation; either version 2 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 | */
18 |
19 | #ifndef _OPENGD77_DAC_H_
20 | #define _OPENGD77_DAC_H_
21 |
22 | #include "fsl_dac.h"
23 |
24 | void dac_init(void);
25 |
26 | #endif /* _OPENGD77_DAC_H_ */
27 |
--------------------------------------------------------------------------------
/firmware/include/interfaces/interrupts.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C)2019-2020 Roger Clark. VK3KYY / G4KYF
3 | *
4 | * This program is free software; you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation; either version 2 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 | */
18 | #ifndef _OPENGD77_INTERRUPTS_H_
19 | #define _OPENGD77_INTERRUPTS_H_
20 |
21 | #include
22 | #include "interfaces/gpio.h"
23 |
24 |
25 | void interruptsInitC6000Interface(void);
26 | bool interruptsWasPinTriggered(PORT_Type *port, uint32_t pin);
27 | bool interruptsClearPinFlags(PORT_Type *port, uint32_t pin);
28 |
29 | #endif
30 |
--------------------------------------------------------------------------------
/firmware/include/interfaces/pit.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C)2019 Kai Ludwig, DG4KLU
3 | *
4 | * This program is free software; you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation; either version 2 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 | */
18 |
19 | #ifndef _OPENGD77_PIT_H_
20 | #define _OPENGD77_PIT_H_
21 |
22 | #include
23 | #include
24 |
25 | #include "fsl_pit.h"
26 |
27 | extern volatile uint32_t timer_maintask;
28 | extern volatile uint32_t timer_beeptask;
29 | extern volatile uint32_t timer_hrc6000task;
30 | extern volatile uint32_t timer_watchdogtask;
31 | extern volatile uint32_t timer_keypad;
32 | extern volatile uint32_t timer_keypad_timeout;
33 | extern volatile uint32_t PITCounter;
34 |
35 | // For long press handling
36 | extern volatile uint32_t timer_mbuttons[3];
37 |
38 | void init_pit(void);
39 | void PIT0_IRQHandler(void);
40 |
41 | #endif /* _OPENGD77_PIT_H_ */
42 |
--------------------------------------------------------------------------------
/firmware/include/interfaces/wdog.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C)2019 Kai Ludwig, DG4KLU
3 | *
4 | * This program is free software; you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation; either version 2 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 | */
18 |
19 | #ifndef _OPENGD77_WDOG_H_
20 | #define _OPENGD77_WDOG_H_
21 |
22 | #include "fsl_wdog.h"
23 |
24 | #include "interfaces/adc.h"
25 |
26 | typedef void (*batteryHistoryCallback_t)(int32_t);
27 |
28 | extern volatile bool alive_maintask;
29 | extern volatile bool alive_beeptask;
30 | extern volatile bool alive_hrc6000task;
31 |
32 | extern int batteryVoltage;
33 | extern float averageBatteryVoltage;
34 | extern bool headerRowIsDirty;
35 |
36 | void watchdogInit(batteryHistoryCallback_t cb);
37 | void watchdogReboot(void);
38 | void watchdogDeinit(void);
39 |
40 | #endif /* _OPENGD77_WDOG_H_ */
41 |
--------------------------------------------------------------------------------
/firmware/include/io/LEDs.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C)2019 Kai Ludwig, DG4KLU
3 | *
4 | * This program is free software; you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation; either version 2 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 | */
18 |
19 | #ifndef _OPENGD77_LEDS_H_
20 | #define _OPENGD77_LEDS_H_
21 |
22 | #include
23 | #include
24 | #include "functions/settings.h"
25 |
26 | #if ! defined(PLATFORM_GD77S)
27 | extern uint8_t LEDsState[2];
28 | #endif
29 |
30 | void LEDsInit(void);
31 |
32 | #if defined(PLATFORM_RD5R)
33 | void torchToggle(void);
34 | #endif
35 |
36 |
37 | static inline void LEDs_PinWrite(GPIO_Type *base, uint32_t pin, uint8_t output)
38 | {
39 | #if ! defined(PLATFORM_GD77S)
40 | LEDsState[(base == GPIO_LEDred) ? 0 : 1] = output;
41 |
42 | if ((nonVolatileSettings.bitfieldOptions & BIT_ALL_LEDS_DISABLED) == 0)
43 | #endif
44 | {
45 | GPIO_PinWrite(base, pin, output);
46 | }
47 | }
48 |
49 | static inline uint32_t LEDs_PinRead(GPIO_Type *base, uint32_t pin)
50 | {
51 | #if ! defined(PLATFORM_GD77S)
52 | if (nonVolatileSettings.bitfieldOptions & BIT_ALL_LEDS_DISABLED)
53 | {
54 | return LEDsState[(base == GPIO_LEDred) ? 0 : 1];
55 | }
56 | #endif
57 | return GPIO_PinRead(base, pin);
58 | }
59 |
60 |
61 |
62 | #endif /* _OPENGD77_LEDS_H_ */
63 |
--------------------------------------------------------------------------------
/firmware/include/io/buttons.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C)2019 Kai Ludwig, DG4KLU
3 | *
4 | * This program is free software; you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation; either version 2 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 | */
18 |
19 | #ifndef _OPENGD77_BUTTONS_H_
20 | #define _OPENGD77_BUTTONS_H_
21 |
22 | #include "interfaces/gpio.h"
23 |
24 |
25 | #define BUTTON_NONE 0x00000000
26 | #define BUTTON_PTT 0x00000001
27 | #define BUTTON_SK1 0x00000002
28 | #define BUTTON_SK1_SHORT_UP 0x00000004
29 | #define BUTTON_SK1_LONG_DOWN 0x00000008
30 | #define BUTTON_SK1_EXTRA_LONG_DOWN 0x00000010
31 | #define BUTTON_SK2 0x00000020
32 | #define BUTTON_SK2_SHORT_UP 0x00000040
33 | #define BUTTON_SK2_LONG_DOWN 0x00000080
34 | #define BUTTON_SK2_EXTRA_LONG_DOWN 0x00000100
35 | #if ! defined(PLATFORM_RD5R)
36 | #define BUTTON_ORANGE 0x00000200
37 | #define BUTTON_ORANGE_SHORT_UP 0x00000400
38 | #define BUTTON_ORANGE_LONG_DOWN 0x00000800
39 | #define BUTTON_ORANGE_EXTRA_LONG_DOWN 0x00001000
40 | #endif // ! PLATFORM_RD5R
41 | #define BUTTON_WAIT_NEW_STATE 0x00002000
42 |
43 | #define EVENT_BUTTON_NONE 0
44 | #define EVENT_BUTTON_CHANGE 1
45 |
46 | extern volatile bool PTTLocked;
47 |
48 | void buttonsInit(void);
49 | uint32_t buttonsRead(void);
50 | void buttonsCheckButtonsEvent(uint32_t *buttons, int *event, bool keyIsDown);
51 |
52 | #endif /* _OPENGD77_BUTTONS_H_ */
53 |
--------------------------------------------------------------------------------
/firmware/include/io/display.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C)2019 Kai Ludwig, DG4KLU
3 | *
4 | * PWM modifications by Roger Clark VK3KYY / G4KYF
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 2 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 | */
20 |
21 | #ifndef _OPENGD77_DISPLAY_H_
22 | #define _OPENGD77_DISPLAY_H_
23 |
24 | #include
25 |
26 | void displayInit(bool isInverseColour);
27 | void displayEnableBacklight(bool enable);
28 | bool displayIsBacklightLit(void);
29 |
30 | #endif /* _OPENGD77_DISPLAY_H_ */
31 |
--------------------------------------------------------------------------------
/firmware/include/io/rotary_switch.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C)2020 Kai Ludwig, DG4KLU
3 | * and Roger Clark, VK3KYY / G4KYF
4 | * and Daniel Caujolle-Bert, F1RMB
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 2 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 | */
20 | #ifndef _OPENGD77_ROTARY_SWITCH_H_
21 | #define _OPENGD77_ROTARY_SWITCH_H_
22 |
23 | #include "interfaces/gpio.h"
24 |
25 |
26 | void rotarySwitchInit(void);
27 | uint8_t rotarySwitchGetPosition(void);
28 | void rotarySwitchCheckRotaryEvent(uint32_t *position, int *event);
29 |
30 | #define EVENT_ROTARY_NONE 0
31 | #define EVENT_ROTARY_CHANGE 1
32 |
33 | #endif // _OPENGD77_ROTARY_SWITCH_H_
34 |
--------------------------------------------------------------------------------
/firmware/include/main.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C)2019 Kai Ludwig, DG4KLU
3 | *
4 | * This program is free software; you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation; either version 2 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 | */
18 |
19 | #ifndef _OPENGD77_MAIN_H_
20 | #define _OPENGD77_MAIN_H_
21 |
22 | #include
23 | #include
24 |
25 | #include
26 | #include
27 |
28 | #include "utils.h"
29 |
30 | #include "virtual_com.h"
31 | #include "usb_com.h"
32 |
33 | #include "io/buttons.h"
34 | #include "io/LEDs.h"
35 | #include "io/keyboard.h"
36 | #include "io/rotary_switch.h"
37 | #include "io/display.h"
38 | #include "functions/vox.h"
39 |
40 | #include "hardware/UC1701.h"
41 |
42 | #include "interfaces/i2c.h"
43 | #include "interfaces/hr-c6000_spi.h"
44 | #include "interfaces/i2s.h"
45 | #include "hardware/AT1846S.h"
46 | #include "hardware/HR-C6000.h"
47 | #include "interfaces/wdog.h"
48 | #include "interfaces/adc.h"
49 | #include "interfaces/dac.h"
50 | #include "interfaces/pit.h"
51 |
52 | #include "functions/sound.h"
53 | #include "functions/trx.h"
54 | #include "hardware/SPI_Flash.h"
55 | #include "hardware/EEPROM.h"
56 |
57 |
58 | void mainTaskInit(void);
59 | void powerOffFinalStage(void);
60 |
61 | #endif /* _OPENGD77_MAIN_H_ */
62 |
--------------------------------------------------------------------------------
/firmware/include/usb/usb_com.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C)2019 Kai Ludwig, DG4KLU
3 | *
4 | * This program is free software; you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation; either version 2 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 | */
18 |
19 | #ifndef _OPENGD77_USB_COM_H_
20 | #define _OPENGD77_USB_COM_H_
21 |
22 | #include
23 | #include
24 | #include "virtual_com.h"
25 | #include "main.h"
26 |
27 |
28 | #define COM_BUFFER_SIZE (512 * 2)
29 | #define COM_REQUESTBUFFER_SIZE 64
30 |
31 | extern volatile uint8_t com_buffer[COM_BUFFER_SIZE];
32 | extern int com_buffer_write_idx;
33 | extern int com_buffer_read_idx;
34 | extern volatile int com_buffer_cnt;
35 |
36 | extern volatile int com_request;
37 | extern volatile uint8_t com_requestbuffer[COM_REQUESTBUFFER_SIZE];
38 | extern USB_DMA_NONINIT_DATA_ALIGN(USB_DATA_ALIGN_SIZE) uint8_t usbComSendBuf[COM_BUFFER_SIZE];
39 |
40 | void tick_com_request(void);
41 | void send_packet(uint8_t val_0x82, uint8_t val_0x86, int ram);
42 | void send_packet_big(uint8_t val_0x82, uint8_t val_0x86, int ram1, int ram2);
43 | void add_to_commbuffer(uint8_t value);
44 | void USB_DEBUG_PRINT(char *str);
45 | void USB_DEBUG_printf(const char *format, ...);
46 |
47 | #endif /* _OPENGD77_USB_COM_H_ */
48 |
--------------------------------------------------------------------------------
/firmware/include/user_interface/languages/catalan.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/firmware/include/user_interface/languages/catalan.h
--------------------------------------------------------------------------------
/firmware/include/user_interface/languages/czech.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/firmware/include/user_interface/languages/czech.h
--------------------------------------------------------------------------------
/firmware/include/user_interface/languages/danish.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/firmware/include/user_interface/languages/danish.h
--------------------------------------------------------------------------------
/firmware/include/user_interface/languages/dutch.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/firmware/include/user_interface/languages/dutch.h
--------------------------------------------------------------------------------
/firmware/include/user_interface/languages/english.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/firmware/include/user_interface/languages/english.h
--------------------------------------------------------------------------------
/firmware/include/user_interface/languages/finnish.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/firmware/include/user_interface/languages/finnish.h
--------------------------------------------------------------------------------
/firmware/include/user_interface/languages/french.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/firmware/include/user_interface/languages/french.h
--------------------------------------------------------------------------------
/firmware/include/user_interface/languages/german.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/firmware/include/user_interface/languages/german.h
--------------------------------------------------------------------------------
/firmware/include/user_interface/languages/italian.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/firmware/include/user_interface/languages/italian.h
--------------------------------------------------------------------------------
/firmware/include/user_interface/languages/japanese.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/firmware/include/user_interface/languages/japanese.h
--------------------------------------------------------------------------------
/firmware/include/user_interface/languages/polish.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/firmware/include/user_interface/languages/polish.h
--------------------------------------------------------------------------------
/firmware/include/user_interface/languages/portugues_brazil.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/firmware/include/user_interface/languages/portugues_brazil.h
--------------------------------------------------------------------------------
/firmware/include/user_interface/languages/portuguese.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/firmware/include/user_interface/languages/portuguese.h
--------------------------------------------------------------------------------
/firmware/include/user_interface/languages/slovenian.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/firmware/include/user_interface/languages/slovenian.h
--------------------------------------------------------------------------------
/firmware/include/user_interface/languages/spanish.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/firmware/include/user_interface/languages/spanish.h
--------------------------------------------------------------------------------
/firmware/include/user_interface/languages/turkish.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/firmware/include/user_interface/languages/turkish.h
--------------------------------------------------------------------------------
/firmware/include/utils.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019-2020 Roger Clark. VK3KYY / G4KYF
3 | *
4 | * This program is free software; you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation; either version 2 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 | */
18 |
19 | #ifndef _OPENGD77_UTILS_H_
20 | #define _OPENGD77_UTILS_H_
21 |
22 | #if !defined(CLAMP)
23 | #define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
24 | #endif
25 |
26 | #if !defined(SAFE_MIN)
27 | #define SAFE_MIN(a, b) ({ typeof (a) _a = (a); typeof (b) _b = (b); _a < _b ? _a : _b; })
28 | #endif
29 |
30 | #if !defined(SAFE_MAX)
31 | #define SAFE_MAX(a, b) ({ typeof (a) _a = (a); typeof (b) _b = (b); _a > _b ? _a : _b; })
32 | #endif
33 |
34 | #if !defined(SAFE_SWAP)
35 | #define SAFE_SWAP(a, b) ({ typeof (a) _a = a; a = b; b = _a; })
36 | #endif
37 |
38 | #endif
39 |
--------------------------------------------------------------------------------
/firmware/linkerdata/codec_dat_files_creator.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/firmware/linkerdata/codec_dat_files_creator.exe
--------------------------------------------------------------------------------
/firmware/linkerdata/disclaimer.txt:
--------------------------------------------------------------------------------
1 | /*
2 | * File extractor to create supplemental data (*.dat files) needed for building the custom GD-77 firmware.
3 | *
4 | * Copyright (C)2019 Roger Clark. VK3KYY
5 | *
6 | * GD-77 firmware decrypter/encrypter by DG4KLU.
7 | *
8 | * Redistribution and use in source and binary forms, with or without
9 | * modification, are permitted provided that the following conditions are met:
10 | *
11 | * 1. Redistributions of source code must retain the above copyright notice,
12 | * this list of conditions and the following disclaimer.
13 | * 2. 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 | * 3. The name of the author may not be used to endorse or promote products
17 | * derived from this software without specific prior written permission.
18 | *
19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
20 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
22 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | */
30 |
--------------------------------------------------------------------------------
/firmware/linkerdata/readme.txt:
--------------------------------------------------------------------------------
1 | To avoid potential copyright issues, the codec binary files are not included in this repository.
2 | Before building the project you must run the codec_dat_files_creator.exe which will download, decrypt and install these files.
--------------------------------------------------------------------------------
/firmware/linkerscripts/firmware_library.ld:
--------------------------------------------------------------------------------
1 | /*
2 | * Generated Linker script file for MK22FN512xxx12
3 | */
4 |
5 | GROUP (
6 | "libcr_semihost_nf.a"
7 | "libcr_c.a"
8 | "libcr_eabihelpers.a"
9 | "libgcc.a"
10 | )
11 |
--------------------------------------------------------------------------------
/firmware/linkerscripts/firmware_library_newlib.ld:
--------------------------------------------------------------------------------
1 | /*
2 | * Generated Linker script file for MK22FN512xxx12
3 | */
4 |
5 | GROUP (
6 | "libgcc.a"
7 | "libnosys.a"
8 | "libc_nano.a"
9 | "libm.a"
10 | )
11 |
--------------------------------------------------------------------------------
/firmware/linkerscripts/firmware_memory.ld:
--------------------------------------------------------------------------------
1 | /*
2 | * Generated Linker script file for MK22FN512xxx12
3 | */
4 |
5 | MEMORY
6 | {
7 | /* Define each memory region */
8 | PROGRAM_FLASH (rx) : ORIGIN = 0x4000, LENGTH = 0x7B800 /* 0x00004000-0x007f7ff (alias Flash) */
9 | SRAM_UPPER (rwx) : ORIGIN = 0x20000000, LENGTH = 0x10000 /* 64K bytes (alias RAM) */
10 | /* SRAM_LOWER_BOTTOM (rwx) : ORIGIN = 0x1fff0000, LENGTH = 0x6b60 */ /* (alias RAM2_BOTTOM) */
11 | /* SRAM_LOWER_AMBE (rwx) : ORIGIN = 0x1fff6b60, LENGTH = 0x2228 */ /* (alias RAM2_AMBE) */
12 | /* SRAM_LOWER_TOP (rwx) : ORIGIN = 0x1fff8d88, LENGTH = 0x7278 */ /* (alias RAM2_TOP) */
13 | SRAM_LOWER (rwx) : ORIGIN = 0x1fff0000, LENGTH = 0x10000 /* (alias RAM2) */
14 | }
15 |
16 | /* Define a symbol for the top of each memory region */
17 | __base_PROGRAM_FLASH = 0x4000 ; /* PROGRAM_FLASH */
18 | __base_Flash = 0x4000 ; /* Flash */
19 | __top_PROGRAM_FLASH = 0x4000 + 0x7B800 ; /* leave out bootloader and CPU-UUID area*/
20 | __top_Flash = 0x4000 + 0x7B800 ; /* leave out bootloader and CPU-UUID area*/
21 | __base_SRAM_UPPER = 0x20000000 ; /* SRAM_UPPER */
22 | __base_RAM = 0x20000000 ; /* RAM */
23 | __top_SRAM_UPPER = 0x20000000 + 0x10000 ; /* 64K bytes */
24 | __top_RAM = 0x20000000 + 0x10000 ; /* 64K bytes */
25 |
26 | __base_SRAM_LOWER = 0x1fff0000 ; /* SRAM_LOWER */
27 | __base_RAM2 = 0x1fff0000 ; /* RAM2 */
28 | __top_SRAM_LOWER = 0x1fff0000 + 0x10000 ; /* 64K bytes */
29 | __top_RAM2 = 0x1fff0000 + 0x10000 ; /* 64K bytes */
30 |
--------------------------------------------------------------------------------
/firmware/readme.md:
--------------------------------------------------------------------------------
1 | This software is licenced under the GPL v2 and is intended for amateur and educational use only.
2 |
3 | Use of this software for commercial purposes is strictly forbidden.
4 |
5 | -----------------------------------------
6 |
7 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
8 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
9 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
10 | EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
12 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
13 | OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
14 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
15 | OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
16 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17 |
--------------------------------------------------------------------------------
/firmware/source/SeggerRTT/License.txt:
--------------------------------------------------------------------------------
1 | Important - Read carefully:
2 |
3 | SEGGER RTT - Real Time Transfer for embedded targets
4 |
5 | All rights reserved.
6 |
7 | SEGGER strongly recommends to not make any changes
8 | to or modify the source code of this software in order to stay
9 | compatible with the RTT protocol and J-Link.
10 |
11 | Redistribution and use in source and binary forms, with or
12 | without modification, are permitted provided that the following
13 | conditions are met:
14 |
15 | o Redistributions of source code must retain the above copyright
16 | notice, this list of conditions and the following disclaimer.
17 |
18 | o Redistributions in binary form must reproduce the above
19 | copyright notice, this list of conditions and the following
20 | disclaimer in the documentation and/or other materials provided
21 | with the distribution.
22 |
23 | o Neither the name of SEGGER Microcontroller GmbH & Co. KG
24 | nor the names of its contributors may be used to endorse or
25 | promote products derived from this software without specific
26 | prior written permission.
27 |
28 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
29 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
30 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
31 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
32 | DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR
33 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
34 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
35 | OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
36 | OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
37 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
38 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
39 | USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
40 | DAMAGE.
41 |
42 |
43 | (c) 2014 - 2016 SEGGER Microcontroller GmbH & Co. KG
44 | www.segger.com
45 |
--------------------------------------------------------------------------------
/firmware/source/SeggerRTT/README.txt:
--------------------------------------------------------------------------------
1 | README.txt for the SEGGER RTT Implementation Pack.
2 |
3 | Included files:
4 | ===============
5 | Root Directory
6 | - Examples
7 | - Main_RTT_InputEchoApp.c - Sample application which echoes input on Channel 0.
8 | - Main_RTT_MenuApp.c - Sample application to demonstrate RTT bi-directional functionality.
9 | - Main_RTT_PrintfTest.c - Sample application to test RTT small printf implementation.
10 | - Main_RTT_SpeedTestApp.c - Sample application for measuring RTT performance. embOS needed.
11 | - RTT
12 | - SEGGER_RTT.c - The RTT implementation.
13 | - SEGGER_RTT.h - Header for RTT implementation.
14 | - SEGGER_RTT_Conf.h - Pre-processor configuration for the RTT implementation.
15 | - SEGGER_RTT_Printf.c - Simple implementation of printf to write formatted strings via RTT.
16 | - Syscalls
17 | - RTT_Syscalls_GCC.c - Low-level syscalls to retarget printf() to RTT with GCC / Newlib.
18 | - RTT_Syscalls_IAR.c - Low-level syscalls to retarget printf() to RTT with IAR compiler.
19 | - RTT_Syscalls_KEIL.c - Low-level syscalls to retarget printf() to RTT with KEIL/uVision compiler.
20 | - RTT_Syscalls_SES.c - Low-level syscalls to retarget printf() to RTT with SEGGER Embedded Studio.
21 |
--------------------------------------------------------------------------------
/firmware/source/dmr_codec/codec_bin.S:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C)2019 Kai Ludwig, DG4KLU
3 | *
4 | * This program is free software; you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation; either version 2 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 | */
18 | .section .codec_bin_section_1
19 | .incbin "../linkerdata/codec_bin_section_1.bin"
20 |
21 | .section .codec_bin_section_2
22 | .incbin "../linkerdata/codec_bin_section_2.bin"
23 |
--------------------------------------------------------------------------------
/firmware/source/firmware.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C)2019 Kai Ludwig, DG4KLU
3 | *
4 | * This program is free software; you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation; either version 2 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 | */
18 |
19 | /**
20 | * @file firmware.c
21 | * @brief Application entry point.
22 | */
23 | #include
24 | #include
25 | #include "clock_config.h"
26 | #include "MK22F51212.h"
27 |
28 |
29 | /*
30 | * @brief Application entry point.
31 | */
32 |
33 | int main(void) {
34 | SCB->VTOR = 0x4000;
35 |
36 | BOARD_BootClockHSRUN();// Start in High Speed Run mode (118Mhz)
37 | // BOARD_BootClockRUN();// Use lower speeds. See clock_config.c mcgConfig_BOARD_BootClockRUN
38 |
39 | mainTaskInit();
40 |
41 | return 0;
42 | }
43 |
--------------------------------------------------------------------------------
/firmware/source/functions/ticks.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C)2019 Kai Ludwig, DG4KLU
3 | *
4 | * This program is free software; you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation; either version 2 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 | */
18 |
19 | #include
20 | #include "functions/ticks.h"
21 |
22 | #define PIT_COUNTS_PER_MS 10U
23 |
24 | extern volatile uint32_t PITCounter;
25 | typedef struct
26 | {
27 | timerCallback_t funPtr;
28 | uint32_t PIT_TriggerTime;
29 | } timerCallbackbackStruct_t;
30 |
31 | #define MAX_NUM_TIMER_CALLBACKS 8
32 | timerCallbackbackStruct_t callbacksArray[MAX_NUM_TIMER_CALLBACKS];// As a global this will get cleared by the compiler
33 |
34 | uint32_t fw_millis(void)
35 | {
36 | return (PITCounter / PIT_COUNTS_PER_MS);
37 | }
38 |
39 | void handleTimerCallbacks(void)
40 | {
41 | int i = 0;
42 |
43 | while((callbacksArray[i].funPtr != NULL) && (i < MAX_NUM_TIMER_CALLBACKS))
44 | {
45 | if (PITCounter > callbacksArray[i].PIT_TriggerTime)
46 | {
47 | callbacksArray[i].funPtr();// call the function
48 | memmove(&callbacksArray[i], &callbacksArray[i + 1], ((MAX_NUM_TIMER_CALLBACKS - 1) - i) * sizeof(timerCallbackbackStruct_t));
49 | callbacksArray[MAX_NUM_TIMER_CALLBACKS - 1].funPtr = NULL;
50 | }
51 | else
52 | {
53 | i++;
54 | }
55 | }
56 | }
57 |
58 | bool addTimerCallback(timerCallback_t funPtr, uint32_t delayIn_mS, bool updateExistingCallbackTime)
59 | {
60 | uint32_t callBackTime = PITCounter + (delayIn_mS * PIT_COUNTS_PER_MS);
61 |
62 | for(int i = 0; i < MAX_NUM_TIMER_CALLBACKS; i++)
63 | {
64 | if (callbacksArray[i].funPtr == NULL)
65 | {
66 | callbacksArray[i].funPtr = funPtr;
67 | callbacksArray[i].PIT_TriggerTime = callBackTime;
68 | return true;
69 | }
70 |
71 | if ((callbacksArray[i].funPtr == funPtr) && updateExistingCallbackTime)
72 | {
73 | callbacksArray[i].PIT_TriggerTime = callBackTime;
74 | return true;
75 | }
76 |
77 | // callbacksArray[i] must be non-null pointer
78 | if (callbacksArray[i].PIT_TriggerTime > callBackTime)
79 | {
80 | if (i != (MAX_NUM_TIMER_CALLBACKS - 1))
81 | {
82 | // shuffle all other callbacks down in the list if there is space
83 | memmove(&callbacksArray[i+1], &callbacksArray[i], ((MAX_NUM_TIMER_CALLBACKS - 1) - i) * sizeof(timerCallbackbackStruct_t));
84 | }
85 | callbacksArray[i].funPtr = funPtr;
86 | callbacksArray[i].PIT_TriggerTime = callBackTime;
87 | return true;
88 | }
89 | }
90 | return false;
91 | }
92 |
--------------------------------------------------------------------------------
/firmware/source/hotspot/DMRFullLC.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 by Ian Wraith
3 | * Copyright (C) 2015,2016 by Jonathan Naylor G4KLX
4 | *
5 | * Ported to OpenGD77 by Roger Clark VK3KYY / G4KYF
6 | *
7 | * This program is free software; you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation; either version 2 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU General Public License
18 | * along with this program; if not, write to the Free Software
19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 | */
21 | #include "hotspot/BPTC19696.h"
22 | #include "hotspot/dmrDefines.h"
23 | #include "hotspot/dmrUtils.h"
24 | #include "hotspot/DMRFullLC.h"
25 | #include "hotspot/RS129.h"
26 |
27 |
28 | bool DMRFullLC_decode(const unsigned char *data, unsigned char type, DMRLC_T *lc)
29 | {
30 | //unsigned char lcData[12U];
31 |
32 | BPTC19696_init();
33 | BPTC19696_decode(data, lc->rawData);
34 |
35 | switch (type)
36 | {
37 | case DT_VOICE_LC_HEADER:
38 | lc->rawData[9U] ^= VOICE_LC_HEADER_CRC_MASK[0U];
39 | lc->rawData[10U] ^= VOICE_LC_HEADER_CRC_MASK[1U];
40 | lc->rawData[11U] ^= VOICE_LC_HEADER_CRC_MASK[2U];
41 | break;
42 |
43 | case DT_TERMINATOR_WITH_LC:
44 | lc->rawData[9U] ^= TERMINATOR_WITH_LC_CRC_MASK[0U];
45 | lc->rawData[10U] ^= TERMINATOR_WITH_LC_CRC_MASK[1U];
46 | lc->rawData[11U] ^= TERMINATOR_WITH_LC_CRC_MASK[2U];
47 | break;
48 |
49 | default:
50 | return false;// unsupported frame type
51 | }
52 |
53 | if (!RS129_check(lc->rawData))
54 | {
55 | return false;
56 | }
57 |
58 | DMRLCfromBytes(lc->rawData, lc);//
59 |
60 | return true;
61 | }
62 |
63 | bool DMRFullLC_encode(DMRLC_T *lc, unsigned char *data, unsigned char type)
64 | {
65 | unsigned char lcData[12U];
66 |
67 | DMRLC_getDataFromBytes(lcData, lc);
68 |
69 | unsigned char parity[4U];
70 | RS129_encode(lcData, 9U, parity);
71 |
72 | switch (type)
73 | {
74 | case DT_VOICE_LC_HEADER:
75 | lcData[9U] = parity[2U] ^ VOICE_LC_HEADER_CRC_MASK[0U];
76 | lcData[10U] = parity[1U] ^ VOICE_LC_HEADER_CRC_MASK[1U];
77 | lcData[11U] = parity[0U] ^ VOICE_LC_HEADER_CRC_MASK[2U];
78 | break;
79 |
80 | case DT_TERMINATOR_WITH_LC:
81 | lcData[9U] = parity[2U] ^ TERMINATOR_WITH_LC_CRC_MASK[0U];
82 | lcData[10U] = parity[1U] ^ TERMINATOR_WITH_LC_CRC_MASK[1U];
83 | lcData[11U] = parity[0U] ^ TERMINATOR_WITH_LC_CRC_MASK[2U];
84 | break;
85 |
86 | default:
87 | return false;
88 | }
89 |
90 | BPTC19696_init();
91 | BPTC19696_encode(lcData,data);
92 |
93 | return true;
94 | }
95 |
--------------------------------------------------------------------------------
/firmware/source/hotspot/dmrUtils.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009,2014,2015,2016 Jonathan Naylor, G4KLX
3 | *
4 | * Ported to OpenGD77 by Roger Clark VK3KYY / G4KYF
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; version 2 of the License.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | */
15 |
16 | #include "hotspot/dmrUtils.h"
17 |
18 |
19 | void dmrUtils_byteToBitsBE(unsigned char byte, bool *bits)
20 | {
21 | bits[0U] = (byte & 0x80U) == 0x80U;
22 | bits[1U] = (byte & 0x40U) == 0x40U;
23 | bits[2U] = (byte & 0x20U) == 0x20U;
24 | bits[3U] = (byte & 0x10U) == 0x10U;
25 | bits[4U] = (byte & 0x08U) == 0x08U;
26 | bits[5U] = (byte & 0x04U) == 0x04U;
27 | bits[6U] = (byte & 0x02U) == 0x02U;
28 | bits[7U] = (byte & 0x01U) == 0x01U;
29 | }
30 |
31 | void dmrUtils_byteToBitsLE(unsigned char byte, bool *bits)
32 | {
33 | bits[0U] = (byte & 0x01U) == 0x01U;
34 | bits[1U] = (byte & 0x02U) == 0x02U;
35 | bits[2U] = (byte & 0x04U) == 0x04U;
36 | bits[3U] = (byte & 0x08U) == 0x08U;
37 | bits[4U] = (byte & 0x10U) == 0x10U;
38 | bits[5U] = (byte & 0x20U) == 0x20U;
39 | bits[6U] = (byte & 0x40U) == 0x40U;
40 | bits[7U] = (byte & 0x80U) == 0x80U;
41 | }
42 |
43 |
44 | void dmrUtils_bitsToByteBE(const bool* bits, uint8_t *out)
45 | {
46 | *out = bits[0U] ? 0x80U : 0x00U;
47 | *out |= bits[1U] ? 0x40U : 0x00U;
48 | *out |= bits[2U] ? 0x20U : 0x00U;
49 | *out |= bits[3U] ? 0x10U : 0x00U;
50 | *out |= bits[4U] ? 0x08U : 0x00U;
51 | *out |= bits[5U] ? 0x04U : 0x00U;
52 | *out |= bits[6U] ? 0x02U : 0x00U;
53 | *out |= bits[7U] ? 0x01U : 0x00U;
54 | }
55 |
56 | void dmrUtils_bitsToByteLE(const bool* bits, uint8_t *out)
57 | {
58 | *out = bits[0U] ? 0x01U : 0x00U;
59 | *out |= bits[1U] ? 0x02U : 0x00U;
60 | *out |= bits[2U] ? 0x04U : 0x00U;
61 | *out |= bits[3U] ? 0x08U : 0x00U;
62 | *out |= bits[4U] ? 0x10U : 0x00U;
63 | *out |= bits[5U] ? 0x20U : 0x00U;
64 | *out |= bits[6U] ? 0x40U : 0x00U;
65 | *out |= bits[7U] ? 0x80U : 0x00U;
66 | }
67 |
68 | unsigned int dmrUtils_compare(const unsigned char *bytes1, const unsigned char *bytes2, unsigned int length)
69 | {
70 | unsigned int diffs = 0U;
71 |
72 | for (unsigned int i = 0U; i < length; i++)
73 | {
74 | unsigned char v = bytes1[i] ^ bytes2[i];
75 | while (v != 0U)
76 | {
77 | v &= v - 1U;
78 | diffs++;
79 | }
80 | }
81 |
82 | return diffs;
83 | }
84 |
--------------------------------------------------------------------------------
/firmware/source/interfaces/dac.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C)2019 Kai Ludwig, DG4KLU
3 | *
4 | * This program is free software; you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation; either version 2 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 | */
18 |
19 | #include "interfaces/dac.h"
20 |
21 | void dac_init(void)
22 | {
23 | dac_config_t dacConfigStruct;
24 | DAC_GetDefaultConfig(&dacConfigStruct);
25 | DAC_Init(DAC0, &dacConfigStruct);
26 | DAC_Enable(DAC0, true);
27 | DAC_SetBufferValue(DAC0, 0U, 0U);
28 | }
29 |
--------------------------------------------------------------------------------
/firmware/source/interfaces/interrupts.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C)2020 Roger Clark VK3KYY
3 | *
4 | */
5 | #include
6 | #include
7 | #include "interfaces/gpio.h"
8 |
9 | void interruptsInitC6000Interface(void)
10 | {
11 | PORT_SetPinInterruptConfig(Port_INT_C6000_SYS, Pin_INT_C6000_SYS, kPORT_InterruptFallingEdge);
12 | PORT_SetPinInterruptConfig(Port_INT_C6000_TS, Pin_INT_C6000_TS, kPORT_InterruptFallingEdge);
13 | PORT_SetPinInterruptConfig(Port_INT_C6000_RF_RX, Pin_INT_C6000_RF_RX, kPORT_InterruptFallingEdge);
14 | PORT_SetPinInterruptConfig(Port_INT_C6000_RF_TX, Pin_INT_C6000_RF_TX, kPORT_InterruptFallingEdge);
15 |
16 | NVIC_SetPriority(PORTC_IRQn, 3);
17 | }
18 |
19 | bool interruptsWasPinTriggered(PORT_Type *port,uint32_t pin)
20 | {
21 | return (1U << pin) & PORT_GetPinsInterruptFlags(port);
22 | }
23 |
24 | void interruptsClearPinFlags(PORT_Type *port, uint32_t pin)
25 | {
26 | PORT_ClearPinsInterruptFlags(port, (1U << pin));
27 | }
28 |
--------------------------------------------------------------------------------
/firmware/source/interfaces/pit.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C)2019 Kai Ludwig, DG4KLU
3 | *
4 | * This program is free software; you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation; either version 2 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 | */
18 |
19 | #include "interfaces/pit.h"
20 |
21 | volatile uint32_t timer_maintask;
22 | volatile uint32_t timer_beeptask;
23 | volatile uint32_t timer_hrc6000task;
24 | volatile uint32_t timer_watchdogtask;
25 | volatile uint32_t timer_keypad;
26 | volatile uint32_t timer_keypad_timeout;
27 | volatile uint32_t PITCounter;
28 |
29 | volatile uint32_t timer_mbuttons[3];
30 |
31 | void init_pit(void)
32 | {
33 | taskENTER_CRITICAL();
34 | timer_maintask = 0;
35 | timer_beeptask = 0;
36 | timer_hrc6000task = 0;
37 | timer_watchdogtask = 0;
38 | timer_keypad = 0;
39 | timer_keypad_timeout = 0;
40 | timer_mbuttons[0] = timer_mbuttons[1] = timer_mbuttons[2] = 0;
41 | taskEXIT_CRITICAL();
42 |
43 | pit_config_t pitConfig;
44 | PIT_GetDefaultConfig(&pitConfig);
45 | PIT_Init(PIT, &pitConfig);
46 |
47 | PIT_SetTimerPeriod(PIT, kPIT_Chnl_0, USEC_TO_COUNT(100U, CLOCK_GetFreq(kCLOCK_BusClk)));
48 | PIT_EnableInterrupts(PIT, kPIT_Chnl_0, kPIT_TimerInterruptEnable);
49 |
50 | EnableIRQ(PIT0_IRQn);
51 |
52 | PIT_StartTimer(PIT, kPIT_Chnl_0);
53 | }
54 |
55 | void PIT0_IRQHandler(void)
56 | {
57 | PITCounter++;// is unsigned so will wrap around
58 |
59 | if (timer_maintask > 0)
60 | {
61 | timer_maintask--;
62 | }
63 | if (timer_beeptask > 0)
64 | {
65 | timer_beeptask--;
66 | }
67 | if (timer_hrc6000task > 0)
68 | {
69 | timer_hrc6000task--;
70 | }
71 | if (timer_watchdogtask > 0)
72 | {
73 | timer_watchdogtask--;
74 | }
75 | if (timer_keypad > 0)
76 | {
77 | timer_keypad--;
78 | }
79 | if (timer_keypad_timeout > 0)
80 | {
81 | timer_keypad_timeout--;
82 | }
83 | if (timer_mbuttons[0] > 0)
84 | {
85 | timer_mbuttons[0]--;
86 | }
87 |
88 | if (timer_mbuttons[1] > 0)
89 | {
90 | timer_mbuttons[1]--;
91 | }
92 |
93 | if (timer_mbuttons[2] > 0)
94 | {
95 | timer_mbuttons[2]--;
96 | }
97 |
98 | /* Clear interrupt flag.*/
99 | PIT_ClearStatusFlags(PIT, kPIT_Chnl_0, kPIT_TimerFlag);
100 | __DSB();
101 | }
102 |
--------------------------------------------------------------------------------
/firmware/source/io/LEDs.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C)2019 Kai Ludwig, DG4KLU
3 | *
4 | * This program is free software; you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation; either version 2 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 | */
18 | #include "interfaces/gpio.h"
19 | #include "io/LEDs.h"
20 |
21 | #if ! defined(PLATFORM_GD77S)
22 | uint8_t LEDsState[2] = { 0, 0 };
23 | #endif
24 |
25 |
26 | void LEDsInit(void)
27 | {
28 | gpioInitLEDs();
29 |
30 | LEDs_PinWrite(GPIO_LEDgreen, Pin_LEDgreen, 0);
31 | LEDs_PinWrite(GPIO_LEDred, Pin_LEDred, 0);
32 |
33 | #if defined(PLATFORM_RD5R)
34 | GPIO_PinWrite(GPIO_Torch, Pin_Torch, 0);
35 | #endif
36 | }
37 |
38 | #if defined(PLATFORM_RD5R)
39 | // Baofeng DM-5R torch LED
40 | static bool torchState = false;
41 |
42 | void torchToggle(void)
43 | {
44 | torchState = !torchState;
45 | GPIO_PinWrite(GPIO_Torch, Pin_Torch, torchState);
46 | }
47 | #endif
48 |
--------------------------------------------------------------------------------
/firmware/source/io/display.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C)2019 Kai Ludwig, DG4KLU
3 | *
4 | * PWM modifications by Roger Clark VK3KYY / G4KYF
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 2 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 | */
20 |
21 | #include
22 | #include "io/display.h"
23 | #include "hardware/UC1701.h"
24 | #include "functions/settings.h"
25 | #include "interfaces/gpio.h"
26 |
27 |
28 | void displayInit(bool isInverseColour)
29 | {
30 | #if ! defined(PLATFORM_GD77S)
31 |
32 | // Init pins
33 | GPIO_PinWrite(GPIO_Display_CS, Pin_Display_CS, 1);
34 | GPIO_PinWrite(GPIO_Display_RST, Pin_Display_RST, 1);
35 | GPIO_PinWrite(GPIO_Display_RS, Pin_Display_RS, 1);
36 | GPIO_PinWrite(GPIO_Display_SCK, Pin_Display_SCK, 1);
37 | GPIO_PinWrite(GPIO_Display_SDA, Pin_Display_SDA, 1);
38 |
39 | // Reset LCD
40 | GPIO_PinWrite(GPIO_Display_RST, Pin_Display_RST, 0);
41 | vTaskDelay(portTICK_PERIOD_MS * 1);
42 | GPIO_PinWrite(GPIO_Display_RST, Pin_Display_RST, 1);
43 | vTaskDelay(portTICK_PERIOD_MS * 5);
44 |
45 | ucBegin(isInverseColour);
46 | #endif // ! PLATFORM_GD77S
47 | }
48 |
49 | void displayEnableBacklight(bool enable)
50 | {
51 | #if ! defined(PLATFORM_GD77S)
52 | if (enable)
53 | {
54 | #ifdef DISPLAY_LED_PWM
55 | gpioSetDisplayBacklightIntensityPercentage(nonVolatileSettings.displayBacklightPercentage);
56 | #else
57 | GPIO_PinWrite(GPIO_Display_Light, Pin_Display_Light, 1);
58 | #endif
59 | }
60 | else
61 | {
62 | #ifdef DISPLAY_LED_PWM
63 |
64 | gpioSetDisplayBacklightIntensityPercentage(((nonVolatileSettings.backlightMode == BACKLIGHT_MODE_NONE) ? 0 : nonVolatileSettings.displayBacklightPercentageOff));
65 | #else
66 | GPIO_PinWrite(GPIO_Display_Light, Pin_Display_Light, 0);
67 | #endif
68 | }
69 | #endif // ! PLATFORM_GD77S
70 | }
71 |
72 | bool displayIsBacklightLit(void)
73 | {
74 | #if defined(PLATFORM_GD77S)
75 | return false;
76 | #else
77 | #ifdef DISPLAY_LED_PWM
78 | uint32_t cnv = BOARD_FTM_BASEADDR->CONTROLS[BOARD_FTM_CHANNEL].CnV;
79 | uint32_t mod = BOARD_FTM_BASEADDR->MOD;
80 | uint32_t dutyCyclePercent = 0;
81 |
82 | // Calculate dutyCyclePercent value
83 | if (cnv == (mod + 1))
84 | {
85 | dutyCyclePercent = 100;
86 | }
87 | else
88 | {
89 | dutyCyclePercent = (uint32_t)((((float)cnv / (float)mod) * 100.0) + 0.5);
90 | }
91 | return (dutyCyclePercent != nonVolatileSettings.displayBacklightPercentageOff);
92 | #else
93 | return (GPIO_PinRead(GPIO_Display_Light, Pin_Display_Light) == 1);
94 | #endif
95 | #endif // PLATFORM_GD77S
96 | }
97 |
98 |
99 |
--------------------------------------------------------------------------------
/firmware/source/io/rotary_switch.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C)2020 Kai Ludwig, DG4KLU
3 | * and Roger Clark, VK3KYY / G4KYF
4 | * and Daniel Caujolle-Bert, F1RMB
5 | *
6 | * This program is free software; you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation; either version 2 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program; if not, write to the Free Software
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 | */
20 |
21 | #include "io/rotary_switch.h"
22 |
23 | #if defined(PLATFORM_GD77S)
24 | static uint8_t prevPosition;
25 | #endif
26 |
27 | void rotarySwitchInit(void)
28 | {
29 | #if defined(PLATFORM_GD77S)
30 | gpioInitRotarySwitch();
31 |
32 | prevPosition = -1;
33 | #endif
34 | }
35 |
36 | uint8_t rotarySwitchGetPosition(void)
37 | {
38 | #if defined(PLATFORM_GD77S)
39 | static const uint8_t rsPositions[] = { 1, 8, 2, 7, 4, 5, 3, 6, 16, 9, 15, 10, 13, 12, 14, 11 };
40 | return rsPositions[(~((GPIOD->PDIR) >> 4) & 0x0F)];
41 | #else
42 | return 0;
43 | #endif
44 | }
45 |
46 | void rotarySwitchCheckRotaryEvent(uint32_t *position, int *event)
47 | {
48 | #if ! defined(PLATFORM_GD77S)
49 | *position = 0;
50 | *event = EVENT_ROTARY_NONE;
51 | #else
52 | uint8_t value = rotarySwitchGetPosition();
53 |
54 | *position = value; // set it anyway, as it could be checked even on no event
55 |
56 | if (prevPosition != value)
57 | {
58 | *event = EVENT_ROTARY_CHANGE;
59 | prevPosition = value;
60 | }
61 | else
62 | {
63 | *event = EVENT_ROTARY_NONE;
64 | }
65 | #endif
66 | }
67 |
--------------------------------------------------------------------------------
/firmware/source/user_interface/uiPowerOff.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C)2019 Roger Clark. VK3KYY / G4KYF
3 | *
4 | * This program is free software; you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation; either version 2 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 | */
18 | #include "user_interface/menuSystem.h"
19 | #include "user_interface/uiLocalisation.h"
20 |
21 | static void updateScreen(void);
22 | static void handleEvent(uiEvent_t *ev);
23 | static uint32_t initialEventTime;
24 | const uint32_t POWEROFF_DURATION_MILLISECONDS = 500;
25 |
26 | menuStatus_t uiPowerOff(uiEvent_t *ev, bool isFirstRun)
27 | {
28 | if (isFirstRun)
29 | {
30 | updateScreen();
31 | initialEventTime = ev->time;
32 | }
33 | else
34 | {
35 | handleEvent(ev);
36 | }
37 | return MENU_STATUS_SUCCESS;
38 | }
39 |
40 | static void updateScreen(void)
41 | {
42 | ucClearBuf();
43 | ucPrintCentered(12, currentLanguage->power_off, FONT_SIZE_3);
44 | ucPrintCentered(32, "73", FONT_SIZE_3);
45 | ucRender();
46 | }
47 |
48 | static void handleEvent(uiEvent_t *ev)
49 | {
50 | #if defined(PLATFORM_RD5R)
51 | if (batteryVoltage > CUTOFF_VOLTAGE_LOWER_HYST)
52 | #else
53 | if ((GPIO_PinRead(GPIO_Power_Switch, Pin_Power_Switch) == 0) && (batteryVoltage > CUTOFF_VOLTAGE_LOWER_HYST))
54 | #endif
55 | {
56 | // I think this is to handle if the power button is turned back on during shutdown
57 | menuSystemPopPreviousMenu();
58 | initialEventTime = 0; // Reset timeout
59 | return;
60 | }
61 |
62 | if ((ev->time - initialEventTime) > POWEROFF_DURATION_MILLISECONDS)
63 | {
64 | powerOffFinalStage();
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/firmware/tools/FirmwareLoader:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | let ret=0
4 |
5 | OS=`uname -s`
6 |
7 | FIRMWARE="$(echo ${@:2:1})"
8 |
9 | #Extract destination platform
10 | DM1801=$(echo "${@:3:1})" | grep -o DM-1801)
11 | GD77S=$(echo "${@:3:1})" | grep -o GD-77S)
12 | RD5R=$(echo "${@:3:1})" | grep -o RD-5R)
13 | GD77=""
14 |
15 | # Due to similarity between 77 and 77S, first check if it wasn't GD-77S, then
16 | # check for GD-77 if it has failed.
17 | if [ -z "$GD77S" ]; then
18 | GD77=$(echo "${@:3:1})" | grep -o GD-77)
19 | fi
20 |
21 | case "$OS" in
22 | "Linux")
23 | mono "$1/FirmwareLoader-Linux.exe" $GD77 $DM1801 $GD77S $RD5R $FIRMWARE
24 | ret=$?
25 | ;;
26 | "Darwin")
27 | # doesn't even exist yet. Use Python script instead ?
28 | #mono "$1/FirmwareLoader-Darwin.exe" ${@:2}
29 | ret=$?
30 | ;;
31 | *)
32 | ret=1
33 | ;;
34 | esac
35 |
36 | exit $ret
37 |
--------------------------------------------------------------------------------
/firmware/tools/FirmwareLoader-Linux.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/firmware/tools/FirmwareLoader-Linux.exe
--------------------------------------------------------------------------------
/firmware/tools/FirmwareLoader.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/firmware/tools/FirmwareLoader.exe
--------------------------------------------------------------------------------
/firmware/tools/LibUsbDotNet.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/firmware/tools/LibUsbDotNet.dll
--------------------------------------------------------------------------------
/firmware/tools/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/firmware/tools/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/firmware/tools/bin2sgl:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | OS=`uname -s`
4 | MODEL=""
5 | FILENAME=""
6 |
7 | for e in "$@"; do
8 | case "$e" in
9 | "DM-1801")
10 | MODEL="-m DM-1801"
11 | ;;
12 | "GD-77S")
13 | MODEL="-m GD-77S"
14 | ;;
15 | "RD-5R")
16 | MODEL="-m RD-5R"
17 | ;;
18 | *)
19 | FILENAME="-f $e"
20 | ;;
21 | esac
22 | done
23 |
24 | case "$OS" in
25 | "Linux")
26 | ../tools/bin2sgl.Linux $MODEL $FILENAME
27 | ;;
28 | "Darwin")
29 | ../tools/bin2sgl.Darwin $MODEL $FILENAME
30 | ;;
31 | *)
32 | ;;
33 | esac
34 |
--------------------------------------------------------------------------------
/firmware/tools/bin2sgl.Darwin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/firmware/tools/bin2sgl.Darwin
--------------------------------------------------------------------------------
/firmware/tools/bin2sgl.Linux:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/firmware/tools/bin2sgl.Linux
--------------------------------------------------------------------------------
/firmware/tools/bin2sgl.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/firmware/tools/bin2sgl.exe
--------------------------------------------------------------------------------
/firmware/tools/disclaimer.txt:
--------------------------------------------------------------------------------
1 | /*
2 | * Modified version by Roger VK3KYY - converts bin to SGL file by prepending the header
3 | * and encrypting the binary
4 | *
5 | * Original version...
6 | * GD-77 firmware decrypter/encrypter by DG4KLU.
7 | *
8 | * Copyright (C)2019 Kai Ludwig, DG4KLU
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 | *
13 | * 1. Redistributions of source code must retain the above copyright notice,
14 | * this list of conditions and the following disclaimer.
15 | * 2. Redistributions in binary form must reproduce the above copyright
16 | * notice, this list of conditions and the following disclaimer in the
17 | * documentation and/or other materials provided with the distribution.
18 | * 3. The name of the author may not 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 AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
22 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
23 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
24 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
30 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 | */
32 |
--------------------------------------------------------------------------------
/firmware/usb/device/source/usb_device_ch9.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2015, Freescale Semiconductor, Inc.
3 | * Copyright 2016 NXP
4 | * All rights reserved.
5 | *
6 | * SPDX-License-Identifier: BSD-3-Clause
7 | */
8 |
9 | #ifndef __USB_DEVICE_CH9_H__
10 | #define __USB_DEVICE_CH9_H__
11 |
12 | /*******************************************************************************
13 | * Definitions
14 | ******************************************************************************/
15 | /*!
16 | * @addtogroup usb_device_ch9
17 | * @{
18 | */
19 | /*! @brief Defines USB device status size when the host request to get device status */
20 | #define USB_DEVICE_STATUS_SIZE (0x02U)
21 |
22 | /*! @brief Defines USB device interface status size when the host request to get interface status */
23 | #define USB_INTERFACE_STATUS_SIZE (0x02U)
24 |
25 | /*! @brief Defines USB device endpoint status size when the host request to get endpoint status */
26 | #define USB_ENDPOINT_STATUS_SIZE (0x02U)
27 |
28 | /*! @brief Defines USB device configuration size when the host request to get current configuration */
29 | #define USB_CONFIGURE_SIZE (0X01U)
30 |
31 | /*! @brief Defines USB device interface alternate setting size when the host request to get interface alternate setting
32 | */
33 | #define USB_INTERFACE_SIZE (0X01U)
34 |
35 | /*! @brief Defines USB device status mask */
36 | #define USB_GET_STATUS_DEVICE_MASK (0x03U)
37 |
38 | /*! @brief Defines USB device interface status mask */
39 | #define USB_GET_STATUS_INTERFACE_MASK (0x03U)
40 |
41 | /*! @brief Defines USB device endpoint status mask */
42 | #define USB_GET_STATUS_ENDPOINT_MASK (0x03U)
43 |
44 | /*! @brief Control read and write sequence */
45 | typedef enum _usb_device_control_read_write_sequence
46 | {
47 | kUSB_DeviceControlPipeSetupStage = 0U, /*!< Setup stage */
48 | kUSB_DeviceControlPipeDataStage, /*!< Data stage */
49 | kUSB_DeviceControlPipeStatusStage, /*!< status stage */
50 | } usb_device_control_read_write_sequence_t;
51 |
52 | #if defined(__cplusplus)
53 | extern "C" {
54 | #endif
55 |
56 | /*******************************************************************************
57 | * API
58 | ******************************************************************************/
59 |
60 | /*!
61 | * @brief Initializes the control pipes.
62 | *
63 | * The function is used to initialize the control pipes. This function should be called when event
64 | * kUSB_DeviceEventBusReset is received.
65 | *
66 | * @param[in] handle The device handle.
67 | * @param[in] param The event parameter.
68 | *
69 | * @return A USB error code or kStatus_USB_Success.
70 | */
71 | extern usb_status_t USB_DeviceControlPipeInit(usb_device_handle handle, void *param);
72 |
73 | #if defined(__cplusplus)
74 | }
75 | #endif
76 |
77 | /*! @}*/
78 |
79 | #endif /* __USB_DEVICE_CH9_H__ */
80 |
--------------------------------------------------------------------------------
/firmware_binaries/readme.md:
--------------------------------------------------------------------------------
1 | This software is licenced under the GPL v2 and is intended for amateur and educational use only.
2 |
3 | Use of this software for commercial purposes is strictly forbidden.
4 |
5 | -----------------------------------------
6 |
7 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
8 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
9 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
10 | EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
12 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
13 | OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
14 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
15 | OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
16 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17 |
18 |
19 | See https://github.com/rogerclarkmelbourne/OpenGD77/releases for binary versions
--------------------------------------------------------------------------------
/tools/bin2sgl/.gitignore:
--------------------------------------------------------------------------------
1 | obj/*
2 | bin/*
3 | *.suo
4 | *.bin
--------------------------------------------------------------------------------
/tools/bin2sgl/.vs/bin2sgl/v15/Server/sqlite3/db.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/tools/bin2sgl/.vs/bin2sgl/v15/Server/sqlite3/db.lock
--------------------------------------------------------------------------------
/tools/bin2sgl/.vs/bin2sgl/v15/Server/sqlite3/storage.ide:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/tools/bin2sgl/.vs/bin2sgl/v15/Server/sqlite3/storage.ide
--------------------------------------------------------------------------------
/tools/bin2sgl/bin2sgl.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.27130.2036
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "bin2sgl", "bin2sgl\bin2sgl.csproj", "{32FC5E08-7C59-4CEE-A028-44FDCE45A752}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {32FC5E08-7C59-4CEE-A028-44FDCE45A752}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {32FC5E08-7C59-4CEE-A028-44FDCE45A752}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {32FC5E08-7C59-4CEE-A028-44FDCE45A752}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {32FC5E08-7C59-4CEE-A028-44FDCE45A752}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {49BD3C8F-8983-4F4C-89C4-C48461433476}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/tools/bin2sgl/bin2sgl/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/tools/bin2sgl/bin2sgl/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // Allgemeine Informationen über eine Assembly werden über die folgenden
6 | // Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
7 | // die einer Assembly zugeordnet sind.
8 | [assembly: AssemblyTitle("firmware_decrypt")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("firmware_decrypt")]
13 | [assembly: AssemblyCopyright("Copyright © 2019")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
18 | // für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
19 | // COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
20 | [assembly: ComVisible(false)]
21 |
22 | // Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
23 | [assembly: Guid("32fc5e08-7c59-4cee-a028-44fdce45a752")]
24 |
25 | // Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
26 | //
27 | // Hauptversion
28 | // Nebenversion
29 | // Buildnummer
30 | // Revision
31 | //
32 | // Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
33 | // übernehmen, indem Sie "*" eingeben:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/tools/bin2sgl/bin2sgl/bin2sgl.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {32FC5E08-7C59-4CEE-A028-44FDCE45A752}
8 | Exe
9 | bin2sgl
10 | bin2sgl
11 | v4.6.1
12 | 512
13 | true
14 | true
15 |
16 |
17 | AnyCPU
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 |
26 |
27 | AnyCPU
28 | pdbonly
29 | true
30 | bin\Release\
31 | TRACE
32 | prompt
33 | 4
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/tools/bin2sgl/bin2sgl/bin2sgl.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | GD-77_V3.1.1_73F3_077001 datafile 0x0000 decrypt
5 |
6 |
--------------------------------------------------------------------------------
/tools/bin2sgl/disclaimer.txt:
--------------------------------------------------------------------------------
1 | /*
2 | * Modified version by Roger VK3KYY - converts bin to SGL file by prepending the header
3 | * and encrypting the binary
4 | *
5 | * Original version...
6 | * GD-77 firmware decrypter/encrypter by DG4KLU.
7 | *
8 | * Copyright (C)2019 Kai Ludwig, DG4KLU
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 | *
13 | * 1. Redistributions of source code must retain the above copyright notice,
14 | * this list of conditions and the following disclaimer.
15 | * 2. Redistributions in binary form must reproduce the above copyright
16 | * notice, this list of conditions and the following disclaimer in the
17 | * documentation and/or other materials provided with the distribution.
18 | * 3. The name of the author may not 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 AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
22 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
23 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
24 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
30 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 | */
32 |
--------------------------------------------------------------------------------
/tools/bin2sgl/exe/bin2sgl.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/tools/bin2sgl/exe/bin2sgl.exe
--------------------------------------------------------------------------------
/tools/bin2sgl/readme.md:
--------------------------------------------------------------------------------
1 | This folder contains a modified version of Kai's DG4KLU firmware encrypter / encrypter
2 |
3 | This version handles the whole process of conversion from bin to SGL by both encrypting the binary and also prepending a header, which the official upload program requires
--------------------------------------------------------------------------------
/tools/compiled_versions/FirmwareLoader:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | let ret=0
4 |
5 | OS=`uname -s`
6 |
7 | FIRMWARE="$(echo ${@:2:1})"
8 |
9 | #Extract destination platform
10 | DM1801=$(echo "${@:3:1})" | grep -o DM-1801)
11 | GD77S=$(echo "${@:3:1})" | grep -o GD-77S)
12 | RD5R=$(echo "${@:3:1})" | grep -o RD-5R)
13 | GD77=""
14 |
15 | # Due to similarity between 77 and 77S, first check if it wasn't GD-77S, then
16 | # check for GD-77 if it has failed.
17 | if [ -z "$GD77S" ]; then
18 | GD77=$(echo "${@:3:1})" | grep -o GD-77)
19 | fi
20 |
21 | case "$OS" in
22 | "Linux")
23 | mono "$1/FirmwareLoader-Linux.exe" $GD77 $DM1801 $GD77S $RD5R $FIRMWARE
24 | ret=$?
25 | ;;
26 | "Darwin")
27 | # doesn't even exist yet. Use Python script instead ?
28 | #mono "$1/FirmwareLoader-Darwin.exe" ${@:2}
29 | ret=$?
30 | ;;
31 | *)
32 | ret=1
33 | ;;
34 | esac
35 |
36 | exit $ret
37 |
--------------------------------------------------------------------------------
/tools/compiled_versions/FirmwareLoader-Linux.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/tools/compiled_versions/FirmwareLoader-Linux.exe
--------------------------------------------------------------------------------
/tools/compiled_versions/FirmwareLoader.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/tools/compiled_versions/FirmwareLoader.exe
--------------------------------------------------------------------------------
/tools/compiled_versions/LibUsbDotNet.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/tools/compiled_versions/LibUsbDotNet.dll
--------------------------------------------------------------------------------
/tools/compiled_versions/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/tools/compiled_versions/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/tools/compiled_versions/bin2sgl:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | OS=`uname -s`
4 | MODEL=""
5 | FILENAME=""
6 |
7 | for e in "$@"; do
8 | case "$e" in
9 | "DM-1801")
10 | MODEL="-m DM-1801"
11 | ;;
12 | "GD-77S")
13 | MODEL="-m GD-77S"
14 | ;;
15 | "RD-5R")
16 | MODEL="-m RD-5R"
17 | ;;
18 | *)
19 | FILENAME="-f $e"
20 | ;;
21 | esac
22 | done
23 |
24 | case "$OS" in
25 | "Linux")
26 | ../tools/bin2sgl.Linux $MODEL $FILENAME
27 | ;;
28 | "Darwin")
29 | ../tools/bin2sgl.Darwin $MODEL $FILENAME
30 | ;;
31 | *)
32 | ;;
33 | esac
34 |
--------------------------------------------------------------------------------
/tools/compiled_versions/bin2sgl.Darwin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/tools/compiled_versions/bin2sgl.Darwin
--------------------------------------------------------------------------------
/tools/compiled_versions/bin2sgl.Linux:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/tools/compiled_versions/bin2sgl.Linux
--------------------------------------------------------------------------------
/tools/compiled_versions/bin2sgl.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/tools/compiled_versions/bin2sgl.exe
--------------------------------------------------------------------------------
/tools/compiled_versions/disclaimer.txt:
--------------------------------------------------------------------------------
1 | /*
2 | * Modified version by Roger VK3KYY - converts bin to SGL file by prepending the header
3 | * and encrypting the binary
4 | *
5 | * Original version...
6 | * GD-77 firmware decrypter/encrypter by DG4KLU.
7 | *
8 | * Copyright (C)2019 Kai Ludwig, DG4KLU
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 | *
13 | * 1. Redistributions of source code must retain the above copyright notice,
14 | * this list of conditions and the following disclaimer.
15 | * 2. Redistributions in binary form must reproduce the above copyright
16 | * notice, this list of conditions and the following disclaimer in the
17 | * documentation and/or other materials provided with the distribution.
18 | * 3. The name of the author may not 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 AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
22 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
23 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
24 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
30 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 | */
32 |
--------------------------------------------------------------------------------
/tools/firmware_loader/.gitignore:
--------------------------------------------------------------------------------
1 | obj/*
2 | bin/*
3 | *.suo
4 | *.bin
--------------------------------------------------------------------------------
/tools/firmware_loader/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/tools/firmware_loader/FirmwareLoader.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2012
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FirmwareLoader", "FirmwareLoader.csproj", "{58D9F832-3239-44CD-975A-9F17A3A6A74C}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Any CPU = Debug|Any CPU
9 | Release|Any CPU = Release|Any CPU
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {58D9F832-3239-44CD-975A-9F17A3A6A74C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13 | {58D9F832-3239-44CD-975A-9F17A3A6A74C}.Debug|Any CPU.Build.0 = Debug|Any CPU
14 | {58D9F832-3239-44CD-975A-9F17A3A6A74C}.Release|Any CPU.ActiveCfg = Release|Any CPU
15 | {58D9F832-3239-44CD-975A-9F17A3A6A74C}.Release|Any CPU.Build.0 = Release|Any CPU
16 | EndGlobalSection
17 | GlobalSection(SolutionProperties) = preSolution
18 | HideSolutionNode = FALSE
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/tools/firmware_loader/FirmwareLoader_LibUsbDotNet.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2012
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FirmwareLoader_LibUsbDotNet", "FirmwareLoader_LibUsbDotNet.csproj", "{58D9F832-3239-44CD-975A-9F17A3A6A74C}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Any CPU = Debug|Any CPU
9 | Release|Any CPU = Release|Any CPU
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {58D9F832-3239-44CD-975A-9F17A3A6A74C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13 | {58D9F832-3239-44CD-975A-9F17A3A6A74C}.Debug|Any CPU.Build.0 = Debug|Any CPU
14 | {58D9F832-3239-44CD-975A-9F17A3A6A74C}.Release|Any CPU.ActiveCfg = Release|Any CPU
15 | {58D9F832-3239-44CD-975A-9F17A3A6A74C}.Release|Any CPU.Build.0 = Release|Any CPU
16 | {26C5F25F-B450-4CAF-AD8B-B8D11AE73457}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17 | {26C5F25F-B450-4CAF-AD8B-B8D11AE73457}.Debug|Any CPU.Build.0 = Debug|Any CPU
18 | {26C5F25F-B450-4CAF-AD8B-B8D11AE73457}.Release|Any CPU.ActiveCfg = Release|Any CPU
19 | {26C5F25F-B450-4CAF-AD8B-B8D11AE73457}.Release|Any CPU.Build.0 = Release|Any CPU
20 | EndGlobalSection
21 | GlobalSection(SolutionProperties) = preSolution
22 | HideSolutionNode = FALSE
23 | EndGlobalSection
24 | GlobalSection(MonoDevelopProperties) = preSolution
25 | Policies = $0
26 | $0.DotNetNamingPolicy = $1
27 | $1.DirectoryNamespaceAssociation = PrefixedHierarchical
28 | $0.TextStylePolicy = $2
29 | $2.FileWidth = 80
30 | $2.scope = text/x-csharp
31 | $0.CSharpFormattingPolicy = $3
32 | $3.scope = text/x-csharp
33 | $0.StandardHeader = $4
34 | EndGlobalSection
35 | EndGlobal
36 |
--------------------------------------------------------------------------------
/tools/firmware_loader/FrmProgress.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace GD77_FirmwareLoader
2 | {
3 | partial class FrmProgress
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.progressBar1 = new System.Windows.Forms.ProgressBar();
32 | this.lblMessage = new System.Windows.Forms.Label();
33 | this.SuspendLayout();
34 | //
35 | // progressBar1
36 | //
37 | this.progressBar1.Location = new System.Drawing.Point(13, 39);
38 | this.progressBar1.Name = "progressBar1";
39 | this.progressBar1.Size = new System.Drawing.Size(350, 23);
40 | this.progressBar1.Style = System.Windows.Forms.ProgressBarStyle.Continuous;
41 | this.progressBar1.TabIndex = 0;
42 | //
43 | // lblMessage
44 | //
45 | this.lblMessage.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
46 | this.lblMessage.Location = new System.Drawing.Point(13, 13);
47 | this.lblMessage.Name = "lblMessage";
48 | this.lblMessage.Size = new System.Drawing.Size(350, 13);
49 | this.lblMessage.TabIndex = 1;
50 | this.lblMessage.Text = "label1";
51 | //
52 | // FrmProgress
53 | //
54 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
55 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
56 | this.ClientSize = new System.Drawing.Size(375, 74);
57 | this.Controls.Add(this.lblMessage);
58 | this.Controls.Add(this.progressBar1);
59 | this.Name = "FrmProgress";
60 | this.Text = "Open(GD-77/MD-1801/DM-5R) Firmware Loader";
61 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
62 | this.MaximizeBox = false;
63 | this.ResumeLayout(false);
64 |
65 | }
66 |
67 | #endregion
68 |
69 | private System.Windows.Forms.ProgressBar progressBar1;
70 | private System.Windows.Forms.Label lblMessage;
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/tools/firmware_loader/FrmProgress.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace GD77_FirmwareLoader
12 | {
13 | public partial class FrmProgress : Form
14 | {
15 | public FrmProgress()
16 | {
17 | InitializeComponent();
18 | this.CenterToScreen();
19 | this.BringToFront();
20 | }
21 |
22 | public void SetLabel(string txt)
23 | {
24 | this.BringToFront();
25 | this.lblMessage.Text = txt;
26 | this.lblMessage.Update();
27 | this.Refresh();
28 | }
29 | public void SetProgressPercentage(int perc)
30 | {
31 | this.BringToFront();
32 | this.progressBar1.Value = perc;
33 | this.progressBar1.Update();
34 | this.Refresh();
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/tools/firmware_loader/LibUsbDotNet.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/tools/firmware_loader/LibUsbDotNet.dll
--------------------------------------------------------------------------------
/tools/firmware_loader/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Firmwareloader")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("Roger Clark")]
12 | [assembly: AssemblyProduct("Firmwareloader")]
13 | [assembly: AssemblyCopyright("Copyright © Roger Clark 2020")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("8915814b-2b44-45c5-9d60-73340f32693b")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/tools/firmware_loader/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace FirmwareLoader.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// Returns the cached ResourceManager instance used by this class.
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FirmwareLoader.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// Overrides the current thread's CurrentUICulture property for all
51 | /// resource lookups using this strongly typed resource class.
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/tools/firmware_loader/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace FirmwareLoader.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/tools/firmware_loader/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/tools/firmware_loader/Resources/Icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/tools/firmware_loader/Resources/Icon.ico
--------------------------------------------------------------------------------
/tools/firmware_loader/UsbLib/DataRecievedEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace UsbLibrary
4 | {
5 | public class DataRecievedEventArgs : EventArgs
6 | {
7 | public readonly byte[] data;
8 |
9 | public DataRecievedEventArgs(byte[] data)
10 | {
11 |
12 | //base._002Ector();
13 | this.data = data;
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/tools/firmware_loader/UsbLib/DataRecievedEventHandler.cs:
--------------------------------------------------------------------------------
1 | namespace UsbLibrary
2 | {
3 | public delegate void DataRecievedEventHandler(object sender, DataRecievedEventArgs e);
4 | }
5 |
--------------------------------------------------------------------------------
/tools/firmware_loader/UsbLib/DataSendEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace UsbLibrary
4 | {
5 | public class DataSendEventArgs : EventArgs
6 | {
7 | public readonly byte[] data;
8 |
9 | public DataSendEventArgs(byte[] data)
10 | {
11 |
12 | //base._002Ector();
13 | this.data = data;
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/tools/firmware_loader/UsbLib/DataSendEventHandler.cs:
--------------------------------------------------------------------------------
1 | namespace UsbLibrary
2 | {
3 | public delegate void DataSendEventHandler(object sender, DataSendEventArgs e);
4 | }
5 |
--------------------------------------------------------------------------------
/tools/firmware_loader/UsbLib/GException0.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 |
4 | namespace UsbLibrary
5 | {
6 | public class GException0 : ApplicationException
7 | {
8 | public GException0(string strMessage)
9 | {
10 |
11 | //base._002Ector(strMessage);
12 | }
13 |
14 | public static GException0 GenerateWithWinError(string strMessage)
15 | {
16 | return new GException0(string.Format("Msg:{0} WinEr:{1:X8}", strMessage, Marshal.GetLastWin32Error()));
17 | }
18 |
19 | public static GException0 GenerateError(string strMessage)
20 | {
21 | return new GException0(string.Format("Msg:{0}", strMessage));
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/tools/firmware_loader/UsbLib/InputReport.cs:
--------------------------------------------------------------------------------
1 | namespace UsbLibrary
2 | {
3 | public abstract class InputReport : Report
4 | {
5 |
6 |
7 | public InputReport(HIDDevice oDev) : base(oDev)
8 | {
9 |
10 | }
11 |
12 | public void SetData(byte[] arrData)
13 | {
14 | base.SetBuffer(arrData);
15 | this.ProcessData();
16 | }
17 |
18 | public abstract void ProcessData();
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/tools/firmware_loader/UsbLib/OutputReport.cs:
--------------------------------------------------------------------------------
1 | namespace UsbLibrary
2 | {
3 | public abstract class OutputReport : Report
4 | {
5 |
6 | public OutputReport(HIDDevice oDev)
7 | : base(oDev)
8 | {
9 | base.SetBuffer(new byte[oDev.OutputReportLength]);
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/tools/firmware_loader/UsbLib/Report.cs:
--------------------------------------------------------------------------------
1 | namespace UsbLibrary
2 | {
3 | public abstract class Report
4 | {
5 | private byte[] m_arrBuffer;
6 |
7 | private int m_nLength;
8 |
9 | public byte[] Buffer
10 | {
11 | get
12 | {
13 | return this.m_arrBuffer;
14 | }
15 | set
16 | {
17 | this.m_arrBuffer = value;
18 | }
19 | }
20 |
21 | public int BufferLength
22 | {
23 | get
24 | {
25 | return this.m_nLength;
26 | }
27 | }
28 |
29 |
30 | public Report(HIDDevice oDev)
31 | {
32 |
33 | }
34 |
35 | protected void SetBuffer(byte[] arrBytes)
36 | {
37 | this.m_arrBuffer = arrBytes;
38 | this.m_nLength = this.m_arrBuffer.Length;
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/tools/firmware_loader/UsbLib/SpecifiedDevice.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace UsbLibrary
4 | {
5 | public class SpecifiedDevice : HIDDevice
6 | {
7 | public event DataRecievedEventHandler DataRecieved;
8 |
9 | public event DataSendEventHandler DataSend;
10 |
11 | public override InputReport CreateInputReport()
12 | {
13 | return new SpecifiedInputReport(this);
14 | }
15 |
16 | public static SpecifiedDevice FindSpecifiedDevice(int vendor_id, int product_id)
17 | {
18 | return (SpecifiedDevice)HIDDevice.FindDevice(vendor_id, product_id, typeof(SpecifiedDevice));
19 | }
20 |
21 | protected override void HandleDataReceived(InputReport oInRep)
22 | {
23 | if (this.DataRecieved != null)
24 | {
25 | SpecifiedInputReport specifiedInputReport = (SpecifiedInputReport)oInRep;
26 | this.DataRecieved(this, new DataRecievedEventArgs(specifiedInputReport.Data));
27 | }
28 | }
29 |
30 | public static string ByteArrayToString(byte[] ba)
31 | {
32 | string hex = BitConverter.ToString(ba);
33 | return hex.Replace("-", "");
34 | }
35 |
36 | public bool SendData(byte[] data)
37 | {
38 | #if SHOW_USB_DATA
39 | Console.WriteLine("SendData " + SpecifiedDevice.ByteArrayToString(data));
40 | #endif
41 | SpecifiedOutputReport specifiedOutputReport = new SpecifiedOutputReport(this);
42 | specifiedOutputReport.SendData(data);
43 | try
44 | {
45 | base.Write(specifiedOutputReport);
46 | if (this.DataSend != null)
47 | {
48 | this.DataSend(this, new DataSendEventArgs(data));
49 | }
50 | }
51 | catch (GException0 gException)
52 | {
53 | Console.WriteLine(gException.Message);
54 | return false;
55 | }
56 | catch (Exception ex)
57 | {
58 | Console.WriteLine(ex.Message);
59 | return false;
60 | }
61 | return true;
62 | }
63 |
64 | public bool SendData(byte[] data, int index, int length)
65 | {
66 | SpecifiedOutputReport specifiedOutputReport = new SpecifiedOutputReport(this);
67 | specifiedOutputReport.SendData(data, index, length);
68 | try
69 | {
70 | base.Write(specifiedOutputReport);
71 | if (this.DataSend != null)
72 | {
73 | this.DataSend(this, new DataSendEventArgs(data));
74 | }
75 | }
76 | catch (GException0 gException)
77 | {
78 | Console.WriteLine(gException.Message);
79 | return false;
80 | }
81 | catch (Exception ex)
82 | {
83 | Console.WriteLine(ex.Message);
84 | return false;
85 | }
86 | return true;
87 | }
88 |
89 | public bool ReceiveData(byte[] data)
90 | {
91 | bool retVal = base.BeginAsyncRead(data);
92 | #if SHOW_USB_DATA
93 | Console.WriteLine("ReceiveData " + SpecifiedDevice.ByteArrayToString(data));
94 | #endif
95 | return retVal;
96 | }
97 |
98 | protected override void Dispose(bool bDisposing)
99 | {
100 | base.Dispose(bDisposing);
101 | }
102 |
103 | public SpecifiedDevice() : base()
104 | {
105 |
106 | //base._002Ector();
107 | }
108 | }
109 | }
110 |
--------------------------------------------------------------------------------
/tools/firmware_loader/UsbLib/SpecifiedInputReport.cs:
--------------------------------------------------------------------------------
1 | namespace UsbLibrary
2 | {
3 | public class SpecifiedInputReport : InputReport
4 | {
5 | private byte[] arrData;
6 |
7 | public byte[] Data
8 | {
9 | get
10 | {
11 | return this.arrData;
12 | }
13 | }
14 |
15 | public SpecifiedInputReport(HIDDevice oDev) : base (oDev)
16 | {
17 |
18 | }
19 |
20 | public override void ProcessData()
21 | {
22 | this.arrData = base.Buffer;
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/tools/firmware_loader/UsbLib/SpecifiedOutputReport.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace UsbLibrary
4 | {
5 | public class SpecifiedOutputReport : OutputReport
6 | {
7 | public SpecifiedOutputReport(HIDDevice oDev) : base(oDev)
8 | {
9 |
10 | }
11 |
12 | public bool SendData(byte[] data)
13 | {
14 | byte[] buffer = base.Buffer;
15 | buffer[0] = 1;
16 | buffer[1] = 0;
17 | buffer[2] = Convert.ToByte(data.Length);
18 | buffer[3] = Convert.ToByte(data.Length >> 8);
19 | Array.Copy(data, 0, buffer, 4, Math.Min(data.Length, base.Buffer.Length - 4));
20 | if (buffer.Length < data.Length)
21 | {
22 | return false;
23 | }
24 | return true;
25 | }
26 |
27 | public bool SendData(byte[] data, int index, int length)
28 | {
29 | byte[] buffer = base.Buffer;
30 | buffer[0] = 1;
31 | buffer[1] = 0;
32 | buffer[2] = Convert.ToByte(data.Length);
33 | buffer[3] = Convert.ToByte(data.Length >> 8);
34 | Array.Copy(data, index, buffer, 4, Math.Min(length, base.Buffer.Length - 4));
35 | if (buffer.Length < data.Length)
36 | {
37 | return false;
38 | }
39 | return true;
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/tools/firmware_loader/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/tools/firmware_loader/packages/Newtonsoft.Json.12.0.3/.signature.p7s:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/tools/firmware_loader/packages/Newtonsoft.Json.12.0.3/.signature.p7s
--------------------------------------------------------------------------------
/tools/firmware_loader/packages/Newtonsoft.Json.12.0.3/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2007 James Newton-King
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/tools/firmware_loader/packages/Newtonsoft.Json.12.0.3/Newtonsoft.Json.12.0.3.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/tools/firmware_loader/packages/Newtonsoft.Json.12.0.3/Newtonsoft.Json.12.0.3.nupkg
--------------------------------------------------------------------------------
/tools/firmware_loader/packages/Newtonsoft.Json.12.0.3/lib/net20/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/tools/firmware_loader/packages/Newtonsoft.Json.12.0.3/lib/net20/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/tools/firmware_loader/packages/Newtonsoft.Json.12.0.3/lib/net35/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/tools/firmware_loader/packages/Newtonsoft.Json.12.0.3/lib/net35/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/tools/firmware_loader/packages/Newtonsoft.Json.12.0.3/lib/net40/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/tools/firmware_loader/packages/Newtonsoft.Json.12.0.3/lib/net40/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/tools/firmware_loader/packages/Newtonsoft.Json.12.0.3/lib/net45/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/tools/firmware_loader/packages/Newtonsoft.Json.12.0.3/lib/net45/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/tools/firmware_loader/packages/Newtonsoft.Json.12.0.3/lib/netstandard1.0/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/tools/firmware_loader/packages/Newtonsoft.Json.12.0.3/lib/netstandard1.0/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/tools/firmware_loader/packages/Newtonsoft.Json.12.0.3/lib/netstandard1.3/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/tools/firmware_loader/packages/Newtonsoft.Json.12.0.3/lib/netstandard1.3/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/tools/firmware_loader/packages/Newtonsoft.Json.12.0.3/lib/netstandard2.0/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/tools/firmware_loader/packages/Newtonsoft.Json.12.0.3/lib/netstandard2.0/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/tools/firmware_loader/packages/Newtonsoft.Json.12.0.3/lib/portable-net40+sl5+win8+wp8+wpa81/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/tools/firmware_loader/packages/Newtonsoft.Json.12.0.3/lib/portable-net40+sl5+win8+wp8+wpa81/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/tools/firmware_loader/packages/Newtonsoft.Json.12.0.3/lib/portable-net45+win8+wp8+wpa81/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/tools/firmware_loader/packages/Newtonsoft.Json.12.0.3/lib/portable-net45+win8+wp8+wpa81/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/tools/firmware_loader/packages/Newtonsoft.Json.12.0.3/packageIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/tools/firmware_loader/packages/Newtonsoft.Json.12.0.3/packageIcon.png
--------------------------------------------------------------------------------
/tools/firmware_loader/readme.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/tools/firmware_loader/readme.md
--------------------------------------------------------------------------------
/tools/font_tools/GFXfont_converter/gfxfont.h:
--------------------------------------------------------------------------------
1 | // Font structures for newer Adafruit_GFX (1.1 and later).
2 | // Example fonts are included in 'Fonts' directory.
3 | // To use a font in your Arduino sketch, #include the corresponding .h
4 | // file and pass address of GFXfont struct to setFont(). Pass NULL to
5 | // revert to 'classic' fixed-space bitmap font.
6 |
7 | #ifndef _GFXFONT_H_
8 | #define _GFXFONT_H_
9 |
10 | /// Font data stored PER GLYPH
11 | typedef struct {
12 | uint16_t bitmapOffset; ///< Pointer into GFXfont->bitmap
13 | uint8_t width; ///< Bitmap dimensions in pixels
14 | uint8_t height; ///< Bitmap dimensions in pixels
15 | uint8_t xAdvance; ///< Distance to advance cursor (x axis)
16 | int8_t xOffset; ///< X dist from cursor pos to UL corner
17 | int8_t yOffset; ///< Y dist from cursor pos to UL corner
18 | } GFXglyph;
19 |
20 | /// Data stored for FONT AS A WHOLE
21 | typedef struct {
22 | uint8_t *bitmap; ///< Glyph bitmaps, concatenated
23 | GFXglyph *glyph; ///< Glyph array
24 | uint8_t first; ///< ASCII extents (first char)
25 | uint8_t last; ///< ASCII extents (last char)
26 | uint8_t yAdvance; ///< Newline distance (y axis)
27 | } GFXfont;
28 |
29 | #endif // _GFXFONT_H_
30 |
--------------------------------------------------------------------------------
/tools/font_tools/font_converter/Makefile:
--------------------------------------------------------------------------------
1 |
2 | src = UC1701_font_tool.c
3 | obj = $(src:.c=.o)
4 |
5 | CC = gcc
6 | CFLAGS = -Wall -Wno-restrict -O2 -DBUILD_FONT_TOOL -I../../../firmware/include/hardware
7 | CFLAGS_JA = -Wall -Wno-restrict -O2 -DBUILD_FONT_TOOL -DJAPANESE_BUILD -I../../../firmware/include/hardware
8 | CFLAGS_DEBUG = -Wall -Wno-restrict -O0 -g -DBUILD_FONT_TOOL -I../../../firmware/include/hardware
9 | LDFLAGS = -static -s
10 | LDFLAGS_DEBUG =
11 |
12 | ifeq ($(OS),Windows_NT)
13 | bin = UC1701_font_tool.exe
14 | RM = del
15 | else
16 | bin = UC1701_font_tool
17 | RM = rm -f
18 | endif
19 |
20 | UC1701_font_tool: $(obj)
21 | $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
22 |
23 | UC1701_font_tool_JA: CFLAGS = $(CFLAGS_JA)
24 | UC1701_font_tool_JA: $(obj)
25 | $(CC) $(CFLAGS_JA) -o $@ $^ $(LDFLAGS)
26 |
27 | JA: UC1701_font_tool_JA
28 |
29 | all: UC1701_font_tool
30 |
31 | debug: CFLAGS = $(CFLAGS_DEBUG)
32 | debug: LDFLAGS = $(LDFLAGS_DEBUG)
33 | debug: clean UC1701_font_tool
34 |
35 | .PHONY: clean
36 |
37 | clean:
38 | $(RM) $(obj) $(bin) *~
39 |
--------------------------------------------------------------------------------
/tools/font_tools/font_converter/UC1701_font_tool.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/tools/font_tools/font_converter/UC1701_font_tool.exe
--------------------------------------------------------------------------------
/tools/patched_bootloaders/DM1801_patched_bootloader.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/tools/patched_bootloaders/DM1801_patched_bootloader.bin
--------------------------------------------------------------------------------
/tools/patched_bootloaders/GD77_patched_bootloader.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/tools/patched_bootloaders/GD77_patched_bootloader.bin
--------------------------------------------------------------------------------
/tools/patched_bootloaders/RD5R_bootloader_patched.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/tools/patched_bootloaders/RD5R_bootloader_patched.bin
--------------------------------------------------------------------------------
/tools/patched_bootloaders/gd77S_bootloader_patched.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/open-ham/OpenGD77/b843c1f050ebcfdb7aea7fad9182af13bc5ef3e6/tools/patched_bootloaders/gd77S_bootloader_patched.bin
--------------------------------------------------------------------------------
/tools/patched_bootloaders/readme.md:
--------------------------------------------------------------------------------
1 | This folder contains bootloaders which have been patched so that they do not check the Unique ID of the MK22 MCU and compare it with the signature bytes in the MCU ROM
2 |
3 | This bootloader is ONLY intended to be used by developers and anyone who need to reflash their MCU ROM because the signature bytes are corrupted or erased.
4 |
5 |
6 | On the GD-77 the signature bytes are at 0x7F800 and if these bytes become erased or corrupted the bootloader will not allow updates to the firmware.
7 | In this case the green LED on the top of the radio flashes, rather than remaining permanently on, and as soon as buttons SK1 and SK2 are released the bootloader runs the main firmware.
8 |
9 | On the Baofeng DM-1801 the signature bytes are in a completely different location 0x3800 and are in the top of the bootloader ROM section.
10 |
11 | The code for both the DM-1801 and GD-77 bootloaders appears to be almost identical, and the patch to no longer check the signature bytes is identical, changing a BEQ to a B assembler instruction
12 |
13 | Just to complicate things. There seems to be more than one type of DM-1801 bootloader.
14 | My DM-860 bootloader worked but did not light the green LED at all, so I have installed the bootloader sent to me by F1RBM, which was recovered from his DM-1801
15 | My green LED now illumates correctly.
16 |
17 | I don't know why the bootloader in my DM-860 did not illumate the LED, and I don't think there is any point adding it to this repo as the DM-1801 bootloader I uploaded here works fine.
18 |
--------------------------------------------------------------------------------